diff -durpN glibc-2.2.4/ChangeLog glibc-2.2.5/ChangeLog --- glibc-2.2.4/ChangeLog Wed Aug 15 18:49:57 2001 +++ glibc-2.2.5/ChangeLog Sun Jan 20 19:20:18 2002 @@ -1,10098 +1,2256 @@ -2001-08-15 Ulrich Drepper - - * libio/iofwide.c (_IO_fwide): Don't reset file position to - beginning of file, really get current position. - -2001-08-15 Andreas Schwab - - * sysdeps/m68k/m68020/atomicity.h (atomic_add): Don't allow - address register for operand 0. - -2001-08-14 Ulrich Drepper - - * stdio-common/perror.c (perror): Use _IO_fwide instead of fwide. - - * libio/libio.h (_IO_fwide): Handle zero as second parameter more - efficiently in macro. - -2001-08-14 Jakub Jelinek - - * resolv/nss_dns/dns-host.c (RESOLVSORT): Define. - (addrsort): New function. - * resolv/gethnamaddr.c (RESOLVSORT): Define. - -2001-08-14 Jakub Jelinek - - * string/strsignal.c (free_mem): Remove. - -2001-08-14 Andreas Jaeger - - * inet/inet_ntoa.c (free_mem): Remove, it's not used anymore. - Closes PR libc/2477, reported by Dylan Alex Simon - . - -2001-08-14 Ulrich Drepper - - * locale/Makefile (aux): Add xlocale. - * locale/xlocale.c: New file. - * include/locale.c (_nl_C_locobj): Declare. - * iconv/gconv_charset.h: Use __tolower_l, __isdigit_l, __isspace_l - with _nl_C_locobj instead of tolower, isdigit, isspace. - * iconv/gconv_conf.c: Likewise. - * iconv/gconv_int.h: Likewise. - * iconv/gconv_open.c: Likewise. - - * locale/newlocale.c: Minor cleanups. - -2001-08-14 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/w_expl.c: New file, copy from - ldbl-96/w_expl.c with tweaked constants. Patch by Stephen L - Moshier. - -2001-08-13 Ulrich Drepper - - * malloc/memusage.c (me): Allow creating the output file. - - * sysdeps/unix/sysv/linux/Makefile: Remove -fkeep-inline-functions - flag for init-first. - - * po/fr.po: Update from translation team. - -2001-08-13 Andreas Jaeger - - * sysdeps/mips/machine-gmon.h (MCOUNT): Don't use delay slot for - jal since it's a macro. - Patch by Simon Gee . - -2001-08-12 Ulrich Drepper - - * iconvdata/Makefile: Add rules to build ISO-IR-209 and MAC-SAMI. - * iconvdata/iso-ir-209.c: New file. - * iconvdata/mac-sami.c: New file. - * iconvdata/gconv-modules: Add entries for ISO-IR-209 and MAC-SAMI. - * iconvdata/tst-tables.sh: Likewise. - - * posix/getopt.c: Remove store_args_and_env which is not needed since - USE_NONOPTION_FLAGS is undefined anyhow. Use __libc_argc and - __libc_argv variables. - -2001-08-12 Roland McGrath - - * sysdeps/mach/hurd/clock.c: New file. - * sysdeps/mach/hurd/times.c: New file. - * sysdeps/mach/hurd/getclktck.c (__getclktck): Always return 1000000. - * sysdeps/mach/hurd/init-posix.c: New file. - - * hurd/hurdlookup.c (__hurd_file_name_lookup): Comment fix. - -2001-08-11 Roland McGrath - - * sysdeps/mach/hurd/bits/time.h - (CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID): New macros. - * sysdeps/mach/hurd/i386/bits/time.h: File removed. - - * posix/getopt.c (nonoption_flags_max_len, nonoption_flags_len): - Make these defns conditional on [USE_NONOPTION_FLAGS]. - -2001-08-11 Ulrich Drepper - - * config.h.in: Add #undef line for USE_NONOPTION_FLAGS. - * posix/getopt_init.c: Produce code only if USE_NONOPTION_FLAGS is - defined. - * posix/getopt.c: Use __getopt_nonoption_flags only if - USE_NONOPTION_FLAGS is defined. - * sysdeps/mach/hurd/i386/init-first.c: Use __getopt_clean_environment - only if USE_NONOPTION_FLAGS is defined. - * sysdeps/mach/hurd/mips/init-first.c: Likewise. - * sysdeps/unix/sysv/linux/init-first.c: Likewise. - * sysdeps/arm/init-first.c: Likewise. - * sysdeps/generic/init-first.c: Likewise. - * sysdeps/i386/init-first.c: Likewise. - * sysdeps/sh/init-first.c: Likewise. - -2001-08-11 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/e_j0l.c: New file. - Contributed by Stephen L Moshier . - -2001-08-11 Ulrich Drepper - - * assert/assert.c (set_progname): Removed. - (__assert_fail): Use __progname instead of __assert_program_name. - * assert/assert-perr.c (__assert_perror_fail): Likewise. - - * malloc/malloc.c (ptmalloc_init): Don't call getenv five times. - Instead use new function next_env_entry which iterates over the - environment once. - - * sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Only set - _dl_profile_map for the right object. - - * elf/dl-reloc.c (_dl_relocate_object): Allocate l_reloc_result - only if consider_profiling is != 0, not if _dl_profile != NULL. - - * sysdeps/generic/dl-environ.c (_dl_next_ld_env_entry): Optimize a bit. - Now returns pointer to first character after "LD_". - * elf/rtld.c (process_envvars): Adjust for change above. - * sysdeps/unix/sysv/linux/dl-librecon.h (EXTRA_LD_ENVVARS): Likewise. - * sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS): - Likewise. - -2001-08-10 Wolfram Gloger - - * malloc/malloc.c (grow_heap): Use mmap() rather than mprotect() - to allocate new memory, for better performance with Linux-2.4.x. - -2001-08-10 Ulrich Drepper - - * posix/getopt_init.c (__getopt_clean_environment): Avoid making - the strncmp calls most of the time by testing for '_' as the first - character of the name. - - * elf/dl-open.c (add_to_global): Remove stale comment. - - * elf/dl-load.c (fillin_rpath): In SUID binaries, don't mark - non-system-dirs in LD_LIBRARY_PATH as nonexisting, simply drop them. - - * libio/iovdprintf.c (_IO_vdprintf): Set _IO_USER_LOCK flag for - temporary stream. Don't define lock. - * libio/obprintf.c (_IO_obstack_vprintf): Likewise. - * libio/strops.c (_IO_str_init_static): Likewise. - * libio/vasprintf.c (_IO_vasprintf): Likewise. - * libio/wstrops.c (_IO_wstr_init_static): Likewise. - * libio/iovsprintf.c: Likewise. - * libio/iovsnprintf.c: Likewise. - * libio/iovswprintf.c: Likewise. - * libio/iovsscanf.c: Likewise. - * libio/iovswscanf.c: Likewise. - * stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Likewise. - * libio/genops.c (_IO_no_init): Don't call _IO_lock_init if _lock - is NULL. - (_IO_default_finish): Likewise. - * libio/wgenops.c (_IO_wdefault_finish): Likewise. - -2001-08-10 Andreas Jaeger - - * stdio-common/stdio_ext.h: Fix typo. - -2001-08-09 Ulrich Drepper - - * posix/fnmatch_loop.c: Fix computation of alignment. - -2001-08-09 Isamu Hasegawa - - * posix/regex.c (wcs_regex_compile): Use appropriate string - to compare with collating element. - Fix the padding for the alignment. - -2001-08-09 Isamu Hasegawa - - * locale/programs/ld-collate.c (collate_output): Exclude - characters from elem_table. - Reduce if clause to write collating elements correctly. - * posix/Makefile (tests): Add bug-regex5. - * posix/bug-regex5.c: New file. - -2001-08-09 Ulrich Drepper - - * locale/lc-time.c (_nl_parse_alt_digit): New function. - * locale/localeinfo.h: Add prototype for it. - * time/strptime.c (get_alt_number): Use _nl_parse_alt_digit to get - the value. Correct computation of hour for %OI. If no %EC given - but %Ey use numeric formular. - - * dlfcn/Makefile (tststatic-ENV): Also add $(common-objpfx)elf for - ld.so. - - * time/tst-strptime.c: Add tests in different locales. - * time/Makefile (tst-strptime-ENV): Define. - -2001-08-09 Jakub Jelinek - - * catgets/catgets.c (catclose): Be liberal about catalog_desc in - catclose too. - -2001-08-09 Ulrich Drepper - - * time/strptime.c (strptime_internal): Add handling of year + - %U/%W week + week day. - * time/tst-strptime.c: Add test case for %U and %W handling. - - * stdio-common/vfscanf.c: Fix reading of wide chars and strings if - not COMPILE_WSCANF. - - * libio/vswprintf.c (_IO_vswprintf): Fix return value handling - which is different from snprintf. - * libio/tst_swprintf.c: Add tests for too small output buffer. - - * stdio-common/vfscanf.c: Fix handling of %[] for COMPILE_WSCANF. - * libio/Makefile (tests): Add tst-swscanf. - * libio/tst-swscanf.c: New file. - -2001-08-09 Jakub Jelinek - - * posix/globtest.sh: Robustify tilde tests. - -2001-08-09 Andreas Jaeger - - * locale/programs/ld-ctype.c (DEFAULT): Fix expression. - (EMPTY): New. - (wctype_table_finalize): Use it. - (find_idx): Likewise. - (wctype_table_get): Likewise. - - * configure.in: Add check for GCC 3.x. - -2001-08-09 Ulrich Drepper - - * libio/wfileops.c (_IO_wfile_seekoff): Don't even try to handle - seeking with backup buffer present. - Correct determining of internal buffer position. - Reset also wide buffers if we reset the internal buffers. - * libio/iofwide.c (_IO_fwide): Always determine file offset for wide - streams. - * libio/ioseekoff.c: Catch one unimplemented case. - * libio/ftello.c: Don't abort if the wide stream has backup buffer. - * libio/ftello64.c: Likewise. - * libio/iofgetpos.c: Likewise. - * libio/iofgetpos64.c: Likewise. - * libio/ftell.c: Likewise. - * libio/Makefile (tests): Add tst-ungetwc2. - * libio/tst-ungetwc2.c: New file. - -2001-08-08 Ulrich Drepper - - * locale/elem-hash.h (elem_hash): Correct stupid mistake and - create real hash values now. - Patch by Isamu Hasegawa . - - * libio/iofgetpos.c (_IO_new_fgetpos): Correct a few problems in - the handling of wide streams. - - * libio/ioungetwc.c (ungetwc): Orient stream first. - * libio/Makefile (tests): Add tst-ungetwc1. - * libio/tst-ungetwc1.c: New file. - - * libio/wfileops.c (_IO_wfile_underflow): Remove incorrect test - for possible conversion using __codecvt_do_in. - * libio/Makefile (tests): Add tst-fgetws. - * libio/tst-fgetws.c: New file. - - * libio/iofgetws.c: Use _IO_ferror_unlocked macros instead of - coding the test here. - - * catgets/open_catalog.c: Rewrite code to assume that the function - is called at catopen time and not delayed in catgets. - * catgets/catgets.c (catopen): Call __open_catalog and fail if that - function failed. - (catgets): Remove code for delayed opening of catalog. - * catgets/catgetsinfo.h: Remove now unnecessary information from - struct catalog_info. Change __open_catalog prototype. - * catgets/gencat.c: Adjust __open_catalog call. - * catgets/test-gencat.c: Stop program if catopen failed. - - * locale/C-monetary.c (_nl_C_LC_MONETARY): Provide correct value - for CRNCYSTR. - - * locale/programs/ld-messages.c (messages_finish): Provide POSIX - locale compliant default values for fields without definition. - * locale/programs/ld-time.c (time_finish): Likewise. - * locale/programs/ld-monetary.c (monetary_finish): Likewise. - -2001-08-08 Andreas Jaeger - - * sysdeps/ieee754/ldbl-96/s_ilogbl.c (__ilogbl): Fix test for - infinity. - -2001-08-07 Ulrich Drepper - - * sysdeps/ia64/memusage.h (GETTIME): Define using hp-timing.h - functionality. - - * sysdeps/ia64/hp-timing.h (HP_TIMING_NOW): Fix comment. - -2001-08-07 Jakub Jelinek - - * malloc/memusage.c (initialized): New variable. - (init): If not yet initialized, call me(). - (me): Do all dlsym calls here. - (malloc, realloc, calloc, free): If not yet initialized, - call me(). If in the middle of initializing, return NULL or - do nothing. - -2001-08-07 Jakub Jelinek - - * sysdeps/unix/seekdir.c (seekdir): Set dirp->filepos. - - * dirent/tst-seekdir.c (main): Check whether telldir right after - seekdir returns 2nd argument given to seekdir. - -2001-08-07 Franz Sirl - - * dlfcn/Makefile (tststatic-ENV): Add $(common-objpfx) to - LD_LIBRARY_PATH. - -2001-08-07 Andreas Jaeger - Andreas Schwab - Bruno Haible - - * locale/programs/3level.h (EMPTY): New macro. - (*_get, *_add, *_iterate, *_finalize): Use it instead of ~(uint32_t) 0. - -2001-08-08 GOTO Masanori - - * locale/iso-3166.def: Updates from latest official list. - -2001-08-07 Andreas Jaeger - - * stdlib/tst-strtod.c: Disable HUGE_VAL tests for older GCCs. - - * iconv/gconv_charset.h (upstr): Add unused attribute to avoid warning. - - * libio/iopopen.c (_IO_new_proc_open): Fix typos, it's _IO_MTSAFE_IO. - (_IO_new_proc_close): Likewise. - * libio/oldiopopen.c (_IO_old_proc_open): Likewise. - (_IO_old_proc_close): Likewise. - -2001-08-06 Ulrich Drepper - - * manual/locale.texi: Add documentation for rpmatch. - Patch by Jochen Hein . - -2001-08-06 Jakub Jelinek - - * stdlib/strtod.c (STRTOF): Skip whole infinity, not just inf. - * stdio-common/vfscanf.c (__vfscanf): +- can be followed by i in +-Inf. - - * stdlib/tst-strtod.c (tests): Add Inf tests. - * stdio-common/tstscanf.c (main): Add tests for +- before Inf. - -2001-08-06 Ulrich Drepper - - * locale/weightwc.h (findidx): Change type of i to int32_t. - - * wcsmbs/wcsmbs-tst1.c (main): Avoid warning. Pretty printing. - -2001-08-05 Roland McGrath - - * sysdeps/unix/bsd/bsd4.4/bits/dirent.h (struct dirent): Rename member - d_fileno to d_ino. - (struct dirent64): Likewise. - (d_fileno): Define as macro. - -2001-08-04 Roland McGrath - - * sysdeps/mach/hurd/getrusage.c: Use TASK_EVENTS_INFO if implemented - by the microkernel (which it's not). - -2001-08-04 Ulrich Drepper - - * libio/fileops.c (_IO_new_file_underflow): Don't call - _IO_flush_all_linebuffered. This isn't required in any standard. - Instead flush only stdout. - * libio/wfileops.c (_IO_wfile_underflow): Likewise. - -2001-08-04 Franz Sirl - - * dlfcn/Makefile: Add rules for new testcase tststatic. - * dlfcn/tststatic.c: New file. - * dlfcn/modstatic.c: New file. - -2001-08-04 Ulrich Drepper - - * manual/summary.awk: Fix value used for FF. - - * elf/rtld.c: Correct use of __builtin_expect. - - * elf/dl-close.c: Remove commented-out code. - - * libio/genops.c (_IO_unbuffer_write): Force streams in narrow - orientation so that conversion modules aren't used anymore. - * malloc/set-freeres.c: Call _IO_cleanup before running subfreeres - functions to avoid using wide streams afterwards. - - * iconvdata/Makefile: Add rules to build GEORGIAN-PS and - GEORGIAN-ACADEMY. - * iconvdata/georgian-ps.c: New file. - * iconvdata/georgian-academy.c: New file. - * iconvdata/gconv-modules: Add entries for GEORGIAN-PS and - GEORGIAN-ACADEMY. - * iconvdata/tst-tables.sh: Add GEORGIAN-PS and GEORGIAN-ACADEMY. - -2001-08-03 Ulrich Drepper - - * locale/programs/ld-collate (insert_value): If symbol in order - definition does not exist create it as a sequence without - associated multibyte and wide representation. - -2001-07-30 Roland McGrath - - * sysdeps/mach/bits/libc-lock.h (__libc_cleanup_region_start): Diddle - syntax so both function and pointer-to-function arguments work right. - -2001-08-03 Tom Rix +2002-01-18 Andreas Schwab - * config.h.in: Add HAVE_XCOFF for AIX. - * configure.in: Add --with-xcoff option. - * include/libc-symbols.h: Disable the .stabs macros. + * sysdeps/unix/sysv/linux/configure.in + (libc_cv_gcc_unwind_find_fde): Set for m68k, too. -2001-08-03 Ulrich Drepper +2002-01-17 Ulrich Drepper - * iconvdata/8bit-gap.c: Correctly use __builtin_expect. - * iconvdata/ansi_x3.110.c: Likewise. - * iconvdata/big5.c: Likewise. - * iconvdata/euc-cn.c: Likewise. - * iconvdata/euc-jp.c: Likewise. - * iconvdata/euc-kr.c: Likewise. - * iconvdata/gb18030.c: Likewise. - * iconvdata/gbbig5.c: Likewise. - * iconvdata/gbgbk.c: Likewise. - * iconvdata/gbk.c: Likewise. - * iconvdata/ibm930.c: Likewise. - * iconvdata/ibm932.c: Likewise. - * iconvdata/ibm933.c: Likewise. - * iconvdata/ibm935.c: Likewise. - * iconvdata/ibm939.c: Likewise. - * iconvdata/ibm943.c: Likewise. - * iconvdata/iso-2022-cn.c: Likewise. - * iconvdata/iso-2022-kr.c: Likewise. - * iconvdata/iso646.c: Likewise. - * iconvdata/iso8859-1.c: Likewise. - * iconvdata/iso_6937-2.c: Likewise. - * iconvdata/iso_6937.c: Likewise. - * iconvdata/johab.c: Likewise. - * iconvdata/sjis.c: Likewise. - * iconvdata/t.61.c: Likewise. - * iconvdata/uhc.c: Likewise. - * iconvdata/unicode.c: Likewise. - * iconvdata/utf-16.c: Likewise. - * iconv/gconv_simple.c: Likewise. Convert assert() in real error - handling. + * nscd/nscd.c (drop_privileges): Removed. Adjust caller. + * nscd/connections.c (begin_drop_privileges): New function. + (finish_drop_privileges): New function. + (nscd_init): Call the new functions which also install all groups + for the server user. + Patch by Christopher Allen Wing . - * iconvdata/Makefile: Add rules to build KOI8-T module. - * iconvdata/koi8-t.c: New file. - * iconvdata/gconv-modules: Add entries for KOI8-T. - * iconvdata/tst-tables.sh: Add KOI8-T. +2002-01-17 Martin Schwidefsky - * locale/iso-639.def: Correct Javanese 2 letter code. Add Tonga. - Add Tigrinya. + * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Use 64 bit + instructions for pointer operations. + * sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S: Likewise. -2001-08-02 Ulrich Drepper +2002-01-17 Andreas Jaeger - * locale/programs/ld-collate.c (collate_read): Handle collating-element - and reorder_after following copy statement correctly. + * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: GCC 3.1 has + __uint128_t build-in. -2001-08-02 Andreas Jaeger + * sysdeps/unix/sysv/linux/configure.in: Fix check for S390 and + PowerPC. - * libio/bits/stdio.h (printf): Remove printf optimization since - GCC 3.0 can optimize printf. +2002-01-16 Ulrich Drepper -2001-08-02 Ulrich Weigand + * posix/getconf.c: Update copyright year. + * nss/getent.c: Likewise. + * nscd/nscd_nischeck.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * elf/ldconfig.c: Likewise. + * catgets/gencat.c: Likewise. + * csu/version.c: Likewise. + * elf/ldd.bash.in: Likewise. + * elf/sprof.c (print_version): Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.c: Likewise. + * nscd/nscd.c (print_version): Likewise. + * debug/xtrace.sh: Likewise. + * malloc/memusage.sh: Likewise. + * malloc/mtrace.pl: Likewise. - * sysdeps/s390/s390-32/memcpy.S: Fixed incorrect use of - mvcle introduced by 2001-07-12 change. - * sysdeps/s390/s390-64/memcpy.S: Likewise. +2002-01-16 Andreas Schwab -2001-07-31 Ulrich Drepper + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Fix regexp to + reliably remove "-ia64" from rtld name. - * sysdeps/unix/sysv/linux/i386/getcontext.S: Don't touch the %gs - register so that contexts can be used in different threads. - * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/i386/swapcontext.S: Likewise. +2002-01-16 Martin Schwidefsky - * sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Correct - test for cmsg struct size. - * sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Likewise. + * sysdeps/unix/sysv/linux/s390/swapcontext.c: Remove. + * sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S: New file. - * sysdeps/unix/sysv/linux/i386/makecontext.S: Remove unnecessary - initializations. +2002-01-14 Martin Schwidefsky - * libio/iopopen.c: Add lock for proc_file_chain access. - * libio/oldiopopen.c: Add lock for old_proc_file_chain access. - Reported by Padraig Brady . + * sysdeps/s390/fpu/libm-test-ulps: Update. -2001-07-31 Andreas Jaeger +2002-01-11 Martin Schwidefsky - * sysdeps/unix/sysv/linux/sparc/bits/poll.h (NPOLLFILE): Removed. - * sysdeps/unix/sysv/linux/mips/bits/poll.h (NPOLLFILE): Removed. - * sysdeps/unix/sysv/linux/m68k/bits/poll.h (NPOLLFILE): Removed. - * sysdeps/unix/sysv/linux/bits/poll.h (NPOLLFILE): Removed. - * sysdeps/generic/bits/poll.h (NPOLLFILE): Removed. + * sysdeps/unix/sysv/linux/configure.in (libc_cv_gcc_unwind_find_fde): + Set for s390 and s390x architectures. + (arch_minimum_kernel): Set for s390 and s390x. + * sysdeps/unix/sysv/linux/s390/brk.c (__brk): Correct inline + assembly contraints. + * sysdeps/unix/sysv/linux/s390/profil-counter.h: Move/copy to ... + * sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h: ... here, + remove high order bit from the program counter. + * sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h: ... and here. + * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Add framestate. - * libio/genops.c (flush_cleanup): Guard list_all_lock to allow - compilation without threads. +2002-01-09 Jakub Jelinek -2001-07-30 Ulrich Drepper + * sysdeps/alpha/fpu/e_sqrt.c (__ieee754_sqrt): Don't use multi-line + string literals. + (__full_ieee754_sqrt): Add __attribute_used__. - * po/fr.po: Update from translation team. +2002-01-10 Ulrich Drepper -2001-07-30 Andreas Jaeger + * sysdeps/generic/group_member.c (__group_member): Also check + groups[0] [PR libc/2781]. - * sysdeps/ieee754/ldbl-128/e_atanhl.c: New file, contributed by - Stephen L Moshier. +2001-12-02 Roland McGrath - * posix/regex.c: Declare wcs functions only if compiling with - MBS_SUPPORT. - Don't use #elif for traditional C. + * mach/Makefile, mach/Machrules: Move comments out of \ continuations. -2001-07-29 Mark Kettenis + * hurd/hurd.h (__hurd_fail): Add `break;' to silence new gcc-3 warning. + Reported by Jeff Bailey . - * sysdeps/mach/hurd/recvmsg.c: New file. - * sysdeps/mach/hurd/sendmsg.c: New file. + * hurd/hurd.h (_hurd_umask): Remove volatile qualifier from decl. + Reported by Jeff Bailey . -2001-07-27 Ulrich Drepper + * mach/Makefile ($(objpfx)mach-syscalls.mk): Pass $(CFLAGS) to $(CC). + * mach/Machrules ($(objpfx)%.udeps static pattern rule): Likewise. + Reported by Jeff Bailey . - * version.h (VERSION): Bump to 2.2.4. +2002-01-07 Roland McGrath - * sysdeps/mips/Dist: Remove non-existing files. - * sysdeps/mips/mips64/Dist: Likewise. - * sysdeps/mips/mipsel/Dist: Removed. - * iconv/Makefile (distribute): Add strtab.c and iconvconfig.h. - * sysdeps/generic/Dist: Add bits/link.h. - * sysdeps/unix/sysv/linux/m68k/Dist: Add sys/procfs.h. - * sysdeps/unix/sysv/aix/Dist: Add dl-support.c, dl-addr.c, and - dl-error.c. - * sysdeps/ia64/Dist: Add bits/link.h. + * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Use + volatile on type of ARGC so the compiler doesn't get clever. - * libio/vasprintf.c (_IO_vasprintf): Don't copy uninitialized byte - from stream buffer to result buffer. - Reported by Michael Meeks . +2002-01-08 Ulrich Drepper - * libio/Makefile: Add rules to check output of tst-fopenloc and - for memory leaks. - * libio/tst-fopenloc.c: New file. + * version.h (VERSION): Bump to 2.2.5. - * iconv/gconv_cache.c (__gconv_compare_alias_cache): New function. - * iconv/gconv_int.h: Add prototype for __gconv_compare_alias_cache. - * iconv/gconv_charset.h: Replace __gconv_lookup_alias prototype with - __gconv_compare_alias prototype. - * iconv/gconv_db.c (__gconv_lookup_alias): Removed. - (__gconv_compare_alias): New function. - * locale/findlocale.c (_nl_find_locale): Use __gconv_compare_alias - instead of calling __gconv_lookup_alias twice and compare here. + * Makefile (distribute): Add scripts/cpp. + * elf/Makefile (distribute): Add reldep6mod[01234].c, + unwind-dw2.c, unwind-dw2-fde.c, unwind.h, unwind-pe.h, + unwind-dw2-fde.h, and dwarf2.h. + * sysdeps/unix/bsd/bsd4.4/Dist: New file. + * sysdeps/unix/sysv/aix/Dist: Add sysv_termio.h and start-libc.c. + * sysdeps/unix/sysv/linux/ia64/Dist: Add ldd-rewrite.sed. + * sysdeps/unix/sysv/linux/s390/Dist: Likewise. -2001-07-26 Mark Kettenis +2002-01-07 Andreas Jaeger - * hurd/hurdsig.c (_hurd_internal_post_signal): Fix handling of - SA_RESETHAND and SA_NODEFER. + * sysdeps/generic/bits/byteswap.h: Prevent double inclusion. + * sysdeps/i386/bits/byteswap.h: Likewise. + * sysdeps/ia64/bits/byteswap.h: Likewise. + * sysdeps/m68k/bits/byteswap.h: Likewise. + * sysdeps/s390/s390-32/bits/byteswap.h: Likewise. + * sysdeps/s390/s390-64/bits/byteswap.h: Likewise. -2001-07-27 Ulrich Drepper +2002-01-02 Bruno Haible - * libio/fileops.c (_IO_new_file_fopen): Correctly locate ccs= - substring. Don't handle ccs= if no descriptor was allocated. - Normalize codeset name before calling __wcsmbs_named_conv. - Initialize transliteration elements. Free step data structure. - * libio/iofclose.c (_IO_new_fclose): Correct freeing of the step data. - * libio/iofwide.c (__libio_translit): Renamed from libio_translit - and made public. Various little cleanup changes. - * wcsmbs/wcsmbsload.h (struct gconv_fcts): Add towc_nsteps and - tomb_nsteps member. - * wcsmbs/wcsmbsload.c: Add some casts to avoid warnings. - (__wcsmbs_gconv_fcts): Initialize towc_nsteps and tomb_nsteps member. - (getfct): Take additional parameter with pointer to variable where the - number of steps is stored in. Disable code which allows to use more - than one step for now. Adjust all callers. - (free_mem): New function. Frees data associated with currently - selected converters. + * intl/plural.y: Fix %expect count. - * malloc/mtrace.pl: Extract addresses from DSOs. +2002-01-07 Stephen L Moshier -2001-07-26 Ulrich Drepper + * sysdeps/ieee754/ldbl-96/s_erfl.c (erfcl): Fix K&R header. - * malloc/mcheck.c (checkhdr): Disable mcheck before reporting an - error. Don't run any tests if mcheck is disabled. + * sysdeps/ieee754/ldbl-96/e_lgammal_r.c (sin_pi): Fix typo in test + for x < 0.25 and restore original range reduction method. + (__ieee754_lgammal_r): Make sure signgam is set before returning. - * elf/dl-support.c (_dl_important_hwcaps): Avoid using malloc - early in the program. +2001-12-31 Ulrich Drepper -2001-07-27 Andreas Jaeger + * sysdeps/unix/sysv/linux/getloadavg.c (getloadavg): Always use C + locale to parse /proc/loadavg [PR libc/2760]. - * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h (SC_GPRS): Fix - value following change from 2001-05-30. +2001-12-22 Roland McGrath - * sysdeps/s390/s390-64/bits/setjmp.h (_JMPBUF_UNWINDS): Follow - rename change from 2001-07-12 for __jmp_buf. - Patches by Ulrich Weigand . + * hurd/Versions (libc: GLIBC_2.2.5): Add _hurd_port_set, + _hurd_port_init, and __hurd_self_sigstate. -2001-07-26 Roland McGrath + * mach/Versions (libc: GLIBC_2.2.5): Add mig_strncpy. - * sysdeps/generic/bits/termios.h (EXTA, EXTB): Make these conditional - on __USE_MISC rather than __USE_BSD. - (B57600, B115200, B230400, B460800, B500000, B576000, B921600, - B1000000, B1152000, B1500000, B2000000, B2500000, B3000000, - B3500000, B4000000): New macros. - * sysdeps/generic/tcsetattr.c (bad_speed): Accept those values. - * termios/cfsetspeed.c (speeds): Likewise. +2001-12-18 Jakub Jelinek -2001-07-26 kaz Kojima + * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (clone): Subtract + stack bias from child stack pointer before passing it to clone syscall. - * sysdeps/sh/dl-machine.h (elf_machine_load_address): Don't use - multi-line strings. - (FUN_ADDR, FGR_SAVE, ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. - (elf_machine_rela): Handle unaligned relocation. +2001-12-14 Ulrich Drepper -2001-06-07 David Mosberger + * crypt/md5.h: Define md5_uintptr. - * sysdeps/ia64/dl-symaddr.c (_dl_symbol_address): Update call to - __ia64_make_fptr() for new interface. - (_dl_function_address): Remove. +2001-11-29 Andreas Jaeger - * sysdeps/ia64/dl-machine.h (IA64_BOOT_FPTR_TABLE_LEN): Rename - from IA64_BOOT_FPTR_SIZE and reduce its value from 256 to 200. - (struct ia64_fdesc): Rename from struct ia64_fptr and drop "next" - pointer. Rename member "func" to "ip". - (struct ia64_fdesc_table): New type. - (__ia64_make_fptr): Change prototype. - (__ia64_init_bootstrap_fdesc_table): New function. - (ELF_MACHINE_BEFORE_RTLD_RELOC): New macro. - (__boot_ldso_fptr): Removed. - (__fptr_next): Removed. - (__fptr_root): Removed. - (__fptr_count): Removed. - (TRAMPOLINE_TEMPLATE): Fix typo in comment. Don't use multi-line - strings to avoid warning from gcc3. - (RTLD_START): Don't use multi-line strings. - (ELF_MACHINE_START_ADDRESS): Use DL_STATIC_FUNCTION_ADDRESS. - (elf_machine_fixup_plt): Update the code entry point in the - function descriptor through a "volatile" pointer to ensure proper - write ordering. - (elf_machine_rela): Simplify handling of FPTR relocs: always call - __ia64_make_fptr(). + * sysdeps/unix/sysv/linux/x86_64/Versions: Add arch_prctl. + * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Add arch_prctl call. - * sysdeps/ia64/dl-lookupcfg.h (DL_AUTO_FUNCTION_ADDRESS): New macro. - (DL_STATIC_FUNCTION_ADDRESS): Likewise. - (DL_DT_INIT_ADDRESS): Use DL_AUTO_FUNCTION_ADDRESS. - (DL_DT_FINI_ADDRESS): Likewise. +2001-12-13 Andreas Schwab - * sysdeps/ia64/dl-fptr.c: Rewrite for better scalability and to - avoid deadlocks. + * stdio-common/vfprintf.c (process_string_arg): Correctly handle + zero precision with wide character string format. - * include/link.h: Add member machine specific "l_mach" member to - link_map. +2001-12-13 Thorsten Kukuk - * sysdeps/generic/bits/link.h: New file. - * sysdeps/ia64/bits/link.h: Likewise. + * sysdeps/posix/cuserid.c (cuserid): If we don't find the UID, + but have a user supplied buffer, return the empty buffer, not NULL. - * elf/rtld.c (_dl_start): Fix typo in comment. - (_dl_start_final): Copy new "l_mach" member from temporary to - final bootstrap map. +2001-12-13 Ulrich Drepper -2001-07-25 Ulrich Drepper + * crypt/md5.c (md5_process_bytes): Correct handling of alignment. + Patch by Eric Sharkey . - * csu/gmon-start.c: Use ENTRY_POINT_DECL if defined instead of a - declaration using ENTRY_POINT. - * sysdeps/ia64/elf/entry.h (ENTRY_POINT_DECL): New definition. +2001-12-12 Ulrich Drepper -2001-07-25 H.J. Lu + * nis/nis_findserv.c (__nis_findfastest_with_timeout): Mostly the code + from __nis_findfastest. Take timeout value from parameter. + (__nis_findfastest): Call __nis_findfastest_with_timeout repeatedly. + * nis/nis_intern.h: Define parameters controlling __nis_findfastest + [PR libc/2520]. Patch by Alexander Belopolsky . - * csu/gmon-start.c: Include - (_start): Replaced with ENTRY_POINT. +2001-12-12 Andreas Jaeger -2001-07-25 Mark Kettenis + * configure.in: Use -nostartfiles -nostdlib for linker tests, fix + combreloc test so that it works in this case. - * sysdeps/unix/bsd/bsd4.4/bits/socket.h: New file. +2001-12-11 Ulrich Drepper -2001-07-25 Ulrich Drepper + * resolv/nss_dns/dns-host.c (getanswer_r): Remove MAX_NR_ADDRS + limitation [PR libc/2564]. - * iconv/iconvconfig.c (main): Don't write an output file if we - have seen an error. - (write_output): Don't overwrite old cache file until we know we - have a new one. +2001-12-10 Roland McGrath - * iconv/Makefile (install-sbin): Add iconvconfig. + * sysdeps/mach/hurd/bind.c (bind): Don't deallocate IFSOCK if we never + set it. -2001-07-25 Jakub Jelinek + * shlib-versions [USE_IN_LIBIO] (.*-.*-gnu-gnu.*): Set default + set to GLIBC_2.2.5, not GLIBC_2.2.4. - * elf/Makefile (routines): Add dl-iteratephdr and - dl-iteratephdr-static. - (elide-routines.os): Add dl-iteratephdr-static. - * elf/dl-iteratephdr.c: New file. - * elf/link.h (struct dl_phdr_info): New definition. - (dl_iterate_phdr): New prototype. - * elf/Versions (dl_iterate_phdr): Add at GLIBC_2.2.4. - * include/link.h (struct dl_phdr_info): New definition. - (dl_iterate_phdr, __dl_iterate_phdr): New prototypes. - * sysdeps/generic/dl-iteratephdr-static.c: New file. - * sysdeps/unix/sysv/linux/ia64/dl-iteratephdr-static.c: New file. + * sysdeps/mach/hurd/configure.in (libc_cv_gcc_unwind_find_fde): + Fix conditionals so this is set by default for stdio and not for libio. + * sysdeps/mach/hurd/configure: Regenerated. -2001-07-24 Igor Khavkine +2001-12-10 Thorsten Kukuk - * hurd/hurdsig.c (_hurdsig_init): Fix incorrect initialization - of pending signals. + * io/ftw.c (ftw_startup): Check, if the path is search and readable. -2001-06-22 Jakub Jelinek +2001-12-10 Ulrich Drepper - * sysdeps/powerpc/dl-machine.c (__elf_preferred_address): Prefer - gaps below main executable. + * sysdeps/generic/glob.c (glob): Return only pattern if nothing + matches and GLOB_NOCHECK is set. + * posix/globtest.sh: Correct expected result for NOCHECK test. -2001-07-22 Bruno Haible + * po/ca.po: Update from translation team. - * intl/libintl.h (ngettext, dngettext, dcngettext): Use both msgid1 - and msgid2 for printf format argument checking. +2001-12-05 Ulrich Drepper -2001-07-24 Ulrich Drepper + * timezone/zic.c: Fix handling of turnaround times. + Patch by Arthur David Olson . - * iconv/gconv_cache.c (find_module): Don't allocate room for the - filename. Use alloca, we don't need it beyond this function. - (__gconv_release_cache): New function. - * iconv/gconv_db.c (__gconv_close_transform): Call - __gconv_release_cache after the steps are handled. - * iconv/gconv_dl.c (__gconv_find_shlib): Allocate file name in the - record as well. - * iconv/gconv_int.h: Add prototype for __gconv_release_cache. +2001-12-01 Roland McGrath - * iconv/gconv_cache.c (__gconv_lookup_cache): Catch one more - boundary case and reject it. + * sysdeps/mach/hurd/configure.in (libc_cv_gcc_unwind_find_fde): Add + missing backslash in test arguments. + * sysdeps/mach/hurd/configure: Regenerated. -2001-07-24 Andreas Jaeger +2001-12-02 Moshe Olshansky - * manual/examples/longopt.c (main): Fix which options take arguments. + * sysdeps/ieee754/dbl-64/e_remainder.c (__ieee754_remainder): Fix + overflow problem. -2001-07-24 Ulrich Drepper +2001-11-29 Jakub Jelinek - * iconvdata/Makefile: Add dependencies for tst-loading test. + * sysdeps/generic/glob.c (next_brace_sub): Return NULL if braces + don't match, fix {{a,b},c} globbing, clean up. + Patch by Flavio Veloso . + * posix/globtest.sh: Add new tests. -2001-07-24 Andreas Jaeger +2001-11-28 Ulrich Drepper - * iconv/iconvconfig.c (name_insert): Make static to avoid warning. + * libio/genops.c (_IO_flush_all_lockp): New function. The same code + as the old _IO_flush_all but lock only if parameter is nonzero. + (_IO_flush_all): Call _IO_flush_all_lockp with 1 as parameter. + * libio/libioP.h: Add prototype for _IO_flush_all_lockp. + * sysdeps/generic/abort.c (fflush): Define to _IO_flush_all_lockp(0) + if libio is used [PR libc/2575]. -2001-07-23 Ulrich Drepper +2001-11-28 Jakub Jelinek - * locale/programs/locale.c (write_locales): Disable implicit - locking for the stream. Use feof_unlocked instead of feof. + * sysdeps/sparc/fpu/bits/mathinline.h (__signbitf, __signbit, + __signbitl): Only define for ISO C99. - * sysdeps/unix/sysv/linux/i386/makecontext.S: Initialize %fs, %gs, - and floating-point status as well. +2001-11-22 Thorsten Kukuk - * libio/iofclose.c (_IO_new_fclose): Unlink descriptor first to - avoid deadlock. - * libio/oldiofclose.c (_IO_old_fclose): Likewise. - * libio/genops.c (_IO_un_link): Get stream lock since it's not - always done in the caller. - (_IO_link_in): Likewise. + * nss/nss_files/files-hosts.c (_nss_files_get##name##_r): Set + herrnop to NETDB_INTERNAL if we run out of buffer space. - * libio/genops.c (_IO_list_all_stamp): New variable. - (_IO_un_link): Bump _IO_list_all_stamp after removing from list. - (_IO_link): Likewise for insertion. - (flush_cleanup): New function. - (_IO_flush_all): Get list_all_lock and all individual locks for the - streams. Detect and handle changes to the _IO_list_all list. - (_IO_flush_all_linebuffered): Likewise. - * sysdeps/generic/bits/stdio-lock.h: Define - _IO_cleanup_region_start_noarg. - * sysdeps/mach/hurd/bits/stdio-lock.c: Likewise. +2001-11-28 Ulrich Drepper - * stdio-common/printf.h: Fix typo in comment. + * nss/nss_files/files-XXX.c (internal_getent): Correct input + overflow test for platforms with signed char. + Reported by Andrew Haley . - * iconv/gconv_cache.c (__gconv_lookup_cache): Handle encoding from - and to INTERNAL. - * iconv/iconvconfig.c: Create a special record for the INTERNAL - encoding name in the output file. +2001-11-26 Ulrich Drepper -2001-07-23 Jakub Jelinek + * stdio-common/vfscanf.c: If incomplete nan of inf(inity) strings + are found call conv_error and not input_error [PR libc/2669]. - * sunrpc/svc_tcp.c (svctcp_rendezvous_abort): New function. - (svctcp_rendezvous_op): Use it. - * sunrpc/svc_unix.c (svcunix_rendezvous_abort): New function. - (svcunix_rendezvous_op): Use it. +2001-11-26 Stephen L Moshier -2001-07-23 Andreas Schwab + * sysdeps/ieee754/ldbl-128/e_log10l.c (L102B): Fix typo in + initialization. - * math/Makefile (CPPFLAGS-test-ifloat.c, CPPFLAGS-test-idouble.c, - CPPFLAGS-test-ildoubl.c): Renamed from CFLAGS-*. - (math-CPPFLAGS): Set this instead of CPPFLAGS. + * sysdeps/ieee754/ldbl-128/e_coshl.c (__ieee754_coshl): Remove + unused variables. Fix threshold for returning 1.0. -2001-07-23 Ulrich Drepper + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (neval, deval): Constify + argument. - * elf/elf.h: Add more definitions from Sun's latest version. + * sysdeps/ieee754/ldbl-128/s_erfl.c (neval, deval): Likewise, and + remove unused variables. -2001-07-23 Stephen L Moshier + * sysdeps/ieee754/ldbl-128/e_j0l.c (neval, deval): Likewise. - * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Return proper - sign for 0 input and set divide by zero exception for -1 input. - Return argument if NaN or infinity. + * sysdeps/ieee754/ldbl-128/e_j1l.c (neval, deval): Likewise, and + include local math header files. -2001-07-23 Andreas Jaeger +2001-11-15 Ulrich Drepper - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Add some deltas. + * sysdeps/generic/unwind-dw2-fde.c: Don't use recursive mutexes. -2001-07-23 Ulrich Drepper +2001-10-02 Jakub Jelinek + H.J. Lu - * iconv/gconv_cache.c (__gconv_lookup_cache): Select correct - module for conversion direction. + * Versions.def (libc): Add GCC_3.0. + * configure.in (libc_cv_gcc_static_libgcc): Set to -static-libgcc + if gcc supports this flag. + (EXPORT_UNWIND_FIND_FDE): Define unless target configure disables it. + (gcc3): Allow glibc to be compiled with gcc 3.x. + * config.h.in (EXPORT_UNWIND_FIND_FDE): Add. + * config.make.in (static-libgcc, unwind-find-fde): Add. + * Makerules (build-shlib-helper, build-module-helper): Use it. + * scripts/versions.awk: Make sure GLIBC_ versions come first. + * elf/soinit.c (__libc_global_ctors): Set tbases and dbases if + necessary. + (_fini): Call __deregister_frame_info_bases if + __register_frame_info_bases was used to register. + * elf/Versions (__register_frame_info, __deregister_frame_info): Add + for GLIBC_2.0. + (__register_frame_info_bases, __register_frame_info_table_bases, + __deregister_frame_info_bases, _Unwind_Find_FDE): Add for GCC_3.0. + * elf/Makefile (routines): Add unwind-dw2-fde. + (shared-only-routines): Add unwind-dw2-fde. + * sysdeps/alpha/gccframe.h: New file. + * sysdeps/arm/gccframe.h: New file. + * sysdeps/generic/framestate.c: New file. + * sysdeps/generic/dwarf2.h: New file. + * sysdeps/generic/gccframe.h (struct object): Update from gcc 3.0. + * sysdeps/generic/unwind-dw2-fde.c: New file. + * sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c: New file. + * sysdeps/generic/unwind-dw2-fde.h: New file. + * sysdeps/generic/unwind-dw2.c: New file. + * sysdeps/generic/unwind-pe.h: New file. + * sysdeps/generic/unwind.h: New file. + * sysdeps/hppa/gccframe.h: New file. + * sysdeps/i386/gccframe.h: New file. + * sysdeps/m68k/gccframe.h: New file. + * sysdeps/mips/gccframe.h: New file. + * sysdeps/powerpc/gccframe.h: New file. + * sysdeps/s390/gccframe.h: New file. + * sysdeps/sh/gccframe.h: New file. + * sysdeps/sparc/gccframe.h: New file. + * sysdeps/vax/gccframe.h: New file. + * sysdeps/unix/sysv/linux/configure.in (libc_cv_gcc_unwind_find_fde): + Set on all architectures except ia64. + * sysdeps/mach/hurd/configure.in (libc_cv_gcc_unwind_find_fde): Set + for i386. + * sysdeps/mach/hurd/i386/Versions (__register_frame_info, + __deregister_frame_info): Move to elf/Versions. + * sysdeps/unix/sysv/linux/m68k/Versions: Likewise. + * sysdeps/unix/sysv/linux/arm/Versions: Likewise. + * sysdeps/unix/sysv/linux/alpha/Versions: Likewise. + * sysdeps/unix/sysv/linux/i386/Versions: Likewise. + * sysdeps/unix/sysv/linux/mips/Versions: Likewise. + * sysdeps/unix/sysv/linux/powerpc/Versions: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/Versions: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/Versions: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: Likewise. + * sysdeps/mach/hurd/i386/Makefile (sysdep-routines): Add framestate. + * sysdeps/unix/sysv/linux/arm/Makefile: Likewise. + * sysdeps/unix/sysv/linux/alpha/Makefile: Likewise. + * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. + * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. + * sysdeps/unix/sysv/linux/mips/Makefile: Likewise. + * sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. + * sysdeps/unix/sysv/linux/sparc/Makefile: Likewise. -2001-07-23 Stephen L Moshier +2001-11-15 Jeff Law - * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Return proper - sign for 0 input. Return NaN with no exception for NaN input. + * posix/regex.c (uintptr_t): Do not provide a definition if the + system provided one. -2001-07-23 Ulrich Drepper +2001-11-13 Roland McGrath - * iconv/gconv_builtin.h: ISO-106464/UTF-8/ transformation must - really be an alias. + * stdio-common/tmpfile.c: Moved to ... + * sysdeps/generic/tmpfile.c: ... here. + * sysdeps/mach/hurd/tmpfile.c: New file. -2001-07-23 Andreas Jaeger + * hurd/fopenport.c (__fopenport): Renamed from fopenport. + [USE_IN_LIBIO] (fopencookie): #define as _IO_fopencookie. + (fopenport): Define as weak alias. - * iconv/iconvconfig.c: Include and use - __attribute_malloc__ for older GCC versions. - * iconv/strtab.c: Likewise. - Add prototypes to avoid warnings. + * libio/iofopncook.c (_IO_fopencookie): Move forward declaration ... + * libio/libioP.h: ... to here. -2001-07-22 Roland McGrath +2001-11-12 Ulrich Drepper - * hurd/hurdsig.c (_hurd_internal_post_signal): Support SA_RESETHAND - and SA_NODEFER options. Spurred to action by Igor Khavkine. + * elf/dl-reloc.c (_dl_relocate_object): Avoid iterating over + program header twice. Construct list with the needed information. - * sysdeps/generic/bits/sigaction.h [__USE_UNIX98 || __USE_MISC] - (SA_NODEFER, SA_RESETHAND): New macros, same bit values as FreeBSD. - [__USE_MISC] (SA_INTERRUPT): New macro, value 0. - [__USE_MISC] (SA_NOMASK, SA_ONESHOT, SA_STACK): New macros, aliases - as in other sysdeps versions of this file. +2001-11-10 Ulrich Drepper - * sysdeps/generic/bits/sigaction.h (struct sigaction): Use a union - and provide sa_handler and sa_sigaction member names as macros, as - done in other sysdeps versions of this file. - Suggested by Igor Khavkine . + * po/ca.po: Update from translation team. -2001-07-23 Ulrich Drepper + * elf/dl-load.c (_dl_map_object_from_fd): Remove use of + _dl_pf_to_prot. Use arithmetic operation using PF_TO_PROT macro. + * sysdeps/generic/ldsodefs.h (PF_TO_PROT): New macro. + * elf/dl-reloc.c (_dl_relocate_object): Likewise. - * posix/regex.c: Revamp memory allocation for WCHAR functions to - not use too much stack. +2001-11-10 Andreas Jaeger -2001-07-22 Ulrich Drepper + * sysdeps/ieee754/ldbl-128/e_log2l.c: New file. + * sysdeps/ieee754/ldbl-128/e_log10l.c: Likewise. + Contributed by Stephen L Moshier . - * iconv/iconvconfig.c (write_output): Update comment explaining - output format. +2001-11-09 Ulrich Drepper - * elf/dl-load.c (_dl_dst_count): In SUID binaries expand $ORIGIN - if it is alone. + * elf/dl-minimal.c (realloc): Handle NULL for first parameter + correctly. + * elf/dl-load.c (is_dst): New function. + (_dl_dst_count): Use is_dst to check for DST variable. (_dl_dst_substitute): Likewise. - * iconv/iconvconfig.c: Remove --verbose option. Comment out - mcheck_verbose call. - - * iconv/strtab.c (morememory): Fix little memory handling problem. - -2001-07-22 Andreas Schwab - - * sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Don't - mark asm input operand as clobbered. - * sysdeps/unix/sysv/linux/m68k/brk.c (__brk): Likewise. - -2001-07-22 Ulrich Drepper - - * iconv/gconv_builtin.c (struct builtin_map): Remove init and end - elements. - (BUILTIN_TRANSFORMATION): Remove Init and End parameters. - (__gconv_get_builtin_trans): Initialize __init_fct and __end_fct to - NULL. - * iconv/gconv_builtin.h: Remove NULL parameters for Init and End in - all BUILTIN_TRANSFORMATION calls. - * iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Remove Init and End - parameters. - * iconv/gconv_simple.c: Likewise. - * iconv/gconv_db.c (gen_steps): Internal converters don't have - initializers, move the code accordingly. - - * iconv/gconv_conf.c (__gconv_read_conf): Don't read configuration - file if STATIC_GCONV is defined. - - * iconv/gconv_conf.c (__gconv_path_envvar): New global variable. - (__gconv_get_path): Use it instead of call getenv. - (__gconv_read_conf): First see whether cache can be used. If yes, - don't do any work here. - * iconv/gconv_db.c (__gconv_release_step): Renamed from release_step - and exported. Change callers. - (__gconv_find_transform): First call __gconv_lookup_cache and only - continue if it signals no cache available. Remove some unnecessary - tests. - * iconv/gconv_int.h: Declare __gconv_path_envvar, __gconv_lookup_cache, - __gconv_release_step, and __gconv_loaded_cache. - * iconv/gconv_cache.c: New file. - * iconv/iconvconfig.c: New file. - * iconv/iconvconfig.h: New file. - * iconv/strtab.c: New file. - * iconv/Makefile: Add rules to build new files and programs. - -2001-07-20 Roland McGrath - - * sysdeps/generic/device-nrs.h (DEV_TTY_P): Change argument type - from `dev_t' (st_rdev value) `const struct stat *'. - * sysdeps/unix/sysv/linux/device-nrs.h (DEV_TTY_P): Likewise. - * libio/filedoalloc.c (_IO_file_doallocate): Change caller. - * sysdeps/mach/hurd/device-nrs.h: New file. - - * libio/stdio_ext.h: Moved to ... - * stdio-common/stdio_ext.h: ... here. - * libio/Makefile (headers): Move stdio_ext.h from here ... - * stdio-common/Makefile (headers): ... to here. - * include/stdio_ext.h: New file. - * stdio/Makefile (routines): Add the stdio_ext.h functions here. - * stdio/Versions (GLIBC_2.2.4): Export the stdio_ext.h functions. - * stdio/__flbf.c: New file. - * stdio/__fbufsize.c: New file. - * stdio/__fpending.c: New file. - * stdio/__fpurge.c: New file. - * stdio/__freadable.c: New file. - * stdio/__freading.c: New file. - * stdio/__fsetlocking.c: New file. - * stdio/__fwritable.c: New file. - * stdio/__fwriting.c: New file. - -2001-07-20 Ulrich Drepper - Andreas Jaeger - - * elf/ldconfig.c (search_dir): Avoid use of uninitialized memory. - Add a few __builtin_expect to mark unlikely error cases. - -2001-07-20 Andreas Jaeger - - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Synch with kernel. - Patch by Daniel Jacobowitz . - -2001-07-19 Ulrich Drepper - - * intl/localealias.c: Remove unnecessary prototype. - - * Makefile: Add html goal. - * manual/Makefile: Likewise. - -2001-07-18 Ulrich Drepper - - * libio/filedoalloc.c (_IO_file_doallocate): A few more minor - cleanups and improvements. - -2001-07-18 Andreas Schwab - - * posix/regex.c (WORDCHAR_P) [WCHAR]: Also return true for the - underscore character. - -2001-07-18 Jakub Jelinek - - * malloc/malloc (new_heap): Don't call munmap for zero length. - -2001-07-18 Ulrich Drepper - - * libio/filedoalloc.c (_IO_file_doallocate): Use DEV_TTY_P if - available to determine whether descriptor is for tty before - calling isatty. - - * sysdeps/unix/sysv/linux/device-nrs.h: Define DEV_TTY_P. - * sysdeps/generic/device-nrs.h: Likewise. - -2001-07-18 Andreas Jaeger - - * time/Makefile (tst-getdate-ENV): Add TZDIR to environment. - - * time/Depend: New, add dependency on timezone. - - * time/tst-getdate.c: Add testcase for bug report by Hendrik - Uhlmann . - * time/datemsk: Likewise. - -2001-07-17 Ulrich Drepper - - * elf/ldconfig.c (parse_conf): Disable implicit locking for the - stream. Remove some unnecessary initializers. - -2001-07-17 Andreas Jaeger - - * elf/ldconfig.c: Add new variable hwcap_mask to honour LD_HWCAP_MASK. - (is_hwcap_platform): Use it. - (set_hwcap): New function to set hwcap_mask. - (main): Call set_hwcap. - -2001-07-17 Jakub Jelinek - - * time/getdate.c (__getdate_r): Initialize tm_isdst, tm_gmtoff and - tm_zone before calling strptime. - -2001-07-17 Andreas Schwab - - * sysdeps/unix/sysv/linux/m68k/getpagesize.c: Fix last change. - -2001-07-17 Ulrich Drepper - - * inet/rcmd.c (iruserfopen): Disable implicit locking for the stream. - * inet/ruserpass.c (ruserpass): Likewise. - * nss/nsswitch.c (nss_parse_file): Likewise. - * resolv/res_hconf.c (_res_hconf_init): Likewise. - * resolv/res_init.c (__res_vinit): Likewise. - * gmon/bb_exit_func.c (__bb_exit_func): Likewise. - * misc/getpass.c (getpass): Likewise. - * misc/getusershell.c (initshells): Likewise. - * misc/getttyent.c (setttyent): Likewise. - * misc/mntent_r.c (__setmntent): Likewise. - * time/getdate.c (__getdate_r): Likewise. - * time/tzfile.c (__tzfile_read): Likewise. - * iconv/gconv_conf.c (read_conf_file): Likewise. - * intl/localealias.c (read_alias_file): Disable implicit locking - for the stream. Use _unlocked functions for glibc. - * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Disable - implicit locking for the stream. - (__get_nprocs_conf): Likewise. - (phys_pages_info): Likewise. - -2001-07-16 Ulrich Drepper - - * nscd/connections.c: Print messages caused by user application - only if debug_level > 0. Add little performance improvements. - Use TEMP_FAILURE_RETRY around write calls. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/pwdcache.c: Likewise. - -2001-07-13 H.J. Lu - - * sysdeps/mips/dl-machine.h (MAP_BASE_ADDR): Removed. - (elf_machine_got_rel): Defined only if RTLD_BOOTSTRAP is not defined. - (RESOLVE_GOTSYM): Rewrite to use RESOLVE. - - * sysdeps/mips/rtld-ldscript.in: Removed. - * sysdeps/mips/rtld-parms: Likewise. - * sysdeps/mips/mips64/rtld-parms: Likewise. - * sysdeps/mips/mipsel/rtld-parms: Likewise. - -2001-07-16 Ulrich Drepper - - * catgets/test-gencat.sh: Use <<"EOF" instead of < - - * sysdeps/posix/spawni.c: Fix typo when iterating over signal numbers. - -2001-07-16 Andreas Schwab - - * math/libm-test.inc (check_float_internal): Fix sign bit test of - infinities. - -2001-07-16 Jakub Jelinek - - * sysdeps/i386/fpu/e_expl.c (__ieee754_expl): Make it PIC friendly. - -2001-07-15 Ulrich Drepper - - * malloc/obstack.c: Define __attribute__ for non-gcc compilers. - Patch by Jim Meyering . - -2001-07-12 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h: Reorder - fields in the sigaction struct to match the definition in the kernel. - -2001-07-12 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Correct the - test for ENOSYS. - -2001-07-12 Martin Schwidefsky - - * sysdeps/s390/s390-32/bits/setjmp.h: Add leading underscores - to the entries in the __jmp_buf structure. - * sysdeps/s390/s390-64/bits/setjmp.h: Likewise. - -2001-07-12 Martin Schwidefsky - - * sysdeps/s390/s390-32/bcopy.S: Use mvcle for big blocks - (> 64K) and a mvc loop for small blocks. - * sysdeps/s390/s390-32/memcpy.S: Likewise. - * sysdeps/s390/s390-64/bcopy.S: Likewise. - * sysdeps/s390/s390-64/memcpy.S: Likewise. - -2001-07-15 Andreas Schwab - - * sysdeps/unix/sysv/linux/m68k/sys/procfs.h: New file. - * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: New file. - - * sysdeps/unix/sysv/linux/m68k/getpagesize.c: Check _dl_pagesize - first. Default to 4096, not EXEC_PAGESIZE. - - * iconv/loop.c (put16) [!_STRING_ARCH_unaligned && BIG_ENDIAN]: - Fix index. - -2001-07-09 Andreas Jaeger - - * sysdeps/unix/sysv/linux/i386/dl-procinfo.c: Name entry for xmm2. - - * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Add HWCAP_I386_XMM, - HWCAP_I386_XMM2 to enum. - -2001-07-13 Andreas Jaeger - - * libio/fileops.c: Include unistd.h for lseek64 prototype. Closes - PR libc/2372. - -2001-07-12 Ulrich Drepper - - * Makeconfig: Add some more changes to handle AIX linker better. - -2001-07-12 H.J. Lu - - * sysdeps/generic/segfault.c: Include . - -2001-07-01 Andreas Jaeger - - * sysdeps/unix/sysv/linux/dl-sysdep.c (frob_brk): Remove duplicate - sbrk. Closes PR libc/2312. - -2001-07-01 Andreas Jaeger - - * sysdeps/generic/segfault.c (install_handler): Handle case that - the output file does not exists. Closes PR libc/2345. - -2001-07-11 Ulrich Drepper - - * intl/locale.alias: Use he language code for hebrew, not il - [PR libc/2382]. - -2001-07-11 Jakub Jelinek - - * iconv/gconv_int.h: Fix comment typo. - -2001-07-11 Igor Khavkine - - * hurd/hurdsig.c (_hurdsig_init): Remove a useless line of code. - -2001-07-07 Roland McGrath - - * hurd/hurdsig.c (_hurd_thread_sigstate): Use MACH_PORT_NULL, not 0. - -2001-07-10 Stephen L Moshier - - * sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Fix - backwards conditional in test for x == 1.0. - -2001-07-10 Andreas Jaeger - - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Add ulps for tanh - (-0.7). - -2001-07-09 Andreas Jaeger - - * sysdeps/unix/sysv/linux/configure.in: Revert patch from - 2001-07-05 for sysconfdir handling. - * config.make.in (sysconfdir): Likewise. - * configure.in: Likewise. - - * configure.in: Always assign libc_cv_sysconfdir. - -2001-07-08 Ulrich Drepper - - * Makerules [AIX] (build-shlib-helper): Precede linker options - with -Wl. - - * Makeconfig (config-LDFLAGS): Add ld.so only for ELF. - - * sysdeps/unix/make_errlist.c: Adjust sys_errlist declaration to - what we define in . - - * iconv/iconv_prog.c (main): Don't unconditionally define - variables only use if _POSIX_MAPPED_FILES is defined. - - * sysdeps/unix/sysv/aix/sendmsg.c (sendmsg): Fix return type. - * sysdeps/unix/sysv/aix/recvmsg.c (recvmsg): Likewise. - - * sysdeps/unix/sysv/aix/recv.c: New file. - - * sysdeps/unix/sysv/aix/recvfrom.c: Fix various types. - -2001-07-07 Ulrich Drepper - - * sysdeps/generic/recv.c: Fix return type. - - * sysdeps/unix/sysv/aix/dl-libc.c (__libc_dlclose): Fix typo. - - * sysdeps/unix/sysv/aix/gettimeofday.c (__gettimeofday): Add - declarations for asm functions. - - * include/libc-symbols.h: Provide more dummy definitions for the - case if GNU ld isn't used. - - * libio/freopen.c: Include for free declaration. - * libio/freopen64.c: Likewise. - - * sysdeps/alpha/fpu/libm-test-ulps: Add deltas for tanh(-0.7). - -2001-07-06 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/sigaction.c (RESTORE2): Put asm - explicitly into .text section. - -2001-04-16 Jes Sorensen - - * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): - Add 16 longwords reserved for future use to match changes in the - kernel. - -2001-07-03 Jes Sorensen - - * sysdeps/ia64/strncpy.S: Call strnlen() when determining the - string length rather than strlen(). Solves the performance problem - of doing strlen on a 5MB string when strncpy was called with a - length argument of 5 bytes. - -2001-07-02 Jakub Jelinek - - * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle - R_SPARC_UA16 and R_SPARC_UA32. - * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. - -2001-07-01 Stephen L Moshier - - * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): - acosh(x) = ln(2x) if x > 2^30. - * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): - acosh(x) = ln(2x) if x > 2^54. - -2001-07-07 Mark Kettenis - - * sysdeps/mach/hurd/i386/exc2signal.c (_hurd_exception2signal): - Generate SIGSEGV instead of SIGBUS for KERN_INVALID_ADDRESS and - KERN_WRITE_PROTECTION_FAILURE. - -2001-07-07 Ulrich Drepper - - * posix/regex.c: Limit string length printed in debug messages to - 100 chars. - - * configure.in: Don't warn about versioning if not on ELF system. - -2001-07-07 Andreas Jaeger - - * sysdeps/*: Put files from GNU MP Library under LGPL v2.1. - -2001-07-06 Ulrich Drepper - - * po/gl.po: Update from translation team. - -2001-07-06 Andreas Jaeger - - * sysdeps/unix/sysv/linux/configure.in: Fix handling of - sysconfdir. - - * manual/libc-texinfo.sh: Add note for the FDL. - - * manual/argp.texi (Argp Example 4): Fix texinfo warning. - - * manual/libc.texinfo: Regenerated. - - * manual/fdl.texi: Fix node. - - * config.make.in (sysconfdir): Replace correctly. - Closes PR libc/2369, reported by Peter Simons . - - * sysdeps/unix/sysv/linux/alpha/configure.in: Removed, it's no - longer needed. - - * sysdeps/unix/sysv/linux/configure.in (libc_cv_linuxVER): Add - case for alpha. - Rework handling of missing linuxthreads add-on. - - * configure.in: Remove unused sysconfdir substitution. - - * manual/Makefile (texis): Add fdl.texi. - * manual/fdl.texi: New. - * manual/socket.texi (Host Names): Improve grammar, fix overflow hbox. - * manual/libc.texinfo: Add fdl, update titlepage. - Patches by Brian Youmans <3diff@gnu.org>. - - * sysdeps/unix/make_errlist.c (main): Print LGPL v2.1 for - generated file. - -2001-07-06 Paul Eggert - - * manual/argp.texi: Remove ignored LGPL copyright notice; it's - not appropriate for documentation anyway. - * manual/libc-texinfo.sh: "Library General Public License" -> - "Lesser General Public License". - * COPYING: Fix Y2k bug in sample copyright notices. - * manual/lesser.texi: Renamed from manual/lgpl.texinfo, - as fsf.org uses the name "lesser.texi". - * manual/Makefile (texis): Follow rename. - -2001-07-06 Andreas Jaeger - - * All files under GPL/LGPL version 2: Place under LGPL version - 2.1. - -2001-07-05 Andreas Jaeger - - Synch with Linux 2.4.6: - * sysdeps/unix/sysv/linux/sparc/bits/socket.h (PF_BLUETOOTH): - New. - (AF_BLUETOOTH): New. - - * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h - (PF_BLUETOOTH): New. - (AF_BLUETOOTH): New. - - * sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_BLUETOOTH): New. - (PF_BLUETOOTH): New. - - * sysdeps/unix/sysv/linux/ia64/bits/socket.h (AF_BLUETOOTH): New. - (PF_BLUETOOTH): New. - - * sysdeps/unix/sysv/linux/alpha/bits/socket.h (PF_BLUETOOTH): New. - (AF_BLUETOOTH): New. - - * sysdeps/unix/sysv/linux/bits/socket.h (PF_BLUETOOTH): New. - (AF_BLUETOOTH): New. - - * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_IEEE80211): New. - - * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (N_HCI): New. - - * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h (N_HCI): New. - - * sysdeps/unix/sysv/linux/bits/ioctl-types.h (N_HCI): New. - -2001-07-04 Roland McGrath - - * hurd/hurdsig.c (_hurd_internal_post_signal): For SS->suspended - wakeup message, use MACH_MSG_TYPE_MAKE_SEND for the receiver port - rather than doing a mach_port_insert_right call first. - -2001-06-26 Roland McGrath - - * hurd/hurdioctl.c: Include for memcpy decl. - -2001-07-03 Andreas Jaeger - - * sysdeps/unix/sysv/sysv4/solaris2/configure.in: Remove check for - crypt add-on. - -2001-07-01 Mark Kettenis - - * sysdeps/mach/hurd/if_index.c: Redone to use new interfaces in - the Hurd pfinet server, using equivalent code from the Linux - version in sysdeps/unix/sysv/linux/if_index.c. In detail: - Include , , , and - . Don't include and - anymore. - (if_nametoindex): New implementation using SIOCGIFINDEX. - (if_freenameindex): Straight copy of the Linux version. - (if_nameindex): New implementation based on pfinet_siocgifconf and - SIOCGIFINDEX. - (if_indextoname): New implementation using SIOCGIFNAME. - (map_interfaces): Function removed. - From Marcus Brinkmann . - -2001-06-30 Jakub Jelinek - - * sysdeps/powerpc/dl-machine.c (__elf_preferred_address): Prefer - gaps below main executable. - -2001-06-19 Andreas Jaeger - - * sysdeps/powerpc/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): - Handle profiling. - -2001-06-29 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/s_asinhl.c: New file. - Patch by Stephen L Moshier . - -2001-06-28 Ulrich Drepper - - * manual/argp.texi: Tons of cleanups. - Patch by Clifford U. Smith . - -2001-06-28 Mark Kettenis - - * manual/users.texi (Setting Groups): Correct initgroups - documentation. Add documentation for getgrouplist. - -2001-06-28 H.J. Lu - - * locale/findlocale.c (locale_file_list): Renamed to ... - (_nl_locale_file_list): This. Make it extern. - (free_mem): Move to ... - * locale/setlocale.c (free_mem): Here. - -2001-06-28 Mark Kettenis - - * sysdeps/mach/hurd/read.c: Include . - (__libc_read): Don't call __pread. Use _hurd_fd_read directly - instead. - * sysdeps/mach/hurd/write.c: Include . - (__libc_write): Don't call __pwrite. Use _hurd_fd_write directly - instead. - - * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Add back - -Wl,-soname option lost in 2001-06-16 change. - -2001-06-27 Ulrich Drepper - - * posix/tst-regex.c: Pass REG_NEWLINE to regcomp. Add extra tests. - Restrict printing of string in debug mode to 100 characters to make - the output useful for long input texts. - - * posix/Makefile: Add rules to build and run tst-regex. - -2001-06-20 Isamu Hasegawa - - * posix/regex.c (FREE_WCS_BUFFERS): New macro to free buffers. - (re_search_2): Invoke convert_mbs_to_wcs and FREE_WCS_BUFFERS. - (wcs_re_match_2_internal): Check whether the wcs buffers need - seting up or not, and skip seting up routin if not needed. - -2001-06-26 Isamu Hasegawa - - * posix/regex.c (count_mbs_length): Use binary search for optimization. - -2001-06-27 Ulrich Drepper - - * posix/tst-regex.c: Fix several bugs. Add more tests. - -2001-06-26 Mark Kettenis - - * hurd/Makefile (user-interfaces): Add pfinet. - * hurd/hurdioctl.c: Include , and - . - (siocgifconf): New function. Register it with HURD_HANDLE_IOCTL - as the handler for SIOCGIFCONF. - * sysdeps/mach/hurd/bits/ioctls.h: Modify SIOCSIFFLAGS and - SIOCGIFFLAGS to be of IOC type ifreq_short. Modify SIOCSIFMETRIC - and SIOCGIFMETRIC to be of IOC type ifreq_int. Add new macro - definitions for SIOCGIFMTU, SIOCSIFMTU, SIOCGIFINDEX and - SIOCGIFNAME. - From Marcus Brunkmann . - -2001-06-25 Ulrich Drepper - - * sysdeps/gnu/net/if.h: Correct _IOT_ifreq and add _IOT_ifreq_short - and _IOT_ifreq_int. Patch by Mark Kettenis . - - * elf/dl-deps.c (_dl_map_object_deps): Fix handling of failing - _dl_catch_error calls. - -2001-06-22 Jakub Jelinek - - * posix/regex.c (regex_compile, re_match_2_internal): Fix comment - typos. - -2001-06-01 Wolfram Gloger - - * malloc/malloc.c (malloc_atfork, free_atfork): Use a unique value - ATFORK_ARENA_PTR, not 0, for the thread-specific arena pointer - when malloc_atfork is in use. - -2001-06-22 Andreas Jaeger - - * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Add parenthese - to avoid warnings. - - * sysdeps/i386/fpu/e_expl.c (__ieee754_expl): Remove unused - variable. - Add unused attributes to avoid warnings. - - * elf/reldep4mod4.c: Add prototype to avoid warning. - * elf/reldep4mod2.c: Likewise. - - * sysdeps/i386/fpu/e_expl.c: Include for - prototypes. - -2001-06-18 Roland McGrath - - * hurd/hurd/fd.h (_hurd_fd_error_signal): Change return type to int. - -2001-06-20 Alexandre Oliva - - * sysdeps/unix/sysv/settimeofday.c: Include time.h. - -2001-06-19 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h: New file. - -2001-05-09 Michael Keezer - - * Makeconfig: Added AIX-ld support for DSO. - * Makerules: Likewise. - * dlfcn/Makefile (defaultmod1.so): Added libc_nonshared. - (defaultmod2.so): Likewise. - * debug/Makefile: Conditionalize use of elf/ld.so. - * iconvdata/Makefile: Moved LDFLAG rpath/soname info into Makeconfig. - - * sysdeps/unix/sysv/aix/Makefile: Added dl-support.c and dl-error.c. - * sysdeps/unix/sysv/aix/Makefile: Made (f/g)rsave(0/1) & - (f/g)prrest(0/1) static only. - * sysdeps/unix/sysv/aix/gettimeofday.c: Removed #if 0. - * sysdeps/unix/sysv/aix/start.c: Define __dso_handle if not ELF but - shared. - * sysdeps/unix/sysv/aix/setitimer.c: New file. - * sysdeps/unix/sysv/aix/sleep.c: New file. - * sysdeps/unix/sysv/aix/usleep.c: New file. - * sysdeps/unix/sysv/aix/dl-addr.c: New file. - * sysdeps/unix/sysv/aix/dl-error.c: New file. - * sysdeps/unix/sysv/aix/dl-support.c: New file. - * sysdeps/unix/sysv/aix/powerpc/register-dump.h: New file. - -2001-06-19 Ulrich Drepper - - * po/es.po: Update from translation team. - -2001-06-19 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/s_tanhl.c: New file. - - * math/libm-test.inc (tanh_test): Test for 2^-56. - - * sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Make sure result - equals argument when x < 2^-55. - Patches by Stephen L. Moshier . - -2001-06-17 Alan Modra - - * sysdeps/hppa/dl-machine.h (elf_machine_rela): Handle relocs - at unaligned address. - -2001-06-18 Ulrich Drepper - - * posix/regex.c: Reorganize code to build code twice, once for single - byte, once for multi-byte charsets. Choose function set adequate for - locale at runtime. - Patch by Isamu Hasegawa . +2001-11-09 Roland McGrath - * po/nl.po: Update from translation team. + Hurd/PowerPC port contributed by Peter Bruin . + * sysdeps/mach/hurd/powerpc/exc2signal.c: New file. + * sysdeps/mach/hurd/powerpc/init-first.c: New file. + * sysdeps/mach/hurd/powerpc/intr-msg.h: New file. + * sysdeps/mach/hurd/powerpc/longjmp-ts.c: New file. + * sysdeps/mach/hurd/powerpc/register-dump.h: New file. + * sysdeps/mach/hurd/powerpc/sigreturn.c: New file. + * sysdeps/mach/hurd/powerpc/static-start.S: New file. + * sysdeps/mach/hurd/powerpc/trampoline.c: New file. + * sysdeps/mach/hurd/powerpc/bits/sigcontext.h: New file. + * sysdeps/mach/hurd/powerpc/Dist: New file. -2001-06-09 Bruno Haible + * hurd/privports.c (__get_privileged_ports): + Only contact the proc server if necessary for this call. + Suggested by Neal H Walfield . + Check error return for mach_port_mod_refs. - * iconvdata/gconv-modules (BIG5HKSCS): New alias BIG5-HKSCS. - (ISO-8859-14): New aliases ISO_8859-14 and ISO-CELTIC. - * iconvdata/tst-tables.sh: For BIG5HKSCS, use BIG5-HKSCS charmap. +2001-11-09 Andreas Schwab -2001-05-26 Bruno Haible + * sysdeps/unix/sysv/linux/m68k/bits/resource.h: New file. - * iconvdata/tst-tables.sh: For SJIS module, use SHIFT_JIS charmap. - * manual/charset.texi: Write Shift_JIS, not Shift-JIS. +2001-11-09 Ulrich Drepper -2001-06-17 Roland McGrath + * elf/dl-load.c (lose): Remove some unnecessary code. The new + object is always the last in the list. + (_dl_map_object_from_fd): Delete code to remove from object list + when DF_1_NOOPEN is seen. This is done in lose. - * sysdeps/pthread/aio_misc.h (LIO_DSYNC): Define to LIO_NOP + 1, - not LIO_READ + 1 (which is the value of LIO_WRITE!). +2001-11-08 Ulrich Drepper - * Makerules (build-module-helper-objlist): New variable, - broken out of build-module. Insert --whole-archive/--no-whole-archive - immediately each *_pic.a file in the link object list. - (whole-archive): New variable, used by that. - (build-module-objlist): New variable using build-module-helper-objlist. - (build-module, build-module-helper): Use it. - (build-shlib-objlist): New variable using build-module-helper-objlist. - (build-shlib): Use that. - * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Likewise. + * elf/dl-object.c (_dl_new_object): Various small optimizations. - * posix/spawni.c: Moved to ... - * sysdeps/posix/spawni.c: ... here. - * sysdeps/generic/spawni.c: New file. +2001-11-07 Ulrich Drepper -2001-06-16 Roland McGrath + * sysdeps/generic/dl-cache.c: Optimize SEARCH_CACHE and + HWCAP_CHECK macro code. - * hurd/Makefile (routines): Add lookup-retry. - * hurd/hurdlookup.c (__hurd_file_name_lookup_retry): Broken out ... - * hurd/lookup-retry.c: ... into here, new file. - * sysdeps/mach/hurd/dl-sysdep.c (open_file): Call that instead - using of duplicate code here. + * elf/dl-misc.c (_dl_sysdep_read_whole_file): Optimize code a bit. + Now returns MAP_FAILED on error. + * elf/rtld.c: Adjust caller. + * sysdeps/generic/dl-cache.c: Likewise. + * sysdeps/generic/ldsodefs.h: Adjust description. - * hurd/hurdexec.c (_hurd_exec): Be robust for DTABLESIZE==0. + * elf/dl-version.c (match_symbol): Optimize error handling for size. + (_dl_check_map_versions): Likewise. -2001-06-17 Ulrich Drepper +2001-11-06 Ulrich Drepper - * po/ja.po: Update from translation team. + * elf/dl-load.c (_dl_map_object_from_fd): Don't call + _dl_signal_error directly, always use lose. Set fd to -1 after + file is closed. + (lose): Don't call close if fd == -1. -2001-06-04 Bruno Haible +2001-11-07 Kaoru Fukui - * locale/programs/locfile.c (siblings_uncached, siblings, full_read, - compare_files): New functions. - (write_locale_data): Use xmalloc. Compare the file with the locale - data files for the same category in other locales, and reuse it if - possible and safe. + * manual/charset.texi: Fix typo @w[ISO 6937] to @w{ISO 6937}. + Also fix typo @code {mbsinit} to @code{mbsinit}. -2001-06-07 Mark Kettenis +2001-11-06 Ulrich Drepper - * grp/initgroups.c (initgroups): Factor out re-usable code into... - (internal_getgrouplist): ... new function. - (getgrouplist): New function. - * grp/grp.h (getgrouplist): New prototype. - * grp/Versions [2.2.4]: Add getgrouplist. + * elf/dl-profile.c: Replace state variable with simple flag named + running. Remove commented-out code. -2001-06-16 Ulrich Drepper + * elf/dl-load.c (decompose_rpath): Optimize error handling for size. + (_dl_init_paths): Likewise. + (_dl_map_object_from_fd): Likewise. + * elf/dl-reloc.c (_dl_relocate_object): Likewise. - * inet/netinet/ip6.h: Fix comments in ip6_hdr. - Patch by Pekka Savola . +2001-11-06 Roland McGrath -2001-06-15 Roland McGrath + * sysdeps/mach/powerpc/sysdep.h: Include sysdeps/unix/powerpc/sysdep.h + instead of sysdeps/powerpc/elf/sysdep.h and sysdeps/unix/sysdep.h. - * rt/Makefile (aio-routines, clock-routines, timer-routines): New - variables, broken out of librt-routines. - (librt-routines): Set using those. - (extra-libs, extra-libc-others, tests): Set these unconditionally. - (distribute): No need for $(librt-map) or $(librt-routines:=.c) here. - * sysdeps/generic/aio_fsync.c: New file. - * sysdeps/generic/aio_misc.c: New file. - * sysdeps/generic/aio_write.c: New file. - * sysdeps/generic/aio_write64.c: New file. - * sysdeps/generic/aio_read64.c: New file. - * sysdeps/generic/aio_read.c: New file. - * sysdeps/generic/aio_notify.c: New file. - * sysdeps/generic/lio_listio64.c: New file. - * sysdeps/generic/lio_listio.c: New file. - * sysdeps/generic/aio_cancel.c: New file. - * sysdeps/generic/aio_misc.h: New file. - * sysdeps/generic/aio_suspend.c: New file. - * rt/aio_cancel.c: Moved to ... - * sysdeps/pthread/aio_cancel.c: ... here. - * rt/aio_fsync.c: Moved to ... - * sysdeps/pthread/aio_fsync.c: ... here. - * rt/aio_misc.c: Moved to ... - * sysdeps/pthread/aio_misc.c: ... here. - * rt/aio_misc.h: Moved to ... - * sysdeps/pthread/aio_misc.h: ... here. - * rt/aio_notify.c: Moved to ... - * sysdeps/pthread/aio_notify.c: ... here. - * rt/aio_read.c: Moved to ... - * sysdeps/pthread/aio_read.c: ... here. - * rt/aio_read64.c: Moved to ... - * sysdeps/pthread/aio_read64.c: ... here. - * rt/aio_suspend.c: Moved to ... - * sysdeps/pthread/aio_suspend.c: ... here. - * rt/aio_write.c: Moved to ... - * sysdeps/pthread/aio_write.c: ... here. - * rt/aio_write64.c: Moved to ... - * sysdeps/pthread/aio_write64.c: ... here. - * rt/lio_listio.c: Moved to ... - * sysdeps/pthread/lio_listio.c: ... here. - * rt/lio_listio64.c: Moved to ... - * sysdeps/pthread/lio_listio64.c: ... here. + * sysdeps/unix/sysv/linux/powerpc/sysdep.h: Don't include + sysdeps/powerpc/elf/sysdep.h. + Reported by Kaoru Fukui . -2001-06-14 Roland McGrath +2001-11-05 Ulrich Drepper - * configure.in: Let sysdeps Implies files in add-ons bring in - sysdeps directories from the main source and other add-ons too. + * elf/rtld.c (process_dl_debug): Rewritten. Optimized for size not + speed. + (process_envvars): Some more optimizations. + * sysdeps/generic/ldsodefs.h (DL_DEBUG_HELP): New macro. -2001-06-15 Jakub Jelinek + * elf/elf.h: Add dynamic tag definitions for prelinking. - * math/test-misc.c (main): Add tests for nextafter and nexttoward - with +-Inf as second argument. + * elf/rtld.c (process_envvars): Avoid using array of string pointers. + Rewrite code to remove environment varables for SUID binaries. + Small optimization in LD_PROFILE handling. + * sysdeps/generic/unsecvars.h: Adjust format for process_envvars + changes. + * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. - * sysdeps/generic/s_nexttowardf.c (__nexttowardf): Only check for - NaN, not Inf. - * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Fix check for NaN. - * sysdeps/i386/fpu/s_nexttoward.c: New. - * sysdeps/i386/fpu/s_nexttowardf.c: New. - * sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Simplify - check for NaN, optimize x==+-0 handling. - * sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf): Likewise. - * sysdeps/ieee754/ldbl-96/s_nextafterl.c (__nextafterl): Simplify - check for NaN, fix sign in x==+-0 case. - * sysdeps/ia64/fpu/s_nexttoward.c: New. - * sysdeps/ia64/fpu/s_nexttowardf.c: New. + * sysdeps/generic/dl-sysdep.c: Don't initialize _dl_cpuclock_offset. -2001-06-15 H.J. Lu + * elf/dl-reloc.c (_dl_reloc_bad_type): Rewrite to not use writable + strings. Change type of second parameter. + * sysdeps/generic/ldsodefs.h: Adjust _dl_reloc_bad_type prototype + for last change. - * rt/tst-aio2.c (do_test): Initialize cb.aio_offset to 0. - * rt/tst-aio3.c (do_test): Likewise. - * rt/tst-aio4.c (do_test): Likewise. - * rt/tst-aio5.c (do_test): Likewise. - * rt/tst-aio6.c (do_test): Likewise. + * io/fts.h: Prevent using with _FILE_OFFSET_BITS=64. -2001-06-15 Andreas Schwab +2001-11-04 Joseph S. Myers - * sysdeps/m68k/fpu/bits/mathinline.h: Don't define log2 as inline. - * sysdeps/m68k/fpu/mathimpl.h: Define __ieee754_log2 as inline. + * manual/string.texi: Fix typos. + * manual/examples/argp-ex2.c: Likewise. -2001-06-15 Andreas Jaeger +2001-11-05 Roland McGrath - * gmon/tst-sprofil.c (fac): Make static to avoid compiler warning. + * sysdeps/powerpc/elf/sysdep.h: Remove this file, because it overrides + the more-specific unix/sysv/linux/powerpc file and breaks everything. + * sysdeps/powerpc/sysdep.h (ALIGNARG, ASM_TYPE_DIRECTIVE, + ASM_SIZE_DIRECTIVE, CALL_MCOUNT, ENTRY, EALIGN, DO_CALL, JUMPTARGET, + PSEUDO, PSEUDO_RET, PSEUDO_END, L, C_TEXT): These macros moved here + here, put under [__ELF__]. -2001-06-14 Andreas Schwab +2001-11-05 Ulrich Drepper - * elf/ldconfig.c (search_dir): Fix check for regular file. + * manual/charset.texi: Extensive editing work. + * manual/nss.texi: Likewise. + Changes by Dennis Grace . - * sysdeps/m68k/fpu/e_log2f.c: Fix typo. - * sysdeps/m68k/fpu/e_log2l.c: Fix typo. +2001-11-04 Roland McGrath -2001-06-14 Roland McGrath + * hurd/set-host.c (_hurd_set_host_config): Use O_WRONLY in flags + parameter to dir_mkfile. - * sysdeps/mach/hurd/bits/fcntl.h [ __USE_POSIX199309 || __USE_UNIX98]: - (O_DSYNC, O_RSYNC): New macros, both defined to O_SYNC as Linux does. +2001-11-02 Jakub Jelinek -2001-06-13 Roland McGrath + * string/bits/string2.h (__strndup): If n is smaller than len, set + len to n + 1. + * string/tester.c (test_strndup): New function. + (main): Call it. - * rt/aio_notify.c: Include for _POSIX_REALTIME_SIGNALS. +2001-11-01 Ulrich Drepper - * sysdeps/mach/hurd/fork.c (LOSE): Put `goto lose' in dead code - so the label is not considered unused. + * sunrpc/rpc_main.c: Optimize variable definitions a bit. - * sysdeps/mach/hurd/pwrite64.c: New file. - * sysdeps/mach/hurd/pread64.c: New file. + * sunrpc/Makefile (rpcgen-cmd): Use ../scripts/cpp in rpcgen calls. + * scripts/cpp: New file. - * sysdeps/mach/hurd/pread.c - (__libc_pread): Define this name, with __pread as an alias. - * sysdeps/mach/hurd/pwrite.c - (__libc_pwrite): Define this name, with __pwrite as an alias. + * elf/dl-load.c (_dl_map_object): Correct test of DF_1_NODEFLIB + for rtld_search_dirs content. Minor optimizations. - Implement POSIX "shared memory objects" as regular - files residing in the /var/run/shm/ directory. - This works on any system that supports _POSIX_MAPPED_FILES, - to make it also support _POSIX_SHARED_MEMORY_OBJECTS. - * sysdeps/posix/shm_open.c: New file. - * sysdeps/posix/shm_unlink.c: New file. - * sysdeps/mach/hurd/bits/posix_opt.h - (_POSIX_SHARED_MEMORY_OBJECTS): Define it. +2001-10-31 Ulrich Drepper - * rt/aio_notify.c (__aio_notify_only) [! _POSIX_REALTIME_SIGNALS]: - Use raise instead of __aio_sigqueue. + * elf/dl-load.c (_dl_map_object): Make code a bit more compact by + avoiding unnecessary duplication. - * sysdeps/mach/hurd/pread.c: Fail with EINVAL if OFFSET is negative. - * sysdeps/mach/hurd/pwrite.c: Likewise. +2001-10-31 Jakub Jelinek - * shlib-versions [USE_IN_LIBIO] (.*-.*-gnu-gnu.*): libc=0.3 - [USE_IN_LIBIO && !GLIBC_OLDEST_ABI] (.*-.*-gnu-gnu.*): Use GLIBC_2.2.4 - as default version set. + * elf/dl-load.c (_dl_map_object): If library was found using + LD_LIBRARY_PATH, don't try RUNPATH list. -2001-06-13 Ulrich Drepper +2001-10-31 Martin Schwidefsky - * libio/iolibio.h (_IO_freopen): Correct last parameter to - _IO_file_open. - (_IO_freopen64): Likewise. - Reported by simanek@quantum.karlov.mff.cuni.cz [PR libc/2326]. + * sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h (REGISTER_DUMP): + Correct second argument of register_dump call. + * sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h (REGISTER_DUMP): + Likewise. - * elf/elf.h: Add a few more EM_* constants. +2001-10-31 Ulrich Drepper -2001-06-12 Bruno Haible + * iconvdata/Makefile: Add support for IBM1132, IBM1133, and IBM1162 + modules. + * iconvdata/TESTS: Likewise. + * iconvdata/gconv-modules: Likewise. + * iconvdata/ibm1132.c: New file. + * iconvdata/ibm1132.h: New file. + * iconvdata/ibm1133.c: New file. + * iconvdata/ibm1133.h: New file. + * iconvdata/ibm1162.c: New file. + * iconvdata/ibm1162.h: New file. + * iconvdata/testdata/IBM1132: New file. + * iconvdata/testdata/IBM1132..UTF8: New file. + * iconvdata/testdata/IBM1133: New file. + * iconvdata/testdata/IBM1133..UTF8: New file. + * iconvdata/testdata/IBM1162: New file. + * iconvdata/testdata/IBM1162..UTF8: New file. + Patches by Masahide Washizawa . - * intl/dcigettext.c (DCIGETTEXT): Release the lock before returning. + * string/string.h: Fix typo in comment. + * wcsmbs/wchar.h: Likewise. -2001-06-09 Ben Collins +2001-10-30 Joseph S. Myers - * sysdeps/unix/sysv/linux/bits/termios.h: Define __MAX_BAUD. - * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. - * sysdeps/unix/sysv/linux/speed.c: Use __MAX_BAUD instead of - hardcoded B400000. + * manual/getopt.texi (getopt_long, getopt_long_only): Include + const in type of longopts parameter. -2001-06-13 Ulrich Drepper +2001-10-29 Andreas Jaeger - * time/sys/time.h: Don't use enum __itimer_which ever for - __itimer_which_t for C++. - Reported by Martin Buchholz . + * sysdeps/ieee754/dbl-64/mpa.h: Add prototypes for internal functions. - * po/fr.po: Update from translation team. +2001-10-29 Kevin Ryde -2001-06-12 H.J. Lu + * manual/stdio.texi (Integer Conversions): Corrections to sample printf + output, clarify `#' behaviour on 0. + (Floating-Point Conversions): Clarify that %g only uses %e when + the exponent would be greater than 1. - * configure.in: Fix typos in missing program names. - * configure: Regenerated. +2001-10-28 Roland McGrath -2001-06-12 Andreas Jaeger + Support for Mach/PowerPC contributed by Peter Bruin . + * sysdeps/mach/powerpc/machine-sp.h: New file. + * sysdeps/mach/powerpc/sysdep.h: New file. + * sysdeps/mach/powerpc/thread_state.h: New file. - * iconvdata/tst-table-to.c: Include string.h for strcmp prototype. + * sysdeps/mach/hurd/i386/Makefile: File removed; crt0.o rules moved ... + * sysdeps/mach/hurd/Makefile: ... to here. For the time being, we can + expect to need the same thing on every platform. - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Add ULPs for tanh (-0.7). + * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: File moved ... + * sysdeps/generic/sys/ucontext.h: ... to replace this one. -2001-06-11 Andreas Jaeger + * sysdeps/unix/sysv/linux/powerpc/sysdep.h (ALIGNARG, + ASM_TYPE_DIRECTIVE, ASM_SIZE_DIRECTIVE, CALL_MCOUNT, ENTRY, EALIGN, + DO_CALL, JUMPTARGET, PSEUDO, PSEUDO_RET, PSEUDO_END, L, C_TEXT): + Move all these assembly-related definitions to ... + * sysdeps/powerpc/elf/sysdep.h: ... this new file. - * sysdeps/ieee754/ldbl-128/e_coshl.c: New file. Contributed by - Stephen L Moshier . + * sysdeps/mach/powerpc/machine-lock.h: Assembly code rewritten + by Peter Bruin . - * aclocal.m4: Quote AC_FD_MSG and AC_FD_CC. + * hurd/hurdselect.c (_hurd_select): Check SELECT_RETURNED bit when + packing results for a `poll' call. - * sysdeps/powerpc/fpu/libm-test-ulps: Add ULPs for tanh (-0.7). - * sysdeps/s390/fpu/libm-test-ulps: Likewise. +2001-10-26 Ulrich Drepper -2001-06-11 Michael Deutschmann + * posix/fnmatch_loop.c: Recognize - at end of bracket expression + correctly. + * posix/tst-fnmatch.input: Add tests for - at beginning and end of + bracket expression. - * rt/tst-aio4.c (do_test): Test whether rt signals are supported. - Use my_signo instead of MY_SIGNO and initialize it so that the - used signal is always available. + * string/strxfrm.c [USE_IN_EXTENDED_LOCALE_MODEL]: Correctly get + nrules value. + * string/tst-strxfrm.c (test): Also test __strxfrm_l. -2001-06-11 Andreas Jaeger , - Michael Deutschmann +2001-10-24 H.J. Lu - * io/test-lfs.c (do_prepare): Clean up error messages. - (test_ftello): Check for EFBIG and ENOSPC, clean up error messages. - (do_test): Likewise. + * sysdeps/generic/bits/dlfcn.h (DL_CALL_FCT): Cast to void *. + Use __BEGIN_DECLS/__END_DECLS around prototypes. + * sysdeps/mips/bits/dlfcn.h (DL_CALL_FCT): Likewise. -2001-06-11 Andreas Jaeger +2001-10-21 Jim Meyering - * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (IXANY, IUCLC, - IMAXBEL): Make always visible since they're needed by POSIX. - Closes PR libc/2320, reported by Chris Yeoh . + * malloc/obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise, + this code would end up calling gettext even in packages built + with --disable-nls. + * posix/getopt.c (_): Likewise. + * posix/regex.c (_): Likewise. -2001-06-10 Ben Collins +2001-10-26 Ulrich Drepper - * sysdeps/arm/elf/start.S: Use #function, not @function, for - .type of _start. + * resolv/gethnamaddr.c (gethostbyaddr): Use ip6.addr for reverse + lookup not ip6.int. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. + Reported by Martin.v.Loewis@t-online.de [PR libc/2598]. - * sysdeps/ieee754/ldbl-128/s_ilogbl.c: Include limits.h to get - INT_MAX. +2001-10-19 Jakub Jelinek -2001-06-07 H.J. Lu + * misc/sys/cdefs.h (__attribute_used__): Define. + * elf/rtld.c (_dl_start): Add __attribute_used__. + * elf/dl-runtime.c (fixup, profile_fixup): Likewise. - * sunrpc/rpc/rpc.h: Add __BEGIN_DECLS/__END_DECLS. +2001-10-25 Andreas Schwab -2001-06-10 Roland McGrath + * stdlib/a64l.c: Expect least significant digit first. + * stdlib/l64a.c: Produce least significant digit first. + * stdlib/Makefile (tests): Add test-a64l. + * stdlib/test-a64l.c: New file. + Reported by Masaki Hasegawa . - * elf/reldep4mod2.c: Use fully typed decls to avoid warnings. - * elf/reldep4mod4.c: Likewise. +2001-10-21 Ulrich Drepper -2001-06-10 Mark Kettenis + * po/sk.po: Update from translation team. - * hurd/hurd/threadvar.h: Add prototype for __hurd_errno_location. +2001-10-18 Ulrich Drepper -2001-06-08 Andreas Schwab + * sysdeps/i386/elf/start.S (_fp_hw): Define object type. - * posix/regex.c (re_match_2_internal) [case wordbeg, wordend]: - Don't dereference at end of string. +2001-10-18 Andreas Schwab -2001-06-06 Roland McGrath + * math/libm-test.inc (print_ulps): Print ulp values rounded to + next whole number. + (print_function_ulps): Likewise. + (print_complex_function_ulps): Likewise. + (print_max_error): Likewise. + (print_complex_max_error): Likewise. Handle ignore_max_ulp. - * sysdeps/mach/hurd/getsockopt.c: Fix handling of returned buffer size. - From Robert Bihlmeyer . +2001-10-16 Andreas Schwab -2001-06-06 Ulrich Drepper + * sysdeps/m68k/fpu/libm-test-ulps: Updated for fixed cbrtl + implementation. - * po/ko.po: Update from translation team. + * sysdeps/m68k/setjmp.c: Also define setjmp and _setjmp if + BSD_SETJMP or BSD__SETJMP is defined, resp. + * sysdeps/m68k/bsd-setjmp.c: Inline setjmp code instead of making + a tail call to __sigsetjmp that would require extending the + caller's frame. + * sysdeps/m68k/bsd-_setjmp.c: Likewise. + * sysdeps/m68k/bsd-setjmp.S: Deleted. + * sysdeps/m68k/bsd-_setjmp.S: Deleted. + Reported by Jes Sorensen . -2001-06-06 Andreas Jaeger +2001-10-16 Andreas Jaeger - * manual/llio.texi (Memory-mapped I/O): Clarify that mapping is to - offset+length-1. - Reported by Robert Bernecky . + * sysdeps/ieee754/ldbl-96/s_nextafterl.c (__nextafterl): Fix + parentheses. Reported by David Byron , + close PR libc/2589. -2001-06-06 Jakub Jelinek +2001-10-15 Ulrich Drepper - * sysdeps/cris/elf/start.S: Fix a typo introduced by last patch. - * sysdeps/ia64/elf/start.S: Likewise. - * sysdeps/sh/elf/start.S: Likewise. - * sysdeps/s390/s390-32/elf/start.S: Likewise. - * sysdeps/s390/s390-64/elf/start.S: Likewise. + * po/ca.po: New file. Contributed by the translation team. -2001-06-05 Matthew Wilcox +2001-10-15 Ralf Baechle - * sysdeps/hppa/bsd-_setjmp.S: New. - * sysdeps/hppa/bsd-setjmp.S: New. + * sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Make sysmips() prototype + a varargs prototype. Remove dependency from kernel header files. - * sysdeps/hppa/dl-machine.h: Reformat asm statements to remove new - gcc warnings about multi-line strings. + * sysdeps/unix/sysv/linux/mips/bits/termios.h: General cleanup, use + __USE_MISC / __USE_XOPEN not __USE_BSD where appropriate. - * sysdeps/unix/sysv/linux/hppa/getrlimit.c: Remove. - * sysdeps/unix/sysv/linux/hppa/setrlimit.c: Remove. +2001-10-14 Ulrich Drepper - * sysdeps/unix/sysv/linux/hppa/syscalls.list: Call getrlimit, - setrlimit directly instead of using wrappers. + * locale/programs/ld-collate.c (handle_ellipsis): Use %lX not %lx + to generate hexadecimal identifier. + Patch by Jungshik Shin . -2001-05-01 Richard Hirst +2001-10-09 Stephen L Moshier - * sysdeps/unix/sysv/linux/hppa/syscall.S: remove dummy syscall. - * sysdeps/unix/sysv/linux/hppa/sysdep.c: implement syscall. + * sysdeps/ieee754/ldbl-96/s_cbrtl.c (__cbrtl): Fix algorithm. -2001-06-05 Philipp Thomas +2001-10-14 Ulrich Drepper - * nis/nis_call.c (__nisbind_connect): Don't mark for translation - what can't be translated. + * sysdeps/ieee754/ldbl-128/e_powl.c: New file. + * sysdeps/ieee754/ldbl-128/s_cbrtl.c: New file. + Contributed by Stephen L Moshier . -2001-06-06 Ulrich Drepper + * sysdeps/ieee754/ldbl-128/e_j0l.c: Constify float variables. + * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Likewise + * sysdeps/ieee754/ldbl-128/s_erfl.c: Likewise + * sysdeps/ieee754/ldbl-128/s_expm1l.c: Likewise + * sysdeps/ieee754/ldbl-128/s_log1pl.c: Likewise - * timezone/zic.c: Update from tzcode2001c. - * timezone/private.h: Likewise. - * timezone/africa: Update from tzdata2001c. + * timezone/africa: Update from tzdata2001d. * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/backward: Likewise. * timezone/europe: Likewise. + * timezone/leapseconds: Likewise. * timezone/northamerica: Likewise. * timezone/southamerica: Likewise. * timezone/zone.tab: Likewise. -2001-06-04 Bruno Haible - - * iconv/loop.c (UNICODE_TAG_HANDLER): New macro. - * iconv/gconv_simple.c (__gconv_transform_internal_ascii): Invoke - UNICODE_TAG_HANDLER. - (__gconv_transform_internal_ucs2): Likewise. - (__gconv_transform_internal_ucs2reverse): Likewise. - * iconvdata/8bit-gap.c (BODY for TO_LOOP): Invoke UNICODE_TAG_HANDLER. - * iconvdata/8bit-generic.c (BODY for TO_LOOP): Likewise. - * iconvdata/ansi_x3.110.c (BODY for TO_LOOP): Likewise. - * iconvdata/big5.c (BODY for TO_LOOP): Likewise. - * iconvdata/big5hkscs.c (BODY for TO_LOOP): Likewise. - * iconvdata/cp1255.c (BODY for TO_LOOP): Likewise. - * iconvdata/cp1258.c (BODY for TO_LOOP): Likewise. - * iconvdata/euc-cn.c (BODY for TO_LOOP): Likewise. - * iconvdata/euc-jp.c (BODY for TO_LOOP): Likewise. - * iconvdata/euc-kr.c (BODY for TO_LOOP): Likewise. - * iconvdata/euc-tw.c (BODY for TO_LOOP): Likewise. - * iconvdata/gbk.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm930.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm932.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm933.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm935.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm937.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm939.c (BODY for TO_LOOP): Likewise. - * iconvdata/ibm943.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso646.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso8859-1.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso_6937.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso_6937-2.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso-2022-cn.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso-2022-cn-ext.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso-2022-kr.c (BODY for TO_LOOP): Likewise. - * iconvdata/johab.c (BODY for TO_LOOP): Likewise. - * iconvdata/sjis.c (BODY for TO_LOOP): Likewise. - * iconvdata/t.61.c (BODY for TO_LOOP): Likewise. - * iconvdata/uhc.c (BODY for TO_LOOP): Likewise. - * iconvdata/unicode.c (BODY for TO_LOOP): Likewise. - * iconvdata/iso-2022-jp.c (TAG_none, TAG_language, TAG_language_j, - TAG_language_ja, TAG_language_k, TAG_language_ko, TAG_language_z, - TAG_language_zh, CURRENT_TAG_MASK): New enum values. - (EMIT_SHIFT_TO_INIT): Don't emit an escape sequence if ASCII_set - is already selected but set2 or tag are set. - (conversion): New enum type. - (cvlist_t): New type. - (CVLIST, CVLIST_FIRST, CVLIST_REST): New macros. - (conversion_lists): New array. - (BODY for TO_LOOP): Keep track of Unicode 3.1 language tag. If "ja", - prefer conversion to Japanese character sets. If "zh", prefer - conversion to GB2312. If "ko", prefer conversion to KSC5601. Small - optimizations. - (INIT_PARAMS): Add tag. - (UPDATE_PARAMS): Add tag. - -2001-06-04 Bruno Haible - - * locale/programs/locfile.c (write_locale_data): Before creat(), - unlink the file, to avoid crashing the processes that mmap it. Change - a double slash to a single slash. Free fname in case of error return. - -2001-06-02 Jakub Jelinek - - * sysdeps/i386/fpu/s_frexpl.S (__frexpl): Mostly revert 2000-12-03 - changes, do the special handling for denormal numbers, not for - normalized numbers (patch by ). - - * math/test-misc.c (main): Test frexpl with denormal arguments. - -2001-06-04 Jakub Jelinek - - * math/libm-test.inc (llround_test): Add two new llround tests. - * sysdeps/ieee754/ldbl-96/s_llroundl.c (__llroundl): Don't allow - overflow when rounding away from zero. - -2001-06-04 Jakub Jelinek - - * math/Makefile (libm-calls): Add e_log2, w_log2, remove s_log2. - * math/math_private.h (__ieee754_log2, __ieee754_log2f, - __ieee754_log2l): New prototypes. - * sysdeps/generic/w_log2.c: New file. - * sysdeps/generic/w_log2f.c: New file. - * sysdeps/generic/w_log2l.c: New file. - * sysdeps/generic/s_log2l.c: Move... - * sysdeps/generic/e_log2l.c: ...to here. Rename to __ieee754_log2l. - * sysdeps/ieee754/k_standard.c (__kernel_standard): Handle log2(0) - and log2(x < 0). - * sysdeps/i386/fpu/s_log2.S: Move... - * sysdeps/i386/fpu/e_log2.S: ...to here. Rename to __ieee754_log2. - * sysdeps/i386/fpu/s_log2f.S: Move... - * sysdeps/i386/fpu/e_log2f.S: ...to here. Rename to __ieee754_log2f. - * sysdeps/i386/fpu/s_log2l.S: Move... - * sysdeps/i386/fpu/e_log2l.S: ...to here. Rename to __ieee754_log2l. - * sysdeps/m68k/fpu/s_log2.c: Move... - * sysdeps/m68k/fpu/e_log2.c: ...to here. Rename to __ieee754_log2. - * sysdeps/m68k/fpu/s_log2f.c: Move... - * sysdeps/m68k/fpu/e_log2f.c: ...to here. Rename to __ieee754_log2f. - * sysdeps/m68k/fpu/s_log2l.c: Move... - * sysdeps/m68k/fpu/e_log2l.c: ...to here. Rename to __ieee754_log2l. - * sysdeps/ieee754/dbl-64/s_log2.c: Move... - * sysdeps/ieee754/dbl-64/e_log2.c: ...to here. Rename to - __ieee754_log2. - * sysdeps/ieee754/flt-32/s_log2f.c: Move... - * sysdeps/ieee754/flt-32/e_log2f.c: ...to here. Rename to - __ieee754_log2f. - -2001-06-04 Jakub Jelinek - - * sysdeps/generic/w_exp2.c (u_threshold): Lower threshold so that - even arguments which result in denormalized exp2 are accepted. - (__exp2): Arguments equal to u_threshold already result into - underflow. - * sysdeps/generic/w_exp2f.c (u_threshold, __exp2f): Likewise. - * sysdeps/generic/w_exp2l.c (u_threshold, __exp2l): Likewise. - * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Lomark was too - low, with corrected lowmark use greaterequal, not greater. - * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise. - -2001-06-04 Jakub Jelinek - - * math/libm-test.inc (ilogb_test): Test that ilogb(+-Inf) == INT_MAX. - * sysdeps/i386/fpu/s_ilogb.S (__ilogb): Return INT_MAX for +-Inf. - * sysdeps/i386/fpu/s_ilogbf.S (__ilogbf): Likewise. - * sysdeps/i386/fpu/s_ilogbl.S (__ilogbl): Likewise. - * sysdeps/ieee754/dbl-64/s_ilogb.c (__ilogb): Likewise. - * sysdeps/ieee754/flt-32/s_ilogbf.c (__ilogbf): Likewise. - * sysdeps/ieee754/ldbl-128/s_ilogbl.c (__ilogbl): Likewise. - * sysdeps/ieee754/ldbl-96/s_ilogbl.c (__ilogbl): Likewise. - -2001-06-04 Jakub Jelinek - - * sysdeps/generic/w_coshl.c (__coshl): Test if finite argument - gave non-finite result instead of using constant in generic - version. - * sysdeps/generic/w_coshf.c (__coshf): Likewise. - * sysdeps/generic/w_cosh.c (__cosh): Likewise. - * sysdeps/generic/w_exp10.c (o_threshold, u_threshold): Remove. - (__exp10): Test if finite argument gave non-finite result. - * sysdeps/generic/w_exp10f.c (o_threshold, u_threshold, __exp10f): - Likewise. - * sysdeps/generic/w_exp10l.c (o_threshold, u_threshold, __exp10l): - Likewise. - -2001-06-04 Jakub Jelinek - - * sysdeps/ieee754/ldbl-96/e_coshl.c (__ieee754_coshl): Fix - overflow threshold constant (log(LDBL_MAX)+M_LN2l). - -2001-05-29 Bruno Haible - - * locale/programs/ld-ctype.c (idx_table): New struct type. - (idx_table_init, idx_table_get, idx_table_add): New functions. - (MAX_CHARNAMES_IDX): Remove macro. - (locale_ctype_t): Change type of charnames_idx field. - (ctype_startup): Change initialization of charnames_idx field. - (find_idx): Use idx_table_get and idx_table_add for speed. - - * locale/programs/charmap.c (charmap_new_char): Fix ucs4 value - computation of characters in a range. - -2001-05-29 Bruno Haible - - * iconvdata/gb18030.c (__fourbyte_to_ucs1): Add mappings for , - . - (__ucs_to_gb18030_tab1): Likewise. - (BODY for FROM_LOOP): Add mapping for ... - (BODY for TO_LOOP): Likewise. - * iconvdata/tst-table-charmap.sh: Update for charmaps containing - syntax. - * iconvdata/tst-table-from.c (bmp_only): New variable. - (utf8_decode): If bmp_only, don't return characters outside Unicode - plane 0. - (main): When testing UTF-8 or GB18030, set bmp_only to 1. Don't print - a conversion line if utf8_decode returns NULL. - * iconvdata/tst-table-to.c (main): When testing encodings other than - UTF-8 and GB18030, loop upto U+30000 instead of U+10000. Use UTF-8 - instead of UCS-2 as input. - * iconvdata/tst-table.sh: For GB18030, use only the part < 0x10000 - of the charmap. - -2001-05-29 Bruno Haible - - * iconvdata/cns11643l1.c: Update to Unicode 3.1. - (__cns11643l1_to_ucs4_tab): Regenerated. - (__cns11643l1_from_ucs4_tab12): Regenerated. - * iconvdata/cns11643.c: Update to Unicode 3.1. - (__cns11643l14_to_ucs4_tab): Remove array. - (__cns11643l3_to_ucs4_tab, __cns11643l4_to_ucs4_tab, - __cns11643l5_to_ucs4_tab, __cns11643l6_to_ucs4_tab, - __cns11643l7_to_ucs4_tab, __cns11643l15_to_ucs4_tab): New arrays. - (__cns11643_from_ucs4p0_tab): Renamed from __cns11643_from_ucs4_tab. - (__cns11643_from_ucs4p2_tab): New array. - * iconvdata/cns11643.h (__cns11643l14_to_ucs4_tab): Remove declaration. - (__cns11643l3_to_ucs4_tab, __cns11643l4_to_ucs4_tab, - __cns11643l5_to_ucs4_tab, __cns11643l6_to_ucs4_tab, - __cns11643l7_to_ucs4_tab, __cns11643l15_to_ucs4_tab): New declarations. - (cns11643_to_ucs4): Treat planes 3, 4, 5, 6, 7, 15 instead of 14. - (__cns11643_from_ucs4_tab): Remove declaration. - (__cns11643_from_ucs4p0_tab, __cns11643_from_ucs4p2_tab): New - declarations. - (ucs4_to_cns11643): Update for new arrays. Treat U+3400..U+4DFF and - U+20000..U+2A6D6. - * iconvdata/cns11643l2.h (__cns11643_from_ucs4_tab): Remove - declaration. - (__cns11643_from_ucs4p0_tab): New declaration. - (ucs4_to_cns11643l2): Update for new arrays. - * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): Handle planes - 3 to 7. - (BODY for TO_LOOP): Handle planes 3 to 7, instead of plane 14. - * iconvdata/EUC-TW.irreversible: New file. - * iconvdata/tst-table.sh: Use it. - * iconvdata/Makefile (distribute): Add CP1255.irreversible, - CP1258.irreversible, EUC-TW.irreversible. - -2001-05-29 Bruno Haible - - * locale/C-translit.h.in: Add transliterations for new Unicode 3.1 - mathematical symbols. - -2001-06-05 Andreas Jaeger - - * manual/stdio.texi (Portable Positioning): Fix description of - fpos_t and fpos64_t. - -2001-06-06 Ulrich Drepper - - * sysdeps/generic/wordexp.c: Undo last patch. Use strndupa instead. - - * po/sk.po: Update from translation team. - -2001-06-05 Andreas Jaeger - - * sysdeps/unix/sysv/linux/shm_open.c (where_is_shmfs): Recognize - tmpfs, patch by Stanislav Brabec . - Closes PR libc/2315. - -2001-06-05 Ulrich Drepper - - * sysdeps/generic/wordexp.c: Add missing free. - Patch by yeti@physics.muni.cz. - -2001-06-02 Tom Browder - - * misc/tst-tsearch.c (mangle_tree): Ensure array indices are - within bounds when lag > 0. - -2001-06-05 Ulrich Drepper - - * po/tr.po: New file. - -2001-06-05 Andreas Jaeger - - * manual/libm-err-tab.pl (parse_ulps): Fix typo. - -2001-06-04 H.J. Lu - - * sysdeps/alpha/elf/start.S: Add .type for the entry point. - * sysdeps/arm/elf/start.S: Likewise. - * sysdeps/hppa/elf/start.S: Likewise. - * sysdeps/i386/elf/start.S: Likewise. - * sysdeps/m68k/elf/start.S: Likewise. - * sysdeps/mips/elf/start.S: Likewise. - * sysdeps/ia64/elf/start.S: Likewise. - * sysdeps/sh/elf/start.S: Likewise. - * sysdeps/s390/s390-32/elf/start.S: Likewise. - * sysdeps/s390/s390-64/elf/start.S: Likewise. - * sysdeps/cris/elf/start.S: Likewise. - -2001-06-04 Bruce Mitchener - - * manual/resource.texi: Correct setpriority/nice documentation. - - * sysdeps/unix/nice.c: Correct nice() implementation. - -2001-06-04 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/e_sinhl.c: New file, contributed by - Stephen L Moshier . - -2001-06-03 Roland McGrath - - * Makefile (postclean): Remove obsolete sysd-Makefile. - -2001-06-01 Roland McGrath - - * sysdeps/alpha/fpu/fclrexcpt.c: #include - and use compat_symbol/versioned_symbol instead of plain - symbol_version/default_symbol_version. - * sysdeps/alpha/fpu/fegetenv.c: Likewise. - * sysdeps/alpha/fpu/fesetenv.c: Likewise. - * sysdeps/alpha/fpu/feupdateenv.c: Likewise. - * sysdeps/alpha/fpu/fgetexcptflg.c: Likewise. - * sysdeps/alpha/fpu/fraiseexcpt.c: Likewise. - * sysdeps/alpha/fpu/fsetexcptflg.c: Likewise. - * sysdeps/arm/fpu/fclrexcpt.c: Likewise. - * sysdeps/arm/fpu/fegetenv.c: Likewise. - * sysdeps/arm/fpu/fesetenv.c: Likewise. - * sysdeps/arm/fpu/fraiseexcpt.c: Likewise. - * sysdeps/arm/fpu/fsetexcptflg.c: Likewise. - * sysdeps/i386/fpu/fclrexcpt.c: Likewise. - * sysdeps/i386/fpu/fegetenv.c: Likewise. - * sysdeps/i386/fpu/fesetenv.c: Likewise. - * sysdeps/i386/fpu/feupdateenv.c: Likewise. - * sysdeps/i386/fpu/fgetexcptflg.c: Likewise. - * sysdeps/i386/fpu/fraiseexcpt.c: Likewise. - * sysdeps/i386/fpu/fsetexcptflg.c: Likewise. - * sysdeps/m68k/fpu/fclrexcpt.c: Likewise. - * sysdeps/m68k/fpu/fegetenv.c: Likewise. - * sysdeps/m68k/fpu/fesetenv.c: Likewise. - * sysdeps/m68k/fpu/feupdateenv.c: Likewise. - * sysdeps/m68k/fpu/fgetexcptflg.c: Likewise. - * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. - * sysdeps/m68k/fpu/fsetexcptflg.c: Likewise. - * sysdeps/powerpc/fclrexcpt.c: Likewise. - * sysdeps/powerpc/fpu/fegetenv.c: Likewise. - * sysdeps/powerpc/fpu/fesetenv.c: Likewise. - * sysdeps/powerpc/fpu/feupdateenv.c: Likewise. - * sysdeps/powerpc/fpu/fgetexcptflg.c: Likewise. - * sysdeps/powerpc/fpu/fraiseexcpt.c: Likewise. - * sysdeps/powerpc/fpu/fsetexcptflg.c: Likewise. - - * iconvdata/cp1258.c: Include for abort decl. - * iconvdata/iso-2022-cn-ext.c: Likewise. - -2001-06-01 Andreas Jaeger - - * Versions.def: Add version 2.2.4. - -2001-06-01 Ulrich Drepper - - * socket/Makefile (routines): Add sockatmark. - * socket/Versions [GLIBC_2.2.4]: Add sockatmark. - * socket/sys/socket.h: Add prototype for sockatmark. - * sysdeps/generic/sockatmark.c: New file. - * sysdeps/unix/sockatmark.c: New file. - -2001-06-01 Andreas Jaeger - - * sysdeps/unix/sysv/linux/speed.c (cfsetispeed): Max speed is - B4000000. - (cfsetospeed): Likewise. - Reported by Lukasz Trabinski . - -2001-05-31 Joseph S. Myers - - * misc/sys/cdefs.h (__restrict_arr): Define to empty for C++. - -2001-05-30 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: greg_t - needs to have the same aligment as the kernel structure. - -2001-05-29 Jakub Jelinek - - * sunrpc/rpc/types.h (u_char, u_short, u_int, u_long, quad_t, - u_quad_t, fsid_t, daddr_t, caddr_t): Make sure the types are defined. - * posix/sys/types.h (u_char, u_short, u_int, u_long, quad_t, - u_quad_t, fsid_t, daddr_t, caddr_t): Protect the __USE_BSD typedefs - against multiple definition. - -2001-05-30 Ulrich Drepper - - * po/da.po: Update from translation team. - -2001-05-29 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/e_acosl.c: New file, contributed by - Stephen L Moshier . - - * math/libm-test.inc (sinh_test): Add new test case. - - * sysdeps/ieee754/ldbl_96/e_sinhl.c (__ieee754_sinhl): sinhl(x) = - x when x < 2^-32. - Patch by Stephen L Moshier . - -2001-05-23 Andreas Jaeger - - * iconvdata/testdata/WINDOWS-1255..UTF-8: Renamed to... - * iconvdata/testdata/WINDOWS-1255..UTF8: this. - -2001-05-27 Andreas Jaeger - - * manual/stdio.texi (String Streams): Fix fmemopen description. - Reported by Michal Kochanowicz . - -2001-05-26 H.J. Lu - - * sysdeps/unix/sysv/linux/mips/syscalls.list: Change sigsuspend - to s_sigsuspend. Add s_mmap2. - - * sysdeps/mips/atomicity.h: New file. - - * sysdeps/unix/sysv/linux/mips/getsysstats.c: New file. - - * sysdeps/unix/sysv/linux/mips/bits/ipc.h (ipc_perm): Put - back __key. - -2001-05-25 Bruce Mitchener - - * manual/ctype.texi: Minor fix. - * manual/install.texi: Likewise. - * manual/startup.texi: Likewise. - * manual/examples/dir.c: Use perror() rather than puts(). - -2001-05-25 David Mosberger - - * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Put stuff following - #endif directive inside a comment to avoid compiler warnings. - -2001-05-25 Philipp Thomas - - * nis/nis_print.c (nis_nstype2str): Don't mark names of - naming services for translation, only UNKNOWN needs it. - Add comment to prevent it for the future. - -2001-05-25 Joseph S. Myers - - * misc/sys/cdefs.h (__restrict_arr): Define appropriately for GCC - 3.1 and non-GCC C99 compilers. - -2001-05-22 David Mosberger - - * sysdeps/ia64/memmove.S: Increase MEMLAT from 6 to 21 for better - performance. - * sysdeps/ia64/memcpy.S: Likewise. - - * sysdeps/ia64/bcopy.S: New file. - - * sysdeps/ia64/bzero.S: New file (derived from memset.S). - -2001-05-26 Ulrich Drepper - - * sysdeps/ia64/fpu/libm-test-ulps: Add deltas for tanh(-0.7). - -2001-05-24 Ulrich Drepper - - * iconvdata/Makefile: Add rules for CP10007. - * iconvdata/gconv-modules: Add entries for CP10007 ad MacCyrillic. - * iconvdata/cp10007.c: New file. - * iconvdata/tst-tables.sh: Add CP10007. - -2001-05-23 kaz Kojima - - * sysdeps/sh/dl-machine.h (_dl_runtime_resolve): Handle newer PLT. - (_dl_runtime_profile): Likewise.. - -2001-05-23 Thorsten Kukuk - - * sysdeps/posix/getaddrinfo.c: Support for AF_UNIX commented out. - * posix/tst-getaddrinfo.c: Remove AF_UNIX test. - -2001-05-19 H.J. Lu - - * elf/dl-deps.c (_dl_map_object_deps): Pass objname and - errstring of the failed DSO to _dl_signal_error (). - -2001-05-23 Ulrich Drepper - - * iconvdata/gconv-modules: Add more aliases to enable use in - locale names. - -2001-05-23 Andreas Jaeger - - * sysdeps/unix/sysv/linux/ia64/Makefile (CFLAGS-initfini.s): - Remove, it's not used anywhere anymore. - * sysdeps/unix/sysv/linux/s390/s390-64/Makefile - (CFLAGS-initfini.s): Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/Makefile - (CFLAGS-initfini.s): Likewise. - * sysdeps/unix/sysv/linux/powerpc/Makefile (CFLAGS-initfini.s): - Likewise. - * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-initfini.s): - Likewise. - -2001-05-21 Bruno Haible - - * wcsmbs/mbrtowc.c (mbrtowc): Remove local variable 'flush', always - use 0 instead, and rely on the converter to do the flush. - * wcsmbs/tst-mbrtowc.c (utf8_test_1): New function, taken from - utf8_test. - (utf8_test_2, utf8_test_3): New function. - (utf8_test): Call utf8_test_1, utf8_test_2, utf8_test_3. - -2001-05-22 Jakub Jelinek - - * elf/dl-close.c (_dl_close): Save imap->l_reldeps, not map->l_reldeps. - - * elf/Makefile (distribute): Add reldep4mod[1234].c. - (tests): Add reldep4. - (modules-names): Add reldep4mod[1234]. - (reldep4mod1.so, reldep4mod2.so, reldep4, reldep4.out): New rules. - * elf/reldep4.c: New file. - * elf/reldep4mod1.c: Likewise. - * elf/reldep4mod2.c: Likewise. - * elf/reldep4mod3.c: Likewise. - * elf/reldep4mod4.c: Likewise. - -2001-05-18 Jakub Jelinek - - * elf/dl-lookup.c (PROTECTED): Remove defines. - (add_dependency): Mark it with internal_function. - (_dl_do_lookup, _dl_do_lookup_versioned): New functions. - (_dl_lookup_symbol, _dl_lookup_symbol_skip, - _dl_lookup_versioned_symbol, _dl_lookup_versioned_symbol_skip): Use - it if we don't want do_lookup* inlined. - -2001-05-18 Jakub Jelinek - - * include/link.h (struct r_scope_elem): Remove r_duplist and - r_nduplist fields. - * elf/dl-load.c (_dl_map_object_from_fd): Don't initialize them. - * elf/dl-lookup.c (_dl_lookup_symbol_skip): Look in r_list, not - r_duplist. - (_dl_lookup_versioned_symbol_skip): Likewise. - * elf/dl-deps.c (struct list): Remove dup field, rename unique to next. - (_dl_map_object_deps): Don't compute duplicate list. - - * elf/dl-symbol.c: Removed. - * elf/Makefile (routines): Remove dl-symbol. - -2001-05-22 Ulrich Drepper - - * po/el.po: Update from translation team. - * po/sv.po: Likewise. - -2001-05-20 Bruno Haible - - * iconvdata/cp1255.c: Completely rewritten. - * iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1255. - * iconvdata/testdata/WINDOWS-1255: New file. - * iconvdata/testdata/WINDOWS-1255..UTF8: New file. - * iconvdata/TESTS: Add WINDOWS-1255 test. - * iconvdata/CP1255.irreversible: New file. - -2001-05-20 Bruno Haible - - * iconvdata/cp1258.c: Completely rewritten. - * iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1258. - * iconvdata/testdata/WINDOWS-1258: New file. - * iconvdata/testdata/WINDOWS-1258..UTF8: New file. - * iconvdata/TESTS: Add WINDOWS-1258 test. - * iconvdata/tst-table-from.c (try): Reset the iconv descriptor before - the main call, and flush it afterwards. - (utf8_decode): Return a string, possibly containing several Unicode - characters. - (main): Update all utf8_decode calls. - * iconvdata/CP1258.irreversible: New file. - -2001-05-20 Bruno Haible - - * iconv/gconv.c (__gconv): For flush without output, pass do_flush = 2. - * iconv/skeleton.c: Distinguish do_flush = 1 and do_flush = 2. In the - first case, set outbuf, outstart, outend, and call PREPARE_LOOP before - EMIT_SHIFT_TO_INIT; then pass the output produced by this step down to - the next step. In the second case, clear the state without calling - EMIT_SHIFT_TO_INIT. - * iconvdata/ibm930.c (EMIT_SHIFT_TO_INIT): Use outbuf instead of - data->__outbuf, and outend instead of data->__outbufend. - * iconvdata/ibm933.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/ibm935.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/ibm937.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/ibm939.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/iso-2022-cn.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/iso-2022-cn-ext.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/iso-2022-kr.c (EMIT_SHIFT_TO_INIT): Likewise. - * iconvdata/utf-7.c (EMIT_SHIFT_TO_INIT): Likewise. - -2001-05-21 Jakub Jelinek - - * elf/rtld.c (dl_main): Compute l_map_end for the main program. - * elf/dl-sym.c (_dl_sym): Don't check for l_addr == 0. - If match == _dl_loaded, caller can still come from the main program. - (_dl_vsym): Likewise. - * elf/dl-open.c (dl_open_worker): Don't check for l_addr == 0. - * elf/dl-error.c (_dl_signal_error): Change NULL objname into "". - * elf/restest2.c: New test. - * elf/Makefile (tests): Add restest2. - (restest2, LDFLAGS-restest2): Add rules. - -2001-05-22 Ulrich Drepper - - * intl/Makefile: Add a few more dependencies to avoid races in the - test shell scripts. - -2001-05-22 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/s_log1pl.c: New file, contributed by - Stephen L Moshier . - -2001-05-22 Martin Schwidefsky - - * sysdeps/s390/s390-32/backtrace.c: Make backtrace return the - return addresses instead of the stack pointers. - * sysdeps/s390/s390-64/backtrace.c: Likewise. - -2001-05-21 Jakub Jelinek - - * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Include - bits/sigcontext.h instead of bits/sigstack.h. - * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Add - multiple-inclusion guards. - -2001-05-21 Andreas Jaeger - - * locale/programs/ld-collate.c (handle_ellipsis): Fix message. - Patch by Philipp Thomas . - -2001-05-17 Bruce Mitchener - - * manual/arpg.texi: Spelling, misc fixes. - * manual/arith.texi: Likewise. - * manual/crypt.texi: Likewise. - * manual/debug.texi: Likewise. - * manual/getopt.texi: Likewise. - * manual/intro.texi: Likewise. - * manual/memory.texi: Likewise. - * manual/nss.texi: Likewise. - * manual/pattern.texi: Likewise. - * manual/process.texi: Likewise. - * manual/resource.texi: Likewise. - * manual/search.texi: Likewise. - * manual/setjmp.texi: Likewise. - * manual/signal.texi: Likewise. - * manual/socket.texi: Likewise. - * manual/stdio.texi: Likewise. - * manual/string.texi: Likewise. - * manual/sysinfo.texi: Likewise. - * manual/terminal.texi: Likewise. - * manual/llio.texi: Document madvise(). - -2001-05-20 Roland McGrath - - * Makeconfig (sysdep-makeconfigs): Include any Makeconfig files - found within $(add-ons) directories too. - [linuxthreads add-on]: Move variable settings for linuxthreads - to new file linuxthreads/Makeconfig. - -2001-05-20 Franz Sirl - - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_STD_AUXV): - Define for linux >= 2.4.5 on powerpc. - (__ASSUME_MMAP2_SYSCALL): Likewise. - -2001-05-19 Roland McGrath - - * hurd/hurdlookup.c (__hurd_file_name_lookup_retry): Don't leak the - result port when failing with ELOOP. Do the ELOOP check when - following an absolute symlink target as well as relative. - Remove #ifdef SYMLOOP_MAX conditional--it should always be defined. - -2001-05-18 Andreas Jaeger - - * po/fr.po: Free software is "logiciel libre". - Patch by Martin Michlmayr . - - * sysdeps/powerpc/elf/libc-start.c: Use __cxa_atexit. - Patch by ekato@ees.hokudai.ac.jp, closes PR libc/2271. - -2001-05-17 David Mosberger - - * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: New file. - -2001-05-17 Ulrich Drepper - - * elf/dl-profile.c (_dl_mcount): Check whether state is - GMON_PROF_ON before doing anything. - -2001-05-17 H.J. Lu - - * elf/sprof.c (read_symbols): Move "++symtab" into the while loop. - -2001-05-17 Ulrich Drepper - - * sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Use - CHECK_SIGSET_NULL_OK and not CHECK_SIGSET for all parameters. - Reported by Mark Burton . - -2001-05-17 Jakub Jelinek - - * elf/ldconfig.c (add_dir): Only warn about stat failure if - opt_verbose. - (search_dir): Likewise. - -2001-05-17 Ulrich Drepper - - * sysdeps/i386/i486/atomicity.h (exchange_and_add): Correct second - parameter of xaddl. Patch by H . J . Lu . - -2001-05-14 Bruno Haible - - * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): If SO is seen - without previous announcement, reject it regularly, don't abort. - -2001-05-16 Ulrich Drepper - - * math/tgmath.h: Fix handling of int parameters to binary and - ternary functions. Reported by mitr@volny.cz. - - * math/test-tgmath.c: Add tests for calls with integer parameters. - -2001-05-15 Jakub Jelinek - - * sunrpc/rpc_thread.c (rpc_default): Remove. - (__rpc_thread_destroy): Use __libc_tsd_RPC_VARS_mem instead of - rpc_default. - (rpc_thread_multi, __rpc_thread_svc_fdset, __rpc_thread_createerr, - __rpc_thread_svc_pollfd, __rpc_thread_svc_max_pollfd): Likewise. - * sunrpc/auth_none.c (authnone_private): Fix a typo. - -2001-05-16 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Fix stack allocation. - -2001-05-16 Bruce Mitchener - - * manual/llio.texi: Many grammar and typo fixes to the section on AIO. - -2001-05-15 Andreas Jaeger - - * sysdeps/ieee754/ldbl-128/s_expm1l.c: New file, contributed by - Stephen L Moshier . - - * sysdeps/i386/fpu/libm-test-ulps: Adjust for change. - - * math/libm-test.inc: Add comment with ToDo. - - * sysdeps/i386/fpu/e_expl.c: Rewritten to C and using a more - accurate algorithm. Patch by Stephen L Moshier . - - * sysdeps/i386/fpu/e_expl.S: Removed. - -2001-05-14 Roland McGrath - - * csu/Makefile ($(objpfx)g$(start-installed-name)): Turn this into a - static pattern rule also that also covers - $(objpx)g$(static-start-installed-name). - [$(start-installed-name) != $(static-start-installed-name)] - (extra-objs, omit-deps, install-lib): Add - $(static-start-installed-name) and g$(static-start-installed-name). - * sysdeps/mach/hurd/i386/Makefile: Don't add crt0.o to those here; - just setting static-start-installed-name is now sufficient. - (extra-objs): Add static-start.o here. - (CFLAGS-initfini.s): Remove obsolete variable. - * sysdeps/mach/hurd/i386/Makeconfig: New file. - Define static-start-installed-name here. - - * Makeconfig: Include existing $(full_config_sysdirs:=/Makeconfig). - * Make-dist (+sysdep-tsrcs): Look for Makeconfig files. - - * Makerules ($(+sysdir_pfx)sysd-Makefile): Remove this target and - associated hair. Instead, just use $(wildcard ...) in the include. - - * configure.in (critic_missing, aux_missing): Collect in these vars - the names of the missing programs, and include them in the error msgs. - * configure: Regenerated. - -2001-05-14 Andreas Jaeger - - * sysdeps/i386/fpu/libm-test-ulps: Adjust for new tests. - - * math/libm-test.inc (tanh_test): Add testcases for last tanh bug. - -2001-05-14 Stephen L Moshier - - * sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Fix sign test. - -2001-05-11 Jakub Jelinek - - * posix/regex.c (re_match_2_internal): Swap mbs_offset and csize - as well if swapping strings. - Make sure stop is not past end of second string. - * posix/bug-regex4.c: New test. - * posix/Makefile (tests): Add bug-regex4. - -2001-05-10 Andreas Jaeger - - * manual/install.texi (Linux): Clarify that Linux 2.2 is minimal - requirement. - -2001-05-12 Andreas Jaeger - - * sysdeps/ieee754/dbl-64/s_sin.c: Include "math_private.h" for - internal prototypes. - * sysdeps/ieee754/dbl-64/doasin.c: Likewise. - * sysdeps/ieee754/dbl-64/dosincos.c: Likewise. - * sysdeps/ieee754/dbl-64/halfulp.c: Likewise. - * sysdeps/ieee754/dbl-64/sincos32.c: Likewise. - * sysdeps/ieee754/dbl-64/slowexp.c: Likewise. - * sysdeps/ieee754/dbl-64/slowpow.c: Likewise. - * sysdeps/ieee754/dbl-64/branred.c: Likewise. - - * math/math_private.h: Add prototypes for internal functions of - the IBM Accurate Mathematical Library. - - * sysdeps/ieee754/dbl-64/s_atan.c: Include "math.h" for - prototypes. - * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. - - * sysdeps/ieee754/dbl-64/e_asin.c: Include "math_private.h" for - internal prototypes. - * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. - * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise. - * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise. - * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. - * sysdeps/ieee754/dbl-64/e_log.c: Likewise. - * sysdeps/ieee754/dbl-64/e_exp.c: Likewise. - * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. - * sysdeps/generic/e_rem_pio2l.c: Likewise. - (__ieee754_rem_pio2l): Fix prototype. - - * math/math_private.h (__copysign): Add internal prototype. - -2001-05-11 Andreas Jaeger - - * sysdeps/unix/sysv/linux/configure.in: Move binutils check to... - * sysdeps/unix/sysv/linux/mips/configure.in: ...here. New file. - -2001-05-11 Andreas Jaeger - - * sysdeps/unix/sysv/linux/configure.in: Check binutils version on - MIPS. - - * sysdeps/mips/rtld-ldscript.in: Removed unneeded binary output - format directive. Patch by Steven J. Hill . - -2001-05-11 Roland McGrath - - * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Don't use - $(build-module) here, since we don't need the full magilla. - Just use $(build-module-helper) and append our special options. - -2001-05-09 Andreas Schwab - - * sysdeps/unix/readdir.c: Make sure we don't modify errno when we - reached EOF. - -2001-05-07 H.J. Lu +2001-10-09 Martin Schwidefsky - * elf/ldconfig.c (dir_entry): Add ino and dev. - (add_single_dir): Compare ino and dev to check if 2 directory - paths are the same or not. Free entry->path for duplicates. - (add_dir): Initialize ino and dev for entry. - (search_dir): Handle symlink to directory. + * sysdeps/s390/s390-32/sys/ucontext.h: Correct __psw_t typedef. + * sysdeps/s390/s390-64/sys/ucontext.h: Likewise. -2001-05-07 Andreas Jaeger +2001-10-12 Ulrich Drepper - * sysdeps/i386/fpu/libm-test-ulps: Add ulps for new exp tests. + * elf/elf.h (PT_TLS): New definition. - * math/libm-test.inc (exp_test): Add some more tests. - (pow_test): Run double only test also for long double. +2001-10-10 Jeff Bailey - * math/test-ldouble.c (TEST_LDOUBLE): Define. - * math/test-ildoubl.c (TEST_LDOUBLE): Likewise. + * sysdeps/mach/hurd/Makefile: Add $(CFLAGS) for generation of + bits/errno.h - * sysdeps/generic/bits/confname.h: Remove extra comma at end of - enumeration. - Closes PR libc/2240. +2001-10-07 Roland McGrath - * scripts/config.guess: Imported from gnu.org. - * scripts/config.sub: Likewise. + * sysdeps/mach/hurd/setrlimit.c (__setrlimit): Never return ENOSYS. -2001-05-05 Jakub Jelinek +2001-10-10 Ulrich Drepper - * include/features.h (__USE_EXTERN_INLINES): Don't define if - __NO_INLINE__ is defined. - * ctype/ctype.h (tolower, toupper): Change the guard condition to - __USE_EXTERN_INLINES check only. - * stdlib/stdlib.h (strtod, ...): Likewise. - * wcsmbs/wchar.h (mbrlen): Likewise. - * string/string.h: Only include bits/string.h and bits/string2.h - if __NO_INLINE__ is not defined. + * elf/elf.h: Add more ELFOSABI_* constants. -2001-05-07 Andreas Jaeger +2001-10-04 Ben Collins - * debug/Makefile ($(objpfx)xtrace): Substitute @SLIBDIR@ instead - of @LIBDIR@. + * sysdeps/generic/inttypes.h: Fix typo (define, not defined) in + decleration of __need_wchar_t. -2001-05-04 H.J. Lu +2001-10-03 Jakub Jelinek - * malloc/Makefile ($(objpfx)memusage): Substitute @SLIBDIR@ - not @LIBDIR@. + * string/bits/string2.h (__strsep_g): Add prototype. + (__strsep): Use it. + * string/Versions (__strsep): Remove. + * sysdeps/generic/strsep.c (__strsep_g): Add alias to __strsep. -2001-05-06 Andreas Jaeger +2001-10-07 Ulrich Drepper - * sysdeps/i386/fpu/e_fmodl.c: New, rewrite of e_fmodl.S. - * sysdeps/i386/fpu/e_fmodl.S: Removed. - * sysdeps/i386/fpu/e_atan2l.c: New, rewrite of e_atan2l.S. - * sysdeps/i386/fpu/e_atan2l.S: Removed. - * sysdeps/i386/fpu/e_acosl.c: New, rewrite of e_acos.S. - * sysdeps/i386/fpu/s_atanl.c: New, rewrite of e_atanl.S. - * sysdeps/i386/fpu/e_sqrtl.c: New, rewrite of e_sqrt.S. - * sysdeps/i386/fpu/e_acosl.S: Removed. - * sysdeps/i386/fpu/s_atanl.S: Removed. - * sysdeps/i386/fpu/e_sqrtl.S: Removed. + * manua/llio.texi: Clarify file references added by mmap. + Patch by Marcus Brinkmann . -2001-05-05 Mark Kettenis +2001-09-29 Jes Sorensen - * sysdeps/mach/hurd/bits/environments.h: Add comment from - sysdeps/generic/bits/environments.h. Define _POSIX_V6_* values. + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): + Add sc_loadrs and sc_rbs_bas to match current kernel. -2001-04-30 Jakub Jelinek +2001-09-27 Jakub Jelinek - * posix/confstr.c (confstr) [_CS_V6_WIDTH_RESTRICTED_ENVS]: Move so - that _CS_LFS_CFLAGS can fall through to the empty returned string - case. Add FALLTHROUGH comment. + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. -2001-04-29 Ralf Baechle + * sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Fix erfc(-inf). - * sysdeps/unix/sysv/linux/mips/bits/sem.h: Make structure - definitions match the kernel definitions. - * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. +2001-09-27 Jakub Jelinek -2001-04-29 Ben Collins + * elf/dl-open.c (dl_open_worker): If l_opencount of freshly loaded + object has been bumped because of relocation dependency, avoid + duplicates in l_scope. + (show_scope): Fix typos. + * elf/Makefile: Add rules to build and run reldep6. + * elf/reldep6.c: New file. + * elf/reldep6mod0.c: New file. + * elf/reldep6mod1.c: New file. + * elf/reldep6mod2.c: New file. + * elf/reldep6mod3.c: New file. + * elf/reldep6mod4.c: New file. - * sysdeps/sparc/sparc64/dl-machine.h: Fix multiline strings - warnings. - * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_div.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. - * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Likewise. +2001-09-26 Jakub Jelinek -2001-04-29 Andreas Schwab + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Call + sparc64_fixup_plt. + (sparc64_fixup_plt): Moved from elf_machine_fixup_plt. Optimize + near jumps and 0xfffff800XXXXXXXX target addresses, no thread safety + for non-lazy binding. Fix .plt[32768+] handling. + (elf_machine_plt_value): Don't add addend. + (elf_machine_rela): Call sparc64_fixup_plt instead of + elf_machine_fixup_plt. + (elf_machine_runtime_setup, TRAMPOLINE_TEMPLATE): Optimize for + dynamic linker at 0xfffff800XXXXXXXX. - * sysdeps/unix/sysv/linux/kernel-features.h: Fix missing backslash - in last change. + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. -2001-04-29 Andreas Jaeger +2001-09-28 Ulrich Drepper - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FCNTL64): - Define for Arm, PowerPC and SH if kernel is 2.4.4 or newer. + * elf/elf.h: Define SHF_GROUP and SHF_TLS. - * sysdeps/unix/sysv/linux/bits/socket.h (PF_WANPIPE): New, from - Linux 2.4.4. - (AF_WANPIPE): Likewise. - (MSG_MORE): New. +2001-09-25 Jakub Jelinek - * sysdeps/unix/sysv/linux/alpha/bits/socket.h: Add same changes as - for Linux generic version. + * sysdeps/unix/bsd/bsd4.4/bits/socket.h (struct cmsghdr): Don't + declare __cmsg_data field if its size would be bigger than 0. + (CMSG_DATA): Adjust accordingly. + * sysdeps/unix/sysv/aix/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/socket.h: Likewise. - - * sysdeps/gnu/netinet/tcp.h (TCP_QUICKACK): New. - -2001-04-27 Ulrich Drepper - - * nis/nss-nis.h: Correct test for invalid error number. - * nis/nss-nisplus.h: Likewise. - - * nis/Makefile (libnss_compat-rountines): Add nss-nisplus. - -2001-04-26 Ulrich Drepper - - * sysdeps/unix/sysv/linux/ia64/syscalls.list: Add getunwind. - - * string/strcoll.c: Fix two memory allocation problems. - * string/Makefile (tests): Add bug-strcoll1. - * string/bug-strcoll1.c: New file. - - * malloc/mcheck.c (mcheck): Call malloc once before setting the - hooks to allow the internal check hooks to be set up if necessary. - - * nis/nss-nis.h: Move yperr2nss_tab definition into separate file - and rename to __yperr2nss_tab. Change YPERR_COUNT into variable - __yperr2nss_count. - * nis/nss-nis.c: New file. - * nis/nss-nisplus.h: Move niserr2nss_tab definition into separate file - and rename to __niserr2nss_tab. Change NISERR_COUNT into variable - __niserr2nss_count. - * nis/nss-nisplus.c: New file. - * nis/Makefile (libnss_compat-routines): Add nss-nis. - (libnss_nis-routines): Likewise. - (libnss_nisplus-routines): Add nss-nisplus. - - * nis/nss_nisplus/nisplus-alias.c: Remove unnecessary initializations. - * nis/nss_nisplus/nisplus-ethers.c: Likewise. - * nis/nss_nisplus/nisplus-grp.c: Likewise. - * nis/nss_nisplus/nisplus-hosts.c: Likewise. - * nis/nss_nisplus/nisplus-network.c: Likewise. - * nis/nss_nisplus/nisplus-proto.c: Likewise. - * nis/nss_nisplus/nisplus-pwd.c: Likewise. - * nis/nss_nisplus/nisplus-rpc.c: Likewise. - * nis/nss_nisplus/nisplus-service.c: Likewise. - * nis/nss_nisplus/nisplus-spwd.c: Likewise. - * nis/nss_nis/nis-alias.c: Likewise. - * nis/nss_nis/nis-ethers.c: Likewise. - * nis/nss_nis/nis-grp.c: Likewise. - * nis/nss_nis/nis-network.c: Likewise. - * nis/nss_nis/nis-proto.c: Likewise. - * nis/nss_nis/nis-pwd.c: Likewise. - * nis/nss_nis/nis-spwd.c: Likewise. - * nis/nss_compat/compat-grp.c: Likewise. - * nis/nss_compat/compat-initgroups.c: Likewise. - * nis/nss_compat/compat-pwd.c: Likewise. - * nis/nss_compat/compat-spwd.c: Likewise. - - * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Some more - optimizations. Patch by Jakub Jelinek . - -2001-04-26 Andreas Jaeger - - * po/zh_TW.po: Update. - Patch by Tung-Han Hsieh . - -2001-04-25 Ulrich Drepper - - * malloc/malloc.c: Allow MALLOC_ALIGNMENT to be defined on the - compiler command line. - * sysdeps/hppa/Makefile: Add -DMALLOC_ALIGNMENT=16 to compiler - command line for malloc.c. - -2001-04-25 Jakub Jelinek - - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/time.h: Move to... - * sysdeps/unix/sysv/linux/sparc/bits/time.h: ...here. - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/bits/time.h: Remove. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/socket.h: Move to... - * sysdeps/unix/sysv/linux/sparc/bits/socket.h: ...here. Adjust - struct msghdr for __WORDSIZE == 32. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statvfs.h: Move to... - * sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: ...here. Adjust - for __WORDSIZE == 32. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Remove. - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/get_clockfreq.c: New - file. - * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S (__libc_siglongjmp): - Rename from longjmp, make longjmp weak alias to it. - -2001-04-24 David S. Miller - - * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: New file. - -2001-04-25 Matthew Wilcox - - * sysdeps/hppa/stackinfo.h: New file. - * sysdeps/unix/sysv/linux/hppa/getdents64.c: New file. - * sysdeps/unix/sysv/linux/hppa/mmap64.c: New file. - * sysdeps/unix/sysv/linux/hppa/bits/resource.h: New file. - * sysdeps/unix/sysv/linux/kernel-features.h: Add descriptions - of PA kernel features. - -2001-04-25 Ulrich Drepper - - * locale/programs/localedef.c (main): Always set a file name for - the initial locale. - * locale/programs/locfile.c (locfile_read): filename is allowed to - be NULL. - -2001-04-12 Paul Bame - - * sysdeps/hppa/fpu/fclrexcpt.c: Clear the exception flags, not the - enable flags. - -2001-04-24 Ulrich Drepper - - * sysdeps/generic/bits/environments.h (_POSIX_V6_LPBIG_OFFBIG, - _XBS5_LPBIG_OFFBIG): Define to -1. - Fix typos. - - * sysdeps/generic/bits/confname.h: Add _CS_V6_WIDTH_RESTRICTED_ENVS. - * posix/confstr.c: Handle _CS_V6_WIDTH_RESTRICTED_ENVS. - * posix/getconf.c: Handle _POSIX_V6_WIDTH_RESTRICTED_ENVS. - * posix/tst-getconf.sh: Add _POSIX_V6_WIDTH_RESTRICTED_ENVS. - - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/bits/time.h: Removed. - -2001-03-21 Alan Modra - - * sysdeps/hppa/dl-machine.h (RTLD_START): Set up dp with DT_PLTGOT - value from application so that constructors in non-PIC libs work. - -2000-12-13 Jes Sorensen - - * sysdeps/hppa/dl-machine.h (RTLD_START): _dl_init now returns a - function pointer, hence load the jump address and gp from the - function pointer before jumping. - -2001-04-24 Andreas Jaeger - - * sysdeps/generic/send.c (__send): Return ssize_t. - * sysdeps/mach/hurd/send.c (__send): Likewise. - * sysdeps/mach/hurd/recv.c (recv): Likewise. - * sysdeps/mach/hurd/sendto.c (sendto): Likewise. - * sysdeps/generic/sendto.c (sendto): Likewise. - * sysdeps/generic/recvmsg.c (recvmsg): Likewise. - * sysdeps/mach/hurd/recvfrom.c (recvfrom): Likewise. - * sysdeps/generic/recvfrom.c (recvfrom): Likewise. - * sysdeps/generic/sendmsg.c (sendmsg): Likewise. - - * socket/sys/socket.h: send* and recv* return ssize_t. - - * include/sys/socket.h: send returns ssize_t. - - * sysdeps/i386/fpu_control.h: Fix comments. - -2001-04-24 Ulrich Drepper - - * sysdeps/ia64/Dist: Add hp-timing.c. - * sysdeps/unix/sysv/linux/sparc/sparc64/Dist: Add ucontext_i.h. - * posix/Makefile (distribute): Add tst-getconf.sh. - * po/Makefile (distribute): Add $(BROKEN_LINGUAS:=.po). - -2001-04-23 Ulrich Drepper - - * sysdeps/ia64/Makefile [subdir=csu] (sysdep_routines): Add hp-timing. - * sysdeps/ia64/Versions: Add _dl_cpuclock_offset for ld in 2.2.3. - * sysdeps/ia64/hp-timing.c: New file. - * sysdeps/ia64/hp-timing.h: New file. - * sysdeps/unix/sysv/linux/ia64/bits/time.h: Add definitions for - CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID. - - * sysdeps/generic/clock_getcpuclockid.c: Make function generic, test - using #ifdef whether the clock is available. - * sysdeps/unix/i386/clock_getcpuclockid.c: Not needed anymore. - - * sysdeps/generic/dl-sysdep.c: Initialize _dl_cpuclock_offset to move - it into data section. - - * sysdeps/unix/i386/i586/clock_getres.c: Removed. - * sysdeps/unix/i386/i586/clock_gettime.c: Removed. - * sysdeps/unix/i386/i586/clock_nanosleep.c: Removed. - * sysdeps/unix/i386/i586/clock_settime.c: Removed. - * sysdeps/unix/i386/i586/cpuclock-init.h: Removed. - * sysdeps/generic/cpuclock-init.h: Removed. - * sysdeps/unix/i386/i686/Implies: Removed. - * sysdeps/unix/i386/i686/tempname.c: Removed. - * sysdeps/i386/i686/Versions: New file. - * sysdeps/unix/i386/i586/Versions: Removed. - - * sysdeps/posix/clock_getres.c: If HP_TIMING_AVAIL is nonzero handle - CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID. - * sysdeps/unix/clock_gettime.c: Likewise. - * sysdeps/unix/clock_nanosleep.c: Likewise. - * sysdeps/unix/clock_settime.c: Likewise. - * sysdeps/posix/tempname.c: Is HP_TIMING_AVAIL is nonzero define - RANDOM_BITS use CPU clock. - - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/bits/time.h: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/bits/time.h: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/time.h: New file. - * sysdeps/sparc/Versions: New file. - - * elf/dl-support.c: Don't use cpuclock-init.h definitions, use - hp-timing.h definitions. - * sysdeps/generic/dl-sysdep.c: Likewise. - - * include/libc-internal.h: Include hp-timing.h. Use hp_timing_t in - __get_clockfreq prototype. - - * sysdeps/unix/sysv/linux/i386/get_clockfreq.c (__get_clockfreq): - Use hp_timing_t type. - * sysdeps/generic/get_clockfreq.c (__get_clockfreq): Likewise. - - * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c: New file. - - * sysdeps/posix/pathconf.c (__pathconf): For _PC_ASYNC_IO test - whether named file is a regular file or a block device. - * sysdeps/posix/fpathconf.c (__fpathconf): Likewise. - -2001-04-23 Andreas Jaeger - - * nscd/nscd.h: Add noreturn attribute for start_threads. - -2001-04-22 Ulrich Drepper - - * posix/getconf.c: Fix names of XBS5 LFS test variables. - Add missing configuration variables from XPG6. - * posix/tst-getconf.c: New file. - * posix/Makefile (generated): Add tst-getconf.out. - (tests): Add ($objpfx)tst-getconf.out. - Add rule to run tst-getconf.sh. - * sysdeps/generic/bits/confname.h: Add missing _PC_ and _SC_ values - from XPG6. - * sysdeps/posix/fpathconf.c: Add handling of _PC_ALLOC_SIZE_MIN and - _PC_SYMLINK_MAX. - * sysdeps/posix/pathconf.c: Likewise. - * sysdeps/posix/sysconf.c: Correct spelling of _SC_MULTI_PROCESS - and _SC_SYMLOOP_MAX. - -2001-04-22 Philip Blundell - - * sysdeps/arm/fpu/feenablxcpt.c: New file. - * sysdeps/arm/fpu/fedisablxcpt.c: New file. - * sysdeps/arm/fpu/fegetexcpt.c: New file. - -2001-04-22 Philip Blundell - - * sysdeps/unix/sysv/linux/arm/sys/user.h (struct user_fpregs): - Renamed from struct user_fp. - (struct user_regs): New. - (struct user): Use struct user_regs rather than struct pt_regs to - avoid dependency on asm/ptrace.h. Use struct user_fpregs in place - of struct user_fp and struct user_fp_struct. - * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include sys/procfs.h - not sys/elf.h. - -2001-04-22 Philip Blundell - - * sysdeps/unix/sysv/linux/arm/sys/elf.h: Move contents to - sys/procfs.h, and tell the user to include that file instead. - * sysdeps/unix/sysv/linux/arm/sys/procfs.h: Remove old cruft - surrounded with #if 0. - (elf_greg_t, ELF_NGREG, elf_gregset_t, elf_fpregset_t): Moved here - from sys/elf.h. - (prgregset_t, prfpregset_t): Define in terms of elf_gregset_t and - elf_fpregset_t respectively. - -2001-04-22 Philip Blundell - - * sysdeps/unix/sysv/linux/arm/register-dump.h: Also print the - address that faulted. - -2001-04-21 Ulrich Drepper - - * sysdeps/generic/bits/confname.h: Add _SC_V6_* and _CS_POSIX_V6_* - values. - * sysdeps/generic/bits/environments.h: Define _POSIX_V6_* values. - * posix/confstr.c: Handle _CS_POSIX_V6_* values. - * posix/getconf.c: Handle _CS_POSIX_V6_* and _SC_V6_* values. - * sysdeps/posix/sysconf.c: Handle _SC_V6_* values. - - * sysdeps/powerpc/fpu/libm-test-ulps: Add deltas for atan2f. - * sysdeps/s390/fpu/libm-test-ulps: Likewise. - * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. - * sysdeps/mips/fpu/libm-test-ulps: Likewise. - -2001-04-21 Franz Sirl - - * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correct check for invalid - offset. - -2001-04-21 Ulrich Drepper - - * posix/getopt.h: Treat __cplusplus like __STDC__. - -2001-04-20 John S. Marvin - - * sysdeps/unix/sysv/linux/hppa/clone.S: Fix clone system call - entry point stub. - -2001-04-20 Richard Hirst - - * elf/elf.h: Corrected R_PARISC_DIR14R (should be 6, not 5), - and added R_PARISC_DPREL21L and R_PARISC_DPREL14R for modutils. - - * sysdeps/unix/sysv/linux/hppa/syscalls.list: Removed ptrace - entry so the ptrace.c wrapper is used. - -2001-04-20 Alan Modra - - * sysdeps/hppa/dl-lookupcfg.h (_dl_function_address): Prototype. - (DL_FUNCTION_ADDRESS): Define. - (DL_DT_INIT_ADDRESS): Define. - (DL_DT_FINI_ADDRESS): Define. - * sysdeps/hppa/Versions: Add _dl_function_address. - * sysdeps/hppa/dl-machine.h (ELF_MACHINE_START_ADDRESS): Define. - * sysdeps/hppa/dl-symaddr.c (_dl_start_address): Rename to - _dl_function_address. - -2001-04-21 Andreas Jaeger - - * rt/aio_misc.c (handle_fildes_io): Add noreturn attribute. - * resolv/gai_misc.c (handle_requests): Likewise. - * malloc/obstack.c (print_and_abort): Likewise. - * malloc/mcheck.c (mabort): Likewise. - - * sysdeps/unix/i386/i586/clock_settime.c: Include - "libc-internal.h" for __get_clockfreq declaration. - -2001-04-21 Ulrich Drepper - - * elf/dl-support.c: Include cpuclock-init.h. Use CPUCLOCK_VARDEF and - CPUCLOCK_INIT if defined. - * sysdeps/generic/dl-sysdep.c: Likewise. - * sysdeps/generic/cpuclock-init.h: New file. - * sysdeps/unix/i386/i586/cpuclock-init.h: New file. - * sysdeps/unix/i386/i586/Versions: New file. - * sysdeps/unix/i386/i586/clock_settime.c: New file. - * sysdeps/unix/i386/i586/clock_gettime.c: Handle thread CPU clock - separately by calling __pthread_clock_gettime if this function is - available. Subtract offset from tsc value before computing time value. - -2001-04-20 Ulrich Drepper - - * iconv/iconv_prog.c (print_known_names): If printing goes not to - a tty print in a more machine-friendly way. - - * sysdeps/ieee754/ldbl-128/e_asinl.c: New file. - Contributed by Stephen L Moshier . - -2001-04-20 Andreas Jaeger - - * intl/Makefile (tests): Reorder conditions, tst-gettext needs msgfmt. - -2001-04-20 Andreas Schwab - - * sysdeps/m68k/fpu/libm-test-ulps: Update. - -2001-04-19 Alan Modra - - * Makerules (libc_pic.os): Add $(LDFLAGS-c_pic.os). - * sysdeps/hppa/Makefile (LDFLAGS-c_pic.os): Define. - (CFLAGS-.os): Remove. - - * sysdeps/unix/sysv/linux/hppa/sysdep.h (CALL_MCOUNT): Update comment. - - * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (NGREG, NFPREG, - gregset): Correct for new kernel definitions. - -2001-04-19 Alan Modra - - * sysdeps/hppa/elf/initfini.c: Change dlt reg save to r3 and - generate unwind info by hand. - -2001-04-19 Ulrich Drepper - - * sysdeps/unix/sysv/linux/powerpc/mmap64.c (__mmap64): Optimize a bit. - - * configure.in: Correct regular expression for msgfmt. - Patch by Bruno Haible . - -2001-04-19 Andreas Jaeger - - * po/el.po: Add comment explaining what's broken. - - * po/Makefile (BROKEN_LINGUAS): New. - (ALL_LINGUAS): Don't add broken languages. - -2001-04-19 Roland McGrath - - * sysdeps/mach/hurd/mlock.c: New file. - * sysdeps/mach/hurd/munlock.c: New file. - * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_MEMLOCK_RANGE): Define it. - - * misc/Makefile (routines): Add mlock munlock mlockall munlockall. - * sysdeps/generic/mlock.c: New file. - * sysdeps/generic/munlock.c: New file. - * sysdeps/generic/mlockall.c: New file. - * sysdeps/generic/munlockall.c: New file. - * sysdeps/generic/bits/mman.h (MCL_CURRENT, MCL_FUTURE): New macros. - * sysdeps/unix/sysv/linux/syscalls.list (mlock, munlock, - mlockall, munlockall): Change caller field to - from EXTRA. - Don't use __ names; not used (and not declared in include/sys/mman.h). - - * hurd/privports.c (__get_privileged_ports): Renamed with __. - Use __ names for calls we make. - (get_privileged_ports): Add alias. - * hurd/hurd.h: Declare it with the __ name. - * sysdeps/mach/hurd/reboot.c (reboot): Use __get_privileged_ports. - * sysdeps/mach/hurd/adjtime.c (__adjtime): Likewise. - * sysdeps/mach/hurd/settimeofday.c (__settimeofday): Likewise. - - * hurd/hurdsig.c (write_corefile): Check RLIMIT_CORE limit and do - nothing if it's zero. - -2001-04-19 Matthew Wilcox - - * sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): - Change to return a signed result for compatibility with other - architectures, and correctness. - -2001-04-19 Ulrich Drepper - - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_32BITUIDS): - HPPA always had them. Patch by Matthew Wilcox . - -2001-04-19 Andreas Jaeger - - * configure.in: Require gettext 0.10.36 or newer. - - * manual/install.texi (Tools for Compilation): Mention gettext 0.10.36. - - * po/zh_TW.po: Remove extraneous backslashes. - - * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Remove unused - variables b and n. - -2001-04-18 Jakub Jelinek - - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. - * sysdeps/unix/sysv/linux/sparc/sparc64/makecontext.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/swapcontext.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S (__setcontext): - Copy first word of uc_sigmask into __uc_sigmask. - * sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S (__getcontext): - Save uc_link around trap. Copy __uc_sigmask into first word of - uc_sigmask, clear the rest. Make sure setcontext to the created - context doesn't do this though. - * sysdeps/unix/sysv/linux/sparc/sparc64/ucontext_i.h: New file. - * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (ucontext_t): Add - uc_stack and uc_sigmask, rename old uc_sigmask to __uc_sigmask in the - 64bit version, make uc_sigmask __sigset_t in the 32bit version. - -2001-04-19 Andreas Jaeger - - * sysdeps/unix/sysv/linux/hppa/umount.c: Fix typos in last patch. - - * rt/Makefile (otherlibs): Added for static NSS. - - * glibcbug.in (BUGGLIBC): Send to new alias. - -2001-04-02 Andreas Schwab - - * Makerules (build-module): Make sure exit codes get checked - properly and remove unnecessary slashes. - -2001-04-17 Ulrich Drepper - - * sysdeps/unix/sysv/linux/i386/get_clockfreq.c (__get_clockfreq): - Handle kernels which report only three digits after the decimal point. - Reported by Van Okamura . - - * sysdeps/alpha/fpu/libm-test-ulps: Adjust error values for atan2f. - -2001-04-17 David S. Miller - - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update for new atan2 tests. - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. - -2001-04-17 Jakub Jelinek - - * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Make sure - desired exceptions are raised for exceptional values. - * math/libm-test.inc (acosh_test, atan_test, atan2_test, cacos_test, - cacosh_test, casin_test, casinh_test, catan_test, catanh_test, - clog_test, log_test, log1p_test, tan_test): Increase precision of - expected values to satisfy ldbl-128. - * sysdeps/alpha/fpu/libm-test-ulps: Adjust accordingly. - * sysdeps/arm/libm-test-ulps: Likewise. - * sysdeps/i386/fpu/libm-test-ulps: Likewise. - * sysdeps/ia64/fpu/libm-test-ulps: Likewise. - * sysdeps/m68k/fpu/libm-test-ulps: Likewise. - * sysdeps/mips/fpu/libm-test-ulps: Likewise. - * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. - * sysdeps/s390/fpu/libm-test-ulps: Likewise. - * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. - -2001-04-17 Andreas Jaeger - - * configure.in: Move test for critical programs up. - -2001-04-16 Stephen L Moshier - - * sysdeps/ieee754/flt-32/e_asinf.c (pio2_hi, pio2_lo, pio4_hi): - Correct the values. - (pSx, qSx): Replace by shorter approximation. - Use f suffix on float constants. - -2001-04-16 Ulrich Drepper - - * sysdeps/ieee754/ldbl-128/k_tanl.c: New file. - Contributed by Stephen L Moshier . - - * string/string.h: Replace const in attribute list with __const__. - -2001-04-16 Roland McGrath - - * grp/initgroups.c (initgroups) [NGROUPS_MAX != 0]: Always use sysconf - instead of the constant NGROUPS_MAX. That way, the limit can be - raised in the kernel configuration without having to recompile libc. - - * sysdeps/posix/euidaccess.c: Don't #include or try to - define NGROUPS_MAX; we don't use it here. - -2001-04-16 Andreas Jaeger - - * math/libm-test.inc (atan2_test): Add more testcases. - - * iconv/gconv_db.c: Include gconv_charset.h for - __gconv_lookup_alias prototype. - -2001-04-13 Ulrich Drepper - - * sysdeps/ieee754/ldbl-128/s_atanl.c: New file. - Contributed by Stephen L Moshier . - -2001-04-13 Jes Sorensen - - * intl/tst-codeset.c: Include string.h to get prototype for strcmp(). - -2001-04-13 Jes Sorensen - - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Add __pad0 to - explicitly pad struct siginfo instead of relying on compiler padding. - -2001-04-12 Ulrich Drepper - - * sysdeps/ia64/Dist: Add elf/entry.h. - - * iconvdata/Makefile (distribute): Add TESTS2. - -2001-04-13 Jakub Jelinek - - * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_load_address): - Calculate load address differently. - -2001-04-12 Bruno Haible - - * iconvdata/TESTS2: New file. - * iconvdata/run-iconv-test.sh: Also run tests from TESTS2. - * iconvdata/testdata/alfabeta..UTF-8: New file. - * iconvdata/testdata/alfabeta..UTF-16.BE: New file. - * iconvdata/testdata/alfabeta..UTF-16.LE: New file. - * iconvdata/testdata/alfabeta..UTF-32.BE: New file. - * iconvdata/testdata/alfabeta..UTF-32.LE: New file. - -2001-04-11 Bruno Haible - - * iconvdata/utf-32.c: New file. - * iconvdata/gconv-modules: Add entries for UTF-32, UTF-32LE, UTF-32BE. - * iconvdata/Makefile (modules): Add UTF-32. - (distribute): Add utf-32.c. - -2001-04-11 Bruno Haible - - * iconvdata/utf-16.c (PREPARE_LOOP): Initialize 'swap' after possibly - changing it in the state. After incrementing 'inptr', store it back. - * iconvdata/unicode.c (PREPARE_LOOP): After incrementing 'inptr', - store it back. - -2001-04-11 Bruno Haible - - * iconvdata/utf-16.c (gconv_init): Use MAX_NEEDED_FROM, not - MIN_NEEDED_FROM. - -2001-04-11 David Mosberger - - * sysdeps/ia64/htonl.S: Drop superfluous "alloc". - * sysdeps/ia64/htons.S: Likewise. - - * sysdeps/ia64/memset.S: Add unwind directives. - * sysdeps/ia64/strncpy.S: Likewise. - * sysdeps/ia64/strcat.S: Likewise. - - * sysdeps/ia64/memccpy.S: Add unwind directives. Drop superfluous - restore of ar.pfs. - * sysdeps/ia64/strchr.S: Likewise. - * sysdeps/ia64/memmove.S: Likewise. - * sysdeps/ia64/memcpy.S: Likewise. - * sysdeps/ia64/memcmp.S: Likewise. - * sysdeps/ia64/memchr.S: Likewise. - * sysdeps/ia64/strcmp.S: Likewise. - * sysdeps/ia64/strlen.S: Likewise. - * sysdeps/ia64/strcpy.S: Likewise. - * sysdeps/ia64/strncmp.S: Likewise. - -2001-04-11 Jakub Jelinek - - * wcsmbs/wchar.h (fgetwc, getwc, getwchar, fputwc, putwc, putwchar, - fgetws, fputws, ungetwc, getwc_unlocked, getwchar_unlocked, - fgetwc_unlocked, fputwc_unlocked, putwc_unlocked, putwchar_unlocked, - fgetws_unlocked, fputws_unlocked, wcsftime): Add __THROW. - -2001-04-11 Andreas Jaeger - - * sysdeps/mips/elf/start.S [__ASSEMBLY__]: Define it. - -2001-04-11 Andreas Schwab - - * sysdeps/m68k/fpu/libm-test-ulps: Adjusted. - -2001-04-11 Ulrich Drepper - - * sysdeps/arm/stackinfo.h: New file. - -2001-04-08 Thorsten Kukuk - - * sunrpc/rpc_main.c: If we compile RPC thread safe, allow - rpcgen to generate thread safe code. - -2001-04-10 Andreas Jaeger - - * math/test-fenv.c (initial_tests): Protect FE_TONEAREST declaration. - -2001-04-10 Ulrich Drepper - - * elf/dl-minimal.c (__assert_fail): Change error string. It's - most of the time no bug in ld.so. - (__assert_perror_fail): Likewise. - -2001-04-11 Hans-Peter Nilsson - - * sysdeps/generic/bits/fenv.h (fexcept_t): Change default type - from struct to unsigned int. - -2001-04-10 Franz Sirl - - * elf/elf.h (AT_DCACHEBSIZE, AT_ICACHEBSIZE, AT_UCACHEBSIZE, - AT_IGNOREPPC): New defines. - * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Print them. - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_STD_AUXV): - Define for newer powerpc kernels. - * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Use the standard - DL_FIND_ARG_COMPONENTS if __ASSUME_STD_AUXV is defined. - -2000-4-10 kaz Kojima - - * sysdeps/sh/stackinfo.h: New file. - -2001-04-10 Ulrich Drepper - - * locale/tst-C-locale.c (run_test): Add tests for locale objects. - * locale/newlocale.c (__newlocale): Correct setting __ctype_b, - __ctype_tolower, and __ctype_toupper elements. - - * ctype/ctype_l.c: Fix definitions of __tolower_l and __toupper_l. - Reported by Konstantin Osipov . - - * sysdeps/i386/fpu/libm-test-ulps: Add deltas for tgamma to help - the lousy AMD FPU. - -2001-04-10 Franz Sirl - - * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: New file. - * sysdeps/unix/sysv/linux/powerpc/Dist: Add sys/ptrace.h. - * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Delete wrong stuff. - * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: Correct typedefs. - -2001-04-10 Ulrich Drepper + * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise. - * elf/dl-deps.c (_dl_map_object_deps): Provide complete error - message. Based on a patch by HJ Lu. +2001-09-25 Ulrich Drepper -2001-04-10 Andreas Schwab + * iconvdata/TESTS: Add entries for IBM1160 and IBM1161. + * iconvdata/testdata/IBM1160: New file. + * iconvdata/testdata/IBM1160..UTF8: New file. + * iconvdata/testdata/IBM1161: New file. + * iconvdata/testdata/IBM1161..UTF8: New file. + Patch by Masahide Washizawa . - * math/libm-test.inc (csinh_test): Don't require the invalid - exception for csinh (x + iNaN), but make it optional. +2001-09-24 Ulrich Drepper -2001-04-09 David Mosberger + * sysdeps/unix/bsd/ulimit.c (ulimit): Handle overflow in + UL_SETFSIZE computations better. - * sysdeps/ia64/elf/start.S (_start): Add unwind directives. + * rt/Makefile: Remove use of filter for librt again. - * sysdeps/generic/entry.h [!__ASSEMBLY__]: Declare _start. - * sysdeps/ia64/elf/entry.h: New file. - * sysdeps/unix/sysv/linux/mips/entry.h [!__ASSEMBLY__]: Declare - __start. - * elf/rtld.c: Don't declare ENTRY_POINT. Use ENTRY_POINT instead - of &ENTRY_POINT. - * sysdeps/generic/dl-sysdep.c: Likewise. - * sysdeps/mach/hurd/dl-sysdep.c: Likewise. - * sysdeps/ia64/elf/start.S: Save base address of register backing - store in __libc_ia64_register_backing_store_base. + * sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Handle overflow in + UL_SETFSIZE computations better. -2001-04-10 Martin Schwidefsky + * string/Versions: Export __strsep for GLIBC_2.2.5. + * string/bits/string2.h: Define all __STRING_INLINE functions if + _FORCE_INLINES is defined. + Use int instead of char of parameter types. + (__strsep): Don't use __strsep_g. Don't define it. + (__strsep_1c, __strsep_2c, __strsep_3c): Optimize. + * sysdeps/i386/i486/string.h (__strcpy_a_small): Renamed from + __strcpy_small. + (__stpcpy_a_small): Renamed from __stpcpy_small. + (__strcspn_c1): Don't define if _FORCE_INLINES. + (__strspn_c1): Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Fix return - value of getcontext. - * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: Fix return - value of setcontext. - * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/s390/swapcontext.c: Skip setcontext - call by changing the saved context. +2001-09-22 Ben Collins -2001-04-10 Ulrich Drepper + * sysdeps/sparc/bits/sigaction.h: Define SA_RESTART and friends when + _UNIX98_SOURCE is defined too. Matches generic/bits/sigaction.h. + * sysdeps/ia64/bits/sigaction.h: Likewise. + * sysdeps/s390/s390-64/bits/sigaction.h: Likewise. - * sysdeps/alpha/stackinfo.h: New file. - * sysdeps/ia64/stackinfo.h: New file. +2001-09-24 Andrew Haley -2001-04-10 Andreas Schwab + * sysdeps/unix/sysv/linux/sh/Makefile (sysdep_headers): Add sys/io.h. - * sysdeps/m68k/fpu/e_pow.c: Correct handling of some exceptional - values. - * sysdeps/m68k/fpu/e_scalb.c: Likewise. +2001-09-24 Jakub Jelinek -2001-04-09 Ulrich Drepper + * elf/dl-open.c (dl_open_worker): Update l_scope_max. - * sysdeps/sparc/sparc32/sparcv9/Dist: Add hp-timing.c. - * sysdeps/sparc/sparc64/Dist: Add hp-timing.c. +2001-09-24 Ulrich Drepper - * libio/Makefile (distribute): Add fd_to_filename.h. + * wcsmbs/wchar.h: Add __attribute_pure__ to mbsinit prototype. -2001-04-05 David S. Miller +2001-09-20 H.J. Lu - Add hp-timing support for sparcv9/sparc64 targets. - * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: New file - * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: New file - * sysdeps/sparc/sparc64/hp-timing.c: New file - * sysdeps/sparc/sparc64/hp-timing.h: New file - * sysdeps/sparc/sparc32/sparcv9/Makefile: Build hp-timing. - * sysdeps/sparc/sparc64/Makefile: Likewise. + * include/dlfcn.h (__RTLD_SPROF): New definiton. + * elf/dl-open.c (dl_open_worker): Return immediately after loading + for __RTLD_SPROF. + * elf/sprof.c (main): Default to the filename if soname doesn't exist. + (load_shobj): Call dlopen with `RTLD_LAZY | __RTLD_SPROF'. -2001-04-09 Jakub Jelinek +2001-09-20 H.J. Lu - * sysdeps/generic/fd_to_filename.h: New file. - * sysdeps/unix/sysv/linux/fd_to_filename.h: New file. - * libio/freopen.c (freopen): If FILENAME is NULL, try to get - filename from the open file descriptor. - * libio/freopen64.c (freopen64): Likewise. + * elf/dl-profile.c (_dl_mcount): Use old *narcsp value for newarc, + don't add 1. -2001-04-09 Bruno Haible +2001-09-22 Ulrich Drepper - * misc/error.c (error): fflush stdout also if - error_print_progname != NULL. - (error_at_line): Likewise. + * nss/getent.c: Accept -s parameter to overwrite rules in + nsswitch.conf. Patch by Nalin Dahyabhai . -2001-04-07 Bruno Haible + * nss/nss_files/files-network.c (LINE_PARSER): Pad addr string + with as many ".0" as necessary to form a complete address + inet_network understands. - * intl/gettextP.h (struct loaded_domain): Add codeset_cntr field. - (struct binding): Add codeset_cntr field. - (_nl_load_domain): Add domainbinding argument. - (_nl_init_domain_conv, _nl_free_domain_conv): New declarations. - (_nl_find_msg): New declaration, moved here from loadinfo.h. - * intl/loadinfo.h (struct loaded_l10nfile): Remove domainbinding field. - (_nl_make_l10nflist): Remove domainbinding argument. - (_nl_find_msg): Move declaration to gettextP.h. - * intl/bindtextdom.c (set_binding_values): Initialize ->codeset_cntr - to 0. Increment it when ->codeset is changed. - * intl/dcigettext.c (DCIGETTEXT): Pass binding to _nl_find_msg. - (_nl_find_msg): Add domainbinding argument. Reinitialize the converter - if domainbinding->codeset_cntr has been incremented. - * intl/finddomain.c (_nl_find_domain): Don't pass domainbinding to - _nl_make_l10nflist(). Pass it to _nl_load_domain() instead. - * intl/l10nflist.c (_nl_make_l10nflist): Remove domainbinding argument. - * intl/loadmsgcat.c (_nl_init_domain_conv): New function, extracted - from _nl_load_domain. Append //TRANSLIT also when using libiconv. - (_nl_free_domain_conv): New function, extracted from _nl_unload_domain. - (_nl_load_domain): Add domainbinding argument. Call - _nl_init_domain_conv. - (_nl_unload_domain): Call _nl_free_domain_conv. - * intl/Makefile (distribute): Add tst-codeset.sh, tstcodeset.po. - (test-srcs): Add tst-codeset. - (tests): Depend on tst-codeset.out. - (tst-codeset.out): New rule. - (CFLAGS-tst-codeset.c): New variable. - * intl/tst-codeset.sh: New file. - * intl/tstcodeset.po: New file. - * intl/tst-codeset.c: New file. - * locale/findlocale.c (_nl_find_locale): Update _nl_make_l10nflist + * nss/getent.c: Various cleanups. Use simpler and fewer function calls. -2001-04-07 Roland McGrath - - * mach/msgserver.c (__mach_msg_server_timeout): Add an assert. - -2001-03-31 Roland McGrath - - * sysdeps/mach/hurd/fork.c: Skip NEWPROC just like NEWTASK when - copying send rights into child. When we hit our name for our proc - port, just copy NEWPROC directly instead of repeating proc_task2proc - to install the child's port. - -2001-04-08 Roland McGrath - - * Makeconfig ($(common-objpfx)soversions.i): Grok entries with DEFAULT - in second column, to provide default values for third column. - * shlib-versions: Add comments about using DEFAULT in second column. - (s390x-.*-linux.*): Replace individual entries with a DEFAULT entry. - (cris-.*-linux.*): Likewise. - -2001-04-09 Ulrich Drepper - - * Makefile (distribute): Add scripts/documented.sh. - * scripts/documented.sh: New file. - -2001-04-08 Hans-Peter Nilsson - - * sysdeps/unix/sysv/linux/cris/Dist: New file. - * sysdeps/unix/sysv/linux/cris/Makefile: New file. - * sysdeps/unix/sysv/linux/cris/_G_config.h: New file. - * sysdeps/unix/sysv/linux/cris/bits/fcntl.h: New file. - * sysdeps/unix/sysv/linux/cris/bits/mman.h: New file. - * sysdeps/unix/sysv/linux/cris/bits/resource.h: New file. - * sysdeps/unix/sysv/linux/cris/brk.c: New file. - * sysdeps/unix/sysv/linux/cris/chown.c: New file. - * sysdeps/unix/sysv/linux/cris/clone.S: New file. - * sysdeps/unix/sysv/linux/cris/fchown.c: New file. - * sysdeps/unix/sysv/linux/cris/fcntl.c: New file. - * sysdeps/unix/sysv/linux/cris/fxstat.c: New file. - * sysdeps/unix/sysv/linux/cris/getegid.c: New file. - * sysdeps/unix/sysv/linux/cris/geteuid.c: New file. - * sysdeps/unix/sysv/linux/cris/getgid.c: New file. - * sysdeps/unix/sysv/linux/cris/getgroups.c: New file. - * sysdeps/unix/sysv/linux/cris/getresgid.c: New file. - * sysdeps/unix/sysv/linux/cris/getresuid.c: New file. - * sysdeps/unix/sysv/linux/cris/getrlimit.c: New file. - * sysdeps/unix/sysv/linux/cris/getrlimit64.c: New file. - * sysdeps/unix/sysv/linux/cris/getuid.c: New file. - * sysdeps/unix/sysv/linux/cris/lchown.c: New file. - * sysdeps/unix/sysv/linux/cris/lockf64.c: New file. - * sysdeps/unix/sysv/linux/cris/lxstat.c: New file. - * sysdeps/unix/sysv/linux/cris/mmap.S: New file. - * sysdeps/unix/sysv/linux/cris/mmap64.S: New file. - * sysdeps/unix/sysv/linux/cris/msgctl.c: New file. - * sysdeps/unix/sysv/linux/cris/profil-counter.h: New file. - * sysdeps/unix/sysv/linux/cris/register-dump.h: New file. - * sysdeps/unix/sysv/linux/cris/semctl.c: New file. - * sysdeps/unix/sysv/linux/cris/setegid.c: New file. - * sysdeps/unix/sysv/linux/cris/seteuid.c: New file. - * sysdeps/unix/sysv/linux/cris/setfsgid.c: New file. - * sysdeps/unix/sysv/linux/cris/setfsuid.c: New file. - * sysdeps/unix/sysv/linux/cris/setgid.c: New file. - * sysdeps/unix/sysv/linux/cris/setgroups.c: New file. - * sysdeps/unix/sysv/linux/cris/setregid.c: New file. - * sysdeps/unix/sysv/linux/cris/setresgid.c: New file. - * sysdeps/unix/sysv/linux/cris/setresuid.c: New file. - * sysdeps/unix/sysv/linux/cris/setreuid.c: New file. - * sysdeps/unix/sysv/linux/cris/setrlimit.c: New file. - * sysdeps/unix/sysv/linux/cris/setuid.c: New file. - * sysdeps/unix/sysv/linux/cris/shmctl.c: New file. - * sysdeps/unix/sysv/linux/cris/socket.S: New file. - * sysdeps/unix/sysv/linux/cris/sys/ucontext.h: New file. - * sysdeps/unix/sysv/linux/cris/syscall.S: New file. - * sysdeps/unix/sysv/linux/cris/sysdep.S: New file. - * sysdeps/unix/sysv/linux/cris/sysdep.h: New file. - * sysdeps/unix/sysv/linux/cris/vfork.S: New file. - * sysdeps/unix/sysv/linux/cris/xstat.c: New file. - -2001-04-08 Hans-Peter Nilsson - - * sysdeps/cris/Dist: New file. - * sysdeps/cris/Implies: New file. - * sysdeps/cris/Makefile: New file. - * sysdeps/cris/__longjmp.S: New file. - * sysdeps/cris/_mcount.S: New file. - * sysdeps/cris/bits/endian.h: New file. - * sysdeps/cris/bits/setjmp.h: New file. - * sysdeps/cris/bits/string.h: New file. - * sysdeps/cris/dl-machine.h: New file. - * sysdeps/cris/elf/start.S: New file. - * sysdeps/cris/machine-gmon.h: New file. - * sysdeps/cris/memcopy.h: New file. - * sysdeps/cris/memusage.h: New file. - * sysdeps/cris/setjmp.S: New file. - * sysdeps/cris/sysdep.h: New file. - * sysdeps/cris/wordcopy.c: New file. - -2001-04-08 Hans-Peter Nilsson - - * elf/elf.h: Add new relocations for CRIS. - -2001-04-08 Hans-Peter Nilsson - - * shlib-versions: Add cases for Linux on CRIS. - -2001-04-08 Hans-Peter Nilsson - - * configure.in (ASM_LINE_SEP tests): Handle CRIS assembly, with - ';' for comments and '@' for line separator. - -2001-04-08 Hans-Peter Nilsson - - * sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): Fix - typo; s/==/=/ for assignment. - -2001-04-08 Hans-Peter Nilsson - - * malloc/Makefile: Correct comment; mtrace is Perl, not AWK. - -2001-04-08 Hans-Peter Nilsson - - * iconv/gconv_simple.c (internal_ucs4_loop_unaligned): Check for - empty input before checking full output. - -2001-04-08 Hans-Peter Nilsson - - * iconv/gconv.c (__gconv): Don't derefer parameter cd before - checking if == -1L. - -2001-04-08 Ulrich Drepper - - * inet/rexec.c (rexec_af): Avoid calling perror with errno being set. - -2001-04-07 Stephen L Moshier - - * sysdeps/ieee754/ldbl-128/e_logl.c: Correct infinity and NaN - return values. - -2001-04-07 Ulrich Drepper - - * stdlib/tst-setcontext.c (main): Add a test for setcontext. - - * sysdeps/unix/sysv/linux/i386/getcontext.S: New file. - * sysdeps/unix/sysv/linux/i386/setcontext.S: New file. - * sysdeps/unix/sysv/linux/i386/makecontext.S: New file. - * sysdeps/unix/sysv/linux/i386/swapcontext.S: New file. - * sysdeps/unix/sysv/linux/i386/ucontext_i.h: New file. - * sysdeps/unix/sysv/linux/i386/Dist: Add ucontext_i.h. - -2001-04-07 Andreas Jaeger - - * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_y1l): Use sincos - instead of separate sin and cos. - (__ieee754_j1l): Likewise. - -2001-04-06 Ulrich Drepper - - * sysdeps/ia64/abort-instr.h: New file. Code by David Mosberger. - - * sysdeps/ia64/atomicity.h: New file. Copied from libstdc++. - - * sysdeps/i386/i486/atomicity.h: Clean up the asms. - - * sysdeps/generic/e_scalb.c: Don't use FE_INVALID unless it's - available. - * sysdeps/generic/e_scalbf.c: Likewise. - * sysdeps/generic/e_scalbl.c: Likewise. - Patch by Mark Hatle . - -2001-04-05 David S. Miller - - * sysdeps/sparc/abort-instr.h: New file. - -2001-04-05 Matt Wilson - - * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): - added code to parse new 2.4 format. - (GET_NPROCS_CONF_PARSER): Likewise. - -2001-04-05 David S. Miller - - * scripts/config.sub: Recognize sparcv9b like sparcv9. - * configure.in: Add sparcv9b. - * sysdeps/sparc/sparc32/sparcv9b/Implies: New file - * sysdeps/sparc/sparc32/sparcv9b/memcpy.S: New file - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: New file - -2001-04-06 David Mosberger - - * stdlib/tst-setcontext.c: Move st2[] to global scope. - (f2): Verify that stack pointer is inside st2[]. +2001-09-20 Martin Schwidefsky - * sysdeps/unix/sysv/linux/ia64/getcontext.S: It helps to save r12. - * sysdeps/unix/sysv/linux/ia64/setcontext.S: It helps to restore r12. + * sysdeps/s390/s390-32/bits/setjmp.h: Correct pointer comparison in + _JMPBUF_UNWINDS. + * sysdeps/s390/s390-64/bits/setjmp.h: Likewise. -2001-04-06 Ulrich Drepper +2001-09-22 Ulrich Drepper - * timezone/antarctica: Update from tzdata2001b. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/europe: Likewise. - * timezone/northamerica: Likewise. + * iconvdata/Makefile: Add rules to build and distribute IBM1160 and + IBM1161. + * iconvdata/gconv-modules: Add entries for IBM1160 and IBM1161. + * iconvdata/ibm1160.c: New file. + * iconvdata/ibm1160.h: New file. + * iconvdata/ibm1161.c: New file. + * iconvdata/ibm1161.h: New file. + Patch by Masahide Washizawa . - * iconv/iconv_open.c: Move strip and upstr definitions... - * iconv/gconv_charset.h: ...here. New file. - * iconv/gconv_db.c (once): Move to file level. - (do_lookup_alias): Split out from __gconv_find_transform. - (__gconv_find_transform): Call do_lookup_alias. - (__gconv_loopup_alias): New function. - * locale/langinfo.h: Define _NL_*_CODESET values for all categories - but LC_CTYPE. - * locale/categories.def: Add entries for new _NL_*_CODESET values. - * locale/C-ctype.c: Use _nl_C_codeset to initialize CODESET entry. - * locale/C-address.c: Initialize _NL_*_CODESET element. - * locale/C-collate.c: Likewise. - * locale/C-identification.c: Likewise. - * locale/C-measurement.c: Likewise. - * locale/C-messages.c: Likewise. - * locale/C-monetary.c: Likewise. - * locale/C-name.c: Likewise. - * locale/C-numeric.c: Likewise. - * locale/C-paper.c: Likewise. - * locale/C-telephone.c: Likewise. - * locale/C-time.c: Likewise. - * locale/localeinfo.h: Declare _nl_C_codeset. - * locale/C_name.c: Define _nl_C_codeset. - * locale/findlocale.c: Before accepting locale check that the used - charset does not conflict with what the locale name said. - * locale/programs/ld-address.c: Emit codeset information. - * locale/programs/ld-collate.c: Likewise. - * locale/programs/ld-identification.c: Likewise. - * locale/programs/ld-measurement.c: Likewise. - * locale/programs/ld-messages.c: Likewise. - * locale/programs/ld-monetary.c: Likewise. - * locale/programs/ld-name.c: Likewise. - * locale/programs/ld-numeric.c: Likewise. - * locale/programs/ld-paper.c: Likewise. - * locale/programs/ld-telephone.c: Likewise. - * locale/programs/ld-time.c: Likewise. +2001-09-19 Jakub Jelinek - * localedata/tests-mbwc/tst_funcs.h (TST_HEAD_LOCALE): It is an error - if the locale data couldn't be found. + * sysdeps/alpha/dl-machine.h (elf_machine_load_address): Compute the + difference between base address and first PT_LOAD's virtual address, + not the base address. - * string/Makefile: Define tst-strxfrm-ENV. +2001-09-11 Tom Rix - * ysdeps/unix/sysv/linux/ia64/getcontext.S: Fix comment. + * sysdeps/unix/sysv/aix/init-first.c (init): Use USE_NONONPTION_FLAG + ifdef for __getopt_clean_environment. + * sysdeps/unix/sysv/aix/libc-start.c: Add real implementation. -2001-04-06 Andreas Jaeger +2001-09-22 Andreas Jaeger - * include/sys/profil.h: New file. + * elf/reldep4.c (main): Add proper prototype to fix warning. - * dlfcn/modatexit.c: Add prototypes to silence GCC. - * dlfcn/modcxaatexit.c: Likewise. - * elf/globalmod1.c: Likewise. + * elf/reldep5.c (main): Remove unused variable. -2001-04-05 David S. Miller + * math/math_private.h: Add prototypes. - * elf/elf.h (HWCAP_SPARC_ULTRA3): Define it. - * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Add it to - capability flags table and HWCAP_IMPORTANT, increase - _DL_HWCAP_COUNT to 6. - * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. +2001-09-21 Andreas Jaeger -2001-04-04 David Mosberger + * sysdeps/unix/sysv/linux/x86_64/Dist: New file. + * sysdeps/x86_64/Dist: New file. + * sysdeps/x86_64/soft-fp/Dist: New file. - * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Fix - initialization of stack_end (bug reported by Zheng Gengbin - ). + * sysdeps/gnu/Dist: Remove eval.c. -2001-04-05 Ulrich Drepper +2001-09-20 Ulrich Drepper - * sysdeps/i386/fpu/libm-test-ulps: Relax errors for asinl. + * malloc/memusage.c (realloc): Don't count already allocated + memory in the sums. + (me): Always use dlsym() to find the real implementations. -2001-04-05 Martin Schwidefsky + * malloc/memusage.sh: Make -n option actually do something. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: New file. +2001-09-20 Andreas Jaeger -2001-04-05 Ulrich Drepper + * elf/elf.h (R_390_NUM): Correct value. - * sysdeps/ieee754/ldbl-96/e_asinl.c: Correct handling of +-Inf. - * sysdeps/i386/fpu/e_asinl.S: Removed. Too inaccurate. + * Versions.def: Add missing versions 2.2.3 for libthread_db and + libpthread. - * login/tst-utmp.c: Make file usable again in tst-utmpx.c. + * sysdeps/unix/sysv/linux/configure.in: Add minimal kernel version + for x86-64, install x86-64 into */lib64. -2001-04-04 Ulrich Drepper + * shlib-versions: Add x86-64. - * sysdeps/unix/sysv/aix/dl-libc.c: Don't use the ELF version, - define simple replacements here. Patch by Michael Keezer. + * elf/elf.h: Add x86-64 relocations. - * sysdeps/ieee754/ldbl-128/e_logl.c: New file. - * sysdeps/ieee754/ldbl-96/e_asinl.c: New file. - Contributed by Stephen L Moshier . +2001-09-19 Ulrich Drepper - * posix/fnmatch_loop.c: Undefine NEW_PATTERN when it is not used - anymore. + * po/fr.po: Update from translation team. -2001-04-01 Andreas Jaeger +2001-09-19 Andreas Jaeger - * sysdeps/generic/s_nextafter.c (NO_LONG_DOUBLE): Add nexttowardl - alias. + * sysdeps/unix/sysv/linux/x86_64/Makefile: New file. + * sysdeps/unix/sysv/linux/x86_64/Versions: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/mman.h: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/time.h: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/types.h: New file. + * sysdeps/unix/sysv/linux/x86_64/brk.c: New file. + * sysdeps/unix/sysv/linux/x86_64/clone.S: New file. + * sysdeps/unix/sysv/linux/x86_64/fstatfs64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/ftruncate64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/fxstat.c: New file. + * sysdeps/unix/sysv/linux/x86_64/fxstat64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/getdents.c: New file. + * sysdeps/unix/sysv/linux/x86_64/getdents64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/getrlimit64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: New file. + * sysdeps/unix/sysv/linux/x86_64/glob64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/lxstat.c: New file. + * sysdeps/unix/sysv/linux/x86_64/lxstat64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/mmap64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/pread64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/profil-counter.h: New file. + * sysdeps/unix/sysv/linux/x86_64/pwrite64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/readdir.c: New file. + * sysdeps/unix/sysv/linux/x86_64/readdir64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/readdir64_r.c: New file. + * sysdeps/unix/sysv/linux/x86_64/readdir_r.c: New file. + * sysdeps/unix/sysv/linux/x86_64/recv.c: New file. + * sysdeps/unix/sysv/linux/x86_64/register-dump.h: New file. + * sysdeps/unix/sysv/linux/x86_64/send.c: New file. + * sysdeps/unix/sysv/linux/x86_64/setrlimit64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/sigaction.c: New file. + * sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h: New file. + * sysdeps/unix/sysv/linux/x86_64/sigpending.c: New file. + * sysdeps/unix/sysv/linux/x86_64/sigprocmask.c: New file. + * sysdeps/unix/sysv/linux/x86_64/sigsuspend.c: New file. + * sysdeps/unix/sysv/linux/x86_64/statfs64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/sys/perm.h: New file. + * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h: New file. + * sysdeps/unix/sysv/linux/x86_64/sys/reg.h: New file. + * sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h: New file. + * sysdeps/unix/sysv/linux/x86_64/sys/user.h: New file. + * sysdeps/unix/sysv/linux/x86_64/syscall.S: New file. + * sysdeps/unix/sysv/linux/x86_64/syscalls.list: New file. + * sysdeps/unix/sysv/linux/x86_64/sysdep.S: New file. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: New file. + * sysdeps/unix/sysv/linux/x86_64/time.c: New file. + * sysdeps/unix/sysv/linux/x86_64/truncate64.c: New file. + * sysdeps/unix/sysv/linux/x86_64/umount.c: New file. + * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file. + * sysdeps/unix/sysv/linux/x86_64/xstat.c: New file. + * sysdeps/unix/sysv/linux/x86_64/xstat64.c: New file. + * sysdeps/unix/x86_64/sysdep.S: New file. + * sysdeps/unix/x86_64/sysdep.h: New file. + * sysdeps/x86_64/Implies: New file. + * sysdeps/x86_64/Makefile: New file. + * sysdeps/x86_64/Versions: New file. + * sysdeps/x86_64/__longjmp.S: New file. + * sysdeps/x86_64/abort-instr.h: New file. + * sysdeps/x86_64/atomicity.h: New file. + * sysdeps/x86_64/bits/endian.h: New file. + * sysdeps/x86_64/bits/setjmp.h: New file. + * sysdeps/x86_64/bits/string.h: New file. + * sysdeps/x86_64/bp-asm.h: New file. + * sysdeps/x86_64/bsd-_setjmp.S: New file. + * sysdeps/x86_64/bsd-setjmp.S: New file. + * sysdeps/x86_64/dl-machine.h: New file. + * sysdeps/x86_64/elf/initfini.c: New file. + * sysdeps/x86_64/elf/start.S: New file. + * sysdeps/x86_64/ffs.c: New file. + * sysdeps/x86_64/ffsll.c: New file. + * sysdeps/x86_64/fpu/bits/fenv.h: New file. + * sysdeps/x86_64/fpu/bits/mathdef.h: New file. + * sysdeps/x86_64/fpu/e_acosl.c: New file. + * sysdeps/x86_64/fpu/e_atan2l.c: New file. + * sysdeps/x86_64/fpu/e_exp2l.S: New file. + * sysdeps/x86_64/fpu/e_expl.c: New file. + * sysdeps/x86_64/fpu/e_fmodl.S: New file. + * sysdeps/x86_64/fpu/e_log10l.S: New file. + * sysdeps/x86_64/fpu/e_log2l.S: New file. + * sysdeps/x86_64/fpu/e_logl.S: New file. + * sysdeps/x86_64/fpu/e_powl.S: New file. + * sysdeps/x86_64/fpu/e_rem_pio2l.c: New file. + * sysdeps/x86_64/fpu/e_scalbl.S: New file. + * sysdeps/x86_64/fpu/e_sqrtl.c: New file. + * sysdeps/x86_64/fpu/fclrexcpt.c: New file. + * sysdeps/x86_64/fpu/fedisblxcpt.c: New file. + * sysdeps/x86_64/fpu/feenablxcpt.c: New file. + * sysdeps/x86_64/fpu/fegetenv.c: New file. + * sysdeps/x86_64/fpu/fegetexcept.c: New file. + * sysdeps/x86_64/fpu/fegetround.c: New file. + * sysdeps/x86_64/fpu/feholdexcpt.c: New file. + * sysdeps/x86_64/fpu/fesetenv.c: New file. + * sysdeps/x86_64/fpu/fesetround.c: New file. + * sysdeps/x86_64/fpu/fgetexcptflg.c: New file. + * sysdeps/x86_64/fpu/fraiseexcpt.c: New file. + * sysdeps/x86_64/fpu/fsetexcptflg.c: New file. + * sysdeps/x86_64/fpu/ftestexcept.c: New file. + * sysdeps/x86_64/fpu/libm-test-ulps: New file. + * sysdeps/x86_64/fpu/math_ldbl.h: New file. + * sysdeps/x86_64/fpu/printf_fphex.c: New file. + * sysdeps/x86_64/fpu/s_atanl.c: New file. + * sysdeps/x86_64/fpu/s_cosl.S: New file. + * sysdeps/x86_64/fpu/s_expm1l.S: New file. + * sysdeps/x86_64/fpu/s_fpclassifyl.c: New file. + * sysdeps/x86_64/fpu/s_isinfl.c: New file. + * sysdeps/x86_64/fpu/s_isnanl.c: New file. + * sysdeps/x86_64/fpu/s_log1pl.S: New file. + * sysdeps/x86_64/fpu/s_logbl.c: New file. + * sysdeps/x86_64/fpu/s_nextafterl.c: New file. + * sysdeps/x86_64/fpu/s_nexttoward.c: New file. + * sysdeps/x86_64/fpu/s_nexttowardf.c: New file. + * sysdeps/x86_64/fpu/s_rintl.c: New file. + * sysdeps/x86_64/fpu/s_significandl.c: New file. + * sysdeps/x86_64/fpu/s_sincosl.S: New file. + * sysdeps/x86_64/fpu/s_sinl.S: New file. + * sysdeps/x86_64/fpu/s_tanl.S: New file. + * sysdeps/x86_64/gmp-mparam.h: New file. + * sysdeps/x86_64/hp-timing.c: New file. + * sysdeps/x86_64/hp-timing.h: New file. + * sysdeps/x86_64/htonl.S: New file. + * sysdeps/x86_64/memusage.h: New file. + * sysdeps/x86_64/setjmp.S: New file. + * sysdeps/x86_64/soft-fp/sfp-machine.h: New file. + * sysdeps/x86_64/stackinfo.h: New file. + * sysdeps/x86_64/sysdep.h: New file. + * sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed: New file. - * sysdeps/generic/s_fma.c (NO_LONG_DOUBLE): Add fmal alias. + * sysdeps/ieee754/ldbl-128/s_erfl.c: New file, contributed Stephen + L Moshier. -2001-04-04 Ulrich Drepper +2001-09-18 Ulrich Drepper - * sysdeps/unix/sysv/linux/s390/s390-64/Dist: Add ucontext_i.h. - * sysdeps/unix/sysv/linux/s390/s390-32/Dist: Likewise. + * malloc/malloc.c (ptmalloc_init): Handle _environ==NULL. + Reported by B. D. Elliott [PR libc/2541]. -2001-04-04 Martin Schwidefsky +2001-09-18 Andreas Schwab - * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: New file. - * sysdeps/unix/sysv/linux/s390/swapcontext.c: New file. + * elf/dl-load.c (_dl_map_object_from_fd): Update handling of scope + list, now that l_scope is a pointer. -2001-04-04 Andreas Jaeger + * elf/dl-open.c (dl_open_worker): Fix thinko when enlarging the + scope list. - * sysdeps/powerpc/dl-machine.h (ELF_MACHINE_NO_REL): Move to right - place. +2001-09-18 kaz Kojima -2001-04-04 Ulrich Drepper + * sysdeps/sh/dl-machine.h (elf_machine_rela): Fix reverse condition. + (elf_machine_rela_relative): Add a missing declaration. - * sunrpc/rpc_scan.c (symbols): Add entry for HYPER. - * sunrpc/rpc_scan.h (enum tok_kind): Add TOK_HYPER. - * sunrpc/rpc_parse.c (get_type): Handle TOK_HYPER. - (unsigned_dec): Likewise. - Patch by atai@jezebel.dreamhost.com. +2001-09-18 Jakub Jelinek - * nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): Pass - pointer to int as last parameter of yp_match. - Patch by kanazawa@flab.fujitsu.co.jp. + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: New file. + * sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed: New file. + * sysdeps/unix/sysv/linux/configure.in: Add ia64 and s390 + ldd-rewrite scripts. -2001-04-03 Ulrich Drepper +2001-09-18 Ulrich Drepper - * resolv/netdb.h (gai_strerror): Make return value const. - * sysdeps/generic/gai_strerror.c (gai_strerror): Likewise. - * sysdeps/posix/gai_strerror.c (gai_strerror): Likewise. - Add strings for new error values. + * elf/ldd.bash.in: Update copyright message. -2001-03-29 Michael Keezer +2001-09-17 H.J. Lu - * posix/tst-gnuglob.c: Added ifdef _DIRENT_HAVE_D_TYPE. - * login/tst-utmp.c: Handle case where ut_tv is not available but - ut_time is. - * sysdeps/unix/sysv/aix/utmpx.h: New file. - * sysdeps/unix/sysv/aix/bits/utmpx.h: Added - _HAVE_UT_TYPE/PID/ID/TV/HOST defines. - * sysdeps/unix/sysv/aix/libc-start.c: Removed temp code and made stub. - * sysdeps/unix/sysv/aix/gettimeofday.c: New file added routines - to access RTCU timer reg. - * sysdeps/unix/sysv/aix/Makefile: Remove /usr/lib/crt0.o - added dl-libc, dl-open,dl-sym, dl-close to misc. - * sysdeps/unix/sysv/aix/start.c: New file. Start code. - * sysdeps/unix/sysv/aix/dlldr.h: New file. AIX __loadx defines. - * sysdeps/unix/sysv/aix/dl-close.c: New file. AIX dl-close. - * sysdeps/unix/sysv/aix/dl-open.c: New file. AIX dl-open. - * sysdeps/unix/sysv/aix/dl-sym.c: New file. AIX dl-sym. - * sysdeps/unix/sysv/aix/dl-libc.c: New file. libc_dl-xxx support. - * sysdeps/generic/strtoll.c: Added SHLIB_COMPAT(libc,GLIBC_2_0, - GLIBC_2_2). - * sysdeps/generic/strtoull.c: Likewise. - * sysdeps/powerpc/ppc-mcount.S: Added nop after bl instruction. - * sysdeps/unix/sysv/aix/powerpc/memset.c: New file to include - sysdeps/generic/memset.c. - * sysdeps/unix/sysv/aix/getpeername.c: Define __getpeername. + * hurd/hurdmalloc.c (bcopy): Removed. + (realloc): Replace bcopy with memcpy. + * hurd/path-lookup.c (file_name_path_scan): Likewise. + * resolv/gethnamaddr.c (map_v4v6_address): Likewise. + * sunrpc/rpcinfo.c (pmapdump): Likewise. -2001-04-03 Ulrich Drepper + * resolv/gethnamaddr.c (getanswer): Replace bcopy with memmove. + (gethostbyaddr): Likewise. + * sunrpc/rpcinfo.c (get_inet_address): Likewise. - * iconv/Makefile (CFLAGS-charmap.c): Add -DNEED_NULL_POINTER. - * locale/programs/charmap.c: Define null_pointer if - NEED_NULL_POINTER is defined. +2001-09-18 Ulrich Drepper - * misc/dirname.c (dirname): Handle multiple slashes correctly. + * sysdeps/gnu/eval.c: Removed. -2001-04-03 Martin Schwidefsky +2001-09-18 Andreas Jaeger - * sysdeps/s390/s390-64/initfini.c: Fix __gmon_start__ GOT access. + * sysdeps/i386/fpu/s_logbl.S: Move to ... + * sysdeps/i386/fpu/s_logbl.c: ...here, use inline assembler. -2001-04-03 Martin Schwidefsky + * sysdeps/i386/fpu/s_rintl.S: Move to ... + * sysdeps/i386/fpu/s_rintl.c: ...here, use inline assembler. - * sysdeps/s390/s390-32/bcopy.S: Optimize for speed. - * sysdeps/s390/s390-64/bcopy.S: Likewise. - * sysdeps/s390/s390-32/mempcy.S: Likewise. - * sysdeps/s390/s390-64/memcpy.S: Likewise. + * sysdeps/i386/fpu/s_significandl.S: Move to ... + * sysdeps/i386/fpu/s_significandl.c: ...here, use inline assembler. -2001-04-02 Bruno Haible +2001-09-16 Ulrich Drepper - * manual/message.texi (Advanced gettext functions): More specific - syntax in the plural formula examples. + * string/strcoll.c [USE_IN_EXTENDED_LOCALE_MODEL]: Correctly get + nrules value. -2001-04-02 Franz Sirl +2001-09-14 H.J. Lu - * sysdeps/powerpc/atomicity.h: Silence warnings. - * sysdeps/powerpc/dl-machine.h: Likewise. - * sysdeps/powerpc/register-dump.h: Likewise. - * sysdeps/powerpc/fpu/s_lrint.c: Likewise. + * sysdeps/mips/fpu/libm-test-ulps: Updated. -2001-04-02 Andreas Jaeger +2001-09-14 Ulrich Drepper - * misc/tst-dirname.c (main): Add more tests, derived from a bug - report by Michael Kerrisk . + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Fix a typo. + Patch by Florian La Roche . -2001-04-01 Andreas Jaeger + * string/bits/string2.h (__strtok_r_1c): Optimize a bit. - * debug/xtrace.sh (pcprofileso): Use SLIBDIR since libpcprofile.so - is installed there. - * malloc/memusage.sh (memusageso): Likewise for libmemusage.so. + * sysdeps/unix/sysv/linux/net/ethernet.h: Correct references to + ETHER_CRC_LEN. -2001-04-01 H.J. Lu +2001-09-14 Andreas Schwab - * posix/annexc.c (macrofile): Renamed from TMPFILE and set to - tmpnam (NULL). - * stdlib/isomac.c (macrofile): Likewise. + * posix/execl.c: Fix last argument of memcpy. Reported by Brian + Sumner . + * posix/execlp.c: Likewise. -2001-03-30 Thorsten Kukuk +2001-09-13 Jakub Jelinek - * inet/rcmd.c: Allow AF_UNSPEC as parameter. - * nis/ypclnt.c (yp_all): Print error message only at last try, - check for protocoll error only if we don't have a network error. + * elf/dl-deps.c (_dl_map_object_deps): Fix filter handling if filter + is already found earlier in the search scope. -2001-04-02 Andreas Schwab +2001-09-12 Jakub Jelinek - * resolv/res_data.c (res_isourserver): Fix cast. + * rt/Makefile (LDFLAGS-rt.so): Use shared thread library as librt's + filter. -2001-04-02 Andreas Jaeger +2001-09-13 Ulrich Drepper - * sysdeps/unix/sysv/linux/hppa/umount.c: Add prototype for - __umount2. + * sysdeps/powerpc/fpu/libm-test-ulps: Adjust expected errors for j0. - * sysdeps/i386/dl-machine.h (RTLD_START): Don't use multi-line - strings. - (ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. +2001-09-12 Ulrich Drepper - * sysdeps/ieee754/dbl-64/uroot.h: Add missing braces arount - initializers. - * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Likewise. + * config.h.in: Enforce optimization to be used. + * Makeconfig (preprocess-versions): Define ASSEMBLER. + * stdlib/Makefile (isomac-CFLAGS): Define to -O. + * posix/Makefile (annexc-CFLAGS): Define to -O. + * sysdeps/unix/make-syscalls.sh: Define __OPTIMIZE__ in use of asm_CPP. - * elf/rtld.c (print_statistics)[!HP_TIMING_NONAVAIL]: Avoid - warning about unused variable. +2001-09-11 Ulrich Drepper - * string/string.h (strndupa): Add cast for C++ conformance. - (strdupa): Likewise. - Fixes PR libc/2173, reported by tbrowder@home.com. + * nscd/nscd_gethst_r.c: Don't expect IPv6 addresses for IPv4 lookup. + Patch by Stephan Kulow. -2001-03-30 Roland McGrath +2001-09-08 Ben Collins - * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Don't append - options after $(build-module), which is no longer a single command. - (LDFLAGS-link-rpcuserlibs): New variable to hold those options. - (LDFLAGS-libmachuser-link.so, LDFLAGS-libhurduser-link.so): New - variables using it. Reported by Mark Kettenis . + * sysdeps/arm/dl-machine.h (elf_machine_rel): Fix thinko in + usage of RESOLVE() (r_type, not reloc->r_type). -2001-03-11 Roland McGrath +2001-09-08 Ulrich Drepper - * elf/rtld.c (dl_main): Add cast to quiet warning. + * elf/dl-object.c: Avoid allocating extra memory block for name. + * elf/dl-close.c (_dl_close): Don't free l_libname if it is not + allocated separately. * elf/dl-load.c (_dl_map_object_from_fd): Likewise. - * iconv/gconv_conf.c (__gconv_get_path): Likewise. - (__gconv_read_conf): Likewise. - * iconv/gconv_db.c (gen_steps): Likewise. - (__gconv_find_transform): Likewise. - * locale/programs/charmap-dir.c (fopen_uncompressed): Likewise. - (fopen_uncompressed): Use const in second argument's type. - -2001-03-11 Roland McGrath - - * sysdeps/mach/hurd/dl-sysdep.c (__writev): New function. - - * mach/mach_error.h: Fix ancient #endif syntax. - * hurd/hurdmalloc.c: Likewise. - - * sysdeps/generic/atomicity.h (exchange_and_add, atomic_add, - compare_and_swap): Add volatile qualifier to first arg, to bring - these prototypes in line with all the other implementations. - Add a #warning to remind the builder that these are not atomic. - -2001-03-04 Roland McGrath - - * hurd/vpprintf.c (vpprintf) [USE_IN_LIBIO]: Use innermore first - member of TEMP_F so its type is _IO_FILE * as expected. - - * hurd/fopenport.c (seekio): Conditionalize type of POS argument - on [USE_IN_LIBIO]. Check the value for overflow, since for libio - it might exceed off_t's range. - -2001-02-25 Roland McGrath - - * sysdeps/mach/hurd/sysd-stdio.c (__stdio_reopen): Use prototype. - * sysdeps/unix/bsd/getpt.c (__posix_openpt): Likewise. - - * sysdeps/mach/hurd/i386/intr-msg.h (SYSCALL_EXAMINE): Make this a - macro instead of an inline function, - (MSG_EXAMINE): Likewise. - - * hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): Remove extraneous ##. - - * hurd/get-host.c: Include for decls of built-ins. - * hurd/hurdchdir.c: Likewise. - * sysdeps/mach/hurd/i386/sigreturn.c: Likweise. - * sysdeps/mach/hurd/opendir.c: Likewise. - - * mach/mach_init.c: Include for _exit decl. - - * mach/errsystems.awk: Give output file a trailing newline. - - * mach/Machrules (MIG): Prepend CC='${CC}' to the mig command, so that - the script will use our compiler for the cpp stage. - - With --enable-all-warnings we get a whole bunch of warnings, - and these are just a few fixes; there are more needed to silence it. - * mach/mach/mig_support.h (__mig_strncpy, mig_strncpy): Add extern - decls before extern inline defns to quiet gcc warning. - * hurd/hurd/threadvar.h (__hurd_threadvar_location_from_sp): Likewise. - * sysdeps/mach/i386/machine-sp.h (__thread_stack_pointer): Likewise. - -2001-03-31 Andreas Jaeger - - * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_RAWHDLC): Added. - (ARPHRD_HDLC): Define as alias for ARPHRD_CISCO. - (ARPHRD_CISCO): New. - Changes from Linux 2.4.3. - -2001-03-30 Isamu Hasegawa - - * posix/regex.c: Avoid an access violation if malloc fails. - -2001-03-30 Andreas Jaeger - - * sysdeps/alpha/ldiv.S (ldiv): Add alias for imaxdiv. - -2001-03-29 Ulrich Drepper - - * posix/regex.c: Remove unnecessary ifs. - - * math/bits/mathcalls.h: Remove infnan declaration. - -2001-03-29 H.J. Lu - - * include/endian.h: Define BIG_ENDI, LITTLE_ENDI, HIGH_HALF, - and LOW_HALF only if _LIBC is defined and _ISOMAC is not defined. - * stdlib/isomac.c (fmt): Define _LIBC and _ISOMAC. - -2001-03-29 Isamu Hasegawa - - * posix/regex.c: Fix typo and add a sentinel. - -2001-03-29 Ulrich Drepper - - * sysdeps/unix/sysv/linux/shm_open.c: Open new file always with - O_NOFOLLOW. Suggested by Christoph Roland. - -2001-03-27 Martin Schwidefsky - - * sysdeps/s390/bits/string.h: New unified 31/64 bit string.h. - * sysdeps/s390/s390-32/bits/string.h: Remove. - * sysdeps/s390/s390-64/bits/string.h: Remove. - * sysdeps/s390/s390-32/strcmp.S: New file. - * sysdeps/s390/s390-64/strcmp.S: New file. - -2001-03-27 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Fix typo. - * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise. - -2001-03-27 Ulrich Drepper - - * version.h (VERSION): Bump to 2.2.3. - - * stdlib/isomac.c (fmt): Don't define _LIBC. - * include/endian.h: Define BIG_ENDI, LITTLE_ENDI, HIGH_HALF, and - LOW_HALF only if _LIBC is defined. - - * sysdeps/i386/fpu/libm-test-ulps: Slight adjustment of yn() error. - - * posix/fnmatch_loop.c (FCT): Handle !() after * special like @() - and +(). - * posix/tst-fnmatch.input: Add test cases for matching empty strings. - - * sysdeps/ieee754/dbl-64/endian.h: Removed. Move definitions... - * include/endian.h: ...to here. - -2001-03-27 kaz Kojima - - * sysdeps/sh/sys/ucontext.h (NFREG): Rename to NFPREG. - * sysdeps/unix/sysv/linux/sh/sys/ucontext.h (NFREG): Likewise. - -2001-03-27 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/ldconfig.h: Fix typo. - -2001-03-26 Ulrich Drepper - - * sysdeps/ia64/fpu/Dist: Add new files to distribute. - * sysdeps/unix/sysv/linux/s390/s390-64/Dist: Likewise. - * sysdeps/unix/sysv/linux/ia64/Dist: Likewise. - - * gmon/Makefile (headers): Add sys/profil.h. - -2001-03-18 Andreas Jaeger - - * manual/install.texi (Tools for Compilation): Advise to use GCC - 2.95.3. - (Supported Configurations): Mention s390x. - -2001-03-26 Ben Collins - - * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add MAP_* and MADV_* - defines to match other architectures. - -2001-03-26 Ulrich Drepper - - * libio/Makefile (tests): Add tst-ext. - * libio/tst-ext.c: New file. - - * libio/iosetvbuf.c (_IO_setvbuf): Clear line buffer flag for _IONBF. - -2001-03-25 Ulrich Drepper - - Add changes which were in this form in the original patch by - Eric Norum . - * include/rpc/rpc.h: Remove svc_fdset, rpc_createerr, svc_pollfd, and - svc_max_pollfd. - * sunrpc/rpc/rpc.h: Declare __rpc_thread_svc_fdset, - __rpc_thread_createerr, __rpc_thread_svc_pollfd, and - __rpc_thread_svc_max_pollfd. - Define svc_fdset, get_rpc_createerr, svc_pollfd, and - svc_max_pollfd. - * sunrpc/rpc_thread.c: Handle first thread special, it uses the - global variables. - Define __rpc_thread_svc_fdset, __rpc_thread_createerr, - __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. - * sunrpc/Versions [libc] (GLIBC_2.2.3): Export __rpc_thread_svc_fdset, - __rpc_thread_createerr, __rpc_thread_svc_pollfd, and - __rpc_thread_svc_max_pollfd. - * sunrpc/clnt_gen.c: Replace use of rpc_createerr by call to - get_rpc_createerr. - * sunrpc/clnt_perr.c: Likewise. - * sunrpc/clnt_simp.c: Likewise. - * sunrpc/clnt_tcp.c: Likewise. - * sunrpc/clnt_udp.c: Likewise. - * sunrpc/clnt_unix.c: Likewise. - * sunrpc/pm_getport.c: Likewise. - - * sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): getgroups32 - syscall checks for negative n so don't test here as well. - -2001-03-23 Jes Sorensen - - * sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ... - * sysdeps/ia64/sysdep.h: ...here. - - * sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define. - * sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define. - - * sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to - declare instead of LEAF(). Suggestion from David Mosberger. - -2001-03-21 David Mosberger - - * sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind - directives. - (PSEUDO): Drop .psr and .lsb directives. - - * sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto. Add unwind - directives. - * sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto. - - * sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb - directives etc. - * sysdeps/unix/sysv/linux/ia64/brk.S: Ditto. - * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto. - * sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no - longer needed). Add unwind directives. - - * sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS, - ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE. - -2001-03-21 Paul Eggert - - * posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro. - (RE_SYNTAX_POSIX_EGREP): Use it. - * posix/regex.c (regex_compile): Implement it. - -2001-03-21 Paul Eggert - - * posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow. - Rewrite to avoid duplicate code. - -2001-03-21 H.J. Lu - - * elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out - for cross-compiling. - ($(objpfx)tst-pathopt.out): Undo the last change. - -2001-03-24 Mark Kettenis - - * sysdeps/mach/hurd/i386/bits/sigcontext.h (sc_sp, sc_fp, sc_pc, - sc_ps): Define as aliases for sc_uesp, sc_ebl, sc_eip and sc_efl. - - * sysdeps/mach/hurd/i386/init-first.c: Include . - (_dl_argv): Declare. - (init) [SHARED]: Readjust _dl_argv if we switched to a new stack. - -2001-03-22 Andreas Jaeger - - * iconvdata/Makefile (generated): Add iconv-test.xxx. - - * posix/Makefile (generated): Add bug-regex2.mtrace and - bug-regex2-mem. - -2001-03-21 Ulrich Drepper - - * csu/version.c (__gnu_get_libc_release): Add prototype. - (__gnu_get_libc_version): Likewise. - * include/gnu/libc-version.h: Remove prototypes for not exported - functions. - -2001-03-21 Jes Sorensen - - * sysdeps/unix/sysv/linux/ia64/makecontext.c: Include libintl.h - for internationalized printfs to work. - -2001-03-09 Bruno Haible - - * intl/dcigettext.c (transmem_block_t): Change to unsigned char, to - avoid compiler warning. - (_nl_find_msg): Add casts to avoid compiler warnings. - -2001-03-21 Ulrich Drepper - - * gmon/Makefile (routines): Add sprofil. - (tests): Add tst-sprofil. - (noprof): Add sprofil. - * gmon/Versions [libc] (GLIBC_2.2.3): Add sprofil. - -2001-03-20 David Mosberger - - * sysdeps/generic/sprofil.c: New file. - * sysdeps/posix/sprofil.c: New file. - * gmon/tst-sprofil.c: New file. - * gmon/sys/profil.h: New file. - -2001-03-20 Andreas Schwab - - * include/unistd.h: Adjust prototype of __gethostname. - -2001-03-20 Jakub Jelinek - - * sysdeps/sparc/stackinfo.h: New file. - -2001-03-21 Andreas Jaeger - - * elf/global.c (main): Use proper prototype. - -2001-03-20 Ulrich Drepper - - * sunrpc/Makefile (routines): Add rpc_thread. - (CPPFLAGS): Add -D_RPC_THREAD_SAFE. - * sunrpc/rpc_thread.c: New file. - * sunrpc/Versions [libc] (GLIBC_2.2.3): Export __rpc_thread_destroy. - * sunrpc/auth_none.c: Don't use global variables. Access state in - thread-local storage. - * sunrpc/clnt_perr.c: Likewise. - * sunrpc/clnt_raw.c: Likewise. - * sunrpc/clnt_simp.c: Likewise. - * sunrpc/key_call.c: Likewise. - * sunrpc/rpc_common.c: Likewise. - * sunrpc/svc.c: Likewise. - * sunrpc/svc_raw.c: Likewise. - * sunrpc/svc_simple.c: Likewise. - * sunrpc/svcauth_des.c: Likewise. - * hurd/hurd/threadvar.h (enum __hurd_threadvar_index): Add - _HURD_THREADVAR_RPC_VARS. - * sysdeps/generic/bits/libc-tsd.h: Mention _LIBC_TSD_KEY_RPC_VARS. - * include/rpc/rpc.h: Define data structures for internal thread-local - "global" variables. - Based on patches by Eric Norum . - - * elf/dl-load.c: Various little optimizations. - - * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Return - LINUX_LINK_MAX only if the statfs function is not implemented for - the filesystem. - - * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Return - LINUX_LINK_MAX only if the fstatfs function is not implemented for - the filesystem. - -2001-03-19 Ulrich Drepper - - * elf/dl-dst.h (DL_DST_COUNT): Add __builtin_expect. - - * elf/dl-load.c (_dl_dst_count): Make DST recognition more robust. - (_dl_dst_substitute): Likewise. - -2001-03-17 Bruno Haible - - * intl/loadmsgcat.c (_nl_load_domain) [!_LIBC]: Use fstat, not fstat64. - -2001-03-17 Bruno Haible - - * intl/gettextP.h (struct expression): Add operators lnot, less_than, - greater_than, less_or_equal, greater_or_equal. Replace args2/args3 - union by a 'nargs' counter and an 'args[]' array. - * intl/plural.y: Don't include stdarg.h. - (new_exp): Take an array of arguments instead of varargs. - (new_exp_0, new_exp_1, new_exp_2, new_exp_3): New functions. - ('?' ':'): Make right-associative. - (EQUOP2): New token, replaces '=' and '!'. - (CMPOP2): New token. - (ADDOP2): New token, replaces '+' and '-'. - (MULOP2): New token, replaces '*', '/' and '%'. - ('!'): New token. - (exp): Add rules for CMPOP2 and '!'. Don't call YYABORT. - (start): Call YYABORT here. - (FREE_EXPRESSION): Update. - (yylex): Don't skip "\\n". Recognize comparison and '!' operators. - Update for new token symbols. - * intl/loadmsgcat.c (plvar, plone, germanic_plural, - init_germanic_plural): Update. - * intl/dcigettext.c (_nl_find_msg): Optimize for space. - (plural_eval): Recognize comparison and '!' operators. Optimize for - space. - -2001-03-10 Bruno Haible - - * intl/loadmsgcat.c (_nl_load_domain): locale_charset() doesn't return - NULL any more. - -2001-01-05 Bruno Haible - - * intl/loadmsgcat.c: Include headers needed for alloca(). - (freea): New macro. - (_nl_load_domain): Add fallback code for platforms lacking alloca. - * intl/localealias.c: (ADD_BLOCK, FREE_BLOCK): Remove macros. - (freea): New macro. - (read_alias_file): Simplify fallback code for platforms lacking - alloca. - -2001-01-07 Bruno Haible - - * intl/gettextP.h (__gettextdebug): Remove declaration. - (__gettext_free_exp, __gettextparse): Convert prototype to K&R C - syntax. - (gettext_free_exp__, gettextparse__): New non-libc declarations. - * intl/plural.y [!_LIBC]: Define gettextparse__, gettext_free_exp__, - not __gettextparse, __gettext_free_exp. - * intl/loadmsgcat.c [!_LIBC]: Use gettextparse__, not __gettextparse. - -2001-02-24 Bruno Haible - - * intl/dcigettext.c: Update comment about HAVE_LOCALE_NULL. - -2001-01-05 Bruno Haible - - * intl/loadmsgcat.c (_nl_load_domain): Add fallback code for platforms - lacking strtoul, like SunOS4. - -2001-01-05 Bruno Haible - - * intl/l10nflist.c (_nl_normalize_codeset): Use tolower, not _tolower. - -2001-01-05 Bruno Haible - - * intl/bindtextdom.c (set_binding_values): Convert prototype to K&R C - syntax. - * intl/dcigettext.c (transcmp): Convert to K&R C syntax. - * intl/explodename.c (_nl_find_language): Convert to K&R C syntax. - * intl/plural.y (__gettext_free_exp, yylex, yyerror): Convert to K&R C - syntax. - -2001-01-07 Bruno Haible - - * intl/gettextP.h (gettext__, dgettext__, dcgettext__, textdomain__, - bindtextdomain__, bind_textdomain_codeset__): New declarations, from - old libgettext.h. - * intl/bindtextdom.c: Include libgnuintl.h instead of libgettext.h. - * intl/dcgettext.c: Likewise. - * intl/dcigettext.c: Likewise. - * intl/dcngettext.c: Likewise. - * intl/dngettext.c: Likewise. - * intl/finddomain.c: Likewise. - * intl/ngettext.c: Likewise. - * intl/textdomain.c: Likewise. - * intl/dgettext.c: Include libgnuintl.h instead of libgettext.h. - Include gettextP.h. - * intl/gettext.c: Likewise. Don't include locale.h. - -2001-03-17 Bruno Haible - - * intl/gettextP.h (ZERO): New macro. - (struct binding): Always use ZERO. - * intl/bindtextdom.c (offsetof): Provide fallback for platforms that - lack it, like SunOS4. - (set_binding_values): Use offsetof, not sizeof. - * intl/dcigettext.c (offsetof): Provide fallback for platforms that - lack it, like SunOS4. - (ZERO): Remove macro. - (struct transmem_list): Use ZERO. - (DCIGETTEXT): Use offsetof, not sizeof. - -2001-03-17 Bruno Haible - - * intl/gettextP.h: Include . Include gettext.h, for - nls_uint32. - * intl/bindtextdom.c: Don't include gettext.h. - * intl/dcgettext.c: Likewise. - * intl/dcigettext.c: Likewise. - * intl/dcngettext.c: Likewise. - * intl/dngettext.c: Likewise. - * intl/finddomain.c: Likewise. - * intl/localealias.c: Likewise. - * intl/ngettext.c: Likewise. - * intl/plural.y: Likewise. - * intl/textdomain.c: Likewise. - -2001-03-17 Bruno Haible - - * intl/gettext.h: Don't include . - -2001-03-17 Bruno Haible - - * intl/Makefile (CPPFLAGS): Set LOCALEDIR instead of GNULOCALEDIR. - * intl/dcigettext.c (_nl_default_dirname): Initialize with LOCALEDIR. - -2001-03-19 Ulrich Drepper - - * sysdeps/unix/i386/i686/tempname.c: New file. - - * sysdeps/posix/tempname.c (__gen_tempname): If RANDOM_BITS is - defined use this macro to get some bits of randomness instead of - the usual gettimeofday or time calls. - -2001-03-16 Paul Eggert - - * sysdeps/posix/tempname.c (uint64_t): Define to uintmax_t if - not defined, and if UINT64_MAX is not defined. - -2001-03-19 Ulrich Drepper - - * elf/cache.c: Mark and have translated a few more messages. - -2001-03-19 Martin Schwidefsky - - * elf/cache.c: Add case for FLAG_S390_LIB64. - * sysdeps/generic/ldconfig.h: Add define for FLAG_S390_LIB64. - * sysdeps/unix/sysv/linux/s390/ldconfig.h: New file. - * sysdeps/unix/sysv/linux/s390/readelflib.c: New file. - -2001-03-19 Ulrich Drepper - - * string/Makefile (tests): Add tst-strxfrm. - * string/tst-strxfrm.c: New file. Based on a test case by Paul Eggert. - * string/Depend: New file. - -2001-03-19 Paul Eggert - - * string/strxfrm.c (strxfrm): strxfrm should return 0, not 1, - when given the empty string in nontrivial locales. - -2001-03-17 H.J. Lu - - * manual/Makefile (install): Use $(INSTALL_DATA) instead of - cp to install `dir'. - -2001-03-19 Andreas Schwab - - * Makerules (build-shlib): Make sure exit codes get checked - properly. - -2001-03-18 Ulrich Drepper - - * Makerules (build-shlib): Remove unnecessary slashes introduced in - last change. - - * configure.in: Test for -Bgroup option of linker. - * config.make.in: Define have-Bgroup. - - * conform/data/unistd.h-data: Require gethostname. - * posix/unistd.h: Make gethostname prototype available for - __USE_XOPEN2K. - - * crypt/Makefile: When generating DSO link with libc_nonshared.a. - * debug/Makefile: Likewise. - * dlfcn/Makefile: Likewise. - * hesiod/Makefile: Likewise. - * iconvdata/extra-module.mk: Likewise. - * locale/Makefile: Likewise. - * login/Makefile: Likewise. - * math/Makefile: Likewise. - * nis/Makefile: Likewise. - * nss/Makefile: Likewise. - * resolv/Makefile: Likewise. - * rt/Makefile: Likewise. - -2001-03-17 Ulrich Drepper - - * inet/Makefile (tests): Remove left-over comment. - - * posix/unistd.h (gethostname): Change type of second parameter - back to size_t as per upcoming XPG6. - * sysdeps/unix/sysv/aix/gethostname.c: Change type of second - parameter back to size_t as per upcoming XPG6. - * sysdeps/unix/sysv/sysv4/gethostname.c: Likewise. - * sysdeps/unix/sysv/gethostname.c: Likewise. - * sysdeps/mach/hurd/gethostname.c: Likewise. - * sysdeps/generic/gethostname.c: Likewise. - -2001-03-16 Ulrich Drepper - - * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r): - Handle NaN here. - - * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): - Internationalize. - -2001-02-06 Jakub Jelinek - - * elf/dl-load.c (_dl_map_object): Don't test l_opencount when - looking for name matches. - -2001-02-26 Jakub Jelinek - - * sysdeps/generic/sigcontextinfo.h (CALL_SIGHANDLER): Define. - * sysdeps/mach/hurd/i386/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/s390/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise. - -2001-03-16 Ulrich Drepper - - * sysdeps/ieee754/ldbl-96/s_erfl.c: New file. - Contributed by Stephen L. Moshier . - - * sysdeps/i386/fpu/libm-test-ulps: Adjust for addition of erfl and - erfcl. - * sysdeps/ia64/fpu/libm-test-ulps: Likewise. - -2001-03-16 David Mosberger - - * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): - Drop hack that was needed for 2.1.1 kernel headers. - - * sysdeps/unix/sysv/linux/ia64/ucontext_i.h: New file. - - * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Rewrite to make it - overlay with kernel's "struct sigcontext". - - * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_headers): Add - sys/rse.h for "misc" subdir. - (sysdep_routines): Add __start_context for "stdlib" subdir. - - * sysdeps/unix/sysv/linux/ia64/sys/rse.h: New file (based on - kernel file of the same name). - - * stdlib/Makefile (tests): Add tst-setcontext. - * stdlib/tst-setcontext.c: New file (based on a sample program by - Uli Drepper). - - * sysdeps/unix/sysv/linux/ia64/setcontext.S: New file. - * sysdeps/unix/sysv/linux/ia64/getcontext.S: New file. - * sysdeps/unix/sysv/linux/ia64/__start_context.S: New file. - * sysdeps/unix/sysv/linux/ia64/makecontext.c: New file. - * sysdeps/unix/sysv/linux/ia64/swapcontext.c: New file. - - * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): Use extr.u - instead of shift & and. - -2001-03-16 Martin Schwidefsky - - * sysdeps/s390/s390-64/bits/huge_val.h: Move to... - * sysdeps/s390/bits/huge_val.h: ...here. - * sysdeps/s390/s390-32/bit/huge_val.h: Remove. - * sysdeps/s390/s390-64/ffs.c: Move to... - * sysdeps/s390/ffs.c: ...here. - * sysdeps/s390/s390-32/ffs.c: Remove. - -2001-03-16 Jakub Jelinek - - * elf/ldconfig.c (search_dir): Remove bogus diagnostic, instead - update osversion from more recent library. - -2001-03-13 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/Dist: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/Dist: ...here. - * sysdeps/unix/sysv/linux/s390/Makefile: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: ...here. - * sysdeps/unix/sysv/linux/s390/Versions: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/Versions: ...here. - * sysdeps/unix/sysv/linux/s390/alphasort64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/alphasort64.c: ...here. - * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h: ...here. - * sysdeps/unix/sysv/linux/s390/bits/mman.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h: ...here. - * sysdeps/unix/sysv/linux/s390/bits/resource.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h: ...here. - * sysdeps/unix/sysv/linux/s390/bits/stat.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h: ...here. - * sysdeps/unix/sysv/linux/s390/chown.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: ...here. - * sysdeps/unix/sysv/linux/s390/clone.S: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: ...here. - * sysdeps/unix/sysv/linux/s390/fchown.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/fchown.c: ...here. - * sysdeps/unix/sysv/linux/s390/fcntl.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/fcntl.c: ...here. - * sysdeps/unix/sysv/linux/s390/fxstat.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/fxstat.c: ...here. - * sysdeps/unix/sysv/linux/s390/getdents64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getdents64.c: ...here. - * sysdeps/unix/sysv/linux/s390/getegid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: ...here. - * sysdeps/unix/sysv/linux/s390/geteuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/getgid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: ...here. - * sysdeps/unix/sysv/linux/s390/getgroups.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: ...here. - * sysdeps/unix/sysv/linux/s390/getresgid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: ...here. - * sysdeps/unix/sysv/linux/s390/getresuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/getrlimit.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c: ...here. - * sysdeps/unix/sysv/linux/s390/getrlimit64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getrlimit64.c: ...here. - * sysdeps/unix/sysv/linux/s390/getuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/lchown.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: ...here. - * sysdeps/unix/sysv/linux/s390/lockf64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/lockf64.c: ...here. - * sysdeps/unix/sysv/linux/s390/lxstat.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/lxstat.c: ...here. - * sysdeps/unix/sysv/linux/s390/mmap.S: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: ...here. - * sysdeps/unix/sysv/linux/s390/mmap64.S: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: ...here. - * sysdeps/unix/sysv/linux/s390/msgctl.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/msgctl.c: ...here. - * sysdeps/unix/sysv/linux/s390/oldgetrlimit64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/oldgetrlimit64.c: ...here. - * sysdeps/unix/sysv/linux/s390/readdir64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/readdir64.c: ...here. - * sysdeps/unix/sysv/linux/s390/readdir64_r.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/readdir64_r.c: ...here. - * sysdeps/unix/sysv/linux/s390/register-dump.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h: ...here. - * sysdeps/unix/sysv/linux/s390/scandir64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/scandir64.c: ...here. - * sysdeps/unix/sysv/linux/s390/semctl.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/semctl.c: ...here. - * sysdeps/unix/sysv/linux/s390/setegid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setegid.c: ...here. - * sysdeps/unix/sysv/linux/s390/seteuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setfsgid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setfsgid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setfsuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setfsuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setgid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setgid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setgroups.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c: ...here. - * sysdeps/unix/sysv/linux/s390/setregid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setregid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setresgid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setresuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setreuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/setrlimit.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setrlimit.c: ...here. - * sysdeps/unix/sysv/linux/s390/setuid.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/setuid.c: ...here. - * sysdeps/unix/sysv/linux/s390/shmctl.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/shmctl.c: ...here. - * sysdeps/unix/sysv/linux/s390/socket.S: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/socket.S: ...here. - * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h: ...here. - * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: ...here. - * sysdeps/unix/sysv/linux/s390/syscall.S: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: ...here. - * sysdeps/unix/sysv/linux/s390/syscalls.list: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list: ...here. - * sysdeps/unix/sysv/linux/s390/sysdep.S: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: ...here. - * sysdeps/unix/sysv/linux/s390/sysdep.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: ...here. - * sysdeps/unix/sysv/linux/s390/versionsort64.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/versionsort64.c: ...here. - * sysdeps/unix/sysv/linux/s390/xstat.c: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/xstat.c: ...here. - -2001-03-13 Martin Schwidefsky - - * sysdeps/unix/sysv/linux/s390/s390-64/Dist: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/fstatfs64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/ftruncate64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/fxstat64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/getdents.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/getdents64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/getrlimit64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/glob.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/glob64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/lxstat64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/mmap.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/mmap64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/pread64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/pwrite64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/readdir.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/readdir64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/readdir64_r.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/readdir_r.c : New file. - * sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/setrlimit64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/socket.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/statfs64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/truncate64.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/xstat.c: New file. - * sysdeps/unix/sysv/linux/s390/s390-64/xstat64.c: New file. - -2001-03-13 Martin Schwidefsky - - * sysdeps/s390/Dist: Move to... - * sysdeps/s390/390-32/Dist: ...here. - * sysdeps/s390/Implies: Move to... - * sysdeps/s390/s390-32/Implies: ...here. - * sysdeps/s390/Makefile: Move to... - * sysdeps/s390/s390-32/Makefile: ...here. - * sysdeps/s390/Versions: Move to... - * sysdeps/s390-32/s390/Versions: ...here. - * sysdeps/s390/add_n.S: Move to... - * sysdeps/s390/s390-32/add_n.S: ...here. - * sysdeps/s390/addmul_1.S: Move to... - * sysdeps/s390/s390-32/addmul_1.S: ...here. - * sysdeps/s390/atomicity.h: Move to... - * sysdeps/s390/s390-32/atomicity.h: ...here. - * sysdeps/s390/backtrace.c: Move to... - * sysdeps/s390/s390-32/backtrace.c: ...here. - * sysdeps/s390/bcopy.S: Move to... - * sysdeps/s390/s390-32/bcopy.S: ...here. - * sysdeps/s390/bits/byteswap.h: Move to... - * sysdeps/s390/s390-32/bits/byteswap.h: ...here. - * sysdeps/s390/bits/huge_val.h: Move to... - * sysdeps/s390/s390-32/bits/huge_val.h: ...here. - * sysdeps/s390/bsd-_setjmp.S: Move to... - * sysdeps/s390/s390-32/bsd-_setjmp.S: ...here. - * sysdeps/s390/bsd-setjmp.S: Move to... - * sysdeps/s390/s390-32/bsd-setjmp.S: ...here. - * sysdeps/s390/bzero.S: Move to... - * sysdeps/s390/s390-32/bzero.S: ...here. - * sysdeps/s390/elf/bsd-_setjmp.S: Move to... - * sysdeps/s390/s390-32/elf/bsd-_setjmp.S: ...here. - * sysdeps/s390/elf/bsd-setjmp.S: Move to... - * sysdeps/s390/s390-32/elf/bsd-setjmp.S: ...here. - * sysdeps/s390/elf/start.S: Move to... - * sysdeps/s390/s390-32/elf/start.S: ...here. - * sysdeps/s390/ffs.c: Move to... - * sysdeps/s390/s390-32/ffs.c: ...here. - * sysdeps/s390/memchr.S: Move to... - * sysdeps/s390/s390-32/memchr.S: ...here. - * sysdeps/s390/memcpy.S: Move to... - * sysdeps/s390/s390-32/memcpy.S: ...here. - * sysdeps/s390/memset.S: Move to... - * sysdeps/s390/s390-32/memset.S: ...here. - * sysdeps/s390/mul_1.S: Move to... - * sysdeps/s390/s390-32/mul_1.S: ...here. - * sysdeps/s390/s390-mcount.S: Move to... - * sysdeps/s390/s390-32/s390-mcount.S: ...here. - * sysdeps/s390/strcpy.S: Move to... - * sysdeps/s390/s390-32/strcpy.S: ...here. - * sysdeps/s390/strncpy.S: Move to... - * sysdeps/s390/s390-32/strncpy.S: ...here. - * sysdeps/s390/sub_n.S: Move to... - * sysdeps/s390/s390-32/sub_n.S: ...here. - -2001-03-13 Martin Schwidefsky - - * sysdeps/s390/s390-64/Dist: New file. - * sysdeps/s390/s390-64/Implies: New file. - * sysdeps/s390/s390-64/Makefile: New file. - * sysdeps/s390/s390-64/__longjmp.c: New file. - * sysdeps/s390/s390-64/add_n.S: New file. - * sysdeps/s390/s390-64/atomicity.h: New file. - * sysdeps/s390/s390-64/backtrace.c: New file. - * sysdeps/s390/s390-64/bcopy.S: New file. - * sysdeps/s390/s390-64/bits/byteswap.h: New file. - * sysdeps/s390/s390-64/bits/huge_val.h: New file. - * sysdeps/s390/s390-64/bits/setjmp.h: New file. - * sysdeps/s390/s390-64/bits/string.h: New file. - * sysdeps/s390/s390-64/bsd-_setjmp.S: New file. - * sysdeps/s390/s390-64/bsd-setjmp.S: New file. - * sysdeps/s390/s390-64/bzero.S: New file. - * sysdeps/s390/s390-64/dl-machine.h: New file. - * sysdeps/s390/s390-64/elf/bsd-_setjmp.S: New file. - * sysdeps/s390/s390-64/elf/bsd-setjmp.S: New file. - * sysdeps/s390/s390-64/elf/setjmp.S: New file. - * sysdeps/s390/s390-64/elf/start.S: New file. - * sysdeps/s390/s390-64/ffs.c: New file. - * sysdeps/s390/s390-64/initfini.c: New file. - * sysdeps/s390/s390-64/memchr.S: New file. - * sysdeps/s390/s390-64/memcpy.S: New file. - * sysdeps/s390/s390-64/memset.S: New file. - * sysdeps/s390/s390-64/s390x-mcount.S: New file. - * sysdeps/s390/s390-64/setjmp.S: New file. - * sysdeps/s390/s390-64/strcpy.S: New file. - * sysdeps/s390/s390-64/strncpy.S: New file. - * sysdeps/s390/s390-64/sub_n.S: New file. - * sysdeps/s390/s390-64/sysdep.h: New file. - -2001-03-13 Martin Schwidefsky - - * scripts/config.guess: Add support for Linux on 64 bit S/390. - * scripts/config.sub: Likewise. - -2001-03-13 Martin Schwidefsky - - * configure.in: Add support for 64 bit S/390. - - * elf/elf.h: Add new relocations for 64 bit S/390. - - * shlib-versions: Add rules for Linux on 64 bit S/390. - -2001-03-13 Martin Schwidefsky - - * sysdeps/s390/__longjmp.c: Move to... - * sysdeps/s390/s390-32/__longjmp.c: ...here. Add code - to load the floating point registers that should be saved - according to the ABI. - - * sysdeps/s390/bits/setjmp.h: Move to... - * sysdeps/s390/s390-32/bits/setjmp.h: ...here. Avoid - the use of long long in the __jmp_buf type definition. - - * sysdeps/s390/bits/string.h: Move to... - * sysdeps/s390/s390-32/bits/string.h: ...here. Add several missing - #ifndef _FORCE_INLINES. - - * sysdeps/s390/dl-machine.h: Move to... - * sysdeps/s390/s390-32/dl-machine.h: ...here. Add a check for the - executables EI_CLASS in elf_machine_matches_host. - - * sysdeps/s390/elf/setjmp.S: Move to... - * sysdeps/s390/s390-32/elf/setjmp.S: ...here. Replace - branches to globally defined symbol __sigsetjmp by branches to - a local label (this avoids the generation of a R_390_PC16DBL - relocation in -fpic code). - - * sysdeps/s390/gmp-mparam.h: Use defines from to - calculate BITS_PER_MP_LIMB, BYTES_PER_MP_LIMB and BITS_PER_LONGINT. - - * sysdeps/s390/initfini.c: Move to... - * sysdeps/s390/s390-32/initfini.c: ...here. Replace ALIGN with - ".align 4,0x07". - - * sysdeps/s390/setjmp.S: Move to... - * sysdeps/s390/s390-32/setjmp.S: ...here. Add code to store the - floating point registers that should be saved according to the ABI. - - * sysdeps/s390/sys/ucontext.h: Remove since it is unused. - - * sysdeps/unix/sysv/linux/s390/sysdep.h: Move to... - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: ...here. Include - sysdeps/s390/s390-32/sysdep.h instead of sysdeps/s390/sysdep.h. - -2001-03-13 Martin Schwidefsky - - * configure.in: Change machine=s390 to machine=s390/s390-32. - - * elf/elf.h: Correct comment for R_390_PLT16DBL. - -2001-03-12 Jakub Jelinek - - * csu/Makefile (abi-tag.h): Define OS and version separately, allow - version to be overriden from config.h. - * csu/abi-note.S: Use OS and version separately, include config.h. - * elf/dl-load.c (_dl_osversion): New. - (_dl_map_object_from_fd): Kill some warnings. - (open_verify): Check .note.ABI-tag of the library if present. - * elf/Makefile (CPPFLAGS-dl-load.c): Add -I$(csu-objpfx). - * elf/cache.c (struct cache_entry): Add osversion. - (print_entry): Print osversion. - (print_cache): Pass osversion to it. - (compare): Sort according to osversion. - (save_cache): Set osversion. - (add_to_cache): Add osversion argument. - * sysdeps/generic/ldconfig.h (add_to_cache, process_file, - process_elf_file): Add osversion argument. - * elf/readlib.c (process_file): Likewise. - * sysdeps/generic/readelflib.c (process_elf_file): Likewise. - * sysdeps/unix/sysv/linux/ia64/readelflib.c (process_elf_file, - process_elf32_file, process_elf64_file): Likewise. - * sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file, - process_elf32_file, process_elf64_file): Likewise. - * sysdeps/unix/sysv/linux/sparc/readelflib.c (process_elf_file, - process_elf32_file, process_elf64_file): Likewise. - * elf/ldconfig.c (manual_link): Pass it. - (search_dir): Issue diagnostic if two libs with the same soname in - the same directory have different .note.ABI-tag. Record osversion in - dlib_entry and use it from there. - (struct lib_entry): Remove. - (struct dlib_entry): Add osversion. - * sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Check - osversion. - * sysdeps/generic/dl-cache.h (struct file_entry_new): Replace __unused - field with osversion. - * sysdeps/generic/ldsodefs.h (_dl_osversion): Declare. - * sysdeps/unix/sysv/linux/init-first.c: Include ldsodefs.h. - * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Save kernel - version in _dl_osversion. - * sysdeps/unix/sysv/linux/configure.in: Define __ABI_TAG_VERSION. - * Makerules (build-shlib-helper, build-module-helper): New. - (build-shlib, build-module-helper): Make sure .note.ABI-tag comes - early. - * config.h.in (__ABI_TAG_VERSION): Add. - * elf/dl-minimal.c (__strtoul_internal): Set endptr on return. - * sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS): - Handle LD_ASSUME_KERNEL. - * sysdeps/unix/sysv/linux/dl-librecon.h: New. - -2001-03-15 Ulrich Drepper - - * timezone/antarctica: Update from tzdata2001a. - * timezone/asia: Likewise. - * timezone/australasia: Likewise. - * timezone/backward: Likewise. - * timezone/etcetera: Likewise. - * timezone/europe: Likewise. - * timezone/leapseconds: Likewise. - * timezone/northamerica: Likewise. - * timezone/southamerica: Likewise. - * timezone/systemv: Likewise. - * timezone/yearistype: Likewise. - * timezone/zone.tab: Likewise. - * timezone/tzdump.c: Update from tzcode2001a. - -2001-03-15 H.J. Lu - - * intl/Makefile: Fix a typo. - -2001-03-14 David Mosberger - - * gmon/gmon.c (write_call_graph): Avoid unaligned accesses when - writing arc structures. - -2001-03-15 H.J. Lu - - * elf/Makefile ($(objpfx)tst-pathopt.out): Protected against - cross-compiling. - -2001-03-13 Andreas Schwab - - * posix/PTESTS2C.sed: Replace literal CRs by `\r'. - -2001-03-15 Ulrich Drepper - - * sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Fix test - for control message fitting into message data. - Patch by James Antill . - - * posix/tst-fnmatch.input: Add test case for FNM_PERIOD handling with - FNM_EXTMATCH. - - * posix/fnmatch_loop.c: Optimize handling of ?() and @(). - * posix/fnmatch.c: Define STRLEN and STRCAT appropriately. - - * posix/Versions [libc] (GLIBC_2.2.3): Add fnmatch. - * posix/fnmatch.c: Define with new default version GLIBC_2.2.3 to - avoid running binaries with libc versions without FNM_EXTMATCH support. - - * include/wchar.h: Add prototype for __wcscat. - * wcsmbs/wcscat.c: Define __wcscat and make wcscat weak alias. - - * posix/fnmatch.h (FNM_EXTMATCH): Define. - * posix/fnmatch.c (NO_LEADING_PERIOD): Define. - (posixly_correct): Move global variable here. - (INT, EXT, END): Name new functions defined in fnmatch_loop.c. - (fnmatch): Pretty printing. - * posix/fnmatch_loop.c: Add code to handle FNM_EXTMATCH. - * posix/tst-fnmatch.c: Recognize EXTMATCH flag. - * posix/tst-fnmatch.input: Add tests for extended matching. - - * posix/testfnm.c: Add test for patterns with multiple ** before /. - * posix/fnmatch_loop.c: Fix problem with the test above. - -2001-03-14 Ulrich Drepper - - * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Remove - reference to usqrt. - - * resolv/res_data.c (fp_nquery): Call __res_ninit not __res_init. - -2001-03-12 Andreas Jaeger - - * sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file): - Use EM_X86_64 instead of EM_X8664. - -2001-03-12 Ulrich Drepper - - * sysdeps/ieee754/dbl-64/upow.h: Define nZERO and nINF. - - * sysdeps/ieee754/dbl-64/e_remainder.c: Fix handling of boundary - conditions. - - * sysdeps/ieee754/dbl-64/e_pow.c: Fix handling of boundary - conditions. - - * sysdeps/ieee754/dbl-64/s_sin.c (__sin): Handle Inf and NaN - correctly. - (__cos): Likewise. - - * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Handle NaN - correctly. - (__ieee754_acos): Likewise. - -2001-03-12 Andreas Jaeger - - * sysdeps/unix/sysv/linux/s390/sysdep.h (_LINUX_S390_SYSDEP_H): - Fix typo. Patch by Martin Schwidefsky . - * sysdeps/s390/bits/string.h: Protect __STRING_INLINE against - redefinition. - -2001-03-11 Roland McGrath - - * sysdeps/mach/hurd/configure.in: Add a sanity check on $prefix. - -2001-03-11 Ulrich Drepper - - * sysdeps/ieee754/dbl-64/endian.h: Define also one of BIG_ENDI and - LITTLE_ENDI. - - * sysdeps/ieee754/dbl-64/MathLib.h (Init_Lib): Use void as - parameter list. - - Last-bit accurate math library implementation by IBM Haifa. - Contributed by Abraham Ziv , Moshe Olshansky - , Ealan Henis , and - Anna Reitman . - * math/Makefile (dbl-only-routines): New variable. - (libm-routines): Add $(dbl-only-routines). - * sysdeps/ieee754/dbl-64/e_acos.c: Empty, definition is in e_asin.c. - * sysdeps/ieee754/dbl-64/e_asin.c: Replaced with accurate asin - implementation. - * sysdeps/ieee754/dbl-64/e_atan2.c: Replaced with accurate atan2 - implementation. - * sysdeps/ieee754/dbl-64/e_exp.c: Replaced with accurate exp - implementation. - * sysdeps/ieee754/dbl-64/e_lgamma_r.c: Don't use __kernel_sin and - __kernel_cos. - * sysdeps/ieee754/dbl-64/e_log.c: Replaced with accurate log - implementation. - * sysdeps/ieee754/dbl-64/e_remainder.c: Replaced with accurate - remainder implementation. - * sysdeps/ieee754/dbl-64/e_pow.c: Replaced with accurate pow - implementation. - * sysdeps/ieee754/dbl-64/e_sqrt.c: Replaced with accurate sqrt - implementation. - * sysdeps/ieee754/dbl-64/k_cos.c: Empty, definition is in s_sin.c. - * sysdeps/ieee754/dbl-64/k_sin.c: Empty, definition is in s_sin.c. - * sysdeps/ieee754/dbl-64/s_atan.c: Replaced with accurate atan - implementation. - * sysdeps/ieee754/dbl-64/s_cos.c: Empty, definition is in s_sin.c. - * sysdeps/ieee754/dbl-64/s_sin.c: Replaced with accurate sin/cos - implementation. - * sysdeps/ieee754/dbl-64/s_sincos.c: Rewritten to not use __kernel_sin - and __kernel_cos. - * sysdeps/ieee754/dbl-64/s_tan.c: Replaced with accurate tan - implementation. - * sysdeps/ieee754/dbl-64/Dist: Add new non-code files. - * sysdeps/ieee754/dbl-64/MathLib.h: New file. - * sysdeps/ieee754/dbl-64/asincos.tbl: New file. - * sysdeps/ieee754/dbl-64/atnat.h: New file. - * sysdeps/ieee754/dbl-64/atnat2.h: New file. - * sysdeps/ieee754/dbl-64/branred.c: New file. - * sysdeps/ieee754/dbl-64/branred.h: New file. - * sysdeps/ieee754/dbl-64/dla.h: New file. - * sysdeps/ieee754/dbl-64/doasin.c: New file. - * sysdeps/ieee754/dbl-64/doasin.h: New file. - * sysdeps/ieee754/dbl-64/dosincos.c: New file. - * sysdeps/ieee754/dbl-64/dosincos.h: New file. - * sysdeps/ieee754/dbl-64/endian.h: New file. - * sysdeps/ieee754/dbl-64/halfulp.c: New file. - * sysdeps/ieee754/dbl-64/mpa.c: New file. - * sysdeps/ieee754/dbl-64/mpa.h: New file. - * sysdeps/ieee754/dbl-64/mpa2.h: New file. - * sysdeps/ieee754/dbl-64/mpatan.c: New file. - * sysdeps/ieee754/dbl-64/mpatan.h: New file. - * sysdeps/ieee754/dbl-64/mpatan2.c: New file. - * sysdeps/ieee754/dbl-64/mpexp.c: New file. - * sysdeps/ieee754/dbl-64/mpexp.h: New file. - * sysdeps/ieee754/dbl-64/mplog.c: New file. - * sysdeps/ieee754/dbl-64/mplog.h: New file. - * sysdeps/ieee754/dbl-64/mpsqrt.c: New file. - * sysdeps/ieee754/dbl-64/mpsqrt.h: New file. - * sysdeps/ieee754/dbl-64/mptan.c: New file. - * sysdeps/ieee754/dbl-64/mydefs.h: New file. - * sysdeps/ieee754/dbl-64/powtwo.tbl: New file. - * sysdeps/ieee754/dbl-64/root.tbl: New file. - * sysdeps/ieee754/dbl-64/sincos.tbl: New file. - * sysdeps/ieee754/dbl-64/sincos32.c: New file. - * sysdeps/ieee754/dbl-64/sincos32.h: New file. - * sysdeps/ieee754/dbl-64/slowexp.c: New file. - * sysdeps/ieee754/dbl-64/slowpow.c: New file. - * sysdeps/ieee754/dbl-64/uasncs.h: New file. - * sysdeps/ieee754/dbl-64/uatan.tbl: New file. - * sysdeps/ieee754/dbl-64/uexp.h: New file. - * sysdeps/ieee754/dbl-64/uexp.tbl: New file. - * sysdeps/ieee754/dbl-64/ulog.h: New file. - * sysdeps/ieee754/dbl-64/ulog.tbl: New file. - * sysdeps/ieee754/dbl-64/upow.h: New file. - * sysdeps/ieee754/dbl-64/upow.tbl: New file. - * sysdeps/ieee754/dbl-64/urem.h: New file. - * sysdeps/ieee754/dbl-64/uroot.h: New file. - * sysdeps/ieee754/dbl-64/usncs.h: New file. - * sysdeps/ieee754/dbl-64/utan.h: New file. - * sysdeps/ieee754/dbl-64/utan.tbl: New file. - * sysdeps/i386/fpu/branred.c: New file. - * sysdeps/i386/fpu/doasin.c: New file. - * sysdeps/i386/fpu/dosincos.c: New file. - * sysdeps/i386/fpu/halfulp.c: New file. - * sysdeps/i386/fpu/mpa.c: New file. - * sysdeps/i386/fpu/mpatan.c: New file. - * sysdeps/i386/fpu/mpatan2.c: New file. - * sysdeps/i386/fpu/mpexp.c: New file. - * sysdeps/i386/fpu/mplog.c: New file. - * sysdeps/i386/fpu/mpsqrt.c: New file. - * sysdeps/i386/fpu/mptan.c: New file. - * sysdeps/i386/fpu/sincos32.c: New file. - * sysdeps/i386/fpu/slowexp.c: New file. - * sysdeps/i386/fpu/slowpow.c: New file. - * sysdeps/ia64/fpu/branred.c: New file. - * sysdeps/ia64/fpu/doasin.c: New file. - * sysdeps/ia64/fpu/dosincos.c: New file. - * sysdeps/ia64/fpu/halfulp.c: New file. - * sysdeps/ia64/fpu/mpa.c: New file. - * sysdeps/ia64/fpu/mpatan.c: New file. - * sysdeps/ia64/fpu/mpatan2.c: New file. - * sysdeps/ia64/fpu/mpexp.c: New file. - * sysdeps/ia64/fpu/mplog.c: New file. - * sysdeps/ia64/fpu/mpsqrt.c: New file. - * sysdeps/ia64/fpu/mptan.c: New file. - * sysdeps/ia64/fpu/sincos32.c: New file. - * sysdeps/ia64/fpu/slowexp.c: New file. - * sysdeps/ia64/fpu/slowpow.c: New file. - * sysdeps/m68k/fpu/branred.c: New file. - * sysdeps/m68k/fpu/doasin.c: New file. - * sysdeps/m68k/fpu/dosincos.c: New file. - * sysdeps/m68k/fpu/halfulp.c: New file. - * sysdeps/m68k/fpu/mpa.c: New file. - * sysdeps/m68k/fpu/mpatan.c: New file. - * sysdeps/m68k/fpu/mpatan2.c: New file. - * sysdeps/m68k/fpu/mpexp.c: New file. - * sysdeps/m68k/fpu/mplog.c: New file. - * sysdeps/m68k/fpu/mpsqrt.c: New file. - * sysdeps/m68k/fpu/mptan.c: New file. - * sysdeps/m68k/fpu/sincos32.c: New file. - * sysdeps/m68k/fpu/slowexp.c: New file. - * sysdeps/m68k/fpu/slowpow.c: New file. - - * iconvdata/gconv-modules: Add a number of alias, mostly for IBM - codepages. - -2001-03-11 Andreas Jaeger - - * elf/elf.h (EM_*): Synch with official list. - -2001-03-07 David Mosberger - - * sysdeps/ia64/bits/fenv.h (FE_NONIEEE_ENV): New macro. - -2001-03-07 Jes Sorensen - - * sysdeps/unix/sysv/linux/ia64/ioperm.c (_ioperm): Remove unused - variables addr & len. - -2001-02-22 Jes Sorensen - - * sysdeps/ia64/fpu/feenablxcpt.c (feenableexcept): Remove - punctuation in asm constraint. - -2001-03-07 Mark Kettenis - - * resolv/netdb.h [__USE_GNU]: Define __need_timespec and include - to get definition of `struct timespec'. - -2001-03-08 Jakub Jelinek - - * elf/rtld.c (dl_main): If tracing, warn about undefined symbols if - LD_WARN=1, not if LD_WARN is unset. - -2001-03-07 Andreas Schwab - - * elf/ldconfig.h: Moved to ... - * sysdeps/generic/ldconfig.h: ... here. - * sysdeps/unix/sysv/linux/i386/ldconfig.h: New file. - * sysdeps/unix/sysv/linux/m68k/ldconfig.h: New file. - * sysdeps/unix/sysv/linux/ia64/ldconfig.h: New file. - * elf/readlib.c (interpreters, known_libs): Use - SYSDEP_KNOWN_INTERPRETER_NAMES and SYSDEP_KNOWN_LIBRARY_NAMES - instead of hard coding old names. - -2001-03-09 Ulrich Drepper - - * catgets/Makefile (generated): Add test-gencat.h. - (sample.SJIS.cat): Also generate header. - * catgets/sample.SJIS: Add new set and message, both with symbolic - names. - * catgets/test-gencat.sh: Also compare generated header with what - we expect. - -2001-03-07 Jakub Jelinek - - * catgets/gencat.c (read_input_file): Preserve properly symbolic - names. - -2001-03-06 Andreas Jaeger - - * sysdeps/s390/dl-machine.h (elf_machine_relplt): Removed, it's not - needed. - (elf_machine_pltrel_p): Likewise. - * sysdeps/powerpc/dl-machine.h: Likewise. - * sysdeps/generic/dl-machine.h (elf_machine_pltrel_p): Likewise. - -2001-03-09 Ulrich Drepper - - * sysdeps/unix/sysv/linux/arm/Dist: Add dl-procinfo.c and - dl-procinfo.h. - -2001-03-05 Philip Blundell - - * sysdeps/unix/sysv/linux/arm/dl-procinfo.c: New file. - * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: New file. - * sysdeps/unix/sysv/linux/arm/Makefile [subdir=elf] - (sysdep-dl-routines, sysdep_routines, sysdep-rtld-routines): Add - dl-procinfo. - -2001-03-09 Ulrich Drepper - - * dlfcn/tstatexit.c (main): Don't perform the test if __dso_handle - is not available. - * dlfcn/tstcxaatexit.c (main): Likewise. - -2001-03-10 Andreas Jaeger - - * sysdeps/i386/fpu/libm-test-ulps: Revert last patch. - -2001-03-09 Andreas Jaeger - - * sysdeps/s390/dl-machine.h (elf_machine_matches_host): Handle - both new and old EM_S390 values. - (EM_S390_OLD): New constant. - - * elf/elf.h (EM_S390): Use official value. - -2001-03-09 Ulrich Drepper - - * conform/data/sys/socket.h-data: Allow SO* symbols. - -2001-03-07 Andreas Schwab - - * sysdeps/ia64/fpu/Makefile: Modify sysdep_routines instead of - routines, and sysdep-CPPFLAGS instead of CPPFLAGS. - -2001-03-07 Andreas Jaeger - - * resolv/Makefile (routines): Only build gai_sigqueue when threads - are available. - -2001-03-07 Jakub Jelinek - - * elf/ldconfig.c (_dl_sysdep_message): Remove. - * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Include - ldsodefs.h. - * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. - - * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Use - _dl_error_printf instead of _dl_sysdep_error. - * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h (_dl_procinfo): - Use _dl_printf instead of _dl_sysdep_message. - * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h (_dl_procinfo): - Likewise. - -2001-03-06 Ben Collins - - * manual/arith.texi (Integers): Fix documentation of fast and - least integer typedefs. - -2001-03-06 Jakub Jelinek - - * resolv/Depend: New file. - * resolv/Makefile (extra-libs, tests): Build libanl and ga_test only - when libpthread is built. - -2001-03-06 Andreas Jaeger - - * sysdeps/i386/fpu/libm-test-ulps: Add some deltas. - - * sysdeps/sh/dl-machine.h (elf_machine_rela): Add missing comma. - Patch by kaz Kojima . - -2001-03-05 Ulrich Drepper - - * stdlib/Versions: Remove __new_exitfn again. Not needed. - -2001-03-05 Andreas Jaeger - - * stdlib/msort.c (qsort): Don't use alloca in a function call. - -2001-03-05 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/stat.h (__S_TYPEISMQ, __S_TYPEISSEM, - __S_TYPEISSHM): Rewrite to enforce correct use the macros. They still - always return zero. - * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise. - -2001-03-04 Andreas Jaeger - - * stdlib/longlong.h: Don't use multi-line strings. - * iconvdata/tst-loading.c: Likewise. - - * csu/Makefile ($(objpfx)version-info.h): Don't use multi-line - string. - -2001-03-04 Ulrich Drepper - - * sysdeps/ia64/fpu/libm-test-ulps: Adjust for addition of lgammal. - - * rt/lio_listio.c: Add a few asserts. - - * elf/global.c: New file. - * elf/globalmod1.c: New file. - * elf/Makefile: Add rules to build and run global. - - * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Define SI_ASYNCNL. - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. - - * sysdeps/ieee754/ldbl-96/e_lgammal_r.c: New file. - Contributed by Stephen L. Moshier . - - * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Fix handling of boundary cases. - - * sysdeps/ieee754/dbl-64/e_gamma_r.c: Always initialize sign variable. - * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. - - * sysdeps/i386/fpu/libm-test-ulps: Adjust after addition of lgammal. +2001-09-08 H.J. Lu - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Fix typo in last change. + * po/zh_TW.po: Fix a typo. -2001-03-04 Andreas Jaeger +2001-09-07 Tom Rix - * resolv/tst-aton.c: Add testcase for IP with four periods. + * sysdeps/unix/sysv/aix/sysv_termio.h: New file. - * resolv/inet_addr.c: Don't recognize an IP with four periods. - Patch by Andre' Breiler . +2001-08-26 Tom Rix -2001-02-27 Philip Blundell + * sysdeps/unix/sysv/aix/Makefile (aix-syscalls.o): More linker + command line options. + * sysdeps/unix/sysv/aix/start.s: New file, rework of start.c + * sysdeps/unix/sysv/aix/start.c: Removed. + * sysdeps/unix/sysv/aix/start-libc.c: New file. + * sysdeps/unix/sysv/aix/init-first.c: New file. + * sysdeps/unix/sysv/aix/fcntl.c: Alias __libc_fcntl to __fcntl. - * elf/elf.h: Add new ARM definitions from latest (B-01) - specification. Correct naming of EF_ARM_ALIGN8 et al. +2001-09-08 Ben Collins -2001-03-04 Ulrich Drepper + * sysdeps/arm/dl-machine.h: Fix usage of new _dl_signal_error() format. + * sysdeps/generic/dl-machine.h: Likewise. + * sysdeps/hppa/dl-fptr.c: Likewise. + * sysdeps/ia64/dl-fptr.c: Likewise. + * sysdeps/mach/hurd/dl-sysdep.c: Likewise. + * sysdeps/mips/dl-machine.h: Likewise. + * sysdeps/mips/mips64/dl-machine.h: Likewise. + * sysdeps/powerpc/dl-machine.c: Likewise. - * stdio-common/tst-printf.sh: Remove bashisms. - Patch by Matthew Clarke . +2001-09-07 Ben Collins -2001-03-03 Ulrich Drepper + * sysdeps/sparc/sparc32/dl-machine.h: Fix typo. - * Versions.def: Add libanl definition. - * shlib-versions: Add entry for libanl. - * resolv/Makefile (distribute): Add gai_misc.h and ga_test.c. - (routines): Add gai_sigqueue. - (extra-libs): Add libanl. - (libanl-routines): New variable. - Add rules to build libanl and ga_test. - * resolv/Versions [libc] (GLIBC_2.2.3): Add __gai_sigqueue. - [libanl]: New library. - * resolv/netdb.h: Add definitions for libanl. - * resolv/getaddrinfo_a.c: New file. - * resolv/gai_cancel.c: New file. - * resolv/gai_error.c: New file. - * resolv/gai_misc.c: New file. - * resolv/gai_misc.h: New file. - * resolv/gai_notify.c: New file. - * resolv/gai_suspend.c: New file. - * resolv/ga_test.c: New file. - * sysdeps/generic/gai_sigqueue.c: New file. - * sysdeps/unix/sysv/linux/gai_sigqueue.c: New file. - * sysdeps/generic/bits/siginfo.h: Allow __need_sigevent_t being defined - and provide only that definition. - * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. + * sysdeps/hppa/dl-lookupcfg.h: Forward declare struct link_map. - * rt/aio_misc.c: Fix typos in comments. - * rt/lio_listio.c: Pretty printing. Little optimization in request - list handling. +2001-09-08 Ulrich Drepper - * elf/rtld.c: Remove commented out code. + * elf/dl-lookup.c (add_dependency): Bump l_opencount of all + dependencies if necessary. - * sysdeps/unix/sysv/linux/linux_fsinfo.h (SHMFS_SUPER_MAGIC): - Update for real 2.4 kernels. + * elf/dl-close.c (_dl_close): If object has no r_list (i.e., wasn't + loaded directly) determine length if l_initfini list by iterating + over its elements. Minor optimizations. + * elf/dl-deps.c (_dl_map_object_deps): Always add own map to l_initfini + for dependency objects. + If object was already loaded check whether any of the dependencies + is already on the relocation dependency list. If yes, remove the + latter. Minor optimizations. + * elf/dl-lookup.c (add_dependency): Add check for self reference of + maps here. Search l_initfini list only if the object was loaded + directly and not only as a dependency. + (_dl_lookup_symbol): Add relocation dependency also if object + is not in global scope. Remove test for self-reference here. + (_dl_lookup_versioned_symbol): Likewise. + * elf/dl-object (_dl_new_object): Cleanup. Initialize dont_free + element of first name record. + * elf/loadtest.c: Add some more test to recognize early if an object + wasn't unloaded. + * elf/Makefile: Add rules to build and run reldep5. + * elf/reldep5.c: New file. + * elf/reldepmod5.c: New file. + * elf/reldepmod6.c: New file. -2001-03-01 Ulrich Drepper + * elf/reldep2.c: Fix typo. - * elf/dl-load.c: Pretty printing. +2001-09-07 Ulrich Drepper - * elf/dl-object.c (_dl_new_object): Don't add the loader's scope - twice. + * include/link.h (struct link_map): Add l_scope_mem and l_scope_max + elements. Change l_scope to be a pointer only. + * elf/dl-object.c (_dl_new_object): Initialize l_scope and l_scope_max. + * elf/dl-open.c (dl_open_worker): If dependency wasn't just opened + here add searchlist of newly open file to the dependency's scope. + * elf/dl-close.c (_dl_close): If dependency is used otherwise remove + only searchlist from its scope. Free own scope array if necessary. + * elf/Makefile (tests): Add dblload and dblunload now. -2001-02-28 Ulrich Drepper +2001-09-06 Andreas Jaeger - * sysdeps/alpha/dl-machine.h (elf_machine_rela): Don't handle - relocations which are not in ld.so if RTLD_BOOTSTRAP is defined. + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c: New file, contributed + Stephen L Moshier. - * sysdeps/powerpc/dl-machine.c (__process_machine_rela): Fix typo. +2001-09-05 Ulrich Drepper - * elf/dl-misc.c (_dl_debug_vdprintf): Fix typo visible on 64-bit - machines. + * elf/Makefile: Add rules to build new tests. Don't run them yet since + they both fail. + * elf/dblload.c: New file. + * elf/dblloadmod1.c: New file. + * elf/dblloadmod2.c: New file. + * elf/dblloadmod3.c: New file. + * elf/dblunload.c: New file. - * sysdeps/unix/sysv/linux/powerpc/sysdep.h (C_TEXT): Define. +2001-09-04 Richard Henderson -2001-02-27 Ulrich Drepper + * elf/elf.h (R_ALPHA_OP_*, R_ALPHA_IMMED_*): Remove. + (R_ALPHA_GPREL16): Rename from R_ALPHA_IMMED_GP_16. - * sysdeps/powerpc/elf/libc-start.c: Use new output functions and - _dl_debug_mask. +2001-09-04 Ulrich Drepper - * elf/Versions [ld]: Don't export _dl_debug_message anymore. Export - _dl_debug_printf. - * elf/dl-misc.c: Remove definition of _dl_sysdep_output and - _dl_debug_message. Define _dl_debug_vdprintf, _dl_debug_printf, - _dl_debug_printf_c, and _dl_printf. - * sysdeps/generic/ldsodefs.h: Don't declare _dl_sysdep_output, - _dl_debug_message, _dl_sysdep_message, _dl_sysdep_error, and - _dl_sysdep_fatal. Declare _dl_debug_printf, _dl_debug_printf_c, - _dl_printf, _dl_error_printf, and _dl_fatal_printf. - * elf/dl-close.c: Replace use of old output functions with the new - ones. + Correct very misleading message for error in failed runtime relocation. + * elf/dl-error.c (_dl_signal_error): Take extra parameter to describe + place of the error. + (_dl_signal_cerror): Likewise. + * sysdeps/generic/ldsodefs.h: Adjust prototypes. + * elf/dl-close.c: Likewise. * elf/dl-deps.c: Likewise. - * elf/dl-error.c: Likewise. - * elf/dl-fini.c: Likewise. - * elf/dl-init.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. - * elf/dl-minimal.c: Likewise. * elf/dl-open.c: Likewise. - * elf/dl-profile.c: Likewise. * elf/dl-reloc.c: Likewise. + * elf/dl-sym.c: Likewise. * elf/dl-version.c: Likewise. - * elf/do-lookup.h: Likewise. - * elf/rtld.c: Likewise. - * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. - * sysdeps/generic/libc-start.c: Likewise. - * sysdeps/i386/dl-machine.h: Likewise. - * sysdeps/arm/dl-machine.h: Likewise. - * sysdeps/hppa/dl-machine.h: Likewise. - * sysdeps/m68k/dl-machine.h: Likewise. - * sysdeps/powerpc/dl-machine.h: Likewise. - * sysdeps/s390/dl-machine.h: Likewise. - * sysdeps/sh/dl-machine.h: Likewise. - * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. - * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. - * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise. - - * sysdeps/generic/ldsodefs.h: Remove _dl_secure declaration. - - * dlfcn/Makefile: Don't run tstatexit test unless .hidden is - supported by assembler. - - * sysdeps/generic/ldsodefs.h: Remove commented-out variable - declaractions. - - * elf/rtld.c: Little optimizations in handling _dl_lazy. - - * elf/cache.c (save_cache): Portability changes. - * elf/dl-profile.c (_dl_start_profile): Likewise. - - * elf/sln.c: Cleanups. Remove arbitrary limits. - - * elf/dl-close.c: Replace _dl_debug_* variables with _dl_debug_mask. - * elf/dl-deps.c: Likewise. - * elf/dl-fini.c: Likewise. - * elf/dl-init.c: Likewise. - * elf/dl-load.c: Likewise. - * elf/dl-lookup.c: Likewise. - * elf/dl-open.c: Likewise. - * elf/dl-reloc.c: Likewise. - * elf/dl-support.c: Likewise. - * elf/dl-version.c: Likewise. - * elf/do-lookup.h: Likewise. - * elf/rtld.c: Likewise. - * sysdeps/generic/dl-cache.c: Likewise. - * sysdeps/generic/ldsodefs.h: Likewise. - * sysdeps/generic/libc-start.c: Likewise. - * elf/Versions: Don't export _dl_debug_impcalls and _dl_debug_files. - Export _dl_debug_mask. - * Versions.def: Define GLIBC_2.2.3 for ld. - -2001-02-26 Greg McGary - - * sysdeps/unix/make-syscalls.sh (ptr): Handle `V' keyletter. - -2001-02-26 Paul Eggert - - Modify mkstemp.c and tempname.c so that they can be used by - GNU applications on non-glibc platforms. - - * misc/mkstemp.c (__GT_FILE): Define to zero if not defined. - - * sysdeps/posix/tempname.c: Include if HAVE_CONFIG_H. - Include , , only if - STDC_HEADERS || _LIBC. - Include only if HAVE_FCNTL_H || _LIBC. - Include only if HAVE_UNISTD_H || _LIBC. - Include only if HAVE_SYS_TIME_H || _LIBC. - (__set_errno): Define this macro if doesn't. - (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE): - Define these macros if doesn't. - (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR): - Define these macros if doesn't. - Ignore S_ISDIR if STAT_MACROS_BROKEN. - (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, - lxstat64, __xstat64): Define if not _LIBC. - (struct_stat64): New macro. - (direxists, __gen_tempname): Use it, to avoid a - portability problem with Solaris 8. - (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC). - (__gen_tempname): Invoke gettimeofday only if - HAVE_GETTIMEOFDAY || _LIBC; otherwise, fall back on plain "time". - Use portable macros like S_IRUSR | S_IWUSR rather than nonportable - octal values like 0600. - -2001-02-26 Ulrich Drepper - - * sysdeps/ieee754/ldbl-96/e_jnl.c: New file. - Contributed by Stephen L. Moshier . - - * sysdeps/i386/fpu/libm-test-ulps: Update for jnl and ynl introduction. - * sysdeps/ia64/fpu/libm-test-ulps: Likewise. - - * posix/wordexp-test.c (testit): Remove warnings. - - * dlfcn/Makefile (distribute): Add modatexit.c and modcxaatexit.c. - (tests): Add tstatexit and tstcxaatexit. - (module-names): Add modatexit and modcxaatexit. - Add rules to build and run tstatexit and tstcxaatexit. - * dlfcn/modatexit.c: New file. - * dlfcn/modcxaatexit.c: New file. - * dlfcn/tstatexit.c: New file. - * dlfcn/tstcxaatexit.c: New file. - - * io/Makefile: Pass -DHAVE_DOT_HIDDEN to stat and mknod functions if - .hidden is available. - * io/stat.c: If .hidden is available use it to avoid exporting - functions. - * io/fstat.c: Likewise. - * io/lstat.c: Likewise. - * io/stat64.c: Likewise. - * io/fstat64.c: Likewise. - * io/lstat64.c: Likewise. - * sysdeps/generic/mknod.c: Likewise. - - * malloc/mtrace.c: Use __cxa_atexit and not atexit. - * sysdeps/generic/bb_init_func.c: Likewise. - * sysdeps/generic/libc-start.c: Likewise. - - * stdlib/atexit.c (__new_exitfn): Move to cxa_atexit.c. - (atexit): Implement using __cxa_atexit. - Use .hidden if availble to avoid exporting atexit. - * stdlib/cxa_atexit.c (__new_exitfn): Moved to here from atexit.c. - * stdlib/Versions: Export __new_exitfn for GLIBC_2.2.3. - * stdlib/Makefile (routines): Add old_atexit. - (static-only-routines): Add atexit. - Pass -DHAVE_DOT_HIDDEN for atexit.c if .hidden is available. - * stdlib/old_atexit.c: New file. - - * intl/Makefile: Remove bogus endif. - -2001-02-26 Andreas Jaeger - - * iconvdata/Makefile (tests): Fix typo in last patch. - - * intl/Makefile (tests): Run mtrace-tst-gettext only when perl is - available. - Reported by Achim Gottinger . - -2001-02-25 Andreas Jaeger - - * intl/Makefile (plural.c): Reorder rules so that they work if - BISON doesn't exist. - -2001-02-25 Ulrich Drepper - - * intl/locale.alias: Don't use nb_NO but define aliases for it. - -2001-02-23 Ulrich Drepper - - * sysdeps/i386/strtok.S: Continue to return NULL after the first - time this happened. - -2001-02-23 Andreas Jaeger - - * string/tester.c (test_strtok_r): Add testcase. - (test_strtok_r): Always initialize cp for proper checking. - - * sysdeps/generic/strtok.c (strtok): Handle case of first strtok - returning NULL correctly. - Patch by Fumitoshi UKAI . - * sysdeps/generic/strtok_r.c (__strtok_r): Likewise. - -2001-02-23 Ulrich Drepper - - * sysdeps/unix/sysv/aix/bits/types.h: Define __need_NULL before - including . - * sysdeps/unix/sysv/aix/write.c: Define alias __libc_write. - * include/libc-symbols.h (weak_alias): Don't use .weak if - HAVE_ASM_GLOBAL_DOT_NAME is defined. - Patches by Michael Keezer . - - * sysdeps/generic/ftime.c: Don't include at all. - Patch by Michael Keezer . - - * sysdeps/unix/sysv/aix/Dist: Remove restf.S and savef.S. - * sysdeps/unix/sysv/aix/Makefile [$(subdir) == misc] - (sysdep_routines): Remove restf.S and savef.S. - * sysdeps/unix/sysv/aix/restf.S: Removed. - * sysdeps/unix/sysv/aix/savef.S: Removed. - * sysdeps/powerpc/fprrest.S: Use C_TEXT to define label. Also define - alternative names used on some platforms. - * sysdeps/powerpc/fprsave.S: Likewise. - * sysdeps/powerpc/gprrest0.S: Likewise. - * sysdeps/powerpc/gprrest1.S: Likewise. - * sysdeps/powerpc/gprsave0.S: Likewise. - * sysdeps/powerpc/gprsave1.S: Likewise. - Patch by Michael Keezer . - -2001-02-22 Ulrich Drepper - - * sysdeps/i386/elf/start.S (_fp_hw): Actually define label. - -2001-02-22 Andreas Jaeger - - * string/tst-strtok.c (main): Fix error messages. - -2001-02-22 Andreas Jaeger - - * math/Makefile: Remove omit-long-double-fcts. - -2001-02-18 Maciej W. Rozycki - - * sysdeps/mips/bsd-_setjmp.S (_setjmp): Reorder instructions to - avoid problems on MIPS I. - * sysdeps/mips/bsd-setjmp.S (setjmp): Likewise. - - * sysdeps/mips/dl-machine.h (RTLD_START): Remove duplicate ".set - noreorder". - -2001-02-21 Ulrich Drepper - - * posix/fnmatch_loop.c: Handle ranges outside glibc correctly. - - * sysdeps/generic/ftime.c: Include . - - * configure.in: Don't check for libgd if user passed --without-gd. - Patch by Achim Gottinger . - - * sysdeps/i386/i686/strtok.S: Continue to return NULL after the - first time this happened. - * string/Makefile (tests): Add tst-strtok. - -2001-02-21 Andreas Jaeger - - * string/tst-strtok.c: New testcase, reported by - Andrew Church . - -2001-02-20 Ulrich Drepper - - * libio/iofwide.c: Remove fwide alias. - -2001-02-20 Andreas Jaeger - - * iconvdata/Makefile (tests): Only run mtrace-tst-loading if perl - is available. - Reported by Achim Gottinger . - -2001-02-19 Ulrich Drepper - - * iconv/tst-iconv1.c (main): Remove debugging code. - - * sysdeps/ieee754/flt-32/e_powf.c: Handle x == +-1 correctly. - * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. - - * sysdeps/generic/e_scalb.c: Set invalid exception for invalid - parameters. - * sysdeps/generic/e_scalbf.c: Likewise. - * sysdeps/generic/e_scalbl.c: Likewise. - - * sysdeps/ia64/fpu/Makefile (libm-sysdep-routines): Add libm_error, - libm_frexp4, libm_frexp4f, libm_frexp4l, and all the functions also - in libc. - (routines): Replace libm_error with libc_libm_error. - * sysdeps/ia64/fpu/Dist: Add libc_libm_error.c. - * sysdeps/ia64/fpu/libc_libm_error.c: New file. - -2001-02-18 Mark Kettenis - - * malloc/mtrace.c [USE_IN_LIBIO]: Define fopen as _IO_fopen64. - (mtrace): Revert 2001-02-13 patch: use fopen instead of fopen64. - -2001-02-17 H.J. Lu - - * sysdeps/unix/sysv/linux/ia64/clone2.S: Use clone2 and don't use - scratch registers across the system call. - -2001-02-19 Andreas Jaeger - - * malloc/Makefile (tests): Run mtrace only when perl is available. - Reported by Achim Gottinger . - -2001-02-19 Ulrich Drepper - - * sysdeps/ieee754/ldbl-96/e_j1l.c: New file. - Contributed by Stephen L. Moshier . - - * sysdeps/i386/fpu/libm-test-ulps: Adjust error values for j1 and y1. - * sysdeps/ia64/fpu/libm-test-ulps: Adjust error values for y1. - * math/libm-test.inc (j1_test): Mark constants as long double. - (jn_test): Likewise. - (y1_test): Likewise. - (yn_test): Likewise. - - * libio/iogetline.c: Move return until after last statement. - - * localedata/show-ucs-data.c: Don't show < > for better readability. - - * sysdeps/ia64/fpu/Dist: New file. - * sysdeps/ia64/fpu/Makefile: New file. - * sysdeps/ia64/fpu/Versions: New file. - * sysdeps/ia64/fpu/e_acos.S: New file. - * sysdeps/ia64/fpu/e_acosf.S: New file. - * sysdeps/ia64/fpu/e_acosl.S: New file. - * sysdeps/ia64/fpu/e_asin.S: New file. - * sysdeps/ia64/fpu/e_asinf.S: New file. - * sysdeps/ia64/fpu/e_asinl.S: New file. - * sysdeps/ia64/fpu/e_atan2.S: New file. - * sysdeps/ia64/fpu/e_atan2f.S: New file. - * sysdeps/ia64/fpu/e_atan2l.c: New file. - * sysdeps/ia64/fpu/e_cosh.S: New file. - * sysdeps/ia64/fpu/e_coshf.S: New file. - * sysdeps/ia64/fpu/e_coshl.S: New file. - * sysdeps/ia64/fpu/e_exp.S: New file. - * sysdeps/ia64/fpu/e_expf.S: New file. - * sysdeps/ia64/fpu/e_expl.c: New file. - * sysdeps/ia64/fpu/e_fmod.S: New file. - * sysdeps/ia64/fpu/e_fmodf.S: New file. - * sysdeps/ia64/fpu/e_fmodl.S: New file. - * sysdeps/ia64/fpu/e_hypot.S: New file. - * sysdeps/ia64/fpu/e_hypotf.S: New file. - * sysdeps/ia64/fpu/e_hypotl.S: New file. - * sysdeps/ia64/fpu/e_log.S: New file. - * sysdeps/ia64/fpu/e_log10.c: New file. - * sysdeps/ia64/fpu/e_log10f.c: New file. - * sysdeps/ia64/fpu/e_log10l.c: New file. - * sysdeps/ia64/fpu/e_logf.S: New file. - * sysdeps/ia64/fpu/e_logl.c: New file. - * sysdeps/ia64/fpu/e_pow.S: New file. - * sysdeps/ia64/fpu/e_powf.S: New file. - * sysdeps/ia64/fpu/e_powl.S: New file. - * sysdeps/ia64/fpu/e_rem_pio2.c: New file. - * sysdeps/ia64/fpu/e_rem_pio2f.c: New file. - * sysdeps/ia64/fpu/e_remainder.S: New file. - * sysdeps/ia64/fpu/e_remainderf.S: New file. - * sysdeps/ia64/fpu/e_remainderl.S: New file. - * sysdeps/ia64/fpu/e_scalb.S: New file. - * sysdeps/ia64/fpu/e_scalbf.S: New file. - * sysdeps/ia64/fpu/e_scalbl.S: New file. - * sysdeps/ia64/fpu/e_sinh.S: New file. - * sysdeps/ia64/fpu/e_sinhf.S: New file. - * sysdeps/ia64/fpu/e_sinhl.S: New file. - * sysdeps/ia64/fpu/e_sqrt.S: New file. - * sysdeps/ia64/fpu/e_sqrtf.S: New file. - * sysdeps/ia64/fpu/e_sqrtl.S: New file. - * sysdeps/ia64/fpu/k_rem_pio2.c: New file. - * sysdeps/ia64/fpu/k_rem_pio2f.c: New file. - * sysdeps/ia64/fpu/k_rem_pio2l.c: New file. - * sysdeps/ia64/fpu/libm_atan2_reg.S: New file. - * sysdeps/ia64/fpu/libm_error.c: New file. - * sysdeps/ia64/fpu/libm_frexp4.S: New file. - * sysdeps/ia64/fpu/libm_frexp4f.S: New file. - * sysdeps/ia64/fpu/libm_frexp4l.S: New file. - * sysdeps/ia64/fpu/libm_reduce.S: New file. - * sysdeps/ia64/fpu/libm_support.h: New file. - * sysdeps/ia64/fpu/libm_tan.S: New file. - * sysdeps/ia64/fpu/s_atan.S: New file. - * sysdeps/ia64/fpu/s_atanf.S: New file. - * sysdeps/ia64/fpu/s_atanl.S: New file. - * sysdeps/ia64/fpu/s_cbrt.S: New file. - * sysdeps/ia64/fpu/s_cbrtf.S: New file. - * sysdeps/ia64/fpu/s_cbrtl.S: New file. - * sysdeps/ia64/fpu/s_ceil.S: New file. - * sysdeps/ia64/fpu/s_ceilf.S: New file. - * sysdeps/ia64/fpu/s_ceill.S: New file. - * sysdeps/ia64/fpu/s_cos.S: New file. - * sysdeps/ia64/fpu/s_cosf.S: New file. - * sysdeps/ia64/fpu/s_cosl.S: New file. - * sysdeps/ia64/fpu/s_expm1.S: New file. - * sysdeps/ia64/fpu/s_expm1f.S: New file. - * sysdeps/ia64/fpu/s_expm1l.S: New file. - * sysdeps/ia64/fpu/s_floor.S: New file. - * sysdeps/ia64/fpu/s_floorf.S: New file. - * sysdeps/ia64/fpu/s_floorl.S: New file. - * sysdeps/ia64/fpu/s_frexp.c: New file. - * sysdeps/ia64/fpu/s_frexpf.c: New file. - * sysdeps/ia64/fpu/s_frexpl.c: New file. - * sysdeps/ia64/fpu/s_ilogb.S: New file. - * sysdeps/ia64/fpu/s_ilogbf.S: New file. - * sysdeps/ia64/fpu/s_ilogbl.S: New file. - * sysdeps/ia64/fpu/s_ldexp.S: New file. - * sysdeps/ia64/fpu/s_ldexpf.S: New file. - * sysdeps/ia64/fpu/s_ldexpl.S: New file. - * sysdeps/ia64/fpu/s_log1p.S: New file. - * sysdeps/ia64/fpu/s_log1pf.S: New file. - * sysdeps/ia64/fpu/s_log1pl.S: New file. - * sysdeps/ia64/fpu/s_logb.S: New file. - * sysdeps/ia64/fpu/s_logbf.S: New file. - * sysdeps/ia64/fpu/s_logbl.S: New file. - * sysdeps/ia64/fpu/s_matherrf.c: New file. - * sysdeps/ia64/fpu/s_matherrl.c: New file. - * sysdeps/ia64/fpu/s_modf.S: New file. - * sysdeps/ia64/fpu/s_modff.S: New file. - * sysdeps/ia64/fpu/s_modfl.S: New file. - * sysdeps/ia64/fpu/s_nearbyint.S: New file. - * sysdeps/ia64/fpu/s_nearbyintf.S: New file. - * sysdeps/ia64/fpu/s_nearbyintl.S: New file. - * sysdeps/ia64/fpu/s_rint.S: New file. - * sysdeps/ia64/fpu/s_rintf.S: New file. - * sysdeps/ia64/fpu/s_rintl.S: New file. - * sysdeps/ia64/fpu/s_round.S: New file. - * sysdeps/ia64/fpu/s_roundf.S: New file. - * sysdeps/ia64/fpu/s_roundl.S: New file. - * sysdeps/ia64/fpu/s_scalbn.S: New file. - * sysdeps/ia64/fpu/s_scalbnf.S: New file. - * sysdeps/ia64/fpu/s_scalbnl.S: New file. - * sysdeps/ia64/fpu/s_significand.S: New file. - * sysdeps/ia64/fpu/s_significandf.S: New file. - * sysdeps/ia64/fpu/s_significandl.S: New file. - * sysdeps/ia64/fpu/s_sin.c: New file. - * sysdeps/ia64/fpu/s_sincos.c: New file. - * sysdeps/ia64/fpu/s_sincosf.c: New file. - * sysdeps/ia64/fpu/s_sincosl.c: New file. - * sysdeps/ia64/fpu/s_sinf.c: New file. - * sysdeps/ia64/fpu/s_sinl.c: New file. - * sysdeps/ia64/fpu/s_tan.S: New file. - * sysdeps/ia64/fpu/s_tanf.S: New file. - * sysdeps/ia64/fpu/s_tanl.S: New file. - * sysdeps/ia64/fpu/s_trunc.S: New file. - * sysdeps/ia64/fpu/s_truncf.S: New file. - * sysdeps/ia64/fpu/s_truncl.S: New file. - * sysdeps/ia64/fpu/w_acos.c: New file. - * sysdeps/ia64/fpu/w_acosf.c: New file. - * sysdeps/ia64/fpu/w_acosl.c: New file. - * sysdeps/ia64/fpu/w_asin.c: New file. - * sysdeps/ia64/fpu/w_asinf.c: New file. - * sysdeps/ia64/fpu/w_asinl.c: New file. - * sysdeps/ia64/fpu/w_atan2.c: New file. - * sysdeps/ia64/fpu/w_atan2f.c: New file. - * sysdeps/ia64/fpu/w_atan2l.c: New file. - * sysdeps/ia64/fpu/w_cosh.c: New file. - * sysdeps/ia64/fpu/w_coshf.c: New file. - * sysdeps/ia64/fpu/w_coshl.c: New file. - * sysdeps/ia64/fpu/w_exp.c: New file. - * sysdeps/ia64/fpu/w_expf.c: New file. - * sysdeps/ia64/fpu/w_fmod.c: New file. - * sysdeps/ia64/fpu/w_fmodf.c: New file. - * sysdeps/ia64/fpu/w_fmodl.c: New file. - * sysdeps/ia64/fpu/w_hypot.c: New file. - * sysdeps/ia64/fpu/w_hypotf.c: New file. - * sysdeps/ia64/fpu/w_hypotl.c: New file. - * sysdeps/ia64/fpu/w_log.c: New file. - * sysdeps/ia64/fpu/w_log10.c: New file. - * sysdeps/ia64/fpu/w_log10f.c: New file. - * sysdeps/ia64/fpu/w_log10l.c: New file. - * sysdeps/ia64/fpu/w_logf.c: New file. - * sysdeps/ia64/fpu/w_logl.c: New file. - * sysdeps/ia64/fpu/w_pow.c: New file. - * sysdeps/ia64/fpu/w_powf.c: New file. - * sysdeps/ia64/fpu/w_powl.c: New file. - * sysdeps/ia64/fpu/w_remainder.c: New file. - * sysdeps/ia64/fpu/w_remainderf.c: New file. - * sysdeps/ia64/fpu/w_remainderl.c: New file. - * sysdeps/ia64/fpu/w_scalb.c: New file. - * sysdeps/ia64/fpu/w_scalbf.c: New file. - * sysdeps/ia64/fpu/w_scalbl.c: New file. - * sysdeps/ia64/fpu/w_sqrt.c: New file. - * sysdeps/ia64/fpu/w_sqrtf.c: New file. - * sysdeps/ia64/fpu/w_sqrtl.c: New file. - * sysdeps/ia64/fpu/libm-test-ulps: Adjust for long double - implementation. - * sysdeps/ia64/fpu/bits/mathdef.h: Correct float_t and double_t types. - Change FP_ILOGBNAN for new implementation. - * Verions.def: Add 2.2.3 versions. - -2001-02-18 Ulrich Drepper - - * math/libm-test.inc (scalb_test): Require invalid exception being - raised for invalid parameters. - * sysdeps/i386/fpu/e_scalb.S: Raise invalid exception if necessary. - * sysdeps/i386/fpu/e_scalbf.S: Likewise. - * sysdeps/i386/fpu/e_scalbl.S: Likewise. - -2001-02-18 Mark Kettenis - - * sysdeps/mach/getsysstats.c (__get_phys_pages): Change return - value to long int. - (__get_avphys_pages): Likewise. - -2001-02-18 Ulrich Drepper - - * math/libm-test.inc (pow_test): Correct expected results for x == +-1. - * sysdeps/i386/fpu/e_pow.S: Handle x == +-1 correctly. - * sysdeps/i386/fpu/e_powf.S: Likewise. - * sysdeps/i386/fpu/e_powl.S: Likewise. - - * sysdeps/i386/fpu/bits/mathinline.h: Remove pow inline code. - -2001-02-17 Ulrich Drepper - - * math/Makefile (libm-calls): It's e_exp2 not s_exp2. - - * sysdeps/generic/s_exp2l.c: Renamed to... - * sysdeps/generic/e_exp2l.c: ...this. New file. - * sysdeps/i386/fpu/s_exp2.S: Renamed to... - * sysdeps/i386/fpu/e_exp2.S: ...this. New file. - * sysdeps/i386/fpu/s_exp2f.S: Renamed to... - * sysdeps/i386/fpu/e_exp2f.S: ...this. New file. - * sysdeps/i386/fpu/s_exp2l.S: Renamed to... - * sysdeps/i386/fpu/e_exp2l.S: ...this. New file. - * sysdeps/ieee754/flt-32/s_exp2f.c: Renamed to... - * sysdeps/ieee754/flt-32/e_exp2f.c: ...this. New file. - * sysdeps/ieee754/dbl-64/s_exp2.c: Renamed to... - * sysdeps/ieee754/dbl-64/e_exp2.c: ...this. New file. - * sysdeps/m68k/fpu/s_exp2.c: Renamed to... - * sysdeps/m68k/fpu/e_exp2.c: ...this. New file. - * sysdeps/m68k/fpu/s_exp2f.c: Renamed to... - * sysdeps/m68k/fpu/e_exp2f.c: ...this. New file. - * sysdeps/m68k/fpu/s_exp2l.c: Renamed to... - * sysdeps/m68k/fpu/e_exp2l.c: ...this. New file. - -2001-02-17 Andreas Jaeger - - * configure.in: Allow gcc 3. - -2001-02-16 Ulrich Drepper - - * math/w_acos.c: Move to ... - * sysdeps/generic/w_acos.c: ...here. New file. - * math/w_acosf.c: Move to ... - * sysdeps/generic/w_acosf.c: ...here. New file. - * math/w_acosh.c: Move to ... - * sysdeps/generic/w_acosh.c: ...here. New file. - * math/w_acoshf.c: Move to ... - * sysdeps/generic/w_acoshf.c: ...here. New file. - * math/w_acoshl.c: Move to ... - * sysdeps/generic/w_acoshl.c: ...here. New file. - * math/w_acosl.c: Move to ... - * sysdeps/generic/w_acosl.c: ...here. New file. - * math/w_asin.c: Move to ... - * sysdeps/generic/w_asin.c: ...here. New file. - * math/w_asinf.c: Move to ... - * sysdeps/generic/w_asinf.c: ...here. New file. - * math/w_asinl.c: Move to ... - * sysdeps/generic/w_asinl.c: ...here. New file. - * math/w_atan2.c: Move to ... - * sysdeps/generic/w_atan2.c: ...here. New file. - * math/w_atan2f.c: Move to ... - * sysdeps/generic/w_atan2f.c: ...here. New file. - * math/w_atan2l.c: Move to ... - * sysdeps/generic/w_atan2l.c: ...here. New file. - * math/w_atanh.c: Move to ... - * sysdeps/generic/w_atanh.c: ...here. New file. - * math/w_atanhf.c: Move to ... - * sysdeps/generic/w_atanhf.c: ...here. New file. - * math/w_atanhl.c: Move to ... - * sysdeps/generic/w_atanhl.c: ...here. New file. - * math/w_cosh.c: Move to ... - * sysdeps/generic/w_cosh.c: ...here. New file. - * math/w_coshf.c: Move to ... - * sysdeps/generic/w_coshf.c: ...here. New file. - * math/w_coshl.c: Move to ... - * sysdeps/generic/w_coshl.c: ...here. New file. - * math/w_drem.c: Move to ... - * sysdeps/generic/w_drem.c: ...here. New file. - * math/w_dremf.c: Move to ... - * sysdeps/generic/w_dremf.c: ...here. New file. - * math/w_dreml.c: Move to ... - * sysdeps/generic/w_dreml.c: ...here. New file. - * math/w_exp10.c: Move to ... - * sysdeps/generic/w_exp10.c: ...here. New file. - * math/w_exp10f.c: Move to ... - * sysdeps/generic/w_exp10f.c: ...here. New file. - * math/w_exp10l.c: Move to ... - * sysdeps/generic/w_exp10l.c: ...here. New file. - * math/w_exp2.c: Move to ... - * sysdeps/generic/w_exp2.c: ...here. New file. - * math/w_exp2f.c: Move to ... - * sysdeps/generic/w_exp2f.c: ...here. New file. - * math/w_exp2l.c: Move to ... - * sysdeps/generic/w_exp2l.c: ...here. New file. - * math/w_fmod.c: Move to ... - * sysdeps/generic/w_fmod.c: ...here. New file. - * math/w_fmodf.c: Move to ... - * sysdeps/generic/w_fmodf.c: ...here. New file. - * math/w_fmodl.c: Move to ... - * sysdeps/generic/w_fmodl.c: ...here. New file. - * math/w_hypot.c: Move to ... - * sysdeps/generic/w_hypot.c: ...here. New file. - * math/w_hypotf.c: Move to ... - * sysdeps/generic/w_hypotf.c: ...here. New file. - * math/w_hypotl.c: Move to ... - * sysdeps/generic/w_hypotl.c: ...here. New file. - * math/w_j0.c: Move to ... - * sysdeps/generic/w_j0.c: ...here. New file. - * math/w_j0f.c: Move to ... - * sysdeps/generic/w_j0f.c: ...here. New file. - * math/w_j0l.c: Move to ... - * sysdeps/generic/w_j0l.c: ...here. New file. - * math/w_j1.c: Move to ... - * sysdeps/generic/w_j1.c: ...here. New file. - * math/w_j1f.c: Move to ... - * sysdeps/generic/w_j1f.c: ...here. New file. - * math/w_j1l.c: Move to ... - * sysdeps/generic/w_j1l.c: ...here. New file. - * math/w_jn.c: Move to ... - * sysdeps/generic/w_jn.c: ...here. New file. - * math/w_jnf.c: Move to ... - * sysdeps/generic/w_jnf.c: ...here. New file. - * math/w_jnl.c: Move to ... - * sysdeps/generic/w_jnl.c: ...here. New file. - * math/w_lgamma.c: Move to ... - * sysdeps/generic/w_lgamma.c: ...here. New file. - * math/w_lgammaf.c: Move to ... - * sysdeps/generic/w_lgammaf.c: ...here. New file. - * math/w_lgammaf_r.c: Move to ... - * sysdeps/generic/w_lgammaf_r.c: ...here. New file. - * math/w_lgammal.c: Move to ... - * sysdeps/generic/w_lgammal.c: ...here. New file. - * math/w_lgammal_r.c: Move to ... - * sysdeps/generic/w_lgammal_r.c: ...here. New file. - * math/w_lgamma_r.c: Move to ... - * sysdeps/generic/w_lgamma_r.c: ...here. New file. - * math/w_log10.c: Move to ... - * sysdeps/generic/w_log10.c: ...here. New file. - * math/w_log10f.c: Move to ... - * sysdeps/generic/w_log10f.c: ...here. New file. - * math/w_log10l.c: Move to ... - * sysdeps/generic/w_log10l.c: ...here. New file. - * math/w_log.c: Move to ... - * sysdeps/generic/w_log.c: ...here. New file. - * math/w_logf.c: Move to ... - * sysdeps/generic/w_logf.c: ...here. New file. - * math/w_logl.c: Move to ... - * sysdeps/generic/w_logl.c: ...here. New file. - * math/w_pow.c: Move to ... - * sysdeps/generic/w_pow.c: ...here. New file. - * math/w_powf.c: Move to ... - * sysdeps/generic/w_powf.c: ...here. New file. - * math/w_powl.c: Move to ... - * sysdeps/generic/w_powl.c: ...here. New file. - * math/w_remainder.c: Move to ... - * sysdeps/generic/w_remainder.c: ...here. New file. - * math/w_remainderf.c: Move to ... - * sysdeps/generic/w_remainderf.c: ...here. New file. - * math/w_remainderl.c: Move to ... - * sysdeps/generic/w_remainderl.c: ...here. New file. - * math/w_scalb.c: Move to ... - * sysdeps/generic/w_scalb.c: ...here. New file. - * math/w_scalbf.c: Move to ... - * sysdeps/generic/w_scalbf.c: ...here. New file. - * math/w_scalbl.c: Move to ... - * sysdeps/generic/w_scalbl.c: ...here. New file. - * math/w_sinh.c: Move to ... - * sysdeps/generic/w_sinh.c: ...here. New file. - * math/w_sinhf.c: Move to ... - * sysdeps/generic/w_sinhf.c: ...here. New file. - * math/w_sinhl.c: Move to ... - * sysdeps/generic/w_sinhl.c: ...here. New file. - * math/w_sqrtl.c: Move to ... - * sysdeps/generic/w_sqrtl.c: ...here. New file. - * math/w_tgamma.c: Move to ... - * sysdeps/generic/w_tgamma.c: ...here. New file. - * math/w_tgammaf.c: Move to ... - * sysdeps/generic/w_tgammaf.c: ...here. New file. - * math/w_tgammal.c: Move to ... - * sysdeps/generic/w_tgammal.c: ...here. New file. - - * locale/programs/ld-address.c (address_finish): Add 'S' to allow - formats for postal_fmt. - -2001-02-16 Jakub Jelinek - - * sysdeps/unix/sysv/linux/alpha/syscalls.list (ftruncate): Add - __ftruncate64 alias. - * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (ftruncate): - Likewise. - -2001-02-15 David Mosberger - - * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): No need to - do "loadrs". Writing to bspstore already takes care of - invalidating the "clean" partition. - -2001-02-16 Andreas Schwab - - * sysdeps/m68k/fpu/s_nextafterl.c: New file. - * sysdeps/m68k/fpu/s_fpclassifyl.c: New file. - -2001-02-15 Jakub Jelinek - - * posix/regex.c (init_syntax_once): Add prototype. - (TRANSLATE): If MBS_SUPPORT, translate all characters up to '\xff'. - (re_search_2): Avoid warning. - (count_mbs_length): Add prototype. - * posix/tst-regex3.c: New file. - * posix/Makefile (tests): Add bug-regex3. - -2001-02-15 Ulrich Drepper - - * stdio-common/Makefile (tests): Add tst-gets. - * stdio-common/tst-gets.c: New file. - * stdio-common/tst-gets.input: New file. - - * elf/elf.h (DT_CHECKSUM): Define. - - * sysdeps/generic/strtoll.c: Don't export __strto*_internal as - default symbol. - * sysdeps/generic/strtoull.c: Likewise. - -2001-02-14 Wolfram Gloger - - * malloc/malloc.c (new_heap): When allocating large chunk aligned - to HEAP_MAX_SIZE, prefer one with lower address, to avoid `holes' - between the heaps. - -2001-02-14 Ulrich Drepper - - * math/libm-test.inc (j0_test): Check whether sincos is available. - (j1_test): Likewise. - (jn_test): Likewise. - (y0_test): Likewise. - (y1_test): Likewise. - (yn_test): Likewise. - - * posix/tst-gnuglob.c: Make a few entries DT_UNKNOWN and teach - fake filesystem routines to handle this. - - * time/sys/time.h: Make settimeofday and adjtime available if - _BSD_SOURCE. - - * time/sys/time.h: Make timer* macros available for BSD. - - * iconvdata/gb18030.c: Update for Dec 2000 re-release of GB18030. - Patch by Yong Li . - - * sysdeps/generic/glob.c (CONVERT_DIRENT_DIRENT64): Fix copying of - name. - - * posix/Makefile (tests): Add tst-gnuglob. - * posix/tst-gnuglob.c: New file. - -2001-02-13 H.J. Lu - - * sysdeps/unix/sysv/linux/ia64/syscalls.list: Add __ftruncate64. - -2001-02-13 Ulrich Drepper - - * locale/programs/ld-paper.c (paper_output): Pretty printing. - - * iconvdata/Makefile (modules): Add GBBIG5. - (distribute): Add gbbig5.c. - * iconvdata/gconv-modules: Add entries for GBBIG5 module. - - * iconvdata/gbbig5.c: New file. - Contributed by Yong Li . - -2001-02-13 Philip Blundell - - * manual/crypt.texi: Remove outdated references to crypt add-on. - - * manual/creature.texi: Improve wording slightly. - -2001-02-13 Ulrich Drepper - - * io/ftw.c: Always use readdir64. - * io/ftw64.c: Likewise. - * sysdeps/unix/sysv/linux/ttyname.c: Likewise. - * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. - * sysdeps/generic/glob.c: Likewise. Convert results of gl_readdir - callback to dirent. Still allow compiling outside glibc. - * sysdeps/gnu/glob64.c: Define COMPILE_GLOB64. - * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. - - * malloc/mtrace.c: Use fopen64. - * posix/spawni.c: Use __open64. - * sysdeps/unix/opendir.c: Likewise. - * sysdeps/unix/sysv/linux/gethostid.c: Likewise. - - * sysdeps/generic/ftruncate64.c: Define __ftruncate64 and make old - name a weak alias. - * sysdeps/unix/sysv/aix/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise. - - * resolv/res_data.c: Add cast to avoid warning. - - * include/unistd.h: Declare __ftruncate64. - - * sysdeps/generic/utmp_file.c: Use LFS functions and types. - - * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Use __lseek64 - instead of __lseek. - -2001-02-13 Andreas Jaeger - - * login/getutent_r.c: Include for NULL. - * login/getutid_r.c: Likewise. - -2001-02-12 Ulrich Drepper - - * sysdeps/dbl-64/e_j0.c: Little optimization, use sincos. - * sysdeps/dbl-64/e_j1.c: Likewise. - * sysdeps/dbl-64/e_jn.c: Likewise. - * sysdeps/flt-32/e_j0f.c: Likewise. - * sysdeps/flt-32/e_j1f.c: Likewise. - * sysdeps/ldbl-96/e_j0l.c: Likewise. - -2000-12-02 H.J. Lu - - * resolv/res_libc.c (res_init): Don't make it default. - -2001-02-12 Ulrich Drepper - - * manual/debug.texi: Improved the wording. - Patch by Philip Blundell . - -2001-02-12 Andreas Jaeger - - * posix/Makefile (tests): Don't run bug-regex2 when - cross-compiling. - - * libio/Makefile (tests): Don't run test-freopen when - cross-compiling. - - * manual/stdio.texi (Streams and I18N): Fix typos. - -2001-02-12 Ulrich Drepper - - * sysdeps/i386/fpu/libm-test-ulps: Adjust for errors in y0l. - - * math/libm-test.inc (j0_test): Make expected results long double - constants. - (y0_test): Likewise. - - * sysdeps/ieee754/ldbl-96/e_j0l.c: New file. - Contributed by Stephen L. Moshier . - -2001-02-11 Jakub Jelinek - - * sysdeps/generic/strtoll.c (__strtoq_internal): Ressurect alias - which was exported from libc. - * sysdeps/generic/strtoull.c (__strtouq_internal): Likewise. - -2001-02-12 Andreas Jaeger - - * manual/arith.texi (Parsing of Integers): Fix some wordings. - -2001-02-11 Ulrich Drepper - - * sysdeps/generic/getsysstat.c: Change return value of get_phys_pages - and get_avphys_page to long int. - * sysdeps/unix/sysv/linux/getsysstat.c: Likewise. - * include/sys/sysinfo.h: Likewise. - * sysdeps/generic/sys/sysinfo.h: Likewise. - * sysdeps/unix/sysv/linux/sys/sysinfo.h: Likewise. - - * sysdeps/unix/sysv/linux/getloadavg.c (getloadavg): Fail if we - cannot return as many values as the user asked for. - -2001-02-11 Andreas Jaeger - - * manual/resource.texi (Memory Resources): Fix typo. - - * libio/Makefile ($(objpfx)test-freopen.out): Pass - run-program-prefix. - - * libio/test-freopen.sh: Use run_program_prefix. - -2001-02-10 Andreas Jaeger - - * stdlib/Makefile (tests): Don't run tst-fmtmsg when - cross-compiling. - ($(objpfx)tst-fmtmsg.out): Pass run-program-prefix. - - * stdlib/tst-fmtmsg.sh (test): Use run_program_prefix for static - only builds. - - * elf/Makefile (tests): Only run tst-pathopt with shared libs. - - * posix/Makefile: Fix typo, it's build-static-nss. - - * iconv/Makefile (extra-objs): New. - -2001-02-10 Mark Kettenis - - * sysdeps/unix/stime.c: Include . - - * sysdeps/mach/hurd/setitimer.c: Include . - -2001-02-10 Andreas Jaeger - - * manual/string.texi (Search Functions): Fix typo. - -2001-02-10 Mark Kettenis - - * sysdeps/unix/bsd/times.c: Reorder includes and add . - (timeval_to_clock_t): Add clk_tck argument and use that instead of - CLK_TCK. - (__times): Use __getclktck to get the number of clock ticks per - second and use its return value instead of CLK_TCK. - -2001-02-10 Mark Kettenis - - * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h (_HAVE_SA_LEN): Define. - -2001-02-10 Mark Kettenis - - * sysdeps/mach/gettimeofday.c: Include . -2001-02-10 Andreas Jaeger - - * wctype/wcfuncs.c (func): Add prototype declarations to avoid - warning. - -2001-02-09 Ulrich Drepper - - * posix/Makefile: Add rules to build and run bug-regex2. - * posix/bug-regex2.c: New file. - -2001-02-10 Jakub Jelinek - - * posix/regex.c (convert_mbs_to_wcs): Change is_binary to char *. - (regex_compile): Likewise. - (FREE_VARIABLES): Don't free is_binary1 and is_binary2. - (re_match_2_internal): Use just is_binary instead of two variables. - Use REGEX_TALLOC to allocate it and FREE_VAR to free on failure. - -2001-02-09 Ulrich Drepper - - * version.h (VERSION): Bump to 2.2.2. - - * iconv/Makefile (distribute): Add iconv_charmap.c and - dummy-repertoire.c. - * elf/Makefile (distribute): Add firstobj.c. - * Makefile (distribute): Add include/pthread.h. - - * configure.in: Require makeinfo version 4. - - * libio/tst_wscanf.c (main): Add cast to avoid warning. - * libio/tst_swscanf.c (main): Likewise.. - -2001-02-09 Jakub Jelinek - - * sysdeps/generic/setenv.c (unsetenv): Remove const from len. - * sysdeps/sparc/fpu/bits/mathinline.h (sqrt, fdim): Don't define if - __NO_MATH_INLINES. - * sysdeps/i386/dl-machine.h (elf_machine_rel): Only declare refsym - if not RTLD_BOOTSTRAP. - * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. - * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. - -2001-02-09 Ulrich Drepper - - * locale/programs/linereader.c (get_ident): Stop loop if EOF. Use - lr_ungetc to push back last read character. - * locale/programs/linereader.h (lr_ungetc): Don't push back is - character is EOF. - (lr_ignore_rest): Don't warn about garbage if it is really the end - of the file. - - * manual/Makefile: Use ifnottext and not ifinfo to protect Top node - definition. - -2001-02-08 Ulrich Drepper - - * Makerules (build-shlib): Work around different order of - processing of -B option in different gcc versions. - - * posix/regex.c: Fix alignment problem. - Patch by Isamu Hasegawa . - - * sysdeps/alpha/strrchr.S: Little optimization. - Patch by Richard Henderson . - - * sysdeps/alpha/alphaev67/strrchr.S: New file. - Contributed by Rick Gorton . - -2001-02-08 kaz Kojima - - * sysdeps/sh/sh3/setjmp.S (__sigsetjmp): Correct function name - in the assembler end directive. - -2001-02-08 Andreas Jaeger - - * manual/stdio.texi (Closing Streams): Fix typos. - -2001-02-07 Ulrich Drepper - - * sysdeps/alpha/alphaev67/strncat.S: Align last write address. - Patch by Richard Henderson . - Reported by Claus-Justus Heine . - - * stdlib/strfmon.c [USE_IN_LIBIO]: Define lock variable and store - pointer in FILE structure before calling _IO_init. - * stdlib/Makefile: Add -D_IO_MTSAFE_IO to CFLAGS for strfmon and - strfmon_l if necessary. - Reported by Jury Gerold . - - * sysdeps/gnu/netinet/tcp.h: Correct values of TCP_ macros. - Patch by Pekka.Pietikainen@cern.ch. - - * posix/regex.c: Correct several problems with 64-bit architectures - introduced in the MBS changes. - Patch by Isamu Hasegawa . - -2001-02-07 Jakub Jelinek - - * math/tgmath.h: Only add l suffixes if __NO_LONG_DOUBLE_MATH is - not defined. - * sysdeps/alpha/fpu/bits/mathinline.h: Honour __NO_MATH_INLINES. - -2001-02-07 Andreas Jaeger - - * manual/install.texi (Tools for Compilation): Fix typo. - Reported by Pavel Machek . - -2001-02-07 Ulrich Drepper - - * stdlib/strtod.c: Never stop prematurely reading digits before the - decimal point is found. Compute exponent limit for negative exponents - correctly. For numbers ending in all zeros eat the zeros even before - the decimal point if the exponent is negative [PR libc/2072]. - * stdlib/Makefile (tests): Add bug-strtod. - * stdlib/bug-strtod.c: New file. - -2001-02-07 Andreas Jaeger - - * posix/bug-regex1.c: Include for fwide. - -2001-02-06 Ulrich Drepper - - * posix/regex.c (regex_compile): Don't store pointer in wchar_t array. - Store index. - (compile_range): Handle index being passed, not pointer. - Patch by Isamu Hasegawa . - - * posix/regex.c: Fix a cast in the code for bracket handling which - caused 8-bit uncleanliness. - Patch by Michal Jaegermann . - - * posix/Makefile (tests): Add bug-regex1. - * posix/bug-regex1.c: New file. - Contributed by Jim Meyering . - - * posix/regex.c: Many cleanups for incorrect format strings. - -2001-02-06 Andreas Jaeger - - * time/time.h (CLK_TCK): Check for !__STRICT_ANSI. - -2001-02-06 Ulrich Drepper - - * locale/programs/locale.c (write_locales): Use scandir to read - directory so that the entries are sorted. - -2001-02-06 Andreas Jaeger - - * include/pthread.h: New file. - - * wctype/wctype.h: Move internal interfaces from here to... - * include/wctype.h: ...here. - - * wcsmbs/wchar.h: Move __wcslen from here to... - * include/wchar.h: ...here. - - * posix/sys/wait.h: Move __wait from here to... - * include/sys/wait.h: ...here. - - * string/string.h: Move __ffs and __strerror_r from here to... - * include/string.h: ...here. - - * stdlib/stdlib.h: Move __on_exit from here to... - * include/stdlib.h: ...here. - - * libio/stdio.h: Move __vsnprintf from here to... - * include/stdio.h: ...here. - -2001-02-06 Andreas Schwab - - * sysdeps/unix/sysv/linux/ia64/ioperm.c: Don't include kernel - headers. - - * timezone/Makefile: Don't assume that $(inst_zonedir) is a subdir - of $(inst_datadir). - -2001-02-06 Ulrich Drepper - - * iconvdata/Makefile: Add dependency for bug-iconv2.out. - -2001-02-06 Andreas Jaeger - - * elf/firstobj.c: Add prototype. - - * posix/regex.c (convert_mbs_to_wcs): Make static, add prototype - (truncate_wchar): Likewise. - -2001-02-06 Ulrich Drepper - - * locale/programs/locale.c: Implement --verbose option for -a - which prints detailed information about the locales. - -2001-02-05 Ulrich Drepper - - * sunrpc/xdr_rec.c (set_input_fragment): Change type of header - variable to uint32_t. - Reported by Ulrich Weigand . - -2001-02-04 Bruno Haible - - * locale/C-translit.h.in: Add transliterations for CJK units of - measurement. - -2001-02-05 Ulrich Drepper - - * elf/cache.c (print_entry): Use PRIx64 instead of Lx in printf - string. Include instead of . - - * localedata/Makefile (tests): Add bug-iconv-trans. - Define bug-iconv-trans-ENV. - * localedata/bug-iconv-trans.c: New file. - -2001-02-04 Bruno Haible - - * iconv/gconv_trans.c (__gconv_transliterate): Use a temporary output - pointer, to avoid accumulating output from incomplete (unsuccessful) - transliteration attempts. - -2001-02-05 Ulrich Drepper - - * elf/ldconfig.c (search_dir): Use PRIx64 instead of Lx in printf - string. Include instead of . - - * configure.in: Add check for bison. - * config.make.in: Define BISON variable. - * intl/Makefile: Use BISON instead of YACC when generating plural.c. - Rename YFLAGS to BISONFLAGS. - -2001-02-05 Andreas Jaeger - - * io/test-lfs.c (do_test): Test lseek64 return value, call - test_ftello. - (test_ftello): New function to test ftello64 and fseeko64. - - * signal/signal.h: Move __sigaction from here to... - * include/signal.h: ...here. - - * io/fcntl.h: Move __fcntl and __open to... - * include/fcntl.h: ...here. - -2001-02-04 Philip Blundell - - * configure.in: Distinguish ARM from Thumb. - -2001-02-04 Philip Blundell - - * sysdeps/arm/dl-machine.h (elf_machine_rel): Correct handling of - PC24 relocs with negative value. - -2001-02-04 Ulrich Drepper - - * iconv/Makefile (iconv_prog-modules): Define. Add vpath to find - files in locale/programs. Add CFLAGS definition to allow compiling - localedef files. - * iconv/dummy-repertoire.c: New file. - * iconv/iconv_charmap.c: New file. - * iconv/iconv_prog.h: New file. - * iconv/iconv_prog.c: Make verbose and omit_invalid global. - (main): If parameter for -f and -t contain slashes try first to resolve - the strings as filenames of charmap files. Use them for conversion - in this case. - * iconvdata/run-iconv-test.sh: If charmaps exist also run tests with - iconv getting charmap names as parameters. - * locale/programs/linereader.c (lr_token): Take extra parameters - verbose and pass it to get_string. - (get_string): Take extra parameters verbose. - * locale/programs/charmap.c (parse_charmap): Take extra parameters - verbose and be_quiet. Change all callers of lr_token and - parse_charmap. - * locale/programs/charmap.h: Likewise. - * locale/programs/ld-address.c: Likewise. - * locale/programs/ld-collate.c: Likewise. - * locale/programs/ld-ctype.c: Likewise. - * locale/programs/ld-identification.c: Likewise. - * locale/programs/ld-measurement.c: Likewise. - * locale/programs/ld-messages.c: Likewise. - * locale/programs/ld-monetary.c: Likewise. - * locale/programs/ld-name.c: Likewise. - * locale/programs/ld-numeric.c: Likewise. - * locale/programs/ld-paper.c: Likewise. - * locale/programs/ld-telephone.c: Likewise. - * locale/programs/ld-time.c: Likewise. - * locale/programs/linereader.c: Likewise. - * locale/programs/linereader.h: Likewise. - * locale/programs/localedef.c: Likewise. - * locale/programs/locfile.c: Likewise. - * locale/programs/locfile.h: Likewise. - * locale/programs/repertoire.c: Likewise. - -2001-02-03 Ulrich Drepper - - * iconv/iconv_prog.c (main): If output file name is "-" write to - stdout. - (main): If -f or -t argument is missing use charset of the current - locale. - -2001-02-03 Andreas Jaeger - - * sysdeps/i386/elf/start.S (_start): Align stack to 16-byte - boundary for SSE/SSE-2 alignment. - - * posix/Makefile ($(objpfx)annexc.out): Also pass sysincludes to - annexc. - -2001-02-03 Ulrich Drepper - - * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: File was using crlf. - Remove comma at end of enum. - - * elf/dl-init.c: Add a few __builtin_expect. - - * hesiod/hesiod.c: Remove unnecessary code. Remove all uses of strcat. - -2001-02-02 Ulrich Drepper - - * hesiod/hesiod.c (hesiod_resolve): Also search HS records if - errno is ECONNREFUSED. - - * posix/Makefile: Define MBS_SUPPORT for regex.c. - * posix/regex.c: Implement multibyte character handling. - Patch by Isamu Hasegawa . - - * string/tst-svc.input: Add two more test cases. - * string/tst-svc.expect: Modify to reflect new test cases. - -2001-02-01 Jakub Jelinek - - * sysdeps/posix/getaddrinfo.c (gaih_local, gaih_inet): Replace all - tp->name tests with tp->name[0] tests. - -2001-01-29 Ben Collins - - * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r): - Fix check for name == NULL. - -2001-02-01 Ulrich Drepper - - * elf/Makefile: Add rules to build and run initfirst test. - * elf/initfirst.c: New file. - * elf/firstobj.c: New file. - - * Makerules (build-shlib): Add $(extra-B-$(@F:lib%.so=%).so). - * configure.in: Test for -z initfirst linker option. - * config.make.in: Add have-z-initfirst. - * elf/dl-init.c (_dl_init): Split out actual initialization code in - new function call_init. If _dl_initfirst is non-NULL initialize first. - * elf/dl-load.c (_dl_map_from_fd): If DF_1_INITFIRST flag is set - remember object in _dl_initfirst. - * elf/soinit.c: Remove special support for calling - __pthread_initialize_minimal. - - * conform/conformtest.pl: Add missing $prepend in type test. - -2001-01-31 Ulrich Drepper - - * elf/elf.h (SHT_CHECKSUM): New definition. - - * posix/fnmatch_loop.c: Remove incorrect reverse condition in - [. .] matching. Patch by Isamu Hasegawa . - * posix/tst-fnmatch.input: Add tests for [. .] in locales. - -2001-01-31 Mark Kettenis - - * misc/sys/select.h: Include instead of - to get definition of `struct timeval'. - -2001-01-31 Ulrich Drepper - - * posix/tst-fnmatch.input: Add test cases for de_DE.UTF-8 locale. - * posix/fnmatch_loop.c: Fix handling of [= =] for multibyte charsets. - -2001-01-30 Ulrich Drepper - - * iconv/gconv_open.c (__gconv_open): Set conv_flags if IGNORE is - seen, not flags. - - * nis/nis_findserv.c: Include . - -2001-01-30 Yong Li - - * iconv/iconv_prog.c (main): Correct error handling method name. - -2001-01-29 Ben Collins - - * sysdeps/sparc/fpu/fraiseexcpt.c: Include . - * sysdeps/hppa/fpu/fraiseexcpt.c: Likewise. - * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. - * sysdeps/s390/fpu/fraiseexcpt.c: Likewise. - -2001-01-30 Ulrich Drepper - - * locale/programs/ld-measurement.c (measurement_finish): Fix a typo. - Patch by Marko Myllynen . - - * string/bits/string2.h (__strpbrk_c2): Correct parameter types - (int instead of char). - (__strpbrk_c3): Likewise. - Reported by GOTO Masanori . - - * sysdeps/generic/bits/sockaddr.h: Remove SA_LEN macro. - * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h: Likewise. - * include/sys/socket.h: Add SA_LEN here for internal use. - Reported by Arkadiusz Miskiewicz . - -2001-01-29 Ulrich Drepper - - * malloc/Makefile: Don't build memusagestat if cross-compiling. - - * sysdeps/generic/dl-sysdep.c (set_seen): Fix typo. - - * math/libm-test.inc (rint_test): Add a few more tests for round - to even rounding. - -2001-01-28 Ulrich Drepper - - * conform/data/pthread.h-data: Correct return type of pthread_exit. - - * conform/conformtest.pl: Add -fno-builtin to CFLAGS. - - * conform/data/stdlib.h-data: Add _Exit. - - * inet/arpa/inet.h: Don't include . Define socklen_t - if not already happened. - * inet/netinet/in.h: Don't include , use . - Don't include and . - - * conform/data/netinet/in.h-data: Allow all of . - - * conform/data/spawn.h-data: Allow all of . - - * sysdeps/ia64/fpu/fraiseexcpt.c: Include . Removed - unused variable. - - * sunrpc/xdr_rec.c (xdrrec_getpos): Add cast to long to avoid warning. - * sunrpc/xdr_sizeof.c (x_inline): Likewise. - - * sysdeps/ieee754/ldbl-96/s_frexpl.c: Include . - - * conform/conformtest.pl: Define $mustprepend{"stdio.h"}. - * libio/stdio.h: Define va_list correctly. - - * conform/data/pthread.h-data: Make priority protocol related - functions optional. Fix typos. - - * posix/sched.h: Define sched_priority as __sched_priority. - * sysdeps/generic/bits/sched.h (struct sched_param): Rename element - to __sched_priority. - * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. - -2001-01-27 Ulrich Drepper - - * sysdeps/generic/clock_getcpuclockid.c: Include instead - of . - - * sysdeps/unix/stime.c: Include for NULL. - * sysdeps/unix/time.c: Likewise. - - * conform/data/time.h-data: CLK_TCK is not in XPG6. Fix tzname entry. - * sysdeps/mach/hurd/bits/time.h: Don't define CLK_TCK for XPG6. - * sysdeps/mach/hurd/i386/bits/time.h: Likewise. - * sysdeps/unix/sysv/linux/bits/time.h: Likewise. - * sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise. - * sysdeps/unix/sysv/linux/i386/bits/time.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/time.h: Likewise. - * time/time.h: Likewise. - - * conform/conformtest.pl (@headers): Add complex.h and tgmath.h. - * conform/data/complex.h-data: New file. - * conform/data/tgmath.h-data: New file. - - * conform/data/wchar.h-data: Add missing functions. - - * sysdeps/gnu/bits/utmpx.h: Define RUN_LVL only if __USE_GNU. - - * conform/data/termios.h-data: Add missing const in tcsetattr() - prototype. - - * posix/sys/wait.h: Include and . - Don't define pid_t here. - - * conform/data/sys/utsname.h-data: Don't provide fixed array sizes. - - * conform/data/sys/time.h-data: Allow sys/select.h. - * conform/data/sys/un.h-data: Fix typo. - * time/sys/time.h: Don't include all of , just struct timeval. - * sysdeps/posix/clock_getres.c: Include instead of - . - * sysdeps/unix/clock_nanosleep.c: Likewise. - * sysdeps/unix/i386/clock_getcpuclockid.c: Likewise. - * sysdeps/unix/i386/i586/clock_getres.c: Likewise. - * sysdeps/unix/clock_gettime.c: Also include . - * sysdeps/unix/clock_settime.c: Likewise. - - * sysdeps/generic/pselect.c: Include for NULL. - * login/getutent.c: Likewise. - * login/getutid.c: Likewise. - * login/getutline.c: Likewise. - - * socket/sys/un.h: Define SUN_LEN only if __USE_MISC. - - * sysdeps/unix/sysv/linux/bits/statvfs.h: Change type of f_fsid field - to unsigned long. Add __f_unused. Define _STATVFSBUF_F_UNUSED. - * sysdeps/unix/sysv/linux/internal_statvfs.c: Adjust initialization of - f_fsid field after change in struct statvfs. - * sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: New file. - * sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statvfs.h: New file. - - * conform/data/sys/stat.h-data: Remove isfdtype. Use - optional-macro. - - * conform/data/sys/socket.h-data: Fix typos. Correct getsockopt, - recvfrom, send, and socketpair prototypes. Add allow lines. - * socket/sys/socket.h: Include . - Don't use fancy __SOCKADDR_ARG definition unless __USE_GNU. - Fix type of second parameter of listen. - Don't declare isfdtype unless __USE_MISC. - * sysdeps/generic/listen.c: Fix type of second parameter of listen. - * sysdeps/mach/hurd/listen.c: Likewise. - * sysdeps/generic/bits/socket.h (struct sockaddr_storage): Define - ss_family and __ss_family. - * sysdeps/unix/sysv/aix/bits/socket.h: Likewise. - * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. - (struct msghdr): Change type of msg_iovlen to int and type of - msg_controllen to socklen_t. - * sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file. - * sysdeps/unix/sysv/linux/ia64/bits/socket.h: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/socket.h: New file. - * inet/rcmd.c (rcmd_af): __ss_family is now ss_family. - (rresvport_af): Likewise. - - * conform/data/sys/shm.h-data: SHMLBA is not required to by a constant. - * conform/conformtest.pl: Implement handling of symbol. - - * signal/signal.h: Fix handling of __need_* symbols. - * misc/sys/select.c: Define fd_set here. Remove __fd_set. Define - fd_mask only if __USE_MISC. Declare pselect for __USE_XOPEN2K. - * include/sys/select.h: Use fd_set not __fd_set. - * sysdeps/generic/bits/select.h: Likewise. - * sysdeps/i386/bits/select.h: Likewise. - * sysdeps/generic/bits/types.h: Don't define __fd_mask, __NFDBITS, - __FDELT, __FDMASK, and __fd_set here. - * sysdeps/unix/sysv/aix/bits/types.h: Likewise. - * sysdeps/unix/sysv/hpux/bits/types.h: Likewise. - * sysdeps/unix/sysv/linux/bits/types.h: Likewise. - * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/types.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise. - * sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise. - * time/sys/time.h: Define struct timeval before including - and . - - * conform/data/sys/time.h-data: fd_set is a typedef. - * conform/data/sys/select.h-data: New file. - * conform/data/sys/mman.h-data: Make typed mem stuff optional. - * conform/conformtest.pl (@headers): Add sys/select.h. - (type, optional-type): Unless testing a typedef instantiate object. - Implement optional-function. - - * math/test-misc.c: Include . - -2001-01-27 Andreas Jaeger - - * misc/efgcvt_r.c: Include . - -2001-01-26 Ulrich Drepper - - * conform/data/stdlib.h-data: Account for XPG6 changes. - * stdlib/stdlib.h (__random): Change return value type to long. - (posix_memalign): Cleanup parameter names. - (setenv, unsetenv): Make available for __USE_XOPEN2K. - Change return type of unsetenv to int. - (qecvt, qgcvt, qfcvt): Declare only if __USE_MISC. - * include/stdlib.h: Change return type of unsetenv to int. - Change return type of random to long int. - * sysdeps/generic/setenv.c (unsetenv): Change return type to int. - Return -1 and set errno if parameter is invalid. - * stdlib/random.c (__random): Change return value type to long. - - * conform/data/stdio.h-data: Account for changes in XPG6. - - * conform/data/spawn.h-data: Correct posix_spawnattr_setflags - prototype. - - * conform/conformtest.pl: Define $mustprepend{"signal.h"}. - * conform/data/signal.h-data: Fix sigev_notify_function entry. - Fix typo (SIGVALRM -> SIGVTALRM). - * sysdeps/unix/sysv/linux/bits/siginfo.h: Define sigev_notify_attr - with real type. - * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. - - * conform/conformtest.pl: Implement optional-element. Define - $mustprepend{"sched.h"}. - * conform/data/sched.h-data: Make sporadic scheduler definitions - optional. - - * pwd/pwd.h: Don't define getpwent_r for XPG. - - * io/sys/poll.h: Define nfds_t and use it in poll prototype. - * sysdeps/generic/poll.c: Use nfds_t type in function definition. - * sysdeps/mach/hurd/poll.c: Likewise. - * sysdeps/unix/bsd/poll.c: Likewise. - * sysdeps/unix/sysv/linux/poll.c: Likewise. - * sysdeps/unix/sysv/aix/poll.c: Likewise. - * sysdeps/generic/bits/poll.h: Define NPOLLFILE only if __USE_MISC. - * sysdeps/unix/sysv/linux/bits/poll.h: Likewise. - * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/poll.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise. - * conform/data/poll.h-data: Fix typo in poll prototype. - - * sysdeps/gnu/netinet/tcp.h: Define everything but TCP_ macros - only if __USE_MISC. - * conform/data/netinet/tcp.h-data: Reserved prefix TCP_. - - * sysdeps/gnu/net/if.h: Cleanup namespace. Define IF_NAMESIZE. - - * inet/netinet/in.h: Make IPPROTO_ constants also macros. - - * conform/conformtest.pl: Implement optional-type. - - * resolv/netdb.h: Include not . Include - only if __USE_MISC. Include instead of - defining uint32_t here. Define IPPORT_RESERVED. - (struct hostent): Type of h_length element is int. - (getnameinfo): Type of flags parameter is unsigned int. - * inet/getnameinfo.c (getnameinfo): flags argument is unsigned. - * conform/data/netdb.h-data: Add many missing definitions. - - * conform/conformtest.pl: Implement optional-macro. - * conform/data/math.h-data: Update for XPG6. - - * math/math.h (HUGE): Define as FLT_MAX value but don't use - FLT_MAX. Don't include . - (MAXFLOAT): Likewise. - - * math/math.h: Define MATH_ERRNO and MATH_ERREXCEPT. - - * include/bits/xopen_lim.h: Don't define FOPEN_MAX here. - - * conform/data/limits.h-data: Mark constants as optional wherever - appropriate. - - * posix/bits/posix2_lim.h: Set correct values for - _POSIX2_COLL_WEIGHTS_MAX and _POSIX2_CHARCLASS_NAME_MAX. Remove - EQUIV_CLASS_MAX. - - * posix/bits/posix1_lim.h: Define _POSIX_TZNAME_MAX as 6. - Required by POSIX. - - * intl/loadmsgcat.c: Include for _LIBC. - - * conform/data/netinet/in.h-data: Add reserved prefixes. - - * conform/data/arpa/inet.h-data: Fix a few typos. - -2001-01-26 Andreas Jaeger - - * sysdeps/generic/strtol.c: Include - * stdlib/strtod.c: Likewise - * stdlib/strfmon.c: Likewise. - * string/strcoll.c: Likewise. - * string/strxfrm.c: Likewise. - * wctype/wcfuncs_l.c: Likewise. - * wctype/wctype_l.c: Likewise. - * wctype/wctrans_l.c: Likewise. - - * include/bits/locale.h: New file. - -2001-01-26 Ulrich Drepper - - * locale/langinfo.h: Correct logic in #ifs when defining YESSTR - and NOSTR. - - * locale/Makefile (headers): Add bits/locale.h. - * locale/langinfo.h: Don't include . Include - and use __LC_ constants instead of LC_. - * locale/locale.h: Include and define LC_ constants - using __LC_ constants. - * locale/bits/locale.h: New file. - * locale/loadlocale.c: Include . - * locale/nl_langinfo.h: Likewise. - - * posix/glob.h: Cleanup namespace for non-_GNU_SOURCE case. - - * io/sys/stat.h: Define S_IFSOCK for XPG6. - - * conform/data/fcntl.h-data: posix_madvise is not expected here. - - * conform/conformtest.pl: Fix handling of macro-str. - - * conform/data/inttypes.h-data: Add missing definition and all of - stdint.h-data. - - * sysdeps/unix/sysv/linux/sys/param.h (MAXSYMLINKS): Bump to 20. - -2001-01-25 Ulrich Drepper - - * conform/conformtest.pl (@headers): Add stdint.h. - * conform/data/stdint.h-data: New file. - - * conform/conformtest.pl: Recognize options --headers and - --dialect. Add dialect-specific CFLAGS. - - * conform/conformtest.pl: Implement handling of recursive - allow-header. - - * conform/data/locale.h-data: Add new struct lconv members. - - * posix/wordexp.h: Correct definition of wordexp_t. - * posix/wordexp.c: Moved to ... - * sysdeps/generic/wordexp.c: ...here. New file. - * sysdeps/unix/sysv/linux/alpha/wordexp.c: New file. - * sysdeps/unix/sysv/linux/ia64/wordexp.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c: New file. - * sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.2.2): Add - wordexp. - * sysdeps/unix/sysv/linux/ia64/Versions: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: Likewise. - - * math/tgmath.h: Pretty printing. +2001-09-04 Jakub Jelinek - * math/Makefile (tests): Add test-tgmath. - (CFLAGS-test-tgmath.c): New variable. - * math/test-tgmath.c: New file. Contributed by Jakub Jelinek. + * iconv/strtab.c (strtabinit): Initialize null Strent. + (newstring): Move len == 0 handling... + (strtabadd): ...here. + If len == 1, return null Strent. + When inserting a suffix of an existing string, check if + it is not equal to some suffix already recorded. + Copy left and right members over if adding longer string. - * conform/conformtest.pl: Handle allow-header in secondary headers - correctly. +2001-09-04 Jakub Jelinek - * conform/data/fcntl.h-data: Mark symbols introduced in XPG6 with - #ifdef. + * sunrpc/rpc_cout.c (upcase): Account for trailing '\0'. - * conform/data/netinet/in.h-data: Use correct comment character. - * conform/data/sys/stat.h-data: Likewise. + * sysdeps/unix/sysv/linux/alpha/gethostname.c: Include . + (__syscall_gethostname): Add prototype. -2001-01-25 Jakub Jelinek +2001-09-04 Ulrich Drepper - * math/tgmath.h (__TGMATH_BINARY_FIRST_REAL_ONLY, - __TGMATH_BINARY_REAL_ONLY, __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY, - __TGMATH_TERNARY_REAL_ONLY): Use proper arguments to - __builtin_classify_type, add ##f suffixes where appropriate. - (__TGMATH_UNARY_REAL_IMAG): Remove extraneous left parenthesis. - (__TGMATH_BINARY_REAL_IMAG): Likewise, use proper arguments to - __builtin_classify_type. - (fma): Fix spelling of first argument. + * elf/dl-object.c (_dl_new_object): Remove unnecessary if. -2001-01-25 Ulrich Drepper +2001-09-02 Ulrich Drepper - * conform/data/unistd.h-data: Mark functions removed in XPG6 - correctly. + * elf/rtld.c (dl_main): Increment l_opencount for main binary. - * posix/unistd.h: Don't make functions removed in XPG6 available if - __USE_XOPEN2K. +2001-08-27 Roland McGrath - * conform/conformtest.pl: Implement optional-constant. - * conform/data/unistd.h-data: Use optional-constant wherever - appropriate. + * sysdeps/unix/sysv/gethostname.c (__gethostname): When LEN is too + short, copy that much into NAME anyway before returning error. - * sysdeps/generic/bits/confname.h: Correct names of _SC_PBS - constants and add _SC_STREAMS. - * sysdeps/posix/sysconf.c (__sysconf): Likewise. +2001-09-01 Richard Henderson - * sysdeps/unix/sysv/linux/statvfs64.c: Rename to __statvfs64 and - make old name weak alias. - * sysdeps/generic/statvfs64.c: Likewise. - * sysdeps/unix/sysv/linux/fstatvfs64.c: Rename to __fstatvfs64 and - make old name weak alias. - * sysdeps/generic/fstatvfs64.c: Likewise. - * include/sys/statvfs.h: New file. + * sysdeps/alpha/elf/Dist: Remove file. + * sysdeps/alpha/elf/Makefile: Remove file. + * sysdeps/alpha/elf/crtbegin.S: Remove file. + * sysdeps/alpha/elf/crtend.S: Remove file. + * sysdeps/alpha/elf/initfini.c: New file. - * sysdeps/generic/bits/confname.h: Define _PC_REC_INCR_XFER_SIZE, - _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, and - _PC_REC_XFER_ALIGN. - * sysdeps/posix/pathconf.c (__pathconf): Implement handling of - _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, - _PC_REC_MIN_XFER_SIZE, and _PC_REC_XFER_ALIGN. - * sysdeps/posix/fpathconf.c (__fpathconf): Likewise. +2001-09-01 Mark Kettenis - * conform/conformtest.pl: Run Unix tests for XPG6. - Implement handling of known namespace violations. - Improve printing of results. + * iconv/tst-iconv1.c: Include for wchar_t. + * iconv/tst-iconv3.c: Likewise. - * posix/unistd.h (usleep): Correct return type. - * sysdeps/unix/sysv/linux/usleep.c: Correct return type. - * sysdeps/unix/bsd/usleep.c: Correct return type. - * sysdeps/mach/usleep.c: Correct return type. - * sysdeps/generic/usleep.c: Correct return type. +2001-09-01 Jakub Jelinek - * posix/unistd.h (sync): Correct return type. - * sysdeps/generic/sync.c: Likewise. - * sysdeps/mach/hurd/sync.c: Likewise. + * sysdeps/generic/inttypes.h (__gwchar_t): Define to wchar_t for C++. - * sysdeps/generic/bits/confname.h (_SC_IOV_MAX): New definition. +2001-09-01 Ulrich Drepper - * posix/unistd.h: Make seteuid and setegid available for XPG6. + * iconv/gconv_cache.c: Rename variable cache to __gconv_cache and + export it. + * iconv/Versions (libc) [GLIBC_2.2.5]: Export __gconv_cache. + * iconv/iconv_prog.c (insert_cache): New function. + (print_known_names): If cache is used call insert_cache to use the + information from the cache [PR libc/2509]. - * wcsmbs/wchar.h: Get FILE definition for XPG5. +2001-08-31 Ulrich Drepper - * conform/data/ctype.h-data: Use correct comment form. - * conform/data/errno.h-data: Likewise. - * conform/data/math.h-data: Likewise. - * conform/data/mqueue.h-data: Likewise. - * conform/data/netdb.h-data: Likewise. - * conform/data/pthread.h-data: Likewise. + * time/strptime.c (strptime_internal): Recognize 'l' format and + handle it like 'I' for symmetry with strftime. -2001-01-24 Ulrich Drepper +2001-08-31 Richard Henderson - * conform/data/wordexp.h-data: Fix typo. + * elf/dl-support.c (_dl_cpuclock_offset): Protect with NONAVAIL. + (HP_TIMING_AVAIL): Set to HP_SMALL_TIMING_AVAIL if present. + * elf/rtld.c (HP_TIMING_AVAIL): Likewise. + (print_statistics): Make scalar unsigned long long. + * sysdeps/alpha/hp-timing.h: New file. - * conform/conformtest.pl: Handle allow-header correctly. +2001-08-31 Jakub Jelinek - * conform/data/time.h-data: Use correct comment form. + * stdio-common/perror.c (perror): Save errno early, pass it + down to perror_internal. + (perror_internal): Add errnum argument. - * conform/conformtest.pl (checknamespace): Ignore #undef lines. +2001-08-31 Jakub Jelinek - * configure.in: Comment out binutils version test. + * sysdeps/alpha/dl-machine.h (elf_machine_rela): Remove unused code. + Don't add old memory content for R_ALPHA_REFQUAD. - * stdlib/strtod.c (str_to_mpn): Correct parsing of thousands - separators. - Reported by Lagardere Jean-Francois . +2001-08-30 Ulrich Drepper - * stdlib/tst-strtod.c (locale_test): New function. - (main): Call locale_test. - * stdlib/Makefile (tst-strtod-ENV): New variable. + * crypt/md5-crypt.c (__md5_crypt_r): Compute used and required + memory correctly. -2001-01-24 Mark Kettenis + * sysdeps/unix/sysv/linux/ia64/ioperm.c (_ioperm): Use __open + instead of open, __close instead of close, __getpagesize instead + of getpagesize. - * hurd/hurdsig.c (_hurdsig_getenv): Remove spurious innermost - declaration of value such that we actually return the value of the - environment variable. + * string/argz-stringify.c (__argz_stringify): Use __strnlen + instead of strnlen. + * include/string.h (strndupa): Redefine here to use __strnlen + instead of strnlen. + * string/strndup.c (__strndup): Use __strnlen not strnlen. -2001-01-24 Andreas Jaeger + * misc/syslog.c (vsyslog): Fix typo in last change (connect -> + connected). - * sysdeps/unix/sysv/linux/init-first.c: Remove extra __sysctl - prototype. - * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. +2001-08-30 Jakub Jelinek - * include/sys/sysctl.h: New file. + * sysdeps/alpha/dl-machine.h (elf_machine_rela): Don't handle + R_ALPHA_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only check + for rtld map if neither RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined. + * sysdeps/i386/dl-machine.h (elf_machine_rel): Similarly. + * sysdeps/ia64/dl-machine.h (elf_machine_rel): Similarly. + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rel): Similarly. + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rel): Similarly. -2001-01-23 Andreas Jaeger +2001-08-30 Ulrich Drepper - * stdlib/Makefile ($(objpfx)isomac.out): Also pass sysincludes to - isomac. + * sysdeps/alpha/fpu/libm-test-ulps: Adjust j0 ULPs. - * elf/dl-load.c (_dl_init_paths): Don't use strdupa in function - arguments. Reported by Jiri Kubicek , - closes PR libc/2039. +2001-08-30 Andreas Jaeger - * manual/install.texi (Tools for Compilation): Change required - binutils version. + * sysdeps/ieee754/ldbl-128/e_jnl.c: New file, + contributed Stephen L Moshier. -2001-01-22 Andreas Jaeger +2001-08-30 Jakub Jelinek - * configure.in: Add test for new enough binutils version, move - compiler/binutils test up. + * sunrpc/etc.rpc (sgi_fam): Add. - * Versions.def: Add version GLIBC_2.2.2. +2001-08-30 Ulrich Drepper -2001-01-21 Ulrich Drepper + * sysdeps/unix/sysv/linux/alpha/gethostname.c: New file. - * iconvdata/TESTS: UTF-8 test data for IBM932 and IBM943 are now - available. - * iconvdata/testdata/IBM932: New file. - * iconvdata/testdata/IBM932..UTF8: New file. - * iconvdata/testdata/IBM943: New file. - * iconvdata/testdata/IBM943..UTF8: New file. - Contributed by Masahide Washizawa . +2001-08-29 Ulrich Drepper -2001-01-21 Franz Sirl + * nis/nis_findserv.c (__nis_findfastest): Don't fail if reply received + first is from a previous call. + Patch by Alexander Belopolsky for [PR libc/3670]. - * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correctly mask offset. +2001-08-29 Andreas Schwab -2001-01-21 Ulrich Drepper + * sysdeps/ia64/fpu/libm-test-ulps: Updated. - * malloc/malloc.c: Remove a few unnecessary initializers of global - variables. +2001-08-25 Maciej W. Rozycki -2000-12-09 H.J. Lu + * config.make.in (INSTALL_SCRIPT): Define. + * Makeconfig (INSTALL_SCRIPT): Define. + * Makerules (do-install-script): New macro to install scripts using + INSTALL_SCRIPT. + (install-bin-script): New rule to install scripts with + do-install-script. + (install-bin-script-nosubdir): New rule. + (install-no-libc.a-nosubdir): Add install-bin-script-nosubdir. + (distinfo-vars): Add $(install-bin-script). + * Rules (others): Likewise. + * Makefile (glibcbug): Install with install-bin-script. + * debug/Makefile (xtrace): Likewise. + (catchsegv): Likewise. + * elf/Makefile (ldd): Likewise. + * malloc/Makefile (mtrace): Likewise. + * timezone/Makefile (tzselect): Likewise. - * nss/Makefile (routines): Add digits_dots. - * nss/Versions (libc): Add __nss_hostname_digits_dots to GLIBC_2.2.2. - * nss/digits_dots.c (__nss_hostname_digits_dots): Turn template - into a function. - * nss/nsswitch.h (__nss_hostname_digits_dots): New internal NSS - function. - * nss/getXXbyYY.c (H_ERRNO_VAR_P): New definition. - (TYPE_VAR_P): Likewise. - (FLAGS_VAR): Likewise. - (AF_VAR_P): Likewise. - (INTERNAL (REENTRANT_NAME)): Call __nss_hostname_digits_dots () - instead of including digits_dots.c. - * nss/getXXbyYY_r.c (H_ERRNO_VAR_P): New definition. - (TYPE_VAR_P): Likewise. - (FLAGS_VAR): Likewise. - (AF_VAR_P): Likewise. - (INTERNAL (REENTRANT_NAME)): Call __nss_hostname_digits_dots () - instead of including digits_dots.c. +2001-08-29 H.J. Lu -2001-01-21 Ulrich Drepper + * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Pass + ELF_RTYPE_CLASS_PLT, instead of R_MIPS_REL32, to + _dl_lookup_versioned_symbol () and _dl_lookup_symbol (). - * sysdeps/posix/getaddrinfo.c: Reduce .data size. +2001-08-29 Andreas Schwab -2001-01-21 Andreas Jaeger + * sysdeps/m68k/fpu/libm-test-ulps: Updated. - * elf/constload2.c: Add prototype for init. +2001-08-28 H.J. Lu -2001-01-21 Ulrich Drepper + * Makeconfig (combreloc-LDFLAGS): New variable. + Add it to LDFLAGS.so, LDFLAGS-rtld, and +link. + * config.make.in (have-z-combreloc): New variable. + * configure.in: Substitute libc_cv_z_combreloc. - * stdlib/stdlib.h (drand48_data): Make available only for - __USE_MISC. Rename elements to protect namespace. Change type - and position of a and init element. - * stdlib/drand48-iter.c: Don't handle unsigned short > 16 bit - differently. Adjust for drand48_data change. Don't compute a here, - it comes from drand48_data. - * stdlib/lcong48_r.c: Don't handle unsigned short > 16 bit - differently. Adjust for drand48_data change. Compute a here. - * stdlib/srand48_r.c: Likewise. - * stdlib/drand48.c: Adjust for drand48_data change. - * stdlib/lrand48.c: Likewise. - * stdlib/mrand48.c: Likewise. - * stdlib/seek48.c: Likewise. - * stdlib/drand48_r.c: Likewise. - * stdlib/lrand48_r.c: Likewise. - * stdlib/mrand48_r.c: Likewise. - * stdlib/seed48_r.c: Likewise. Don't handle unsigned short > 16 bit - differently. - * stdlib/erand48_r.c: Don't handle unsigned short > 16 bit differently. - * stdlib/jrand48_r.c: Likewise. +2001-08-29 Ulrich Drepper * po/sv.po: Update from translation team. + * po/fr.po: Likewise. + * po/da.po: Likewise. -2001-01-21 Andreas Jaeger - - * stdio-common/vfprintf.c (vfprintf): Add casts. - -2001-01-20 Ulrich Drepper - - * iconvdata/run-iconv-test.sh: Reorgnize a bit to allow running only - the ASCII test. - * iconvdata/TESTS: Add entries for IBM932 and IBM943. - - * iconvdata/Makefile (modules): Add IBM932 and IBM943. - * iconvdata/gconv-modules: Add entries for IBM932 and IBM943. - * iconvdata/ibm932.c: New file. - * iconvdata/ibm932.h: New file. - * iconvdata/ibm943.c: New file. - * iconvdata/ibm943.h: New file. - Patches by Masahide Washizawa . - - * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Fix typo - preventing optimization from being done. Set the correct type bit - in seen. Don't define and use _dl_base_addr unless - NEED_DL_BASE_ADDR is defined. - - * io/ftw.c (ftw_dir): Add slash after directory name if there - wasn't any. Reported by loris . - * io/Makefile (tests): Add bug-ftw2. - * io/bug-ftw2.c: New file. - -2001-01-19 Ulrich Drepper - - * stdlib/jrand48_r.c (__jrand48_r): Correct constructing of - results. Reported by Jeff Higham . - * stdlib/tst-rand48.c: New file. - * stdlib/Makefile (tests): Add tst-rand48. - - * locale/newlocale.c (__newlocale): Fix test for setting all - categories. - -2001-01-19 Mark Kettenis - - * sysdeps/mach/hurd/chroot.c (chroot): Revert 1999-02-27 changes, - but change looking up the initial directory port in a similar way - as done by _hurd_change_directory_port_from_name. - * hurd/fchroot.c (fchroot): Likewise. - -2001-01-18 Ulrich Drepper - - * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): If HAVE_AUX_XID is - defined don't look whether the AT_*ID values were set. - If HAVE_AUX_PAGESIZE is defined don't look whether the pagesize is set. - (_dl_show_auxv): Rewrite to avoid switch statement. - * sysdeps/unix/sysv/linux/kernel-features.h: Define - __ASSUME_AT_PAGESIZE for kernel >= 2.4.1. - * sysdeps/unix/sysv/linux/ldsodefs.h: Define HAVE_AUX_XID. - Define HAVE_AUX_PAGESIZE if __ASSUME_AT_PAGESIZE is defined. - - * sysdeps/unix/sysv/linux/fxstat64.c: Add one __builtin_expect. - * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. - * sysdeps/unix/sysv/linux/xstat64.c: Likewise. - - * elf/rtld.c (process_envvars): Call __strtoul_internal instead of - strtoul. - * elf/dl-minimal.c (strtol, __strtol_internal, strtoul): Removed. - (__sigjmp_save): Set __mask_was_saved to zero since we don't save - anything. - * dlfcn/eval.c (__strtol_internal): Define here. - (eval): Use __strtol_internal instead of strtol. - - * elf/elf.h: Add a few more EF_MIPS_* constants. - -2001-01-17 Ulrich Drepper - - * manual/Makefile (chapters): Add debug. - * manual/debug.texi: New file. - * manual/examples/execinfo.c: New file. - Patch by suckfish@ihug.co.nz. - -2001-01-17 Andreas Schwab - - * sysdeps/m68k/bits/byteswap.h (__bswap_32): Add cast to avoid - invalid asm. - -2001-01-17 Andreas Jaeger - - * nscd/connections.c (nscd_run): Use proper format specifier. - -2001-01-16 Ulrich Drepper - - * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Move x86_cap_flags and - x86_platforms data into new file after prepending _dl_. Change - users. - * sysdeps/unix/sysv/linux/i386/dl-procinfo.c: New file. - * sysdeps/unix/sysv/linux/i386/Dist: Add dl-procinfo.c. - * sysdeps/unix/sysv/linux/i386/Makefile: Add rules to build - dl-procinfo.c. - - * setjmp/setjmp.h: Cleanup definition of setjmp macro. - - * sysdeps/i386/elf/bsd-setjmp.S: Real implementation. - * sysdeps/i386/elf/bsd-_setjmp.S: Removed. - * sysdeps/i386/elf/setjmp.S (setjmp): Removed here. - (_setjmp): Likewise. - * sysdeps/i386/bsd-_setjmp.S: Real implementation. - * sysdeps/i386/bsd-setjmp.S: Real implementation. - * sysdeps/i386/bits/setjmp.h: Remove PUSH_SIGNAL_MASK definition. - * sysdeps/i386/setjmp.S: Remove PIC support. This is the non-ELF - version. - -2001-01-16 Andreas Jaeger - - * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (SIGCONTEXT): Fix - misapplied last patch. - -2001-01-15 Ulrich Drepper - - * stdlib/random.c (__initstate): Clean up a cast. - (__setstate): Likewise. - - * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove select - syscall handling. The generic Linux version should work. - -2001-01-15 Andreas Jaeger - - * sysdeps/unix/sysv/linux/sys/sendfile.h: Fix typo. - - * stdio-common/tstscanf.c (main): Add two testcases for '*' modifier. - -2001-01-14 Jakub Jelinek - - * nss/getent.c (print_aliases, aliases_keys, ethers_keys, - netgroup_keys, print_rpc, rpc_keys, print_shadow, shadow_keys): - New functions. - (group_keys, hosts_keys, network_keys, passwd_keys, protocols_keys): - If number is 0, list all. - (services_keys): Likewise. Lookup aliases as well. - (databases): New table. - (build_doc): Prepare argp doc text with list of supported databases. - (main): Change to table driven processing. - -2001-01-14 Thorsten Kukuk - - * sunrpc/xdr.c (xdr_long, xdr_u_long): Fix comments about these - functions. - -2001-01-03 Jakub Jelinek - - * sunrpc/xdr.c (xdr_long, xdr_u_long): Return FALSE if trying to - encode value which does not fit in the 32bit type. - -2001-01-15 Hiroyuki Machida - - * sysdeps/unix/sysv/linux/mips/register-dump.h (REGISTER_DUMP): - Change type of CTX to (struct sigcontext *). - * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (GET_PC): Likewise. - (GET_FRAME): Likewise. - (GET_STACK): Likewise. - (SIGCONTEXT): Likewise. Add 2nd arg _code. - (SIGCONTEXT_EXTRA_ARGS): Add 2nd arg _code. - -2001-01-13 Ulrich Drepper - - * manual/texinfo.tex: Update from upstream version. - -2001-01-13 Jakub Jelinek - - * inet/ether_ntoh.c (lookup_function): Change arguments to match - _nss_*_getntohost_r prototype. - (ether_ntohost): Pass errno pointer to NSS function. - -2001-01-12 Franz Sirl - - * sysdeps/unix/sysv/linux/powerpc/bits/mman.h (MS_SYNC): Fix value. - (MAP_LOCKED): New definition. - (MAP_NORESERVE): New definition. - -2001-01-12 Ulrich Drepper - - * assert/assert.h: Use static_cast instead of C-style cast for C++. - Patch by Enrico Scholz . - -2001-01-12 Ben Collins - - * sysdeps/generic/segfault.c (install_handler): Use access, not - __access. - -2001-01-12 Andreas Jaeger - - * posix/fnmatch_loop.c (FCT): Remove signed warnings. - * posix/wordexp.c (do_parse_glob): Likewise. - * sysdeps/posix/sigblock.c (__sigblock): Likewise. - * sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise. - * elf/dl-open.c (_dl_open): Likewise. - * elf/dl-close.c (_dl_close): Likewise. - * elf/dl-load.c (_dl_map_object): Likewise. - * iconv/iconv_prog.c (process_fd): Likewise. - * stdio-common/vfscanf.c (_IO_vfscanf): Likewise. - - * locale/localeinfo.h (struct locale_data): Use __flexarr instead - of a zero-length array. - -2001-01-11 Jakub Jelinek - - * stdlib/cxa_atexit.c (__cxa_atexit): Cast to (void *, int) func. - * stdlib/cxa_finalize.c (__cxa_finalize): Add hidden second argument. - * stdlib/cxa_on_exit.c: Remove. - * stdlib/Makefile: Revert last patch. - * stdlib/Versions: Likewise. - * include/stdlib.h: Likewise. - * stdlib/exit.h: Revert last patch. - (struct exit_function): Add second argument to cxa fn. - * stdlib/exit.c: Revert last patch. - (exit): Add hidden second argument. - -2001-01-11 H.J. Lu - - * elf/dl-libc.c (do_dlopen): Move DL_STATIC_INIT to ... - * elf/dl-open.c (_dl_open): Here. - * sysdeps/unix/sysv/linux/ia64/dl-static.c (_dl_static_lock): - Make it static. - (_dl_static_init): Initialize the variables every time when possible. - * sysdeps/unix/sysv/linux/ia64/ldsodefs.h (DL_STATIC_INIT): - Undefine it first. - -2001-01-11 Ulrich Drepper - - * stdlib/Makefile (routines): Add cxa_on_exit. - * stdlib/Versions [libc] (GLIBC_2.2.1): Add __cxa_on_exit. - * stdlib/cxa_on_exit.c: New file. - * include/stdlib.h: Add prototype for __cxa_on_exit. - * stdlib/exit.c: Handle ef_cxa2. - * stdlib/exit.h (enum): Add ef_cxa2. - (struct exit_function): Add cxa2. - - * Versions.def [ld]: Add GLIBC_2.2.1. - -2001-01-10 H.J. Lu - - * elf/dl-libc.c (do_dlopen): Call DL_STATIC_INIT for static binaries. - * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep-dl-routines): Add - dl-static. - * sysdeps/unix/sysv/linux/ia64/Versions (ld): Add _dl_var_init. - * sysdeps/generic/ldsodefs.h (DL_STATIC_INIT): Defined if not defined. - * sysdeps/unix/sysv/linux/ia64/ldsodefs.h: New file. - * sysdeps/unix/sysv/linux/ia64/dl-static.c: New file. - * sysdeps/unix/sysv/linux/ia64/Dist: Add dl-static.c. - -2001-01-11 Ulrich Drepper - - * libio/stdio.h: Remove definition of off_t. - -2001-01-11 Andreas Jaeger - - * wcsmbs/tst-mbrtowc.c (utf8_test): New function by Markus Kuhn - . - -2001-01-10 Ulrich Drepper - - * sunrpc/Makefile (distribute): Add errqueue.h. - -2001-01-10 H.J. Lu - - * sysdeps/ia64/dl-machine.h (TRAMPOLINE_TEMPLATE): Also preserve - r9, r10 and r11 for language specific registers. - -2001-01-10 Jakub Jelinek - - * sunrpc/clnt_udp.c (clntudp_bufcreate): Set IP_RECVERR on the - UDP socket. - (clntudp_call): Handle MSG_ERRQUEUE. - * sysdeps/generic/errqueue.h: New file. - * sysdeps/unix/sysv/linux/errqueue.h: New file. - -2001-01-10 H.J. Lu - - * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_getpagesize): Removed. - -2001-01-10 Joseph S. Myers - - * CONFORMANCE: Update. - -2001-01-09 Ulrich Drepper - - * sysdeps/generic/elf/backtracesyms.c (__backtrace_symbols): - Minimal cleanups. Add assert to ensure memory handling is correct. - - * manual/conf.texi (File Minimums): Fix _POSIX_PATH_MAX value. - Reported by Ben Collins . - - * time/strftime.c (my_strftime): Mark previous GNU extensions - which are now in C99 as such. - -2001-01-08 Ulrich Drepper - - * elf/rtld.c (process_envvars): Place output files for profiling - in SUID binaries in /var/profile. - - * elf/dl-load.c (_dl_map_object): Don't look in cache for - preloading in SUID binaries. - - * elf/dl-profile.c (_dl_start_profile): Open the output file with - O_NOFOLLOW if possible. - - * include/stdlib.h: Add __posix_openpt declaration. - * stdlib/stdlib.h: Add posix_openpt declaration. - * login/Versions: Add posix_openpt for GLIBC_2.2.1. - * sysdeps/generic/getpt.c: Define posix_openpt. - * sysdeps/unix/bsd/getpt.c: Likewise. - * sysdeps/unix/sysv/linux/getpt.c: Likewise. - - * time/Makefile (tests): Add tst-mktime. - * time/tst-mktime.c: New file. - - * posix/tst-dir.c (main): One more mkdir() test. - - * sysdeps/unix/sysv/linux/ia64/getpagesize.c (__getpagesize): - Remove getpagesize syscall. We assume that the pagesize is always - determined from the auxiliary vector. - - * intl/dcigettext.c: Fix a few warnings. - Patch by Bruno Haible . - -2001-01-08 Andreas Jaeger - - * io/test-lfs.c (do_test): Check lseek64 return for EINVAL. - Reported by Joseph S. Myers . - -2001-01-08 Ulrich Drepper - - * sysdeps/generic/segfault.c (install_handler): Check output file - name with access(). - - * resolv/res_query.c: Use simply getenv() for HOSTALIASES. - * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add HOSTALIASES. - - * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add missing comma. - - * malloc/memusage.c (me): Use access() to determine whether we - should write the output file or not. - - * libio/bits/stdio.h (printf): Define macro to map printf call to - fprintf which gcc can optimize. - * stdio-common/printf.c: Undefine printf. - -2001-01-07 Ulrich Drepper - - * sysdeps/generic/bits/byteswap.h (__bswap_64): Partly revert last - patch. We must use unsigned int for l member of union. - - * sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Don't call - _dl_aux_init for shared libraries. - - * sysdeps/unix/sysv/linux/glob64.c: Moved to ... - * sysdeps/gnu/glob64.c: ...here. New file. - -2001-01-07 Ben Collins - - * manual/examples/longopt.c: Make the "struct option" a little - more like it should be, adding usage of required_argument, - noargument and such, and also setting the options string right. - - * manual/sysinfo.texi (Load Average): New section, documents - getloadavg(). - -2001-01-06 Ulrich Drepper - - * version.h (VERSION): Bump to 2.2.1. - - * sysdeps/unix/sysv/linux/mips/Dist: Remove sys/acct.h. - * sysdeps/alpha/Dist: Add alphaev6/stxncpy.S and alphaev6/stxcpy.S. - * sysdeps/unix/sysv/aix/Dist: Add uitrunc.c, savef.S, and restf.S. - * dlfcn/Makefile (distribute): Add errmsg1mod.c. - * Makefile (distribute): Add include/libc-internal.h. - * libio/Makefile (distribute): Avoid overwriting. - - * iconvdata/ibm937.c (BODY to IBM937): Correct several mistakes in - buffer and table handling. - -2001-01-05 H.J. Lu - - * elf/dl-support.c (non_dynamic_init): Move the auxiliary - vector checking to ... - (_dl_aux_init): Here. New function. Defined only if - HAVE_AUX_VECTOR is defined. - - * sysdeps/generic/libc-start.c (__libc_start_main): Call - _dl_aux_init for static binaries if HAVE_AUX_VECTOR is defined. - - * sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Call - _dl_aux_init. - - * sysdeps/unix/sysv/linux/ldsodefs.h (DL_FIND_AUXV): Removed. - (HAVE_AUX_VECTOR): Defined. - (_dl_aux_init): Declared. - -2001-01-05 Ben Collins - - * manual/string.texi (Finding Tokens in a String): Document XPG - basename() and dirname(), as well as GNU basename(). - -2001-01-05 Jakub Jelinek - - * Makeconfig (preprocess-version): Replace -traditional with - -x assembler-with-cpp. - -2001-01-05 Joseph S. Myers - - * math/bits/cmathcalls.h: Don't define inline cimag, creal or conj - for GCC 2.97 or later. - -2001-01-05 Ben Collins - - * manual/stdio.texi (getline): Clarify the return value in the - case of EOF being reached before a newline. - -2001-01-04 Jakub Jelinek - - * sunrpc/pmap_clnt.c (__get_myaddress): Return TRUE if successful, - FALSE otherwise. - (pmap_set, pmap_unset): Check __get_myaddress return value. - -2001-01-05 Mark Kettenis - - * sysdeps/generic/netinet/if_ether.h: Include . - (struct ether_addr): Declare ether_addr_octet member as - `u_int8_t'. Add __attribute__ ((__packed__)). - -2001-01-06 Mark Kettenis - - * sysdeps/mach/hurd/readdir64.c: New file. - * sysdeps/mach/hurd/readdir64_r.c: New file. - -2001-01-07 Mark Kettenis - - * sysdeps/mach/hurd/fstatvfs.c (fstatvfs): Add comment about - `struct statfs' and `struct statvfs' being identical. - * sysdeps/mach/hurd/statvfs.c (statvfs): Likewise. - -2001-01-06 Mark Kettenis - - * sysdeps/mach/hurd/fstatfs64.c: New file. - * sysdeps/mach/hurd/fstatvfs64.c: New file. - * sysdeps/mach/hurd/statfs64.c: New file. - * sysdeps/mach/hurd/statvfs64.c: New file. - * sysdeps/mach/hurd/statfsconv.c: New file. - * sysdeps/mach/hurd/Dist: Add statfsconv.c. - -2001-01-06 Ulrich Drepper - - * iconv/skeleton.c: Reset outbuf for next round of the loop. - Reported by Owen Taylor . - * iconv/Makefile (tests): Add tst-iconv3. - * iconv/tst-iconv3.c: New file. - - * iconvdata/ibm930.c: Fix handling of state. Optimize a bit. - * iconvdata/ibm933.c: Likewise. - * iconvdata/ibm935.c: Likewise. - * iconvdata/ibm937.c: Likewise. - * iconvdata/ibm939.c: Likewise. - * iconvdata/ibm930.h: Adjust single byte table for optimization. - * iconvdata/ibm933.h: Likewise. - * iconvdata/ibm935.h: Likewise. - * iconvdata/ibm939.h: Likewise. - - * iconvdata/testdata/IBM930: Add misssing SI. - * iconvdata/testdata/IBM933: Likewise. - * iconvdata/testdata/IBM935: Likewise. - * iconvdata/testdata/IBM937: Likewise. - * iconvdata/testdata/IBM939: Likewise. - -2001-01-06 Andreas Jaeger - - * configure.in: Check for old add-ons that shouldn't be used with - current glibc anymore. - -2001-01-06 Mark Kettenis - - * sysdeps/mach/hurd/readdir_r.c (__readdir_r): Return error number - instead of -1 on failure. Don't forget to copy file name into - *ENTRY if successful. Set *RESULT to NULL upon reaching the end - of the directory. - -2001-01-06 Mark Kettenis - - * sysdeps/mach/hurd/xstatconv.c (xstat64_conv): Don't forget to - copy st_atime member. - -2001-01-05 Ulrich Drepper - - * io/ftw.c (ftw_dir): Don't add a second slash at the beginning - for searches from the root directory. - Reported by loris [PR libc/1991]. - * io/Makefile (tests): Add bug-ftw1. - * io/bug-ftw1.c: New file. - - * elf/dl-support.c (non_dynamic_init): Don't define DL_FIND_AUXV - if it is not available. Instead use it only if it is available. - * sysdeps/unix/sysv/linux/ldsodefs.h: New file. - - * iconv/gconv_simple.c (internal_ics4_loop): Correct test for - overflowing output buffer. - (internal_ucs4_loop_unaligned): Likewise. - (ucs4_internal_loop): Likewise. - (ucs4_internal_loop_unaligned): Likewise. - (internal_ucs4le_loop): Likewise. - (internal_ucs4le_loop_unaligned): Likewise. - (ucs4le_internal_loop): Likewise. - (ucs4le_internal_loop_unaligned): Likewise. - Reported by Owen Taylor . - * iconv/Makefile (tests): Add tst-iconv2. - * iconv/tst-iconv2.c: New file. - -2001-01-04 H.J. Lu - - * elf/dl-support.c (DL_FIND_AUXV): New. Defined if not defined. - (_dl_clktck): Declared. - (non_dynamic_init): Take 3 arguments. - Set _dl_pagesize, _dl_platform and _dl_clktck from AUX. - -2001-01-01 Bruno Haible - - Finish implementation of plural form handling. - * intl/dcigettext.c (known_translation_t): Rename 'domain' field to - 'domainname'. Remove 'plindex' field. Add 'domain' and - 'translation_length' fields. - (transcmp): Don't compare 'plindex' fields. - (plural_lookup): New function. - (DCIGETTEXT): Change cache handing in the plural case. Don't call - plural_eval before the translation and its catalog file have been - found. Remove plindex from cache key. Add 'translation_length' and - 'domain' to cache result. - (_nl_find_msg): Remove index argument, return length of translation - to the caller instead. Weaken comparison of string lengths, to account - for plural entries. Call iconv() on the entire result string, not - only on the portion needed so far. - * intl/loadinfo.h (_nl_find_msg): Remove index argument, add lengthp - argument. - * intl/loadmsgcat.c (_nl_load_domain): Adapt to _nl_find_msg change. - -2001-01-04 Ulrich Drepper - - * intl/plural.y (yylex): Minimal improvement in number scanner. - -2000-07-31 Bruno Haible - - * intl/plural.y: Include config.h. Needed to define 'inline' away for - C compilers that don't support it. - (yylex): Don't use gcc specific case range syntax. - * intl/loadmsgcat.c (INIT_GERMANIC_PLURAL): New macro, for old - compilers. - -2000-10-12 Bruno Haible - - * intl/finddomain.c: Remove unneeded includes. - -2000-10-12 Bruno Haible - - * intl/localealias.c (memcpy): Return first argument, just like the - real memcpy function does. - * intl/bindtextdom.c (memcpy): Likewise. - * intl/finddomain.c (memcpy): Likewise. - * intl/l10nflist.c (memcpy): Likewise. - * intl/textdomain.c (memcpy): Likewise. - From Paul Eggert . - -2001-01-03 Jakub Jelinek - - * resolv/resolv.h (struct __res_state): Add nsinit field. - * resolv/res_send.c (res_nsend): Use it instead of nscount. - * resolv/res_init.c (__res_vinit): Initialize it. - (res_nclose): Clear it instead of nscount. - -2001-01-04 Ulrich Drepper - - * malloc/mtrace.pl: Fix matching of addresses. - Patch by Aharon Robbins . - - * Versions.def (ld): Add GLIBC_2.2. - - * catgets/gencat.c: Copyright 2001. - * csu/version.c: Likewise. - * debug/catchsegv.sh: Likewise. - * debug/xtrace.sh: Likewise. - * elf/ldconfig.c: Likewise. - * elf/sprof.c: Likewise. - * iconv/iconv_prog.c: Likewise. - * locale/locale.c: Likewise. - * locale/localedef.c: Likewise. - * malloc/memusage.sh: Likewise. - * malloc/mtrace.pl: Likewise. - * nscd/nscd.c: Likewise. - * posix/getconf.c: Likewise. - -2001-01-04 Mark Kettenis - - * include/stdio.h: Only provide __getwc_unlocked prototype if - USE_IN_LIBIO is defined. - -2001-01-04 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/socket.S (__socket): Fix error code - handling. - -2001-01-03 Andreas Schwab - - * sysdeps/generic/strtoll.c: Remove unused __strtoq_internal alias. - * sysdeps/generic/strtoull.c: Remove unused __strtouq_internal alias. - - * sysdeps/wordsize-64/strtol.c: Add strtoq alias and fix strtoll alias. - * sysdeps/wordsize-64/strtoul.c: Add strtouq alias and fix - strtoull alias. - * sysdeps/wordsize-64/wcstol.c: Add wcstoq alias and fix wcstoll alias. - * sysdeps/wordsize-64/wcstoul.c: Add wcstouq alias and fix - wcstoull alias. - - * sysdeps/generic/strtoul.c: Make sure we find strtol.c in this - directory. - * sysdeps/generic/strtol_l.c: Likewise. - * sysdeps/generic/strtoul_l.c: Likewise. - * sysdeps/generic/wcstoul.c: Likewise, for wcstol.c. - - * sysdeps/wordsize-64/strtol_l.c: Fix alias. - * sysdeps/wordsize-64/strtoul_l.c: Likewise. - * sysdeps/wordsize-64/wcstol_l.c: Fix alias. - * sysdeps/wordsize-64/wcstoul_l.c: Likewise. - -2001-01-04 Andreas Jaeger - - * nss/nsswitch.c: Include files for missing prototypes, remove - buggy declaration of prototypes. - -2001-01-03 Franz Sirl - - * resolv/Versions: Fix bracing. - * sysdeps/powerpc/soft-fp/Versions: Likewise. - * sysdeps/sparc/sparc64/soft-fp/Versions: Likewise. - -2001-01-02 Franz Sirl - - * sysdeps/powerpc/dl-machine.c (__process_machine_rela): Fix typo. - -2001-01-02 Ulrich Drepper - - * manual/Makefile (TEXI2PDF): Change to texi2dvi --pdf. - Suggested by Minko Markov . - -2001-01-02 Franz Sirl - - * sysdeps/powerpc/elf/start.S (__data_start): Make it global. - * sysdeps/powerpc/dl-machine.c (dl_reloc_overflow): Print the name of - the failing symbol. - (__process_machine_rela): Pass symbol to dl_reloc_overflow(). - -2001-01-02 Ben Collins - - * time/tzset.c (tzset_internal): Make sure we fall back to UTC - if TZ is not set and TZDEFAULT is not present. - -2001-01-01 Ben Collins - - * string/strings.h: Make sure we declare our functions even if - string.h is already included, based on whether or not __USE_BSD is - defined. - -2001-01-02 Ulrich Drepper - - * dlfcn/dlerror.c (dlerror): Handle call of dlerror() before any - other dlopen() and dlsym(). - Based on a patch by Ben Collins . - -2001-01-02 Andreas Jaeger - - * dlfcn/errmsg1.c (main): Call dlerror initially. - Reported by Ben Collins . - -2001-01-02 Ulrich Drepper - - * intl/dcigettext.c (guess_category_value): Rewrite so that LANGUAGE - value is ignored if the selected locale is the C locale. - * intl/tst-gettext.c: Set locale for above change. - * intl/tst-translit.c: Likewise. - -2001-01-02 Andreas Jaeger - - * libio/wgenops.c (_IO_wdoallocbuf): Use correct wide access macro. - (_IO_switch_to_wget_mode): Likewise. - (_IO_sputbackwc): Likewise. - (_IO_sungetwc): Use wint_t for result. - - * stdio-common/vfscanf.c (__vfscanf): Use WINT_T for done. - - * sysdeps/generic/strtol.c (strtol): Make cnt size_t for correct - signedness. - - * sysdeps/generic/printf_fphex.c (putc): Cast _IO_putwc_unlocked - to (int) to avoid warnings. - * stdio-common/printf_fp.c (putc): Likewise. - * stdio-common/printf_size.c (putc): Likewise. - - * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): Make - constant unsigned. - -2001-01-01 Andreas Jaeger - - * inet/rcmd.c (rcmd_af): Use socklen_t for len. - -2000-12-31 Andreas Jaeger - - * include/libc-internal.h: Add prototype for __libc_freeres. - - * sysdeps/unix/sysv/linux/init-first.c: Include - for prototypes, remove redundant prototypes. - * gmon/gmon.c: Likewise. - * sysdeps/unix/i386/i586/clock_getres.c: Likewise. - * sysdeps/unix/i386/i586/clock_gettime.c: Likewise. - * malloc/mtrace.c: Likewise. - - * sysdeps/generic/enbl-secure.c: Include for - prototypes. - * elf/soinit.c: Likewise. - * sysdeps/generic/prof-freq.c: Likewise. - * sysdeps/mach/hurd/profil.c: Likewise. - * debug/noophooks.c: Likewise. - * debug/pcprofile.c: Likewise. - * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Likewise. - * sysdeps/generic/get_clockfreq.c: Likewise. - * malloc/set-freeres.c: Likewise. - - * locale/localeinfo.h: Add internal prototypes. - - * elf/rtld.c (dl_main): Fix prototype. - - * iconvdata/tst-table-to.c (main): Use return instead of exit to - avoid warning. - - * nis/rpcsvc/yp_prot.h: Remove __P. - * nis/rpcsvc/ypupd.h: Likewise. - * nis/rpcsvc/yp.h: Likewise. - - * sunrpc/rpc_main.c: Add noreturn attributes. - * sunrpc/rpc_scan.h: Likewise. - - * sunrpc/rpc_hout.c (storexdrfuncdecl): Make static. - - * sunrpc/rpcinfo.c: Add noreturn attribute to brdcst. - - * sunrpc/proto.h: Add noreturn attributes to error and crash. - - * posix/bsd-getpgrp.c: Add prototype to avoid warning. - - * sunrpc/svc_unix.c: Include for prototypes. - - * sunrpc/create_xid.c: Include for prototypes. - - * include/rpc/rpc_msg.h: Add prototypes for some functions. - * include/rpc/auth.h: Likewise. - * include/rpc/auth_des.h: Likewise. - * include/rpc/clnt.h: Likewise. - * include/rpc/rpc.h: Likewise. - * include/rpc/svc.h: Likewise. - * include/rpc/svc_auth.h: Likewise. - - * include/rpc/des_crypt.h: New file. - - * malloc/memusagestat.c (main): Use return instead of exit to - avoid warning. - * io/pwd.c (main): Likewise. - * iconvdata/tst-table-from.c (main): Likewise. - * ctype/test_ctype.c (main): Likewise. - * setjmp/tst-setjmp.c (main): Likewise. - * signal/tst-signal.c (main): Likewise. - * stdlib/tst-strtol.c (main): Likewise. - * stdlib/tst-strtod.c (main): Likewise. - * stdlib/tst-strtoll.c (main): Likewise. - * stdlib/tst-xpg-basename.c (main): Likewise. - * dirent/tst-seekdir.c (main): Likewise. - * grp/testgrp.c (main): Likewise. - * inet/test_ifindex.c (main): Likewise. - * io/test-utime.c (main): Likewise. - * posix/test-vfork.c (main): Likewise. - * posix/testfnm.c (main): Likewise. - * stdio-common/temptest.c (main): Likewise. - * stdio-common/test_rdwr.c (main): Likewise. - * stdio-common/tst-fileno.c (main): Likewise. - * stdio-common/tst-sscanf.c (main): Likewise. - * stdio-common/tstscanf.c (main): Likewise. - * string/bug-strncat1.c (main): Likewise. - * string/bug-strpbrk1.c (main): Likewise. - * string/bug-strspn1.c (main): Likewise. - * string/test-ffs.c (main): Likewise. - * string/tst-inlcall.c (main): Likewise. - * string/tst-svc.c (main): Likewise. - * timezone/test-tz.c (main): Likewise. - * wctype/test_wcfuncs.c (main): Likewise. - * wctype/test_wctype.c (main): Likewise. - - * stdlib/tst-random.c: Add attribute noreturn to fail. - -2000-12-28 Wolfram Gloger - - * malloc/malloc.c (MALLOC_COPY): Handle case if source and - destination overlap. Assume dest is always below source if - overlapping. - -2000-12-30 Ulrich Drepper - - * elf/dl-close.c (_dl_close): We can ignore the NODELETE flag if the - object was not yet initialized. - -2000-12-28 H.J. Lu - - * elf/dl-deps.c (_dl_map_object_deps): Make sure the DSO state - is always consistent even if its dependency is failed. - - * elf/dl-open.c (_dl_open): Increment the open count before - calling _dl_close () in case of failure. - - * elf/neededtest4.c: New file. - * elf/neededobj5.c: New file. - * elf/neededobj6.c: New file. - - * elf/Makefile (distribute): Add neededobj5.c and neededobj6.c. - (tests): Add neededtest4. - (modules-names): Add neededobj5 and neededobj6. - ($(objpfx)neededobj6.so): New target. - ($(objpfx)neededtest4): New target. - ($(objpfx)neededtest4.out): New target. - -2000-12-28 Joseph S. Myers - - * misc/sys/cdefs.h (__attribute_format_strfmon__): Define. - * stdlib/monetary.h: Add strfmon format attributes. - -2000-12-28 Roland McGrath - - * sysdeps/mach/hurd/ioctl.c (do_ioctl): Avoid double-increment after - __mempcpy does it for us. - -2000-12-28 Andreas Jaeger - - * sysdeps/generic/dl-environ.c: Add prototype for unsetenv. - - * sysdeps/unix/sysv/linux/i386/setrlimit.c: Add prototype for - __new_setrlimit. - - * sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: Add prototype for - __old_getrlimit64. - - * sysdeps/unix/sysv/linux/i386/getrlimit.c: Add prototype for - __new_getrlimit. - - * sysdeps/unix/sysv/linux/i386/chown.c: Add prototypes for - __chown_is_lchown and __real_chown. - - * sysdeps/generic/ldsodefs.h: Add noreturn attribute to - _dl_reloc_bad_type. - - * sunrpc/rpc_hout.c (print_funcdef): Add break statement to shut - up GCC's warning about "deprecated use of label at end of compound - statement." - * sunrpc/rpc_cout.c (emit_inline): Likewise. - - * gmon/bb_exit_func.c: Include for internal - prototypes. - Remove struct bb and __bb_head since those are declared by - sys/gmon.h. - -2000-12-22 Ben Collins - - * manual/charset.texi: Fix typo in description of WCHAR_MAX. - - * manual/argp.texi: Document argp_domain as part of struct argp. - -2000-12-28 Andreas Jaeger - - * catgets/Makefile (generated): Add sample.SJIS.cat. - - * sunrpc/rpc_dtable.c: Include rpc/clnt.h for prototypes. - - * elf/dl-minimal.c: Add prototypes. - - * include/locale.h: Add internal prototypes. - * include/sys/gmon.h: Likewise. - - * dlfcn/errmsg1mod.c: Add prototype for foo to shut up GCC. - -2000-12-27 Ben Collins - - * elf/dl-open.c (_dl_open): Correctly set the new objname pointer - when reallocating the error strings. - Reported by Kalle Olavi Niemitalo - -2000-12-27 Ulrich Drepper - - * dlfcn/Makefile (tests): Add errmsg1. - (modules-names): Add errmsg1mod. - Add rules to run errmsg1. - * dlfcn/errmsg1.c: New file. - * dlfcn/errmsg1mod.c: New file. - - * dlfcn/dlerror.c (dlerror): Always create output string which - includes object file name. - - * sysdeps/alpha/alphaev6/memcpy.S: Don't go through unrolled loop - if we would go through it only once. - Patch by Rick Gorton . - - * sysdeps/alpha/alphaev67/strncat.S: Fix handling of numeric parameter. - Patch by Richard Henderson . - -2000-12-27 Jakub Jelinek - - * malloc/malloc.c (memmove): Add prototypes. - (MALLOC_MEMMOVE): Define. - (chunk_realloc): Use it instead of MALLOC_COPY if source and - destination might overlap. - -2000-12-27 Andreas Jaeger - - * stdio-common/printf_fp.c (__printf_fp): Add prototype for nested - function. - * elf/dl-load.c (_dl_map_object_from_fd): Likewise. - * locale/programs/locale.c (show_locale_vars): Likewise. - (show_info): Likewise. - * locale/programs/ld-collate.c (collate_output): Likewise. - * locale/programs/ld-ctype.c (set_class_defaults): Likewise. - * elf/dl-deps.c (_dl_map_object_deps): Likewise. - * stdlib/rpmatch.c (rpmatch): Likewise. - - * setjmp/tst-setjmp.c: Make local functions static. - * setjmp/jmpbug.c: Likewise. - * signal/tst-signal.c: Likewise. - * stdio-common/tfformat.c: Likewise. - * string/tst-svc.c: Likewise. - * time/clocktest.c: Likewise. - * time/tst-getdate.c: Likewise. - * dirent/list.c: Likewise. - * dirent/opendir-tst1.c: Likewise. - * posix/runtests.c: Likewise. - * posix/tst-getaddrinfo.c: Likewise. - * posix/tst-chmod.c: Likewise. - * posix/wordexp-test.c: Likewise. - * misc/tst-efgcvt.c: Likewise. - * timezone/tst-timezone.c: Likewise. - * rt/tst-clock.c: Likewise. - * rt/tst-shm.c: Likewise. - * rt/tst-aio2.c: Likewise. - * rt/tst-aio3.c: Likewise. - * rt/tst-aio4.c: Likewise. - * rt/tst-aio5.c: Likewise. - - * dlfcn/failtest.c: Add prototype for foo. - - * dlfcn/glrefmain.c: Add prototype for do_test. - - * dlfcn/tst-dladdr.c: Add prototype for do_test. - - * string/test-ffs.c (main): Add prototype for nested function. - - * sunrpc/des_soft.c: Include rpc/des_crypt.h for prototype. - - * nss/XXX-lookup.c: Add prototype to shut up GCC. - - * include/netinet/ether.h (DECLARE_NSS_PROTOTYPES): Fix - setetherent prototype. - Add internal interfaces. - - * nis/nss_nis/nis-ethers.c (_nss_nis_setetherent): Likewise. - * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_setetherent): Likewise. - - * resolv/res_data.c: Don't add (conflicting) prototypes for _LIBC. - - * nis/nis_intern.h: Add prototype for __pmap_getnisport. - - * nss/nss_files/files-ethers.c: Include netinet/ether.h to get - prototypes, remove struct etherent since it's declared in ether.h. - Fix ntohost declaration. - - * elf/dl-profile.c (_dl_mcount): Add empty statement to shut up GCC. - - * include/getopt.h: Add internal interfaces. - * include/termios.h: Likewise. - * include/resolv.h: Likewise. - * include/netdb.h: Likewise. - * include/grp.h: Likewise. - * include/pwd.h: Likewise. - * include/shadow.h: Likewise. - * include/rpc/netdb.h: Likewise. - * include/setjmp.h: Likewise. - - * include/stdio.h: Add prototypes for compatibility functions. - * include/grp.h: Likewise. - * include/pwd.h: Likewise. - * include/shadow.h: Likewise. +2001-08-28 Maciej W. Rozycki - * include/fenv.h: Define internal interfaces. + * Makerules: Fix a typo: MD% -> MD5. -2000-12-27 Ulrich Drepper +2001-08-28 Ulrich Drepper - * sysdeps/generic/bits/byteswap.h (__bswap_64): Handle constant - argument case separately. - * sysdeps/i386/bits/byteswap.h (__bswap_64): Likewise. + * sunrpc/rpc_hout.c (pargdef): Function must take pointer to object. + Patch by Patrick Duval . -2000-12-27 Andreas Jaeger +2001-08-28 Andreas Jaeger - * include/sys/wait.h: Add some prototypes. - * Rules (dummy.c): Create also prototype to shut up GCC. + * manual/libc-texinfo.sh: Add entry about free manuals. -2000-12-27 Andreas Jaeger + * manual/contrib.texi (Contributors): Fix cross reference. - * sysdeps/mach/hurd/if_index.c (__protocol_available): Uncomment, - it's not needed at the moment. - * sysdeps/generic/if_index.c (__protocol_available): Likewise. - * sysdeps/unix/sysv/linux/if_index.c (__protocol_available): Likewise. + * manual/libc.texinfo (Copying): Include freemanuals. -2000-12-26 Andreas Jaeger + * manual/Makefile (appendices): Add freemanuals. - * libio/getc_u.c: Include stdio.h via system path to get internal - prototypes. - * libio/getwc_u.c: Likewise. + * manual/freemanuals.texi: New file. + Patch by Brian Youmans <3diff@gnu.org>. - * stdlib/strfmon.c: Fix prototype of __printf_fp. + * manual/libm-err-tab.pl: Pretty print more platforms, print a + smaller table. - * stdio-common/vfprintf.c (process_arg): Move __printf_fphex and - __printf_fp prototypes to ... - * include/printf.h: ...here. + * manual/math.texi (Errors in Math Functions): Fix grammar, start + table on separate page. + Patch by Brian Youmans <3diff@gnu.org>. - * include/stdio.h: Add some internal prototypes to shut up GCC. - * include/stdlib.h: Likewise. +2001-08-27 Ulrich Drepper - * sysdeps/posix/sigpause.c (__sigpause): Use ISO C prototype - declaration. + * misc/syslog.c (vsyslog): Try a bit harder to use syslogd. If + the connection went down after we first used it try to connect + again and resend the message before printing to the console. + Reported by Coserea Gh. Tudor . - * include/signal.h: Add prototypes for internal sigpause - interfaces. +2001-08-27 Jakub Jelinek -2000-12-26 Ulrich Drepper + * string/tst-strlen.c (main): Test strnlen (, -1) too. + * sysdeps/generic/strnlen.c (__strnlen): Fix for maxlens with top + bit set. - * sysdeps/generic/bits/byteswap.h (__bswap_64): Make it usable for - 64bit platforms. Reported by Dave Gilbert . +2001-08-27 Ulrich Drepper - * string/Makefile (tests): Add tst-bswap. - * string/tst-bswap.c: New file. + * iconv/strtab.c (searchstring): Use correct length for comparison. + (strtabadd): Account total size correct if new string has old string as + substring. -2000-12-11 Bruno Haible +2001-08-27 Jakub Jelinek - * Makefile ($(inst_includedir)/gnu/stubs.h): Sort in the C locale. + * elf/rtld.c (dl_main): Update call to _dl_lookup_symbol. -2000-12-26 Ulrich Drepper +2001-08-27 Andreas Jaeger - * sunrpc/Makefile (rpcgen-cmd): Use single quotes in sed call. - Patch by Ed Connell . + * sysdeps/i386/fpu/libm-test-ulps (float): Add ulps for new tests. -2000-12-24 Ulrich Drepper + * math/libm-test.inc (j0_test): Add extra tests. + * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Use |x|, + not x, in Hankel approximation. + Patches by Stephen L Moshier. - * locale/iso-639.def: Correct one entry. Add two missing entries. +2001-08-26 Ulrich Drepper - * locale/iso-4217.def: Change entry for Eritrea. - Reported by Daniel Yacob . + * sysdeps/ia64/dl-lookupcfg.h: Add forward declaration for struct + link_map. -2000-12-23 Ben Collins + * configure.in: Fix test for .rela.dyn section. - * manual/charset.texi (Extended Char Intro): Fix typo in ISO 6937 - description. + * elf/dl-runtime.c: Update calls to _dl_lookup_*. - * manual/stdio.texi (Dynamic Output): Document the return value of - asprintf. Also make the asprintf/snprintf examples a little - better (check for some error returns). +2001-08-26 Jakub Jelinek -2000-12-22 Andreas Jaeger + * elf/dl-reloc.c (RESOLVE_MAP, RESOLVE): Use elf_machine_type_class + instead of elf_machine_lookup_noexec_p and elf_machine_lookup_noplt_p. + Pass type_class to _dl_lookup_*. + * elf/dl-lookup.c (_dl_lookup_symbol): Take type_class parameter now. + Pass around just type_class instead of noexec, noplt pair. + (_dl_lookup_versioned_symbol): Likewise. + (_dl_lookup_symbol_skip): Pass around just type_class instead of + noexec, noplt pair. + (_dl_lookup_versioned_symbol_skip): Likewise. + (_dl_do_lookup, _dl_do_lookup_versioned): Likewise. + * elf/do-lookup.h (do_lookup): Likewise. + * include/link.h (struct link_map): Replace noexec and noplt fields + in l_lookup_cache with type_class field. + * sysdeps/generic/ldsodefs.h (ELF_RTYPE_CLASS_PLT, + ELF_RTYPE_CLASS_COPY): Define. + Adjust prototypes for _dl_lookup_symbol and + _dl_lookup_versioned_symbol. + * sysdeps/alpha/dl-machine.h (elf_machine_lookup_noplt_p, + elf_machine_lookup_noexec_p): Remove. + (elf_machine_type_class): Define. + * sysdeps/arm/dl-machine.h: Likewise. + * sysdeps/hppa/dl-machine.h: Likewise. + * sysdeps/cris/dl-machine.h: Likewise. + * sysdeps/i386/dl-machine.h: Likewise. + * sysdeps/ia64/dl-machine.h: Likewise. + * sysdeps/m68k/dl-machine.h: Likewise. + * sysdeps/mips/mips64/dl-machine.h: Likewise. + * sysdeps/mips/dl-machine.h: Likewise. + * sysdeps/powerpc/dl-machine.h: Likewise. + * sysdeps/sparc/sparc32/dl-machine.h: Likewise. + * sysdeps/sparc/sparc64/dl-machine.h: Likewise. + * sysdeps/sh/dl-machine.h: Likewise. + * sysdeps/s390/s390-32/dl-machine.h: Likewise. + * sysdeps/s390/s390-64/dl-machine.h: Likewise. - * include/stdio.h: Add __ftrylockfile prototype. +2001-08-26 Ulrich Drepper -2000-12-21 H.J. Lu + * manual/message.texi (Advanced gettext functions): Change + description of plural forms for Slovak. + Reported by Marcel Telka . - * sysdeps/ia64/fpu/math_ldbl.h (ieee_long_double_shape_type): - Make sign_exponent element signed. + * manuaL/time.texi (Low-Level Time String Parsing): Fix description of + %z. Reported by C. Scott Ananian . - * sysdeps/ieee754/ldbl-96/math_ldbl.h (ieee_long_double_shape_type): - Fix a typo. +2001-08-26 Jakub Jelinek - * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Remove dead branch. + * sysdeps/s390/s390-32/dl-machine.h (elf_machine_lazy_rel): Fix a + typo. Patch by Florian La Roche . -2000-12-21 Andreas Jaeger +2001-08-26 Ulrich Drepper - * nis/nss_nisplus/nisplus-ethers.c (struct etherent): Removed. - * inet/ether_hton.c: Likewise - * inet/ether_ntoh.c: Likewise. + * include/link.h (struct link_map): Add l_lookup_cache element. + * elf/dl-reloc.c (RESOLVE): Add symbol caching here. + (RESOLVE_MAP): Likewise. + (_dl_relocate_object): Remove cache initialization. + * elf/dl-lookup.c: Rip out cache handling code. + * sysdeps/generic/ldsodefs.h: Remove lookup_cache struct and variable + declarations. - * nis/nss_nis/nis-ethers.c (_nss_nis_getntohost_r): Fix - declaration to match prototype. + * elf/dl-lookup.c (_dl_lookup_symbol): Reorder some conditions and + remove some __builtin_expect. + (_dl_lookup_versioned_symbol): Likewise. - * include/netinet/ether.h (struct etherent): Declare here so that - all implementations use the same struct. + * config.h.in: Add HAVE_Z_COMBRELOC. + * configure.in: Add test for -z combreloc. - * nis/nss_nis/nis-ethers.c: Include netinet/ether.h to get - prototypes. - (struct ether): Removed. - Use struct etherent instead of ether everywhere. + * sysdeps/i386/dl-machine.h (elf_machine_rel): Minor cleanups and + optimizations. Use HAVE_Z_COMBRELOC to avoid generaton of + R_386_RELATIVE handling for ld.so startup. Reduce RTLD_BOOTSTRAP + case to almost no code. - * include/rpc/auth.h (DECLARE_NSS_PROTOTYPES): New. +2001-08-25 Ulrich Drepper - * include/rpc/auth_des.h (DECLARE_NSS_PROTOTYPES): New. + * po/tr.po: Update from translation team. - * sunrpc/publickey.c: Include auth_des.h for prototypes. +2001-08-24 Andreas Jaeger -2000-12-20 Ulrich Drepper + * iconv/Makefile (extra-objs): Add iconvconfig-modules so that + make clean works. - * math/test-misc.c: Add more tests for nextafter functions. +2001-08-24 Ulrich Drepper - * sysdeps/i386/fpu/s_nextafterl.c: Handle change from denormal to - normal correctly. Correct test for sign. - Based on a patch by HJ Lu. + * elf/rtld.c (print_statistics): Printf % after percent values. + * elf/dl-misc.c (_dl_debug_vdprintf): Implement %%. -2000-12-19 Ulrich Drepper + * elf/dl-lookup.c (_dl_lookup_symbol): If we use the cache we + don't have to compute the hash value and initialize current_value. + Move reference_name variable to where it is needed. + (_dl_lookup_versioned_symbol): Likewise. - * Makeconfig (preprocess-version): Add -traditional to gcc call. - Cleanup sed calls. +2001-08-24 Roland McGrath -2000-12-19 Andreas Jaeger + * string/tester.c (test_strerror): Don't use _sys_errlist/_sys_nerr. + Just test that strerror returns non-null for a few errno codes. - * include/netinet/ether.h (DECLARE_NSS_PROTOTYPES): New. +2001-08-23 Roland McGrath - * nis/nis_intern.h: Add prototype for __do_niscall3. + * hurd/Versions (libc: GLIBC_2.2.5): New set; add _hurd_raise_signal, + _hurdsig_interrupt_timeout, _hurdsig_fault_preemptor. - * nis/nss_nis/nis-rpc.c (_nss_nis_setrpcent): Fix declaration to - match prototype. + * sysdeps/posix/shm_unlink.c (shm_unlink): __unlink -> unlink. - * include/netdb.h (DECLARE_NSS_PROTOTYPES): Reformat. + * mach/Versions (libc: GLIBC_2.2.5): New set; add __mach_msg_destroy, + __mach_reply_port. - * include/rpc/netdb.h (DECLARE_NSS_PROTOTYPES): New. +2001-08-24 Ulrich Drepper - * include/aliases.h (DECLARE_NSS_PROTOTYPES): New. + * nss/test-netdb.c (test_hosts): Don't segfault if gethostname + returns NULL. -2000-12-18 Ulrich Drepper + * elf/do-rel.h (elf_dynamic_do_rel): Fix problem with ld.so + startup. Explicitly remove lazy part for RTLD_BOOTSTRAP since gcc + doesn't do it. + * elf/rtld.c: Include . + * elf/dl-reloc.c: Likewise. - * math/test-misc.c: Add more tests for nextafter. - * sysdeps/i386/fpu/s_nextafterl.c: Handle decrement for x<0 correctly. - * sysdeps/ieee754/ldbl-96/math_ldbl.h - (ieee_long_double_shape_type): Make sign_exponent element signed. +2001-08-24 Maciej W. Rozycki - * manual/message.texi: Add Estonian to plural overview list. - Correct rule for Slavic languages. - Patch by Stanislav Brabec . + * sysdeps/unix/sysv/linux/mips/configure.in: Define AC_SUBST to + empty to prevent junk from being generated. + * sysdeps/unix/sysv/linux/mips/configure: Regenerated. - * nis/nss_nis/nis-netgrp.c: Remove unnecessary initializations. +2001-08-24 Jakub Jelinek -2000-12-18 Andreas Jaeger + * elf/do-rel.h (elf_dynamic_do_rel): If l_addr is 0, skip relative + records. Rename endrel to relative, initialize it to r, and use it + in elf_machine_rel_relative calls. Point r after relative relocs. - * test-skeleton.c: Use temp_name_list instead of name_list to - avoid collision with name_list from inet/netgroup.h. +2001-08-24 Ulrich Drepper - * nss/nss_files/files-network.c (NEED_H_ERRNO): Define. + * sysdeps/i386/dl-machine.h (elf_machine_rel): Correct prediction + of R_386_NONE. - * include/grp.h (DECLARE_NSS_PROTOTYPES): New. - * include/pwd.h (DECLARE_NSS_PROTOTYPES): New. - * include/netdb.h (DECLARE_NSS_PROTOTYPES): New. - * include/shadow.h (DECLARE_NSS_PROTOTYPES): New. +2001-08-24 Jakub Jelinek - * hesiod/nss_hesiod/hesiod-proto.c (_nss_hesiod_setprotoent): Fix - declaration to match prototype. - * hesiod/nss_hesiod/hesiod-pwd.c (_nss_hesiod_setpwent): Likewise. - * hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_setgrent): Likewise. - * hesiod/nss_hesiod/hesiod-service.c (_nss_hesiod_setservent): - Likewise. - * nis/nss_nis/nis-grp.c (_nss_nis_setgrent): Likewise. - * nis/nss_nis/nis-pwd.c (_nss_nis_setpwent): Likewise. - * nis/nss_nis/nis-proto.c (_nss_nis_setprotoent): Likewise. - * nis/nss_nis/nis-service.c (_nss_nis_setservent): Likewise. - (_nss_nis_getservbyport_r): Likewise. - * nis/nss_nis/nis-hosts.c (_nss_nis_sethostent): Likewise. - * nis/nss_nis/nis-spwd.c (_nss_nis_setspent): Likewise. - * nis/nss_nis/nis-network.c (_nss_nis_getnetent_r): Likewise. - (_nss_nis_setnetent): Likewise - * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Likewise. - (_nss_nis_endnetgrent): Likewise. - * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_endnetgrent): - Likewise. - (_nss_nisplus_setnetgrent): Likewise. - * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Likewise. - * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_setpwent): Likewise. - * nis/nss_nisplus/nisplus-grp.c (_nss_nisplus_setgrent): Likewise. - * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_setnetent): - Likewise. - * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_sethostent): - Likewise. - * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_setservent): + * elf/do-rel.h (elf_machine_rel_relative): Define for rela if + necessary. Undefine newly defined macros at the end. + * sysdeps/hppa/dl-machine.h (elf_machine_rela_relative): + Rename from elf_machine_rel_relative. + * sysdeps/cris/dl-machine.h (elf_machine_rela_relative): Likewise. + * sysdeps/m68k/dl-machine.h (elf_machine_rela_relative): Likewise. + * sysdeps/powerpc/dl-machine.h (elf_machine_rela_relative): Likewise. + * sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela_relative): Likewise. - * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_setprotoent): + * sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela_relative): Likewise. - * nis/nss_compat/compat-spwd.c (_nss_compat_setspent): Likewise. - * nis/nss_compat/compat-pwd.c (_nss_compat_setpwent): Likewise. - * nis/nss_compat/compat-grp.c (_nss_compat_setgrent): Likewise. - * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. - * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise. - (_nss_dns_getnetbyaddr_r): Likewise. - -2000-12-17 Andreas Jaeger - - * sysdeps/generic/k_sinl.c (__kernel_sinl): Fix functions - parameter. - - * sysdeps/unix/sysv/linux/shm_open.c (freeit): Make static and add - unused attribute to shut up gcc warnings. - - * sysdeps/generic/k_sinl.c: Include math_private for prototypes. - * sysdeps/generic/k_tanl.c: Likewise. - * sysdeps/generic/k_cosl.c: Likewise. - * sysdeps/generic/e_j0l.c: Likewise. - * sysdeps/generic/e_j1l.c: Likewise. - * sysdeps/generic/e_jnl.c: Likewise. - * sysdeps/generic/e_lgammal_r.c: Likewise. - - * elf/vismain.c: Move prototypes for functions in vismod*.c to - vismod.h. - * elf/vismod.h: New file. - * elf/Makefile (distribute): Add vismod.h. - * elf/vismod1.c: Include vismod.h. - * elf/vismod2.c: Likewise. - * elf/vismod3.c: Likewise. - - * elf/constload3.c: Add prototype declarations to shut up gcc. - * elf/failobj.c: Likewise. - * elf/nodelmod3.c: Likewise. - * elf/filtmod1.c: Likewise. - * elf/filtmod2.c: Likewise. - * elf/reldepmod1.c: Likewise. - * elf/reldepmod2.c: Likewise. - * elf/reldepmod3.c: Likewise. - * elf/reldepmod4.c: Likewise. - * elf/unload2dep.c: Likewise. - * elf/unload2mod.c: Likewise. - * elf/ltglobmod1.c: Likewise. - * elf/pathoptobj.c: Likewise. - * elf/neededobj1.c: Likewise. - * elf/neededobj2.c: Likewise. - * elf/neededobj3.c: Likewise. - * elf/neededobj4.c: Likewise. - * elf/nextmod1.c: Likewise. - * elf/nextmod2.c: Likewise. - - * locale/programs/ld-collate.c (collate_finish): Don't use labels - at end of compound statement. - * locale/programs/locale.c (show_info): Likewise. - * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. - -2000-12-16 Jakub Jelinek - - * catgets/gencat.c (read_input_file): Avoid calling obstack_free - with a pointer not returned by obstack_ functions. - -2000-12-16 Ulrich Drepper - - * sysdeps/unix/sysv/aix/bits/stat.h (struct stat): Align with AIX - version. - (struct stat64): Likewise. - Reported by Michael Keezer . - - * timezone/asia: Update from tzdata2000h. - * timezone/australasia: Likewise. - * timezone/backward: Likewise. - * timezone/europe: Likewise. - * timezone/northamerica: Likewise. - * timezone/southamerica: Likewise. - * timezone/zone.tab: Likewise. - -2000-12-14 Jakub Jelinek - - * io/ftw.c (ftw_dir): If process_entry returned non-zero result - and dir.stream is NULL, only free dir.content. - * io/ftwtest.c (cb, main): Add --early-exit option to test it. - * io/ftwtest-sh: Test with --early-exit. - -2000-12-13 Jakub Jelinek - - * misc/efgcvt.c (FCVT_MAXDIG): Define. - (FCVT_BUFPTR): New variable. - (fcvt): If fcvt_r returns -1 on the static short buffer, - try to malloc a sufficiently large one and retry. - (free_mem): New function. - * misc/qefgcvt.c (FCVT_MAXDIG): Define. - * misc/tst-efgcvt.c (fcvt_tests): Add new test. - -2000-12-15 Ulrich Drepper - - * misc/dirname.c (dirname): Fix search for second to last slash. - -2000-12-13 Andreas Jaeger - - * misc/tst-dirname.c (main): Fix typo in test to really use - the examples from Unix98. - Reported by Michael Kerrisk . - -2000-12-09 H.J. Lu - - * sysdeps/ia64/fpu/s_fabs.S: New file. - * sysdeps/ia64/fpu/s_fabsf.S: New file. - * sysdeps/ia64/fpu/s_fabsl.S: New file. - -2000-12-15 Andreas Jaeger - - * stdio-common/scanf9.c (main): Reformat and change to avoid - warnings. - - * stdio-common/tstdiomisc.c: Make local functions static. - * stdio-common/tst-printf.c: Likewise. - - * elf/constload2.c: Add prototype declarations to shut up gcc. - * elf/dep1.c: Likewise. - * elf/dep2.c: Likewise. - * elf/dep3.c: Likewise. - * elf/dep4.c: Likewise. - * elf/ltglobmod2.c: Likewise. - - * libio/fmemopen.c: Make local functions static. - - * elf/Makefile (distribute): Added testobj.h. - - * elf/testobj.h: New file. - - * elf/testobj1.c: Include testobj.h and move prototype - declarations to testobj.h. - * elf/testobj2.c: Likewise. - * elf/testobj3.c: Likewise. - * elf/testobj4.c: Likewise. - * elf/testobj5.c: Likewise. - * elf/testobj6.c: Likewise. - * elf/testobj1_1.c: Likewise. - * elf/preloadtest.c: Likewise. - -2000-12-15 Ben Collins - - * misc/sys/cdefs.h: Fix thinko in checks for flexarr macros. - Patch by Akim Demaille in Debian bug report. - -2000-12-14 H.J. Lu - - * sysdeps/ieee754/flt-32/s_sincosf.c (__sincosf): The exponent - field in a float is 8 bits, not 11 bits. - -2000-12-13 Jakub Jelinek - - * math/test-misc.c (main): Adjust m for IEEE quad long double. - -2000-12-13 Andreas Jaeger - - * manual/message.texi (Using gettextized software): Fix typo. - - * manual/charset.texi (Converting a Character): Fix mbstouwcs - program to compile. - Patch by Martin Buchholz . - - * sysdeps/unix/sysv/linux/sigpending.c (sigpending): Fix typo. - Reported by Michael Kerrisk . - -2000-12-11 Andreas Jaeger - - * sysdeps/unix/sysv/linux/mips/kernel_sigaction.h: Declare - kernel_sigset_t and use it. - Patch by Hiroyuki Machida . - -2000-12-10 Richard Henderson - - * sysdeps/alpha/alphaev67/fpu/Implies: New file. - * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: New file. - * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: New file. - -2000-12-10 Jakub Jelinek - - * sysdeps/alpha/htonl.S: Fix a typo. - -2000-12-10 Jakub Jelinek - - * sysdeps/alpha/alphaev6/stxcpy.S: Exchange t8 with t10. - -2000-12-10 Andreas Jaeger - - * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Fixed - cast as suggested by Jakub Jelinek and Ulrich - Drepper . - -2000-12-09 Andreas Jaeger - - * sysdeps/unix/sysv/linux/mips/sigaction.c: New file. - - * sysdeps/unix/sysv/linux/mips/sys/acct.h: Removed, we can use the - generic version. - Patches by Hiroyuki Machida . - - * locale/programs/ld-collate.c (handle_ellipsis): Fix format - string. - - * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Fix - format string. - - * nscd/hstcache.c (addhstbyname): Add cast to avoid warning. - * nscd/connections.c (handle_request): Likewise. - * nscd/pwdcache.c (addpwbyname): Likewise. - * nscd/grpcache.c (addgrbyname): Likewise. - - * nscd/nscd_conf.c (nscd_parse_file): Remove extra argument. - -2000-12-09 Ulrich Drepper - - * string/stratcliff.c: Add tests for stpncpy, memcpy, and mempcpy. - - * Makeconfig (default_cflags): Make -O2 the default for stable - releases. - -2000-12-08 H.J. Lu - - * sysdeps/ia64/fpu/s_isinfl.S: Renamed to ... - * sysdeps/ia64/fpu/s_isinf.S: This. - Add a .pred.rel.mutex note to avoid false report. - - * sysdeps/ia64/fpu/s_isnanl.S: Renamed to ... - * sysdeps/ia64/fpu/s_isnan.S: This. - - * sysdeps/ia64/fpu/s_fpclassify.S: New file. - * sysdeps/ia64/fpu/s_fpclassifyf.S: New file. - * sysdeps/ia64/fpu/s_fpclassifyl.S: New file. - * sysdeps/ia64/fpu/s_isinff.S: New file. - * sysdeps/ia64/fpu/s_isinfl.S: New file. - * sysdeps/ia64/fpu/s_isnanf.S: New file. - * sysdeps/ia64/fpu/s_isnanl.S: New file. - * sysdeps/ia64/fpu/s_finite.S: New file. - * sysdeps/ia64/fpu/s_finitef.S: New file. - * sysdeps/ia64/fpu/s_finitel.S: New file. - * sysdeps/ia64/fpu/s_signbit.S: New file. - * sysdeps/ia64/fpu/s_signbitf.S: New file. - * sysdeps/ia64/fpu/s_signbitl.S: New file. - * sysdeps/ia64/fpu/s_copysign.S: New file. - * sysdeps/ia64/fpu/s_copysignf.S: New file. - * sysdeps/ia64/fpu/s_copysignl.S: New file. - -2000-12-08 Ulrich Drepper - - * math/libm-test.inc (main): Fix typos in messages. - - * string/stratcliff.c: Add test for rawmemchr. - -2000-12-08 Jakub Jelinek - - * elf/dl-open.c (_dl_open): If objname points right after errstring, - allocate it together with errstring using alloca. - * elf/dl-error.c (_dl_signal_error): If malloc failed, set objname - to "", because it might point to local stack. - -2000-12-05 H.J. Lu - - * nss/Makefile (routines): Add getnssent and getnssent_r. - * nss/nsswitch.h (__nss_setent): New internal NSS function. - (__nss_endent): Likewise. - (__nss_getent_r): Likewise. - (__nss_getent): Likewise. - * nss/getnssent_r.c: New file. - * nss/getnssent.c: New file. - * nss/getXXent.c (H_ERRNO_VAR): Updated. - (GETFUNC_NAME): Updated to call __nss_getent (). - * nss/getXXent_r.c (H_ERRNO_VAR_P): New. - (STAYOPEN_TMPVAR): Updated. - (STAYOPEN_VAR): Updated. - (SETFUNC_NAME): Updated to call __nss_setent (). - (ENDFUNC_NAME): Updated to call __nss_endent (). - (INTERNAL (REENTRANT_GETNAME)): Updated to call __nss_getent_r (). - -2000-12-08 Andreas Jaeger - - * nscd/dbg_log.h (dbg_log): Correct attribute. - -2000-12-08 Jakub Jelinek - - * elf/dl-load.c (fillin_rpath): Don't assume there is '\0' at - cp + len. Compute where from dirname. - Reported by . - -2000-12-08 Richard Henderson - - * sysdeps/alpha/_mcount.S: Fix typo. - * sysdeps/alpha/strncpy.S: Likewise. - - * sysdeps/alpha/alphaev6/Implies: New file. - * sysdeps/alpha/alphaev67/Implies: New file. - * sysdeps/alpha/alphaev67/ffs.S: New file. - * sysdeps/alpha/alphaev67/ffsll.S: New file. - * sysdeps/alpha/alphaev67/rawmemchr.S: New file. - * sysdeps/alpha/alphaev67/stpcpy.S: New file. - * sysdeps/alpha/alphaev67/stpncpy.S: New file. - * sysdeps/alpha/rawmemchr.S: New file. - * sysdeps/alpha/strcat.S: Tail call to __stxcpy. - * sysdeps/alpha/strcpy.S: Likewise. - - From GMP 3.1.1: - * sysdeps/alpha/alphaev6/addmul_1.s: New file. - - From rick.gorton@alpha-processor.com: - * sysdeps/alpha/alphaev6/memchr.S: New file. - * sysdeps/alpha/alphaev6/memcpy.S: New file. - * sysdeps/alpha/alphaev6/memset.S: New file. - * sysdeps/alpha/alphaev6/stxcpy.S: New file. - * sysdeps/alpha/alphaev6/stxncpy.S: New file. - * sysdeps/alpha/alphaev67/strcat.S: New file. - * sysdeps/alpha/alphaev67/strchr.S: New file. - * sysdeps/alpha/alphaev67/strlen.S: New file. - * sysdeps/alpha/alphaev67/strncat.S: New file. - * sysdeps/alpha/htonl.S: Use a shorter sequence. - -2000-12-08 Jakub Jelinek - - * inet/getnameinfo.c (getnameinfo): Fix NI_NOFQDN support. - Reported by . - -2000-12-07 Jes Sorensen - - * sysdeps/ia64/elf/start.S (__data_start): Add __data_start variable. - Pointed out by Hans Boehm. - -2000-12-07 H.J. Lu - - * elf/dl-version.c (match_symbol): Check map->l_name[0] for printing. - -2000-12-07 Andreas Jaeger - - * misc/error.c: Add format attributes for __error and __error_at_line. - - * nscd/dbg_log.h: Add format attribute. - -2000-12-08 Ulrich Drepper - - * misc/sys/syslog.h: Add format attributes to syslog and vsyslog. - Patch by Joseph S. Myers . - -2000-12-07 Dan Pop - - * sysdeps/ia64/strcpy.S: Fix a bug in a recovery code sequence. - -2000-12-06 Ulrich Drepper - - * sysdeps/unix/sysv/aix/Makefile [$(subdir)==misc] - (sysdep_routines): Add uitrunc. - * sysdeps/unix/sysv/aix/uitrunc.c: New file. - Patches by Michael Keezer . - -2000-12-06 Roland McGrath - - * sysdeps/mach/hurd/ioctl.c (__ioctl): Don't clobber ARG as we copy in - argument data, since it will be used to copy out too (for INOUT). - Reported by Marcus Brinkmann . - - * sysdeps/mach/hurd/ioctl.c: Include . - (__ioctl): Use uintptr_t instead of unsigned long int. - -2000-12-06 Jim Wilson - - * stdlib/l64a.c (l64a): Truncate M to 32-bit value. - -2000-12-06 Ulrich Drepper - - * stdio-common/printf_fp.c (__printf_fp): Handle decimal point in - x.5 rounding correctly. - -2000-12-06 Mark Kettenis - - * stdio-common/perror.c (perror): Conditionalize code dealing with - wide-oriented streams on USE_IN_LIBIO. - -2000-12-06 Mark Kettenis - - * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start_cleanup): Mark - as internal_function. - -2000-12-05 Ulrich Drepper + * sysdeps/ia64/dl-machine.h (elf_machine_rela_relative): Likewise. + Fix argument types. + * sysdeps/alpha/dl-machine.h (elf_machine_rela_relative): Likewise. + Fix argument types. + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela_relative): + Likewise. Fix argument types. + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela_relative): + Likewise. Fix argument types. + * sysdeps/sh/dl-machine.h (elf_machine_rela_relative): Likewise. + Fix argument types. + * sysdeps/mips/dl-machine.h (elf_machine_rel_relative): Use + ElfW(Rel) in argument. + * sysdeps/mips/mips64/dl-machine.h (elf_machine_rel_relative): New + function. - * sysdeps/alpha/elf/start.S (__data_start): Define. +2001-08-24 Alexandre Oliva -2000-12-05 H.J. Lu + * sysdeps/sh/dl-machine.h (elf_machine_rela): Fix typo. - * nss/getXXent_r.c (setup): Change the return type to int. +2001-08-24 Andreas Jaeger -2000-12-05 Ulrich Drepper + * sysdeps/ieee754/ldbl-128/e_j1l.c: New file, contributed by + Stephen L Moshier . - * sysdeps/unix/sysv/aix/Makefile [$(subdir)==misc] - (sysdep_routines): Add restf and savef. - * sysdeps/unix/sysv/aix/restf.c: New file. - * sysdeps/unix/sysv/aix/savef.c: New file. - Patches by Michael Keezer . +2001-08-24 Ulrich Drepper - * sysdeps/unix/opendir.c (__opendir): Don't use o_directory_works - if O_DIRECTORY is not defined. - Patch by Michael Keezer . + * elf/do-rel.h (elf_dynamic_do_rel): RELATIVE relocations comes + first if RELCOUNT is set. - * include/libc-symbols.h (C_SYMBOL_DOT_NAME): Define. - Patch by Michael Keezer . + * elf/do-rel.h (elf_dynamic_do_rel): If not relocating lazily, don't + call elf_machine_rel for the last DT_RELCOUNT relocations but instead + elf_machine_rel_relative. + * sysdeps/alpha/dl-machine.h: Define elf_machine_rel_relative. + Minor optimizations. + * sysdeps/arm/dl-machine.h: Likewise. + * sysdeps/cris/dl-machine.h: Likewise. + * sysdeps/hppa/dl-machine.h: Likewise. + * sysdeps/i386/dl-machine.h: Likewise. + * sysdeps/ia64/dl-machine.h: Likewise. + * sysdeps/m68k/dl-machine.h: Likewise. + * sysdeps/mips/dl-machine.h: Likewise. + * sysdeps/powerpc/dl-machine.h: Likewise. + * sysdeps/s390/s390-32/dl-machine.h: Likewise. + * sysdeps/s390/s390-64/dl-machine.h: Likewise. + * sysdeps/sh/dl-machine.h: Likewise. + * sysdeps/sparc/sparc32/dl-machine.h: Likewise. + * sysdeps/sparc/sparc64/dl-machine.h: Likewise. - * locale/programs/linereader.c (get_toplvl_escape): Recognize more - than 4 bytes in escape sequence. - Patch by Shinya Hanataka . +2001-08-23 Roland McGrath -2000-12-05 Andreas Jaeger + * rt/tst-aio4.c [! SIGRTMIN] (SIGRTMIN, SIGRTMAX): Define as -1. - * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Don't - set mips2. + * sysdeps/mach/hurd/bits/libc-lock.h: New file, initially copied from + sysdeps/mach version. Implement counting ("recursive") mutexes + on top of cthreads mutexes. + * sysdeps/mach/hurd/bits/stdio-lock.h: File removed; generic now works. - * sysdeps/unix/sysv/linux/mips/sysdep.h: New file. + * sysdeps/generic/bits/stdio-lock.h (_IO_lock_initializer): Define to + _LIBC_LOCK_RECURSIVE_INITIALIZER if defined, else do an #error. + (__libc_cleanup_region_start, __libc_cleanup_region_end, + __libc_clean_end): Define these to call the cleanup function after + normal exit when they're supposed to. - * sysdeps/unix/sysv/linux/mips/sys/syscall.h: Removed. + * sysdeps/mach/bits/libc-lock.h (__libc_cleanup_region_start): + Take new first arg DOIT, a boolean saying whether to really install + any cleanup handler. + (__libc_cleanup_region_end): Do nothing if start's DOIT arg was zero. + (__libc_cleanup_end): Likewise. + * sysdeps/generic/bits/libc-lock.h: Same changes. + * stdio-common/vfscanf.c (LOCK_STREAM): Pass new arg. + * stdio-common/vfprintf.c (buffered_vfprintf, vfprintf): Likewise. + * sysdeps/mach/hurd/bits/stdio-lock.h (_IO_cleanup_region_start): + Likewise. + * misc/syslog.c (vsyslog, openlog, closelog): Likewise. + * sysdeps/generic/bits/stdio-lock.h + (_IO_cleanup_region_start, _IO_cleanup_region_start_noarg): Likewise. - * sysdeps/unix/mips/sysdep.h: Use SYS_ify. - Patches by Maciej W. Rozycki . +2001-08-23 Jakub Jelinek - * elf/dl-misc.c (_dl_sysdep_read_whole_file): Mark as - internal_function. - * sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Likewise. - * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start_cleanup): Likewise. + * elf/ldconfig.c (search_dir): Remove stale symlinks. - * sysdeps/generic/dl-cache.c: Remove declaration of - _dl_sysdep_read_whole_file. +2001-08-23 Jakub Jelinek - * elf/dl-load.c (_dl_map_object): Remove declaration of - _dl_load_cache_lookup. + * elf/dl-lookup.c (lookup_cache, lookup_cache_versioned): New. + (_dl_lookup_symbol): Lookup relocations in cache and store successfull + lookups in cache. + (_dl_lookup_versioned_symbol): Likewise. + * elf/dl-reloc.c (_dl_relocate_object): Initialize cache for + relocation lookup. + * elf/rtld.c (print_statistics): Output _dl_num_cache_relocations. + * sysdeps/generic/ldsodefs.h (struct lookup_cache): New definition. + (lookup_cache, lookup_cache_versioned): Add declarations. - * sysdeps/generic/ldsodefs.h: Add declarations of - _dl_load_cache_lookup, _dl_unload_cache, - _dl_sysdep_read_whole_file, _dl_sysdep_start and - _dl_sysdep_start_cleanup. +2001-08-23 Ulrich Drepper - * elf/rtld.c: Remove prototypes that are defined in ldsodefs.h - now. + * stdlib/tst-random.c (main): Swap parameters in fail call. + Patch by Pete Bevin . - * elf/dl-misc.c: Include to get prototypes. - * sysdeps/generic/dl-environ.c: Likewise. +2001-08-23 Jakub Jelinek - * stdio-common/printf_fp.c: Include instead of - . - * math/atest-exp.c: Likewise. - * math/atest-exp2.c: Likewise. - * math/atest-sincos.c: Likewise. - * stdio-common/_itoa.c: Likewise. - * stdio-common/_itowa.c: Likewise. + * sysdeps/generic/inttypes.h: Use __gwchar_t instead of __wchar_t. - * include/gmp.h: New file with internal prototypes. +2001-08-23 Ulrich Drepper - * sysdeps/generic/longjmp.c: Move _longjmp_unwind declaration from - here to... - * include/setjmp.h: ...here. + * malloc/obstack.c: Indent preprocessor directives. + Patch by Jim Meyering . - * locale/Makefile (routines): Remove codeset_name since it's not - needed anywhere. + * po/ja.po: Update from translation team. - * locale/codeset_name.c: Removed. +2001-08-23 Roland McGrath -2000-12-05 Ulrich Drepper + * libio/tst-ungetwc1.c (main): Add a const to quiet a warning. - * sysdeps/unix/sysv/aix/sys/param.h: Define MAXHOSTNAMELEN here. + * nss/test-netdb.c (test_hosts): Don't use MAXHOSTNAMELEN. + Instead, use dynamic buffer to test gethostname's ENAMETOOLONG error. -2000-12-05 Andreas Jaeger +2001-08-22 Roland McGrath - * sysdeps/unix/sysv/linux/sys/param.h: Revert last patch. + * sysdeps/generic/ldsodefs.h (_dl_load_lock): Declare it here with + __libc_lock_define_recursive. + * elf/dl-open.c: Don't declare it here any more. + * elf/dl-close.c: Likewise. + * elf/dl-lookup.c: Likewise. + * elf/dl-iteratephdr.c: Likewise. + * elf/dl-lookup.c (add_dependency): Use __libc_lock_lock_recursive and + __libc_lock_unlock_recursive. + * elf/dl-close.c (_dl_close): Likewise + * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise + * elf/dl-open.c (_dl_open): Likewise -2000-12-05 Martin Schwidefsky + * sysdeps/generic/bits/libc-lock.h + (__libc_lock_define_recursive): New macro. + * sysdeps/generic/bits/stdio-lock.h (_IO_lock_t): Use it. + (_IO_lock_lock): Use __libc_lock_lock_recursive. + (_IO_lock_unlock): Use __libc_lock_unlock_recursive. - * sysdeps/unix/sysv/linux/s390/mmap64.S: Use mmap if mmap2 isn't - available. + * conform/conformtest.pl (checknamespace): Sort the output list. -2000-12-05 Andreas Jaeger + * sysdeps/generic/bits/poll.h (POLLWRBAND): New alias for POLLOUT. + (POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND): Make these + definitions conditional on [__USE_XOPEN]. - * nss/test-netdb.c: Mark local functions as static to avoid - warnings. - (main): Use return to silence warning. + * sysdeps/mach/hurd/bits/fcntl.h (O_ASYNC, O_FSYNC, O_SYNC): Define + these unconditionally, not only use [__USE_BSD], so as to match + the sysdeps/unix/sysv/linux files. - * stdlib/test-canon.c (check_path): Mark as static to avoid warning. +2001-08-22 Ulrich Drepper - * stdio-common/test-popen.c: Mark local functions as static to + * test-skeleton.c (add_temp_file): Add __attribute__ ((unused)) to avoid warnings. - (main): Use return to silence warning. - - * stdlib/testsort.c (compare): Mark as static to avoid warning. - - * assert/test-assert.c: Mark local functions as static to avoid - warnings. - * assert/test-assert-perr.c: Likewise. - - * math/libm-test.inc (main): Use return to silence warnings. - -2000-12-04 Ulrich Drepper - - * math/fenv.h: Fix typo in comment. - - * math/test-misc.c (main): Add a few more over and underflow tests - for scalb. - * sysdeps/i386/fpu/e_scalb.S: Handle NaN as first parameter correctly. - * sysdeps/i386/fpu/e_scalbf.S: Likewise. - * sysdeps/i386/fpu/e_scalbl.S: Likewise. - * math/w_scalb.c: Don't use matherr except in SVID mode. - * math/w_scalbf.c: Likewise. - * math/w_scalbl.c: Likewise. - * math/test-misc.c: Add test for NaN and scalbl. - Reported by Fred J. Tydeman . - -2000-12-04 Ulrich Drepper + * dlfcn/tst-dladdr.c (do_test): Get address of ref1 using + DL_LOOKUP_ADDRESS. - * configure.in: Define HAVE_ASM_GLOBAL_DOT_NAME for AIX. - * config.h.in: Add HAVE_ASM_GLOBAL_DOT_NAME. - * include/libc-symbols.h (strong_alias): Define special version - for HAVE_ASM_GLOBAL_DOT_NAME. - (weak_alias): Likewise. - * sysdeps/powerpc/bsd-setjmp.S: Use strong_alias not .set. - * sysdeps/unix/sysv/aix/Makefile [$(subdir)==login] - (sysdep_routines): Add setutxent, getutxent, endutxent, getutxid, - getutxline, pututxline, and utmpxname. - * sysdeps/unix/sysv/aix/fchdir.c: Define __fchdir. - * sysdeps/unix/sysv/aix/lseek.c: Define __libc_lseek alias. - * sysdeps/unix/sysv/aix/open.c: Define __libc_open alias. - * sysdeps/unix/sysv/aix/pread.c: Define pread alias. - * sysdeps/unix/sysv/aix/pread64.c: Define pread64 alias. - * sysdeps/unix/sysv/aix/sysdep.h (JUMPTARGET): Use C_TEXT. - * sysdeps/unix/sysv/aix/bits/types.h: Define __clockid_t and __timer_t. - * sysdeps/unix/sysv/aix/bits/utmp.h: Cleanup. Add comments. - * sysdeps/unix/sysv/linux/sys/param.h (MAXHOSTNAMELEN): Define. - Patches by Michael Keezer . +2001-08-22 Roland McGrath -2000-12-04 H.J. Lu + * sysdeps/generic/bits/sigaction.h (struct sigaction): Fix up + conditionalization of sa_handler/sa_sigaction member types to + match the sysdeps/unix/sysv/linux file. - * configure.in: Change --with-oldest-abi=ABI to - --enable-oldest-abi=ABI. +2001-08-22 Ulrich Drepper -2000-12-02 Bruno Haible + * elf/dl-addr.c (_dl_addr): Handle broken binaries with zero + symbol sizes a bit better. - * stdio-common/perror.c (perror): If stderr is wide-oriented, use - fwprintf instead of fprintf. + * sysdeps/ia64/strncpy.S: Complete rewrite. + Contributed by Jakub Jelinek . -2000-12-04 Ulrich Drepper + * string/stratcliff.c (main): Add strncpy test. - * sysdeps/alpha/fpu/bits/mathdef.h: Remove FLT_EVAL_METHOD and - DECIMAL_DIG definitions. - * sysdeps/arm/fpu/bits/mathdef.h: Likewise - * sysdeps/generic/bits/mathdef.h: Likewise - * sysdeps/i386/fpu/bits/mathdef.h: Likewise - * sysdeps/ia64/fpu/bits/mathdef.h: Likewise - * sysdeps/m68k/fpu/bits/mathdef.h: Likewise - * sysdeps/powerpc/fpu/bits/mathdef.h: Likewise - * sysdeps/sparc/fpu/bits/mathdef.h: Likewise - * sysdeps/sh/sh4/fpu/bits/mathdef.h: Likewise +2001-08-22 Roland McGrath -2000-12-03 Ulrich Drepper + * sysdeps/generic/dl-environ.c: Include and , + and don't declare unsetenv or _environ directly. + (unsetenv): Return int, not void. Use __environ instead of _environ. - * math/test-fenv.c (main): Use return instead of exit to avoid warning. +2001-08-01 Mark Kettenis - * math/atest-exp.c: Mark local functions as static to avoid warnings. - * math/atest-exp2.c: Likewise. - * math/atest-sincos.c: Likewise. + * sysdeps/unix/bsd/bsd4.4/Makefile: New file. + * sysdeps/unix/bsd/bsd4.4/Versions: New file. + * sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: New file. + * sysdeps/unix/bsd/bsd4.4/bits/socket.h (__cmsg_nxthdr): Correct + test for cmsg struct size. - * sysdeps/i386/fpu/bits/mathdef.h (DECIMAL_DIG): Correct value. - Reported by Fred J. Tydeman . +2001-04-23 Paul Eggert - * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Hopefully fix - the handling of denormalized numbers. + * posix/getopt.h (getopt_long, getopt_long_only, _getopt_internal): + Rename __argc to ___argc in prototypes to avoid compatibility + problems with systems that reserve the identifier "__argc". + Similarly for __argv. - * math/test-misc.c (main): Test for fpclassify and pseudo denormal - numbers on x86. - * sysdeps/i386/fpu/fpclassifyl.c: New file. +2001-08-21 Roland McGrath - * sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Handle the - pseudo denormal representation of LDBL_MIN. + * stdio-common/tst-fseek.c: Include for `time' declaration. - * iconvdata/SJIS.irreversible: Remove unnecessary entries. - * iconvdata/EUC-JP.irreversible: Remove unnecessary entries. + * mach/Makefile (tests): Removed. + * mach/hello.c: File removed. - * iconvdata/sjis.c: Enable round-trip mapping of backslash and tilde. - * iconvdata/jis0208.c: Likewise. - * iconvdata/jis0212.c: Likewise. - Patch by Shinya Hanataka . +2001-08-22 Ulrich Drepper - * math/test-misc.c (main): More tests for frexp and some for - fpclassify and isnormal. + * po/sv.po: Update from translation team. - * sysdeps/ieee754/flt-32/s_fpclassifyf.c (__fpclassifyf): Correct - test for subnormal. - Reported by Fred J. Tydeman . + * stdio-common/vfscanf.c: Fix handling of %l[]. + Reported by Mitsuru Chinen . - * math/test-misc.c (main): Add tests for frexp. - Reported by Fred J. Tydeman . - * sysdeps/i386/fpu/s_frexpl.S: Don't overflow during the computation. + * libio/Makefile (tests): Add tst-sscanf. + * libio/tst-sscanf.c: New file. -2000-12-02 H.J. Lu + * elf/dl-addr.c (_dl_addr): Fix tests to determine dli_sname. + * malloc/mtrace.c (tr_where): dli_sname always points to a + non-empty string if != NULL. + Reported by Tim Janik . - * locale/lc-time.c (_nl_init_era_entries): Pass L'\0' instead of - '\0' to wcschr. +2001-08-22 Jakub Jelinek -2000-12-02 Ulrich Drepper + * sunrpc/xdr_rec.c (xdrrec_create): Fix buf sizes before allocating + buf. Free resources on failure. + * sunrpc/svc_unix.c (svcunix_create): Free resources on failure. + (makefd_xprt): Likewise. + * sunrpc/svc_udp.c (svcudp_bufcreate): Likewise. + * sunrpc/svc_tcp.c (svctcp_create, makefd_xprt): Likewise. + * sunrpc/auth_unix.c (authunix_create): Likewise. - * sysdeps/i386/fpu/s_frexp.S: Add missing fwait. - * sysdeps/i386/fpu/s_frexpf.S: Likewise. - * sysdeps/i386/fpu/s_frexpl.S: Likewise. +2001-08-21 Jakub Jelinek - * sysdeps/generic/glob.c: Adjust types of several variables to - avoid warnings. + * string/strnlen.c: Remove. + * sysdeps/generic/strnlen.c: New file. + * sysdeps/i386/i486/bits/string.h (strnlen): Remove. -2000-12-01 Ulrich Drepper +2001-08-21 Roland McGrath - * sysdeps/unix/sysv/linux/shm_open.c: Remove incorrect comment. + * sysdeps/mach/i386/machine-sp.h (__thread_stack_pointer): Define this + as a macro, not an extern inline function. -2000-11-30 Roland McGrath + * hurd/Versions (GLIBC_2.2.5): New set, define __hurd_fail here. + * Versions.def (libc): Add GLIBC_2.2.5 set. + * hurd/hurd.h (_HURD_H_EXTERN_INLINE): New macro. + (__hurd_fail): Use that instead of _EXTERN_INLINE in decl. - * hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): New macro. - (_HURD_HANDLE_IOCTLS, _HURD_HANDLE_IOCTL): Redefine using it, so as to - allow multiple instances using the same function name in one file. +2001-08-20 Roland McGrath -2000-12-01 Ulrich Drepper + * hurd/hurdlookup.c (__hurd_file_name_lookup): Fail with ENOENT for "". + (__hurd_file_name_split, __hurd_directory_name_split): Likewise. - * configure.in: Correct test for pserver CVS access. +2001-08-21 Ulrich Drepper -2000-11-28 H.J. Lu + * string/bits/string2.h: Remove strnlen optimization here. + * sysdeps/i386/i486/bits/string.h: Add it here. - * libio/libio.h: Remove extra "#if ... #endif". +2001-08-21 Wolfram Gloger -2000-11-29 H.J. Lu + * malloc/malloc.c: Make access to ..._hook pointers thread-safe. - * stdio-common/vfscanf.c (ORIENT): Swap the COMPILE_WSCANF case. +2001-08-21 Ulrich Drepper -2000-12-01 H.J. Lu + * po/gl.po: Update from translation team. - * nss/getXXbyYY_r.c: Fix verioned symbol handling. - * nss/getXXent_r.c: Likewise. - * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. +2001-08-20 Ulrich Drepper -2000-11-30 H.J. Lu + * misc/error.c (error_tail): Use fputws_unlocked instead of fputws. + * misc/err.c (convert_and_print): Likewise. - * scripts/abi-versions.awk (oldest_abi): New variable. - Handle the oldest ABI supported. + * malloc/obstack.c (print_and_abort): Use fprintf instead of two + function calls. - * Makerules ($(common-objpfx)abi-versions.h): Set oldest_abi - for scripts/abi-versions.awk. +2001-08-20 Martin Schwidefsky - * configure.in: Add --with-oldest-abi=ABI. - * configure: Rebuild. + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Revert the + change of the gregset_t type. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise. - * config.make.in (oldest-abi): New. +2001-08-20 kaz Kojima - * config.h.in (GLIBC_OLDEST_ABI): New. + * sysdeps/unix/sysv/linux/sh/sysdep.S: Align errno. - * csu/version.c (banner): Support GLIBC_OLDEST_ABI. +2001-08-20 Ulrich Drepper -2000-11-30 Jakub Jelinek + * posix/regex.c (truncate_wchar): Use wcrtomb not wctomb. - * locale/setlocale.c (setname): Free for all categories, not just - LC_ALL. - (setlocale): Store a copy of string passed by user, not the string - itself. + * string/strnlen.c: Fix the implementation. We cannot use memchr. -2000-11-30 Roland McGrath +2001-08-18 Mark Kettenis - * sysdeps/mach/hurd/defs.c (init_stdio): Put this on __libc_subinit - rather than _hurd_fd_subinit, so it happens after it's safe to use - libc facilities like malloc. + * sysdeps/mach/hurd/i386/init-first.c (init): Initialize __environ + before calling the cthreads initialization code. -2000-11-28 Andreas Jaeger +2001-08-20 Ulrich Drepper - * sysdeps/unix/sysv/linux/getdents.c: Add _syscall_getdents64 - declaration, adjust declaration of __syscall_getdents to match - kernel. + * argp/argp-help.c: Fix two problems introduced in last change. -2000-11-29 H.J. Lu + * include/dirent.h: Include first. - * sysdeps/generic/readelflib.c (check_ptr): Undefine it first. +2001-08-19 Ulrich Drepper -2000-11-29 Andreas Jaeger + * io/fts.c (fts_safe_changedir): Use __fxstat64 instead of __fstat. - * sysdeps/unix/sysv/linux/hppa/brk.c (__brk): Remove unused variable. + * sunrpc/svcauth_des.c (_svcauth_des): Avoid using bcopy. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_mem.c: Likewise. + * sunrpc/svc_authux.c (_svcauth_unix): Likewise. + * sunrpc/rpc_cmsg.c: Likewise. + * sunrpc/getrpcport.c (getrpcport): Likewise. + * sunrpc/clnt_simp.c (callrpc): Likewise. + * sunrpc/clnt_gen.c (clnt_create): Likewise. + * string/envz.c: Likewise. -2000-11-28 Ulrich Drepper + * po/ko.po: Update from translation team. - * dlfcn/defaultmod1.c: Add prototypes to avoid warnings. - * dlfcn/defaultmod2.c: Likewise. - * dlfcn/dlopen.c: Likewise. - * dlfcn/dlopenold.c: Likewise. - * dlfcn/failtestmod.c: Likewise. - * dlfcn/glreflib1.c: Likewise. - * dlfcn/glreflib2.c: Likewise. - * dlfcn/eval.c: Likewise. Add attributes. + * argp/argp-help.c: Handle wide oriented stderr stream. - * ctype/ctype-extn.c: Define isblank and not __isblank. +2001-08-18 Ulrich Drepper - * time/strftime.c: Add const where necessary to avoid warnings. - * time/strptime.c (strptime_internal): Add casts to avoid warnings. + * sysdeps/generic/strtol.c: Little optimizations. Add some + __builtin_expect. -2000-11-22 Paul Eggert + * conform/conformtest.pl: test requires . - * time/strftime.c (my_strftime): Do not invoke mbrlen with a - size of (size_t) -1; it's not portable. + * wcsmbs/wchar.h (wcwdith): Change parameter type to wchar_t. + * wcsmbs/wcwidth.c (wcwdith): Likewise. + * wcsmbs/wcwidth.h (internal_wcwdith): Likewise. -2000-11-28 Ulrich Drepper + * conform/data/unistd.h-data: Remove _SC_MULTIPLE_PROCESS. - * sysdeps/i386/fpu/libm-test-ulps: Adjust some values for the - crappy i486 FPU. - Reported by Michael Deutschmann . + * conform/data/ucontext.h-data: Fix typos in ucontext_t element tests. -2000-11-14 Jes Sorensen + * time/time.h (struct timespec): Use __time_t for tv_sec element. - * sysdeps/ia64/_mcount.S: Call __mcount instead of __mcount_internal. + * sysdeps/generic/inttypes.h: Define __wchar_t. Use it instead of + wchar_t for function declarations and defintions. - * sysdeps/ia64/Makefile: Compile _mcount.S in subdir gmon as - _mcount is required by profiled binaries. + * misc/sys/select.h: Define __need_time_t before including . + Define suseconds_t if it hasn't happened yet. - * sysdeps/unix/sysv/linux/ia64/machine-gmon.h: Moved to... - * sysdeps/ia64/machine-gmon.h: ...here. + * iconv/gconv.h: Define __need_wchar_t before including . -2000-11-28 Masahide Washizawa + * conform/data/sys/uio.h-data: Allow UIO_MAXIOV to be defined. - * iconvdata/Makefile (modules): Add IBM922, IBM1124, and IBM1129. - (distribute): Add ibm922.c, ibm1124.c, ibm1129.c, ibm922.h, ibm1124.h, - and ibm1129.h. - * iconvdata/gconv-modules: Add entries for IBM922, IBM1124, and - IBM1129. - * iconvdata/ibm922.c: New file. - * iconvdata/ibm922.h: New file. - * iconvdata/ibm1124.c: New file. - * iconvdata/ibm1124.h: New file. - * iconvdata/ibm1129.c: New file. - * iconvdata/ibm1129.h: New file. - * iconvdata/testdata/IBM922: New file. - * iconvdata/testdata/IBM922..UTF8: New file. - * iconvdata/testdata/IBM1124: New file. - * iconvdata/testdata/IBM1124..UTF8: New file. - * iconvdata/testdata/IBM1129: New file. - * iconvdata/testdata/IBM1129..UTF8: New file. + * sysdeps/generic/stdint.h: Don't get definition of wchar_t from + . -2000-11-28 Ulrich Drepper + * conform/data/stddef.h-data: Remove wint_t. - * catgets/gencat.c (normalize_line): Take extra parameter with escape - character. Change callers. - (open_conversion): Determine mapping of 0x5c as wchar_t value. - * catgets/Makefile: Add rules to build and run test-gencat. - * catgets/sample.SJIS: New file. - * catgets/test-gencat.c: New file. - * catgets/test-gencat.sh: New file. - Report and test case by Shinya Hanataka . + * conform/conformtest.pl: Change namespace test to take #undef + lines into account. -2000-11-28 Andreas Jaeger + * conform/data/netinet/in.h-data: Fix typo in allow-header line. - * sysdeps/unix/sysv/linux/mips/bits/socket.h: Synch with generic - Linux version. + * conform/data/sys/socket.h-data: Add sockatmark. -2000-11-28 Ulrich Drepper +2001-08-17 Ulrich Drepper - * sysdeps/unix/sysv/linux/bits/socket.h: Fix last patch. + * io/fts.c: Update from recent BSD source. -2000-11-28 Andreas Jaeger +2001-08-17 Roland McGrath - * sysdeps/unix/sysv/linux/bits/socket.h (struct cmsghdr): Use - __flexarr. - * sysdeps/unix/sysv/linux/mips/bits/socket.h (struct cmsghdr): + * stdio-common/perror.c (perror) [! USE_IN_LIBIO]: Don't use _IO_fwide. + * misc/error.c (error_tail, error, error_at_line) [! USE_IN_LIBIO]: Likewise. -2000-11-27 Ulrich Drepper - - * misc/getusershell.c: Make strings in okshells array const. - * misc/regexp.c: Add const to cast to avoid warnings. - * sysdeps/unix/sysv/linux/llseek.c: Add prototype for __llseek. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Add prototype for - __setresuid. - * sysdeps/unix/sysv/linux/i386/setresgid.c: Add prototype for - setresgid. - * misc/error.c: Add prototypes for __error and __error_at_line. - * misc/mntent_r.c (__getmntent_r): Add break at end of switch - statement to avoid warning. - * test-skeleton.c: Mark timeout_handler with noreturn. - * iconv/skeleton.c (get16u): Add const to cast. - (get32u): Likewise. - * iconvdata/gb18030.c: Likewise. - * iconvdata/iso-2022-cn-ext.c: Likewise. - * iconvdata/ansi_x3.110.c: Add cast to avoid warning. - * iconvdata/big5.c: Likewise. - * iconvdata/big5hkscs.c: Likewise. - * iconvdata/iso_6937.c: Likewise. - * iconvdata/iso_6937-2.c: Likewise. - * iconvdata/t.61.c: Likewise. - * iconvdata/iso646.c: Add prototypes for gconv_init and gconv_env. - * iconvdata/unicode.c: Likewise. - * iconvdata/utf-16.c: Likewise. - * iconvdata/cns11643.h (ucs4_to_cns11643): Define needed as size_t. - * iconv/gconv_trans.c (__gconv_translit_find): Avoid one warning - with little code shuffling. - - * sysdeps/powerpc/Makefile (CFLAGS-initfini.s): Add -O1 to avoid - the problems introduced when the user selects -O3. - - * iconv/gconv.h (__gconv_info): Define __data element using __flexarr. - * misc/sys/cdefs.h: Define __flexarr. - Proposed by Joseph S. Myers . - - * iconvdata/iso-2022-jp.c: Add prototypes to avoid warnings. - * iconv/skeleton.c: Likewise. - * iconvdata/iso8859-1.c (BODY to 8859-1): Add const to cast. - * iconv/loop.c (get16): Add const to cast. - (get32): Likewise. - -2000-11-27 Andreas Jaeger - - * login/programs/pt_chown.c (do_pt_chown): Mark function as static - to avoid warning. - * login/programs/utmpdump.c (print_entry): Likewise. - -2000-11-25 Maciej W. Rozycki - - * sysdeps/mips/__longjmp.c (__longjmp): Restore SP and FP last and - in a single asm as they may be used to access other stored - registers. - * sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise. - -2000-11-27 Andreas Jaeger - - * rt/tst-aio.c: Mark test functions as static to avoid warnings. - * rt/tst-aio64.c: Likewise. - -2000-11-27 Ulrich Drepper - - * catgets/Makefile (test1.cat): Set LC_ALL, LOCPATH, and GCONV_PATH - for gencat run. - (libc.cat): Likewise. - * catgets/gencat.c: Implement handling of message catalogs encoded - with stateful character sets. - Based on a patch by Shinya Hanataka . - -2000-11-26 Ulrich Drepper - - * sysdeps/unix/opendir.c (__opendir): Add cast to avoid warning. - - * inet/getnameinfo.c: Adjust casts to avoid warnings. - * inet/rcmd.c: Likewise. - * inet/ruserpass.c: Likewise. - * inet/netinet/in.h (IN6_IS_ADDR_UNSPECIFIED, IN6_IS_ADDR_LOOPBACK, - IN6_IS_ADDR_MULTICAST, IN6_IS_ADDR_LINKLOCAL, IN6_IS_ADDR_SITELOCAL, - IN6_IS_ADDR_V4MAPPED, IN6_IS_ADDR_V4COMPAT, IN6_ARE_ADDR_EQUAL, - IN6_IS_ADDR_MC_NODELOCAL, IN6_IS_ADDR_MC_LINKLOCAL, - IN6_IS_ADDR_MC_SITELOCAL, IN6_IS_ADDR_MC_ORGLOCAL, - IN6_IS_ADDR_MC_GLOBAL): Preserve const in cast. - * include/aliases.h: Add prototypes for internal __getalias* functions. - * include/netdb.h: Add prototypes for __old_gethostent_r, - __old_gethostbyaddr_r, __old_gethostbyname_r, __old_gethostbyname2_r, - __old_getnetent_r, __old_getnetbyaddr_r, __old_getnetbyname_r, - __old_getservent_r, __old_getservbyname_r, __old_getservbyport_r, - __old_getprotoent_r, __old_getprotobyname_r, __old_getprotobynumber_r. - * include/rpc/netdb.h: Add prototypes for __old_getrpcbyname_r, - __old_getrpcbynumber_r, __old_getrpcent_r. - - * include/rpc/netdb.h: Add __getrpcbyname_r, __getrpcbynumber_r, - __getrpcent_r prototypes. - -2000-11-25 Ulrich Drepper - - * string/strcoll.c: Add casts to avoid warnings. - * string/strnlen.c: Likewise. - * string/strxfrm.c: Likewise. - * sysdeps/generic/_strerror.c: Likewise. - * sysdeps/generic/memrchr.c: Likewise. - * sysdeps/generic/strcasestr.c: Likewise. - * sysdeps/generic/strstr.c: Likewise. - - * locale/weight.h (findidx): Add const to cast to avoid warning. - - * elf/loadfail.c: Little cosmetic changes to avoid warnings. - * elf/loadtest.c: Likewise. - * elf/multiload.c: Likewise. - * elf/next.c: Likewise. - * elf/nodelete.c: Likewise. - * elf/noload.c: Likewise. - * elf/order.c: Likewise. - * elf/origtest.c: Likewise. - * elf/preloadtest.c: Likewise. - * elf/restest1.c: Likewise. - - * sysdeps/i386/i486/bits/string.h (__strncat_g) [i686]: Fourth - parameter of asm must be in %ecx. - - * string/tester.c: Mark test functions as static to avoid warnings. - - * iconv/gconv_conf.c (read_conf_file): Make mod_counter static to - preserve value over different gconv-modules files. - -2000-11-24 Ulrich Drepper - - * locale/findlocale.c: Add casts to avoid warnings. - * locale/localeinfo.h (LIMAGIC): Add cast to avoid warnings. - * misc/efgcvt_r.c (fcvt_r): Use ssize_t instead of int and add cast - to avoid warnings. - * misc/tsearch.c (const_node): New type. - (trecurse): Correct casts to avoid warnings. - (__twalk): Likewise. - * stdlib/tst-limits.c: Add z modifier to formats for WORD_BIT and - LONG_BIT. - - * debug/backtrace-tst.c (compare): Add casts to avoid warnings. - - * test-skeleton.c: Mark local functions as static to avoid warnings. - -2000-11-23 H.J. Lu - - * rt/tst-aio6.c (do_test): Use pipe instead of STDIN_FILENO to - support the background job. - Fix a typo. - -2000-11-24 Ulrich Drepper - - * iconv/gconv_conf.c (insert_module): Replace old entry if new one - has same names but lower cost. - -2000-11-23 Jakub Jelinek - - * sysdeps/sparc/sparc32/dl-machine.h: Ifdef out handling for relocs - which never occur during bootstrap. - * sysdeps/sparc/sparc64/dl-machine.h: Likewise. - -2000-11-23 Andreas Jaeger - - * nss/nss_files/files-hosts.c: Remove getipnodebyname. - - * nss/Versions: Remove _nss_files_getipnodebyname_r. - - * sysdeps/unix/sysv/linux/Versions: Fix typo in last patch. - -2000-11-18 Martin Buchholz - - * csu/gmon-start.c (__gmon_start__): Avoid over-clever trick `if - (called++) return;' - -2000-11-21 Alan Modra - - * sysdeps/generic/bsd-_setjmp.c (setjmp): Rename to _setjmp. - - * csu/abi-note.S: Correct comment for operating system number. - -2000-11-22 Ulrich Drepper - - * Versions.def: Add GLIBC_2.2.1 for glibc. - -2000-11-22 Andreas Schwab - - * sysdeps/unix/sysv/linux/syscalls.list: Add pivot_root. - * sysdeps/unix/sysv/linux/Versions: Add pivot_root at GLIBC_2.2.1. - -2000-11-22 Ulrich Drepper - - * rt/aio_suspend.c (aio_suspend): Convert timeout value to - absolute time for pthread_cond_timedwait call. - Reported by Lawrence Chen [libc/1930]. - - * rt/Makefile (tests): Add tst-aio6. - * rt/tst-aio6.c: New file. - -2000-11-23 Andreas Jaeger - - * sysdeps/s390/bits/string.h (strncat): Fix one more typo. - -2000-11-22 Andreas Jaeger - - * sysdeps/s390/bits/string.h (strncat): Add missing quotation marks. - -2000-11-21 Martin Schwidefsky - - * sysdeps/s390/bits/string.h: Make strncat always add a \0. - -2000-11-21 Andreas Schwab - - * sysdeps/alpha/setjmp.S: Remove __setjmp entry point. - * sysdeps/arm/setjmp.S: Likewise. - * sysdeps/arm/fpu/setjmp.S: Likewise. - * sysdeps/i386/setjmp.S: Likewise. - * sysdeps/i386/elf/setjmp.S: Likewise. - * sysdeps/s390/setjmp.S: Likewise. - * sysdeps/s390/elf/setjmp.S: Likewise. - * sysdeps/sh/sh3/setjmp.S: Likewise. - * sysdeps/sh/sh4/setjmp.S: Likewise. - * sysdeps/sparc/sparc32/setjmp.S: Likewise. - * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise. - * sysdeps/unix/sysv/linux/m68k/setjmp.c: Removed. - -2000-11-21 Andreas Jaeger - - * sysdeps/generic/__longjmp.c (__longjmp): Remove obsolete - NORETURN, fix parameter list. - - * string/bug-strncat1.c (main): Fix typo. - Patch by Bernhard Kaindl . - -2000-11-20 Ulrich Drepper - - * configure.in: Add --enable-all-warnings. - * config.make.in (all-warnings): New variable. - * Makeconfig (+gccwarn): Define with many more warnings if - all-warnings is yes. - -2000-11-20 Jakub Jelinek - - * iconvdata/bug-iconv2.c (main): Use %zd in format string. - * io/test-lfs.c (do_test): Cast statbuf.st_size to long long. - * malloc/tst-valloc.c (main): Cast valloc return value to long. - * malloc/tst-obstack.c (verbose_malloc): Use %zd in format string. - * math/test-fpucw.c (main): Use %lx in format string, cast - control words to long. - * stdio-common/tst-fmemopen.c (main): Use %td in format strings. - * stdlib/tst-strtol.c (tests): Avoid (bogus?) decimal constant is so - large that it is unsigned warning. - - * sysdeps/unix/sysv/linux/sparc/bits/types.h (__ssize_t): Changing - it to long on sparc64. - -2000-11-20 Andreas Jaeger - - * nscd/nscd.h (termination_handler): Add noreturn attribute. - (receiv_print_stats): Likewise. - - * elf/ldconfig.c (path_hwcap): Cast -1 for proper comparison. - -2000-11-20 Ulrich Drepper - - * malloc/thread-m.h: gcc doesn't tolerate zero-sized types anymore. - - * csu/gmon-start.c: Always have prototype for __gmon_start. - * csu/version.c: Add prototypes for __libc_print_version and - __libc_main. - * iconv/gconv.c: Include gconv_int.h and gconv.h. - * iconv/gconv.h (struct __gconv_step): Remove const from __from_name - and __to_name. - * iconv/gconv_builtin.h: Add ASCII module definitions. - * iconv/gconv_conf.c (__gconv_path_elem): Remove const. - (add_module): Add cast to avoid warning. Rework construction of - strings for new module. - * iconv/gconv_db.c (__gconv_alias_compare): Make s1 and s2 const. - (derivation_compare): Likewise. - * iconv/gconv_dl.c (do_release_shlib): Remove const from nodep. - (__gconv_release_shlib): Cast do_release_shlib as parameter for twalk. - * iconv/gconv_int.h (__gconv_path_elem): Remove const. - (struct gconv_alias): Remove const from fromname and toname. - * iconv/gconv_simple.c: Include gconv_builtin.h to get prototypes - for loop functions. - (internal_ucs4_loop): Use correct const-ness. - (ucs4_internal_loop): Likewise. - (internal_ucs4le_loop): Likewise. - (ucs4le_internal_loop_single): Likewise. - * iconv/gconv_trans.c (__gconv_transliterate): Make from_idx, from_tbl, - to_idx, to_tbl, winbuf, winbufend const. Change casts in - assignments appropriately. - (struct known_trans): Remove const from fname. - (trans_compare): Make s1 and s2 const. - * iconv/loop.c (LOOPFC): Make outend parameter const. Add cast to - avoid warning. - * iconv/skeleton.c: Remove cast in calls of loop functions. - * iconvdata/gconv-modules: Remove US-ASCII definitions. - * iconvdata/iso646.c: Remove US_ASCII support. - * include/set-hooks.h (DEFINE_HOOK): Also generate prototype. - * include/unistd.h: Add __libc_check_standard_fds prototype. - * string/bits/string2.h (__mempcpy_args): Add const to casts. - * sysdeps/generic/initfini.c: Add prototypes for dummy, _init, and - _fini. - * sysdeps/generic/libc-start.c: Add prototype for __libc_start_main. - * sysdeps/i386/i486/bits/string.h (strcmp): Add const to casts. - * sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Add cast to avoid - warning. - * sysdeps/unix/sysv/linux/init-first.c: Add prototypes for - __libc_init_first and _dl_start. - * intl/dcigettext.c (transcmp): Make s1 and s2 const. - (DCIGETTEXT): Make domaindata variable const. - * intl/loadmsgcat.c (_nl_load_domain): Rearrange domain initialization - to avoid warning. - -2000-11-20 Hiroyuki Machida - - * sysdeps/unix/sysv/linux/mips/clone.S: Fix comments. - - * sysdeps/unix/sysv/linux/mips/kernel_stat.h (kernel_stat): Expand - time_t to 'long int' not, 'unsigned int'. Use 'long int' for - __unused? members. - - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_NOFOLLOW): Use same - value defined in /usr/include/asm-mips/fcntl.h. +2001-08-17 Ulrich Drepper -2000-11-18 Ulrich Drepper + * locale/duplocale.c (__duplocale): Also initialize the special + __ctype_* elements. - * stdio-common/Makefile (tests): Add test-vfprintf. - (test-vfprintf-ENV): New variable. - * stdio-common/test-vfprintf.c: New file. + * conform/data/netdb.h-data: Adjust gai_strerror return type. - * wcsmbs/mbrtowc.c (__mbrtowc): Do not only flush if input is '\0'. +2001-08-17 Andreas Jaeger - * wcsmbs/Makefile (tests): Add tst-mbrtowc and tst-wcrtomb. - (tst-mbrtowc-ENV): New variable. - (tst-wcrtomb-ENV): New variable. - * wcsmbs/tst-mbrtowc.c: New file. - * wcsmbs/tst-wcrtomb.c: New file. + * misc/getpass.c: Include wchar.h for prototypes. + * malloc/obstack.c: Likewise. -2000-11-16 Andreas Jaeger +2001-08-17 Ulrich Drepper - * manual/install.texi (Tools for Compilation): Update - documentation for GCC 2.95.2. + * sunrpc/svc_simple.c (universal): Use __write instead of write. -2000-11-18 Ulrich Drepper + * wcsmbs/wcscoll.c: Also define __wcscoll. + * include/wchar.h: Declare __wcscoll. - * sysdeps/posix/getaddrinfo.c (gaih_inet): Only return -EAI_AGAIN - if IPv4 and IPv6 requests timed out. + * libio/fwprintf.c: Use __vfwprintf instead of vfwprintf. + * libio/vwprintf.c: Likewise. + * libio/wprintf.c: Likewise. -2000-11-18 Akim Demaille + * iconv/gconv_cache.c: Use __munmap instead of munmap. - * malloc/obstack.h: Formatting changes. - (obstack_grow, obstack_grow0): Don't cast WHERE at all: it - prevents type checking. - (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't - cast the value to (void *): assigning a `foo *' to a `void *' - variable is valid. - (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int. +2001-08-16 Ulrich Drepper -2000-11-17 Ulrich Drepper + * posix/regex.c [_LIBC] (convert_mbs_to_wcs): Use __mbrtowc + instead of mbrtowc. + [_LIBC]: Use __iswctype instead of iswctype, __wcslen instead of + wcslen, and __wcscoll instead of wcscoll. - * scripts/config.guess: Update from upstream maintainer. - * scripts/config.sub: Likewise. + * sysdeps/unix/sockatmark.c (sockatmark): Use __ioctl instead of ioctl. -2000-11-16 Ulrich Drepper + * sysdeps/unix/sysv/linux/gai_sigqueue.c (__gai_sigqueue): Use + __getuid instead of getuid. - * libio/freopen.c (freopen): Reset _mode after succesful reopening. + * stdio-common/perror.c (perror): Use __close instead of close. + * iconv/gconv_cache.c (__gconv_load_cache): Likewise. + * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. - Patch by Shinya Hanataka . - - * libio/Makefile: Add rules to build and run test-freopen. - * libio/test-freopen.c: New file. - * libio/test-freopen.sh: New file. - -2000-11-15 H.J. Lu - - * sysdeps/generic/ldsodefs.h (DL_DT_INIT_ADDRESS): Defined if - ELF_FUNCTION_PTR_IS_SPECIAL is not defined. - (DL_DT_FINI_ADDRESS): Likewise. - - * sysdeps/ia64/dl-lookupcfg.h (_dl_lookup_address): Set the - return type to ElfW(Addr). - (_dl_function_address): New prototype. - (DL_FUNCTION_ADDRESS): Defined. - (DL_DT_INIT_ADDRESS): Defined as DL_FUNCTION_ADDRESS. - (DL_DT_FINI_ADDRESS): Likewise. - - * sysdeps/ia64/Versions (GLIBC_2.2): Add _dl_function_address. - - * sysdeps/ia64/dl-machine.h (_dl_start_address): Removed. - (ELF_MACHINE_START_ADDRESS): Changed to DL_FUNCTION_ADDRESS. - - * sysdeps/ia64/dl-symaddr.c (_dl_start_address): Renamed to ... - (_dl_function_address): This. - - * elf/dl-fini.c (_dl_fini): Use DL_DT_FINI_ADDRESS to get the - function pointer for DT_FINI. - * elf/dl-close.c (_dl_close): Likewise. - - * elf/dl-init.c (_dl_init): Use DL_DT_INIT_ADDRESS to get the - function pointer for DT_INIT. - -2000-11-16 Jakub Jelinek - - * sysdeps/generic/printf_fphex.c (__printf_fphex): Compute correctly - end of wexpbuf buffer. - -2000-11-16 Andreas Jaeger - - * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Remove duplicate - definition of F_GETLK, F_SETLK, F_SETLKW. - -2000-11-16 Andreas Jaeger - - * sysdeps/generic/dl-cache.c (_DL_PLATFORMS_COUNT): Define to 0 if - it's not defined. - -2000-11-15 Jakub Jelinek - - * dlfcn/default.c (main): Add test for dladdr of main returning - argv[0] in dli_fname field. - -2000-11-15 Jakub Jelinek - - * Makeconfig (run-program-prefix): Move test-static test into the - variable. - - * sysdeps/alpha/dl-machine.h (RTLD_START): Update _dl_argv. - * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise, - schedule instructions. - * sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise, - schedule instructions, fix a bug in copying auxiliary data. - -2000-11-15 Ulrich Drepper - - * manual/startup.texi (Program Arguments): Fix type of main's envp - parameter. - Reported by Raúl Núñez de Arenas Coronado . - * iconvdata/gconv-modules: Add CP950 alias. - -2000-11-13 Jakub Jelinek - - * sysdeps/unix/sysv/linux/Makefile: Allow ports to override - syscall-list.h goal. - * sysdeps/unix/sysv/linux/sparc/Makefile: New file. - -2000-11-15 Ulrich Drepper - - * intl/Makefile: tst-gettext2.sh does not need a third parameter. - - * intl/tst-gettext2.sh: Copy locale data. Adjust LOCPATH. Verify - output of program. - - * intl/tst-gettext2.c: Set C locale if setting other locale - failed. Use gettext() not _(). - - * locale/setlocale.c: Increment _nl_msg_cat_cntr whenever we - successfully loaded a new locale. - -2000-11-13 Andreas Jaeger - - * configure.in: Require gcc 2.95 or newer. - -2000-11-15 Ulrich Drepper - - * sysdeps/unix/sysv/linux/paths.h: Adjust for FHS. - Patch by Arkadiusz Miskiewicz . - -2000-11-11 Jim Meyering - - * string/strndup.c (strndup): Cast return value to `char *'. - -2000-11-15 Jim Meyering - - * sysdeps/generic/memchr.c: Remove some useless parentheses. - [HAVE_STDLIB_H || defined _LIBC]: Include . - [HAVE_BP_SYM_H || defined _LIBC]: Guard inclusion of bp-sym.h. - [! (HAVE_BP_SYM_H || defined _LIBC)] (BP_SYM): Define as no-op. - Also #undef __memchr. - Use `weak_alias' only if it's defined. - -2000-11-10 H.J. Lu - - * Makefile.in (install): Set LANGUAGE=C LC_ALL=C. - -2000-11-15 Andreas Jaeger - - * elf/chroot_canon.c: Include . - - * elf/cache.c (struct cache_entry): Use uint64_t for hwcap. - (print_entry): Likewise. - (add_to_cache): Likewise. - - * elf/ldconfig.h (add_to_cache): Change prototype for hwcap change. - - * elf/ldconfig.c (struct lib_entry): Use uint64_t for hwcap. - (path_hwcap): Likewise. - (search_dir): Likewise. - - * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Handle platform. - - * elf/cache.c (add_to_cache): Handle 64 bit hwcap entry. - - * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h - (_dl_platform_string): New. - (_DL_HWCAP_PLATFORM): New. - (_dl_string_platform): New. - * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. - - * sysdeps/generic/dl-procinfo.h (_DL_HWCAP_COUNT): New. - (_dl_string_platform): New. - (_DL_HWCAP_PLATFORM): New. - (_dl_platform_string): New. - - * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Added x86 platform - recognition. - (_DL_HWCAP_COUNT): New. - (_dl_string_platform): New. - (_DL_HWCAP_PLATFORM): New. - (_dl_platform_string): New. - -2000-11-14 Ulrich Drepper - - * iconvdata/gconv-modules: Add CP936 as alias for GBK. - -2000-11-14 Andreas Jaeger - - * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Fix access to _dl_hwcap. - -2000-11-13 Roland McGrath - - * hurd/get-host.c (_hurd_get_host_config): Fix last change. - -2000-11-13 Marcus Brinkmann - - * hurd/get-host.c (_hurd_get_host_config): Fix possible buffer - underrun and make sure the result is null terminated even if there - is no trailing newline. - -2000-11-13 Jakub Jelinek - - * sysdeps/alpha/fpu/libm-test-ulps: Update. - -2000-11-10 H.J. Lu - - * sysdeps/ia64/fpu/libm-test-ulps: Updated. - -2000-11-10 Andreas Jaeger - - * elf/ldconfig.c (create_links): Fix alloca calculation. - Patch by Ben Collins . - -2000-11-09 Ulrich Drepper - - * inet/getnameinfo.c (getnameinfo): Use correct destination - parameter for if_indextoname. - Patch by Hideaki YOSHIFUJI . - -2000-11-09 H.J. Lu - - * sunrpc/Versions (GLIBC_2.1): Remove xdr_cryptkeyarg, - xdr_cryptkeyarg2, xdr_cryptkeyres, xdr_des_block, - xdr_key_netstarg, xdr_key_netstres, xdr_keybuf and - xdr_keystatus. - - * time/Versions (GLIBC_2.1): Move getitimer to... - * sysdeps/unix/sysv/linux/alpha/Versions (GLIBC_2.1): ...here. - -2000-11-03 Bruno Haible - - * manual/install.texi: Recommend to set LANGUAGE=C LC_ALL=C during - "make install", to work around a binary incompatibility between - glibc 2.1 and glibc 2.2 gconv modules. - -2000-11-09 Ulrich Drepper - - * intl/locale.alias: Add thai. - Patch by Chanop Silpa-Anan . - -2000-11-07 Akim Demaille - - * malloc/obstack.c (obstack_grow, obstack_grow0): Rename the second - argument `data' for consistency with the prototypes. - Qualify it `const'. - (obstack_copy, obstack_copy0): Rename the second argument as - `address' for consistency. Qualify it `const'. - * malloc/obstack.h (obstack_copy, obstack_copy0, obstack_grow) - (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify - `const' their input argument (`data' or `address'). - Adjust the corresponding macros to include `const' in casts. - -2000-11-06 Hideaki YOSHIFUJI - - * sysdeps/posix/getaddrinfo.c: Clean-up: define family to hold - target family. - -2000-11-06 Hideaki YOSHIFUJI - - * sysdeps/posix/getaddrinfo.c: Loosen protocol check to ease raw - socket creation. - -2000-11-06 Hideaki YOSHIFUJI - - * sysdeps/posix/getaddrinfo.c: Ensure to fill ai_socktype and - ai_protocol by internal table if service was not given. - -2000-11-06 Hideaki YOSHIFUJI - - * sysdeps/posix/getaddrinfo.c: Don't raise an error even if - numerical port was specified with protocol without socktype. - -2000-11-06 Hideaki YOSHIFUJI + * libio/tst-ungetwc2.c (main): Define str const. - * sysdeps/posix/getaddrinfo.c: Ensure to check if protocol is ok. + * include/wchar.h: Add prototypes for __fwprintf and __vfwprintf. + * libio/fwprintf.c: Also define __fwprintf. + * stdio-common/vfprintf.c [COMPILE_WPRINTF]: Also define __vfwprintf. + * argp/argp-fmtstream.c: Handle wide oriented stderr stream. + * assert/assert-perr.c: Likewise. + * assert/assert.c: Likewise. + * gmon/gmon.c: Likewise. + * inet/rcmd.c: Likewise. + * malloc/obstack.c: Likewise. + * misc/err.c: Likewise. + * misc/error.c: Likewise. + * misc/getpass.c: Likewise. + * posix/getopt.c: Likewise. + * resolv/res_hconf.c: Likewise. + * stdio-common/perror.c: Likewise. + * stdio-common/psignal.c: Likewise. + * stdlib/fmtmsg.c: Likewise. + * sunrpc/auth_unix.c: Likewise. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + * sunrpc/svc_tcp.c: Likewise. + * sunrpc/svc_udp.c: Likewise. + * sunrpc/svc_unix.c: Likewise. + * sunrpc/xdr.c: Likewise. + * sunrpc/xdr_array.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_ref.c: Likewise. + * sysdeps/generic/wordexp.c: Likewise. -2000-11-06 Hideaki YOSHIFUJI + * po/it.po: Update from translation team. - * inet/getnameinfo.c: getnameinfo() NI_xxx flag validation. + * misc/err.c: Handle wide oriented stderr stream. -2000-11-06 Hideaki YOSHIFUJI +2001-08-14 Tom Rix - * sysdeps/posix/getaddrinfo.c: Ensure not to fill garbage value in - sin6_scope_id field. + * iconv/gconv_cache.c (find_module): Add #ifndef STATIC_GCONV. + * iconv/Makefile: Fix gconv_cache.c CFLAGS. -2000-11-06 Hideaki YOSHIFUJI +2001-08-13 Tom Rix - * inet/getnameinfo.c: Repair getnameinfo() sin6_socpe_id support. + * sysdeps/unix/sysv/aix/Makefile: Add rule to import kernel symbols. + * sysdeps/unix/sysv/aix/bits/types.h: Fix type of __id_t, __useconds_t + and __intptr_t. -2000-11-06 Hideaki YOSHIFUJI +2001-08-15 Martin Schwidefsky - * inet/getnameinfo.c: Repair NI_NOFQDN flag support. + * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S (__getcontext): + Store the access registers to the ucontext structure. + * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S (__getcontext): + Likewise. -2000-11-06 Hideaki YOSHIFUJI + * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S (__setcontext): + Load the access registers from the ucontext structure. + * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S (__setcontext): + Likewise. - * inet/getnameinfo.c: Wake-up sin6_scope_id support in - getnameinfo(): check for whether sin6_socpe_id exist was wrong. + * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: Adjust the SC_xxx + offsets to the new ucontext layout. + * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: Likewise. -2000-11-09 Martin Schwidefsky + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Fix the layout + of the ucontext structure. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise. - * sysdeps/unix/sysv/linux/s390/mmap.S: Use mmap2 if it is present. - * sysdeps/unix/sysv/linux/s390/mmap64.S: New file. +2001-08-15 Ulrich Drepper -2000-11-09 H.J. Lu + * misc/error.c (error): Handle wide oriented stderr stream correctly. + (error_at_line): Likewise. - * io/Versions (GLIBC_2.1.1): Remove lockf64. + * stdio-common/perror.c (perror): Implement according to standard. + The stream orientation must not be changed if the stream was not + oriented before the call. + * stdio-common/Makefile (tests): Add tst-perror. + * stdio-common/tst-perror.c: New file. -See ChangeLog.11 for earlier changes. +See ChangeLog.12 for earlier changes. diff -durpN glibc-2.2.4/ChangeLog.12 glibc-2.2.5/ChangeLog.12 --- glibc-2.2.4/ChangeLog.12 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/ChangeLog.12 Wed Aug 15 22:24:54 2001 @@ -0,0 +1,10098 @@ +2001-08-15 Ulrich Drepper + + * libio/iofwide.c (_IO_fwide): Don't reset file position to + beginning of file, really get current position. + +2001-08-15 Andreas Schwab + + * sysdeps/m68k/m68020/atomicity.h (atomic_add): Don't allow + address register for operand 0. + +2001-08-14 Ulrich Drepper + + * stdio-common/perror.c (perror): Use _IO_fwide instead of fwide. + + * libio/libio.h (_IO_fwide): Handle zero as second parameter more + efficiently in macro. + +2001-08-14 Jakub Jelinek + + * resolv/nss_dns/dns-host.c (RESOLVSORT): Define. + (addrsort): New function. + * resolv/gethnamaddr.c (RESOLVSORT): Define. + +2001-08-14 Jakub Jelinek + + * string/strsignal.c (free_mem): Remove. + +2001-08-14 Andreas Jaeger + + * inet/inet_ntoa.c (free_mem): Remove, it's not used anymore. + Closes PR libc/2477, reported by Dylan Alex Simon + . + +2001-08-14 Ulrich Drepper + + * locale/Makefile (aux): Add xlocale. + * locale/xlocale.c: New file. + * include/locale.c (_nl_C_locobj): Declare. + * iconv/gconv_charset.h: Use __tolower_l, __isdigit_l, __isspace_l + with _nl_C_locobj instead of tolower, isdigit, isspace. + * iconv/gconv_conf.c: Likewise. + * iconv/gconv_int.h: Likewise. + * iconv/gconv_open.c: Likewise. + + * locale/newlocale.c: Minor cleanups. + +2001-08-14 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/w_expl.c: New file, copy from + ldbl-96/w_expl.c with tweaked constants. Patch by Stephen L + Moshier. + +2001-08-13 Ulrich Drepper + + * malloc/memusage.c (me): Allow creating the output file. + + * sysdeps/unix/sysv/linux/Makefile: Remove -fkeep-inline-functions + flag for init-first. + + * po/fr.po: Update from translation team. + +2001-08-13 Andreas Jaeger + + * sysdeps/mips/machine-gmon.h (MCOUNT): Don't use delay slot for + jal since it's a macro. + Patch by Simon Gee . + +2001-08-12 Ulrich Drepper + + * iconvdata/Makefile: Add rules to build ISO-IR-209 and MAC-SAMI. + * iconvdata/iso-ir-209.c: New file. + * iconvdata/mac-sami.c: New file. + * iconvdata/gconv-modules: Add entries for ISO-IR-209 and MAC-SAMI. + * iconvdata/tst-tables.sh: Likewise. + + * posix/getopt.c: Remove store_args_and_env which is not needed since + USE_NONOPTION_FLAGS is undefined anyhow. Use __libc_argc and + __libc_argv variables. + +2001-08-12 Roland McGrath + + * sysdeps/mach/hurd/clock.c: New file. + * sysdeps/mach/hurd/times.c: New file. + * sysdeps/mach/hurd/getclktck.c (__getclktck): Always return 1000000. + * sysdeps/mach/hurd/init-posix.c: New file. + + * hurd/hurdlookup.c (__hurd_file_name_lookup): Comment fix. + +2001-08-11 Roland McGrath + + * sysdeps/mach/hurd/bits/time.h + (CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID): New macros. + * sysdeps/mach/hurd/i386/bits/time.h: File removed. + + * posix/getopt.c (nonoption_flags_max_len, nonoption_flags_len): + Make these defns conditional on [USE_NONOPTION_FLAGS]. + +2001-08-11 Ulrich Drepper + + * config.h.in: Add #undef line for USE_NONOPTION_FLAGS. + * posix/getopt_init.c: Produce code only if USE_NONOPTION_FLAGS is + defined. + * posix/getopt.c: Use __getopt_nonoption_flags only if + USE_NONOPTION_FLAGS is defined. + * sysdeps/mach/hurd/i386/init-first.c: Use __getopt_clean_environment + only if USE_NONOPTION_FLAGS is defined. + * sysdeps/mach/hurd/mips/init-first.c: Likewise. + * sysdeps/unix/sysv/linux/init-first.c: Likewise. + * sysdeps/arm/init-first.c: Likewise. + * sysdeps/generic/init-first.c: Likewise. + * sysdeps/i386/init-first.c: Likewise. + * sysdeps/sh/init-first.c: Likewise. + +2001-08-11 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/e_j0l.c: New file. + Contributed by Stephen L Moshier . + +2001-08-11 Ulrich Drepper + + * assert/assert.c (set_progname): Removed. + (__assert_fail): Use __progname instead of __assert_program_name. + * assert/assert-perr.c (__assert_perror_fail): Likewise. + + * malloc/malloc.c (ptmalloc_init): Don't call getenv five times. + Instead use new function next_env_entry which iterates over the + environment once. + + * sysdeps/arm/dl-machine.h (elf_machine_runtime_setup): Only set + _dl_profile_map for the right object. + + * elf/dl-reloc.c (_dl_relocate_object): Allocate l_reloc_result + only if consider_profiling is != 0, not if _dl_profile != NULL. + + * sysdeps/generic/dl-environ.c (_dl_next_ld_env_entry): Optimize a bit. + Now returns pointer to first character after "LD_". + * elf/rtld.c (process_envvars): Adjust for change above. + * sysdeps/unix/sysv/linux/dl-librecon.h (EXTRA_LD_ENVVARS): Likewise. + * sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS): + Likewise. + +2001-08-10 Wolfram Gloger + + * malloc/malloc.c (grow_heap): Use mmap() rather than mprotect() + to allocate new memory, for better performance with Linux-2.4.x. + +2001-08-10 Ulrich Drepper + + * posix/getopt_init.c (__getopt_clean_environment): Avoid making + the strncmp calls most of the time by testing for '_' as the first + character of the name. + + * elf/dl-open.c (add_to_global): Remove stale comment. + + * elf/dl-load.c (fillin_rpath): In SUID binaries, don't mark + non-system-dirs in LD_LIBRARY_PATH as nonexisting, simply drop them. + + * libio/iovdprintf.c (_IO_vdprintf): Set _IO_USER_LOCK flag for + temporary stream. Don't define lock. + * libio/obprintf.c (_IO_obstack_vprintf): Likewise. + * libio/strops.c (_IO_str_init_static): Likewise. + * libio/vasprintf.c (_IO_vasprintf): Likewise. + * libio/wstrops.c (_IO_wstr_init_static): Likewise. + * libio/iovsprintf.c: Likewise. + * libio/iovsnprintf.c: Likewise. + * libio/iovswprintf.c: Likewise. + * libio/iovsscanf.c: Likewise. + * libio/iovswscanf.c: Likewise. + * stdio-common/vfprintf.c [USE_IN_LIBIO] (buffered_vfprintf): Likewise. + * libio/genops.c (_IO_no_init): Don't call _IO_lock_init if _lock + is NULL. + (_IO_default_finish): Likewise. + * libio/wgenops.c (_IO_wdefault_finish): Likewise. + +2001-08-10 Andreas Jaeger + + * stdio-common/stdio_ext.h: Fix typo. + +2001-08-09 Ulrich Drepper + + * posix/fnmatch_loop.c: Fix computation of alignment. + +2001-08-09 Isamu Hasegawa + + * posix/regex.c (wcs_regex_compile): Use appropriate string + to compare with collating element. + Fix the padding for the alignment. + +2001-08-09 Isamu Hasegawa + + * locale/programs/ld-collate.c (collate_output): Exclude + characters from elem_table. + Reduce if clause to write collating elements correctly. + * posix/Makefile (tests): Add bug-regex5. + * posix/bug-regex5.c: New file. + +2001-08-09 Ulrich Drepper + + * locale/lc-time.c (_nl_parse_alt_digit): New function. + * locale/localeinfo.h: Add prototype for it. + * time/strptime.c (get_alt_number): Use _nl_parse_alt_digit to get + the value. Correct computation of hour for %OI. If no %EC given + but %Ey use numeric formular. + + * dlfcn/Makefile (tststatic-ENV): Also add $(common-objpfx)elf for + ld.so. + + * time/tst-strptime.c: Add tests in different locales. + * time/Makefile (tst-strptime-ENV): Define. + +2001-08-09 Jakub Jelinek + + * catgets/catgets.c (catclose): Be liberal about catalog_desc in + catclose too. + +2001-08-09 Ulrich Drepper + + * time/strptime.c (strptime_internal): Add handling of year + + %U/%W week + week day. + * time/tst-strptime.c: Add test case for %U and %W handling. + + * stdio-common/vfscanf.c: Fix reading of wide chars and strings if + not COMPILE_WSCANF. + + * libio/vswprintf.c (_IO_vswprintf): Fix return value handling + which is different from snprintf. + * libio/tst_swprintf.c: Add tests for too small output buffer. + + * stdio-common/vfscanf.c: Fix handling of %[] for COMPILE_WSCANF. + * libio/Makefile (tests): Add tst-swscanf. + * libio/tst-swscanf.c: New file. + +2001-08-09 Jakub Jelinek + + * posix/globtest.sh: Robustify tilde tests. + +2001-08-09 Andreas Jaeger + + * locale/programs/ld-ctype.c (DEFAULT): Fix expression. + (EMPTY): New. + (wctype_table_finalize): Use it. + (find_idx): Likewise. + (wctype_table_get): Likewise. + + * configure.in: Add check for GCC 3.x. + +2001-08-09 Ulrich Drepper + + * libio/wfileops.c (_IO_wfile_seekoff): Don't even try to handle + seeking with backup buffer present. + Correct determining of internal buffer position. + Reset also wide buffers if we reset the internal buffers. + * libio/iofwide.c (_IO_fwide): Always determine file offset for wide + streams. + * libio/ioseekoff.c: Catch one unimplemented case. + * libio/ftello.c: Don't abort if the wide stream has backup buffer. + * libio/ftello64.c: Likewise. + * libio/iofgetpos.c: Likewise. + * libio/iofgetpos64.c: Likewise. + * libio/ftell.c: Likewise. + * libio/Makefile (tests): Add tst-ungetwc2. + * libio/tst-ungetwc2.c: New file. + +2001-08-08 Ulrich Drepper + + * locale/elem-hash.h (elem_hash): Correct stupid mistake and + create real hash values now. + Patch by Isamu Hasegawa . + + * libio/iofgetpos.c (_IO_new_fgetpos): Correct a few problems in + the handling of wide streams. + + * libio/ioungetwc.c (ungetwc): Orient stream first. + * libio/Makefile (tests): Add tst-ungetwc1. + * libio/tst-ungetwc1.c: New file. + + * libio/wfileops.c (_IO_wfile_underflow): Remove incorrect test + for possible conversion using __codecvt_do_in. + * libio/Makefile (tests): Add tst-fgetws. + * libio/tst-fgetws.c: New file. + + * libio/iofgetws.c: Use _IO_ferror_unlocked macros instead of + coding the test here. + + * catgets/open_catalog.c: Rewrite code to assume that the function + is called at catopen time and not delayed in catgets. + * catgets/catgets.c (catopen): Call __open_catalog and fail if that + function failed. + (catgets): Remove code for delayed opening of catalog. + * catgets/catgetsinfo.h: Remove now unnecessary information from + struct catalog_info. Change __open_catalog prototype. + * catgets/gencat.c: Adjust __open_catalog call. + * catgets/test-gencat.c: Stop program if catopen failed. + + * locale/C-monetary.c (_nl_C_LC_MONETARY): Provide correct value + for CRNCYSTR. + + * locale/programs/ld-messages.c (messages_finish): Provide POSIX + locale compliant default values for fields without definition. + * locale/programs/ld-time.c (time_finish): Likewise. + * locale/programs/ld-monetary.c (monetary_finish): Likewise. + +2001-08-08 Andreas Jaeger + + * sysdeps/ieee754/ldbl-96/s_ilogbl.c (__ilogbl): Fix test for + infinity. + +2001-08-07 Ulrich Drepper + + * sysdeps/ia64/memusage.h (GETTIME): Define using hp-timing.h + functionality. + + * sysdeps/ia64/hp-timing.h (HP_TIMING_NOW): Fix comment. + +2001-08-07 Jakub Jelinek + + * malloc/memusage.c (initialized): New variable. + (init): If not yet initialized, call me(). + (me): Do all dlsym calls here. + (malloc, realloc, calloc, free): If not yet initialized, + call me(). If in the middle of initializing, return NULL or + do nothing. + +2001-08-07 Jakub Jelinek + + * sysdeps/unix/seekdir.c (seekdir): Set dirp->filepos. + + * dirent/tst-seekdir.c (main): Check whether telldir right after + seekdir returns 2nd argument given to seekdir. + +2001-08-07 Franz Sirl + + * dlfcn/Makefile (tststatic-ENV): Add $(common-objpfx) to + LD_LIBRARY_PATH. + +2001-08-07 Andreas Jaeger + Andreas Schwab + Bruno Haible + + * locale/programs/3level.h (EMPTY): New macro. + (*_get, *_add, *_iterate, *_finalize): Use it instead of ~(uint32_t) 0. + +2001-08-08 GOTO Masanori + + * locale/iso-3166.def: Updates from latest official list. + +2001-08-07 Andreas Jaeger + + * stdlib/tst-strtod.c: Disable HUGE_VAL tests for older GCCs. + + * iconv/gconv_charset.h (upstr): Add unused attribute to avoid warning. + + * libio/iopopen.c (_IO_new_proc_open): Fix typos, it's _IO_MTSAFE_IO. + (_IO_new_proc_close): Likewise. + * libio/oldiopopen.c (_IO_old_proc_open): Likewise. + (_IO_old_proc_close): Likewise. + +2001-08-06 Ulrich Drepper + + * manual/locale.texi: Add documentation for rpmatch. + Patch by Jochen Hein . + +2001-08-06 Jakub Jelinek + + * stdlib/strtod.c (STRTOF): Skip whole infinity, not just inf. + * stdio-common/vfscanf.c (__vfscanf): +- can be followed by i in +-Inf. + + * stdlib/tst-strtod.c (tests): Add Inf tests. + * stdio-common/tstscanf.c (main): Add tests for +- before Inf. + +2001-08-06 Ulrich Drepper + + * locale/weightwc.h (findidx): Change type of i to int32_t. + + * wcsmbs/wcsmbs-tst1.c (main): Avoid warning. Pretty printing. + +2001-08-05 Roland McGrath + + * sysdeps/unix/bsd/bsd4.4/bits/dirent.h (struct dirent): Rename member + d_fileno to d_ino. + (struct dirent64): Likewise. + (d_fileno): Define as macro. + +2001-08-04 Roland McGrath + + * sysdeps/mach/hurd/getrusage.c: Use TASK_EVENTS_INFO if implemented + by the microkernel (which it's not). + +2001-08-04 Ulrich Drepper + + * libio/fileops.c (_IO_new_file_underflow): Don't call + _IO_flush_all_linebuffered. This isn't required in any standard. + Instead flush only stdout. + * libio/wfileops.c (_IO_wfile_underflow): Likewise. + +2001-08-04 Franz Sirl + + * dlfcn/Makefile: Add rules for new testcase tststatic. + * dlfcn/tststatic.c: New file. + * dlfcn/modstatic.c: New file. + +2001-08-04 Ulrich Drepper + + * manual/summary.awk: Fix value used for FF. + + * elf/rtld.c: Correct use of __builtin_expect. + + * elf/dl-close.c: Remove commented-out code. + + * libio/genops.c (_IO_unbuffer_write): Force streams in narrow + orientation so that conversion modules aren't used anymore. + * malloc/set-freeres.c: Call _IO_cleanup before running subfreeres + functions to avoid using wide streams afterwards. + + * iconvdata/Makefile: Add rules to build GEORGIAN-PS and + GEORGIAN-ACADEMY. + * iconvdata/georgian-ps.c: New file. + * iconvdata/georgian-academy.c: New file. + * iconvdata/gconv-modules: Add entries for GEORGIAN-PS and + GEORGIAN-ACADEMY. + * iconvdata/tst-tables.sh: Add GEORGIAN-PS and GEORGIAN-ACADEMY. + +2001-08-03 Ulrich Drepper + + * locale/programs/ld-collate (insert_value): If symbol in order + definition does not exist create it as a sequence without + associated multibyte and wide representation. + +2001-07-30 Roland McGrath + + * sysdeps/mach/bits/libc-lock.h (__libc_cleanup_region_start): Diddle + syntax so both function and pointer-to-function arguments work right. + +2001-08-03 Tom Rix + + * config.h.in: Add HAVE_XCOFF for AIX. + * configure.in: Add --with-xcoff option. + * include/libc-symbols.h: Disable the .stabs macros. + +2001-08-03 Ulrich Drepper + + * iconvdata/8bit-gap.c: Correctly use __builtin_expect. + * iconvdata/ansi_x3.110.c: Likewise. + * iconvdata/big5.c: Likewise. + * iconvdata/euc-cn.c: Likewise. + * iconvdata/euc-jp.c: Likewise. + * iconvdata/euc-kr.c: Likewise. + * iconvdata/gb18030.c: Likewise. + * iconvdata/gbbig5.c: Likewise. + * iconvdata/gbgbk.c: Likewise. + * iconvdata/gbk.c: Likewise. + * iconvdata/ibm930.c: Likewise. + * iconvdata/ibm932.c: Likewise. + * iconvdata/ibm933.c: Likewise. + * iconvdata/ibm935.c: Likewise. + * iconvdata/ibm939.c: Likewise. + * iconvdata/ibm943.c: Likewise. + * iconvdata/iso-2022-cn.c: Likewise. + * iconvdata/iso-2022-kr.c: Likewise. + * iconvdata/iso646.c: Likewise. + * iconvdata/iso8859-1.c: Likewise. + * iconvdata/iso_6937-2.c: Likewise. + * iconvdata/iso_6937.c: Likewise. + * iconvdata/johab.c: Likewise. + * iconvdata/sjis.c: Likewise. + * iconvdata/t.61.c: Likewise. + * iconvdata/uhc.c: Likewise. + * iconvdata/unicode.c: Likewise. + * iconvdata/utf-16.c: Likewise. + * iconv/gconv_simple.c: Likewise. Convert assert() in real error + handling. + + * iconvdata/Makefile: Add rules to build KOI8-T module. + * iconvdata/koi8-t.c: New file. + * iconvdata/gconv-modules: Add entries for KOI8-T. + * iconvdata/tst-tables.sh: Add KOI8-T. + + * locale/iso-639.def: Correct Javanese 2 letter code. Add Tonga. + Add Tigrinya. + +2001-08-02 Ulrich Drepper + + * locale/programs/ld-collate.c (collate_read): Handle collating-element + and reorder_after following copy statement correctly. + +2001-08-02 Andreas Jaeger + + * libio/bits/stdio.h (printf): Remove printf optimization since + GCC 3.0 can optimize printf. + +2001-08-02 Ulrich Weigand + + * sysdeps/s390/s390-32/memcpy.S: Fixed incorrect use of + mvcle introduced by 2001-07-12 change. + * sysdeps/s390/s390-64/memcpy.S: Likewise. + +2001-07-31 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/getcontext.S: Don't touch the %gs + register so that contexts can be used in different threads. + * sysdeps/unix/sysv/linux/i386/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/i386/swapcontext.S: Likewise. + + * sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Correct + test for cmsg struct size. + * sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Likewise. + + * sysdeps/unix/sysv/linux/i386/makecontext.S: Remove unnecessary + initializations. + + * libio/iopopen.c: Add lock for proc_file_chain access. + * libio/oldiopopen.c: Add lock for old_proc_file_chain access. + Reported by Padraig Brady . + +2001-07-31 Andreas Jaeger + + * sysdeps/unix/sysv/linux/sparc/bits/poll.h (NPOLLFILE): Removed. + * sysdeps/unix/sysv/linux/mips/bits/poll.h (NPOLLFILE): Removed. + * sysdeps/unix/sysv/linux/m68k/bits/poll.h (NPOLLFILE): Removed. + * sysdeps/unix/sysv/linux/bits/poll.h (NPOLLFILE): Removed. + * sysdeps/generic/bits/poll.h (NPOLLFILE): Removed. + + * libio/genops.c (flush_cleanup): Guard list_all_lock to allow + compilation without threads. + +2001-07-30 Ulrich Drepper + + * po/fr.po: Update from translation team. + +2001-07-30 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/e_atanhl.c: New file, contributed by + Stephen L Moshier. + + * posix/regex.c: Declare wcs functions only if compiling with + MBS_SUPPORT. + Don't use #elif for traditional C. + +2001-07-29 Mark Kettenis + + * sysdeps/mach/hurd/recvmsg.c: New file. + * sysdeps/mach/hurd/sendmsg.c: New file. + +2001-07-27 Ulrich Drepper + + * version.h (VERSION): Bump to 2.2.4. + + * sysdeps/mips/Dist: Remove non-existing files. + * sysdeps/mips/mips64/Dist: Likewise. + * sysdeps/mips/mipsel/Dist: Removed. + * iconv/Makefile (distribute): Add strtab.c and iconvconfig.h. + * sysdeps/generic/Dist: Add bits/link.h. + * sysdeps/unix/sysv/linux/m68k/Dist: Add sys/procfs.h. + * sysdeps/unix/sysv/aix/Dist: Add dl-support.c, dl-addr.c, and + dl-error.c. + * sysdeps/ia64/Dist: Add bits/link.h. + + * libio/vasprintf.c (_IO_vasprintf): Don't copy uninitialized byte + from stream buffer to result buffer. + Reported by Michael Meeks . + + * libio/Makefile: Add rules to check output of tst-fopenloc and + for memory leaks. + * libio/tst-fopenloc.c: New file. + + * iconv/gconv_cache.c (__gconv_compare_alias_cache): New function. + * iconv/gconv_int.h: Add prototype for __gconv_compare_alias_cache. + * iconv/gconv_charset.h: Replace __gconv_lookup_alias prototype with + __gconv_compare_alias prototype. + * iconv/gconv_db.c (__gconv_lookup_alias): Removed. + (__gconv_compare_alias): New function. + * locale/findlocale.c (_nl_find_locale): Use __gconv_compare_alias + instead of calling __gconv_lookup_alias twice and compare here. + +2001-07-26 Mark Kettenis + + * hurd/hurdsig.c (_hurd_internal_post_signal): Fix handling of + SA_RESETHAND and SA_NODEFER. + +2001-07-27 Ulrich Drepper + + * libio/fileops.c (_IO_new_file_fopen): Correctly locate ccs= + substring. Don't handle ccs= if no descriptor was allocated. + Normalize codeset name before calling __wcsmbs_named_conv. + Initialize transliteration elements. Free step data structure. + * libio/iofclose.c (_IO_new_fclose): Correct freeing of the step data. + * libio/iofwide.c (__libio_translit): Renamed from libio_translit + and made public. Various little cleanup changes. + * wcsmbs/wcsmbsload.h (struct gconv_fcts): Add towc_nsteps and + tomb_nsteps member. + * wcsmbs/wcsmbsload.c: Add some casts to avoid warnings. + (__wcsmbs_gconv_fcts): Initialize towc_nsteps and tomb_nsteps member. + (getfct): Take additional parameter with pointer to variable where the + number of steps is stored in. Disable code which allows to use more + than one step for now. Adjust all callers. + (free_mem): New function. Frees data associated with currently + selected converters. + + * malloc/mtrace.pl: Extract addresses from DSOs. + +2001-07-26 Ulrich Drepper + + * malloc/mcheck.c (checkhdr): Disable mcheck before reporting an + error. Don't run any tests if mcheck is disabled. + + * elf/dl-support.c (_dl_important_hwcaps): Avoid using malloc + early in the program. + +2001-07-27 Andreas Jaeger + + * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h (SC_GPRS): Fix + value following change from 2001-05-30. + + * sysdeps/s390/s390-64/bits/setjmp.h (_JMPBUF_UNWINDS): Follow + rename change from 2001-07-12 for __jmp_buf. + Patches by Ulrich Weigand . + +2001-07-26 Roland McGrath + + * sysdeps/generic/bits/termios.h (EXTA, EXTB): Make these conditional + on __USE_MISC rather than __USE_BSD. + (B57600, B115200, B230400, B460800, B500000, B576000, B921600, + B1000000, B1152000, B1500000, B2000000, B2500000, B3000000, + B3500000, B4000000): New macros. + * sysdeps/generic/tcsetattr.c (bad_speed): Accept those values. + * termios/cfsetspeed.c (speeds): Likewise. + +2001-07-26 kaz Kojima + + * sysdeps/sh/dl-machine.h (elf_machine_load_address): Don't use + multi-line strings. + (FUN_ADDR, FGR_SAVE, ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. + (elf_machine_rela): Handle unaligned relocation. + +2001-06-07 David Mosberger + + * sysdeps/ia64/dl-symaddr.c (_dl_symbol_address): Update call to + __ia64_make_fptr() for new interface. + (_dl_function_address): Remove. + + * sysdeps/ia64/dl-machine.h (IA64_BOOT_FPTR_TABLE_LEN): Rename + from IA64_BOOT_FPTR_SIZE and reduce its value from 256 to 200. + (struct ia64_fdesc): Rename from struct ia64_fptr and drop "next" + pointer. Rename member "func" to "ip". + (struct ia64_fdesc_table): New type. + (__ia64_make_fptr): Change prototype. + (__ia64_init_bootstrap_fdesc_table): New function. + (ELF_MACHINE_BEFORE_RTLD_RELOC): New macro. + (__boot_ldso_fptr): Removed. + (__fptr_next): Removed. + (__fptr_root): Removed. + (__fptr_count): Removed. + (TRAMPOLINE_TEMPLATE): Fix typo in comment. Don't use multi-line + strings to avoid warning from gcc3. + (RTLD_START): Don't use multi-line strings. + (ELF_MACHINE_START_ADDRESS): Use DL_STATIC_FUNCTION_ADDRESS. + (elf_machine_fixup_plt): Update the code entry point in the + function descriptor through a "volatile" pointer to ensure proper + write ordering. + (elf_machine_rela): Simplify handling of FPTR relocs: always call + __ia64_make_fptr(). + + * sysdeps/ia64/dl-lookupcfg.h (DL_AUTO_FUNCTION_ADDRESS): New macro. + (DL_STATIC_FUNCTION_ADDRESS): Likewise. + (DL_DT_INIT_ADDRESS): Use DL_AUTO_FUNCTION_ADDRESS. + (DL_DT_FINI_ADDRESS): Likewise. + + * sysdeps/ia64/dl-fptr.c: Rewrite for better scalability and to + avoid deadlocks. + + * include/link.h: Add member machine specific "l_mach" member to + link_map. + + * sysdeps/generic/bits/link.h: New file. + * sysdeps/ia64/bits/link.h: Likewise. + + * elf/rtld.c (_dl_start): Fix typo in comment. + (_dl_start_final): Copy new "l_mach" member from temporary to + final bootstrap map. + +2001-07-25 Ulrich Drepper + + * csu/gmon-start.c: Use ENTRY_POINT_DECL if defined instead of a + declaration using ENTRY_POINT. + * sysdeps/ia64/elf/entry.h (ENTRY_POINT_DECL): New definition. + +2001-07-25 H.J. Lu + + * csu/gmon-start.c: Include + (_start): Replaced with ENTRY_POINT. + +2001-07-25 Mark Kettenis + + * sysdeps/unix/bsd/bsd4.4/bits/socket.h: New file. + +2001-07-25 Ulrich Drepper + + * iconv/iconvconfig.c (main): Don't write an output file if we + have seen an error. + (write_output): Don't overwrite old cache file until we know we + have a new one. + + * iconv/Makefile (install-sbin): Add iconvconfig. + +2001-07-25 Jakub Jelinek + + * elf/Makefile (routines): Add dl-iteratephdr and + dl-iteratephdr-static. + (elide-routines.os): Add dl-iteratephdr-static. + * elf/dl-iteratephdr.c: New file. + * elf/link.h (struct dl_phdr_info): New definition. + (dl_iterate_phdr): New prototype. + * elf/Versions (dl_iterate_phdr): Add at GLIBC_2.2.4. + * include/link.h (struct dl_phdr_info): New definition. + (dl_iterate_phdr, __dl_iterate_phdr): New prototypes. + * sysdeps/generic/dl-iteratephdr-static.c: New file. + * sysdeps/unix/sysv/linux/ia64/dl-iteratephdr-static.c: New file. + +2001-07-24 Igor Khavkine + + * hurd/hurdsig.c (_hurdsig_init): Fix incorrect initialization + of pending signals. + +2001-06-22 Jakub Jelinek + + * sysdeps/powerpc/dl-machine.c (__elf_preferred_address): Prefer + gaps below main executable. + +2001-07-22 Bruno Haible + + * intl/libintl.h (ngettext, dngettext, dcngettext): Use both msgid1 + and msgid2 for printf format argument checking. + +2001-07-24 Ulrich Drepper + + * iconv/gconv_cache.c (find_module): Don't allocate room for the + filename. Use alloca, we don't need it beyond this function. + (__gconv_release_cache): New function. + * iconv/gconv_db.c (__gconv_close_transform): Call + __gconv_release_cache after the steps are handled. + * iconv/gconv_dl.c (__gconv_find_shlib): Allocate file name in the + record as well. + * iconv/gconv_int.h: Add prototype for __gconv_release_cache. + + * iconv/gconv_cache.c (__gconv_lookup_cache): Catch one more + boundary case and reject it. + +2001-07-24 Andreas Jaeger + + * manual/examples/longopt.c (main): Fix which options take arguments. + +2001-07-24 Ulrich Drepper + + * iconvdata/Makefile: Add dependencies for tst-loading test. + +2001-07-24 Andreas Jaeger + + * iconv/iconvconfig.c (name_insert): Make static to avoid warning. + +2001-07-23 Ulrich Drepper + + * locale/programs/locale.c (write_locales): Disable implicit + locking for the stream. Use feof_unlocked instead of feof. + + * sysdeps/unix/sysv/linux/i386/makecontext.S: Initialize %fs, %gs, + and floating-point status as well. + + * libio/iofclose.c (_IO_new_fclose): Unlink descriptor first to + avoid deadlock. + * libio/oldiofclose.c (_IO_old_fclose): Likewise. + * libio/genops.c (_IO_un_link): Get stream lock since it's not + always done in the caller. + (_IO_link_in): Likewise. + + * libio/genops.c (_IO_list_all_stamp): New variable. + (_IO_un_link): Bump _IO_list_all_stamp after removing from list. + (_IO_link): Likewise for insertion. + (flush_cleanup): New function. + (_IO_flush_all): Get list_all_lock and all individual locks for the + streams. Detect and handle changes to the _IO_list_all list. + (_IO_flush_all_linebuffered): Likewise. + * sysdeps/generic/bits/stdio-lock.h: Define + _IO_cleanup_region_start_noarg. + * sysdeps/mach/hurd/bits/stdio-lock.c: Likewise. + + * stdio-common/printf.h: Fix typo in comment. + + * iconv/gconv_cache.c (__gconv_lookup_cache): Handle encoding from + and to INTERNAL. + * iconv/iconvconfig.c: Create a special record for the INTERNAL + encoding name in the output file. + +2001-07-23 Jakub Jelinek + + * sunrpc/svc_tcp.c (svctcp_rendezvous_abort): New function. + (svctcp_rendezvous_op): Use it. + * sunrpc/svc_unix.c (svcunix_rendezvous_abort): New function. + (svcunix_rendezvous_op): Use it. + +2001-07-23 Andreas Schwab + + * math/Makefile (CPPFLAGS-test-ifloat.c, CPPFLAGS-test-idouble.c, + CPPFLAGS-test-ildoubl.c): Renamed from CFLAGS-*. + (math-CPPFLAGS): Set this instead of CPPFLAGS. + +2001-07-23 Ulrich Drepper + + * elf/elf.h: Add more definitions from Sun's latest version. + +2001-07-23 Stephen L Moshier + + * sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Return proper + sign for 0 input and set divide by zero exception for -1 input. + Return argument if NaN or infinity. + +2001-07-23 Andreas Jaeger + + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Add some deltas. + +2001-07-23 Ulrich Drepper + + * iconv/gconv_cache.c (__gconv_lookup_cache): Select correct + module for conversion direction. + +2001-07-23 Stephen L Moshier + + * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Return proper + sign for 0 input. Return NaN with no exception for NaN input. + +2001-07-23 Ulrich Drepper + + * iconv/gconv_builtin.h: ISO-106464/UTF-8/ transformation must + really be an alias. + +2001-07-23 Andreas Jaeger + + * iconv/iconvconfig.c: Include and use + __attribute_malloc__ for older GCC versions. + * iconv/strtab.c: Likewise. + Add prototypes to avoid warnings. + +2001-07-22 Roland McGrath + + * hurd/hurdsig.c (_hurd_internal_post_signal): Support SA_RESETHAND + and SA_NODEFER options. Spurred to action by Igor Khavkine. + + * sysdeps/generic/bits/sigaction.h [__USE_UNIX98 || __USE_MISC] + (SA_NODEFER, SA_RESETHAND): New macros, same bit values as FreeBSD. + [__USE_MISC] (SA_INTERRUPT): New macro, value 0. + [__USE_MISC] (SA_NOMASK, SA_ONESHOT, SA_STACK): New macros, aliases + as in other sysdeps versions of this file. + + * sysdeps/generic/bits/sigaction.h (struct sigaction): Use a union + and provide sa_handler and sa_sigaction member names as macros, as + done in other sysdeps versions of this file. + Suggested by Igor Khavkine . + +2001-07-23 Ulrich Drepper + + * posix/regex.c: Revamp memory allocation for WCHAR functions to + not use too much stack. + +2001-07-22 Ulrich Drepper + + * iconv/iconvconfig.c (write_output): Update comment explaining + output format. + + * elf/dl-load.c (_dl_dst_count): In SUID binaries expand $ORIGIN + if it is alone. + (_dl_dst_substitute): Likewise. + + * iconv/iconvconfig.c: Remove --verbose option. Comment out + mcheck_verbose call. + + * iconv/strtab.c (morememory): Fix little memory handling problem. + +2001-07-22 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Don't + mark asm input operand as clobbered. + * sysdeps/unix/sysv/linux/m68k/brk.c (__brk): Likewise. + +2001-07-22 Ulrich Drepper + + * iconv/gconv_builtin.c (struct builtin_map): Remove init and end + elements. + (BUILTIN_TRANSFORMATION): Remove Init and End parameters. + (__gconv_get_builtin_trans): Initialize __init_fct and __end_fct to + NULL. + * iconv/gconv_builtin.h: Remove NULL parameters for Init and End in + all BUILTIN_TRANSFORMATION calls. + * iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Remove Init and End + parameters. + * iconv/gconv_simple.c: Likewise. + * iconv/gconv_db.c (gen_steps): Internal converters don't have + initializers, move the code accordingly. + + * iconv/gconv_conf.c (__gconv_read_conf): Don't read configuration + file if STATIC_GCONV is defined. + + * iconv/gconv_conf.c (__gconv_path_envvar): New global variable. + (__gconv_get_path): Use it instead of call getenv. + (__gconv_read_conf): First see whether cache can be used. If yes, + don't do any work here. + * iconv/gconv_db.c (__gconv_release_step): Renamed from release_step + and exported. Change callers. + (__gconv_find_transform): First call __gconv_lookup_cache and only + continue if it signals no cache available. Remove some unnecessary + tests. + * iconv/gconv_int.h: Declare __gconv_path_envvar, __gconv_lookup_cache, + __gconv_release_step, and __gconv_loaded_cache. + * iconv/gconv_cache.c: New file. + * iconv/iconvconfig.c: New file. + * iconv/iconvconfig.h: New file. + * iconv/strtab.c: New file. + * iconv/Makefile: Add rules to build new files and programs. + +2001-07-20 Roland McGrath + + * sysdeps/generic/device-nrs.h (DEV_TTY_P): Change argument type + from `dev_t' (st_rdev value) `const struct stat *'. + * sysdeps/unix/sysv/linux/device-nrs.h (DEV_TTY_P): Likewise. + * libio/filedoalloc.c (_IO_file_doallocate): Change caller. + * sysdeps/mach/hurd/device-nrs.h: New file. + + * libio/stdio_ext.h: Moved to ... + * stdio-common/stdio_ext.h: ... here. + * libio/Makefile (headers): Move stdio_ext.h from here ... + * stdio-common/Makefile (headers): ... to here. + * include/stdio_ext.h: New file. + * stdio/Makefile (routines): Add the stdio_ext.h functions here. + * stdio/Versions (GLIBC_2.2.4): Export the stdio_ext.h functions. + * stdio/__flbf.c: New file. + * stdio/__fbufsize.c: New file. + * stdio/__fpending.c: New file. + * stdio/__fpurge.c: New file. + * stdio/__freadable.c: New file. + * stdio/__freading.c: New file. + * stdio/__fsetlocking.c: New file. + * stdio/__fwritable.c: New file. + * stdio/__fwriting.c: New file. + +2001-07-20 Ulrich Drepper + Andreas Jaeger + + * elf/ldconfig.c (search_dir): Avoid use of uninitialized memory. + Add a few __builtin_expect to mark unlikely error cases. + +2001-07-20 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Synch with kernel. + Patch by Daniel Jacobowitz . + +2001-07-19 Ulrich Drepper + + * intl/localealias.c: Remove unnecessary prototype. + + * Makefile: Add html goal. + * manual/Makefile: Likewise. + +2001-07-18 Ulrich Drepper + + * libio/filedoalloc.c (_IO_file_doallocate): A few more minor + cleanups and improvements. + +2001-07-18 Andreas Schwab + + * posix/regex.c (WORDCHAR_P) [WCHAR]: Also return true for the + underscore character. + +2001-07-18 Jakub Jelinek + + * malloc/malloc (new_heap): Don't call munmap for zero length. + +2001-07-18 Ulrich Drepper + + * libio/filedoalloc.c (_IO_file_doallocate): Use DEV_TTY_P if + available to determine whether descriptor is for tty before + calling isatty. + + * sysdeps/unix/sysv/linux/device-nrs.h: Define DEV_TTY_P. + * sysdeps/generic/device-nrs.h: Likewise. + +2001-07-18 Andreas Jaeger + + * time/Makefile (tst-getdate-ENV): Add TZDIR to environment. + + * time/Depend: New, add dependency on timezone. + + * time/tst-getdate.c: Add testcase for bug report by Hendrik + Uhlmann . + * time/datemsk: Likewise. + +2001-07-17 Ulrich Drepper + + * elf/ldconfig.c (parse_conf): Disable implicit locking for the + stream. Remove some unnecessary initializers. + +2001-07-17 Andreas Jaeger + + * elf/ldconfig.c: Add new variable hwcap_mask to honour LD_HWCAP_MASK. + (is_hwcap_platform): Use it. + (set_hwcap): New function to set hwcap_mask. + (main): Call set_hwcap. + +2001-07-17 Jakub Jelinek + + * time/getdate.c (__getdate_r): Initialize tm_isdst, tm_gmtoff and + tm_zone before calling strptime. + +2001-07-17 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/getpagesize.c: Fix last change. + +2001-07-17 Ulrich Drepper + + * inet/rcmd.c (iruserfopen): Disable implicit locking for the stream. + * inet/ruserpass.c (ruserpass): Likewise. + * nss/nsswitch.c (nss_parse_file): Likewise. + * resolv/res_hconf.c (_res_hconf_init): Likewise. + * resolv/res_init.c (__res_vinit): Likewise. + * gmon/bb_exit_func.c (__bb_exit_func): Likewise. + * misc/getpass.c (getpass): Likewise. + * misc/getusershell.c (initshells): Likewise. + * misc/getttyent.c (setttyent): Likewise. + * misc/mntent_r.c (__setmntent): Likewise. + * time/getdate.c (__getdate_r): Likewise. + * time/tzfile.c (__tzfile_read): Likewise. + * iconv/gconv_conf.c (read_conf_file): Likewise. + * intl/localealias.c (read_alias_file): Disable implicit locking + for the stream. Use _unlocked functions for glibc. + * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Disable + implicit locking for the stream. + (__get_nprocs_conf): Likewise. + (phys_pages_info): Likewise. + +2001-07-16 Ulrich Drepper + + * nscd/connections.c: Print messages caused by user application + only if debug_level > 0. Add little performance improvements. + Use TEMP_FAILURE_RETRY around write calls. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + +2001-07-13 H.J. Lu + + * sysdeps/mips/dl-machine.h (MAP_BASE_ADDR): Removed. + (elf_machine_got_rel): Defined only if RTLD_BOOTSTRAP is not defined. + (RESOLVE_GOTSYM): Rewrite to use RESOLVE. + + * sysdeps/mips/rtld-ldscript.in: Removed. + * sysdeps/mips/rtld-parms: Likewise. + * sysdeps/mips/mips64/rtld-parms: Likewise. + * sysdeps/mips/mipsel/rtld-parms: Likewise. + +2001-07-16 Ulrich Drepper + + * catgets/test-gencat.sh: Use <<"EOF" instead of < + + * sysdeps/posix/spawni.c: Fix typo when iterating over signal numbers. + +2001-07-16 Andreas Schwab + + * math/libm-test.inc (check_float_internal): Fix sign bit test of + infinities. + +2001-07-16 Jakub Jelinek + + * sysdeps/i386/fpu/e_expl.c (__ieee754_expl): Make it PIC friendly. + +2001-07-15 Ulrich Drepper + + * malloc/obstack.c: Define __attribute__ for non-gcc compilers. + Patch by Jim Meyering . + +2001-07-12 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h: Reorder + fields in the sigaction struct to match the definition in the kernel. + +2001-07-12 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Correct the + test for ENOSYS. + +2001-07-12 Martin Schwidefsky + + * sysdeps/s390/s390-32/bits/setjmp.h: Add leading underscores + to the entries in the __jmp_buf structure. + * sysdeps/s390/s390-64/bits/setjmp.h: Likewise. + +2001-07-12 Martin Schwidefsky + + * sysdeps/s390/s390-32/bcopy.S: Use mvcle for big blocks + (> 64K) and a mvc loop for small blocks. + * sysdeps/s390/s390-32/memcpy.S: Likewise. + * sysdeps/s390/s390-64/bcopy.S: Likewise. + * sysdeps/s390/s390-64/memcpy.S: Likewise. + +2001-07-15 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/sys/procfs.h: New file. + * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: New file. + + * sysdeps/unix/sysv/linux/m68k/getpagesize.c: Check _dl_pagesize + first. Default to 4096, not EXEC_PAGESIZE. + + * iconv/loop.c (put16) [!_STRING_ARCH_unaligned && BIG_ENDIAN]: + Fix index. + +2001-07-09 Andreas Jaeger + + * sysdeps/unix/sysv/linux/i386/dl-procinfo.c: Name entry for xmm2. + + * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Add HWCAP_I386_XMM, + HWCAP_I386_XMM2 to enum. + +2001-07-13 Andreas Jaeger + + * libio/fileops.c: Include unistd.h for lseek64 prototype. Closes + PR libc/2372. + +2001-07-12 Ulrich Drepper + + * Makeconfig: Add some more changes to handle AIX linker better. + +2001-07-12 H.J. Lu + + * sysdeps/generic/segfault.c: Include . + +2001-07-01 Andreas Jaeger + + * sysdeps/unix/sysv/linux/dl-sysdep.c (frob_brk): Remove duplicate + sbrk. Closes PR libc/2312. + +2001-07-01 Andreas Jaeger + + * sysdeps/generic/segfault.c (install_handler): Handle case that + the output file does not exists. Closes PR libc/2345. + +2001-07-11 Ulrich Drepper + + * intl/locale.alias: Use he language code for hebrew, not il + [PR libc/2382]. + +2001-07-11 Jakub Jelinek + + * iconv/gconv_int.h: Fix comment typo. + +2001-07-11 Igor Khavkine + + * hurd/hurdsig.c (_hurdsig_init): Remove a useless line of code. + +2001-07-07 Roland McGrath + + * hurd/hurdsig.c (_hurd_thread_sigstate): Use MACH_PORT_NULL, not 0. + +2001-07-10 Stephen L Moshier + + * sysdeps/ieee754/ldbl-128/e_acosl.c (__ieee754_acosl): Fix + backwards conditional in test for x == 1.0. + +2001-07-10 Andreas Jaeger + + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Add ulps for tanh + (-0.7). + +2001-07-09 Andreas Jaeger + + * sysdeps/unix/sysv/linux/configure.in: Revert patch from + 2001-07-05 for sysconfdir handling. + * config.make.in (sysconfdir): Likewise. + * configure.in: Likewise. + + * configure.in: Always assign libc_cv_sysconfdir. + +2001-07-08 Ulrich Drepper + + * Makerules [AIX] (build-shlib-helper): Precede linker options + with -Wl. + + * Makeconfig (config-LDFLAGS): Add ld.so only for ELF. + + * sysdeps/unix/make_errlist.c: Adjust sys_errlist declaration to + what we define in . + + * iconv/iconv_prog.c (main): Don't unconditionally define + variables only use if _POSIX_MAPPED_FILES is defined. + + * sysdeps/unix/sysv/aix/sendmsg.c (sendmsg): Fix return type. + * sysdeps/unix/sysv/aix/recvmsg.c (recvmsg): Likewise. + + * sysdeps/unix/sysv/aix/recv.c: New file. + + * sysdeps/unix/sysv/aix/recvfrom.c: Fix various types. + +2001-07-07 Ulrich Drepper + + * sysdeps/generic/recv.c: Fix return type. + + * sysdeps/unix/sysv/aix/dl-libc.c (__libc_dlclose): Fix typo. + + * sysdeps/unix/sysv/aix/gettimeofday.c (__gettimeofday): Add + declarations for asm functions. + + * include/libc-symbols.h: Provide more dummy definitions for the + case if GNU ld isn't used. + + * libio/freopen.c: Include for free declaration. + * libio/freopen64.c: Likewise. + + * sysdeps/alpha/fpu/libm-test-ulps: Add deltas for tanh(-0.7). + +2001-07-06 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/sigaction.c (RESTORE2): Put asm + explicitly into .text section. + +2001-04-16 Jes Sorensen + + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): + Add 16 longwords reserved for future use to match changes in the + kernel. + +2001-07-03 Jes Sorensen + + * sysdeps/ia64/strncpy.S: Call strnlen() when determining the + string length rather than strlen(). Solves the performance problem + of doing strlen on a 5MB string when strncpy was called with a + length argument of 5 bytes. + +2001-07-02 Jakub Jelinek + + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle + R_SPARC_UA16 and R_SPARC_UA32. + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. + +2001-07-01 Stephen L Moshier + + * sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): + acosh(x) = ln(2x) if x > 2^30. + * sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl): + acosh(x) = ln(2x) if x > 2^54. + +2001-07-07 Mark Kettenis + + * sysdeps/mach/hurd/i386/exc2signal.c (_hurd_exception2signal): + Generate SIGSEGV instead of SIGBUS for KERN_INVALID_ADDRESS and + KERN_WRITE_PROTECTION_FAILURE. + +2001-07-07 Ulrich Drepper + + * posix/regex.c: Limit string length printed in debug messages to + 100 chars. + + * configure.in: Don't warn about versioning if not on ELF system. + +2001-07-07 Andreas Jaeger + + * sysdeps/*: Put files from GNU MP Library under LGPL v2.1. + +2001-07-06 Ulrich Drepper + + * po/gl.po: Update from translation team. + +2001-07-06 Andreas Jaeger + + * sysdeps/unix/sysv/linux/configure.in: Fix handling of + sysconfdir. + + * manual/libc-texinfo.sh: Add note for the FDL. + + * manual/argp.texi (Argp Example 4): Fix texinfo warning. + + * manual/libc.texinfo: Regenerated. + + * manual/fdl.texi: Fix node. + + * config.make.in (sysconfdir): Replace correctly. + Closes PR libc/2369, reported by Peter Simons . + + * sysdeps/unix/sysv/linux/alpha/configure.in: Removed, it's no + longer needed. + + * sysdeps/unix/sysv/linux/configure.in (libc_cv_linuxVER): Add + case for alpha. + Rework handling of missing linuxthreads add-on. + + * configure.in: Remove unused sysconfdir substitution. + + * manual/Makefile (texis): Add fdl.texi. + * manual/fdl.texi: New. + * manual/socket.texi (Host Names): Improve grammar, fix overflow hbox. + * manual/libc.texinfo: Add fdl, update titlepage. + Patches by Brian Youmans <3diff@gnu.org>. + + * sysdeps/unix/make_errlist.c (main): Print LGPL v2.1 for + generated file. + +2001-07-06 Paul Eggert + + * manual/argp.texi: Remove ignored LGPL copyright notice; it's + not appropriate for documentation anyway. + * manual/libc-texinfo.sh: "Library General Public License" -> + "Lesser General Public License". + * COPYING: Fix Y2k bug in sample copyright notices. + * manual/lesser.texi: Renamed from manual/lgpl.texinfo, + as fsf.org uses the name "lesser.texi". + * manual/Makefile (texis): Follow rename. + +2001-07-06 Andreas Jaeger + + * All files under GPL/LGPL version 2: Place under LGPL version + 2.1. + +2001-07-05 Andreas Jaeger + + Synch with Linux 2.4.6: + * sysdeps/unix/sysv/linux/sparc/bits/socket.h (PF_BLUETOOTH): + New. + (AF_BLUETOOTH): New. + + * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h + (PF_BLUETOOTH): New. + (AF_BLUETOOTH): New. + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_BLUETOOTH): New. + (PF_BLUETOOTH): New. + + * sysdeps/unix/sysv/linux/ia64/bits/socket.h (AF_BLUETOOTH): New. + (PF_BLUETOOTH): New. + + * sysdeps/unix/sysv/linux/alpha/bits/socket.h (PF_BLUETOOTH): New. + (AF_BLUETOOTH): New. + + * sysdeps/unix/sysv/linux/bits/socket.h (PF_BLUETOOTH): New. + (AF_BLUETOOTH): New. + + * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_IEEE80211): New. + + * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (N_HCI): New. + + * sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h (N_HCI): New. + + * sysdeps/unix/sysv/linux/bits/ioctl-types.h (N_HCI): New. + +2001-07-04 Roland McGrath + + * hurd/hurdsig.c (_hurd_internal_post_signal): For SS->suspended + wakeup message, use MACH_MSG_TYPE_MAKE_SEND for the receiver port + rather than doing a mach_port_insert_right call first. + +2001-06-26 Roland McGrath + + * hurd/hurdioctl.c: Include for memcpy decl. + +2001-07-03 Andreas Jaeger + + * sysdeps/unix/sysv/sysv4/solaris2/configure.in: Remove check for + crypt add-on. + +2001-07-01 Mark Kettenis + + * sysdeps/mach/hurd/if_index.c: Redone to use new interfaces in + the Hurd pfinet server, using equivalent code from the Linux + version in sysdeps/unix/sysv/linux/if_index.c. In detail: + Include , , , and + . Don't include and + anymore. + (if_nametoindex): New implementation using SIOCGIFINDEX. + (if_freenameindex): Straight copy of the Linux version. + (if_nameindex): New implementation based on pfinet_siocgifconf and + SIOCGIFINDEX. + (if_indextoname): New implementation using SIOCGIFNAME. + (map_interfaces): Function removed. + From Marcus Brinkmann . + +2001-06-30 Jakub Jelinek + + * sysdeps/powerpc/dl-machine.c (__elf_preferred_address): Prefer + gaps below main executable. + +2001-06-19 Andreas Jaeger + + * sysdeps/powerpc/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): + Handle profiling. + +2001-06-29 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/s_asinhl.c: New file. + Patch by Stephen L Moshier . + +2001-06-28 Ulrich Drepper + + * manual/argp.texi: Tons of cleanups. + Patch by Clifford U. Smith . + +2001-06-28 Mark Kettenis + + * manual/users.texi (Setting Groups): Correct initgroups + documentation. Add documentation for getgrouplist. + +2001-06-28 H.J. Lu + + * locale/findlocale.c (locale_file_list): Renamed to ... + (_nl_locale_file_list): This. Make it extern. + (free_mem): Move to ... + * locale/setlocale.c (free_mem): Here. + +2001-06-28 Mark Kettenis + + * sysdeps/mach/hurd/read.c: Include . + (__libc_read): Don't call __pread. Use _hurd_fd_read directly + instead. + * sysdeps/mach/hurd/write.c: Include . + (__libc_write): Don't call __pwrite. Use _hurd_fd_write directly + instead. + + * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Add back + -Wl,-soname option lost in 2001-06-16 change. + +2001-06-27 Ulrich Drepper + + * posix/tst-regex.c: Pass REG_NEWLINE to regcomp. Add extra tests. + Restrict printing of string in debug mode to 100 characters to make + the output useful for long input texts. + + * posix/Makefile: Add rules to build and run tst-regex. + +2001-06-20 Isamu Hasegawa + + * posix/regex.c (FREE_WCS_BUFFERS): New macro to free buffers. + (re_search_2): Invoke convert_mbs_to_wcs and FREE_WCS_BUFFERS. + (wcs_re_match_2_internal): Check whether the wcs buffers need + seting up or not, and skip seting up routin if not needed. + +2001-06-26 Isamu Hasegawa + + * posix/regex.c (count_mbs_length): Use binary search for optimization. + +2001-06-27 Ulrich Drepper + + * posix/tst-regex.c: Fix several bugs. Add more tests. + +2001-06-26 Mark Kettenis + + * hurd/Makefile (user-interfaces): Add pfinet. + * hurd/hurdioctl.c: Include , and + . + (siocgifconf): New function. Register it with HURD_HANDLE_IOCTL + as the handler for SIOCGIFCONF. + * sysdeps/mach/hurd/bits/ioctls.h: Modify SIOCSIFFLAGS and + SIOCGIFFLAGS to be of IOC type ifreq_short. Modify SIOCSIFMETRIC + and SIOCGIFMETRIC to be of IOC type ifreq_int. Add new macro + definitions for SIOCGIFMTU, SIOCSIFMTU, SIOCGIFINDEX and + SIOCGIFNAME. + From Marcus Brunkmann . + +2001-06-25 Ulrich Drepper + + * sysdeps/gnu/net/if.h: Correct _IOT_ifreq and add _IOT_ifreq_short + and _IOT_ifreq_int. Patch by Mark Kettenis . + + * elf/dl-deps.c (_dl_map_object_deps): Fix handling of failing + _dl_catch_error calls. + +2001-06-22 Jakub Jelinek + + * posix/regex.c (regex_compile, re_match_2_internal): Fix comment + typos. + +2001-06-01 Wolfram Gloger + + * malloc/malloc.c (malloc_atfork, free_atfork): Use a unique value + ATFORK_ARENA_PTR, not 0, for the thread-specific arena pointer + when malloc_atfork is in use. + +2001-06-22 Andreas Jaeger + + * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Add parenthese + to avoid warnings. + + * sysdeps/i386/fpu/e_expl.c (__ieee754_expl): Remove unused + variable. + Add unused attributes to avoid warnings. + + * elf/reldep4mod4.c: Add prototype to avoid warning. + * elf/reldep4mod2.c: Likewise. + + * sysdeps/i386/fpu/e_expl.c: Include for + prototypes. + +2001-06-18 Roland McGrath + + * hurd/hurd/fd.h (_hurd_fd_error_signal): Change return type to int. + +2001-06-20 Alexandre Oliva + + * sysdeps/unix/sysv/settimeofday.c: Include time.h. + +2001-06-19 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h: New file. + +2001-05-09 Michael Keezer + + * Makeconfig: Added AIX-ld support for DSO. + * Makerules: Likewise. + * dlfcn/Makefile (defaultmod1.so): Added libc_nonshared. + (defaultmod2.so): Likewise. + * debug/Makefile: Conditionalize use of elf/ld.so. + * iconvdata/Makefile: Moved LDFLAG rpath/soname info into Makeconfig. + + * sysdeps/unix/sysv/aix/Makefile: Added dl-support.c and dl-error.c. + * sysdeps/unix/sysv/aix/Makefile: Made (f/g)rsave(0/1) & + (f/g)prrest(0/1) static only. + * sysdeps/unix/sysv/aix/gettimeofday.c: Removed #if 0. + * sysdeps/unix/sysv/aix/start.c: Define __dso_handle if not ELF but + shared. + * sysdeps/unix/sysv/aix/setitimer.c: New file. + * sysdeps/unix/sysv/aix/sleep.c: New file. + * sysdeps/unix/sysv/aix/usleep.c: New file. + * sysdeps/unix/sysv/aix/dl-addr.c: New file. + * sysdeps/unix/sysv/aix/dl-error.c: New file. + * sysdeps/unix/sysv/aix/dl-support.c: New file. + * sysdeps/unix/sysv/aix/powerpc/register-dump.h: New file. + +2001-06-19 Ulrich Drepper + + * po/es.po: Update from translation team. + +2001-06-19 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/s_tanhl.c: New file. + + * math/libm-test.inc (tanh_test): Test for 2^-56. + + * sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Make sure result + equals argument when x < 2^-55. + Patches by Stephen L. Moshier . + +2001-06-17 Alan Modra + + * sysdeps/hppa/dl-machine.h (elf_machine_rela): Handle relocs + at unaligned address. + +2001-06-18 Ulrich Drepper + + * posix/regex.c: Reorganize code to build code twice, once for single + byte, once for multi-byte charsets. Choose function set adequate for + locale at runtime. + Patch by Isamu Hasegawa . + + * po/nl.po: Update from translation team. + +2001-06-09 Bruno Haible + + * iconvdata/gconv-modules (BIG5HKSCS): New alias BIG5-HKSCS. + (ISO-8859-14): New aliases ISO_8859-14 and ISO-CELTIC. + * iconvdata/tst-tables.sh: For BIG5HKSCS, use BIG5-HKSCS charmap. + +2001-05-26 Bruno Haible + + * iconvdata/tst-tables.sh: For SJIS module, use SHIFT_JIS charmap. + * manual/charset.texi: Write Shift_JIS, not Shift-JIS. + +2001-06-17 Roland McGrath + + * sysdeps/pthread/aio_misc.h (LIO_DSYNC): Define to LIO_NOP + 1, + not LIO_READ + 1 (which is the value of LIO_WRITE!). + + * Makerules (build-module-helper-objlist): New variable, + broken out of build-module. Insert --whole-archive/--no-whole-archive + immediately each *_pic.a file in the link object list. + (whole-archive): New variable, used by that. + (build-module-objlist): New variable using build-module-helper-objlist. + (build-module, build-module-helper): Use it. + (build-shlib-objlist): New variable using build-module-helper-objlist. + (build-shlib): Use that. + * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Likewise. + + * posix/spawni.c: Moved to ... + * sysdeps/posix/spawni.c: ... here. + * sysdeps/generic/spawni.c: New file. + +2001-06-16 Roland McGrath + + * hurd/Makefile (routines): Add lookup-retry. + * hurd/hurdlookup.c (__hurd_file_name_lookup_retry): Broken out ... + * hurd/lookup-retry.c: ... into here, new file. + * sysdeps/mach/hurd/dl-sysdep.c (open_file): Call that instead + using of duplicate code here. + + * hurd/hurdexec.c (_hurd_exec): Be robust for DTABLESIZE==0. + +2001-06-17 Ulrich Drepper + + * po/ja.po: Update from translation team. + +2001-06-04 Bruno Haible + + * locale/programs/locfile.c (siblings_uncached, siblings, full_read, + compare_files): New functions. + (write_locale_data): Use xmalloc. Compare the file with the locale + data files for the same category in other locales, and reuse it if + possible and safe. + +2001-06-07 Mark Kettenis + + * grp/initgroups.c (initgroups): Factor out re-usable code into... + (internal_getgrouplist): ... new function. + (getgrouplist): New function. + * grp/grp.h (getgrouplist): New prototype. + * grp/Versions [2.2.4]: Add getgrouplist. + +2001-06-16 Ulrich Drepper + + * inet/netinet/ip6.h: Fix comments in ip6_hdr. + Patch by Pekka Savola . + +2001-06-15 Roland McGrath + + * rt/Makefile (aio-routines, clock-routines, timer-routines): New + variables, broken out of librt-routines. + (librt-routines): Set using those. + (extra-libs, extra-libc-others, tests): Set these unconditionally. + (distribute): No need for $(librt-map) or $(librt-routines:=.c) here. + * sysdeps/generic/aio_fsync.c: New file. + * sysdeps/generic/aio_misc.c: New file. + * sysdeps/generic/aio_write.c: New file. + * sysdeps/generic/aio_write64.c: New file. + * sysdeps/generic/aio_read64.c: New file. + * sysdeps/generic/aio_read.c: New file. + * sysdeps/generic/aio_notify.c: New file. + * sysdeps/generic/lio_listio64.c: New file. + * sysdeps/generic/lio_listio.c: New file. + * sysdeps/generic/aio_cancel.c: New file. + * sysdeps/generic/aio_misc.h: New file. + * sysdeps/generic/aio_suspend.c: New file. + * rt/aio_cancel.c: Moved to ... + * sysdeps/pthread/aio_cancel.c: ... here. + * rt/aio_fsync.c: Moved to ... + * sysdeps/pthread/aio_fsync.c: ... here. + * rt/aio_misc.c: Moved to ... + * sysdeps/pthread/aio_misc.c: ... here. + * rt/aio_misc.h: Moved to ... + * sysdeps/pthread/aio_misc.h: ... here. + * rt/aio_notify.c: Moved to ... + * sysdeps/pthread/aio_notify.c: ... here. + * rt/aio_read.c: Moved to ... + * sysdeps/pthread/aio_read.c: ... here. + * rt/aio_read64.c: Moved to ... + * sysdeps/pthread/aio_read64.c: ... here. + * rt/aio_suspend.c: Moved to ... + * sysdeps/pthread/aio_suspend.c: ... here. + * rt/aio_write.c: Moved to ... + * sysdeps/pthread/aio_write.c: ... here. + * rt/aio_write64.c: Moved to ... + * sysdeps/pthread/aio_write64.c: ... here. + * rt/lio_listio.c: Moved to ... + * sysdeps/pthread/lio_listio.c: ... here. + * rt/lio_listio64.c: Moved to ... + * sysdeps/pthread/lio_listio64.c: ... here. + +2001-06-14 Roland McGrath + + * configure.in: Let sysdeps Implies files in add-ons bring in + sysdeps directories from the main source and other add-ons too. + +2001-06-15 Jakub Jelinek + + * math/test-misc.c (main): Add tests for nextafter and nexttoward + with +-Inf as second argument. + + * sysdeps/generic/s_nexttowardf.c (__nexttowardf): Only check for + NaN, not Inf. + * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Fix check for NaN. + * sysdeps/i386/fpu/s_nexttoward.c: New. + * sysdeps/i386/fpu/s_nexttowardf.c: New. + * sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Simplify + check for NaN, optimize x==+-0 handling. + * sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf): Likewise. + * sysdeps/ieee754/ldbl-96/s_nextafterl.c (__nextafterl): Simplify + check for NaN, fix sign in x==+-0 case. + * sysdeps/ia64/fpu/s_nexttoward.c: New. + * sysdeps/ia64/fpu/s_nexttowardf.c: New. + +2001-06-15 H.J. Lu + + * rt/tst-aio2.c (do_test): Initialize cb.aio_offset to 0. + * rt/tst-aio3.c (do_test): Likewise. + * rt/tst-aio4.c (do_test): Likewise. + * rt/tst-aio5.c (do_test): Likewise. + * rt/tst-aio6.c (do_test): Likewise. + +2001-06-15 Andreas Schwab + + * sysdeps/m68k/fpu/bits/mathinline.h: Don't define log2 as inline. + * sysdeps/m68k/fpu/mathimpl.h: Define __ieee754_log2 as inline. + +2001-06-15 Andreas Jaeger + + * gmon/tst-sprofil.c (fac): Make static to avoid compiler warning. + +2001-06-14 Andreas Schwab + + * elf/ldconfig.c (search_dir): Fix check for regular file. + + * sysdeps/m68k/fpu/e_log2f.c: Fix typo. + * sysdeps/m68k/fpu/e_log2l.c: Fix typo. + +2001-06-14 Roland McGrath + + * sysdeps/mach/hurd/bits/fcntl.h [ __USE_POSIX199309 || __USE_UNIX98]: + (O_DSYNC, O_RSYNC): New macros, both defined to O_SYNC as Linux does. + +2001-06-13 Roland McGrath + + * rt/aio_notify.c: Include for _POSIX_REALTIME_SIGNALS. + + * sysdeps/mach/hurd/fork.c (LOSE): Put `goto lose' in dead code + so the label is not considered unused. + + * sysdeps/mach/hurd/pwrite64.c: New file. + * sysdeps/mach/hurd/pread64.c: New file. + + * sysdeps/mach/hurd/pread.c + (__libc_pread): Define this name, with __pread as an alias. + * sysdeps/mach/hurd/pwrite.c + (__libc_pwrite): Define this name, with __pwrite as an alias. + + Implement POSIX "shared memory objects" as regular + files residing in the /var/run/shm/ directory. + This works on any system that supports _POSIX_MAPPED_FILES, + to make it also support _POSIX_SHARED_MEMORY_OBJECTS. + * sysdeps/posix/shm_open.c: New file. + * sysdeps/posix/shm_unlink.c: New file. + * sysdeps/mach/hurd/bits/posix_opt.h + (_POSIX_SHARED_MEMORY_OBJECTS): Define it. + + * rt/aio_notify.c (__aio_notify_only) [! _POSIX_REALTIME_SIGNALS]: + Use raise instead of __aio_sigqueue. + + * sysdeps/mach/hurd/pread.c: Fail with EINVAL if OFFSET is negative. + * sysdeps/mach/hurd/pwrite.c: Likewise. + + * shlib-versions [USE_IN_LIBIO] (.*-.*-gnu-gnu.*): libc=0.3 + [USE_IN_LIBIO && !GLIBC_OLDEST_ABI] (.*-.*-gnu-gnu.*): Use GLIBC_2.2.4 + as default version set. + +2001-06-13 Ulrich Drepper + + * libio/iolibio.h (_IO_freopen): Correct last parameter to + _IO_file_open. + (_IO_freopen64): Likewise. + Reported by simanek@quantum.karlov.mff.cuni.cz [PR libc/2326]. + + * elf/elf.h: Add a few more EM_* constants. + +2001-06-12 Bruno Haible + + * intl/dcigettext.c (DCIGETTEXT): Release the lock before returning. + +2001-06-09 Ben Collins + + * sysdeps/unix/sysv/linux/bits/termios.h: Define __MAX_BAUD. + * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise. + * sysdeps/unix/sysv/linux/speed.c: Use __MAX_BAUD instead of + hardcoded B400000. + +2001-06-13 Ulrich Drepper + + * time/sys/time.h: Don't use enum __itimer_which ever for + __itimer_which_t for C++. + Reported by Martin Buchholz . + + * po/fr.po: Update from translation team. + +2001-06-12 H.J. Lu + + * configure.in: Fix typos in missing program names. + * configure: Regenerated. + +2001-06-12 Andreas Jaeger + + * iconvdata/tst-table-to.c: Include string.h for strcmp prototype. + + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Add ULPs for tanh (-0.7). + +2001-06-11 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/e_coshl.c: New file. Contributed by + Stephen L Moshier . + + * aclocal.m4: Quote AC_FD_MSG and AC_FD_CC. + + * sysdeps/powerpc/fpu/libm-test-ulps: Add ULPs for tanh (-0.7). + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + +2001-06-11 Michael Deutschmann + + * rt/tst-aio4.c (do_test): Test whether rt signals are supported. + Use my_signo instead of MY_SIGNO and initialize it so that the + used signal is always available. + +2001-06-11 Andreas Jaeger , + Michael Deutschmann + + * io/test-lfs.c (do_prepare): Clean up error messages. + (test_ftello): Check for EFBIG and ENOSPC, clean up error messages. + (do_test): Likewise. + +2001-06-11 Andreas Jaeger + + * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (IXANY, IUCLC, + IMAXBEL): Make always visible since they're needed by POSIX. + Closes PR libc/2320, reported by Chris Yeoh . + +2001-06-10 Ben Collins + + * sysdeps/arm/elf/start.S: Use #function, not @function, for + .type of _start. + + * sysdeps/ieee754/ldbl-128/s_ilogbl.c: Include limits.h to get + INT_MAX. + +2001-06-07 H.J. Lu + + * sunrpc/rpc/rpc.h: Add __BEGIN_DECLS/__END_DECLS. + +2001-06-10 Roland McGrath + + * elf/reldep4mod2.c: Use fully typed decls to avoid warnings. + * elf/reldep4mod4.c: Likewise. + +2001-06-10 Mark Kettenis + + * hurd/hurd/threadvar.h: Add prototype for __hurd_errno_location. + +2001-06-08 Andreas Schwab + + * posix/regex.c (re_match_2_internal) [case wordbeg, wordend]: + Don't dereference at end of string. + +2001-06-06 Roland McGrath + + * sysdeps/mach/hurd/getsockopt.c: Fix handling of returned buffer size. + From Robert Bihlmeyer . + +2001-06-06 Ulrich Drepper + + * po/ko.po: Update from translation team. + +2001-06-06 Andreas Jaeger + + * manual/llio.texi (Memory-mapped I/O): Clarify that mapping is to + offset+length-1. + Reported by Robert Bernecky . + +2001-06-06 Jakub Jelinek + + * sysdeps/cris/elf/start.S: Fix a typo introduced by last patch. + * sysdeps/ia64/elf/start.S: Likewise. + * sysdeps/sh/elf/start.S: Likewise. + * sysdeps/s390/s390-32/elf/start.S: Likewise. + * sysdeps/s390/s390-64/elf/start.S: Likewise. + +2001-06-05 Matthew Wilcox + + * sysdeps/hppa/bsd-_setjmp.S: New. + * sysdeps/hppa/bsd-setjmp.S: New. + + * sysdeps/hppa/dl-machine.h: Reformat asm statements to remove new + gcc warnings about multi-line strings. + + * sysdeps/unix/sysv/linux/hppa/getrlimit.c: Remove. + * sysdeps/unix/sysv/linux/hppa/setrlimit.c: Remove. + + * sysdeps/unix/sysv/linux/hppa/syscalls.list: Call getrlimit, + setrlimit directly instead of using wrappers. + +2001-05-01 Richard Hirst + + * sysdeps/unix/sysv/linux/hppa/syscall.S: remove dummy syscall. + * sysdeps/unix/sysv/linux/hppa/sysdep.c: implement syscall. + +2001-06-05 Philipp Thomas + + * nis/nis_call.c (__nisbind_connect): Don't mark for translation + what can't be translated. + +2001-06-06 Ulrich Drepper + + * timezone/zic.c: Update from tzcode2001c. + * timezone/private.h: Likewise. + * timezone/africa: Update from tzdata2001c. + * timezone/asia: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/zone.tab: Likewise. + +2001-06-04 Bruno Haible + + * iconv/loop.c (UNICODE_TAG_HANDLER): New macro. + * iconv/gconv_simple.c (__gconv_transform_internal_ascii): Invoke + UNICODE_TAG_HANDLER. + (__gconv_transform_internal_ucs2): Likewise. + (__gconv_transform_internal_ucs2reverse): Likewise. + * iconvdata/8bit-gap.c (BODY for TO_LOOP): Invoke UNICODE_TAG_HANDLER. + * iconvdata/8bit-generic.c (BODY for TO_LOOP): Likewise. + * iconvdata/ansi_x3.110.c (BODY for TO_LOOP): Likewise. + * iconvdata/big5.c (BODY for TO_LOOP): Likewise. + * iconvdata/big5hkscs.c (BODY for TO_LOOP): Likewise. + * iconvdata/cp1255.c (BODY for TO_LOOP): Likewise. + * iconvdata/cp1258.c (BODY for TO_LOOP): Likewise. + * iconvdata/euc-cn.c (BODY for TO_LOOP): Likewise. + * iconvdata/euc-jp.c (BODY for TO_LOOP): Likewise. + * iconvdata/euc-kr.c (BODY for TO_LOOP): Likewise. + * iconvdata/euc-tw.c (BODY for TO_LOOP): Likewise. + * iconvdata/gbk.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm930.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm932.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm933.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm935.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm937.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm939.c (BODY for TO_LOOP): Likewise. + * iconvdata/ibm943.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso646.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso8859-1.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso_6937.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso_6937-2.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso-2022-cn.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso-2022-cn-ext.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso-2022-kr.c (BODY for TO_LOOP): Likewise. + * iconvdata/johab.c (BODY for TO_LOOP): Likewise. + * iconvdata/sjis.c (BODY for TO_LOOP): Likewise. + * iconvdata/t.61.c (BODY for TO_LOOP): Likewise. + * iconvdata/uhc.c (BODY for TO_LOOP): Likewise. + * iconvdata/unicode.c (BODY for TO_LOOP): Likewise. + * iconvdata/iso-2022-jp.c (TAG_none, TAG_language, TAG_language_j, + TAG_language_ja, TAG_language_k, TAG_language_ko, TAG_language_z, + TAG_language_zh, CURRENT_TAG_MASK): New enum values. + (EMIT_SHIFT_TO_INIT): Don't emit an escape sequence if ASCII_set + is already selected but set2 or tag are set. + (conversion): New enum type. + (cvlist_t): New type. + (CVLIST, CVLIST_FIRST, CVLIST_REST): New macros. + (conversion_lists): New array. + (BODY for TO_LOOP): Keep track of Unicode 3.1 language tag. If "ja", + prefer conversion to Japanese character sets. If "zh", prefer + conversion to GB2312. If "ko", prefer conversion to KSC5601. Small + optimizations. + (INIT_PARAMS): Add tag. + (UPDATE_PARAMS): Add tag. + +2001-06-04 Bruno Haible + + * locale/programs/locfile.c (write_locale_data): Before creat(), + unlink the file, to avoid crashing the processes that mmap it. Change + a double slash to a single slash. Free fname in case of error return. + +2001-06-02 Jakub Jelinek + + * sysdeps/i386/fpu/s_frexpl.S (__frexpl): Mostly revert 2000-12-03 + changes, do the special handling for denormal numbers, not for + normalized numbers (patch by ). + + * math/test-misc.c (main): Test frexpl with denormal arguments. + +2001-06-04 Jakub Jelinek + + * math/libm-test.inc (llround_test): Add two new llround tests. + * sysdeps/ieee754/ldbl-96/s_llroundl.c (__llroundl): Don't allow + overflow when rounding away from zero. + +2001-06-04 Jakub Jelinek + + * math/Makefile (libm-calls): Add e_log2, w_log2, remove s_log2. + * math/math_private.h (__ieee754_log2, __ieee754_log2f, + __ieee754_log2l): New prototypes. + * sysdeps/generic/w_log2.c: New file. + * sysdeps/generic/w_log2f.c: New file. + * sysdeps/generic/w_log2l.c: New file. + * sysdeps/generic/s_log2l.c: Move... + * sysdeps/generic/e_log2l.c: ...to here. Rename to __ieee754_log2l. + * sysdeps/ieee754/k_standard.c (__kernel_standard): Handle log2(0) + and log2(x < 0). + * sysdeps/i386/fpu/s_log2.S: Move... + * sysdeps/i386/fpu/e_log2.S: ...to here. Rename to __ieee754_log2. + * sysdeps/i386/fpu/s_log2f.S: Move... + * sysdeps/i386/fpu/e_log2f.S: ...to here. Rename to __ieee754_log2f. + * sysdeps/i386/fpu/s_log2l.S: Move... + * sysdeps/i386/fpu/e_log2l.S: ...to here. Rename to __ieee754_log2l. + * sysdeps/m68k/fpu/s_log2.c: Move... + * sysdeps/m68k/fpu/e_log2.c: ...to here. Rename to __ieee754_log2. + * sysdeps/m68k/fpu/s_log2f.c: Move... + * sysdeps/m68k/fpu/e_log2f.c: ...to here. Rename to __ieee754_log2f. + * sysdeps/m68k/fpu/s_log2l.c: Move... + * sysdeps/m68k/fpu/e_log2l.c: ...to here. Rename to __ieee754_log2l. + * sysdeps/ieee754/dbl-64/s_log2.c: Move... + * sysdeps/ieee754/dbl-64/e_log2.c: ...to here. Rename to + __ieee754_log2. + * sysdeps/ieee754/flt-32/s_log2f.c: Move... + * sysdeps/ieee754/flt-32/e_log2f.c: ...to here. Rename to + __ieee754_log2f. + +2001-06-04 Jakub Jelinek + + * sysdeps/generic/w_exp2.c (u_threshold): Lower threshold so that + even arguments which result in denormalized exp2 are accepted. + (__exp2): Arguments equal to u_threshold already result into + underflow. + * sysdeps/generic/w_exp2f.c (u_threshold, __exp2f): Likewise. + * sysdeps/generic/w_exp2l.c (u_threshold, __exp2l): Likewise. + * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Lomark was too + low, with corrected lowmark use greaterequal, not greater. + * sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise. + +2001-06-04 Jakub Jelinek + + * math/libm-test.inc (ilogb_test): Test that ilogb(+-Inf) == INT_MAX. + * sysdeps/i386/fpu/s_ilogb.S (__ilogb): Return INT_MAX for +-Inf. + * sysdeps/i386/fpu/s_ilogbf.S (__ilogbf): Likewise. + * sysdeps/i386/fpu/s_ilogbl.S (__ilogbl): Likewise. + * sysdeps/ieee754/dbl-64/s_ilogb.c (__ilogb): Likewise. + * sysdeps/ieee754/flt-32/s_ilogbf.c (__ilogbf): Likewise. + * sysdeps/ieee754/ldbl-128/s_ilogbl.c (__ilogbl): Likewise. + * sysdeps/ieee754/ldbl-96/s_ilogbl.c (__ilogbl): Likewise. + +2001-06-04 Jakub Jelinek + + * sysdeps/generic/w_coshl.c (__coshl): Test if finite argument + gave non-finite result instead of using constant in generic + version. + * sysdeps/generic/w_coshf.c (__coshf): Likewise. + * sysdeps/generic/w_cosh.c (__cosh): Likewise. + * sysdeps/generic/w_exp10.c (o_threshold, u_threshold): Remove. + (__exp10): Test if finite argument gave non-finite result. + * sysdeps/generic/w_exp10f.c (o_threshold, u_threshold, __exp10f): + Likewise. + * sysdeps/generic/w_exp10l.c (o_threshold, u_threshold, __exp10l): + Likewise. + +2001-06-04 Jakub Jelinek + + * sysdeps/ieee754/ldbl-96/e_coshl.c (__ieee754_coshl): Fix + overflow threshold constant (log(LDBL_MAX)+M_LN2l). + +2001-05-29 Bruno Haible + + * locale/programs/ld-ctype.c (idx_table): New struct type. + (idx_table_init, idx_table_get, idx_table_add): New functions. + (MAX_CHARNAMES_IDX): Remove macro. + (locale_ctype_t): Change type of charnames_idx field. + (ctype_startup): Change initialization of charnames_idx field. + (find_idx): Use idx_table_get and idx_table_add for speed. + + * locale/programs/charmap.c (charmap_new_char): Fix ucs4 value + computation of characters in a range. + +2001-05-29 Bruno Haible + + * iconvdata/gb18030.c (__fourbyte_to_ucs1): Add mappings for , + . + (__ucs_to_gb18030_tab1): Likewise. + (BODY for FROM_LOOP): Add mapping for ... + (BODY for TO_LOOP): Likewise. + * iconvdata/tst-table-charmap.sh: Update for charmaps containing + syntax. + * iconvdata/tst-table-from.c (bmp_only): New variable. + (utf8_decode): If bmp_only, don't return characters outside Unicode + plane 0. + (main): When testing UTF-8 or GB18030, set bmp_only to 1. Don't print + a conversion line if utf8_decode returns NULL. + * iconvdata/tst-table-to.c (main): When testing encodings other than + UTF-8 and GB18030, loop upto U+30000 instead of U+10000. Use UTF-8 + instead of UCS-2 as input. + * iconvdata/tst-table.sh: For GB18030, use only the part < 0x10000 + of the charmap. + +2001-05-29 Bruno Haible + + * iconvdata/cns11643l1.c: Update to Unicode 3.1. + (__cns11643l1_to_ucs4_tab): Regenerated. + (__cns11643l1_from_ucs4_tab12): Regenerated. + * iconvdata/cns11643.c: Update to Unicode 3.1. + (__cns11643l14_to_ucs4_tab): Remove array. + (__cns11643l3_to_ucs4_tab, __cns11643l4_to_ucs4_tab, + __cns11643l5_to_ucs4_tab, __cns11643l6_to_ucs4_tab, + __cns11643l7_to_ucs4_tab, __cns11643l15_to_ucs4_tab): New arrays. + (__cns11643_from_ucs4p0_tab): Renamed from __cns11643_from_ucs4_tab. + (__cns11643_from_ucs4p2_tab): New array. + * iconvdata/cns11643.h (__cns11643l14_to_ucs4_tab): Remove declaration. + (__cns11643l3_to_ucs4_tab, __cns11643l4_to_ucs4_tab, + __cns11643l5_to_ucs4_tab, __cns11643l6_to_ucs4_tab, + __cns11643l7_to_ucs4_tab, __cns11643l15_to_ucs4_tab): New declarations. + (cns11643_to_ucs4): Treat planes 3, 4, 5, 6, 7, 15 instead of 14. + (__cns11643_from_ucs4_tab): Remove declaration. + (__cns11643_from_ucs4p0_tab, __cns11643_from_ucs4p2_tab): New + declarations. + (ucs4_to_cns11643): Update for new arrays. Treat U+3400..U+4DFF and + U+20000..U+2A6D6. + * iconvdata/cns11643l2.h (__cns11643_from_ucs4_tab): Remove + declaration. + (__cns11643_from_ucs4p0_tab): New declaration. + (ucs4_to_cns11643l2): Update for new arrays. + * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): Handle planes + 3 to 7. + (BODY for TO_LOOP): Handle planes 3 to 7, instead of plane 14. + * iconvdata/EUC-TW.irreversible: New file. + * iconvdata/tst-table.sh: Use it. + * iconvdata/Makefile (distribute): Add CP1255.irreversible, + CP1258.irreversible, EUC-TW.irreversible. + +2001-05-29 Bruno Haible + + * locale/C-translit.h.in: Add transliterations for new Unicode 3.1 + mathematical symbols. + +2001-06-05 Andreas Jaeger + + * manual/stdio.texi (Portable Positioning): Fix description of + fpos_t and fpos64_t. + +2001-06-06 Ulrich Drepper + + * sysdeps/generic/wordexp.c: Undo last patch. Use strndupa instead. + + * po/sk.po: Update from translation team. + +2001-06-05 Andreas Jaeger + + * sysdeps/unix/sysv/linux/shm_open.c (where_is_shmfs): Recognize + tmpfs, patch by Stanislav Brabec . + Closes PR libc/2315. + +2001-06-05 Ulrich Drepper + + * sysdeps/generic/wordexp.c: Add missing free. + Patch by yeti@physics.muni.cz. + +2001-06-02 Tom Browder + + * misc/tst-tsearch.c (mangle_tree): Ensure array indices are + within bounds when lag > 0. + +2001-06-05 Ulrich Drepper + + * po/tr.po: New file. + +2001-06-05 Andreas Jaeger + + * manual/libm-err-tab.pl (parse_ulps): Fix typo. + +2001-06-04 H.J. Lu + + * sysdeps/alpha/elf/start.S: Add .type for the entry point. + * sysdeps/arm/elf/start.S: Likewise. + * sysdeps/hppa/elf/start.S: Likewise. + * sysdeps/i386/elf/start.S: Likewise. + * sysdeps/m68k/elf/start.S: Likewise. + * sysdeps/mips/elf/start.S: Likewise. + * sysdeps/ia64/elf/start.S: Likewise. + * sysdeps/sh/elf/start.S: Likewise. + * sysdeps/s390/s390-32/elf/start.S: Likewise. + * sysdeps/s390/s390-64/elf/start.S: Likewise. + * sysdeps/cris/elf/start.S: Likewise. + +2001-06-04 Bruce Mitchener + + * manual/resource.texi: Correct setpriority/nice documentation. + + * sysdeps/unix/nice.c: Correct nice() implementation. + +2001-06-04 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/e_sinhl.c: New file, contributed by + Stephen L Moshier . + +2001-06-03 Roland McGrath + + * Makefile (postclean): Remove obsolete sysd-Makefile. + +2001-06-01 Roland McGrath + + * sysdeps/alpha/fpu/fclrexcpt.c: #include + and use compat_symbol/versioned_symbol instead of plain + symbol_version/default_symbol_version. + * sysdeps/alpha/fpu/fegetenv.c: Likewise. + * sysdeps/alpha/fpu/fesetenv.c: Likewise. + * sysdeps/alpha/fpu/feupdateenv.c: Likewise. + * sysdeps/alpha/fpu/fgetexcptflg.c: Likewise. + * sysdeps/alpha/fpu/fraiseexcpt.c: Likewise. + * sysdeps/alpha/fpu/fsetexcptflg.c: Likewise. + * sysdeps/arm/fpu/fclrexcpt.c: Likewise. + * sysdeps/arm/fpu/fegetenv.c: Likewise. + * sysdeps/arm/fpu/fesetenv.c: Likewise. + * sysdeps/arm/fpu/fraiseexcpt.c: Likewise. + * sysdeps/arm/fpu/fsetexcptflg.c: Likewise. + * sysdeps/i386/fpu/fclrexcpt.c: Likewise. + * sysdeps/i386/fpu/fegetenv.c: Likewise. + * sysdeps/i386/fpu/fesetenv.c: Likewise. + * sysdeps/i386/fpu/feupdateenv.c: Likewise. + * sysdeps/i386/fpu/fgetexcptflg.c: Likewise. + * sysdeps/i386/fpu/fraiseexcpt.c: Likewise. + * sysdeps/i386/fpu/fsetexcptflg.c: Likewise. + * sysdeps/m68k/fpu/fclrexcpt.c: Likewise. + * sysdeps/m68k/fpu/fegetenv.c: Likewise. + * sysdeps/m68k/fpu/fesetenv.c: Likewise. + * sysdeps/m68k/fpu/feupdateenv.c: Likewise. + * sysdeps/m68k/fpu/fgetexcptflg.c: Likewise. + * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. + * sysdeps/m68k/fpu/fsetexcptflg.c: Likewise. + * sysdeps/powerpc/fclrexcpt.c: Likewise. + * sysdeps/powerpc/fpu/fegetenv.c: Likewise. + * sysdeps/powerpc/fpu/fesetenv.c: Likewise. + * sysdeps/powerpc/fpu/feupdateenv.c: Likewise. + * sysdeps/powerpc/fpu/fgetexcptflg.c: Likewise. + * sysdeps/powerpc/fpu/fraiseexcpt.c: Likewise. + * sysdeps/powerpc/fpu/fsetexcptflg.c: Likewise. + + * iconvdata/cp1258.c: Include for abort decl. + * iconvdata/iso-2022-cn-ext.c: Likewise. + +2001-06-01 Andreas Jaeger + + * Versions.def: Add version 2.2.4. + +2001-06-01 Ulrich Drepper + + * socket/Makefile (routines): Add sockatmark. + * socket/Versions [GLIBC_2.2.4]: Add sockatmark. + * socket/sys/socket.h: Add prototype for sockatmark. + * sysdeps/generic/sockatmark.c: New file. + * sysdeps/unix/sockatmark.c: New file. + +2001-06-01 Andreas Jaeger + + * sysdeps/unix/sysv/linux/speed.c (cfsetispeed): Max speed is + B4000000. + (cfsetospeed): Likewise. + Reported by Lukasz Trabinski . + +2001-05-31 Joseph S. Myers + + * misc/sys/cdefs.h (__restrict_arr): Define to empty for C++. + +2001-05-30 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: greg_t + needs to have the same aligment as the kernel structure. + +2001-05-29 Jakub Jelinek + + * sunrpc/rpc/types.h (u_char, u_short, u_int, u_long, quad_t, + u_quad_t, fsid_t, daddr_t, caddr_t): Make sure the types are defined. + * posix/sys/types.h (u_char, u_short, u_int, u_long, quad_t, + u_quad_t, fsid_t, daddr_t, caddr_t): Protect the __USE_BSD typedefs + against multiple definition. + +2001-05-30 Ulrich Drepper + + * po/da.po: Update from translation team. + +2001-05-29 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/e_acosl.c: New file, contributed by + Stephen L Moshier . + + * math/libm-test.inc (sinh_test): Add new test case. + + * sysdeps/ieee754/ldbl_96/e_sinhl.c (__ieee754_sinhl): sinhl(x) = + x when x < 2^-32. + Patch by Stephen L Moshier . + +2001-05-23 Andreas Jaeger + + * iconvdata/testdata/WINDOWS-1255..UTF-8: Renamed to... + * iconvdata/testdata/WINDOWS-1255..UTF8: this. + +2001-05-27 Andreas Jaeger + + * manual/stdio.texi (String Streams): Fix fmemopen description. + Reported by Michal Kochanowicz . + +2001-05-26 H.J. Lu + + * sysdeps/unix/sysv/linux/mips/syscalls.list: Change sigsuspend + to s_sigsuspend. Add s_mmap2. + + * sysdeps/mips/atomicity.h: New file. + + * sysdeps/unix/sysv/linux/mips/getsysstats.c: New file. + + * sysdeps/unix/sysv/linux/mips/bits/ipc.h (ipc_perm): Put + back __key. + +2001-05-25 Bruce Mitchener + + * manual/ctype.texi: Minor fix. + * manual/install.texi: Likewise. + * manual/startup.texi: Likewise. + * manual/examples/dir.c: Use perror() rather than puts(). + +2001-05-25 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Put stuff following + #endif directive inside a comment to avoid compiler warnings. + +2001-05-25 Philipp Thomas + + * nis/nis_print.c (nis_nstype2str): Don't mark names of + naming services for translation, only UNKNOWN needs it. + Add comment to prevent it for the future. + +2001-05-25 Joseph S. Myers + + * misc/sys/cdefs.h (__restrict_arr): Define appropriately for GCC + 3.1 and non-GCC C99 compilers. + +2001-05-22 David Mosberger + + * sysdeps/ia64/memmove.S: Increase MEMLAT from 6 to 21 for better + performance. + * sysdeps/ia64/memcpy.S: Likewise. + + * sysdeps/ia64/bcopy.S: New file. + + * sysdeps/ia64/bzero.S: New file (derived from memset.S). + +2001-05-26 Ulrich Drepper + + * sysdeps/ia64/fpu/libm-test-ulps: Add deltas for tanh(-0.7). + +2001-05-24 Ulrich Drepper + + * iconvdata/Makefile: Add rules for CP10007. + * iconvdata/gconv-modules: Add entries for CP10007 ad MacCyrillic. + * iconvdata/cp10007.c: New file. + * iconvdata/tst-tables.sh: Add CP10007. + +2001-05-23 kaz Kojima + + * sysdeps/sh/dl-machine.h (_dl_runtime_resolve): Handle newer PLT. + (_dl_runtime_profile): Likewise.. + +2001-05-23 Thorsten Kukuk + + * sysdeps/posix/getaddrinfo.c: Support for AF_UNIX commented out. + * posix/tst-getaddrinfo.c: Remove AF_UNIX test. + +2001-05-19 H.J. Lu + + * elf/dl-deps.c (_dl_map_object_deps): Pass objname and + errstring of the failed DSO to _dl_signal_error (). + +2001-05-23 Ulrich Drepper + + * iconvdata/gconv-modules: Add more aliases to enable use in + locale names. + +2001-05-23 Andreas Jaeger + + * sysdeps/unix/sysv/linux/ia64/Makefile (CFLAGS-initfini.s): + Remove, it's not used anywhere anymore. + * sysdeps/unix/sysv/linux/s390/s390-64/Makefile + (CFLAGS-initfini.s): Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/Makefile + (CFLAGS-initfini.s): Likewise. + * sysdeps/unix/sysv/linux/powerpc/Makefile (CFLAGS-initfini.s): + Likewise. + * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-initfini.s): + Likewise. + +2001-05-21 Bruno Haible + + * wcsmbs/mbrtowc.c (mbrtowc): Remove local variable 'flush', always + use 0 instead, and rely on the converter to do the flush. + * wcsmbs/tst-mbrtowc.c (utf8_test_1): New function, taken from + utf8_test. + (utf8_test_2, utf8_test_3): New function. + (utf8_test): Call utf8_test_1, utf8_test_2, utf8_test_3. + +2001-05-22 Jakub Jelinek + + * elf/dl-close.c (_dl_close): Save imap->l_reldeps, not map->l_reldeps. + + * elf/Makefile (distribute): Add reldep4mod[1234].c. + (tests): Add reldep4. + (modules-names): Add reldep4mod[1234]. + (reldep4mod1.so, reldep4mod2.so, reldep4, reldep4.out): New rules. + * elf/reldep4.c: New file. + * elf/reldep4mod1.c: Likewise. + * elf/reldep4mod2.c: Likewise. + * elf/reldep4mod3.c: Likewise. + * elf/reldep4mod4.c: Likewise. + +2001-05-18 Jakub Jelinek + + * elf/dl-lookup.c (PROTECTED): Remove defines. + (add_dependency): Mark it with internal_function. + (_dl_do_lookup, _dl_do_lookup_versioned): New functions. + (_dl_lookup_symbol, _dl_lookup_symbol_skip, + _dl_lookup_versioned_symbol, _dl_lookup_versioned_symbol_skip): Use + it if we don't want do_lookup* inlined. + +2001-05-18 Jakub Jelinek + + * include/link.h (struct r_scope_elem): Remove r_duplist and + r_nduplist fields. + * elf/dl-load.c (_dl_map_object_from_fd): Don't initialize them. + * elf/dl-lookup.c (_dl_lookup_symbol_skip): Look in r_list, not + r_duplist. + (_dl_lookup_versioned_symbol_skip): Likewise. + * elf/dl-deps.c (struct list): Remove dup field, rename unique to next. + (_dl_map_object_deps): Don't compute duplicate list. + + * elf/dl-symbol.c: Removed. + * elf/Makefile (routines): Remove dl-symbol. + +2001-05-22 Ulrich Drepper + + * po/el.po: Update from translation team. + * po/sv.po: Likewise. + +2001-05-20 Bruno Haible + + * iconvdata/cp1255.c: Completely rewritten. + * iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1255. + * iconvdata/testdata/WINDOWS-1255: New file. + * iconvdata/testdata/WINDOWS-1255..UTF8: New file. + * iconvdata/TESTS: Add WINDOWS-1255 test. + * iconvdata/CP1255.irreversible: New file. + +2001-05-20 Bruno Haible + + * iconvdata/cp1258.c: Completely rewritten. + * iconvdata/Makefile (gen-8bit-gap-modules): Remove cp1258. + * iconvdata/testdata/WINDOWS-1258: New file. + * iconvdata/testdata/WINDOWS-1258..UTF8: New file. + * iconvdata/TESTS: Add WINDOWS-1258 test. + * iconvdata/tst-table-from.c (try): Reset the iconv descriptor before + the main call, and flush it afterwards. + (utf8_decode): Return a string, possibly containing several Unicode + characters. + (main): Update all utf8_decode calls. + * iconvdata/CP1258.irreversible: New file. + +2001-05-20 Bruno Haible + + * iconv/gconv.c (__gconv): For flush without output, pass do_flush = 2. + * iconv/skeleton.c: Distinguish do_flush = 1 and do_flush = 2. In the + first case, set outbuf, outstart, outend, and call PREPARE_LOOP before + EMIT_SHIFT_TO_INIT; then pass the output produced by this step down to + the next step. In the second case, clear the state without calling + EMIT_SHIFT_TO_INIT. + * iconvdata/ibm930.c (EMIT_SHIFT_TO_INIT): Use outbuf instead of + data->__outbuf, and outend instead of data->__outbufend. + * iconvdata/ibm933.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/ibm935.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/ibm937.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/ibm939.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/iso-2022-cn.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/iso-2022-cn-ext.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/iso-2022-jp.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/iso-2022-kr.c (EMIT_SHIFT_TO_INIT): Likewise. + * iconvdata/utf-7.c (EMIT_SHIFT_TO_INIT): Likewise. + +2001-05-21 Jakub Jelinek + + * elf/rtld.c (dl_main): Compute l_map_end for the main program. + * elf/dl-sym.c (_dl_sym): Don't check for l_addr == 0. + If match == _dl_loaded, caller can still come from the main program. + (_dl_vsym): Likewise. + * elf/dl-open.c (dl_open_worker): Don't check for l_addr == 0. + * elf/dl-error.c (_dl_signal_error): Change NULL objname into "". + * elf/restest2.c: New test. + * elf/Makefile (tests): Add restest2. + (restest2, LDFLAGS-restest2): Add rules. + +2001-05-22 Ulrich Drepper + + * intl/Makefile: Add a few more dependencies to avoid races in the + test shell scripts. + +2001-05-22 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/s_log1pl.c: New file, contributed by + Stephen L Moshier . + +2001-05-22 Martin Schwidefsky + + * sysdeps/s390/s390-32/backtrace.c: Make backtrace return the + return addresses instead of the stack pointers. + * sysdeps/s390/s390-64/backtrace.c: Likewise. + +2001-05-21 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Include + bits/sigcontext.h instead of bits/sigstack.h. + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Add + multiple-inclusion guards. + +2001-05-21 Andreas Jaeger + + * locale/programs/ld-collate.c (handle_ellipsis): Fix message. + Patch by Philipp Thomas . + +2001-05-17 Bruce Mitchener + + * manual/arpg.texi: Spelling, misc fixes. + * manual/arith.texi: Likewise. + * manual/crypt.texi: Likewise. + * manual/debug.texi: Likewise. + * manual/getopt.texi: Likewise. + * manual/intro.texi: Likewise. + * manual/memory.texi: Likewise. + * manual/nss.texi: Likewise. + * manual/pattern.texi: Likewise. + * manual/process.texi: Likewise. + * manual/resource.texi: Likewise. + * manual/search.texi: Likewise. + * manual/setjmp.texi: Likewise. + * manual/signal.texi: Likewise. + * manual/socket.texi: Likewise. + * manual/stdio.texi: Likewise. + * manual/string.texi: Likewise. + * manual/sysinfo.texi: Likewise. + * manual/terminal.texi: Likewise. + * manual/llio.texi: Document madvise(). + +2001-05-20 Roland McGrath + + * Makeconfig (sysdep-makeconfigs): Include any Makeconfig files + found within $(add-ons) directories too. + [linuxthreads add-on]: Move variable settings for linuxthreads + to new file linuxthreads/Makeconfig. + +2001-05-20 Franz Sirl + + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_STD_AUXV): + Define for linux >= 2.4.5 on powerpc. + (__ASSUME_MMAP2_SYSCALL): Likewise. + +2001-05-19 Roland McGrath + + * hurd/hurdlookup.c (__hurd_file_name_lookup_retry): Don't leak the + result port when failing with ELOOP. Do the ELOOP check when + following an absolute symlink target as well as relative. + Remove #ifdef SYMLOOP_MAX conditional--it should always be defined. + +2001-05-18 Andreas Jaeger + + * po/fr.po: Free software is "logiciel libre". + Patch by Martin Michlmayr . + + * sysdeps/powerpc/elf/libc-start.c: Use __cxa_atexit. + Patch by ekato@ees.hokudai.ac.jp, closes PR libc/2271. + +2001-05-17 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: New file. + +2001-05-17 Ulrich Drepper + + * elf/dl-profile.c (_dl_mcount): Check whether state is + GMON_PROF_ON before doing anything. + +2001-05-17 H.J. Lu + + * elf/sprof.c (read_symbols): Move "++symtab" into the while loop. + +2001-05-17 Ulrich Drepper + + * sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Use + CHECK_SIGSET_NULL_OK and not CHECK_SIGSET for all parameters. + Reported by Mark Burton . + +2001-05-17 Jakub Jelinek + + * elf/ldconfig.c (add_dir): Only warn about stat failure if + opt_verbose. + (search_dir): Likewise. + +2001-05-17 Ulrich Drepper + + * sysdeps/i386/i486/atomicity.h (exchange_and_add): Correct second + parameter of xaddl. Patch by H . J . Lu . + +2001-05-14 Bruno Haible + + * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): If SO is seen + without previous announcement, reject it regularly, don't abort. + +2001-05-16 Ulrich Drepper + + * math/tgmath.h: Fix handling of int parameters to binary and + ternary functions. Reported by mitr@volny.cz. + + * math/test-tgmath.c: Add tests for calls with integer parameters. + +2001-05-15 Jakub Jelinek + + * sunrpc/rpc_thread.c (rpc_default): Remove. + (__rpc_thread_destroy): Use __libc_tsd_RPC_VARS_mem instead of + rpc_default. + (rpc_thread_multi, __rpc_thread_svc_fdset, __rpc_thread_createerr, + __rpc_thread_svc_pollfd, __rpc_thread_svc_max_pollfd): Likewise. + * sunrpc/auth_none.c (authnone_private): Fix a typo. + +2001-05-16 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Fix stack allocation. + +2001-05-16 Bruce Mitchener + + * manual/llio.texi: Many grammar and typo fixes to the section on AIO. + +2001-05-15 Andreas Jaeger + + * sysdeps/ieee754/ldbl-128/s_expm1l.c: New file, contributed by + Stephen L Moshier . + + * sysdeps/i386/fpu/libm-test-ulps: Adjust for change. + + * math/libm-test.inc: Add comment with ToDo. + + * sysdeps/i386/fpu/e_expl.c: Rewritten to C and using a more + accurate algorithm. Patch by Stephen L Moshier . + + * sysdeps/i386/fpu/e_expl.S: Removed. + +2001-05-14 Roland McGrath + + * csu/Makefile ($(objpfx)g$(start-installed-name)): Turn this into a + static pattern rule also that also covers + $(objpx)g$(static-start-installed-name). + [$(start-installed-name) != $(static-start-installed-name)] + (extra-objs, omit-deps, install-lib): Add + $(static-start-installed-name) and g$(static-start-installed-name). + * sysdeps/mach/hurd/i386/Makefile: Don't add crt0.o to those here; + just setting static-start-installed-name is now sufficient. + (extra-objs): Add static-start.o here. + (CFLAGS-initfini.s): Remove obsolete variable. + * sysdeps/mach/hurd/i386/Makeconfig: New file. + Define static-start-installed-name here. + + * Makeconfig: Include existing $(full_config_sysdirs:=/Makeconfig). + * Make-dist (+sysdep-tsrcs): Look for Makeconfig files. + + * Makerules ($(+sysdir_pfx)sysd-Makefile): Remove this target and + associated hair. Instead, just use $(wildcard ...) in the include. + + * configure.in (critic_missing, aux_missing): Collect in these vars + the names of the missing programs, and include them in the error msgs. + * configure: Regenerated. + +2001-05-14 Andreas Jaeger + + * sysdeps/i386/fpu/libm-test-ulps: Adjust for new tests. + + * math/libm-test.inc (tanh_test): Add testcases for last tanh bug. + +2001-05-14 Stephen L Moshier + + * sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Fix sign test. + +2001-05-11 Jakub Jelinek + + * posix/regex.c (re_match_2_internal): Swap mbs_offset and csize + as well if swapping strings. + Make sure stop is not past end of second string. + * posix/bug-regex4.c: New test. + * posix/Makefile (tests): Add bug-regex4. + +2001-05-10 Andreas Jaeger + + * manual/install.texi (Linux): Clarify that Linux 2.2 is minimal + requirement. + +2001-05-12 Andreas Jaeger + + * sysdeps/ieee754/dbl-64/s_sin.c: Include "math_private.h" for + internal prototypes. + * sysdeps/ieee754/dbl-64/doasin.c: Likewise. + * sysdeps/ieee754/dbl-64/dosincos.c: Likewise. + * sysdeps/ieee754/dbl-64/halfulp.c: Likewise. + * sysdeps/ieee754/dbl-64/sincos32.c: Likewise. + * sysdeps/ieee754/dbl-64/slowexp.c: Likewise. + * sysdeps/ieee754/dbl-64/slowpow.c: Likewise. + * sysdeps/ieee754/dbl-64/branred.c: Likewise. + + * math/math_private.h: Add prototypes for internal functions of + the IBM Accurate Mathematical Library. + + * sysdeps/ieee754/dbl-64/s_atan.c: Include "math.h" for + prototypes. + * sysdeps/ieee754/dbl-64/s_tan.c: Likewise. + + * sysdeps/ieee754/dbl-64/e_asin.c: Include "math_private.h" for + internal prototypes. + * sysdeps/ieee754/dbl-64/s_atan.c: Likewise. + * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise. + * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise. + * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. + * sysdeps/ieee754/dbl-64/e_log.c: Likewise. + * sysdeps/ieee754/dbl-64/e_exp.c: Likewise. + * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. + * sysdeps/generic/e_rem_pio2l.c: Likewise. + (__ieee754_rem_pio2l): Fix prototype. + + * math/math_private.h (__copysign): Add internal prototype. + +2001-05-11 Andreas Jaeger + + * sysdeps/unix/sysv/linux/configure.in: Move binutils check to... + * sysdeps/unix/sysv/linux/mips/configure.in: ...here. New file. + +2001-05-11 Andreas Jaeger + + * sysdeps/unix/sysv/linux/configure.in: Check binutils version on + MIPS. + + * sysdeps/mips/rtld-ldscript.in: Removed unneeded binary output + format directive. Patch by Steven J. Hill . + +2001-05-11 Roland McGrath + + * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Don't use + $(build-module) here, since we don't need the full magilla. + Just use $(build-module-helper) and append our special options. + +2001-05-09 Andreas Schwab + + * sysdeps/unix/readdir.c: Make sure we don't modify errno when we + reached EOF. + +2001-05-07 H.J. Lu + + * elf/ldconfig.c (dir_entry): Add ino and dev. + (add_single_dir): Compare ino and dev to check if 2 directory + paths are the same or not. Free entry->path for duplicates. + (add_dir): Initialize ino and dev for entry. + (search_dir): Handle symlink to directory. + +2001-05-07 Andreas Jaeger + + * sysdeps/i386/fpu/libm-test-ulps: Add ulps for new exp tests. + + * math/libm-test.inc (exp_test): Add some more tests. + (pow_test): Run double only test also for long double. + + * math/test-ldouble.c (TEST_LDOUBLE): Define. + * math/test-ildoubl.c (TEST_LDOUBLE): Likewise. + + * sysdeps/generic/bits/confname.h: Remove extra comma at end of + enumeration. + Closes PR libc/2240. + + * scripts/config.guess: Imported from gnu.org. + * scripts/config.sub: Likewise. + +2001-05-05 Jakub Jelinek + + * include/features.h (__USE_EXTERN_INLINES): Don't define if + __NO_INLINE__ is defined. + * ctype/ctype.h (tolower, toupper): Change the guard condition to + __USE_EXTERN_INLINES check only. + * stdlib/stdlib.h (strtod, ...): Likewise. + * wcsmbs/wchar.h (mbrlen): Likewise. + * string/string.h: Only include bits/string.h and bits/string2.h + if __NO_INLINE__ is not defined. + +2001-05-07 Andreas Jaeger + + * debug/Makefile ($(objpfx)xtrace): Substitute @SLIBDIR@ instead + of @LIBDIR@. + +2001-05-04 H.J. Lu + + * malloc/Makefile ($(objpfx)memusage): Substitute @SLIBDIR@ + not @LIBDIR@. + +2001-05-06 Andreas Jaeger + + * sysdeps/i386/fpu/e_fmodl.c: New, rewrite of e_fmodl.S. + * sysdeps/i386/fpu/e_fmodl.S: Removed. + * sysdeps/i386/fpu/e_atan2l.c: New, rewrite of e_atan2l.S. + * sysdeps/i386/fpu/e_atan2l.S: Removed. + * sysdeps/i386/fpu/e_acosl.c: New, rewrite of e_acos.S. + * sysdeps/i386/fpu/s_atanl.c: New, rewrite of e_atanl.S. + * sysdeps/i386/fpu/e_sqrtl.c: New, rewrite of e_sqrt.S. + * sysdeps/i386/fpu/e_acosl.S: Removed. + * sysdeps/i386/fpu/s_atanl.S: Removed. + * sysdeps/i386/fpu/e_sqrtl.S: Removed. + +2001-05-05 Mark Kettenis + + * sysdeps/mach/hurd/bits/environments.h: Add comment from + sysdeps/generic/bits/environments.h. Define _POSIX_V6_* values. + +2001-04-30 Jakub Jelinek + + * posix/confstr.c (confstr) [_CS_V6_WIDTH_RESTRICTED_ENVS]: Move so + that _CS_LFS_CFLAGS can fall through to the empty returned string + case. Add FALLTHROUGH comment. + +2001-04-29 Ralf Baechle + + * sysdeps/unix/sysv/linux/mips/bits/sem.h: Make structure + definitions match the kernel definitions. + * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise. + +2001-04-29 Ben Collins + + * sysdeps/sparc/sparc64/dl-machine.h: Fix multiline strings + warnings. + * sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_div.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise. + * sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Likewise. + +2001-04-29 Andreas Schwab + + * sysdeps/unix/sysv/linux/kernel-features.h: Fix missing backslash + in last change. + +2001-04-29 Andreas Jaeger + + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FCNTL64): + Define for Arm, PowerPC and SH if kernel is 2.4.4 or newer. + + * sysdeps/unix/sysv/linux/bits/socket.h (PF_WANPIPE): New, from + Linux 2.4.4. + (AF_WANPIPE): Likewise. + (MSG_MORE): New. + + * sysdeps/unix/sysv/linux/alpha/bits/socket.h: Add same changes as + for Linux generic version. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/socket.h: Likewise. + + * sysdeps/gnu/netinet/tcp.h (TCP_QUICKACK): New. + +2001-04-27 Ulrich Drepper + + * nis/nss-nis.h: Correct test for invalid error number. + * nis/nss-nisplus.h: Likewise. + + * nis/Makefile (libnss_compat-rountines): Add nss-nisplus. + +2001-04-26 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ia64/syscalls.list: Add getunwind. + + * string/strcoll.c: Fix two memory allocation problems. + * string/Makefile (tests): Add bug-strcoll1. + * string/bug-strcoll1.c: New file. + + * malloc/mcheck.c (mcheck): Call malloc once before setting the + hooks to allow the internal check hooks to be set up if necessary. + + * nis/nss-nis.h: Move yperr2nss_tab definition into separate file + and rename to __yperr2nss_tab. Change YPERR_COUNT into variable + __yperr2nss_count. + * nis/nss-nis.c: New file. + * nis/nss-nisplus.h: Move niserr2nss_tab definition into separate file + and rename to __niserr2nss_tab. Change NISERR_COUNT into variable + __niserr2nss_count. + * nis/nss-nisplus.c: New file. + * nis/Makefile (libnss_compat-routines): Add nss-nis. + (libnss_nis-routines): Likewise. + (libnss_nisplus-routines): Add nss-nisplus. + + * nis/nss_nisplus/nisplus-alias.c: Remove unnecessary initializations. + * nis/nss_nisplus/nisplus-ethers.c: Likewise. + * nis/nss_nisplus/nisplus-grp.c: Likewise. + * nis/nss_nisplus/nisplus-hosts.c: Likewise. + * nis/nss_nisplus/nisplus-network.c: Likewise. + * nis/nss_nisplus/nisplus-proto.c: Likewise. + * nis/nss_nisplus/nisplus-pwd.c: Likewise. + * nis/nss_nisplus/nisplus-rpc.c: Likewise. + * nis/nss_nisplus/nisplus-service.c: Likewise. + * nis/nss_nisplus/nisplus-spwd.c: Likewise. + * nis/nss_nis/nis-alias.c: Likewise. + * nis/nss_nis/nis-ethers.c: Likewise. + * nis/nss_nis/nis-grp.c: Likewise. + * nis/nss_nis/nis-network.c: Likewise. + * nis/nss_nis/nis-proto.c: Likewise. + * nis/nss_nis/nis-pwd.c: Likewise. + * nis/nss_nis/nis-spwd.c: Likewise. + * nis/nss_compat/compat-grp.c: Likewise. + * nis/nss_compat/compat-initgroups.c: Likewise. + * nis/nss_compat/compat-pwd.c: Likewise. + * nis/nss_compat/compat-spwd.c: Likewise. + + * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Some more + optimizations. Patch by Jakub Jelinek . + +2001-04-26 Andreas Jaeger + + * po/zh_TW.po: Update. + Patch by Tung-Han Hsieh . + +2001-04-25 Ulrich Drepper + + * malloc/malloc.c: Allow MALLOC_ALIGNMENT to be defined on the + compiler command line. + * sysdeps/hppa/Makefile: Add -DMALLOC_ALIGNMENT=16 to compiler + command line for malloc.c. + +2001-04-25 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/time.h: Move to... + * sysdeps/unix/sysv/linux/sparc/bits/time.h: ...here. + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/bits/time.h: Remove. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/socket.h: Move to... + * sysdeps/unix/sysv/linux/sparc/bits/socket.h: ...here. Adjust + struct msghdr for __WORDSIZE == 32. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statvfs.h: Move to... + * sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: ...here. Adjust + for __WORDSIZE == 32. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Remove. + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/get_clockfreq.c: New + file. + * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S (__libc_siglongjmp): + Rename from longjmp, make longjmp weak alias to it. + +2001-04-24 David S. Miller + + * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: New file. + +2001-04-25 Matthew Wilcox + + * sysdeps/hppa/stackinfo.h: New file. + * sysdeps/unix/sysv/linux/hppa/getdents64.c: New file. + * sysdeps/unix/sysv/linux/hppa/mmap64.c: New file. + * sysdeps/unix/sysv/linux/hppa/bits/resource.h: New file. + * sysdeps/unix/sysv/linux/kernel-features.h: Add descriptions + of PA kernel features. + +2001-04-25 Ulrich Drepper + + * locale/programs/localedef.c (main): Always set a file name for + the initial locale. + * locale/programs/locfile.c (locfile_read): filename is allowed to + be NULL. + +2001-04-12 Paul Bame + + * sysdeps/hppa/fpu/fclrexcpt.c: Clear the exception flags, not the + enable flags. + +2001-04-24 Ulrich Drepper + + * sysdeps/generic/bits/environments.h (_POSIX_V6_LPBIG_OFFBIG, + _XBS5_LPBIG_OFFBIG): Define to -1. + Fix typos. + + * sysdeps/generic/bits/confname.h: Add _CS_V6_WIDTH_RESTRICTED_ENVS. + * posix/confstr.c: Handle _CS_V6_WIDTH_RESTRICTED_ENVS. + * posix/getconf.c: Handle _POSIX_V6_WIDTH_RESTRICTED_ENVS. + * posix/tst-getconf.sh: Add _POSIX_V6_WIDTH_RESTRICTED_ENVS. + + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/Implies: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/bits/time.h: Removed. + +2001-03-21 Alan Modra + + * sysdeps/hppa/dl-machine.h (RTLD_START): Set up dp with DT_PLTGOT + value from application so that constructors in non-PIC libs work. + +2000-12-13 Jes Sorensen + + * sysdeps/hppa/dl-machine.h (RTLD_START): _dl_init now returns a + function pointer, hence load the jump address and gp from the + function pointer before jumping. + +2001-04-24 Andreas Jaeger + + * sysdeps/generic/send.c (__send): Return ssize_t. + * sysdeps/mach/hurd/send.c (__send): Likewise. + * sysdeps/mach/hurd/recv.c (recv): Likewise. + * sysdeps/mach/hurd/sendto.c (sendto): Likewise. + * sysdeps/generic/sendto.c (sendto): Likewise. + * sysdeps/generic/recvmsg.c (recvmsg): Likewise. + * sysdeps/mach/hurd/recvfrom.c (recvfrom): Likewise. + * sysdeps/generic/recvfrom.c (recvfrom): Likewise. + * sysdeps/generic/sendmsg.c (sendmsg): Likewise. + + * socket/sys/socket.h: send* and recv* return ssize_t. + + * include/sys/socket.h: send returns ssize_t. + + * sysdeps/i386/fpu_control.h: Fix comments. + +2001-04-24 Ulrich Drepper + + * sysdeps/ia64/Dist: Add hp-timing.c. + * sysdeps/unix/sysv/linux/sparc/sparc64/Dist: Add ucontext_i.h. + * posix/Makefile (distribute): Add tst-getconf.sh. + * po/Makefile (distribute): Add $(BROKEN_LINGUAS:=.po). + +2001-04-23 Ulrich Drepper + + * sysdeps/ia64/Makefile [subdir=csu] (sysdep_routines): Add hp-timing. + * sysdeps/ia64/Versions: Add _dl_cpuclock_offset for ld in 2.2.3. + * sysdeps/ia64/hp-timing.c: New file. + * sysdeps/ia64/hp-timing.h: New file. + * sysdeps/unix/sysv/linux/ia64/bits/time.h: Add definitions for + CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID. + + * sysdeps/generic/clock_getcpuclockid.c: Make function generic, test + using #ifdef whether the clock is available. + * sysdeps/unix/i386/clock_getcpuclockid.c: Not needed anymore. + + * sysdeps/generic/dl-sysdep.c: Initialize _dl_cpuclock_offset to move + it into data section. + + * sysdeps/unix/i386/i586/clock_getres.c: Removed. + * sysdeps/unix/i386/i586/clock_gettime.c: Removed. + * sysdeps/unix/i386/i586/clock_nanosleep.c: Removed. + * sysdeps/unix/i386/i586/clock_settime.c: Removed. + * sysdeps/unix/i386/i586/cpuclock-init.h: Removed. + * sysdeps/generic/cpuclock-init.h: Removed. + * sysdeps/unix/i386/i686/Implies: Removed. + * sysdeps/unix/i386/i686/tempname.c: Removed. + * sysdeps/i386/i686/Versions: New file. + * sysdeps/unix/i386/i586/Versions: Removed. + + * sysdeps/posix/clock_getres.c: If HP_TIMING_AVAIL is nonzero handle + CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID. + * sysdeps/unix/clock_gettime.c: Likewise. + * sysdeps/unix/clock_nanosleep.c: Likewise. + * sysdeps/unix/clock_settime.c: Likewise. + * sysdeps/posix/tempname.c: Is HP_TIMING_AVAIL is nonzero define + RANDOM_BITS use CPU clock. + + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/bits/time.h: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9b/bits/time.h: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/time.h: New file. + * sysdeps/sparc/Versions: New file. + + * elf/dl-support.c: Don't use cpuclock-init.h definitions, use + hp-timing.h definitions. + * sysdeps/generic/dl-sysdep.c: Likewise. + + * include/libc-internal.h: Include hp-timing.h. Use hp_timing_t in + __get_clockfreq prototype. + + * sysdeps/unix/sysv/linux/i386/get_clockfreq.c (__get_clockfreq): + Use hp_timing_t type. + * sysdeps/generic/get_clockfreq.c (__get_clockfreq): Likewise. + + * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c: New file. + + * sysdeps/posix/pathconf.c (__pathconf): For _PC_ASYNC_IO test + whether named file is a regular file or a block device. + * sysdeps/posix/fpathconf.c (__fpathconf): Likewise. + +2001-04-23 Andreas Jaeger + + * nscd/nscd.h: Add noreturn attribute for start_threads. + +2001-04-22 Ulrich Drepper + + * posix/getconf.c: Fix names of XBS5 LFS test variables. + Add missing configuration variables from XPG6. + * posix/tst-getconf.c: New file. + * posix/Makefile (generated): Add tst-getconf.out. + (tests): Add ($objpfx)tst-getconf.out. + Add rule to run tst-getconf.sh. + * sysdeps/generic/bits/confname.h: Add missing _PC_ and _SC_ values + from XPG6. + * sysdeps/posix/fpathconf.c: Add handling of _PC_ALLOC_SIZE_MIN and + _PC_SYMLINK_MAX. + * sysdeps/posix/pathconf.c: Likewise. + * sysdeps/posix/sysconf.c: Correct spelling of _SC_MULTI_PROCESS + and _SC_SYMLOOP_MAX. + +2001-04-22 Philip Blundell + + * sysdeps/arm/fpu/feenablxcpt.c: New file. + * sysdeps/arm/fpu/fedisablxcpt.c: New file. + * sysdeps/arm/fpu/fegetexcpt.c: New file. + +2001-04-22 Philip Blundell + + * sysdeps/unix/sysv/linux/arm/sys/user.h (struct user_fpregs): + Renamed from struct user_fp. + (struct user_regs): New. + (struct user): Use struct user_regs rather than struct pt_regs to + avoid dependency on asm/ptrace.h. Use struct user_fpregs in place + of struct user_fp and struct user_fp_struct. + * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include sys/procfs.h + not sys/elf.h. + +2001-04-22 Philip Blundell + + * sysdeps/unix/sysv/linux/arm/sys/elf.h: Move contents to + sys/procfs.h, and tell the user to include that file instead. + * sysdeps/unix/sysv/linux/arm/sys/procfs.h: Remove old cruft + surrounded with #if 0. + (elf_greg_t, ELF_NGREG, elf_gregset_t, elf_fpregset_t): Moved here + from sys/elf.h. + (prgregset_t, prfpregset_t): Define in terms of elf_gregset_t and + elf_fpregset_t respectively. + +2001-04-22 Philip Blundell + + * sysdeps/unix/sysv/linux/arm/register-dump.h: Also print the + address that faulted. + +2001-04-21 Ulrich Drepper + + * sysdeps/generic/bits/confname.h: Add _SC_V6_* and _CS_POSIX_V6_* + values. + * sysdeps/generic/bits/environments.h: Define _POSIX_V6_* values. + * posix/confstr.c: Handle _CS_POSIX_V6_* values. + * posix/getconf.c: Handle _CS_POSIX_V6_* and _SC_V6_* values. + * sysdeps/posix/sysconf.c: Handle _SC_V6_* values. + + * sysdeps/powerpc/fpu/libm-test-ulps: Add deltas for atan2f. + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. + * sysdeps/mips/fpu/libm-test-ulps: Likewise. + +2001-04-21 Franz Sirl + + * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correct check for invalid + offset. + +2001-04-21 Ulrich Drepper + + * posix/getopt.h: Treat __cplusplus like __STDC__. + +2001-04-20 John S. Marvin + + * sysdeps/unix/sysv/linux/hppa/clone.S: Fix clone system call + entry point stub. + +2001-04-20 Richard Hirst + + * elf/elf.h: Corrected R_PARISC_DIR14R (should be 6, not 5), + and added R_PARISC_DPREL21L and R_PARISC_DPREL14R for modutils. + + * sysdeps/unix/sysv/linux/hppa/syscalls.list: Removed ptrace + entry so the ptrace.c wrapper is used. + +2001-04-20 Alan Modra + + * sysdeps/hppa/dl-lookupcfg.h (_dl_function_address): Prototype. + (DL_FUNCTION_ADDRESS): Define. + (DL_DT_INIT_ADDRESS): Define. + (DL_DT_FINI_ADDRESS): Define. + * sysdeps/hppa/Versions: Add _dl_function_address. + * sysdeps/hppa/dl-machine.h (ELF_MACHINE_START_ADDRESS): Define. + * sysdeps/hppa/dl-symaddr.c (_dl_start_address): Rename to + _dl_function_address. + +2001-04-21 Andreas Jaeger + + * rt/aio_misc.c (handle_fildes_io): Add noreturn attribute. + * resolv/gai_misc.c (handle_requests): Likewise. + * malloc/obstack.c (print_and_abort): Likewise. + * malloc/mcheck.c (mabort): Likewise. + + * sysdeps/unix/i386/i586/clock_settime.c: Include + "libc-internal.h" for __get_clockfreq declaration. + +2001-04-21 Ulrich Drepper + + * elf/dl-support.c: Include cpuclock-init.h. Use CPUCLOCK_VARDEF and + CPUCLOCK_INIT if defined. + * sysdeps/generic/dl-sysdep.c: Likewise. + * sysdeps/generic/cpuclock-init.h: New file. + * sysdeps/unix/i386/i586/cpuclock-init.h: New file. + * sysdeps/unix/i386/i586/Versions: New file. + * sysdeps/unix/i386/i586/clock_settime.c: New file. + * sysdeps/unix/i386/i586/clock_gettime.c: Handle thread CPU clock + separately by calling __pthread_clock_gettime if this function is + available. Subtract offset from tsc value before computing time value. + +2001-04-20 Ulrich Drepper + + * iconv/iconv_prog.c (print_known_names): If printing goes not to + a tty print in a more machine-friendly way. + + * sysdeps/ieee754/ldbl-128/e_asinl.c: New file. + Contributed by Stephen L Moshier . + +2001-04-20 Andreas Jaeger + + * intl/Makefile (tests): Reorder conditions, tst-gettext needs msgfmt. + +2001-04-20 Andreas Schwab + + * sysdeps/m68k/fpu/libm-test-ulps: Update. + +2001-04-19 Alan Modra + + * Makerules (libc_pic.os): Add $(LDFLAGS-c_pic.os). + * sysdeps/hppa/Makefile (LDFLAGS-c_pic.os): Define. + (CFLAGS-.os): Remove. + + * sysdeps/unix/sysv/linux/hppa/sysdep.h (CALL_MCOUNT): Update comment. + + * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h (NGREG, NFPREG, + gregset): Correct for new kernel definitions. + +2001-04-19 Alan Modra + + * sysdeps/hppa/elf/initfini.c: Change dlt reg save to r3 and + generate unwind info by hand. + +2001-04-19 Ulrich Drepper + + * sysdeps/unix/sysv/linux/powerpc/mmap64.c (__mmap64): Optimize a bit. + + * configure.in: Correct regular expression for msgfmt. + Patch by Bruno Haible . + +2001-04-19 Andreas Jaeger + + * po/el.po: Add comment explaining what's broken. + + * po/Makefile (BROKEN_LINGUAS): New. + (ALL_LINGUAS): Don't add broken languages. + +2001-04-19 Roland McGrath + + * sysdeps/mach/hurd/mlock.c: New file. + * sysdeps/mach/hurd/munlock.c: New file. + * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_MEMLOCK_RANGE): Define it. + + * misc/Makefile (routines): Add mlock munlock mlockall munlockall. + * sysdeps/generic/mlock.c: New file. + * sysdeps/generic/munlock.c: New file. + * sysdeps/generic/mlockall.c: New file. + * sysdeps/generic/munlockall.c: New file. + * sysdeps/generic/bits/mman.h (MCL_CURRENT, MCL_FUTURE): New macros. + * sysdeps/unix/sysv/linux/syscalls.list (mlock, munlock, + mlockall, munlockall): Change caller field to - from EXTRA. + Don't use __ names; not used (and not declared in include/sys/mman.h). + + * hurd/privports.c (__get_privileged_ports): Renamed with __. + Use __ names for calls we make. + (get_privileged_ports): Add alias. + * hurd/hurd.h: Declare it with the __ name. + * sysdeps/mach/hurd/reboot.c (reboot): Use __get_privileged_ports. + * sysdeps/mach/hurd/adjtime.c (__adjtime): Likewise. + * sysdeps/mach/hurd/settimeofday.c (__settimeofday): Likewise. + + * hurd/hurdsig.c (write_corefile): Check RLIMIT_CORE limit and do + nothing if it's zero. + +2001-04-19 Matthew Wilcox + + * sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): + Change to return a signed result for compatibility with other + architectures, and correctness. + +2001-04-19 Ulrich Drepper + + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_32BITUIDS): + HPPA always had them. Patch by Matthew Wilcox . + +2001-04-19 Andreas Jaeger + + * configure.in: Require gettext 0.10.36 or newer. + + * manual/install.texi (Tools for Compilation): Mention gettext 0.10.36. + + * po/zh_TW.po: Remove extraneous backslashes. + + * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Remove unused + variables b and n. + +2001-04-18 Jakub Jelinek + + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. + * sysdeps/unix/sysv/linux/sparc/sparc64/makecontext.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/swapcontext.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/setcontext.S (__setcontext): + Copy first word of uc_sigmask into __uc_sigmask. + * sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S (__getcontext): + Save uc_link around trap. Copy __uc_sigmask into first word of + uc_sigmask, clear the rest. Make sure setcontext to the created + context doesn't do this though. + * sysdeps/unix/sysv/linux/sparc/sparc64/ucontext_i.h: New file. + * sysdeps/unix/sysv/linux/sparc/sys/ucontext.h (ucontext_t): Add + uc_stack and uc_sigmask, rename old uc_sigmask to __uc_sigmask in the + 64bit version, make uc_sigmask __sigset_t in the 32bit version. + +2001-04-19 Andreas Jaeger + + * sysdeps/unix/sysv/linux/hppa/umount.c: Fix typos in last patch. + + * rt/Makefile (otherlibs): Added for static NSS. + + * glibcbug.in (BUGGLIBC): Send to new alias. + +2001-04-02 Andreas Schwab + + * Makerules (build-module): Make sure exit codes get checked + properly and remove unnecessary slashes. + +2001-04-17 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/get_clockfreq.c (__get_clockfreq): + Handle kernels which report only three digits after the decimal point. + Reported by Van Okamura . + + * sysdeps/alpha/fpu/libm-test-ulps: Adjust error values for atan2f. + +2001-04-17 David S. Miller + + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update for new atan2 tests. + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. + +2001-04-17 Jakub Jelinek + + * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Make sure + desired exceptions are raised for exceptional values. + * math/libm-test.inc (acosh_test, atan_test, atan2_test, cacos_test, + cacosh_test, casin_test, casinh_test, catan_test, catanh_test, + clog_test, log_test, log1p_test, tan_test): Increase precision of + expected values to satisfy ldbl-128. + * sysdeps/alpha/fpu/libm-test-ulps: Adjust accordingly. + * sysdeps/arm/libm-test-ulps: Likewise. + * sysdeps/i386/fpu/libm-test-ulps: Likewise. + * sysdeps/ia64/fpu/libm-test-ulps: Likewise. + * sysdeps/m68k/fpu/libm-test-ulps: Likewise. + * sysdeps/mips/fpu/libm-test-ulps: Likewise. + * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + * sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise. + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. + +2001-04-17 Andreas Jaeger + + * configure.in: Move test for critical programs up. + +2001-04-16 Stephen L Moshier + + * sysdeps/ieee754/flt-32/e_asinf.c (pio2_hi, pio2_lo, pio4_hi): + Correct the values. + (pSx, qSx): Replace by shorter approximation. + Use f suffix on float constants. + +2001-04-16 Ulrich Drepper + + * sysdeps/ieee754/ldbl-128/k_tanl.c: New file. + Contributed by Stephen L Moshier . + + * string/string.h: Replace const in attribute list with __const__. + +2001-04-16 Roland McGrath + + * grp/initgroups.c (initgroups) [NGROUPS_MAX != 0]: Always use sysconf + instead of the constant NGROUPS_MAX. That way, the limit can be + raised in the kernel configuration without having to recompile libc. + + * sysdeps/posix/euidaccess.c: Don't #include or try to + define NGROUPS_MAX; we don't use it here. + +2001-04-16 Andreas Jaeger + + * math/libm-test.inc (atan2_test): Add more testcases. + + * iconv/gconv_db.c: Include gconv_charset.h for + __gconv_lookup_alias prototype. + +2001-04-13 Ulrich Drepper + + * sysdeps/ieee754/ldbl-128/s_atanl.c: New file. + Contributed by Stephen L Moshier . + +2001-04-13 Jes Sorensen + + * intl/tst-codeset.c: Include string.h to get prototype for strcmp(). + +2001-04-13 Jes Sorensen + + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Add __pad0 to + explicitly pad struct siginfo instead of relying on compiler padding. + +2001-04-12 Ulrich Drepper + + * sysdeps/ia64/Dist: Add elf/entry.h. + + * iconvdata/Makefile (distribute): Add TESTS2. + +2001-04-13 Jakub Jelinek + + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_load_address): + Calculate load address differently. + +2001-04-12 Bruno Haible + + * iconvdata/TESTS2: New file. + * iconvdata/run-iconv-test.sh: Also run tests from TESTS2. + * iconvdata/testdata/alfabeta..UTF-8: New file. + * iconvdata/testdata/alfabeta..UTF-16.BE: New file. + * iconvdata/testdata/alfabeta..UTF-16.LE: New file. + * iconvdata/testdata/alfabeta..UTF-32.BE: New file. + * iconvdata/testdata/alfabeta..UTF-32.LE: New file. + +2001-04-11 Bruno Haible + + * iconvdata/utf-32.c: New file. + * iconvdata/gconv-modules: Add entries for UTF-32, UTF-32LE, UTF-32BE. + * iconvdata/Makefile (modules): Add UTF-32. + (distribute): Add utf-32.c. + +2001-04-11 Bruno Haible + + * iconvdata/utf-16.c (PREPARE_LOOP): Initialize 'swap' after possibly + changing it in the state. After incrementing 'inptr', store it back. + * iconvdata/unicode.c (PREPARE_LOOP): After incrementing 'inptr', + store it back. + +2001-04-11 Bruno Haible + + * iconvdata/utf-16.c (gconv_init): Use MAX_NEEDED_FROM, not + MIN_NEEDED_FROM. + +2001-04-11 David Mosberger + + * sysdeps/ia64/htonl.S: Drop superfluous "alloc". + * sysdeps/ia64/htons.S: Likewise. + + * sysdeps/ia64/memset.S: Add unwind directives. + * sysdeps/ia64/strncpy.S: Likewise. + * sysdeps/ia64/strcat.S: Likewise. + + * sysdeps/ia64/memccpy.S: Add unwind directives. Drop superfluous + restore of ar.pfs. + * sysdeps/ia64/strchr.S: Likewise. + * sysdeps/ia64/memmove.S: Likewise. + * sysdeps/ia64/memcpy.S: Likewise. + * sysdeps/ia64/memcmp.S: Likewise. + * sysdeps/ia64/memchr.S: Likewise. + * sysdeps/ia64/strcmp.S: Likewise. + * sysdeps/ia64/strlen.S: Likewise. + * sysdeps/ia64/strcpy.S: Likewise. + * sysdeps/ia64/strncmp.S: Likewise. + +2001-04-11 Jakub Jelinek + + * wcsmbs/wchar.h (fgetwc, getwc, getwchar, fputwc, putwc, putwchar, + fgetws, fputws, ungetwc, getwc_unlocked, getwchar_unlocked, + fgetwc_unlocked, fputwc_unlocked, putwc_unlocked, putwchar_unlocked, + fgetws_unlocked, fputws_unlocked, wcsftime): Add __THROW. + +2001-04-11 Andreas Jaeger + + * sysdeps/mips/elf/start.S [__ASSEMBLY__]: Define it. + +2001-04-11 Andreas Schwab + + * sysdeps/m68k/fpu/libm-test-ulps: Adjusted. + +2001-04-11 Ulrich Drepper + + * sysdeps/arm/stackinfo.h: New file. + +2001-04-08 Thorsten Kukuk + + * sunrpc/rpc_main.c: If we compile RPC thread safe, allow + rpcgen to generate thread safe code. + +2001-04-10 Andreas Jaeger + + * math/test-fenv.c (initial_tests): Protect FE_TONEAREST declaration. + +2001-04-10 Ulrich Drepper + + * elf/dl-minimal.c (__assert_fail): Change error string. It's + most of the time no bug in ld.so. + (__assert_perror_fail): Likewise. + +2001-04-11 Hans-Peter Nilsson + + * sysdeps/generic/bits/fenv.h (fexcept_t): Change default type + from struct to unsigned int. + +2001-04-10 Franz Sirl + + * elf/elf.h (AT_DCACHEBSIZE, AT_ICACHEBSIZE, AT_UCACHEBSIZE, + AT_IGNOREPPC): New defines. + * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Print them. + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_STD_AUXV): + Define for newer powerpc kernels. + * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Use the standard + DL_FIND_ARG_COMPONENTS if __ASSUME_STD_AUXV is defined. + +2000-4-10 kaz Kojima + + * sysdeps/sh/stackinfo.h: New file. + +2001-04-10 Ulrich Drepper + + * locale/tst-C-locale.c (run_test): Add tests for locale objects. + * locale/newlocale.c (__newlocale): Correct setting __ctype_b, + __ctype_tolower, and __ctype_toupper elements. + + * ctype/ctype_l.c: Fix definitions of __tolower_l and __toupper_l. + Reported by Konstantin Osipov . + + * sysdeps/i386/fpu/libm-test-ulps: Add deltas for tgamma to help + the lousy AMD FPU. + +2001-04-10 Franz Sirl + + * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: New file. + * sysdeps/unix/sysv/linux/powerpc/Dist: Add sys/ptrace.h. + * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Delete wrong stuff. + * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h: Correct typedefs. + +2001-04-10 Ulrich Drepper + + * elf/dl-deps.c (_dl_map_object_deps): Provide complete error + message. Based on a patch by HJ Lu. + +2001-04-10 Andreas Schwab + + * math/libm-test.inc (csinh_test): Don't require the invalid + exception for csinh (x + iNaN), but make it optional. + +2001-04-09 David Mosberger + + * sysdeps/ia64/elf/start.S (_start): Add unwind directives. + + * sysdeps/generic/entry.h [!__ASSEMBLY__]: Declare _start. + * sysdeps/ia64/elf/entry.h: New file. + * sysdeps/unix/sysv/linux/mips/entry.h [!__ASSEMBLY__]: Declare + __start. + * elf/rtld.c: Don't declare ENTRY_POINT. Use ENTRY_POINT instead + of &ENTRY_POINT. + * sysdeps/generic/dl-sysdep.c: Likewise. + * sysdeps/mach/hurd/dl-sysdep.c: Likewise. + * sysdeps/ia64/elf/start.S: Save base address of register backing + store in __libc_ia64_register_backing_store_base. + +2001-04-10 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: Fix return + value of getcontext. + * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: Fix return + value of setcontext. + * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/s390/swapcontext.c: Skip setcontext + call by changing the saved context. + +2001-04-10 Ulrich Drepper + + * sysdeps/alpha/stackinfo.h: New file. + * sysdeps/ia64/stackinfo.h: New file. + +2001-04-10 Andreas Schwab + + * sysdeps/m68k/fpu/e_pow.c: Correct handling of some exceptional + values. + * sysdeps/m68k/fpu/e_scalb.c: Likewise. + +2001-04-09 Ulrich Drepper + + * sysdeps/sparc/sparc32/sparcv9/Dist: Add hp-timing.c. + * sysdeps/sparc/sparc64/Dist: Add hp-timing.c. + + * libio/Makefile (distribute): Add fd_to_filename.h. + +2001-04-05 David S. Miller + + Add hp-timing support for sparcv9/sparc64 targets. + * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: New file + * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: New file + * sysdeps/sparc/sparc64/hp-timing.c: New file + * sysdeps/sparc/sparc64/hp-timing.h: New file + * sysdeps/sparc/sparc32/sparcv9/Makefile: Build hp-timing. + * sysdeps/sparc/sparc64/Makefile: Likewise. + +2001-04-09 Jakub Jelinek + + * sysdeps/generic/fd_to_filename.h: New file. + * sysdeps/unix/sysv/linux/fd_to_filename.h: New file. + * libio/freopen.c (freopen): If FILENAME is NULL, try to get + filename from the open file descriptor. + * libio/freopen64.c (freopen64): Likewise. + +2001-04-09 Bruno Haible + + * misc/error.c (error): fflush stdout also if + error_print_progname != NULL. + (error_at_line): Likewise. + +2001-04-07 Bruno Haible + + * intl/gettextP.h (struct loaded_domain): Add codeset_cntr field. + (struct binding): Add codeset_cntr field. + (_nl_load_domain): Add domainbinding argument. + (_nl_init_domain_conv, _nl_free_domain_conv): New declarations. + (_nl_find_msg): New declaration, moved here from loadinfo.h. + * intl/loadinfo.h (struct loaded_l10nfile): Remove domainbinding field. + (_nl_make_l10nflist): Remove domainbinding argument. + (_nl_find_msg): Move declaration to gettextP.h. + * intl/bindtextdom.c (set_binding_values): Initialize ->codeset_cntr + to 0. Increment it when ->codeset is changed. + * intl/dcigettext.c (DCIGETTEXT): Pass binding to _nl_find_msg. + (_nl_find_msg): Add domainbinding argument. Reinitialize the converter + if domainbinding->codeset_cntr has been incremented. + * intl/finddomain.c (_nl_find_domain): Don't pass domainbinding to + _nl_make_l10nflist(). Pass it to _nl_load_domain() instead. + * intl/l10nflist.c (_nl_make_l10nflist): Remove domainbinding argument. + * intl/loadmsgcat.c (_nl_init_domain_conv): New function, extracted + from _nl_load_domain. Append //TRANSLIT also when using libiconv. + (_nl_free_domain_conv): New function, extracted from _nl_unload_domain. + (_nl_load_domain): Add domainbinding argument. Call + _nl_init_domain_conv. + (_nl_unload_domain): Call _nl_free_domain_conv. + * intl/Makefile (distribute): Add tst-codeset.sh, tstcodeset.po. + (test-srcs): Add tst-codeset. + (tests): Depend on tst-codeset.out. + (tst-codeset.out): New rule. + (CFLAGS-tst-codeset.c): New variable. + * intl/tst-codeset.sh: New file. + * intl/tstcodeset.po: New file. + * intl/tst-codeset.c: New file. + * locale/findlocale.c (_nl_find_locale): Update _nl_make_l10nflist + calls. + +2001-04-07 Roland McGrath + + * mach/msgserver.c (__mach_msg_server_timeout): Add an assert. + +2001-03-31 Roland McGrath + + * sysdeps/mach/hurd/fork.c: Skip NEWPROC just like NEWTASK when + copying send rights into child. When we hit our name for our proc + port, just copy NEWPROC directly instead of repeating proc_task2proc + to install the child's port. + +2001-04-08 Roland McGrath + + * Makeconfig ($(common-objpfx)soversions.i): Grok entries with DEFAULT + in second column, to provide default values for third column. + * shlib-versions: Add comments about using DEFAULT in second column. + (s390x-.*-linux.*): Replace individual entries with a DEFAULT entry. + (cris-.*-linux.*): Likewise. + +2001-04-09 Ulrich Drepper + + * Makefile (distribute): Add scripts/documented.sh. + * scripts/documented.sh: New file. + +2001-04-08 Hans-Peter Nilsson + + * sysdeps/unix/sysv/linux/cris/Dist: New file. + * sysdeps/unix/sysv/linux/cris/Makefile: New file. + * sysdeps/unix/sysv/linux/cris/_G_config.h: New file. + * sysdeps/unix/sysv/linux/cris/bits/fcntl.h: New file. + * sysdeps/unix/sysv/linux/cris/bits/mman.h: New file. + * sysdeps/unix/sysv/linux/cris/bits/resource.h: New file. + * sysdeps/unix/sysv/linux/cris/brk.c: New file. + * sysdeps/unix/sysv/linux/cris/chown.c: New file. + * sysdeps/unix/sysv/linux/cris/clone.S: New file. + * sysdeps/unix/sysv/linux/cris/fchown.c: New file. + * sysdeps/unix/sysv/linux/cris/fcntl.c: New file. + * sysdeps/unix/sysv/linux/cris/fxstat.c: New file. + * sysdeps/unix/sysv/linux/cris/getegid.c: New file. + * sysdeps/unix/sysv/linux/cris/geteuid.c: New file. + * sysdeps/unix/sysv/linux/cris/getgid.c: New file. + * sysdeps/unix/sysv/linux/cris/getgroups.c: New file. + * sysdeps/unix/sysv/linux/cris/getresgid.c: New file. + * sysdeps/unix/sysv/linux/cris/getresuid.c: New file. + * sysdeps/unix/sysv/linux/cris/getrlimit.c: New file. + * sysdeps/unix/sysv/linux/cris/getrlimit64.c: New file. + * sysdeps/unix/sysv/linux/cris/getuid.c: New file. + * sysdeps/unix/sysv/linux/cris/lchown.c: New file. + * sysdeps/unix/sysv/linux/cris/lockf64.c: New file. + * sysdeps/unix/sysv/linux/cris/lxstat.c: New file. + * sysdeps/unix/sysv/linux/cris/mmap.S: New file. + * sysdeps/unix/sysv/linux/cris/mmap64.S: New file. + * sysdeps/unix/sysv/linux/cris/msgctl.c: New file. + * sysdeps/unix/sysv/linux/cris/profil-counter.h: New file. + * sysdeps/unix/sysv/linux/cris/register-dump.h: New file. + * sysdeps/unix/sysv/linux/cris/semctl.c: New file. + * sysdeps/unix/sysv/linux/cris/setegid.c: New file. + * sysdeps/unix/sysv/linux/cris/seteuid.c: New file. + * sysdeps/unix/sysv/linux/cris/setfsgid.c: New file. + * sysdeps/unix/sysv/linux/cris/setfsuid.c: New file. + * sysdeps/unix/sysv/linux/cris/setgid.c: New file. + * sysdeps/unix/sysv/linux/cris/setgroups.c: New file. + * sysdeps/unix/sysv/linux/cris/setregid.c: New file. + * sysdeps/unix/sysv/linux/cris/setresgid.c: New file. + * sysdeps/unix/sysv/linux/cris/setresuid.c: New file. + * sysdeps/unix/sysv/linux/cris/setreuid.c: New file. + * sysdeps/unix/sysv/linux/cris/setrlimit.c: New file. + * sysdeps/unix/sysv/linux/cris/setuid.c: New file. + * sysdeps/unix/sysv/linux/cris/shmctl.c: New file. + * sysdeps/unix/sysv/linux/cris/socket.S: New file. + * sysdeps/unix/sysv/linux/cris/sys/ucontext.h: New file. + * sysdeps/unix/sysv/linux/cris/syscall.S: New file. + * sysdeps/unix/sysv/linux/cris/sysdep.S: New file. + * sysdeps/unix/sysv/linux/cris/sysdep.h: New file. + * sysdeps/unix/sysv/linux/cris/vfork.S: New file. + * sysdeps/unix/sysv/linux/cris/xstat.c: New file. + +2001-04-08 Hans-Peter Nilsson + + * sysdeps/cris/Dist: New file. + * sysdeps/cris/Implies: New file. + * sysdeps/cris/Makefile: New file. + * sysdeps/cris/__longjmp.S: New file. + * sysdeps/cris/_mcount.S: New file. + * sysdeps/cris/bits/endian.h: New file. + * sysdeps/cris/bits/setjmp.h: New file. + * sysdeps/cris/bits/string.h: New file. + * sysdeps/cris/dl-machine.h: New file. + * sysdeps/cris/elf/start.S: New file. + * sysdeps/cris/machine-gmon.h: New file. + * sysdeps/cris/memcopy.h: New file. + * sysdeps/cris/memusage.h: New file. + * sysdeps/cris/setjmp.S: New file. + * sysdeps/cris/sysdep.h: New file. + * sysdeps/cris/wordcopy.c: New file. + +2001-04-08 Hans-Peter Nilsson + + * elf/elf.h: Add new relocations for CRIS. + +2001-04-08 Hans-Peter Nilsson + + * shlib-versions: Add cases for Linux on CRIS. + +2001-04-08 Hans-Peter Nilsson + + * configure.in (ASM_LINE_SEP tests): Handle CRIS assembly, with + ';' for comments and '@' for line separator. + +2001-04-08 Hans-Peter Nilsson + + * sysdeps/unix/sysv/linux/hppa/sysdep.h (INLINE_SYSCALL): Fix + typo; s/==/=/ for assignment. + +2001-04-08 Hans-Peter Nilsson + + * malloc/Makefile: Correct comment; mtrace is Perl, not AWK. + +2001-04-08 Hans-Peter Nilsson + + * iconv/gconv_simple.c (internal_ucs4_loop_unaligned): Check for + empty input before checking full output. + +2001-04-08 Hans-Peter Nilsson + + * iconv/gconv.c (__gconv): Don't derefer parameter cd before + checking if == -1L. + +2001-04-08 Ulrich Drepper + + * inet/rexec.c (rexec_af): Avoid calling perror with errno being set. + +2001-04-07 Stephen L Moshier + + * sysdeps/ieee754/ldbl-128/e_logl.c: Correct infinity and NaN + return values. + +2001-04-07 Ulrich Drepper + + * stdlib/tst-setcontext.c (main): Add a test for setcontext. + + * sysdeps/unix/sysv/linux/i386/getcontext.S: New file. + * sysdeps/unix/sysv/linux/i386/setcontext.S: New file. + * sysdeps/unix/sysv/linux/i386/makecontext.S: New file. + * sysdeps/unix/sysv/linux/i386/swapcontext.S: New file. + * sysdeps/unix/sysv/linux/i386/ucontext_i.h: New file. + * sysdeps/unix/sysv/linux/i386/Dist: Add ucontext_i.h. + +2001-04-07 Andreas Jaeger + + * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_y1l): Use sincos + instead of separate sin and cos. + (__ieee754_j1l): Likewise. + +2001-04-06 Ulrich Drepper + + * sysdeps/ia64/abort-instr.h: New file. Code by David Mosberger. + + * sysdeps/ia64/atomicity.h: New file. Copied from libstdc++. + + * sysdeps/i386/i486/atomicity.h: Clean up the asms. + + * sysdeps/generic/e_scalb.c: Don't use FE_INVALID unless it's + available. + * sysdeps/generic/e_scalbf.c: Likewise. + * sysdeps/generic/e_scalbl.c: Likewise. + Patch by Mark Hatle . + +2001-04-05 David S. Miller + + * sysdeps/sparc/abort-instr.h: New file. + +2001-04-05 Matt Wilson + + * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER): + added code to parse new 2.4 format. + (GET_NPROCS_CONF_PARSER): Likewise. + +2001-04-05 David S. Miller + + * scripts/config.sub: Recognize sparcv9b like sparcv9. + * configure.in: Add sparcv9b. + * sysdeps/sparc/sparc32/sparcv9b/Implies: New file + * sysdeps/sparc/sparc32/sparcv9b/memcpy.S: New file + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: New file + +2001-04-06 David Mosberger + + * stdlib/tst-setcontext.c: Move st2[] to global scope. + (f2): Verify that stack pointer is inside st2[]. + + * sysdeps/unix/sysv/linux/ia64/getcontext.S: It helps to save r12. + * sysdeps/unix/sysv/linux/ia64/setcontext.S: It helps to restore r12. + +2001-04-06 Ulrich Drepper + + * timezone/antarctica: Update from tzdata2001b. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + + * iconv/iconv_open.c: Move strip and upstr definitions... + * iconv/gconv_charset.h: ...here. New file. + * iconv/gconv_db.c (once): Move to file level. + (do_lookup_alias): Split out from __gconv_find_transform. + (__gconv_find_transform): Call do_lookup_alias. + (__gconv_loopup_alias): New function. + * locale/langinfo.h: Define _NL_*_CODESET values for all categories + but LC_CTYPE. + * locale/categories.def: Add entries for new _NL_*_CODESET values. + * locale/C-ctype.c: Use _nl_C_codeset to initialize CODESET entry. + * locale/C-address.c: Initialize _NL_*_CODESET element. + * locale/C-collate.c: Likewise. + * locale/C-identification.c: Likewise. + * locale/C-measurement.c: Likewise. + * locale/C-messages.c: Likewise. + * locale/C-monetary.c: Likewise. + * locale/C-name.c: Likewise. + * locale/C-numeric.c: Likewise. + * locale/C-paper.c: Likewise. + * locale/C-telephone.c: Likewise. + * locale/C-time.c: Likewise. + * locale/localeinfo.h: Declare _nl_C_codeset. + * locale/C_name.c: Define _nl_C_codeset. + * locale/findlocale.c: Before accepting locale check that the used + charset does not conflict with what the locale name said. + * locale/programs/ld-address.c: Emit codeset information. + * locale/programs/ld-collate.c: Likewise. + * locale/programs/ld-identification.c: Likewise. + * locale/programs/ld-measurement.c: Likewise. + * locale/programs/ld-messages.c: Likewise. + * locale/programs/ld-monetary.c: Likewise. + * locale/programs/ld-name.c: Likewise. + * locale/programs/ld-numeric.c: Likewise. + * locale/programs/ld-paper.c: Likewise. + * locale/programs/ld-telephone.c: Likewise. + * locale/programs/ld-time.c: Likewise. + + * localedata/tests-mbwc/tst_funcs.h (TST_HEAD_LOCALE): It is an error + if the locale data couldn't be found. + + * string/Makefile: Define tst-strxfrm-ENV. + + * ysdeps/unix/sysv/linux/ia64/getcontext.S: Fix comment. + +2001-04-06 Andreas Jaeger + + * include/sys/profil.h: New file. + + * dlfcn/modatexit.c: Add prototypes to silence GCC. + * dlfcn/modcxaatexit.c: Likewise. + * elf/globalmod1.c: Likewise. + +2001-04-05 David S. Miller + + * elf/elf.h (HWCAP_SPARC_ULTRA3): Define it. + * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Add it to + capability flags table and HWCAP_IMPORTANT, increase + _DL_HWCAP_COUNT to 6. + * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. + +2001-04-04 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): Fix + initialization of stack_end (bug reported by Zheng Gengbin + ). + +2001-04-05 Ulrich Drepper + + * sysdeps/i386/fpu/libm-test-ulps: Relax errors for asinl. + +2001-04-05 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: New file. + +2001-04-05 Ulrich Drepper + + * sysdeps/ieee754/ldbl-96/e_asinl.c: Correct handling of +-Inf. + * sysdeps/i386/fpu/e_asinl.S: Removed. Too inaccurate. + + * login/tst-utmp.c: Make file usable again in tst-utmpx.c. + +2001-04-04 Ulrich Drepper + + * sysdeps/unix/sysv/aix/dl-libc.c: Don't use the ELF version, + define simple replacements here. Patch by Michael Keezer. + + * sysdeps/ieee754/ldbl-128/e_logl.c: New file. + * sysdeps/ieee754/ldbl-96/e_asinl.c: New file. + Contributed by Stephen L Moshier . + + * posix/fnmatch_loop.c: Undefine NEW_PATTERN when it is not used + anymore. + +2001-04-01 Andreas Jaeger + + * sysdeps/generic/s_nextafter.c (NO_LONG_DOUBLE): Add nexttowardl + alias. + + * sysdeps/generic/s_fma.c (NO_LONG_DOUBLE): Add fmal alias. + +2001-04-04 Ulrich Drepper + + * sysdeps/unix/sysv/linux/s390/s390-64/Dist: Add ucontext_i.h. + * sysdeps/unix/sysv/linux/s390/s390-32/Dist: Likewise. + +2001-04-04 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h: New file. + * sysdeps/unix/sysv/linux/s390/swapcontext.c: New file. + +2001-04-04 Andreas Jaeger + + * sysdeps/powerpc/dl-machine.h (ELF_MACHINE_NO_REL): Move to right + place. + +2001-04-04 Ulrich Drepper + + * sunrpc/rpc_scan.c (symbols): Add entry for HYPER. + * sunrpc/rpc_scan.h (enum tok_kind): Add TOK_HYPER. + * sunrpc/rpc_parse.c (get_type): Handle TOK_HYPER. + (unsigned_dec): Likewise. + Patch by atai@jezebel.dreamhost.com. + + * nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): Pass + pointer to int as last parameter of yp_match. + Patch by kanazawa@flab.fujitsu.co.jp. + +2001-04-03 Ulrich Drepper + + * resolv/netdb.h (gai_strerror): Make return value const. + * sysdeps/generic/gai_strerror.c (gai_strerror): Likewise. + * sysdeps/posix/gai_strerror.c (gai_strerror): Likewise. + Add strings for new error values. + +2001-03-29 Michael Keezer + + * posix/tst-gnuglob.c: Added ifdef _DIRENT_HAVE_D_TYPE. + * login/tst-utmp.c: Handle case where ut_tv is not available but + ut_time is. + * sysdeps/unix/sysv/aix/utmpx.h: New file. + * sysdeps/unix/sysv/aix/bits/utmpx.h: Added + _HAVE_UT_TYPE/PID/ID/TV/HOST defines. + * sysdeps/unix/sysv/aix/libc-start.c: Removed temp code and made stub. + * sysdeps/unix/sysv/aix/gettimeofday.c: New file added routines + to access RTCU timer reg. + * sysdeps/unix/sysv/aix/Makefile: Remove /usr/lib/crt0.o + added dl-libc, dl-open,dl-sym, dl-close to misc. + * sysdeps/unix/sysv/aix/start.c: New file. Start code. + * sysdeps/unix/sysv/aix/dlldr.h: New file. AIX __loadx defines. + * sysdeps/unix/sysv/aix/dl-close.c: New file. AIX dl-close. + * sysdeps/unix/sysv/aix/dl-open.c: New file. AIX dl-open. + * sysdeps/unix/sysv/aix/dl-sym.c: New file. AIX dl-sym. + * sysdeps/unix/sysv/aix/dl-libc.c: New file. libc_dl-xxx support. + * sysdeps/generic/strtoll.c: Added SHLIB_COMPAT(libc,GLIBC_2_0, + GLIBC_2_2). + * sysdeps/generic/strtoull.c: Likewise. + * sysdeps/powerpc/ppc-mcount.S: Added nop after bl instruction. + * sysdeps/unix/sysv/aix/powerpc/memset.c: New file to include + sysdeps/generic/memset.c. + * sysdeps/unix/sysv/aix/getpeername.c: Define __getpeername. + +2001-04-03 Ulrich Drepper + + * iconv/Makefile (CFLAGS-charmap.c): Add -DNEED_NULL_POINTER. + * locale/programs/charmap.c: Define null_pointer if + NEED_NULL_POINTER is defined. + + * misc/dirname.c (dirname): Handle multiple slashes correctly. + +2001-04-03 Martin Schwidefsky + + * sysdeps/s390/s390-64/initfini.c: Fix __gmon_start__ GOT access. + +2001-04-03 Martin Schwidefsky + + * sysdeps/s390/s390-32/bcopy.S: Optimize for speed. + * sysdeps/s390/s390-64/bcopy.S: Likewise. + * sysdeps/s390/s390-32/mempcy.S: Likewise. + * sysdeps/s390/s390-64/memcpy.S: Likewise. + +2001-04-02 Bruno Haible + + * manual/message.texi (Advanced gettext functions): More specific + syntax in the plural formula examples. + +2001-04-02 Franz Sirl + + * sysdeps/powerpc/atomicity.h: Silence warnings. + * sysdeps/powerpc/dl-machine.h: Likewise. + * sysdeps/powerpc/register-dump.h: Likewise. + * sysdeps/powerpc/fpu/s_lrint.c: Likewise. + +2001-04-02 Andreas Jaeger + + * misc/tst-dirname.c (main): Add more tests, derived from a bug + report by Michael Kerrisk . + +2001-04-01 Andreas Jaeger + + * debug/xtrace.sh (pcprofileso): Use SLIBDIR since libpcprofile.so + is installed there. + * malloc/memusage.sh (memusageso): Likewise for libmemusage.so. + +2001-04-01 H.J. Lu + + * posix/annexc.c (macrofile): Renamed from TMPFILE and set to + tmpnam (NULL). + * stdlib/isomac.c (macrofile): Likewise. + +2001-03-30 Thorsten Kukuk + + * inet/rcmd.c: Allow AF_UNSPEC as parameter. + * nis/ypclnt.c (yp_all): Print error message only at last try, + check for protocoll error only if we don't have a network error. + +2001-04-02 Andreas Schwab + + * resolv/res_data.c (res_isourserver): Fix cast. + +2001-04-02 Andreas Jaeger + + * sysdeps/unix/sysv/linux/hppa/umount.c: Add prototype for + __umount2. + + * sysdeps/i386/dl-machine.h (RTLD_START): Don't use multi-line + strings. + (ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise. + + * sysdeps/ieee754/dbl-64/uroot.h: Add missing braces arount + initializers. + * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Likewise. + + * elf/rtld.c (print_statistics)[!HP_TIMING_NONAVAIL]: Avoid + warning about unused variable. + + * string/string.h (strndupa): Add cast for C++ conformance. + (strdupa): Likewise. + Fixes PR libc/2173, reported by tbrowder@home.com. + +2001-03-30 Roland McGrath + + * sysdeps/mach/hurd/Makefile ($(link-rpcuserlibs)): Don't append + options after $(build-module), which is no longer a single command. + (LDFLAGS-link-rpcuserlibs): New variable to hold those options. + (LDFLAGS-libmachuser-link.so, LDFLAGS-libhurduser-link.so): New + variables using it. Reported by Mark Kettenis . + +2001-03-11 Roland McGrath + + * elf/rtld.c (dl_main): Add cast to quiet warning. + * elf/dl-load.c (_dl_map_object_from_fd): Likewise. + * iconv/gconv_conf.c (__gconv_get_path): Likewise. + (__gconv_read_conf): Likewise. + * iconv/gconv_db.c (gen_steps): Likewise. + (__gconv_find_transform): Likewise. + * locale/programs/charmap-dir.c (fopen_uncompressed): Likewise. + (fopen_uncompressed): Use const in second argument's type. + +2001-03-11 Roland McGrath + + * sysdeps/mach/hurd/dl-sysdep.c (__writev): New function. + + * mach/mach_error.h: Fix ancient #endif syntax. + * hurd/hurdmalloc.c: Likewise. + + * sysdeps/generic/atomicity.h (exchange_and_add, atomic_add, + compare_and_swap): Add volatile qualifier to first arg, to bring + these prototypes in line with all the other implementations. + Add a #warning to remind the builder that these are not atomic. + +2001-03-04 Roland McGrath + + * hurd/vpprintf.c (vpprintf) [USE_IN_LIBIO]: Use innermore first + member of TEMP_F so its type is _IO_FILE * as expected. + + * hurd/fopenport.c (seekio): Conditionalize type of POS argument + on [USE_IN_LIBIO]. Check the value for overflow, since for libio + it might exceed off_t's range. + +2001-02-25 Roland McGrath + + * sysdeps/mach/hurd/sysd-stdio.c (__stdio_reopen): Use prototype. + * sysdeps/unix/bsd/getpt.c (__posix_openpt): Likewise. + + * sysdeps/mach/hurd/i386/intr-msg.h (SYSCALL_EXAMINE): Make this a + macro instead of an inline function, + (MSG_EXAMINE): Likewise. + + * hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): Remove extraneous ##. + + * hurd/get-host.c: Include for decls of built-ins. + * hurd/hurdchdir.c: Likewise. + * sysdeps/mach/hurd/i386/sigreturn.c: Likweise. + * sysdeps/mach/hurd/opendir.c: Likewise. + + * mach/mach_init.c: Include for _exit decl. + + * mach/errsystems.awk: Give output file a trailing newline. + + * mach/Machrules (MIG): Prepend CC='${CC}' to the mig command, so that + the script will use our compiler for the cpp stage. + + With --enable-all-warnings we get a whole bunch of warnings, + and these are just a few fixes; there are more needed to silence it. + * mach/mach/mig_support.h (__mig_strncpy, mig_strncpy): Add extern + decls before extern inline defns to quiet gcc warning. + * hurd/hurd/threadvar.h (__hurd_threadvar_location_from_sp): Likewise. + * sysdeps/mach/i386/machine-sp.h (__thread_stack_pointer): Likewise. + +2001-03-31 Andreas Jaeger + + * sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_RAWHDLC): Added. + (ARPHRD_HDLC): Define as alias for ARPHRD_CISCO. + (ARPHRD_CISCO): New. + Changes from Linux 2.4.3. + +2001-03-30 Isamu Hasegawa + + * posix/regex.c: Avoid an access violation if malloc fails. + +2001-03-30 Andreas Jaeger + + * sysdeps/alpha/ldiv.S (ldiv): Add alias for imaxdiv. + +2001-03-29 Ulrich Drepper + + * posix/regex.c: Remove unnecessary ifs. + + * math/bits/mathcalls.h: Remove infnan declaration. + +2001-03-29 H.J. Lu + + * include/endian.h: Define BIG_ENDI, LITTLE_ENDI, HIGH_HALF, + and LOW_HALF only if _LIBC is defined and _ISOMAC is not defined. + * stdlib/isomac.c (fmt): Define _LIBC and _ISOMAC. + +2001-03-29 Isamu Hasegawa + + * posix/regex.c: Fix typo and add a sentinel. + +2001-03-29 Ulrich Drepper + + * sysdeps/unix/sysv/linux/shm_open.c: Open new file always with + O_NOFOLLOW. Suggested by Christoph Roland. + +2001-03-27 Martin Schwidefsky + + * sysdeps/s390/bits/string.h: New unified 31/64 bit string.h. + * sysdeps/s390/s390-32/bits/string.h: Remove. + * sysdeps/s390/s390-64/bits/string.h: Remove. + * sysdeps/s390/s390-32/strcmp.S: New file. + * sysdeps/s390/s390-64/strcmp.S: New file. + +2001-03-27 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: Fix typo. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: Likewise. + +2001-03-27 Ulrich Drepper + + * version.h (VERSION): Bump to 2.2.3. + + * stdlib/isomac.c (fmt): Don't define _LIBC. + * include/endian.h: Define BIG_ENDI, LITTLE_ENDI, HIGH_HALF, and + LOW_HALF only if _LIBC is defined. + + * sysdeps/i386/fpu/libm-test-ulps: Slight adjustment of yn() error. + + * posix/fnmatch_loop.c (FCT): Handle !() after * special like @() + and +(). + * posix/tst-fnmatch.input: Add test cases for matching empty strings. + + * sysdeps/ieee754/dbl-64/endian.h: Removed. Move definitions... + * include/endian.h: ...to here. + +2001-03-27 kaz Kojima + + * sysdeps/sh/sys/ucontext.h (NFREG): Rename to NFPREG. + * sysdeps/unix/sysv/linux/sh/sys/ucontext.h (NFREG): Likewise. + +2001-03-27 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/ldconfig.h: Fix typo. + +2001-03-26 Ulrich Drepper + + * sysdeps/ia64/fpu/Dist: Add new files to distribute. + * sysdeps/unix/sysv/linux/s390/s390-64/Dist: Likewise. + * sysdeps/unix/sysv/linux/ia64/Dist: Likewise. + + * gmon/Makefile (headers): Add sys/profil.h. + +2001-03-18 Andreas Jaeger + + * manual/install.texi (Tools for Compilation): Advise to use GCC + 2.95.3. + (Supported Configurations): Mention s390x. + +2001-03-26 Ben Collins + + * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add MAP_* and MADV_* + defines to match other architectures. + +2001-03-26 Ulrich Drepper + + * libio/Makefile (tests): Add tst-ext. + * libio/tst-ext.c: New file. + + * libio/iosetvbuf.c (_IO_setvbuf): Clear line buffer flag for _IONBF. + +2001-03-25 Ulrich Drepper + + Add changes which were in this form in the original patch by + Eric Norum . + * include/rpc/rpc.h: Remove svc_fdset, rpc_createerr, svc_pollfd, and + svc_max_pollfd. + * sunrpc/rpc/rpc.h: Declare __rpc_thread_svc_fdset, + __rpc_thread_createerr, __rpc_thread_svc_pollfd, and + __rpc_thread_svc_max_pollfd. + Define svc_fdset, get_rpc_createerr, svc_pollfd, and + svc_max_pollfd. + * sunrpc/rpc_thread.c: Handle first thread special, it uses the + global variables. + Define __rpc_thread_svc_fdset, __rpc_thread_createerr, + __rpc_thread_svc_pollfd, and __rpc_thread_svc_max_pollfd. + * sunrpc/Versions [libc] (GLIBC_2.2.3): Export __rpc_thread_svc_fdset, + __rpc_thread_createerr, __rpc_thread_svc_pollfd, and + __rpc_thread_svc_max_pollfd. + * sunrpc/clnt_gen.c: Replace use of rpc_createerr by call to + get_rpc_createerr. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_simp.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/pm_getport.c: Likewise. + + * sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): getgroups32 + syscall checks for negative n so don't test here as well. + +2001-03-23 Jes Sorensen + + * sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ... + * sysdeps/ia64/sysdep.h: ...here. + + * sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define. + * sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define. + + * sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to + declare instead of LEAF(). Suggestion from David Mosberger. + +2001-03-21 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind + directives. + (PSEUDO): Drop .psr and .lsb directives. + + * sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto. Add unwind + directives. + * sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto. + + * sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb + directives etc. + * sysdeps/unix/sysv/linux/ia64/brk.S: Ditto. + * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto. + * sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no + longer needed). Add unwind directives. + + * sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS, + ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE. + +2001-03-21 Paul Eggert + + * posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro. + (RE_SYNTAX_POSIX_EGREP): Use it. + * posix/regex.c (regex_compile): Implement it. + +2001-03-21 Paul Eggert + + * posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow. + Rewrite to avoid duplicate code. + +2001-03-21 H.J. Lu + + * elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out + for cross-compiling. + ($(objpfx)tst-pathopt.out): Undo the last change. + +2001-03-24 Mark Kettenis + + * sysdeps/mach/hurd/i386/bits/sigcontext.h (sc_sp, sc_fp, sc_pc, + sc_ps): Define as aliases for sc_uesp, sc_ebl, sc_eip and sc_efl. + + * sysdeps/mach/hurd/i386/init-first.c: Include . + (_dl_argv): Declare. + (init) [SHARED]: Readjust _dl_argv if we switched to a new stack. + +2001-03-22 Andreas Jaeger + + * iconvdata/Makefile (generated): Add iconv-test.xxx. + + * posix/Makefile (generated): Add bug-regex2.mtrace and + bug-regex2-mem. + +2001-03-21 Ulrich Drepper + + * csu/version.c (__gnu_get_libc_release): Add prototype. + (__gnu_get_libc_version): Likewise. + * include/gnu/libc-version.h: Remove prototypes for not exported + functions. + +2001-03-21 Jes Sorensen + + * sysdeps/unix/sysv/linux/ia64/makecontext.c: Include libintl.h + for internationalized printfs to work. + +2001-03-09 Bruno Haible + + * intl/dcigettext.c (transmem_block_t): Change to unsigned char, to + avoid compiler warning. + (_nl_find_msg): Add casts to avoid compiler warnings. + +2001-03-21 Ulrich Drepper + + * gmon/Makefile (routines): Add sprofil. + (tests): Add tst-sprofil. + (noprof): Add sprofil. + * gmon/Versions [libc] (GLIBC_2.2.3): Add sprofil. + +2001-03-20 David Mosberger + + * sysdeps/generic/sprofil.c: New file. + * sysdeps/posix/sprofil.c: New file. + * gmon/tst-sprofil.c: New file. + * gmon/sys/profil.h: New file. + +2001-03-20 Andreas Schwab + + * include/unistd.h: Adjust prototype of __gethostname. + +2001-03-20 Jakub Jelinek + + * sysdeps/sparc/stackinfo.h: New file. + +2001-03-21 Andreas Jaeger + + * elf/global.c (main): Use proper prototype. + +2001-03-20 Ulrich Drepper + + * sunrpc/Makefile (routines): Add rpc_thread. + (CPPFLAGS): Add -D_RPC_THREAD_SAFE. + * sunrpc/rpc_thread.c: New file. + * sunrpc/Versions [libc] (GLIBC_2.2.3): Export __rpc_thread_destroy. + * sunrpc/auth_none.c: Don't use global variables. Access state in + thread-local storage. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_raw.c: Likewise. + * sunrpc/clnt_simp.c: Likewise. + * sunrpc/key_call.c: Likewise. + * sunrpc/rpc_common.c: Likewise. + * sunrpc/svc.c: Likewise. + * sunrpc/svc_raw.c: Likewise. + * sunrpc/svc_simple.c: Likewise. + * sunrpc/svcauth_des.c: Likewise. + * hurd/hurd/threadvar.h (enum __hurd_threadvar_index): Add + _HURD_THREADVAR_RPC_VARS. + * sysdeps/generic/bits/libc-tsd.h: Mention _LIBC_TSD_KEY_RPC_VARS. + * include/rpc/rpc.h: Define data structures for internal thread-local + "global" variables. + Based on patches by Eric Norum . + + * elf/dl-load.c: Various little optimizations. + + * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Return + LINUX_LINK_MAX only if the statfs function is not implemented for + the filesystem. + + * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Return + LINUX_LINK_MAX only if the fstatfs function is not implemented for + the filesystem. + +2001-03-19 Ulrich Drepper + + * elf/dl-dst.h (DL_DST_COUNT): Add __builtin_expect. + + * elf/dl-load.c (_dl_dst_count): Make DST recognition more robust. + (_dl_dst_substitute): Likewise. + +2001-03-17 Bruno Haible + + * intl/loadmsgcat.c (_nl_load_domain) [!_LIBC]: Use fstat, not fstat64. + +2001-03-17 Bruno Haible + + * intl/gettextP.h (struct expression): Add operators lnot, less_than, + greater_than, less_or_equal, greater_or_equal. Replace args2/args3 + union by a 'nargs' counter and an 'args[]' array. + * intl/plural.y: Don't include stdarg.h. + (new_exp): Take an array of arguments instead of varargs. + (new_exp_0, new_exp_1, new_exp_2, new_exp_3): New functions. + ('?' ':'): Make right-associative. + (EQUOP2): New token, replaces '=' and '!'. + (CMPOP2): New token. + (ADDOP2): New token, replaces '+' and '-'. + (MULOP2): New token, replaces '*', '/' and '%'. + ('!'): New token. + (exp): Add rules for CMPOP2 and '!'. Don't call YYABORT. + (start): Call YYABORT here. + (FREE_EXPRESSION): Update. + (yylex): Don't skip "\\n". Recognize comparison and '!' operators. + Update for new token symbols. + * intl/loadmsgcat.c (plvar, plone, germanic_plural, + init_germanic_plural): Update. + * intl/dcigettext.c (_nl_find_msg): Optimize for space. + (plural_eval): Recognize comparison and '!' operators. Optimize for + space. + +2001-03-10 Bruno Haible + + * intl/loadmsgcat.c (_nl_load_domain): locale_charset() doesn't return + NULL any more. + +2001-01-05 Bruno Haible + + * intl/loadmsgcat.c: Include headers needed for alloca(). + (freea): New macro. + (_nl_load_domain): Add fallback code for platforms lacking alloca. + * intl/localealias.c: (ADD_BLOCK, FREE_BLOCK): Remove macros. + (freea): New macro. + (read_alias_file): Simplify fallback code for platforms lacking + alloca. + +2001-01-07 Bruno Haible + + * intl/gettextP.h (__gettextdebug): Remove declaration. + (__gettext_free_exp, __gettextparse): Convert prototype to K&R C + syntax. + (gettext_free_exp__, gettextparse__): New non-libc declarations. + * intl/plural.y [!_LIBC]: Define gettextparse__, gettext_free_exp__, + not __gettextparse, __gettext_free_exp. + * intl/loadmsgcat.c [!_LIBC]: Use gettextparse__, not __gettextparse. + +2001-02-24 Bruno Haible + + * intl/dcigettext.c: Update comment about HAVE_LOCALE_NULL. + +2001-01-05 Bruno Haible + + * intl/loadmsgcat.c (_nl_load_domain): Add fallback code for platforms + lacking strtoul, like SunOS4. + +2001-01-05 Bruno Haible + + * intl/l10nflist.c (_nl_normalize_codeset): Use tolower, not _tolower. + +2001-01-05 Bruno Haible + + * intl/bindtextdom.c (set_binding_values): Convert prototype to K&R C + syntax. + * intl/dcigettext.c (transcmp): Convert to K&R C syntax. + * intl/explodename.c (_nl_find_language): Convert to K&R C syntax. + * intl/plural.y (__gettext_free_exp, yylex, yyerror): Convert to K&R C + syntax. + +2001-01-07 Bruno Haible + + * intl/gettextP.h (gettext__, dgettext__, dcgettext__, textdomain__, + bindtextdomain__, bind_textdomain_codeset__): New declarations, from + old libgettext.h. + * intl/bindtextdom.c: Include libgnuintl.h instead of libgettext.h. + * intl/dcgettext.c: Likewise. + * intl/dcigettext.c: Likewise. + * intl/dcngettext.c: Likewise. + * intl/dngettext.c: Likewise. + * intl/finddomain.c: Likewise. + * intl/ngettext.c: Likewise. + * intl/textdomain.c: Likewise. + * intl/dgettext.c: Include libgnuintl.h instead of libgettext.h. + Include gettextP.h. + * intl/gettext.c: Likewise. Don't include locale.h. + +2001-03-17 Bruno Haible + + * intl/gettextP.h (ZERO): New macro. + (struct binding): Always use ZERO. + * intl/bindtextdom.c (offsetof): Provide fallback for platforms that + lack it, like SunOS4. + (set_binding_values): Use offsetof, not sizeof. + * intl/dcigettext.c (offsetof): Provide fallback for platforms that + lack it, like SunOS4. + (ZERO): Remove macro. + (struct transmem_list): Use ZERO. + (DCIGETTEXT): Use offsetof, not sizeof. + +2001-03-17 Bruno Haible + + * intl/gettextP.h: Include . Include gettext.h, for + nls_uint32. + * intl/bindtextdom.c: Don't include gettext.h. + * intl/dcgettext.c: Likewise. + * intl/dcigettext.c: Likewise. + * intl/dcngettext.c: Likewise. + * intl/dngettext.c: Likewise. + * intl/finddomain.c: Likewise. + * intl/localealias.c: Likewise. + * intl/ngettext.c: Likewise. + * intl/plural.y: Likewise. + * intl/textdomain.c: Likewise. + +2001-03-17 Bruno Haible + + * intl/gettext.h: Don't include . + +2001-03-17 Bruno Haible + + * intl/Makefile (CPPFLAGS): Set LOCALEDIR instead of GNULOCALEDIR. + * intl/dcigettext.c (_nl_default_dirname): Initialize with LOCALEDIR. + +2001-03-19 Ulrich Drepper + + * sysdeps/unix/i386/i686/tempname.c: New file. + + * sysdeps/posix/tempname.c (__gen_tempname): If RANDOM_BITS is + defined use this macro to get some bits of randomness instead of + the usual gettimeofday or time calls. + +2001-03-16 Paul Eggert + + * sysdeps/posix/tempname.c (uint64_t): Define to uintmax_t if + not defined, and if UINT64_MAX is not defined. + +2001-03-19 Ulrich Drepper + + * elf/cache.c: Mark and have translated a few more messages. + +2001-03-19 Martin Schwidefsky + + * elf/cache.c: Add case for FLAG_S390_LIB64. + * sysdeps/generic/ldconfig.h: Add define for FLAG_S390_LIB64. + * sysdeps/unix/sysv/linux/s390/ldconfig.h: New file. + * sysdeps/unix/sysv/linux/s390/readelflib.c: New file. + +2001-03-19 Ulrich Drepper + + * string/Makefile (tests): Add tst-strxfrm. + * string/tst-strxfrm.c: New file. Based on a test case by Paul Eggert. + * string/Depend: New file. + +2001-03-19 Paul Eggert + + * string/strxfrm.c (strxfrm): strxfrm should return 0, not 1, + when given the empty string in nontrivial locales. + +2001-03-17 H.J. Lu + + * manual/Makefile (install): Use $(INSTALL_DATA) instead of + cp to install `dir'. + +2001-03-19 Andreas Schwab + + * Makerules (build-shlib): Make sure exit codes get checked + properly. + +2001-03-18 Ulrich Drepper + + * Makerules (build-shlib): Remove unnecessary slashes introduced in + last change. + + * configure.in: Test for -Bgroup option of linker. + * config.make.in: Define have-Bgroup. + + * conform/data/unistd.h-data: Require gethostname. + * posix/unistd.h: Make gethostname prototype available for + __USE_XOPEN2K. + + * crypt/Makefile: When generating DSO link with libc_nonshared.a. + * debug/Makefile: Likewise. + * dlfcn/Makefile: Likewise. + * hesiod/Makefile: Likewise. + * iconvdata/extra-module.mk: Likewise. + * locale/Makefile: Likewise. + * login/Makefile: Likewise. + * math/Makefile: Likewise. + * nis/Makefile: Likewise. + * nss/Makefile: Likewise. + * resolv/Makefile: Likewise. + * rt/Makefile: Likewise. + +2001-03-17 Ulrich Drepper + + * inet/Makefile (tests): Remove left-over comment. + + * posix/unistd.h (gethostname): Change type of second parameter + back to size_t as per upcoming XPG6. + * sysdeps/unix/sysv/aix/gethostname.c: Change type of second + parameter back to size_t as per upcoming XPG6. + * sysdeps/unix/sysv/sysv4/gethostname.c: Likewise. + * sysdeps/unix/sysv/gethostname.c: Likewise. + * sysdeps/mach/hurd/gethostname.c: Likewise. + * sysdeps/generic/gethostname.c: Likewise. + +2001-03-16 Ulrich Drepper + + * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r): + Handle NaN here. + + * sysdeps/unix/sysv/linux/ia64/makecontext.c (__makecontext): + Internationalize. + +2001-02-06 Jakub Jelinek + + * elf/dl-load.c (_dl_map_object): Don't test l_opencount when + looking for name matches. + +2001-02-26 Jakub Jelinek + + * sysdeps/generic/sigcontextinfo.h (CALL_SIGHANDLER): Define. + * sysdeps/mach/hurd/i386/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/s390/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise. + +2001-03-16 Ulrich Drepper + + * sysdeps/ieee754/ldbl-96/s_erfl.c: New file. + Contributed by Stephen L. Moshier . + + * sysdeps/i386/fpu/libm-test-ulps: Adjust for addition of erfl and + erfcl. + * sysdeps/ia64/fpu/libm-test-ulps: Likewise. + +2001-03-16 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): + Drop hack that was needed for 2.1.1 kernel headers. + + * sysdeps/unix/sysv/linux/ia64/ucontext_i.h: New file. + + * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Rewrite to make it + overlay with kernel's "struct sigcontext". + + * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_headers): Add + sys/rse.h for "misc" subdir. + (sysdep_routines): Add __start_context for "stdlib" subdir. + + * sysdeps/unix/sysv/linux/ia64/sys/rse.h: New file (based on + kernel file of the same name). + + * stdlib/Makefile (tests): Add tst-setcontext. + * stdlib/tst-setcontext.c: New file (based on a sample program by + Uli Drepper). + + * sysdeps/unix/sysv/linux/ia64/setcontext.S: New file. + * sysdeps/unix/sysv/linux/ia64/getcontext.S: New file. + * sysdeps/unix/sysv/linux/ia64/__start_context.S: New file. + * sysdeps/unix/sysv/linux/ia64/makecontext.c: New file. + * sysdeps/unix/sysv/linux/ia64/swapcontext.c: New file. + + * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): Use extr.u + instead of shift & and. + +2001-03-16 Martin Schwidefsky + + * sysdeps/s390/s390-64/bits/huge_val.h: Move to... + * sysdeps/s390/bits/huge_val.h: ...here. + * sysdeps/s390/s390-32/bit/huge_val.h: Remove. + * sysdeps/s390/s390-64/ffs.c: Move to... + * sysdeps/s390/ffs.c: ...here. + * sysdeps/s390/s390-32/ffs.c: Remove. + +2001-03-16 Jakub Jelinek + + * elf/ldconfig.c (search_dir): Remove bogus diagnostic, instead + update osversion from more recent library. + +2001-03-13 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/Dist: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/Dist: ...here. + * sysdeps/unix/sysv/linux/s390/Makefile: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: ...here. + * sysdeps/unix/sysv/linux/s390/Versions: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/Versions: ...here. + * sysdeps/unix/sysv/linux/s390/alphasort64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/alphasort64.c: ...here. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/bits/fcntl.h: ...here. + * sysdeps/unix/sysv/linux/s390/bits/mman.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/bits/mman.h: ...here. + * sysdeps/unix/sysv/linux/s390/bits/resource.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/bits/resource.h: ...here. + * sysdeps/unix/sysv/linux/s390/bits/stat.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/bits/stat.h: ...here. + * sysdeps/unix/sysv/linux/s390/chown.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/chown.c: ...here. + * sysdeps/unix/sysv/linux/s390/clone.S: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: ...here. + * sysdeps/unix/sysv/linux/s390/fchown.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/fchown.c: ...here. + * sysdeps/unix/sysv/linux/s390/fcntl.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/fcntl.c: ...here. + * sysdeps/unix/sysv/linux/s390/fxstat.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/fxstat.c: ...here. + * sysdeps/unix/sysv/linux/s390/getdents64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getdents64.c: ...here. + * sysdeps/unix/sysv/linux/s390/getegid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: ...here. + * sysdeps/unix/sysv/linux/s390/geteuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/getgid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: ...here. + * sysdeps/unix/sysv/linux/s390/getgroups.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: ...here. + * sysdeps/unix/sysv/linux/s390/getresgid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: ...here. + * sysdeps/unix/sysv/linux/s390/getresuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/getrlimit.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c: ...here. + * sysdeps/unix/sysv/linux/s390/getrlimit64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getrlimit64.c: ...here. + * sysdeps/unix/sysv/linux/s390/getuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/lchown.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: ...here. + * sysdeps/unix/sysv/linux/s390/lockf64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/lockf64.c: ...here. + * sysdeps/unix/sysv/linux/s390/lxstat.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/lxstat.c: ...here. + * sysdeps/unix/sysv/linux/s390/mmap.S: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: ...here. + * sysdeps/unix/sysv/linux/s390/mmap64.S: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: ...here. + * sysdeps/unix/sysv/linux/s390/msgctl.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/msgctl.c: ...here. + * sysdeps/unix/sysv/linux/s390/oldgetrlimit64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/oldgetrlimit64.c: ...here. + * sysdeps/unix/sysv/linux/s390/readdir64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/readdir64.c: ...here. + * sysdeps/unix/sysv/linux/s390/readdir64_r.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/readdir64_r.c: ...here. + * sysdeps/unix/sysv/linux/s390/register-dump.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h: ...here. + * sysdeps/unix/sysv/linux/s390/scandir64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/scandir64.c: ...here. + * sysdeps/unix/sysv/linux/s390/semctl.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/semctl.c: ...here. + * sysdeps/unix/sysv/linux/s390/setegid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setegid.c: ...here. + * sysdeps/unix/sysv/linux/s390/seteuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setfsgid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setfsgid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setfsuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setfsuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setgid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setgid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setgroups.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c: ...here. + * sysdeps/unix/sysv/linux/s390/setregid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setregid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setresgid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setresuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setreuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/setrlimit.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setrlimit.c: ...here. + * sysdeps/unix/sysv/linux/s390/setuid.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/setuid.c: ...here. + * sysdeps/unix/sysv/linux/s390/shmctl.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/shmctl.c: ...here. + * sysdeps/unix/sysv/linux/s390/socket.S: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/socket.S: ...here. + * sysdeps/unix/sysv/linux/s390/sys/procfs.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/sys/procfs.h: ...here. + * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h: ...here. + * sysdeps/unix/sysv/linux/s390/syscall.S: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: ...here. + * sysdeps/unix/sysv/linux/s390/syscalls.list: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list: ...here. + * sysdeps/unix/sysv/linux/s390/sysdep.S: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: ...here. + * sysdeps/unix/sysv/linux/s390/sysdep.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: ...here. + * sysdeps/unix/sysv/linux/s390/versionsort64.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/versionsort64.c: ...here. + * sysdeps/unix/sysv/linux/s390/xstat.c: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/xstat.c: ...here. + +2001-03-13 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/s390-64/Dist: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/elfclass.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/fcntl.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/ipc.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/mman.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/msq.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/resource.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sem.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/shm.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/siginfo.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/sigstack.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/stat.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/bits/types.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/fstatfs64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/ftruncate64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/fxstat64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/getdents.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/getdents64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/getrlimit64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/glob.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/glob64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/lxstat64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/mmap.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/mmap64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/pread64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/pwrite64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/readdir.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/readdir64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/readdir64_r.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/readdir_r.c : New file. + * sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/setrlimit64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sigsuspend.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/socket.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/statfs64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/procfs.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/truncate64.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/xstat.c: New file. + * sysdeps/unix/sysv/linux/s390/s390-64/xstat64.c: New file. + +2001-03-13 Martin Schwidefsky + + * sysdeps/s390/Dist: Move to... + * sysdeps/s390/390-32/Dist: ...here. + * sysdeps/s390/Implies: Move to... + * sysdeps/s390/s390-32/Implies: ...here. + * sysdeps/s390/Makefile: Move to... + * sysdeps/s390/s390-32/Makefile: ...here. + * sysdeps/s390/Versions: Move to... + * sysdeps/s390-32/s390/Versions: ...here. + * sysdeps/s390/add_n.S: Move to... + * sysdeps/s390/s390-32/add_n.S: ...here. + * sysdeps/s390/addmul_1.S: Move to... + * sysdeps/s390/s390-32/addmul_1.S: ...here. + * sysdeps/s390/atomicity.h: Move to... + * sysdeps/s390/s390-32/atomicity.h: ...here. + * sysdeps/s390/backtrace.c: Move to... + * sysdeps/s390/s390-32/backtrace.c: ...here. + * sysdeps/s390/bcopy.S: Move to... + * sysdeps/s390/s390-32/bcopy.S: ...here. + * sysdeps/s390/bits/byteswap.h: Move to... + * sysdeps/s390/s390-32/bits/byteswap.h: ...here. + * sysdeps/s390/bits/huge_val.h: Move to... + * sysdeps/s390/s390-32/bits/huge_val.h: ...here. + * sysdeps/s390/bsd-_setjmp.S: Move to... + * sysdeps/s390/s390-32/bsd-_setjmp.S: ...here. + * sysdeps/s390/bsd-setjmp.S: Move to... + * sysdeps/s390/s390-32/bsd-setjmp.S: ...here. + * sysdeps/s390/bzero.S: Move to... + * sysdeps/s390/s390-32/bzero.S: ...here. + * sysdeps/s390/elf/bsd-_setjmp.S: Move to... + * sysdeps/s390/s390-32/elf/bsd-_setjmp.S: ...here. + * sysdeps/s390/elf/bsd-setjmp.S: Move to... + * sysdeps/s390/s390-32/elf/bsd-setjmp.S: ...here. + * sysdeps/s390/elf/start.S: Move to... + * sysdeps/s390/s390-32/elf/start.S: ...here. + * sysdeps/s390/ffs.c: Move to... + * sysdeps/s390/s390-32/ffs.c: ...here. + * sysdeps/s390/memchr.S: Move to... + * sysdeps/s390/s390-32/memchr.S: ...here. + * sysdeps/s390/memcpy.S: Move to... + * sysdeps/s390/s390-32/memcpy.S: ...here. + * sysdeps/s390/memset.S: Move to... + * sysdeps/s390/s390-32/memset.S: ...here. + * sysdeps/s390/mul_1.S: Move to... + * sysdeps/s390/s390-32/mul_1.S: ...here. + * sysdeps/s390/s390-mcount.S: Move to... + * sysdeps/s390/s390-32/s390-mcount.S: ...here. + * sysdeps/s390/strcpy.S: Move to... + * sysdeps/s390/s390-32/strcpy.S: ...here. + * sysdeps/s390/strncpy.S: Move to... + * sysdeps/s390/s390-32/strncpy.S: ...here. + * sysdeps/s390/sub_n.S: Move to... + * sysdeps/s390/s390-32/sub_n.S: ...here. + +2001-03-13 Martin Schwidefsky + + * sysdeps/s390/s390-64/Dist: New file. + * sysdeps/s390/s390-64/Implies: New file. + * sysdeps/s390/s390-64/Makefile: New file. + * sysdeps/s390/s390-64/__longjmp.c: New file. + * sysdeps/s390/s390-64/add_n.S: New file. + * sysdeps/s390/s390-64/atomicity.h: New file. + * sysdeps/s390/s390-64/backtrace.c: New file. + * sysdeps/s390/s390-64/bcopy.S: New file. + * sysdeps/s390/s390-64/bits/byteswap.h: New file. + * sysdeps/s390/s390-64/bits/huge_val.h: New file. + * sysdeps/s390/s390-64/bits/setjmp.h: New file. + * sysdeps/s390/s390-64/bits/string.h: New file. + * sysdeps/s390/s390-64/bsd-_setjmp.S: New file. + * sysdeps/s390/s390-64/bsd-setjmp.S: New file. + * sysdeps/s390/s390-64/bzero.S: New file. + * sysdeps/s390/s390-64/dl-machine.h: New file. + * sysdeps/s390/s390-64/elf/bsd-_setjmp.S: New file. + * sysdeps/s390/s390-64/elf/bsd-setjmp.S: New file. + * sysdeps/s390/s390-64/elf/setjmp.S: New file. + * sysdeps/s390/s390-64/elf/start.S: New file. + * sysdeps/s390/s390-64/ffs.c: New file. + * sysdeps/s390/s390-64/initfini.c: New file. + * sysdeps/s390/s390-64/memchr.S: New file. + * sysdeps/s390/s390-64/memcpy.S: New file. + * sysdeps/s390/s390-64/memset.S: New file. + * sysdeps/s390/s390-64/s390x-mcount.S: New file. + * sysdeps/s390/s390-64/setjmp.S: New file. + * sysdeps/s390/s390-64/strcpy.S: New file. + * sysdeps/s390/s390-64/strncpy.S: New file. + * sysdeps/s390/s390-64/sub_n.S: New file. + * sysdeps/s390/s390-64/sysdep.h: New file. + +2001-03-13 Martin Schwidefsky + + * scripts/config.guess: Add support for Linux on 64 bit S/390. + * scripts/config.sub: Likewise. + +2001-03-13 Martin Schwidefsky + + * configure.in: Add support for 64 bit S/390. + + * elf/elf.h: Add new relocations for 64 bit S/390. + + * shlib-versions: Add rules for Linux on 64 bit S/390. + +2001-03-13 Martin Schwidefsky + + * sysdeps/s390/__longjmp.c: Move to... + * sysdeps/s390/s390-32/__longjmp.c: ...here. Add code + to load the floating point registers that should be saved + according to the ABI. + + * sysdeps/s390/bits/setjmp.h: Move to... + * sysdeps/s390/s390-32/bits/setjmp.h: ...here. Avoid + the use of long long in the __jmp_buf type definition. + + * sysdeps/s390/bits/string.h: Move to... + * sysdeps/s390/s390-32/bits/string.h: ...here. Add several missing + #ifndef _FORCE_INLINES. + + * sysdeps/s390/dl-machine.h: Move to... + * sysdeps/s390/s390-32/dl-machine.h: ...here. Add a check for the + executables EI_CLASS in elf_machine_matches_host. + + * sysdeps/s390/elf/setjmp.S: Move to... + * sysdeps/s390/s390-32/elf/setjmp.S: ...here. Replace + branches to globally defined symbol __sigsetjmp by branches to + a local label (this avoids the generation of a R_390_PC16DBL + relocation in -fpic code). + + * sysdeps/s390/gmp-mparam.h: Use defines from to + calculate BITS_PER_MP_LIMB, BYTES_PER_MP_LIMB and BITS_PER_LONGINT. + + * sysdeps/s390/initfini.c: Move to... + * sysdeps/s390/s390-32/initfini.c: ...here. Replace ALIGN with + ".align 4,0x07". + + * sysdeps/s390/setjmp.S: Move to... + * sysdeps/s390/s390-32/setjmp.S: ...here. Add code to store the + floating point registers that should be saved according to the ABI. + + * sysdeps/s390/sys/ucontext.h: Remove since it is unused. + + * sysdeps/unix/sysv/linux/s390/sysdep.h: Move to... + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: ...here. Include + sysdeps/s390/s390-32/sysdep.h instead of sysdeps/s390/sysdep.h. + +2001-03-13 Martin Schwidefsky + + * configure.in: Change machine=s390 to machine=s390/s390-32. + + * elf/elf.h: Correct comment for R_390_PLT16DBL. + +2001-03-12 Jakub Jelinek + + * csu/Makefile (abi-tag.h): Define OS and version separately, allow + version to be overriden from config.h. + * csu/abi-note.S: Use OS and version separately, include config.h. + * elf/dl-load.c (_dl_osversion): New. + (_dl_map_object_from_fd): Kill some warnings. + (open_verify): Check .note.ABI-tag of the library if present. + * elf/Makefile (CPPFLAGS-dl-load.c): Add -I$(csu-objpfx). + * elf/cache.c (struct cache_entry): Add osversion. + (print_entry): Print osversion. + (print_cache): Pass osversion to it. + (compare): Sort according to osversion. + (save_cache): Set osversion. + (add_to_cache): Add osversion argument. + * sysdeps/generic/ldconfig.h (add_to_cache, process_file, + process_elf_file): Add osversion argument. + * elf/readlib.c (process_file): Likewise. + * sysdeps/generic/readelflib.c (process_elf_file): Likewise. + * sysdeps/unix/sysv/linux/ia64/readelflib.c (process_elf_file, + process_elf32_file, process_elf64_file): Likewise. + * sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file, + process_elf32_file, process_elf64_file): Likewise. + * sysdeps/unix/sysv/linux/sparc/readelflib.c (process_elf_file, + process_elf32_file, process_elf64_file): Likewise. + * elf/ldconfig.c (manual_link): Pass it. + (search_dir): Issue diagnostic if two libs with the same soname in + the same directory have different .note.ABI-tag. Record osversion in + dlib_entry and use it from there. + (struct lib_entry): Remove. + (struct dlib_entry): Add osversion. + * sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Check + osversion. + * sysdeps/generic/dl-cache.h (struct file_entry_new): Replace __unused + field with osversion. + * sysdeps/generic/ldsodefs.h (_dl_osversion): Declare. + * sysdeps/unix/sysv/linux/init-first.c: Include ldsodefs.h. + * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Save kernel + version in _dl_osversion. + * sysdeps/unix/sysv/linux/configure.in: Define __ABI_TAG_VERSION. + * Makerules (build-shlib-helper, build-module-helper): New. + (build-shlib, build-module-helper): Make sure .note.ABI-tag comes + early. + * config.h.in (__ABI_TAG_VERSION): Add. + * elf/dl-minimal.c (__strtoul_internal): Set endptr on return. + * sysdeps/unix/sysv/linux/i386/dl-librecon.h (EXTRA_LD_ENVVARS): + Handle LD_ASSUME_KERNEL. + * sysdeps/unix/sysv/linux/dl-librecon.h: New. + +2001-03-15 Ulrich Drepper + + * timezone/antarctica: Update from tzdata2001a. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/backward: Likewise. + * timezone/etcetera: Likewise. + * timezone/europe: Likewise. + * timezone/leapseconds: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/systemv: Likewise. + * timezone/yearistype: Likewise. + * timezone/zone.tab: Likewise. + * timezone/tzdump.c: Update from tzcode2001a. + +2001-03-15 H.J. Lu + + * intl/Makefile: Fix a typo. + +2001-03-14 David Mosberger + + * gmon/gmon.c (write_call_graph): Avoid unaligned accesses when + writing arc structures. + +2001-03-15 H.J. Lu + + * elf/Makefile ($(objpfx)tst-pathopt.out): Protected against + cross-compiling. + +2001-03-13 Andreas Schwab + + * posix/PTESTS2C.sed: Replace literal CRs by `\r'. + +2001-03-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Fix test + for control message fitting into message data. + Patch by James Antill . + + * posix/tst-fnmatch.input: Add test case for FNM_PERIOD handling with + FNM_EXTMATCH. + + * posix/fnmatch_loop.c: Optimize handling of ?() and @(). + * posix/fnmatch.c: Define STRLEN and STRCAT appropriately. + + * posix/Versions [libc] (GLIBC_2.2.3): Add fnmatch. + * posix/fnmatch.c: Define with new default version GLIBC_2.2.3 to + avoid running binaries with libc versions without FNM_EXTMATCH support. + + * include/wchar.h: Add prototype for __wcscat. + * wcsmbs/wcscat.c: Define __wcscat and make wcscat weak alias. + + * posix/fnmatch.h (FNM_EXTMATCH): Define. + * posix/fnmatch.c (NO_LEADING_PERIOD): Define. + (posixly_correct): Move global variable here. + (INT, EXT, END): Name new functions defined in fnmatch_loop.c. + (fnmatch): Pretty printing. + * posix/fnmatch_loop.c: Add code to handle FNM_EXTMATCH. + * posix/tst-fnmatch.c: Recognize EXTMATCH flag. + * posix/tst-fnmatch.input: Add tests for extended matching. + + * posix/testfnm.c: Add test for patterns with multiple ** before /. + * posix/fnmatch_loop.c: Fix problem with the test above. + +2001-03-14 Ulrich Drepper + + * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Remove + reference to usqrt. + + * resolv/res_data.c (fp_nquery): Call __res_ninit not __res_init. + +2001-03-12 Andreas Jaeger + + * sysdeps/unix/sysv/linux/i386/readelflib.c (process_elf_file): + Use EM_X86_64 instead of EM_X8664. + +2001-03-12 Ulrich Drepper + + * sysdeps/ieee754/dbl-64/upow.h: Define nZERO and nINF. + + * sysdeps/ieee754/dbl-64/e_remainder.c: Fix handling of boundary + conditions. + + * sysdeps/ieee754/dbl-64/e_pow.c: Fix handling of boundary + conditions. + + * sysdeps/ieee754/dbl-64/s_sin.c (__sin): Handle Inf and NaN + correctly. + (__cos): Likewise. + + * sysdeps/ieee754/dbl-64/e_asin.c (__ieee754_asin): Handle NaN + correctly. + (__ieee754_acos): Likewise. + +2001-03-12 Andreas Jaeger + + * sysdeps/unix/sysv/linux/s390/sysdep.h (_LINUX_S390_SYSDEP_H): + Fix typo. Patch by Martin Schwidefsky . + + * sysdeps/s390/bits/string.h: Protect __STRING_INLINE against + redefinition. + +2001-03-11 Roland McGrath + + * sysdeps/mach/hurd/configure.in: Add a sanity check on $prefix. + +2001-03-11 Ulrich Drepper + + * sysdeps/ieee754/dbl-64/endian.h: Define also one of BIG_ENDI and + LITTLE_ENDI. + + * sysdeps/ieee754/dbl-64/MathLib.h (Init_Lib): Use void as + parameter list. + + Last-bit accurate math library implementation by IBM Haifa. + Contributed by Abraham Ziv , Moshe Olshansky + , Ealan Henis , and + Anna Reitman . + * math/Makefile (dbl-only-routines): New variable. + (libm-routines): Add $(dbl-only-routines). + * sysdeps/ieee754/dbl-64/e_acos.c: Empty, definition is in e_asin.c. + * sysdeps/ieee754/dbl-64/e_asin.c: Replaced with accurate asin + implementation. + * sysdeps/ieee754/dbl-64/e_atan2.c: Replaced with accurate atan2 + implementation. + * sysdeps/ieee754/dbl-64/e_exp.c: Replaced with accurate exp + implementation. + * sysdeps/ieee754/dbl-64/e_lgamma_r.c: Don't use __kernel_sin and + __kernel_cos. + * sysdeps/ieee754/dbl-64/e_log.c: Replaced with accurate log + implementation. + * sysdeps/ieee754/dbl-64/e_remainder.c: Replaced with accurate + remainder implementation. + * sysdeps/ieee754/dbl-64/e_pow.c: Replaced with accurate pow + implementation. + * sysdeps/ieee754/dbl-64/e_sqrt.c: Replaced with accurate sqrt + implementation. + * sysdeps/ieee754/dbl-64/k_cos.c: Empty, definition is in s_sin.c. + * sysdeps/ieee754/dbl-64/k_sin.c: Empty, definition is in s_sin.c. + * sysdeps/ieee754/dbl-64/s_atan.c: Replaced with accurate atan + implementation. + * sysdeps/ieee754/dbl-64/s_cos.c: Empty, definition is in s_sin.c. + * sysdeps/ieee754/dbl-64/s_sin.c: Replaced with accurate sin/cos + implementation. + * sysdeps/ieee754/dbl-64/s_sincos.c: Rewritten to not use __kernel_sin + and __kernel_cos. + * sysdeps/ieee754/dbl-64/s_tan.c: Replaced with accurate tan + implementation. + * sysdeps/ieee754/dbl-64/Dist: Add new non-code files. + * sysdeps/ieee754/dbl-64/MathLib.h: New file. + * sysdeps/ieee754/dbl-64/asincos.tbl: New file. + * sysdeps/ieee754/dbl-64/atnat.h: New file. + * sysdeps/ieee754/dbl-64/atnat2.h: New file. + * sysdeps/ieee754/dbl-64/branred.c: New file. + * sysdeps/ieee754/dbl-64/branred.h: New file. + * sysdeps/ieee754/dbl-64/dla.h: New file. + * sysdeps/ieee754/dbl-64/doasin.c: New file. + * sysdeps/ieee754/dbl-64/doasin.h: New file. + * sysdeps/ieee754/dbl-64/dosincos.c: New file. + * sysdeps/ieee754/dbl-64/dosincos.h: New file. + * sysdeps/ieee754/dbl-64/endian.h: New file. + * sysdeps/ieee754/dbl-64/halfulp.c: New file. + * sysdeps/ieee754/dbl-64/mpa.c: New file. + * sysdeps/ieee754/dbl-64/mpa.h: New file. + * sysdeps/ieee754/dbl-64/mpa2.h: New file. + * sysdeps/ieee754/dbl-64/mpatan.c: New file. + * sysdeps/ieee754/dbl-64/mpatan.h: New file. + * sysdeps/ieee754/dbl-64/mpatan2.c: New file. + * sysdeps/ieee754/dbl-64/mpexp.c: New file. + * sysdeps/ieee754/dbl-64/mpexp.h: New file. + * sysdeps/ieee754/dbl-64/mplog.c: New file. + * sysdeps/ieee754/dbl-64/mplog.h: New file. + * sysdeps/ieee754/dbl-64/mpsqrt.c: New file. + * sysdeps/ieee754/dbl-64/mpsqrt.h: New file. + * sysdeps/ieee754/dbl-64/mptan.c: New file. + * sysdeps/ieee754/dbl-64/mydefs.h: New file. + * sysdeps/ieee754/dbl-64/powtwo.tbl: New file. + * sysdeps/ieee754/dbl-64/root.tbl: New file. + * sysdeps/ieee754/dbl-64/sincos.tbl: New file. + * sysdeps/ieee754/dbl-64/sincos32.c: New file. + * sysdeps/ieee754/dbl-64/sincos32.h: New file. + * sysdeps/ieee754/dbl-64/slowexp.c: New file. + * sysdeps/ieee754/dbl-64/slowpow.c: New file. + * sysdeps/ieee754/dbl-64/uasncs.h: New file. + * sysdeps/ieee754/dbl-64/uatan.tbl: New file. + * sysdeps/ieee754/dbl-64/uexp.h: New file. + * sysdeps/ieee754/dbl-64/uexp.tbl: New file. + * sysdeps/ieee754/dbl-64/ulog.h: New file. + * sysdeps/ieee754/dbl-64/ulog.tbl: New file. + * sysdeps/ieee754/dbl-64/upow.h: New file. + * sysdeps/ieee754/dbl-64/upow.tbl: New file. + * sysdeps/ieee754/dbl-64/urem.h: New file. + * sysdeps/ieee754/dbl-64/uroot.h: New file. + * sysdeps/ieee754/dbl-64/usncs.h: New file. + * sysdeps/ieee754/dbl-64/utan.h: New file. + * sysdeps/ieee754/dbl-64/utan.tbl: New file. + * sysdeps/i386/fpu/branred.c: New file. + * sysdeps/i386/fpu/doasin.c: New file. + * sysdeps/i386/fpu/dosincos.c: New file. + * sysdeps/i386/fpu/halfulp.c: New file. + * sysdeps/i386/fpu/mpa.c: New file. + * sysdeps/i386/fpu/mpatan.c: New file. + * sysdeps/i386/fpu/mpatan2.c: New file. + * sysdeps/i386/fpu/mpexp.c: New file. + * sysdeps/i386/fpu/mplog.c: New file. + * sysdeps/i386/fpu/mpsqrt.c: New file. + * sysdeps/i386/fpu/mptan.c: New file. + * sysdeps/i386/fpu/sincos32.c: New file. + * sysdeps/i386/fpu/slowexp.c: New file. + * sysdeps/i386/fpu/slowpow.c: New file. + * sysdeps/ia64/fpu/branred.c: New file. + * sysdeps/ia64/fpu/doasin.c: New file. + * sysdeps/ia64/fpu/dosincos.c: New file. + * sysdeps/ia64/fpu/halfulp.c: New file. + * sysdeps/ia64/fpu/mpa.c: New file. + * sysdeps/ia64/fpu/mpatan.c: New file. + * sysdeps/ia64/fpu/mpatan2.c: New file. + * sysdeps/ia64/fpu/mpexp.c: New file. + * sysdeps/ia64/fpu/mplog.c: New file. + * sysdeps/ia64/fpu/mpsqrt.c: New file. + * sysdeps/ia64/fpu/mptan.c: New file. + * sysdeps/ia64/fpu/sincos32.c: New file. + * sysdeps/ia64/fpu/slowexp.c: New file. + * sysdeps/ia64/fpu/slowpow.c: New file. + * sysdeps/m68k/fpu/branred.c: New file. + * sysdeps/m68k/fpu/doasin.c: New file. + * sysdeps/m68k/fpu/dosincos.c: New file. + * sysdeps/m68k/fpu/halfulp.c: New file. + * sysdeps/m68k/fpu/mpa.c: New file. + * sysdeps/m68k/fpu/mpatan.c: New file. + * sysdeps/m68k/fpu/mpatan2.c: New file. + * sysdeps/m68k/fpu/mpexp.c: New file. + * sysdeps/m68k/fpu/mplog.c: New file. + * sysdeps/m68k/fpu/mpsqrt.c: New file. + * sysdeps/m68k/fpu/mptan.c: New file. + * sysdeps/m68k/fpu/sincos32.c: New file. + * sysdeps/m68k/fpu/slowexp.c: New file. + * sysdeps/m68k/fpu/slowpow.c: New file. + + * iconvdata/gconv-modules: Add a number of alias, mostly for IBM + codepages. + +2001-03-11 Andreas Jaeger + + * elf/elf.h (EM_*): Synch with official list. + +2001-03-07 David Mosberger + + * sysdeps/ia64/bits/fenv.h (FE_NONIEEE_ENV): New macro. + +2001-03-07 Jes Sorensen + + * sysdeps/unix/sysv/linux/ia64/ioperm.c (_ioperm): Remove unused + variables addr & len. + +2001-02-22 Jes Sorensen + + * sysdeps/ia64/fpu/feenablxcpt.c (feenableexcept): Remove + punctuation in asm constraint. + +2001-03-07 Mark Kettenis + + * resolv/netdb.h [__USE_GNU]: Define __need_timespec and include + to get definition of `struct timespec'. + +2001-03-08 Jakub Jelinek + + * elf/rtld.c (dl_main): If tracing, warn about undefined symbols if + LD_WARN=1, not if LD_WARN is unset. + +2001-03-07 Andreas Schwab + + * elf/ldconfig.h: Moved to ... + * sysdeps/generic/ldconfig.h: ... here. + * sysdeps/unix/sysv/linux/i386/ldconfig.h: New file. + * sysdeps/unix/sysv/linux/m68k/ldconfig.h: New file. + * sysdeps/unix/sysv/linux/ia64/ldconfig.h: New file. + * elf/readlib.c (interpreters, known_libs): Use + SYSDEP_KNOWN_INTERPRETER_NAMES and SYSDEP_KNOWN_LIBRARY_NAMES + instead of hard coding old names. + +2001-03-09 Ulrich Drepper + + * catgets/Makefile (generated): Add test-gencat.h. + (sample.SJIS.cat): Also generate header. + * catgets/sample.SJIS: Add new set and message, both with symbolic + names. + * catgets/test-gencat.sh: Also compare generated header with what + we expect. + +2001-03-07 Jakub Jelinek + + * catgets/gencat.c (read_input_file): Preserve properly symbolic + names. + +2001-03-06 Andreas Jaeger + + * sysdeps/s390/dl-machine.h (elf_machine_relplt): Removed, it's not + needed. + (elf_machine_pltrel_p): Likewise. + * sysdeps/powerpc/dl-machine.h: Likewise. + * sysdeps/generic/dl-machine.h (elf_machine_pltrel_p): Likewise. + +2001-03-09 Ulrich Drepper + + * sysdeps/unix/sysv/linux/arm/Dist: Add dl-procinfo.c and + dl-procinfo.h. + +2001-03-05 Philip Blundell + + * sysdeps/unix/sysv/linux/arm/dl-procinfo.c: New file. + * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: New file. + * sysdeps/unix/sysv/linux/arm/Makefile [subdir=elf] + (sysdep-dl-routines, sysdep_routines, sysdep-rtld-routines): Add + dl-procinfo. + +2001-03-09 Ulrich Drepper + + * dlfcn/tstatexit.c (main): Don't perform the test if __dso_handle + is not available. + * dlfcn/tstcxaatexit.c (main): Likewise. + +2001-03-10 Andreas Jaeger + + * sysdeps/i386/fpu/libm-test-ulps: Revert last patch. + +2001-03-09 Andreas Jaeger + + * sysdeps/s390/dl-machine.h (elf_machine_matches_host): Handle + both new and old EM_S390 values. + (EM_S390_OLD): New constant. + + * elf/elf.h (EM_S390): Use official value. + +2001-03-09 Ulrich Drepper + + * conform/data/sys/socket.h-data: Allow SO* symbols. + +2001-03-07 Andreas Schwab + + * sysdeps/ia64/fpu/Makefile: Modify sysdep_routines instead of + routines, and sysdep-CPPFLAGS instead of CPPFLAGS. + +2001-03-07 Andreas Jaeger + + * resolv/Makefile (routines): Only build gai_sigqueue when threads + are available. + +2001-03-07 Jakub Jelinek + + * elf/ldconfig.c (_dl_sysdep_message): Remove. + * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h: Include + ldsodefs.h. + * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. + + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Use + _dl_error_printf instead of _dl_sysdep_error. + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h (_dl_procinfo): + Use _dl_printf instead of _dl_sysdep_message. + * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h (_dl_procinfo): + Likewise. + +2001-03-06 Ben Collins + + * manual/arith.texi (Integers): Fix documentation of fast and + least integer typedefs. + +2001-03-06 Jakub Jelinek + + * resolv/Depend: New file. + * resolv/Makefile (extra-libs, tests): Build libanl and ga_test only + when libpthread is built. + +2001-03-06 Andreas Jaeger + + * sysdeps/i386/fpu/libm-test-ulps: Add some deltas. + + * sysdeps/sh/dl-machine.h (elf_machine_rela): Add missing comma. + Patch by kaz Kojima . + +2001-03-05 Ulrich Drepper + + * stdlib/Versions: Remove __new_exitfn again. Not needed. + +2001-03-05 Andreas Jaeger + + * stdlib/msort.c (qsort): Don't use alloca in a function call. + +2001-03-05 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/stat.h (__S_TYPEISMQ, __S_TYPEISSEM, + __S_TYPEISSHM): Rewrite to enforce correct use the macros. They still + always return zero. + * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise. + +2001-03-04 Andreas Jaeger + + * stdlib/longlong.h: Don't use multi-line strings. + * iconvdata/tst-loading.c: Likewise. + + * csu/Makefile ($(objpfx)version-info.h): Don't use multi-line + string. + +2001-03-04 Ulrich Drepper + + * sysdeps/ia64/fpu/libm-test-ulps: Adjust for addition of lgammal. + + * rt/lio_listio.c: Add a few asserts. + + * elf/global.c: New file. + * elf/globalmod1.c: New file. + * elf/Makefile: Add rules to build and run global. + + * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Define SI_ASYNCNL. + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. + + * sysdeps/ieee754/ldbl-96/e_lgammal_r.c: New file. + Contributed by Stephen L. Moshier . + + * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Fix handling of boundary cases. + + * sysdeps/ieee754/dbl-64/e_gamma_r.c: Always initialize sign variable. + * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. + + * sysdeps/i386/fpu/libm-test-ulps: Adjust after addition of lgammal. + + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Fix typo in last change. + +2001-03-04 Andreas Jaeger + + * resolv/tst-aton.c: Add testcase for IP with four periods. + + * resolv/inet_addr.c: Don't recognize an IP with four periods. + Patch by Andre' Breiler . + +2001-02-27 Philip Blundell + + * elf/elf.h: Add new ARM definitions from latest (B-01) + specification. Correct naming of EF_ARM_ALIGN8 et al. + +2001-03-04 Ulrich Drepper + + * stdio-common/tst-printf.sh: Remove bashisms. + Patch by Matthew Clarke . + +2001-03-03 Ulrich Drepper + + * Versions.def: Add libanl definition. + * shlib-versions: Add entry for libanl. + * resolv/Makefile (distribute): Add gai_misc.h and ga_test.c. + (routines): Add gai_sigqueue. + (extra-libs): Add libanl. + (libanl-routines): New variable. + Add rules to build libanl and ga_test. + * resolv/Versions [libc] (GLIBC_2.2.3): Add __gai_sigqueue. + [libanl]: New library. + * resolv/netdb.h: Add definitions for libanl. + * resolv/getaddrinfo_a.c: New file. + * resolv/gai_cancel.c: New file. + * resolv/gai_error.c: New file. + * resolv/gai_misc.c: New file. + * resolv/gai_misc.h: New file. + * resolv/gai_notify.c: New file. + * resolv/gai_suspend.c: New file. + * resolv/ga_test.c: New file. + * sysdeps/generic/gai_sigqueue.c: New file. + * sysdeps/unix/sysv/linux/gai_sigqueue.c: New file. + * sysdeps/generic/bits/siginfo.h: Allow __need_sigevent_t being defined + and provide only that definition. + * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. + + * rt/aio_misc.c: Fix typos in comments. + * rt/lio_listio.c: Pretty printing. Little optimization in request + list handling. + + * elf/rtld.c: Remove commented out code. + + * sysdeps/unix/sysv/linux/linux_fsinfo.h (SHMFS_SUPER_MAGIC): + Update for real 2.4 kernels. + +2001-03-01 Ulrich Drepper + + * elf/dl-load.c: Pretty printing. + + * elf/dl-object.c (_dl_new_object): Don't add the loader's scope + twice. + +2001-02-28 Ulrich Drepper + + * sysdeps/alpha/dl-machine.h (elf_machine_rela): Don't handle + relocations which are not in ld.so if RTLD_BOOTSTRAP is defined. + + * sysdeps/powerpc/dl-machine.c (__process_machine_rela): Fix typo. + + * elf/dl-misc.c (_dl_debug_vdprintf): Fix typo visible on 64-bit + machines. + + * sysdeps/unix/sysv/linux/powerpc/sysdep.h (C_TEXT): Define. + +2001-02-27 Ulrich Drepper + + * sysdeps/powerpc/elf/libc-start.c: Use new output functions and + _dl_debug_mask. + + * elf/Versions [ld]: Don't export _dl_debug_message anymore. Export + _dl_debug_printf. + * elf/dl-misc.c: Remove definition of _dl_sysdep_output and + _dl_debug_message. Define _dl_debug_vdprintf, _dl_debug_printf, + _dl_debug_printf_c, and _dl_printf. + * sysdeps/generic/ldsodefs.h: Don't declare _dl_sysdep_output, + _dl_debug_message, _dl_sysdep_message, _dl_sysdep_error, and + _dl_sysdep_fatal. Declare _dl_debug_printf, _dl_debug_printf_c, + _dl_printf, _dl_error_printf, and _dl_fatal_printf. + * elf/dl-close.c: Replace use of old output functions with the new + ones. + * elf/dl-deps.c: Likewise. + * elf/dl-error.c: Likewise. + * elf/dl-fini.c: Likewise. + * elf/dl-init.c: Likewise. + * elf/dl-load.c: Likewise. + * elf/dl-lookup.c: Likewise. + * elf/dl-minimal.c: Likewise. + * elf/dl-open.c: Likewise. + * elf/dl-profile.c: Likewise. + * elf/dl-reloc.c: Likewise. + * elf/dl-version.c: Likewise. + * elf/do-lookup.h: Likewise. + * elf/rtld.c: Likewise. + * sysdeps/generic/dl-cache.c: Likewise. + * sysdeps/generic/dl-sysdep.c: Likewise. + * sysdeps/generic/libc-start.c: Likewise. + * sysdeps/i386/dl-machine.h: Likewise. + * sysdeps/arm/dl-machine.h: Likewise. + * sysdeps/hppa/dl-machine.h: Likewise. + * sysdeps/m68k/dl-machine.h: Likewise. + * sysdeps/powerpc/dl-machine.h: Likewise. + * sysdeps/s390/dl-machine.h: Likewise. + * sysdeps/sh/dl-machine.h: Likewise. + * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. + * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. + * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Likewise. + + * sysdeps/generic/ldsodefs.h: Remove _dl_secure declaration. + + * dlfcn/Makefile: Don't run tstatexit test unless .hidden is + supported by assembler. + + * sysdeps/generic/ldsodefs.h: Remove commented-out variable + declaractions. + + * elf/rtld.c: Little optimizations in handling _dl_lazy. + + * elf/cache.c (save_cache): Portability changes. + * elf/dl-profile.c (_dl_start_profile): Likewise. + + * elf/sln.c: Cleanups. Remove arbitrary limits. + + * elf/dl-close.c: Replace _dl_debug_* variables with _dl_debug_mask. + * elf/dl-deps.c: Likewise. + * elf/dl-fini.c: Likewise. + * elf/dl-init.c: Likewise. + * elf/dl-load.c: Likewise. + * elf/dl-lookup.c: Likewise. + * elf/dl-open.c: Likewise. + * elf/dl-reloc.c: Likewise. + * elf/dl-support.c: Likewise. + * elf/dl-version.c: Likewise. + * elf/do-lookup.h: Likewise. + * elf/rtld.c: Likewise. + * sysdeps/generic/dl-cache.c: Likewise. + * sysdeps/generic/ldsodefs.h: Likewise. + * sysdeps/generic/libc-start.c: Likewise. + * elf/Versions: Don't export _dl_debug_impcalls and _dl_debug_files. + Export _dl_debug_mask. + * Versions.def: Define GLIBC_2.2.3 for ld. + +2001-02-26 Greg McGary + + * sysdeps/unix/make-syscalls.sh (ptr): Handle `V' keyletter. + +2001-02-26 Paul Eggert + + Modify mkstemp.c and tempname.c so that they can be used by + GNU applications on non-glibc platforms. + + * misc/mkstemp.c (__GT_FILE): Define to zero if not defined. + + * sysdeps/posix/tempname.c: Include if HAVE_CONFIG_H. + Include , , only if + STDC_HEADERS || _LIBC. + Include only if HAVE_FCNTL_H || _LIBC. + Include only if HAVE_UNISTD_H || _LIBC. + Include only if HAVE_SYS_TIME_H || _LIBC. + (__set_errno): Define this macro if doesn't. + (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE): + Define these macros if doesn't. + (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR): + Define these macros if doesn't. + Ignore S_ISDIR if STAT_MACROS_BROKEN. + (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, + lxstat64, __xstat64): Define if not _LIBC. + (struct_stat64): New macro. + (direxists, __gen_tempname): Use it, to avoid a + portability problem with Solaris 8. + (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC). + (__gen_tempname): Invoke gettimeofday only if + HAVE_GETTIMEOFDAY || _LIBC; otherwise, fall back on plain "time". + Use portable macros like S_IRUSR | S_IWUSR rather than nonportable + octal values like 0600. + +2001-02-26 Ulrich Drepper + + * sysdeps/ieee754/ldbl-96/e_jnl.c: New file. + Contributed by Stephen L. Moshier . + + * sysdeps/i386/fpu/libm-test-ulps: Update for jnl and ynl introduction. + * sysdeps/ia64/fpu/libm-test-ulps: Likewise. + + * posix/wordexp-test.c (testit): Remove warnings. + + * dlfcn/Makefile (distribute): Add modatexit.c and modcxaatexit.c. + (tests): Add tstatexit and tstcxaatexit. + (module-names): Add modatexit and modcxaatexit. + Add rules to build and run tstatexit and tstcxaatexit. + * dlfcn/modatexit.c: New file. + * dlfcn/modcxaatexit.c: New file. + * dlfcn/tstatexit.c: New file. + * dlfcn/tstcxaatexit.c: New file. + + * io/Makefile: Pass -DHAVE_DOT_HIDDEN to stat and mknod functions if + .hidden is available. + * io/stat.c: If .hidden is available use it to avoid exporting + functions. + * io/fstat.c: Likewise. + * io/lstat.c: Likewise. + * io/stat64.c: Likewise. + * io/fstat64.c: Likewise. + * io/lstat64.c: Likewise. + * sysdeps/generic/mknod.c: Likewise. + + * malloc/mtrace.c: Use __cxa_atexit and not atexit. + * sysdeps/generic/bb_init_func.c: Likewise. + * sysdeps/generic/libc-start.c: Likewise. + + * stdlib/atexit.c (__new_exitfn): Move to cxa_atexit.c. + (atexit): Implement using __cxa_atexit. + Use .hidden if availble to avoid exporting atexit. + * stdlib/cxa_atexit.c (__new_exitfn): Moved to here from atexit.c. + * stdlib/Versions: Export __new_exitfn for GLIBC_2.2.3. + * stdlib/Makefile (routines): Add old_atexit. + (static-only-routines): Add atexit. + Pass -DHAVE_DOT_HIDDEN for atexit.c if .hidden is available. + * stdlib/old_atexit.c: New file. + + * intl/Makefile: Remove bogus endif. + +2001-02-26 Andreas Jaeger + + * iconvdata/Makefile (tests): Fix typo in last patch. + + * intl/Makefile (tests): Run mtrace-tst-gettext only when perl is + available. + Reported by Achim Gottinger . + +2001-02-25 Andreas Jaeger + + * intl/Makefile (plural.c): Reorder rules so that they work if + BISON doesn't exist. + +2001-02-25 Ulrich Drepper + + * intl/locale.alias: Don't use nb_NO but define aliases for it. + +2001-02-23 Ulrich Drepper + + * sysdeps/i386/strtok.S: Continue to return NULL after the first + time this happened. + +2001-02-23 Andreas Jaeger + + * string/tester.c (test_strtok_r): Add testcase. + (test_strtok_r): Always initialize cp for proper checking. + + * sysdeps/generic/strtok.c (strtok): Handle case of first strtok + returning NULL correctly. + Patch by Fumitoshi UKAI . + * sysdeps/generic/strtok_r.c (__strtok_r): Likewise. + +2001-02-23 Ulrich Drepper + + * sysdeps/unix/sysv/aix/bits/types.h: Define __need_NULL before + including . + * sysdeps/unix/sysv/aix/write.c: Define alias __libc_write. + * include/libc-symbols.h (weak_alias): Don't use .weak if + HAVE_ASM_GLOBAL_DOT_NAME is defined. + Patches by Michael Keezer . + + * sysdeps/generic/ftime.c: Don't include at all. + Patch by Michael Keezer . + + * sysdeps/unix/sysv/aix/Dist: Remove restf.S and savef.S. + * sysdeps/unix/sysv/aix/Makefile [$(subdir) == misc] + (sysdep_routines): Remove restf.S and savef.S. + * sysdeps/unix/sysv/aix/restf.S: Removed. + * sysdeps/unix/sysv/aix/savef.S: Removed. + * sysdeps/powerpc/fprrest.S: Use C_TEXT to define label. Also define + alternative names used on some platforms. + * sysdeps/powerpc/fprsave.S: Likewise. + * sysdeps/powerpc/gprrest0.S: Likewise. + * sysdeps/powerpc/gprrest1.S: Likewise. + * sysdeps/powerpc/gprsave0.S: Likewise. + * sysdeps/powerpc/gprsave1.S: Likewise. + Patch by Michael Keezer . + +2001-02-22 Ulrich Drepper + + * sysdeps/i386/elf/start.S (_fp_hw): Actually define label. + +2001-02-22 Andreas Jaeger + + * string/tst-strtok.c (main): Fix error messages. + +2001-02-22 Andreas Jaeger + + * math/Makefile: Remove omit-long-double-fcts. + +2001-02-18 Maciej W. Rozycki + + * sysdeps/mips/bsd-_setjmp.S (_setjmp): Reorder instructions to + avoid problems on MIPS I. + * sysdeps/mips/bsd-setjmp.S (setjmp): Likewise. + + * sysdeps/mips/dl-machine.h (RTLD_START): Remove duplicate ".set + noreorder". + +2001-02-21 Ulrich Drepper + + * posix/fnmatch_loop.c: Handle ranges outside glibc correctly. + + * sysdeps/generic/ftime.c: Include . + + * configure.in: Don't check for libgd if user passed --without-gd. + Patch by Achim Gottinger . + + * sysdeps/i386/i686/strtok.S: Continue to return NULL after the + first time this happened. + * string/Makefile (tests): Add tst-strtok. + +2001-02-21 Andreas Jaeger + + * string/tst-strtok.c: New testcase, reported by + Andrew Church . + +2001-02-20 Ulrich Drepper + + * libio/iofwide.c: Remove fwide alias. + +2001-02-20 Andreas Jaeger + + * iconvdata/Makefile (tests): Only run mtrace-tst-loading if perl + is available. + Reported by Achim Gottinger . + +2001-02-19 Ulrich Drepper + + * iconv/tst-iconv1.c (main): Remove debugging code. + + * sysdeps/ieee754/flt-32/e_powf.c: Handle x == +-1 correctly. + * sysdeps/ieee754/dbl-64/e_pow.c: Likewise. + + * sysdeps/generic/e_scalb.c: Set invalid exception for invalid + parameters. + * sysdeps/generic/e_scalbf.c: Likewise. + * sysdeps/generic/e_scalbl.c: Likewise. + + * sysdeps/ia64/fpu/Makefile (libm-sysdep-routines): Add libm_error, + libm_frexp4, libm_frexp4f, libm_frexp4l, and all the functions also + in libc. + (routines): Replace libm_error with libc_libm_error. + * sysdeps/ia64/fpu/Dist: Add libc_libm_error.c. + * sysdeps/ia64/fpu/libc_libm_error.c: New file. + +2001-02-18 Mark Kettenis + + * malloc/mtrace.c [USE_IN_LIBIO]: Define fopen as _IO_fopen64. + (mtrace): Revert 2001-02-13 patch: use fopen instead of fopen64. + +2001-02-17 H.J. Lu + + * sysdeps/unix/sysv/linux/ia64/clone2.S: Use clone2 and don't use + scratch registers across the system call. + +2001-02-19 Andreas Jaeger + + * malloc/Makefile (tests): Run mtrace only when perl is available. + Reported by Achim Gottinger . + +2001-02-19 Ulrich Drepper + + * sysdeps/ieee754/ldbl-96/e_j1l.c: New file. + Contributed by Stephen L. Moshier . + + * sysdeps/i386/fpu/libm-test-ulps: Adjust error values for j1 and y1. + * sysdeps/ia64/fpu/libm-test-ulps: Adjust error values for y1. + * math/libm-test.inc (j1_test): Mark constants as long double. + (jn_test): Likewise. + (y1_test): Likewise. + (yn_test): Likewise. + + * libio/iogetline.c: Move return until after last statement. + + * localedata/show-ucs-data.c: Don't show < > for better readability. + + * sysdeps/ia64/fpu/Dist: New file. + * sysdeps/ia64/fpu/Makefile: New file. + * sysdeps/ia64/fpu/Versions: New file. + * sysdeps/ia64/fpu/e_acos.S: New file. + * sysdeps/ia64/fpu/e_acosf.S: New file. + * sysdeps/ia64/fpu/e_acosl.S: New file. + * sysdeps/ia64/fpu/e_asin.S: New file. + * sysdeps/ia64/fpu/e_asinf.S: New file. + * sysdeps/ia64/fpu/e_asinl.S: New file. + * sysdeps/ia64/fpu/e_atan2.S: New file. + * sysdeps/ia64/fpu/e_atan2f.S: New file. + * sysdeps/ia64/fpu/e_atan2l.c: New file. + * sysdeps/ia64/fpu/e_cosh.S: New file. + * sysdeps/ia64/fpu/e_coshf.S: New file. + * sysdeps/ia64/fpu/e_coshl.S: New file. + * sysdeps/ia64/fpu/e_exp.S: New file. + * sysdeps/ia64/fpu/e_expf.S: New file. + * sysdeps/ia64/fpu/e_expl.c: New file. + * sysdeps/ia64/fpu/e_fmod.S: New file. + * sysdeps/ia64/fpu/e_fmodf.S: New file. + * sysdeps/ia64/fpu/e_fmodl.S: New file. + * sysdeps/ia64/fpu/e_hypot.S: New file. + * sysdeps/ia64/fpu/e_hypotf.S: New file. + * sysdeps/ia64/fpu/e_hypotl.S: New file. + * sysdeps/ia64/fpu/e_log.S: New file. + * sysdeps/ia64/fpu/e_log10.c: New file. + * sysdeps/ia64/fpu/e_log10f.c: New file. + * sysdeps/ia64/fpu/e_log10l.c: New file. + * sysdeps/ia64/fpu/e_logf.S: New file. + * sysdeps/ia64/fpu/e_logl.c: New file. + * sysdeps/ia64/fpu/e_pow.S: New file. + * sysdeps/ia64/fpu/e_powf.S: New file. + * sysdeps/ia64/fpu/e_powl.S: New file. + * sysdeps/ia64/fpu/e_rem_pio2.c: New file. + * sysdeps/ia64/fpu/e_rem_pio2f.c: New file. + * sysdeps/ia64/fpu/e_remainder.S: New file. + * sysdeps/ia64/fpu/e_remainderf.S: New file. + * sysdeps/ia64/fpu/e_remainderl.S: New file. + * sysdeps/ia64/fpu/e_scalb.S: New file. + * sysdeps/ia64/fpu/e_scalbf.S: New file. + * sysdeps/ia64/fpu/e_scalbl.S: New file. + * sysdeps/ia64/fpu/e_sinh.S: New file. + * sysdeps/ia64/fpu/e_sinhf.S: New file. + * sysdeps/ia64/fpu/e_sinhl.S: New file. + * sysdeps/ia64/fpu/e_sqrt.S: New file. + * sysdeps/ia64/fpu/e_sqrtf.S: New file. + * sysdeps/ia64/fpu/e_sqrtl.S: New file. + * sysdeps/ia64/fpu/k_rem_pio2.c: New file. + * sysdeps/ia64/fpu/k_rem_pio2f.c: New file. + * sysdeps/ia64/fpu/k_rem_pio2l.c: New file. + * sysdeps/ia64/fpu/libm_atan2_reg.S: New file. + * sysdeps/ia64/fpu/libm_error.c: New file. + * sysdeps/ia64/fpu/libm_frexp4.S: New file. + * sysdeps/ia64/fpu/libm_frexp4f.S: New file. + * sysdeps/ia64/fpu/libm_frexp4l.S: New file. + * sysdeps/ia64/fpu/libm_reduce.S: New file. + * sysdeps/ia64/fpu/libm_support.h: New file. + * sysdeps/ia64/fpu/libm_tan.S: New file. + * sysdeps/ia64/fpu/s_atan.S: New file. + * sysdeps/ia64/fpu/s_atanf.S: New file. + * sysdeps/ia64/fpu/s_atanl.S: New file. + * sysdeps/ia64/fpu/s_cbrt.S: New file. + * sysdeps/ia64/fpu/s_cbrtf.S: New file. + * sysdeps/ia64/fpu/s_cbrtl.S: New file. + * sysdeps/ia64/fpu/s_ceil.S: New file. + * sysdeps/ia64/fpu/s_ceilf.S: New file. + * sysdeps/ia64/fpu/s_ceill.S: New file. + * sysdeps/ia64/fpu/s_cos.S: New file. + * sysdeps/ia64/fpu/s_cosf.S: New file. + * sysdeps/ia64/fpu/s_cosl.S: New file. + * sysdeps/ia64/fpu/s_expm1.S: New file. + * sysdeps/ia64/fpu/s_expm1f.S: New file. + * sysdeps/ia64/fpu/s_expm1l.S: New file. + * sysdeps/ia64/fpu/s_floor.S: New file. + * sysdeps/ia64/fpu/s_floorf.S: New file. + * sysdeps/ia64/fpu/s_floorl.S: New file. + * sysdeps/ia64/fpu/s_frexp.c: New file. + * sysdeps/ia64/fpu/s_frexpf.c: New file. + * sysdeps/ia64/fpu/s_frexpl.c: New file. + * sysdeps/ia64/fpu/s_ilogb.S: New file. + * sysdeps/ia64/fpu/s_ilogbf.S: New file. + * sysdeps/ia64/fpu/s_ilogbl.S: New file. + * sysdeps/ia64/fpu/s_ldexp.S: New file. + * sysdeps/ia64/fpu/s_ldexpf.S: New file. + * sysdeps/ia64/fpu/s_ldexpl.S: New file. + * sysdeps/ia64/fpu/s_log1p.S: New file. + * sysdeps/ia64/fpu/s_log1pf.S: New file. + * sysdeps/ia64/fpu/s_log1pl.S: New file. + * sysdeps/ia64/fpu/s_logb.S: New file. + * sysdeps/ia64/fpu/s_logbf.S: New file. + * sysdeps/ia64/fpu/s_logbl.S: New file. + * sysdeps/ia64/fpu/s_matherrf.c: New file. + * sysdeps/ia64/fpu/s_matherrl.c: New file. + * sysdeps/ia64/fpu/s_modf.S: New file. + * sysdeps/ia64/fpu/s_modff.S: New file. + * sysdeps/ia64/fpu/s_modfl.S: New file. + * sysdeps/ia64/fpu/s_nearbyint.S: New file. + * sysdeps/ia64/fpu/s_nearbyintf.S: New file. + * sysdeps/ia64/fpu/s_nearbyintl.S: New file. + * sysdeps/ia64/fpu/s_rint.S: New file. + * sysdeps/ia64/fpu/s_rintf.S: New file. + * sysdeps/ia64/fpu/s_rintl.S: New file. + * sysdeps/ia64/fpu/s_round.S: New file. + * sysdeps/ia64/fpu/s_roundf.S: New file. + * sysdeps/ia64/fpu/s_roundl.S: New file. + * sysdeps/ia64/fpu/s_scalbn.S: New file. + * sysdeps/ia64/fpu/s_scalbnf.S: New file. + * sysdeps/ia64/fpu/s_scalbnl.S: New file. + * sysdeps/ia64/fpu/s_significand.S: New file. + * sysdeps/ia64/fpu/s_significandf.S: New file. + * sysdeps/ia64/fpu/s_significandl.S: New file. + * sysdeps/ia64/fpu/s_sin.c: New file. + * sysdeps/ia64/fpu/s_sincos.c: New file. + * sysdeps/ia64/fpu/s_sincosf.c: New file. + * sysdeps/ia64/fpu/s_sincosl.c: New file. + * sysdeps/ia64/fpu/s_sinf.c: New file. + * sysdeps/ia64/fpu/s_sinl.c: New file. + * sysdeps/ia64/fpu/s_tan.S: New file. + * sysdeps/ia64/fpu/s_tanf.S: New file. + * sysdeps/ia64/fpu/s_tanl.S: New file. + * sysdeps/ia64/fpu/s_trunc.S: New file. + * sysdeps/ia64/fpu/s_truncf.S: New file. + * sysdeps/ia64/fpu/s_truncl.S: New file. + * sysdeps/ia64/fpu/w_acos.c: New file. + * sysdeps/ia64/fpu/w_acosf.c: New file. + * sysdeps/ia64/fpu/w_acosl.c: New file. + * sysdeps/ia64/fpu/w_asin.c: New file. + * sysdeps/ia64/fpu/w_asinf.c: New file. + * sysdeps/ia64/fpu/w_asinl.c: New file. + * sysdeps/ia64/fpu/w_atan2.c: New file. + * sysdeps/ia64/fpu/w_atan2f.c: New file. + * sysdeps/ia64/fpu/w_atan2l.c: New file. + * sysdeps/ia64/fpu/w_cosh.c: New file. + * sysdeps/ia64/fpu/w_coshf.c: New file. + * sysdeps/ia64/fpu/w_coshl.c: New file. + * sysdeps/ia64/fpu/w_exp.c: New file. + * sysdeps/ia64/fpu/w_expf.c: New file. + * sysdeps/ia64/fpu/w_fmod.c: New file. + * sysdeps/ia64/fpu/w_fmodf.c: New file. + * sysdeps/ia64/fpu/w_fmodl.c: New file. + * sysdeps/ia64/fpu/w_hypot.c: New file. + * sysdeps/ia64/fpu/w_hypotf.c: New file. + * sysdeps/ia64/fpu/w_hypotl.c: New file. + * sysdeps/ia64/fpu/w_log.c: New file. + * sysdeps/ia64/fpu/w_log10.c: New file. + * sysdeps/ia64/fpu/w_log10f.c: New file. + * sysdeps/ia64/fpu/w_log10l.c: New file. + * sysdeps/ia64/fpu/w_logf.c: New file. + * sysdeps/ia64/fpu/w_logl.c: New file. + * sysdeps/ia64/fpu/w_pow.c: New file. + * sysdeps/ia64/fpu/w_powf.c: New file. + * sysdeps/ia64/fpu/w_powl.c: New file. + * sysdeps/ia64/fpu/w_remainder.c: New file. + * sysdeps/ia64/fpu/w_remainderf.c: New file. + * sysdeps/ia64/fpu/w_remainderl.c: New file. + * sysdeps/ia64/fpu/w_scalb.c: New file. + * sysdeps/ia64/fpu/w_scalbf.c: New file. + * sysdeps/ia64/fpu/w_scalbl.c: New file. + * sysdeps/ia64/fpu/w_sqrt.c: New file. + * sysdeps/ia64/fpu/w_sqrtf.c: New file. + * sysdeps/ia64/fpu/w_sqrtl.c: New file. + * sysdeps/ia64/fpu/libm-test-ulps: Adjust for long double + implementation. + * sysdeps/ia64/fpu/bits/mathdef.h: Correct float_t and double_t types. + Change FP_ILOGBNAN for new implementation. + * Verions.def: Add 2.2.3 versions. + +2001-02-18 Ulrich Drepper + + * math/libm-test.inc (scalb_test): Require invalid exception being + raised for invalid parameters. + * sysdeps/i386/fpu/e_scalb.S: Raise invalid exception if necessary. + * sysdeps/i386/fpu/e_scalbf.S: Likewise. + * sysdeps/i386/fpu/e_scalbl.S: Likewise. + +2001-02-18 Mark Kettenis + + * sysdeps/mach/getsysstats.c (__get_phys_pages): Change return + value to long int. + (__get_avphys_pages): Likewise. + +2001-02-18 Ulrich Drepper + + * math/libm-test.inc (pow_test): Correct expected results for x == +-1. + * sysdeps/i386/fpu/e_pow.S: Handle x == +-1 correctly. + * sysdeps/i386/fpu/e_powf.S: Likewise. + * sysdeps/i386/fpu/e_powl.S: Likewise. + + * sysdeps/i386/fpu/bits/mathinline.h: Remove pow inline code. + +2001-02-17 Ulrich Drepper + + * math/Makefile (libm-calls): It's e_exp2 not s_exp2. + + * sysdeps/generic/s_exp2l.c: Renamed to... + * sysdeps/generic/e_exp2l.c: ...this. New file. + * sysdeps/i386/fpu/s_exp2.S: Renamed to... + * sysdeps/i386/fpu/e_exp2.S: ...this. New file. + * sysdeps/i386/fpu/s_exp2f.S: Renamed to... + * sysdeps/i386/fpu/e_exp2f.S: ...this. New file. + * sysdeps/i386/fpu/s_exp2l.S: Renamed to... + * sysdeps/i386/fpu/e_exp2l.S: ...this. New file. + * sysdeps/ieee754/flt-32/s_exp2f.c: Renamed to... + * sysdeps/ieee754/flt-32/e_exp2f.c: ...this. New file. + * sysdeps/ieee754/dbl-64/s_exp2.c: Renamed to... + * sysdeps/ieee754/dbl-64/e_exp2.c: ...this. New file. + * sysdeps/m68k/fpu/s_exp2.c: Renamed to... + * sysdeps/m68k/fpu/e_exp2.c: ...this. New file. + * sysdeps/m68k/fpu/s_exp2f.c: Renamed to... + * sysdeps/m68k/fpu/e_exp2f.c: ...this. New file. + * sysdeps/m68k/fpu/s_exp2l.c: Renamed to... + * sysdeps/m68k/fpu/e_exp2l.c: ...this. New file. + +2001-02-17 Andreas Jaeger + + * configure.in: Allow gcc 3. + +2001-02-16 Ulrich Drepper + + * math/w_acos.c: Move to ... + * sysdeps/generic/w_acos.c: ...here. New file. + * math/w_acosf.c: Move to ... + * sysdeps/generic/w_acosf.c: ...here. New file. + * math/w_acosh.c: Move to ... + * sysdeps/generic/w_acosh.c: ...here. New file. + * math/w_acoshf.c: Move to ... + * sysdeps/generic/w_acoshf.c: ...here. New file. + * math/w_acoshl.c: Move to ... + * sysdeps/generic/w_acoshl.c: ...here. New file. + * math/w_acosl.c: Move to ... + * sysdeps/generic/w_acosl.c: ...here. New file. + * math/w_asin.c: Move to ... + * sysdeps/generic/w_asin.c: ...here. New file. + * math/w_asinf.c: Move to ... + * sysdeps/generic/w_asinf.c: ...here. New file. + * math/w_asinl.c: Move to ... + * sysdeps/generic/w_asinl.c: ...here. New file. + * math/w_atan2.c: Move to ... + * sysdeps/generic/w_atan2.c: ...here. New file. + * math/w_atan2f.c: Move to ... + * sysdeps/generic/w_atan2f.c: ...here. New file. + * math/w_atan2l.c: Move to ... + * sysdeps/generic/w_atan2l.c: ...here. New file. + * math/w_atanh.c: Move to ... + * sysdeps/generic/w_atanh.c: ...here. New file. + * math/w_atanhf.c: Move to ... + * sysdeps/generic/w_atanhf.c: ...here. New file. + * math/w_atanhl.c: Move to ... + * sysdeps/generic/w_atanhl.c: ...here. New file. + * math/w_cosh.c: Move to ... + * sysdeps/generic/w_cosh.c: ...here. New file. + * math/w_coshf.c: Move to ... + * sysdeps/generic/w_coshf.c: ...here. New file. + * math/w_coshl.c: Move to ... + * sysdeps/generic/w_coshl.c: ...here. New file. + * math/w_drem.c: Move to ... + * sysdeps/generic/w_drem.c: ...here. New file. + * math/w_dremf.c: Move to ... + * sysdeps/generic/w_dremf.c: ...here. New file. + * math/w_dreml.c: Move to ... + * sysdeps/generic/w_dreml.c: ...here. New file. + * math/w_exp10.c: Move to ... + * sysdeps/generic/w_exp10.c: ...here. New file. + * math/w_exp10f.c: Move to ... + * sysdeps/generic/w_exp10f.c: ...here. New file. + * math/w_exp10l.c: Move to ... + * sysdeps/generic/w_exp10l.c: ...here. New file. + * math/w_exp2.c: Move to ... + * sysdeps/generic/w_exp2.c: ...here. New file. + * math/w_exp2f.c: Move to ... + * sysdeps/generic/w_exp2f.c: ...here. New file. + * math/w_exp2l.c: Move to ... + * sysdeps/generic/w_exp2l.c: ...here. New file. + * math/w_fmod.c: Move to ... + * sysdeps/generic/w_fmod.c: ...here. New file. + * math/w_fmodf.c: Move to ... + * sysdeps/generic/w_fmodf.c: ...here. New file. + * math/w_fmodl.c: Move to ... + * sysdeps/generic/w_fmodl.c: ...here. New file. + * math/w_hypot.c: Move to ... + * sysdeps/generic/w_hypot.c: ...here. New file. + * math/w_hypotf.c: Move to ... + * sysdeps/generic/w_hypotf.c: ...here. New file. + * math/w_hypotl.c: Move to ... + * sysdeps/generic/w_hypotl.c: ...here. New file. + * math/w_j0.c: Move to ... + * sysdeps/generic/w_j0.c: ...here. New file. + * math/w_j0f.c: Move to ... + * sysdeps/generic/w_j0f.c: ...here. New file. + * math/w_j0l.c: Move to ... + * sysdeps/generic/w_j0l.c: ...here. New file. + * math/w_j1.c: Move to ... + * sysdeps/generic/w_j1.c: ...here. New file. + * math/w_j1f.c: Move to ... + * sysdeps/generic/w_j1f.c: ...here. New file. + * math/w_j1l.c: Move to ... + * sysdeps/generic/w_j1l.c: ...here. New file. + * math/w_jn.c: Move to ... + * sysdeps/generic/w_jn.c: ...here. New file. + * math/w_jnf.c: Move to ... + * sysdeps/generic/w_jnf.c: ...here. New file. + * math/w_jnl.c: Move to ... + * sysdeps/generic/w_jnl.c: ...here. New file. + * math/w_lgamma.c: Move to ... + * sysdeps/generic/w_lgamma.c: ...here. New file. + * math/w_lgammaf.c: Move to ... + * sysdeps/generic/w_lgammaf.c: ...here. New file. + * math/w_lgammaf_r.c: Move to ... + * sysdeps/generic/w_lgammaf_r.c: ...here. New file. + * math/w_lgammal.c: Move to ... + * sysdeps/generic/w_lgammal.c: ...here. New file. + * math/w_lgammal_r.c: Move to ... + * sysdeps/generic/w_lgammal_r.c: ...here. New file. + * math/w_lgamma_r.c: Move to ... + * sysdeps/generic/w_lgamma_r.c: ...here. New file. + * math/w_log10.c: Move to ... + * sysdeps/generic/w_log10.c: ...here. New file. + * math/w_log10f.c: Move to ... + * sysdeps/generic/w_log10f.c: ...here. New file. + * math/w_log10l.c: Move to ... + * sysdeps/generic/w_log10l.c: ...here. New file. + * math/w_log.c: Move to ... + * sysdeps/generic/w_log.c: ...here. New file. + * math/w_logf.c: Move to ... + * sysdeps/generic/w_logf.c: ...here. New file. + * math/w_logl.c: Move to ... + * sysdeps/generic/w_logl.c: ...here. New file. + * math/w_pow.c: Move to ... + * sysdeps/generic/w_pow.c: ...here. New file. + * math/w_powf.c: Move to ... + * sysdeps/generic/w_powf.c: ...here. New file. + * math/w_powl.c: Move to ... + * sysdeps/generic/w_powl.c: ...here. New file. + * math/w_remainder.c: Move to ... + * sysdeps/generic/w_remainder.c: ...here. New file. + * math/w_remainderf.c: Move to ... + * sysdeps/generic/w_remainderf.c: ...here. New file. + * math/w_remainderl.c: Move to ... + * sysdeps/generic/w_remainderl.c: ...here. New file. + * math/w_scalb.c: Move to ... + * sysdeps/generic/w_scalb.c: ...here. New file. + * math/w_scalbf.c: Move to ... + * sysdeps/generic/w_scalbf.c: ...here. New file. + * math/w_scalbl.c: Move to ... + * sysdeps/generic/w_scalbl.c: ...here. New file. + * math/w_sinh.c: Move to ... + * sysdeps/generic/w_sinh.c: ...here. New file. + * math/w_sinhf.c: Move to ... + * sysdeps/generic/w_sinhf.c: ...here. New file. + * math/w_sinhl.c: Move to ... + * sysdeps/generic/w_sinhl.c: ...here. New file. + * math/w_sqrtl.c: Move to ... + * sysdeps/generic/w_sqrtl.c: ...here. New file. + * math/w_tgamma.c: Move to ... + * sysdeps/generic/w_tgamma.c: ...here. New file. + * math/w_tgammaf.c: Move to ... + * sysdeps/generic/w_tgammaf.c: ...here. New file. + * math/w_tgammal.c: Move to ... + * sysdeps/generic/w_tgammal.c: ...here. New file. + + * locale/programs/ld-address.c (address_finish): Add 'S' to allow + formats for postal_fmt. + +2001-02-16 Jakub Jelinek + + * sysdeps/unix/sysv/linux/alpha/syscalls.list (ftruncate): Add + __ftruncate64 alias. + * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (ftruncate): + Likewise. + +2001-02-15 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): No need to + do "loadrs". Writing to bspstore already takes care of + invalidating the "clean" partition. + +2001-02-16 Andreas Schwab + + * sysdeps/m68k/fpu/s_nextafterl.c: New file. + * sysdeps/m68k/fpu/s_fpclassifyl.c: New file. + +2001-02-15 Jakub Jelinek + + * posix/regex.c (init_syntax_once): Add prototype. + (TRANSLATE): If MBS_SUPPORT, translate all characters up to '\xff'. + (re_search_2): Avoid warning. + (count_mbs_length): Add prototype. + * posix/tst-regex3.c: New file. + * posix/Makefile (tests): Add bug-regex3. + +2001-02-15 Ulrich Drepper + + * stdio-common/Makefile (tests): Add tst-gets. + * stdio-common/tst-gets.c: New file. + * stdio-common/tst-gets.input: New file. + + * elf/elf.h (DT_CHECKSUM): Define. + + * sysdeps/generic/strtoll.c: Don't export __strto*_internal as + default symbol. + * sysdeps/generic/strtoull.c: Likewise. + +2001-02-14 Wolfram Gloger + + * malloc/malloc.c (new_heap): When allocating large chunk aligned + to HEAP_MAX_SIZE, prefer one with lower address, to avoid `holes' + between the heaps. + +2001-02-14 Ulrich Drepper + + * math/libm-test.inc (j0_test): Check whether sincos is available. + (j1_test): Likewise. + (jn_test): Likewise. + (y0_test): Likewise. + (y1_test): Likewise. + (yn_test): Likewise. + + * posix/tst-gnuglob.c: Make a few entries DT_UNKNOWN and teach + fake filesystem routines to handle this. + + * time/sys/time.h: Make settimeofday and adjtime available if + _BSD_SOURCE. + + * time/sys/time.h: Make timer* macros available for BSD. + + * iconvdata/gb18030.c: Update for Dec 2000 re-release of GB18030. + Patch by Yong Li . + + * sysdeps/generic/glob.c (CONVERT_DIRENT_DIRENT64): Fix copying of + name. + + * posix/Makefile (tests): Add tst-gnuglob. + * posix/tst-gnuglob.c: New file. + +2001-02-13 H.J. Lu + + * sysdeps/unix/sysv/linux/ia64/syscalls.list: Add __ftruncate64. + +2001-02-13 Ulrich Drepper + + * locale/programs/ld-paper.c (paper_output): Pretty printing. + + * iconvdata/Makefile (modules): Add GBBIG5. + (distribute): Add gbbig5.c. + * iconvdata/gconv-modules: Add entries for GBBIG5 module. + + * iconvdata/gbbig5.c: New file. + Contributed by Yong Li . + +2001-02-13 Philip Blundell + + * manual/crypt.texi: Remove outdated references to crypt add-on. + + * manual/creature.texi: Improve wording slightly. + +2001-02-13 Ulrich Drepper + + * io/ftw.c: Always use readdir64. + * io/ftw64.c: Likewise. + * sysdeps/unix/sysv/linux/ttyname.c: Likewise. + * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. + * sysdeps/generic/glob.c: Likewise. Convert results of gl_readdir + callback to dirent. Still allow compiling outside glibc. + * sysdeps/gnu/glob64.c: Define COMPILE_GLOB64. + * sysdeps/unix/sysv/linux/i386/glob64.c: Likewise. + + * malloc/mtrace.c: Use fopen64. + * posix/spawni.c: Use __open64. + * sysdeps/unix/opendir.c: Likewise. + * sysdeps/unix/sysv/linux/gethostid.c: Likewise. + + * sysdeps/generic/ftruncate64.c: Define __ftruncate64 and make old + name a weak alias. + * sysdeps/unix/sysv/aix/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise. + + * resolv/res_data.c: Add cast to avoid warning. + + * include/unistd.h: Declare __ftruncate64. + + * sysdeps/generic/utmp_file.c: Use LFS functions and types. + + * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Use __lseek64 + instead of __lseek. + +2001-02-13 Andreas Jaeger + + * login/getutent_r.c: Include for NULL. + * login/getutid_r.c: Likewise. + +2001-02-12 Ulrich Drepper + + * sysdeps/dbl-64/e_j0.c: Little optimization, use sincos. + * sysdeps/dbl-64/e_j1.c: Likewise. + * sysdeps/dbl-64/e_jn.c: Likewise. + * sysdeps/flt-32/e_j0f.c: Likewise. + * sysdeps/flt-32/e_j1f.c: Likewise. + * sysdeps/ldbl-96/e_j0l.c: Likewise. + +2000-12-02 H.J. Lu + + * resolv/res_libc.c (res_init): Don't make it default. + +2001-02-12 Ulrich Drepper + + * manual/debug.texi: Improved the wording. + Patch by Philip Blundell . + +2001-02-12 Andreas Jaeger + + * posix/Makefile (tests): Don't run bug-regex2 when + cross-compiling. + + * libio/Makefile (tests): Don't run test-freopen when + cross-compiling. + + * manual/stdio.texi (Streams and I18N): Fix typos. + +2001-02-12 Ulrich Drepper + + * sysdeps/i386/fpu/libm-test-ulps: Adjust for errors in y0l. + + * math/libm-test.inc (j0_test): Make expected results long double + constants. + (y0_test): Likewise. + + * sysdeps/ieee754/ldbl-96/e_j0l.c: New file. + Contributed by Stephen L. Moshier . + +2001-02-11 Jakub Jelinek + + * sysdeps/generic/strtoll.c (__strtoq_internal): Ressurect alias + which was exported from libc. + * sysdeps/generic/strtoull.c (__strtouq_internal): Likewise. + +2001-02-12 Andreas Jaeger + + * manual/arith.texi (Parsing of Integers): Fix some wordings. + +2001-02-11 Ulrich Drepper + + * sysdeps/generic/getsysstat.c: Change return value of get_phys_pages + and get_avphys_page to long int. + * sysdeps/unix/sysv/linux/getsysstat.c: Likewise. + * include/sys/sysinfo.h: Likewise. + * sysdeps/generic/sys/sysinfo.h: Likewise. + * sysdeps/unix/sysv/linux/sys/sysinfo.h: Likewise. + + * sysdeps/unix/sysv/linux/getloadavg.c (getloadavg): Fail if we + cannot return as many values as the user asked for. + +2001-02-11 Andreas Jaeger + + * manual/resource.texi (Memory Resources): Fix typo. + + * libio/Makefile ($(objpfx)test-freopen.out): Pass + run-program-prefix. + + * libio/test-freopen.sh: Use run_program_prefix. + +2001-02-10 Andreas Jaeger + + * stdlib/Makefile (tests): Don't run tst-fmtmsg when + cross-compiling. + ($(objpfx)tst-fmtmsg.out): Pass run-program-prefix. + + * stdlib/tst-fmtmsg.sh (test): Use run_program_prefix for static + only builds. + + * elf/Makefile (tests): Only run tst-pathopt with shared libs. + + * posix/Makefile: Fix typo, it's build-static-nss. + + * iconv/Makefile (extra-objs): New. + +2001-02-10 Mark Kettenis + + * sysdeps/unix/stime.c: Include . + + * sysdeps/mach/hurd/setitimer.c: Include . + +2001-02-10 Andreas Jaeger + + * manual/string.texi (Search Functions): Fix typo. + +2001-02-10 Mark Kettenis + + * sysdeps/unix/bsd/times.c: Reorder includes and add . + (timeval_to_clock_t): Add clk_tck argument and use that instead of + CLK_TCK. + (__times): Use __getclktck to get the number of clock ticks per + second and use its return value instead of CLK_TCK. + +2001-02-10 Mark Kettenis + + * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h (_HAVE_SA_LEN): Define. + +2001-02-10 Mark Kettenis + + * sysdeps/mach/gettimeofday.c: Include . + +2001-02-10 Andreas Jaeger + + * wctype/wcfuncs.c (func): Add prototype declarations to avoid + warning. + +2001-02-09 Ulrich Drepper + + * posix/Makefile: Add rules to build and run bug-regex2. + * posix/bug-regex2.c: New file. + +2001-02-10 Jakub Jelinek + + * posix/regex.c (convert_mbs_to_wcs): Change is_binary to char *. + (regex_compile): Likewise. + (FREE_VARIABLES): Don't free is_binary1 and is_binary2. + (re_match_2_internal): Use just is_binary instead of two variables. + Use REGEX_TALLOC to allocate it and FREE_VAR to free on failure. + +2001-02-09 Ulrich Drepper + + * version.h (VERSION): Bump to 2.2.2. + + * iconv/Makefile (distribute): Add iconv_charmap.c and + dummy-repertoire.c. + * elf/Makefile (distribute): Add firstobj.c. + * Makefile (distribute): Add include/pthread.h. + + * configure.in: Require makeinfo version 4. + + * libio/tst_wscanf.c (main): Add cast to avoid warning. + * libio/tst_swscanf.c (main): Likewise.. + +2001-02-09 Jakub Jelinek + + * sysdeps/generic/setenv.c (unsetenv): Remove const from len. + * sysdeps/sparc/fpu/bits/mathinline.h (sqrt, fdim): Don't define if + __NO_MATH_INLINES. + * sysdeps/i386/dl-machine.h (elf_machine_rel): Only declare refsym + if not RTLD_BOOTSTRAP. + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. + * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. + +2001-02-09 Ulrich Drepper + + * locale/programs/linereader.c (get_ident): Stop loop if EOF. Use + lr_ungetc to push back last read character. + * locale/programs/linereader.h (lr_ungetc): Don't push back is + character is EOF. + (lr_ignore_rest): Don't warn about garbage if it is really the end + of the file. + + * manual/Makefile: Use ifnottext and not ifinfo to protect Top node + definition. + +2001-02-08 Ulrich Drepper + + * Makerules (build-shlib): Work around different order of + processing of -B option in different gcc versions. + + * posix/regex.c: Fix alignment problem. + Patch by Isamu Hasegawa . + + * sysdeps/alpha/strrchr.S: Little optimization. + Patch by Richard Henderson . + + * sysdeps/alpha/alphaev67/strrchr.S: New file. + Contributed by Rick Gorton . + +2001-02-08 kaz Kojima + + * sysdeps/sh/sh3/setjmp.S (__sigsetjmp): Correct function name + in the assembler end directive. + +2001-02-08 Andreas Jaeger + + * manual/stdio.texi (Closing Streams): Fix typos. + +2001-02-07 Ulrich Drepper + + * sysdeps/alpha/alphaev67/strncat.S: Align last write address. + Patch by Richard Henderson . + Reported by Claus-Justus Heine . + + * stdlib/strfmon.c [USE_IN_LIBIO]: Define lock variable and store + pointer in FILE structure before calling _IO_init. + * stdlib/Makefile: Add -D_IO_MTSAFE_IO to CFLAGS for strfmon and + strfmon_l if necessary. + Reported by Jury Gerold . + + * sysdeps/gnu/netinet/tcp.h: Correct values of TCP_ macros. + Patch by Pekka.Pietikainen@cern.ch. + + * posix/regex.c: Correct several problems with 64-bit architectures + introduced in the MBS changes. + Patch by Isamu Hasegawa . + +2001-02-07 Jakub Jelinek + + * math/tgmath.h: Only add l suffixes if __NO_LONG_DOUBLE_MATH is + not defined. + * sysdeps/alpha/fpu/bits/mathinline.h: Honour __NO_MATH_INLINES. + +2001-02-07 Andreas Jaeger + + * manual/install.texi (Tools for Compilation): Fix typo. + Reported by Pavel Machek . + +2001-02-07 Ulrich Drepper + + * stdlib/strtod.c: Never stop prematurely reading digits before the + decimal point is found. Compute exponent limit for negative exponents + correctly. For numbers ending in all zeros eat the zeros even before + the decimal point if the exponent is negative [PR libc/2072]. + * stdlib/Makefile (tests): Add bug-strtod. + * stdlib/bug-strtod.c: New file. + +2001-02-07 Andreas Jaeger + + * posix/bug-regex1.c: Include for fwide. + +2001-02-06 Ulrich Drepper + + * posix/regex.c (regex_compile): Don't store pointer in wchar_t array. + Store index. + (compile_range): Handle index being passed, not pointer. + Patch by Isamu Hasegawa . + + * posix/regex.c: Fix a cast in the code for bracket handling which + caused 8-bit uncleanliness. + Patch by Michal Jaegermann . + + * posix/Makefile (tests): Add bug-regex1. + * posix/bug-regex1.c: New file. + Contributed by Jim Meyering . + + * posix/regex.c: Many cleanups for incorrect format strings. + +2001-02-06 Andreas Jaeger + + * time/time.h (CLK_TCK): Check for !__STRICT_ANSI. + +2001-02-06 Ulrich Drepper + + * locale/programs/locale.c (write_locales): Use scandir to read + directory so that the entries are sorted. + +2001-02-06 Andreas Jaeger + + * include/pthread.h: New file. + + * wctype/wctype.h: Move internal interfaces from here to... + * include/wctype.h: ...here. + + * wcsmbs/wchar.h: Move __wcslen from here to... + * include/wchar.h: ...here. + + * posix/sys/wait.h: Move __wait from here to... + * include/sys/wait.h: ...here. + + * string/string.h: Move __ffs and __strerror_r from here to... + * include/string.h: ...here. + + * stdlib/stdlib.h: Move __on_exit from here to... + * include/stdlib.h: ...here. + + * libio/stdio.h: Move __vsnprintf from here to... + * include/stdio.h: ...here. + +2001-02-06 Andreas Schwab + + * sysdeps/unix/sysv/linux/ia64/ioperm.c: Don't include kernel + headers. + + * timezone/Makefile: Don't assume that $(inst_zonedir) is a subdir + of $(inst_datadir). + +2001-02-06 Ulrich Drepper + + * iconvdata/Makefile: Add dependency for bug-iconv2.out. + +2001-02-06 Andreas Jaeger + + * elf/firstobj.c: Add prototype. + + * posix/regex.c (convert_mbs_to_wcs): Make static, add prototype + (truncate_wchar): Likewise. + +2001-02-06 Ulrich Drepper + + * locale/programs/locale.c: Implement --verbose option for -a + which prints detailed information about the locales. + +2001-02-05 Ulrich Drepper + + * sunrpc/xdr_rec.c (set_input_fragment): Change type of header + variable to uint32_t. + Reported by Ulrich Weigand . + +2001-02-04 Bruno Haible + + * locale/C-translit.h.in: Add transliterations for CJK units of + measurement. + +2001-02-05 Ulrich Drepper + + * elf/cache.c (print_entry): Use PRIx64 instead of Lx in printf + string. Include instead of . + + * localedata/Makefile (tests): Add bug-iconv-trans. + Define bug-iconv-trans-ENV. + * localedata/bug-iconv-trans.c: New file. + +2001-02-04 Bruno Haible + + * iconv/gconv_trans.c (__gconv_transliterate): Use a temporary output + pointer, to avoid accumulating output from incomplete (unsuccessful) + transliteration attempts. + +2001-02-05 Ulrich Drepper + + * elf/ldconfig.c (search_dir): Use PRIx64 instead of Lx in printf + string. Include instead of . + + * configure.in: Add check for bison. + * config.make.in: Define BISON variable. + * intl/Makefile: Use BISON instead of YACC when generating plural.c. + Rename YFLAGS to BISONFLAGS. + +2001-02-05 Andreas Jaeger + + * io/test-lfs.c (do_test): Test lseek64 return value, call + test_ftello. + (test_ftello): New function to test ftello64 and fseeko64. + + * signal/signal.h: Move __sigaction from here to... + * include/signal.h: ...here. + + * io/fcntl.h: Move __fcntl and __open to... + * include/fcntl.h: ...here. + +2001-02-04 Philip Blundell + + * configure.in: Distinguish ARM from Thumb. + +2001-02-04 Philip Blundell + + * sysdeps/arm/dl-machine.h (elf_machine_rel): Correct handling of + PC24 relocs with negative value. + +2001-02-04 Ulrich Drepper + + * iconv/Makefile (iconv_prog-modules): Define. Add vpath to find + files in locale/programs. Add CFLAGS definition to allow compiling + localedef files. + * iconv/dummy-repertoire.c: New file. + * iconv/iconv_charmap.c: New file. + * iconv/iconv_prog.h: New file. + * iconv/iconv_prog.c: Make verbose and omit_invalid global. + (main): If parameter for -f and -t contain slashes try first to resolve + the strings as filenames of charmap files. Use them for conversion + in this case. + * iconvdata/run-iconv-test.sh: If charmaps exist also run tests with + iconv getting charmap names as parameters. + * locale/programs/linereader.c (lr_token): Take extra parameters + verbose and pass it to get_string. + (get_string): Take extra parameters verbose. + * locale/programs/charmap.c (parse_charmap): Take extra parameters + verbose and be_quiet. Change all callers of lr_token and + parse_charmap. + * locale/programs/charmap.h: Likewise. + * locale/programs/ld-address.c: Likewise. + * locale/programs/ld-collate.c: Likewise. + * locale/programs/ld-ctype.c: Likewise. + * locale/programs/ld-identification.c: Likewise. + * locale/programs/ld-measurement.c: Likewise. + * locale/programs/ld-messages.c: Likewise. + * locale/programs/ld-monetary.c: Likewise. + * locale/programs/ld-name.c: Likewise. + * locale/programs/ld-numeric.c: Likewise. + * locale/programs/ld-paper.c: Likewise. + * locale/programs/ld-telephone.c: Likewise. + * locale/programs/ld-time.c: Likewise. + * locale/programs/linereader.c: Likewise. + * locale/programs/linereader.h: Likewise. + * locale/programs/localedef.c: Likewise. + * locale/programs/locfile.c: Likewise. + * locale/programs/locfile.h: Likewise. + * locale/programs/repertoire.c: Likewise. + +2001-02-03 Ulrich Drepper + + * iconv/iconv_prog.c (main): If output file name is "-" write to + stdout. + (main): If -f or -t argument is missing use charset of the current + locale. + +2001-02-03 Andreas Jaeger + + * sysdeps/i386/elf/start.S (_start): Align stack to 16-byte + boundary for SSE/SSE-2 alignment. + + * posix/Makefile ($(objpfx)annexc.out): Also pass sysincludes to + annexc. + +2001-02-03 Ulrich Drepper + + * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: File was using crlf. + Remove comma at end of enum. + + * elf/dl-init.c: Add a few __builtin_expect. + + * hesiod/hesiod.c: Remove unnecessary code. Remove all uses of strcat. + +2001-02-02 Ulrich Drepper + + * hesiod/hesiod.c (hesiod_resolve): Also search HS records if + errno is ECONNREFUSED. + + * posix/Makefile: Define MBS_SUPPORT for regex.c. + * posix/regex.c: Implement multibyte character handling. + Patch by Isamu Hasegawa . + + * string/tst-svc.input: Add two more test cases. + * string/tst-svc.expect: Modify to reflect new test cases. + +2001-02-01 Jakub Jelinek + + * sysdeps/posix/getaddrinfo.c (gaih_local, gaih_inet): Replace all + tp->name tests with tp->name[0] tests. + +2001-01-29 Ben Collins + + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r): + Fix check for name == NULL. + +2001-02-01 Ulrich Drepper + + * elf/Makefile: Add rules to build and run initfirst test. + * elf/initfirst.c: New file. + * elf/firstobj.c: New file. + + * Makerules (build-shlib): Add $(extra-B-$(@F:lib%.so=%).so). + * configure.in: Test for -z initfirst linker option. + * config.make.in: Add have-z-initfirst. + * elf/dl-init.c (_dl_init): Split out actual initialization code in + new function call_init. If _dl_initfirst is non-NULL initialize first. + * elf/dl-load.c (_dl_map_from_fd): If DF_1_INITFIRST flag is set + remember object in _dl_initfirst. + * elf/soinit.c: Remove special support for calling + __pthread_initialize_minimal. + + * conform/conformtest.pl: Add missing $prepend in type test. + +2001-01-31 Ulrich Drepper + + * elf/elf.h (SHT_CHECKSUM): New definition. + + * posix/fnmatch_loop.c: Remove incorrect reverse condition in + [. .] matching. Patch by Isamu Hasegawa . + * posix/tst-fnmatch.input: Add tests for [. .] in locales. + +2001-01-31 Mark Kettenis + + * misc/sys/select.h: Include instead of + to get definition of `struct timeval'. + +2001-01-31 Ulrich Drepper + + * posix/tst-fnmatch.input: Add test cases for de_DE.UTF-8 locale. + * posix/fnmatch_loop.c: Fix handling of [= =] for multibyte charsets. + +2001-01-30 Ulrich Drepper + + * iconv/gconv_open.c (__gconv_open): Set conv_flags if IGNORE is + seen, not flags. + + * nis/nis_findserv.c: Include . + +2001-01-30 Yong Li + + * iconv/iconv_prog.c (main): Correct error handling method name. + +2001-01-29 Ben Collins + + * sysdeps/sparc/fpu/fraiseexcpt.c: Include . + * sysdeps/hppa/fpu/fraiseexcpt.c: Likewise. + * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise. + * sysdeps/s390/fpu/fraiseexcpt.c: Likewise. + +2001-01-30 Ulrich Drepper + + * locale/programs/ld-measurement.c (measurement_finish): Fix a typo. + Patch by Marko Myllynen . + + * string/bits/string2.h (__strpbrk_c2): Correct parameter types + (int instead of char). + (__strpbrk_c3): Likewise. + Reported by GOTO Masanori . + + * sysdeps/generic/bits/sockaddr.h: Remove SA_LEN macro. + * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h: Likewise. + * include/sys/socket.h: Add SA_LEN here for internal use. + Reported by Arkadiusz Miskiewicz . + +2001-01-29 Ulrich Drepper + + * malloc/Makefile: Don't build memusagestat if cross-compiling. + + * sysdeps/generic/dl-sysdep.c (set_seen): Fix typo. + + * math/libm-test.inc (rint_test): Add a few more tests for round + to even rounding. + +2001-01-28 Ulrich Drepper + + * conform/data/pthread.h-data: Correct return type of pthread_exit. + + * conform/conformtest.pl: Add -fno-builtin to CFLAGS. + + * conform/data/stdlib.h-data: Add _Exit. + + * inet/arpa/inet.h: Don't include . Define socklen_t + if not already happened. + * inet/netinet/in.h: Don't include , use . + Don't include and . + + * conform/data/netinet/in.h-data: Allow all of . + + * conform/data/spawn.h-data: Allow all of . + + * sysdeps/ia64/fpu/fraiseexcpt.c: Include . Removed + unused variable. + + * sunrpc/xdr_rec.c (xdrrec_getpos): Add cast to long to avoid warning. + * sunrpc/xdr_sizeof.c (x_inline): Likewise. + + * sysdeps/ieee754/ldbl-96/s_frexpl.c: Include . + + * conform/conformtest.pl: Define $mustprepend{"stdio.h"}. + * libio/stdio.h: Define va_list correctly. + + * conform/data/pthread.h-data: Make priority protocol related + functions optional. Fix typos. + + * posix/sched.h: Define sched_priority as __sched_priority. + * sysdeps/generic/bits/sched.h (struct sched_param): Rename element + to __sched_priority. + * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. + +2001-01-27 Ulrich Drepper + + * sysdeps/generic/clock_getcpuclockid.c: Include instead + of . + + * sysdeps/unix/stime.c: Include for NULL. + * sysdeps/unix/time.c: Likewise. + + * conform/data/time.h-data: CLK_TCK is not in XPG6. Fix tzname entry. + * sysdeps/mach/hurd/bits/time.h: Don't define CLK_TCK for XPG6. + * sysdeps/mach/hurd/i386/bits/time.h: Likewise. + * sysdeps/unix/sysv/linux/bits/time.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise. + * sysdeps/unix/sysv/linux/i386/bits/time.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/time.h: Likewise. + * time/time.h: Likewise. + + * conform/conformtest.pl (@headers): Add complex.h and tgmath.h. + * conform/data/complex.h-data: New file. + * conform/data/tgmath.h-data: New file. + + * conform/data/wchar.h-data: Add missing functions. + + * sysdeps/gnu/bits/utmpx.h: Define RUN_LVL only if __USE_GNU. + + * conform/data/termios.h-data: Add missing const in tcsetattr() + prototype. + + * posix/sys/wait.h: Include and . + Don't define pid_t here. + + * conform/data/sys/utsname.h-data: Don't provide fixed array sizes. + + * conform/data/sys/time.h-data: Allow sys/select.h. + * conform/data/sys/un.h-data: Fix typo. + * time/sys/time.h: Don't include all of , just struct timeval. + * sysdeps/posix/clock_getres.c: Include instead of + . + * sysdeps/unix/clock_nanosleep.c: Likewise. + * sysdeps/unix/i386/clock_getcpuclockid.c: Likewise. + * sysdeps/unix/i386/i586/clock_getres.c: Likewise. + * sysdeps/unix/clock_gettime.c: Also include . + * sysdeps/unix/clock_settime.c: Likewise. + + * sysdeps/generic/pselect.c: Include for NULL. + * login/getutent.c: Likewise. + * login/getutid.c: Likewise. + * login/getutline.c: Likewise. + + * socket/sys/un.h: Define SUN_LEN only if __USE_MISC. + + * sysdeps/unix/sysv/linux/bits/statvfs.h: Change type of f_fsid field + to unsigned long. Add __f_unused. Define _STATVFSBUF_F_UNUSED. + * sysdeps/unix/sysv/linux/internal_statvfs.c: Adjust initialization of + f_fsid field after change in struct statvfs. + * sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: New file. + * sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/statvfs.h: New file. + + * conform/data/sys/stat.h-data: Remove isfdtype. Use + optional-macro. + + * conform/data/sys/socket.h-data: Fix typos. Correct getsockopt, + recvfrom, send, and socketpair prototypes. Add allow lines. + * socket/sys/socket.h: Include . + Don't use fancy __SOCKADDR_ARG definition unless __USE_GNU. + Fix type of second parameter of listen. + Don't declare isfdtype unless __USE_MISC. + * sysdeps/generic/listen.c: Fix type of second parameter of listen. + * sysdeps/mach/hurd/listen.c: Likewise. + * sysdeps/generic/bits/socket.h (struct sockaddr_storage): Define + ss_family and __ss_family. + * sysdeps/unix/sysv/aix/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. + (struct msghdr): Change type of msg_iovlen to int and type of + msg_controllen to socklen_t. + * sysdeps/unix/sysv/linux/alpha/bits/socket.h: New file. + * sysdeps/unix/sysv/linux/ia64/bits/socket.h: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/socket.h: New file. + * inet/rcmd.c (rcmd_af): __ss_family is now ss_family. + (rresvport_af): Likewise. + + * conform/data/sys/shm.h-data: SHMLBA is not required to by a constant. + * conform/conformtest.pl: Implement handling of symbol. + + * signal/signal.h: Fix handling of __need_* symbols. + * misc/sys/select.c: Define fd_set here. Remove __fd_set. Define + fd_mask only if __USE_MISC. Declare pselect for __USE_XOPEN2K. + * include/sys/select.h: Use fd_set not __fd_set. + * sysdeps/generic/bits/select.h: Likewise. + * sysdeps/i386/bits/select.h: Likewise. + * sysdeps/generic/bits/types.h: Don't define __fd_mask, __NFDBITS, + __FDELT, __FDMASK, and __fd_set here. + * sysdeps/unix/sysv/aix/bits/types.h: Likewise. + * sysdeps/unix/sysv/hpux/bits/types.h: Likewise. + * sysdeps/unix/sysv/linux/bits/types.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/types.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise. + * sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise. + * time/sys/time.h: Define struct timeval before including + and . + + * conform/data/sys/time.h-data: fd_set is a typedef. + * conform/data/sys/select.h-data: New file. + * conform/data/sys/mman.h-data: Make typed mem stuff optional. + * conform/conformtest.pl (@headers): Add sys/select.h. + (type, optional-type): Unless testing a typedef instantiate object. + Implement optional-function. + + * math/test-misc.c: Include . + +2001-01-27 Andreas Jaeger + + * misc/efgcvt_r.c: Include . + +2001-01-26 Ulrich Drepper + + * conform/data/stdlib.h-data: Account for XPG6 changes. + * stdlib/stdlib.h (__random): Change return value type to long. + (posix_memalign): Cleanup parameter names. + (setenv, unsetenv): Make available for __USE_XOPEN2K. + Change return type of unsetenv to int. + (qecvt, qgcvt, qfcvt): Declare only if __USE_MISC. + * include/stdlib.h: Change return type of unsetenv to int. + Change return type of random to long int. + * sysdeps/generic/setenv.c (unsetenv): Change return type to int. + Return -1 and set errno if parameter is invalid. + * stdlib/random.c (__random): Change return value type to long. + + * conform/data/stdio.h-data: Account for changes in XPG6. + + * conform/data/spawn.h-data: Correct posix_spawnattr_setflags + prototype. + + * conform/conformtest.pl: Define $mustprepend{"signal.h"}. + * conform/data/signal.h-data: Fix sigev_notify_function entry. + Fix typo (SIGVALRM -> SIGVTALRM). + * sysdeps/unix/sysv/linux/bits/siginfo.h: Define sigev_notify_attr + with real type. + * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/bits/siginfo.h: Likewise. + + * conform/conformtest.pl: Implement optional-element. Define + $mustprepend{"sched.h"}. + * conform/data/sched.h-data: Make sporadic scheduler definitions + optional. + + * pwd/pwd.h: Don't define getpwent_r for XPG. + + * io/sys/poll.h: Define nfds_t and use it in poll prototype. + * sysdeps/generic/poll.c: Use nfds_t type in function definition. + * sysdeps/mach/hurd/poll.c: Likewise. + * sysdeps/unix/bsd/poll.c: Likewise. + * sysdeps/unix/sysv/linux/poll.c: Likewise. + * sysdeps/unix/sysv/aix/poll.c: Likewise. + * sysdeps/generic/bits/poll.h: Define NPOLLFILE only if __USE_MISC. + * sysdeps/unix/sysv/linux/bits/poll.h: Likewise. + * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/poll.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise. + * conform/data/poll.h-data: Fix typo in poll prototype. + + * sysdeps/gnu/netinet/tcp.h: Define everything but TCP_ macros + only if __USE_MISC. + * conform/data/netinet/tcp.h-data: Reserved prefix TCP_. + + * sysdeps/gnu/net/if.h: Cleanup namespace. Define IF_NAMESIZE. + + * inet/netinet/in.h: Make IPPROTO_ constants also macros. + + * conform/conformtest.pl: Implement optional-type. + + * resolv/netdb.h: Include not . Include + only if __USE_MISC. Include instead of + defining uint32_t here. Define IPPORT_RESERVED. + (struct hostent): Type of h_length element is int. + (getnameinfo): Type of flags parameter is unsigned int. + * inet/getnameinfo.c (getnameinfo): flags argument is unsigned. + * conform/data/netdb.h-data: Add many missing definitions. + + * conform/conformtest.pl: Implement optional-macro. + * conform/data/math.h-data: Update for XPG6. + + * math/math.h (HUGE): Define as FLT_MAX value but don't use + FLT_MAX. Don't include . + (MAXFLOAT): Likewise. + + * math/math.h: Define MATH_ERRNO and MATH_ERREXCEPT. + + * include/bits/xopen_lim.h: Don't define FOPEN_MAX here. + + * conform/data/limits.h-data: Mark constants as optional wherever + appropriate. + + * posix/bits/posix2_lim.h: Set correct values for + _POSIX2_COLL_WEIGHTS_MAX and _POSIX2_CHARCLASS_NAME_MAX. Remove + EQUIV_CLASS_MAX. + + * posix/bits/posix1_lim.h: Define _POSIX_TZNAME_MAX as 6. + Required by POSIX. + + * intl/loadmsgcat.c: Include for _LIBC. + + * conform/data/netinet/in.h-data: Add reserved prefixes. + + * conform/data/arpa/inet.h-data: Fix a few typos. + +2001-01-26 Andreas Jaeger + + * sysdeps/generic/strtol.c: Include + * stdlib/strtod.c: Likewise + * stdlib/strfmon.c: Likewise. + * string/strcoll.c: Likewise. + * string/strxfrm.c: Likewise. + * wctype/wcfuncs_l.c: Likewise. + * wctype/wctype_l.c: Likewise. + * wctype/wctrans_l.c: Likewise. + + * include/bits/locale.h: New file. + +2001-01-26 Ulrich Drepper + + * locale/langinfo.h: Correct logic in #ifs when defining YESSTR + and NOSTR. + + * locale/Makefile (headers): Add bits/locale.h. + * locale/langinfo.h: Don't include . Include + and use __LC_ constants instead of LC_. + * locale/locale.h: Include and define LC_ constants + using __LC_ constants. + * locale/bits/locale.h: New file. + * locale/loadlocale.c: Include . + * locale/nl_langinfo.h: Likewise. + + * posix/glob.h: Cleanup namespace for non-_GNU_SOURCE case. + + * io/sys/stat.h: Define S_IFSOCK for XPG6. + + * conform/data/fcntl.h-data: posix_madvise is not expected here. + + * conform/conformtest.pl: Fix handling of macro-str. + + * conform/data/inttypes.h-data: Add missing definition and all of + stdint.h-data. + + * sysdeps/unix/sysv/linux/sys/param.h (MAXSYMLINKS): Bump to 20. + +2001-01-25 Ulrich Drepper + + * conform/conformtest.pl (@headers): Add stdint.h. + * conform/data/stdint.h-data: New file. + + * conform/conformtest.pl: Recognize options --headers and + --dialect. Add dialect-specific CFLAGS. + + * conform/conformtest.pl: Implement handling of recursive + allow-header. + + * conform/data/locale.h-data: Add new struct lconv members. + + * posix/wordexp.h: Correct definition of wordexp_t. + * posix/wordexp.c: Moved to ... + * sysdeps/generic/wordexp.c: ...here. New file. + * sysdeps/unix/sysv/linux/alpha/wordexp.c: New file. + * sysdeps/unix/sysv/linux/ia64/wordexp.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc64/wordexp.c: New file. + * sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.2.2): Add + wordexp. + * sysdeps/unix/sysv/linux/ia64/Versions: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: Likewise. + + * math/tgmath.h: Pretty printing. + + * math/Makefile (tests): Add test-tgmath. + (CFLAGS-test-tgmath.c): New variable. + * math/test-tgmath.c: New file. Contributed by Jakub Jelinek. + + * conform/conformtest.pl: Handle allow-header in secondary headers + correctly. + + * conform/data/fcntl.h-data: Mark symbols introduced in XPG6 with + #ifdef. + + * conform/data/netinet/in.h-data: Use correct comment character. + * conform/data/sys/stat.h-data: Likewise. + +2001-01-25 Jakub Jelinek + + * math/tgmath.h (__TGMATH_BINARY_FIRST_REAL_ONLY, + __TGMATH_BINARY_REAL_ONLY, __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY, + __TGMATH_TERNARY_REAL_ONLY): Use proper arguments to + __builtin_classify_type, add ##f suffixes where appropriate. + (__TGMATH_UNARY_REAL_IMAG): Remove extraneous left parenthesis. + (__TGMATH_BINARY_REAL_IMAG): Likewise, use proper arguments to + __builtin_classify_type. + (fma): Fix spelling of first argument. + +2001-01-25 Ulrich Drepper + + * conform/data/unistd.h-data: Mark functions removed in XPG6 + correctly. + + * posix/unistd.h: Don't make functions removed in XPG6 available if + __USE_XOPEN2K. + + * conform/conformtest.pl: Implement optional-constant. + * conform/data/unistd.h-data: Use optional-constant wherever + appropriate. + + * sysdeps/generic/bits/confname.h: Correct names of _SC_PBS + constants and add _SC_STREAMS. + * sysdeps/posix/sysconf.c (__sysconf): Likewise. + + * sysdeps/unix/sysv/linux/statvfs64.c: Rename to __statvfs64 and + make old name weak alias. + * sysdeps/generic/statvfs64.c: Likewise. + * sysdeps/unix/sysv/linux/fstatvfs64.c: Rename to __fstatvfs64 and + make old name weak alias. + * sysdeps/generic/fstatvfs64.c: Likewise. + * include/sys/statvfs.h: New file. + + * sysdeps/generic/bits/confname.h: Define _PC_REC_INCR_XFER_SIZE, + _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, and + _PC_REC_XFER_ALIGN. + * sysdeps/posix/pathconf.c (__pathconf): Implement handling of + _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, + _PC_REC_MIN_XFER_SIZE, and _PC_REC_XFER_ALIGN. + * sysdeps/posix/fpathconf.c (__fpathconf): Likewise. + + * conform/conformtest.pl: Run Unix tests for XPG6. + Implement handling of known namespace violations. + Improve printing of results. + + * posix/unistd.h (usleep): Correct return type. + * sysdeps/unix/sysv/linux/usleep.c: Correct return type. + * sysdeps/unix/bsd/usleep.c: Correct return type. + * sysdeps/mach/usleep.c: Correct return type. + * sysdeps/generic/usleep.c: Correct return type. + + * posix/unistd.h (sync): Correct return type. + * sysdeps/generic/sync.c: Likewise. + * sysdeps/mach/hurd/sync.c: Likewise. + + * sysdeps/generic/bits/confname.h (_SC_IOV_MAX): New definition. + + * posix/unistd.h: Make seteuid and setegid available for XPG6. + + * wcsmbs/wchar.h: Get FILE definition for XPG5. + + * conform/data/ctype.h-data: Use correct comment form. + * conform/data/errno.h-data: Likewise. + * conform/data/math.h-data: Likewise. + * conform/data/mqueue.h-data: Likewise. + * conform/data/netdb.h-data: Likewise. + * conform/data/pthread.h-data: Likewise. + +2001-01-24 Ulrich Drepper + + * conform/data/wordexp.h-data: Fix typo. + + * conform/conformtest.pl: Handle allow-header correctly. + + * conform/data/time.h-data: Use correct comment form. + + * conform/conformtest.pl (checknamespace): Ignore #undef lines. + + * configure.in: Comment out binutils version test. + + * stdlib/strtod.c (str_to_mpn): Correct parsing of thousands + separators. + Reported by Lagardere Jean-Francois . + + * stdlib/tst-strtod.c (locale_test): New function. + (main): Call locale_test. + * stdlib/Makefile (tst-strtod-ENV): New variable. + +2001-01-24 Mark Kettenis + + * hurd/hurdsig.c (_hurdsig_getenv): Remove spurious innermost + declaration of value such that we actually return the value of the + environment variable. + +2001-01-24 Andreas Jaeger + + * sysdeps/unix/sysv/linux/init-first.c: Remove extra __sysctl + prototype. + * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. + + * include/sys/sysctl.h: New file. + +2001-01-23 Andreas Jaeger + + * stdlib/Makefile ($(objpfx)isomac.out): Also pass sysincludes to + isomac. + + * elf/dl-load.c (_dl_init_paths): Don't use strdupa in function + arguments. Reported by Jiri Kubicek , + closes PR libc/2039. + + * manual/install.texi (Tools for Compilation): Change required + binutils version. + +2001-01-22 Andreas Jaeger + + * configure.in: Add test for new enough binutils version, move + compiler/binutils test up. + + * Versions.def: Add version GLIBC_2.2.2. + +2001-01-21 Ulrich Drepper + + * iconvdata/TESTS: UTF-8 test data for IBM932 and IBM943 are now + available. + * iconvdata/testdata/IBM932: New file. + * iconvdata/testdata/IBM932..UTF8: New file. + * iconvdata/testdata/IBM943: New file. + * iconvdata/testdata/IBM943..UTF8: New file. + Contributed by Masahide Washizawa . + +2001-01-21 Franz Sirl + + * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Correctly mask offset. + +2001-01-21 Ulrich Drepper + + * malloc/malloc.c: Remove a few unnecessary initializers of global + variables. + +2000-12-09 H.J. Lu + + * nss/Makefile (routines): Add digits_dots. + * nss/Versions (libc): Add __nss_hostname_digits_dots to GLIBC_2.2.2. + * nss/digits_dots.c (__nss_hostname_digits_dots): Turn template + into a function. + * nss/nsswitch.h (__nss_hostname_digits_dots): New internal NSS + function. + * nss/getXXbyYY.c (H_ERRNO_VAR_P): New definition. + (TYPE_VAR_P): Likewise. + (FLAGS_VAR): Likewise. + (AF_VAR_P): Likewise. + (INTERNAL (REENTRANT_NAME)): Call __nss_hostname_digits_dots () + instead of including digits_dots.c. + * nss/getXXbyYY_r.c (H_ERRNO_VAR_P): New definition. + (TYPE_VAR_P): Likewise. + (FLAGS_VAR): Likewise. + (AF_VAR_P): Likewise. + (INTERNAL (REENTRANT_NAME)): Call __nss_hostname_digits_dots () + instead of including digits_dots.c. + +2001-01-21 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c: Reduce .data size. + +2001-01-21 Andreas Jaeger + + * elf/constload2.c: Add prototype for init. + +2001-01-21 Ulrich Drepper + + * stdlib/stdlib.h (drand48_data): Make available only for + __USE_MISC. Rename elements to protect namespace. Change type + and position of a and init element. + * stdlib/drand48-iter.c: Don't handle unsigned short > 16 bit + differently. Adjust for drand48_data change. Don't compute a here, + it comes from drand48_data. + * stdlib/lcong48_r.c: Don't handle unsigned short > 16 bit + differently. Adjust for drand48_data change. Compute a here. + * stdlib/srand48_r.c: Likewise. + * stdlib/drand48.c: Adjust for drand48_data change. + * stdlib/lrand48.c: Likewise. + * stdlib/mrand48.c: Likewise. + * stdlib/seek48.c: Likewise. + * stdlib/drand48_r.c: Likewise. + * stdlib/lrand48_r.c: Likewise. + * stdlib/mrand48_r.c: Likewise. + * stdlib/seed48_r.c: Likewise. Don't handle unsigned short > 16 bit + differently. + * stdlib/erand48_r.c: Don't handle unsigned short > 16 bit differently. + * stdlib/jrand48_r.c: Likewise. + + * po/sv.po: Update from translation team. + +2001-01-21 Andreas Jaeger + + * stdio-common/vfprintf.c (vfprintf): Add casts. + +2001-01-20 Ulrich Drepper + + * iconvdata/run-iconv-test.sh: Reorgnize a bit to allow running only + the ASCII test. + * iconvdata/TESTS: Add entries for IBM932 and IBM943. + + * iconvdata/Makefile (modules): Add IBM932 and IBM943. + * iconvdata/gconv-modules: Add entries for IBM932 and IBM943. + * iconvdata/ibm932.c: New file. + * iconvdata/ibm932.h: New file. + * iconvdata/ibm943.c: New file. + * iconvdata/ibm943.h: New file. + Patches by Masahide Washizawa . + + * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Fix typo + preventing optimization from being done. Set the correct type bit + in seen. Don't define and use _dl_base_addr unless + NEED_DL_BASE_ADDR is defined. + + * io/ftw.c (ftw_dir): Add slash after directory name if there + wasn't any. Reported by loris . + * io/Makefile (tests): Add bug-ftw2. + * io/bug-ftw2.c: New file. + +2001-01-19 Ulrich Drepper + + * stdlib/jrand48_r.c (__jrand48_r): Correct constructing of + results. Reported by Jeff Higham . + * stdlib/tst-rand48.c: New file. + * stdlib/Makefile (tests): Add tst-rand48. + + * locale/newlocale.c (__newlocale): Fix test for setting all + categories. + +2001-01-19 Mark Kettenis + + * sysdeps/mach/hurd/chroot.c (chroot): Revert 1999-02-27 changes, + but change looking up the initial directory port in a similar way + as done by _hurd_change_directory_port_from_name. + * hurd/fchroot.c (fchroot): Likewise. + +2001-01-18 Ulrich Drepper + + * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): If HAVE_AUX_XID is + defined don't look whether the AT_*ID values were set. + If HAVE_AUX_PAGESIZE is defined don't look whether the pagesize is set. + (_dl_show_auxv): Rewrite to avoid switch statement. + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_AT_PAGESIZE for kernel >= 2.4.1. + * sysdeps/unix/sysv/linux/ldsodefs.h: Define HAVE_AUX_XID. + Define HAVE_AUX_PAGESIZE if __ASSUME_AT_PAGESIZE is defined. + + * sysdeps/unix/sysv/linux/fxstat64.c: Add one __builtin_expect. + * sysdeps/unix/sysv/linux/lxstat64.c: Likewise. + * sysdeps/unix/sysv/linux/xstat64.c: Likewise. + + * elf/rtld.c (process_envvars): Call __strtoul_internal instead of + strtoul. + * elf/dl-minimal.c (strtol, __strtol_internal, strtoul): Removed. + (__sigjmp_save): Set __mask_was_saved to zero since we don't save + anything. + * dlfcn/eval.c (__strtol_internal): Define here. + (eval): Use __strtol_internal instead of strtol. + + * elf/elf.h: Add a few more EF_MIPS_* constants. + +2001-01-17 Ulrich Drepper + + * manual/Makefile (chapters): Add debug. + * manual/debug.texi: New file. + * manual/examples/execinfo.c: New file. + Patch by suckfish@ihug.co.nz. + +2001-01-17 Andreas Schwab + + * sysdeps/m68k/bits/byteswap.h (__bswap_32): Add cast to avoid + invalid asm. + +2001-01-17 Andreas Jaeger + + * nscd/connections.c (nscd_run): Use proper format specifier. + +2001-01-16 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Move x86_cap_flags and + x86_platforms data into new file after prepending _dl_. Change + users. + * sysdeps/unix/sysv/linux/i386/dl-procinfo.c: New file. + * sysdeps/unix/sysv/linux/i386/Dist: Add dl-procinfo.c. + * sysdeps/unix/sysv/linux/i386/Makefile: Add rules to build + dl-procinfo.c. + + * setjmp/setjmp.h: Cleanup definition of setjmp macro. + + * sysdeps/i386/elf/bsd-setjmp.S: Real implementation. + * sysdeps/i386/elf/bsd-_setjmp.S: Removed. + * sysdeps/i386/elf/setjmp.S (setjmp): Removed here. + (_setjmp): Likewise. + * sysdeps/i386/bsd-_setjmp.S: Real implementation. + * sysdeps/i386/bsd-setjmp.S: Real implementation. + * sysdeps/i386/bits/setjmp.h: Remove PUSH_SIGNAL_MASK definition. + * sysdeps/i386/setjmp.S: Remove PIC support. This is the non-ELF + version. + +2001-01-16 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (SIGCONTEXT): Fix + misapplied last patch. + +2001-01-15 Ulrich Drepper + + * stdlib/random.c (__initstate): Clean up a cast. + (__setstate): Likewise. + + * sysdeps/unix/sysv/linux/mips/syscalls.list: Remove select + syscall handling. The generic Linux version should work. + +2001-01-15 Andreas Jaeger + + * sysdeps/unix/sysv/linux/sys/sendfile.h: Fix typo. + + * stdio-common/tstscanf.c (main): Add two testcases for '*' modifier. + +2001-01-14 Jakub Jelinek + + * nss/getent.c (print_aliases, aliases_keys, ethers_keys, + netgroup_keys, print_rpc, rpc_keys, print_shadow, shadow_keys): + New functions. + (group_keys, hosts_keys, network_keys, passwd_keys, protocols_keys): + If number is 0, list all. + (services_keys): Likewise. Lookup aliases as well. + (databases): New table. + (build_doc): Prepare argp doc text with list of supported databases. + (main): Change to table driven processing. + +2001-01-14 Thorsten Kukuk + + * sunrpc/xdr.c (xdr_long, xdr_u_long): Fix comments about these + functions. + +2001-01-03 Jakub Jelinek + + * sunrpc/xdr.c (xdr_long, xdr_u_long): Return FALSE if trying to + encode value which does not fit in the 32bit type. + +2001-01-15 Hiroyuki Machida + + * sysdeps/unix/sysv/linux/mips/register-dump.h (REGISTER_DUMP): + Change type of CTX to (struct sigcontext *). + * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (GET_PC): Likewise. + (GET_FRAME): Likewise. + (GET_STACK): Likewise. + (SIGCONTEXT): Likewise. Add 2nd arg _code. + (SIGCONTEXT_EXTRA_ARGS): Add 2nd arg _code. + +2001-01-13 Ulrich Drepper + + * manual/texinfo.tex: Update from upstream version. + +2001-01-13 Jakub Jelinek + + * inet/ether_ntoh.c (lookup_function): Change arguments to match + _nss_*_getntohost_r prototype. + (ether_ntohost): Pass errno pointer to NSS function. + +2001-01-12 Franz Sirl + + * sysdeps/unix/sysv/linux/powerpc/bits/mman.h (MS_SYNC): Fix value. + (MAP_LOCKED): New definition. + (MAP_NORESERVE): New definition. + +2001-01-12 Ulrich Drepper + + * assert/assert.h: Use static_cast instead of C-style cast for C++. + Patch by Enrico Scholz . + +2001-01-12 Ben Collins + + * sysdeps/generic/segfault.c (install_handler): Use access, not + __access. + +2001-01-12 Andreas Jaeger + + * posix/fnmatch_loop.c (FCT): Remove signed warnings. + * posix/wordexp.c (do_parse_glob): Likewise. + * sysdeps/posix/sigblock.c (__sigblock): Likewise. + * sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise. + * elf/dl-open.c (_dl_open): Likewise. + * elf/dl-close.c (_dl_close): Likewise. + * elf/dl-load.c (_dl_map_object): Likewise. + * iconv/iconv_prog.c (process_fd): Likewise. + * stdio-common/vfscanf.c (_IO_vfscanf): Likewise. + + * locale/localeinfo.h (struct locale_data): Use __flexarr instead + of a zero-length array. + +2001-01-11 Jakub Jelinek + + * stdlib/cxa_atexit.c (__cxa_atexit): Cast to (void *, int) func. + * stdlib/cxa_finalize.c (__cxa_finalize): Add hidden second argument. + * stdlib/cxa_on_exit.c: Remove. + * stdlib/Makefile: Revert last patch. + * stdlib/Versions: Likewise. + * include/stdlib.h: Likewise. + * stdlib/exit.h: Revert last patch. + (struct exit_function): Add second argument to cxa fn. + * stdlib/exit.c: Revert last patch. + (exit): Add hidden second argument. + +2001-01-11 H.J. Lu + + * elf/dl-libc.c (do_dlopen): Move DL_STATIC_INIT to ... + * elf/dl-open.c (_dl_open): Here. + * sysdeps/unix/sysv/linux/ia64/dl-static.c (_dl_static_lock): + Make it static. + (_dl_static_init): Initialize the variables every time when possible. + * sysdeps/unix/sysv/linux/ia64/ldsodefs.h (DL_STATIC_INIT): + Undefine it first. + +2001-01-11 Ulrich Drepper + + * stdlib/Makefile (routines): Add cxa_on_exit. + * stdlib/Versions [libc] (GLIBC_2.2.1): Add __cxa_on_exit. + * stdlib/cxa_on_exit.c: New file. + * include/stdlib.h: Add prototype for __cxa_on_exit. + * stdlib/exit.c: Handle ef_cxa2. + * stdlib/exit.h (enum): Add ef_cxa2. + (struct exit_function): Add cxa2. + + * Versions.def [ld]: Add GLIBC_2.2.1. + +2001-01-10 H.J. Lu + + * elf/dl-libc.c (do_dlopen): Call DL_STATIC_INIT for static binaries. + * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep-dl-routines): Add + dl-static. + * sysdeps/unix/sysv/linux/ia64/Versions (ld): Add _dl_var_init. + * sysdeps/generic/ldsodefs.h (DL_STATIC_INIT): Defined if not defined. + * sysdeps/unix/sysv/linux/ia64/ldsodefs.h: New file. + * sysdeps/unix/sysv/linux/ia64/dl-static.c: New file. + * sysdeps/unix/sysv/linux/ia64/Dist: Add dl-static.c. + +2001-01-11 Ulrich Drepper + + * libio/stdio.h: Remove definition of off_t. + +2001-01-11 Andreas Jaeger + + * wcsmbs/tst-mbrtowc.c (utf8_test): New function by Markus Kuhn + . + +2001-01-10 Ulrich Drepper + + * sunrpc/Makefile (distribute): Add errqueue.h. + +2001-01-10 H.J. Lu + + * sysdeps/ia64/dl-machine.h (TRAMPOLINE_TEMPLATE): Also preserve + r9, r10 and r11 for language specific registers. + +2001-01-10 Jakub Jelinek + + * sunrpc/clnt_udp.c (clntudp_bufcreate): Set IP_RECVERR on the + UDP socket. + (clntudp_call): Handle MSG_ERRQUEUE. + * sysdeps/generic/errqueue.h: New file. + * sysdeps/unix/sysv/linux/errqueue.h: New file. + +2001-01-10 H.J. Lu + + * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_getpagesize): Removed. + +2001-01-10 Joseph S. Myers + + * CONFORMANCE: Update. + +2001-01-09 Ulrich Drepper + + * sysdeps/generic/elf/backtracesyms.c (__backtrace_symbols): + Minimal cleanups. Add assert to ensure memory handling is correct. + + * manual/conf.texi (File Minimums): Fix _POSIX_PATH_MAX value. + Reported by Ben Collins . + + * time/strftime.c (my_strftime): Mark previous GNU extensions + which are now in C99 as such. + +2001-01-08 Ulrich Drepper + + * elf/rtld.c (process_envvars): Place output files for profiling + in SUID binaries in /var/profile. + + * elf/dl-load.c (_dl_map_object): Don't look in cache for + preloading in SUID binaries. + + * elf/dl-profile.c (_dl_start_profile): Open the output file with + O_NOFOLLOW if possible. + + * include/stdlib.h: Add __posix_openpt declaration. + * stdlib/stdlib.h: Add posix_openpt declaration. + * login/Versions: Add posix_openpt for GLIBC_2.2.1. + * sysdeps/generic/getpt.c: Define posix_openpt. + * sysdeps/unix/bsd/getpt.c: Likewise. + * sysdeps/unix/sysv/linux/getpt.c: Likewise. + + * time/Makefile (tests): Add tst-mktime. + * time/tst-mktime.c: New file. + + * posix/tst-dir.c (main): One more mkdir() test. + + * sysdeps/unix/sysv/linux/ia64/getpagesize.c (__getpagesize): + Remove getpagesize syscall. We assume that the pagesize is always + determined from the auxiliary vector. + + * intl/dcigettext.c: Fix a few warnings. + Patch by Bruno Haible . + +2001-01-08 Andreas Jaeger + + * io/test-lfs.c (do_test): Check lseek64 return for EINVAL. + Reported by Joseph S. Myers . + +2001-01-08 Ulrich Drepper + + * sysdeps/generic/segfault.c (install_handler): Check output file + name with access(). + + * resolv/res_query.c: Use simply getenv() for HOSTALIASES. + * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add HOSTALIASES. + + * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add missing comma. + + * malloc/memusage.c (me): Use access() to determine whether we + should write the output file or not. + + * libio/bits/stdio.h (printf): Define macro to map printf call to + fprintf which gcc can optimize. + * stdio-common/printf.c: Undefine printf. + +2001-01-07 Ulrich Drepper + + * sysdeps/generic/bits/byteswap.h (__bswap_64): Partly revert last + patch. We must use unsigned int for l member of union. + + * sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Don't call + _dl_aux_init for shared libraries. + + * sysdeps/unix/sysv/linux/glob64.c: Moved to ... + * sysdeps/gnu/glob64.c: ...here. New file. + +2001-01-07 Ben Collins + + * manual/examples/longopt.c: Make the "struct option" a little + more like it should be, adding usage of required_argument, + noargument and such, and also setting the options string right. + + * manual/sysinfo.texi (Load Average): New section, documents + getloadavg(). + +2001-01-06 Ulrich Drepper + + * version.h (VERSION): Bump to 2.2.1. + + * sysdeps/unix/sysv/linux/mips/Dist: Remove sys/acct.h. + * sysdeps/alpha/Dist: Add alphaev6/stxncpy.S and alphaev6/stxcpy.S. + * sysdeps/unix/sysv/aix/Dist: Add uitrunc.c, savef.S, and restf.S. + * dlfcn/Makefile (distribute): Add errmsg1mod.c. + * Makefile (distribute): Add include/libc-internal.h. + * libio/Makefile (distribute): Avoid overwriting. + + * iconvdata/ibm937.c (BODY to IBM937): Correct several mistakes in + buffer and table handling. + +2001-01-05 H.J. Lu + + * elf/dl-support.c (non_dynamic_init): Move the auxiliary + vector checking to ... + (_dl_aux_init): Here. New function. Defined only if + HAVE_AUX_VECTOR is defined. + + * sysdeps/generic/libc-start.c (__libc_start_main): Call + _dl_aux_init for static binaries if HAVE_AUX_VECTOR is defined. + + * sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Call + _dl_aux_init. + + * sysdeps/unix/sysv/linux/ldsodefs.h (DL_FIND_AUXV): Removed. + (HAVE_AUX_VECTOR): Defined. + (_dl_aux_init): Declared. + +2001-01-05 Ben Collins + + * manual/string.texi (Finding Tokens in a String): Document XPG + basename() and dirname(), as well as GNU basename(). + +2001-01-05 Jakub Jelinek + + * Makeconfig (preprocess-version): Replace -traditional with + -x assembler-with-cpp. + +2001-01-05 Joseph S. Myers + + * math/bits/cmathcalls.h: Don't define inline cimag, creal or conj + for GCC 2.97 or later. + +2001-01-05 Ben Collins + + * manual/stdio.texi (getline): Clarify the return value in the + case of EOF being reached before a newline. + +2001-01-04 Jakub Jelinek + + * sunrpc/pmap_clnt.c (__get_myaddress): Return TRUE if successful, + FALSE otherwise. + (pmap_set, pmap_unset): Check __get_myaddress return value. + +2001-01-05 Mark Kettenis + + * sysdeps/generic/netinet/if_ether.h: Include . + (struct ether_addr): Declare ether_addr_octet member as + `u_int8_t'. Add __attribute__ ((__packed__)). + +2001-01-06 Mark Kettenis + + * sysdeps/mach/hurd/readdir64.c: New file. + * sysdeps/mach/hurd/readdir64_r.c: New file. + +2001-01-07 Mark Kettenis + + * sysdeps/mach/hurd/fstatvfs.c (fstatvfs): Add comment about + `struct statfs' and `struct statvfs' being identical. + * sysdeps/mach/hurd/statvfs.c (statvfs): Likewise. + +2001-01-06 Mark Kettenis + + * sysdeps/mach/hurd/fstatfs64.c: New file. + * sysdeps/mach/hurd/fstatvfs64.c: New file. + * sysdeps/mach/hurd/statfs64.c: New file. + * sysdeps/mach/hurd/statvfs64.c: New file. + * sysdeps/mach/hurd/statfsconv.c: New file. + * sysdeps/mach/hurd/Dist: Add statfsconv.c. + +2001-01-06 Ulrich Drepper + + * iconv/skeleton.c: Reset outbuf for next round of the loop. + Reported by Owen Taylor . + * iconv/Makefile (tests): Add tst-iconv3. + * iconv/tst-iconv3.c: New file. + + * iconvdata/ibm930.c: Fix handling of state. Optimize a bit. + * iconvdata/ibm933.c: Likewise. + * iconvdata/ibm935.c: Likewise. + * iconvdata/ibm937.c: Likewise. + * iconvdata/ibm939.c: Likewise. + * iconvdata/ibm930.h: Adjust single byte table for optimization. + * iconvdata/ibm933.h: Likewise. + * iconvdata/ibm935.h: Likewise. + * iconvdata/ibm939.h: Likewise. + + * iconvdata/testdata/IBM930: Add misssing SI. + * iconvdata/testdata/IBM933: Likewise. + * iconvdata/testdata/IBM935: Likewise. + * iconvdata/testdata/IBM937: Likewise. + * iconvdata/testdata/IBM939: Likewise. + +2001-01-06 Andreas Jaeger + + * configure.in: Check for old add-ons that shouldn't be used with + current glibc anymore. + +2001-01-06 Mark Kettenis + + * sysdeps/mach/hurd/readdir_r.c (__readdir_r): Return error number + instead of -1 on failure. Don't forget to copy file name into + *ENTRY if successful. Set *RESULT to NULL upon reaching the end + of the directory. + +2001-01-06 Mark Kettenis + + * sysdeps/mach/hurd/xstatconv.c (xstat64_conv): Don't forget to + copy st_atime member. + +2001-01-05 Ulrich Drepper + + * io/ftw.c (ftw_dir): Don't add a second slash at the beginning + for searches from the root directory. + Reported by loris [PR libc/1991]. + * io/Makefile (tests): Add bug-ftw1. + * io/bug-ftw1.c: New file. + + * elf/dl-support.c (non_dynamic_init): Don't define DL_FIND_AUXV + if it is not available. Instead use it only if it is available. + * sysdeps/unix/sysv/linux/ldsodefs.h: New file. + + * iconv/gconv_simple.c (internal_ics4_loop): Correct test for + overflowing output buffer. + (internal_ucs4_loop_unaligned): Likewise. + (ucs4_internal_loop): Likewise. + (ucs4_internal_loop_unaligned): Likewise. + (internal_ucs4le_loop): Likewise. + (internal_ucs4le_loop_unaligned): Likewise. + (ucs4le_internal_loop): Likewise. + (ucs4le_internal_loop_unaligned): Likewise. + Reported by Owen Taylor . + * iconv/Makefile (tests): Add tst-iconv2. + * iconv/tst-iconv2.c: New file. + +2001-01-04 H.J. Lu + + * elf/dl-support.c (DL_FIND_AUXV): New. Defined if not defined. + (_dl_clktck): Declared. + (non_dynamic_init): Take 3 arguments. + Set _dl_pagesize, _dl_platform and _dl_clktck from AUX. + +2001-01-01 Bruno Haible + + Finish implementation of plural form handling. + * intl/dcigettext.c (known_translation_t): Rename 'domain' field to + 'domainname'. Remove 'plindex' field. Add 'domain' and + 'translation_length' fields. + (transcmp): Don't compare 'plindex' fields. + (plural_lookup): New function. + (DCIGETTEXT): Change cache handing in the plural case. Don't call + plural_eval before the translation and its catalog file have been + found. Remove plindex from cache key. Add 'translation_length' and + 'domain' to cache result. + (_nl_find_msg): Remove index argument, return length of translation + to the caller instead. Weaken comparison of string lengths, to account + for plural entries. Call iconv() on the entire result string, not + only on the portion needed so far. + * intl/loadinfo.h (_nl_find_msg): Remove index argument, add lengthp + argument. + * intl/loadmsgcat.c (_nl_load_domain): Adapt to _nl_find_msg change. + +2001-01-04 Ulrich Drepper + + * intl/plural.y (yylex): Minimal improvement in number scanner. + +2000-07-31 Bruno Haible + + * intl/plural.y: Include config.h. Needed to define 'inline' away for + C compilers that don't support it. + (yylex): Don't use gcc specific case range syntax. + * intl/loadmsgcat.c (INIT_GERMANIC_PLURAL): New macro, for old + compilers. + +2000-10-12 Bruno Haible + + * intl/finddomain.c: Remove unneeded includes. + +2000-10-12 Bruno Haible + + * intl/localealias.c (memcpy): Return first argument, just like the + real memcpy function does. + * intl/bindtextdom.c (memcpy): Likewise. + * intl/finddomain.c (memcpy): Likewise. + * intl/l10nflist.c (memcpy): Likewise. + * intl/textdomain.c (memcpy): Likewise. + From Paul Eggert . + +2001-01-03 Jakub Jelinek + + * resolv/resolv.h (struct __res_state): Add nsinit field. + * resolv/res_send.c (res_nsend): Use it instead of nscount. + * resolv/res_init.c (__res_vinit): Initialize it. + (res_nclose): Clear it instead of nscount. + +2001-01-04 Ulrich Drepper + + * malloc/mtrace.pl: Fix matching of addresses. + Patch by Aharon Robbins . + + * Versions.def (ld): Add GLIBC_2.2. + + * catgets/gencat.c: Copyright 2001. + * csu/version.c: Likewise. + * debug/catchsegv.sh: Likewise. + * debug/xtrace.sh: Likewise. + * elf/ldconfig.c: Likewise. + * elf/sprof.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * locale/locale.c: Likewise. + * locale/localedef.c: Likewise. + * malloc/memusage.sh: Likewise. + * malloc/mtrace.pl: Likewise. + * nscd/nscd.c: Likewise. + * posix/getconf.c: Likewise. + +2001-01-04 Mark Kettenis + + * include/stdio.h: Only provide __getwc_unlocked prototype if + USE_IN_LIBIO is defined. + +2001-01-04 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/socket.S (__socket): Fix error code + handling. + +2001-01-03 Andreas Schwab + + * sysdeps/generic/strtoll.c: Remove unused __strtoq_internal alias. + * sysdeps/generic/strtoull.c: Remove unused __strtouq_internal alias. + + * sysdeps/wordsize-64/strtol.c: Add strtoq alias and fix strtoll alias. + * sysdeps/wordsize-64/strtoul.c: Add strtouq alias and fix + strtoull alias. + * sysdeps/wordsize-64/wcstol.c: Add wcstoq alias and fix wcstoll alias. + * sysdeps/wordsize-64/wcstoul.c: Add wcstouq alias and fix + wcstoull alias. + + * sysdeps/generic/strtoul.c: Make sure we find strtol.c in this + directory. + * sysdeps/generic/strtol_l.c: Likewise. + * sysdeps/generic/strtoul_l.c: Likewise. + * sysdeps/generic/wcstoul.c: Likewise, for wcstol.c. + + * sysdeps/wordsize-64/strtol_l.c: Fix alias. + * sysdeps/wordsize-64/strtoul_l.c: Likewise. + * sysdeps/wordsize-64/wcstol_l.c: Fix alias. + * sysdeps/wordsize-64/wcstoul_l.c: Likewise. + +2001-01-04 Andreas Jaeger + + * nss/nsswitch.c: Include files for missing prototypes, remove + buggy declaration of prototypes. + +2001-01-03 Franz Sirl + + * resolv/Versions: Fix bracing. + * sysdeps/powerpc/soft-fp/Versions: Likewise. + * sysdeps/sparc/sparc64/soft-fp/Versions: Likewise. + +2001-01-02 Franz Sirl + + * sysdeps/powerpc/dl-machine.c (__process_machine_rela): Fix typo. + +2001-01-02 Ulrich Drepper + + * manual/Makefile (TEXI2PDF): Change to texi2dvi --pdf. + Suggested by Minko Markov . + +2001-01-02 Franz Sirl + + * sysdeps/powerpc/elf/start.S (__data_start): Make it global. + * sysdeps/powerpc/dl-machine.c (dl_reloc_overflow): Print the name of + the failing symbol. + (__process_machine_rela): Pass symbol to dl_reloc_overflow(). + +2001-01-02 Ben Collins + + * time/tzset.c (tzset_internal): Make sure we fall back to UTC + if TZ is not set and TZDEFAULT is not present. + +2001-01-01 Ben Collins + + * string/strings.h: Make sure we declare our functions even if + string.h is already included, based on whether or not __USE_BSD is + defined. + +2001-01-02 Ulrich Drepper + + * dlfcn/dlerror.c (dlerror): Handle call of dlerror() before any + other dlopen() and dlsym(). + Based on a patch by Ben Collins . + +2001-01-02 Andreas Jaeger + + * dlfcn/errmsg1.c (main): Call dlerror initially. + Reported by Ben Collins . + +2001-01-02 Ulrich Drepper + + * intl/dcigettext.c (guess_category_value): Rewrite so that LANGUAGE + value is ignored if the selected locale is the C locale. + * intl/tst-gettext.c: Set locale for above change. + * intl/tst-translit.c: Likewise. + +2001-01-02 Andreas Jaeger + + * libio/wgenops.c (_IO_wdoallocbuf): Use correct wide access macro. + (_IO_switch_to_wget_mode): Likewise. + (_IO_sputbackwc): Likewise. + (_IO_sungetwc): Use wint_t for result. + + * stdio-common/vfscanf.c (__vfscanf): Use WINT_T for done. + + * sysdeps/generic/strtol.c (strtol): Make cnt size_t for correct + signedness. + + * sysdeps/generic/printf_fphex.c (putc): Cast _IO_putwc_unlocked + to (int) to avoid warnings. + * stdio-common/printf_fp.c (putc): Likewise. + * stdio-common/printf_size.c (putc): Likewise. + + * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): Make + constant unsigned. + +2001-01-01 Andreas Jaeger + + * inet/rcmd.c (rcmd_af): Use socklen_t for len. + +2000-12-31 Andreas Jaeger + + * include/libc-internal.h: Add prototype for __libc_freeres. + + * sysdeps/unix/sysv/linux/init-first.c: Include + for prototypes, remove redundant prototypes. + * gmon/gmon.c: Likewise. + * sysdeps/unix/i386/i586/clock_getres.c: Likewise. + * sysdeps/unix/i386/i586/clock_gettime.c: Likewise. + * malloc/mtrace.c: Likewise. + + * sysdeps/generic/enbl-secure.c: Include for + prototypes. + * elf/soinit.c: Likewise. + * sysdeps/generic/prof-freq.c: Likewise. + * sysdeps/mach/hurd/profil.c: Likewise. + * debug/noophooks.c: Likewise. + * debug/pcprofile.c: Likewise. + * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Likewise. + * sysdeps/generic/get_clockfreq.c: Likewise. + * malloc/set-freeres.c: Likewise. + + * locale/localeinfo.h: Add internal prototypes. + + * elf/rtld.c (dl_main): Fix prototype. + + * iconvdata/tst-table-to.c (main): Use return instead of exit to + avoid warning. + + * nis/rpcsvc/yp_prot.h: Remove __P. + * nis/rpcsvc/ypupd.h: Likewise. + * nis/rpcsvc/yp.h: Likewise. + + * sunrpc/rpc_main.c: Add noreturn attributes. + * sunrpc/rpc_scan.h: Likewise. + + * sunrpc/rpc_hout.c (storexdrfuncdecl): Make static. + + * sunrpc/rpcinfo.c: Add noreturn attribute to brdcst. + + * sunrpc/proto.h: Add noreturn attributes to error and crash. + + * posix/bsd-getpgrp.c: Add prototype to avoid warning. + + * sunrpc/svc_unix.c: Include for prototypes. + + * sunrpc/create_xid.c: Include for prototypes. + + * include/rpc/rpc_msg.h: Add prototypes for some functions. + * include/rpc/auth.h: Likewise. + * include/rpc/auth_des.h: Likewise. + * include/rpc/clnt.h: Likewise. + * include/rpc/rpc.h: Likewise. + * include/rpc/svc.h: Likewise. + * include/rpc/svc_auth.h: Likewise. + + * include/rpc/des_crypt.h: New file. + + * malloc/memusagestat.c (main): Use return instead of exit to + avoid warning. + * io/pwd.c (main): Likewise. + * iconvdata/tst-table-from.c (main): Likewise. + * ctype/test_ctype.c (main): Likewise. + * setjmp/tst-setjmp.c (main): Likewise. + * signal/tst-signal.c (main): Likewise. + * stdlib/tst-strtol.c (main): Likewise. + * stdlib/tst-strtod.c (main): Likewise. + * stdlib/tst-strtoll.c (main): Likewise. + * stdlib/tst-xpg-basename.c (main): Likewise. + * dirent/tst-seekdir.c (main): Likewise. + * grp/testgrp.c (main): Likewise. + * inet/test_ifindex.c (main): Likewise. + * io/test-utime.c (main): Likewise. + * posix/test-vfork.c (main): Likewise. + * posix/testfnm.c (main): Likewise. + * stdio-common/temptest.c (main): Likewise. + * stdio-common/test_rdwr.c (main): Likewise. + * stdio-common/tst-fileno.c (main): Likewise. + * stdio-common/tst-sscanf.c (main): Likewise. + * stdio-common/tstscanf.c (main): Likewise. + * string/bug-strncat1.c (main): Likewise. + * string/bug-strpbrk1.c (main): Likewise. + * string/bug-strspn1.c (main): Likewise. + * string/test-ffs.c (main): Likewise. + * string/tst-inlcall.c (main): Likewise. + * string/tst-svc.c (main): Likewise. + * timezone/test-tz.c (main): Likewise. + * wctype/test_wcfuncs.c (main): Likewise. + * wctype/test_wctype.c (main): Likewise. + + * stdlib/tst-random.c: Add attribute noreturn to fail. + +2000-12-28 Wolfram Gloger + + * malloc/malloc.c (MALLOC_COPY): Handle case if source and + destination overlap. Assume dest is always below source if + overlapping. + +2000-12-30 Ulrich Drepper + + * elf/dl-close.c (_dl_close): We can ignore the NODELETE flag if the + object was not yet initialized. + +2000-12-28 H.J. Lu + + * elf/dl-deps.c (_dl_map_object_deps): Make sure the DSO state + is always consistent even if its dependency is failed. + + * elf/dl-open.c (_dl_open): Increment the open count before + calling _dl_close () in case of failure. + + * elf/neededtest4.c: New file. + * elf/neededobj5.c: New file. + * elf/neededobj6.c: New file. + + * elf/Makefile (distribute): Add neededobj5.c and neededobj6.c. + (tests): Add neededtest4. + (modules-names): Add neededobj5 and neededobj6. + ($(objpfx)neededobj6.so): New target. + ($(objpfx)neededtest4): New target. + ($(objpfx)neededtest4.out): New target. + +2000-12-28 Joseph S. Myers + + * misc/sys/cdefs.h (__attribute_format_strfmon__): Define. + * stdlib/monetary.h: Add strfmon format attributes. + +2000-12-28 Roland McGrath + + * sysdeps/mach/hurd/ioctl.c (do_ioctl): Avoid double-increment after + __mempcpy does it for us. + +2000-12-28 Andreas Jaeger + + * sysdeps/generic/dl-environ.c: Add prototype for unsetenv. + + * sysdeps/unix/sysv/linux/i386/setrlimit.c: Add prototype for + __new_setrlimit. + + * sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c: Add prototype for + __old_getrlimit64. + + * sysdeps/unix/sysv/linux/i386/getrlimit.c: Add prototype for + __new_getrlimit. + + * sysdeps/unix/sysv/linux/i386/chown.c: Add prototypes for + __chown_is_lchown and __real_chown. + + * sysdeps/generic/ldsodefs.h: Add noreturn attribute to + _dl_reloc_bad_type. + + * sunrpc/rpc_hout.c (print_funcdef): Add break statement to shut + up GCC's warning about "deprecated use of label at end of compound + statement." + * sunrpc/rpc_cout.c (emit_inline): Likewise. + + * gmon/bb_exit_func.c: Include for internal + prototypes. + Remove struct bb and __bb_head since those are declared by + sys/gmon.h. + +2000-12-22 Ben Collins + + * manual/charset.texi: Fix typo in description of WCHAR_MAX. + + * manual/argp.texi: Document argp_domain as part of struct argp. + +2000-12-28 Andreas Jaeger + + * catgets/Makefile (generated): Add sample.SJIS.cat. + + * sunrpc/rpc_dtable.c: Include rpc/clnt.h for prototypes. + + * elf/dl-minimal.c: Add prototypes. + + * include/locale.h: Add internal prototypes. + * include/sys/gmon.h: Likewise. + + * dlfcn/errmsg1mod.c: Add prototype for foo to shut up GCC. + +2000-12-27 Ben Collins + + * elf/dl-open.c (_dl_open): Correctly set the new objname pointer + when reallocating the error strings. + Reported by Kalle Olavi Niemitalo + +2000-12-27 Ulrich Drepper + + * dlfcn/Makefile (tests): Add errmsg1. + (modules-names): Add errmsg1mod. + Add rules to run errmsg1. + * dlfcn/errmsg1.c: New file. + * dlfcn/errmsg1mod.c: New file. + + * dlfcn/dlerror.c (dlerror): Always create output string which + includes object file name. + + * sysdeps/alpha/alphaev6/memcpy.S: Don't go through unrolled loop + if we would go through it only once. + Patch by Rick Gorton . + + * sysdeps/alpha/alphaev67/strncat.S: Fix handling of numeric parameter. + Patch by Richard Henderson . + +2000-12-27 Jakub Jelinek + + * malloc/malloc.c (memmove): Add prototypes. + (MALLOC_MEMMOVE): Define. + (chunk_realloc): Use it instead of MALLOC_COPY if source and + destination might overlap. + +2000-12-27 Andreas Jaeger + + * stdio-common/printf_fp.c (__printf_fp): Add prototype for nested + function. + * elf/dl-load.c (_dl_map_object_from_fd): Likewise. + * locale/programs/locale.c (show_locale_vars): Likewise. + (show_info): Likewise. + * locale/programs/ld-collate.c (collate_output): Likewise. + * locale/programs/ld-ctype.c (set_class_defaults): Likewise. + * elf/dl-deps.c (_dl_map_object_deps): Likewise. + * stdlib/rpmatch.c (rpmatch): Likewise. + + * setjmp/tst-setjmp.c: Make local functions static. + * setjmp/jmpbug.c: Likewise. + * signal/tst-signal.c: Likewise. + * stdio-common/tfformat.c: Likewise. + * string/tst-svc.c: Likewise. + * time/clocktest.c: Likewise. + * time/tst-getdate.c: Likewise. + * dirent/list.c: Likewise. + * dirent/opendir-tst1.c: Likewise. + * posix/runtests.c: Likewise. + * posix/tst-getaddrinfo.c: Likewise. + * posix/tst-chmod.c: Likewise. + * posix/wordexp-test.c: Likewise. + * misc/tst-efgcvt.c: Likewise. + * timezone/tst-timezone.c: Likewise. + * rt/tst-clock.c: Likewise. + * rt/tst-shm.c: Likewise. + * rt/tst-aio2.c: Likewise. + * rt/tst-aio3.c: Likewise. + * rt/tst-aio4.c: Likewise. + * rt/tst-aio5.c: Likewise. + + * dlfcn/failtest.c: Add prototype for foo. + + * dlfcn/glrefmain.c: Add prototype for do_test. + + * dlfcn/tst-dladdr.c: Add prototype for do_test. + + * string/test-ffs.c (main): Add prototype for nested function. + + * sunrpc/des_soft.c: Include rpc/des_crypt.h for prototype. + + * nss/XXX-lookup.c: Add prototype to shut up GCC. + + * include/netinet/ether.h (DECLARE_NSS_PROTOTYPES): Fix + setetherent prototype. + Add internal interfaces. + + * nis/nss_nis/nis-ethers.c (_nss_nis_setetherent): Likewise. + * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_setetherent): Likewise. + + * resolv/res_data.c: Don't add (conflicting) prototypes for _LIBC. + + * nis/nis_intern.h: Add prototype for __pmap_getnisport. + + * nss/nss_files/files-ethers.c: Include netinet/ether.h to get + prototypes, remove struct etherent since it's declared in ether.h. + Fix ntohost declaration. + + * elf/dl-profile.c (_dl_mcount): Add empty statement to shut up GCC. + + * include/getopt.h: Add internal interfaces. + * include/termios.h: Likewise. + * include/resolv.h: Likewise. + * include/netdb.h: Likewise. + * include/grp.h: Likewise. + * include/pwd.h: Likewise. + * include/shadow.h: Likewise. + * include/rpc/netdb.h: Likewise. + * include/setjmp.h: Likewise. + + * include/stdio.h: Add prototypes for compatibility functions. + * include/grp.h: Likewise. + * include/pwd.h: Likewise. + * include/shadow.h: Likewise. + + * include/fenv.h: Define internal interfaces. + +2000-12-27 Ulrich Drepper + + * sysdeps/generic/bits/byteswap.h (__bswap_64): Handle constant + argument case separately. + * sysdeps/i386/bits/byteswap.h (__bswap_64): Likewise. + +2000-12-27 Andreas Jaeger + + * include/sys/wait.h: Add some prototypes. + * Rules (dummy.c): Create also prototype to shut up GCC. + +2000-12-27 Andreas Jaeger + + * sysdeps/mach/hurd/if_index.c (__protocol_available): Uncomment, + it's not needed at the moment. + * sysdeps/generic/if_index.c (__protocol_available): Likewise. + * sysdeps/unix/sysv/linux/if_index.c (__protocol_available): Likewise. + +2000-12-26 Andreas Jaeger + + * libio/getc_u.c: Include stdio.h via system path to get internal + prototypes. + * libio/getwc_u.c: Likewise. + + * stdlib/strfmon.c: Fix prototype of __printf_fp. + + * stdio-common/vfprintf.c (process_arg): Move __printf_fphex and + __printf_fp prototypes to ... + * include/printf.h: ...here. + + * include/stdio.h: Add some internal prototypes to shut up GCC. + * include/stdlib.h: Likewise. + + * sysdeps/posix/sigpause.c (__sigpause): Use ISO C prototype + declaration. + + * include/signal.h: Add prototypes for internal sigpause + interfaces. + +2000-12-26 Ulrich Drepper + + * sysdeps/generic/bits/byteswap.h (__bswap_64): Make it usable for + 64bit platforms. Reported by Dave Gilbert . + + * string/Makefile (tests): Add tst-bswap. + * string/tst-bswap.c: New file. + +2000-12-11 Bruno Haible + + * Makefile ($(inst_includedir)/gnu/stubs.h): Sort in the C locale. + +2000-12-26 Ulrich Drepper + + * sunrpc/Makefile (rpcgen-cmd): Use single quotes in sed call. + Patch by Ed Connell . + +2000-12-24 Ulrich Drepper + + * locale/iso-639.def: Correct one entry. Add two missing entries. + + * locale/iso-4217.def: Change entry for Eritrea. + Reported by Daniel Yacob . + +2000-12-23 Ben Collins + + * manual/charset.texi (Extended Char Intro): Fix typo in ISO 6937 + description. + + * manual/stdio.texi (Dynamic Output): Document the return value of + asprintf. Also make the asprintf/snprintf examples a little + better (check for some error returns). + +2000-12-22 Andreas Jaeger + + * include/stdio.h: Add __ftrylockfile prototype. + +2000-12-21 H.J. Lu + + * sysdeps/ia64/fpu/math_ldbl.h (ieee_long_double_shape_type): + Make sign_exponent element signed. + + * sysdeps/ieee754/ldbl-96/math_ldbl.h (ieee_long_double_shape_type): + Fix a typo. + + * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Remove dead branch. + +2000-12-21 Andreas Jaeger + + * nis/nss_nisplus/nisplus-ethers.c (struct etherent): Removed. + * inet/ether_hton.c: Likewise + * inet/ether_ntoh.c: Likewise. + + * nis/nss_nis/nis-ethers.c (_nss_nis_getntohost_r): Fix + declaration to match prototype. + + * include/netinet/ether.h (struct etherent): Declare here so that + all implementations use the same struct. + + * nis/nss_nis/nis-ethers.c: Include netinet/ether.h to get + prototypes. + (struct ether): Removed. + Use struct etherent instead of ether everywhere. + + * include/rpc/auth.h (DECLARE_NSS_PROTOTYPES): New. + + * include/rpc/auth_des.h (DECLARE_NSS_PROTOTYPES): New. + + * sunrpc/publickey.c: Include auth_des.h for prototypes. + +2000-12-20 Ulrich Drepper + + * math/test-misc.c: Add more tests for nextafter functions. + + * sysdeps/i386/fpu/s_nextafterl.c: Handle change from denormal to + normal correctly. Correct test for sign. + Based on a patch by HJ Lu. + +2000-12-19 Ulrich Drepper + + * Makeconfig (preprocess-version): Add -traditional to gcc call. + Cleanup sed calls. + +2000-12-19 Andreas Jaeger + + * include/netinet/ether.h (DECLARE_NSS_PROTOTYPES): New. + + * nis/nis_intern.h: Add prototype for __do_niscall3. + + * nis/nss_nis/nis-rpc.c (_nss_nis_setrpcent): Fix declaration to + match prototype. + + * include/netdb.h (DECLARE_NSS_PROTOTYPES): Reformat. + + * include/rpc/netdb.h (DECLARE_NSS_PROTOTYPES): New. + + * include/aliases.h (DECLARE_NSS_PROTOTYPES): New. + +2000-12-18 Ulrich Drepper + + * math/test-misc.c: Add more tests for nextafter. + * sysdeps/i386/fpu/s_nextafterl.c: Handle decrement for x<0 correctly. + * sysdeps/ieee754/ldbl-96/math_ldbl.h + (ieee_long_double_shape_type): Make sign_exponent element signed. + + * manual/message.texi: Add Estonian to plural overview list. + Correct rule for Slavic languages. + Patch by Stanislav Brabec . + + * nis/nss_nis/nis-netgrp.c: Remove unnecessary initializations. + +2000-12-18 Andreas Jaeger + + * test-skeleton.c: Use temp_name_list instead of name_list to + avoid collision with name_list from inet/netgroup.h. + + * nss/nss_files/files-network.c (NEED_H_ERRNO): Define. + + * include/grp.h (DECLARE_NSS_PROTOTYPES): New. + * include/pwd.h (DECLARE_NSS_PROTOTYPES): New. + * include/netdb.h (DECLARE_NSS_PROTOTYPES): New. + * include/shadow.h (DECLARE_NSS_PROTOTYPES): New. + + * hesiod/nss_hesiod/hesiod-proto.c (_nss_hesiod_setprotoent): Fix + declaration to match prototype. + * hesiod/nss_hesiod/hesiod-pwd.c (_nss_hesiod_setpwent): Likewise. + * hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_setgrent): Likewise. + * hesiod/nss_hesiod/hesiod-service.c (_nss_hesiod_setservent): + Likewise. + * nis/nss_nis/nis-grp.c (_nss_nis_setgrent): Likewise. + * nis/nss_nis/nis-pwd.c (_nss_nis_setpwent): Likewise. + * nis/nss_nis/nis-proto.c (_nss_nis_setprotoent): Likewise. + * nis/nss_nis/nis-service.c (_nss_nis_setservent): Likewise. + (_nss_nis_getservbyport_r): Likewise. + * nis/nss_nis/nis-hosts.c (_nss_nis_sethostent): Likewise. + * nis/nss_nis/nis-spwd.c (_nss_nis_setspent): Likewise. + * nis/nss_nis/nis-network.c (_nss_nis_getnetent_r): Likewise. + (_nss_nis_setnetent): Likewise + * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Likewise. + (_nss_nis_endnetgrent): Likewise. + * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_endnetgrent): + Likewise. + (_nss_nisplus_setnetgrent): Likewise. + * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Likewise. + * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_setpwent): Likewise. + * nis/nss_nisplus/nisplus-grp.c (_nss_nisplus_setgrent): Likewise. + * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_setnetent): + Likewise. + * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_sethostent): + Likewise. + * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_setservent): + Likewise. + * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_setprotoent): + Likewise. + * nis/nss_compat/compat-spwd.c (_nss_compat_setspent): Likewise. + * nis/nss_compat/compat-pwd.c (_nss_compat_setpwent): Likewise. + * nis/nss_compat/compat-grp.c (_nss_compat_setgrent): Likewise. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. + * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise. + (_nss_dns_getnetbyaddr_r): Likewise. + +2000-12-17 Andreas Jaeger + + * sysdeps/generic/k_sinl.c (__kernel_sinl): Fix functions + parameter. + + * sysdeps/unix/sysv/linux/shm_open.c (freeit): Make static and add + unused attribute to shut up gcc warnings. + + * sysdeps/generic/k_sinl.c: Include math_private for prototypes. + * sysdeps/generic/k_tanl.c: Likewise. + * sysdeps/generic/k_cosl.c: Likewise. + * sysdeps/generic/e_j0l.c: Likewise. + * sysdeps/generic/e_j1l.c: Likewise. + * sysdeps/generic/e_jnl.c: Likewise. + * sysdeps/generic/e_lgammal_r.c: Likewise. + + * elf/vismain.c: Move prototypes for functions in vismod*.c to + vismod.h. + * elf/vismod.h: New file. + * elf/Makefile (distribute): Add vismod.h. + * elf/vismod1.c: Include vismod.h. + * elf/vismod2.c: Likewise. + * elf/vismod3.c: Likewise. + + * elf/constload3.c: Add prototype declarations to shut up gcc. + * elf/failobj.c: Likewise. + * elf/nodelmod3.c: Likewise. + * elf/filtmod1.c: Likewise. + * elf/filtmod2.c: Likewise. + * elf/reldepmod1.c: Likewise. + * elf/reldepmod2.c: Likewise. + * elf/reldepmod3.c: Likewise. + * elf/reldepmod4.c: Likewise. + * elf/unload2dep.c: Likewise. + * elf/unload2mod.c: Likewise. + * elf/ltglobmod1.c: Likewise. + * elf/pathoptobj.c: Likewise. + * elf/neededobj1.c: Likewise. + * elf/neededobj2.c: Likewise. + * elf/neededobj3.c: Likewise. + * elf/neededobj4.c: Likewise. + * elf/nextmod1.c: Likewise. + * elf/nextmod2.c: Likewise. + + * locale/programs/ld-collate.c (collate_finish): Don't use labels + at end of compound statement. + * locale/programs/locale.c (show_info): Likewise. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. + +2000-12-16 Jakub Jelinek + + * catgets/gencat.c (read_input_file): Avoid calling obstack_free + with a pointer not returned by obstack_ functions. + +2000-12-16 Ulrich Drepper + + * sysdeps/unix/sysv/aix/bits/stat.h (struct stat): Align with AIX + version. + (struct stat64): Likewise. + Reported by Michael Keezer . + + * timezone/asia: Update from tzdata2000h. + * timezone/australasia: Likewise. + * timezone/backward: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/zone.tab: Likewise. + +2000-12-14 Jakub Jelinek + + * io/ftw.c (ftw_dir): If process_entry returned non-zero result + and dir.stream is NULL, only free dir.content. + * io/ftwtest.c (cb, main): Add --early-exit option to test it. + * io/ftwtest-sh: Test with --early-exit. + +2000-12-13 Jakub Jelinek + + * misc/efgcvt.c (FCVT_MAXDIG): Define. + (FCVT_BUFPTR): New variable. + (fcvt): If fcvt_r returns -1 on the static short buffer, + try to malloc a sufficiently large one and retry. + (free_mem): New function. + * misc/qefgcvt.c (FCVT_MAXDIG): Define. + * misc/tst-efgcvt.c (fcvt_tests): Add new test. + +2000-12-15 Ulrich Drepper + + * misc/dirname.c (dirname): Fix search for second to last slash. + +2000-12-13 Andreas Jaeger + + * misc/tst-dirname.c (main): Fix typo in test to really use + the examples from Unix98. + Reported by Michael Kerrisk . + +2000-12-09 H.J. Lu + + * sysdeps/ia64/fpu/s_fabs.S: New file. + * sysdeps/ia64/fpu/s_fabsf.S: New file. + * sysdeps/ia64/fpu/s_fabsl.S: New file. + +2000-12-15 Andreas Jaeger + + * stdio-common/scanf9.c (main): Reformat and change to avoid + warnings. + + * stdio-common/tstdiomisc.c: Make local functions static. + * stdio-common/tst-printf.c: Likewise. + + * elf/constload2.c: Add prototype declarations to shut up gcc. + * elf/dep1.c: Likewise. + * elf/dep2.c: Likewise. + * elf/dep3.c: Likewise. + * elf/dep4.c: Likewise. + * elf/ltglobmod2.c: Likewise. + + * libio/fmemopen.c: Make local functions static. + + * elf/Makefile (distribute): Added testobj.h. + + * elf/testobj.h: New file. + + * elf/testobj1.c: Include testobj.h and move prototype + declarations to testobj.h. + * elf/testobj2.c: Likewise. + * elf/testobj3.c: Likewise. + * elf/testobj4.c: Likewise. + * elf/testobj5.c: Likewise. + * elf/testobj6.c: Likewise. + * elf/testobj1_1.c: Likewise. + * elf/preloadtest.c: Likewise. + +2000-12-15 Ben Collins + + * misc/sys/cdefs.h: Fix thinko in checks for flexarr macros. + Patch by Akim Demaille in Debian bug report. + +2000-12-14 H.J. Lu + + * sysdeps/ieee754/flt-32/s_sincosf.c (__sincosf): The exponent + field in a float is 8 bits, not 11 bits. + +2000-12-13 Jakub Jelinek + + * math/test-misc.c (main): Adjust m for IEEE quad long double. + +2000-12-13 Andreas Jaeger + + * manual/message.texi (Using gettextized software): Fix typo. + + * manual/charset.texi (Converting a Character): Fix mbstouwcs + program to compile. + Patch by Martin Buchholz . + + * sysdeps/unix/sysv/linux/sigpending.c (sigpending): Fix typo. + Reported by Michael Kerrisk . + +2000-12-11 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/kernel_sigaction.h: Declare + kernel_sigset_t and use it. + Patch by Hiroyuki Machida . + +2000-12-10 Richard Henderson + + * sysdeps/alpha/alphaev67/fpu/Implies: New file. + * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: New file. + * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: New file. + +2000-12-10 Jakub Jelinek + + * sysdeps/alpha/htonl.S: Fix a typo. + +2000-12-10 Jakub Jelinek + + * sysdeps/alpha/alphaev6/stxcpy.S: Exchange t8 with t10. + +2000-12-10 Andreas Jaeger + + * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Fixed + cast as suggested by Jakub Jelinek and Ulrich + Drepper . + +2000-12-09 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/sigaction.c: New file. + + * sysdeps/unix/sysv/linux/mips/sys/acct.h: Removed, we can use the + generic version. + Patches by Hiroyuki Machida . + + * locale/programs/ld-collate.c (handle_ellipsis): Fix format + string. + + * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Fix + format string. + + * nscd/hstcache.c (addhstbyname): Add cast to avoid warning. + * nscd/connections.c (handle_request): Likewise. + * nscd/pwdcache.c (addpwbyname): Likewise. + * nscd/grpcache.c (addgrbyname): Likewise. + + * nscd/nscd_conf.c (nscd_parse_file): Remove extra argument. + +2000-12-09 Ulrich Drepper + + * string/stratcliff.c: Add tests for stpncpy, memcpy, and mempcpy. + + * Makeconfig (default_cflags): Make -O2 the default for stable + releases. + +2000-12-08 H.J. Lu + + * sysdeps/ia64/fpu/s_isinfl.S: Renamed to ... + * sysdeps/ia64/fpu/s_isinf.S: This. + Add a .pred.rel.mutex note to avoid false report. + + * sysdeps/ia64/fpu/s_isnanl.S: Renamed to ... + * sysdeps/ia64/fpu/s_isnan.S: This. + + * sysdeps/ia64/fpu/s_fpclassify.S: New file. + * sysdeps/ia64/fpu/s_fpclassifyf.S: New file. + * sysdeps/ia64/fpu/s_fpclassifyl.S: New file. + * sysdeps/ia64/fpu/s_isinff.S: New file. + * sysdeps/ia64/fpu/s_isinfl.S: New file. + * sysdeps/ia64/fpu/s_isnanf.S: New file. + * sysdeps/ia64/fpu/s_isnanl.S: New file. + * sysdeps/ia64/fpu/s_finite.S: New file. + * sysdeps/ia64/fpu/s_finitef.S: New file. + * sysdeps/ia64/fpu/s_finitel.S: New file. + * sysdeps/ia64/fpu/s_signbit.S: New file. + * sysdeps/ia64/fpu/s_signbitf.S: New file. + * sysdeps/ia64/fpu/s_signbitl.S: New file. + * sysdeps/ia64/fpu/s_copysign.S: New file. + * sysdeps/ia64/fpu/s_copysignf.S: New file. + * sysdeps/ia64/fpu/s_copysignl.S: New file. + +2000-12-08 Ulrich Drepper + + * math/libm-test.inc (main): Fix typos in messages. + + * string/stratcliff.c: Add test for rawmemchr. + +2000-12-08 Jakub Jelinek + + * elf/dl-open.c (_dl_open): If objname points right after errstring, + allocate it together with errstring using alloca. + * elf/dl-error.c (_dl_signal_error): If malloc failed, set objname + to "", because it might point to local stack. + +2000-12-05 H.J. Lu + + * nss/Makefile (routines): Add getnssent and getnssent_r. + * nss/nsswitch.h (__nss_setent): New internal NSS function. + (__nss_endent): Likewise. + (__nss_getent_r): Likewise. + (__nss_getent): Likewise. + * nss/getnssent_r.c: New file. + * nss/getnssent.c: New file. + * nss/getXXent.c (H_ERRNO_VAR): Updated. + (GETFUNC_NAME): Updated to call __nss_getent (). + * nss/getXXent_r.c (H_ERRNO_VAR_P): New. + (STAYOPEN_TMPVAR): Updated. + (STAYOPEN_VAR): Updated. + (SETFUNC_NAME): Updated to call __nss_setent (). + (ENDFUNC_NAME): Updated to call __nss_endent (). + (INTERNAL (REENTRANT_GETNAME)): Updated to call __nss_getent_r (). + +2000-12-08 Andreas Jaeger + + * nscd/dbg_log.h (dbg_log): Correct attribute. + +2000-12-08 Jakub Jelinek + + * elf/dl-load.c (fillin_rpath): Don't assume there is '\0' at + cp + len. Compute where from dirname. + Reported by . + +2000-12-08 Richard Henderson + + * sysdeps/alpha/_mcount.S: Fix typo. + * sysdeps/alpha/strncpy.S: Likewise. + + * sysdeps/alpha/alphaev6/Implies: New file. + * sysdeps/alpha/alphaev67/Implies: New file. + * sysdeps/alpha/alphaev67/ffs.S: New file. + * sysdeps/alpha/alphaev67/ffsll.S: New file. + * sysdeps/alpha/alphaev67/rawmemchr.S: New file. + * sysdeps/alpha/alphaev67/stpcpy.S: New file. + * sysdeps/alpha/alphaev67/stpncpy.S: New file. + * sysdeps/alpha/rawmemchr.S: New file. + * sysdeps/alpha/strcat.S: Tail call to __stxcpy. + * sysdeps/alpha/strcpy.S: Likewise. + + From GMP 3.1.1: + * sysdeps/alpha/alphaev6/addmul_1.s: New file. + + From rick.gorton@alpha-processor.com: + * sysdeps/alpha/alphaev6/memchr.S: New file. + * sysdeps/alpha/alphaev6/memcpy.S: New file. + * sysdeps/alpha/alphaev6/memset.S: New file. + * sysdeps/alpha/alphaev6/stxcpy.S: New file. + * sysdeps/alpha/alphaev6/stxncpy.S: New file. + * sysdeps/alpha/alphaev67/strcat.S: New file. + * sysdeps/alpha/alphaev67/strchr.S: New file. + * sysdeps/alpha/alphaev67/strlen.S: New file. + * sysdeps/alpha/alphaev67/strncat.S: New file. + * sysdeps/alpha/htonl.S: Use a shorter sequence. + +2000-12-08 Jakub Jelinek + + * inet/getnameinfo.c (getnameinfo): Fix NI_NOFQDN support. + Reported by . + +2000-12-07 Jes Sorensen + + * sysdeps/ia64/elf/start.S (__data_start): Add __data_start variable. + Pointed out by Hans Boehm. + +2000-12-07 H.J. Lu + + * elf/dl-version.c (match_symbol): Check map->l_name[0] for printing. + +2000-12-07 Andreas Jaeger + + * misc/error.c: Add format attributes for __error and __error_at_line. + + * nscd/dbg_log.h: Add format attribute. + +2000-12-08 Ulrich Drepper + + * misc/sys/syslog.h: Add format attributes to syslog and vsyslog. + Patch by Joseph S. Myers . + +2000-12-07 Dan Pop + + * sysdeps/ia64/strcpy.S: Fix a bug in a recovery code sequence. + +2000-12-06 Ulrich Drepper + + * sysdeps/unix/sysv/aix/Makefile [$(subdir)==misc] + (sysdep_routines): Add uitrunc. + * sysdeps/unix/sysv/aix/uitrunc.c: New file. + Patches by Michael Keezer . + +2000-12-06 Roland McGrath + + * sysdeps/mach/hurd/ioctl.c (__ioctl): Don't clobber ARG as we copy in + argument data, since it will be used to copy out too (for INOUT). + Reported by Marcus Brinkmann . + + * sysdeps/mach/hurd/ioctl.c: Include . + (__ioctl): Use uintptr_t instead of unsigned long int. + +2000-12-06 Jim Wilson + + * stdlib/l64a.c (l64a): Truncate M to 32-bit value. + +2000-12-06 Ulrich Drepper + + * stdio-common/printf_fp.c (__printf_fp): Handle decimal point in + x.5 rounding correctly. + +2000-12-06 Mark Kettenis + + * stdio-common/perror.c (perror): Conditionalize code dealing with + wide-oriented streams on USE_IN_LIBIO. + +2000-12-06 Mark Kettenis + + * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start_cleanup): Mark + as internal_function. + +2000-12-05 Ulrich Drepper + + * sysdeps/alpha/elf/start.S (__data_start): Define. + +2000-12-05 H.J. Lu + + * nss/getXXent_r.c (setup): Change the return type to int. + +2000-12-05 Ulrich Drepper + + * sysdeps/unix/sysv/aix/Makefile [$(subdir)==misc] + (sysdep_routines): Add restf and savef. + * sysdeps/unix/sysv/aix/restf.c: New file. + * sysdeps/unix/sysv/aix/savef.c: New file. + Patches by Michael Keezer . + + * sysdeps/unix/opendir.c (__opendir): Don't use o_directory_works + if O_DIRECTORY is not defined. + Patch by Michael Keezer . + + * include/libc-symbols.h (C_SYMBOL_DOT_NAME): Define. + Patch by Michael Keezer . + + * locale/programs/linereader.c (get_toplvl_escape): Recognize more + than 4 bytes in escape sequence. + Patch by Shinya Hanataka . + +2000-12-05 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Don't + set mips2. + + * sysdeps/unix/sysv/linux/mips/sysdep.h: New file. + + * sysdeps/unix/sysv/linux/mips/sys/syscall.h: Removed. + + * sysdeps/unix/mips/sysdep.h: Use SYS_ify. + Patches by Maciej W. Rozycki . + + * elf/dl-misc.c (_dl_sysdep_read_whole_file): Mark as + internal_function. + * sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Likewise. + * sysdeps/generic/dl-sysdep.c (_dl_sysdep_start_cleanup): Likewise. + + * sysdeps/generic/dl-cache.c: Remove declaration of + _dl_sysdep_read_whole_file. + + * elf/dl-load.c (_dl_map_object): Remove declaration of + _dl_load_cache_lookup. + + * sysdeps/generic/ldsodefs.h: Add declarations of + _dl_load_cache_lookup, _dl_unload_cache, + _dl_sysdep_read_whole_file, _dl_sysdep_start and + _dl_sysdep_start_cleanup. + + * elf/rtld.c: Remove prototypes that are defined in ldsodefs.h + now. + + * elf/dl-misc.c: Include to get prototypes. + * sysdeps/generic/dl-environ.c: Likewise. + + * stdio-common/printf_fp.c: Include instead of + . + * math/atest-exp.c: Likewise. + * math/atest-exp2.c: Likewise. + * math/atest-sincos.c: Likewise. + * stdio-common/_itoa.c: Likewise. + * stdio-common/_itowa.c: Likewise. + + * include/gmp.h: New file with internal prototypes. + + * sysdeps/generic/longjmp.c: Move _longjmp_unwind declaration from + here to... + * include/setjmp.h: ...here. + + * locale/Makefile (routines): Remove codeset_name since it's not + needed anywhere. + + * locale/codeset_name.c: Removed. + +2000-12-05 Ulrich Drepper + + * sysdeps/unix/sysv/aix/sys/param.h: Define MAXHOSTNAMELEN here. + +2000-12-05 Andreas Jaeger + + * sysdeps/unix/sysv/linux/sys/param.h: Revert last patch. + +2000-12-05 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/mmap64.S: Use mmap if mmap2 isn't + available. + +2000-12-05 Andreas Jaeger + + * nss/test-netdb.c: Mark local functions as static to avoid + warnings. + (main): Use return to silence warning. + + * stdlib/test-canon.c (check_path): Mark as static to avoid warning. + + * stdio-common/test-popen.c: Mark local functions as static to + avoid warnings. + (main): Use return to silence warning. + + * stdlib/testsort.c (compare): Mark as static to avoid warning. + + * assert/test-assert.c: Mark local functions as static to avoid + warnings. + * assert/test-assert-perr.c: Likewise. + + * math/libm-test.inc (main): Use return to silence warnings. + +2000-12-04 Ulrich Drepper + + * math/fenv.h: Fix typo in comment. + + * math/test-misc.c (main): Add a few more over and underflow tests + for scalb. + + * sysdeps/i386/fpu/e_scalb.S: Handle NaN as first parameter correctly. + * sysdeps/i386/fpu/e_scalbf.S: Likewise. + * sysdeps/i386/fpu/e_scalbl.S: Likewise. + * math/w_scalb.c: Don't use matherr except in SVID mode. + * math/w_scalbf.c: Likewise. + * math/w_scalbl.c: Likewise. + * math/test-misc.c: Add test for NaN and scalbl. + Reported by Fred J. Tydeman . + +2000-12-04 Ulrich Drepper + + * configure.in: Define HAVE_ASM_GLOBAL_DOT_NAME for AIX. + * config.h.in: Add HAVE_ASM_GLOBAL_DOT_NAME. + * include/libc-symbols.h (strong_alias): Define special version + for HAVE_ASM_GLOBAL_DOT_NAME. + (weak_alias): Likewise. + * sysdeps/powerpc/bsd-setjmp.S: Use strong_alias not .set. + * sysdeps/unix/sysv/aix/Makefile [$(subdir)==login] + (sysdep_routines): Add setutxent, getutxent, endutxent, getutxid, + getutxline, pututxline, and utmpxname. + * sysdeps/unix/sysv/aix/fchdir.c: Define __fchdir. + * sysdeps/unix/sysv/aix/lseek.c: Define __libc_lseek alias. + * sysdeps/unix/sysv/aix/open.c: Define __libc_open alias. + * sysdeps/unix/sysv/aix/pread.c: Define pread alias. + * sysdeps/unix/sysv/aix/pread64.c: Define pread64 alias. + * sysdeps/unix/sysv/aix/sysdep.h (JUMPTARGET): Use C_TEXT. + * sysdeps/unix/sysv/aix/bits/types.h: Define __clockid_t and __timer_t. + * sysdeps/unix/sysv/aix/bits/utmp.h: Cleanup. Add comments. + * sysdeps/unix/sysv/linux/sys/param.h (MAXHOSTNAMELEN): Define. + Patches by Michael Keezer . + +2000-12-04 H.J. Lu + + * configure.in: Change --with-oldest-abi=ABI to + --enable-oldest-abi=ABI. + +2000-12-02 Bruno Haible + + * stdio-common/perror.c (perror): If stderr is wide-oriented, use + fwprintf instead of fprintf. + +2000-12-04 Ulrich Drepper + + * sysdeps/alpha/fpu/bits/mathdef.h: Remove FLT_EVAL_METHOD and + DECIMAL_DIG definitions. + * sysdeps/arm/fpu/bits/mathdef.h: Likewise + * sysdeps/generic/bits/mathdef.h: Likewise + * sysdeps/i386/fpu/bits/mathdef.h: Likewise + * sysdeps/ia64/fpu/bits/mathdef.h: Likewise + * sysdeps/m68k/fpu/bits/mathdef.h: Likewise + * sysdeps/powerpc/fpu/bits/mathdef.h: Likewise + * sysdeps/sparc/fpu/bits/mathdef.h: Likewise + * sysdeps/sh/sh4/fpu/bits/mathdef.h: Likewise + +2000-12-03 Ulrich Drepper + + * math/test-fenv.c (main): Use return instead of exit to avoid warning. + + * math/atest-exp.c: Mark local functions as static to avoid warnings. + * math/atest-exp2.c: Likewise. + * math/atest-sincos.c: Likewise. + + * sysdeps/i386/fpu/bits/mathdef.h (DECIMAL_DIG): Correct value. + Reported by Fred J. Tydeman . + + * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Hopefully fix + the handling of denormalized numbers. + + * math/test-misc.c (main): Test for fpclassify and pseudo denormal + numbers on x86. + * sysdeps/i386/fpu/fpclassifyl.c: New file. + + * sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Handle the + pseudo denormal representation of LDBL_MIN. + + * iconvdata/SJIS.irreversible: Remove unnecessary entries. + * iconvdata/EUC-JP.irreversible: Remove unnecessary entries. + + * iconvdata/sjis.c: Enable round-trip mapping of backslash and tilde. + * iconvdata/jis0208.c: Likewise. + * iconvdata/jis0212.c: Likewise. + Patch by Shinya Hanataka . + + * math/test-misc.c (main): More tests for frexp and some for + fpclassify and isnormal. + + * sysdeps/ieee754/flt-32/s_fpclassifyf.c (__fpclassifyf): Correct + test for subnormal. + Reported by Fred J. Tydeman . + + * math/test-misc.c (main): Add tests for frexp. + Reported by Fred J. Tydeman . + * sysdeps/i386/fpu/s_frexpl.S: Don't overflow during the computation. + +2000-12-02 H.J. Lu + + * locale/lc-time.c (_nl_init_era_entries): Pass L'\0' instead of + '\0' to wcschr. + +2000-12-02 Ulrich Drepper + + * sysdeps/i386/fpu/s_frexp.S: Add missing fwait. + * sysdeps/i386/fpu/s_frexpf.S: Likewise. + * sysdeps/i386/fpu/s_frexpl.S: Likewise. + + * sysdeps/generic/glob.c: Adjust types of several variables to + avoid warnings. + +2000-12-01 Ulrich Drepper + + * sysdeps/unix/sysv/linux/shm_open.c: Remove incorrect comment. + +2000-11-30 Roland McGrath + + * hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS_1): New macro. + (_HURD_HANDLE_IOCTLS, _HURD_HANDLE_IOCTL): Redefine using it, so as to + allow multiple instances using the same function name in one file. + +2000-12-01 Ulrich Drepper + + * configure.in: Correct test for pserver CVS access. + +2000-11-28 H.J. Lu + + * libio/libio.h: Remove extra "#if ... #endif". + +2000-11-29 H.J. Lu + + * stdio-common/vfscanf.c (ORIENT): Swap the COMPILE_WSCANF case. + +2000-12-01 H.J. Lu + + * nss/getXXbyYY_r.c: Fix verioned symbol handling. + * nss/getXXent_r.c: Likewise. + * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. + +2000-11-30 H.J. Lu + + * scripts/abi-versions.awk (oldest_abi): New variable. + Handle the oldest ABI supported. + + * Makerules ($(common-objpfx)abi-versions.h): Set oldest_abi + for scripts/abi-versions.awk. + + * configure.in: Add --with-oldest-abi=ABI. + * configure: Rebuild. + + * config.make.in (oldest-abi): New. + + * config.h.in (GLIBC_OLDEST_ABI): New. + + * csu/version.c (banner): Support GLIBC_OLDEST_ABI. + +2000-11-30 Jakub Jelinek + + * locale/setlocale.c (setname): Free for all categories, not just + LC_ALL. + (setlocale): Store a copy of string passed by user, not the string + itself. + +2000-11-30 Roland McGrath + + * sysdeps/mach/hurd/defs.c (init_stdio): Put this on __libc_subinit + rather than _hurd_fd_subinit, so it happens after it's safe to use + libc facilities like malloc. + +2000-11-28 Andreas Jaeger + + * sysdeps/unix/sysv/linux/getdents.c: Add _syscall_getdents64 + declaration, adjust declaration of __syscall_getdents to match + kernel. + +2000-11-29 H.J. Lu + + * sysdeps/generic/readelflib.c (check_ptr): Undefine it first. + +2000-11-29 Andreas Jaeger + + * sysdeps/unix/sysv/linux/hppa/brk.c (__brk): Remove unused variable. + +2000-11-28 Ulrich Drepper + + * dlfcn/defaultmod1.c: Add prototypes to avoid warnings. + * dlfcn/defaultmod2.c: Likewise. + * dlfcn/dlopen.c: Likewise. + * dlfcn/dlopenold.c: Likewise. + * dlfcn/failtestmod.c: Likewise. + * dlfcn/glreflib1.c: Likewise. + * dlfcn/glreflib2.c: Likewise. + * dlfcn/eval.c: Likewise. Add attributes. + + * ctype/ctype-extn.c: Define isblank and not __isblank. + + * time/strftime.c: Add const where necessary to avoid warnings. + * time/strptime.c (strptime_internal): Add casts to avoid warnings. + +2000-11-22 Paul Eggert + + * time/strftime.c (my_strftime): Do not invoke mbrlen with a + size of (size_t) -1; it's not portable. + +2000-11-28 Ulrich Drepper + + * sysdeps/i386/fpu/libm-test-ulps: Adjust some values for the + crappy i486 FPU. + Reported by Michael Deutschmann . + +2000-11-14 Jes Sorensen + + * sysdeps/ia64/_mcount.S: Call __mcount instead of __mcount_internal. + + * sysdeps/ia64/Makefile: Compile _mcount.S in subdir gmon as + _mcount is required by profiled binaries. + + * sysdeps/unix/sysv/linux/ia64/machine-gmon.h: Moved to... + * sysdeps/ia64/machine-gmon.h: ...here. + +2000-11-28 Masahide Washizawa + + * iconvdata/Makefile (modules): Add IBM922, IBM1124, and IBM1129. + (distribute): Add ibm922.c, ibm1124.c, ibm1129.c, ibm922.h, ibm1124.h, + and ibm1129.h. + * iconvdata/gconv-modules: Add entries for IBM922, IBM1124, and + IBM1129. + * iconvdata/ibm922.c: New file. + * iconvdata/ibm922.h: New file. + * iconvdata/ibm1124.c: New file. + * iconvdata/ibm1124.h: New file. + * iconvdata/ibm1129.c: New file. + * iconvdata/ibm1129.h: New file. + * iconvdata/testdata/IBM922: New file. + * iconvdata/testdata/IBM922..UTF8: New file. + * iconvdata/testdata/IBM1124: New file. + * iconvdata/testdata/IBM1124..UTF8: New file. + * iconvdata/testdata/IBM1129: New file. + * iconvdata/testdata/IBM1129..UTF8: New file. + +2000-11-28 Ulrich Drepper + + * catgets/gencat.c (normalize_line): Take extra parameter with escape + character. Change callers. + (open_conversion): Determine mapping of 0x5c as wchar_t value. + * catgets/Makefile: Add rules to build and run test-gencat. + * catgets/sample.SJIS: New file. + * catgets/test-gencat.c: New file. + * catgets/test-gencat.sh: New file. + Report and test case by Shinya Hanataka . + +2000-11-28 Andreas Jaeger + + * sysdeps/unix/sysv/linux/mips/bits/socket.h: Synch with generic + Linux version. + +2000-11-28 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/socket.h: Fix last patch. + +2000-11-28 Andreas Jaeger + + * sysdeps/unix/sysv/linux/bits/socket.h (struct cmsghdr): Use + __flexarr. + * sysdeps/unix/sysv/linux/mips/bits/socket.h (struct cmsghdr): + Likewise. + +2000-11-27 Ulrich Drepper + + * misc/getusershell.c: Make strings in okshells array const. + * misc/regexp.c: Add const to cast to avoid warnings. + * sysdeps/unix/sysv/linux/llseek.c: Add prototype for __llseek. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Add prototype for + __setresuid. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Add prototype for + setresgid. + * misc/error.c: Add prototypes for __error and __error_at_line. + * misc/mntent_r.c (__getmntent_r): Add break at end of switch + statement to avoid warning. + * test-skeleton.c: Mark timeout_handler with noreturn. + * iconv/skeleton.c (get16u): Add const to cast. + (get32u): Likewise. + * iconvdata/gb18030.c: Likewise. + * iconvdata/iso-2022-cn-ext.c: Likewise. + * iconvdata/ansi_x3.110.c: Add cast to avoid warning. + * iconvdata/big5.c: Likewise. + * iconvdata/big5hkscs.c: Likewise. + * iconvdata/iso_6937.c: Likewise. + * iconvdata/iso_6937-2.c: Likewise. + * iconvdata/t.61.c: Likewise. + * iconvdata/iso646.c: Add prototypes for gconv_init and gconv_env. + * iconvdata/unicode.c: Likewise. + * iconvdata/utf-16.c: Likewise. + * iconvdata/cns11643.h (ucs4_to_cns11643): Define needed as size_t. + * iconv/gconv_trans.c (__gconv_translit_find): Avoid one warning + with little code shuffling. + + * sysdeps/powerpc/Makefile (CFLAGS-initfini.s): Add -O1 to avoid + the problems introduced when the user selects -O3. + + * iconv/gconv.h (__gconv_info): Define __data element using __flexarr. + * misc/sys/cdefs.h: Define __flexarr. + Proposed by Joseph S. Myers . + + * iconvdata/iso-2022-jp.c: Add prototypes to avoid warnings. + * iconv/skeleton.c: Likewise. + * iconvdata/iso8859-1.c (BODY to 8859-1): Add const to cast. + * iconv/loop.c (get16): Add const to cast. + (get32): Likewise. + +2000-11-27 Andreas Jaeger + + * login/programs/pt_chown.c (do_pt_chown): Mark function as static + to avoid warning. + * login/programs/utmpdump.c (print_entry): Likewise. + +2000-11-25 Maciej W. Rozycki + + * sysdeps/mips/__longjmp.c (__longjmp): Restore SP and FP last and + in a single asm as they may be used to access other stored + registers. + * sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise. + +2000-11-27 Andreas Jaeger + + * rt/tst-aio.c: Mark test functions as static to avoid warnings. + * rt/tst-aio64.c: Likewise. + +2000-11-27 Ulrich Drepper + + * catgets/Makefile (test1.cat): Set LC_ALL, LOCPATH, and GCONV_PATH + for gencat run. + (libc.cat): Likewise. + * catgets/gencat.c: Implement handling of message catalogs encoded + with stateful character sets. + Based on a patch by Shinya Hanataka . + +2000-11-26 Ulrich Drepper + + * sysdeps/unix/opendir.c (__opendir): Add cast to avoid warning. + + * inet/getnameinfo.c: Adjust casts to avoid warnings. + * inet/rcmd.c: Likewise. + * inet/ruserpass.c: Likewise. + * inet/netinet/in.h (IN6_IS_ADDR_UNSPECIFIED, IN6_IS_ADDR_LOOPBACK, + IN6_IS_ADDR_MULTICAST, IN6_IS_ADDR_LINKLOCAL, IN6_IS_ADDR_SITELOCAL, + IN6_IS_ADDR_V4MAPPED, IN6_IS_ADDR_V4COMPAT, IN6_ARE_ADDR_EQUAL, + IN6_IS_ADDR_MC_NODELOCAL, IN6_IS_ADDR_MC_LINKLOCAL, + IN6_IS_ADDR_MC_SITELOCAL, IN6_IS_ADDR_MC_ORGLOCAL, + IN6_IS_ADDR_MC_GLOBAL): Preserve const in cast. + * include/aliases.h: Add prototypes for internal __getalias* functions. + * include/netdb.h: Add prototypes for __old_gethostent_r, + __old_gethostbyaddr_r, __old_gethostbyname_r, __old_gethostbyname2_r, + __old_getnetent_r, __old_getnetbyaddr_r, __old_getnetbyname_r, + __old_getservent_r, __old_getservbyname_r, __old_getservbyport_r, + __old_getprotoent_r, __old_getprotobyname_r, __old_getprotobynumber_r. + * include/rpc/netdb.h: Add prototypes for __old_getrpcbyname_r, + __old_getrpcbynumber_r, __old_getrpcent_r. + + * include/rpc/netdb.h: Add __getrpcbyname_r, __getrpcbynumber_r, + __getrpcent_r prototypes. + +2000-11-25 Ulrich Drepper + + * string/strcoll.c: Add casts to avoid warnings. + * string/strnlen.c: Likewise. + * string/strxfrm.c: Likewise. + * sysdeps/generic/_strerror.c: Likewise. + * sysdeps/generic/memrchr.c: Likewise. + * sysdeps/generic/strcasestr.c: Likewise. + * sysdeps/generic/strstr.c: Likewise. + + * locale/weight.h (findidx): Add const to cast to avoid warning. + + * elf/loadfail.c: Little cosmetic changes to avoid warnings. + * elf/loadtest.c: Likewise. + * elf/multiload.c: Likewise. + * elf/next.c: Likewise. + * elf/nodelete.c: Likewise. + * elf/noload.c: Likewise. + * elf/order.c: Likewise. + * elf/origtest.c: Likewise. + * elf/preloadtest.c: Likewise. + * elf/restest1.c: Likewise. + + * sysdeps/i386/i486/bits/string.h (__strncat_g) [i686]: Fourth + parameter of asm must be in %ecx. + + * string/tester.c: Mark test functions as static to avoid warnings. + + * iconv/gconv_conf.c (read_conf_file): Make mod_counter static to + preserve value over different gconv-modules files. + +2000-11-24 Ulrich Drepper + + * locale/findlocale.c: Add casts to avoid warnings. + * locale/localeinfo.h (LIMAGIC): Add cast to avoid warnings. + * misc/efgcvt_r.c (fcvt_r): Use ssize_t instead of int and add cast + to avoid warnings. + * misc/tsearch.c (const_node): New type. + (trecurse): Correct casts to avoid warnings. + (__twalk): Likewise. + * stdlib/tst-limits.c: Add z modifier to formats for WORD_BIT and + LONG_BIT. + + * debug/backtrace-tst.c (compare): Add casts to avoid warnings. + + * test-skeleton.c: Mark local functions as static to avoid warnings. + +2000-11-23 H.J. Lu + + * rt/tst-aio6.c (do_test): Use pipe instead of STDIN_FILENO to + support the background job. + Fix a typo. + +2000-11-24 Ulrich Drepper + + * iconv/gconv_conf.c (insert_module): Replace old entry if new one + has same names but lower cost. + +2000-11-23 Jakub Jelinek + + * sysdeps/sparc/sparc32/dl-machine.h: Ifdef out handling for relocs + which never occur during bootstrap. + * sysdeps/sparc/sparc64/dl-machine.h: Likewise. + +2000-11-23 Andreas Jaeger + + * nss/nss_files/files-hosts.c: Remove getipnodebyname. + + * nss/Versions: Remove _nss_files_getipnodebyname_r. + + * sysdeps/unix/sysv/linux/Versions: Fix typo in last patch. + +2000-11-18 Martin Buchholz + + * csu/gmon-start.c (__gmon_start__): Avoid over-clever trick `if + (called++) return;' + +2000-11-21 Alan Modra + + * sysdeps/generic/bsd-_setjmp.c (setjmp): Rename to _setjmp. + + * csu/abi-note.S: Correct comment for operating system number. + +2000-11-22 Ulrich Drepper + + * Versions.def: Add GLIBC_2.2.1 for glibc. + +2000-11-22 Andreas Schwab + + * sysdeps/unix/sysv/linux/syscalls.list: Add pivot_root. + * sysdeps/unix/sysv/linux/Versions: Add pivot_root at GLIBC_2.2.1. + +2000-11-22 Ulrich Drepper + + * rt/aio_suspend.c (aio_suspend): Convert timeout value to + absolute time for pthread_cond_timedwait call. + Reported by Lawrence Chen [libc/1930]. + + * rt/Makefile (tests): Add tst-aio6. + * rt/tst-aio6.c: New file. + +2000-11-23 Andreas Jaeger + + * sysdeps/s390/bits/string.h (strncat): Fix one more typo. + +2000-11-22 Andreas Jaeger + + * sysdeps/s390/bits/string.h (strncat): Add missing quotation marks. + +2000-11-21 Martin Schwidefsky + + * sysdeps/s390/bits/string.h: Make strncat always add a \0. + +2000-11-21 Andreas Schwab + + * sysdeps/alpha/setjmp.S: Remove __setjmp entry point. + * sysdeps/arm/setjmp.S: Likewise. + * sysdeps/arm/fpu/setjmp.S: Likewise. + * sysdeps/i386/setjmp.S: Likewise. + * sysdeps/i386/elf/setjmp.S: Likewise. + * sysdeps/s390/setjmp.S: Likewise. + * sysdeps/s390/elf/setjmp.S: Likewise. + * sysdeps/sh/sh3/setjmp.S: Likewise. + * sysdeps/sh/sh4/setjmp.S: Likewise. + * sysdeps/sparc/sparc32/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/setjmp.c: Removed. + +2000-11-21 Andreas Jaeger + + * sysdeps/generic/__longjmp.c (__longjmp): Remove obsolete + NORETURN, fix parameter list. + + * string/bug-strncat1.c (main): Fix typo. + Patch by Bernhard Kaindl . + +2000-11-20 Ulrich Drepper + + * configure.in: Add --enable-all-warnings. + * config.make.in (all-warnings): New variable. + * Makeconfig (+gccwarn): Define with many more warnings if + all-warnings is yes. + +2000-11-20 Jakub Jelinek + + * iconvdata/bug-iconv2.c (main): Use %zd in format string. + * io/test-lfs.c (do_test): Cast statbuf.st_size to long long. + * malloc/tst-valloc.c (main): Cast valloc return value to long. + * malloc/tst-obstack.c (verbose_malloc): Use %zd in format string. + * math/test-fpucw.c (main): Use %lx in format string, cast + control words to long. + * stdio-common/tst-fmemopen.c (main): Use %td in format strings. + * stdlib/tst-strtol.c (tests): Avoid (bogus?) decimal constant is so + large that it is unsigned warning. + + * sysdeps/unix/sysv/linux/sparc/bits/types.h (__ssize_t): Changing + it to long on sparc64. + +2000-11-20 Andreas Jaeger + + * nscd/nscd.h (termination_handler): Add noreturn attribute. + (receiv_print_stats): Likewise. + + * elf/ldconfig.c (path_hwcap): Cast -1 for proper comparison. + +2000-11-20 Ulrich Drepper + + * malloc/thread-m.h: gcc doesn't tolerate zero-sized types anymore. + + * csu/gmon-start.c: Always have prototype for __gmon_start. + * csu/version.c: Add prototypes for __libc_print_version and + __libc_main. + * iconv/gconv.c: Include gconv_int.h and gconv.h. + * iconv/gconv.h (struct __gconv_step): Remove const from __from_name + and __to_name. + * iconv/gconv_builtin.h: Add ASCII module definitions. + * iconv/gconv_conf.c (__gconv_path_elem): Remove const. + (add_module): Add cast to avoid warning. Rework construction of + strings for new module. + * iconv/gconv_db.c (__gconv_alias_compare): Make s1 and s2 const. + (derivation_compare): Likewise. + * iconv/gconv_dl.c (do_release_shlib): Remove const from nodep. + (__gconv_release_shlib): Cast do_release_shlib as parameter for twalk. + * iconv/gconv_int.h (__gconv_path_elem): Remove const. + (struct gconv_alias): Remove const from fromname and toname. + * iconv/gconv_simple.c: Include gconv_builtin.h to get prototypes + for loop functions. + (internal_ucs4_loop): Use correct const-ness. + (ucs4_internal_loop): Likewise. + (internal_ucs4le_loop): Likewise. + (ucs4le_internal_loop_single): Likewise. + * iconv/gconv_trans.c (__gconv_transliterate): Make from_idx, from_tbl, + to_idx, to_tbl, winbuf, winbufend const. Change casts in + assignments appropriately. + (struct known_trans): Remove const from fname. + (trans_compare): Make s1 and s2 const. + * iconv/loop.c (LOOPFC): Make outend parameter const. Add cast to + avoid warning. + * iconv/skeleton.c: Remove cast in calls of loop functions. + * iconvdata/gconv-modules: Remove US-ASCII definitions. + * iconvdata/iso646.c: Remove US_ASCII support. + * include/set-hooks.h (DEFINE_HOOK): Also generate prototype. + * include/unistd.h: Add __libc_check_standard_fds prototype. + * string/bits/string2.h (__mempcpy_args): Add const to casts. + * sysdeps/generic/initfini.c: Add prototypes for dummy, _init, and + _fini. + * sysdeps/generic/libc-start.c: Add prototype for __libc_start_main. + * sysdeps/i386/i486/bits/string.h (strcmp): Add const to casts. + * sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Add cast to avoid + warning. + * sysdeps/unix/sysv/linux/init-first.c: Add prototypes for + __libc_init_first and _dl_start. + * intl/dcigettext.c (transcmp): Make s1 and s2 const. + (DCIGETTEXT): Make domaindata variable const. + * intl/loadmsgcat.c (_nl_load_domain): Rearrange domain initialization + to avoid warning. + +2000-11-20 Hiroyuki Machida + + * sysdeps/unix/sysv/linux/mips/clone.S: Fix comments. + + * sysdeps/unix/sysv/linux/mips/kernel_stat.h (kernel_stat): Expand + time_t to 'long int' not, 'unsigned int'. Use 'long int' for + __unused? members. + + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_NOFOLLOW): Use same + value defined in /usr/include/asm-mips/fcntl.h. + +2000-11-18 Ulrich Drepper + + * stdio-common/Makefile (tests): Add test-vfprintf. + (test-vfprintf-ENV): New variable. + * stdio-common/test-vfprintf.c: New file. + + * wcsmbs/mbrtowc.c (__mbrtowc): Do not only flush if input is '\0'. + + * wcsmbs/Makefile (tests): Add tst-mbrtowc and tst-wcrtomb. + (tst-mbrtowc-ENV): New variable. + (tst-wcrtomb-ENV): New variable. + * wcsmbs/tst-mbrtowc.c: New file. + * wcsmbs/tst-wcrtomb.c: New file. + +2000-11-16 Andreas Jaeger + + * manual/install.texi (Tools for Compilation): Update + documentation for GCC 2.95.2. + +2000-11-18 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Only return -EAI_AGAIN + if IPv4 and IPv6 requests timed out. + +2000-11-18 Akim Demaille + + * malloc/obstack.h: Formatting changes. + (obstack_grow, obstack_grow0): Don't cast WHERE at all: it + prevents type checking. + (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't + cast the value to (void *): assigning a `foo *' to a `void *' + variable is valid. + (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int. + +2000-11-17 Ulrich Drepper + + * scripts/config.guess: Update from upstream maintainer. + * scripts/config.sub: Likewise. + +2000-11-16 Ulrich Drepper + + * libio/freopen.c (freopen): Reset _mode after succesful reopening. + * libio/freopen64.c (freopen64): Likewise. + Patch by Shinya Hanataka . + + * libio/Makefile: Add rules to build and run test-freopen. + * libio/test-freopen.c: New file. + * libio/test-freopen.sh: New file. + +2000-11-15 H.J. Lu + + * sysdeps/generic/ldsodefs.h (DL_DT_INIT_ADDRESS): Defined if + ELF_FUNCTION_PTR_IS_SPECIAL is not defined. + (DL_DT_FINI_ADDRESS): Likewise. + + * sysdeps/ia64/dl-lookupcfg.h (_dl_lookup_address): Set the + return type to ElfW(Addr). + (_dl_function_address): New prototype. + (DL_FUNCTION_ADDRESS): Defined. + (DL_DT_INIT_ADDRESS): Defined as DL_FUNCTION_ADDRESS. + (DL_DT_FINI_ADDRESS): Likewise. + + * sysdeps/ia64/Versions (GLIBC_2.2): Add _dl_function_address. + + * sysdeps/ia64/dl-machine.h (_dl_start_address): Removed. + (ELF_MACHINE_START_ADDRESS): Changed to DL_FUNCTION_ADDRESS. + + * sysdeps/ia64/dl-symaddr.c (_dl_start_address): Renamed to ... + (_dl_function_address): This. + + * elf/dl-fini.c (_dl_fini): Use DL_DT_FINI_ADDRESS to get the + function pointer for DT_FINI. + * elf/dl-close.c (_dl_close): Likewise. + + * elf/dl-init.c (_dl_init): Use DL_DT_INIT_ADDRESS to get the + function pointer for DT_INIT. + +2000-11-16 Jakub Jelinek + + * sysdeps/generic/printf_fphex.c (__printf_fphex): Compute correctly + end of wexpbuf buffer. + +2000-11-16 Andreas Jaeger + + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Remove duplicate + definition of F_GETLK, F_SETLK, F_SETLKW. + +2000-11-16 Andreas Jaeger + + * sysdeps/generic/dl-cache.c (_DL_PLATFORMS_COUNT): Define to 0 if + it's not defined. + +2000-11-15 Jakub Jelinek + + * dlfcn/default.c (main): Add test for dladdr of main returning + argv[0] in dli_fname field. + +2000-11-15 Jakub Jelinek + + * Makeconfig (run-program-prefix): Move test-static test into the + variable. + + * sysdeps/alpha/dl-machine.h (RTLD_START): Update _dl_argv. + * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise, + schedule instructions. + * sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise, + schedule instructions, fix a bug in copying auxiliary data. + +2000-11-15 Ulrich Drepper + + * manual/startup.texi (Program Arguments): Fix type of main's envp + parameter. + Reported by Raúl Núñez de Arenas Coronado . + + * iconvdata/gconv-modules: Add CP950 alias. + +2000-11-13 Jakub Jelinek + + * sysdeps/unix/sysv/linux/Makefile: Allow ports to override + syscall-list.h goal. + * sysdeps/unix/sysv/linux/sparc/Makefile: New file. + +2000-11-15 Ulrich Drepper + + * intl/Makefile: tst-gettext2.sh does not need a third parameter. + + * intl/tst-gettext2.sh: Copy locale data. Adjust LOCPATH. Verify + output of program. + + * intl/tst-gettext2.c: Set C locale if setting other locale + failed. Use gettext() not _(). + + * locale/setlocale.c: Increment _nl_msg_cat_cntr whenever we + successfully loaded a new locale. + +2000-11-13 Andreas Jaeger + + * configure.in: Require gcc 2.95 or newer. + +2000-11-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/paths.h: Adjust for FHS. + Patch by Arkadiusz Miskiewicz . + +2000-11-11 Jim Meyering + + * string/strndup.c (strndup): Cast return value to `char *'. + +2000-11-15 Jim Meyering + + * sysdeps/generic/memchr.c: Remove some useless parentheses. + [HAVE_STDLIB_H || defined _LIBC]: Include . + [HAVE_BP_SYM_H || defined _LIBC]: Guard inclusion of bp-sym.h. + [! (HAVE_BP_SYM_H || defined _LIBC)] (BP_SYM): Define as no-op. + Also #undef __memchr. + Use `weak_alias' only if it's defined. + +2000-11-10 H.J. Lu + + * Makefile.in (install): Set LANGUAGE=C LC_ALL=C. + +2000-11-15 Andreas Jaeger + + * elf/chroot_canon.c: Include . + + * elf/cache.c (struct cache_entry): Use uint64_t for hwcap. + (print_entry): Likewise. + (add_to_cache): Likewise. + + * elf/ldconfig.h (add_to_cache): Change prototype for hwcap change. + + * elf/ldconfig.c (struct lib_entry): Use uint64_t for hwcap. + (path_hwcap): Likewise. + (search_dir): Likewise. + + * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Handle platform. + + * elf/cache.c (add_to_cache): Handle 64 bit hwcap entry. + + * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.h + (_dl_platform_string): New. + (_DL_HWCAP_PLATFORM): New. + (_dl_string_platform): New. + * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.h: Likewise. + + * sysdeps/generic/dl-procinfo.h (_DL_HWCAP_COUNT): New. + (_dl_string_platform): New. + (_DL_HWCAP_PLATFORM): New. + (_dl_platform_string): New. + + * sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Added x86 platform + recognition. + (_DL_HWCAP_COUNT): New. + (_dl_string_platform): New. + (_DL_HWCAP_PLATFORM): New. + (_dl_platform_string): New. + +2000-11-14 Ulrich Drepper + + * iconvdata/gconv-modules: Add CP936 as alias for GBK. + +2000-11-14 Andreas Jaeger + + * sysdeps/generic/dl-cache.c (HWCAP_CHECK): Fix access to _dl_hwcap. + +2000-11-13 Roland McGrath + + * hurd/get-host.c (_hurd_get_host_config): Fix last change. + +2000-11-13 Marcus Brinkmann + + * hurd/get-host.c (_hurd_get_host_config): Fix possible buffer + underrun and make sure the result is null terminated even if there + is no trailing newline. + +2000-11-13 Jakub Jelinek + + * sysdeps/alpha/fpu/libm-test-ulps: Update. + +2000-11-10 H.J. Lu + + * sysdeps/ia64/fpu/libm-test-ulps: Updated. + +2000-11-10 Andreas Jaeger + + * elf/ldconfig.c (create_links): Fix alloca calculation. + Patch by Ben Collins . + +2000-11-09 Ulrich Drepper + + * inet/getnameinfo.c (getnameinfo): Use correct destination + parameter for if_indextoname. + Patch by Hideaki YOSHIFUJI . + +2000-11-09 H.J. Lu + + * sunrpc/Versions (GLIBC_2.1): Remove xdr_cryptkeyarg, + xdr_cryptkeyarg2, xdr_cryptkeyres, xdr_des_block, + xdr_key_netstarg, xdr_key_netstres, xdr_keybuf and + xdr_keystatus. + + * time/Versions (GLIBC_2.1): Move getitimer to... + * sysdeps/unix/sysv/linux/alpha/Versions (GLIBC_2.1): ...here. + +2000-11-03 Bruno Haible + + * manual/install.texi: Recommend to set LANGUAGE=C LC_ALL=C during + "make install", to work around a binary incompatibility between + glibc 2.1 and glibc 2.2 gconv modules. + +2000-11-09 Ulrich Drepper + + * intl/locale.alias: Add thai. + Patch by Chanop Silpa-Anan . + +2000-11-07 Akim Demaille + + * malloc/obstack.c (obstack_grow, obstack_grow0): Rename the second + argument `data' for consistency with the prototypes. + Qualify it `const'. + (obstack_copy, obstack_copy0): Rename the second argument as + `address' for consistency. Qualify it `const'. + * malloc/obstack.h (obstack_copy, obstack_copy0, obstack_grow) + (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify + `const' their input argument (`data' or `address'). + Adjust the corresponding macros to include `const' in casts. + +2000-11-06 Hideaki YOSHIFUJI + + * sysdeps/posix/getaddrinfo.c: Clean-up: define family to hold + target family. + +2000-11-06 Hideaki YOSHIFUJI + + * sysdeps/posix/getaddrinfo.c: Loosen protocol check to ease raw + socket creation. + +2000-11-06 Hideaki YOSHIFUJI + + * sysdeps/posix/getaddrinfo.c: Ensure to fill ai_socktype and + ai_protocol by internal table if service was not given. + +2000-11-06 Hideaki YOSHIFUJI + + * sysdeps/posix/getaddrinfo.c: Don't raise an error even if + numerical port was specified with protocol without socktype. + +2000-11-06 Hideaki YOSHIFUJI + + * sysdeps/posix/getaddrinfo.c: Ensure to check if protocol is ok. + +2000-11-06 Hideaki YOSHIFUJI + + * inet/getnameinfo.c: getnameinfo() NI_xxx flag validation. + +2000-11-06 Hideaki YOSHIFUJI + + * sysdeps/posix/getaddrinfo.c: Ensure not to fill garbage value in + sin6_scope_id field. + +2000-11-06 Hideaki YOSHIFUJI + + * inet/getnameinfo.c: Repair getnameinfo() sin6_socpe_id support. + +2000-11-06 Hideaki YOSHIFUJI + + * inet/getnameinfo.c: Repair NI_NOFQDN flag support. + +2000-11-06 Hideaki YOSHIFUJI + + * inet/getnameinfo.c: Wake-up sin6_scope_id support in + getnameinfo(): check for whether sin6_socpe_id exist was wrong. + +2000-11-09 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/s390/mmap.S: Use mmap2 if it is present. + * sysdeps/unix/sysv/linux/s390/mmap64.S: New file. + +2000-11-09 H.J. Lu + + * io/Versions (GLIBC_2.1.1): Remove lockf64. + + +See ChangeLog.11 for earlier changes. diff -durpN glibc-2.2.4/Makeconfig glibc-2.2.5/Makeconfig --- glibc-2.2.4/Makeconfig Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/Makeconfig Wed Sep 12 11:49:45 2001 @@ -322,6 +322,9 @@ endif ifndef INSTALL_DATA INSTALL_DATA = $(INSTALL) -m 644 endif +ifndef INSTALL_SCRIPT +INSTALL_SCRIPT = $(INSTALL) +endif ifndef INSTALL_PROGRAM INSTALL_PROGRAM = $(INSTALL) endif @@ -380,10 +383,17 @@ ifndef static-start-installed-name static-start-installed-name = $(start-installed-name) endif +ifeq (yesyesyes,$(build-shared)$(elf)$(have-z-combreloc)) +combreloc-LDFLAGS = -Wl,-z,combreloc +LDFLAGS.so += $(combreloc-LDFLAGS) +LDFLAGS-rtld += $(combreloc-LDFLAGS) +endif + # Command for linking programs with the C library. ifndef +link +link = $(CC) -nostdlib -nostartfiles -o $@ \ $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ + $(combreloc-LDFLAGS) \ $(addprefix $(csu-objpfx),$(start-installed-name)) \ $(+preinit) $(+prector) \ $(filter-out $(addprefix $(csu-objpfx),start.o \ @@ -727,7 +737,7 @@ define preprocess-versions sed '/^[ ]*#/d;s/^[ ]*%/#/' \ | $(CC) -E -undef -I$(common-objdir) -I$(..)include \ -include $(common-objpfx)config.h \ - -x assembler-with-cpp - \ + -DASSEMBLER -x assembler-with-cpp - \ | sed '/^[ ]*#/d;/^[ ]*$$/d' endef diff -durpN glibc-2.2.4/Makefile glibc-2.2.5/Makefile --- glibc-2.2.4/Makefile Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/Makefile Tue Jan 8 13:43:50 2002 @@ -1,4 +1,4 @@ -# Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1991-1999, 2000, 2001, 2002 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 @@ -75,7 +75,7 @@ vpath %.h $(subdir-dirs) # What to install. install-others = $(inst_includedir)/gnu/stubs.h -install-bin = glibcbug +install-bin-script = glibcbug ifeq (yes,$(build-shared)) install-others += $(inst_includedir)/gnu/lib-names.h @@ -84,7 +84,7 @@ endif include Makerules ifeq ($(build-programs),yes) -others: $(addprefix $(objpfx),$(install-bin)) +others: $(addprefix $(objpfx),$(install-bin-script)) endif # Install from subdirectories too. @@ -267,7 +267,7 @@ distribute := README README.libm INSTAL mkinstalldirs move-if-change install-sh \ test-installation.pl gen-FAQ.pl versions.awk\ gen-sorted.awk abi-versions.awk \ - firstversions.awk documented.sh) + firstversions.awk documented.sh cpp) distribute := $(strip $(distribute)) generated := $(generated) stubs.h diff -durpN glibc-2.2.4/Makerules glibc-2.2.5/Makerules --- glibc-2.2.4/Makerules Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/Makerules Thu Nov 15 17:02:19 2001 @@ -317,7 +317,7 @@ COMPILE.S = \ $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@)) COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS) -# If we want to generate MD% checksums for the sources do this now. +# If we want to generate MD5 checksums for the sources do this now. ifeq ($(md5),yes) generate-md5 = ; rm -f $(@:.d=.md5); \ $(CC) -E $< $(CFLAGS) $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \ @@ -400,7 +400,7 @@ endif ifeq ($(elf),yes) define build-shlib-helper -$(LINK.o) -shared -Wl,-O1 $(sysdep-LDFLAGS) $(config-LDFLAGS) \ +$(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) $(config-LDFLAGS) \ $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \ $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \ -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \ @@ -460,7 +460,7 @@ $(LINK.o) -Wl,-G -Wl,-bM:SRE -Wl,-bnoent endef else define build-module-helper -$(LINK.o) -shared $(sysdep-LDFLAGS) $(config-LDFLAGS) \ +$(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(config-LDFLAGS) \ -B$(csu-objpfx) $(load-map-file) \ $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \ -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) @@ -720,10 +720,10 @@ force-install: # files in $(install-lib) matching `lib%.a' are ranlib'd after installation # unless they also appear in $(non-lib.a). $(install-data) are installed # as they are into $(datadir). $(headers) are installed as they are in -# $(includedir). $(install-bin) and $(install-sbin) are installed from the -# object directory into $(bindir) and $(sbindir), respectively. -# $(install-others) are absolute path names of files to install; rules to -# install them are defined elsewhere. +# $(includedir). $(install-bin), $(install-bin-script) and $(install-sbin) +# are installed from the object directory into $(bindir), $(bindir) and +# $(sbindir), respectively. $(install-others) are absolute path names of +# files to install; rules to install them are defined elsewhere. # The simple library name to install libc.a under. # This could be defined by a sysdep Makefile. @@ -762,6 +762,12 @@ $(INSTALL_PROGRAM) $< $@.new mv -f $@.new $@ endef +define do-install-script +$(make-target-directory) +$(INSTALL_SCRIPT) $< $@.new +mv -f $@.new $@ +endef + install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so)) install-lib := $(filter-out %.so %_pic.a,$(install-lib)) @@ -929,6 +935,11 @@ $(addprefix $(inst_bindir)/,$(install-bi $(inst_bindir)/%: $(objpfx)% $(+force) $(do-install-program) endif +ifdef install-bin-script +$(addprefix $(inst_bindir)/,$(install-bin-script)): \ + $(inst_bindir)/%: $(objpfx)% $(+force) + $(do-install-script) +endif ifdef install-rootsbin $(addprefix $(inst_rootsbindir)/,$(install-rootsbin)): \ $(inst_rootsbindir)/%: $(objpfx)% $(+force) @@ -964,9 +975,11 @@ $(addprefix $(inst_includedir)/,$(header $(do-install) endif # headers -.PHONY: install-bin-nosubdir install-rootsbin-nosubdir install-sbin-nosubdir \ - install-lib-nosubdir install-data-nosubdir install-headers-nosubdir +.PHONY: install-bin-nosubdir install-bin-script-nosubdir \ + install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \ + install-data-nosubdir install-headers-nosubdir install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin)) +install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script)) install-rootsbin-nosubdir: \ $(addprefix $(inst_rootsbindir)/,$(install-rootsbin)) install-sbin-nosubdir: $(addprefix $(inst_sbindir)/,$(install-sbin)) @@ -986,9 +999,9 @@ install-%:: install-%-nosubdir ; .PHONY: install install-no-libc.a-nosubdir ifeq ($(build-programs),yes) install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\ - install-bin-nosubdir install-lib-nosubdir \ - install-others-nosubdir install-rootsbin-nosubdir \ - install-sbin-nosubdir + install-bin-nosubdir install-bin-script-nosubdir \ + install-lib-nosubdir install-others-nosubdir \ + install-rootsbin-nosubdir install-sbin-nosubdir else install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\ install-lib-nosubdir install-others-nosubdir @@ -1120,7 +1133,7 @@ $(foreach var,subdir-dirs sources elided headers sysdep_headers distribute dont_distribute generated \ others tests test-srcs extra-libs $(extra-libs:%=%-routines) \ versioned \ - $(addprefix install-,lib lib.so data bin sbin others), + $(addprefix install-,lib lib.so data bin bin-script sbin others), echo >> $@.new '$(subdir)-$(var) := $($(var))' echo >> $@.new '$(var) = $$($(subdir)-$(var))') endef diff -durpN glibc-2.2.4/NEWS glibc-2.2.5/NEWS --- glibc-2.2.4/NEWS Sat Aug 11 18:28:48 2001 +++ glibc-2.2.5/NEWS Mon Jan 7 22:36:25 2002 @@ -1,4 +1,4 @@ -GNU C Library NEWS -- history of user-visible changes. 2001-7-27 +GNU C Library NEWS -- history of user-visible changes. 2001-10-31 Copyright (C) 1992-2000, 2001 Free Software Foundation, Inc. See the end for copying conditions. @@ -6,6 +6,26 @@ Please send GNU C library bug reports us . Questions and suggestions should be send to . +Version 2.2.5 + +* Stephen Moshier implemented log2, log10, powl and cbrtl for the + 128-bit long double format. + +* Masahide Washizawa contributed iconv modules for IBM1132, IBM1133, IBM1160, + IBM1161, and IBM1162 charsets. + +* Andreas Jaeger contributed a port to x86-64/Linux. + +* Peter Bruin contributed a port to PowerPC/Hurd. + +* libc functions using I/O streams now can handle wide-oriented streams + as well. + +* optimizations in the dynamic linker. binaries created by recent binutils + versions start up quicker due to reduced time spend on relocations. + +* Support for use of gcc3 added by Jakub Jelinek and HJ Lu. + Version 2.2.4 * Stephen Moshier implemented cosh, expm1, log1p, acos, sinh, tanh, @@ -1315,4 +1335,4 @@ Copyright (C) 1992-1999, 2000 Free Softw Local variables: version-control: never -end: +End: diff -durpN glibc-2.2.4/PROJECTS glibc-2.2.5/PROJECTS --- glibc-2.2.4/PROJECTS Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/PROJECTS Wed Nov 14 00:49:20 2001 @@ -37,25 +37,6 @@ contact . for the current status (of course better use a mirror of ftp.gnu.org). -[ 6] Write `long double' versions of the math functions. - - The libm is in fact fdlibm (not the same as in Linux libc 5). - -**** Partly done. But we need someone with numerical experiences for - the rest. - - -[ 7] Several math functions have to be written: - - - exp2 - - with long double arguments. - - Beside this most of the complex math functions which are new in - ISO C99 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. @@ -156,9 +137,6 @@ contact . the currently implemented methods. -[22] Done. - - [23] The `strptime' function needs to be completed. This includes among other things that it must get teached about timezones. The solution envisioned is to extract the timezones from the ADO timezone @@ -179,9 +157,6 @@ contact . Factors should be number of uses (of course), influenced by aging. Just imagine a computer used by several people. The IDs of the current user should be preferred even if the last user spent more time. - - -[26] ...done [27] We need a second test suite with tests which cannot run during a normal diff -durpN glibc-2.2.4/README glibc-2.2.5/README --- glibc-2.2.4/README Fri Jul 27 23:17:22 2001 +++ glibc-2.2.5/README Tue Jan 8 10:27:14 2002 @@ -1,4 +1,4 @@ -This directory contains the version 2.2.4 release of the GNU C Library. +This directory contains the version 2.2.5 release of the GNU C Library. Many bugs have been fixed since the last release. Some bugs surely remain. diff -durpN glibc-2.2.4/Rules glibc-2.2.5/Rules --- glibc-2.2.4/Rules Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/Rules Wed Aug 29 15:44:35 2001 @@ -41,7 +41,8 @@ all: objs lib others ifeq ($(build-programs),yes) others: $(addprefix $(objpfx),$(extra-objs) \ - $(install-lib) $(install-bin) \ + $(install-lib) \ + $(install-bin) $(install-bin-script) \ $(install-rootsbin) $(install-sbin)) else others: $(addprefix $(objpfx),$(extra-objs) \ diff -durpN glibc-2.2.4/Versions.def glibc-2.2.5/Versions.def --- glibc-2.2.4/Versions.def Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/Versions.def Thu Dec 6 00:08:59 2001 @@ -13,9 +13,13 @@ libc { GLIBC_2.2.2 GLIBC_2.2.3 GLIBC_2.2.4 + GLIBC_2.2.5 %ifdef USE_IN_LIBIO HURD_CTHREADS_0.3 %endif +%ifdef EXPORT_UNWIND_FIND_FDE + GCC_3.0 +%endif } libcrypt { GLIBC_2.0 @@ -69,6 +73,7 @@ libpthread { GLIBC_2.1.1 GLIBC_2.1.2 GLIBC_2.2 + GLIBC_2.2.3 } libresolv { GLIBC_2.0 @@ -95,6 +100,7 @@ ld { } libthread_db { GLIBC_2.1.3 + GLIBC_2.2.3 } libanl { GLIBC_2.2.3 diff -durpN glibc-2.2.4/argp/argp-fmtstream.c glibc-2.2.5/argp/argp-fmtstream.c --- glibc-2.2.4/argp/argp-fmtstream.c Mon Jul 23 10:53:36 2001 +++ glibc-2.2.5/argp/argp-fmtstream.c Thu Aug 16 23:41:52 2001 @@ -1,5 +1,5 @@ /* Word-wrapping and line-truncating streams - Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -41,6 +41,7 @@ #endif #if defined _LIBC && defined USE_IN_LIBIO +# include # include # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) #endif @@ -58,8 +59,10 @@ argp_fmtstream_t __argp_make_fmtstream (FILE *stream, size_t lmargin, size_t rmargin, ssize_t wmargin) { - argp_fmtstream_t fs = malloc (sizeof (struct argp_fmtstream)); - if (fs) + argp_fmtstream_t fs; + + fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream)); + if (fs != NULL) { fs->stream = stream; @@ -69,7 +72,7 @@ __argp_make_fmtstream (FILE *stream, fs->point_col = 0; fs->point_offs = 0; - fs->buf = malloc (INIT_BUF_SIZE); + fs->buf = (char *) malloc (INIT_BUF_SIZE); if (! fs->buf) { free (fs); @@ -94,7 +97,14 @@ __argp_fmtstream_free (argp_fmtstream_t { __argp_fmtstream_update (fs); if (fs->p > fs->buf) - fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream); + { +#ifdef USE_IN_LIBIO + if (_IO_fwide (fs->stream, 0) > 0) + __fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf); + else +#endif + fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream); + } free (fs->buf); free (fs); } @@ -134,7 +144,14 @@ __argp_fmtstream_update (argp_fmtstream_ /* No buffer space for spaces. Must flush. */ size_t i; for (i = 0; i < pad; i++) - putc_unlocked (' ', fs->stream); + { +#ifdef USE_IN_LIBIO + if (_IO_fwide (fs->stream, 0) > 0) + putwc_unlocked (L' ', fs->stream); + else +#endif + putc_unlocked (' ', fs->stream); + } } fs->point_col = pad; } @@ -267,9 +284,17 @@ __argp_fmtstream_update (argp_fmtstream_ else /* Output the first line so we can use the space. */ { - if (nl > fs->buf) - fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream); - putc_unlocked ('\n', fs->stream); +#ifdef USE_IN_LIBIO + if (_IO_fwide (fs->stream, 0) > 0) + __fwprintf (fs->stream, L"%.*s\n", + (int) (nl - fs->buf), fs->buf); + else +#endif + { + if (nl > fs->buf) + fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream); + putc_unlocked ('\n', fs->stream); + } len += buf - fs->buf; nl = buf = fs->buf; } @@ -286,7 +311,12 @@ __argp_fmtstream_update (argp_fmtstream_ *nl++ = ' '; else for (i = 0; i < fs->wmargin; ++i) - putc_unlocked (' ', fs->stream); +#ifdef USE_IN_LIBIO + if (_IO_fwide (fs->stream, 0) > 0) + putwc_unlocked (L' ', fs->stream); + else +#endif + putc_unlocked (' ', fs->stream); /* Copy the tail of the original buffer into the current buffer position. */ @@ -323,7 +353,15 @@ __argp_fmtstream_ensure (struct argp_fmt /* Flush FS's buffer. */ __argp_fmtstream_update (fs); - wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream); +#ifdef USE_IN_LIBIO + if (_IO_fwide (fs->stream, 0) > 0) + { + __fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf); + wrote = fs->p - fs->buf; + } + else +#endif + wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream); if (wrote == fs->p - fs->buf) { fs->p = fs->buf; diff -durpN glibc-2.2.4/argp/argp-help.c glibc-2.2.5/argp/argp-help.c --- glibc-2.2.4/argp/argp-help.c Mon Jul 23 10:53:36 2001 +++ glibc-2.2.5/argp/argp-help.c Mon Aug 20 12:55:03 2001 @@ -1,5 +1,5 @@ /* Hierarchial argument parsing help output - Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc. + Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . @@ -52,6 +52,9 @@ char *alloca (); #include #include #include +#ifdef USE_IN_LIBIO +# include +#endif #ifndef _ /* This is for other GNU distributions with internationalized messages. */ @@ -1702,19 +1705,39 @@ __argp_error (const struct argp_state *s __flockfile (stream); - fputs_unlocked (state ? state->name : program_invocation_short_name, - stream); - putc_unlocked (':', stream); - putc_unlocked (' ', stream); - va_start (ap, fmt); - vfprintf (stream, fmt, ap); - va_end (ap); - putc_unlocked ('\n', stream); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stream, 0) > 0) + { + char *buf; + + __asprintf (&buf, fmt, ap); + + __fwprintf (stream, L"%s: %s\n", + state ? state->name : program_invocation_short_name, + buf); + + free (buf); + } + else +#endif + { + fputs_unlocked (state + ? state->name : program_invocation_short_name, + stream); + putc_unlocked (':', stream); + putc_unlocked (' ', stream); + + vfprintf (stream, fmt, ap); + + putc_unlocked ('\n', stream); + } __argp_state_help (state, stream, ARGP_HELP_STD_ERR); + va_end (ap); + __funlockfile (stream); } } @@ -1743,29 +1766,67 @@ __argp_failure (const struct argp_state { __flockfile (stream); - fputs_unlocked (state ? state->name : program_invocation_short_name, - stream); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stream, 0) > 0) + __fwprintf (stream, L"%s", + state ? state->name : program_invocation_short_name); + else +#endif + fputs_unlocked (state + ? state->name : program_invocation_short_name, + stream); if (fmt) { va_list ap; - putc_unlocked (':', stream); - putc_unlocked (' ', stream); - va_start (ap, fmt); - vfprintf (stream, fmt, ap); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stream, 0) > 0) + { + char *buf; + + __asprintf (&buf, fmt, ap); + + __fwprintf (stream, L": %s", buf); + + free (buf); + } + else +#endif + { + putc_unlocked (':', stream); + putc_unlocked (' ', stream); + + vfprintf (stream, fmt, ap); + } + va_end (ap); } if (errnum) { - putc_unlocked (':', stream); - putc_unlocked (' ', stream); - fputs (strerror (errnum), stream); + char buf[200]; + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stream, 0) > 0) + __fwprintf (stream, L": %s", + __strerror_r (errnum, buf, sizeof (buf))); + else +#endif + { + putc_unlocked (':', stream); + putc_unlocked (' ', stream); + fputs (__strerror_r (errnum, buf, sizeof (buf)), stream); + } } - putc_unlocked ('\n', stream); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stream, 0) > 0) + putwc_unlocked (L'\n', stream); + else +#endif + putc_unlocked ('\n', stream); __funlockfile (stream); diff -durpN glibc-2.2.4/assert/assert-perr.c glibc-2.2.5/assert/assert-perr.c --- glibc-2.2.4/assert/assert-perr.c Sat Aug 11 18:28:48 2001 +++ glibc-2.2.5/assert/assert-perr.c Thu Aug 16 21:47:59 2001 @@ -17,16 +17,17 @@ 02111-1307 USA. */ #include +#include #include #include #include #include -#include extern const char *__progname; #ifdef USE_IN_LIBIO +# include # include # define fflush(s) _IO_fflush (s) #endif @@ -46,17 +47,31 @@ __assert_perror_fail (int errnum, const char *function) { char errbuf[1024]; + char *buf; + #ifdef FATAL_PREPARE FATAL_PREPARE; #endif + (void) __asprintf (&buf, _("%s%s%s:%u: %s%sUnexpected error: %s.\n"), + __progname, __progname[0] ? ": " : "", + file, line, + function ? function : "", function ? ": " : "", + __strerror_r (errnum, errbuf, sizeof errbuf)); + /* Print the message. */ - (void) fprintf (stderr, _("%s%s%s:%u: %s%sUnexpected error: %s.\n"), - __progname, __progname[0] ? ": " : "", - file, line, - function ? function : "", function ? ": " : "", - __strerror_r (errnum, errbuf, sizeof errbuf)); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", buf); + else +#endif + (void) fputs (buf, stderr); + (void) fflush (stderr); + + /* We have to free the buffer since the appplication might catch the + SIGABRT. */ + free (buf); abort (); } diff -durpN glibc-2.2.4/assert/assert.c glibc-2.2.5/assert/assert.c --- glibc-2.2.4/assert/assert.c Sat Aug 11 18:28:48 2001 +++ glibc-2.2.5/assert/assert.c Thu Aug 16 21:47:59 2001 @@ -17,15 +17,16 @@ 02111-1307 USA. */ #include +#include #include #include #include -#include extern const char *__progname; #ifdef USE_IN_LIBIO +# include # include # define fflush(s) _IO_fflush (s) #endif @@ -44,17 +45,31 @@ void __assert_fail (const char *assertion, const char *file, unsigned int line, const char *function) { + char *buf; + #ifdef FATAL_PREPARE FATAL_PREPARE; #endif + (void) __asprintf (&buf, _("%s%s%s:%u: %s%sAssertion `%s' failed.\n"), + __progname, __progname[0] ? ": " : "", + file, line, + function ? function : "", function ? ": " : "", + assertion); + /* Print the message. */ - (void) fprintf (stderr, _("%s%s%s:%u: %s%sAssertion `%s' failed.\n"), - __progname, __progname[0] ? ": " : "", - file, line, - function ? function : "", function ? ": " : "", - assertion); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", buf); + else +#endif + (void) fputs (buf, stderr); + (void) fflush (stderr); + + /* We have to free the buffer since the appplication might catch the + SIGABRT. */ + free (buf); abort (); } diff -durpN glibc-2.2.4/catgets/gencat.c glibc-2.2.5/catgets/gencat.c --- glibc-2.2.4/catgets/gencat.c Fri Aug 10 12:11:47 2001 +++ glibc-2.2.5/catgets/gencat.c Sun Jan 20 19:20:30 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -247,7 +247,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -durpN glibc-2.2.4/config.h.in glibc-2.2.5/config.h.in --- glibc-2.2.4/config.h.in Sat Aug 11 18:28:48 2001 +++ glibc-2.2.5/config.h.in Thu Nov 15 17:02:56 2001 @@ -1,3 +1,7 @@ +#if !defined ASSEMBLER && !defined _ISOMAC && !defined __OPTIMIZE__ +# error "glibc cannot be compiled without optimization" +#endif + /* Define if using GNU ld, with support for weak symbols in a.out, and for symbol set and warning messages extensions in a.out and ELF. This implies HAVE_WEAK_SYMBOLS; set by --with-gnu-ld. */ @@ -44,6 +48,9 @@ /* Define a symbol_name as a global .symbol_name for ld. */ #undef HAVE_ASM_GLOBAL_DOT_NAME +/* Define if _Unwind_Find_FDE should be exported from glibc. */ +#undef EXPORT_UNWIND_FIND_FDE + /* Define to use GNU libio instead of GNU stdio. This is defined by configure under --enable-libio. */ #undef USE_IN_LIBIO @@ -85,6 +92,9 @@ /* Defined on PowerPC if the GCC being used has a problem with clobbering certain registers (CR0, MQ, CTR, LR) in asm statements. */ #undef BROKEN_PPC_ASM_CR0 + +/* Define if the linker supports the -z combreloc option. */ +#undef HAVE_Z_COMBRELOC /* Defined to some form of __attribute__ ((...)) if the compiler supports diff -durpN glibc-2.2.4/config.make.in glibc-2.2.5/config.make.in --- glibc-2.2.4/config.make.in Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/config.make.in Thu Nov 15 17:03:15 2001 @@ -1,5 +1,5 @@ # @configure_input@ -# From $Id: config.make.in,v 1.78 2001/07/09 11:51:53 aj Exp $. +# From $Id: config.make.in,v 1.81 2001/11/16 01:03:15 drepper Exp $. # Don't edit this file. Put configuration parameters in configparms instead. version = @VERSION@ @@ -40,11 +40,15 @@ have-protected = @libc_cv_asm_protected_ have-z-nodelete = @libc_cv_z_nodelete@ have-z-nodlopen = @libc_cv_z_nodlopen@ have-z-initfirst = @libc_cv_z_initfirst@ +have-z-combreloc = @libc_cv_z_combreloc@ have-initfini = @libc_cv_have_initfini@ have-Bgroup = @libc_cv_Bgroup@ need-nopic-initfini = @nopic_initfini@ with-cvs = @with_cvs@ old-glibc-headers = @old_glibc_headers@ +unwind-find-fde = @libc_cv_gcc_unwind_find_fde@ + +static-libgcc = @libc_cv_gcc_static_libgcc@ versioning = @VERSIONING@ oldest-abi = @oldest_abi@ @@ -87,6 +91,7 @@ BISON = @BISON@ # Installation tools. INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_INFO = @INSTALL_INFO@ OLD_DEBIAN_INSTALL_INFO = @OLD_DEBIAN_INSTALL_INFO@ diff -durpN glibc-2.2.4/configure glibc-2.2.5/configure --- glibc-2.2.4/configure Fri Aug 10 19:12:11 2001 +++ glibc-2.2.5/configure Tue Jan 8 14:16:44 2002 @@ -682,6 +682,7 @@ else with_fp=yes fi + # Check whether --with-binutils or --without-binutils was given. if test "${with_binutils+set}" = set; then withval="$with_binutils" @@ -910,7 +911,7 @@ else { echo "configure: error: can not r fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:914: checking host system type" >&5 +echo "configure:915: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -970,7 +971,7 @@ gnu* | linux* | sysv4* | solaris2* | iri aix*) # These systems are always xcoff xcoff=yes - elf=no + elf=no ;; esac @@ -1061,7 +1062,7 @@ fi # This can take a while to compute. sysdep_dir=$srcdir/sysdeps echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6 -echo "configure:1065: checking sysdep dirs" >&5 +echo "configure:1066: 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'`" @@ -1284,7 +1285,7 @@ echo "$ac_t""$default_sysnames" 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:1288: checking for a BSD compatible install" >&5 +echo "configure:1289: 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 @@ -1341,7 +1342,7 @@ if test "$INSTALL" = "${srcdir}/scripts/ INSTALL='\$(..)./scripts/install-sh -c' fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1345: checking whether ln -s works" >&5 +echo "configure:1346: 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 @@ -1370,7 +1371,7 @@ fi # Extract the first word of "pwd", so it can be a program name with args. set dummy pwd; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1374: checking for $ac_word" >&5 +echo "configure:1375: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PWD_P'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1409,7 +1410,7 @@ fi # These programs are version sensitive. echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1413: checking build system type" >&5 +echo "configure:1414: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1437,7 +1438,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:1441: checking for $ac_word" >&5 +echo "configure:1442: 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 @@ -1471,7 +1472,7 @@ if test -z "$CC"; then else # Found it, now check the version. echo $ac_n "checking version of $CC""... $ac_c" 1>&6 -echo "configure:1475: checking version of $CC" >&5 +echo "configure:1476: checking version of $CC" >&5 ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -1491,7 +1492,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:1495: checking for $ac_word" >&5 +echo "configure:1496: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1525,7 +1526,7 @@ if test -z "$MAKE"; then else # Found it, now check the version. echo $ac_n "checking version of $MAKE""... $ac_c" 1>&6 -echo "configure:1529: checking version of $MAKE" >&5 +echo "configure:1530: checking version of $MAKE" >&5 ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -1554,7 +1555,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:1558: checking for $ac_word" >&5 +echo "configure:1559: 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 @@ -1588,7 +1589,7 @@ if test -z "$MSGFMT"; then else # Found it, now check the version. echo $ac_n "checking version of $MSGFMT""... $ac_c" 1>&6 -echo "configure:1592: checking version of $MSGFMT" >&5 +echo "configure:1593: checking version of $MSGFMT" >&5 ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -1608,7 +1609,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:1612: checking for $ac_word" >&5 +echo "configure:1613: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1642,7 +1643,7 @@ if test -z "$MAKEINFO"; then else # Found it, now check the version. echo $ac_n "checking version of $MAKEINFO""... $ac_c" 1>&6 -echo "configure:1646: checking version of $MAKEINFO" >&5 +echo "configure:1647: checking version of $MAKEINFO" >&5 ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -1662,7 +1663,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:1666: checking for $ac_word" >&5 +echo "configure:1667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1696,7 +1697,7 @@ if test -z "$SED"; then else # Found it, now check the version. echo $ac_n "checking version of $SED""... $ac_c" 1>&6 -echo "configure:1700: checking version of $SED" >&5 +echo "configure:1701: checking version of $SED" >&5 ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; @@ -1714,7 +1715,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1718: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1728,12 +1729,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1732 "configure" +#line 1733 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -1764,7 +1765,7 @@ 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:1768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1776,7 +1777,7 @@ 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:1780: checking whether we are using GNU C" >&5 +echo "configure:1781: 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 @@ -1785,7 +1786,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1790: \"$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 @@ -1798,7 +1799,7 @@ if test $ac_cv_prog_gcc != yes; then fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1802: checking build system type" >&5 +echo "configure:1803: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1821,7 +1822,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:1825: checking for $ac_word" >&5 +echo "configure:1826: 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 @@ -1853,7 +1854,7 @@ done fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1857: checking how to run the C preprocessor" >&5 +echo "configure:1858: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1868,13 +1869,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1885,13 +1886,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1902,13 +1903,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1951,7 +1952,7 @@ if test $RANLIB = ranlib; then # 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:1955: checking for $ac_word" >&5 +echo "configure:1956: 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 @@ -1983,7 +1984,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:1987: checking for $ac_word" >&5 +echo "configure:1988: 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 @@ -2020,7 +2021,7 @@ fi # Determine whether we are using GNU binutils. echo $ac_n "checking whether $AS is GNU as""... $ac_c" 1>&6 -echo "configure:2024: checking whether $AS is GNU as" >&5 +echo "configure:2025: checking whether $AS is GNU as" >&5 if eval "test \"`echo '$''{'libc_cv_prog_as_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2039,7 +2040,7 @@ rm -f a.out gnu_as=$libc_cv_prog_as_gnu echo $ac_n "checking whether $LD is GNU ld""... $ac_c" 1>&6 -echo "configure:2043: checking whether $LD is GNU ld" >&5 +echo "configure:2044: checking whether $LD is GNU ld" >&5 if eval "test \"`echo '$''{'libc_cv_prog_ld_gnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2059,7 +2060,7 @@ gnu_ld=$libc_cv_prog_ld_gnu # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. set dummy ${ac_tool_prefix}mig; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2063: checking for $ac_word" >&5 +echo "configure:2064: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2105,27 +2106,6 @@ test -n "$aux_missing" && echo "configur CCVERSION=`$CC -v 2>&1 | sed -n 's/gcc version //p'` -case $CCVERSION in - 3.*) gcc3=yes;; -esac - -if test x"$gcc3" = xyes; then - echo "\ -*** This version of GNU libc cannot be compiled by GCC 3.x. -*** GCC 3.x will generate a library that is binary incompatible to -*** older and future releases of GNU libc. -*** You should compile this GNU libc release by an older GCC version -*** or wait for the next GNU libc release." - if test $enable_sanity = yes; then - echo "\ -*** If you really mean to use GCC 3.x, run configure again -*** using the extra parameter \`--disable-sanity-checks'." - exit 1 - else - echo "\ -*** This configuration is not supported by the GNU libc developers." - fi -fi # if using special system headers, find out the compiler's sekrit # header directory and add that to the list. NOTE: Only does the right # thing on a system that doesn't need fixincludes. (Not presently a problem.) @@ -2137,7 +2117,7 @@ fi # check if ranlib is necessary echo $ac_n "checking whether ranlib is necessary""... $ac_c" 1>&6 -echo "configure:2141: checking whether ranlib is necessary" >&5 +echo "configure:2121: checking whether ranlib is necessary" >&5 if eval "test \"`echo '$''{'libc_cv_ranlib_necessary'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2171,7 +2151,7 @@ fi # - two terminals occur directly after each other # - the path contains an element with a dot in it echo $ac_n "checking LD_LIBRARY_PATH variable""... $ac_c" 1>&6 -echo "configure:2175: checking LD_LIBRARY_PATH variable" >&5 +echo "configure:2155: checking LD_LIBRARY_PATH variable" >&5 case ${LD_LIBRARY_PATH} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) ld_library_path_setting="contains current directory" @@ -2188,10 +2168,25 @@ if test "$ld_library_path_setting" != "o *** and run configure again." 1>&2; exit 1; } fi +echo $ac_n "checking whether GCC supports -static-libgcc""... $ac_c" 1>&6 +echo "configure:2173: checking whether GCC supports -static-libgcc" >&5 +if eval "test \"`echo '$''{'libc_cv_gcc_static_libgcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if $CC -v -static-libgcc 2>&1 | grep -q 'unrecognized option.*static-libgcc'; then + libc_cv_gcc_static_libgcc= +else + libc_cv_gcc_static_libgcc=-static-libgcc +fi +fi + +echo "$ac_t""$libc_cv_gcc_static_libgcc" 1>&6 + + # 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:2195: checking for $ac_word" >&5 +echo "configure:2190: 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 @@ -2237,7 +2232,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:2241: checking for $ac_word" >&5 +echo "configure:2236: 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 @@ -2287,7 +2282,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:2291: checking for $ac_word" >&5 +echo "configure:2286: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2319,7 +2314,7 @@ done # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2323: checking for $ac_word" >&5 +echo "configure:2318: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2359,7 +2354,7 @@ fi # Extract the first word of "install-info", so it can be a program name with args. set dummy install-info; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2363: checking for $ac_word" >&5 +echo "configure:2358: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_INSTALL_INFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2394,7 +2389,7 @@ fi if test "$INSTALL_INFO" != "no"; then echo $ac_n "checking for old Debian install-info""... $ac_c" 1>&6 -echo "configure:2398: checking for old Debian install-info" >&5 +echo "configure:2393: checking for old Debian install-info" >&5 if eval "test \"`echo '$''{'libc_cv_old_debian_install_info'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2429,7 +2424,7 @@ fi # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2433: checking for $ac_word" >&5 +echo "configure:2428: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2464,7 +2459,7 @@ fi echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6 -echo "configure:2468: checking for signed size_t type" >&5 +echo "configure:2463: 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 @@ -2488,12 +2483,12 @@ EOF fi echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6 -echo "configure:2492: checking for libc-friendly stddef.h" >&5 +echo "configure:2487: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -2527,7 +2522,7 @@ override stddef.h = # The installed &6 -echo "configure:2531: checking whether we need to use -P to assemble .S files" >&5 +echo "configure:2526: 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 @@ -2550,7 +2545,7 @@ asm-CPPFLAGS = -P # The assembler can't fi echo $ac_n "checking whether .text pseudo-op must be used""... $ac_c" 1>&6 -echo "configure:2554: checking whether .text pseudo-op must be used" >&5 +echo "configure:2549: checking whether .text pseudo-op must be used" >&5 if eval "test \"`echo '$''{'libc_cv_dot_text'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2571,7 +2566,7 @@ else fi echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6 -echo "configure:2575: checking for assembler global-symbol directive" >&5 +echo "configure:2570: 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 @@ -2601,7 +2596,7 @@ EOF fi echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6 -echo "configure:2605: checking for .set assembler directive" >&5 +echo "configure:2600: 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 @@ -2644,7 +2639,7 @@ EOF esac echo $ac_n "checking for .symver assembler directive""... $ac_c" 1>&6 -echo "configure:2648: checking for .symver assembler directive" >&5 +echo "configure:2643: checking for .symver assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_symver_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2663,7 +2658,7 @@ fi echo "$ac_t""$libc_cv_asm_symver_directive" 1>&6 echo $ac_n "checking for ld --version-script""... $ac_c" 1>&6 -echo "configure:2667: checking for ld --version-script" >&5 +echo "configure:2662: checking for ld --version-script" >&5 if eval "test \"`echo '$''{'libc_cv_ld_version_script_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2686,7 +2681,7 @@ EOF if { ac_try='${CC-cc} $CFLAGS -shared -o conftest.so conftest.o -nostartfiles -nostdlib -Wl,--version-script,conftest.map - 1>&5'; { (eval echo configure:2690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; + 1>&5'; { (eval echo configure:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_ld_version_script_option=yes else @@ -2725,7 +2720,7 @@ if test $elf = yes && test $shared != no fi if test $elf = yes; then echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6 -echo "configure:2729: checking for .previous assembler directive" >&5 +echo "configure:2724: 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 @@ -2733,7 +2728,7 @@ else .section foo_section .previous EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_previous_directive=yes else libc_cv_asm_previous_directive=no @@ -2749,7 +2744,7 @@ EOF else echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6 -echo "configure:2753: checking for .popsection assembler directive" >&5 +echo "configure:2748: 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 @@ -2757,7 +2752,7 @@ else .pushsection foo_section .popsection EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_popsection_directive=yes else libc_cv_asm_popsection_directive=no @@ -2774,7 +2769,7 @@ EOF fi fi echo $ac_n "checking for .protected and .hidden assembler directive""... $ac_c" 1>&6 -echo "configure:2778: checking for .protected and .hidden assembler directive" >&5 +echo "configure:2773: checking for .protected and .hidden assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_protected_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2784,7 +2779,7 @@ foo: .hidden bar bar: EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:2783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_protected_directive=yes else libc_cv_asm_protected_directive=no @@ -2796,14 +2791,16 @@ echo "$ac_t""$libc_cv_asm_protected_dire echo $ac_n "checking for -z nodelete option""... $ac_c" 1>&6 -echo "configure:2800: checking for -z nodelete option" >&5 +echo "configure:2795: checking for -z nodelete option" >&5 if eval "test \"`echo '$''{'libc_cv_z_nodelete'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + if { ac_try='${CC-cc} -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,--enable-new-dtags,-z,nodelete 1>&5'; { (eval echo configure:2804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_z_nodelete=yes else @@ -2816,14 +2813,16 @@ echo "$ac_t""$libc_cv_z_nodelete" 1>&6 echo $ac_n "checking for -z nodlopen option""... $ac_c" 1>&6 -echo "configure:2820: checking for -z nodlopen option" >&5 +echo "configure:2817: checking for -z nodlopen option" >&5 if eval "test \"`echo '$''{'libc_cv_z_nodlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + if { ac_try='${CC-cc} -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,--enable-new-dtags,-z,nodlopen 1>&5'; { (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_z_nodlopen=yes else @@ -2836,14 +2835,16 @@ echo "$ac_t""$libc_cv_z_nodlopen" 1>&6 echo $ac_n "checking for -z initfirst option""... $ac_c" 1>&6 -echo "configure:2840: checking for -z initfirst option" >&5 +echo "configure:2839: checking for -z initfirst option" >&5 if eval "test \"`echo '$''{'libc_cv_z_initfirst'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + if { ac_try='${CC-cc} -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,--enable-new-dtags,-z,initfirst 1>&5'; { (eval echo configure:2848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_z_initfirst=yes else @@ -2856,14 +2857,14 @@ echo "$ac_t""$libc_cv_z_initfirst" 1>&6 echo $ac_n "checking for -Bgroup option""... $ac_c" 1>&6 -echo "configure:2860: checking for -Bgroup option" >&5 +echo "configure:2861: checking for -Bgroup option" >&5 if eval "test \"`echo '$''{'libc_cv_Bgroup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + if { ac_try='${CC-cc} -shared -o conftest.so conftest.c -Wl,-Bgroup -nostdlib 1>&5'; { (eval echo configure:2868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } then libc_cv_Bgroup=yes else @@ -2874,16 +2875,49 @@ fi echo "$ac_t""$libc_cv_Bgroup" 1>&6 + + echo $ac_n "checking for -z combreloc""... $ac_c" 1>&6 +echo "configure:2881: checking for -z combreloc" >&5 +if eval "test \"`echo '$''{'libc_cv_z_combreloc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } + then + if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no + fi + else + libc_cv_z_combreloc=no + fi + rm -f conftest* +fi + +echo "$ac_t""$libc_cv_z_combreloc" 1>&6 + if test "$libc_cv_z_combreloc" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_Z_COMBRELOC 1 +EOF + + fi fi + if test $elf != yes; then echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6 -echo "configure:2882: checking for .init and .fini sections" >&5 +echo "configure:2916: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -2915,7 +2949,7 @@ fi if test $elf = yes -a $gnu_ld = yes; then echo $ac_n "checking whether cc puts quotes around section names""... $ac_c" 1>&6 -echo "configure:2919: checking whether cc puts quotes around section names" >&5 +echo "configure:2953: checking whether cc puts quotes around section names" >&5 if eval "test \"`echo '$''{'libc_cv_have_section_quotes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2952,19 +2986,19 @@ if test $elf = yes; then else 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:2956: checking for _ prefix on C symbol names" >&5 +echo "configure:2990: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -2979,17 +3013,17 @@ 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:2983: checking for _ prefix on C symbol names" >&5 +echo "configure:3017: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3027: \"$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 @@ -3021,7 +3055,7 @@ if test $elf = yes; then fi echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6 -echo "configure:3025: checking for assembler .weak directive" >&5 +echo "configure:3059: 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 @@ -3044,7 +3078,7 @@ echo "$ac_t""$libc_cv_asm_weak_directive if test $libc_cv_asm_weak_directive = no; then echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6 -echo "configure:3048: checking for assembler .weakext directive" >&5 +echo "configure:3082: 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 @@ -3091,14 +3125,14 @@ EOF ;; hppa*linux*) echo $ac_n "checking for assembler line separator""... $ac_c" 1>&6 -echo "configure:3095: checking for assembler line separator" >&5 +echo "configure:3129: checking for assembler line separator" >&5 if eval "test \"`echo '$''{'libc_cv_asm_line_sep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.s <&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:3136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_asm_line_sep='!' else if test -z "$enable_hacker_mode"; then @@ -3120,7 +3154,7 @@ EOF esac echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6 -echo "configure:3124: checking for ld --no-whole-archive" >&5 +echo "configure:3158: 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 @@ -3131,7 +3165,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest conftest.c 1>&5'; { (eval echo configure:3135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:3169: \"$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 @@ -3145,7 +3179,7 @@ if test $libc_cv_ld_no_whole_archive = y fi echo $ac_n "checking for gcc -fexceptions""... $ac_c" 1>&6 -echo "configure:3149: checking for gcc -fexceptions" >&5 +echo "configure:3183: checking for gcc -fexceptions" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_exceptions'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3156,7 +3190,7 @@ __throw () {} EOF if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles -fexceptions - -o conftest conftest.c 1>&5'; { (eval echo configure:3160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c 1>&5'; { (eval echo configure:3194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_exceptions=yes else libc_cv_gcc_exceptions=no @@ -3171,14 +3205,14 @@ fi if test "$base_machine" = alpha ; then echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6 -echo "configure:3175: checking for function ..ng prefix" >&5 +echo "configure:3209: 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:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; +if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:3216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_alpha_ng_prefix=yes else @@ -3205,19 +3239,19 @@ if test "$host_cpu" = powerpc ; then # Check for a bug present in at least versions 2.8.x of GCC # and versions 1.0.x of EGCS. echo $ac_n "checking whether clobbering cr0 causes problems""... $ac_c" 1>&6 -echo "configure:3209: checking whether clobbering cr0 causes problems" >&5 +echo "configure:3243: checking whether clobbering cr0 causes problems" >&5 if eval "test \"`echo '$''{'libc_cv_c_asmcr0_bug'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_c_asmcr0_bug='no' else @@ -3239,12 +3273,12 @@ fi fi echo $ac_n "checking for DWARF2 unwind info support""... $ac_c" 1>&6 -echo "configure:3243: checking for DWARF2 unwind info support" >&5 +echo "configure:3277: checking for DWARF2 unwind info support" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_dwarf2_unwind_info'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=static else libc_cv_gcc_dwarf2_unwind_info=no @@ -3279,7 +3313,7 @@ fi if test $libc_cv_gcc_dwarf2_unwind_info = no; then if { ac_try='${CC-cc} $CFLAGS -DCHECK__register_frame -nostdlib -nostartfiles - -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_dwarf2_unwind_info=yes else libc_cv_gcc_dwarf2_unwind_info=no @@ -3309,12 +3343,12 @@ EOF esac echo $ac_n "checking for __builtin_expect""... $ac_c" 1>&6 -echo "configure:3313: checking for __builtin_expect" >&5 +echo "configure:3347: checking for __builtin_expect" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_builtin_expect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_builtin_expect=yes else libc_cv_gcc_builtin_expect=no @@ -3339,12 +3373,12 @@ EOF fi echo $ac_n "checking for local label subtraction""... $ac_c" 1>&6 -echo "configure:3343: checking for local label subtraction" >&5 +echo "configure:3377: checking for local label subtraction" >&5 if eval "test \"`echo '$''{'libc_cv_gcc_subtract_local_labels'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; }; then + -o conftest conftest.c -lgcc >&5'; { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then libc_cv_gcc_subtract_local_labels=yes else libc_cv_gcc_subtract_local_labels=no @@ -3374,7 +3408,7 @@ EOF fi echo $ac_n "checking for libgd""... $ac_c" 1>&6 -echo "configure:3378: checking for libgd" >&5 +echo "configure:3412: checking for libgd" >&5 if test "$with_gd" != "no"; then old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $libgd_include" @@ -3383,14 +3417,14 @@ if test "$with_gd" != "no"; then old_LIBS="$LIBS" LIBS="$LIBS -lgd -lpng -lz -lm" cat > conftest.$ac_ext < int main() { gdImagePng (0, 0) ; return 0; } EOF -if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBGD=yes else @@ -3410,7 +3444,7 @@ echo "$ac_t""$LIBGD" 1>&6 echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:3414: checking size of long double" >&5 +echo "configure:3448: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3418,7 +3452,7 @@ else ac_cv_sizeof_long_double=0 else cat > conftest.$ac_ext < main() @@ -3429,7 +3463,7 @@ main() exit(0); } EOF -if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else @@ -3462,6 +3496,7 @@ libc_link_sources= use_ldconfig=no ldd_rewrite_script=no libc_cv_sysconfdir=$sysconfdir +libc_cv_gcc_unwind_find_fde=no # Iterate over all the sysdep directories we will use, running their # configure fragments, and looking for a uname implementation. @@ -3486,6 +3521,14 @@ for dir in $sysnames; do fi done +if test x$libc_cv_gcc_unwind_find_fde = xyes; then + cat >> confdefs.h <<\EOF +#define EXPORT_UNWIND_FIND_FDE 1 +EOF + +fi + + # If we will use the generic uname implementation, we must figure out what @@ -3498,7 +3541,7 @@ if test "$uname" = "sysdeps/generic"; th fi echo $ac_n "checking OS release for uname""... $ac_c" 1>&6 -echo "configure:3502: checking OS release for uname" >&5 +echo "configure:3545: 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 @@ -3520,7 +3563,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>& uname_release="$libc_cv_uname_release" echo $ac_n "checking OS version for uname""... $ac_c" 1>&6 -echo "configure:3524: checking OS version for uname" >&5 +echo "configure:3567: 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 @@ -3542,7 +3585,7 @@ else fi echo $ac_n "checking stdio selection""... $ac_c" 1>&6 -echo "configure:3546: checking stdio selection" >&5 +echo "configure:3589: checking stdio selection" >&5 case $stdio in libio) cat >> confdefs.h <<\EOF @@ -3556,7 +3599,7 @@ echo "$ac_t""$stdio" 1>&6 # Test for old glibc 2.0.x headers so that they can be removed properly # Search only in includedir. echo $ac_n "checking for old glibc 2.0.x headers""... $ac_c" 1>&6 -echo "configure:3560: checking for old glibc 2.0.x headers" >&5 +echo "configure:3603: checking for old glibc 2.0.x headers" >&5 if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h" then old_glibc_headers=yes @@ -3617,7 +3660,7 @@ if test $shared = default; then fi echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6 -echo "configure:3621: checking whether -fPIC is default" >&5 +echo "configure:3664: checking whether -fPIC is default" >&5 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3794,6 +3837,7 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g +s%@with_fp@%$with_fp%g s%@with_cvs@%$with_cvs%g s%@oldest_abi@%$oldest_abi%g s%@subdirs@%$subdirs%g @@ -3830,6 +3874,7 @@ s%@RANLIB@%$RANLIB%g s%@MIG@%$MIG%g s%@CCVERSION@%$CCVERSION%g s%@SYSINCLUDES@%$SYSINCLUDES%g +s%@libc_cv_gcc_static_libgcc@%$libc_cv_gcc_static_libgcc%g s%@BASH@%$BASH%g s%@libc_cv_have_bash2@%$libc_cv_have_bash2%g s%@KSH@%$KSH%g @@ -3845,11 +3890,13 @@ s%@libc_cv_z_nodelete@%$libc_cv_z_nodele s%@libc_cv_z_nodlopen@%$libc_cv_z_nodlopen%g s%@libc_cv_z_initfirst@%$libc_cv_z_initfirst%g s%@libc_cv_Bgroup@%$libc_cv_Bgroup%g +s%@libc_cv_z_combreloc@%$libc_cv_z_combreloc%g s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g s%@no_whole_archive@%$no_whole_archive%g s%@exceptions@%$exceptions%g s%@LIBGD@%$LIBGD%g s%@sizeof_long_double@%$sizeof_long_double%g +s%@libc_cv_gcc_unwind_find_fde@%$libc_cv_gcc_unwind_find_fde%g s%@uname_sysname@%$uname_sysname%g s%@uname_release@%$uname_release%g s%@uname_version@%$uname_version%g diff -durpN glibc-2.2.4/configure.in glibc-2.2.5/configure.in --- glibc-2.2.4/configure.in Fri Aug 10 12:11:47 2001 +++ glibc-2.2.5/configure.in Wed Dec 12 10:45:27 2001 @@ -59,6 +59,7 @@ dnl Arguments to specify presence of oth AC_ARG_WITH(fp, dnl [ --with-fp if using floating-point hardware [default=yes]], with_fp=$withval, with_fp=yes) +AC_SUBST(with_fp) AC_ARG_WITH(binutils, dnl --with-binutils=PATH specify location of binutils (as and ld), path_binutils=$withval, path_binutils='') @@ -255,7 +256,7 @@ gnu* | linux* | sysv4* | solaris2* | iri aix*) # These systems are always xcoff xcoff=yes - elf=no + elf=no ;; esac @@ -636,27 +637,6 @@ test -n "$aux_missing" && AC_MSG_WARN([ CCVERSION=`$CC -v 2>&1 | sed -n 's/gcc version //p'` AC_SUBST(CCVERSION) -case $CCVERSION in - 3.*) gcc3=yes;; -esac - -if test x"$gcc3" = xyes; then - echo "\ -*** This version of GNU libc cannot be compiled by GCC 3.x. -*** GCC 3.x will generate a library that is binary incompatible to -*** older and future releases of GNU libc. -*** You should compile this GNU libc release by an older GCC version -*** or wait for the next GNU libc release." - if test $enable_sanity = yes; then - echo "\ -*** If you really mean to use GCC 3.x, run configure again -*** using the extra parameter \`--disable-sanity-checks'." - exit 1 - else - echo "\ -*** This configuration is not supported by the GNU libc developers." - fi -fi # if using special system headers, find out the compiler's sekrit # header directory and add that to the list. NOTE: Only does the right # thing on a system that doesn't need fixincludes. (Not presently a problem.) @@ -713,6 +693,14 @@ AC_MSG_ERROR([ *** and run configure again.]) fi +AC_CACHE_CHECK(whether GCC supports -static-libgcc, libc_cv_gcc_static_libgcc, [dnl +if $CC -v -static-libgcc 2>&1 | grep -q 'unrecognized option.*static-libgcc'; then + libc_cv_gcc_static_libgcc= +else + libc_cv_gcc_static_libgcc=-static-libgcc +fi]) +AC_SUBST(libc_cv_gcc_static_libgcc) + AC_PATH_PROG(BASH, bash, no) if test "$BASH" != no && $BASH -c 'test "$BASH_VERSINFO" \ @@ -1011,7 +999,9 @@ EOF cat > conftest.c <&AC_FD_CC]) + if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,--enable-new-dtags,-z,nodelete 1>&AC_FD_CC]) then libc_cv_z_nodelete=yes else @@ -1025,7 +1015,9 @@ EOF cat > conftest.c <&AC_FD_CC]) + if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,--enable-new-dtags,-z,nodlopen 1>&AC_FD_CC]) then libc_cv_z_nodlopen=yes else @@ -1039,7 +1031,9 @@ EOF cat > conftest.c <&AC_FD_CC]) + if AC_TRY_COMMAND([${CC-cc} -shared -o conftest.so conftest.c + -nostartfiles -nostdlib + -Wl,--enable-new-dtags,-z,initfirst 1>&AC_FD_CC]) then libc_cv_z_initfirst=yes else @@ -1061,7 +1055,36 @@ EOF fi rm -f conftest*]) AC_SUBST(libc_cv_Bgroup) + + AC_CACHE_CHECK(for -z combreloc, + libc_cv_z_combreloc, [dnl + cat > conftest.c <&AC_FD_CC]) + then +dnl The following test is a bit weak. We must use a tool which can test +dnl cross-platform since the gcc used can be a cross compiler. Without +dnl introducing new options this is not easily doable. Instead use a tool +dnl which always is cross-platform: readelf. To detect whether -z combreloc +dnl look for a section named .rel.dyn. + if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then + libc_cv_z_combreloc=yes + else + libc_cv_z_combreloc=no + fi + else + libc_cv_z_combreloc=no + fi + rm -f conftest*]) + if test "$libc_cv_z_combreloc" = yes; then + AC_DEFINE(HAVE_Z_COMBRELOC) + fi fi +AC_SUBST(libc_cv_z_combreloc) if test $elf != yes; then AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini, @@ -1433,6 +1456,7 @@ libc_link_sources= use_ldconfig=no ldd_rewrite_script=no libc_cv_sysconfdir=$sysconfdir +libc_cv_gcc_unwind_find_fde=no # Iterate over all the sysdep directories we will use, running their # configure fragments, and looking for a uname implementation. @@ -1457,6 +1481,11 @@ for dir in $sysnames; do fi ]dnl done + +if test x$libc_cv_gcc_unwind_find_fde = xyes; then + AC_DEFINE(EXPORT_UNWIND_FIND_FDE) +fi +AC_SUBST(libc_cv_gcc_unwind_find_fde) AC_LINK_FILES(`echo $libc_link_sources`, `echo $libc_link_dests`) diff -durpN glibc-2.2.4/conform/conformtest.pl glibc-2.2.5/conform/conformtest.pl --- glibc-2.2.4/conform/conformtest.pl Fri Feb 9 10:03:59 2001 +++ glibc-2.2.5/conform/conformtest.pl Wed Aug 22 21:34:36 2001 @@ -53,6 +53,7 @@ $CFLAGS{"XOPEN2K"} = "-I. -fno-builtin ' @knownproblems = ('unix', 'linux', 'i386'); # Some headers need a bit more attention. +$mustprepend{'inttypes.h'} = "#include \n"; $mustprepend{'regex.h'} = "#include \n"; $mustprepend{'sched.h'} = "#include \n"; $mustprepend{'signal.h'} = "#include \n"; @@ -224,11 +225,19 @@ sub newtoken { if ($isknown{$token}) { ++$nknown; } else { - ++$nerrors; - if ($nerrors == 1) { - printf ("FAIL\n " . "-" x 72 . "\n"); - } - printf (" Namespace violation: \"%s\"\n", $token); + $errors{$token} = 1; + } +} + + +sub removetoken { + my($token) = @_; + my($idx); + + return if ($token =~ /^[0-9_]/ || $iskeyword{$token}); + + if (exists $errors{$token}) { + undef $errors{$token}; } } @@ -243,14 +252,15 @@ sub checknamespace { print TESTFILE "#include <$h>\n"; close (TESTFILE); - $nerrors = 0; + undef %errors; $nknown = 0; open (CONTENT, "$CC $CFLAGS{$dialect} -E $fnamebase.c -P -Wp,-dN | sed -e '/^# [1-9]/d' -e '/^[[:space:]]*\$/d' |"); loop: while () { - next loop if (/^#undef /); chop; if (/^#define (.*)/) { newtoken ($1, @allow); + } elsif (/^#undef (.*)/) { + removetoken ($1); } else { # We have to tokenize the line. my($str) = $_; @@ -266,14 +276,29 @@ sub checknamespace { } close (CONTENT); unlink "$fnamebase.c"; - if ($nerrors != 0) { - printf (" " . "-" x 72 . "\n"); - ++$errors; - } elsif ($nknown > 0) { - printf ("EXPECTED FAILURES\n"); - ++$known; - } else { - printf ("OK\n"); + $realerror = 0; + if ($#errors != 0) { + # Sort the output list so it's easier to compare results with diff. + foreach $f (sort keys(%errors)) { + if ($errors{$f} == 1) { + if ($realerror == 0) { + printf ("FAIL\n " . "-" x 72 . "\n"); + $realerror = 1; + ++$errors; + } + printf (" Namespace violation: \"%s\"\n", $f); + } + } + printf (" " . "-" x 72 . "\n") if ($realerror != 0); + } + + if ($realerror == 0) { + if ($nknown > 0) { + printf ("EXPECTED FAILURES\n"); + ++$known; + } else { + printf ("OK\n"); + } } } diff -durpN glibc-2.2.4/conform/data/netdb.h-data glibc-2.2.5/conform/data/netdb.h-data --- glibc-2.2.4/conform/data/netdb.h-data Fri Feb 9 10:03:59 2001 +++ glibc-2.2.5/conform/data/netdb.h-data Fri Aug 17 17:34:57 2001 @@ -77,7 +77,7 @@ function void endnetent (void) function void endprotoent (void) function void endservent (void) function void freeaddrinfo (struct addrinfo*) -function {char*} gai_strerror (int) +function {const char*} gai_strerror (int) function int getaddrinfo (const char*, const char*, const struct addrinfo*, struct addrinfo**) function {struct hostent*} gethostbyaddr (const void*, socklen_t, int) function {struct hostent*} gethostbyname (const char*) diff -durpN glibc-2.2.4/conform/data/netinet/in.h-data glibc-2.2.5/conform/data/netinet/in.h-data --- glibc-2.2.4/conform/data/netinet/in.h-data Fri Feb 9 10:04:01 2001 +++ glibc-2.2.5/conform/data/netinet/in.h-data Sat Aug 18 04:06:38 2001 @@ -58,7 +58,7 @@ function uint16_t htons (uint16_t) function uint32_t ntohl (uint32_t) function uint16_t ntohs (uint16_t) -allow-header intttypes.h +allow-header inttypes.h allow-header arpa/inet.h constant INET6_ADDRSTRLEN 46 diff -durpN glibc-2.2.4/conform/data/stddef.h-data glibc-2.2.5/conform/data/stddef.h-data --- glibc-2.2.4/conform/data/stddef.h-data Mon Feb 28 12:34:05 2000 +++ glibc-2.2.5/conform/data/stddef.h-data Sat Aug 18 15:11:09 2001 @@ -5,6 +5,5 @@ macro offsetof type ptrdiff_t type wchar_t type size_t -type wint_t allow *_t diff -durpN glibc-2.2.4/conform/data/sys/select.h-data glibc-2.2.5/conform/data/sys/select.h-data --- glibc-2.2.4/conform/data/sys/select.h-data Sat Jan 27 11:20:05 2001 +++ glibc-2.2.5/conform/data/sys/select.h-data Sat Aug 18 16:33:19 2001 @@ -1,10 +1,10 @@ #if !defined ISO && !defined POSIX +type time_t +type suseconds_t + type {struct timeval} element {struct timeval} time_t tv_sec element {struct timeval} suseconds_t tv_usec - -type time_t -type suseconds_t type sigset_t diff -durpN glibc-2.2.4/conform/data/sys/socket.h-data glibc-2.2.5/conform/data/sys/socket.h-data --- glibc-2.2.4/conform/data/sys/socket.h-data Mon Mar 26 20:52:47 2001 +++ glibc-2.2.5/conform/data/sys/socket.h-data Sat Aug 18 04:00:27 2001 @@ -103,6 +103,7 @@ function int setsockopt (int, int, int, function int shutdown (int, int) function int socket (int, int, int) function int socketpair (int, int, int, int[2]) +function int sockatmark (int) allow-header sys/uio.h diff -durpN glibc-2.2.4/conform/data/sys/uio.h-data glibc-2.2.5/conform/data/sys/uio.h-data --- glibc-2.2.4/conform/data/sys/uio.h-data Sun Feb 27 15:30:13 2000 +++ glibc-2.2.5/conform/data/sys/uio.h-data Sat Aug 18 16:21:50 2001 @@ -9,3 +9,4 @@ function ssize_t writev (int, const stru allow iov_* allow IOV_* allow *_t +allow UIO_MAXIOV diff -durpN glibc-2.2.4/conform/data/ucontext.h-data glibc-2.2.5/conform/data/ucontext.h-data --- glibc-2.2.4/conform/data/ucontext.h-data Mon May 1 14:56:30 2000 +++ glibc-2.2.5/conform/data/ucontext.h-data Sat Aug 18 18:02:25 2001 @@ -2,10 +2,10 @@ type mcontext_t type ucontext_t -element {struct ucontext_t} {ucontext_t*} uc_link -element {struct ucontext_t} sigset_t uc_sigmask -element {struct ucontext_t} stack_t uc_stack -element {struct ucontext_t} mcontext_t uc_mcontext +element ucontext_t {ucontext_t*} uc_link +element ucontext_t sigset_t uc_sigmask +element ucontext_t stack_t uc_stack +element ucontext_t mcontext_t uc_mcontext type sigset_t type stack_t diff -durpN glibc-2.2.4/conform/data/unistd.h-data glibc-2.2.5/conform/data/unistd.h-data --- glibc-2.2.4/conform/data/unistd.h-data Mon Mar 26 20:52:47 2001 +++ glibc-2.2.5/conform/data/unistd.h-data Sat Aug 18 18:04:28 2001 @@ -174,7 +174,6 @@ constant _SC_MESSAGE_PASSING constant _SC_MONOTONIC_CLOCK constant _SC_MQ_OPEN_MAX constant _SC_MQ_PRIO_MAX -constant _SC_MULTIPLE_PROCESS constant _SC_NETWORKING constant _SC_NGROUPS_MAX constant _SC_OPEN_MAX diff -durpN glibc-2.2.4/crypt/md5-crypt.c glibc-2.2.5/crypt/md5-crypt.c --- glibc-2.2.4/crypt/md5-crypt.c Mon Jul 23 10:53:37 2001 +++ glibc-2.2.5/crypt/md5-crypt.c Thu Aug 30 18:45:02 2001 @@ -1,5 +1,5 @@ /* One way encryption based on MD5 sum. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -179,10 +179,10 @@ __md5_crypt_r (key, salt, buffer, buflen /* Now we can construct the result string. It consists of three parts. */ cp = __stpncpy (buffer, md5_salt_prefix, MAX (0, buflen)); - buflen -= sizeof (md5_salt_prefix); + buflen -= sizeof (md5_salt_prefix) - 1; - cp = __stpncpy (cp, salt, MIN ((size_t) buflen, salt_len)); - buflen -= MIN ((size_t) buflen, salt_len); + cp = __stpncpy (cp, salt, MIN ((size_t) MAX (0, buflen), salt_len)); + buflen -= MIN ((size_t) MAX (0, buflen), salt_len); if (buflen > 0) { diff -durpN glibc-2.2.4/crypt/md5.c glibc-2.2.5/crypt/md5.c --- glibc-2.2.4/crypt/md5.c Mon Jul 23 10:53:37 2001 +++ glibc-2.2.5/crypt/md5.c Thu Dec 13 22:34:47 2001 @@ -1,6 +1,6 @@ /* Functions to compute MD5 message digest of files or memory blocks. according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1999,2000,2001 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 @@ -217,8 +217,6 @@ md5_process_bytes (buffer, len, ctx) size_t len; struct md5_ctx *ctx; { - //const void aligned_buffer = buffer; - /* When we already have some bits in our internal buffer concatenate both inputs first. */ if (ctx->buflen != 0) @@ -226,9 +224,6 @@ md5_process_bytes (buffer, len, ctx) size_t left_over = ctx->buflen; size_t add = 128 - left_over > len ? len : 128 - left_over; - /* Only put full words in the buffer. */ - add -= add % __alignof__ (md5_uint32); - memcpy (&ctx->buffer[left_over], buffer, add); ctx->buflen += add; @@ -247,11 +242,30 @@ md5_process_bytes (buffer, len, ctx) } /* Process available complete blocks. */ - if (len > 64) + if (len >= 64) { - md5_process_block (buffer, len & ~63, ctx); - buffer = (const char *) buffer + (len & ~63); - len &= 63; +#if !_STRING_ARCH_unaligned +/* To check alignment gcc has an appropriate operator. Other + compilers don't. */ +# if __GNUC__ >= 2 +# define UNALIGNED_P(p) (((md5_uintptr) p) % __alignof__ (md5_uint32) != 0) +# else +# define UNALIGNED_P(p) (((md5_uintptr) p) % sizeof (md5_uint32) != 0) +# endif + if (UNALIGNED_P (buffer)) + while (len > 64) + { + md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); + buffer = (const char *) buffer + 64; + len -= 64; + } + else +#endif + { + md5_process_block (buffer, len & ~63, ctx); + buffer = (const char *) buffer + (len & ~63); + len &= 63; + } } /* Move remaining bytes in internal buffer. */ diff -durpN glibc-2.2.4/crypt/md5.h glibc-2.2.5/crypt/md5.h --- glibc-2.2.4/crypt/md5.h Mon Jul 23 10:53:37 2001 +++ glibc-2.2.5/crypt/md5.h Fri Dec 14 10:14:05 2001 @@ -1,6 +1,6 @@ /* Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,1999,2000,2001 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 @@ -35,8 +35,9 @@ is usually not possible. */ #ifdef _LIBC -# include -typedef u_int32_t md5_uint32; +# include +typedef uint32_t md5_uint32; +typedef uintptr_t md5_uintptr; #else # if defined __STDC__ && __STDC__ # define UINT_MAX_32_BITS 4294967295U @@ -68,6 +69,9 @@ typedef u_int32_t md5_uint32; # endif # endif # endif +/* We have to make a guess about the integer type equivalent in size + to pointers which should always be correct. */ +typedef unsigned long int md5_uintptr; #endif #undef __P diff -durpN glibc-2.2.4/csu/version.c glibc-2.2.5/csu/version.c --- glibc-2.2.4/csu/version.c Mon Jul 23 10:53:37 2001 +++ glibc-2.2.5/csu/version.c Sun Jan 20 19:20:34 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1992-2001, 2002 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 @@ -24,7 +24,7 @@ static const char __libc_version[] = VER static const char banner[] = "GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\ -Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc.\n\ +Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.\n\ diff -durpN glibc-2.2.4/debug/Makefile glibc-2.2.5/debug/Makefile --- glibc-2.2.4/debug/Makefile Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/debug/Makefile Wed Aug 29 15:45:25 2001 @@ -40,14 +40,15 @@ libpcprofile-routines = pcprofile libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes)) others = pcprofiledump -install-bin = pcprofiledump xtrace +install-bin = pcprofiledump +install-bin-script = xtrace include ../Makeconfig distribute += catchsegv.sh xtrace.sh ifeq ($(elf),yes) ifeq ($(build-shared),yes) -install-bin += catchsegv +install-bin-script += catchsegv endif endif generated = catchsegv xtrace diff -durpN glibc-2.2.4/debug/xtrace.sh glibc-2.2.5/debug/xtrace.sh --- glibc-2.2.4/debug/xtrace.sh Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/debug/xtrace.sh Sun Jan 20 19:20:44 2002 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. @@ -53,7 +53,7 @@ Report bugs using the \`glibcbug' script do_version() { echo 'xtrace (GNU libc) @VERSION@' - echo $"Copyright (C) 2001 Free Software Foundation, Inc. + echo $"Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Ulrich Drepper." diff -durpN glibc-2.2.4/dlfcn/dlfcn.h glibc-2.2.5/dlfcn/dlfcn.h --- glibc-2.2.4/dlfcn/dlfcn.h Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/dlfcn/dlfcn.h Fri Oct 26 17:01:25 2001 @@ -1,5 +1,5 @@ /* User functions for run-time dynamic loading. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001 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,6 +25,7 @@ /* Collect various system dependent definitions and declarations. */ #include + #ifdef __USE_GNU /* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT the run-time address of the symbol called NAME in the next shared @@ -38,6 +39,7 @@ # define RTLD_DEFAULT ((void *) 0) #endif + __BEGIN_DECLS /* Open the shared object FILE and map it in; return a handle that can be @@ -66,6 +68,7 @@ extern void *dlvsym (void *__restrict __ the error string so that a following call returns null. */ extern char *dlerror (void) __THROW; + #ifdef __USE_GNU /* Structure containing information about object searched using `dladdr'. */ @@ -79,7 +82,7 @@ typedef struct /* Fill in *INFO with the following information about ADDRESS. Returns 0 iff no shared object's segments contain that address. */ -extern int dladdr (const void *__address, Dl_info *__info) __THROW; +extern int dladdr (__const void *__address, Dl_info *__info) __THROW; #endif __END_DECLS diff -durpN glibc-2.2.4/dlfcn/tst-dladdr.c glibc-2.2.5/dlfcn/tst-dladdr.c --- glibc-2.2.4/dlfcn/tst-dladdr.c Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/dlfcn/tst-dladdr.c Wed Aug 22 21:01:56 2001 @@ -1,5 +1,5 @@ /* Test for dladdr. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Volkmar Sieh and Andreas Jaeger . @@ -25,6 +25,8 @@ #include #include +#include + #define TEST_FUNCTION do_test () extern int do_test (void); @@ -52,7 +54,8 @@ do_test (void) if (ret == 0) error (EXIT_FAILURE, 0, "dladdr failed"); - printf ("address of ref1 = %p\n", sym); + printf ("address of ref1 = %lx\n", + (unsigned long int) DL_LOOKUP_ADDRESS (sym)); printf ("ret = %d\n", ret); printf ("info.dli_fname = %p (\"%s\")\n", info.dli_fname, info.dli_fname); printf ("info.dli_fbase = %p\n", info.dli_fbase); diff -durpN glibc-2.2.4/elf/Makefile glibc-2.2.5/elf/Makefile --- glibc-2.2.4/elf/Makefile Fri Jul 27 23:13:13 2001 +++ glibc-2.2.5/elf/Makefile Tue Jan 8 13:38:17 2002 @@ -1,4 +1,4 @@ -# Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1995-1999, 2000, 2001, 2002 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 @@ -55,15 +55,26 @@ distribute := $(rtld-routines:=.c) dynam nodlopenmod.c nodelete.c nodelmod1.c nodelmod2.c \ nodelmod3.c nodelmod4.c nodlopen.c dl-osinfo.h \ reldepmod1.c reldepmod2.c reldepmod3.c reldepmod4.c \ + reldepmod5.c reldepmod6.c \ reldep4mod1.c reldep4mod2.c reldep4mod3.c reldep4mod4.c \ nextmod1.c nextmod2.c pathoptobj.c tst-pathopt.sh \ neededobj1.c neededobj2.c neededobj3.c neededobj4.c \ neededobj5.c neededobj6.c firstobj.c \ unload2mod.c unload2dep.c ltglobmod1.c ltglobmod2.c \ - testobj.h vismod.h globalmod1.c + testobj.h vismod.h globalmod1.c \ + dblloadmod1.c dblloadmod2.c dblloadmod3.c \ + reldep6mod4.c reldep6mod3.c reldep6mod2.c reldep6mod1.c \ + reldep6mod0.c \ + unwind-dw2.c unwind-dw2-fde.c unwind.h unwind-pe.h \ + unwind-dw2-fde.h dwarf2.h include ../Makeconfig +ifeq ($(unwind-find-fde),yes) +routines += unwind-dw2-fde-glibc +shared-only-routines = unwind-dw2-fde-glibc +endif + before-compile = $(objpfx)trusted-dirs.h generated := trusted-dirs.h trusted-dirs.st for-renamed/renamed.so generated-dirs := for-renamed @@ -76,11 +87,11 @@ ifeq (yes,$(build-shared)) extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os generated += librtld.os dl-allobjs.os ld.so ldd install-others = $(inst_slibdir)/$(rtld-installed-name) -install-bin = ldd +install-bin-script = ldd endif others = sprof sln -install-bin += sprof +install-bin = sprof others-static = sln install-rootsbin = sln @@ -102,10 +113,10 @@ endif ifeq (yes,$(build-shared)) tests = loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ constload1 order $(tests-vis-$(have-protected)) noload filter unload \ - reldep reldep2 reldep3 reldep4 next $(tests-nodelete-$(have-z-nodelete)) \ + reldep reldep2 reldep3 reldep4 $(tests-nodelete-$(have-z-nodelete)) \ $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \ neededtest3 neededtest4 unload2 lateglobal initfirst global \ - restest2 + restest2 next dblload dblunload reldep5 reldep6 test-srcs = tst-pathopt tests-vis-yes = vismain tests-nodelete-yes = nodelete @@ -120,7 +131,9 @@ modules-names = testobj1 testobj2 testob reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \ neededobj1 neededobj2 neededobj3 neededobj4 \ neededobj5 neededobj6 firstobj globalmod1 \ - unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj + unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj \ + dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6 \ + reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4 modules-vis-yes = vismod1 vismod2 vismod3 modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4 modules-nodlopen-yes = nodlopenmod @@ -281,6 +294,14 @@ $(objpfx)firstobj.so: $(shared-thread-li $(objpfx)globalmod1.so: $(libdl) $(objpfx)reldep4mod1.so: $(objpfx)reldep4mod3.so $(objpfx)reldep4mod2.so: $(objpfx)reldep4mod4.so +$(objpfx)dblloadmod1.so: $(objpfx)dblloadmod3.so +$(objpfx)dblloadmod2.so: $(objpfx)dblloadmod3.so +$(objpfx)reldepmod5.so: $(objpfx)reldepmod2.so +$(objpfx)reldepmod6.so: $(objpfx)reldepmod2.so +$(objpfx)reldep6mod1.so: $(objpfx)reldep6mod0.so +$(objpfx)reldep6mod2.so: $(objpfx)reldep6mod1.so +$(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so +$(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so # filtmod1.so has a special rule $(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os @@ -413,3 +434,15 @@ $(objpfx)initfirst.out: $(objpfx)firstob $(objpfx)global: $(objpfx)globalmod1.so $(objpfx)global.out: $(objpfx)reldepmod1.so + +$(objpfx)dblload: $(libdl) +$(objpfx)dblload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so + +$(objpfx)dblunload: $(libdl) +$(objpfx)dblunload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so + +$(objpfx)reldep5: $(libdl) +$(objpfx)reldep5.out: $(objpfx)reldepmod5.so $(objpfx)reldepmod5.so + +$(objpfx)reldep6: $(libdl) +$(objpfx)reldep6.out: $(objpfx)reldep6mod3.so $(objpfx)reldep6mod4.so diff -durpN glibc-2.2.4/elf/Versions glibc-2.2.5/elf/Versions --- glibc-2.2.4/elf/Versions Fri Jul 27 23:13:13 2001 +++ glibc-2.2.5/elf/Versions Thu Dec 6 00:10:06 2001 @@ -2,6 +2,9 @@ libc { GLIBC_2.0 { # functions used in other libraries _dl_open; _dl_close; _dl_addr; +%ifdef EXPORT_UNWIND_FIND_FDE + __register_frame_info; __deregister_frame_info; +%endif } GLIBC_2.1 { # functions used in other libraries @@ -17,6 +20,12 @@ libc { GLIBC_2.2.4 { dl_iterate_phdr; } +%ifdef EXPORT_UNWIND_FIND_FDE + GCC_3.0 { + __register_frame_info_bases; __deregister_frame_info_bases; + __register_frame_info_table_bases; _Unwind_Find_FDE; + } +%endif } ld { diff -durpN glibc-2.2.4/elf/dblload.c glibc-2.2.5/elf/dblload.c --- glibc-2.2.4/elf/dblload.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/dblload.c Wed Sep 5 18:01:12 2001 @@ -0,0 +1,53 @@ +#include +#include +#include +#include + + +int +main (void) +{ + void *p1; + void *p2; + int (*fp) (void); + int result; + + mtrace (); + + p1 = dlopen ("dblloadmod1.so", RTLD_LAZY); + if (p1 == NULL) + { + printf ("cannot open dblloadmod1.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + p2 = dlopen ("dblloadmod2.so", RTLD_LAZY); + if (p1 == NULL) + { + printf ("cannot open dblloadmod2.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + fp = dlsym (p1, "foo"); + if (fp == NULL) + { + printf ("cannot get function \"foo\": %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + result = fp (); + + if (dlclose (p1) != 0) + { + printf ("error while closing dblloadmod1.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + if (dlclose (p2) != 0) + { + printf ("error while closing dblloadmod2.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + return result; +} diff -durpN glibc-2.2.4/elf/dblloadmod1.c glibc-2.2.5/elf/dblloadmod1.c --- glibc-2.2.4/elf/dblloadmod1.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/dblloadmod1.c Wed Sep 5 18:01:32 2001 @@ -0,0 +1,7 @@ +extern int bar (void); + +int +foo (void) +{ + return 10 + bar (); +} diff -durpN glibc-2.2.4/elf/dblloadmod2.c glibc-2.2.5/elf/dblloadmod2.c --- glibc-2.2.4/elf/dblloadmod2.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/dblloadmod2.c Wed Sep 5 18:01:32 2001 @@ -0,0 +1,13 @@ +extern int bar (void); + +int +baz (void) +{ + return -42; +} + +int +xyzzy (void) +{ + return 10 + bar (); +} diff -durpN glibc-2.2.4/elf/dblloadmod3.c glibc-2.2.5/elf/dblloadmod3.c --- glibc-2.2.4/elf/dblloadmod3.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/dblloadmod3.c Wed Sep 5 18:01:33 2001 @@ -0,0 +1,7 @@ +extern int baz (void); + +int +bar (void) +{ + return 32 + baz (); +} diff -durpN glibc-2.2.4/elf/dblunload.c glibc-2.2.5/elf/dblunload.c --- glibc-2.2.4/elf/dblunload.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/dblunload.c Wed Sep 5 18:02:08 2001 @@ -0,0 +1,53 @@ +#include +#include +#include +#include + + +int +main (void) +{ + void *p1; + void *p2; + int (*fp) (void); + int result; + + mtrace (); + + p1 = dlopen ("dblloadmod1.so", RTLD_LAZY); + if (p1 == NULL) + { + printf ("cannot load dblloadmod1.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + p2 = dlopen ("dblloadmod2.so", RTLD_LAZY); + if (p2 == NULL) + { + printf ("cannot load dblloadmod2.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + if (dlclose (p1) != 0) + { + printf ("error while closing dblloadmod1.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + fp = dlsym (p2, "xyzzy"); + if (fp == NULL) + { + printf ("cannot get function \"xyzzy\": %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + result = fp (); + + if (dlclose (p2) != 0) + { + printf ("error while closing dblloadmod2.so: %s\n", dlerror ()); + exit (EXIT_FAILURE); + } + + return result; +} diff -durpN glibc-2.2.4/elf/dl-addr.c glibc-2.2.5/elf/dl-addr.c --- glibc-2.2.4/elf/dl-addr.c Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/elf/dl-addr.c Wed Aug 22 19:45:31 2001 @@ -1,5 +1,5 @@ /* Locate the shared object symbol nearest a given address. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996-2000, 2001 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 @@ -30,6 +30,7 @@ _dl_addr (const void *address, Dl_info * struct link_map *l, *match; const ElfW(Sym) *symtab, *matchsym; const char *strtab; + ElfW(Word) strtabsize; /* Find the highest-addressed object that ADDRESS is not below. */ match = NULL; @@ -70,15 +71,18 @@ _dl_addr (const void *address, Dl_info * symtab = (const void *) D_PTR (match, l_info[DT_SYMTAB]); strtab = (const void *) D_PTR (match, l_info[DT_STRTAB]); + strtabsize = match->l_info[DT_STRSZ]->d_un.d_val; /* We assume that the string table follows the symbol table, because there is no way in ELF to know the size of the dynamic symbol table!! */ for (matchsym = NULL; (void *) symtab < (void *) strtab; ++symtab) if (addr >= match->l_addr + symtab->st_value - && (!matchsym - || (matchsym->st_value < symtab->st_value - && (ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL - || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK)))) + && ((symtab->st_size == 0 && addr == match->l_addr + symtab->st_value) + || addr < match->l_addr + symtab->st_value + symtab->st_size) + && symtab->st_name < strtabsize + && (matchsym == NULL || matchsym->st_value < symtab->st_value) + && (ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL + || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK)) matchsym = symtab; if (matchsym) diff -durpN glibc-2.2.4/elf/dl-close.c glibc-2.2.5/elf/dl-close.c --- glibc-2.2.4/elf/dl-close.c Sat Aug 4 12:31:41 2001 +++ glibc-2.2.5/elf/dl-close.c Sat Sep 8 13:02:49 2001 @@ -32,11 +32,6 @@ typedef void (*fini_t) (void); -/* During the program run we must not modify the global data of - loaded shared object simultanously in two threads. Therefore we - protect `dlopen' and `dlclose' in dlclose.c. */ -__libc_lock_define (extern, _dl_load_lock) - void internal_function _dl_close (void *_map) @@ -53,42 +48,44 @@ _dl_close (void *_map) unsigned int *new_opencount; /* First see whether we can remove the object at all. */ - if ((map->l_flags_1 & DF_1_NODELETE) && map->l_init_called) + if (__builtin_expect (map->l_flags_1 & DF_1_NODELETE, 0) + && map->l_init_called) /* Nope. Do nothing. */ return; if (__builtin_expect (map->l_opencount, 1) == 0) - _dl_signal_error (0, map->l_name, N_("shared object not open")); + _dl_signal_error (0, map->l_name, NULL, N_("shared object not open")); /* Acquire the lock. */ - __libc_lock_lock (_dl_load_lock); + __libc_lock_lock_recursive (_dl_load_lock); /* Decrement the reference count. */ if (map->l_opencount > 1 || map->l_type != lt_loaded) { /* There are still references to this object. Do nothing more. */ if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0)) - { - char buf[20]; - - buf[sizeof buf - 1] = '\0'; - - _dl_debug_printf ("\nclosing file=%s; opencount == %u\n", - map->l_name, map->l_opencount); - } + _dl_debug_printf ("\nclosing file=%s; opencount == %u\n", + map->l_name, map->l_opencount); /* One decrement the object itself, not the dependencies. */ --map->l_opencount; - __libc_lock_unlock (_dl_load_lock); + __libc_lock_unlock_recursive (_dl_load_lock); return; } list = map->l_initfini; /* Compute the new l_opencount values. */ - new_opencount = (unsigned int *) alloca (map->l_searchlist.r_nlist - * sizeof (unsigned int)); + i = map->l_searchlist.r_nlist; + if (__builtin_expect (i == 0, 0)) + /* This can happen if we handle relocation dependencies for an + object which wasn't loaded directly. */ + for (i = 1; list[i] != NULL; ++i) + ; + + new_opencount = (unsigned int *) alloca (i * sizeof (unsigned int)); + for (i = 0; list[i] != NULL; ++i) { list[i]->l_idx = i; @@ -151,6 +148,25 @@ _dl_close (void *_map) (imap, (void *) imap->l_addr + imap->l_info[DT_FINI]->d_un.d_ptr)) (); } + else if (new_opencount[i] != 0 && imap->l_type == lt_loaded) + { + /* The object is still used. But the object we are unloading + right now is responsible for loading it and therefore we + have the search list of the current object in its scope. + Remove it. */ + struct r_scope_elem **runp = imap->l_scope; + + while (*runp != NULL) + if (*runp == &map->l_searchlist) + { + /* Copy all later elements. */ + while ((runp[0] = runp[1]) != NULL) + ++runp; + break; + } + else + ++runp; + } /* Store the new l_opencount value. */ imap->l_opencount = new_opencount[i]; @@ -238,7 +254,8 @@ _dl_close (void *_map) { struct libname_list *this = lnp; lnp = lnp->next; - free (this); + if (!this->dont_free) + free (this); } while (lnp != NULL); @@ -246,6 +263,10 @@ _dl_close (void *_map) if (imap != map) free (imap->l_initfini); + /* Remove the scope array if we allocated it. */ + if (imap->l_scope != imap->l_scope_mem) + free (imap->l_scope); + if (imap->l_phdr_allocated) free ((void *) imap->l_phdr); @@ -277,7 +298,7 @@ _dl_close (void *_map) free (list); /* Release the lock. */ - __libc_lock_unlock (_dl_load_lock); + __libc_lock_unlock_recursive (_dl_load_lock); } diff -durpN glibc-2.2.4/elf/dl-deps.c glibc-2.2.5/elf/dl-deps.c --- glibc-2.2.4/elf/dl-deps.c Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/elf/dl-deps.c Thu Sep 13 21:23:07 2001 @@ -97,7 +97,7 @@ struct list \ /* DST must not appear in SUID/SGID programs. */ \ if (__libc_enable_secure) \ - _dl_signal_error (0, __str, \ + _dl_signal_error (0, __str, NULL, \ N_("DST not allowed in SUID/SGID programs")); \ \ __newp = (char *) alloca (DL_DST_REQUIRED (l, __str, strlen (__str), \ @@ -110,7 +110,7 @@ struct list /* The replacement for the DST is not known. We can't \ processed. */ \ if (fatal) \ - _dl_signal_error (0, __str, N_("\ + _dl_signal_error (0, __str, NULL, N_("\ empty dynamics string token substitution")); \ else \ { \ @@ -362,11 +362,11 @@ _dl_map_object_deps (struct link_map *ma /* This object is already in the search list we are building. Don't add a duplicate pointer. Just added by _dl_map_object. */ - for (late = newp; late->next; late = late->next) + for (late = newp; late->next != NULL; late = late->next) if (late->next->map == args.aux) break; - if (late->next) + if (late->next != NULL) { /* The object is somewhere behind the current position in the search path. We have to @@ -380,9 +380,9 @@ _dl_map_object_deps (struct link_map *ma late->next = late->next->next; /* We must move the object earlier in the chain. */ - if (args.aux->l_prev) + if (args.aux->l_prev != NULL) args.aux->l_prev->l_next = args.aux->l_next; - if (args.aux->l_next) + if (args.aux->l_next != NULL) args.aux->l_next->l_prev = args.aux->l_prev; args.aux->l_prev = newp->map->l_prev; @@ -394,21 +394,10 @@ _dl_map_object_deps (struct link_map *ma else { /* The object must be somewhere earlier in the - list. That's good, we only have to insert - an entry for the duplicate list. */ - orig->next = NULL; /* Never used. */ - - /* Now we have a problem. The element - pointing to ORIG in the list must - point to NEWP now. This is the only place - where we need this backreference and this - situation is really not that frequent. So - we don't use a double-linked list but - instead search for the preceding element. */ - late = known; - while (late->next != orig) - late = late->next; - late->next = newp; + list. Undo to the current list element what + we did above. */ + memcpy (orig, newp, sizeof (*newp)); + continue; } } else @@ -448,11 +437,13 @@ _dl_map_object_deps (struct link_map *ma { needed[nneeded++] = NULL; - l->l_initfini = malloc (nneeded * sizeof needed[0]); + l->l_initfini = (struct link_map **) + malloc ((nneeded + 1) * sizeof needed[0]); if (l->l_initfini == NULL) - _dl_signal_error (ENOMEM, map->l_name, + _dl_signal_error (ENOMEM, map->l_name, NULL, N_("cannot allocate dependency list")); - memcpy (l->l_initfini, needed, nneeded * sizeof needed[0]); + l->l_initfini[0] = l; + memcpy (&l->l_initfini[1], needed, nneeded * sizeof needed[0]); } /* If we have no auxiliary objects just go on to the next map. */ @@ -462,7 +453,7 @@ _dl_map_object_deps (struct link_map *ma while (runp != NULL && runp->done); } -out: + out: if (errno == 0 && errno_saved != 0) __set_errno (errno_saved); @@ -480,7 +471,7 @@ out: (struct link_map **) malloc ((2 * nlist + 1) * sizeof (struct link_map *)); if (map->l_initfini == NULL) - _dl_signal_error (ENOMEM, map->l_name, + _dl_signal_error (ENOMEM, map->l_name, NULL, N_("cannot allocate symbol search list")); @@ -489,7 +480,7 @@ out: for (nlist = 0, runp = known; runp; runp = runp->next) { - if (trace_mode && runp->map->l_faked) + if (__builtin_expect (trace_mode, 0) && runp->map->l_faked) /* This can happen when we trace the loading. */ --map->l_searchlist.r_nlist; else @@ -500,6 +491,30 @@ out: runp->map->l_reserved = 0; } + /* Maybe we can remove some relocation dependencies now. */ + assert (map->l_searchlist.r_list[0] == map); + for (i = 0; i < map->l_reldepsact; ++i) + { + unsigned int j; + + for (j = 1; j < nlist; ++j) + if (map->l_searchlist.r_list[j] == map->l_reldeps[i]) + { + /* A direct or transitive dependency is also on the list + of relocation dependencies. Remove the latter. */ + --map->l_reldeps[i]->l_opencount; + + for (j = i + 1; j < map->l_reldepsact; ++j) + map->l_reldeps[j - 1] = map->l_reldeps[j]; + + --map->l_reldepsact; + + /* Account for the '++i' performed by the 'for'. */ + --i; + break; + } + } + /* Now determine the order in which the initialization has to happen. */ memcpy (map->l_initfini, map->l_searchlist.r_list, nlist * sizeof (struct link_map *)); @@ -527,7 +542,7 @@ out: if (runp != NULL) { while (*runp != NULL) - if (*runp == l) + if (__builtin_expect (*runp++ == l, 0)) { struct link_map *here = map->l_initfini[k]; @@ -539,8 +554,6 @@ out: break; } - else - ++runp; } } } @@ -549,5 +562,5 @@ out: if (errno_reason) _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, - objname, errstring); + objname, NULL, errstring); } diff -durpN glibc-2.2.4/elf/dl-error.c glibc-2.2.5/elf/dl-error.c --- glibc-2.2.4/elf/dl-error.c Mon Jul 23 10:53:38 2001 +++ glibc-2.2.5/elf/dl-error.c Tue Sep 4 20:40:02 2001 @@ -63,7 +63,8 @@ static receiver_fct receiver; void internal_function -_dl_signal_error (int errcode, const char *objname, const char *errstring) +_dl_signal_error (int errcode, const char *objname, const char *occation, + const char *errstring) { struct catch *lcatch; @@ -99,9 +100,9 @@ _dl_signal_error (int errcode, const cha { /* Lossage while resolving the program's own symbols is always fatal. */ char buffer[1024]; - _dl_fatal_printf ("\ -%s: error while loading shared libraries: %s%s%s%s%s\n", + _dl_fatal_printf ("%s: %s: %s%s%s%s%s\n", _dl_argv[0] ?: "", + occation ?: N_("error while loading shared libraries"), objname, *objname ? ": " : "", errstring, errcode ? ": " : "", (errcode @@ -113,8 +114,7 @@ _dl_signal_error (int errcode, const cha void internal_function -_dl_signal_cerror (int errcode, - const char *objname, +_dl_signal_cerror (int errcode, const char *objname, const char *occation, const char *errstring) { if (receiver) @@ -125,7 +125,7 @@ _dl_signal_cerror (int errcode, (*receiver) (errcode, objname, errstring); } else - _dl_signal_error (errcode, objname, errstring); + _dl_signal_error (errcode, objname, occation, errstring); } diff -durpN glibc-2.2.4/elf/dl-iteratephdr.c glibc-2.2.5/elf/dl-iteratephdr.c --- glibc-2.2.4/elf/dl-iteratephdr.c Wed Jul 25 13:42:47 2001 +++ glibc-2.2.5/elf/dl-iteratephdr.c Wed Aug 22 23:02:45 2001 @@ -23,8 +23,6 @@ #include #include -__libc_lock_define (extern, _dl_load_lock) - int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data) @@ -34,7 +32,7 @@ __dl_iterate_phdr (int (*callback) (stru int ret = 0; /* Make sure we are alone. */ - __libc_lock_lock (_dl_load_lock); + __libc_lock_lock_recursive (_dl_load_lock); for (l = _dl_loaded; l != NULL; l = l->l_next) { @@ -51,7 +49,7 @@ __dl_iterate_phdr (int (*callback) (stru } /* Release the lock. */ - __libc_lock_unlock (_dl_load_lock); + __libc_lock_unlock_recursive (_dl_load_lock); return ret; } diff -durpN glibc-2.2.4/elf/dl-load.c glibc-2.2.5/elf/dl-load.c --- glibc-2.2.4/elf/dl-load.c Sat Aug 11 18:28:49 2001 +++ glibc-2.2.5/elf/dl-load.c Sat Nov 10 14:43:10 2001 @@ -131,18 +131,6 @@ static const struct r_strlenpair *capstr static size_t ncapstr; static size_t max_capstrlen; -const unsigned char _dl_pf_to_prot[8] = -{ - [0] = PROT_NONE, - [PF_R] = PROT_READ, - [PF_W] = PROT_WRITE, - [PF_R | PF_W] = PROT_READ | PROT_WRITE, - [PF_X] = PROT_EXEC, - [PF_R | PF_X] = PROT_READ | PROT_EXEC, - [PF_W | PF_X] = PROT_WRITE | PROT_EXEC, - [PF_R | PF_W | PF_X] = PROT_READ | PROT_WRITE | PROT_EXEC -}; - /* Get the generated information about the trusted directories. */ #include "trusted-dirs.h" @@ -170,6 +158,30 @@ local_strdup (const char *s) } +static size_t +is_dst (const char *start, const char *name, const char *str, size_t cmplen, + int is_path, int secure) +{ + size_t len; + + if (strncmp (name, str, cmplen) == 0) + len = cmplen + 1; + else if (strncmp (name, str + 1, cmplen - 2) == 0 + && (name[cmplen - 2] == '\0' || name[cmplen - 2] == '/' + || (is_path && name[cmplen - 2] == ':'))) + len = cmplen - 1; + else + return 0; + + if (__builtin_expect (secure, 0) + && ((name[len - 1] != '\0' && (!is_path || name[len - 1] != ':')) + || (name != start + 1 && (!is_path || name[-2] != ':')))) + return 0; + + return len; +} + + size_t _dl_dst_count (const char *name, int is_path) { @@ -186,23 +198,10 @@ _dl_dst_count (const char *name, int is_ Note that it is no bug that the string in the second and fourth `strncmp' call is longer than the sequence which is actually tested. */ - if (((strncmp (&name[1], "{ORIGIN}", 8) == 0 && (len = 9) != 0) - || (strncmp (&name[1], "{ORIGIN}" + 1, 6) == 0 - && (name[7] == '\0' || name[7] == '/' - || (is_path && name[7] == ':')) - && (len = 7) != 0))) - { - if ((__builtin_expect (!__libc_enable_secure, 1) - || name[len] == '\0' || (is_path && name[len] == ':')) - && (name == start || (is_path && name[-1] == ':'))) - ++cnt; - } - else if ((strncmp (&name[1], "{PLATFORM}", 10) == 0 - && (len = 11) != 0) - || (strncmp (&name[1], "{PLATFORM}" + 1, 8) == 0 - && (name[9] == '\0' || name[9] == '/' - || (is_path && name[9] == ':')) - && (len = 9) != 0)) + if ((len = is_dst (start, name + 1, "{ORIGIN}", 8, is_path, + __libc_enable_secure)) != 0 + || ((len = is_dst (start, name + 1, "{PLATFORM}", 10, is_path, 0)) + != 0)) ++cnt; name = strchr (name + len, '$'); @@ -228,7 +227,7 @@ _dl_dst_substitute (struct link_map *l, do { - if (__builtin_expect (*name, 'a') == '$') + if (__builtin_expect (*name == '$', 0)) { const char *repl = NULL; size_t len = 1; @@ -236,25 +235,13 @@ _dl_dst_substitute (struct link_map *l, /* Note that it is no bug that the string in the second and fourth `strncmp' call is longer than the sequence which is actually tested. */ - if (((strncmp (&name[1], "{ORIGIN}", 8) == 0 && (len = 9) != 0) - || (strncmp (&name[1], "{ORIGIN}" + 1, 6) == 0 - && (name[7] == '\0' || name[7] == '/' - || (is_path && name[7] == ':')) - && (len = 7) != 0))) - { - if ((__builtin_expect (!__libc_enable_secure, 1) - || name[len] == '\0' || (is_path && name[len] == ':')) - && (name == start || (is_path && name[-1] == ':'))) - repl = l->l_origin; - } - else if ((strncmp (&name[1], "{PLATFORM}", 10) == 0 - && (len = 11) != 0) - || (strncmp (&name[1], "{PLATFORM}" + 1, 8) == 0 - && (name[9] == '\0' || name[9] == '/' || name[9] == ':') - && (len = 9) != 0)) + if ((len = is_dst (start, name + 1, "{ORIGIN}", 8, is_path, + __libc_enable_secure)) != 0) + repl = l->l_origin; + else if ((len = is_dst (start, name + 1, "{PLATFORM}", 10, is_path, + 0)) != 0) repl = _dl_platform; - if (repl != NULL && repl != (const char *) -1) { wp = __stpcpy (wp, repl); @@ -345,7 +332,7 @@ add_name_to_object (struct link_map *l, if (newname == NULL) { /* No more memory. */ - _dl_signal_error (ENOMEM, name, N_("cannot allocate name record")); + _dl_signal_error (ENOMEM, name, NULL, N_("cannot allocate name record")); return; } /* The object should have a libname set from _dl_new_object. */ @@ -452,7 +439,7 @@ fillin_rpath (char *rpath, struct r_sear malloc (sizeof (*dirp) + ncapstr * sizeof (enum r_dir_status) + where_len + len + 1); if (dirp == NULL) - _dl_signal_error (ENOMEM, NULL, + _dl_signal_error (ENOMEM, NULL, NULL, N_("cannot create cache for search path")); dirp->dirname = ((char *) dirp + sizeof (*dirp) @@ -504,6 +491,8 @@ decompose_rpath (struct r_search_path_st char *cp; struct r_search_path_elem **result; size_t nelems; + /* Initialize to please the compiler. */ + const char *errstring = NULL; /* First see whether we must forget the RUNPATH and RPATH from this object. */ @@ -521,8 +510,13 @@ decompose_rpath (struct r_search_path_st result = (struct r_search_path_elem **) malloc (sizeof (*result)); if (result == NULL) - _dl_signal_error (ENOMEM, NULL, - N_("cannot create cache for search path")); + { + signal_error_cache: + errstring = N_("cannot create cache for search path"); + signal_error: + _dl_signal_error (ENOMEM, NULL, NULL, errstring); + } + result[0] = NULL; sps->dirs = result; @@ -537,7 +531,10 @@ decompose_rpath (struct r_search_path_st string tokens. */ copy = expand_dynamic_string_token (l, rpath); if (copy == NULL) - _dl_signal_error (ENOMEM, NULL, N_("cannot create RUNPATH/RPATH copy")); + { + errstring = N_("cannot create RUNPATH/RPATH copy"); + goto signal_error; + } /* Count the number of necessary elements in the result array. */ nelems = 0; @@ -550,7 +547,7 @@ decompose_rpath (struct r_search_path_st result = (struct r_search_path_elem **) malloc ((nelems + 1 + 1) * sizeof (*result)); if (result == NULL) - _dl_signal_error (ENOMEM, NULL, N_("cannot create cache for search path")); + goto signal_error_cache; fillin_rpath (copy, result, ":", 0, what, where); @@ -575,6 +572,8 @@ _dl_init_paths (const char *llp) #ifdef SHARED struct link_map *l; #endif + /* Initialize to please the compiler. */ + const char *errstring = NULL; /* Fill in the information about the application's RPATH and the directories addressed by the LD_LIBRARY_PATH environment variable. */ @@ -587,7 +586,11 @@ _dl_init_paths (const char *llp) aelem = rtld_search_dirs.dirs = (struct r_search_path_elem **) malloc ((nsystem_dirs_len + 1) * sizeof (struct r_search_path_elem *)); if (rtld_search_dirs.dirs == NULL) - _dl_signal_error (ENOMEM, NULL, N_("cannot create search path array")); + { + errstring = N_("cannot create search path array"); + signal_error: + _dl_signal_error (ENOMEM, NULL, NULL, errstring); + } round_size = ((2 * sizeof (struct r_search_path_elem) - 1 + ncapstr * sizeof (enum r_dir_status)) @@ -597,7 +600,10 @@ _dl_init_paths (const char *llp) malloc ((sizeof (system_dirs) / sizeof (system_dirs[0])) * round_size * sizeof (struct r_search_path_elem)); if (rtld_search_dirs.dirs[0] == NULL) - _dl_signal_error (ENOMEM, NULL, N_("cannot create cache for search path")); + { + errstring = N_("cannot create cache for search path"); + goto signal_error; + } rtld_search_dirs.malloced = 0; pelem = _dl_all_dirs = rtld_search_dirs.dirs[0]; @@ -689,8 +695,10 @@ _dl_init_paths (const char *llp) env_path_list.dirs = (struct r_search_path_elem **) malloc ((nllp + 1) * sizeof (struct r_search_path_elem *)); if (env_path_list.dirs == NULL) - _dl_signal_error (ENOMEM, NULL, - N_("cannot create cache for search path")); + { + errstring = N_("cannot create cache for search path"); + goto signal_error; + } (void) fillin_rpath (llp_tmp, env_path_list.dirs, ":;", __libc_enable_secure, "LD_LIBRARY_PATH", NULL); @@ -717,7 +725,6 @@ _dl_init_paths (const char *llp) performance does not count. The function used to be "inlinable" and the compiled did so all the time. This increased the code size for absolutely no good reason. */ -#define LOSE(code, s) lose (code, fd, name, realname, l, s) static void __attribute__ ((noreturn)) lose (int code, int fd, const char *name, char *realname, struct link_map *l, @@ -727,21 +734,27 @@ lose (int code, int fd, const char *name is to avoid the function from being inlined. There is no official way to do this so we use this trick. gcc never inlines functions which use `alloca'. */ - int *a = alloca (sizeof (int)); + int *a = (int *) alloca (sizeof (int)); a[0] = fd; - (void) __close (a[0]); + /* The file might already be closed. */ + if (a[0] != -1) + (void) __close (a[0]); if (l != NULL) { /* Remove the stillborn object from the list and free it. */ - if (l->l_prev) - l->l_prev->l_next = l->l_next; - if (l->l_next) - l->l_next->l_prev = l->l_prev; + assert (l->l_next == NULL); +#ifndef SHARED + if (l->l_prev == NULL) + /* No other module loaded. */ + _dl_loaded = NULL; + else +#endif + l->l_prev->l_next = NULL; --_dl_nloaded; free (l); } free (realname); - _dl_signal_error (code, name, msg); + _dl_signal_error (code, name, NULL, msg); } @@ -757,31 +770,25 @@ _dl_map_object_from_fd (const char *name int mode) { struct link_map *l = NULL; - - auto inline caddr_t map_segment (ElfW(Addr) mapstart, size_t len, - int prot, int fixed, off_t offset); - - inline caddr_t map_segment (ElfW(Addr) mapstart, size_t len, - int prot, int fixed, off_t offset) - { - caddr_t mapat = __mmap ((caddr_t) mapstart, len, prot, - fixed|MAP_COPY|MAP_FILE, - fd, offset); - if (mapat == MAP_FAILED) - LOSE (errno, N_("failed to map segment from shared object")); - return mapat; - } - const ElfW(Ehdr) *header; const ElfW(Phdr) *phdr; const ElfW(Phdr) *ph; size_t maplength; int type; struct stat64 st; + /* Initialize to keep the compiler happy. */ + const char *errstring = NULL; + int errval = 0; /* Get file information. */ - if (__fxstat64 (_STAT_VER, fd, &st) < 0) - LOSE (errno, N_("cannot stat shared object")); + if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st) < 0, 0)) + { + errstring = N_("cannot stat shared object"); + call_lose_errno: + errval = errno; + call_lose: + lose (errval, fd, name, realname, l, errstring); + } /* Look again to see if the real name matched another already loaded. */ for (l = _dl_loaded; l; l = l->l_next) @@ -819,7 +826,8 @@ _dl_map_object_from_fd (const char *name if (_dl_zerofd == -1) { __close (fd); - _dl_signal_error (errno, NULL, N_("cannot open zero fill device")); + _dl_signal_error (errno, NULL, NULL, + N_("cannot open zero fill device")); } } #endif @@ -827,7 +835,10 @@ _dl_map_object_from_fd (const char *name /* Enter the new object in the list of loaded objects. */ l = _dl_new_object (realname, name, l_type, loader); if (__builtin_expect (! l, 0)) - LOSE (ENOMEM, N_("cannot create shared object descriptor")); + { + errstring = N_("cannot create shared object descriptor"); + goto call_lose_errno; + } /* Extract the remaining details we need from the ELF header and then read in the program header table. */ @@ -843,7 +854,10 @@ _dl_map_object_from_fd (const char *name phdr = alloca (maplength); __lseek (fd, SEEK_SET, header->e_phoff); if (__libc_read (fd, (void *) phdr, maplength) != maplength) - LOSE (errno, N_("cannot read file data")); + { + errstring = N_("cannot read file data"); + goto call_lose_errno; + } } { @@ -870,6 +884,7 @@ _dl_map_object_from_fd (const char *name l->l_ld = (void *) ph->p_vaddr; l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn)); break; + case PT_PHDR: l->l_phdr = (void *) ph->p_vaddr; break; @@ -877,11 +892,18 @@ _dl_map_object_from_fd (const char *name case PT_LOAD: /* A load command tells us to map in part of the file. We record the load commands and process them all later. */ - if (ph->p_align % _dl_pagesize != 0) - LOSE (0, N_("ELF load command alignment not page-aligned")); - if ((ph->p_vaddr - ph->p_offset) % ph->p_align) - LOSE (0, - N_("ELF load command address/offset not properly aligned")); + if ((ph->p_align & (_dl_pagesize - 1)) != 0) + { + errstring = N_("ELF load command alignment not page-aligned"); + goto call_lose; + } + if (((ph->p_vaddr - ph->p_offset) & (ph->p_align - 1)) != 0) + { + errstring + = N_("ELF load command address/offset not properly aligned"); + goto call_lose; + } + { struct loadcmd *c = &loadcmds[nloadcmds++]; c->mapstart = ph->p_vaddr & ~(ph->p_align - 1); @@ -892,19 +914,18 @@ _dl_map_object_from_fd (const char *name c->mapoff = ph->p_offset & ~(ph->p_align - 1); /* Optimize a common case. */ - if ((PF_R | PF_W | PF_X) == 7 - && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7) - c->prot = _dl_pf_to_prot[ph->p_flags & (PF_R | PF_W | PF_X)]; - else - { - c->prot = 0; - if (ph->p_flags & PF_R) - c->prot |= PROT_READ; - if (ph->p_flags & PF_W) - c->prot |= PROT_WRITE; - if (ph->p_flags & PF_X) - c->prot |= PROT_EXEC; - } +#if (PF_R | PF_W | PF_X) == 7 && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7 + c->prot = (PF_TO_PROT + >> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf; +#else + c->prot = 0; + if (ph->p_flags & PF_R) + c->prot |= PROT_READ; + if (ph->p_flags & PF_W) + c->prot |= PROT_WRITE; + if (ph->p_flags & PF_X) + c->prot |= PROT_EXEC; +#endif } break; } @@ -933,8 +954,16 @@ _dl_map_object_from_fd (const char *name - MAP_BASE_ADDR (l)); /* Remember which part of the address space this object uses. */ - l->l_map_start = (ElfW(Addr)) map_segment (mappref, maplength, c->prot, - 0, c->mapoff); + l->l_map_start = (ElfW(Addr)) __mmap ((void *) mappref, maplength, + c->prot, MAP_COPY | MAP_FILE, + fd, c->mapoff); + if ((void *) l->l_map_start == MAP_FAILED) + { + map_error: + errstring = N_("failed to map segment from shared object"); + goto call_lose_errno; + } + l->l_map_end = l->l_map_start + maplength; l->l_addr = l->l_map_start - c->mapstart; @@ -955,7 +984,8 @@ _dl_map_object_from_fd (const char *name happen for objects loaded with dlopen(). */ if (__builtin_expect (mode & __RTLD_DLOPEN, 0)) { - LOSE (0, N_("cannot dynamically load executable")); + errstring = N_("cannot dynamically load executable"); + goto call_lose; } /* Notify ELF_PREFERRED_ADDRESS that we have to load this one @@ -969,10 +999,13 @@ _dl_map_object_from_fd (const char *name while (c < &loadcmds[nloadcmds]) { - if (c->mapend > c->mapstart) - /* Map the segment contents from the file. */ - map_segment (l->l_addr + c->mapstart, c->mapend - c->mapstart, - c->prot, MAP_FIXED, c->mapoff); + if (c->mapend > c->mapstart + /* Map the segment contents from the file. */ + && (__mmap ((void *) (l->l_addr + c->mapstart), + c->mapend - c->mapstart, c->prot, + MAP_FIXED | MAP_COPY | MAP_FILE, fd, c->mapoff) + == MAP_FAILED)) + goto map_error; postmap: if (l->l_phdr == 0 @@ -1005,7 +1038,10 @@ _dl_map_object_from_fd (const char *name /* Dag nab it. */ if (__mprotect ((caddr_t) (zero & ~(_dl_pagesize - 1)), _dl_pagesize, c->prot|PROT_WRITE) < 0) - LOSE (errno, N_("cannot change memory protections")); + { + errstring = N_("cannot change memory protections"); + goto call_lose_errno; + } } memset ((void *) zero, '\0', zeropage - zero); if ((c->prot & PROT_WRITE) == 0) @@ -1021,7 +1057,10 @@ _dl_map_object_from_fd (const char *name c->prot, MAP_ANON|MAP_PRIVATE|MAP_FIXED, ANONFD, 0); if (mapat == MAP_FAILED) - LOSE (errno, N_("cannot map zero-fill pages")); + { + errstring = N_("cannot map zero-fill pages"); + goto call_lose_errno; + } } } @@ -1036,7 +1075,10 @@ _dl_map_object_from_fd (const char *name ElfW(Phdr) *newp = (ElfW(Phdr) *) malloc (header->e_phnum * sizeof (ElfW(Phdr))); if (newp == NULL) - LOSE (ENOMEM, N_("cannot allocate memory for program header")); + { + errstring = N_("cannot allocate memory for program header"); + goto call_lose_errno; + } l->l_phdr = memcpy (newp, phdr, (header->e_phnum * sizeof (ElfW(Phdr)))); @@ -1049,6 +1091,8 @@ _dl_map_object_from_fd (const char *name /* We are done mapping in the file. We no longer need the descriptor. */ __close (fd); + /* Signal that we closed the file. */ + fd = -1; if (l->l_type == lt_library && type == ET_EXEC) l->l_type = lt_executable; @@ -1056,7 +1100,10 @@ _dl_map_object_from_fd (const char *name if (l->l_ld == 0) { if (type == ET_DYN) - LOSE (0, N_("object file has no dynamic section")); + { + errstring = N_("object file has no dynamic section"); + goto call_lose; + } } else (ElfW(Addr)) l->l_ld += l->l_addr; @@ -1080,28 +1127,17 @@ _dl_map_object_from_fd (const char *name if (__builtin_expect (l->l_flags_1 & DF_1_NOOPEN, 0) && (mode & __RTLD_DLOPEN)) { - /* Remove from the module list. */ - assert (l->l_next == NULL); -#ifndef SHARED - if (l->l_prev == NULL) - /* No other module loaded. */ - _dl_loaded = NULL; - else -#endif - l->l_prev->l_next = NULL; - --_dl_nloaded; - /* We are not supposed to load this object. Free all resources. */ __munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start); - free (l->l_libname); + if (!l->l_libname->dont_free) + free (l->l_libname); if (l->l_phdr_allocated) free ((void *) l->l_phdr); - free (l); - - _dl_signal_error (0, name, N_("shared object cannot be dlopen()ed")); + errstring = N_("shared object cannot be dlopen()ed"); + goto call_lose; } if (l->l_info[DT_HASH]) @@ -1122,21 +1158,24 @@ _dl_map_object_from_fd (const char *name (struct link_map **) malloc (sizeof (struct link_map *)); if (l->l_symbolic_searchlist.r_list == NULL) - LOSE (ENOMEM, N_("cannot create searchlist")); + { + errstring = N_("cannot create searchlist"); + goto call_lose_errno; + } l->l_symbolic_searchlist.r_list[0] = l; l->l_symbolic_searchlist.r_nlist = 1; /* Now move the existing entries one back. */ memmove (&l->l_scope[1], &l->l_scope[0], - sizeof (l->l_scope) - sizeof (l->l_scope[0])); + (l->l_scope_max - 1) * sizeof (l->l_scope[0])); /* Now add the new entry. */ l->l_scope[0] = &l->l_symbolic_searchlist; } /* Remember whether this object must be initialized first. */ - if (__builtin_expect (l->l_flags_1 & DF_1_INITFIRST, 0)) + if (l->l_flags_1 & DF_1_INITFIRST) _dl_initfirst = l; /* Finally the file information. */ @@ -1169,13 +1208,9 @@ print_search_path (struct r_search_path_ cp[0] = '\0'; else cp[-1] = '\0'; - if (first) - { - _dl_debug_printf_c ("%s", buf); - first = 0; - } - else - _dl_debug_printf_c (":%s", buf); + + _dl_debug_printf_c (first ? "%s" : ":%s", buf); + first = 0; } ++list; @@ -1216,11 +1251,17 @@ open_verify (const char *name, struct fi [EI_OSABI] = ELFOSABI_SYSV, [EI_ABIVERSION] = 0 }; - static const struct { - ElfW(Word) vendorlen, datalen, type; + static const struct + { + ElfW(Word) vendorlen; + ElfW(Word) datalen; + ElfW(Word) type; char vendor[4]; } expected_note = { 4, 16, 1, "GNU" }; int fd; + /* Initialize it to make the compiler happy. */ + const char *errstring = NULL; + int errval = 0; /* Open the file. We always open files read-only. */ fd = __open (name, O_RDONLY); @@ -1243,8 +1284,13 @@ open_verify (const char *name, struct fi /* Now run the tests. */ if (__builtin_expect (fbp->len < (ssize_t) sizeof (ElfW(Ehdr)), 0)) - lose (errno, fd, name, NULL, NULL, - errno == 0 ? N_("file too short") : N_("cannot read file data")); + { + errval = errno; + errstring = (errval == 0 + ? N_("file too short") : N_("cannot read file data")); + call_lose: + lose (errval, fd, name, NULL, NULL, errstring); + } /* See whether the ELF header is what we expect. */ if (__builtin_expect (! VALID_ELF_HEADER (ehdr->e_ident, expected, @@ -1264,49 +1310,54 @@ open_verify (const char *name, struct fi (ELFMAG3 << (EI_MAG0 * 8))) #endif ) - lose (0, fd, name, NULL, NULL, N_("invalid ELF header")); - - if (ehdr->e_ident[EI_CLASS] != ELFW(CLASS)) + errstring = N_("invalid ELF header"); + else if (ehdr->e_ident[EI_CLASS] != ELFW(CLASS)) /* This is not a fatal error. On architectures where 32-bit and 64-bit binaries can be run this might happen. */ goto close_and_out; - - if (ehdr->e_ident[EI_DATA] != byteorder) + else if (ehdr->e_ident[EI_DATA] != byteorder) { if (BYTE_ORDER == BIG_ENDIAN) - lose (0, fd, name, NULL, NULL, - "ELF file data encoding not big-endian"); + errstring = N_("ELF file data encoding not big-endian"); else - lose (0, fd, name, NULL, NULL, - "ELF file data encoding not little-endian"); + errstring = N_("ELF file data encoding not little-endian"); } - if (ehdr->e_ident[EI_VERSION] != EV_CURRENT) - lose (0, fd, name, NULL, NULL, - N_("ELF file version ident does not match current one")); + else if (ehdr->e_ident[EI_VERSION] != EV_CURRENT) + errstring + = N_("ELF file version ident does not match current one"); /* XXX We should be able so set system specific versions which are allowed here. */ - if (!VALID_ELF_OSABI (ehdr->e_ident[EI_OSABI])) - lose (0, fd, name, NULL, NULL, N_("ELF file OS ABI invalid")); - if (!VALID_ELF_ABIVERSION (ehdr->e_ident[EI_ABIVERSION])) - lose (0, fd, name, NULL, NULL, - N_("ELF file ABI version invalid")); - lose (0, fd, name, NULL, NULL, N_("internal error")); + else if (!VALID_ELF_OSABI (ehdr->e_ident[EI_OSABI])) + errstring = N_("ELF file OS ABI invalid"); + else if (!VALID_ELF_ABIVERSION (ehdr->e_ident[EI_ABIVERSION])) + errstring = N_("ELF file ABI version invalid"); + else + /* Otherwise we don't know what went wrong. */ + errstring = N_("internal error"); + + goto call_lose; } if (__builtin_expect (ehdr->e_version, EV_CURRENT) != EV_CURRENT) - lose (0, fd, name, NULL, NULL, - N_("ELF file version does not match current one")); + { + errstring = N_("ELF file version does not match current one"); + goto call_lose; + } if (! __builtin_expect (elf_machine_matches_host (ehdr), 1)) goto close_and_out; else if (__builtin_expect (ehdr->e_phentsize, sizeof (ElfW(Phdr))) != sizeof (ElfW(Phdr))) - lose (0, fd, name, NULL, NULL, - N_("ELF file's phentsize not the expected size")); + { + errstring = N_("ELF file's phentsize not the expected size"); + goto call_lose; + } else if (__builtin_expect (ehdr->e_type, ET_DYN) != ET_DYN && __builtin_expect (ehdr->e_type, ET_EXEC) != ET_EXEC) - lose (0, fd, name, NULL, NULL, - N_("only ET_DYN and ET_EXEC can be loaded")); + { + errstring = N_("only ET_DYN and ET_EXEC can be loaded"); + goto call_lose; + } maplength = ehdr->e_phnum * sizeof (ElfW(Phdr)); if (ehdr->e_phoff + maplength <= fbp->len) @@ -1316,7 +1367,12 @@ open_verify (const char *name, struct fi phdr = alloca (maplength); __lseek (fd, SEEK_SET, ehdr->e_phoff); if (__libc_read (fd, (void *) phdr, maplength) != maplength) - lose (errno, fd, name, NULL, NULL, N_("cannot read file data")); + { + read_error: + errval = errno; + errstring = N_("cannot read file data"); + goto call_lose; + } } /* Check .note.ABI-tag if present. */ @@ -1329,8 +1385,8 @@ open_verify (const char *name, struct fi { __lseek (fd, SEEK_SET, ph->p_offset); if (__libc_read (fd, (void *) abi_note_buf, 32) != 32) - lose (errno, fd, name, NULL, NULL, - N_("cannot read file data")); + goto read_error; + abi_note = abi_note_buf; } @@ -1460,7 +1516,7 @@ open_path (const char *name, size_t name if (fd != -1) { - *realname = malloc (buflen); + *realname = (char *) malloc (buflen); if (*realname != NULL) { memcpy (*realname, buf, buflen); @@ -1566,8 +1622,11 @@ _dl_map_object (struct link_map *loader, if (l->l_rpath_dirs.dirs == NULL) { if (l->l_info[DT_RPATH] == NULL) - /* There is no path. */ - l->l_rpath_dirs.dirs = (void *) -1; + { + /* There is no path. */ + l->l_rpath_dirs.dirs = (void *) -1; + continue; + } else { /* Make sure the cache information is available. */ @@ -1575,13 +1634,10 @@ _dl_map_object (struct link_map *loader, + l->l_info[DT_RPATH]->d_un.d_val); decompose_rpath (&l->l_rpath_dirs, (const char *) ptrval, l, "RPATH"); - - if (l->l_rpath_dirs.dirs != (void *) -1) - fd = open_path (name, namelen, preloaded, - &l->l_rpath_dirs, &realname, &fb); } } - else if (l->l_rpath_dirs.dirs != (void *) -1) + + if (l->l_rpath_dirs.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs, &realname, &fb); } @@ -1600,14 +1656,22 @@ _dl_map_object (struct link_map *loader, fd = open_path (name, namelen, preloaded, &env_path_list, &realname, &fb); - /* Look at the RUNPATH information for this binary. */ - if (loader != NULL && loader->l_runpath_dirs.dirs != (void *) -1) + /* Look at the RUNPATH information for this binary. + + Note that this is no real loop. 'while' is used only to enable + us to use 'break' instead of a 'goto' to jump to the end. The + loop is always left after the first round. */ + while (fd == -1 && loader != NULL + && loader->l_runpath_dirs.dirs != (void *) -1) { if (loader->l_runpath_dirs.dirs == NULL) { if (loader->l_info[DT_RUNPATH] == NULL) - /* No RUNPATH. */ - loader->l_runpath_dirs.dirs = (void *) -1; + { + /* No RUNPATH. */ + loader->l_runpath_dirs.dirs = (void *) -1; + break; + } else { /* Make sure the cache information is available. */ @@ -1615,15 +1679,13 @@ _dl_map_object (struct link_map *loader, + loader->l_info[DT_RUNPATH]->d_un.d_val); decompose_rpath (&loader->l_runpath_dirs, (const char *) ptrval, loader, "RUNPATH"); - - if (loader->l_runpath_dirs.dirs != (void *) -1) - fd = open_path (name, namelen, preloaded, - &loader->l_runpath_dirs, &realname, &fb); } } - else if (loader->l_runpath_dirs.dirs != (void *) -1) + + if (loader->l_runpath_dirs.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &loader->l_runpath_dirs, &realname, &fb); + break; } if (fd == -1 @@ -1633,17 +1695,22 @@ _dl_map_object (struct link_map *loader, for compatibility with Linux's ldconfig program. */ const char *cached = _dl_load_cache_lookup (name); + if (cached != NULL) + { #ifdef SHARED - l = loader ?: _dl_loaded; + l = loader ?: _dl_loaded; #else - l = loader; + l = loader; #endif - if (cached) - { /* If the loader has the DF_1_NODEFLIB flag set we must not use a cache entry from any of these directories. */ - if (l && __builtin_expect (l->l_flags_1 & DF_1_NODEFLIB, 0)) + if ( +#ifndef SHARED + /* 'l' is always != NULL for dynamically linked objects. */ + l != NULL && +#endif + __builtin_expect (l->l_flags_1 & DF_1_NODEFLIB, 0)) { const char *dirp = system_dirs; unsigned int cnt = 0; @@ -1663,10 +1730,10 @@ _dl_map_object (struct link_map *loader, while (cnt < nsystem_dirs_len); } - if (cached) + if (cached != NULL) { fd = open_verify (cached, &fb); - if (__builtin_expect (fd, 0) != -1) + if (__builtin_expect (fd != -1, 1)) { realname = local_strdup (cached); if (realname == NULL) @@ -1681,7 +1748,13 @@ _dl_map_object (struct link_map *loader, /* Finally, try the default path. */ if (fd == -1 - && (l == NULL || + && ((l = loader ?: _dl_loaded) + /* 'l' is always != NULL for dynamically linked objects. */ +#ifdef SHARED + , +#else + == NULL || +#endif __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1)) && rtld_search_dirs.dirs != (void *) -1) fd = open_path (name, namelen, preloaded, &rtld_search_dirs, @@ -1720,7 +1793,7 @@ _dl_map_object (struct link_map *loader, /* Enter the new object in the list of loaded objects. */ if ((name_copy = local_strdup (name)) == NULL || (l = _dl_new_object (name_copy, name, type, loader)) == NULL) - _dl_signal_error (ENOMEM, name, + _dl_signal_error (ENOMEM, name, NULL, N_("cannot create shared object descriptor")); /* Signal that this is a faked entry. */ l->l_faked = 1; @@ -1734,7 +1807,8 @@ _dl_map_object (struct link_map *loader, return l; } else - _dl_signal_error (errno, name, N_("cannot open shared object file")); + _dl_signal_error (errno, name, NULL, + N_("cannot open shared object file")); } return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode); diff -durpN glibc-2.2.4/elf/dl-lookup.c glibc-2.2.5/elf/dl-lookup.c --- glibc-2.2.4/elf/dl-lookup.c Mon Jul 23 10:53:39 2001 +++ glibc-2.2.5/elf/dl-lookup.c Sat Sep 8 10:11:36 2001 @@ -18,6 +18,7 @@ 02111-1307 USA. */ #include +#include #include #include #include @@ -61,15 +62,6 @@ struct sym_val /* Statistics function. */ unsigned long int _dl_num_relocations; -/* During the program run we must not modify the global data of - loaded shared object simultanously in two threads. Therefore we - protect `_dl_open' and `_dl_close' in dl-close.c. - - This must be a recursive lock since the initializer function of - the loaded object might as well require a call to this function. - At this time it is not anymore a problem to modify the tables. */ -__libc_lock_define (extern, _dl_load_lock) - /* We have two different situations when looking up a simple: with or without versioning. gcc is not able to optimize a single function @@ -87,94 +79,103 @@ internal_function add_dependency (struct link_map *undef_map, struct link_map *map) { struct link_map **list; + struct link_map *runp; unsigned int act; unsigned int i; int result = 0; + /* Avoid self-references. */ + if (undef_map == map) + return 0; + /* Make sure nobody can unload the object while we are at it. */ - __libc_lock_lock (_dl_load_lock); + __libc_lock_lock_recursive (_dl_load_lock); /* Determine whether UNDEF_MAP already has a reference to MAP. First look in the normal dependencies. */ - list = undef_map->l_initfini; - - for (i = 0; list[i] != NULL; ++i) - if (list[i] == map) - break; - - if (__builtin_expect (list[i] == NULL, 1)) + if (undef_map->l_searchlist.r_list != NULL) { - /* No normal dependency. See whether we already had to add it - to the special list of dynamic dependencies. */ - list = undef_map->l_reldeps; - act = undef_map->l_reldepsact; + list = undef_map->l_initfini; - for (i = 0; i < act; ++i) + for (i = 0; list[i] != NULL; ++i) if (list[i] == map) - break; + goto out; + } - if (i == act) - { - /* The object is not yet in the dependency list. Before we add - it make sure just one more time the object we are about to - reference is still available. There is a brief period in - which the object could have been removed since we found the - definition. */ - struct link_map *runp = _dl_loaded; + /* No normal dependency. See whether we already had to add it + to the special list of dynamic dependencies. */ + list = undef_map->l_reldeps; + act = undef_map->l_reldepsact; - while (runp != NULL && runp != map) - runp = runp->l_next; + for (i = 0; i < act; ++i) + if (list[i] == map) + goto out; - if (runp != NULL) - { - /* The object is still available. Add the reference now. */ - if (__builtin_expect (act >= undef_map->l_reldepsmax, 0)) - { - /* Allocate more memory for the dependency list. Since - this can never happen during the startup phase we can - use `realloc'. */ - void *newp; + /* The object is not yet in the dependency list. Before we add + it make sure just one more time the object we are about to + reference is still available. There is a brief period in + which the object could have been removed since we found the + definition. */ + runp = _dl_loaded; + while (runp != NULL && runp != map) + runp = runp->l_next; - undef_map->l_reldepsmax += 5; - newp = realloc (undef_map->l_reldeps, - undef_map->l_reldepsmax - * sizeof(struct link_map *)); + if (runp != NULL) + { + /* The object is still available. Add the reference now. */ + if (__builtin_expect (act >= undef_map->l_reldepsmax, 0)) + { + /* Allocate more memory for the dependency list. Since this + can never happen during the startup phase we can use + `realloc'. */ + void *newp; - if (__builtin_expect (newp != NULL, 1)) - undef_map->l_reldeps = (struct link_map **) newp; - else - /* Correct the addition. */ - undef_map->l_reldepsmax -= 5; - } + undef_map->l_reldepsmax += 5; + newp = realloc (undef_map->l_reldeps, + undef_map->l_reldepsmax + * sizeof (struct link_map *)); - /* If we didn't manage to allocate memory for the list this - is no fatal mistake. We simply increment the use counter - of the referenced object and don't record the dependencies. - This means this increment can never be reverted and the - object will never be unloaded. This is semantically the - correct behaviour. */ - if (__builtin_expect (act < undef_map->l_reldepsmax, 1)) - undef_map->l_reldeps[undef_map->l_reldepsact++] = map; + if (__builtin_expect (newp != NULL, 1)) + undef_map->l_reldeps = (struct link_map **) newp; + else + /* Correct the addition. */ + undef_map->l_reldepsmax -= 5; + } - /* And increment the counter in the referenced object. */ - ++map->l_opencount; + /* If we didn't manage to allocate memory for the list this is + no fatal mistake. We simply increment the use counter of the + referenced object and don't record the dependencies. This + means this increment can never be reverted and the object + will never be unloaded. This is semantically the correct + behaviour. */ + if (__builtin_expect (act < undef_map->l_reldepsmax, 1)) + undef_map->l_reldeps[undef_map->l_reldepsact++] = map; - /* Display information if we are debugging. */ - if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0)) - _dl_debug_printf ("\ + if (map->l_searchlist.r_list != NULL) + /* And increment the counter in the referenced object. */ + ++map->l_opencount; + else + /* We have to bump the counts for all dependencies since so far + this object was only a normal or transitive dependency. + Now it might be closed with _dl_close() directly. */ + for (list = map->l_initfini; *list != NULL; ++list) + ++(*list)->l_opencount; + + /* Display information if we are debugging. */ + if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0)) + _dl_debug_printf ("\ \nfile=%s; needed by %s (relocation dependency)\n\n", - map->l_name[0] ? map->l_name : _dl_argv[0], - undef_map->l_name[0] - ? undef_map->l_name : _dl_argv[0]); - } - else - /* Whoa, that was bad luck. We have to search again. */ - result = -1; - } + map->l_name[0] ? map->l_name : _dl_argv[0], + undef_map->l_name[0] + ? undef_map->l_name : _dl_argv[0]); } + else + /* Whoa, that was bad luck. We have to search again. */ + result = -1; + out: /* Release the lock. */ - __libc_lock_unlock (_dl_load_lock); + __libc_lock_unlock_recursive (_dl_load_lock); return result; } @@ -184,14 +185,15 @@ internal_function _dl_do_lookup (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref, struct sym_val *result, struct r_scope_elem *scope, size_t i, - struct link_map *skip, int noexec, int noplt); + struct link_map *skip, int type_class); static int internal_function _dl_do_lookup_versioned (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref, struct sym_val *result, struct r_scope_elem *scope, size_t i, const struct r_found_version *const version, - struct link_map *skip, int noexec, int noplt); + struct link_map *skip, int type_class); + /* Search loaded objects' symbol tables for a definition of the symbol UNDEF_NAME. */ @@ -200,52 +202,49 @@ lookup_t internal_function _dl_lookup_symbol (const char *undef_name, struct link_map *undef_map, const ElfW(Sym) **ref, struct r_scope_elem *symbol_scope[], - int reloc_type, int explicit) + int type_class, int explicit) { - const char *reference_name = undef_map ? undef_map->l_name : NULL; - const unsigned long int hash = _dl_elf_hash (undef_name); + unsigned long int hash = _dl_elf_hash (undef_name); struct sym_val current_value = { NULL, NULL }; struct r_scope_elem **scope; int protected; - int noexec = elf_machine_lookup_noexec_p (reloc_type); - int noplt = elf_machine_lookup_noplt_p (reloc_type); ++_dl_num_relocations; /* Search the relevant loaded objects for a definition. */ for (scope = symbol_scope; *scope; ++scope) if (do_lookup (undef_name, hash, *ref, ¤t_value, *scope, 0, NULL, - noexec, noplt)) + type_class)) { /* We have to check whether this would bind UNDEF_MAP to an object in the global scope which was dynamically loaded. In this case we have to prevent the latter from being unloaded unless the UNDEF_MAP object is also unloaded. */ - if (__builtin_expect (current_value.m->l_global, 0) - && (__builtin_expect (current_value.m->l_type, lt_library) - == lt_loaded) - && undef_map != current_value.m + if (__builtin_expect (current_value.m->l_type == lt_loaded, 0) /* Don't do this for explicit lookups as opposed to implicit runtime lookups. */ - && __builtin_expect (! explicit, 1) + && ! explicit /* Add UNDEF_MAP to the dependencies. */ && add_dependency (undef_map, current_value.m) < 0) /* Something went wrong. Perhaps the object we tried to reference was just removed. Try finding another definition. */ return _dl_lookup_symbol (undef_name, undef_map, ref, symbol_scope, - reloc_type, 0); + type_class, 0); break; } if (__builtin_expect (current_value.s == NULL, 0)) { + const char *reference_name = undef_map ? undef_map->l_name : NULL; + if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) /* We could find no value for a strong reference. */ /* XXX We cannot translate the messages. */ _dl_signal_cerror (0, (reference_name && reference_name[0] ? reference_name : (_dl_argv[0] ?: "
")), + N_("relocation error"), make_string (undefined_msg, undef_name)); *ref = NULL; return 0; @@ -254,12 +253,16 @@ _dl_lookup_symbol (const char *undef_nam protected = *ref && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED; if (__builtin_expect (_dl_debug_mask & DL_DEBUG_BINDINGS, 0)) - _dl_debug_printf ("binding file %s to %s: %s symbol `%s'\n", - (reference_name && reference_name[0] - ? reference_name : (_dl_argv[0] ?: "
")), - current_value.m->l_name[0] - ? current_value.m->l_name : _dl_argv[0], - protected ? "protected" : "normal", undef_name); + { + const char *reference_name = undef_map ? undef_map->l_name : NULL; + + _dl_debug_printf ("binding file %s to %s: %s symbol `%s'\n", + (reference_name && reference_name[0] + ? reference_name : (_dl_argv[0] ?: "
")), + current_value.m->l_name[0] + ? current_value.m->l_name : _dl_argv[0], + protected ? "protected" : "normal", undef_name); + } if (__builtin_expect (protected == 0, 1)) { @@ -274,7 +277,7 @@ _dl_lookup_symbol (const char *undef_nam for (scope = symbol_scope; *scope; ++scope) if (_dl_do_lookup (undef_name, hash, *ref, &protected_value, *scope, - 0, NULL, 0, 1)) + 0, NULL, ELF_RTYPE_CLASS_PLT)) break; if (protected_value.s == NULL || protected_value.m == undef_map) @@ -315,10 +318,10 @@ _dl_lookup_symbol_skip (const char *unde assert (i < (*scope)->r_nlist); if (! _dl_do_lookup (undef_name, hash, *ref, ¤t_value, *scope, i, - skip_map, 0, 0)) + skip_map, 0)) while (*++scope) if (_dl_do_lookup (undef_name, hash, *ref, ¤t_value, *scope, 0, - skip_map, 0, 0)) + skip_map, 0)) break; if (__builtin_expect (current_value.s == NULL, 0)) @@ -350,10 +353,10 @@ _dl_lookup_symbol_skip (const char *unde if (i >= (*scope)->r_nlist || !_dl_do_lookup (undef_name, hash, *ref, &protected_value, *scope, - i, skip_map, 0, 1)) + i, skip_map, ELF_RTYPE_CLASS_PLT)) while (*++scope) if (_dl_do_lookup (undef_name, hash, *ref, &protected_value, *scope, - 0, skip_map, 0, 1)) + 0, skip_map, ELF_RTYPE_CLASS_PLT)) break; if (protected_value.s == NULL || protected_value.m == undef_map) @@ -378,15 +381,12 @@ _dl_lookup_versioned_symbol (const char struct link_map *undef_map, const ElfW(Sym) **ref, struct r_scope_elem *symbol_scope[], const struct r_found_version *version, - int reloc_type, int explicit) + int type_class, int explicit) { - const char *reference_name = undef_map ? undef_map->l_name : NULL; - const unsigned long int hash = _dl_elf_hash (undef_name); + unsigned long int hash = _dl_elf_hash (undef_name); struct sym_val current_value = { NULL, NULL }; struct r_scope_elem **scope; int protected; - int noexec = elf_machine_lookup_noexec_p (reloc_type); - int noplt = elf_machine_lookup_noplt_p (reloc_type); ++_dl_num_relocations; @@ -394,27 +394,24 @@ _dl_lookup_versioned_symbol (const char for (scope = symbol_scope; *scope; ++scope) { int res = do_lookup_versioned (undef_name, hash, *ref, ¤t_value, - *scope, 0, version, NULL, noexec, noplt); + *scope, 0, version, NULL, type_class); if (res > 0) { /* We have to check whether this would bind UNDEF_MAP to an object in the global scope which was dynamically loaded. In this case we have to prevent the latter from being unloaded unless the UNDEF_MAP object is also unloaded. */ - if (__builtin_expect (current_value.m->l_global, 0) - && (__builtin_expect (current_value.m->l_type, lt_library) - == lt_loaded) - && undef_map != current_value.m + if (__builtin_expect (current_value.m->l_type == lt_loaded, 0) /* Don't do this for explicit lookups as opposed to implicit runtime lookups. */ - && __builtin_expect (! explicit, 1) + && ! explicit /* Add UNDEF_MAP to the dependencies. */ && add_dependency (undef_map, current_value.m) < 0) /* Something went wrong. Perhaps the object we tried to reference was just removed. Try finding another definition. */ return _dl_lookup_versioned_symbol (undef_name, undef_map, ref, symbol_scope, version, - reloc_type, 0); + type_class, 0); break; } @@ -423,10 +420,13 @@ _dl_lookup_versioned_symbol (const char { /* Oh, oh. The file named in the relocation entry does not contain the needed symbol. */ + const char *reference_name = undef_map ? undef_map->l_name : NULL; + /* XXX We cannot translate the message. */ _dl_signal_cerror (0, (reference_name && reference_name[0] ? reference_name : (_dl_argv[0] ?: "
")), + N_("relocation error"), make_string ("symbol ", undef_name, ", version ", version->name, " not defined in file ", @@ -442,13 +442,18 @@ _dl_lookup_versioned_symbol (const char if (__builtin_expect (current_value.s == NULL, 0)) { if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) - /* We could find no value for a strong reference. */ - /* XXX We cannot translate the message. */ - _dl_signal_cerror (0, (reference_name && reference_name[0] - ? reference_name - : (_dl_argv[0] ?: "
")), - make_string (undefined_msg, undef_name, - ", version ", version->name ?: NULL)); + { + /* We could find no value for a strong reference. */ + const char *reference_name = undef_map ? undef_map->l_name : NULL; + + /* XXX We cannot translate the message. */ + _dl_signal_cerror (0, (reference_name && reference_name[0] + ? reference_name + : (_dl_argv[0] ?: "
")), NULL, + make_string (undefined_msg, undef_name, + ", version ", + version->name ?: NULL)); + } *ref = NULL; return 0; } @@ -456,13 +461,17 @@ _dl_lookup_versioned_symbol (const char protected = *ref && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED; if (__builtin_expect (_dl_debug_mask & DL_DEBUG_BINDINGS, 0)) - _dl_debug_printf ("binding file %s to %s: %s symbol `%s' [%s]\n", - (reference_name && reference_name[0] - ? reference_name : (_dl_argv[0] ?: "
")), - current_value.m->l_name[0] - ? current_value.m->l_name : _dl_argv[0], - protected ? "protected" : "normal", - undef_name, version->name); + { + const char *reference_name = undef_map ? undef_map->l_name : NULL; + + _dl_debug_printf ("binding file %s to %s: %s symbol `%s' [%s]\n", + (reference_name && reference_name[0] + ? reference_name : (_dl_argv[0] ?: "
")), + current_value.m->l_name[0] + ? current_value.m->l_name : _dl_argv[0], + protected ? "protected" : "normal", + undef_name, version->name); + } if (__builtin_expect (protected == 0, 1)) { @@ -477,7 +486,8 @@ _dl_lookup_versioned_symbol (const char for (scope = symbol_scope; *scope; ++scope) if (_dl_do_lookup_versioned (undef_name, hash, *ref, &protected_value, - *scope, 0, version, NULL, 0, 1)) + *scope, 0, version, NULL, + ELF_RTYPE_CLASS_PLT)) break; if (protected_value.s == NULL || protected_value.m == undef_map) @@ -517,10 +527,10 @@ _dl_lookup_versioned_symbol_skip (const assert (i < (*scope)->r_nlist); if (! _dl_do_lookup_versioned (undef_name, hash, *ref, ¤t_value, - *scope, i, version, skip_map, 0, 0)) + *scope, i, version, skip_map, 0)) while (*++scope) if (_dl_do_lookup_versioned (undef_name, hash, *ref, ¤t_value, - *scope, 0, version, skip_map, 0, 0)) + *scope, 0, version, skip_map, 0)) break; if (__builtin_expect (current_value.s == NULL, 0)) @@ -535,7 +545,8 @@ _dl_lookup_versioned_symbol_skip (const /* XXX We cannot translate the messages. */ _dl_signal_cerror (0, (reference_name && reference_name[0] ? reference_name - : (_dl_argv[0] ?: "
")), buf); + : (_dl_argv[0] ?: "
")), + NULL, buf); } *ref = NULL; return 0; @@ -566,11 +577,11 @@ _dl_lookup_versioned_symbol_skip (const if (i >= (*scope)->r_nlist || !_dl_do_lookup_versioned (undef_name, hash, *ref, &protected_value, *scope, i, version, - skip_map, 0, 1)) + skip_map, ELF_RTYPE_CLASS_PLT)) while (*++scope) if (_dl_do_lookup_versioned (undef_name, hash, *ref, &protected_value, *scope, 0, version, - skip_map, 0, 1)) + skip_map, ELF_RTYPE_CLASS_PLT)) break; if (protected_value.s == NULL || protected_value.m == undef_map) @@ -611,10 +622,10 @@ internal_function _dl_do_lookup (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref, struct sym_val *result, struct r_scope_elem *scope, size_t i, - struct link_map *skip, int noexec, int noplt) + struct link_map *skip, int type_class) { - return do_lookup (undef_name, hash, ref, result, scope, i, skip, noexec, - noplt); + return do_lookup (undef_name, hash, ref, result, scope, i, skip, + type_class); } static int @@ -623,8 +634,8 @@ _dl_do_lookup_versioned (const char *und const ElfW(Sym) *ref, struct sym_val *result, struct r_scope_elem *scope, size_t i, const struct r_found_version *const version, - struct link_map *skip, int noexec, int noplt) + struct link_map *skip, int type_class) { return do_lookup_versioned (undef_name, hash, ref, result, scope, i, - version, skip, noexec, noplt); + version, skip, type_class); } diff -durpN glibc-2.2.4/elf/dl-minimal.c glibc-2.2.5/elf/dl-minimal.c --- glibc-2.2.4/elf/dl-minimal.c Mon Jul 23 10:53:39 2001 +++ glibc-2.2.5/elf/dl-minimal.c Fri Nov 9 19:23:20 2001 @@ -111,6 +111,8 @@ void * weak_function realloc (void *ptr, size_t n) { void *new; + if (ptr == NULL) + return malloc (n); assert (ptr == alloc_last_block); alloc_ptr = alloc_last_block; new = malloc (n); diff -durpN glibc-2.2.4/elf/dl-misc.c glibc-2.2.5/elf/dl-misc.c --- glibc-2.2.4/elf/dl-misc.c Mon Jul 23 10:53:39 2001 +++ glibc-2.2.5/elf/dl-misc.c Wed Nov 7 15:57:09 2001 @@ -44,40 +44,38 @@ _dl_sysdep_open_zero_fill (void) #endif /* Read the whole contents of FILE into new mmap'd space with given - protections. *SIZEP gets the size of the file. */ + protections. *SIZEP gets the size of the file. On error MAP_FAILED + is returned. */ void * internal_function _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot) { - void *result; + void *result = MAP_FAILED; struct stat64 st; int fd = __open (file, O_RDONLY); - if (fd < 0) - return NULL; - if (__fxstat64 (_STAT_VER, fd, &st) < 0 - /* No need to map the file if it is empty. */ - || st.st_size == 0) - result = NULL; - else + if (fd >= 0) { - /* Map a copy of the file contents. */ - result = __mmap (0, st.st_size, prot, + if (__fxstat64 (_STAT_VER, fd, &st) >= 0) + { + *sizep = st.st_size; + + /* No need to map the file if it is empty. */ + if (*sizep != 0) + /* Map a copy of the file contents. */ + result = __mmap (NULL, *sizep, prot, #ifdef MAP_COPY - MAP_COPY + MAP_COPY #else - MAP_PRIVATE + MAP_PRIVATE #endif #ifdef MAP_FILE - | MAP_FILE + | MAP_FILE #endif - , fd, 0); - if (result == MAP_FAILED) - result = NULL; - else - *sizep = st.st_size; + , fd, 0); + } + __close (fd); } - __close (fd); return result; } @@ -208,6 +206,12 @@ _dl_debug_vdprintf (int fd, int tag_p, c /* Get the string argument. */ iov[niov].iov_base = va_arg (arg, char *); iov[niov].iov_len = strlen (iov[niov].iov_base); + ++niov; + break; + + case '%': + iov[niov].iov_base = (void *) fmt; + iov[niov].iov_len = 1; ++niov; break; diff -durpN glibc-2.2.4/elf/dl-object.c glibc-2.2.5/elf/dl-object.c --- glibc-2.2.4/elf/dl-object.c Mon Jul 23 10:53:39 2001 +++ glibc-2.2.5/elf/dl-object.c Thu Nov 8 14:31:53 2001 @@ -37,26 +37,37 @@ _dl_new_object (char *realname, const ch struct link_map *l; int idx; size_t libname_len = strlen (libname) + 1; - struct link_map *new = calloc (sizeof *new, 1); - struct libname_list *newname = malloc (sizeof *newname + libname_len); - if (! new || ! newname) + struct link_map *new; + struct libname_list *newname; + + new = (struct link_map *) calloc (sizeof (*new) + sizeof (*newname) + + libname_len, 1); + if (new == NULL) return NULL; + new->l_libname = newname = (struct libname_list *) (new + 1); + newname->name = (char *) memcpy (newname + 1, libname, libname_len); + /* newname->next = NULL; We use calloc therefore not necessary. */ + newname->dont_free = 1; + new->l_name = realname; - newname->name = memcpy (newname + 1, libname, libname_len); - newname->next = NULL; - new->l_libname = newname; new->l_type = type; new->l_loader = loader; /* new->l_global = 0; We use calloc therefore not necessary. */ + /* Use the 'l_scope_mem' array by default for the the 'l_scope' + information. If we need more entries we will allocate a large + array dynamically. */ + new->l_scope = new->l_scope_mem; + new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]); + /* Counter for the scopes we have to handle. */ idx = 0; if (_dl_loaded != NULL) { l = _dl_loaded; - while (l->l_next) + while (l->l_next != NULL) l = l->l_next; new->l_prev = l; /* new->l_next = NULL; Would be necessary but we use calloc. */ @@ -68,83 +79,83 @@ _dl_new_object (char *realname, const ch else _dl_loaded = new; ++_dl_nloaded; - /* This is our local scope. */ - if (loader != NULL) - { - while (loader->l_loader != NULL) - loader = loader->l_loader; - if (idx == 0 || &loader->l_searchlist != new->l_scope[0]) - new->l_scope[idx] = &loader->l_searchlist; - } - else if (idx == 0 || &new->l_searchlist != new->l_scope[0]) - new->l_scope[idx] = &new->l_searchlist; + + /* If we have no loader the new object acts as it. */ + if (loader == NULL) + loader = new; + else + /* Determine the local scope. */ + while (loader->l_loader != NULL) + loader = loader->l_loader; + + /* Insert the scope if it isn't the global scope we already added. */ + if (idx == 0 || &loader->l_searchlist != new->l_scope[0]) + new->l_scope[idx] = &loader->l_searchlist; new->l_local_scope[0] = &new->l_searchlist; /* Don't try to find the origin for the main map which has the name "". */ if (realname[0] != '\0') { + size_t realname_len = strlen (realname) + 1; char *origin; + char *cp; if (realname[0] == '/') { - /* It an absolute path. Use it. But we have to make a copy since - we strip out the trailing slash. */ - size_t len = strlen (realname) + 1; - origin = malloc (len); + /* It is an absolute path. Use it. But we have to make a + copy since we strip out the trailing slash. */ + cp = origin = (char *) malloc (realname_len); if (origin == NULL) - origin = (char *) -1; - else - memcpy (origin, realname, len); + { + origin = (char *) -1; + goto out; + } } else { - size_t realname_len = strlen (realname) + 1; - size_t len = 128 + realname_len; + size_t len = realname_len; char *result = NULL; /* Get the current directory name. */ - origin = malloc (len); - - while (origin != NULL - && (result = __getcwd (origin, len - realname_len)) == NULL - && errno == ERANGE) + origin = NULL; + do { len += 128; origin = (char *) realloc (origin, len); } + while (origin != NULL + && (result = __getcwd (origin, len - realname_len)) == NULL + && errno == ERANGE); if (result == NULL) { - /* We were not able to determine the current directory. */ - if (origin != NULL) - free (origin); + /* We were not able to determine the current directory. + Note that free(origin) is OK if origin == NULL. */ + free (origin); origin = (char *) -1; + goto out; } - else - { - /* Now append the filename. */ - char *cp = strchr (origin, '\0'); - - if (cp [-1] != '/') - *cp++ = '/'; - memcpy (cp, realname, realname_len); - } + /* Find the end of the path and see whether we have to add + a slash. */ + cp = __rawmemchr (origin, '\0'); + if (cp[-1] != '/') + *cp++ = '/'; } - if (origin != (char *) -1) - { - /* Now remove the filename and the slash. Do this even if the - string is something like "/foo" which leaves an empty string. */ - char *last = strrchr (origin, '/'); + /* Add the real file name. */ + memcpy (cp, realname, realname_len); - if (last == origin) - origin[1] = '\0'; - else - *last = '\0'; - } + /* Now remove the filename and the slash. Leave the slash if it + the name is something like "/foo". */ + cp = strrchr (origin, '/'); + if (cp == origin) + origin[1] = '\0'; + else + *cp = '\0'; + out: new->l_origin = origin; } diff -durpN glibc-2.2.4/elf/dl-open.c glibc-2.2.5/elf/dl-open.c --- glibc-2.2.4/elf/dl-open.c Sat Aug 11 18:28:49 2001 +++ glibc-2.2.5/elf/dl-open.c Sun Sep 30 15:57:52 2001 @@ -58,15 +58,6 @@ extern int _dl_lazy; /* Do we do lazy static void show_scope (struct link_map *new); #endif -/* During the program run we must not modify the global data of - loaded shared object simultanously in two threads. Therefore we - protect `_dl_open' and `_dl_close' in dl-close.c. - - This must be a recursive lock since the initializer function of - the loaded object might as well require a call to this function. - At this time it is not anymore a problem to modify the tables. */ -__libc_lock_define (extern, _dl_load_lock) - extern size_t _dl_platformlen; /* We must be carefull not to leave us in an inconsistent state. Thus we @@ -117,7 +108,7 @@ add_to_global (struct link_map *new) { _dl_global_scope_alloc = 0; nomem: - _dl_signal_error (ENOMEM, new->l_libname->name, + _dl_signal_error (ENOMEM, new->l_libname->name, NULL, N_("cannot extend global scope")); return 1; } @@ -184,7 +175,7 @@ dl_open_worker (void *a) /* DSTs must not appear in SUID/SGID programs. */ if (__libc_enable_secure) /* This is an error. */ - _dl_signal_error (0, "dlopen", + _dl_signal_error (0, "dlopen", NULL, N_("DST not allowed in SUID/SGID programs")); /* We have to find out from which object the caller is calling. */ @@ -215,7 +206,7 @@ dl_open_worker (void *a) /* If the substitution failed don't try to load. */ if (*new_file == '\0') - _dl_signal_error (0, "dlopen", + _dl_signal_error (0, "dlopen", NULL, N_("empty dynamic string token substitution")); /* Now we have a new file name. */ @@ -234,6 +225,10 @@ dl_open_worker (void *a) return; } + if (__builtin_expect (mode & __RTLD_SPROF, 0)) + /* This happens only if we load a DSO for 'sprof'. */ + return; + /* It was already open. */ if (new->l_searchlist.r_list != NULL) { @@ -304,9 +299,67 @@ dl_open_worker (void *a) l = l->l_prev; } - /* Increment the open count for all dependencies. */ + /* Increment the open count for all dependencies. If the file is + not loaded as a dependency here add the search list of the newly + loaded object to the scope. */ for (i = 0; i < new->l_searchlist.r_nlist; ++i) - ++new->l_searchlist.r_list[i]->l_opencount; + if (++new->l_searchlist.r_list[i]->l_opencount > 1 + && new->l_searchlist.r_list[i]->l_type == lt_loaded) + { + struct link_map *imap = new->l_searchlist.r_list[i]; + struct r_scope_elem **runp = imap->l_scope; + size_t cnt = 0; + + while (*runp != NULL) + { + /* This can happen if imap was just loaded, but during + relocation had l_opencount bumped because of relocation + dependency. Avoid duplicates in l_scope. */ + if (__builtin_expect (*runp == &new->l_searchlist, 0)) + break; + + ++cnt; + ++runp; + } + + if (*runp != NULL) + /* Avoid duplicates. */ + continue; + + if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0)) + { + /* The 'r_scope' array is too small. Allocate a new one + dynamically. */ + struct r_scope_elem **newp; + size_t new_size = imap->l_scope_max * 2; + + if (imap->l_scope == imap->l_scope_mem) + { + newp = (struct r_scope_elem **) + malloc (new_size * sizeof (struct r_scope_elem *)); + if (newp == NULL) + _dl_signal_error (ENOMEM, "dlopen", NULL, + N_("cannot create scope list")); + imap->l_scope = memcpy (newp, imap->l_scope, + cnt * sizeof (imap->l_scope[0])); + } + else + { + newp = (struct r_scope_elem **) + realloc (imap->l_scope, + new_size * sizeof (struct r_scope_elem *)); + if (newp == NULL) + _dl_signal_error (ENOMEM, "dlopen", NULL, + N_("cannot create scope list")); + imap->l_scope = newp; + } + + imap->l_scope_max = new_size; + } + + imap->l_scope[cnt++] = &new->l_searchlist; + imap->l_scope[cnt] = NULL; + } /* Run the initializer functions of new objects. */ _dl_init (new, __libc_argc, __libc_argv, __environ); @@ -346,10 +399,10 @@ _dl_open (const char *file, int mode, co if ((mode & RTLD_BINDING_MASK) == 0) /* One of the flags must be set. */ - _dl_signal_error (EINVAL, file, N_("invalid mode for dlopen()")); + _dl_signal_error (EINVAL, file, NULL, N_("invalid mode for dlopen()")); /* Make sure we are alone. */ - __libc_lock_lock (_dl_load_lock); + __libc_lock_lock_recursive (_dl_load_lock); args.file = file; args.mode = mode; @@ -363,7 +416,7 @@ _dl_open (const char *file, int mode, co #endif /* Release the lock. */ - __libc_lock_unlock (_dl_load_lock); + __libc_lock_unlock_recursive (_dl_load_lock); if (errstring) { @@ -405,7 +458,7 @@ _dl_open (const char *file, int mode, co free ((char *) errstring); /* Reraise the error. */ - _dl_signal_error (errcode, objname, local_errstring); + _dl_signal_error (errcode, objname, NULL, local_errstring); } #ifndef SHARED @@ -435,11 +488,11 @@ show_scope (struct link_map *new) for (cnt = 0; cnt < new->l_scope[scope_cnt]->r_nlist; ++cnt) if (*new->l_scope[scope_cnt]->r_list[cnt]->l_name) - _dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name) + _dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name); else - _dl_printf ("
", NULL); + _dl_printf ("
"); - _dl_printf ("\n", NULL); + _dl_printf ("\n"); } } #endif diff -durpN glibc-2.2.4/elf/dl-profile.c glibc-2.2.5/elf/dl-profile.c --- glibc-2.2.4/elf/dl-profile.c Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/dl-profile.c Tue Nov 6 22:26:02 2001 @@ -134,6 +134,9 @@ struct here_cg_arc_record static struct here_cg_arc_record *data; +/* Nonzero if profiling is under way. */ +static int running; + /* This is the number of entry which have been incorporated in the toset. */ static uint32_t narcs; /* This is a pointer to the object representing the number of entries @@ -142,9 +145,6 @@ static uint32_t narcs; lists. */ static volatile uint32_t *narcsp; -/* Description of the currently profiled object. */ -static long int state = GMON_PROF_OFF; - static volatile uint16_t *kcount; static size_t kcountsize; @@ -208,7 +208,7 @@ _dl_start_profile (struct link_map *map, /* Now we can compute the size of the profiling data. This is done with the same formulars as in `monstartup' (see gmon.c). */ - state = GMON_PROF_OFF; + running = 0; lowpc = ROUNDDOWN (mapstart + map->l_addr, HISTFRACTION * sizeof (HISTCOUNTER)); highpc = ROUNDUP (mapend + map->l_addr, @@ -424,7 +424,7 @@ _dl_start_profile (struct link_map *map, __profil ((void *) kcount, kcountsize, lowpc, s_scale); /* Turn on profiling. */ - state = GMON_PROF_ON; + running = 1; } @@ -435,14 +435,8 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr size_t i, fromindex; struct here_fromstruct *fromp; -#if 0 - /* XXX I think this is now not necessary anymore. */ - if (! compare_and_swap (&state, GMON_PROF_ON, GMON_PROF_BUSY)) - return; -#else - if (state != GMON_PROF_ON) + if (! running) return; -#endif /* Compute relative addresses. The shared object can be loaded at any address. The value of frompc could be anything. We cannot @@ -507,7 +501,7 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr /* If we still have no entry stop searching and insert. */ if (*topcindex == 0) { - uint_fast32_t newarc = 1 + exchange_and_add (narcsp, 1); + uint_fast32_t newarc = exchange_and_add (narcsp, 1); /* In rare cases it could happen that all entries in FROMS are occupied. So we cannot count this anymore. */ @@ -538,10 +532,5 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr atomic_add (&fromp->here->count, 1); done: -#if 0 - /* XXX See above, Shouldn't be necessary anymore. */ - state = GMON_PROF_ON; -#else ; -#endif } diff -durpN glibc-2.2.4/elf/dl-reloc.c glibc-2.2.5/elf/dl-reloc.c --- glibc-2.2.4/elf/dl-reloc.c Sat Aug 11 18:28:49 2001 +++ glibc-2.2.5/elf/dl-reloc.c Mon Nov 12 13:02:22 2001 @@ -23,14 +23,28 @@ #include #include #include +#include #include #include "dynamic-link.h" +/* Statistics function. */ +unsigned long int _dl_num_cache_relocations; + void _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[], int lazy, int consider_profiling) { + struct textrels + { + caddr_t start; + size_t len; + int prot; + struct textrels *next; + } *textrels = NULL; + /* Initialize it to make the compiler happy. */ + const char *errstring = NULL; + if (l->l_relocated) return; @@ -44,6 +58,9 @@ _dl_relocate_object (struct link_map *l, _dl_printf ("\nrelocation processing: %s%s\n", l->l_name[0] ? l->l_name : _dl_argv[0], lazy ? " (lazy)" : ""); + /* DT_TEXTREL is now in level 2 and might phase out at some time. + But we rewrite the DT_FLAGS entry to a DT_TEXTREL entry to make + testing easier and therefore it will be available at all time. */ if (__builtin_expect (l->l_info[DT_TEXTREL] != NULL, 0)) { /* Bletch. We must make read-only segments writable @@ -52,15 +69,36 @@ _dl_relocate_object (struct link_map *l, for (ph = l->l_phdr; ph < &l->l_phdr[l->l_phnum]; ++ph) if (ph->p_type == PT_LOAD && (ph->p_flags & PF_W) == 0) { - caddr_t mapstart = ((caddr_t) l->l_addr + - (ph->p_vaddr & ~(_dl_pagesize - 1))); - caddr_t mapend = ((caddr_t) l->l_addr + - ((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1) - & ~(_dl_pagesize - 1))); - if (__builtin_expect (__mprotect (mapstart, mapend - mapstart, - PROT_READ|PROT_WRITE), 0) < 0) - _dl_signal_error (errno, l->l_name, N_("\ -cannot make segment writable for relocation")); + struct textrels *newp; + + newp = (struct textrels *) alloca (sizeof (*newp)); + newp->len = (((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1) + & ~(_dl_pagesize - 1)) + - (ph->p_vaddr & ~(_dl_pagesize - 1))); + newp->start = ((ph->p_vaddr & ~(_dl_pagesize - 1)) + + (caddr_t) l->l_addr); + + if (__mprotect (newp->start, newp->len, PROT_READ|PROT_WRITE) < 0) + { + errstring = N_("cannot make segment writable for relocation"); + call_error: + _dl_signal_error (errno, l->l_name, NULL, errstring); + } + +#if (PF_R | PF_W | PF_X) == 7 && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7 + newp->prot = (PF_TO_PROT + >> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf; +#else + newp->prot = 0; + if (ph->p_flags & PF_R) + newp->prot |= PROT_READ; + if (ph->p_flags & PF_W) + newp->prot |= PROT_WRITE; + if (ph->p_flags & PF_X) + newp->prot |= PROT_EXEC; +#endif + newp->next = textrels; + textrels = newp; } } @@ -71,24 +109,49 @@ cannot make segment writable for relocat const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */ -#define RESOLVE_MAP(ref, version, flags) \ +#define RESOLVE_MAP(ref, version, r_type) \ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \ - ? ((version) != NULL && (version)->hash != 0 \ - ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, l, (ref), \ - scope, (version), (flags), 0) \ - : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref), scope, \ - (flags), 0)) \ + ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \ + && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \ + ? (++_dl_num_cache_relocations, \ + (*ref) = l->l_lookup_cache.ret, \ + l->l_lookup_cache.value) \ + : ({ lookup_t _lr; \ + int _tc = elf_machine_type_class (r_type); \ + l->l_lookup_cache.type_class = _tc; \ + l->l_lookup_cache.sym = (*ref); \ + _lr = ((version) != NULL && (version)->hash != 0 \ + ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, \ + l, (ref), scope, \ + (version), _tc, 0) \ + : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref), \ + scope, _tc, 0)); \ + l->l_lookup_cache.ret = (*ref); \ + l->l_lookup_cache.value = _lr; })) \ : l) -#define RESOLVE(ref, version, flags) \ +#define RESOLVE(ref, version, r_type) \ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \ - ? ((version) != NULL && (version)->hash != 0 \ - ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, l, (ref), \ - scope, (version), (flags), 0) \ - : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref), scope, \ - (flags), 0)) \ + ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \ + && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \ + ? (++_dl_num_cache_relocations, \ + (*ref) = l->l_lookup_cache.ret, \ + l->l_lookup_cache.value) \ + : ({ lookup_t _lr; \ + int _tc = elf_machine_type_class (r_type); \ + l->l_lookup_cache.type_class = _tc; \ + l->l_lookup_cache.sym = (*ref); \ + _lr = ((version) != NULL && (version)->hash != 0 \ + ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, \ + l, (ref), scope, \ + (version), _tc, 0) \ + : _dl_lookup_symbol (strtab + (*ref)->st_name, l, (ref), \ + scope, _tc, 0)); \ + l->l_lookup_cache.ret = (*ref); \ + l->l_lookup_cache.value = _lr; })) \ : l->l_addr) #include "dynamic-link.h" + ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling); if (__builtin_expect (consider_profiling, 0)) @@ -98,88 +161,59 @@ cannot make segment writable for relocat if it only contains lead function) the l_info[DT_PLTRELSZ] will be NULL. */ if (l->l_info[DT_PLTRELSZ] == NULL) - _dl_fatal_printf ("%s: profiler found no PLTREL in object %s\n", - _dl_argv[0] ?: "", - l->l_name); + { + errstring = N_("%s: profiler found no PLTREL in object %s\n"); + fatal: + _dl_fatal_printf (errstring, + _dl_argv[0] ?: "", + l->l_name); + } l->l_reloc_result = (ElfW(Addr) *) calloc (sizeof (ElfW(Addr)), l->l_info[DT_PLTRELSZ]->d_un.d_val); if (l->l_reloc_result == NULL) - _dl_fatal_printf ("\ -%s: profiler out of memory shadowing PLTREL of %s\n", - _dl_argv[0] ?: "", - l->l_name); + { + errstring = N_("\ +%s: profiler out of memory shadowing PLTREL of %s\n"); + goto fatal; + } } } /* Mark the object so we know this work has been done. */ l->l_relocated = 1; - /* DT_TEXTREL is now in level 2 and might phase out at some time. - But we rewrite the DT_FLAGS entry to make testing easier and - therefore it will be available at all time. */ - if (__builtin_expect (l->l_info[DT_TEXTREL] != NULL, 0)) + /* Undo the segment protection changes. */ + while (__builtin_expect (textrels != NULL, 0)) { - /* Undo the protection change we made before relocating. */ - const ElfW(Phdr) *ph; - for (ph = l->l_phdr; ph < &l->l_phdr[l->l_phnum]; ++ph) - if (ph->p_type == PT_LOAD && (ph->p_flags & PF_W) == 0) - { - caddr_t mapstart = ((caddr_t) l->l_addr + - (ph->p_vaddr & ~(_dl_pagesize - 1))); - caddr_t mapend = ((caddr_t) l->l_addr + - ((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1) - & ~(_dl_pagesize - 1))); - extern unsigned char _dl_pf_to_prot[8]; - int prot; - - if ((PF_R | PF_W | PF_X) == 7 - && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7) - prot = _dl_pf_to_prot[ph->p_flags & (PF_R | PF_X)]; - else - { - prot = 0; - if (ph->p_flags & PF_R) - prot |= PROT_READ; - if (ph->p_flags & PF_X) - prot |= PROT_EXEC; - } - - if (__builtin_expect (__mprotect (mapstart, mapend - mapstart, - prot), 0) < 0) - _dl_signal_error (errno, l->l_name, - N_("can't restore segment prot after reloc")); + if (__mprotect (textrels->start, textrels->len, textrels->prot) < 0) + { + errstring = N_("cannot restore segment prot after reloc"); + goto call_error; + } -#ifdef CLEAR_CACHE - CLEAR_CACHE (mapstart, mapend); -#endif - } + textrels = textrels->next; } } -#include "../stdio-common/_itoa.h" -#define DIGIT(b) _itoa_lower_digits[(b) & 0xf]; void internal_function -_dl_reloc_bad_type (struct link_map *map, uint_fast8_t type, int plt) +_dl_reloc_bad_type (struct link_map *map, unsigned int type, int plt) { extern const char _itoa_lower_digits[]; - if (plt) - { - /* XXX We cannot translate the message. */ - static char msg[] = "unexpected PLT reloc type 0x??"; - msg[sizeof msg - 3] = DIGIT(type >> 4); - msg[sizeof msg - 2] = DIGIT(type); - _dl_signal_error (0, map->l_name, msg); - } - else - { - /* XXX We cannot translate the message. */ - static char msg[] = "unexpected reloc type 0x??"; - msg[sizeof msg - 3] = DIGIT(type >> 4); - msg[sizeof msg - 2] = DIGIT(type); - _dl_signal_error (0, map->l_name, msg); - } +#define DIGIT(b) _itoa_lower_digits[(b) & 0xf]; + + /* XXX We cannot translate these messages. */ + static const char msg[2][32] = { "unexpected reloc type 0x", + "unexpected PLT reloc type 0x" }; + char msgbuf[sizeof (msg[0])]; + char *cp; + + cp = __stpcpy (msgbuf, msg[plt]); + *cp++ = DIGIT (type >> 4); + *cp = DIGIT (type); + + _dl_signal_error (0, map->l_name, NULL, msgbuf); } diff -durpN glibc-2.2.4/elf/dl-runtime.c glibc-2.2.5/elf/dl-runtime.c --- glibc-2.2.4/elf/dl-runtime.c Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/dl-runtime.c Wed Nov 7 13:18:43 2001 @@ -1,5 +1,5 @@ /* On-demand PLT fixup for shared objects. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001 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 @@ -42,7 +42,7 @@ function. */ #ifndef ELF_MACHINE_NO_PLT -static ElfW(Addr) __attribute__ ((unused)) +static ElfW(Addr) __attribute_used__ fixup ( # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS ELF_MACHINE_RUNTIME_FIXUP_ARGS, @@ -89,13 +89,13 @@ fixup ( result = _dl_lookup_versioned_symbol (strtab + sym->st_name, l, &sym, l->l_scope, version, - ELF_MACHINE_JMP_SLOT, 0); + ELF_RTYPE_CLASS_PLT, 0); break; } } case 0: result = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, - l->l_scope, ELF_MACHINE_JMP_SLOT, 0); + l->l_scope, ELF_RTYPE_CLASS_PLT, 0); } /* Currently result contains the base load address (or link map) @@ -105,8 +105,8 @@ fixup ( } else { - /* We already found the symbol. The module (and therefore its load - address) is also known. */ + /* We already found the symbol. The module (and therefore its load + address) is also known. */ value = l->l_addr + sym->st_value; #ifdef DL_LOOKUP_RETURNS_MAP result = l; @@ -126,7 +126,7 @@ fixup ( #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ -static ElfW(Addr) __attribute__ ((unused)) +static ElfW(Addr) __attribute_used__ profile_fixup ( #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS ELF_MACHINE_RUNTIME_FIXUP_ARGS, @@ -181,14 +181,14 @@ profile_fixup ( result = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, &sym, l->l_scope, version, - ELF_MACHINE_JMP_SLOT, + ELF_RTYPE_CLASS_PLT, 0); break; } } case 0: result = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, - l->l_scope, ELF_MACHINE_JMP_SLOT, 0); + l->l_scope, ELF_RTYPE_CLASS_PLT, 0); } /* Currently result contains the base load address (or link map) @@ -198,11 +198,11 @@ profile_fixup ( } else { - /* We already found the symbol. The module (and therefore its load - address) is also known. */ - value = l->l_addr + sym->st_value; + /* We already found the symbol. The module (and therefore its load + address) is also known. */ + value = l->l_addr + sym->st_value; #ifdef DL_LOOKUP_RETURNS_MAP - result = l; + result = l; #endif } /* And now perhaps the relocation addend. */ diff -durpN glibc-2.2.4/elf/dl-support.c glibc-2.2.5/elf/dl-support.c --- glibc-2.2.4/elf/dl-support.c Fri Jul 27 23:13:13 2001 +++ glibc-2.2.5/elf/dl-support.c Fri Aug 31 23:09:31 2001 @@ -93,8 +93,14 @@ struct r_scope_elem *_dl_main_searchlist /* Nonzero during startup. */ int _dl_starting_up = 1; +/* We expect less than a second for relocation. */ +#ifdef HP_SMALL_TIMING_AVAIL +# undef HP_TIMING_AVAIL +# define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL +#endif + /* Initial value of the CPU clock. */ -#if HP_TIMING_AVAIL +#ifndef HP_TIMING_NONAVAIL hp_timing_t _dl_cpuclock_offset; #endif @@ -133,9 +139,8 @@ static void non_dynamic_init (void) __at static void non_dynamic_init (void) { -#if HP_TIMING_AVAIL - HP_TIMING_NOW (_dl_cpuclock_offset); -#endif + if (HP_TIMING_AVAIL) + HP_TIMING_NOW (_dl_cpuclock_offset); if (!_dl_pagesize) _dl_pagesize = __getpagesize (); diff -durpN glibc-2.2.4/elf/dl-sym.c glibc-2.2.5/elf/dl-sym.c --- glibc-2.2.4/elf/dl-sym.c Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/dl-sym.c Tue Sep 4 20:41:19 2001 @@ -1,5 +1,5 @@ /* Look up a symbol in a shared object loaded by `dlopen'. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001 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 @@ -69,7 +69,7 @@ _dl_sym (void *handle, const char *name, if (! _dl_loaded || caller < _dl_loaded->l_map_start || caller >= _dl_loaded->l_map_end) - _dl_signal_error (0, NULL, N_("\ + _dl_signal_error (0, NULL, NULL, N_("\ RTLD_NEXT used in code not dynamically loaded")); } @@ -131,7 +131,7 @@ _dl_vsym (void *handle, const char *name if (! _dl_loaded || caller < _dl_loaded->l_map_start || caller >= _dl_loaded->l_map_end) - _dl_signal_error (0, NULL, N_("\ + _dl_signal_error (0, NULL, NULL, N_("\ RTLD_NEXT used in code not dynamically loaded")); } diff -durpN glibc-2.2.4/elf/dl-version.c glibc-2.2.5/elf/dl-version.c --- glibc-2.2.4/elf/dl-version.c Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/dl-version.c Wed Nov 7 15:19:14 2001 @@ -81,6 +81,9 @@ match_symbol (const char *name, ElfW(Wor const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); ElfW(Addr) def_offset; ElfW(Verdef) *def; + /* Initialize to make the compiler happy. */ + const char *errstring = NULL; + int result = 0; /* Display information about what we are doing while debugging. */ if (__builtin_expect (_dl_debug_mask & DL_DEBUG_VERSIONS, 0)) @@ -95,11 +98,12 @@ checking for version `%s' in file %s req object was linked against another version of this file. We only print a message if verbose output is requested. */ if (verbose) - /* XXX We cannot translate the messages. */ - _dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0], - make_string ("\ -no version information available (required by ", - name, ")")); + { + /* XXX We cannot translate the messages. */ + errstring = make_string ("\ +no version information available (required by ", name, ")"); + goto call_cerror; + } return 0; } @@ -116,13 +120,12 @@ no version information available (requir char buf[20]; buf[sizeof (buf) - 1] = '\0'; /* XXX We cannot translate the message. */ - _dl_signal_error (0, map->l_name[0] ? map->l_name : _dl_argv[0], - make_string ("unsupported version ", - _itoa_word (def->vd_version, - &buf[sizeof (buf) - 1], - 10, 0), - " of Verdef record")); - return 1; + errstring = make_string ("unsupported version ", + _itoa_word (def->vd_version, + &buf[sizeof (buf) - 1], 10, 0), + " of Verdef record"); + result = 1; + goto call_cerror; } /* Compare the hash values. */ @@ -149,19 +152,23 @@ no version information available (requir if (__builtin_expect (weak, 1)) { if (verbose) - /* XXX We cannot translate the message. */ - _dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0], - make_string ("weak version `", string, - "' not found (required by ", name, - ")")); + { + /* XXX We cannot translate the message. */ + errstring = make_string ("weak version `", string, + "' not found (required by ", name, ")"); + goto call_cerror; + } return 0; } /* XXX We cannot translate the message. */ - _dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0], - make_string ("version `", string, - "' not found (required by ", name, ")")); - return 1; + errstring = make_string ("version `", string, "' not found (required by ", + name, ")"); + result = 1; + call_cerror: + _dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0], NULL, + errstring); + return result; } @@ -178,6 +185,9 @@ _dl_check_map_versions (struct link_map /* We need to find out which is the highest version index used in a dependecy. */ unsigned int ndx_high = 0; + /* Initialize to make the compiler happy. */ + const char *errstring = NULL; + int errval = 0; /* If we don't have a string table, we must be ok. */ if (map->l_info[DT_STRTAB] == NULL) @@ -199,13 +209,13 @@ _dl_check_map_versions (struct link_map char buf[20]; buf[sizeof (buf) - 1] = '\0'; /* XXX We cannot translate the message. */ - _dl_signal_error (0, (*map->l_name ? map->l_name : _dl_argv[0]), - make_string ("unsupported version ", - _itoa_word (ent->vn_version, - &buf[sizeof (buf) - 1], - 10, 0), - " of Verneed record\n")); - return 1; + errstring = make_string ("unsupported version ", + _itoa_word (ent->vn_version, + &buf[sizeof (buf) - 1], 10, 0), + " of Verneed record\n"); + call_error: + _dl_signal_error (errval, (*map->l_name ? map->l_name : _dl_argv[0]), + NULL, errstring); } while (1) @@ -288,78 +298,75 @@ _dl_check_map_versions (struct link_map calloc (ndx_high + 1, sizeof (*map->l_versions)); if (__builtin_expect (map->l_versions == NULL, 0)) { - _dl_signal_error (ENOMEM, (*map->l_name ? map->l_name : _dl_argv[0]), - N_("cannot allocate version reference table")); - result = 1; + errstring = N_("cannot allocate version reference table"); + errval = ENOMEM; + goto call_error; } - else - { - /* Store the number of available symbols. */ - map->l_nversions = ndx_high + 1; - /* Compute the pointer to the version symbols. */ - map->l_versyms = - (void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); + /* Store the number of available symbols. */ + map->l_nversions = ndx_high + 1; - if (dyn != NULL) + /* Compute the pointer to the version symbols. */ + map->l_versyms = (void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); + + if (dyn != NULL) + { + ElfW(Verneed) *ent; + ent = (ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr); + while (1) { - ElfW(Verneed) *ent; - ent = (ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr); + ElfW(Vernaux) *aux; + aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux); while (1) { - ElfW(Vernaux) *aux; - aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux); - while (1) - { - ElfW(Half) ndx = aux->vna_other & 0x7fff; - map->l_versions[ndx].hash = aux->vna_hash; - map->l_versions[ndx].hidden = aux->vna_other & 0x8000; - map->l_versions[ndx].name = &strtab[aux->vna_name]; - map->l_versions[ndx].filename = &strtab[ent->vn_file]; - - if (aux->vna_next == 0) - /* No more symbols. */ - break; - - /* Advance to next symbol. */ - aux = (ElfW(Vernaux) *) ((char *) aux + aux->vna_next); - } + ElfW(Half) ndx = aux->vna_other & 0x7fff; + map->l_versions[ndx].hash = aux->vna_hash; + map->l_versions[ndx].hidden = aux->vna_other & 0x8000; + map->l_versions[ndx].name = &strtab[aux->vna_name]; + map->l_versions[ndx].filename = &strtab[ent->vn_file]; - if (ent->vn_next == 0) - /* No more dependencies. */ + if (aux->vna_next == 0) + /* No more symbols. */ break; - /* Advance to next dependency. */ - ent = (ElfW(Verneed) *) ((char *) ent + ent->vn_next); + /* Advance to next symbol. */ + aux = (ElfW(Vernaux) *) ((char *) aux + aux->vna_next); } + + if (ent->vn_next == 0) + /* No more dependencies. */ + break; + + /* Advance to next dependency. */ + ent = (ElfW(Verneed) *) ((char *) ent + ent->vn_next); } + } - /* And insert the defined versions. */ - if (def != NULL) + /* And insert the defined versions. */ + if (def != NULL) + { + ElfW(Verdef) *ent; + ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr); + while (1) { - ElfW(Verdef) *ent; - ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr); - while (1) - { - ElfW(Verdaux) *aux; - aux = (ElfW(Verdaux) *) ((char *) ent + ent->vd_aux); + ElfW(Verdaux) *aux; + aux = (ElfW(Verdaux) *) ((char *) ent + ent->vd_aux); - if ((ent->vd_flags & VER_FLG_BASE) == 0) - { - /* The name of the base version should not be - available for matching a versioned symbol. */ - ElfW(Half) ndx = ent->vd_ndx & 0x7fff; - map->l_versions[ndx].hash = ent->vd_hash; - map->l_versions[ndx].name = &strtab[aux->vda_name]; - map->l_versions[ndx].filename = NULL; - } + if ((ent->vd_flags & VER_FLG_BASE) == 0) + { + /* The name of the base version should not be + available for matching a versioned symbol. */ + ElfW(Half) ndx = ent->vd_ndx & 0x7fff; + map->l_versions[ndx].hash = ent->vd_hash; + map->l_versions[ndx].name = &strtab[aux->vda_name]; + map->l_versions[ndx].filename = NULL; + } - if (ent->vd_next == 0) - /* No more definitions. */ - break; + if (ent->vd_next == 0) + /* No more definitions. */ + break; - ent = (ElfW(Verdef) *) ((char *) ent + ent->vd_next); - } + ent = (ElfW(Verdef) *) ((char *) ent + ent->vd_next); } } } diff -durpN glibc-2.2.4/elf/do-lookup.h glibc-2.2.5/elf/do-lookup.h --- glibc-2.2.4/elf/do-lookup.h Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/do-lookup.h Sun Aug 26 15:24:08 2001 @@ -31,7 +31,7 @@ static inline int FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref, struct sym_val *result, struct r_scope_elem *scope, size_t i, ARG - struct link_map *skip, int noexec, int noplt) + struct link_map *skip, int type_class) { struct link_map **list = scope->r_list; size_t n = scope->r_nlist; @@ -56,7 +56,7 @@ FCT (const char *undef_name, unsigned lo continue; /* Don't search the executable when resolving a copy reloc. */ - if (noexec && map->l_type == lt_executable) + if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable) continue; /* Print some debugging info if wanted. */ @@ -76,8 +76,11 @@ FCT (const char *undef_name, unsigned lo { sym = &symtab[symidx]; + assert (ELF_RTYPE_CLASS_PLT == 1); if (sym->st_value == 0 || /* No value. */ - (noplt && sym->st_shndx == SHN_UNDEF)) + /* ((type_class & ELF_RTYPE_CLASS_PLT) + && (sym->st_shndx == SHN_UNDEF)) */ + (type_class & (sym->st_shndx == SHN_UNDEF))) continue; if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC) diff -durpN glibc-2.2.4/elf/do-rel.h glibc-2.2.5/elf/do-rel.h --- glibc-2.2.4/elf/do-rel.h Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/do-rel.h Fri Aug 24 11:45:23 2001 @@ -1,5 +1,5 @@ /* Do relocations for ELF dynamic linking. - Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,9 +21,13 @@ `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. */ #ifdef DO_RELA -# define elf_dynamic_do_rel elf_dynamic_do_rela -# define Rel Rela -# define elf_machine_rel elf_machine_rela +# define elf_dynamic_do_rel elf_dynamic_do_rela +# define RELCOUNT_IDX VERSYMIDX (DT_RELACOUNT) +# define Rel Rela +# define elf_machine_rel elf_machine_rela +# define elf_machine_rel_relative elf_machine_rela_relative +#else +# define RELCOUNT_IDX VERSYMIDX (DT_RELCOUNT) #endif #ifndef VERSYMIDX @@ -42,18 +46,48 @@ elf_dynamic_do_rel (struct link_map *map { const ElfW(Rel) *r = (const void *) reladdr; const ElfW(Rel) *end = (const void *) (reladdr + relsize); + ElfW(Addr) l_addr = map->l_addr; +#ifndef RTLD_BOOTSTRAP + /* We never bind lazily during ld.so bootstrap. Unfortunately gcc is + not clever enough to see through all the function calls to realize + that. */ if (lazy) { /* Doing lazy PLT relocations; they need very little info. */ - ElfW(Addr) l_addr = map->l_addr; for (; r < end; ++r) elf_machine_lazy_rel (map, l_addr, r); } else +#endif { const ElfW(Sym) *const symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); + ElfW(Word) nrelative = (map->l_info[RELCOUNT_IDX] == NULL + ? 0 : map->l_info[RELCOUNT_IDX]->d_un.d_val); + const ElfW(Rel) *relative = r; + r = MIN (r + nrelative, end); + +#ifndef RTLD_BOOTSTRAP + /* This is defined in rtld.c, but nowhere in the static libc.a; make + the reference weak so static programs can still link. This + declaration cannot be done when compiling rtld.c (i.e. #ifdef + RTLD_BOOTSTRAP) because rtld.c contains the common defn for + _dl_rtld_map, which is incompatible with a weak decl in the same + file. */ + weak_extern (_dl_rtld_map); + if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +# ifndef DO_RELA + /* Rela platforms get the offset from r_addend and this must + be copied in the relocation address. Therefore we can skip + the relative relocations only if this is for rel + relocations. */ + if (l_addr != 0) +# endif +#endif + for (; relative < r; ++relative) + elf_machine_rel_relative (l_addr, relative, + (void *) (l_addr + relative->r_offset)); if (map->l_info[VERSYMIDX (DT_VERSYM)]) { @@ -65,16 +99,18 @@ elf_dynamic_do_rel (struct link_map *map ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)]; elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], &map->l_versions[ndx], - (void *) (map->l_addr + r->r_offset)); + (void *) (l_addr + r->r_offset)); } } else for (; r < end; ++r) elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL, - (void *) (map->l_addr + r->r_offset)); + (void *) (l_addr + r->r_offset)); } } #undef elf_dynamic_do_rel #undef Rel #undef elf_machine_rel +#undef elf_machine_rel_relative +#undef RELCOUNT_IDX diff -durpN glibc-2.2.4/elf/elf.h glibc-2.2.5/elf/elf.h --- glibc-2.2.4/elf/elf.h Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/elf.h Mon Jan 7 22:28:21 2002 @@ -137,8 +137,18 @@ typedef struct /* Value must be EV_CURRENT */ #define EI_OSABI 7 /* OS ABI identification */ -#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ +#define ELFOSABI_NONE 0 /* UNIX System V ABI */ +#define ELFOSABI_SYSV 0 /* Alias. */ #define ELFOSABI_HPUX 1 /* HP-UX */ +#define ELFOSABI_NETBSD 2 /* NetBSD. */ +#define ELFOSABI_LINUX 3 /* Linux. */ +#define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ +#define ELFOSABI_AIX 7 /* IBM AIX. */ +#define ELFOSABI_IRIX 8 /* SGI Irix. */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD. */ +#define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto. */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD. */ #define ELFOSABI_ARM 97 /* ARM */ #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ @@ -316,6 +326,7 @@ typedef struct #define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ #define SHT_NUM 19 /* Number of defined types. */ #define SHT_LOOS 0x60000000 /* Start OS-specific */ +#define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */ #define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */ #define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */ #define SHT_SUNW_move 0x6ffffffa @@ -342,6 +353,8 @@ typedef struct #define SHF_LINK_ORDER (1 << 7) /* Preserve order after combining */ #define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling required */ +#define SHF_GROUP (1 << 9) /* Section is member of a group. */ +#define SHF_TLS (1 << 10) /* Section hold thread-local data. */ #define SHF_MASKOS 0x0ff00000 /* OS-specific. */ #define SHF_MASKPROC 0xf0000000 /* Processor-specific */ @@ -544,8 +557,10 @@ typedef struct #define PT_NOTE 4 /* Auxiliary information */ #define PT_SHLIB 5 /* Reserved */ #define PT_PHDR 6 /* Entry for header table itself */ -#define PT_NUM 7 /* Number of defined types */ +#define PT_TLS 7 /* Thread-local storage segment */ +#define PT_NUM 8 /* Number of defined types */ #define PT_LOOS 0x60000000 /* Start of OS-specific */ +#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ #define PT_HIOS 0x6fffffff /* End of OS-specific */ #define PT_LOPROC 0x70000000 /* Start of processor-specific */ #define PT_HIPROC 0x7fffffff /* End of processor-specific */ @@ -649,6 +664,9 @@ typedef struct Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's approach. */ #define DT_VALRNGLO 0x6ffffd00 +#define DT_GNU_PRELINKED 0x6ffffdf5 /* Prelinking timestamp */ +#define DT_GNU_CONFLICTSZ 0x6ffffdf6 /* Size of conflict section */ +#define DT_GNU_LIBLISTSZ 0x6ffffdf7 /* Size of library list */ #define DT_CHECKSUM 0x6ffffdf8 #define DT_PLTPADSZ 0x6ffffdf9 #define DT_MOVEENT 0x6ffffdfa @@ -666,6 +684,8 @@ typedef struct If any adjustment is made to the ELF object after it has been built these entries will need to be adjusted. */ #define DT_ADDRRNGLO 0x6ffffe00 +#define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */ +#define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */ #define DT_CONFIG 0x6ffffefa /* Configuration information. */ #define DT_DEPAUDIT 0x6ffffefb /* Dependency auditing. */ #define DT_AUDIT 0x6ffffefc /* Object auditing. */ @@ -1706,18 +1726,9 @@ typedef Elf32_Addr Elf32_Conflict; #define R_ALPHA_SREL16 9 /* PC relative 16 bit */ #define R_ALPHA_SREL32 10 /* PC relative 32 bit */ #define R_ALPHA_SREL64 11 /* PC relative 64 bit */ -#define R_ALPHA_OP_PUSH 12 /* OP stack push */ -#define R_ALPHA_OP_STORE 13 /* OP stack pop and store */ -#define R_ALPHA_OP_PSUB 14 /* OP stack subtract */ -#define R_ALPHA_OP_PRSHIFT 15 /* OP stack right shift */ -#define R_ALPHA_GPVALUE 16 -#define R_ALPHA_GPRELHIGH 17 -#define R_ALPHA_GPRELLOW 18 -#define R_ALPHA_IMMED_GP_16 19 -#define R_ALPHA_IMMED_GP_HI32 20 -#define R_ALPHA_IMMED_SCN_HI32 21 -#define R_ALPHA_IMMED_BR_HI32 22 -#define R_ALPHA_IMMED_LO32 23 +#define R_ALPHA_GPRELHIGH 17 /* GP relative 32 bit, high 16 bits */ +#define R_ALPHA_GPRELLOW 18 /* GP relative 32 bit, low 16 bits */ +#define R_ALPHA_GPREL16 19 /* GP relative 16 bit */ #define R_ALPHA_COPY 24 /* Copy symbol at runtime */ #define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */ #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ @@ -2038,36 +2049,36 @@ typedef Elf32_Addr Elf32_Conflict; /* Additional s390 relocs */ -#define R_390_NONE 0 /* No reloc. */ -#define R_390_8 1 /* Direct 8 bit. */ -#define R_390_12 2 /* Direct 12 bit. */ -#define R_390_16 3 /* Direct 16 bit. */ -#define R_390_32 4 /* Direct 32 bit. */ -#define R_390_PC32 5 /* PC relative 32 bit. */ -#define R_390_GOT12 6 /* 12 bit GOT offset. */ -#define R_390_GOT32 7 /* 32 bit GOT offset. */ -#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ -#define R_390_COPY 9 /* Copy symbol at runtime. */ -#define R_390_GLOB_DAT 10 /* Create GOT entry. */ -#define R_390_JMP_SLOT 11 /* Create PLT entry. */ -#define R_390_RELATIVE 12 /* Adjust by program base. */ -#define R_390_GOTOFF 13 /* 32 bit offset to GOT. */ -#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ -#define R_390_GOT16 15 /* 16 bit GOT offset. */ -#define R_390_PC16 16 /* PC relative 16 bit. */ -#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ -#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ -#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ -#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ -#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ -#define R_390_64 22 /* Direct 64 bit. */ -#define R_390_PC64 23 /* PC relative 64 bit. */ -#define R_390_GOT64 24 /* 64 bit GOT offset. */ -#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ -#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ +#define R_390_NONE 0 /* No reloc. */ +#define R_390_8 1 /* Direct 8 bit. */ +#define R_390_12 2 /* Direct 12 bit. */ +#define R_390_16 3 /* Direct 16 bit. */ +#define R_390_32 4 /* Direct 32 bit. */ +#define R_390_PC32 5 /* PC relative 32 bit. */ +#define R_390_GOT12 6 /* 12 bit GOT offset. */ +#define R_390_GOT32 7 /* 32 bit GOT offset. */ +#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ +#define R_390_COPY 9 /* Copy symbol at runtime. */ +#define R_390_GLOB_DAT 10 /* Create GOT entry. */ +#define R_390_JMP_SLOT 11 /* Create PLT entry. */ +#define R_390_RELATIVE 12 /* Adjust by program base. */ +#define R_390_GOTOFF 13 /* 32 bit offset to GOT. */ +#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ +#define R_390_GOT16 15 /* 16 bit GOT offset. */ +#define R_390_PC16 16 /* PC relative 16 bit. */ +#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ +#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ +#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ +#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ +#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ +#define R_390_64 22 /* Direct 64 bit. */ +#define R_390_PC64 23 /* PC relative 64 bit. */ +#define R_390_GOT64 24 /* 64 bit GOT offset. */ +#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ +#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ /* Keep this the last entry. */ -#define R_390_NUM 19 +#define R_390_NUM 27 /* CRIS relocations. */ #define R_CRIS_NONE 0 @@ -2092,6 +2103,27 @@ typedef Elf32_Addr Elf32_Conflict; #define R_CRIS_32_PLT_PCREL 19 #define R_CRIS_NUM 20 + +/* AMD x86-64 relocations. */ +#define R_X86_64_NONE 0 /* No reloc */ +#define R_X86_64_64 1 /* Direct 64 bit */ +#define R_X86_64_PC32 2 /* PC relative 32 bit signed */ +#define R_X86_64_GOT32 3 /* 32 bit GOT entry */ +#define R_X86_64_PLT32 4 /* 32 bit PLT address */ +#define R_X86_64_COPY 5 /* Copy symbol at runtime */ +#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ +#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */ +#define R_X86_64_RELATIVE 8 /* Adjust by program base */ +#define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative + offset to GOT */ +#define R_X86_64_32 10 /* Direct 32 bit zero extended */ +#define R_X86_64_32S 11 /* Direct 32 bit sign extended */ +#define R_X86_64_16 12 /* Direct 16 bit zero extended */ +#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */ +#define R_X86_64_8 14 /* Direct 8 bit sign extended */ +#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */ + +#define R_X86_64_NUM 16 __END_DECLS diff -durpN glibc-2.2.4/elf/ldconfig.c glibc-2.2.5/elf/ldconfig.c --- glibc-2.2.4/elf/ldconfig.c Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/ldconfig.c Sun Jan 20 19:20:46 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. @@ -260,7 +260,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Andreas Jaeger"); } @@ -699,6 +699,10 @@ search_dir (const struct dir_entry *entr { if (opt_verbose) error (0, errno, _("Cannot stat %s"), file_name); + + /* Remove stale symlinks. */ + if (strstr (direntry->d_name, ".so.")) + unlink (real_file_name); continue; } is_dir = S_ISDIR (stat_buf.st_mode); diff -durpN glibc-2.2.4/elf/ldd.bash.in glibc-2.2.5/elf/ldd.bash.in --- glibc-2.2.4/elf/ldd.bash.in Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/ldd.bash.in Sun Jan 20 19:20:46 2002 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2002 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 @@ while test $# -gt 0; do case "$1" in --vers | --versi | --versio | --version) echo 'ldd (GNU libc) @VERSION@' - echo $"Copyright (C) 1999 Free Software Foundation, Inc. + echo $"Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper." diff -durpN glibc-2.2.4/elf/loadtest.c glibc-2.2.5/elf/loadtest.c --- glibc-2.2.4/elf/loadtest.c Fri Dec 1 11:55:02 2000 +++ glibc-2.2.5/elf/loadtest.c Sat Sep 8 09:21:22 2001 @@ -5,6 +5,7 @@ #include #include #include +#include /* How many load/unload operations do we do. */ @@ -139,6 +140,23 @@ main (int argc, char *argv[]) testobjs[index].name, testobjs[index].handle); testobjs[index].handle = NULL; + + if (testobjs[0].handle == NULL + && testobjs[1].handle == NULL + && testobjs[5].handle == NULL) + { + /* In this case none of the objects above should be + present. */ + for (map = _r_debug.r_map; map != NULL; map = map->l_next) + if (map->l_type == lt_loaded + && (strstr (map->l_name, testobjs[0].name) != NULL + || strstr (map->l_name, testobjs[1].name) != NULL + || strstr (map->l_name, testobjs[5].name) != NULL)) + { + printf ("`%s' is still loaded\n", map->l_name); + result = 1; + } + } } if (debug) @@ -151,8 +169,8 @@ main (int argc, char *argv[]) { printf ("\nclose: %s: l_initfini = %p, l_versions = %p\n", testobjs[count].name, - ((struct link_map*)testobjs[count].handle)->l_initfini, - ((struct link_map*)testobjs[count].handle)->l_versions); + ((struct link_map *) testobjs[count].handle)->l_initfini, + ((struct link_map *) testobjs[count].handle)->l_versions); if (dlclose (testobjs[count].handle) != 0) { diff -durpN glibc-2.2.4/elf/reldep2.c glibc-2.2.5/elf/reldep2.c --- glibc-2.2.4/elf/reldep2.c Sat Aug 26 16:37:48 2000 +++ glibc-2.2.5/elf/reldep2.c Sat Sep 8 09:21:56 2001 @@ -53,8 +53,8 @@ main (void) exit (1); } - /* Now close the first object. If must still be around since we have - a implicit dependency. */ + /* Now close the first object. It must still be around since we have + an implicit dependency. */ if (dlclose (h1) != 0) { printf ("closing h1 failed: %s\n", dlerror ()); diff -durpN glibc-2.2.4/elf/reldep4.c glibc-2.2.5/elf/reldep4.c --- glibc-2.2.4/elf/reldep4.c Tue May 22 16:53:38 2001 +++ glibc-2.2.5/elf/reldep4.c Sat Sep 22 08:43:35 2001 @@ -4,7 +4,7 @@ #include int -main() +main (void) { int i; void *h1, *h2; diff -durpN glibc-2.2.4/elf/reldep5.c glibc-2.2.5/elf/reldep5.c --- glibc-2.2.4/elf/reldep5.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep5.c Sat Sep 22 08:44:27 2001 @@ -0,0 +1,70 @@ +#include +#include +#include +#include + +int +main (void) +{ + void *h1; + void *h2; + int (*fp) (void); + + mtrace (); + + /* Open the two objects. */ + h1 = dlopen ("reldepmod5.so", RTLD_LAZY); + if (h1 == NULL) + { + printf ("cannot open reldepmod5.so: %s\n", dlerror ()); + exit (1); + } + h2 = dlopen ("reldepmod6.so", RTLD_LAZY); + if (h2 == NULL) + { + printf ("cannot open reldepmod6.so: %s\n", dlerror ()); + exit (1); + } + + /* Get the address of the variable in reldepmod1.so. */ + fp = dlsym (h2, "bar"); + if (fp == NULL) + { + printf ("cannot get address of \"bar\": %s\n", dlerror ()); + exit (1); + } + + /* Call the function. */ + puts ("calling fp for the first time"); + if (fp () != 0) + { + puts ("function \"call_me\" returned wrong result"); + exit (1); + } + + /* Now close the first object. It must still be around since we have + an implicit dependency. */ + if (dlclose (h1) != 0) + { + printf ("closing h1 failed: %s\n", dlerror ()); + exit (1); + } + + /* Calling the function must still work. */ + puts ("calling fp for the second time"); + if (fp () != 0) + { + puts ("function \"call_me\" the second time returned wrong result"); + exit (1); + } + puts ("second call suceeded as well"); + + /* Close the second object, we are done. */ + if (dlclose (h2) != 0) + { + printf ("closing h2 failed: %s\n", dlerror ()); + exit (1); + } + + return 0; +} diff -durpN glibc-2.2.4/elf/reldep6.c glibc-2.2.5/elf/reldep6.c --- glibc-2.2.4/elf/reldep6.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep6.c Sun Sep 30 16:28:24 2001 @@ -0,0 +1,97 @@ +#include +#include +#include +#include + +typedef int (*fn)(void); +#define CHUNKS 1024 +#define REPEAT 64 + +int +main (void) +{ + void *h1; + void *h2; + fn **foopp; + fn bar, baz; + int i, j; + int n; + void *allocs[REPEAT][CHUNKS]; + + mtrace (); + + /* Open the two objects. */ + h1 = dlopen ("reldep6mod3.so", RTLD_LAZY); + if (h1 == NULL) + { + printf ("cannot open reldep6mod3.so: %s\n", dlerror ()); + exit (1); + } + + foopp = dlsym (h1, "foopp"); + if (foopp == NULL) + { + printf ("cannot get address of \"foopp\": %s\n", dlerror ()); + exit (1); + } + n = (**foopp) (); + if (n != 20) + { + printf ("(**foopp)() return %d, not return 20\n", n); + exit (1); + } + + h2 = dlopen ("reldep6mod4.so", RTLD_LAZY); + if (h2 == NULL) + { + printf ("cannot open reldep6mod4.so: %s\n", dlerror ()); + exit (1); + } + + if (dlclose (h1) != 0) + { + printf ("closing h1 failed: %s\n", dlerror ()); + exit (1); + } + + /* Clobber memory. */ + for (i = 0; i < REPEAT; ++i) + for (j = 0; j < CHUNKS; ++j) + allocs[i][j] = calloc (1, j + 1); + + bar = dlsym (h2, "bar"); + if (bar == NULL) + { + printf ("cannot get address of \"bar\": %s\n", dlerror ()); + exit (1); + } + if (bar () != 40) + { + printf ("bar() did not return 40\n"); + exit (1); + } + + baz = dlsym (h2, "baz"); + if (baz == NULL) + { + printf ("cannot get address of \"baz\": %s\n", dlerror ()); + exit (1); + } + if (baz () != 31) + { + printf ("baz() did not return 31\n"); + exit (1); + } + + for (i = 0; i < REPEAT; ++i) + for (j = 0; j < CHUNKS; ++j) + free (allocs[i][j]); + + if (dlclose (h2) != 0) + { + printf ("closing h2 failed: %s\n", dlerror ()); + exit (1); + } + + return 0; +} diff -durpN glibc-2.2.4/elf/reldep6mod0.c glibc-2.2.5/elf/reldep6mod0.c --- glibc-2.2.4/elf/reldep6mod0.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep6mod0.c Sun Sep 30 16:28:54 2001 @@ -0,0 +1,8 @@ +int bar (void); +extern void free (void *); + +int bar (void) +{ + free (0); + return 40; +} diff -durpN glibc-2.2.4/elf/reldep6mod1.c glibc-2.2.5/elf/reldep6mod1.c --- glibc-2.2.4/elf/reldep6mod1.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep6mod1.c Sun Sep 30 16:28:54 2001 @@ -0,0 +1,14 @@ +int foo (void); +int baz (void); +extern int weak (void); +asm (".weak weak"); + +int foo (void) +{ + return 20; +} + +int baz (void) +{ + return weak () + 1; +} diff -durpN glibc-2.2.4/elf/reldep6mod2.c glibc-2.2.5/elf/reldep6mod2.c --- glibc-2.2.4/elf/reldep6mod2.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep6mod2.c Sun Sep 30 16:28:54 2001 @@ -0,0 +1,3 @@ +extern int foo (void); + +void *foop = (void *) foo; diff -durpN glibc-2.2.4/elf/reldep6mod3.c glibc-2.2.5/elf/reldep6mod3.c --- glibc-2.2.4/elf/reldep6mod3.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep6mod3.c Sun Sep 30 16:28:54 2001 @@ -0,0 +1,3 @@ +extern void *foop; + +void **foopp = &foop; diff -durpN glibc-2.2.4/elf/reldep6mod4.c glibc-2.2.5/elf/reldep6mod4.c --- glibc-2.2.4/elf/reldep6mod4.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldep6mod4.c Sun Sep 30 16:28:54 2001 @@ -0,0 +1,12 @@ +int foo (void); +int weak (void); + +int foo (void) +{ + return 10; +} + +int weak (void) +{ + return 30; +} diff -durpN glibc-2.2.4/elf/reldepmod5.c glibc-2.2.5/elf/reldepmod5.c --- glibc-2.2.4/elf/reldepmod5.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldepmod5.c Sat Sep 8 09:25:56 2001 @@ -0,0 +1,5 @@ +int +foo (void) +{ + return 42; +} diff -durpN glibc-2.2.4/elf/reldepmod6.c glibc-2.2.5/elf/reldepmod6.c --- glibc-2.2.4/elf/reldepmod6.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/elf/reldepmod6.c Sat Sep 8 09:25:56 2001 @@ -0,0 +1,7 @@ +extern int call_me (void); + +int +bar (void) +{ + return call_me (); +} diff -durpN glibc-2.2.4/elf/rtld.c glibc-2.2.5/elf/rtld.c --- glibc-2.2.4/elf/rtld.c Sat Aug 11 18:28:49 2001 +++ glibc-2.2.5/elf/rtld.c Wed Nov 7 15:58:50 2001 @@ -22,6 +22,7 @@ #include #include #include /* Check if MAP_ANON is defined. */ +#include #include #include #include @@ -120,13 +121,20 @@ struct link_map _dl_rtld_map; struct libname_list _dl_rtld_libname; struct libname_list _dl_rtld_libname2; +/* We expect less than a second for relocation. */ +#ifdef HP_SMALL_TIMING_AVAIL +# undef HP_TIMING_AVAIL +# define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL +#endif + /* Variable for statistics. */ #ifndef HP_TIMING_NONAVAIL static hp_timing_t rtld_total_time; static hp_timing_t relocate_time; static hp_timing_t load_time; #endif -extern unsigned long int _dl_num_relocations; /* in dl-lookup.c */ +extern unsigned long int _dl_num_relocations; /* in dl-lookup.c */ +extern unsigned long int _dl_num_cache_relocations; /* in dl-reloc.c */ static ElfW(Addr) _dl_start_final (void *arg, struct link_map *bootstrap_map_p, hp_timing_t start_time); @@ -134,10 +142,10 @@ static ElfW(Addr) _dl_start_final (void #ifdef RTLD_START RTLD_START #else -#error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START" +# error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START" #endif -static ElfW(Addr) +static ElfW(Addr) __attribute_used__ _dl_start (void *arg) { struct link_map bootstrap_map; @@ -546,6 +554,8 @@ of this helper program; chances are you _dl_loaded->l_map_end = 0; /* Perhaps the executable has no PT_LOAD header entries at all. */ _dl_loaded->l_map_start = ~0; + /* We opened the file, account for it. */ + ++_dl_loaded->l_opencount; /* Scan the program header table for the dynamic section. */ for (ph = phdr; ph < &phdr[phnum]; ++ph) @@ -700,7 +710,7 @@ of this helper program; chances are you /* Read the contents of the file. */ file = _dl_sysdep_read_whole_file ("/etc/ld.so.preload", &file_size, PROT_READ | PROT_WRITE); - if (__builtin_expect (file != NULL, 0)) + if (__builtin_expect (file != MAP_FAILED, 0)) { /* Parse the file. It contains names of libraries to be loaded, separated by white spaces or `:'. It may also contain @@ -893,7 +903,7 @@ of this helper program; chances are you result = _dl_lookup_symbol (_dl_argv[i], _dl_loaded, &ref, _dl_loaded->l_scope, - ELF_MACHINE_JMP_SLOT, 1); + ELF_RTYPE_CLASS_PLT, 1); loadbase = LOOKUP_VALUE_ADDRESS (result); @@ -1159,7 +1169,38 @@ static int any_debug; static void process_dl_debug (const char *dl_debug) { + /* When adding new entries make sure that the maximal length of a name + is correctly handled in the LD_DEBUG_HELP code below. */ + static const struct + { + const char name[11]; + const char helptext[41]; + unsigned short int mask; + } debopts[] = + { + { "libs", "display library search paths", + DL_DEBUG_LIBS | DL_DEBUG_IMPCALLS }, + { "reloc", "display relocation processing", + DL_DEBUG_RELOC | DL_DEBUG_IMPCALLS }, + { "files", "display progress for input file", + DL_DEBUG_FILES | DL_DEBUG_IMPCALLS }, + { "symbols", "display symbol table processing", + DL_DEBUG_SYMBOLS | DL_DEBUG_IMPCALLS }, + { "bindings", "display information about symbol binding", + DL_DEBUG_BINDINGS | DL_DEBUG_IMPCALLS }, + { "versions", "display version dependencies", + DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS }, + { "all", "all previous options combined", + DL_DEBUG_LIBS | DL_DEBUG_RELOC | DL_DEBUG_FILES | DL_DEBUG_SYMBOLS + | DL_DEBUG_BINDINGS | DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS }, + { "statistics", "display relocation statistics", + DL_DEBUG_STATISTICS }, + { "help", "display this help message and exit", + DL_DEBUG_HELP }, + }; +#define ndebopts (sizeof (debopts) / sizeof (debopts[0])) size_t len; + #define separators " ,:" do { @@ -1168,115 +1209,48 @@ process_dl_debug (const char *dl_debug) dl_debug += strspn (dl_debug, separators); if (*dl_debug != '\0') { - len = strcspn (dl_debug, separators); - - switch (len) - { - case 3: - /* This option is not documented since it is not generally - useful. */ - if (memcmp (dl_debug, "all", 3) == 0) - { - _dl_debug_mask = (DL_DEBUG_LIBS | DL_DEBUG_IMPCALLS - | DL_DEBUG_RELOC | DL_DEBUG_FILES - | DL_DEBUG_SYMBOLS | DL_DEBUG_BINDINGS - | DL_DEBUG_VERSIONS); - any_debug = 1; - continue; - } - break; - - case 4: - if (memcmp (dl_debug, "help", 4) == 0) - { - _dl_printf ("\ -Valid options for the LD_DEBUG environment variable are:\n\ -\n\ - bindings display information about symbol binding\n\ - files display processing of files and libraries\n\ - help display this help message and exit\n\ - libs display library search paths\n\ - reloc display relocation processing\n\ - statistics display relocation statistics\n\ - symbols display symbol table processing\n\ - versions display version dependencies\n\ -\n\ -To direct the debugging output into a file instead of standard output\n\ -a filename can be specified using the LD_DEBUG_OUTPUT environment variable.\n"); - _exit (0); - } - - if (memcmp (dl_debug, "libs", 4) == 0) - { - _dl_debug_mask |= DL_DEBUG_LIBS | DL_DEBUG_IMPCALLS; - any_debug = 1; - continue; - } - break; + size_t cnt; - case 5: - if (memcmp (dl_debug, "reloc", 5) == 0) - { - _dl_debug_mask |= DL_DEBUG_RELOC | DL_DEBUG_IMPCALLS; - any_debug = 1; - continue; - } + len = strcspn (dl_debug, separators); - if (memcmp (dl_debug, "files", 5) == 0) - { - _dl_debug_mask |= DL_DEBUG_FILES | DL_DEBUG_IMPCALLS; - any_debug = 1; - continue; - } - break; + for (cnt = 0; cnt < ndebopts; ++cnt) + if (strncmp (dl_debug, debopts[cnt].name, len) == 0 + && debopts[cnt].name[len] == '\0') + { + _dl_debug_mask |= debopts[cnt].mask; + break; + } - case 7: - if (memcmp (dl_debug, "symbols", 7) == 0) - { - _dl_debug_mask |= DL_DEBUG_SYMBOLS | DL_DEBUG_IMPCALLS; - any_debug = 1; - continue; - } + if (cnt == ndebopts) + { + /* Display a warning and skip everything until next + separator. */ + char *copy = strndupa (dl_debug, len); + _dl_error_printf ("\ +warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy); break; + } + } + } + while (*(dl_debug += len) != '\0'); - case 8: - if (memcmp (dl_debug, "bindings", 8) == 0) - { - _dl_debug_mask |= DL_DEBUG_BINDINGS | DL_DEBUG_IMPCALLS; - any_debug = 1; - continue; - } - - if (memcmp (dl_debug, "versions", 8) == 0) - { - _dl_debug_mask |= DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS; - any_debug = 1; - continue; - } - break; + if (_dl_debug_mask & DL_DEBUG_HELP) + { + size_t cnt; - case 10: - if (memcmp (dl_debug, "statistics", 10) == 0) - { - _dl_debug_mask |= DL_DEBUG_STATISTICS; - continue; - } - break; + _dl_printf ("\ +Valid options for the LD_DEBUG environment variable are:\n\n"); - default: - break; - } + for (cnt = 0; cnt < ndebopts; ++cnt) + _dl_printf (" %s%s %s\n", debopts[cnt].name, + " " + strlen (debopts[cnt].name) - 3, + debopts[cnt].helptext); - { - /* Display a warning and skip everything until next separator. */ - char *startp = strndupa (dl_debug, len); - _dl_error_printf ("\ -warning: debug option `%s' unknown; try LD_DEBUG=help\n", startp); - break; - } - } + _dl_printf ("\n\ +To direct the debugging output into a file instead of standard output\n\ +a filename can be specified using the LD_DEBUG_OUTPUT environment variable.\n"); + _exit (0); } - while (*(dl_debug += len) != '\0'); } /* Process all environments variables the dynamic linker must recognize. @@ -1293,7 +1267,7 @@ process_envvars (enum mode *modep) char *debug_output = NULL; /* This is the default place for profiling data file. */ - _dl_profile_output = __libc_enable_secure ? "/var/profile" : "/var/tmp"; + _dl_profile_output = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; while ((envline = _dl_next_ld_env_entry (&runp)) != NULL) { @@ -1335,7 +1309,7 @@ process_envvars (enum mode *modep) } /* Which shared object shall be profiled. */ - if (memcmp (envline, "PROFILE", 7) == 0) + if (memcmp (envline, "PROFILE", 7) == 0 && envline[8] != '\0') _dl_profile = &envline[8]; break; @@ -1392,12 +1366,9 @@ process_envvars (enum mode *modep) case 14: /* Where to place the profiling data file. */ if (!__libc_enable_secure - && memcmp (envline, "PROFILE_OUTPUT", 14) == 0) - { - _dl_profile_output = &envline[15]; - if (*_dl_profile_output == '\0') - _dl_profile_output = "/var/tmp"; - } + && memcmp (envline, "PROFILE_OUTPUT", 14) == 0 + && envline[15] != '\0') + _dl_profile_output = &envline[15]; break; case 20: @@ -1416,47 +1387,35 @@ process_envvars (enum mode *modep) } } + /* The caller wants this information. */ + *modep = mode; + /* Extra security for SUID binaries. Remove all dangerous environment variables. */ if (__builtin_expect (__libc_enable_secure, 0)) { - static const char *unsecure_envvars[] = - { - UNSECURE_ENVVARS, + static const char unsecure_envvars[] = #ifdef EXTRA_UNSECURE_ENVVARS EXTRA_UNSECURE_ENVVARS #endif - }; - size_t cnt; - - if (preloadlist != NULL) - unsetenv ("LD_PRELOAD"); - if (library_path != NULL) - unsetenv ("LD_LIBRARY_PATH"); - if (_dl_origin_path != NULL) - unsetenv ("LD_ORIGIN_PATH"); - if (debug_output != NULL) - unsetenv ("LD_DEBUG_OUTPUT"); - if (_dl_profile != NULL) - unsetenv ("LD_PROFILE"); + UNSECURE_ENVVARS; + const char *nextp; - for (cnt = 0; - cnt < sizeof (unsecure_envvars) / sizeof (unsecure_envvars[0]); - ++cnt) - unsetenv (unsecure_envvars[cnt]); + nextp = unsecure_envvars; + do + { + unsetenv (nextp); + nextp = (char *) rawmemchr (nextp, '\0') + 1; + } + while (*nextp != '\0'); if (__access ("/etc/suid-debug", F_OK) != 0) unsetenv ("MALLOC_CHECK_"); } - - /* The name of the object to profile cannot be empty. */ - if (_dl_profile != NULL && *_dl_profile == '\0') - _dl_profile = NULL; - /* If we have to run the dynamic linker in debugging mode and the LD_DEBUG_OUTPUT environment variable is given, we write the debug messages to this file. */ - if (any_debug && debug_output != NULL && !__libc_enable_secure) + else if (any_debug && debug_output != NULL) { #ifdef O_NOFOLLOW const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW; @@ -1477,8 +1436,6 @@ process_envvars (enum mode *modep) /* We use standard output if opening the file failed. */ _dl_debug_fd = STDOUT_FILENO; } - - *modep = mode; } @@ -1504,7 +1461,7 @@ print_statistics (void) { char pbuf[30]; HP_TIMING_PRINT (buf, sizeof (buf), relocate_time); - cp = _itoa_word ((1000 * relocate_time) / rtld_total_time, + cp = _itoa_word ((1000ULL * relocate_time) / rtld_total_time, pbuf + sizeof (pbuf), 10, 0); wp = pbuf; switch (pbuf + sizeof (pbuf) - cp) @@ -1518,12 +1475,14 @@ print_statistics (void) *wp++ = *cp++; } *wp = '\0'; - _dl_debug_printf (" time needed for relocation: %s (%s)\n", + _dl_debug_printf (" time needed for relocation: %s (%s%%)\n", buf, pbuf); } #endif _dl_debug_printf (" number of relocations: %lu\n", _dl_num_relocations); + _dl_debug_printf (" number of relocations from cache: %lu\n", + _dl_num_cache_relocations); #ifndef HP_TIMING_NONAVAIL /* Time spend while loading the object and the dependencies. */ @@ -1531,7 +1490,7 @@ print_statistics (void) { char pbuf[30]; HP_TIMING_PRINT (buf, sizeof (buf), load_time); - cp = _itoa_word ((1000 * load_time) / rtld_total_time, + cp = _itoa_word ((1000ULL * load_time) / rtld_total_time, pbuf + sizeof (pbuf), 10, 0); wp = pbuf; switch (pbuf + sizeof (pbuf) - cp) @@ -1545,7 +1504,7 @@ print_statistics (void) *wp++ = *cp++; } *wp = '\0'; - _dl_debug_printf (" time needed to load objects: %s (%s)\n", + _dl_debug_printf (" time needed to load objects: %s (%s%%)\n", buf, pbuf); } #endif diff -durpN glibc-2.2.4/elf/soinit.c glibc-2.2.5/elf/soinit.c --- glibc-2.2.4/elf/soinit.c Fri Feb 9 10:04:04 2001 +++ glibc-2.2.5/elf/soinit.c Thu Nov 15 17:05:54 2001 @@ -4,6 +4,7 @@ calling those lists of functions. */ #include +#include #ifdef HAVE_DWARF2_UNWIND_INFO_STATIC # include @@ -29,7 +30,10 @@ static char __EH_FRAME_BEGIN__[] = { }; # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC extern void __register_frame_info (const void *, struct object *); +extern void __register_frame_info_bases (const void *, struct object *, + void *, void *); extern void __deregister_frame_info (const void *); +extern void __deregister_frame_info_bases (const void *); # else extern void __register_frame (const void *); extern void __deregister_frame (const void *); @@ -47,7 +51,23 @@ __libc_global_ctors (void) # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC { static struct object ob; +# if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA + void *tbase, *dbase; + +# ifdef CRT_GET_RFIB_TEXT + CRT_GET_RFIB_TEXT (tbase); +# else + tbase = NULL; +# endif +# ifdef CRT_GET_RFIB_DATA + CRT_GET_RFIB_DATA (dbase); +# else + dbase = NULL; +# endif + __register_frame_info_bases (__EH_FRAME_BEGIN__, &ob, tbase, dbase); +# else __register_frame_info (__EH_FRAME_BEGIN__, &ob); +# endif } # else __register_frame (__EH_FRAME_BEGIN__); @@ -66,7 +86,11 @@ _fini (void) run_hooks (__DTOR_LIST__); #ifdef HAVE_DWARF2_UNWIND_INFO # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC +# if defined CRT_GET_RFIB_TEXT || defined CRT_GET_RFIB_DATA + __deregister_frame_info_bases (__EH_FRAME_BEGIN__); +# else __deregister_frame_info (__EH_FRAME_BEGIN__); +# endif # else __deregister_frame (__EH_FRAME_BEGIN__); # endif diff -durpN glibc-2.2.4/elf/sprof.c glibc-2.2.5/elf/sprof.c --- glibc-2.2.4/elf/sprof.c Mon Jul 23 10:53:40 2001 +++ glibc-2.2.5/elf/sprof.c Sun Jan 20 19:20:47 2002 @@ -1,5 +1,5 @@ /* Read and display shared object profiling data. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -264,19 +264,13 @@ main (int argc, char *argv[]) if (profdata == NULL) { char *newp; + const char *soname; + size_t soname_len; - if (shobj_handle->soname == NULL) - { - unload_shobj (shobj_handle); - - error (EXIT_FAILURE, 0, _("\ -no filename for profiling data given and shared object `%s' has no soname"), - shobj); - } - - newp = (char *) alloca (strlen (shobj_handle->soname) - + sizeof ".profile"); - stpcpy (stpcpy (newp, shobj_handle->soname), ".profile"); + soname = shobj_handle->soname ?: basename (shobj); + soname_len = strlen (soname); + newp = (char *) alloca (soname_len + sizeof ".profile"); + stpcpy (mempcpy (newp, soname, soname_len), ".profile"); profdata = newp; } @@ -357,7 +351,7 @@ Copyright (C) %s Free Software Foundatio This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ "), - "2001"); + "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } @@ -394,11 +388,11 @@ load_shobj (const char *name) char *load_name = (char *) alloca (strlen (name) + 3); stpcpy (stpcpy (load_name, "./"), name); - map = (struct link_map *) dlopen (load_name, RTLD_LAZY); + map = (struct link_map *) dlopen (load_name, RTLD_LAZY | __RTLD_SPROF); } if (map == NULL) { - map = (struct link_map *) dlopen (name, RTLD_LAZY); + map = (struct link_map *) dlopen (name, RTLD_LAZY | __RTLD_SPROF); if (map == NULL) { error (0, errno, _("failed to load shared object `%s'"), name); diff -durpN glibc-2.2.4/gmon/gmon.c glibc-2.2.5/gmon/gmon.c --- glibc-2.2.4/gmon/gmon.c Mon Mar 26 20:52:50 2001 +++ glibc-2.2.5/gmon/gmon.c Fri Aug 17 00:57:23 2001 @@ -43,6 +43,10 @@ #include #include +#ifdef USE_IN_LIBIO +# include +#endif + struct __bb *__bb_head; /* Head of basic-block list or NULL. */ struct gmonparam _gmonparam = { GMON_PROF_OFF }; @@ -53,7 +57,7 @@ struct gmonparam _gmonparam = { GMON_PRO static int s_scale; #define SCALE_1_TO_1 0x10000L -#define ERR(s) __write(2, s, sizeof(s) - 1) +#define ERR(s) __write (STDERR_FILENO, s, sizeof (s) - 1) void moncontrol __P ((int mode)); void __moncontrol __P ((int mode)); @@ -331,8 +335,14 @@ write_gmon (void) { char buf[300]; int errnum = errno; - fprintf (stderr, "_mcleanup: gmon.out: %s\n", - __strerror_r (errnum, buf, sizeof buf)); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"_mcleanup: gmon.out: %s\n", + __strerror_r (errnum, buf, sizeof buf)); + else +#endif + fprintf (stderr, "_mcleanup: gmon.out: %s\n", + __strerror_r (errnum, buf, sizeof buf)); return; } } diff -durpN glibc-2.2.4/hurd/Versions glibc-2.2.5/hurd/Versions --- glibc-2.2.4/hurd/Versions Fri Apr 7 12:09:22 2000 +++ glibc-2.2.5/hurd/Versions Sat Dec 22 12:51:27 2001 @@ -135,6 +135,20 @@ libc { # h* hurd_directory_name_split; } + GLIBC_2.2.5 { + # These always existed as inlines but the real functions were not exported. + __hurd_fail; + _hurd_self_sigstate; + + # Same for these "quasi-internal" functions + _hurd_port_init; + _hurd_port_set; + + # internal symbols used by other libraries (e.g. librt) + _hurd_raise_signal; + _hurdsig_interrupt_timeout; + _hurdsig_fault_preemptor; _hurdsig_fault_env; + } %if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) HURD_CTHREADS_0.3 { diff -durpN glibc-2.2.4/hurd/fopenport.c glibc-2.2.5/hurd/fopenport.c --- glibc-2.2.4/hurd/fopenport.c Mon Jul 23 10:53:41 2001 +++ glibc-2.2.5/hurd/fopenport.c Tue Nov 13 02:06:41 2001 @@ -101,7 +101,10 @@ closeio (void *cookie) return 0; } -#ifndef USE_IN_LIBIO +#ifdef USE_IN_LIBIO +#include "../libio/libioP.h" +#define fopencookie _IO_fopencookie +#else #define cookie_io_functions_t __io_functions #endif static const cookie_io_functions_t funcsio = @@ -111,7 +114,7 @@ static const cookie_io_functions_t funcs /* Open a stream on PORT. MODE is as for fopen. */ FILE * -fopenport (mach_port_t port, const char *mode) +__fopenport (mach_port_t port, const char *mode) { int pflags; int needflags; @@ -150,3 +153,4 @@ fopenport (mach_port_t port, const char return fopencookie ((void *) port, mode, funcsio); } +weak_alias (__fopenport, fopenport) diff -durpN glibc-2.2.4/hurd/hurd.h glibc-2.2.5/hurd/hurd.h --- glibc-2.2.4/hurd/hurd.h Mon Jul 23 10:53:41 2001 +++ glibc-2.2.5/hurd/hurd.h Sun Jan 20 19:20:51 2002 @@ -43,7 +43,11 @@ #include -_EXTERN_INLINE int +#ifndef _HURD_H_EXTERN_INLINE +#define _HURD_H_EXTERN_INLINE extern __inline +#endif + +_HURD_H_EXTERN_INLINE int __hurd_fail (error_t err) { switch (err) @@ -57,13 +61,16 @@ __hurd_fail (error_t err) case KERN_NO_SPACE: err = ENOMEM; break; + case KERN_INVALID_ARGUMENT: err = EINVAL; break; case 0: return 0; + default: + break; } errno = err; @@ -75,7 +82,7 @@ __hurd_fail (error_t err) extern int _hurd_exec_flags; /* Flags word passed in exec_startup. */ extern struct hurd_port *_hurd_ports; extern unsigned int _hurd_nports; -extern volatile mode_t _hurd_umask; +extern mode_t _hurd_umask; extern sigset_t _hurdsig_traced; /* Shorthand macro for internal library code referencing _hurd_ports (see diff -durpN glibc-2.2.4/hurd/hurdlookup.c glibc-2.2.5/hurd/hurdlookup.c --- glibc-2.2.4/hurd/hurdlookup.c Mon Aug 13 15:00:47 2001 +++ glibc-2.2.5/hurd/hurdlookup.c Wed Aug 22 16:12:51 2001 @@ -63,6 +63,9 @@ __hurd_file_name_lookup (error_t (*use_i if (! lookup) lookup = __dir_lookup; + if (file_name[0] == '\0') + return ENOENT; + startport = (file_name[0] == '/') ? INIT_PORT_CRDIR : INIT_PORT_CWDIR; while (file_name[0] == '/') file_name++; diff -durpN glibc-2.2.4/hurd/hurdmalloc.c glibc-2.2.5/hurd/hurdmalloc.c --- glibc-2.2.4/hurd/hurdmalloc.c Sat Apr 7 14:02:34 2001 +++ glibc-2.2.5/hurd/hurdmalloc.c Tue Sep 18 20:04:09 2001 @@ -1,8 +1,6 @@ #include #include -#define bcopy(s,d,n) memcpy ((d), (s), (n)) /* No overlap handling. */ - #include "hurdmalloc.h" /* XXX see that file */ #include @@ -37,6 +35,10 @@ /* * HISTORY * $Log: hurdmalloc.c,v $ + * Revision 1.15 2001/09/19 03:04:09 drepper + * (bcopy): Removed. + * (realloc): Replace bcopy with memcpy. + * * Revision 1.14 2001/04/01 05:03:14 roland * 2001-03-11 Roland McGrath * @@ -422,8 +424,8 @@ realloc(old_base, new_size) */ new_base = malloc(new_size); if (new_base) - bcopy(old_base, new_base, - (int) (old_size < new_size ? old_size : new_size)); + memcpy (new_base, old_base, + (int) (old_size < new_size ? old_size : new_size)); if (new_base || new_size == 0) /* Free OLD_BASE, but only if the malloc didn't fail. */ diff -durpN glibc-2.2.4/hurd/hurdselect.c glibc-2.2.5/hurd/hurdselect.c --- glibc-2.2.4/hurd/hurdselect.c Mon Jul 23 10:53:41 2001 +++ glibc-2.2.5/hurd/hurdselect.c Sun Oct 28 14:10:26 2001 @@ -1,5 +1,6 @@ /* Guts of both `select' and `poll' for Hurd. - Copyright (C) 1991,92,93,94,95,96,97,98, 99 Free Software Foundation, Inc. + Copyright (C) 1991,92,93,94,95,96,97,98,99,2001 + 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 @@ -395,15 +396,18 @@ _hurd_select (int nfds, /* Fill in the `revents' members of the user's array. */ for (i = 0; i < nfds; ++i) { - const int type = d[i].type; + int type = d[i].type; int_fast16_t revents = 0; - if (type & SELECT_READ) - revents |= POLLIN; - if (type & SELECT_WRITE) - revents |= POLLOUT; - if (type & SELECT_URG) - revents |= POLLPRI; + if (type & SELECT_RETURNED) + { + if (type & SELECT_READ) + revents |= POLLIN; + if (type & SELECT_WRITE) + revents |= POLLOUT; + if (type & SELECT_URG) + revents |= POLLPRI; + } pollfds[i].revents = revents; } diff -durpN glibc-2.2.4/hurd/path-lookup.c glibc-2.2.5/hurd/path-lookup.c --- glibc-2.2.4/hurd/path-lookup.c Mon Jul 23 10:53:42 2001 +++ glibc-2.2.5/hurd/path-lookup.c Tue Sep 18 20:04:44 2001 @@ -55,10 +55,10 @@ file_name_path_scan (const char *file_na if (pfx_len == 0) pfxed_name[pfx_len++] = '.'; else - bcopy (path, pfxed_name, pfx_len); + memcpy (pfxed_name, path, pfx_len); if (pfxed_name[pfx_len - 1] != '/') pfxed_name[pfx_len++] = '/'; - bcopy (file_name, pfxed_name + pfx_len, file_name_len + 1); + memcpy (pfxed_name + pfx_len, file_name, file_name_len + 1); err = (*fun)(pfxed_name); if (err == 0) diff -durpN glibc-2.2.4/hurd/privports.c glibc-2.2.5/hurd/privports.c --- glibc-2.2.4/hurd/privports.c Mon Jul 23 10:53:42 2001 +++ glibc-2.2.5/hurd/privports.c Fri Nov 9 16:11:33 2001 @@ -28,7 +28,8 @@ kern_return_t __get_privileged_ports (host_priv_t *host_priv_ptr, device_t *device_master_ptr) { - if (! _hurd_host_priv) + if ((host_priv_ptr && _hurd_host_priv == MACH_PORT_NULL) + || (device_master_ptr && _hurd_device_master == MACH_PORT_NULL)) { error_t err; @@ -47,16 +48,24 @@ __get_privileged_ports (host_priv_t *hos if (host_priv_ptr) { - __mach_port_mod_refs (mach_task_self (), - _hurd_host_priv, MACH_PORT_RIGHT_SEND, 1); + error_t err = _hurd_host_priv == MACH_PORT_NULL ? 0 + : __mach_port_mod_refs (mach_task_self (), + _hurd_host_priv, MACH_PORT_RIGHT_SEND, +1); + if (err) + return err; *host_priv_ptr = _hurd_host_priv; } + if (device_master_ptr) { - __mach_port_mod_refs (mach_task_self (), - _hurd_device_master, MACH_PORT_RIGHT_SEND, 1); + error_t err = _hurd_device_master == MACH_PORT_NULL ? 0 + : __mach_port_mod_refs (mach_task_self (), + _hurd_device_master, MACH_PORT_RIGHT_SEND, +1); + if (err) + return err; *device_master_ptr = _hurd_device_master; } + return KERN_SUCCESS; } weak_alias (__get_privileged_ports, get_privileged_ports) diff -durpN glibc-2.2.4/hurd/set-host.c glibc-2.2.5/hurd/set-host.c --- glibc-2.2.4/hurd/set-host.c Mon Jul 23 10:53:42 2001 +++ glibc-2.2.5/hurd/set-host.c Sun Nov 4 02:31:13 2001 @@ -1,5 +1,5 @@ /* Set a host configuration item kept as the whole contents of a file. - Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1996,97,99,2001 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 @@ -34,7 +34,7 @@ _hurd_set_host_config (const char *item, return -1; /* Create a new node. */ - err = __dir_mkfile (dir, O_CREAT|O_TRUNC, 0644, &new); + err = __dir_mkfile (dir, O_WRONLY, 0644, &new); if (! err) { /* Write the contents. */ diff -durpN glibc-2.2.4/iconv/Makefile glibc-2.2.5/iconv/Makefile --- glibc-2.2.4/iconv/Makefile Fri Jul 27 23:13:13 2001 +++ glibc-2.2.5/iconv/Makefile Sat Aug 25 09:19:15 2001 @@ -40,7 +40,7 @@ vpath %.c ../locale/programs iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \ dummy-repertoire simple-hash xstrdup xmalloc iconvconfig-modules = strtab xmalloc -extra-objs = $(iconv_prog-modules:=.o) +extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o) CFLAGS-iconv_prog.c = -I../locale/programs CFLAGS-iconv_charmap.c = -I../locale/programs CFLAGS-dummy-repertoire.c = -I../locale/programs @@ -57,7 +57,7 @@ others = iconv_prog iconvconfig install-others = $(inst_bindir)/iconv install-sbin = iconvconfig -CFLAGS-gconv_cache.c = -DGCONV_DIR='"$(gconvdir)"' +CFLAGS-gconv_cache.c += -DGCONV_DIR='"$(gconvdir)"' CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"' CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"' diff -durpN glibc-2.2.4/iconv/Versions glibc-2.2.5/iconv/Versions --- glibc-2.2.4/iconv/Versions Wed Jan 20 09:11:43 1999 +++ glibc-2.2.5/iconv/Versions Sat Sep 1 12:01:38 2001 @@ -6,4 +6,8 @@ libc { # i* iconv_open; iconv; iconv_close; } + GLIBC_2.2.5 { + # variable shared with iconv program + __gconv_cache; + } } diff -durpN glibc-2.2.4/iconv/gconv.h glibc-2.2.5/iconv/gconv.h --- glibc-2.2.4/iconv/gconv.h Mon Jul 23 10:53:42 2001 +++ glibc-2.2.5/iconv/gconv.h Sat Aug 18 16:33:51 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,6 +27,7 @@ #define __need_mbstate_t #include #define __need_size_t +#define __need_wchar_t #include /* ISO 10646 value used to signal invalid value. */ diff -durpN glibc-2.2.4/iconv/gconv_cache.c glibc-2.2.5/iconv/gconv_cache.c --- glibc-2.2.4/iconv/gconv_cache.c Fri Jul 27 23:13:13 2001 +++ glibc-2.2.5/iconv/gconv_cache.c Sat Sep 1 12:01:07 2001 @@ -31,7 +31,7 @@ #include "../intl/hash-string.h" -static void *cache; +void *__gconv_cache; static size_t cache_size; static int cache_malloced; @@ -63,32 +63,32 @@ __gconv_load_cache (void) || st.st_size < sizeof (struct gconvcache_header)) { close_and_exit: - close (fd); + __close (fd); return -1; } /* Make the file content available. */ cache_size = st.st_size; #ifdef _POSIX_MAPPED_FILES - cache = __mmap (NULL, cache_size, PROT_READ, MAP_SHARED, fd, 0); - if (__builtin_expect (cache == MAP_FAILED, 0)) + __gconv_cache = __mmap (NULL, cache_size, PROT_READ, MAP_SHARED, fd, 0); + if (__builtin_expect (__gconv_cache == MAP_FAILED, 0)) #endif { size_t already_read; - cache = malloc (cache_size); - if (cache == NULL) + __gconv_cache = malloc (cache_size); + if (__gconv_cache == NULL) goto close_and_exit; already_read = 0; do { - ssize_t n = __read (fd, (char *) cache + already_read, + ssize_t n = __read (fd, (char *) __gconv_cache + already_read, cache_size - already_read); if (__builtin_expect (n, 0) == -1) { - free (cache); - cache = NULL; + free (__gconv_cache); + __gconv_cache = NULL; goto close_and_exit; } @@ -100,10 +100,10 @@ __gconv_load_cache (void) } /* We don't need the file descriptor anymore. */ - close (fd); + __close (fd); /* Check the consistency. */ - header = (struct gconvcache_header *) cache; + header = (struct gconvcache_header *) __gconv_cache; if (__builtin_expect (header->magic, GCONVCACHE_MAGIC) != GCONVCACHE_MAGIC || __builtin_expect (header->string_offset >= cache_size, 0) || __builtin_expect (header->hash_offset >= cache_size, 0) @@ -116,14 +116,14 @@ __gconv_load_cache (void) { if (cache_malloced) { - free (cache); + free (__gconv_cache); cache_malloced = 0; } #ifdef _POSIX_MAPPED_FILES else - munmap (cache, cache_size); + __munmap (__gconv_cache, cache_size); #endif - cache = NULL; + __gconv_cache = NULL; return -1; } @@ -145,9 +145,10 @@ find_module_idx (const char *str, size_t const struct hash_entry *hashtab; unsigned int limit; - header = (const struct gconvcache_header *) cache; - strtab = (char *) cache + header->string_offset; - hashtab = (struct hash_entry *) ((char *) cache + header->hash_offset); + header = (const struct gconvcache_header *) __gconv_cache; + strtab = (char *) __gconv_cache + header->string_offset; + hashtab = (struct hash_entry *) ((char *) __gconv_cache + + header->hash_offset); hval = hash_string (str); idx = hval % header->hash_size; @@ -170,6 +171,7 @@ find_module_idx (const char *str, size_t } +#ifndef STATIC_GCONV static int internal_function find_module (const char *directory, const char *filename, @@ -199,6 +201,7 @@ find_module (const char *directory, cons return status; } +#endif int @@ -208,7 +211,7 @@ __gconv_compare_alias_cache (const char size_t name1_idx; size_t name2_idx; - if (cache == NULL) + if (__gconv_cache == NULL) return -1; if (find_module_idx (name1, &name1_idx) != 0 @@ -235,13 +238,13 @@ __gconv_lookup_cache (const char *toset, const struct module_entry *to_module; struct __gconv_step *result; - if (cache == NULL) + if (__gconv_cache == NULL) /* We have no cache available. */ return __GCONV_NODB; - header = (const struct gconvcache_header *) cache; - strtab = (char *) cache + header->string_offset; - modtab = (const struct module_entry *) ((char *) cache + header = (const struct gconvcache_header *) __gconv_cache; + strtab = (char *) __gconv_cache + header->string_offset; + modtab = (const struct module_entry *) ((char *) __gconv_cache + header->module_offset); if (find_module_idx (fromset, &fromidx) != 0 @@ -270,7 +273,7 @@ __gconv_lookup_cache (const char *toset, /* Note the -1. This is due to the offset added in iconvconfig. See there for more explanations. */ - extra = (const struct extra_entry *) ((char *) cache + extra = (const struct extra_entry *) ((char *) __gconv_cache + header->otherconv_offset + from_module->extra_offset - 1); while (extra->module_cnt != 0 @@ -427,7 +430,7 @@ void internal_function __gconv_release_cache (struct __gconv_step *steps, size_t nsteps) { - if (cache != NULL) + if (__gconv_cache != NULL) /* The only thing we have to deallocate is the record with the steps. */ free (steps); @@ -439,10 +442,10 @@ static void __attribute__ ((unused)) free_mem (void) { if (cache_malloced) - free (cache); + free (__gconv_cache); #ifdef _POSIX_MAPPED_FILES else - munmap (cache, cache_size); + __munmap (__gconv_cache, cache_size); #endif } diff -durpN glibc-2.2.4/iconv/iconv_prog.c glibc-2.2.5/iconv/iconv_prog.c --- glibc-2.2.4/iconv/iconv_prog.c Mon Jul 23 10:53:43 2001 +++ glibc-2.2.5/iconv/iconv_prog.c Sun Jan 20 19:20:53 2002 @@ -1,5 +1,5 @@ /* Convert text in given files from the specified from-set to the to-set. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -39,6 +39,7 @@ #include #include #include "iconv_prog.h" +#include "iconvconfig.h" /* Get libc version number. */ #include "../version.h" @@ -46,6 +47,9 @@ #define PACKAGE _libc_intl_domainname +/* Defined in gconv_cache.c. */ +extern void *__gconv_cache; + /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; @@ -394,7 +398,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } @@ -653,7 +657,7 @@ add_known_names (struct gconv_module *no if (strcmp (node->from_string, "INTERNAL")) tsearch (node->from_string, &printlist, (__compar_fn_t) strverscmp); - if (strcmp (node->to_string, "INTERNAL")) + if (strcmp (node->to_string, "INTERNAL") != 0) tsearch (node->to_string, &printlist, (__compar_fn_t) strverscmp); node = node->same; @@ -661,6 +665,31 @@ add_known_names (struct gconv_module *no while (node != NULL); } + +static void +insert_cache (void) +{ + const struct gconvcache_header *header; + const char *strtab; + const struct hash_entry *hashtab; + size_t cnt; + + header = (const struct gconvcache_header *) __gconv_cache; + strtab = (char *) __gconv_cache + header->string_offset; + hashtab = (struct hash_entry *) ((char *) __gconv_cache + + header->hash_offset); + + for (cnt = 0; cnt < header->hash_size; ++cnt) + if (hashtab[cnt].string_offset != 0) + { + const char *str = strtab + hashtab[cnt].string_offset; + + if (strcmp (str, "INTERNAL") != 0) + tsearch (str, &printlist, (__compar_fn_t) strverscmp); + } +} + + static void internal_function print_known_names (void) @@ -671,11 +700,20 @@ print_known_names (void) h = iconv_open ("L1", "L1"); iconv_close (h); - /* First add the aliases. */ - twalk (__gconv_alias_db, insert_print_list); + /* See whether we have a cache. */ + if (__gconv_cache != NULL) + /* Yep, use only this information. */ + insert_cache (); + else + { + /* No, then use the information read from the gconv-modules file. + First add the aliases. */ + twalk (__gconv_alias_db, insert_print_list); - /* Add the from- and to-names from the known modules. */ - add_known_names (__gconv_modules_db); + /* Add the from- and to-names from the known modules. */ + if (__gconv_modules_db != NULL) + add_known_names (__gconv_modules_db); + } fputs (_("\ The following list contain all the coded character sets known. This does\n\ diff -durpN glibc-2.2.4/iconv/iconvconfig.c glibc-2.2.5/iconv/iconvconfig.c --- glibc-2.2.4/iconv/iconvconfig.c Fri Jul 27 23:13:13 2001 +++ glibc-2.2.5/iconv/iconvconfig.c Sun Jan 20 19:20:53 2002 @@ -1,5 +1,5 @@ /* Generate fastloading iconv module configuration files. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -336,7 +336,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -durpN glibc-2.2.4/iconv/strtab.c glibc-2.2.5/iconv/strtab.c --- glibc-2.2.4/iconv/strtab.c Mon Jul 23 01:39:51 2001 +++ glibc-2.2.5/iconv/strtab.c Tue Sep 4 17:12:01 2001 @@ -90,13 +90,21 @@ extern size_t strtaboffset (struct Stren struct Strtab * strtabinit (void) { + struct Strtab *ret; + if (ps == 0) { ps = sysconf (_SC_PAGESIZE) - 2 * sizeof (void *); assert (sizeof (struct memoryblock) < ps); } - return (struct Strtab *) calloc (1, sizeof (struct Strtab)); + ret = (struct Strtab *) calloc (1, sizeof (struct Strtab)); + if (ret != NULL) + { + ret->null.len = 1; + ret->null.string = ""; + } + return ret; } @@ -141,10 +149,6 @@ newstring (struct Strtab *st, const char size_t align; int i; - /* Compute the string length if the caller doesn't know it. */ - if (len == 0) - len = strlen (str) + 1; - /* Compute the amount of padding needed to make the structure aligned. */ align = ((__alignof__ (struct Strent) - (((uintptr_t) st->backp) @@ -193,7 +197,7 @@ searchstring (struct Strent **sep, struc /* Compare the strings. */ cmpres = memcmp ((*sep)->reverse, newstr->reverse, - MIN ((*sep)->len, newstr->len)); + MIN ((*sep)->len, newstr->len) - 1); if (cmpres == 0) /* We found a matching string. */ return sep; @@ -211,6 +215,14 @@ strtabadd (struct Strtab *st, const char struct Strent *newstr; struct Strent **sep; + /* Compute the string length if the caller doesn't know it. */ + if (len == 0) + len = strlen (str) + 1; + + /* Make sure all "" strings get offset 0. */ + if (len == 1) + return &st->null; + /* Allocate memory for the new string and its associated information. */ newstr = newstring (st, str, len); @@ -223,6 +235,19 @@ strtabadd (struct Strtab *st, const char /* This is not the same entry. This means we have a prefix match. */ if ((*sep)->len > newstr->len) { + struct Strent *subs; + + for (subs = (*sep)->next; subs; subs = subs->next) + if (subs->len == newstr->len) + { + /* We have an exact match with a substring. Free the memory + we allocated. */ + st->left += st->backp - (char *) newstr; + st->backp = (char *) newstr; + + return subs; + } + /* We have a new substring. This means we don't need the reverse string of this entry anymore. */ st->backp -= newstr->len; @@ -236,10 +261,11 @@ strtabadd (struct Strtab *st, const char /* When we get here it means that the string we are about to add has a common prefix with a string we already have but it is longer. In this case we have to put it first. */ + st->total += newstr->len - (*sep)->len; newstr->next = *sep; + newstr->left = (*sep)->left; + newstr->right = (*sep)->right; *sep = newstr; - - st->total += newstr->len - (*sep)->len; } else { diff -durpN glibc-2.2.4/iconv/tst-iconv1.c glibc-2.2.5/iconv/tst-iconv1.c --- glibc-2.2.4/iconv/tst-iconv1.c Mon Mar 26 20:52:51 2001 +++ glibc-2.2.5/iconv/tst-iconv1.c Sat Sep 1 12:21:50 2001 @@ -1,6 +1,7 @@ /* Test case by yaoz@nih.gov. */ #include +#include #include #include diff -durpN glibc-2.2.4/iconv/tst-iconv3.c glibc-2.2.5/iconv/tst-iconv3.c --- glibc-2.2.4/iconv/tst-iconv3.c Sat Jan 6 12:21:57 2001 +++ glibc-2.2.5/iconv/tst-iconv3.c Sat Sep 1 12:21:50 2001 @@ -2,6 +2,7 @@ #include #include +#include #include #define BUFSIZE 10000 diff -durpN glibc-2.2.4/iconvdata/Makefile glibc-2.2.5/iconvdata/Makefile --- glibc-2.2.4/iconvdata/Makefile Mon Aug 13 15:00:47 2001 +++ glibc-2.2.5/iconvdata/Makefile Wed Oct 31 01:14:49 2001 @@ -39,6 +39,7 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 IBM862 IBM863 IBM864 IBM865 IBM868 IBM869 IBM875 IBM880 \ IBM866 CP1258 IBM922 IBM1124 IBM1129 IBM932 IBM943 \ IBM856 IBM930 IBM933 IBM935 IBM937 IBM939 IBM1046 \ + IBM1132 IBM1133 IBM1162 \ IBM918 IBM1004 IBM1026 CP1250 CP1251 CP1252 CP1253 CP1254 \ CP1255 CP1256 CP1257 ISO-2022-JP MACINTOSH IEC_P27-1 \ ASMO_449 ANSI_X3.110 CSN_369103 CWI DEC-MCS ECMA-CYRILLIC \ @@ -48,7 +49,8 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 SAMI-WS2 ISO-IR-197 TIS-620 KOI8-U GBK ISIRI-3342 GBGBK \ ISO-2022-CN libISOIR165 UTF-16 UNICODE UTF-32 UTF-7 BIG5HKSCS \ GB18030 ISO-2022-CN-EXT VISCII GBBIG5 CP10007 KOI8-T \ - GEORGIAN-PS GEORGIAN-ACADEMY ISO-IR-209 MAC-SAMI + GEORGIAN-PS GEORGIAN-ACADEMY ISO-IR-209 MAC-SAMI IBM1160 \ + IBM1161 modules.so := $(addsuffix .so, $(modules)) @@ -124,6 +126,7 @@ distribute := gconv-modules extra-module ibm856.c ibm930.c ibm933.c ibm935.c ibm937.c ibm939.c ibm1046.c \ ibm856.h ibm930.h ibm933.h ibm935.h ibm937.h ibm939.h ibm1046.h \ ibm922.c ibm922.h ibm1124.c ibm1124.h ibm1129.c ibm1129.h \ + ibm1132.c ibm1132.h ibm1133.c ibm1133.h ibm1162.c ibm1162.h \ ibm1026.c ibm1047.c iec_p27-1.c inis.c inis-8.c viscii.c \ inis-cyrillic.c iso-2022-jp.c iso-2022-kr.c iso646.c \ iso8859-1.c iso8859-2.c iso8859-3.c iso8859-4.c iso8859-5.c \ @@ -140,7 +143,7 @@ distribute := gconv-modules extra-module iso-ir-165.c iso-ir-165.h gb18030.c iso-2022-cn-ext.c \ ibm932.c ibm932.h ibm943.c ibm943.h gbbig5.c cp10007.c \ koi8-t.c georgian-ps.c georgian-academy.c iso-ir-209.c \ - mac-sami.c + mac-sami.c ibm1160.c ibm1160.h ibm1161.c ibm1161.h # We build the transformation modules only when we build shared libs. ifeq (yes,$(build-shared)) diff -durpN glibc-2.2.4/iconvdata/TESTS glibc-2.2.5/iconvdata/TESTS --- glibc-2.2.4/iconvdata/TESTS Mon Jul 23 10:53:43 2001 +++ glibc-2.2.5/iconvdata/TESTS Wed Oct 31 01:14:50 2001 @@ -102,5 +102,10 @@ IBM935 IBM935 N UTF8 IBM937 IBM937 N UTF8 IBM939 IBM939 N UTF8 IBM1046 IBM1046 Y UTF8 -IBM932 IBM932 N UTF8 -IBM943 IBM943 N UTF8 +IBM932 IBM932 Y UTF8 +IBM943 IBM943 Y UTF8 +IBM1160 IBM1160 N UTF8 +IBM1161 IBM1161 Y UTF8 +IBM1132 IBM1132 N UTF8 +IBM1133 IBM1133 Y UTF8 +IBM1162 IBM1162 Y UTF8 diff -durpN glibc-2.2.4/iconvdata/gconv-modules glibc-2.2.5/iconvdata/gconv-modules --- glibc-2.2.4/iconvdata/gconv-modules Mon Aug 13 15:00:47 2001 +++ glibc-2.2.5/iconvdata/gconv-modules Wed Oct 31 01:14:50 2001 @@ -1010,6 +1010,41 @@ module IBM1129// INTERNAL IBM1129 1 module INTERNAL IBM1129// IBM1129 1 # from to module cost +alias IBM-1160// IBM1160// +alias CP1160// IBM1160// +alias CSIBM1160// IBM1160// +module IBM1160// INTERNAL IBM1160 1 +module INTERNAL IBM1160// IBM1160 1 + +# from to module cost +alias IBM-1161// IBM1161// +alias CP1161// IBM1161// +alias CSIBM1161// IBM1161// +module IBM1161// INTERNAL IBM1161 1 +module INTERNAL IBM1161// IBM1161 1 + +# from to module cost +alias IBM-1132// IBM1132// +alias CP1132// IBM1132// +alias CSIBM1132// IBM1132// +module IBM1132// INTERNAL IBM1132 1 +module INTERNAL IBM1132// IBM1132 1 + +# from to module cost +alias IBM-1133// IBM1133// +alias CP1133// IBM1133// +alias CSIBM1133// IBM1133// +module IBM1133// INTERNAL IBM1133 1 +module INTERNAL IBM1133// IBM1133 1 + +# from to module cost +alias IBM-1162// IBM1162// +alias CP1162// IBM1162// +alias CSIBM11621162// IBM1162// +module IBM1162// INTERNAL IBM1162 1 +module INTERNAL IBM1162// IBM1162 1 + +# from to module cost alias EUCKR// EUC-KR// alias CSEUCKR// EUC-KR// alias OSF0004000a// EUC-KR// diff -durpN glibc-2.2.4/iconvdata/ibm1132.c glibc-2.2.5/iconvdata/ibm1132.c --- glibc-2.2.4/iconvdata/ibm1132.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1132.c Wed Oct 31 01:15:35 2001 @@ -0,0 +1,29 @@ +/* Conversion from and to IBM1132. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Get the conversion table. */ +#define TABLES + +#define CHARSET_NAME "IBM1132//" +#define HAS_HOLES 1 /* Not all 256 character are defined. */ + +#include <8bit-gap.c> diff -durpN glibc-2.2.4/iconvdata/ibm1132.h glibc-2.2.5/iconvdata/ibm1132.h --- glibc-2.2.4/iconvdata/ibm1132.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1132.h Wed Oct 31 01:16:21 2001 @@ -0,0 +1,139 @@ +/* Mapping table for IBM1132. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +static const uint32_t to_ucs4[256] = +{ + [0x00] = 0x0000, [0x01] = 0x0001, [0x02] = 0x0002, [0x03] = 0x0003, + [0x04] = 0x009c, [0x05] = 0x0009, [0x06] = 0x0086, [0x07] = 0x007f, + [0x08] = 0x0097, [0x09] = 0x008d, [0x0a] = 0x008e, [0x0b] = 0x000b, + [0x0c] = 0x000c, [0x0d] = 0x000d, [0x0e] = 0x000e, [0x0f] = 0x000f, + [0x10] = 0x0010, [0x11] = 0x0011, [0x12] = 0x0012, [0x13] = 0x0013, + [0x14] = 0x009d, [0x15] = 0x0085, [0x16] = 0x0008, [0x17] = 0x0087, + [0x18] = 0x0018, [0x19] = 0x0019, [0x1a] = 0x0092, [0x1b] = 0x008f, + [0x1c] = 0x001c, [0x1d] = 0x001d, [0x1e] = 0x001e, [0x1f] = 0x001f, + [0x20] = 0x0080, [0x21] = 0x0081, [0x22] = 0x0082, [0x23] = 0x0083, + [0x24] = 0x0084, [0x25] = 0x000a, [0x26] = 0x0017, [0x27] = 0x001b, + [0x28] = 0x0088, [0x29] = 0x0089, [0x2a] = 0x008a, [0x2b] = 0x008b, + [0x2c] = 0x008c, [0x2d] = 0x0005, [0x2e] = 0x0006, [0x2f] = 0x0007, + [0x30] = 0x0090, [0x31] = 0x0091, [0x32] = 0x0016, [0x33] = 0x0093, + [0x34] = 0x0094, [0x35] = 0x0095, [0x36] = 0x0096, [0x37] = 0x0004, + [0x38] = 0x0098, [0x39] = 0x0099, [0x3a] = 0x009a, [0x3b] = 0x009b, + [0x3c] = 0x0014, [0x3d] = 0x0015, [0x3e] = 0x009e, [0x3f] = 0x001a, + [0x40] = 0x0020, [0x41] = 0x00a0, [0x42] = 0x0e81, [0x43] = 0x0e82, + [0x44] = 0x0e84, [0x45] = 0x0e87, [0x46] = 0x0e88, [0x47] = 0x0eaa, + [0x48] = 0x0e8a, [0x49] = 0x005b, [0x4a] = 0x00a2, [0x4b] = 0x002e, + [0x4c] = 0x003c, [0x4d] = 0x0028, [0x4e] = 0x002b, [0x4f] = 0x007c, + [0x50] = 0x0026, [0x52] = 0x0e8d, [0x53] = 0x0e94, [0x54] = 0x0e95, + [0x55] = 0x0e96, [0x56] = 0x0e97, [0x57] = 0x0e99, [0x58] = 0x0e9a, + [0x59] = 0x005d, [0x5a] = 0x0021, [0x5b] = 0x0024, [0x5c] = 0x002a, + [0x5d] = 0x0029, [0x5e] = 0x003b, [0x5f] = 0x00ac, [0x60] = 0x002d, + [0x61] = 0x002f, [0x62] = 0x0e9b, [0x63] = 0x0e9c, [0x64] = 0x0e9d, + [0x65] = 0x0e9e, [0x66] = 0x0e9f, [0x67] = 0x0ea1, [0x68] = 0x0ea2, + [0x69] = 0x005e, [0x6a] = 0x00a6, [0x6b] = 0x002c, [0x6c] = 0x0025, + [0x6d] = 0x005f, [0x6e] = 0x003e, [0x6f] = 0x003f, [0x70] = 0x006b, + [0x72] = 0x0ea3, [0x73] = 0x0ea5, [0x74] = 0x0ea7, [0x75] = 0x0eab, + [0x76] = 0x0ead, [0x77] = 0x0eae, [0x79] = 0x0060, [0x7a] = 0x003a, + [0x7b] = 0x0023, [0x7c] = 0x0040, [0x7d] = 0x0027, [0x7e] = 0x003d, + [0x7f] = 0x0022, [0x81] = 0x0061, [0x82] = 0x0062, [0x83] = 0x0063, + [0x84] = 0x0064, [0x85] = 0x0065, [0x86] = 0x0066, [0x87] = 0x0067, + [0x88] = 0x0068, [0x89] = 0x0069, [0x8c] = 0x0eaf, [0x8d] = 0x0eb0, + [0x8e] = 0x0eb2, [0x8f] = 0x0eb3, [0x91] = 0x006a, [0x92] = 0x006b, + [0x93] = 0x006c, [0x94] = 0x006d, [0x95] = 0x006e, [0x96] = 0x006f, + [0x97] = 0x0070, [0x98] = 0x0071, [0x99] = 0x0072, [0x9a] = 0x0eb4, + [0x9b] = 0x0eb5, [0x9c] = 0x0eb6, [0x9d] = 0x0eb7, [0x9e] = 0x0eb8, + [0x9f] = 0x0eb9, [0xa1] = 0x007e, [0xa2] = 0x0073, [0xa3] = 0x0074, + [0xa4] = 0x0075, [0xa5] = 0x0076, [0xa6] = 0x0077, [0xa7] = 0x0078, + [0xa8] = 0x0079, [0xa9] = 0x007a, [0xaa] = 0x0ebc, [0xab] = 0x0eb1, + [0xac] = 0x0ebb, [0xad] = 0x0ebd, [0xb0] = 0x0ed0, [0xb1] = 0x0ed1, + [0xb2] = 0x0ed2, [0xb3] = 0x0ed3, [0xb4] = 0x0ed4, [0xb5] = 0x0ed5, + [0xb6] = 0x0ed6, [0xb7] = 0x0ed7, [0xb8] = 0x0ed8, [0xb9] = 0x0ed9, + [0xbb] = 0x0ec0, [0xbc] = 0x0ec1, [0xbd] = 0x0ec2, [0xbe] = 0x0ec3, + [0xbf] = 0x0ec4, [0xc0] = 0x007b, [0xc1] = 0x0041, [0xc2] = 0x0042, + [0xc3] = 0x0043, [0xc4] = 0x0044, [0xc5] = 0x0045, [0xc6] = 0x0046, + [0xc7] = 0x0047, [0xc8] = 0x0048, [0xc9] = 0x0049, [0xcb] = 0x0ec8, + [0xcc] = 0x0ec9, [0xcd] = 0x0eca, [0xce] = 0x0ecb, [0xcf] = 0x0ecc, + [0xd0] = 0x007d, [0xd1] = 0x004a, [0xd2] = 0x004b, [0xd3] = 0x004c, + [0xd4] = 0x004d, [0xd5] = 0x004e, [0xd6] = 0x004f, [0xd7] = 0x0050, + [0xd8] = 0x0051, [0xd9] = 0x0052, [0xda] = 0x0ecd, [0xdb] = 0x0ec6, + [0xdd] = 0x0edc, [0xde] = 0x0edd, [0xe0] = 0x005c, [0xe2] = 0x0053, + [0xe3] = 0x0054, [0xe4] = 0x0055, [0xe5] = 0x0056, [0xe6] = 0x0057, + [0xe7] = 0x0058, [0xe8] = 0x0059, [0xe9] = 0x005a, [0xf0] = 0x0030, + [0xf1] = 0x0031, [0xf2] = 0x0032, [0xf3] = 0x0033, [0xf4] = 0x0034, + [0xf5] = 0x0035, [0xf6] = 0x0036, [0xf7] = 0x0037, [0xf8] = 0x0038, + [0xf9] = 0x0039, [0xff] = 0x009f +}; + +static const struct gap from_idx[] = +{ + { start: 0x0000, end: 0x00ac, idx: 0 }, + { start: 0x0e81, end: 0x0e8d, idx: -3540 }, + { start: 0x0e94, end: 0x0edd, idx: -3546 }, + { start: 0xff01, end: 0xff5e, idx: -65021 }, + { start: 0xffff, end: 0xffff, idx: 0 } +}; + +static const char from_ucs4[] = +{ + '\x00', '\x01', '\x02', '\x03', '\x37', '\x2d', '\x2e', '\x2f', + '\x16', '\x05', '\x25', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + '\x10', '\x11', '\x12', '\x13', '\x3c', '\x3d', '\x32', '\x26', + '\x18', '\x19', '\x3f', '\x27', '\x1c', '\x1d', '\x1e', '\x1f', + '\x40', '\x5a', '\x7f', '\x7b', '\x5b', '\x6c', '\x50', '\x7d', + '\x4d', '\x5d', '\x5c', '\x4e', '\x6b', '\x60', '\x4b', '\x61', + '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', + '\xf8', '\xf9', '\x7a', '\x5e', '\x4c', '\x7e', '\x6e', '\x6f', + '\x7c', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', + '\xc8', '\xc9', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', + '\xd7', '\xd8', '\xd9', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', + '\xe7', '\xe8', '\xe9', '\x49', '\xe0', '\x59', '\x69', '\x6d', + '\x79', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', + '\x88', '\x89', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', + '\x97', '\x98', '\x99', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', + '\xa7', '\xa8', '\xa9', '\xc0', '\x4f', '\xd0', '\xa1', '\x07', + '\x20', '\x21', '\x22', '\x23', '\x24', '\x15', '\x06', '\x17', + '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x09', '\x0a', '\x1b', + '\x30', '\x31', '\x1a', '\x33', '\x34', '\x35', '\x36', '\x08', + '\x38', '\x39', '\x3a', '\x3b', '\x04', '\x14', '\x3e', '\xff', + '\x41', '\x00', '\x4a', '\x00', '\x00', '\x00', '\x6a', '\x00', + '\x00', '\x00', '\x00', '\x00', '\x5f', '\x42', '\x43', '\x00', + '\x44', '\x00', '\x00', '\x45', '\x46', '\x00', '\x48', '\x00', + '\x00', '\x52', '\x53', '\x54', '\x55', '\x56', '\x00', '\x57', + '\x58', '\x62', '\x63', '\x64', '\x65', '\x66', '\x00', '\x67', + '\x68', '\x72', '\x00', '\x73', '\x00', '\x74', '\x00', '\x00', + '\x47', '\x75', '\x00', '\x76', '\x77', '\x8c', '\x8d', '\xab', + '\x8e', '\x8f', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', + '\x00', '\xac', '\xaa', '\xad', '\x00', '\x00', '\xbb', '\xbc', + '\xbd', '\xbe', '\xbf', '\x00', '\xdb', '\x00', '\xcb', '\xcc', + '\xcd', '\xce', '\xcf', '\xda', '\x00', '\x00', '\xb0', '\xb1', + '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', '\xb8', '\xb9', + '\x00', '\x00', '\xdd', '\xde', '\x5a', '\x7f', '\x7b', '\x5b', + '\x6c', '\x50', '\x7d', '\x4d', '\x5d', '\x5c', '\x4e', '\x6b', + '\x60', '\x4b', '\x61', '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', + '\xf5', '\xf6', '\xf7', '\xf8', '\xf9', '\x7a', '\x5e', '\x4c', + '\x7e', '\x6e', '\x6f', '\x7c', '\xc1', '\xc2', '\xc3', '\xc4', + '\xc5', '\xc6', '\xc7', '\xc8', '\xc9', '\xd1', '\xd2', '\xd3', + '\xd4', '\xd5', '\xd6', '\xd7', '\xd8', '\xd9', '\xe2', '\xe3', + '\xe4', '\xe5', '\xe6', '\xe7', '\xe8', '\xe9', '\x49', '\xe0', + '\x59', '\x69', '\x6d', '\x79', '\x81', '\x82', '\x83', '\x84', + '\x85', '\x86', '\x87', '\x88', '\x89', '\x91', '\x92', '\x93', + '\x94', '\x95', '\x96', '\x97', '\x98', '\x99', '\xa2', '\xa3', + '\xa4', '\xa5', '\xa6', '\xa7', '\xa8', '\xa9', '\xc0', '\x4f', + '\xd0', '\xa1' +}; diff -durpN glibc-2.2.4/iconvdata/ibm1133.c glibc-2.2.5/iconvdata/ibm1133.c --- glibc-2.2.4/iconvdata/ibm1133.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1133.c Wed Oct 31 01:17:05 2001 @@ -0,0 +1,29 @@ +/* Conversion from and to IBM1133. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Get the conversion table. */ +#define TABLES + +#define CHARSET_NAME "IBM1133//" +#define HAS_HOLES 1 /* Not all 256 character are defined. */ + +#include <8bit-gap.c> diff -durpN glibc-2.2.4/iconvdata/ibm1133.h glibc-2.2.5/iconvdata/ibm1133.h --- glibc-2.2.4/iconvdata/ibm1133.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1133.h Wed Oct 31 01:16:45 2001 @@ -0,0 +1,139 @@ +/* Mapping table for IBM1133. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +static const uint32_t to_ucs4[256] = +{ + [0x00] = 0x0000, [0x01] = 0x0001, [0x02] = 0x0002, [0x03] = 0x0003, + [0x04] = 0x0004, [0x05] = 0x0005, [0x06] = 0x0006, [0x07] = 0x0007, + [0x08] = 0x0008, [0x09] = 0x0009, [0x0a] = 0x000a, [0x0b] = 0x000b, + [0x0c] = 0x000c, [0x0d] = 0x000d, [0x0e] = 0x000e, [0x0f] = 0x000f, + [0x10] = 0x0010, [0x11] = 0x0011, [0x12] = 0x0012, [0x13] = 0x0013, + [0x14] = 0x0014, [0x15] = 0x0015, [0x16] = 0x0016, [0x17] = 0x0017, + [0x18] = 0x0018, [0x19] = 0x0019, [0x1a] = 0x001a, [0x1b] = 0x001b, + [0x1c] = 0x001c, [0x1d] = 0x001d, [0x1e] = 0x001e, [0x1f] = 0x001f, + [0x20] = 0x0020, [0x21] = 0x0021, [0x22] = 0x0022, [0x23] = 0x0023, + [0x24] = 0x0024, [0x25] = 0x0025, [0x26] = 0x0026, [0x27] = 0x0027, + [0x28] = 0x0028, [0x29] = 0x0029, [0x2a] = 0x002a, [0x2b] = 0x002b, + [0x2c] = 0x002c, [0x2d] = 0x002d, [0x2e] = 0x002e, [0x2f] = 0x002f, + [0x30] = 0x0030, [0x31] = 0x0031, [0x32] = 0x0032, [0x33] = 0x0033, + [0x34] = 0x0034, [0x35] = 0x0035, [0x36] = 0x0036, [0x37] = 0x0037, + [0x38] = 0x0038, [0x39] = 0x0039, [0x3a] = 0x003a, [0x3b] = 0x003b, + [0x3c] = 0x003c, [0x3d] = 0x003d, [0x3e] = 0x003e, [0x3f] = 0x003f, + [0x40] = 0x0040, [0x41] = 0x0041, [0x42] = 0x0042, [0x43] = 0x0043, + [0x44] = 0x0044, [0x45] = 0x0045, [0x46] = 0x0046, [0x47] = 0x0047, + [0x48] = 0x0048, [0x49] = 0x0049, [0x4a] = 0x004a, [0x4b] = 0x004b, + [0x4c] = 0x004c, [0x4d] = 0x004d, [0x4e] = 0x004e, [0x4f] = 0x004f, + [0x50] = 0x0050, [0x51] = 0x0051, [0x52] = 0x0052, [0x53] = 0x0053, + [0x54] = 0x0054, [0x55] = 0x0055, [0x56] = 0x0056, [0x57] = 0x0057, + [0x58] = 0x0058, [0x59] = 0x0059, [0x5a] = 0x005a, [0x5b] = 0x005b, + [0x5c] = 0x005c, [0x5d] = 0x005d, [0x5e] = 0x005e, [0x5f] = 0x005f, + [0x60] = 0x0060, [0x61] = 0x0061, [0x62] = 0x0062, [0x63] = 0x0063, + [0x64] = 0x0064, [0x65] = 0x0065, [0x66] = 0x0066, [0x67] = 0x0067, + [0x68] = 0x0068, [0x69] = 0x0069, [0x6a] = 0x006a, [0x6b] = 0x006b, + [0x6c] = 0x006c, [0x6d] = 0x006d, [0x6e] = 0x006e, [0x6f] = 0x006f, + [0x70] = 0x0070, [0x71] = 0x0071, [0x72] = 0x0072, [0x73] = 0x0073, + [0x74] = 0x0074, [0x75] = 0x0075, [0x76] = 0x0076, [0x77] = 0x0077, + [0x78] = 0x0078, [0x79] = 0x0079, [0x7a] = 0x007a, [0x7b] = 0x007b, + [0x7c] = 0x007c, [0x7d] = 0x007d, [0x7e] = 0x007e, [0x7f] = 0x007f, + [0x80] = 0x0080, [0x81] = 0x0081, [0x82] = 0x0082, [0x83] = 0x0083, + [0x84] = 0x0084, [0x85] = 0x0085, [0x86] = 0x0086, [0x87] = 0x0087, + [0x88] = 0x0088, [0x89] = 0x0089, [0x8a] = 0x008a, [0x8b] = 0x008b, + [0x8c] = 0x008c, [0x8d] = 0x008d, [0x8e] = 0x008e, [0x8f] = 0x008f, + [0x90] = 0x0090, [0x91] = 0x0091, [0x92] = 0x0092, [0x93] = 0x0093, + [0x94] = 0x0094, [0x95] = 0x0095, [0x96] = 0x0096, [0x97] = 0x0097, + [0x98] = 0x0098, [0x99] = 0x0099, [0x9a] = 0x009a, [0x9b] = 0x009b, + [0x9c] = 0x009c, [0x9d] = 0x009d, [0x9e] = 0x009e, [0x9f] = 0x009f, + [0xa1] = 0x0e81, [0xa2] = 0x0e82, [0xa3] = 0x0e84, [0xa4] = 0x0e87, + [0xa5] = 0x0e88, [0xa6] = 0x0eaa, [0xa7] = 0x0e8a, [0xa8] = 0x0e8d, + [0xa9] = 0x0e94, [0xaa] = 0x0e95, [0xab] = 0x0e96, [0xac] = 0x0e97, + [0xad] = 0x0e99, [0xae] = 0x0e9a, [0xaf] = 0x0e9b, [0xb0] = 0x0e9c, + [0xb1] = 0x0e9d, [0xb2] = 0x0e9e, [0xb3] = 0x0e9f, [0xb4] = 0x0ea1, + [0xb5] = 0x0ea2, [0xb6] = 0x0ea3, [0xb7] = 0x0ea5, [0xb8] = 0x0ea7, + [0xb9] = 0x0eab, [0xba] = 0x0ead, [0xbb] = 0x0eae, [0xbf] = 0x0eaf, + [0xc0] = 0x0eb0, [0xc1] = 0x0eb2, [0xc2] = 0x0eb3, [0xc3] = 0x0eb4, + [0xc4] = 0x0eb5, [0xc5] = 0x0eb6, [0xc6] = 0x0eb7, [0xc7] = 0x0eb8, + [0xc8] = 0x0eb9, [0xc9] = 0x0ebc, [0xca] = 0x0eb1, [0xcb] = 0x0ebb, + [0xcc] = 0x0ebd, [0xd0] = 0x0ec0, [0xd1] = 0x0ec1, [0xd2] = 0x0ec2, + [0xd3] = 0x0ec3, [0xd4] = 0x0ec4, [0xd5] = 0x0ec8, [0xd6] = 0x0ec9, + [0xd7] = 0x0eca, [0xd8] = 0x0ecb, [0xd9] = 0x0ecc, [0xda] = 0x0ecd, + [0xdb] = 0x0ec6, [0xdd] = 0x0edc, [0xde] = 0x0edd, [0xdf] = 0x006b, + [0xf0] = 0x0ed0, [0xf1] = 0x0ed1, [0xf2] = 0x0ed2, [0xf3] = 0x0ed3, + [0xf4] = 0x0ed4, [0xf5] = 0x0ed5, [0xf6] = 0x0ed6, [0xf7] = 0x0ed7, + [0xf8] = 0x0ed8, [0xf9] = 0x0ed9, [0xfc] = 0x00a2, [0xfd] = 0x00ac, + [0xfe] = 0x00a6, [0xff] = 0x00a0 +}; + +static const struct gap from_idx[] = +{ + { start: 0x0000, end: 0x00ac, idx: 0 }, + { start: 0x0e81, end: 0x0e8d, idx: -3540 }, + { start: 0x0e94, end: 0x0edd, idx: -3546 }, + { start: 0xff01, end: 0xff5e, idx: -65021 }, + { start: 0xffff, end: 0xffff, idx: 0 } +}; + +static const char from_ucs4[] = +{ + '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', + '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', + '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', + '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', + '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', + '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', + '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', + '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', + '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', + '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', + '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', + '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', + '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', + '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', + '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', + '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', + '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', + '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', + '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', + '\xff', '\x00', '\xfc', '\x00', '\x00', '\x00', '\xfe', '\x00', + '\x00', '\x00', '\x00', '\x00', '\xfd', '\xa1', '\xa2', '\x00', + '\xa3', '\x00', '\x00', '\xa4', '\xa5', '\x00', '\xa7', '\x00', + '\x00', '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\x00', '\xad', + '\xae', '\xaf', '\xb0', '\xb1', '\xb2', '\xb3', '\x00', '\xb4', + '\xb5', '\xb6', '\x00', '\xb7', '\x00', '\xb8', '\x00', '\x00', + '\xa6', '\xb9', '\x00', '\xba', '\xbb', '\xbf', '\xc0', '\xca', + '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', '\xc8', + '\x00', '\xcb', '\xc9', '\xcc', '\x00', '\x00', '\xd0', '\xd1', + '\xd2', '\xd3', '\xd4', '\x00', '\xdb', '\x00', '\xd5', '\xd6', + '\xd7', '\xd8', '\xd9', '\xda', '\x00', '\x00', '\xf0', '\xf1', + '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', '\xf8', '\xf9', + '\x00', '\x00', '\xdd', '\xde', '\x21', '\x22', '\x23', '\x24', + '\x25', '\x26', '\x27', '\x28', '\x29', '\x2a', '\x2b', '\x2c', + '\x2d', '\x2e', '\x2f', '\x30', '\x31', '\x32', '\x33', '\x34', + '\x35', '\x36', '\x37', '\x38', '\x39', '\x3a', '\x3b', '\x3c', + '\x3d', '\x3e', '\x3f', '\x40', '\x41', '\x42', '\x43', '\x44', + '\x45', '\x46', '\x47', '\x48', '\x49', '\x4a', '\x4b', '\x4c', + '\x4d', '\x4e', '\x4f', '\x50', '\x51', '\x52', '\x53', '\x54', + '\x55', '\x56', '\x57', '\x58', '\x59', '\x5a', '\x5b', '\x5c', + '\x5d', '\x5e', '\x5f', '\x60', '\x61', '\x62', '\x63', '\x64', + '\x65', '\x66', '\x67', '\x68', '\x69', '\x6a', '\x6b', '\x6c', + '\x6d', '\x6e', '\x6f', '\x70', '\x71', '\x72', '\x73', '\x74', + '\x75', '\x76', '\x77', '\x78', '\x79', '\x7a', '\x7b', '\x7c', + '\x7d', '\x7e' +}; diff -durpN glibc-2.2.4/iconvdata/ibm1160.c glibc-2.2.5/iconvdata/ibm1160.c --- glibc-2.2.4/iconvdata/ibm1160.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1160.c Sat Sep 22 15:28:54 2001 @@ -0,0 +1,29 @@ +/* Conversion from and to IBM1160. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Get the conversion table. */ +#define TABLES + +#define CHARSET_NAME "IBM1160//" +#define HAS_HOLES 0 /* All 256 character are defined. */ + +#include <8bit-gap.c> diff -durpN glibc-2.2.4/iconvdata/ibm1160.h glibc-2.2.5/iconvdata/ibm1160.h --- glibc-2.2.4/iconvdata/ibm1160.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1160.h Sat Sep 22 15:29:14 2001 @@ -0,0 +1,145 @@ +/* Mapping table for IBM1160. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +static const uint32_t to_ucs4[256] = +{ + [0x00] = 0x0000, [0x01] = 0x0001, [0x02] = 0x0002, [0x03] = 0x0003, + [0x04] = 0x009c, [0x05] = 0x0009, [0x06] = 0x0086, [0x07] = 0x007f, + [0x08] = 0x0097, [0x09] = 0x008d, [0x0a] = 0x008e, [0x0b] = 0x000b, + [0x0c] = 0x000c, [0x0d] = 0x000d, [0x0e] = 0x000e, [0x0f] = 0x000f, + [0x10] = 0x0010, [0x11] = 0x0011, [0x12] = 0x0012, [0x13] = 0x0013, + [0x14] = 0x009d, [0x15] = 0x0085, [0x16] = 0x0008, [0x17] = 0x0087, + [0x18] = 0x0018, [0x19] = 0x0019, [0x1a] = 0x0092, [0x1b] = 0x008f, + [0x1c] = 0x001c, [0x1d] = 0x001d, [0x1e] = 0x001e, [0x1f] = 0x001f, + [0x20] = 0x0080, [0x21] = 0x0081, [0x22] = 0x0082, [0x23] = 0x0083, + [0x24] = 0x0084, [0x25] = 0x000a, [0x26] = 0x0017, [0x27] = 0x001b, + [0x28] = 0x0088, [0x29] = 0x0089, [0x2a] = 0x008a, [0x2b] = 0x008b, + [0x2c] = 0x008c, [0x2d] = 0x0005, [0x2e] = 0x0006, [0x2f] = 0x0007, + [0x30] = 0x0090, [0x31] = 0x0091, [0x32] = 0x0016, [0x33] = 0x0093, + [0x34] = 0x0094, [0x35] = 0x0095, [0x36] = 0x0096, [0x37] = 0x0004, + [0x38] = 0x0098, [0x39] = 0x0099, [0x3a] = 0x009a, [0x3b] = 0x009b, + [0x3c] = 0x0014, [0x3d] = 0x0015, [0x3e] = 0x009e, [0x3f] = 0x001a, + [0x40] = 0x0020, [0x41] = 0x00a0, [0x42] = 0x0e01, [0x43] = 0x0e02, + [0x44] = 0x0e03, [0x45] = 0x0e04, [0x46] = 0x0e05, [0x47] = 0x0e06, + [0x48] = 0x0e07, [0x49] = 0x005b, [0x4a] = 0x00a2, [0x4b] = 0x002e, + [0x4c] = 0x003c, [0x4d] = 0x0028, [0x4e] = 0x002b, [0x4f] = 0x007c, + [0x50] = 0x0026, [0x51] = 0x0e48, [0x52] = 0x0e08, [0x53] = 0x0e09, + [0x54] = 0x0e0a, [0x55] = 0x0e0b, [0x56] = 0x0e0c, [0x57] = 0x0e0d, + [0x58] = 0x0e0e, [0x59] = 0x005d, [0x5a] = 0x0021, [0x5b] = 0x0024, + [0x5c] = 0x002a, [0x5d] = 0x0029, [0x5e] = 0x003b, [0x5f] = 0x00ac, + [0x60] = 0x002d, [0x61] = 0x002f, [0x62] = 0x0e0f, [0x63] = 0x0e10, + [0x64] = 0x0e11, [0x65] = 0x0e12, [0x66] = 0x0e13, [0x67] = 0x0e14, + [0x68] = 0x0e15, [0x69] = 0x005e, [0x6a] = 0x00a6, [0x6b] = 0x002c, + [0x6c] = 0x0025, [0x6d] = 0x005f, [0x6e] = 0x003e, [0x6f] = 0x003f, + [0x70] = 0x0e3f, [0x71] = 0x0e4e, [0x72] = 0x0e16, [0x73] = 0x0e17, + [0x74] = 0x0e18, [0x75] = 0x0e19, [0x76] = 0x0e1a, [0x77] = 0x0e1b, + [0x78] = 0x0e1c, [0x79] = 0x0060, [0x7a] = 0x003a, [0x7b] = 0x0023, + [0x7c] = 0x0040, [0x7d] = 0x0027, [0x7e] = 0x003d, [0x7f] = 0x0022, + [0x80] = 0x0e4f, [0x81] = 0x0061, [0x82] = 0x0062, [0x83] = 0x0063, + [0x84] = 0x0064, [0x85] = 0x0065, [0x86] = 0x0066, [0x87] = 0x0067, + [0x88] = 0x0068, [0x89] = 0x0069, [0x8a] = 0x0e1d, [0x8b] = 0x0e1e, + [0x8c] = 0x0e1f, [0x8d] = 0x0e20, [0x8e] = 0x0e21, [0x8f] = 0x0e22, + [0x90] = 0x0e5a, [0x91] = 0x006a, [0x92] = 0x006b, [0x93] = 0x006c, + [0x94] = 0x006d, [0x95] = 0x006e, [0x96] = 0x006f, [0x97] = 0x0070, + [0x98] = 0x0071, [0x99] = 0x0072, [0x9a] = 0x0e23, [0x9b] = 0x0e24, + [0x9c] = 0x0e25, [0x9d] = 0x0e26, [0x9e] = 0x0e27, [0x9f] = 0x0e28, + [0xa0] = 0x0e5b, [0xa1] = 0x007e, [0xa2] = 0x0073, [0xa3] = 0x0074, + [0xa4] = 0x0075, [0xa5] = 0x0076, [0xa6] = 0x0077, [0xa7] = 0x0078, + [0xa8] = 0x0079, [0xa9] = 0x007a, [0xaa] = 0x0e29, [0xab] = 0x0e2a, + [0xac] = 0x0e2b, [0xad] = 0x0e2c, [0xae] = 0x0e2d, [0xaf] = 0x0e2e, + [0xb0] = 0x0e50, [0xb1] = 0x0e51, [0xb2] = 0x0e52, [0xb3] = 0x0e53, + [0xb4] = 0x0e54, [0xb5] = 0x0e55, [0xb6] = 0x0e56, [0xb7] = 0x0e57, + [0xb8] = 0x0e58, [0xb9] = 0x0e59, [0xba] = 0x0e2f, [0xbb] = 0x0e30, + [0xbc] = 0x0e31, [0xbd] = 0x0e32, [0xbe] = 0x0e33, [0xbf] = 0x0e34, + [0xc0] = 0x007b, [0xc1] = 0x0041, [0xc2] = 0x0042, [0xc3] = 0x0043, + [0xc4] = 0x0044, [0xc5] = 0x0045, [0xc6] = 0x0046, [0xc7] = 0x0047, + [0xc8] = 0x0048, [0xc9] = 0x0049, [0xca] = 0x0e49, [0xcb] = 0x0e35, + [0xcc] = 0x0e36, [0xcd] = 0x0e37, [0xce] = 0x0e38, [0xcf] = 0x0e39, + [0xd0] = 0x007d, [0xd1] = 0x004a, [0xd2] = 0x004b, [0xd3] = 0x004c, + [0xd4] = 0x004d, [0xd5] = 0x004e, [0xd6] = 0x004f, [0xd7] = 0x0050, + [0xd8] = 0x0051, [0xd9] = 0x0052, [0xda] = 0x0e3a, [0xdb] = 0x0e40, + [0xdc] = 0x0e41, [0xdd] = 0x0e42, [0xde] = 0x0e43, [0xdf] = 0x0e44, + [0xe0] = 0x005c, [0xe1] = 0x0e4a, [0xe2] = 0x0053, [0xe3] = 0x0054, + [0xe4] = 0x0055, [0xe5] = 0x0056, [0xe6] = 0x0057, [0xe7] = 0x0058, + [0xe8] = 0x0059, [0xe9] = 0x005a, [0xea] = 0x0e45, [0xeb] = 0x0e46, + [0xec] = 0x0e47, [0xed] = 0x0e48, [0xee] = 0x0e49, [0xef] = 0x0e4a, + [0xf0] = 0x0030, [0xf1] = 0x0031, [0xf2] = 0x0032, [0xf3] = 0x0033, + [0xf4] = 0x0034, [0xf5] = 0x0035, [0xf6] = 0x0036, [0xf7] = 0x0037, + [0xf8] = 0x0038, [0xf9] = 0x0039, [0xfa] = 0x0e4b, [0xfb] = 0x0e4c, + [0xfc] = 0x0e4d, [0xfd] = 0x0e4b, [0xfe] = 0x20ac, [0xff] = 0x009f +}; + +static const struct gap from_idx[] = +{ + { start: 0x0000, end: 0x00ac, idx: 0 }, + { start: 0x0e01, end: 0x0e5b, idx: -3412 }, + { start: 0x20ac, end: 0x20ac, idx: -8100 }, + { start: 0xff01, end: 0xff5e, idx: -65016 }, + { start: 0xffff, end: 0xffff, idx: 0 } +}; + +static const char from_ucs4[] = +{ + '\x00', '\x01', '\x02', '\x03', '\x37', '\x2d', '\x2e', '\x2f', + '\x16', '\x05', '\x25', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + '\x10', '\x11', '\x12', '\x13', '\x3c', '\x3d', '\x32', '\x26', + '\x18', '\x19', '\x3f', '\x27', '\x1c', '\x1d', '\x1e', '\x1f', + '\x40', '\x5a', '\x7f', '\x7b', '\x5b', '\x6c', '\x50', '\x7d', + '\x4d', '\x5d', '\x5c', '\x4e', '\x6b', '\x60', '\x4b', '\x61', + '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', + '\xf8', '\xf9', '\x7a', '\x5e', '\x4c', '\x7e', '\x6e', '\x6f', + '\x7c', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', + '\xc8', '\xc9', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', + '\xd7', '\xd8', '\xd9', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', + '\xe7', '\xe8', '\xe9', '\x49', '\xe0', '\x59', '\x69', '\x6d', + '\x79', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', + '\x88', '\x89', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', + '\x97', '\x98', '\x99', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', + '\xa7', '\xa8', '\xa9', '\xc0', '\x4f', '\xd0', '\xa1', '\x07', + '\x20', '\x21', '\x22', '\x23', '\x24', '\x15', '\x06', '\x17', + '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x09', '\x0a', '\x1b', + '\x30', '\x31', '\x1a', '\x33', '\x34', '\x35', '\x36', '\x08', + '\x38', '\x39', '\x3a', '\x3b', '\x04', '\x14', '\x3e', '\xff', + '\x41', '\x00', '\x4a', '\x00', '\x00', '\x00', '\x6a', '\x00', + '\x00', '\x00', '\x00', '\x00', '\x5f', '\x42', '\x43', '\x44', + '\x45', '\x46', '\x47', '\x48', '\x52', '\x53', '\x54', '\x55', + '\x56', '\x57', '\x58', '\x62', '\x63', '\x64', '\x65', '\x66', + '\x67', '\x68', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', + '\x78', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', '\x9a', + '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', '\xaa', '\xab', '\xac', + '\xad', '\xae', '\xaf', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', + '\xbf', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', '\xda', '\x00', + '\x00', '\x00', '\x00', '\x70', '\xdb', '\xdc', '\xdd', '\xde', + '\xdf', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', '\xfa', + '\xfb', '\xfc', '\x71', '\x80', '\xb0', '\xb1', '\xb2', '\xb3', + '\xb4', '\xb5', '\xb6', '\xb7', '\xb8', '\xb9', '\x90', '\xa0', + '\xfe', '\x5a', '\x7f', '\x7b', '\x5b', '\x6c', '\x50', '\x7d', + '\x4d', '\x5d', '\x5c', '\x4e', '\x6b', '\x60', '\x4b', '\x61', + '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', + '\xf8', '\xf9', '\x7a', '\x5e', '\x4c', '\x7e', '\x6e', '\x6f', + '\x7c', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', + '\xc8', '\xc9', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', + '\xd7', '\xd8', '\xd9', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', + '\xe7', '\xe8', '\xe9', '\x49', '\xe0', '\x59', '\x69', '\x6d', + '\x79', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', + '\x88', '\x89', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', + '\x97', '\x98', '\x99', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', + '\xa7', '\xa8', '\xa9', '\xc0', '\x4f', '\xd0', '\xa1' +}; diff -durpN glibc-2.2.4/iconvdata/ibm1161.c glibc-2.2.5/iconvdata/ibm1161.c --- glibc-2.2.4/iconvdata/ibm1161.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1161.c Sat Sep 22 15:29:45 2001 @@ -0,0 +1,29 @@ +/* Conversion from and to IBM1161. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Get the conversion table. */ +#define TABLES + +#define CHARSET_NAME "IBM1161//" +#define HAS_HOLES 1 /* Not all 256 character are defined. */ + +#include <8bit-gap.c> diff -durpN glibc-2.2.4/iconvdata/ibm1161.h glibc-2.2.5/iconvdata/ibm1161.h --- glibc-2.2.4/iconvdata/ibm1161.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1161.h Sat Sep 22 15:29:28 2001 @@ -0,0 +1,134 @@ +/* Mapping table for IBM1161. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +static const uint32_t to_ucs4[256] = +{ + [0x00] = 0x0000, [0x01] = 0x0001, [0x02] = 0x0002, [0x03] = 0x0003, + [0x04] = 0x0004, [0x05] = 0x0005, [0x06] = 0x0006, [0x07] = 0x0007, + [0x08] = 0x0008, [0x09] = 0x0009, [0x0a] = 0x000a, [0x0b] = 0x000b, + [0x0c] = 0x000c, [0x0d] = 0x000d, [0x0e] = 0x000e, [0x0f] = 0x000f, + [0x10] = 0x0010, [0x11] = 0x0011, [0x12] = 0x0012, [0x13] = 0x0013, + [0x14] = 0x0014, [0x15] = 0x0015, [0x16] = 0x0016, [0x17] = 0x0017, + [0x18] = 0x0018, [0x19] = 0x0019, [0x1a] = 0x001c, [0x1b] = 0x001b, + [0x1c] = 0x007f, [0x1d] = 0x001d, [0x1e] = 0x001e, [0x1f] = 0x001f, + [0x20] = 0x0020, [0x21] = 0x0021, [0x22] = 0x0022, [0x23] = 0x0023, + [0x24] = 0x0024, [0x25] = 0x0025, [0x26] = 0x0026, [0x27] = 0x0027, + [0x28] = 0x0028, [0x29] = 0x0029, [0x2a] = 0x002a, [0x2b] = 0x002b, + [0x2c] = 0x002c, [0x2d] = 0x002d, [0x2e] = 0x002e, [0x2f] = 0x002f, + [0x30] = 0x0030, [0x31] = 0x0031, [0x32] = 0x0032, [0x33] = 0x0033, + [0x34] = 0x0034, [0x35] = 0x0035, [0x36] = 0x0036, [0x37] = 0x0037, + [0x38] = 0x0038, [0x39] = 0x0039, [0x3a] = 0x003a, [0x3b] = 0x003b, + [0x3c] = 0x003c, [0x3d] = 0x003d, [0x3e] = 0x003e, [0x3f] = 0x003f, + [0x40] = 0x0040, [0x41] = 0x0041, [0x42] = 0x0042, [0x43] = 0x0043, + [0x44] = 0x0044, [0x45] = 0x0045, [0x46] = 0x0046, [0x47] = 0x0047, + [0x48] = 0x0048, [0x49] = 0x0049, [0x4a] = 0x004a, [0x4b] = 0x004b, + [0x4c] = 0x004c, [0x4d] = 0x004d, [0x4e] = 0x004e, [0x4f] = 0x004f, + [0x50] = 0x0050, [0x51] = 0x0051, [0x52] = 0x0052, [0x53] = 0x0053, + [0x54] = 0x0054, [0x55] = 0x0055, [0x56] = 0x0056, [0x57] = 0x0057, + [0x58] = 0x0058, [0x59] = 0x0059, [0x5a] = 0x005a, [0x5b] = 0x005b, + [0x5c] = 0x005c, [0x5d] = 0x005d, [0x5e] = 0x005e, [0x5f] = 0x005f, + [0x60] = 0x0060, [0x61] = 0x0061, [0x62] = 0x0062, [0x63] = 0x0063, + [0x64] = 0x0064, [0x65] = 0x0065, [0x66] = 0x0066, [0x67] = 0x0067, + [0x68] = 0x0068, [0x69] = 0x0069, [0x6a] = 0x006a, [0x6b] = 0x006b, + [0x6c] = 0x006c, [0x6d] = 0x006d, [0x6e] = 0x006e, [0x6f] = 0x006f, + [0x70] = 0x0070, [0x71] = 0x0071, [0x72] = 0x0072, [0x73] = 0x0073, + [0x74] = 0x0074, [0x75] = 0x0075, [0x76] = 0x0076, [0x77] = 0x0077, + [0x78] = 0x0078, [0x79] = 0x0079, [0x7a] = 0x007a, [0x7b] = 0x007b, + [0x7c] = 0x007c, [0x7d] = 0x007d, [0x7e] = 0x007e, [0x7f] = 0x001a, + [0xa0] = 0x0e48, [0xa1] = 0x0e01, [0xa2] = 0x0e02, [0xa3] = 0x0e03, + [0xa4] = 0x0e04, [0xa5] = 0x0e05, [0xa6] = 0x0e06, [0xa7] = 0x0e07, + [0xa8] = 0x0e08, [0xa9] = 0x0e09, [0xaa] = 0x0e0a, [0xab] = 0x0e0b, + [0xac] = 0x0e0c, [0xad] = 0x0e0d, [0xae] = 0x0e0e, [0xaf] = 0x0e0f, + [0xb0] = 0x0e10, [0xb1] = 0x0e11, [0xb2] = 0x0e12, [0xb3] = 0x0e13, + [0xb4] = 0x0e14, [0xb5] = 0x0e15, [0xb6] = 0x0e16, [0xb7] = 0x0e17, + [0xb8] = 0x0e18, [0xb9] = 0x0e19, [0xba] = 0x0e1a, [0xbb] = 0x0e1b, + [0xbc] = 0x0e1c, [0xbd] = 0x0e1d, [0xbe] = 0x0e1e, [0xbf] = 0x0e1f, + [0xc0] = 0x0e20, [0xc1] = 0x0e21, [0xc2] = 0x0e22, [0xc3] = 0x0e23, + [0xc4] = 0x0e24, [0xc5] = 0x0e25, [0xc6] = 0x0e26, [0xc7] = 0x0e27, + [0xc8] = 0x0e28, [0xc9] = 0x0e29, [0xca] = 0x0e2a, [0xcb] = 0x0e2b, + [0xcc] = 0x0e2c, [0xcd] = 0x0e2d, [0xce] = 0x0e2e, [0xcf] = 0x0e2f, + [0xd0] = 0x0e30, [0xd1] = 0x0e31, [0xd2] = 0x0e32, [0xd3] = 0x0e33, + [0xd4] = 0x0e34, [0xd5] = 0x0e35, [0xd6] = 0x0e36, [0xd7] = 0x0e37, + [0xd8] = 0x0e38, [0xd9] = 0x0e39, [0xda] = 0x0e3a, [0xdb] = 0x0e49, + [0xdc] = 0x0e4a, [0xdd] = 0x0e4b, [0xde] = 0x20ac, [0xdf] = 0x0e3f, + [0xe0] = 0x0e40, [0xe1] = 0x0e41, [0xe2] = 0x0e42, [0xe3] = 0x0e43, + [0xe4] = 0x0e44, [0xe5] = 0x0e45, [0xe6] = 0x0e46, [0xe7] = 0x0e47, + [0xe8] = 0x0e48, [0xe9] = 0x0e49, [0xea] = 0x0e4a, [0xeb] = 0x0e4b, + [0xec] = 0x0e4c, [0xed] = 0x0e4d, [0xee] = 0x0e4e, [0xef] = 0x0e4f, + [0xf0] = 0x0e50, [0xf1] = 0x0e51, [0xf2] = 0x0e52, [0xf3] = 0x0e53, + [0xf4] = 0x0e54, [0xf5] = 0x0e55, [0xf6] = 0x0e56, [0xf7] = 0x0e57, + [0xf8] = 0x0e58, [0xf9] = 0x0e59, [0xfa] = 0x0e5a, [0xfb] = 0x0e5b, + [0xfc] = 0x00a2, [0xfd] = 0x00ac, [0xfe] = 0x00a6, [0xff] = 0x00a0 +}; + +static const struct gap from_idx[] = +{ + { start: 0x0000, end: 0x007f, idx: 0 }, + { start: 0x00a0, end: 0x00ac, idx: -32 }, + { start: 0x0e01, end: 0x0e5b, idx: -3444 }, + { start: 0x20ac, end: 0x20ac, idx: -8132 }, + { start: 0xff01, end: 0xff5e, idx: -65048 }, + { start: 0xffff, end: 0xffff, idx: 0 } +}; + +static const char from_ucs4[] = +{ + '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', + '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', + '\x18', '\x19', '\x7f', '\x1b', '\x1a', '\x1d', '\x1e', '\x1f', + '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', + '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', + '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', + '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', + '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', + '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', + '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', + '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', + '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', + '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', + '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', + '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x1c', + '\xff', '\x00', '\xfc', '\x00', '\x00', '\x00', '\xfe', '\x00', + '\x00', '\x00', '\x00', '\x00', '\xfd', '\xa1', '\xa2', '\xa3', + '\xa4', '\xa5', '\xa6', '\xa7', '\xa8', '\xa9', '\xaa', '\xab', + '\xac', '\xad', '\xae', '\xaf', '\xb0', '\xb1', '\xb2', '\xb3', + '\xb4', '\xb5', '\xb6', '\xb7', '\xb8', '\xb9', '\xba', '\xbb', + '\xbc', '\xbd', '\xbe', '\xbf', '\xc0', '\xc1', '\xc2', '\xc3', + '\xc4', '\xc5', '\xc6', '\xc7', '\xc8', '\xc9', '\xca', '\xcb', + '\xcc', '\xcd', '\xce', '\xcf', '\xd0', '\xd1', '\xd2', '\xd3', + '\xd4', '\xd5', '\xd6', '\xd7', '\xd8', '\xd9', '\xda', '\x00', + '\x00', '\x00', '\x00', '\xdf', '\xe0', '\xe1', '\xe2', '\xe3', + '\xe4', '\xe5', '\xe6', '\xe7', '\xe8', '\xe9', '\xea', '\xeb', + '\xec', '\xed', '\xee', '\xef', '\xf0', '\xf1', '\xf2', '\xf3', + '\xf4', '\xf5', '\xf6', '\xf7', '\xf8', '\xf9', '\xfa', '\xfb', + '\xde', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', + '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', + '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', + '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', + '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', + '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', + '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', + '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', + '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', + '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', + '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', + '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e' +}; diff -durpN glibc-2.2.4/iconvdata/ibm1162.c glibc-2.2.5/iconvdata/ibm1162.c --- glibc-2.2.4/iconvdata/ibm1162.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1162.c Wed Oct 31 01:17:21 2001 @@ -0,0 +1,29 @@ +/* Conversion from and to IBM1162. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Get the conversion table. */ +#define TABLES + +#define CHARSET_NAME "IBM1162//" +#define HAS_HOLES 1 /* Not all 256 character are defined. */ + +#include <8bit-gap.c> diff -durpN glibc-2.2.4/iconvdata/ibm1162.h glibc-2.2.5/iconvdata/ibm1162.h --- glibc-2.2.4/iconvdata/ibm1162.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/ibm1162.h Wed Oct 31 01:17:38 2001 @@ -0,0 +1,145 @@ +/* Mapping table for IBM1162. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Masahide Washizawa , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +static const uint32_t to_ucs4[256] = +{ + [0x00] = 0x0000, [0x01] = 0x0001, [0x02] = 0x0002, [0x03] = 0x0003, + [0x04] = 0x0004, [0x05] = 0x0005, [0x06] = 0x0006, [0x07] = 0x0007, + [0x08] = 0x0008, [0x09] = 0x0009, [0x0a] = 0x000a, [0x0b] = 0x000b, + [0x0c] = 0x000c, [0x0d] = 0x000d, [0x0e] = 0x000e, [0x0f] = 0x000f, + [0x10] = 0x0010, [0x11] = 0x0011, [0x12] = 0x0012, [0x13] = 0x0013, + [0x14] = 0x0014, [0x15] = 0x0015, [0x16] = 0x0016, [0x17] = 0x0017, + [0x18] = 0x0018, [0x19] = 0x0019, [0x1a] = 0x001a, [0x1b] = 0x001b, + [0x1c] = 0x001c, [0x1d] = 0x001d, [0x1e] = 0x001e, [0x1f] = 0x001f, + [0x20] = 0x0020, [0x21] = 0x0021, [0x22] = 0x0022, [0x23] = 0x0023, + [0x24] = 0x0024, [0x25] = 0x0025, [0x26] = 0x0026, [0x27] = 0x0027, + [0x28] = 0x0028, [0x29] = 0x0029, [0x2a] = 0x002a, [0x2b] = 0x002b, + [0x2c] = 0x002c, [0x2d] = 0x002d, [0x2e] = 0x002e, [0x2f] = 0x002f, + [0x30] = 0x0030, [0x31] = 0x0031, [0x32] = 0x0032, [0x33] = 0x0033, + [0x34] = 0x0034, [0x35] = 0x0035, [0x36] = 0x0036, [0x37] = 0x0037, + [0x38] = 0x0038, [0x39] = 0x0039, [0x3a] = 0x003a, [0x3b] = 0x003b, + [0x3c] = 0x003c, [0x3d] = 0x003d, [0x3e] = 0x003e, [0x3f] = 0x003f, + [0x40] = 0x0040, [0x41] = 0x0041, [0x42] = 0x0042, [0x43] = 0x0043, + [0x44] = 0x0044, [0x45] = 0x0045, [0x46] = 0x0046, [0x47] = 0x0047, + [0x48] = 0x0048, [0x49] = 0x0049, [0x4a] = 0x004a, [0x4b] = 0x004b, + [0x4c] = 0x004c, [0x4d] = 0x004d, [0x4e] = 0x004e, [0x4f] = 0x004f, + [0x50] = 0x0050, [0x51] = 0x0051, [0x52] = 0x0052, [0x53] = 0x0053, + [0x54] = 0x0054, [0x55] = 0x0055, [0x56] = 0x0056, [0x57] = 0x0057, + [0x58] = 0x0058, [0x59] = 0x0059, [0x5a] = 0x005a, [0x5b] = 0x005b, + [0x5c] = 0x005c, [0x5d] = 0x005d, [0x5e] = 0x005e, [0x5f] = 0x005f, + [0x60] = 0x0060, [0x61] = 0x0061, [0x62] = 0x0062, [0x63] = 0x0063, + [0x64] = 0x0064, [0x65] = 0x0065, [0x66] = 0x0066, [0x67] = 0x0067, + [0x68] = 0x0068, [0x69] = 0x0069, [0x6a] = 0x006a, [0x6b] = 0x006b, + [0x6c] = 0x006c, [0x6d] = 0x006d, [0x6e] = 0x006e, [0x6f] = 0x006f, + [0x70] = 0x0070, [0x71] = 0x0071, [0x72] = 0x0072, [0x73] = 0x0073, + [0x74] = 0x0074, [0x75] = 0x0075, [0x76] = 0x0076, [0x77] = 0x0077, + [0x78] = 0x0078, [0x79] = 0x0079, [0x7a] = 0x007a, [0x7b] = 0x007b, + [0x7c] = 0x007c, [0x7d] = 0x007d, [0x7e] = 0x007e, [0x7f] = 0x007f, + [0x80] = 0x20ac, [0x81] = 0x0081, [0x82] = 0x0082, [0x83] = 0x0083, + [0x84] = 0x0084, [0x85] = 0x2026, [0x86] = 0x0086, [0x87] = 0x0087, + [0x88] = 0x0088, [0x89] = 0x0089, [0x8a] = 0x008a, [0x8b] = 0x008b, + [0x8c] = 0x008c, [0x8d] = 0x008d, [0x8e] = 0x008e, [0x8f] = 0x008f, + [0x90] = 0x0090, [0x91] = 0x2018, [0x92] = 0x2019, [0x93] = 0x201c, + [0x94] = 0x201d, [0x95] = 0x2022, [0x96] = 0x2013, [0x97] = 0x2014, + [0x98] = 0x0098, [0x99] = 0x0099, [0x9a] = 0x009a, [0x9b] = 0x009b, + [0x9c] = 0x009c, [0x9d] = 0x009d, [0x9e] = 0x009e, [0x9f] = 0x009f, + [0xa0] = 0x00a0, [0xa1] = 0x0e01, [0xa2] = 0x0e02, [0xa3] = 0x0e03, + [0xa4] = 0x0e04, [0xa5] = 0x0e05, [0xa6] = 0x0e06, [0xa7] = 0x0e07, + [0xa8] = 0x0e08, [0xa9] = 0x0e09, [0xaa] = 0x0e0a, [0xab] = 0x0e0b, + [0xac] = 0x0e0c, [0xad] = 0x0e0d, [0xae] = 0x0e0e, [0xaf] = 0x0e0f, + [0xb0] = 0x0e10, [0xb1] = 0x0e11, [0xb2] = 0x0e12, [0xb3] = 0x0e13, + [0xb4] = 0x0e14, [0xb5] = 0x0e15, [0xb6] = 0x0e16, [0xb7] = 0x0e17, + [0xb8] = 0x0e18, [0xb9] = 0x0e19, [0xba] = 0x0e1a, [0xbb] = 0x0e1b, + [0xbc] = 0x0e1c, [0xbd] = 0x0e1d, [0xbe] = 0x0e1e, [0xbf] = 0x0e1f, + [0xc0] = 0x0e20, [0xc1] = 0x0e21, [0xc2] = 0x0e22, [0xc3] = 0x0e23, + [0xc4] = 0x0e24, [0xc5] = 0x0e25, [0xc6] = 0x0e26, [0xc7] = 0x0e27, + [0xc8] = 0x0e28, [0xc9] = 0x0e29, [0xca] = 0x0e2a, [0xcb] = 0x0e2b, + [0xcc] = 0x0e2c, [0xcd] = 0x0e2d, [0xce] = 0x0e2e, [0xcf] = 0x0e2f, + [0xd0] = 0x0e30, [0xd1] = 0x0e31, [0xd2] = 0x0e32, [0xd3] = 0x0e33, + [0xd4] = 0x0e34, [0xd5] = 0x0e35, [0xd6] = 0x0e36, [0xd7] = 0x0e37, + [0xd8] = 0x0e38, [0xd9] = 0x0e39, [0xda] = 0x0e3a, [0xdf] = 0x0e3f, + [0xe0] = 0x0e40, [0xe1] = 0x0e41, [0xe2] = 0x0e42, [0xe3] = 0x0e43, + [0xe4] = 0x0e44, [0xe5] = 0x0e45, [0xe6] = 0x0e46, [0xe7] = 0x0e47, + [0xe8] = 0x0e48, [0xe9] = 0x0e49, [0xea] = 0x0e4a, [0xeb] = 0x0e4b, + [0xec] = 0x0e4c, [0xed] = 0x0e4d, [0xee] = 0x0e4e, [0xef] = 0x0e4f, + [0xf0] = 0x0e50, [0xf1] = 0x0e51, [0xf2] = 0x0e52, [0xf3] = 0x0e53, + [0xf4] = 0x0e54, [0xf5] = 0x0e55, [0xf6] = 0x0e56, [0xf7] = 0x0e57, + [0xf8] = 0x0e58, [0xf9] = 0x0e59, [0xfa] = 0x0e5a, [0xfb] = 0x0e5b +}; + +static const struct gap from_idx[] = +{ + { start: 0x0000, end: 0x0090, idx: 0 }, + { start: 0x0098, end: 0x00a0, idx: -7 }, + { start: 0x0e01, end: 0x0e5b, idx: -3431 }, + { start: 0x2013, end: 0x2026, idx: -7966 }, + { start: 0x20ac, end: 0x20ac, idx: -8099 }, + { start: 0xff01, end: 0xff5e, idx: -65015 }, + { start: 0xffff, end: 0xffff, idx: 0 } +}; + +static const char from_ucs4[] = +{ + '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', + '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', + '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', + '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', + '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', + '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', + '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', + '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', + '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', + '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', + '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', + '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', + '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', + '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', + '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', + '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', + '\x00', '\x81', '\x82', '\x83', '\x84', '\x00', '\x86', '\x87', + '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', + '\x90', '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', + '\x9f', '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', + '\xa7', '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', + '\xaf', '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', + '\xb7', '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', + '\xbf', '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', + '\xc7', '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', + '\xcf', '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', + '\xd7', '\xd8', '\xd9', '\xda', '\x00', '\x00', '\x00', '\x00', + '\xdf', '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', + '\xe7', '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', + '\xef', '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', + '\xf7', '\xf8', '\xf9', '\xfa', '\xfb', '\x96', '\x97', '\x00', + '\x00', '\x00', '\x91', '\x92', '\x00', '\x00', '\x93', '\x94', + '\x00', '\x00', '\x00', '\x00', '\x95', '\x00', '\x00', '\x00', + '\x85', '\x80', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', + '\x27', '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', + '\x2f', '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', + '\x37', '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', + '\x3f', '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', + '\x47', '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', + '\x4f', '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', + '\x57', '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', + '\x5f', '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', + '\x67', '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', + '\x6f', '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', + '\x77', '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e' +}; diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1132 glibc-2.2.5/iconvdata/testdata/IBM1132 --- glibc-2.2.4/iconvdata/testdata/IBM1132 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1132 Wed Oct 31 01:18:57 2001 @@ -0,0 +1,12 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P R S +T U V W X Y Z [ \ ] ^ _ ` a b c d +e f g h i j k l m n o r s t u v w +y z { | } ~  ‚ ƒ „ … † ‡ ˆ ‰ Œ + Ž ‘ ’ “ ” • – — ˜ ™ š › œ ž +Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ° ± ² +³ ´ µ ¶ · ¸ ¹ » ¼ ½ ¾ ¿ À Á Â Ã Ä +Å Æ Ç È É Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö +× Ø Ù Ú Û Ý Þ à â ã ä å æ ç è é ð +ñ ò ó ô õ ö ÷ ø ù ÿ diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1132..UTF8 glibc-2.2.5/iconvdata/testdata/IBM1132..UTF8 --- glibc-2.2.4/iconvdata/testdata/IBM1132..UTF8 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1132..UTF8 Wed Oct 31 01:19:12 2001 @@ -0,0 +1,2 @@ +€€Â€‚€ƒ€„€ +€€€ˆ€‰€Š€‹€Œ€€€€ÂŽ‘€€“€”€•€–€€˜€™€š€›€€€ž€€ € ŽàºÂ€àº‚€ຄ€ງ€ຈ€ສ€ຊ€[€¢€.€<€(€+€|€&€àºÂ€àº”Žຕ€ຖ€ທ€ນ€ບ€]€!€$€*€)€;€¬€-€/€ປ€ຜ€àºÂŽàºžÂ€àºŸÂ€àº¡Â€àº¢Â€^€¦€,€%€_€>€?€ຣ€ລ€ວ€ຫ€ອ€ຮŽ`€:€#€@€'€=€"€a€b€c€d€e€f€g€h€i€ຯŽະ€າ€ຳ€j€k€l€m€n€o€p€q€r€ິ€ີ€ຶ€ື€ຸŽູ€~€s€t€u€v€w€x€y€z€ຼ€ັ€ົ€ຽ€à»Â€à»‘€໒Ž໓€໔€໕€໖€໗€໘€໙€ເ€à»Â€à»‚€ໃ€ໄ€{€A€B€C€DÂŽE€F€G€H€I€່€້€໊€໋€໌€}€J€K€L€M€N€OÂŽP€Q€R€à»Â€à»†Â€à»œÂ€à»Â€\€S€T€U€V€W€X€Y€Z€0ÂŽ1€2€3€4€5€6€7€8€9€Ÿ€Ž \ No newline at end of file diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1133 glibc-2.2.5/iconvdata/testdata/IBM1133 --- glibc-2.2.4/iconvdata/testdata/IBM1133 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1133 Wed Oct 31 01:20:01 2001 @@ -0,0 +1,12 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P Q R +S T U V W X Y Z [ \ ] ^ _ ` a b c +d e f g h i j k l m n o p q r s t +u v w x y z { | } ~  € ‚ ƒ „ … +† ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – +— ˜ ™ š › œ ž Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ +© ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ +º » ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Ð +Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý Þ ð ñ ò ó +ô õ ö ÷ ø ù ü ý þ ÿ diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1133..UTF8 glibc-2.2.5/iconvdata/testdata/IBM1133..UTF8 --- glibc-2.2.4/iconvdata/testdata/IBM1133..UTF8 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1133..UTF8 Wed Oct 31 01:19:21 2001 @@ -0,0 +1,12 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P Q R +S T U V W X Y Z [ \ ] ^ _ ` a b c +d e f g h i j k l m n o p q r s t +u v w x y z { | } ~  €  ‚ ƒ „ Â… +† ‡ ˆ ‰ Š ‹ ÂŒ  Ž   ‘ Â’ “ ” • – +— ˜ ™ š › œ  ž Ÿ ຠຂ ຄ ງ ຈ ສ ຊ ຠ+ດ ຕ ຖ ທ ນ ບ ປ ຜ ຠພ ຟ ມ ຢ ຣ ລ ວ ຫ +ອ ຮ ຯ ະ າ ຳ ິ ີ ຶ ື ຸ ູ ຼ ັ ົ ຽ ເ +໠ໂ ໃ ໄ ່ ້ ໊ ໋ ໌ ໠ໆ ໜ ໠໠໑ à»’ ໓ +à»” ໕ à»– à»— ໘ à»™ ¢ ¬ ¦   diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1160 glibc-2.2.5/iconvdata/testdata/IBM1160 --- glibc-2.2.4/iconvdata/testdata/IBM1160 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1160 Tue Sep 25 00:11:58 2001 @@ -0,0 +1,13 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P R S +T U V W X Y Z [ \ ] ^ _ ` a b c d +e f g h i j k l m n o p q r s t u +v w x y z { | } ~  € ‚ ƒ „ … † +‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – — +˜ ™ š › œ ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ +© ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ +º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ë +Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü +Ý Þ ß à â ã ä å æ ç è é ê ë ì í î +ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü þ ÿ diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1160..UTF8 glibc-2.2.5/iconvdata/testdata/IBM1160..UTF8 --- glibc-2.2.4/iconvdata/testdata/IBM1160..UTF8 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1160..UTF8 Tue Sep 25 00:11:58 2001 @@ -0,0 +1,2 @@ +€€Â€‚€ƒ€„€ +€€€ˆ€‰€Š€‹€Œ€€€€ÂŽ‘€€“€”€•€–€€˜€™€š€›€€€ž€€ € Žà¸Â€à¸‚€ฃ€ค€ฅ€ฆ€ง€[€¢€.€<€(€+€|€&€จ€ฉŽช€ซ€ฌ€à¸Â€à¸ŽÂ€]€!€$€*€)€;€¬€-€/€à¸Â€à¸Â€à¸‘Žฒ€ณ€ด€ต€^€¦€,€%€_€>€?€฿€๎€ถ€ท€ธ€นŽบ€ป€ผ€`€:€#€@€'€=€"€à¹Â€a€b€c€d€e€fÂŽg€h€i€à¸Â€à¸žÂ€à¸ŸÂ€à¸ Â€à¸¡Â€à¸¢Â€à¹šÂ€j€k€l€m€n€o€pÂŽq€r€ร€ฤ€ล€ฦ€ว€ศ€๛€~€s€t€u€v€w€x€yÂŽz€ษ€ส€ห€ฬ€อ€ฮ€à¹Â€à¹‘€๒€๓€๔€๕€๖€๗€๘€๙Žฯ€ะ€ั€า€ำ€ิ€{€A€B€C€D€E€F€G€H€I€ีŽึ€ื€ุ€ู€}€J€K€L€M€N€O€P€Q€R€ฺ€เ€à¹ÂŽà¹‚€ใ€ไ€\€S€T€U€V€W€X€Y€Z€ๅ€ๆ€็€่€้Ž๊€0€1€2€3€4€5€6€7€8€9€๋€์€à¹Â€â‚¬Â€ÂŸÂ€ÂŽ \ No newline at end of file diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1161 glibc-2.2.5/iconvdata/testdata/IBM1161 --- glibc-2.2.4/iconvdata/testdata/IBM1161 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1161 Tue Sep 25 00:12:40 2001 @@ -0,0 +1,12 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P Q R +S T U V W X Y Z [ \ ] ^ _ ` a b c +d e f g h i j k l m n o p q r s t +u v w x y z { | } ~  ¡ ¢ £ ¤ ¥ ¦ +§ ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · +¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È +É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù +Ú Þ ß à á â ã ä å æ ç è é ê ë ì í +î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ +ÿ diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1161..UTF8 glibc-2.2.5/iconvdata/testdata/IBM1161..UTF8 --- glibc-2.2.4/iconvdata/testdata/IBM1161..UTF8 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1161..UTF8 Tue Sep 25 00:12:40 2001 @@ -0,0 +1,12 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P Q R +S T U V W X Y Z [ \ ] ^ _ ` a b c +d e f g h i j k l m n o p q r s t +u v w x y z { | } ~  ภข ฃ ค ฅ ฆ +ง จ ฉ ช ซ ฌ ภฎ ภภฑ ฒ ณ ด ต ถ ท +ธ น บ ป ผ ภพ ฟ ภ ม ย ร ฤ ล ฦ ว ศ +ษ ส ห ฬ อ ฮ ฯ ะ ั า ำ ิ ี ึ ื ุ ู +ฺ € ฿ เ ๠โ ใ ไ ๅ ๆ ็ ่ ้ ๊ ๋ ์ ๠+๎ ๠๠๑ ๒ ๓ ๔ ๕ ๖ ๗ ๘ ๙ ๚ ๛ ¢ ¬ ¦ +  diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1162 glibc-2.2.5/iconvdata/testdata/IBM1162 --- glibc-2.2.4/iconvdata/testdata/IBM1162 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1162 Wed Oct 31 01:19:49 2001 @@ -0,0 +1,13 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P Q R +S T U V W X Y Z [ \ ] ^ _ ` a b c +d e f g h i j k l m n o p q r s t +u v w x y z { | } ~  € ‚ ƒ „ … +† ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’ “ ” • – +— ˜ ™ š › œ ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § +¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ +¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É +Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú +ß à á â ã ä å æ ç è é ê ë ì í î ï +ð ñ ò ó ô õ ö ÷ ø ù ú û diff -durpN glibc-2.2.4/iconvdata/testdata/IBM1162..UTF8 glibc-2.2.5/iconvdata/testdata/IBM1162..UTF8 --- glibc-2.2.4/iconvdata/testdata/IBM1162..UTF8 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/iconvdata/testdata/IBM1162..UTF8 Wed Oct 31 01:19:33 2001 @@ -0,0 +1,13 @@ + ! " # $ % & ' ( ) * + , - . / 0 +1 2 3 4 5 6 7 8 9 : ; < = > ? @ A +B C D E F G H I J K L M N O P Q R +S T U V W X Y Z [ \ ] ^ _ ` a b c +d e f g h i j k l m n o p q r s t +u v w x y z { | } ~  €  ‚ ƒ „ … +† ‡ ˆ ‰ Š ‹ ÂŒ  Ž   ‘ ’ “ †• – +— ˜ ™ š › œ  ž Ÿ   ภข ฃ ค ฅ ฆ ง +จ ฉ ช ซ ฌ ภฎ ภภฑ ฒ ณ ด ต ถ ท ธ +น บ ป ผ ภพ ฟ ภ ม ย ร ฤ ล ฦ ว ศ ษ +ส ห ฬ อ ฮ ฯ ะ ั า ำ ิ ี ึ ื ุ ู ฺ +฿ เ ๠โ ใ ไ ๅ ๆ ็ ่ ้ ๊ ๋ ์ ๠๎ ๠+๠๑ ๒ ๓ ๔ ๕ ๖ ๗ ๘ ๙ ๚ ๛ diff -durpN glibc-2.2.4/include/dirent.h glibc-2.2.5/include/dirent.h --- glibc-2.2.4/include/dirent.h Thu Aug 31 14:45:02 2000 +++ glibc-2.2.5/include/dirent.h Mon Aug 20 00:16:37 2001 @@ -1,4 +1,5 @@ #ifndef _DIRENT_H +# include # include /* Now define the internal interfaces. */ diff -durpN glibc-2.2.4/include/dlfcn.h glibc-2.2.5/include/dlfcn.h --- glibc-2.2.4/include/dlfcn.h Wed Aug 2 14:52:09 2000 +++ glibc-2.2.5/include/dlfcn.h Sat Sep 22 19:08:28 2001 @@ -3,6 +3,7 @@ /* Internally used flag. */ #define __RTLD_DLOPEN 0x80000000 +#define __RTLD_SPROF 0x40000000 /* Now define the internal interfaces. */ extern void *__dlvsym (void *__handle, __const char *__name, diff -durpN glibc-2.2.4/include/features.h glibc-2.2.5/include/features.h --- glibc-2.2.4/include/features.h Mon Jul 23 10:54:06 2001 +++ glibc-2.2.5/include/features.h Wed Oct 31 20:23:17 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1995-2000, 2001 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 @@ -243,7 +243,7 @@ #define __STDC_IEC_559__ 1 #define __STDC_IEC_559_COMPLEX__ 1 -/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.0. */ +/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */ #define __STDC_ISO_10646__ 200009L /* This macro indicates that the installed library is the GNU C Library. @@ -279,9 +279,9 @@ /* This is here only because every header file already includes this one. */ #ifndef __ASSEMBLER__ -#ifndef _SYS_CDEFS_H -# include -#endif +# ifndef _SYS_CDEFS_H +# include +# endif /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ diff -durpN glibc-2.2.4/include/link.h glibc-2.2.5/include/link.h --- glibc-2.2.4/include/link.h Fri Jul 27 23:13:14 2001 +++ glibc-2.2.5/include/link.h Fri Sep 7 00:50:47 2001 @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. - Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000, 2001 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 @@ -34,6 +34,7 @@ #include /* Defines __ELF_NATIVE_CLASS. */ #include +#include /* Rendezvous structure used by the run-time dynamic linker to communicate details of shared object loading to the debugger. If the executable's @@ -199,9 +200,13 @@ struct link_map need not be the same as l_addr. */ ElfW(Addr) l_map_start, l_map_end; + /* Default array for 'l_scope'. */ + struct r_scope_elem *l_scope_mem[4]; + /* Size of array allocated for 'l_scope'. */ + size_t l_scope_max; /* This is an array defining the lookup scope for this link map. There are at most three different scope lists. */ - struct r_scope_elem *l_scope[4]; + struct r_scope_elem **l_scope; /* A similar array, this time only with the local scope. This is used occasionally. */ @@ -231,6 +236,18 @@ struct link_map unsigned int l_idx; struct link_map_machine l_mach; + + struct + { + const ElfW(Sym) *sym; + int type_class; +#ifdef DL_LOOKUP_RETURNS_MAP + struct link_map *value; +#else + ElfW(Addr) value; +#endif + const ElfW(Sym) *ret; + } l_lookup_cache; }; struct dl_phdr_info diff -durpN glibc-2.2.4/include/string.h glibc-2.2.5/include/string.h --- glibc-2.2.4/include/string.h Fri Feb 9 10:04:06 2001 +++ glibc-2.2.5/include/string.h Thu Aug 30 16:20:14 2001 @@ -47,4 +47,16 @@ extern char *__strerror_r (int __errnum, /* Now the real definitions. We do this here since some of the functions above are defined as macros in the headers. */ #include + +/* Alternative version which doesn't pollute glibc's namespace. */ +#undef strndupa +#define strndupa(s, n) \ + (__extension__ \ + ({ \ + __const char *__old = (s); \ + size_t __len = __strnlen (__old, (n)); \ + char *__new = (char *) __builtin_alloca (__len + 1); \ + __new[__len] = '\0'; \ + (char *) memcpy (__new, __old, __len); \ + })) #endif diff -durpN glibc-2.2.4/include/wchar.h glibc-2.2.5/include/wchar.h --- glibc-2.2.4/include/wchar.h Mon Mar 26 20:52:52 2001 +++ glibc-2.2.5/include/wchar.h Fri Aug 17 00:14:01 2001 @@ -8,6 +8,7 @@ extern int __wcscasecmp (__const wchar_t extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) __attribute_pure__; +extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2); extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__; extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen) __attribute_pure__; @@ -50,6 +51,13 @@ extern int __vfwscanf (__FILE *__restric __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0)) */; extern int __vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; +extern int __fwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, ...) + /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; +extern int __vfwprintf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; diff -durpN glibc-2.2.4/inet/rcmd.c glibc-2.2.5/inet/rcmd.c --- glibc-2.2.4/inet/rcmd.c Mon Jul 23 10:54:07 2001 +++ glibc-2.2.5/inet/rcmd.c Thu Aug 16 23:24:58 2001 @@ -80,6 +80,9 @@ static char sccsid[] = "@(#)rcmd.c 8.3 ( #include #include #include +#ifdef USE_IN_LIBIO +# include +#endif int __ivaliduser (FILE *, u_int32_t, const char *, const char *); @@ -133,8 +136,14 @@ rcmd_af(ahost, rport, locuser, remuser, (void)__snprintf(num, sizeof(num), "%d", ntohs(rport)); error = getaddrinfo(*ahost, num, &hints, &res); if (error) { - fprintf(stderr, "rcmd: getaddrinfo: %s\n", - gai_strerror(error)); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf(stderr, L"rcmd: getaddrinfo: %s\n", + gai_strerror(error)); + else +#endif + fprintf(stderr, "rcmd: getaddrinfo: %s\n", + gai_strerror(error)); return (-1); } @@ -152,13 +161,28 @@ rcmd_af(ahost, rport, locuser, remuser, refused = 0; oldmask = __sigblock(sigmask(SIGURG)); for (timo = 1, lport = IPPORT_RESERVED - 1;;) { + char errbuf[200]; + s = rresvport_af(&lport, ai->ai_family); if (s < 0) { - if (errno == EAGAIN) - fprintf(stderr, - _("rcmd: socket: All ports in use\n")); - else - fprintf(stderr, "rcmd: socket: %m\n"); + if (errno == EAGAIN) { +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf(stderr, L"%s", + _("rcmd: socket: All ports in use\n")); + else +#endif + fputs(_("rcmd: socket: All ports in use\n"), + stderr); + } else { +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf(stderr, + L"rcmd: socket: %m\n"); + else +#endif + fprintf(stderr, "rcmd: socket: %m\n"); + } __sigsetmask(oldmask); freeaddrinfo(res); return -1; @@ -175,12 +199,20 @@ rcmd_af(ahost, rport, locuser, remuser, refused = 1; if (ai->ai_next != NULL) { int oerrno = errno; + char *buf = NULL; getnameinfo(ai->ai_addr, ai->ai_addrlen, paddr, sizeof(paddr), NULL, 0, NI_NUMERICHOST); - fprintf(stderr, "connect to address %s: ", paddr); + + __asprintf (&buf, _("connect to address %s: "), paddr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf(stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); __set_errno (oerrno); perror(0); ai = ai->ai_next; @@ -188,7 +220,14 @@ rcmd_af(ahost, rport, locuser, remuser, paddr, sizeof(paddr), NULL, 0, NI_NUMERICHOST); - fprintf(stderr, "Trying %s...\n", paddr); + __asprintf (&buf, _("Trying %s...\n"), paddr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + free (buf); continue; } if (refused && timo <= 16) { @@ -199,7 +238,16 @@ rcmd_af(ahost, rport, locuser, remuser, continue; } freeaddrinfo(res); - (void)fprintf(stderr, "%s: %s\n", *ahost, strerror(errno)); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void)__fwprintf(stderr, L"%s: %s\n", *ahost, + __strerror_r(errno, + errbuf, sizeof (errbuf))); + else +#endif + (void)fprintf(stderr, "%s: %s\n", *ahost, + __strerror_r(errno, + errbuf, sizeof (errbuf))); __sigsetmask(oldmask); return -1; } @@ -217,8 +265,17 @@ rcmd_af(ahost, rport, locuser, remuser, listen(s2, 1); (void)__snprintf(num, sizeof(num), "%d", lport); if (__write(s, num, strlen(num)+1) != (ssize_t)strlen(num)+1) { - (void)fprintf(stderr, - _("rcmd: write (setting up stderr): %m\n")); + char *buf = NULL; + + __asprintf (&buf, _("\ +rcmd: write (setting up stderr): %m\n")); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf(stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + free (buf); (void)__close(s2); goto bad; } @@ -226,12 +283,21 @@ rcmd_af(ahost, rport, locuser, remuser, pfd[1].fd = s2; __set_errno (0); if (__poll (pfd, 2, -1) < 1 || (pfd[1].revents & POLLIN) == 0){ + char *buf = NULL; + if (errno != 0) - (void)fprintf(stderr, - _("rcmd: poll (setting up stderr): %m\n")); + __asprintf(&buf, + _("rcmd: poll (setting up stderr): %m\n")); else - (void)fprintf(stderr, + __asprintf(&buf, _("poll: protocol failure in circuit setup\n")); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + free (buf); (void)__close(s2); goto bad; } @@ -249,16 +315,31 @@ rcmd_af(ahost, rport, locuser, remuser, } (void)__close(s2); if (s3 < 0) { - (void)fprintf(stderr, - "rcmd: accept: %m\n"); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void)__fwprintf(stderr, + L"rcmd: accept: %m\n"); + else +#endif + (void)fprintf(stderr, + "rcmd: accept: %m\n"); lport = 0; goto bad; } *fd2p = s3; if (rport >= IPPORT_RESERVED || rport < IPPORT_RESERVED / 2){ - (void)fprintf(stderr, - _("socket: protocol failure in circuit setup\n")); + char *buf = NULL; + + __asprintf(&buf, + _("socket: protocol failure in circuit setup\n")); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + free (buf); goto bad2; } } @@ -267,11 +348,19 @@ rcmd_af(ahost, rport, locuser, remuser, (void)__write(s, cmd, strlen(cmd)+1); n = __read(s, &c, 1); if (n != 1) { + char *buf = NULL; + if (n == 0) - (void)fprintf(stderr, _("rcmd: %s: short read"), - *ahost); + __asprintf(&buf, _("rcmd: %s: short read"), *ahost); else - (void)fprintf(stderr, "rcmd: %s: %m\n", *ahost); + __asprintf(&buf, "rcmd: %s: %m\n", *ahost); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + free (buf); goto bad2; } if (c != 0) { diff -durpN glibc-2.2.4/intl/plural.c glibc-2.2.5/intl/plural.c --- glibc-2.2.4/intl/plural.c Mon Jul 23 10:54:10 2001 +++ glibc-2.2.5/intl/plural.c Mon Jan 7 23:59:21 2002 @@ -296,7 +296,7 @@ static const short yycheck[] = { 1, #define YYPURE 1 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/bison.simple" +#line 3 "/usr/lib/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -327,11 +327,6 @@ static const short yycheck[] = { 1, It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified. */ -#ifndef YYPARSE_RETURN_TYPE -#define YYPARSE_RETURN_TYPE int -#endif - - #ifndef YYSTACK_USE_ALLOCA #ifdef alloca #define YYSTACK_USE_ALLOCA @@ -515,7 +510,7 @@ __yy_memcpy (char *to, char *from, unsig #endif #endif -#line 222 "/usr/share/bison.simple" +#line 217 "/usr/lib/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -539,15 +534,13 @@ __yy_memcpy (char *to, char *from, unsig /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ #ifdef YYPARSE_PARAM -YYPARSE_RETURN_TYPE -yyparse (void *); +int yyparse (void *); #else -YYPARSE_RETURN_TYPE -yyparse (void); +int yyparse (void); #endif #endif -YYPARSE_RETURN_TYPE +int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { @@ -575,9 +568,7 @@ yyparse(YYPARSE_PARAM_ARG) #endif int yystacksize = YYINITDEPTH; -#ifndef YYSTACK_USE_ALLOCA int yyfree_stacks = 0; -#endif #ifdef YYPURE int yychar; @@ -662,7 +653,6 @@ yynewstate: if (yystacksize >= YYMAXDEPTH) { yyerror("parser stack overflow"); -#ifndef YYSTACK_USE_ALLOCA if (yyfree_stacks) { free (yyss); @@ -671,7 +661,6 @@ yynewstate: free (yyls); #endif } -#endif return 2; } yystacksize *= 2; @@ -926,7 +915,7 @@ case 12: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 554 "/usr/share/bison.simple" +#line 543 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -1124,7 +1113,6 @@ yyerrhandle: yyacceptlab: /* YYACCEPT comes here. */ -#ifndef YYSTACK_USE_ALLOCA if (yyfree_stacks) { free (yyss); @@ -1133,12 +1121,10 @@ yyerrhandle: free (yyls); #endif } -#endif return 0; yyabortlab: /* YYABORT comes here. */ -#ifndef YYSTACK_USE_ALLOCA if (yyfree_stacks) { free (yyss); @@ -1147,7 +1133,6 @@ yyerrhandle: free (yyls); #endif } -#endif return 1; } #line 226 "plural.y" diff -durpN glibc-2.2.4/intl/plural.y glibc-2.2.5/intl/plural.y --- glibc-2.2.4/intl/plural.y Mon Jul 23 10:54:10 2001 +++ glibc-2.2.5/intl/plural.y Mon Jan 7 22:34:34 2002 @@ -41,7 +41,7 @@ #define YYPARSE_PARAM arg %} %pure_parser -%expect 10 +%expect 7 %union { unsigned long int num; diff -durpN glibc-2.2.4/io/fts.c glibc-2.2.5/io/fts.c --- glibc-2.2.4/io/fts.c Tue Aug 15 11:16:20 2000 +++ glibc-2.2.5/io/fts.c Sun Aug 19 23:59:41 2001 @@ -56,12 +56,13 @@ static char sccsid[] = "@(#)fts.c 8.6 (B static FTSENT *fts_alloc __P((FTS *, const char *, int)) internal_function; static FTSENT *fts_build __P((FTS *, int)) internal_function; static void fts_lfree __P((FTSENT *)) internal_function; -static void fts_load __P((FTS *, FTSENT *)); +static void fts_load __P((FTS *, FTSENT *)) internal_function; static size_t fts_maxarglen __P((char * const *)) internal_function; -static void fts_padjust __P((FTS *, void *)) internal_function; +static void fts_padjust __P((FTS *, FTSENT *)) internal_function; static int fts_palloc __P((FTS *, size_t)) internal_function; static FTSENT *fts_sort __P((FTS *, FTSENT *, int)) internal_function; -static u_short fts_stat __P((FTS *, struct dirent *, FTSENT *, int)) +static u_short fts_stat __P((FTS *, FTSENT *, int)) internal_function; +static int fts_safe_changedir __P((FTS *, FTSENT *, int, const char *)) internal_function; #ifndef MAX @@ -72,10 +73,10 @@ static u_short fts_stat __P((FTS *, str #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) -#define ISSET(opt) (sp->fts_options & opt) -#define SET(opt) (sp->fts_options |= opt) +#define CLR(opt) (sp->fts_options &= ~(opt)) +#define ISSET(opt) (sp->fts_options & (opt)) +#define SET(opt) (sp->fts_options |= (opt)) -#define CHDIR(sp, path) (!ISSET(FTS_NOCHDIR) && __chdir(path)) #define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && __fchdir(fd)) /* fts_build flags */ @@ -104,7 +105,7 @@ fts_open(argv, options, compar) /* Allocate/initialize the stream */ if ((sp = malloc((u_int)sizeof(FTS))) == NULL) return (NULL); - __bzero(sp, sizeof(FTS)); + memset(sp, 0, sizeof(FTS)); sp->fts_compar = (int (*) __P((const void *, const void *))) compar; sp->fts_options = options; @@ -128,7 +129,7 @@ fts_open(argv, options, compar) parent->fts_level = FTS_ROOTPARENTLEVEL; /* Allocate/initialize root(s). */ - for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) { + for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { /* Don't allow zero-length paths. */ if ((len = strlen(*argv)) == 0) { __set_errno (ENOENT); @@ -139,7 +140,7 @@ fts_open(argv, options, compar) p->fts_level = FTS_ROOTLEVEL; p->fts_parent = parent; p->fts_accpath = p->fts_name; - p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW)); + p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); /* Command-line "." and ".." are real directories. */ if (p->fts_info == FTS_DOT) @@ -176,7 +177,7 @@ fts_open(argv, options, compar) sp->fts_cur->fts_info = FTS_INIT; /* - * If using chdir(2), grab a file descriptor pointing to dot to insure + * If using chdir(2), grab a file descriptor pointing to dot to ensure * that we can get back here; this could be avoided for some paths, * but almost certainly not worth the effort. Slashes, symbolic links, * and ".." are all fairly nasty problems. Note, if we can't get the @@ -196,6 +197,7 @@ mem1: free(sp); } static void +internal_function fts_load(sp, p) FTS *sp; register FTSENT *p; @@ -211,10 +213,10 @@ fts_load(sp, p) * known that the path will fit. */ len = p->fts_pathlen = p->fts_namelen; - bcopy(p->fts_name, sp->fts_path, len + 1); - if ((cp = rindex(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { + memmove(sp->fts_path, p->fts_name, len + 1); + if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { len = strlen(++cp); - bcopy(cp, p->fts_name, len + 1); + memmove(p->fts_name, cp, len + 1); p->fts_namelen = len; } p->fts_accpath = p->fts_path = sp->fts_path; @@ -227,7 +229,6 @@ fts_close(sp) { register FTSENT *freep, *p; int saved_errno; - int retval = 0; /* * This still works if we haven't read anything -- the dummy structure @@ -237,7 +238,7 @@ fts_close(sp) if (sp->fts_cur) { for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { freep = p; - p = p->fts_link ? p->fts_link : p->fts_parent; + p = p->fts_link != NULL ? p->fts_link : p->fts_parent; free(freep); } free(p); @@ -254,27 +255,28 @@ fts_close(sp) if (!ISSET(FTS_NOCHDIR)) { saved_errno = __fchdir(sp->fts_rfd) ? errno : 0; (void)__close(sp->fts_rfd); - } - /* Set errno and return. */ - if (!ISSET(FTS_NOCHDIR) && saved_errno) { - __set_errno (saved_errno); - retval = -1; + /* Set errno and return. */ + if (saved_errno != 0) { + /* Free up the stream pointer. */ + free(sp); + __set_errno (saved_errno); + return (-1); + } } /* Free up the stream pointer. */ - free (sp); - - return retval; + free(sp); + return (0); } /* - * Special case a root of "/" so that slashes aren't appended which would - * cause paths to be written as "//foo". + * Special case of "/" at the end of the path so that slashes aren't + * appended which would cause paths to be written as "....//foo". */ #define NAPPEND(p) \ - (p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 && \ - p->fts_path[0] == '/' ? 0 : p->fts_pathlen) + (p->fts_path[p->fts_pathlen - 1] == '/' \ + ? p->fts_pathlen - 1 : p->fts_pathlen) FTSENT * fts_read(sp) @@ -298,7 +300,7 @@ fts_read(sp) /* Any type of file may be re-visited; re-stat and re-turn. */ if (instr == FTS_AGAIN) { - p->fts_info = fts_stat(sp, NULL, p, 0); + p->fts_info = fts_stat(sp, p, 0); return (p); } @@ -310,7 +312,7 @@ fts_read(sp) */ if (instr == FTS_FOLLOW && (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { - p->fts_info = fts_stat(sp, NULL, p, 1); + p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { if ((p->fts_symfd = __open(".", O_RDONLY, 0)) < 0) { p->fts_errno = errno; @@ -337,8 +339,8 @@ fts_read(sp) } /* Rebuild if only read the names and now traversing. */ - if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) { - sp->fts_options &= ~FTS_NAMEONLY; + if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { + CLR(FTS_NAMEONLY); fts_lfree(sp->fts_child); sp->fts_child = NULL; } @@ -355,11 +357,12 @@ fts_read(sp) * If haven't read do so. If the read fails, fts_build sets * FTS_STOP or the fts_info field of the node. */ - if (sp->fts_child) { - if (CHDIR(sp, p->fts_accpath)) { + if (sp->fts_child != NULL) { + if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { p->fts_errno = errno; p->fts_flags |= FTS_DONTCHDIR; - for (p = sp->fts_child; p; p = p->fts_link) + for (p = sp->fts_child; p != NULL; + p = p->fts_link) p->fts_accpath = p->fts_parent->fts_accpath; } @@ -375,15 +378,15 @@ fts_read(sp) /* Move to the next node on this level. */ next: tmp = p; - if ((p = p->fts_link)) { + if ((p = p->fts_link) != NULL) { free(tmp); /* - * If reached the top, return to the original directory, and - * load the paths for the next root. + * If reached the top, return to the original directory (or + * the root of the tree), and load the paths for the next root. */ if (p->fts_level == FTS_ROOTLEVEL) { - if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) { + if (FCHDIR(sp, sp->fts_rfd)) { SET(FTS_STOP); return (NULL); } @@ -399,7 +402,7 @@ next: tmp = p; if (p->fts_instr == FTS_SKIP) goto next; if (p->fts_instr == FTS_FOLLOW) { - p->fts_info = fts_stat(sp, NULL, p, 1); + p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { if ((p->fts_symfd = __open(".", O_RDONLY, 0)) < 0) { @@ -413,7 +416,7 @@ next: tmp = p; name: t = sp->fts_path + NAPPEND(p->fts_parent); *t++ = '/'; - bcopy(p->fts_name, t, p->fts_namelen + 1); + memmove(t, p->fts_name, p->fts_namelen + 1); return (sp->fts_cur = p); } @@ -431,7 +434,7 @@ name: t = sp->fts_path + NAPPEND(p->fts return (sp->fts_cur = NULL); } - /* Nul terminate the pathname. */ + /* NUL terminate the pathname. */ sp->fts_path[p->fts_pathlen] = '\0'; /* @@ -440,7 +443,7 @@ name: t = sp->fts_path + NAPPEND(p->fts * one directory. */ if (p->fts_level == FTS_ROOTLEVEL) { - if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) { + if (FCHDIR(sp, sp->fts_rfd)) { SET(FTS_STOP); return (NULL); } @@ -453,11 +456,10 @@ name: t = sp->fts_path + NAPPEND(p->fts return (NULL); } (void)__close(p->fts_symfd); - } else if (!(p->fts_flags & FTS_DONTCHDIR)) { - if (CHDIR(sp, "..")) { - SET(FTS_STOP); - return (NULL); - } + } else if (!(p->fts_flags & FTS_DONTCHDIR) && + fts_safe_changedir(sp, p->fts_parent, -1, "..")) { + SET(FTS_STOP); + return (NULL); } p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; return (sp->fts_cur = p); @@ -476,7 +478,7 @@ fts_set(sp, p, instr) FTSENT *p; int instr; { - if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW && + if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && instr != FTS_NOINSTR && instr != FTS_SKIP) { __set_errno (EINVAL); return (1); @@ -493,7 +495,7 @@ fts_children(sp, instr) register FTSENT *p; int fd; - if (instr && instr != FTS_NAMEONLY) { + if (instr != 0 && instr != FTS_NAMEONLY) { __set_errno (EINVAL); return (NULL); } @@ -524,11 +526,11 @@ fts_children(sp, instr) return (NULL); /* Free up any previous child list. */ - if (sp->fts_child) + if (sp->fts_child != NULL) fts_lfree(sp->fts_child); if (instr == FTS_NAMEONLY) { - sp->fts_options |= FTS_NAMEONLY; + SET(FTS_NAMEONLY); instr = BNAMES; } else instr = BCHILD; @@ -573,17 +575,15 @@ fts_build(sp, type) register FTS *sp; int type; { - struct dirent *dp; + register struct dirent *dp; register FTSENT *p, *head; register int nitems; FTSENT *cur, *tail; DIR *dirp; - void *adjaddr; - int cderrno, descend, len, level, maxlen, nlinks, saved_errno; + void *oldaddr; + int cderrno, descend, len, level, maxlen, nlinks, saved_errno, + nostat, doadjust; char *cp; -#ifdef DTF_HIDEW - int oflag; -#endif /* Set current node pointer. */ cur = sp->fts_cur; @@ -592,15 +592,15 @@ fts_build(sp, type) * Open the directory for reading. If this fails, we're done. * If being called from fts_read, set the fts_info field. */ -#ifdef DTF_HIDEW - if (ISSET (FTS_WHITEOUT)) +#if defined FTS_WHITEOUT && 0 + if (ISSET(FTS_WHITEOUT)) oflag = DTF_NODUP|DTF_REWIND; else oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; #else # define __opendir2(path, flag) __opendir(path) #endif - if ((dirp = __opendir2 (cur->fts_accpath, oflag)) == NULL) { + if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) { if (type == BREAD) { cur->fts_info = FTS_DNR; cur->fts_errno = errno; @@ -613,12 +613,17 @@ fts_build(sp, type) * directory if we're cheating on stat calls, 0 if we're not doing * any stat calls at all, -1 if we're doing stats on everything. */ - if (type == BNAMES) + if (type == BNAMES) { nlinks = 0; - else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) + /* Be quiet about nostat, GCC. */ + nostat = 0; + } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); - else + nostat = 1; + } else { nlinks = -1; + nostat = 0; + } #ifdef notdef (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink); @@ -642,12 +647,14 @@ fts_build(sp, type) */ cderrno = 0; if (nlinks || type == BREAD) { - if (FCHDIR(sp, dirfd(dirp))) { + if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { if (nlinks && type == BREAD) cur->fts_errno = errno; cur->fts_flags |= FTS_DONTCHDIR; descend = 0; cderrno = errno; + (void)__closedir(dirp); + dirp = NULL; } else descend = 1; } else @@ -663,30 +670,30 @@ fts_build(sp, type) * If not changing directories set a pointer so that can just append * each new name into the path. */ - maxlen = sp->fts_pathlen - cur->fts_pathlen - 1; len = NAPPEND(cur); if (ISSET(FTS_NOCHDIR)) { cp = sp->fts_path + len; *cp++ = '/'; + } else { + /* GCC, you're too verbose. */ + cp = NULL; } + len++; + maxlen = sp->fts_pathlen - len; level = cur->fts_level + 1; /* Read the directory, attaching each entry to the `link' pointer. */ - adjaddr = NULL; - head = tail = NULL; - nitems = 0; - while((dp = __readdir(dirp))) { - int namlen; - + doadjust = 0; + for (head = tail = NULL, nitems = 0; dirp && (dp = __readdir(dirp));) { if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) continue; - namlen = _D_EXACT_NAMLEN (dp); - if ((p = fts_alloc(sp, dp->d_name, namlen)) == NULL) + if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL) goto mem1; - if (namlen > maxlen) { - if (fts_palloc(sp, (size_t)namlen)) { + if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ + oldaddr = sp->fts_path; + if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { /* * No more memory for path or structures. Save * errno, free up the current structure and the @@ -697,18 +704,43 @@ mem1: saved_errno = errno; free(p); fts_lfree(head); (void)__closedir(dirp); - __set_errno (saved_errno); cur->fts_info = FTS_ERR; SET(FTS_STOP); + __set_errno (saved_errno); return (NULL); } - adjaddr = sp->fts_path; - maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1; + /* Did realloc() change the pointer? */ + if (oldaddr != sp->fts_path) { + doadjust = 1; + if (ISSET(FTS_NOCHDIR)) + cp = sp->fts_path + len; + } + maxlen = sp->fts_pathlen - len; } - p->fts_pathlen = len + namlen + 1; - p->fts_parent = sp->fts_cur; + if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) { + /* + * In an FTSENT, fts_pathlen is a u_short so it is + * possible to wraparound here. If we do, free up + * the current structure and the structures already + * allocated, then error out with ENAMETOOLONG. + */ + free(p); + fts_lfree(head); + (void)__closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (ENAMETOOLONG); + return (NULL); + } p->fts_level = level; + p->fts_parent = sp->fts_cur; + p->fts_pathlen = len + _D_EXACT_NAMLEN (dp); + +#if defined FTS_WHITEOUT && 0 + if (dp->d_type == DT_WHT) + p->fts_flags |= FTS_ISW; +#endif if (cderrno) { if (nlinks) { @@ -719,8 +751,8 @@ mem1: saved_errno = errno; p->fts_accpath = cur->fts_accpath; } else if (nlinks == 0 #if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE - || (nlinks > 0 && - dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) + || (nostat && + dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) #endif ) { p->fts_accpath = @@ -730,11 +762,11 @@ mem1: saved_errno = errno; /* Build a file name for fts_stat to stat. */ if (ISSET(FTS_NOCHDIR)) { p->fts_accpath = p->fts_path; - bcopy(p->fts_name, cp, p->fts_namelen + 1); + memmove(cp, p->fts_name, p->fts_namelen + 1); } else p->fts_accpath = p->fts_name; /* Stat it. */ - p->fts_info = fts_stat(sp, dp, p, 0); + p->fts_info = fts_stat(sp, p, 0); /* Decrement link count if applicable. */ if (nlinks > 0 && (p->fts_info == FTS_D || @@ -752,21 +784,22 @@ mem1: saved_errno = errno; } ++nitems; } - (void)__closedir(dirp); + if (dirp) + (void)__closedir(dirp); /* - * If had to realloc the path, adjust the addresses for the rest - * of the tree. + * If realloc() changed the address of the path, adjust the + * addresses for the rest of the tree and the dir list. */ - if (adjaddr) - fts_padjust(sp, adjaddr); + if (doadjust) + fts_padjust(sp, head); /* * If not changing directories, reset the path back to original * state. */ if (ISSET(FTS_NOCHDIR)) { - if (cp - 1 > sp->fts_path) + if (len == sp->fts_pathlen || nitems == 0) --cp; *cp = '\0'; } @@ -780,7 +813,8 @@ mem1: saved_errno = errno; */ if (descend && (type == BCHILD || !nitems) && (cur->fts_level == FTS_ROOTLEVEL ? - FCHDIR (sp, sp->fts_rfd) : CHDIR (sp, ".."))) { + FCHDIR(sp, sp->fts_rfd) : + fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { cur->fts_info = FTS_ERR; SET(FTS_STOP); return (NULL); @@ -801,10 +835,9 @@ mem1: saved_errno = errno; static u_short internal_function -fts_stat(sp, dp, p, follow) +fts_stat(sp, p, follow) FTS *sp; register FTSENT *p; - struct dirent *dp; int follow; { register FTSENT *t; @@ -816,15 +849,13 @@ fts_stat(sp, dp, p, follow) /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; -#if defined DT_WHT && defined S_IFWHT - /* - * Whited-out files don't really exist. However, there's stat(2) file - * mask for them, so we set it so that programs (i.e., find) don't have - * to test FTS_W separately from other file types. - */ - if (dp != NULL && dp->d_type == DT_WHT) { - memset(sbp, 0, sizeof(struct stat)); - sbp->st_mode = S_IFWHT; +#if defined FTS_WHITEOUT && 0 + /* check for whiteout */ + if (p->fts_flags & FTS_ISW) { + if (sbp != &sb) { + memset(sbp, '\0', sizeof (*sbp)); + sbp->st_mode = S_IFWHT; + } return (FTS_W); } #endif @@ -846,7 +877,7 @@ fts_stat(sp, dp, p, follow) } } else if (lstat(p->fts_accpath, sbp)) { p->fts_errno = errno; -err: __bzero(sbp, sizeof(struct stat)); +err: memset(sbp, 0, sizeof(struct stat)); return (FTS_NS); } @@ -943,8 +974,9 @@ fts_alloc(sp, name, namelen) if ((p = malloc(len)) == NULL) return (NULL); - /* Copy the name plus the trailing NULL. */ - bcopy(name, p->fts_name, namelen + 1); + /* Copy the name and guarantee NUL termination. */ + memmove(p->fts_name, name, namelen); + p->fts_name[namelen] = '\0'; if (!ISSET(FTS_NOSTAT)) p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2); @@ -985,7 +1017,19 @@ fts_palloc(sp, more) size_t more; { sp->fts_pathlen += more + 256; - sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen); + /* + * Check for possible wraparound. In an FTS, fts_pathlen is + * a signed int but in an FTSENT it is an unsigned short. + * We limit fts_pathlen to USHRT_MAX to be safe in both cases. + */ + if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { + if (sp->fts_path) + free(sp->fts_path); + sp->fts_path = NULL; + __set_errno (ENAMETOOLONG); + return (1); + } + sp->fts_path = realloc(sp->fts_path, sp->fts_pathlen); return (sp->fts_path == NULL); } @@ -995,23 +1039,26 @@ fts_palloc(sp, more) */ static void internal_function -fts_padjust(sp, addr) +fts_padjust(sp, head) FTS *sp; - void *addr; + FTSENT *head; { FTSENT *p; + char *addr = sp->fts_path; -#define ADJUST(p) { \ - (p)->fts_accpath = \ - (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ +#define ADJUST(p) do { \ + if ((p)->fts_accpath != (p)->fts_name) { \ + (p)->fts_accpath = \ + (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ + } \ (p)->fts_path = addr; \ -} +} while (0) /* Adjust the current set of children. */ for (p = sp->fts_child; p; p = p->fts_link) ADJUST(p); - /* Adjust the rest of the tree. */ - for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { + /* Adjust the rest of the tree, including the current level. */ + for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { ADJUST(p); p = p->fts_link ? p->fts_link : p->fts_parent; } @@ -1027,5 +1074,44 @@ fts_maxarglen(argv) for (max = 0; *argv; ++argv) if ((len = strlen(*argv)) > max) max = len; - return (max); + return (max + 1); +} + +/* + * Change to dir specified by fd or p->fts_accpath without getting + * tricked by someone changing the world out from underneath us. + * Assumes p->fts_dev and p->fts_ino are filled in. + */ +static int +internal_function +fts_safe_changedir(sp, p, fd, path) + FTS *sp; + FTSENT *p; + int fd; + const char *path; +{ + int ret, oerrno, newfd; + struct stat64 sb; + + newfd = fd; + if (ISSET(FTS_NOCHDIR)) + return (0); + if (fd < 0 && (newfd = __open(path, O_RDONLY, 0)) < 0) + return (-1); + if (__fxstat64(_STAT_VER, newfd, &sb)) { + ret = -1; + goto bail; + } + if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { + __set_errno (ENOENT); /* disinformation */ + ret = -1; + goto bail; + } + ret = __fchdir(newfd); +bail: + oerrno = errno; + if (fd < 0) + (void)__close(newfd); + __set_errno (oerrno); + return (ret); } diff -durpN glibc-2.2.4/io/fts.h glibc-2.2.5/io/fts.h --- glibc-2.2.4/io/fts.h Mon Oct 11 11:45:07 1999 +++ glibc-2.2.5/io/fts.h Mon Nov 5 12:58:39 2001 @@ -35,6 +35,13 @@ #include #include +/* The fts interface is incompatible with the LFS interface which + transparently uses the 64-bit file access functions. */ +#ifdef __USE_FILE_OFFSET64 +# error " cannot be used with -D_FILE_OFFSET_BITS==64" +#endif + + typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ diff -durpN glibc-2.2.4/io/ftw.c glibc-2.2.5/io/ftw.c --- glibc-2.2.4/io/ftw.c Mon Jul 23 10:54:10 2001 +++ glibc-2.2.5/io/ftw.c Mon Dec 10 15:51:23 2001 @@ -473,6 +473,9 @@ ftw_startup (const char *dir, int is_nft return -1; } + if (__access (dir, R_OK) != 0) + return -1; + data.maxdir = descriptors < 1 ? 1 : descriptors; data.actdir = 0; data.dirstreams = (struct dir_data **) alloca (data.maxdir diff -durpN glibc-2.2.4/libio/Makefile glibc-2.2.5/libio/Makefile --- glibc-2.2.4/libio/Makefile Fri Aug 10 12:11:48 2001 +++ glibc-2.2.5/libio/Makefile Wed Aug 22 11:39:25 2001 @@ -48,7 +48,7 @@ routines := \ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \ - tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf + tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf test-srcs = test-freopen all: # Make this the default target; it will be defined in Rules. diff -durpN glibc-2.2.4/libio/freopen.c glibc-2.2.5/libio/freopen.c --- glibc-2.2.4/libio/freopen.c Mon Jul 23 10:54:11 2001 +++ glibc-2.2.5/libio/freopen.c Thu Aug 16 23:50:50 2001 @@ -47,7 +47,7 @@ freopen (filename, mode, fp) _IO_flockfile (fp); if (filename == NULL && _IO_fileno (fp) >= 0) { - fd = dup (_IO_fileno (fp)); + fd = __dup (_IO_fileno (fp)); if (fd != -1) filename = fd_to_filename (fd); } @@ -67,7 +67,7 @@ freopen (filename, mode, fp) result->_mode = 0; if (fd != -1) { - close (fd); + __close (fd); if (filename != NULL) free ((char *) filename); } diff -durpN glibc-2.2.4/libio/freopen64.c glibc-2.2.5/libio/freopen64.c --- glibc-2.2.4/libio/freopen64.c Mon Jul 23 10:54:11 2001 +++ glibc-2.2.5/libio/freopen64.c Thu Aug 16 23:50:50 2001 @@ -47,7 +47,7 @@ freopen64 (filename, mode, fp) _IO_flockfile (fp); if (filename == NULL && _IO_fileno (fp) >= 0) { - fd = dup (_IO_fileno (fp)); + fd = __dup (_IO_fileno (fp)); if (fd != -1) filename = fd_to_filename (fd); } @@ -57,7 +57,7 @@ freopen64 (filename, mode, fp) result->_mode = 0; if (fd != -1) { - close (fd); + __close (fd); if (filename != NULL) free ((char *) filename); } diff -durpN glibc-2.2.4/libio/fwprintf.c glibc-2.2.5/libio/fwprintf.c --- glibc-2.2.4/libio/fwprintf.c Mon Jul 23 10:54:11 2001 +++ glibc-2.2.5/libio/fwprintf.c Fri Aug 17 00:05:37 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 1999, 2000, 2001 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 @@ -24,14 +24,15 @@ /* Write formatted output to STREAM from the format string FORMAT. */ /* VARARGS2 */ int -fwprintf (FILE *stream, const wchar_t *format, ...) +__fwprintf (FILE *stream, const wchar_t *format, ...) { va_list arg; int done; va_start (arg, format); - done = vfwprintf (stream, format, arg); + done = __vfwprintf (stream, format, arg); va_end (arg); return done; } +weak_alias (__fwprintf, fwprintf) diff -durpN glibc-2.2.4/libio/genops.c glibc-2.2.5/libio/genops.c --- glibc-2.2.4/libio/genops.c Sat Aug 11 18:28:49 2001 +++ glibc-2.2.5/libio/genops.c Wed Nov 28 15:36:24 2001 @@ -784,7 +784,7 @@ _IO_get_column (fp) int -_IO_flush_all () +_IO_flush_all_lockp (int do_lock) { int result = 0; struct _IO_FILE *fp; @@ -792,7 +792,8 @@ _IO_flush_all () #ifdef _IO_MTSAFE_IO _IO_cleanup_region_start_noarg (flush_cleanup); - _IO_lock_lock (list_all_lock); + if (do_lock) + _IO_lock_lock (list_all_lock); #endif last_stamp = _IO_list_all_stamp; @@ -800,7 +801,8 @@ _IO_flush_all () while (fp != NULL) { run_fp = fp; - _IO_flockfile (fp); + if (do_lock) + _IO_flockfile (fp); if (((fp->_mode <= 0 && fp->_IO_write_ptr > fp->_IO_write_base) #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T @@ -812,7 +814,8 @@ _IO_flush_all () && _IO_OVERFLOW (fp, EOF) == EOF) result = EOF; - _IO_funlockfile (fp); + if (do_lock) + _IO_funlockfile (fp); run_fp = NULL; if (last_stamp != _IO_list_all_stamp) @@ -826,11 +829,20 @@ _IO_flush_all () } #ifdef _IO_MTSAFE_IO - _IO_lock_unlock (list_all_lock); + if (do_lock) + _IO_lock_unlock (list_all_lock); _IO_cleanup_region_end (0); #endif return result; +} + + +int +_IO_flush_all () +{ + /* We want locking. */ + return _IO_flush_all_lockp (1); } void diff -durpN glibc-2.2.4/libio/iofopncook.c glibc-2.2.5/libio/iofopncook.c --- glibc-2.2.4/libio/iofopncook.c Mon Jul 23 10:54:11 2001 +++ glibc-2.2.5/libio/iofopncook.c Tue Nov 13 02:06:27 2001 @@ -37,8 +37,6 @@ static _IO_ssize_t _IO_cookie_write (reg const void* buf, _IO_ssize_t size); static _IO_off64_t _IO_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir); static int _IO_cookie_close (_IO_FILE* fp); -_IO_FILE * _IO_fopencookie (void *cookie, const char *mode, - _IO_cookie_io_functions_t io_functions); static _IO_ssize_t _IO_cookie_read (fp, buf, size) diff -durpN glibc-2.2.4/libio/libioP.h glibc-2.2.5/libio/libioP.h --- glibc-2.2.4/libio/libioP.h Mon Jul 23 10:54:12 2001 +++ glibc-2.2.5/libio/libioP.h Wed Nov 28 15:36:43 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1993,1997,1998,1999,2000,2001 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 @@ -323,6 +323,10 @@ struct _IO_cookie_file _IO_cookie_io_functions_t __io_functions; }; +_IO_FILE *_IO_fopencookie (void *cookie, const char *mode, + _IO_cookie_io_functions_t io_functions); + + /* Iterator type for walking global linked list of _IO_FILE objects. */ typedef struct _IO_FILE *_IO_ITER; @@ -422,6 +426,7 @@ extern int _IO_do_write __P ((_IO_FILE * extern int _IO_new_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); extern int _IO_old_do_write __P ((_IO_FILE *, const char *, _IO_size_t)); extern int _IO_wdo_write __P ((_IO_FILE *, const wchar_t *, _IO_size_t)); +extern int _IO_flush_all_lockp __P ((int)); extern int _IO_flush_all __P ((void)); extern int _IO_cleanup __P ((void)); extern void _IO_flush_all_linebuffered __P ((void)); diff -durpN glibc-2.2.4/libio/tst-sscanf.c glibc-2.2.5/libio/tst-sscanf.c --- glibc-2.2.4/libio/tst-sscanf.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/libio/tst-sscanf.c Wed Aug 22 11:38:55 2001 @@ -0,0 +1,20 @@ +#include +#include + +#define WCS_LENGTH 256 + +int +main (void) +{ + const char cnv[] ="%l[abc]"; + const char str[] = "abbcXab"; + wchar_t wcs[WCS_LENGTH]; + int result = 0; + + sscanf (str, cnv, wcs); + printf ("wcs = \"%ls\"\n", wcs); + fflush (stdout); + result = wcscmp (wcs, L"abbc") != 0; + + return result; +} diff -durpN glibc-2.2.4/libio/tst-ungetwc1.c glibc-2.2.5/libio/tst-ungetwc1.c --- glibc-2.2.4/libio/tst-ungetwc1.c Wed Aug 8 18:57:12 2001 +++ glibc-2.2.5/libio/tst-ungetwc1.c Thu Aug 23 01:36:24 2001 @@ -11,7 +11,7 @@ int main (void) { FILE *fp; - char *str ="abcdef"; + const char *str = "abcdef"; wint_t ret, wc, ungetone = 0x00E4; /* 0x00E4 means `a umlaut'. */ char fname[] = "/tmp/tst-ungetwc1.out.XXXXXX"; int fd; diff -durpN glibc-2.2.4/libio/tst-ungetwc2.c glibc-2.2.5/libio/tst-ungetwc2.c --- glibc-2.2.4/libio/tst-ungetwc2.c Thu Aug 9 09:37:41 2001 +++ glibc-2.2.5/libio/tst-ungetwc2.c Thu Aug 16 21:27:10 2001 @@ -11,7 +11,7 @@ int main (void) { FILE *fp; - char *str = "abcdef"; + const char *str = "abcdef"; wint_t ret, wc; char fname[] = "/tmp/tst-ungetwc2.out.XXXXXX"; int fd; diff -durpN glibc-2.2.4/libio/vwprintf.c glibc-2.2.5/libio/vwprintf.c --- glibc-2.2.4/libio/vwprintf.c Mon Jul 23 10:54:12 2001 +++ glibc-2.2.5/libio/vwprintf.c Fri Aug 17 00:05:37 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1995, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1991,1993,1995,1997,1999,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,5 +27,5 @@ vwprintf (format, arg) const wchar_t *format; __gnuc_va_list arg; { - return vfwprintf (stdout, format, arg); + return __vfwprintf (stdout, format, arg); } diff -durpN glibc-2.2.4/libio/wprintf.c glibc-2.2.5/libio/wprintf.c --- glibc-2.2.4/libio/wprintf.c Mon Jul 23 10:54:12 2001 +++ glibc-2.2.5/libio/wprintf.c Fri Aug 17 00:05:37 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1991,1995,1996,1997,1999,2001 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,7 @@ wprintf (const wchar_t *format, ...) int done; va_start (arg, format); - done = vfwprintf (stdout, format, arg); + done = __vfwprintf (stdout, format, arg); va_end (arg); return done; diff -durpN glibc-2.2.4/locale/duplocale.c glibc-2.2.5/locale/duplocale.c --- glibc-2.2.4/locale/duplocale.c Mon Jul 23 10:54:16 2001 +++ glibc-2.2.5/locale/duplocale.c Fri Aug 17 19:21:02 2001 @@ -1,5 +1,5 @@ /* Duplicate handle for selection of locales. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -50,6 +50,11 @@ __duplocale (__locale_t dataset) ++result->__locales[cnt]->usage_count; } } + + /* Update the special members. */ + result->__ctype_b = dataset->__ctype_b; + result->__ctype_tolower = dataset->__ctype_tolower; + result->__ctype_toupper = dataset->__ctype_toupper; /* It's done. */ __libc_lock_unlock (__libc_setlocale_lock); diff -durpN glibc-2.2.4/locale/programs/ld-collate.c glibc-2.2.5/locale/programs/ld-collate.c --- glibc-2.2.4/locale/programs/ld-collate.c Fri Aug 10 12:11:49 2001 +++ glibc-2.2.5/locale/programs/ld-collate.c Sun Oct 14 15:31:18 2001 @@ -1315,7 +1315,7 @@ order for `%.*s' already defined at %s:% int cnt; /* Generate the the name. */ - sprintf (buf + preflen, base == 10 ? "%ld" : "%lx", from); + sprintf (buf + preflen, base == 10 ? "%ld" : "%lX", from); /* Look whether this name is already defined. */ if (find_entry (&collate->seq_table, buf, symlen, diff -durpN glibc-2.2.4/locale/programs/locale.c glibc-2.2.5/locale/programs/locale.c --- glibc-2.2.4/locale/programs/locale.c Fri Jul 27 23:13:16 2001 +++ glibc-2.2.5/locale/programs/locale.c Sun Jan 20 19:21:29 2002 @@ -1,5 +1,5 @@ /* Implementation of the locale program according to POSIX 9945-2. - Copyright (C) 1995-1997, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -282,7 +282,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -durpN glibc-2.2.4/locale/programs/localedef.c glibc-2.2.5/locale/programs/localedef.c --- glibc-2.2.4/locale/programs/localedef.c Mon Jul 23 10:54:17 2001 +++ glibc-2.2.5/locale/programs/localedef.c Sun Jan 20 19:21:29 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -312,7 +312,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -durpN glibc-2.2.4/localedata/ChangeLog glibc-2.2.5/localedata/ChangeLog --- glibc-2.2.4/localedata/ChangeLog Wed Aug 15 18:50:08 2001 +++ glibc-2.2.5/localedata/ChangeLog Sun Jan 20 19:21:34 2002 @@ -1,3 +1,44 @@ +2002-01-17 Ulrich Drepper + + * charmaps/MACINTOSH: Update to Apple's latest definition. + +2002-01-07 Ulrich Drepper + + * locales/hu_HU: New version with corrected collation. + Patch by Nagy Péter . + +2001-12-05 Ulrich Drepper + + * locales/bg_BG: Rewrite. + Patch by Alexander Shopov . + +2001-11-26 Ulrich Drepper + + * locales/de_CH: Define decimal point to '.' and thousands + separator to ' '. Patch by Niklaus Giger . + +2001-11-21 Bruno Haible + + * charmaps/ISO-8859-16: Swap 0xa5 and 0xab entries. + +2001-11-15 Børre Gaup + + * locales/se_NO: New file. + +2001-10-08 Won-kyu Park + + * locales/ko_KR: Fixed a typo in Hangul portion of LC_COLLATE. + +2001-09-30 Ulrich Drepper + + * charmaps/SAMI-WS2: Add Euro sign. + Patch by Petter Reinholdtsen . + +2001-08-17 Ulrich Drepper + + * Makefile: Add rules to build and run tst-xlocale2. + * tst-xlocale2.c: New file. + 2001-08-14 Ulrich Drepper * Makefile: Add rules to build and run tst-xlocale1. diff -durpN glibc-2.2.4/localedata/Makefile glibc-2.2.5/localedata/Makefile --- glibc-2.2.4/localedata/Makefile Wed Aug 15 18:50:08 2001 +++ glibc-2.2.5/localedata/Makefile Fri Aug 17 19:46:01 2001 @@ -91,7 +91,7 @@ locale_test_suite := tst_iswalnum tst_is tst_wctype tst_wcwidth tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \ - tst-leaks tst-mbswcs6 tst-xlocale1 + tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 ifeq (yes,$(build-shared)) ifneq (no,$(PERL)) tests: $(objpfx)mtrace-tst-leaks @@ -272,6 +272,7 @@ tst_wcwidth-ENV = $(TEST_MBWC_ENV) tst-digits-ENV = $(TEST_MBWC_ENV) tst-mbswcs6-ENV = $(TEST_MBWC_ENV) tst-xlocale1-ENV = $(TEST_MBWC_ENV) +tst-xlocale2-ENV = $(TEST_MBWC_ENV) tst-setlocale-ENV = LOCPATH=$(common-objpfx)localedata LC_ALL=ja_JP.EUC-JP diff -durpN glibc-2.2.4/localedata/charmaps/ISO-8859-16 glibc-2.2.5/localedata/charmaps/ISO-8859-16 --- glibc-2.2.4/localedata/charmaps/ISO-8859-16 Thu Jun 29 12:40:08 2000 +++ glibc-2.2.5/localedata/charmaps/ISO-8859-16 Mon Nov 26 19:45:16 2001 @@ -172,13 +172,13 @@ CHARMAP /xa2 LATIN SMALL LETTER A WITH OGONEK /xa3 LATIN CAPITAL LETTER L WITH STROKE /xa4 EURO SIGN - /xa5 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + /xa5 DOUBLE LOW-9 QUOTATION MARK /xa6 LATIN CAPITAL LETTER S WITH CARON /xa7 SECTION SIGN /xa8 LATIN SMALL LETTER S WITH CARON /xa9 COPYRIGHT SIGN /xaa LATIN CAPITAL LETTER S WITH COMMA BELOW - /xab DOUBLE LOW-9 QUOTATION MARK + /xab LEFT-POINTING DOUBLE ANGLE QUOTATION MARK /xac LATIN CAPITAL LETTER Z WITH ACUTE /xad SOFT HYPHEN /xae LATIN SMALL LETTER Z WITH ACUTE diff -durpN glibc-2.2.4/localedata/charmaps/MACINTOSH glibc-2.2.5/localedata/charmaps/MACINTOSH --- glibc-2.2.4/localedata/charmaps/MACINTOSH Thu Jun 29 12:40:09 2000 +++ glibc-2.2.5/localedata/charmaps/MACINTOSH Sun Jan 20 19:21:40 2002 @@ -211,7 +211,7 @@ CHARMAP /xca NO-BREAK SPACE /xcb LATIN CAPITAL LETTER A WITH GRAVE /xcc LATIN CAPITAL LETTER A WITH TILDE - /xcd OHM SIGN + /xcd LATIN CAPITAL LETTER O WITH TILDE /xce LATIN CAPITAL LIGATURE OE /xcf LATIN SMALL LIGATURE OE /xd0 EN DASH @@ -225,7 +225,7 @@ CHARMAP /xd8 LATIN SMALL LETTER Y WITH DIAERESIS /xd9 LATIN CAPITAL LETTER Y WITH DIAERESIS /xda FRACTION SLASH - /xdb CURRENCY SIGN + /xdb EURO SIGN /xdc SINGLE LEFT-POINTING ANGLE QUOTATION MARK /xdd SINGLE RIGHT-POINTING ANGLE QUOTATION MARK /xde LATIN SMALL LIGATURE FI @@ -252,6 +252,8 @@ CHARMAP /xf3 LATIN CAPITAL LETTER U WITH CIRCUMFLEX /xf4 LATIN CAPITAL LETTER U WITH GRAVE /xf5 LATIN SMALL LETTER DOTLESS I + /xf6 MODIFIER LETTER CIRCUMFLEX ACCENT + /xf7 SMALL TILDE /xf8 MACRON /xf9 BREVE /xfa DOT ABOVE (Mandarin Chinese light tone) diff -durpN glibc-2.2.4/localedata/charmaps/SAMI-WS2 glibc-2.2.5/localedata/charmaps/SAMI-WS2 --- glibc-2.2.4/localedata/charmaps/SAMI-WS2 Thu Jun 29 12:40:10 2000 +++ glibc-2.2.5/localedata/charmaps/SAMI-WS2 Sun Sep 30 17:07:55 2001 @@ -139,6 +139,7 @@ CHARMAP /x7d RIGHT CURLY BRACKET /x7e TILDE /x7f DELETE (DEL) + /x80 EURO SIGN /x82 LATIN CAPITAL LETTER C WITH CARON /x83 LATIN SMALL LETTER F WITH HOOK /x84 LATIN SMALL LETTER C WITH CARON diff -durpN glibc-2.2.4/localedata/locales/bg_BG glibc-2.2.5/localedata/locales/bg_BG --- glibc-2.2.4/localedata/locales/bg_BG Tue Oct 31 11:10:02 2000 +++ glibc-2.2.5/localedata/locales/bg_BG Wed Dec 5 14:34:49 2001 @@ -1,56 +1,31 @@ comment_char % escape_char / -% -% Bulgarian Language Locale for Bulgaria -% Source: -% Address: -% Contact: Delyan Toshev -% Email: delyant@yahoo.com -% Language: bg -% Territory: BG -% Revision: 0.2 -% Date: 1999-05-17 -% Application: general -% Users: general -% Repertoiremap: mnemonic.ds -% Charset: CP1251 + % Distribution and use is free, also % for commercial purposes. %--------------------------------------------------- -% To use this locale definition, do execute (you'll need enough permissions): -% " localedef -i bg_BG -f "CP1251" 'bg_BG' ". Keep the name enclosed in -% single quotes as is, because future definition with differen character set -% may use other name. Afterwards set LANG environment var to "bg_BG" for -% global setting to Bulgarian locale, or individual LC_CTYPE, LC_COLLATE, -% LC_MONETARY,... to whatever you like. -% -% Çà äà èçïîëçâàòå òàçè äåôèíèöèÿ íà ëîêàë, èçïúëíåòå (òðÿáâà äà èìàòå -% ñúîòâåòíè ïðèâèëåãèè): -% " localedef -i bg_BG -f "CP1251" 'bg_BG' ". Ïðåïîðú÷èòåëíî å ïîñëåäíàòà -% ÷àñò íà êîìàíäàòà ('bg_BG'), äà ñå çàïàçè òàêàâà, çà äà ìîæå â áúäåùå äðóãî -% èìå äà ñå èçïîëçâà çà äðóãà êîäîâà òàáëèöà, è çà äà íå ñå ïîëó÷àâàò êîíôëèêòè -% íà èìåíà. Ñëåä êàòî ñå èíñòàëèðà òîçè ëîêàë, ìîæåòå äà óêàæåòå íà ñèñòåìàòà -% äà ãî èçïîëçâà ñ "export LANG=bg_BG". Òàêà ùå óêàæåòå íà âñè÷êè ïðîãðàìè, -% êîèòî ðàçáèðàò îò èíòåðíàöèîíàëèçàöèÿ (i18n), äà ñå ñúîáðàçÿâàò ñ òîçè ëîêàë. -% Òúé êàòî òîâà å ãëîáàëíà íàñòðîéêà è çà íÿêîè ñëó÷àè íå å óäà÷íî äà ñå -% ïðèëàãà, ìîæåòå äà óêàæåòå ïî îòäåëíî çà ðàçëè÷íèòå òèïîâå äàííè, êàêúâ -% ëîêàë äà ñå èçïîëçâà - ÷ðåç LC_CTYPE, LC_MESSAGES, LC_TIME, LC_MONETARY,... +% Note: bg_BG is a base locale. Since there are different character +% sets used with Cyrillic, it's highly recommended to generate system +% locales in most of the used variants. When compiling system locales +% from this one, please consider using a common naming scheme, like +% this: bg_BG.CP1251 (CP1251 is for coresponding charset), bg_BG.KOI8R, +% bg_BG.ISO88595 and bg_BG.UTF8. %--------------------------------------------------- LC_IDENTIFICATION title "Bulgarian locale for Bulgaria" -source "" -address "" -contact "" -email "bug-glibc@gnu.org" +source "Linux Society Bulgaria" +address "develop@linux.zonebg.com" +contact "Delyan Toshev" +email "delyant@yahoo.com" tel "" fax "" -language "Bulgarian" -territory "Bulgaria" -revision "1.0" -date "2000-06-29" -% +language "bg" +territory "BG" +revision "2.0" +date "2001-11-16" + category "bg_BG:2000";LC_IDENTIFICATION category "bg_BG:2000";LC_CTYPE category "bg_BG:2000";LC_COLLATE @@ -62,2089 +37,128 @@ category "bg_BG:2000";LC_PAPER category "bg_BG:2000";LC_NAME category "bg_BG:2000";LC_ADDRESS category "bg_BG:2000";LC_TELEPHONE - END LC_IDENTIFICATION -LC_COLLATE - -% Base collation scheme: 1994-03-22 - -% Ordering algorithm: -% 1. Spaces and hyphen (but not soft -% hyphen) before punctuation -% characters, punctuation characters -% before numbers, -% numbers before letters. -% 2. Letters with diacritical marks are -% members of equivalence classes -% 3. A distinction is made with regards -% to case as noted below. -% 4. Special characters are ignored -% when comparing letters, but then -% they are considered -% 5. The alphabets are sorted in order -% of first appearance in ISO 10646: -% Latin, Greek, Cyrillic, etc. -% -% According to Greek specifications, -% the steps 2. and 3. above are reversed -% for the Greek script - -% collating symbols - -% The collating symbol naming is -% mostly taken from ISO 10646-1, -% for example the case and accent -% names are from this standard. - -collating-symbol -collating-symbol -collating-symbol -collating-symbol - -% and -% are for cases like Danish -% and Spanish being treated -% as one letter. - -% The ...... collating -% symbols have defined weights as -% the last character in a group of -% Latin letters. They are used -% to specify deltas by locales using -% a locale as the default ordering -% and by "replace-after" statements -% specifying the changed placement -% in an ordering of a character. - -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol - -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol - -% letter;accent;case;specials - -order_start forward;backward/ - ;forward;position - -% or letters first: - -% before letter. - - - - - -% Accents: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;;;IGNORE - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; -<"=> IGNORE;IGNORE;IGNORE;<"=> - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; -UNDEFINED IGNORE;IGNORE;IGNORE - - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - "";"";"";IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - "";"";"";IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - "";"";"";IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - "";"";"";IGNORE - "";"";"";IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - ;IGNORE;IGNORE;IGNORE - -% Arabic collating - - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - IGNORE;IGNORE;IGNORE; - - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - IGNORE;IGNORE;;IGNORE - - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE +LC_CTYPE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE - "";"";"";IGNORE +copy "i18n" -% katakana/hiragana sorting -% base is katakana, as this is present in most charsets -% normal before voiced before semi-voiced -% small vocals before normal vocals -% katakana before hiragana +END LC_CTYPE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE - ;;IGNORE;IGNORE +LC_COLLATE -order_end +% We have made the following changes to the basic collation scheme in +% the file iso14651_t1: +% 1. The Cyrillic script is first in the order. +% 2. The non-Bulgarian Cyrillic letters are sorted according to +% their transliteration with Bulgarian Cyrillic letters. +copy "iso14651_t1" +reorder-after <9> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +reorder-after + ;;;IGNORE % Mac. gje +reorder-after + "";"";"";IGNORE % CYR-DJE + "";"";"";IGNORE % CYR-DCHE + "";"";"";IGNORE % CYR-DZE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE +reorder-after + "";"";"";IGNORE % CYR-LJE +reorder-after + "";"";"";IGNORE % CYR-NJE +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE % Mac. gje +reorder-after + "";"";"";IGNORE % CYR-DJE + "";"";"";IGNORE % CYR-DCHE + "";"";"";IGNORE % CYR-DZE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE +reorder-after + "";"";"";IGNORE % CYR-LJE +reorder-after + "";"";"";IGNORE % CYR-NJE +reorder-after + ;;;IGNORE +reorder-after + ;;;IGNORE +reorder-end END LC_COLLATE -LC_CTYPE -copy "i18n" -END LC_CTYPE - -LC_MESSAGES -yesexpr "" -noexpr "" -END LC_MESSAGES - LC_MONETARY int_curr_symbol "" currency_symbol "" mon_decimal_point "" -mon_thousands_sep "" +mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" @@ -2160,86 +174,108 @@ END LC_MONETARY LC_NUMERIC decimal_point "" -thousands_sep "" +thousands_sep "" grouping 3;3 END LC_NUMERIC LC_TIME -day "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -abday "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -mon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -abmon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -d_t_fmt "" -d_fmt "" -t_fmt "" -am_pm "";"" -t_fmt_ampm "" -date_fmt "/ +d_t_fmt "/ +" +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" +date_fmt "/ / " +% +first_weekday 2 +first_workday 2 +abday "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" + END LC_TIME +LC_MESSAGES +yesexpr "" +noexpr "" +END LC_MESSAGES + LC_PAPER -% FIXME height 297 -% FIXME width 210 END LC_PAPER -LC_TELEPHONE -tel_int_fmt "/ -" -int_prefix "" -END LC_TELEPHONE - -LC_MEASUREMENT -% FIXME -measurement 1 -END LC_MEASUREMENT - LC_NAME -name_fmt "/ +name_fmt "/ " +name_mr "" +name_ms "" +name_mrs "" +name_miss "" END LC_NAME LC_ADDRESS postal_fmt "/ / -/ -/ +/ +/ " +country_name "" +country_post "" +country_ab2 "" +country_ab3 "" +country_num 100 +country_car "" +country_isbn 954 +lang_name "" +lang_ab "" +lang_term "" END LC_ADDRESS + +LC_TELEPHONE +tel_int_fmt "" +tel_dom_fmt "" +int_prefix "" +int_select "" +END LC_TELEPHONE + +LC_MEASUREMENT +measurement 1 +END LC_MEASUREMENT diff -durpN glibc-2.2.4/localedata/locales/de_CH glibc-2.2.5/localedata/locales/de_CH --- glibc-2.2.4/localedata/locales/de_CH Tue Oct 31 11:10:02 2000 +++ glibc-2.2.5/localedata/locales/de_CH Mon Nov 26 19:52:27 2001 @@ -61,8 +61,8 @@ END LC_MESSAGES LC_MONETARY int_curr_symbol "" currency_symbol "" -mon_decimal_point "" -mon_thousands_sep "" +mon_decimal_point "" +mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" @@ -77,7 +77,9 @@ n_sign_posn 4 END LC_MONETARY LC_NUMERIC -copy "de_DE" +decimal_point "" +thousands_sep "" +grouping 3;3 END LC_NUMERIC LC_TIME diff -durpN glibc-2.2.4/localedata/locales/hu_HU glibc-2.2.5/localedata/locales/hu_HU --- glibc-2.2.4/localedata/locales/hu_HU Sat Aug 4 12:31:48 2001 +++ glibc-2.2.5/localedata/locales/hu_HU Mon Jan 7 15:05:18 2002 @@ -14,6 +14,13 @@ escape_char / % - corrected alphabetical order % - made all days abbreviations same lenght by appending spaces % Email: srtxg@chanae.alphanet.ch +% +% Further changes by Egmont Koblinger, 2002/Jan/06 +% - fixed tons of remaining bugs in alphabetical order +% - turned month names and similar stuff to lowercase +% - other small bugfixes +% Email: egmont@suselinux.hu +% % Language: hu % Territory: HU % Revision: 4.7 @@ -54,58 +61,149 @@ END LC_IDENTIFICATION LC_COLLATE copy "iso14651_t1" -%% a a' c cs d dz dzs e e' f g gy h i j k l ly m n ny o o' p q -%% r s sz t ty u u' v w x y z zs +%% a a' b c cs d dz dzs e e' f g gy h i i' j k l ly m n ny o o' o: o" p q +%% r s sz t ty u u' u: u" v w x y z zs -collating-symbol +collating-symbol +collating-symbol + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" -collating-element from "" -collating-element from "" collating-element from "" -collating-element from "" +collating-element from "" collating-element from "" +collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" -collating-symbol +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" + +collating-symbol collating-element from "" -collating-element from "" collating-element from "" collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" +collating-element from "" collating-symbol collating-symbol @@ -132,83 +230,186 @@ reorder-after -reorder-after - - reorder-after - + reorder-after - - + + reorder-after - + reorder-after - + reorder-after - + +reorder-after + reorder-after - + reorder-after - + +reorder-after + reorder-after - + + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE -reorder-after - ;;;IGNORE - ;;;IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + reorder-after - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE -reorder-after - ;;;IGNORE - ;;;IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE -reorder-after - ;;;IGNORE - ;;;IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE -reorder-after - ;;;IGNORE - ;;;IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE -reorder-after - ;;;IGNORE - ;;;IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE -reorder-after - ;;;IGNORE - ;;;IGNORE reorder-after - ;;;IGNORE - ;;;IGNORE + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE +reorder-after + ;;;IGNORE + ;;;IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE + "";"";"";IGNORE reorder-end @@ -225,17 +426,23 @@ END LC_MESSAGES LC_MONETARY int_curr_symbol "" -currency_symbol "" +currency_symbol "" mon_decimal_point "" -mon_thousands_sep "" +mon_thousands_sep "" mon_grouping 3;3 positive_sign "" negative_sign "" int_frac_digits 2 frac_digits 2 -p_cs_precedes 1 +int_p_cs_precedes 1 +int_p_sep_by_space 1 +int_n_cs_precedes 1 +int_n_sep_by_space 1 +int_p_sign_posn 1 +int_n_sign_posn 1 +p_cs_precedes 0 p_sep_by_space 1 -n_cs_precedes 1 +n_cs_precedes 0 n_sep_by_space 1 p_sign_posn 1 n_sign_posn 1 @@ -243,52 +450,50 @@ END LC_MONETARY LC_NUMERIC decimal_point "" -thousands_sep "" -grouping 0;0 +thousands_sep "" +grouping 3;3 END LC_NUMERIC LC_TIME -abday "";"";"";"";/ - "";"";"" -day "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -abmon "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"";/ - "";"" -mon "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "";/ - "" -d_t_fmt "" +abday "";"";"";"";/ + "";"";"" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +d_t_fmt "/ +" d_fmt "" -t_fmt "" +t_fmt "" am_pm "";"" -t_fmt_ampm "" -date_fmt "/ -/ -" +t_fmt_ampm "" +date_fmt "/ +" END LC_TIME LC_PAPER -% FIXME height 297 -% FIXME width 210 END LC_PAPER diff -durpN glibc-2.2.4/localedata/locales/ko_KR glibc-2.2.5/localedata/locales/ko_KR --- glibc-2.2.4/localedata/locales/ko_KR Thu Nov 16 11:12:02 2000 +++ glibc-2.2.5/localedata/locales/ko_KR Sun Oct 14 15:25:38 2001 @@ -36,6 +36,8 @@ comment_char % % Several changes in LC_TIME % Added tel_dom_fmt to LC_TELEPHONE % Some cosmetic changes +% 2001-10-08: Won-kyu Park +% Fixed a typo in Hangul portion of LC_COLLATE LC_IDENTIFICATION title "Korean locale for Republic of Korea" @@ -1179,7 +1181,7 @@ order_start forward %%% % HANGUL SYLLABLES -... +.. %%% % HANJA. For the moment, Hanjas defined in KS X 1001 diff -durpN glibc-2.2.4/localedata/locales/se_NO glibc-2.2.5/localedata/locales/se_NO --- glibc-2.2.4/localedata/locales/se_NO Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/localedata/locales/se_NO Thu Nov 15 17:26:50 2001 @@ -0,0 +1,311 @@ +# $Id: se_NO,v 1.1 2001/11/16 01:26:50 drepper Exp $ +comment_char % +escape_char / +% +% Northern Saami Language Locale for Norway +% Source: http://www.hum.uit.no/a/trond/loc.html +% Contact: Børre Gaup +% Email: boerre.gaup@pc.nu +% Language: se +% Territory: NO +% Revision: 0.1 +% Date: 2001-11-03 +% Application: general +% Users: general +% Charset: UTF-8 +% Distribution and use is free, also +% for commercial purposes. + +LC_IDENTIFICATION +title "Northern Saami language locale for Norway" +source "http://www.hum.uit.no/a/trond/loc.html" +address "" +contact "Børre Gaup" +email "boerre.gaup@pc.nu" +tel "" +fax "" +language "Northern Saami" +territory "Norway" +revision "0.1" +date "2001-11-09" + +category se_NO:2000;LC_IDENTIFICATION +category se_NO:2000;LC_CTYPE +category se_NO:2000;LC_COLLATE +category se_NO:2000;LC_TIME +category se_NO:2000;LC_NUMERIC +category se_NO:2000;LC_PAPER +category se_NO:2000;LC_TELEPHONE +category se_NO:2000;LC_MEASUREMENT +category se_NO:2000;LC_ADDRESS +category se_NO:2000;LC_MONETARY +category se_NO:2000;LC_MESSAGES + +END LC_IDENTIFICATION + + +LC_COLLATE +copy "iso14651_t1" + +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol + +% +reorder-after + + +reorder-after + + + + + + +reorder-after + + + + + +reorder-after + + + +reorder-after + + +reorder-after + + + +reorder-after + + +reorder-after + + + +reorder-after + + + + + + +reorder-after + ;;;IGNORE % 201 à + ;;;IGNORE % 200 á + ;;;IGNORE % 202 â + ;;;IGNORE % 203 ã + +reorder-after + ;;;IGNORE % 321 À + ;;;IGNORE % 320 Á + ;;;IGNORE % 322  + ;;;IGNORE % 323 à + +reorder-after + ;;;IGNORE % 212 ç + ;;;IGNORE % 215 + +reorder-after + ;;;IGNORE % 332 Ç + ;;;IGNORE % 335 + +reorder-after + ;;;IGNORE % ezh + ;;;IGNORE % ezh caron + +reorder-after + ;;;IGNORE % EZH + ;;;IGNORE % EZH caron + +reorder-after + ;;;IGNORE % 218 ð + ;;;IGNORE % 220 + +reorder-after + ;;;IGNORE % 338 Ð + ;;;IGNORE % 340 + +reorder-after + ;;;IGNORE % f WITH HOOK + +reorder-after + ;;;IGNORE % gcaron + ;;;IGNORE % gstroke + +reorder-after + ;;;IGNORE % Gcaron + ;;;IGNORE % Gstroke + +reorder-after + ;;;IGNORE % kcaron +reorder-after + ;;;IGNORE % Kcaron + +reorder-after + ;"";"";IGNORE % ß + ;;;IGNORE % 288 + ;;;IGNORE % 405 + + +reorder-after + ;;;IGNORE % ä + ;;;IGNORE % å + ;;;IGNORE % æ +reorder-after + ;;;IGNORE % ö + ;;;IGNORE % ø + +reorder-after + ;;;IGNORE % Ä + ;;;IGNORE % Å + ;;;IGNORE % Æ +reorder-after + ;;;IGNORE % Ö + ;;;IGNORE % Ø + +% ü/Ü is treated like y/Y but is sorted after the latter +reorder-after + ;;;IGNORE % ü +reorder-after + ;;;IGNORE % Ü +reorder-end + +END LC_COLLATE + +LC_CTYPE +copy "i18n" +END LC_CTYPE + +LC_MONETARY +int_curr_symbol "" +currency_symbol "" +mon_decimal_point "" +mon_thousands_sep "" +mon_grouping 3;3 +positive_sign "" +negative_sign "" +int_frac_digits 2 +frac_digits 2 +p_cs_precedes 1 +p_sep_by_space 0 +n_cs_precedes 1 +n_sep_by_space 0 +p_sign_posn 4 +n_sign_posn 4 +END LC_MONETARY + +LC_NUMERIC +decimal_point "" +thousands_sep "" +grouping 3;3 +END LC_NUMERIC + + +LC_TIME +abday "";"";/ + "";"";/ + "";"";/ + "" +day "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +abmon "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"";/ + "";"" +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +% usual date representation +% Linjen nedenfor er: %a, %b %e b. %Y %T %Z +% f.eks. bear, geas 14. b. 2001 21:15:11 CEST +d_t_fmt "" +%Linjen nedenfor er: %Y-%m-%d +%f.eks 2001-04-26 +d_fmt "" +t_fmt "" +am_pm "";"" +t_fmt_ampm "" + +% Denne linjen vil gi f.eks.: +% duorasdat, borgemnu 23. b. 2001 00:47:57 CEST +date_fmt "/ +/ +" + +% %a %b-%e %H:%M:%S %Z %Y søn jan-31 21:15:11 CET 2001 +END LC_TIME + +LC_MESSAGES +yesexpr "" +noexpr "" +END LC_MESSAGES + + +LC_PAPER +height 297 +width 210 +END LC_PAPER + +LC_TELEPHONE +tel_int_fmt "" +tel_dom_fmt "" +int_select "" +int_prefix "" +END LC_TELEPHONE + +LC_MEASUREMENT +measurement 1 +END LC_MEASUREMENT + +LC_NAME +name_fmt "/ +" +END LC_NAME + +LC_ADDRESS +postal_fmt "/ +/ +/ +/ +" +END LC_ADDRESS diff -durpN glibc-2.2.4/localedata/tst-xlocale2.c glibc-2.2.5/localedata/tst-xlocale2.c --- glibc-2.2.4/localedata/tst-xlocale2.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/localedata/tst-xlocale2.c Fri Aug 17 19:45:23 2001 @@ -0,0 +1,64 @@ +#include +#include +#include +#include + + +static int do_test (__locale_t l); + +int +main (void) +{ + __locale_t l; + __locale_t l2; + int result; + + l = __newlocale (1 << LC_ALL, "de_DE.ISO-8859-1", NULL); + if (l == NULL) + { + printf ("__newlocale failed: %m\n"); + exit (EXIT_FAILURE); + } + puts ("Running tests of created locale"); + result = do_test (l); + + l2 = __duplocale (l); + if (l2 == NULL) + { + printf ("__duplocale failed: %m\n"); + exit (EXIT_FAILURE); + } + __freelocale (l); + puts ("Running tests of duplicated locale"); + result |= do_test (l2); + + return result; +} + + +static const char str[] = "0123456789abcdef ABCDEF ghijklmnopqrstuvwxyzäÄöÖüÜ"; +static const char exd[] = "11111111110000000000000000000000000000000000000000"; +static const char exa[] = "00000000001111110111111011111111111111111111111111"; +static const char exx[] = "11111111111111110111111000000000000000000000000000"; + + +static int +do_test (__locale_t l) +{ + int result = 0; + int n; + +#define DO_TEST(TEST, RES) \ + for (n = 0; n < sizeof (str) - 1; ++n) \ + if ('0' + (TEST (str[n], l) != 0) != RES[n]) \ + { \ + printf ("%s(%c) failed\n", #TEST, str[n]); \ + result = 1; \ + } + + DO_TEST (__isdigit_l, exd); + DO_TEST (__isalpha_l, exa); + DO_TEST (__isxdigit_l, exx); + + return result; +} diff -durpN glibc-2.2.4/mach/Machrules glibc-2.2.5/mach/Machrules --- glibc-2.2.4/mach/Machrules Mon Jul 23 10:54:38 2001 +++ glibc-2.2.5/mach/Machrules Sun Jan 20 19:21:47 2002 @@ -56,7 +56,7 @@ MIGFLAGS = -DMACH_IPC_COMPAT=0 -DSTANDAL $(+includes) $(migdefines) -subrprefix __ # Putting CC in the enivronment makes the mig wrapper script # use the same compiler setup we are using to run cpp. -MIG := CC='${CC}' $(MIG) +MIG := CC='${CC}' CPP='${CPP}' $(MIG) .SUFFIXES: .defs # Just to set specified_rule_matched. @@ -134,8 +134,9 @@ $(patsubst %,$(objpfx)%.ustamp,$(user-in $(patsubst %,$(objpfx)%.udeps,$(user-interfaces)): $(objpfx)%.udeps: $(..)mach/Machrules $(make-target-directory) +# We must use $(CFLAGS) to get -O flags that affect #if's in header files. $(include-%.defs) | \ - $(CC) $(CPPFLAGS) -M -x c - | \ + $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \ sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\ $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \ $(sed-remove-objpfx) > $@.new diff -durpN glibc-2.2.4/mach/Makefile glibc-2.2.5/mach/Makefile --- glibc-2.2.4/mach/Makefile Mon Jul 23 10:54:38 2001 +++ glibc-2.2.5/mach/Makefile Sun Jan 20 19:21:47 2002 @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +# Copyright (C) 1991,92,93,94,95,96,97,98,2001 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 @@ -51,7 +51,6 @@ mach/mach_interface.defs = mach/mach.def # Similarly for memory_object_user vs. memory_object mach/memory_object_user.defs = mach/memory_object.defs server-interfaces := mach/exc -tests := hello # It is important that we do not use the wildcard function to expand # `err_*.sub'. Leaving the wildcard allows Make-dist to find all matching # files in all sysdep directories. @@ -71,9 +70,10 @@ endif $(objpfx)mach-syscalls.mk: syscalls.awk Makefile # Go kludges!!! $(make-target-directory) +# We must use $(CFLAGS) to get -O flags that affect #if's in header files. echo '#include ' | \ DEPENDENCIES_OUTPUT='$@-dep $@' \ - $(CC) $(CPPFLAGS) -E -x c-header - \ + $(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - \ -D_MACH_`echo $(base-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \ sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\ | $(AWK) -f $< > $@-new diff -durpN glibc-2.2.4/mach/Versions glibc-2.2.5/mach/Versions --- glibc-2.2.4/mach/Versions Fri Apr 7 12:09:28 2000 +++ glibc-2.2.5/mach/Versions Sat Dec 22 12:18:45 2001 @@ -62,6 +62,13 @@ libc { task_create; task_set_special_port; task_suspend; task_terminate; thread_depress_abort; thread_switch; } + GLIBC_2.2.5 { + # internal functions used by other libraries (e.g. librt) + __mach_msg_destroy; __mach_reply_port; + + # This was always there, but not exported as it should have been. + mig_strncpy; + } %if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) HURD_CTHREADS_0.3 { diff -durpN glibc-2.2.4/mach/hello.c glibc-2.2.5/mach/hello.c --- glibc-2.2.4/mach/hello.c Mon Jul 23 10:54:38 2001 +++ glibc-2.2.5/mach/hello.c Wed Dec 31 16:00:00 1969 @@ -1,47 +0,0 @@ -/* "Hello world" program for GNU C Library on bare Mach 3.0. - Copyright (C) 1991, 1992, 1993, 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include - -int -main (void) -{ - kern_return_t err; - mach_port_t device, consdev; - FILE *consf; - - err = get_privileged_ports (NULL, &device); - if (err) - _exit (err); - err = device_open (device, D_WRITE, "console", &consdev); - mach_port_deallocate (mach_task_self (), device); - if (err) - _exit (err); - - consf = mach_open_devstream (consdev, "w"); - if (consf == NULL) - exit (errno); - - fputs ("Hello, world!\n", consf); - - return 0; -} diff -durpN glibc-2.2.4/malloc/Makefile glibc-2.2.5/malloc/Makefile --- glibc-2.2.4/malloc/Makefile Mon Jul 23 10:54:38 2001 +++ glibc-2.2.5/malloc/Makefile Wed Aug 29 15:45:25 2001 @@ -57,7 +57,7 @@ include ../Makeconfig # The Perl script to analyze the output of the mtrace functions. ifneq ($(PERL),no) -install-bin = mtrace +install-bin-script = mtrace generated = mtrace # The Perl script will print addresses and to do this nicely we must know @@ -75,7 +75,7 @@ endif ifneq ($(cross-compiling),yes) # If the gd library is available we build the `memusagestat' program. ifneq ($(LIBGD),no) -install-bin += memusagestat memusage +install-bin = memusagestat memusage generated += memusagestat memusage extra-objs += memusagestat.o endif diff -durpN glibc-2.2.4/malloc/malloc.c glibc-2.2.5/malloc/malloc.c --- glibc-2.2.4/malloc/malloc.c Sat Aug 11 18:28:49 2001 +++ glibc-2.2.5/malloc/malloc.c Tue Sep 18 20:23:27 2001 @@ -19,7 +19,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* $Id: malloc.c,v 1.85 2001/08/11 08:56:58 drepper Exp $ +/* $Id: malloc.c,v 1.87 2001/09/19 03:23:27 drepper Exp $ This work is mainly derived from malloc-2.6.4 by Doug Lea , which is available from: @@ -1766,49 +1766,49 @@ ptmalloc_init __MALLOC_P((void)) secure = __libc_enable_secure; #ifdef _LIBC s = NULL; - { - char **runp = _environ; - char *envline; + if (_environ != NULL) + { + char **runp = _environ; + char *envline; - while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL, - 0)) - { - size_t len = strcspn (envline, "="); + while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL, 0)) + { + size_t len = strcspn (envline, "="); - if (envline[len] != '=') - /* This is a "MALLOC_" variable at the end of the string - without a '=' character. Ignore it since otherwise we - will access invalid memory below. */ - continue; + if (envline[len] != '=') + /* This is a "MALLOC_" variable at the end of the string + without a '=' character. Ignore it since otherwise we + will access invalid memory below. */ + continue; - switch (len) - { - case 6: - if (memcmp (envline, "CHECK_", 6) == 0) - s = &envline[7]; - break; - case 8: - if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0) - mALLOPt(M_TOP_PAD, atoi(&envline[9])); - break; - case 9: - if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0) - mALLOPt(M_MMAP_MAX, atoi(&envline[10])); - break; - case 15: - if (! secure) - { - if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0) - mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16])); - else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0) - mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16])); - } - break; - default: - break; - } - } - } + switch (len) + { + case 6: + if (memcmp (envline, "CHECK_", 6) == 0) + s = &envline[7]; + break; + case 8: + if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0) + mALLOPt(M_TOP_PAD, atoi(&envline[9])); + break; + case 9: + if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0) + mALLOPt(M_MMAP_MAX, atoi(&envline[10])); + break; + case 15: + if (! secure) + { + if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0) + mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16])); + else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0) + mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16])); + } + break; + default: + break; + } + } + } #else if (! secure) { @@ -2788,13 +2788,15 @@ Void_t* mALLOc(bytes) size_t bytes; mchunkptr victim; #if defined _LIBC || defined MALLOC_HOOKS - if (__malloc_hook != NULL) { + __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) = + __malloc_hook; + if (hook != NULL) { Void_t* result; #if defined __GNUC__ && __GNUC__ >= 2 - result = (*__malloc_hook)(bytes, RETURN_ADDRESS (0)); + result = (*hook)(bytes, RETURN_ADDRESS (0)); #else - result = (*__malloc_hook)(bytes, NULL); + result = (*hook)(bytes, NULL); #endif return result; } @@ -3111,11 +3113,14 @@ void fREe(mem) Void_t* mem; mchunkptr p; /* chunk corresponding to mem */ #if defined _LIBC || defined MALLOC_HOOKS - if (__free_hook != NULL) { + void (*hook) __MALLOC_PMT ((__malloc_ptr_t, __const __malloc_ptr_t)) = + __free_hook; + + if (hook != NULL) { #if defined __GNUC__ && __GNUC__ >= 2 - (*__free_hook)(mem, RETURN_ADDRESS (0)); + (*hook)(mem, RETURN_ADDRESS (0)); #else - (*__free_hook)(mem, NULL); + (*hook)(mem, NULL); #endif return; } @@ -3314,13 +3319,16 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* o mchunkptr newp; /* chunk to return */ #if defined _LIBC || defined MALLOC_HOOKS - if (__realloc_hook != NULL) { + __malloc_ptr_t (*hook) __MALLOC_PMT ((__malloc_ptr_t, size_t, + __const __malloc_ptr_t)) = + __realloc_hook; + if (hook != NULL) { Void_t* result; #if defined __GNUC__ && __GNUC__ >= 2 - result = (*__realloc_hook)(oldmem, bytes, RETURN_ADDRESS (0)); + result = (*hook)(oldmem, bytes, RETURN_ADDRESS (0)); #else - result = (*__realloc_hook)(oldmem, bytes, NULL); + result = (*hook)(oldmem, bytes, NULL); #endif return result; } @@ -3596,13 +3604,16 @@ Void_t* mEMALIGn(alignment, bytes) size_ mchunkptr p; #if defined _LIBC || defined MALLOC_HOOKS - if (__memalign_hook != NULL) { + __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t, + __const __malloc_ptr_t)) = + __memalign_hook; + if (hook != NULL) { Void_t* result; #if defined __GNUC__ && __GNUC__ >= 2 - result = (*__memalign_hook)(alignment, bytes, RETURN_ADDRESS (0)); + result = (*hook)(alignment, bytes, RETURN_ADDRESS (0)); #else - result = (*__memalign_hook)(alignment, bytes, NULL); + result = (*hook)(alignment, bytes, NULL); #endif return result; } @@ -3788,12 +3799,14 @@ Void_t* cALLOc(n, elem_size) size_t n; s Void_t* mem; #if defined _LIBC || defined MALLOC_HOOKS - if (__malloc_hook != NULL) { + __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) = + __malloc_hook; + if (hook != NULL) { sz = n * elem_size; #if defined __GNUC__ && __GNUC__ >= 2 - mem = (*__malloc_hook)(sz, RETURN_ADDRESS (0)); + mem = (*hook)(sz, RETURN_ADDRESS (0)); #else - mem = (*__malloc_hook)(sz, NULL); + mem = (*hook)(sz, NULL); #endif if(mem == 0) return 0; diff -durpN glibc-2.2.4/malloc/memusage.c glibc-2.2.5/malloc/memusage.c --- glibc-2.2.4/malloc/memusage.c Mon Aug 13 15:00:51 2001 +++ glibc-2.2.5/malloc/memusage.c Thu Sep 20 12:36:19 2001 @@ -181,6 +181,13 @@ me (void) const char *env = getenv ("MEMUSAGE_PROG_NAME"); size_t prog_len = strlen (__progname); + initialized = -1; + mallocp = (void *(*) (size_t)) dlsym (RTLD_NEXT, "malloc"); + reallocp = (void *(*) (void *, size_t)) dlsym (RTLD_NEXT, "realloc"); + callocp = (void *(*) (size_t, size_t)) dlsym (RTLD_NEXT, "calloc"); + freep = (void (*) (void *)) dlsym (RTLD_NEXT, "free"); + initialized = 1; + if (env != NULL) { /* Check for program name. */ @@ -198,13 +205,6 @@ me (void) if (!start_sp) start_sp = GETSP (); - initialized = -1; - mallocp = (void *(*) (size_t)) dlsym (RTLD_NEXT, "malloc"); - reallocp = (void *(*) (void *, size_t)) dlsym (RTLD_NEXT, "realloc"); - callocp = (void *(*) (size_t, size_t)) dlsym (RTLD_NEXT, "calloc"); - freep = (void (*) (void *)) dlsym (RTLD_NEXT, "free"); - initialized = 1; - outname = getenv ("MEMUSAGE_OUTPUT"); if (outname != NULL && outname[0] != '\0' && (access (outname, R_OK | W_OK) == 0 || errno == ENOENT)) @@ -357,10 +357,13 @@ realloc (void *old, size_t len) /* Keep track of number of calls. */ ++calls[idx_realloc]; - /* Keep track of total memory consumption for `realloc'. */ - total[idx_realloc] += len; - /* Keep track of total memory requirement. */ - grand_total += len; + if (len > old_len) + { + /* Keep track of total memory consumption for `realloc'. */ + total[idx_realloc] += len - old_len; + /* Keep track of total memory requirement. */ + grand_total += len - old_len; + } /* Remember the size of the request. */ if (len < 65536) ++histogram[len / 16]; diff -durpN glibc-2.2.4/malloc/memusage.sh glibc-2.2.5/malloc/memusage.sh --- glibc-2.2.4/malloc/memusage.sh Mon Jul 23 10:54:39 2001 +++ glibc-2.2.5/malloc/memusage.sh Sun Jan 20 19:21:47 2002 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. @@ -65,7 +65,7 @@ Report bugs using the \`glibcbug' script do_version() { echo 'memusage (GNU libc) @VERSION@' - echo $"Copyright (C) 2001 Free Software Foundation, Inc. + echo $"Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Ulrich Drepper." @@ -217,6 +217,11 @@ elif test -n "$png"; then fi if test -n "$datafile"; then add_env="$add_env MEMUSAGE_OUTPUT=$datafile" +fi + +# Set program name. +if test -n "$progname"; then + add_env="$add_env MEMUSAGE_PROG_NAME=$progname" fi # Set buffer size. diff -durpN glibc-2.2.4/malloc/mtrace.c glibc-2.2.5/malloc/mtrace.c --- glibc-2.2.4/malloc/mtrace.c Mon Jul 23 10:54:39 2001 +++ glibc-2.2.5/malloc/mtrace.c Wed Aug 22 10:52:55 2001 @@ -97,7 +97,7 @@ tr_where (caller) if (_dl_addr (caller, &info)) { char *buf = (char *) ""; - if (info.dli_sname && info.dli_sname[0]) + if (info.dli_sname != NULL) { size_t len = strlen (info.dli_sname); buf = alloca (len + 6 + 2 * sizeof (void *)); diff -durpN glibc-2.2.4/malloc/mtrace.pl glibc-2.2.5/malloc/mtrace.pl --- glibc-2.2.4/malloc/mtrace.pl Fri Jul 27 23:13:17 2001 +++ glibc-2.2.5/malloc/mtrace.pl Sun Jan 20 19:21:47 2002 @@ -1,7 +1,7 @@ #! @PERL@ eval "exec @PERL@ -S $0 $*" if 0; -# Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1997. # Based on the mtrace.awk script. @@ -44,7 +44,7 @@ arglist: while (@ARGV) { $ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" || $ARGV[0] eq "--versio" || $ARGV[0] eq "--version") { print "mtrace (GNU $PACKAGE) $VERSION\n"; - print "Copyright (C) 2001 Free Software Foundation, Inc.\n"; + print "Copyright (C) 2002 Free Software Foundation, Inc.\n"; print "This is free software; see the source for copying conditions. There is NO\n"; print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; print "Written by Ulrich Drepper \n"; diff -durpN glibc-2.2.4/malloc/obstack.c glibc-2.2.5/malloc/obstack.c --- glibc-2.2.4/malloc/obstack.c Mon Jul 23 10:54:39 2001 +++ glibc-2.2.5/malloc/obstack.c Fri Oct 26 16:51:40 2001 @@ -19,7 +19,7 @@ 02111-1307 USA. */ #ifdef HAVE_CONFIG_H -#include +# include #endif #include "obstack.h" @@ -39,40 +39,43 @@ files, it is simpler to just do this in the source for each such file. */ #include /* Random thing to get __GNU_LIBRARY__. */ -#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 -#include -#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION -#define ELIDE_CODE -#endif +#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 +# include +# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION +# define ELIDE_CODE +# endif #endif +#if defined _LIBC && defined USE_IN_LIBIO +# include +#endif #ifndef ELIDE_CODE -#if defined (__STDC__) && __STDC__ -#define POINTER void * -#else -#define POINTER char * -#endif +# if defined __STDC__ && __STDC__ +# define POINTER void * +# else +# define POINTER char * +# endif /* Determine default alignment. */ struct fooalign {char x; double d;}; -#define DEFAULT_ALIGNMENT \ +# define DEFAULT_ALIGNMENT \ ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0)) /* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT. But in fact it might be less smart and round addresses to as much as DEFAULT_ROUNDING. So we prepare for it to do that. */ union fooround {long x; double d;}; -#define DEFAULT_ROUNDING (sizeof (union fooround)) +# define DEFAULT_ROUNDING (sizeof (union fooround)) /* When we copy a long block of data, this is the unit to do it with. On some machines, copying successive ints does not work; in such a case, redefine COPYING_UNIT to `long' (if that works) or `char' as a last resort. */ -#ifndef COPYING_UNIT -#define COPYING_UNIT int -#endif +# ifndef COPYING_UNIT +# define COPYING_UNIT int +# endif /* The functions allocating more room by calling `obstack_chunk_alloc' @@ -81,21 +84,21 @@ union fooround {long x; double d;}; abort gracefully or use longjump - but shouldn't return. This variable by default points to the internal function `print_and_abort'. */ -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ static void print_and_abort (void); void (*obstack_alloc_failed_handler) (void) = print_and_abort; -#else +# else static void print_and_abort (); void (*obstack_alloc_failed_handler) () = print_and_abort; -#endif +# endif /* Exit value used when `print_and_abort' is used. */ -#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H -#include -#endif -#ifndef EXIT_FAILURE -#define EXIT_FAILURE 1 -#endif +# if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H +# include +# endif +# ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +# endif int obstack_exit_failure = EXIT_FAILURE; /* The non-GNU-C macros copy the obstack into this global variable @@ -109,33 +112,33 @@ struct obstack *_obstack; For free, do not use ?:, since some compilers, like the MIPS compilers, do not allow (expr) ? void : void. */ -#if defined (__STDC__) && __STDC__ -#define CALL_CHUNKFUN(h, size) \ +# if defined __STDC__ && __STDC__ +# define CALL_CHUNKFUN(h, size) \ (((h) -> use_extra_arg) \ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size))) -#define CALL_FREEFUN(h, old_chunk) \ +# define CALL_FREEFUN(h, old_chunk) \ do { \ if ((h) -> use_extra_arg) \ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ else \ (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \ } while (0) -#else -#define CALL_CHUNKFUN(h, size) \ +# else +# define CALL_CHUNKFUN(h, size) \ (((h) -> use_extra_arg) \ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \ : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size))) -#define CALL_FREEFUN(h, old_chunk) \ +# define CALL_FREEFUN(h, old_chunk) \ do { \ if ((h) -> use_extra_arg) \ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \ else \ (*(void (*) ()) (h)->freefun) ((old_chunk)); \ } while (0) -#endif +# endif /* Initialize an obstack H for use. Specify chunk size SIZE (0 means default). @@ -151,13 +154,13 @@ _obstack_begin (h, size, alignment, chun struct obstack *h; int size; int alignment; -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ POINTER (*chunkfun) (long); void (*freefun) (void *); -#else +# else POINTER (*chunkfun) (); void (*freefun) (); -#endif +# endif { register struct _obstack_chunk *chunk; /* points to new chunk */ @@ -180,13 +183,13 @@ _obstack_begin (h, size, alignment, chun size = 4096 - extra; } -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun; h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; -#else +# else h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun; h->freefun = freefun; -#endif +# endif h->chunk_size = size; h->alignment_mask = alignment - 1; h->use_extra_arg = 0; @@ -209,13 +212,13 @@ _obstack_begin_1 (h, size, alignment, ch struct obstack *h; int size; int alignment; -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ POINTER (*chunkfun) (POINTER, long); void (*freefun) (POINTER, POINTER); -#else +# else POINTER (*chunkfun) (); void (*freefun) (); -#endif +# endif POINTER arg; { register struct _obstack_chunk *chunk; /* points to new chunk */ @@ -239,13 +242,13 @@ _obstack_begin_1 (h, size, alignment, ch size = 4096 - extra; } -#if defined(__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun; h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun; -#else +# else h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun; h->freefun = freefun; -#endif +# endif h->chunk_size = size; h->alignment_mask = alignment - 1; h->extra_arg = arg; @@ -340,11 +343,11 @@ _obstack_newchunk (h, length) This is here for debugging. If you use it in a program, you are probably losing. */ -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ /* Suppress -Wmissing-prototypes warning. We don't want to declare this in obstack.h because it is just for debugging. */ int _obstack_allocated_p (struct obstack *h, POINTER obj); -#endif +# endif int _obstack_allocated_p (h, obj) @@ -369,7 +372,7 @@ _obstack_allocated_p (h, obj) /* Free objects in obstack H, including OBJ and everything allocate more recently than OBJ. If OBJ is zero, free everything in H. */ -#undef obstack_free +# undef obstack_free /* This function has two names with identical definitions. This is the first one, called from non-ANSI code. */ @@ -455,45 +458,54 @@ _obstack_memory_used (h) } /* Define the error handler. */ -#ifndef _ -# if defined HAVE_LIBINTL_H || defined _LIBC -# include -# ifndef _ -# define _(Str) gettext (Str) +# ifndef _ +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifndef _ +# define _(Str) gettext (Str) +# endif +# else +# define _(Str) (Str) # endif -# else -# define _(Str) (Str) # endif -#endif -#if defined _LIBC && defined USE_IN_LIBIO -# include -# define fputs(s, f) _IO_fputs (s, f) -#endif +# if defined _LIBC && defined USE_IN_LIBIO +# include +# define fputs(s, f) _IO_fputs (s, f) +# endif -#ifndef __attribute__ +# ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -# define __attribute__(Spec) /* empty */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) +# define __attribute__(Spec) /* empty */ +# endif # endif -#endif static void __attribute__ ((noreturn)) print_and_abort () { - fputs (_("memory exhausted"), stderr); - fputc ('\n', stderr); + /* Don't change any of these strings. Yes, it would be possible to add + the newline to the string and use fputs or so. But this must not + happen because the "memory exhausted" message appears in other places + like this and the translation should be reused instead of creating + a very similar string which requires a separate translation. */ +# if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s\n", _("memory exhausted")); + else +# endif + fprintf (stderr, "%s\n", _("memory exhausted")); exit (obstack_exit_failure); } -#if 0 +# if 0 /* These are now turned off because the applications do not use it and it uses bcopy via obstack_grow, which causes trouble on sysV. */ /* Now define the functional versions of the obstack macros. Define them to simply use the corresponding macros to do the job. */ -#if defined (__STDC__) && __STDC__ +# if defined __STDC__ && __STDC__ /* These function definitions do not work with non-ANSI preprocessors; they won't pass through the macro names in parentheses. */ @@ -604,8 +616,8 @@ POINTER (obstack_copy0) (obstack, addres return obstack_copy0 (obstack, address, length); } -#endif /* __STDC__ */ +# endif /* __STDC__ */ -#endif /* 0 */ +# endif /* 0 */ #endif /* !ELIDE_CODE */ diff -durpN glibc-2.2.4/manual/Makefile glibc-2.2.5/manual/Makefile --- glibc-2.2.4/manual/Makefile Mon Jul 23 10:54:39 2001 +++ glibc-2.2.5/manual/Makefile Tue Aug 28 01:05:40 2001 @@ -58,7 +58,8 @@ chapters = $(addsuffix .texi, \ resource setjmp signal startup process job nss \ users sysinfo conf crypt debug) add-chapters = $(wildcard $(foreach d, $(add-ons), ../$d/$d.texi)) -appendices = lang.texi header.texi install.texi maint.texi contrib.texi +appendices = lang.texi header.texi install.texi maint.texi contrib.texi \ + freemanuals.texi -include texis texis: texis.awk $(chapters) $(add-chapters) $(appendices) lesser.texi fdl.texi diff -durpN glibc-2.2.4/manual/argp-ex2.c.texi glibc-2.2.5/manual/argp-ex2.c.texi --- glibc-2.2.4/manual/argp-ex2.c.texi Mon Feb 28 22:03:26 2000 +++ glibc-2.2.5/manual/argp-ex2.c.texi Tue Jan 8 14:20:39 2002 @@ -15,7 +15,7 @@ but not in this small program). There are also two global variables that argp knows about defined here, ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are - global variables becuase they will almost always be constant + global variables because they will almost always be constant for a given program, even if it uses different argument parsers for various tasks).} */ diff -durpN glibc-2.2.4/manual/charset.texi glibc-2.2.5/manual/charset.texi --- glibc-2.2.4/manual/charset.texi Mon Jul 23 10:54:39 2001 +++ glibc-2.2.5/manual/charset.texi Tue Nov 6 23:19:59 2001 @@ -14,7 +14,7 @@ eight bits (one byte) were used to repre limitations of this approach became more apparent as more people grappled with non-Roman character sets, where not all the characters that make up a language's character set can be represented by @math{2^8} -choices. This chapter shows the functionality which was added to the C +choices. This chapter shows the functionality that was added to the C library to support multiple character sets. @menu @@ -31,9 +31,9 @@ library to support multiple character se @node Extended Char Intro @section Introduction to Extended Characters -A variety of solutions to overcome the differences between +A variety of solutions is available to overcome the differences between character sets with a 1:1 relation between bytes and characters and -character sets with ratios of 2:1 or 4:1 exist. The remainder of this +character sets with ratios of 2:1 or 4:1. The remainder of this section gives a few examples to help understand the design decisions made while developing the functionality of the @w{C library}. @@ -42,43 +42,43 @@ A distinction we have to make right away external representation. @dfn{Internal representation} means the representation used by a program while keeping the text in memory. External representations are used when text is stored or transmitted -through whatever communication channel. Examples of external -representations include files lying in a directory that are going to be +through some communication channel. Examples of external +representations include files waiting in a directory to be read and parsed. Traditionally there has been no difference between the two representations. It was equally comfortable and useful to use the same single-byte -representation internally and externally. This changes with more and -larger character sets. +representation internally and externally. This comfort level decreases +with more and larger character sets. One of the problems to overcome with the internal representation is handling text that is externally encoded using different character -sets. Assume a program which reads two texts and compares them using +sets. Assume a program that reads two texts and compares them using some metric. The comparison can be usefully done only if the texts are internally kept in a common format. @cindex wide character For such a common format (@math{=} character set) eight bits are certainly no longer enough. So the smallest entity will have to grow: @dfn{wide -characters} will now be used. Instead of one byte, two or four will -be used instead. (Three are not good to address in memory and more -than four bytes seem not to be necessary). +characters} will now be used. Instead of one byte per character, two or +four will be used instead. (Three are not good to address in memory and +more than four bytes seem not to be necessary). @cindex Unicode @cindex ISO 10646 As shown in some other part of this manual, @c !!! Ahem, wide char string functions are not yet covered -- drepper -there exists a completely new family of functions which can handle texts -of this kind in memory. The most commonly used character sets for such +a completely new family has been created of functions that can handle wide +character texts in memory. The most commonly used character sets for such internal wide character representations are Unicode and @w{ISO 10646} -(also known as UCS for Universal Character Set). Unicode was originally -planned as a 16-bit character set, whereas @w{ISO 10646} was designed to -be a 31-bit large code space. The two standards are practically identical. +(also known as UCS for Universal Character Set). Unicode was originally +planned as a 16-bit character set; whereas, @w{ISO 10646} was designed to +be a 31-bit large code space. The two standards are practically identical. They have the same character repertoire and code table, but Unicode specifies added semantics. At the moment, only characters in the first @code{0x10000} code positions (the so-called Basic Multilingual Plane, BMP) have been assigned, but the assignment of more specialized characters outside this -16-bit space is already in progress. A number of encodings have been +16-bit space is already in progress. A number of encodings have been defined for Unicode and @w{ISO 10646} characters: @cindex UCS-2 @cindex UCS-4 @@ -93,51 +93,53 @@ of UCS-2 in which pairs of certain UCS-2 non-BMP characters up to @code{0x10ffff}. To represent wide characters the @code{char} type is not suitable. For -this reason the @w{ISO C} standard introduces a new type which is +this reason the @w{ISO C} standard introduces a new type that is designed to keep one character of a wide character string. To maintain the similarity there is also a type corresponding to @code{int} for -those functions which take a single wide character. +those functions that take a single wide character. @comment stddef.h @comment ISO @deftp {Data type} wchar_t This data type is used as the base type for wide character strings. -I.e., arrays of objects of this type are the equivalent of @code{char[]} -for multibyte character strings. The type is defined in @file{stddef.h}. +In other words, arrays of objects of this type are the equivalent of +@code{char[]} for multibyte character strings. The type is defined in +@file{stddef.h}. -The @w{ISO C90} standard, where this type was introduced, does not say -anything specific about the representation. It only requires that this -type is capable of storing all elements of the basic character set. -Therefore it would be legitimate to define @code{wchar_t} as -@code{char}. This might make sense for embedded systems. +The @w{ISO C90} standard, where @code{wchar_t} was introduced, does not +say anything specific about the representation. It only requires that +this type is capable of storing all elements of the basic character set. +Therefore it would be legitimate to define @code{wchar_t} as @code{char}, +which might make sense for embedded systems. -But for GNU systems this type is always 32 bits wide. It is therefore -capable of representing all UCS-4 values and therefore covering all of -@w{ISO 10646}. Some Unix systems define @code{wchar_t} as a 16-bit type and -thereby follow Unicode very strictly. This is perfectly fine with the -standard but it also means that to represent all characters from Unicode -and @w{ISO 10646} one has to use UTF-16 surrogate characters which is in -fact a multi-wide-character encoding. But this contradicts the purpose -of the @code{wchar_t} type. +But for GNU systems @code{wchar_t} is always 32 bits wide and, therefore, +capable of representing all UCS-4 values and, therefore, covering all of +@w{ISO 10646}. Some Unix systems define @code{wchar_t} as a 16-bit type +and thereby follow Unicode very strictly. This definition is perfectly +fine with the standard, but it also means that to represent all +characters from Unicode and @w{ISO 10646} one has to use UTF-16 surrogate +characters, which is in fact a multi-wide-character encoding. But +resorting to multi-wide-character encoding contradicts the purpose of the +@code{wchar_t} type. @end deftp @comment wchar.h @comment ISO @deftp {Data type} wint_t -@code{wint_t} is a data type used for parameters and variables which -contain a single wide character. As the name already suggests it is the -equivalent to @code{int} when using the normal @code{char} strings. The -types @code{wchar_t} and @code{wint_t} have often the same -representation if their size if 32 bits wide but if @code{wchar_t} is +@code{wint_t} is a data type used for parameters and variables that +contain a single wide character. As the name suggests this type is the +equivalent of @code{int} when using the normal @code{char} strings. The +types @code{wchar_t} and @code{wint_t} often have the same +representation if their size is 32 bits wide but if @code{wchar_t} is defined as @code{char} the type @code{wint_t} must be defined as @code{int} due to the parameter promotion. @pindex wchar.h -This type is defined in @file{wchar.h} and got introduced in +This type is defined in @file{wchar.h} and was introduced in @w{Amendment 1} to @w{ISO C90}. @end deftp -As there are for the @code{char} data type there also exist macros +As there are for the @code{char} data type macros are available for specifying the minimum and maximum value representable in an object of type @code{wchar_t}. @@ -147,7 +149,7 @@ type @code{wchar_t}. The macro @code{WCHAR_MIN} evaluates to the minimum value representable by an object of type @code{wint_t}. -This macro got introduced in @w{Amendment 1} to @w{ISO C90}. +This macro was introduced in @w{Amendment 1} to @w{ISO C90}. @end deftypevr @comment wchar.h @@ -156,7 +158,7 @@ This macro got introduced in @w{Amendmen The macro @code{WCHAR_MAX} evaluates to the maximum value representable by an object of type @code{wint_t}. -This macro got introduced in @w{Amendment 1} to @w{ISO C90}. +This macro was introduced in @w{Amendment 1} to @w{ISO C90}. @end deftypevr Another special wide character value is the equivalent to @code{EOF}. @@ -169,7 +171,8 @@ The macro @code{WEOF} evaluates to a con character set. @code{WEOF} need not be the same value as @code{EOF} and unlike -@code{EOF} it also need @emph{not} be negative. I.e., sloppy code like +@code{EOF} it also need @emph{not} be negative. In other words, sloppy +code like @smallexample @{ @@ -181,8 +184,8 @@ character set. @end smallexample @noindent -has to be rewritten to explicitly use @code{WEOF} when wide characters -are used. +has to be rewritten to use @code{WEOF} explicitly when wide characters +are used: @smallexample @{ @@ -200,48 +203,48 @@ defined in @file{wchar.h}. These internal representations present problems when it comes to storing -and transmittal, since a single wide character consists of more -than one byte they are effected by byte-ordering. I.e., machines with -different endianesses would see different value accessing the same data. -This also applies for communication protocols which are all byte-based -and therefore the sender has to decide about splitting the wide -character in bytes. A last (but not least important) point is that wide -characters often require more storage space than an customized byte -oriented character set. +and transmittal. Because each single wide character consists of more +than one byte, they are effected by byte-ordering. Thus, machines with +different endianesses would see different values when accessing the same +data. This byte ordering concern also applies for communication protocols +that are all byte-based and, thereforet require that the sender has to +decide about splitting the wide character in bytes. A last (but not least +important) point is that wide characters often require more storage space +than a customized byte-oriented character set. @cindex multibyte character @cindex EBCDIC - For all the above reasons, an external encoding which is different -from the internal encoding is often used if the latter is UCS-2 or UCS-4. +For all the above reasons, an external encoding that is different from +the internal encoding is often used if the latter is UCS-2 or UCS-4. The external encoding is byte-based and can be chosen appropriately for -the environment and for the texts to be handled. There exist a variety -of different character sets which can be used for this external -encoding. Information which will not be exhaustively presented -here--instead, a description of the major groups will suffice. All of -the ASCII-based character sets [_bkoz_: do you mean Roman character -sets? If not, what do you mean here?] fulfill one requirement: they are -"filesystem safe". This means that the character @code{'/'} is used in -the encoding @emph{only} to represent itself. Things are a bit -different for character sets like EBCDIC (Extended Binary Coded Decimal -Interchange Code, a character set family used by IBM) but if the -operation system does not understand EBCDIC directly the parameters to -system calls have to be converted first anyhow. +the environment and for the texts to be handled. A variety of different +character sets can be used for this external encoding (information that +will not be exhaustively presented here--instead, a description of the +major groups will suffice). All of the ASCII-based character sets +fulfill one requirement: they are "filesystem safe." This means that +the character @code{'/'} is used in the encoding @emph{only} to +represent itself. Things are a bit different for character sets like +EBCDIC (Extended Binary Coded Decimal Interchange Code, a character set +family used by IBM), but if the operation system does not understand +EBCDIC directly the parameters-to-system calls have to be converted +first anyhow. @itemize @bullet @item -The simplest character sets are single-byte character sets. There can be -only up to 256 characters (for @w{8 bit} character sets) which is not -sufficient to cover all languages but might be sufficient to handle a -specific text. Another reason to choose this is because of constraints -from interaction with other programs (which might not be 8-bit clean). +The simplest character sets are single-byte character sets. There can +be only up to 256 characters (for @w{8 bit} character sets), which is +not sufficient to cover all languages but might be sufficient to handle +a specific text. Handling of a @w{8 bit} character sets is simple. This +is not true for other kinds presented later, and therefore, the +application one uses might require the use of @w{8 bit} character sets. @cindex ISO 2022 @item The @w{ISO 2022} standard defines a mechanism for extended character sets where one character @emph{can} be represented by more than one -byte. This is achieved by associating a state with the text. Embedded -in the text can be characters which can be used to change the state. -Each byte in the text might have a different interpretation in each +byte. This is achieved by associating a state with the text. +Characters that can be used to change the state can be embedded in the +text. Each byte in the text might have a different interpretation in each state. The state might even influence whether a given byte stands for a character on its own or whether it has to be combined with some more bytes. @@ -250,14 +253,14 @@ bytes. @cindex Shift_JIS @cindex SJIS In most uses of @w{ISO 2022} the defined character sets do not allow -state changes which cover more than the next character. This has the +state changes that cover more than the next character. This has the big advantage that whenever one can identify the beginning of the byte sequence of a character one can interpret a text correctly. Examples of character sets using this policy are the various EUC character sets (used by Sun's operations systems, EUC-JP, EUC-KR, EUC-TW, and EUC-CN) or Shift_JIS (SJIS, a Japanese encoding). -But there are also character sets using a state which is valid for more +But there are also character sets using a state that is valid for more than one character and has to be changed by another byte sequence. Examples for this are ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN. @@ -267,13 +270,14 @@ Early attempts to fix 8 bit character se Roman alphabet lead to character sets like @w{ISO 6937}. Here bytes representing characters like the acute accent do not produce output themselves: one has to combine them with other characters to get the -desired result. E.g., the byte sequence @code{0xc2 0x61} (non-spacing -acute accent, following by lower-case `a') to get the ``small a with -acute'' character. To get the acute accent character on its own, one has -to write @code{0xc2 0x20} (the non-spacing acute followed by a space). +desired result. For example, the byte sequence @code{0xc2 0x61} +(non-spacing acute accent, followed by lower-case `a') to get the ``small +a with acute'' character. To get the acute accent character on its own, +one has to write @code{0xc2 0x20} (the non-spacing acute followed by a +space). -This type of character set is used in some embedded systems such as -teletex. +Character sets like @w{ISO 6937} are used in some embedded systems such +as teletex. @item @cindex UTF-8 @@ -281,13 +285,13 @@ Instead of converting the Unicode or @w{ it is often also sufficient to simply use an encoding different than UCS-2/UCS-4. The Unicode and @w{ISO 10646} standards even specify such an encoding: UTF-8. This encoding is able to represent all of @w{ISO -10464} 31 bits in a byte string of length one to six. +10646} 31 bits in a byte string of length one to six. @cindex UTF-7 -There were a few other attempts to encode @w{ISO 10646} such as UTF-7 -but UTF-8 is today the only encoding which should be used. In fact, -UTF-8 will hopefully soon be the only external encoding that has to be -supported. It proves to be universally usable and the only disadvantage +There were a few other attempts to encode @w{ISO 10646} such as UTF-7, +but UTF-8 is today the only encoding that should be used. In fact, with +any luck UTF-8 will soon be the only external encoding that has to be +supported. It proves to be universally usable and its only disadvantage is that it favors Roman languages by making the byte string representation of other scripts (Cyrillic, Greek, Asian scripts) longer than necessary if using a specific character set for these scripts. @@ -299,11 +303,11 @@ The question remaining is: how to select to use. The answer: you cannot decide about it yourself, it is decided by the developers of the system or the majority of the users. Since the goal is interoperability one has to use whatever the other people one -works with use. If there are no constraints the selection is based on -the requirements the expected circle of users will have. I.e., if a -project is expected to only be used in, say, Russia it is fine to use +works with use. If there are no constraints, the selection is based on +the requirements the expected circle of users will have. In other words, +if a project is expected to be used in only, say, Russia it is fine to use KOI8-R or a similar character set. But if at the same time people from, -say, Greece are participating one should use a character set which allows +say, Greece are participating one should use a character set that allows all people to collaborate. The most widely useful solution seems to be: go with the most general @@ -317,24 +321,21 @@ is using Unicode or @w{ISO 10646}. This encouraged, by the @w{ISO C} standard. The standard defines at least a macro @code{__STDC_ISO_10646__} that is only defined on systems where the @code{wchar_t} type encodes @w{ISO 10646} characters. If this -symbol is not defined one should as much as possible avoid making -assumption about the wide character representation. If the programmer -uses only the functions provided by the C library to handle wide -character strings there should not be any compatibility problems with -other systems. +symbol is not defined one should avoid making assumptions about the wide +character representation. If the programmer uses only the functions +provided by the C library to handle wide character strings there should +be no compatibility problems with other systems. @node Charset Function Overview @section Overview about Character Handling Functions A Unix @w{C library} contains three different sets of functions in two -families to handle character set conversion. The one function family -is specified in the @w{ISO C} standard and therefore is portable even -beyond the Unix world. - -The most commonly known set of functions, coming from the @w{ISO C90} -standard, is unfortunately the least useful one. In fact, these -functions should be avoided whenever possible, especially when -developing libraries (as opposed to applications). +families to handle character set conversion. One of the function families +(the most commonly used) is specified in the @w{ISO C90} standard and, +therefore, is portable even beyond the Unix world. Unfortunately this +family is the least useful one. These functions should be avoided +whenever possible, especially when developing libraries (as opposed to +applications). The second family of functions got introduced in the early Unix standards (XPG2) and is still part of the latest and greatest Unix standard: @@ -358,18 +359,18 @@ the @code{LC_CTYPE} category of the curr @item The functions handling more than one character at a time require NUL -terminated strings as the argument. I.e., converting blocks of text -does not work unless one can add a NUL byte at an appropriate place. -The GNU C library contains some extensions the standard which allow -specifying a size but basically they also expect terminated strings. +terminated strings as the argument (i.e., converting blocks of text +does not work unless one can add a NUL byte at an appropriate place). +The GNU C library contains some extensions to the standard that allow +specifying a size, but basically they also expect terminated strings. @end itemize -Despite these limitations the @w{ISO C} functions can very well be used -in many contexts. In graphical user interfaces, for instance, it is not -uncommon to have functions which require text to be displayed in a wide -character string if it is not simple ASCII. The text itself might come -from a file with translations and the user should decide about the -current locale which determines the translation and therefore also the +Despite these limitations the @w{ISO C} functions can be used in many +contexts. In graphical user interfaces, for instance, it is not +uncommon to have functions that require text to be displayed in a wide +character string if the text is not simple ASCII. The text itself might +come from a file with translations and the user should decide about the +current locale, which determines the translation and therefore also the external encoding used. In such a situation (and many others) the functions described here are perfect. If more freedom while performing the conversion is necessary take a look at the @code{iconv} functions @@ -388,25 +389,25 @@ the conversion is necessary take a look @subsection Selecting the conversion and its properties We already said above that the currently selected locale for the -@code{LC_CTYPE} category decides about the conversion which is performed +@code{LC_CTYPE} category decides about the conversion that is performed by the functions we are about to describe. Each locale uses its own character set (given as an argument to @code{localedef}) and this is the one assumed as the external multibyte encoding. The wide character character set always is UCS-4, at least on GNU systems. A characteristic of each multibyte character set is the maximum number -of bytes which can be necessary to represent one character. This -information is quite important when writing code which uses the -conversion functions. In the examples below we will see some examples. -The @w{ISO C} standard defines two macros which provide this information. +of bytes that can be necessary to represent one character. This +information is quite important when writing code that uses the +conversion functions (as shown in the examples below). +The @w{ISO C} standard defines two macros that provide this information. @comment limits.h @comment ISO @deftypevr Macro int MB_LEN_MAX -This macro specifies the maximum number of bytes in the multibyte +@code{MB_LEN_MAX} specifies the maximum number of bytes in the multibyte sequence for a single character in any of the supported locales. It is -a compile-time constant and it is defined in @file{limits.h}. +a compile-time constant and is defined in @file{limits.h}. @pindex limits.h @end deftypevr @@ -416,15 +417,15 @@ a compile-time constant and it is define @code{MB_CUR_MAX} expands into a positive integer expression that is the maximum number of bytes in a multibyte character in the current locale. The value is never greater than @code{MB_LEN_MAX}. Unlike -@code{MB_LEN_MAX} this macro need not be a compile-time constant and in -fact, in the GNU C library it is not. +@code{MB_LEN_MAX} this macro need not be a compile-time constant, and in +the GNU C library it is not. @pindex stdlib.h @code{MB_CUR_MAX} is defined in @file{stdlib.h}. @end deftypevr Two different macros are necessary since strictly @w{ISO C90} compilers -do not allow variable length array definitions but still it is desirable +do not allow variable length array definitions, but still it is desirable to avoid dynamic allocation. This incomplete piece of code shows the problem: @@ -445,8 +446,8 @@ problem: The code in the inner loop is expected to have always enough bytes in the array @var{buf} to convert one multibyte character. The array @var{buf} has to be sized statically since many compilers do not allow a -variable size. The @code{fread} call makes sure that always -@code{MB_CUR_MAX} bytes are available in @var{buf}. Note that it isn't +variable size. The @code{fread} call makes sure that @code{MB_CUR_MAX} +bytes are always available in @var{buf}. Note that it isn't a problem if @code{MB_CUR_MAX} is not a compile-time constant. @@ -455,8 +456,8 @@ a problem if @code{MB_CUR_MAX} is not a @cindex stateful In the introduction of this chapter it was said that certain character -sets use a @dfn{stateful} encoding. I.e., the encoded values depend in -some way on the previous bytes in the text. +sets use a @dfn{stateful} encoding. That is, the encoded values depend +in some way on the previous bytes in the text. Since the conversion functions allow converting a text in more than one step we must have a way to pass this information from one call of the @@ -471,19 +472,18 @@ about the @dfn{shift state} needed from function to another. @pindex wchar.h -This type is defined in @file{wchar.h}. It got introduced in +@code{mbstate_t} is defined in @file{wchar.h}. It was introduced in @w{Amendment 1} to @w{ISO C90}. @end deftp -To use objects of this type the programmer has to define such objects -(normally as local variables on the stack) and pass a pointer to the -object to the conversion functions. This way the conversion function -can update the object if the current multibyte character set is -stateful. +To use objects of type @code{mbstate_t} the programmer has to define such +objects (normally as local variables on the stack) and pass a pointer to +the object to the conversion functions. This way the conversion function +can update the object if the current multibyte character set is stateful. There is no specific function or initializer to put the state object in any specific state. The rules are that the object should always -represent the initial state before the first use and this is achieved by +represent the initial state before the first use, and this is achieved by clearing the whole variable with code such as follows: @smallexample @@ -497,24 +497,24 @@ clearing the whole variable with code su When using the conversion functions to generate output it is often necessary to test whether the current state corresponds to the initial -state. This is necessary, for example, to decide whether or not to emit +state. This is necessary, for example, to decide whether to emit escape sequences to set the state to the initial state at certain sequence points. Communication protocols often require this. @comment wchar.h @comment ISO @deftypefun int mbsinit (const mbstate_t *@var{ps}) -This function determines whether the state object pointed to by @var{ps} -is in the initial state or not. If @var{ps} is a null pointer or the -object is in the initial state the return value is nonzero. Otherwise +The @code{mbsinit} function determines whether the state object pointed +to by @var{ps} is in the initial state. If @var{ps} is a null pointer or +the object is in the initial state the return value is nonzero. Otherwise it is zero. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and -is declared in @file{wchar.h}. +@code{mbsinit} was introduced in @w{Amendment 1} to @w{ISO C90} and is +declared in @file{wchar.h}. @end deftypefun -Code using this function often looks similar to this: +Code using @code{mbsinit} often looks similar to this: @c Fix the example to explicitly say how to generate the escape sequence @c to restore the initial state. @@ -541,7 +541,7 @@ necessary output code (@pxref{Converting GNU systems it is not necessary to perform this extra action for the conversion from multibyte text to wide character text since the wide character encoding is not stateful. But there is nothing mentioned in -any standard which prohibits making @code{wchar_t} using a stateful +any standard that prohibits making @code{wchar_t} using a stateful encoding. @node Converting a Character @@ -550,12 +550,11 @@ encoding. The most fundamental of the conversion functions are those dealing with single characters. Please note that this does not always mean single bytes. But since there is very often a subset of the multibyte -character set which consists of single byte sequences there are -functions to help with converting bytes. One very important and often -applicable scenario is where ASCII is a subpart of the multibyte -character set. I.e., all ASCII characters stand for itself and all -other characters have at least a first byte which is beyond the range -@math{0} to @math{127}. +character set that consists of single byte sequences, there are +functions to help with converting bytes. Frequently, ASCII is a subpart +of the multibyte character set. In such a scenario, each ASCII character +stands for itself, and all other characters have at least a first byte +that is beyond the range @math{0} to @math{127}. @comment wchar.h @comment ISO @@ -566,16 +565,16 @@ character equivalent using the conversio selected locale of the @code{LC_CTYPE} category. If @code{(unsigned char) @var{c}} is no valid single byte multibyte -character or if @var{c} is @code{EOF} the function returns @code{WEOF}. +character or if @var{c} is @code{EOF}, the function returns @code{WEOF}. Please note the restriction of @var{c} being tested for validity only in -the initial shift state. There is no @code{mbstate_t} object used from -which the state information is taken and the function also does not use +the initial shift state. No @code{mbstate_t} object is used from +which the state information is taken, and the function also does not use any static state. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and -is declared in @file{wchar.h}. +The @code{btowc} function was introduced in @w{Amendment 1} to @w{ISO C90} +and is declared in @file{wchar.h}. @end deftypefun Despite the limitation that the single byte value always is interpreted @@ -618,12 +617,12 @@ There also is a function for the convers @deftypefun int wctob (wint_t @var{c}) The @code{wctob} function (``wide character to byte'') takes as the parameter a valid wide character. If the multibyte representation for -this character in the initial state is exactly one byte long the return +this character in the initial state is exactly one byte long, the return value of this function is this character. Otherwise the return value is @code{EOF}. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and +@code{wctob} was introduced in @w{Amendment 1} to @w{ISO C90} and is declared in @file{wchar.h}. @end deftypefun @@ -641,44 +640,44 @@ character'') converts the next multibyte to by @var{s} into a wide character and stores it in the wide character string pointed to by @var{pwc}. The conversion is performed according to the locale currently selected for the @code{LC_CTYPE} category. If -the conversion for the character set used in the locale requires a state +the conversion for the character set used in the locale requires a state, the multibyte string is interpreted in the state represented by the object pointed to by @var{ps}. If @var{ps} is a null pointer, a static, internal state variable used only by the @code{mbrtowc} function is used. -If the next multibyte character corresponds to the NUL wide character +If the next multibyte character corresponds to the NUL wide character, the return value of the function is @math{0} and the state object is afterwards in the initial state. If the next @var{n} or fewer bytes -form a correct multibyte character the return value is the number of -bytes starting from @var{s} which form the multibyte character. The +form a correct multibyte character, the return value is the number of +bytes starting from @var{s} that form the multibyte character. The conversion state is updated according to the bytes consumed in the conversion. In both cases the wide character (either the @code{L'\0'} -or the one found in the conversion) is stored in the string pointer to -by @var{pwc} iff @var{pwc} is not null. +or the one found in the conversion) is stored in the string pointed to +by @var{pwc} if @var{pwc} is not null. If the first @var{n} bytes of the multibyte string possibly form a valid multibyte character but there are more than @var{n} bytes needed to -complete it the return value of the function is @code{(size_t) -2} and +complete it, the return value of the function is @code{(size_t) -2} and no value is stored. Please note that this can happen even if @var{n} -has a value greater or equal to @code{MB_CUR_MAX} since the input might -contain redundant shift sequences. +has a value greater than or equal to @code{MB_CUR_MAX} since the input +might contain redundant shift sequences. If the first @code{n} bytes of the multibyte string cannot possibly form -a valid multibyte character also no value is stored, the global variable -@code{errno} is set to the value @code{EILSEQ} and the function returns +a valid multibyte character, no value is stored, the global variable +@code{errno} is set to the value @code{EILSEQ}, and the function returns @code{(size_t) -1}. The conversion state is afterwards undefined. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and +@code{mbrtowc} was introduced in @w{Amendment 1} to @w{ISO C90} and is declared in @file{wchar.h}. @end deftypefun -Using this function is straight forward. A function which copies a +Use of @code{mbrtowc} is straightforward. A function that copies a multibyte string into a wide character string while at the same time -converting all lowercase character into uppercase could look like this +converting all lowercase characters into uppercase could look like this (this is not the final version, just an example; it has no error -checking, and leaks sometimes memory): +checking, and sometimes leaks memory): @smallexample wchar_t * @@ -706,64 +705,63 @@ mbstouwcs (const char *s) @end smallexample The use of @code{mbrtowc} should be clear. A single wide character is -stored in @code{@var{tmp}[0]} and the number of consumed bytes is stored -in the variable @var{nbytes}. In case the the conversion was successful -the uppercase variant of the wide character is stored in the -@var{result} array and the pointer to the input string and the number of -available bytes is adjusted. +stored in @code{@var{tmp}[0]}, and the number of consumed bytes is stored +in the variable @var{nbytes}. If the conversion is successful, the +uppercase variant of the wide character is stored in the @var{result} +array and the pointer to the input string and the number of available +bytes is adjusted. -The only non-obvious thing about the function might be the way memory is -allocated for the result. The above code uses the fact that there can -never be more wide characters in the converted results than there are -bytes in the multibyte input string. This method yields to a -pessimistic guess about the size of the result and if many wide -character strings have to be constructed this way or the strings are -long, the extra memory required allocated because the input string -contains multibyte characters might be significant. It would be -possible to resize the allocated memory block to the correct size before -returning it. A better solution might be to allocate just the right -amount of space for the result right away. Unfortunately there is no -function to compute the length of the wide character string directly -from the multibyte string. But there is a function which does part of -the work. +The only non-obvious thing about @code{mbrtowc} might be the way memory +is allocated for the result. The above code uses the fact that there +can never be more wide characters in the converted results than there are +bytes in the multibyte input string. This method yields a pessimistic +guess about the size of the result, and if many wide character strings +have to be constructed this way or if the strings are long, the extra +memory required to be allocated because the input string contains +multibyte characters might be significant. The allocated memory block can +be resized to the correct size before returning it, but a better solution +might be to allocate just the right amount of space for the result right +away. Unfortunately there is no function to compute the length of the wide +character string directly from the multibyte string. There is, however, a +function that does part of the work. @comment wchar.h @comment ISO @deftypefun size_t mbrlen (const char *restrict @var{s}, size_t @var{n}, mbstate_t *@var{ps}) The @code{mbrlen} function (``multibyte restartable length'') computes -the number of at most @var{n} bytes starting at @var{s} which form the +the number of at most @var{n} bytes starting at @var{s}, which form the next valid and complete multibyte character. -If the next multibyte character corresponds to the NUL wide character +If the next multibyte character corresponds to the NUL wide character, the return value is @math{0}. If the next @var{n} bytes form a valid -multibyte character the number of bytes belonging to this multibyte +multibyte character, the number of bytes belonging to this multibyte character byte sequence is returned. If the the first @var{n} bytes possibly form a valid multibyte -character but it is incomplete the return value is @code{(size_t) -2}. -Otherwise the multibyte character sequence is invalid and the return -value is @code{(size_t) -1}. +character but the character is incomplete, the return value is +@code{(size_t) -2}. Otherwise the multibyte character sequence is invalid +and the return value is @code{(size_t) -1}. The multibyte sequence is interpreted in the state represented by the object pointed to by @var{ps}. If @var{ps} is a null pointer, a state object local to @code{mbrlen} is used. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and +@code{mbrlen} was introduced in @w{Amendment 1} to @w{ISO C90} and is declared in @file{wchar.h}. @end deftypefun -The tentative reader now will of course note that @code{mbrlen} can be -implemented as +The attentive reader now will note that @code{mbrlen} can be implemented +as @smallexample mbrtowc (NULL, s, n, ps != NULL ? ps : &internal) @end smallexample This is true and in fact is mentioned in the official specification. -Now, how can this function be used to determine the length of the wide +How can this function be used to determine the length of the wide character string created from a multibyte character string? It is not -directly usable but we can define a function @code{mbslen} using it: +directly usable, but we can define a function @code{mbslen} using it: @smallexample size_t @@ -788,12 +786,11 @@ mbslen (const char *s) This function simply calls @code{mbrlen} for each multibyte character in the string and counts the number of function calls. Please note that we here use @code{MB_LEN_MAX} as the size argument in the @code{mbrlen} -call. This is OK since a) this value is larger then the length of the -longest multibyte character sequence and b) because we know that the -string @var{s} ends with a NUL byte which cannot be part of any other -multibyte character sequence but the one representing the NUL wide -character. Therefore the @code{mbrlen} function will never read invalid -memory. +call. This is acceptable since a) this value is larger then the length of +the longest multibyte character sequence and b) we know that the string +@var{s} ends with a NUL byte, which cannot be part of any other multibyte +character sequence but the one representing the NUL wide character. +Therefore, the @code{mbrlen} function will never read invalid memory. Now that this function is available (just to make this clear, this function is @emph{not} part of the GNU C library) we can compute the @@ -805,11 +802,11 @@ wcs_bytes = (mbslen (s) + 1) * sizeof (w @end smallexample Please note that the @code{mbslen} function is quite inefficient. The -implementation of @code{mbstouwcs} implemented using @code{mbslen} would -have to perform the conversion of the multibyte character input string -twice and this conversion might be quite expensive. So it is necessary -to think about the consequences of using the easier but imprecise method -before doing the work twice. +implementation of @code{mbstouwcs} with @code{mbslen} would have to +perform the conversion of the multibyte character input string twice, and +this conversion might be quite expensive. So it is necessary to think +about the consequences of using the easier but imprecise method before +doing the work twice. @comment wchar.h @comment ISO @@ -818,8 +815,8 @@ The @code{wcrtomb} function (``wide char multibyte'') converts a single wide character into a multibyte string corresponding to that wide character. -If @var{s} is a null pointer the function resets the the state stored in -the objects pointer to by @var{ps} (or the internal @code{mbstate_t} +If @var{s} is a null pointer, the function resets the state stored in +the objects pointed to by @var{ps} (or the internal @code{mbstate_t} object) to the initial state. This can also be achieved by a call like this: @@ -828,23 +825,24 @@ wcrtombs (temp_buf, L'\0', ps) @end smallexample @noindent -since if @var{s} is a null pointer @code{wcrtomb} performs as if it -writes into an internal buffer which is guaranteed to be large enough. +since, if @var{s} is a null pointer, @code{wcrtomb} performs as if it +writes into an internal buffer, which is guaranteed to be large enough. -If @var{wc} is the NUL wide character @code{wcrtomb} emits, if +If @var{wc} is the NUL wide character, @code{wcrtomb} emits, if necessary, a shift sequence to get the state @var{ps} into the initial -state followed by a single NUL byte is stored in the string @var{s}. +state followed by a single NUL byte, which is stored in the string +@var{s}. -Otherwise a byte sequence (possibly including shift sequences) is -written into the string @var{s}. This of only happens if @var{wc} is a -valid wide character, i.e., it has a multibyte representation in the -character set selected by locale of the @code{LC_CTYPE} category. If -@var{wc} is no valid wide character nothing is stored in the strings -@var{s}, @code{errno} is set to @code{EILSEQ}, the conversion state in -@var{ps} is undefined and the return value is @code{(size_t) -1}. +Otherwise a byte sequence (possibly including shift sequences) is written +into the string @var{s}. This only happens if @var{wc} is a valid wide +character (i.e., it has a multibyte representation in the character set +selected by locale of the @code{LC_CTYPE} category). If @var{wc} is no +valid wide character, nothing is stored in the strings @var{s}, +@code{errno} is set to @code{EILSEQ}, the conversion state in @var{ps} +is undefined and the return value is @code{(size_t) -1}. If no error occurred the function returns the number of bytes stored in -the string @var{s}. This includes all byte representing shift +the string @var{s}. This includes all bytes representing shift sequences. One word about the interface of the function: there is no parameter @@ -855,13 +853,13 @@ character. So the caller has to make su available, otherwise buffer overruns can occur. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and is +@code{wcrtomb} was introduced in @w{Amendment 1} to @w{ISO C90} and is declared in @file{wchar.h}. @end deftypefun -Using this function is as easy as using @code{mbrtowc}. The following +Using @code{wcrtomb} is as easy as using @code{mbrtowc}. The following example appends a wide character string to a multibyte character string. -Again, the code is not really useful (and correct), it is simply here to +Again, the code is not really useful (or correct), it is simply here to demonstrate the use and some problems. @smallexample @@ -899,7 +897,7 @@ mbscatwcs (char *s, size_t len, const wc First the function has to find the end of the string currently in the array @var{s}. The @code{strchr} call does this very efficiently since a requirement for multibyte character representations is that the NUL byte -never is used except to represent itself (and in this context, the end +is never used except to represent itself (and in this context, the end of the string). After initializing the state object the loop is entered where the first @@ -908,9 +906,9 @@ abort if there are not at least @code{MB is not always optimal but we have no other choice. We might have less than @code{MB_CUR_LEN} bytes available but the next multibyte character might also be only one byte long. At the time the @code{wcrtomb} call -returns it is too late to decide whether the buffer was large enough or -not. If this solution is really unsuitable there is a very slow but -more accurate solution. +returns it is too late to decide whether the buffer was large enough. If +this solution is unsuitable, there is a very slow but more accurate +solution. @smallexample ... @@ -930,20 +928,19 @@ more accurate solution. ... @end smallexample -Here we do perform the conversion which might overflow the buffer so -that we are afterwards in the position to make an exact decision about -the buffer size. Please note the @code{NULL} argument for the -destination buffer in the new @code{wcrtomb} call; since we are not -interested in the converted text at this point this is a nice way to -express this. The most unusual thing about this piece of code certainly -is the duplication of the conversion state object. But think about -this: if a change of the state is necessary to emit the next multibyte -character we want to have the same shift state change performed in the -real conversion. Therefore we have to preserve the initial shift state -information. +Here we perform the conversion that might overflow the buffer so that +we are afterwards in the position to make an exact decision about the +buffer size. Please note the @code{NULL} argument for the destination +buffer in the new @code{wcrtomb} call; since we are not interested in the +converted text at this point, this is a nice way to express this. The +most unusual thing about this piece of code certainly is the duplication +of the conversion state object, but if a change of the state is necessary +to emit the next multibyte character, we want to have the same shift state +change performed in the real conversion. Therefore, we have to preserve +the initial shift state information. There are certainly many more and even better solutions to this problem. -This example is only meant for educational purposes. +This example is only provided for educational purposes. @node Converting Strings @subsection Converting Multibyte and Wide Character Strings @@ -952,29 +949,29 @@ The functions described in the previous character at a time. Most operations to be performed in real-world programs include strings and therefore the @w{ISO C} standard also defines conversions on entire strings. However, the defined set of -functions is quite limited, thus the GNU C library contains a few -extensions which can help in some important situations. +functions is quite limited; therefore, the GNU C library contains a few +extensions that can help in some important situations. @comment wchar.h @comment ISO @deftypefun size_t mbsrtowcs (wchar_t *restrict @var{dst}, const char **restrict @var{src}, size_t @var{len}, mbstate_t *restrict @var{ps}) The @code{mbsrtowcs} function (``multibyte string restartable to wide -character string'') converts an NUL terminated multibyte character +character string'') converts an NUL-terminated multibyte character string at @code{*@var{src}} into an equivalent wide character string, including the NUL wide character at the end. The conversion is started using the state information from the object pointed to by @var{ps} or from an internal object of @code{mbsrtowcs} if @var{ps} is a null -pointer. Before returning the state object to match the state after the -last converted character. The state is the initial state if the +pointer. Before returning, the state object is updated to match the state +after the last converted character. The state is the initial state if the terminating NUL byte is reached and converted. -If @var{dst} is not a null pointer the result is stored in the array -pointed to by @var{dst}, otherwise the conversion result is not +If @var{dst} is not a null pointer, the result is stored in the array +pointed to by @var{dst}; otherwise, the conversion result is not available since it is stored in an internal buffer. If @var{len} wide characters are stored in the array @var{dst} before -reaching the end of the input string the conversion stops and @var{len} -is returned. If @var{dst} is a null pointer @var{len} is never checked. +reaching the end of the input string, the conversion stops and @var{len} +is returned. If @var{dst} is a null pointer, @var{len} is never checked. Another reason for a premature return from the function call is if the input string contains an invalid multibyte sequence. In this case the @@ -982,59 +979,59 @@ global variable @code{errno} is set to @ returns @code{(size_t) -1}. @c XXX The ISO C9x draft seems to have a problem here. It says that PS -@c is not updated if DST is NULL. This is not said straight forward and +@c is not updated if DST is NULL. This is not said straightforward and @c none of the other functions is described like this. It would make sense @c to define the function this way but I don't think it is meant like this. In all other cases the function returns the number of wide characters -converted during this call. If @var{dst} is not null @code{mbsrtowcs} -stores in the pointer pointed to by @var{src} a null pointer (if the NUL -byte in the input string was reached) or the address of the byte +converted during this call. If @var{dst} is not null, @code{mbsrtowcs} +stores in the pointer pointed to by @var{src} either a null pointer (if +the NUL byte in the input string was reached) or the address of the byte following the last converted multibyte character. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and is +@code{mbsrtowcs} was introduced in @w{Amendment 1} to @w{ISO C90} and is declared in @file{wchar.h}. @end deftypefun -The definition of this function has one limitation which has to be -understood. The requirement that @var{dst} has to be a NUL terminated +The definition of the @code{mbsrtowcs} function has one important +limitation. The requirement that @var{dst} has to be a NUL-terminated string provides problems if one wants to convert buffers with text. A -buffer is normally no collection of NUL terminated strings but instead a +buffer is normally no collection of NUL-terminated strings but instead a continuous collection of lines, separated by newline characters. Now -assume a function to convert one line from a buffer is needed. Since -the line is not NUL terminated the source pointer cannot directly point +assume that a function to convert one line from a buffer is needed. Since +the line is not NUL-terminated, the source pointer cannot directly point into the unmodified text buffer. This means, either one inserts the NUL byte at the appropriate place for the time of the @code{mbsrtowcs} function call (which is not doable for a read-only buffer or in a multi-threaded application) or one copies the line in an extra buffer -where it can be terminated by a NUL byte. Note that it is not in -general possible to limit the number of characters to convert by setting -the parameter @var{len} to any specific value. Since it is not known -how many bytes each multibyte character sequence is in length one always -could do only a guess. +where it can be terminated by a NUL byte. Note that it is not in general +possible to limit the number of characters to convert by setting the +parameter @var{len} to any specific value. Since it is not known how +many bytes each multibyte character sequence is in length, one can only +guess. @cindex stateful There is still a problem with the method of NUL-terminating a line right -after the newline character which could lead to very strange results. -As said in the description of the @var{mbsrtowcs} function above the +after the newline character, which could lead to very strange results. +As said in the description of the @code{mbsrtowcs} function above the conversion state is guaranteed to be in the initial shift state after processing the NUL byte at the end of the input string. But this NUL -byte is not really part of the text. I.e., the conversion state after +byte is not really part of the text (i.e., the conversion state after the newline in the original text could be something different than the initial shift state and therefore the first character of the next line -is encoded using this state. But the state in question is never +is encoded using this state). But the state in question is never accessible to the user since the conversion stops after the NUL byte (which resets the state). Most stateful character sets in use today -require that the shift state after a newline is the initial state--but -this is not a strict guarantee. Therefore simply NUL terminating a -piece of a running text is not always an adequate solution and therefore -never should be used in generally used code. +require that the shift state after a newline be the initial state--but +this is not a strict guarantee. Therefore, simply NUL-terminating a +piece of a running text is not always an adequate solution and, +therefore, should never be used in generally used code. The generic conversion interface (@pxref{Generic Charset Conversion}) does not have this limitation (it simply works on buffers, not -strings), and the GNU C library contains a set of functions which take -additional parameters specifying the maximal number of bytes which are +strings), and the GNU C library contains a set of functions that take +additional parameters specifying the maximal number of bytes that are consumed from the input string. This way the problem of @code{mbsrtowcs}'s example above could be solved by determining the line length and passing this length to the function. @@ -1043,19 +1040,19 @@ length and passing this length to the fu @comment ISO @deftypefun size_t wcsrtombs (char *restrict @var{dst}, const wchar_t **restrict @var{src}, size_t @var{len}, mbstate_t *restrict @var{ps}) The @code{wcsrtombs} function (``wide character string restartable to -multibyte string'') converts the NUL terminated wide character string at +multibyte string'') converts the NUL-terminated wide character string at @code{*@var{src}} into an equivalent multibyte character string and stores the result in the array pointed to by @var{dst}. The NUL wide character is also converted. The conversion starts in the state described in the object pointed to by @var{ps} or by a state object locally to @code{wcsrtombs} in case @var{ps} is a null pointer. If -@var{dst} is a null pointer the conversion is performed as usual but the +@var{dst} is a null pointer, the conversion is performed as usual but the result is not available. If all characters of the input string were -successfully converted and if @var{dst} is not a null pointer the +successfully converted and if @var{dst} is not a null pointer, the pointer pointed to by @var{src} gets assigned a null pointer. If one of the wide characters in the input string has no valid multibyte -character equivalent the conversion stops early, sets the global +character equivalent, the conversion stops early, sets the global variable @code{errno} to @code{EILSEQ}, and returns @code{(size_t) -1}. Another reason for a premature stop is if @var{dst} is not a null @@ -1065,40 +1062,40 @@ pointer and the next converted character assigned a value pointing to the wide character right after the last one successfully converted. -Except in the case of an encoding error the return value of the function -is the number of bytes in all the multibyte character sequences stored -in @var{dst}. Before returning the state in the object pointed to by -@var{ps} (or the internal object in case @var{ps} is a null pointer) is -updated to reflect the state after the last conversion. The state is -the initial shift state in case the terminating NUL wide character was -converted. +Except in the case of an encoding error the return value of the +@code{wcsrtombs} function is the number of bytes in all the multibyte +character sequences stored in @var{dst}. Before returning the state in +the object pointed to by @var{ps} (or the internal object in case +@var{ps} is a null pointer) is updated to reflect the state after the +last conversion. The state is the initial shift state in case the +terminating NUL wide character was converted. @pindex wchar.h -This function was introduced in @w{Amendment 1} to @w{ISO C90} and is -declared in @file{wchar.h}. +The @code{wcsrtombs} function was introduced in @w{Amendment 1} to +@w{ISO C90} and is declared in @file{wchar.h}. @end deftypefun -The restriction mentions above for the @code{mbsrtowcs} function applies -also here. There is no possibility to directly control the number of -input characters. One has to place the NUL wide character at the -correct place or control the consumed input indirectly via the available -output array size (the @var{len} parameter). +The restriction mentioned above for the @code{mbsrtowcs} function applies +here also. There is no possibility of directly controlling the number of +input characters. One has to place the NUL wide character at the correct +place or control the consumed input indirectly via the available output +array size (the @var{len} parameter). @comment wchar.h @comment GNU @deftypefun size_t mbsnrtowcs (wchar_t *restrict @var{dst}, const char **restrict @var{src}, size_t @var{nmc}, size_t @var{len}, mbstate_t *restrict @var{ps}) The @code{mbsnrtowcs} function is very similar to the @code{mbsrtowcs} -function. All the parameters are the same except for @var{nmc} which is +function. All the parameters are the same except for @var{nmc}, which is new. The return value is the same as for @code{mbsrtowcs}. This new parameter specifies how many bytes at most can be used from the -multibyte character string. I.e., the multibyte character string -@code{*@var{src}} need not be NUL terminated. But if a NUL byte is -found within the @var{nmc} first bytes of the string the conversion +multibyte character string. In other words, the multibyte character +string @code{*@var{src}} need not be NUL-terminated. But if a NUL byte +is found within the @var{nmc} first bytes of the string, the conversion stops here. -This function is a GNU extensions. It is meant to work around the -problems mentioned above. Now it is possible to convert buffer with +This function is a GNU extension. It is meant to work around the +problems mentioned above. Now it is possible to convert a buffer with multibyte character text piece for piece without having to care about inserting NUL bytes and the effect of NUL bytes on the conversion state. @end deftypefun @@ -1132,25 +1129,26 @@ showmbs (const char *src, FILE *fp) @end smallexample There is no problem with the state after a call to @code{mbsnrtowcs}. -Since we don't insert characters in the strings which were not in there +Since we don't insert characters in the strings that were not in there right from the beginning and we use @var{state} only for the conversion -of the given buffer there is no problem with altering the state. +of the given buffer, there is no problem with altering the state. @comment wchar.h @comment GNU @deftypefun size_t wcsnrtombs (char *restrict @var{dst}, const wchar_t **restrict @var{src}, size_t @var{nwc}, size_t @var{len}, mbstate_t *restrict @var{ps}) The @code{wcsnrtombs} function implements the conversion from wide character strings to multibyte character strings. It is similar to -@code{wcsrtombs} but it takes, just like @code{mbsnrtowcs}, an extra -parameter which specifies the length of the input string. +@code{wcsrtombs} but, just like @code{mbsnrtowcs}, it takes an extra +parameter, which specifies the length of the input string. No more than @var{nwc} wide characters from the input string @code{*@var{src}} are converted. If the input string contains a NUL -wide character in the first @var{nwc} character to conversion stops at +wide character in the first @var{nwc} characters, the conversion stops at this place. -This function is a GNU extension and just like @code{mbsnrtowcs} is -helps in situations where no NUL terminated input strings are available. +The @code{wcsnrtombs} function is a GNU extension and just like +@code{mbsnrtowcs} helps in situations where no NUL-terminated input +strings are available. @end deftypefun @@ -1158,7 +1156,7 @@ helps in situations where no NUL termina @subsection A Complete Multibyte Conversion Example The example programs given in the last sections are only brief and do -not contain all the error checking etc. Presented here is a complete +not contain all the error checking, etc. Presented here is a complete and documented example. It features the @code{mbrtowc} function but it should be easy to derive versions using the other functions. @@ -1247,26 +1245,27 @@ file_mbsrtowcs (int input, int output) @node Non-reentrant Conversion @section Non-reentrant Conversion Function -The functions described in the last chapter are defined in -@w{Amendment 1} to @w{ISO C90}. But the original @w{ISO C90} standard also -contained functions for character set conversion. The reason that they -are not described in the first place is that they are almost entirely -useless. +The functions described in the previous chapter are defined in +@w{Amendment 1} to @w{ISO C90}, but the original @w{ISO C90} standard +also contained functions for character set conversion. The reason that +these original functions are not described first is that they are almost +entirely useless. -The problem is that all the functions for conversion defined in @w{ISO -C90} use a local state. This implies that multiple conversions at the -same time (not only when using threads) cannot be done, and that you -cannot first convert single characters and then strings since you cannot -tell the conversion functions which state to use. +The problem is that all the conversion functions described in the +original @w{ISO C90} use a local state. Using a local state implies that +multiple conversions at the same time (not only when using threads) +cannot be done, and that you cannot first convert single characters and +then strings since you cannot tell the conversion functions which state +to use. -These functions are therefore usable only in a very limited set of -situations. One must complete converting the entire string before -starting a new one and each string/text must be converted with the same +These original functions are therefore usable only in a very limited set +of situations. One must complete converting the entire string before +starting a new one, and each string/text must be converted with the same function (there is no problem with the library itself; it is guaranteed that no library function changes the state of any of these functions). @strong{For the above reasons it is highly requested that the functions -from the last section are used in place of non-reentrant conversion -functions.} +described in the previous section be used in place of non-reentrant +conversion functions.} @menu * Non-reentrant Character Conversion:: Non-reentrant Conversion of Single @@ -1291,13 +1290,13 @@ to supply for @var{size} the number of b @code{mbtowc} with non-null @var{string} distinguishes three possibilities: the first @var{size} bytes at @var{string} start with -valid multibyte character, they start with an invalid byte sequence or +valid multibyte characters, they start with an invalid byte sequence or just part of a character, or @var{string} points to an empty string (a null character). For a valid multibyte character, @code{mbtowc} converts it to a wide character and stores that in @code{*@var{result}}, and returns the -number of bytes in that character (always at least @math{1}, and never +number of bytes in that character (always at least @math{1} and never more than @var{size}). For an invalid byte sequence, @code{mbtowc} returns @math{-1}. For an @@ -1322,11 +1321,12 @@ character sequence, and stores the resul @code{wctomb} with non-null @var{string} distinguishes three possibilities for @var{wchar}: a valid wide character code (one that can -be translated to a multibyte character), an invalid code, and @code{L'\0'}. +be translated to a multibyte character), an invalid code, and +@code{L'\0'}. Given a valid code, @code{wctomb} converts it to a multibyte character, storing the bytes starting at @var{string}. Then it returns the number -of bytes in that character (always at least @math{1}, and never more +of bytes in that character (always at least @math{1} and never more than @code{MB_CUR_MAX}). If @var{wchar} is an invalid wide character code, @code{wctomb} returns @@ -1346,7 +1346,7 @@ stored shift state @emph{as well as} sto @code{'\0'} and returning @math{0}. @end deftypefun -Similar to @code{mbrlen} there is also a non-reentrant function which +Similar to @code{mbrlen} there is also a non-reentrant function that computes the length of a multibyte character. It can be defined in terms of @code{mbtowc}. @@ -1360,11 +1360,11 @@ to supply for @var{size} the number of b The return value of @code{mblen} distinguishes three possibilities: the first @var{size} bytes at @var{string} start with valid multibyte -character, they start with an invalid byte sequence or just part of a +characters, they start with an invalid byte sequence or just part of a character, or @var{string} points to an empty string (a null character). For a valid multibyte character, @code{mblen} returns the number of -bytes in that character (always at least @code{1}, and never more than +bytes in that character (always at least @code{1} and never more than @var{size}). For an invalid byte sequence, @code{mblen} returns @math{-1}. For an empty string, it returns @math{0}. @@ -1383,8 +1383,8 @@ The function @code{mblen} is declared in @node Non-reentrant String Conversion @subsection Non-reentrant Conversion of Strings -For convenience reasons the @w{ISO C90} standard defines also functions -to convert entire strings instead of single characters. These functions +For convenience the @w{ISO C90} standard also defines functions to +convert entire strings instead of single characters. These functions suffer from the same problems as their reentrant counterparts from @w{Amendment 1} to @w{ISO C90}; see @ref{Converting Strings}. @@ -1402,11 +1402,11 @@ is less than the actual number of wide c The conversion of characters from @var{string} begins in the initial shift state. -If an invalid multibyte character sequence is found, this function -returns a value of @math{-1}. Otherwise, it returns the number of wide -characters stored in the array @var{wstring}. This number does not -include the terminating null character, which is present if the number -is less than @var{size}. +If an invalid multibyte character sequence is found, the @code{mbstowcs} +function returns a value of @math{-1}. Otherwise, it returns the number +of wide characters stored in the array @var{wstring}. This number does +not include the terminating null character, which is present if the +number is less than @var{size}. Here is an example showing how to convert a string of multibyte characters, allocating enough space for the result. @@ -1443,10 +1443,10 @@ is less than or equal to the number of b terminating null character is stored. If a code that does not correspond to a valid multibyte character is -found, this function returns a value of @math{-1}. Otherwise, the -return value is the number of bytes stored in the array @var{string}. -This number does not include the terminating null character, which is -present if the number is less than @var{size}. +found, the @code{wcstombs} function returns a value of @math{-1}. +Otherwise, the return value is the number of bytes stored in the array +@var{string}. This number does not include the terminating null character, +which is present if the number is less than @var{size}. @end deftypefun @node Shift State @@ -1454,8 +1454,8 @@ present if the number is less than @var{ In some multibyte character codes, the @emph{meaning} of any particular byte sequence is not fixed; it depends on what other sequences have come -earlier in the same string. Typically there are just a few sequences -that can change the meaning of other sequences; these few are called +earlier in the same string. Typically there are just a few sequences that +can change the meaning of other sequences; these few are called @dfn{shift sequences} and we say that they set the @dfn{shift state} for other sequences that follow. @@ -1465,12 +1465,12 @@ pairs of bytes in the range from @code{0 characters, while @code{0201} enters Latin-1 mode, in which single bytes in the range from @code{0240} to @code{0377} are characters, and interpreted according to the ISO Latin-1 character set. This is a -multibyte code which has two alternative shift states (``Japanese mode'' +multibyte code that has two alternative shift states (``Japanese mode'' and ``Latin-1 mode''), and two shift sequences that specify particular shift states. When the multibyte character code in use has shift states, then -@code{mblen}, @code{mbtowc} and @code{wctomb} must maintain and update +@code{mblen}, @code{mbtowc}, and @code{wctomb} must maintain and update the current shift state as they scan the string. To make this work properly, you must follow these rules: @@ -1525,24 +1525,26 @@ worry that the shift state will be chang @section Generic Charset Conversion The conversion functions mentioned so far in this chapter all had in -common that they operate on character sets which are not directly +common that they operate on character sets that are not directly specified by the functions. The multibyte encoding used is specified by the currently selected locale for the @code{LC_CTYPE} category. The wide character set is fixed by the implementation (in the case of GNU C -library it always is UCS-4 encoded @w{ISO 10646}. +library it is always UCS-4 encoded @w{ISO 10646}. This has of course several problems when it comes to general character conversion: @itemize @bullet @item -For every conversion where neither the source or destination character -set is the character set of the locale for the @code{LC_CTYPE} category, -one has to change the @code{LC_CTYPE} locale using @code{setlocale}. +For every conversion where neither the source nor the destination +character set is the character set of the locale for the @code{LC_CTYPE} +category, one has to change the @code{LC_CTYPE} locale using +@code{setlocale}. -This introduces major problems for the rest of the programs since -several more functions (e.g., the character classification functions, -@pxref{Classification of Characters}) use the @code{LC_CTYPE} category. +Changing the @code{LC_TYPE} locale introduces major problems for the rest +of the programs since several more functions (e.g., the character +classification functions, @pxref{Classification of Characters}) use the +@code{LC_CTYPE} category. @item Parallel conversions to and from different character sets are not @@ -1551,11 +1553,11 @@ threads. @item If neither the source nor the destination character set is the character -set used for @code{wchar_t} representation there is at least a two-step -process necessary to convert a text using the functions above. One -would have to select the source character set as the multibyte encoding, +set used for @code{wchar_t} representation, there is at least a two-step +process necessary to convert a text using the functions above. One would +have to select the source character set as the multibyte encoding, convert the text into a @code{wchar_t} text, select the destination -character set as the multibyte encoding and convert the wide character +character set as the multibyte encoding, and convert the wide character text to the multibyte (@math{=} destination) character set. Even if this is possible (which is not guaranteed) it is a very tiring @@ -1563,20 +1565,19 @@ work. Plus it suffers from the other tw the steady changing of the locale. @end itemize - -The XPG2 standard defines a completely new set of functions which has +The XPG2 standard defines a completely new set of functions, which has none of these limitations. They are not at all coupled to the selected -locales and they but no constraints on the character sets selected for -source and destination. Only the set of available conversions is -limiting them. The standard does not specify that any conversion at all -must be available. It is a measure of the quality of the implementation. +locales, and they have no constraints on the character sets selected for +source and destination. Only the set of available conversions limits +them. The standard does not specify that any conversion at all must be +available. Such availability is a measure of the quality of the +implementation. -In the following text first the interface to @code{iconv}, the +In the following text first the interface to @code{iconv} and then the conversion function, will be described. Comparisons with other -implementations will show what pitfalls lie on the way of portable -applications. At last, the implementation is described as far as -interesting to the advanced user who wants to extend the conversion -capabilities. +implementations will show what obstacles stand in the way of portable +applications. Finally, the implementation is described in so far as might +interest the advanced user who wants to extend conversion capabilities. @menu * Generic Conversion Interface:: Generic Character Set Conversion Interface. @@ -1592,22 +1593,22 @@ capabilities. This set of functions follows the traditional cycle of using a resource: open--use--close. The interface consists of three functions, each of -which implement one step. +which implements one step. Before the interfaces are described it is necessary to introduce a -datatype. Just like other open--use--close interface the functions -introduced here work using a handles and the @file{iconv.h} header +data type. Just like other open--use--close interfaces the functions +introduced here work using handles and the @file{iconv.h} header defines a special type for the handles used. @comment iconv.h @comment XPG2 @deftp {Data Type} iconv_t This data type is an abstract type defined in @file{iconv.h}. The user -must not assume anything about the definition of this type, it must be +must not assume anything about the definition of this type; it must be completely opaque. Objects of this type can get assigned handles for the conversions using -the @code{iconv} functions. The objects themselves need not be freed but +the @code{iconv} functions. The objects themselves need not be freed, but the conversions for which the handles stand for have to. @end deftp @@ -1619,13 +1620,13 @@ The first step is the function to create @deftypefun iconv_t iconv_open (const char *@var{tocode}, const char *@var{fromcode}) The @code{iconv_open} function has to be used before starting a conversion. The two parameters this function takes determine the -source and destination character set for the conversion and if the -implementation has the possibility to perform such a conversion the +source and destination character set for the conversion, and if the +implementation has the possibility to perform such a conversion, the function returns a handle. -If the wanted conversion is not available the function returns -@code{(iconv_t) -1}. In this case the global variable @code{errno} can -have the following values: +If the wanted conversion is not available, the @code{iconv_open} function +returns @code{(iconv_t) -1}. In this case the global variable +@code{errno} can have the following values: @table @code @item EMFILE @@ -1639,8 +1640,8 @@ The conversion from @var{fromcode} to @v @end table It is not possible to use the same descriptor in different threads to -perform independent conversions. Within the data structures associated -with the descriptor there is information about the conversion state. +perform independent conversions. The data structures associated +with the descriptor include information about the conversion state. This must not be messed up by using it in different conversions. An @code{iconv} descriptor is like a file descriptor as for every use a @@ -1649,16 +1650,16 @@ of the conversions from @var{fromset} to The GNU C library implementation of @code{iconv_open} has one significant extension to other implementations. To ease the extension -of the set of available conversions the implementation allows storing -the necessary files with data and code in arbitrarily many directories. -How this extension has to be written will be explained below +of the set of available conversions, the implementation allows storing +the necessary files with data and code in an arbitrary number of +directories. How this extension must be written will be explained below (@pxref{glibc iconv Implementation}). Here it is only important to say that all directories mentioned in the @code{GCONV_PATH} environment -variable are considered if they contain a file @file{gconv-modules}. +variable are considered only if they contain a file @file{gconv-modules}. These directories need not necessarily be created by the system administrator. In fact, this extension is introduced to help users -writing and using their own, new conversions. Of course this does not work -for security reasons in SUID binaries; in this case only the system +writing and using their own, new conversions. Of course, this does not +work for security reasons in SUID binaries; in this case only the system directory is considered and this normally is @file{@var{prefix}/lib/gconv}. The @code{GCONV_PATH} environment variable is examined exactly once at the first call of the @@ -1666,15 +1667,15 @@ variable is examined exactly once at the effect. @pindex iconv.h -This function got introduced early in the X/Open Portability Guide, -@w{version 2}. It is supported by all commercial Unices as it is -required for the Unix branding. However, the quality and completeness -of the implementation varies widely. The function is declared in -@file{iconv.h}. +The @code{iconv_open} function was introduced early in the X/Open +Portability Guide, @w{version 2}. It is supported by all commercial +Unices as it is required for the Unix branding. However, the quality and +completeness of the implementation varies widely. The @code{iconv_open} +function is declared in @file{iconv.h}. @end deftypefun The @code{iconv} implementation can associate large data structure with -the handle returned by @code{iconv_open}. Therefore it is crucial to +the handle returned by @code{iconv_open}. Therefore, it is crucial to free all the resources once all conversions are carried out and the conversion is not needed anymore. @@ -1682,7 +1683,7 @@ conversion is not needed anymore. @comment XPG2 @deftypefun int iconv_close (iconv_t @var{cd}) The @code{iconv_close} function frees all resources associated with the -handle @var{cd} which must have been returned by a successful call to +handle @var{cd}, which must have been returned by a successful call to the @code{iconv_open} function. If the function call was successful the return value is @math{0}. @@ -1695,12 +1696,12 @@ The conversion descriptor is invalid. @end table @pindex iconv.h -This function was introduced together with the rest of the @code{iconv} -functions in XPG2 and it is declared in @file{iconv.h}. +The @code{iconv_close} function was introduced together with the rest +of the @code{iconv} functions in XPG2 and is declared in @file{iconv.h}. @end deftypefun -The standard defines only one actual conversion function. This has -therefore the most general interface: it allows conversion from one +The standard defines only one actual conversion function. This has, +therefore, the most general interface: it allows conversion from one buffer to another. Conversion from a file to a buffer, vice versa, or even file to file can be implemented on top of it. @@ -1726,55 +1727,55 @@ The output buffer is specified in a simi points to the beginning of the buffer with at least @code{*@var{outbytesleft}} bytes room for the result. The buffer pointer again is of type @code{char} and the length is measured in -bytes. If @var{outbuf} or @code{*@var{outbuf}} is a null pointer the +bytes. If @var{outbuf} or @code{*@var{outbuf}} is a null pointer, the conversion is performed but no output is available. -If @var{inbuf} is a null pointer the @code{iconv} function performs the +If @var{inbuf} is a null pointer, the @code{iconv} function performs the necessary action to put the state of the conversion into the initial state. This is obviously a no-op for non-stateful encodings, but if the -encoding has a state such a function call might put some byte sequences -in the output buffer which perform the necessary state changes. The +encoding has a state, such a function call might put some byte sequences +in the output buffer, which perform the necessary state changes. The next call with @var{inbuf} not being a null pointer then simply goes on from the initial state. It is important that the programmer never makes -any assumption on whether the conversion has to deal with states or not. -Even if the input and output character sets are not stateful the +any assumption as to whether the conversion has to deal with states. +Even if the input and output character sets are not stateful, the implementation might still have to keep states. This is due to the implementation chosen for the GNU C library as it is described below. Therefore an @code{iconv} call to reset the state should always be performed if some protocol requires this for the output text. -The conversion stops for three reasons. The first is that all +The conversion stops for one of three reasons. The first is that all characters from the input buffer are converted. This actually can mean -two things: really all bytes from the input buffer are consumed or -there are some bytes at the end of the buffer which possibly can form a +two things: either all bytes from the input buffer are consumed or +there are some bytes at the end of the buffer that possibly can form a complete character but the input is incomplete. The second reason for a -stop is when the output buffer is full. And the third reason is that +stop is that the output buffer is full. And the third reason is that the input contains invalid characters. -In all these cases the buffer pointers after the last successful +In all of these cases the buffer pointers after the last successful conversion, for input and output buffer, are stored in @var{inbuf} and -@var{outbuf} and the available room in each buffer is stored in +@var{outbuf}, and the available room in each buffer is stored in @var{inbytesleft} and @var{outbytesleft}. Since the character sets selected in the @code{iconv_open} call can be -almost arbitrary there can be situations where the input buffer contains -valid characters which have no identical representation in the output +almost arbitrary, there can be situations where the input buffer contains +valid characters, which have no identical representation in the output character set. The behavior in this situation is undefined. The @emph{current} behavior of the GNU C library in this situation is to return with an error immediately. This certainly is not the most -desirable solution. Therefore future versions will provide better ones +desirable solution; therefore, future versions will provide better ones, but they are not yet finished. If all input from the input buffer is successfully converted and stored -in the output buffer the function returns the number of non-reversible +in the output buffer, the function returns the number of non-reversible conversions performed. In all other cases the return value is -@code{(size_t) -1} and @code{errno} is set appropriately. In this case +@code{(size_t) -1} and @code{errno} is set appropriately. In such cases the value pointed to by @var{inbytesleft} is nonzero. @table @code @item EILSEQ The conversion stopped because of an invalid byte sequence in the input. -After the call @code{*@var{inbuf}} points at the first byte of the +After the call, @code{*@var{inbuf}} points at the first byte of the invalid byte sequence. @item E2BIG @@ -1789,27 +1790,26 @@ The @var{cd} argument is invalid. @end table @pindex iconv.h -This function was introduced in the XPG2 standard and is declared in the -@file{iconv.h} header. +The @code{iconv} function was introduced in the XPG2 standard and is +declared in the @file{iconv.h} header. @end deftypefun The definition of the @code{iconv} function is quite good overall. It provides quite flexible functionality. The only problems lie in the -boundary cases which are incomplete byte sequences at the end of the +boundary cases, which are incomplete byte sequences at the end of the input buffer and invalid input. A third problem, which is not really a design problem, is the way conversions are selected. The standard does not say anything about the legitimate names, a minimal set of available conversions. We will see how this negatively impacts other -implementations, as is demonstrated below. - +implementations, as demonstrated below. @node iconv Examples @subsection A complete @code{iconv} example The example below features a solution for a common problem. Given that one knows the internal encoding used by the system for @code{wchar_t} -strings one often is in the position to read text from a file and store -it in wide character buffers. One can do this using @code{mbsrtowcs} +strings, one often is in the position to read text from a file and store +it in wide character buffers. One can do this using @code{mbsrtowcs}, but then we run into the problems discussed above. @smallexample @@ -1904,38 +1904,36 @@ functions. It shows how successive call convert large amounts of text. The user does not have to care about stateful encodings as the functions take care of everything. -An interesting point is the case where @code{iconv} return an error and -@code{errno} is set to @code{EINVAL}. This is not really an error in -the transformation. It can happen whenever the input character set -contains byte sequences of more than one byte for some character and -texts are not processed in one piece. In this case there is a chance -that a multibyte sequence is cut. The caller than can simply read the -remainder of the takes and feed the offending bytes together with new -character from the input to @code{iconv} and continue the work. The -internal state kept in the descriptor is @emph{not} unspecified after -such an event as it is the case with the conversion functions from the -@w{ISO C} standard. +An interesting point is the case where @code{iconv} returns an error and +@code{errno} is set to @code{EINVAL}. This is not really an error in the +transformation. It can happen whenever the input character set contains +byte sequences of more than one byte for some character and texts are not +processed in one piece. In this case there is a chance that a multibyte +sequence is cut. The caller can then simply read the remainder of the +takes and feed the offending bytes together with new character from the +input to @code{iconv} and continue the work. The internal state kept in +the descriptor is @emph{not} unspecified after such an event as is the +case with the conversion functions from the @w{ISO C} standard. The example also shows the problem of using wide character strings with @code{iconv}. As explained in the description of the @code{iconv} -function above the function always takes a pointer to a @code{char} -array and the available space is measured in bytes. In the example the -output buffer is a wide character buffer. Therefore we use a local -variable @var{wrptr} of type @code{char *} which is used in the +function above, the function always takes a pointer to a @code{char} +array and the available space is measured in bytes. In the example, the +output buffer is a wide character buffer; therefore, we use a local +variable @var{wrptr} of type @code{char *}, which is used in the @code{iconv} calls. -This looks rather innocent but can lead to problems on platforms which -have tight restriction on alignment. Therefore the caller of -@code{iconv} has to make sure that the pointers passed are suitable for -access of characters from the appropriate character set. Since in the -above case the input parameter to the function is a @code{wchar_t} -pointer this is the case (unless the user violates alignment when +This looks rather innocent but can lead to problems on platforms that +have tight restriction on alignment. Therefore the caller of @code{iconv} +has to make sure that the pointers passed are suitable for access of +characters from the appropriate character set. Since, in the +above case, the input parameter to the function is a @code{wchar_t} +pointer, this is the case (unless the user violates alignment when computing the parameter). But in other situations, especially when writing generic functions where one does not know what type of character -set one uses and therefore treats text as a sequence of bytes, it might +set one uses and, therefore, treats text as a sequence of bytes, it might become tricky. - @node Other iconv Implementations @subsection Some Details about other @code{iconv} Implementations @@ -1944,28 +1942,28 @@ of other systems but it is necessary to portable programs. The above mentioned problems with the specification of the @code{iconv} functions can lead to portability issues. -The first thing to notice is that due to the large number of character -sets in use it is certainly not practical to encode the conversions -directly in the C library. Therefore the conversion information must +The first thing to notice is that, due to the large number of character +sets in use, it is certainly not practical to encode the conversions +directly in the C library. Therefore, the conversion information must come from files outside the C library. This is usually done in one or both of the following ways: @itemize @bullet @item -The C library contains a set of generic conversion functions which can +The C library contains a set of generic conversion functions that can read the needed conversion tables and other information from data files. These files get loaded when necessary. This solution is problematic as it requires a great deal of effort to apply to all character sets (potentially an infinite set). The differences in the structure of the different character sets is so large -that many different variants of the table processing functions must be -developed. On top of this the generic nature of these functions make -them slower than specifically implemented functions. +that many different variants of the table-processing functions must be +developed. In addition, the generic nature of these functions make them +slower than specifically implemented functions. @item -The C library only contains a framework which can dynamically load -object files and execute the therein contained conversion functions. +The C library only contains a framework that can dynamically load +object files and execute the conversion functions contained therein. This solution provides much more flexibility. The C library itself contains only very little code and therefore reduces the general memory @@ -1976,38 +1974,39 @@ dynamic loading must be available. @end itemize Some implementations in commercial Unices implement a mixture of these -these possibilities, the majority only the second solution. Using -loadable modules moves the code out of the library itself and keeps the -door open for extensions and improvements. But this design is also +possibilities; the majority implement only the second solution. Using +loadable modules moves the code out of the library itself and keeps +the door open for extensions and improvements, but this design is also limiting on some platforms since not many platforms support dynamic -loading in statically linked programs. On platforms without his +loading in statically linked programs. On platforms without this capability it is therefore not possible to use this interface in -statically linked programs. The GNU C library has on ELF platforms no -problems with dynamic loading in in these situations and therefore this -point is moot. The danger is that one gets acquainted with this and -forgets about the restrictions on other systems. +statically linked programs. The GNU C library has, on ELF platforms, no +problems with dynamic loading in these situations; therefore, this +point is moot. The danger is that one gets acquainted with this +situation and forgets about the restrictions on other systems. A second thing to know about other @code{iconv} implementations is that the number of available conversions is often very limited. Some -implementations provide in the standard release (not special -international or developer releases) at most 100 to 200 conversion +implementations provide, in the standard release (not special +international or developer releases), at most 100 to 200 conversion possibilities. This does not mean 200 different character sets are -supported. E.g., conversions from one character set to a set of, say, -10 others counts as 10 conversion. Together with the other direction -this makes already 20. One can imagine the thin coverage these platform -provide. Some Unix vendors even provide only a handful of conversions -which renders them useless for almost all uses. +supported; for example, conversions from one character set to a set of 10 +others might count as 10 conversions. Together with the other direction +this makes 20 conversion possibilities used up by one character set. One +can imagine the thin coverage these platform provide. Some Unix vendors +even provide only a handful of conversions, which renders them useless for +almost all uses. This directly leads to a third and probably the most problematic point. The way the @code{iconv} conversion functions are implemented on all -known Unix system and the availability of the conversion functions from +known Unix systems and the availability of the conversion functions from character set @math{@cal{A}} to @math{@cal{B}} and the conversion from @math{@cal{B}} to @math{@cal{C}} does @emph{not} imply that the conversion from @math{@cal{A}} to @math{@cal{C}} is available. -This might not seem unreasonable and problematic at first but it is a +This might not seem unreasonable and problematic at first, but it is a quite big problem as one will notice shortly after hitting it. To show -the problem we assume to write a program which has to convert from +the problem we assume to write a program that has to convert from @math{@cal{A}} to @math{@cal{C}}. A call like @smallexample @@ -2015,13 +2014,13 @@ cd = iconv_open ("@math{@cal{C}}", "@mat @end smallexample @noindent -does fail according to the assumption above. But what does the program -do now? The conversion is really necessary and therefore simply giving -up is no possibility. +fails according to the assumption above. But what does the program +do now? The conversion is necessary; therefore, simply giving up is not +an option. This is a nuisance. The @code{iconv} function should take care of this. -But how should the program proceed from here on? If it would try to -convert to character set @math{@cal{B}} first the two @code{iconv_open} +But how should the program proceed from here on? If it tries to convert +to character set @math{@cal{B}}, first the two @code{iconv_open} calls @smallexample @@ -2036,25 +2035,24 @@ cd2 = iconv_open ("@math{@cal{C}}", "@ma @end smallexample @noindent -will succeed but how to find @math{@cal{B}}? +will succeed, but how to find @math{@cal{B}}? Unfortunately, the answer is: there is no general solution. On some systems guessing might help. On those systems most character sets can -convert to and from UTF-8 encoded @w{ISO 10646} or Unicode text. -Beside this only some very system-specific methods can help. Since the +convert to and from UTF-8 encoded @w{ISO 10646} or Unicode text. Beside +this only some very system-specific methods can help. Since the conversion functions come from loadable modules and these modules must be stored somewhere in the filesystem, one @emph{could} try to find them and determine from the available file which conversions are available and whether there is an indirect route from @math{@cal{A}} to @math{@cal{C}}. -This shows one of the design errors of @code{iconv} mentioned above. It -should at least be possible to determine the list of available -conversion programmatically so that if @code{iconv_open} says there is -no such conversion, one could make sure this also is true for indirect +This example shows one of the design errors of @code{iconv} mentioned +above. It should at least be possible to determine the list of available +conversion programmatically so that if @code{iconv_open} says there is no +such conversion, one could make sure this also is true for indirect routes. - @node glibc iconv Implementation @subsection The @code{iconv} Implementation in the GNU C library @@ -2073,51 +2071,50 @@ trivial conversions. All the benefits of loadable modules are available in the GNU C library implementation. This is especially appealing since the interface is -well documented (see below) and it therefore is easy to write new +well documented (see below), and it, therefore, is easy to write new conversion modules. The drawback of using loadable objects is not a problem in the GNU C library, at least on ELF systems. Since the library is able to load shared objects even in statically linked -binaries this means that static linking needs not to be forbidden in -case one wants to use @code{iconv}. +binaries, static linking need not be forbidden in case one wants to use +@code{iconv}. The second mentioned problem is the number of supported conversions. Currently, the GNU C library supports more than 150 character sets. The way the implementation is designed the number of supported conversions is greater than 22350 (@math{150} times @math{149}). If any conversion -from or to a character set is missing it can easily be added. +from or to a character set is missing, it can be added easily. Particularly impressive as it may be, this high number is due to the fact that the GNU C library implementation of @code{iconv} does not have -the third problem mentioned above. I.e., whenever there is a conversion +the third problem mentioned above (i.e., whenever there is a conversion from a character set @math{@cal{A}} to @math{@cal{B}} and from @math{@cal{B}} to @math{@cal{C}} it is always possible to convert from -@math{@cal{A}} to @math{@cal{C}} directly. If the @code{iconv_open} -returns an error and sets @code{errno} to @code{EINVAL} this really -means there is no known way, directly or indirectly, to perform the -wanted conversion. +@math{@cal{A}} to @math{@cal{C}} directly). If the @code{iconv_open} +returns an error and sets @code{errno} to @code{EINVAL}, there is no +known way, directly or indirectly, to perform the wanted conversion. @cindex triangulation -This is achieved by providing for each character set a conversion from -and to UCS-4 encoded @w{ISO 10646}. Using @w{ISO 10646} as an -intermediate representation it is possible to @dfn{triangulate}, i.e., -converting with an intermediate representation. +Triangulation is achieved by providing for each character set a +conversion from and to UCS-4 encoded @w{ISO 10646}. Using @w{ISO 10646} +as an intermediate representation it is possible to @dfn{triangulate} +(i.e., convert with an intermediate representation). There is no inherent requirement to provide a conversion to @w{ISO -10646} for a new character set and it is also possible to provide other +10646} for a new character set, and it is also possible to provide other conversions where neither source nor destination character set is @w{ISO -10646}. The currently existing set of conversions is simply meant to -cover all conversions which might be of interest. +10646}. The existing set of conversions is simply meant to cover all +conversions that might be of interest. @cindex ISO-2022-JP @cindex EUC-JP All currently available conversions use the triangulation method above, -making conversion run unnecessarily slow. If, e.g., somebody often -needs the conversion from ISO-2022-JP to EUC-JP, a quicker solution +making conversion run unnecessarily slow. If, for example, somebody +often needs the conversion from ISO-2022-JP to EUC-JP, a quicker solution would involve direct conversion between the two character sets, skipping the input to @w{ISO 10646} first. The two character sets of interest are much more similar to each other than to @w{ISO 10646}. -In such a situation one can easy write a new conversion and provide it +In such a situation one easily can write a new conversion and provide it as a better alternative. The GNU C library @code{iconv} implementation would automatically use the module implementing the conversion if it is specified to be more efficient. @@ -2125,53 +2122,53 @@ specified to be more efficient. @subsubsection Format of @file{gconv-modules} files All information about the available conversions comes from a file named -@file{gconv-modules} which can be found in any of the directories along +@file{gconv-modules}, which can be found in any of the directories along the @code{GCONV_PATH}. The @file{gconv-modules} files are line-oriented text files, where each of the lines has one of the following formats: @itemize @bullet @item -If the first non-whitespace character is a @kbd{#} the line contains -only comments and is ignored. +If the first non-whitespace character is a @kbd{#} the line contains only +comments and is ignored. @item Lines starting with @code{alias} define an alias name for a character -set. There are two more words expected on the line. The first one -defines the alias name and the second defines the original name of the +set. Two more words are expected on the line. The first word +defines the alias name, and the second defines the original name of the character set. The effect is that it is possible to use the alias name in the @var{fromset} or @var{toset} parameters of @code{iconv_open} and achieve the same result as when using the real character set name. This is quite important as a character set has often many different -names. There is normally always an official name but this need not -correspond to the most popular name. Beside this many character sets -have special names which are somehow constructed. E.g., all character -sets specified by the ISO have an alias of the form -@code{ISO-IR-@var{nnn}} where @var{nnn} is the registration number. -This allows programs which know about the registration number to -construct character set names and use them in @code{iconv_open} calls. -More on the available names and aliases follows below. +names. There is normally an official name but this need not correspond to +the most popular name. Beside this many character sets have special +names that are somehow constructed. For example, all character sets +specified by the ISO have an alias of the form @code{ISO-IR-@var{nnn}} +where @var{nnn} is the registration number. This allows programs that +know about the registration number to construct character set names and +use them in @code{iconv_open} calls. More on the available names and +aliases follows below. @item Lines starting with @code{module} introduce an available conversion module. These lines must contain three or four more words. The first word specifies the source character set, the second word the -destination character set of conversion implemented in this module. The -third word is the name of the loadable module. The filename is +destination character set of conversion implemented in this module, and +the third word is the name of the loadable module. The filename is constructed by appending the usual shared object suffix (normally @file{.so}) and this file is then supposed to be found in the same -directory the @file{gconv-modules} file is in. The last word on the -line, which is optional, is a numeric value representing the cost of the -conversion. If this word is missing a cost of @math{1} is assumed. The +directory the @file{gconv-modules} file is in. The last word on the line, +which is optional, is a numeric value representing the cost of the +conversion. If this word is missing, a cost of @math{1} is assumed. The numeric value itself does not matter that much; what counts are the relative values of the sums of costs for all possible conversion paths. Below is a more precise description of the use of the cost value. @end itemize Returning to the example above where one has written a module to directly -convert from ISO-2022-JP to EUC-JP and back. All what has to be done is -to put the new module, be its name ISO2022JP-EUCJP.so, in a directory +convert from ISO-2022-JP to EUC-JP and back. All that has to be done is +to put the new module, let its name be ISO2022JP-EUCJP.so, in a directory and add a file @file{gconv-modules} with the following content in the same directory: @@ -2186,7 +2183,7 @@ selected. The approach to this problem At the first call of the @code{iconv_open} function the program reads all available @file{gconv-modules} files and builds up two tables: one -containing all the known aliases and another which contains the +containing all the known aliases and another that contains the information about the conversions and which shared object implements them. @@ -2196,7 +2193,7 @@ The set of available conversions form a edges. The weights on the edges are the costs specified in the @file{gconv-modules} files. The @code{iconv_open} function uses an algorithm suitable for search for the best path in such a graph and so -constructs a list of conversions which must be performed in succession +constructs a list of conversions that must be performed in succession to get the transformation from the source to the destination character set. @@ -2205,15 +2202,15 @@ Explaining why the above @file{gconv-mod EUC-JP conversion module instead of the conversion coming with the library itself is straightforward. Since the latter conversion takes two steps (from ISO-2022-JP to @w{ISO 10646} and then from @w{ISO 10646} to -EUC-JP) the cost is @math{1+1 = 2}. But the above @file{gconv-modules} -file specifies that the new conversion modules can perform this +EUC-JP), the cost is @math{1+1 = 2}. The above @file{gconv-modules} +file, however, specifies that the new conversion modules can perform this conversion with only the cost of @math{1}. -A mysterious piece about the @file{gconv-modules} file above (and also +A mysterious item about the @file{gconv-modules} file above (and also the file coming with the GNU C library) are the names of the character sets specified in the @code{module} lines. Why do almost all the names end in @code{//}? And this is not all: the names can actually be -regular expressions. At this point of time this mystery should not be +regular expressions. At this point in time this mystery should not be revealed, unless you have the relevant spell-casting materials: ashes from an original @w{DOS 6.2} boot disk burnt in effigy, a crucifix blessed by St.@: Emacs, assorted herbal roots from Central America, sand @@ -2222,43 +2219,43 @@ this is used is not yet finished. For n existing examples. It'll become clearer once it is. --drepper} A last remark about the @file{gconv-modules} is about the names not -ending with @code{//}. There often is a character set named -@code{INTERNAL} mentioned. From the discussion above and the chosen -name it should have become clear that this is the name for the -representation used in the intermediate step of the triangulation. We -have said that this is UCS-4 but actually it is not quite right. The -UCS-4 specification also includes the specification of the byte ordering -used. Since a UCS-4 value consists of four bytes a stored value is -effected by byte ordering. The internal representation is @emph{not} -the same as UCS-4 in case the byte ordering of the processor (or at least -the running process) is not the same as the one required for UCS-4. This -is done for performance reasons as one does not want to perform -unnecessary byte-swapping operations if one is not interested in actually -seeing the result in UCS-4. To avoid trouble with endianess the internal -representation consistently is named @code{INTERNAL} even on big-endian -systems where the representations are identical. +ending with @code{//}. A character set named @code{INTERNAL} is often +mentioned. From the discussion above and the chosen name it should have +become clear that this is the name for the representation used in the +intermediate step of the triangulation. We have said that this is UCS-4 +but actually that is not quite right. The UCS-4 specification also +includes the specification of the byte ordering used. Since a UCS-4 value +consists of four bytes, a stored value is effected by byte ordering. The +internal representation is @emph{not} the same as UCS-4 in case the byte +ordering of the processor (or at least the running process) is not the +same as the one required for UCS-4. This is done for performance reasons +as one does not want to perform unnecessary byte-swapping operations if +one is not interested in actually seeing the result in UCS-4. To avoid +trouble with endianess, the internal representation consistently is named +@code{INTERNAL} even on big-endian systems where the representations are +identical. @subsubsection @code{iconv} module data structures -So far this section described how modules are located and considered to -be used. What remains to be described is the interface of the modules -so that one can write new ones. This section describes the interface as -it is in use in January 1999. The interface will change in future a bit -but hopefully only in an upward compatible way. +So far this section has described how modules are located and considered +to be used. What remains to be described is the interface of the modules +so that one can write new ones. This section describes the interface as +it is in use in January 1999. The interface will change a bit in the +future but, with luck, only in an upwardly compatible way. The definitions necessary to write new modules are publicly available -in the non-standard header @file{gconv.h}. The following text will -therefore describe the definitions from this header file. But first it -is necessary to get an overview. +in the non-standard header @file{gconv.h}. The following text, +therefore, describes the definitions from this header file. First, +however, it is necessary to get an overview. From the perspective of the user of @code{iconv} the interface is quite -simple: the @code{iconv_open} function returns a handle which can be -used in calls to @code{iconv} and finally the handle is freed with a call -to @code{iconv_close}. The problem is: the handle has to be able to +simple: the @code{iconv_open} function returns a handle that can be used +in calls to @code{iconv}, and finally the handle is freed with a call to +@code{iconv_close}. The problem is that the handle has to be able to represent the possibly long sequences of conversion steps and also the -state of each conversion since the handle is all which is passed to the -@code{iconv} function. Therefore the data structures are really the -elements to understanding the implementation. +state of each conversion since the handle is all that is passed to the +@code{iconv} function. Therefore, the data structures are really the +elements necessary to understanding the implementation. We need two different kinds of data structures. The first describes the conversion and the second describes the state etc. There are really two @@ -2271,9 +2268,9 @@ type definitions like this in @file{gcon This data structure describes one conversion a module can perform. For each function in a loaded module with conversion functions there is exactly one object of this type. This object is shared by all users of -the conversion. I.e., this object does not contain any information -corresponding to an actual conversion. It only describes the conversion -itself. +the conversion (i.e., this object does not contain any information +corresponding to an actual conversion; it only describes the conversion +itself). @table @code @item struct __gconv_loaded_object *__shlib_handle @@ -2281,14 +2278,14 @@ itself. @itemx int __counter All these elements of the structure are used internally in the C library to coordinate loading and unloading the shared. One must not expect any -of the other elements be available or initialized. +of the other elements to be available or initialized. @item const char *__from_name @itemx const char *__to_name @code{__from_name} and @code{__to_name} contain the names of the source and destination character sets. They can be used to identify the actual -conversion to be carried out since one module might implement -conversions for more than one character set and/or direction. +conversion to be carried out since one module might implement conversions +for more than one character set and/or direction. @item gconv_fct __fct @itemx gconv_init_fct __init_fct @@ -2300,30 +2297,31 @@ The interface will be explained below. @itemx int __max_needed_from @itemx int __min_needed_to @itemx int __max_needed_to; -These values have to be filled in the init function of the module. The +These values have to be supplied in the init function of the module. The @code{__min_needed_from} value specifies how many bytes a character of the source character set at least needs. The @code{__max_needed_from} -specifies the maximum value which also includes possible shift -sequences. +specifies the maximum value that also includes possible shift sequences. The @code{__min_needed_to} and @code{__max_needed_to} values serve the -same purpose but this time for the destination character set. +same purpose as @code{__min_needed_from} and @code{__max_needed_from} but +this time for the destination character set. -It is crucial that these values are accurate since otherwise the +It is crucial that these values be accurate since otherwise the conversion functions will have problems or not work at all. @item int __stateful -This element must also be initialized by the init function. It is -nonzero if the source character set is stateful. Otherwise it is zero. +This element must also be initialized by the init function. +@code{int __stateful} is nonzero if the source character set is stateful. +Otherwise it is zero. @item void *__data This element can be used freely by the conversion functions in the -module. It can be used to communicate extra information from one call -to another. It need not be initialized if not needed at all. If this -element gets assigned a pointer to dynamically allocated memory -(presumably in the init function) it has to be made sure that the end -function deallocates the memory. Otherwise the application will leak -memory. +module. @code{void *__data} can be used to communicate extra information +from one call to another. @code{void *__data} need not be initialized if +not needed at all. If @code{void *__data} element is assigned a pointer +to dynamically allocated memory (presumably in the init function) it has +to be made sure that the end function deallocates the memory. Otherwise +the application will leak memory. It is important to be aware that this data structure is shared by all users of this specification conversion and therefore the @code{__data} @@ -2335,23 +2333,24 @@ conversion function. @comment gconv.h @comment GNU @deftp {Data type} {struct __gconv_step_data} -This is the data structure which contains the information specific to +This is the data structure that contains the information specific to each use of the conversion functions. + @table @code @item char *__outbuf @itemx char *__outbufend These elements specify the output buffer for the conversion step. The -@code{__outbuf} element points to the beginning of the buffer and +@code{__outbuf} element points to the beginning of the buffer, and @code{__outbufend} points to the byte following the last byte in the buffer. The conversion function must not assume anything about the size of the buffer but it can be safely assumed the there is room for at least one complete character in the output buffer. -Once the conversion is finished and the conversion is the last step the -@code{__outbuf} element must be modified to point after last last byte +Once the conversion is finished, if the conversion is the last step, the +@code{__outbuf} element must be modified to point after the last byte written into the buffer to signal how much output is available. If this -conversion step is not the last one the element must not be modified. +conversion step is not the last one, the element must not be modified. The @code{__outbufend} element must not be modified. @item int __is_last @@ -2362,34 +2361,35 @@ modified. @item int __invocation_counter The conversion function can use this element to see how many calls of -the conversion function already happened. Some character sets require -when generating output a certain prolog and by comparing this value with -zero one can find out whether it is the first call and therefore the -prolog should be emitted or not. This element must never be modified. +the conversion function already happened. Some character sets require a +certain prolog when generating output, and by comparing this value with +zero, one can find out whether it is the first call and whether, +therefore, the prolog should be emitted. This element must never be +modified. @item int __internal_use This element is another one rarely used but needed in certain -situations. It got assigned a nonzero value in case the conversion -functions are used to implement @code{mbsrtowcs} et.al. I.e., the -function is not used directly through the @code{iconv} interface. +situations. It is assigned a nonzero value in case the conversion +functions are used to implement @code{mbsrtowcs} et.al.@: (i.e., the +function is not used directly through the @code{iconv} interface). This sometimes makes a difference as it is expected that the @code{iconv} functions are used to translate entire texts while the -@code{mbsrtowcs} functions are normally only used to convert single +@code{mbsrtowcs} functions are normally used only to convert single strings and might be used multiple times to convert entire texts. But in this situation we would have problem complying with some rules of -the character set specification. Some character sets require a prolog +the character set specification. Some character sets require a prolog, which must appear exactly once for an entire text. If a number of -@code{mbsrtowcs} calls are used to convert the text only the first call -must add the prolog. But since there is no communication between the -different calls of @code{mbsrtowcs} the conversion functions have no +@code{mbsrtowcs} calls are used to convert the text, only the first call +must add the prolog. However, because there is no communication between the +different calls of @code{mbsrtowcs}, the conversion functions have no possibility to find this out. The situation is different for sequences of @code{iconv} calls since the handle allows access to the needed information. -This element is mostly used together with @code{__invocation_counter} in -a way like this: +The @code{int __internal_use} element is mostly used together with +@code{__invocation_counter} as follows: @smallexample if (!data->__internal_use @@ -2402,13 +2402,13 @@ This element must never be modified. @item mbstate_t *__statep The @code{__statep} element points to an object of type @code{mbstate_t} -(@pxref{Keeping the state}). The conversion of an stateful character -set must use the object pointed to by this element to store information -about the conversion state. The @code{__statep} element itself must -never be modified. +(@pxref{Keeping the state}). The conversion of a stateful character +set must use the object pointed to by @code{__statep} to store +information about the conversion state. The @code{__statep} element +itself must never be modified. @item mbstate_t __state -This element @emph{never} must be used directly. It is only part of +This element must @emph{never} be used directly. It is only part of this structure to have the needed space allocated. @end table @end deftp @@ -2416,39 +2416,39 @@ this structure to have the needed space @subsubsection @code{iconv} module interfaces With the knowledge about the data structures we now can describe the -conversion functions itself. To understand the interface a bit of -knowledge about the functionality in the C library which loads the -objects with the conversions is necessary. +conversion function itself. To understand the interface a bit of +knowledge is necessary about the functionality in the C library that +loads the objects with the conversions. -It is often the case that one conversion is used more than once. I.e., +It is often the case that one conversion is used more than once (i.e., there are several @code{iconv_open} calls for the same set of character -sets during one program run. The @code{mbsrtowcs} et.al.@: functions in -the GNU C library also use the @code{iconv} functionality which +sets during one program run). The @code{mbsrtowcs} et.al.@: functions in +the GNU C library also use the @code{iconv} functionality, which increases the number of uses of the same functions even more. -For this reason the modules do not get loaded exclusively for one -conversion. Instead a module once loaded can be used by arbitrarily many -@code{iconv} or @code{mbsrtowcs} calls at the same time. The splitting -of the information between conversion function specific information and -conversion data makes this possible. The last section showed the two -data structures used to do this. +Because of this multiple use of conversions, the modules do not get +loaded exclusively for one conversion. Instead a module once loaded can +be used by an arbitrary number of @code{iconv} or @code{mbsrtowcs} calls +at the same time. The splitting of the information between conversion- +function-specific information and conversion data makes this possible. +The last section showed the two data structures used to do this. This is of course also reflected in the interface and semantics of the -functions the modules must provide. There are three functions which +functions that the modules must provide. There are three functions that must have the following names: @table @code @item gconv_init The @code{gconv_init} function initializes the conversion function specific data structure. This very same object is shared by all -conversion which use this conversion and therefore no state information +conversions that use this conversion and, therefore, no state information about the conversion itself must be stored in here. If a module -implements more than one conversion the @code{gconv_init} function will be -called multiple times. +implements more than one conversion, the @code{gconv_init} function will +be called multiple times. @item gconv_end -The @code{gconv_end} function is responsible to free all resources -allocated by the @code{gconv_init} function. If there is nothing to do +The @code{gconv_end} function is responsible for freeing all resources +allocated by the @code{gconv_init} function. If there is nothing to do, this function can be missing. Special care must be taken if the module implements more than one conversion and the @code{gconv_init} function does not allocate the same resources for all conversions. @@ -2461,7 +2461,7 @@ this use of the conversion functions. @end table There are three data types defined for the three module interface -function and these define the interface. +functions and these define the interface. @comment gconv.h @comment GNU @@ -2470,7 +2470,7 @@ This specifies the interface of the init module. It is called exactly once for each conversion the module implements. -As explained int the description of the @code{struct __gconv_step} data +As explained in the description of the @code{struct __gconv_step} data structure above the initialization function has to initialize parts of it. @@ -2481,19 +2481,19 @@ it. @itemx __max_needed_to These elements must be initialized to the exact numbers of the minimum and maximum number of bytes used by one character in the source and -destination character set respectively. If the characters all have the -same size the minimum and maximum values are the same. +destination character sets, respectively. If the characters all have the +same size, the minimum and maximum values are the same. @item __stateful This element must be initialized to an nonzero value if the source character set is stateful. Otherwise it must be zero. @end table -If the initialization function needs to communication some information -to the conversion function this can happen using the @code{__data} -element of the @code{__gconv_step} structure. But since this data is -shared by all the conversion is must not be modified by the conversion -function. How this can be used is shown in the example below. +If the initialization function needs to communicate some information +to the conversion function, this communication can happen using the +@code{__data} element of the @code{__gconv_step} structure. But since +this data is shared by all the conversions, it must not be modified by +the conversion function. The example below shows how this can be used. @smallexample #define MIN_NEEDED_FROM 1 @@ -2545,12 +2545,12 @@ gconv_init (struct __gconv_step *step) step->__data = new_data; if (dir == from_iso2022jp) - @{ + @{ step->__min_needed_from = MIN_NEEDED_FROM; step->__max_needed_from = MAX_NEEDED_FROM; step->__min_needed_to = MIN_NEEDED_TO; step->__max_needed_to = MAX_NEEDED_TO; - @} + @} else @{ step->__min_needed_from = MIN_NEEDED_TO; @@ -2571,15 +2571,16 @@ gconv_init (struct __gconv_step *step) @end smallexample The function first checks which conversion is wanted. The module from -which this function is taken implements four different conversion and +which this function is taken implements four different conversions; which one is selected can be determined by comparing the names. The comparison should always be done without paying attention to the case. -Then a data structure is allocated which contains the necessary -information about which conversion is selected. The data structure -@code{struct iso2022jp_data} is locally defined since outside the module -this data is not used at all. Please note that if all four conversions -this modules supports are requested there are four data blocks. +Next, a data structure, which contains the necessary information about +which conversion is selected, is allocated. The data structure +@code{struct iso2022jp_data} is locally defined since, outside the +module, this data is not used at all. Please note that if all four +conversions this modules supports are requested there are four data +blocks. One interesting thing is the initialization of the @code{__min_} and @code{__max_} elements of the step data object. A single ISO-2022-JP @@ -2593,14 +2594,14 @@ sets. Therefore the @code{__max_needed_ gets assigned @code{MAX_NEEDED_FROM + 2}. This takes into account the two bytes needed for the escape sequences to single the switching. The asymmetry in the maximum values for the two directions can be explained -easily: when reading ISO-2022-JP text escape sequences can be handled -alone. I.e., it is not necessary to process a real character since the -effect of the escape sequence can be recorded in the state information. +easily: when reading ISO-2022-JP text, escape sequences can be handled +alone (i.e., it is not necessary to process a real character since the +effect of the escape sequence can be recorded in the state information). The situation is different for the other direction. Since it is in -general not known which character comes next one cannot emit escape +general not known which character comes next, one cannot emit escape sequences to change the state in advance. This means the escape -sequences which have to be emitted together with the next character. -Therefore one needs more room then only for the character itself. +sequences that have to be emitted together with the next character. +Therefore one needs more room than only for the character itself. The possible return values of the initialization function are: @@ -2615,14 +2616,14 @@ Memory required to store additional info @end table @end deftypevr -The functions called before the module is unloaded is significantly -easier. It often has nothing at all to do in which case it can be left +The function called before the module is unloaded is significantly +easier. It often has nothing at all to do; in which case it can be left out completely. @comment gconv.h @comment GNU @deftypevr {Data type} void {(*__gconv_end_fct)} (struct gconv_step *) -The task of this function is it to free all resources allocated in the +The task of this function is to free all resources allocated in the initialization function. Therefore only the @code{__data} element of the object pointed to by the argument is of interest. Continuing the example from the initialization function, the finalization function @@ -2637,9 +2638,9 @@ gconv_end (struct __gconv_step *data) @end smallexample @end deftypevr -The most important function is the conversion function itself. It can +The most important function is the conversion function itself, which can get quite complicated for complex character sets. But since this is not -of interest here we will only describe a possible skeleton for the +of interest here, we will only describe a possible skeleton for the conversion function. @comment gconv.h @@ -2648,55 +2649,55 @@ conversion function. The conversion function can be called for two basic reason: to convert text or to reset the state. From the description of the @code{iconv} function it can be seen why the flushing mode is necessary. What mode -is selected is determined by the sixth argument, an integer. If it is -nonzero it means that flushing is selected. +is selected is determined by the sixth argument, an integer. This +argument being nonzero means that flushing is selected. -Common to both mode is where the output buffer can be found. The +Common to both modes is where the output buffer can be found. The information about this buffer is stored in the conversion step data. A -pointer to this is passed as the second argument to this function. The -description of the @code{struct __gconv_step_data} structure has more -information on this. +pointer to this information is passed as the second argument to this +function. The description of the @code{struct __gconv_step_data} +structure has more information on the conversion step data. @cindex stateful What has to be done for flushing depends on the source character set. -If it is not stateful nothing has to be done. Otherwise the function -has to emit a byte sequence to bring the state object in the initial -state. Once this all happened the other conversion modules in the chain -of conversions have to get the same chance. Whether another step -follows can be determined from the @code{__is_last} element of the step -data structure to which the first parameter points. +If the source character set is not stateful, nothing has to be done. +Otherwise the function has to emit a byte sequence to bring the state +object into the initial state. Once this all happened the other +conversion modules in the chain of conversions have to get the same +chance. Whether another step follows can be determined from the +@code{__is_last} element of the step data structure to which the first +parameter points. -The more interesting mode is when actually text has to be converted. -The first step in this case is to convert as much text as possible from -the input buffer and store the result in the output buffer. The start -of the input buffer is determined by the third argument which is a -pointer to a pointer variable referencing the beginning of the buffer. -The fourth argument is a pointer to the byte right after the last byte -in the buffer. +The more interesting mode is when actual text has to be converted. The +first step in this case is to convert as much text as possible from the +input buffer and store the result in the output buffer. The start of the +input buffer is determined by the third argument, which is a pointer to a +pointer variable referencing the beginning of the buffer. The fourth +argument is a pointer to the byte right after the last byte in the buffer. The conversion has to be performed according to the current state if the character set is stateful. The state is stored in an object pointed to by the @code{__statep} element of the step data (second argument). Once either the input buffer is empty or the output buffer is full the -conversion stops. At this point the pointer variable referenced by the +conversion stops. At this point, the pointer variable referenced by the third parameter must point to the byte following the last processed -byte. I.e., if all of the input is consumed this pointer and the fourth -parameter have the same value. +byte (i.e., if all of the input is consumed, this pointer and the fourth +parameter have the same value). -What now happens depends on whether this step is the last one or not. -If it is the last step the only thing which has to be done is to update -the @code{__outbuf} element of the step data structure to point after the -last written byte. This gives the caller the information on how much -text is available in the output buffer. Beside this the variable +What now happens depends on whether this step is the last one. If it is +the last step, the only thing that has to be done is to update the +@code{__outbuf} element of the step data structure to point after the +last written byte. This update gives the caller the information on how +much text is available in the output buffer. In addition, the variable pointed to by the fifth parameter, which is of type @code{size_t}, must -be incremented by the number of characters (@emph{not bytes}) which were -converted in a non-reversible way. Then the function can return. +be incremented by the number of characters (@emph{not bytes}) that were +converted in a non-reversible way. Then, the function can return. -In case the step is not the last one the later conversion functions have -to get a chance to do their work. Therefore the appropriate conversion +In case the step is not the last one, the later conversion functions have +to get a chance to do their work. Therefore, the appropriate conversion function has to be called. The information about the functions is stored in the conversion data structures, passed as the first parameter. -This information and the step data are stored in arrays so the next +This information and the step data are stored in arrays, so the next element in both cases can be found by simple pointer arithmetic: @smallexample @@ -2720,41 +2721,41 @@ therefore will look similar to this: @end smallexample But this is not yet all. Once the function call returns the conversion -function might have some more to do. If the return value of the -function is @code{__GCONV_EMPTY_INPUT} this means there is more room in -the output buffer. Unless the input buffer is empty the conversion -functions start all over again and processes the rest of the input -buffer. If the return value is not @code{__GCONV_EMPTY_INPUT} something -went wrong and we have to recover from this. +function might have some more to do. If the return value of the function +is @code{__GCONV_EMPTY_INPUT}, more room is available in the output +buffer. Unless the input buffer is empty the conversion, functions start +all over again and process the rest of the input buffer. If the return +value is not @code{__GCONV_EMPTY_INPUT}, something went wrong and we have +to recover from this. A requirement for the conversion function is that the input buffer -pointer (the third argument) always points to the last character which -was put in the converted form in the output buffer. This is trivially -true after the conversion performed in the current step. But if the -conversion functions deeper down the stream stop prematurely not all -characters from the output buffer are consumed and therefore the input -buffer pointers must be backed of to the right position. +pointer (the third argument) always point to the last character that +was put in converted form into the output buffer. This is trivially +true after the conversion performed in the current step, but if the +conversion functions deeper downstream stop prematurely, not all +characters from the output buffer are consumed and, therefore, the input +buffer pointers must be backed off to the right position. -This is easy to do if the input and output character sets have a fixed -width for all characters. In this situation we can compute how many -characters are left in the output buffer and therefore can correct the -input buffer pointer appropriate with a similar computation. Things are -getting tricky if either character set has character represented with -variable length byte sequences and it gets even more complicated if the -conversion has to take care of the state. In these cases the conversion -has to be performed once again, from the known state before the initial -conversion. I.e., if necessary the state of the conversion has to be -reset and the conversion loop has to be executed again. The difference -now is that it is known how much input must be created and the -conversion can stop before converting the first unused character. Once -this is done the input buffer pointers must be updated again and the -function can return. +Correcting the input buffers is easy to do if the input and output +character sets have a fixed width for all characters. In this situation +we can compute how many characters are left in the output buffer and, +therefore, can correct the input buffer pointer appropriately with a +similar computation. Things are getting tricky if either character set +has characters represented with variable length byte sequences, and it +gets even more complicated if the conversion has to take care of the +state. In these cases the conversion has to be performed once again, from +the known state before the initial conversion (i.e., if necessary the +state of the conversion has to be reset and the conversion loop has to be +executed again). The difference now is that it is known how much input +must be created, and the conversion can stop before converting the first +unused character. Once this is done the input buffer pointers must be +updated again and the function can return. One final thing should be mentioned. If it is necessary for the conversion to know whether it is the first invocation (in case a prolog -has to be emitted) the conversion function should just before returning -to the caller increment the @code{__invocation_counter} element of the -step data structure. See the description of the @code{struct +has to be emitted), the conversion function should increment the +@code{__invocation_counter} element of the step data structure just +before returning to the caller. See the description of the @code{struct __gconv_step_data} structure above for more information on how this can be used. @@ -2823,7 +2824,7 @@ gconv (struct __gconv_step *step, struct /* @r{Run the conversion loop. @code{status} is set} @r{appropriately afterwards.} */ - /* @r{If this is the last step leave the loop, there is} + /* @r{If this is the last step, leave the loop. There is} @r{nothing we can do.} */ if (data->__is_last) @{ @@ -2837,7 +2838,7 @@ gconv (struct __gconv_step *step, struct break; @} - /* @r{Write out all output which was produced.} */ + /* @r{Write out all output that was produced.} */ if (outbuf > outptr) @{ const char *outerr = data->__outbuf; @@ -2890,3 +2891,5 @@ This information should be sufficient to doing so should also take a look at the available source code in the GNU C library sources. It contains many examples of working and optimized modules. + +@c File charset.texi edited October 2001 by Dennis Grace, IBM Corporation diff -durpN glibc-2.2.4/manual/contrib.texi glibc-2.2.5/manual/contrib.texi --- glibc-2.2.4/manual/contrib.texi Fri Aug 27 18:45:14 1999 +++ glibc-2.2.5/manual/contrib.texi Tue Aug 28 01:05:40 2001 @@ -1,4 +1,4 @@ -@node Contributors, Copying, Maintenance, Top +@node Contributors, Free Manuals, Maintenance, Top @c %MENU% Who wrote what parts of the GNU C library @appendix Contributors to the GNU C Library diff -durpN glibc-2.2.4/manual/dir-add.info glibc-2.2.5/manual/dir-add.info --- glibc-2.2.4/manual/dir-add.info Mon Aug 13 15:03:43 2001 +++ glibc-2.2.5/manual/dir-add.info Tue Jan 8 14:20:46 2002 @@ -683,7 +683,11 @@ START-INFO-DIR-ENTRY * erfcl: (libc)Special Functions. * erff: (libc)Special Functions. * erfl: (libc)Special Functions. +* err: (libc)Error Messages. * errno: (libc)Checking for Errors. +* error: (libc)Error Messages. +* error_at_line: (libc)Error Messages. +* errx: (libc)Error Messages. * execl: (libc)Executing a File. * execle: (libc)Executing a File. * execlp: (libc)Executing a File. @@ -1600,6 +1604,8 @@ START-INFO-DIR-ENTRY * va_start: (libc)Old Varargs. * valloc: (libc)Aligned Memory Blocks. * vasprintf: (libc)Variable Arguments Output. +* verr: (libc)Error Messages. +* verrx: (libc)Error Messages. * versionsort64: (libc)Scanning Directory Content. * versionsort: (libc)Scanning Directory Content. * vfork: (libc)Creating a Process. @@ -1617,12 +1623,16 @@ START-INFO-DIR-ENTRY * vswscanf: (libc)Variable Arguments Input. * vsyslog: (libc)syslog; vsyslog. * vtimes: (libc)Resource Usage. +* vwarn: (libc)Error Messages. +* vwarnx: (libc)Error Messages. * vwprintf: (libc)Variable Arguments Output. * vwscanf: (libc)Variable Arguments Input. * wait3: (libc)BSD Wait Functions. * wait4: (libc)Process Completion. * wait: (libc)Process Completion. * waitpid: (libc)Process Completion. +* warn: (libc)Error Messages. +* warnx: (libc)Error Messages. * wcpcpy: (libc)Copying and Concatenation. * wcpncpy: (libc)Copying and Concatenation. * wcrtomb: (libc)Converting a Character. diff -durpN glibc-2.2.4/manual/errno.texi glibc-2.2.5/manual/errno.texi --- glibc-2.2.4/manual/errno.texi Sun Oct 8 17:05:03 2000 +++ glibc-2.2.5/manual/errno.texi Thu Aug 16 00:42:04 2001 @@ -1272,7 +1272,8 @@ This function @code{strerror_r} is a GNU @comment ISO @deftypefun void perror (const char *@var{message}) This function prints an error message to the stream @code{stderr}; -see @ref{Standard Streams}. +see @ref{Standard Streams}. The orientation of @code{stderr} is not +changed. If you call @code{perror} with a @var{message} that is either a null pointer or an empty string, @code{perror} just prints the error message @@ -1292,9 +1293,8 @@ GNU system, the messages are fairly shor messages or embedded newlines. Each error message begins with a capital letter and does not include any terminating punctuation. -@strong{Compatibility Note:} The @code{strerror} function is a new -feature of @w{ISO C}. Many older C systems do not support this function -yet. +@strong{Compatibility Note:} The @code{strerror} function was introduced +in @w{ISO C89}. Many older C systems do not support this function yet. @cindex program name @cindex name of running program @@ -1367,3 +1367,237 @@ open_sesame (char *name) return stream; @} @end smallexample + +Using @code{perror} has the advantage that the function is portable and +available on all systems implementing @w{ISO C}. But often the text +@code{perror} generates is not what is wanted and there is no way to +extend or change what @code{perror} does. The GNU coding standard, for +instance, requires error messages to be preceded by the program name and +programs which read some input files should should provide information +about the input file name and the line number in case an error is +encountered while reading the file. For these occasions there are two +functions available which are widely used throughout the GNU project. +These functions are declared in @file{error.h}. + +@comment error.h +@comment GNU +@deftypefun void error (int @var{status}, int @var{errnum}, const char *@var{format}, @dots{}) +The @code{error} function can be used to report general problems during +program execution. The @var{format} argument is a format string just +like those given to the @code{printf} family of functions. The +arguments required for the format can follow the @var{format} parameter. +Just like @code{perror}, @code{error} also can report an error code in +textual form. But unlike @code{perror} the error value is explicitly +passed to the function in the @var{errnum} parameter. This elimintates +the problem mentioned above that the error reporting function must be +called immediately after the function causing the error since otherwise +@code{errno} might have a different value. + +The @code{error} prints first the program name. If the application +defined a global variable @code{error_print_progname} and points it to a +function this function will be called to print the program name. +Otherwise the string from the global variable @code{program_name} is +used. The program name is followed by a colon and a space which in turn +is followed by the output produced by the format string. If the +@var{errnum} parameter is non-zero the format string output is followed +by a colon and a space, followed by the error message for the error code +@var{errnum}. In any case is the output terminated with a newline. + +The output is directed to the @code{stderr} stream. If the +@code{stderr} wasn't oriented before the call it will be narrow-oriented +afterwards. + +The function will return unless the @var{status} parameter has a +non-zero value. In this case the function will call @code{exit} with +the @var{status} value for its parameter and therefore never return. If +@code{error} returns the global variable @code{error_message_count} is +incremented by one to keep track of the number of errors reported. +@end deftypefun + +@comment error.h +@comment GNU +@deftypefun void error_at_line (int @var{status}, int @var{errnum}, const char *@var{fname}, unsigned int @var{lineno}, const char *@var{format}, @dots{}) + +The @code{error_at_line} function is very similar to the @code{error} +function. The only difference are the additional parameters @var{fname} +and @var{lineno}. The handling of the other parameters is identical to +that of @code{error} except that between the program name and the string +generated by the format string additional text is inserted. + +Directly following the program name a colon, followed by the file name +pointer to by @var{fname}, another colon, and a value of @var{lineno} is +printed. + +This additional output of course is meant to be used to locate an error +in an input file (like a programming language source code file etc). + +If the global variable @code{error_one_per_line} is set to a non-zero +value @code{error_at_line} will avoid printing consecutive messages for +the same file anem line. Repetition which are not directly following +each other are not caught. + +Just like @code{error} this function only returned if @var{status} is +zero. Otherwise @code{exit} is called with the non-zero value. If +@code{error} returns the global variable @code{error_message_count} is +incremented by one to keep track of the number of errors reported. +@end deftypefun + +As mentioned above the @code{error} and @code{error_at_line} functions +can be customized by defining a variable named +@code{error_print_progname}. + +@comment error.h +@comment GNU +@deftypevar {void (*} error_print_progname ) (void) +If the @code{error_print_progname} variable is defined to a non-zero +value the function pointed to is called by @code{error} or +@code{error_at_line}. It is expected to print the program name or do +something similarly useful. + +The function is expected to be print to the @code{stderr} stream and +must be able to handle whatever orientation the stream has. + +The variable is global and shared by all threads. +@end deftypevar + +@comment error.h +@comment GNU +@deftypevar {unsigned int} error_message_count +The @code{error_message_count} variable is incremented whenever one of +the functions @code{error} or @code{error_at_line} returns. The +variable is global and shared by all threads. +@end deftypevar + +@comment error.h +@comment GNU +@deftypevar int error_one_per_line +The @code{error_one_per_line} variable influences only +@code{error_at_line}. Normally the @code{error_at_line} function +creates output for every invocation. If @code{error_one_per_line} is +set to a non-zero value @code{error_at_line} keeps track of the last +file name and line number for which an error was reported and avoid +directly following messages for the same file and line. This variable +is global and shared by all threads. +@end deftypevar + +@noindent +A program which read some input file and reports errors in it could look +like this: + +@smallexample +@{ + char *line = NULL; + size_t len = 0; + unsigned int lineno = 0; + + error_message_count = 0; + while (! feof_unlocked (fp)) + @{ + ssize_t n = getline (&line, &len, fp); + if (n <= 0) + /* @r{End of file or error.} */ + break; + ++lineno; + + /* @r{Process the line.} */ + @dots{} + + if (@r{Detect error in line}) + error_at_line (0, errval, filename, lineno, + "some error text %s", some_variable); + @} + + if (error_message_count != 0) + error (EXIT_FAILURE, 0, "%u errors found", error_message_count); +@} +@end smallexample + +@code{error} and @code{error_at_line} are clearly the functions of +choice and enable the programmer to write applications which follow the +GNU coding standard. The GNU libc additionally contains functions which +are used in BSD for the same purpose. These functions are declared in +@file{err.h}. It is generally advised to not use these functions. They +are included only for compatibility. + +@comment err.h +@comment BSD +@deftypefun void warn (const char *@var{format}, @dots{}) +The @code{warn} function is roughly equivalent to a call like +@smallexample + error (0, errno, format, @r{the parameters}) +@end smallexample +@noindent +except that the global variables @code{error} respects and modifies +are not used. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void vwarn (const char *@var{format}, va_list) +The @code{vwarn} function is just like @code{warn} except that the +parameters for the handling of the format string @var{format} are passed +in as an value of type @code{va_list}. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void warnx (const char *@var{format}, @dots{}) +The @code{warnx} function is roughly equivalent to a call like +@smallexample + error (0, 0, format, @r{the parameters}) +@end smallexample +@noindent +except that the global variables @code{error} respects and modifies +are not used. The difference to @code{warn} is that no error number +string is printed. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void vwarnx (const char *@var{format}, va_list) +The @code{vwarnx} function is just like @code{warnx} except that the +parameters for the handling of the format string @var{format} are passed +in as an value of type @code{va_list}. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void err (int @var{status}, const char *@var{format}, @dots{}) +The @code{err} function is roughly equivalent to a call like +@smallexample + error (status, errno, format, @r{the parameters}) +@end smallexample +@noindent +except that the global variables @code{error} respects and modifies +are not used and that the program is exited even if @var{status} is zero. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void verr (int @var{status}, const char *@var{format}, va_list) +The @code{verr} function is just like @code{err} except that the +parameters for the handling of the format string @var{format} are passed +in as an value of type @code{va_list}. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void errx (int @var{status}, const char *@var{format}, @dots{}) +The @code{errx} function is roughly equivalent to a call like +@smallexample + error (status, 0, format, @r{the parameters}) +@end smallexample +@noindent +except that the global variables @code{error} respects and modifies +are not used and that the program is exited even if @var{status} +is zero. The difference to @code{err} is that no error number +string is printed. +@end deftypefun + +@comment err.h +@comment BSD +@deftypefun void verrx (int @var{status}, const char *@var{format}, va_list) +The @code{verrx} function is just like @code{errx} except that the +parameters for the handling of the format string @var{format} are passed +in as an value of type @code{va_list}. +@end deftypefun diff -durpN glibc-2.2.4/manual/examples/argp-ex2.c glibc-2.2.5/manual/examples/argp-ex2.c --- glibc-2.2.4/manual/examples/argp-ex2.c Wed Feb 23 13:19:33 2000 +++ glibc-2.2.5/manual/examples/argp-ex2.c Mon Nov 5 12:55:42 2001 @@ -15,7 +15,7 @@ but not in this small program). There are also two global variables that argp knows about defined here, ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are - global variables becuase they will almost always be constant + global variables because they will almost always be constant for a given program, even if it uses different argument parsers for various tasks). */ diff -durpN glibc-2.2.4/manual/freemanuals.texi glibc-2.2.5/manual/freemanuals.texi --- glibc-2.2.4/manual/freemanuals.texi Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/manual/freemanuals.texi Tue Aug 28 01:05:41 2001 @@ -0,0 +1,90 @@ +@appendix Free Software Needs Free Documentation +@cindex free documentation + +The biggest deficiency in the free software community today is not in +the software---it is the lack of good free documentation that we can +include with the free software. Many of our most important +programs do not come with free reference manuals and free introductory +texts. Documentation is an essential part of any software package; +when an important free software package does not come with a free +manual and a free tutorial, that is a major gap. We have many such +gaps today. + +Consider Perl, for instance. The tutorial manuals that people +normally use are non-free. How did this come about? Because the +authors of those manuals published them with restrictive terms---no +copying, no modification, source files not available---which exclude +them from the free software world. + +That wasn't the first time this sort of thing happened, and it was far +from the last. Many times we have heard a GNU user eagerly describe a +manual that he is writing, his intended contribution to the community, +only to learn that he had ruined everything by signing a publication +contract to make it non-free. + +Free documentation, like free software, is a matter of freedom, not +price. The problem with the non-free manual is not that publishers +charge a price for printed copies---that in itself is fine. (The Free +Software Foundation sells printed copies of manuals, too.) The +problem is the restrictions on the use of the manual. Free manuals +are available in source code form, and give you permission to copy and +modify. Non-free manuals do not allow this. + +The criteria of freedom for a free manual are roughly the same as for +free software. Redistribution (including the normal kinds of +commercial redistribution) must be permitted, so that the manual can +accompany every copy of the program, both on-line and on paper. + +Permission for modification of the technical content is crucial too. +When people modify the software, adding or changing features, if they +are conscientious they will change the manual too---so they can +provide accurate and clear documentation for the modified program. A +manual that leaves you no choice but to write a new manual to document +a changed version of the program is not really available to our +community. + +Some kinds of limits on the way modification is handled are +acceptable. For example, requirements to preserve the original +author's copyright notice, the distribution terms, or the list of +authors, are ok. It is also no problem to require modified versions +to include notice that they were modified. Even entire sections that +may not be deleted or changed are acceptable, as long as they deal +with nontechnical topics (like this one). These kinds of restrictions +are acceptable because they don't obstruct the community's normal use +of the manual. + +However, it must be possible to modify all the @emph{technical} +content of the manual, and then distribute the result in all the usual +media, through all the usual channels. Otherwise, the restrictions +obstruct the use of the manual, it is not free, and we need another +manual to replace it. + +Please spread the word about this issue. Our community continues to +lose manuals to proprietary publishing. If we spread the word that +free software needs free reference manuals and free tutorials, perhaps +the next person who wants to contribute by writing documentation will +realize, before it is too late, that only free manuals contribute to +the free software community. + +If you are writing documentation, please insist on publishing it under +the GNU Free Documentation License or another free documentation +license. Remember that this decision requires your approval---you +don't have to let the publisher decide. Some commercial publishers +will use a free license if you insist, but they will not propose the +option; it is up to you to raise the issue and say firmly that this is +what you want. If the publisher you are dealing with refuses, please +try other publishers. If you're not sure whether a proposed license +is free, write to @email{licensing@@gnu.org}. + +You can encourage commercial publishers to sell more free, copylefted +manuals and tutorials by buying them, and particularly by buying +copies from the publishers that paid for their writing or for major +improvements. Meanwhile, try to avoid buying non-free documentation +at all. Check the distribution terms of a manual before you buy it, +and insist that whoever seeks your business must respect your freedom. +Check the history of the book, and try reward the publishers that have +paid or pay the authors to work on it. + +The Free Software Foundation maintains a list of free documentation +published by other publishers, at +@url{http://www.fsf.org/doc/other-free-books.html}. diff -durpN glibc-2.2.4/manual/getopt.texi glibc-2.2.5/manual/getopt.texi --- glibc-2.2.4/manual/getopt.texi Mon Jul 23 10:54:40 2001 +++ glibc-2.2.5/manual/getopt.texi Wed Oct 31 00:30:48 2001 @@ -224,7 +224,7 @@ was seen. @comment getopt.h @comment GNU -@deftypefun int getopt_long (int @var{argc}, char *const *@var{argv}, const char *@var{shortopts}, struct option *@var{longopts}, int *@var{indexptr}) +@deftypefun int getopt_long (int @var{argc}, char *const *@var{argv}, const char *@var{shortopts}, const struct option *@var{longopts}, int *@var{indexptr}) Decode options from the vector @var{argv} (whose length is @var{argc}). The argument @var{shortopts} describes the short options to accept, just as it does in @code{getopt}. The argument @var{longopts} describes the long @@ -277,7 +277,7 @@ getopt functionality there is one more f @comment getopt.h @comment GNU -@deftypefun int getopt_long_only (int @var{argc}, char *const *@var{argv}, const char *@var{shortopts}, struct option *@var{longopts}, int *@var{indexptr}) +@deftypefun int getopt_long_only (int @var{argc}, char *const *@var{argv}, const char *@var{shortopts}, const struct option *@var{longopts}, int *@var{indexptr}) The @code{getopt_long_only} function is equivalent to the @code{getopt_long} function but it allows to specify the user of the diff -durpN glibc-2.2.4/manual/libc-texinfo.sh glibc-2.2.5/manual/libc-texinfo.sh --- glibc-2.2.4/manual/libc-texinfo.sh Mon Jul 23 10:54:40 2001 +++ glibc-2.2.5/manual/libc-texinfo.sh Tue Aug 28 01:05:40 2001 @@ -68,6 +68,7 @@ mv -f incl.$$ chapters.texi !/^\*/ { print; } ' smenu.$$ cat < 0) || filled >= MB_CUR_MAX) + { + error (0, 0, "invalid multibyte character"); + return 0; + } + + /* If any characters must be carried forward, + put them at the beginning of `buffer'. */ + if (filled > 0) + memmove (inp, buffer, filled); + } + + return 1; + } - In such a situation one can easy write a new conversion and provide -it as a better alternative. The GNU C library `iconv' implementation -would automatically use the module implementing the conversion if it is -specified to be more efficient. + +File: libc.info, Node: Non-reentrant Conversion, Next: Generic Charset Conversion, Prev: Restartable multibyte conversion, Up: Character Set Handling -Format of `gconv-modules' files -............................... +Non-reentrant Conversion Function +================================= - All information about the available conversions comes from a file -named `gconv-modules' which can be found in any of the directories along -the `GCONV_PATH'. The `gconv-modules' files are line-oriented text -files, where each of the lines has one of the following formats: + The functions described in the previous chapter are defined in +Amendment 1 to ISO C90, but the original ISO C90 standard also +contained functions for character set conversion. The reason that +these original functions are not described first is that they are almost +entirely useless. - * If the first non-whitespace character is a `#' the line contains - only comments and is ignored. + The problem is that all the conversion functions described in the +original ISO C90 use a local state. Using a local state implies that +multiple conversions at the same time (not only when using threads) +cannot be done, and that you cannot first convert single characters and +then strings since you cannot tell the conversion functions which state +to use. - * Lines starting with `alias' define an alias name for a character - set. There are two more words expected on the line. The first one - defines the alias name and the second defines the original name of - the character set. The effect is that it is possible to use the - alias name in the FROMSET or TOSET parameters of `iconv_open' and - achieve the same result as when using the real character set name. + These original functions are therefore usable only in a very limited +set of situations. One must complete converting the entire string +before starting a new one, and each string/text must be converted with +the same function (there is no problem with the library itself; it is +guaranteed that no library function changes the state of any of these +functions). *For the above reasons it is highly requested that the +functions described in the previous section be used in place of +non-reentrant conversion functions.* - This is quite important as a character set has often many different - names. There is normally always an official name but this need not - correspond to the most popular name. Beside this many character - sets have special names which are somehow constructed. E.g., all - character sets specified by the ISO have an alias of the form - `ISO-IR-NNN' where NNN is the registration number. This allows - programs which know about the registration number to construct - character set names and use them in `iconv_open' calls. More on - the available names and aliases follows below. +* Menu: - * Lines starting with `module' introduce an available conversion - module. These lines must contain three or four more words. +* Non-reentrant Character Conversion:: Non-reentrant Conversion of Single + Characters. +* Non-reentrant String Conversion:: Non-reentrant Conversion of Strings. +* Shift State:: States in Non-reentrant Functions. - The first word specifies the source character set, the second word - the destination character set of conversion implemented in this - module. The third word is the name of the loadable module. The - filename is constructed by appending the usual shared object - suffix (normally `.so') and this file is then supposed to be found - in the same directory the `gconv-modules' file is in. The last - word on the line, which is optional, is a numeric value - representing the cost of the conversion. If this word is missing - a cost of 1 is assumed. The numeric value itself does not matter - that much; what counts are the relative values of the sums of - costs for all possible conversion paths. Below is a more precise - description of the use of the cost value. + +File: libc.info, Node: Non-reentrant Character Conversion, Next: Non-reentrant String Conversion, Up: Non-reentrant Conversion - Returning to the example above where one has written a module to -directly convert from ISO-2022-JP to EUC-JP and back. All what has to -be done is to put the new module, be its name ISO2022JP-EUCJP.so, in a -directory and add a file `gconv-modules' with the following content in -the same directory: +Non-reentrant Conversion of Single Characters +--------------------------------------------- - module ISO-2022-JP// EUC-JP// ISO2022JP-EUCJP 1 - module EUC-JP// ISO-2022-JP// ISO2022JP-EUCJP 1 + - Function: int mbtowc (wchar_t *restrict RESULT, const char *restrict + STRING, size_t SIZE) + The `mbtowc' ("multibyte to wide character") function when called + with non-null STRING converts the first multibyte character + beginning at STRING to its corresponding wide character code. It + stores the result in `*RESULT'. - To see why this is sufficient, it is necessary to understand how the -conversion used by `iconv' (and described in the descriptor) is -selected. The approach to this problem is quite simple. + `mbtowc' never examines more than SIZE bytes. (The idea is to + supply for SIZE the number of bytes of data you have in hand.) - At the first call of the `iconv_open' function the program reads all -available `gconv-modules' files and builds up two tables: one -containing all the known aliases and another which contains the -information about the conversions and which shared object implements -them. + `mbtowc' with non-null STRING distinguishes three possibilities: + the first SIZE bytes at STRING start with valid multibyte + characters, they start with an invalid byte sequence or just part + of a character, or STRING points to an empty string (a null + character). -Finding the conversion path in `iconv' -...................................... + For a valid multibyte character, `mbtowc' converts it to a wide + character and stores that in `*RESULT', and returns the number of + bytes in that character (always at least 1 and never more than + SIZE). - The set of available conversions form a directed graph with weighted -edges. The weights on the edges are the costs specified in the -`gconv-modules' files. The `iconv_open' function uses an algorithm -suitable for search for the best path in such a graph and so constructs -a list of conversions which must be performed in succession to get the -transformation from the source to the destination character set. + For an invalid byte sequence, `mbtowc' returns -1. For an empty + string, it returns 0, also storing `'\0'' in `*RESULT'. - Explaining why the above `gconv-modules' files allows the `iconv' -implementation to resolve the specific ISO-2022-JP to EUC-JP conversion -module instead of the conversion coming with the library itself is -straightforward. Since the latter conversion takes two steps (from -ISO-2022-JP to ISO 10646 and then from ISO 10646 to EUC-JP) the cost is -1+1 = 2. But the above `gconv-modules' file specifies that the new -conversion modules can perform this conversion with only the cost of 1. + If the multibyte character code uses shift characters, then + `mbtowc' maintains and updates a shift state as it scans. If you + call `mbtowc' with a null pointer for STRING, that initializes the + shift state to its standard initial value. It also returns + nonzero if the multibyte character code in use actually has a + shift state. *Note Shift State::. - A mysterious piece about the `gconv-modules' file above (and also -the file coming with the GNU C library) are the names of the character -sets specified in the `module' lines. Why do almost all the names end -in `//'? And this is not all: the names can actually be regular -expressions. At this point of time this mystery should not be -revealed, unless you have the relevant spell-casting materials: ashes -from an original DOS 6.2 boot disk burnt in effigy, a crucifix blessed -by St. Emacs, assorted herbal roots from Central America, sand from -Cebu, etc. Sorry! *The part of the implementation where this is used -is not yet finished. For now please simply follow the existing -examples. It'll become clearer once it is. -drepper* + - Function: int wctomb (char *STRING, wchar_t WCHAR) + The `wctomb' ("wide character to multibyte") function converts the + wide character code WCHAR to its corresponding multibyte character + sequence, and stores the result in bytes starting at STRING. At + most `MB_CUR_MAX' characters are stored. - A last remark about the `gconv-modules' is about the names not -ending with `//'. There often is a character set named `INTERNAL' -mentioned. From the discussion above and the chosen name it should -have become clear that this is the name for the representation used in -the intermediate step of the triangulation. We have said that this is -UCS-4 but actually it is not quite right. The UCS-4 specification also -includes the specification of the byte ordering used. Since a UCS-4 -value consists of four bytes a stored value is effected by byte -ordering. The internal representation is _not_ the same as UCS-4 in -case the byte ordering of the processor (or at least the running -process) is not the same as the one required for UCS-4. This is done -for performance reasons as one does not want to perform unnecessary -byte-swapping operations if one is not interested in actually seeing -the result in UCS-4. To avoid trouble with endianess the internal -representation consistently is named `INTERNAL' even on big-endian -systems where the representations are identical. + `wctomb' with non-null STRING distinguishes three possibilities + for WCHAR: a valid wide character code (one that can be translated + to a multibyte character), an invalid code, and `L'\0''. -`iconv' module data structures -.............................. + Given a valid code, `wctomb' converts it to a multibyte character, + storing the bytes starting at STRING. Then it returns the number + of bytes in that character (always at least 1 and never more than + `MB_CUR_MAX'). - So far this section described how modules are located and considered -to be used. What remains to be described is the interface of the -modules so that one can write new ones. This section describes the -interface as it is in use in January 1999. The interface will change -in future a bit but hopefully only in an upward compatible way. + If WCHAR is an invalid wide character code, `wctomb' returns -1. + If WCHAR is `L'\0'', it returns `0', also storing `'\0'' in + `*STRING'. - The definitions necessary to write new modules are publicly available -in the non-standard header `gconv.h'. The following text will -therefore describe the definitions from this header file. But first it -is necessary to get an overview. + If the multibyte character code uses shift characters, then + `wctomb' maintains and updates a shift state as it scans. If you + call `wctomb' with a null pointer for STRING, that initializes the + shift state to its standard initial value. It also returns + nonzero if the multibyte character code in use actually has a + shift state. *Note Shift State::. - From the perspective of the user of `iconv' the interface is quite -simple: the `iconv_open' function returns a handle which can be used in -calls to `iconv' and finally the handle is freed with a call to -`iconv_close'. The problem is: the handle has to be able to represent -the possibly long sequences of conversion steps and also the state of -each conversion since the handle is all which is passed to the `iconv' -function. Therefore the data structures are really the elements to -understanding the implementation. + Calling this function with a WCHAR argument of zero when STRING is + not null has the side-effect of reinitializing the stored shift + state _as well as_ storing the multibyte character `'\0'' and + returning 0. - We need two different kinds of data structures. The first describes -the conversion and the second describes the state etc. There are -really two type definitions like this in `gconv.h'. + Similar to `mbrlen' there is also a non-reentrant function that +computes the length of a multibyte character. It can be defined in +terms of `mbtowc'. - - Data type: struct __gconv_step - This data structure describes one conversion a module can perform. - For each function in a loaded module with conversion functions - there is exactly one object of this type. This object is shared - by all users of the conversion. I.e., this object does not - contain any information corresponding to an actual conversion. It - only describes the conversion itself. + - Function: int mblen (const char *STRING, size_t SIZE) + The `mblen' function with a non-null STRING argument returns the + number of bytes that make up the multibyte character beginning at + STRING, never examining more than SIZE bytes. (The idea is to + supply for SIZE the number of bytes of data you have in hand.) - `struct __gconv_loaded_object *__shlib_handle' - `const char *__modname' - `int __counter' - All these elements of the structure are used internally in - the C library to coordinate loading and unloading the shared. - One must not expect any of the other elements be available - or initialized. + The return value of `mblen' distinguishes three possibilities: the + first SIZE bytes at STRING start with valid multibyte characters, + they start with an invalid byte sequence or just part of a + character, or STRING points to an empty string (a null character). - `const char *__from_name' - `const char *__to_name' - `__from_name' and `__to_name' contain the names of the source - and destination character sets. They can be used to identify - the actual conversion to be carried out since one module - might implement conversions for more than one character set - and/or direction. + For a valid multibyte character, `mblen' returns the number of + bytes in that character (always at least `1' and never more than + SIZE). For an invalid byte sequence, `mblen' returns -1. For an + empty string, it returns 0. - `gconv_fct __fct' - `gconv_init_fct __init_fct' - `gconv_end_fct __end_fct' - These elements contain pointers to the functions in the - loadable module. The interface will be explained below. + If the multibyte character code uses shift characters, then `mblen' + maintains and updates a shift state as it scans. If you call + `mblen' with a null pointer for STRING, that initializes the shift + state to its standard initial value. It also returns a nonzero + value if the multibyte character code in use actually has a shift + state. *Note Shift State::. - `int __min_needed_from' - `int __max_needed_from' - `int __min_needed_to' - `int __max_needed_to;' - These values have to be filled in the init function of the - module. The `__min_needed_from' value specifies how many - bytes a character of the source character set at least needs. - The `__max_needed_from' specifies the maximum value which - also includes possible shift sequences. + The function `mblen' is declared in `stdlib.h'. - The `__min_needed_to' and `__max_needed_to' values serve the - same purpose but this time for the destination character set. + +File: libc.info, Node: Non-reentrant String Conversion, Next: Shift State, Prev: Non-reentrant Character Conversion, Up: Non-reentrant Conversion - It is crucial that these values are accurate since otherwise - the conversion functions will have problems or not work at - all. +Non-reentrant Conversion of Strings +----------------------------------- - `int __stateful' - This element must also be initialized by the init function. - It is nonzero if the source character set is stateful. - Otherwise it is zero. + For convenience the ISO C90 standard also defines functions to +convert entire strings instead of single characters. These functions +suffer from the same problems as their reentrant counterparts from +Amendment 1 to ISO C90; see *Note Converting Strings::. - `void *__data' - This element can be used freely by the conversion functions - in the module. It can be used to communicate extra - information from one call to another. It need not be - initialized if not needed at all. If this element gets - assigned a pointer to dynamically allocated memory - (presumably in the init function) it has to be made sure that - the end function deallocates the memory. Otherwise the - application will leak memory. + - Function: size_t mbstowcs (wchar_t *WSTRING, const char *STRING, + size_t SIZE) + The `mbstowcs' ("multibyte string to wide character string") + function converts the null-terminated string of multibyte + characters STRING to an array of wide character codes, storing not + more than SIZE wide characters into the array beginning at WSTRING. + The terminating null character counts towards the size, so if SIZE + is less than the actual number of wide characters resulting from + STRING, no terminating null character is stored. - It is important to be aware that this data structure is - shared by all users of this specification conversion and - therefore the `__data' element must not contain data specific - to one specific use of the conversion function. + The conversion of characters from STRING begins in the initial + shift state. - - Data type: struct __gconv_step_data - This is the data structure which contains the information specific - to each use of the conversion functions. + If an invalid multibyte character sequence is found, the `mbstowcs' + function returns a value of -1. Otherwise, it returns the number + of wide characters stored in the array WSTRING. This number does + not include the terminating null character, which is present if the + number is less than SIZE. - `char *__outbuf' - `char *__outbufend' - These elements specify the output buffer for the conversion - step. The `__outbuf' element points to the beginning of the - buffer and `__outbufend' points to the byte following the - last byte in the buffer. The conversion function must not - assume anything about the size of the buffer but it can be - safely assumed the there is room for at least one complete - character in the output buffer. + Here is an example showing how to convert a string of multibyte + characters, allocating enough space for the result. - Once the conversion is finished and the conversion is the - last step the `__outbuf' element must be modified to point - after last last byte written into the buffer to signal how - much output is available. If this conversion step is not the - last one the element must not be modified. The `__outbufend' - element must not be modified. + wchar_t * + mbstowcs_alloc (const char *string) + { + size_t size = strlen (string) + 1; + wchar_t *buf = xmalloc (size * sizeof (wchar_t)); + + size = mbstowcs (buf, string, size); + if (size == (size_t) -1) + return NULL; + buf = xrealloc (buf, (size + 1) * sizeof (wchar_t)); + return buf; + } - `int __is_last' - This element is nonzero if this conversion step is the last - one. This information is necessary for the recursion. See - the description of the conversion function internals below. - This element must never be modified. - `int __invocation_counter' - The conversion function can use this element to see how many - calls of the conversion function already happened. Some - character sets require when generating output a certain - prolog and by comparing this value with zero one can find out - whether it is the first call and therefore the prolog should - be emitted or not. This element must never be modified. + - Function: size_t wcstombs (char *STRING, const wchar_t *WSTRING, + size_t SIZE) + The `wcstombs' ("wide character string to multibyte string") + function converts the null-terminated wide character array WSTRING + into a string containing multibyte characters, storing not more + than SIZE bytes starting at STRING, followed by a terminating null + character if there is room. The conversion of characters begins in + the initial shift state. - `int __internal_use' - This element is another one rarely used but needed in certain - situations. It got assigned a nonzero value in case the - conversion functions are used to implement `mbsrtowcs' et.al. - I.e., the function is not used directly through the `iconv' - interface. + The terminating null character counts towards the size, so if SIZE + is less than or equal to the number of bytes needed in WSTRING, no + terminating null character is stored. - This sometimes makes a difference as it is expected that the - `iconv' functions are used to translate entire texts while the - `mbsrtowcs' functions are normally only used to convert single - strings and might be used multiple times to convert entire - texts. + If a code that does not correspond to a valid multibyte character + is found, the `wcstombs' function returns a value of -1. + Otherwise, the return value is the number of bytes stored in the + array STRING. This number does not include the terminating null + character, which is present if the number is less than SIZE. - But in this situation we would have problem complying with - some rules of the character set specification. Some - character sets require a prolog which must appear exactly - once for an entire text. If a number of `mbsrtowcs' calls - are used to convert the text only the first call must add the - prolog. But since there is no communication between the - different calls of `mbsrtowcs' the conversion functions have - no possibility to find this out. The situation is different - for sequences of `iconv' calls since the handle allows access - to the needed information. + +File: libc.info, Node: Shift State, Prev: Non-reentrant String Conversion, Up: Non-reentrant Conversion - This element is mostly used together with - `__invocation_counter' in a way like this: +States in Non-reentrant Functions +--------------------------------- - if (!data->__internal_use - && data->__invocation_counter == 0) - /* Emit prolog. */ - ... + In some multibyte character codes, the _meaning_ of any particular +byte sequence is not fixed; it depends on what other sequences have come +earlier in the same string. Typically there are just a few sequences +that can change the meaning of other sequences; these few are called +"shift sequences" and we say that they set the "shift state" for other +sequences that follow. - This element must never be modified. + To illustrate shift state and shift sequences, suppose we decide that +the sequence `0200' (just one byte) enters Japanese mode, in which +pairs of bytes in the range from `0240' to `0377' are single +characters, while `0201' enters Latin-1 mode, in which single bytes in +the range from `0240' to `0377' are characters, and interpreted +according to the ISO Latin-1 character set. This is a multibyte code +that has two alternative shift states ("Japanese mode" and "Latin-1 +mode"), and two shift sequences that specify particular shift states. - `mbstate_t *__statep' - The `__statep' element points to an object of type `mbstate_t' - (*note Keeping the state::). The conversion of an stateful - character set must use the object pointed to by this element - to store information about the conversion state. The - `__statep' element itself must never be modified. + When the multibyte character code in use has shift states, then +`mblen', `mbtowc', and `wctomb' must maintain and update the current +shift state as they scan the string. To make this work properly, you +must follow these rules: - `mbstate_t __state' - This element _never_ must be used directly. It is only part - of this structure to have the needed space allocated. + * Before starting to scan a string, call the function with a null + pointer for the multibyte character address--for example, `mblen + (NULL, 0)'. This initializes the shift state to its standard + initial value. -`iconv' module interfaces -......................... + * Scan the string one character at a time, in order. Do not "back + up" and rescan characters already scanned, and do not intersperse + the processing of different strings. - With the knowledge about the data structures we now can describe the -conversion functions itself. To understand the interface a bit of -knowledge about the functionality in the C library which loads the -objects with the conversions is necessary. + Here is an example of using `mblen' following these rules: - It is often the case that one conversion is used more than once. -I.e., there are several `iconv_open' calls for the same set of character -sets during one program run. The `mbsrtowcs' et.al. functions in the -GNU C library also use the `iconv' functionality which increases the -number of uses of the same functions even more. + void + scan_string (char *s) + { + int length = strlen (s); + + /* Initialize shift state. */ + mblen (NULL, 0); + + while (1) + { + int thischar = mblen (s, length); + /* Deal with end of string and invalid characters. */ + if (thischar == 0) + break; + if (thischar == -1) + { + error ("invalid multibyte character"); + break; + } + /* Advance past this character. */ + s += thischar; + length -= thischar; + } + } - For this reason the modules do not get loaded exclusively for one -conversion. Instead a module once loaded can be used by arbitrarily -many `iconv' or `mbsrtowcs' calls at the same time. The splitting of -the information between conversion function specific information and -conversion data makes this possible. The last section showed the two -data structures used to do this. + The functions `mblen', `mbtowc' and `wctomb' are not reentrant when +using a multibyte code that uses a shift state. However, no other +library functions call these functions, so you don't have to worry that +the shift state will be changed mysteriously. - This is of course also reflected in the interface and semantics of -the functions the modules must provide. There are three functions which -must have the following names: + +File: libc.info, Node: Generic Charset Conversion, Prev: Non-reentrant Conversion, Up: Character Set Handling -`gconv_init' - The `gconv_init' function initializes the conversion function - specific data structure. This very same object is shared by all - conversion which use this conversion and therefore no state - information about the conversion itself must be stored in here. - If a module implements more than one conversion the `gconv_init' - function will be called multiple times. +Generic Charset Conversion +========================== -`gconv_end' - The `gconv_end' function is responsible to free all resources - allocated by the `gconv_init' function. If there is nothing to do - this function can be missing. Special care must be taken if the - module implements more than one conversion and the `gconv_init' - function does not allocate the same resources for all conversions. + The conversion functions mentioned so far in this chapter all had in +common that they operate on character sets that are not directly +specified by the functions. The multibyte encoding used is specified by +the currently selected locale for the `LC_CTYPE' category. The wide +character set is fixed by the implementation (in the case of GNU C +library it is always UCS-4 encoded ISO 10646. -`gconv' - This is the actual conversion function. It is called to convert - one block of text. It gets passed the conversion step information - initialized by `gconv_init' and the conversion data, specific to - this use of the conversion functions. + This has of course several problems when it comes to general +character conversion: - There are three data types defined for the three module interface -function and these define the interface. + * For every conversion where neither the source nor the destination + character set is the character set of the locale for the `LC_CTYPE' + category, one has to change the `LC_CTYPE' locale using + `setlocale'. - - Data type: int (*__gconv_init_fct) (struct __gconv_step *) - This specifies the interface of the initialization function of the - module. It is called exactly once for each conversion the module - implements. + Changing the `LC_TYPE' locale introduces major problems for the + rest of the programs since several more functions (e.g., the + character classification functions, *note Classification of + Characters::) use the `LC_CTYPE' category. - As explained int the description of the `struct __gconv_step' data - structure above the initialization function has to initialize - parts of it. + * Parallel conversions to and from different character sets are not + possible since the `LC_CTYPE' selection is global and shared by all + threads. - `__min_needed_from' - `__max_needed_from' - `__min_needed_to' - `__max_needed_to' - These elements must be initialized to the exact numbers of - the minimum and maximum number of bytes used by one character - in the source and destination character set respectively. If - the characters all have the same size the minimum and maximum - values are the same. + * If neither the source nor the destination character set is the + character set used for `wchar_t' representation, there is at least + a two-step process necessary to convert a text using the functions + above. One would have to select the source character set as the + multibyte encoding, convert the text into a `wchar_t' text, select + the destination character set as the multibyte encoding, and + convert the wide character text to the multibyte (= destination) + character set. - `__stateful' - This element must be initialized to an nonzero value if the - source character set is stateful. Otherwise it must be zero. + Even if this is possible (which is not guaranteed) it is a very + tiring work. Plus it suffers from the other two raised points + even more due to the steady changing of the locale. - If the initialization function needs to communication some - information to the conversion function this can happen using the - `__data' element of the `__gconv_step' structure. But since this - data is shared by all the conversion is must not be modified by - the conversion function. How this can be used is shown in the - example below. + The XPG2 standard defines a completely new set of functions, which +has none of these limitations. They are not at all coupled to the +selected locales, and they have no constraints on the character sets +selected for source and destination. Only the set of available +conversions limits them. The standard does not specify that any +conversion at all must be available. Such availability is a measure of +the quality of the implementation. - #define MIN_NEEDED_FROM 1 - #define MAX_NEEDED_FROM 4 - #define MIN_NEEDED_TO 4 - #define MAX_NEEDED_TO 4 - - int - gconv_init (struct __gconv_step *step) - { - /* Determine which direction. */ - struct iso2022jp_data *new_data; - enum direction dir = illegal_dir; - enum variant var = illegal_var; - int result; - - if (__strcasecmp (step->__from_name, "ISO-2022-JP//") == 0) - { - dir = from_iso2022jp; - var = iso2022jp; - } - else if (__strcasecmp (step->__to_name, "ISO-2022-JP//") == 0) - { - dir = to_iso2022jp; - var = iso2022jp; - } - else if (__strcasecmp (step->__from_name, "ISO-2022-JP-2//") == 0) - { - dir = from_iso2022jp; - var = iso2022jp2; - } - else if (__strcasecmp (step->__to_name, "ISO-2022-JP-2//") == 0) - { - dir = to_iso2022jp; - var = iso2022jp2; - } - - result = __GCONV_NOCONV; - if (dir != illegal_dir) - { - new_data = (struct iso2022jp_data *) - malloc (sizeof (struct iso2022jp_data)); - - result = __GCONV_NOMEM; - if (new_data != NULL) - { - new_data->dir = dir; - new_data->var = var; - step->__data = new_data; - - if (dir == from_iso2022jp) - { - step->__min_needed_from = MIN_NEEDED_FROM; - step->__max_needed_from = MAX_NEEDED_FROM; - step->__min_needed_to = MIN_NEEDED_TO; - step->__max_needed_to = MAX_NEEDED_TO; - } - else - { - step->__min_needed_from = MIN_NEEDED_TO; - step->__max_needed_from = MAX_NEEDED_TO; - step->__min_needed_to = MIN_NEEDED_FROM; - step->__max_needed_to = MAX_NEEDED_FROM + 2; - } - - /* Yes, this is a stateful encoding. */ - step->__stateful = 1; - - result = __GCONV_OK; - } - } - - return result; - } + In the following text first the interface to `iconv' and then the +conversion function, will be described. Comparisons with other +implementations will show what obstacles stand in the way of portable +applications. Finally, the implementation is described in so far as +might interest the advanced user who wants to extend conversion +capabilities. - The function first checks which conversion is wanted. The module - from which this function is taken implements four different - conversion and which one is selected can be determined by - comparing the names. The comparison should always be done without - paying attention to the case. +* Menu: - Then a data structure is allocated which contains the necessary - information about which conversion is selected. The data structure - `struct iso2022jp_data' is locally defined since outside the module - this data is not used at all. Please note that if all four - conversions this modules supports are requested there are four - data blocks. +* Generic Conversion Interface:: Generic Character Set Conversion Interface. +* iconv Examples:: A complete `iconv' example. +* Other iconv Implementations:: Some Details about other `iconv' + Implementations. +* glibc iconv Implementation:: The `iconv' Implementation in the GNU C + library. - One interesting thing is the initialization of the `__min_' and - `__max_' elements of the step data object. A single ISO-2022-JP - character can consist of one to four bytes. Therefore the - `MIN_NEEDED_FROM' and `MAX_NEEDED_FROM' macros are defined this - way. The output is always the `INTERNAL' character set (aka - UCS-4) and therefore each character consists of exactly four - bytes. For the conversion from `INTERNAL' to ISO-2022-JP we have - to take into account that escape sequences might be necessary to - switch the character sets. Therefore the `__max_needed_to' - element for this direction gets assigned `MAX_NEEDED_FROM + 2'. - This takes into account the two bytes needed for the escape - sequences to single the switching. The asymmetry in the maximum - values for the two directions can be explained easily: when - reading ISO-2022-JP text escape sequences can be handled alone. - I.e., it is not necessary to process a real character since the - effect of the escape sequence can be recorded in the state - information. The situation is different for the other direction. - Since it is in general not known which character comes next one - cannot emit escape sequences to change the state in advance. This - means the escape sequences which have to be emitted together with - the next character. Therefore one needs more room then only for - the character itself. + +File: libc.info, Node: Generic Conversion Interface, Next: iconv Examples, Up: Generic Charset Conversion - The possible return values of the initialization function are: +Generic Character Set Conversion Interface +------------------------------------------ - `__GCONV_OK' - The initialization succeeded + This set of functions follows the traditional cycle of using a +resource: open-use-close. The interface consists of three functions, +each of which implements one step. - `__GCONV_NOCONV' - The requested conversion is not supported in the module. - This can happen if the `gconv-modules' file has errors. + Before the interfaces are described it is necessary to introduce a +data type. Just like other open-use-close interfaces the functions +introduced here work using handles and the `iconv.h' header defines a +special type for the handles used. - `__GCONV_NOMEM' - Memory required to store additional information could not be - allocated. + - Data Type: iconv_t + This data type is an abstract type defined in `iconv.h'. The user + must not assume anything about the definition of this type; it + must be completely opaque. - The functions called before the module is unloaded is significantly -easier. It often has nothing at all to do in which case it can be left -out completely. + Objects of this type can get assigned handles for the conversions + using the `iconv' functions. The objects themselves need not be + freed, but the conversions for which the handles stand for have to. - - Data type: void (*__gconv_end_fct) (struct gconv_step *) - The task of this function is it to free all resources allocated in - the initialization function. Therefore only the `__data' element - of the object pointed to by the argument is of interest. - Continuing the example from the initialization function, the - finalization function looks like this: +The first step is the function to create a handle. - void - gconv_end (struct __gconv_step *data) - { - free (data->__data); - } + - Function: iconv_t iconv_open (const char *TOCODE, const char + *FROMCODE) + The `iconv_open' function has to be used before starting a + conversion. The two parameters this function takes determine the + source and destination character set for the conversion, and if the + implementation has the possibility to perform such a conversion, + the function returns a handle. - The most important function is the conversion function itself. It -can get quite complicated for complex character sets. But since this -is not of interest here we will only describe a possible skeleton for -the conversion function. + If the wanted conversion is not available, the `iconv_open' + function returns `(iconv_t) -1'. In this case the global variable + `errno' can have the following values: - - Data type: int (*__gconv_fct) (struct __gconv_step *, struct - __gconv_step_data *, const char **, const char *, size_t *, - int) - The conversion function can be called for two basic reason: to - convert text or to reset the state. From the description of the - `iconv' function it can be seen why the flushing mode is - necessary. What mode is selected is determined by the sixth - argument, an integer. If it is nonzero it means that flushing is - selected. + `EMFILE' + The process already has `OPEN_MAX' file descriptors open. - Common to both mode is where the output buffer can be found. The - information about this buffer is stored in the conversion step - data. A pointer to this is passed as the second argument to this - function. The description of the `struct __gconv_step_data' - structure has more information on this. + `ENFILE' + The system limit of open file is reached. - What has to be done for flushing depends on the source character - set. If it is not stateful nothing has to be done. Otherwise the - function has to emit a byte sequence to bring the state object in - the initial state. Once this all happened the other conversion - modules in the chain of conversions have to get the same chance. - Whether another step follows can be determined from the - `__is_last' element of the step data structure to which the first - parameter points. + `ENOMEM' + Not enough memory to carry out the operation. - The more interesting mode is when actually text has to be - converted. The first step in this case is to convert as much text - as possible from the input buffer and store the result in the - output buffer. The start of the input buffer is determined by the - third argument which is a pointer to a pointer variable - referencing the beginning of the buffer. The fourth argument is a - pointer to the byte right after the last byte in the buffer. + `EINVAL' + The conversion from FROMCODE to TOCODE is not supported. - The conversion has to be performed according to the current state - if the character set is stateful. The state is stored in an - object pointed to by the `__statep' element of the step data - (second argument). Once either the input buffer is empty or the - output buffer is full the conversion stops. At this point the - pointer variable referenced by the third parameter must point to - the byte following the last processed byte. I.e., if all of the - input is consumed this pointer and the fourth parameter have the - same value. + It is not possible to use the same descriptor in different threads + to perform independent conversions. The data structures associated + with the descriptor include information about the conversion state. + This must not be messed up by using it in different conversions. - What now happens depends on whether this step is the last one or - not. If it is the last step the only thing which has to be done - is to update the `__outbuf' element of the step data structure to - point after the last written byte. This gives the caller the - information on how much text is available in the output buffer. - Beside this the variable pointed to by the fifth parameter, which - is of type `size_t', must be incremented by the number of - characters (_not bytes_) which were converted in a non-reversible - way. Then the function can return. + An `iconv' descriptor is like a file descriptor as for every use a + new descriptor must be created. The descriptor does not stand for + all of the conversions from FROMSET to TOSET. - In case the step is not the last one the later conversion - functions have to get a chance to do their work. Therefore the - appropriate conversion function has to be called. The information - about the functions is stored in the conversion data structures, - passed as the first parameter. This information and the step data - are stored in arrays so the next element in both cases can be - found by simple pointer arithmetic: + The GNU C library implementation of `iconv_open' has one + significant extension to other implementations. To ease the + extension of the set of available conversions, the implementation + allows storing the necessary files with data and code in an + arbitrary number of directories. How this extension must be + written will be explained below (*note glibc iconv + Implementation::). Here it is only important to say that all + directories mentioned in the `GCONV_PATH' environment variable are + considered only if they contain a file `gconv-modules'. These + directories need not necessarily be created by the system + administrator. In fact, this extension is introduced to help users + writing and using their own, new conversions. Of course, this + does not work for security reasons in SUID binaries; in this case + only the system directory is considered and this normally is + `PREFIX/lib/gconv'. The `GCONV_PATH' environment variable is + examined exactly once at the first call of the `iconv_open' + function. Later modifications of the variable have no effect. - int - gconv (struct __gconv_step *step, struct __gconv_step_data *data, - const char **inbuf, const char *inbufend, size_t *written, - int do_flush) - { - struct __gconv_step *next_step = step + 1; - struct __gconv_step_data *next_data = data + 1; - ... + The `iconv_open' function was introduced early in the X/Open + Portability Guide, version 2. It is supported by all commercial + Unices as it is required for the Unix branding. However, the + quality and completeness of the implementation varies widely. The + `iconv_open' function is declared in `iconv.h'. - The `next_step' pointer references the next step information and - `next_data' the next data record. The call of the next function - therefore will look similar to this: + The `iconv' implementation can associate large data structure with +the handle returned by `iconv_open'. Therefore, it is crucial to free +all the resources once all conversions are carried out and the +conversion is not needed anymore. - next_step->__fct (next_step, next_data, &outerr, outbuf, - written, 0) + - Function: int iconv_close (iconv_t CD) + The `iconv_close' function frees all resources associated with the + handle CD, which must have been returned by a successful call to + the `iconv_open' function. - But this is not yet all. Once the function call returns the - conversion function might have some more to do. If the return - value of the function is `__GCONV_EMPTY_INPUT' this means there is - more room in the output buffer. Unless the input buffer is empty - the conversion functions start all over again and processes the - rest of the input buffer. If the return value is not - `__GCONV_EMPTY_INPUT' something went wrong and we have to recover - from this. + If the function call was successful the return value is 0. + Otherwise it is -1 and `errno' is set appropriately. Defined + error are: - A requirement for the conversion function is that the input buffer - pointer (the third argument) always points to the last character - which was put in the converted form in the output buffer. This is - trivially true after the conversion performed in the current step. - But if the conversion functions deeper down the stream stop - prematurely not all characters from the output buffer are consumed - and therefore the input buffer pointers must be backed of to the - right position. + `EBADF' + The conversion descriptor is invalid. - This is easy to do if the input and output character sets have a - fixed width for all characters. In this situation we can compute - how many characters are left in the output buffer and therefore - can correct the input buffer pointer appropriate with a similar - computation. Things are getting tricky if either character set - has character represented with variable length byte sequences and - it gets even more complicated if the conversion has to take care - of the state. In these cases the conversion has to be performed - once again, from the known state before the initial conversion. - I.e., if necessary the state of the conversion has to be reset and - the conversion loop has to be executed again. The difference now - is that it is known how much input must be created and the - conversion can stop before converting the first unused character. - Once this is done the input buffer pointers must be updated again - and the function can return. + The `iconv_close' function was introduced together with the rest + of the `iconv' functions in XPG2 and is declared in `iconv.h'. - One final thing should be mentioned. If it is necessary for the - conversion to know whether it is the first invocation (in case a - prolog has to be emitted) the conversion function should just - before returning to the caller increment the - `__invocation_counter' element of the step data structure. See - the description of the `struct __gconv_step_data' structure above - for more information on how this can be used. + The standard defines only one actual conversion function. This has, +therefore, the most general interface: it allows conversion from one +buffer to another. Conversion from a file to a buffer, vice versa, or +even file to file can be implemented on top of it. - The return value must be one of the following values: + - Function: size_t iconv (iconv_t CD, char **INBUF, size_t + *INBYTESLEFT, char **OUTBUF, size_t *OUTBYTESLEFT) + The `iconv' function converts the text in the input buffer + according to the rules associated with the descriptor CD and + stores the result in the output buffer. It is possible to call the + function for the same text several times in a row since for + stateful character sets the necessary state information is kept in + the data structures associated with the descriptor. - `__GCONV_EMPTY_INPUT' - All input was consumed and there is room left in the output - buffer. + The input buffer is specified by `*INBUF' and it contains + `*INBYTESLEFT' bytes. The extra indirection is necessary for + communicating the used input back to the caller (see below). It is + important to note that the buffer pointer is of type `char' and the + length is measured in bytes even if the input text is encoded in + wide characters. - `__GCONV_FULL_OUTPUT' - No more room in the output buffer. In case this is not the - last step this value is propagated down from the call of the - next conversion function in the chain. + The output buffer is specified in a similar way. `*OUTBUF' points + to the beginning of the buffer with at least `*OUTBYTESLEFT' bytes + room for the result. The buffer pointer again is of type `char' + and the length is measured in bytes. If OUTBUF or `*OUTBUF' is a + null pointer, the conversion is performed but no output is + available. - `__GCONV_INCOMPLETE_INPUT' - The input buffer is not entirely empty since it contains an - incomplete character sequence. + If INBUF is a null pointer, the `iconv' function performs the + necessary action to put the state of the conversion into the + initial state. This is obviously a no-op for non-stateful + encodings, but if the encoding has a state, such a function call + might put some byte sequences in the output buffer, which perform + the necessary state changes. The next call with INBUF not being a + null pointer then simply goes on from the initial state. It is + important that the programmer never makes any assumption as to + whether the conversion has to deal with states. Even if the input + and output character sets are not stateful, the implementation + might still have to keep states. This is due to the + implementation chosen for the GNU C library as it is described + below. Therefore an `iconv' call to reset the state should always + be performed if some protocol requires this for the output text. - The following example provides a framework for a conversion - function. In case a new conversion has to be written the holes in - this implementation have to be filled and that is it. + The conversion stops for one of three reasons. The first is that + all characters from the input buffer are converted. This actually + can mean two things: either all bytes from the input buffer are + consumed or there are some bytes at the end of the buffer that + possibly can form a complete character but the input is + incomplete. The second reason for a stop is that the output + buffer is full. And the third reason is that the input contains + invalid characters. - int - gconv (struct __gconv_step *step, struct __gconv_step_data *data, - const char **inbuf, const char *inbufend, size_t *written, - int do_flush) - { - struct __gconv_step *next_step = step + 1; - struct __gconv_step_data *next_data = data + 1; - gconv_fct fct = next_step->__fct; - int status; - - /* If the function is called with no input this means we have - to reset to the initial state. The possibly partly - converted input is dropped. */ - if (do_flush) - { - status = __GCONV_OK; - - /* Possible emit a byte sequence which put the state object - into the initial state. */ - - /* Call the steps down the chain if there are any but only - if we successfully emitted the escape sequence. */ - if (status == __GCONV_OK && ! data->__is_last) - status = fct (next_step, next_data, NULL, NULL, - written, 1); - } - else - { - /* We preserve the initial values of the pointer variables. */ - const char *inptr = *inbuf; - char *outbuf = data->__outbuf; - char *outend = data->__outbufend; - char *outptr; - - do - { - /* Remember the start value for this round. */ - inptr = *inbuf; - /* The outbuf buffer is empty. */ - outptr = outbuf; - - /* For stateful encodings the state must be safe here. */ - - /* Run the conversion loop. `status' is set - appropriately afterwards. */ - - /* If this is the last step leave the loop, there is - nothing we can do. */ - if (data->__is_last) - { - /* Store information about how many bytes are - available. */ - data->__outbuf = outbuf; - - /* If any non-reversible conversions were performed, - add the number to `*written'. */ - - break; - } - - /* Write out all output which was produced. */ - if (outbuf > outptr) - { - const char *outerr = data->__outbuf; - int result; - - result = fct (next_step, next_data, &outerr, - outbuf, written, 0); - - if (result != __GCONV_EMPTY_INPUT) - { - if (outerr != outbuf) - { - /* Reset the input buffer pointer. We - document here the complex case. */ - size_t nstatus; - - /* Reload the pointers. */ - *inbuf = inptr; - outbuf = outptr; - - /* Possibly reset the state. */ - - /* Redo the conversion, but this time - the end of the output buffer is at - `outerr'. */ - } - - /* Change the status. */ - status = result; - } - else - /* All the output is consumed, we can make - another run if everything was ok. */ - if (status == __GCONV_FULL_OUTPUT) - status = __GCONV_OK; - } - } - while (status == __GCONV_OK); - - /* We finished one use of this step. */ - ++data->__invocation_counter; - } - - return status; - } + In all of these cases the buffer pointers after the last successful + conversion, for input and output buffer, are stored in INBUF and + OUTBUF, and the available room in each buffer is stored in + INBYTESLEFT and OUTBYTESLEFT. - This information should be sufficient to write new modules. Anybody -doing so should also take a look at the available source code in the GNU -C library sources. It contains many examples of working and optimized -modules. + Since the character sets selected in the `iconv_open' call can be + almost arbitrary, there can be situations where the input buffer + contains valid characters, which have no identical representation + in the output character set. The behavior in this situation is + undefined. The _current_ behavior of the GNU C library in this + situation is to return with an error immediately. This certainly + is not the most desirable solution; therefore, future versions + will provide better ones, but they are not yet finished. - -File: libc.info, Node: Locales, Next: Message Translation, Prev: Character Set Handling, Up: Top + If all input from the input buffer is successfully converted and + stored in the output buffer, the function returns the number of + non-reversible conversions performed. In all other cases the + return value is `(size_t) -1' and `errno' is set appropriately. + In such cases the value pointed to by INBYTESLEFT is nonzero. -Locales and Internationalization -******************************** + `EILSEQ' + The conversion stopped because of an invalid byte sequence in + the input. After the call, `*INBUF' points at the first byte + of the invalid byte sequence. - Different countries and cultures have varying conventions for how to -communicate. These conventions range from very simple ones, such as the -format for representing dates and times, to very complex ones, such as -the language spoken. + `E2BIG' + The conversion stopped because it ran out of space in the + output buffer. - "Internationalization" of software means programming it to be able -to adapt to the user's favorite conventions. In ISO C, -internationalization works by means of "locales". Each locale -specifies a collection of conventions, one convention for each purpose. -The user chooses a set of conventions by specifying a locale (via -environment variables). + `EINVAL' + The conversion stopped because of an incomplete byte sequence + at the end of the input buffer. - All programs inherit the chosen locale as part of their environment. -Provided the programs are written to obey the choice of locale, they -will follow the conventions preferred by the user. + `EBADF' + The CD argument is invalid. -* Menu: + The `iconv' function was introduced in the XPG2 standard and is + declared in the `iconv.h' header. -* Effects of Locale:: Actions affected by the choice of - locale. -* Choosing Locale:: How the user specifies a locale. -* Locale Categories:: Different purposes for which you can - select a locale. -* Setting the Locale:: How a program specifies the locale - with library functions. -* Standard Locales:: Locale names available on all systems. -* Locale Information:: How to access the information for the locale. -* Formatting Numbers:: A dedicated function to format numbers. -* Yes-or-No Questions:: Check a Response against the locale. + The definition of the `iconv' function is quite good overall. It +provides quite flexible functionality. The only problems lie in the +boundary cases, which are incomplete byte sequences at the end of the +input buffer and invalid input. A third problem, which is not really a +design problem, is the way conversions are selected. The standard does +not say anything about the legitimate names, a minimal set of available +conversions. We will see how this negatively impacts other +implementations, as demonstrated below.  -File: libc.info, Node: Effects of Locale, Next: Choosing Locale, Up: Locales - -What Effects a Locale Has -========================= - - Each locale specifies conventions for several purposes, including the -following: - - * What multibyte character sequences are valid, and how they are - interpreted (*note Character Set Handling::). - - * Classification of which characters in the local character set are - considered alphabetic, and upper- and lower-case conversion - conventions (*note Character Handling::). +File: libc.info, Node: iconv Examples, Next: Other iconv Implementations, Prev: Generic Conversion Interface, Up: Generic Charset Conversion - * The collating sequence for the local language and character set - (*note Collation Functions::). +A complete `iconv' example +-------------------------- - * Formatting of numbers and currency amounts (*note General - Numeric::). + The example below features a solution for a common problem. Given +that one knows the internal encoding used by the system for `wchar_t' +strings, one often is in the position to read text from a file and store +it in wide character buffers. One can do this using `mbsrtowcs', but +then we run into the problems discussed above. - * Formatting of dates and times (*note Formatting Calendar Time::). + int + file2wcs (int fd, const char *charset, wchar_t *outbuf, size_t avail) + { + char inbuf[BUFSIZ]; + size_t insize = 0; + char *wrptr = (char *) outbuf; + int result = 0; + iconv_t cd; + + cd = iconv_open ("WCHAR_T", charset); + if (cd == (iconv_t) -1) + { + /* Something went wrong. */ + if (errno == EINVAL) + error (0, 0, "conversion from '%s' to wchar_t not available", + charset); + else + perror ("iconv_open"); + + /* Terminate the output string. */ + *outbuf = L'\0'; + + return -1; + } + + while (avail > 0) + { + size_t nread; + size_t nconv; + char *inptr = inbuf; + + /* Read more input. */ + nread = read (fd, inbuf + insize, sizeof (inbuf) - insize); + if (nread == 0) + { + /* When we come here the file is completely read. + This still could mean there are some unused + characters in the `inbuf'. Put them back. */ + if (lseek (fd, -insize, SEEK_CUR) == -1) + result = -1; + + /* Now write out the byte sequence to get into the + initial state if this is necessary. */ + iconv (cd, NULL, NULL, &wrptr, &avail); + + break; + } + insize += nread; + + /* Do the conversion. */ + nconv = iconv (cd, &inptr, &insize, &wrptr, &avail); + if (nconv == (size_t) -1) + { + /* Not everything went right. It might only be + an unfinished byte sequence at the end of the + buffer. Or it is a real problem. */ + if (errno == EINVAL) + /* This is harmless. Simply move the unused + bytes to the beginning of the buffer so that + they can be used in the next round. */ + memmove (inbuf, inptr, insize); + else + { + /* It is a real problem. Maybe we ran out of + space in the output buffer or we have invalid + input. In any case back the file pointer to + the position of the last processed byte. */ + lseek (fd, -insize, SEEK_CUR); + result = -1; + break; + } + } + } + + /* Terminate the output string. */ + if (avail >= sizeof (wchar_t)) + *((wchar_t *) wrptr) = L'\0'; + + if (iconv_close (cd) != 0) + perror ("iconv_close"); + + return (wchar_t *) wrptr - outbuf; + } - * What language to use for output, including error messages (*note - Message Translation::). + This example shows the most important aspects of using the `iconv' +functions. It shows how successive calls to `iconv' can be used to +convert large amounts of text. The user does not have to care about +stateful encodings as the functions take care of everything. - * What language to use for user answers to yes-or-no questions - (*note Yes-or-No Questions::). + An interesting point is the case where `iconv' returns an error and +`errno' is set to `EINVAL'. This is not really an error in the +transformation. It can happen whenever the input character set contains +byte sequences of more than one byte for some character and texts are +not processed in one piece. In this case there is a chance that a +multibyte sequence is cut. The caller can then simply read the +remainder of the takes and feed the offending bytes together with new +character from the input to `iconv' and continue the work. The +internal state kept in the descriptor is _not_ unspecified after such +an event as is the case with the conversion functions from the ISO C +standard. - * What language to use for more complex user input. (The C library - doesn't yet help you implement this.) + The example also shows the problem of using wide character strings +with `iconv'. As explained in the description of the `iconv' function +above, the function always takes a pointer to a `char' array and the +available space is measured in bytes. In the example, the output +buffer is a wide character buffer; therefore, we use a local variable +WRPTR of type `char *', which is used in the `iconv' calls. - Some aspects of adapting to the specified locale are handled -automatically by the library subroutines. For example, all your program -needs to do in order to use the collating sequence of the chosen locale -is to use `strcoll' or `strxfrm' to compare strings. + This looks rather innocent but can lead to problems on platforms that +have tight restriction on alignment. Therefore the caller of `iconv' +has to make sure that the pointers passed are suitable for access of +characters from the appropriate character set. Since, in the above +case, the input parameter to the function is a `wchar_t' pointer, this +is the case (unless the user violates alignment when computing the +parameter). But in other situations, especially when writing generic +functions where one does not know what type of character set one uses +and, therefore, treats text as a sequence of bytes, it might become +tricky. - Other aspects of locales are beyond the comprehension of the library. -For example, the library can't automatically translate your program's -output messages into other languages. The only way you can support -output in the user's favorite language is to program this more or less -by hand. The C library provides functions to handle translations for -multiple languages easily. + +File: libc.info, Node: Other iconv Implementations, Next: glibc iconv Implementation, Prev: iconv Examples, Up: Generic Charset Conversion - This chapter discusses the mechanism by which you can modify the -current locale. The effects of the current locale on specific library -functions are discussed in more detail in the descriptions of those -functions. +Some Details about other `iconv' Implementations +------------------------------------------------ - -File: libc.info, Node: Choosing Locale, Next: Locale Categories, Prev: Effects of Locale, Up: Locales + This is not really the place to discuss the `iconv' implementation +of other systems but it is necessary to know a bit about them to write +portable programs. The above mentioned problems with the specification +of the `iconv' functions can lead to portability issues. -Choosing a Locale -================= + The first thing to notice is that, due to the large number of +character sets in use, it is certainly not practical to encode the +conversions directly in the C library. Therefore, the conversion +information must come from files outside the C library. This is +usually done in one or both of the following ways: - The simplest way for the user to choose a locale is to set the -environment variable `LANG'. This specifies a single locale to use for -all purposes. For example, a user could specify a hypothetical locale -named `espana-castellano' to use the standard conventions of most of -Spain. + * The C library contains a set of generic conversion functions that + can read the needed conversion tables and other information from + data files. These files get loaded when necessary. - The set of locales supported depends on the operating system you are -using, and so do their names. We can't make any promises about what -locales will exist, except for one standard locale called `C' or -`POSIX'. Later we will describe how to construct locales. + This solution is problematic as it requires a great deal of effort + to apply to all character sets (potentially an infinite set). The + differences in the structure of the different character sets is so + large that many different variants of the table-processing + functions must be developed. In addition, the generic nature of + these functions make them slower than specifically implemented + functions. - A user also has the option of specifying different locales for -different purposes--in effect, choosing a mixture of multiple locales. + * The C library only contains a framework that can dynamically load + object files and execute the conversion functions contained + therein. - For example, the user might specify the locale `espana-castellano' -for most purposes, but specify the locale `usa-english' for currency -formatting. This might make sense if the user is a Spanish-speaking -American, working in Spanish, but representing monetary amounts in US -dollars. + This solution provides much more flexibility. The C library itself + contains only very little code and therefore reduces the general + memory footprint. Also, with a documented interface between the C + library and the loadable modules it is possible for third parties + to extend the set of available conversion modules. A drawback of + this solution is that dynamic loading must be available. - Note that both locales `espana-castellano' and `usa-english', like -all locales, would include conventions for all of the purposes to which -locales apply. However, the user can choose to use each locale for a -particular subset of those purposes. + Some implementations in commercial Unices implement a mixture of +these possibilities; the majority implement only the second solution. +Using loadable modules moves the code out of the library itself and +keeps the door open for extensions and improvements, but this design is +also limiting on some platforms since not many platforms support dynamic +loading in statically linked programs. On platforms without this +capability it is therefore not possible to use this interface in +statically linked programs. The GNU C library has, on ELF platforms, no +problems with dynamic loading in these situations; therefore, this +point is moot. The danger is that one gets acquainted with this +situation and forgets about the restrictions on other systems. - -File: libc.info, Node: Locale Categories, Next: Setting the Locale, Prev: Choosing Locale, Up: Locales + A second thing to know about other `iconv' implementations is that +the number of available conversions is often very limited. Some +implementations provide, in the standard release (not special +international or developer releases), at most 100 to 200 conversion +possibilities. This does not mean 200 different character sets are +supported; for example, conversions from one character set to a set of +10 others might count as 10 conversions. Together with the other +direction this makes 20 conversion possibilities used up by one +character set. One can imagine the thin coverage these platform +provide. Some Unix vendors even provide only a handful of conversions, +which renders them useless for almost all uses. -Categories of Activities that Locales Affect -============================================ + This directly leads to a third and probably the most problematic +point. The way the `iconv' conversion functions are implemented on all +known Unix systems and the availability of the conversion functions from +character set A to B and the conversion from B to C does _not_ imply +that the conversion from A to C is available. - The purposes that locales serve are grouped into "categories", so -that a user or a program can choose the locale for each category -independently. Here is a table of categories; each name is both an -environment variable that a user can set, and a macro name that you can -use as an argument to `setlocale'. + This might not seem unreasonable and problematic at first, but it is +a quite big problem as one will notice shortly after hitting it. To +show the problem we assume to write a program that has to convert from +A to C. A call like -`LC_COLLATE' - This category applies to collation of strings (functions `strcoll' - and `strxfrm'); see *Note Collation Functions::. + cd = iconv_open ("C", "A"); -`LC_CTYPE' - This category applies to classification and conversion of - characters, and to multibyte and wide characters; see *Note - Character Handling::, and *Note Character Set Handling::. +fails according to the assumption above. But what does the program do +now? The conversion is necessary; therefore, simply giving up is not +an option. -`LC_MONETARY' - This category applies to formatting monetary values; see *Note - General Numeric::. + This is a nuisance. The `iconv' function should take care of this. +But how should the program proceed from here on? If it tries to convert +to character set B, first the two `iconv_open' calls -`LC_NUMERIC' - This category applies to formatting numeric values that are not - monetary; see *Note General Numeric::. + cd1 = iconv_open ("B", "A"); -`LC_TIME' - This category applies to formatting date and time values; see - *Note Formatting Calendar Time::. +and -`LC_MESSAGES' - This category applies to selecting the language used in the user - interface for message translation (*note The Uniforum approach::; - *note Message catalogs a la X/Open::) and contains regular - expressions for affirmative and negative responses. + cd2 = iconv_open ("C", "B"); -`LC_ALL' - This is not an environment variable; it is only a macro that you - can use with `setlocale' to set a single locale for all purposes. - Setting this environment variable overwrites all selections by the - other `LC_*' variables or `LANG'. +will succeed, but how to find B? -`LANG' - If this environment variable is defined, its value specifies the - locale to use for all purposes except as overridden by the - variables above. + Unfortunately, the answer is: there is no general solution. On some +systems guessing might help. On those systems most character sets can +convert to and from UTF-8 encoded ISO 10646 or Unicode text. Beside +this only some very system-specific methods can help. Since the +conversion functions come from loadable modules and these modules must +be stored somewhere in the filesystem, one _could_ try to find them and +determine from the available file which conversions are available and +whether there is an indirect route from A to C. - When developing the message translation functions it was felt that -the functionality provided by the variables above is not sufficient. -For example, it should be possible to specify more than one locale name. -Take a Swedish user who better speaks German than English, and a program -whose messages are output in English by default. It should be possible -to specify that the first choice of language is Swedish, the second -German, and if this also fails to use English. This is possible with -the variable `LANGUAGE'. For further description of this GNU extension -see *Note Using gettextized software::. + This example shows one of the design errors of `iconv' mentioned +above. It should at least be possible to determine the list of +available conversion programmatically so that if `iconv_open' says +there is no such conversion, one could make sure this also is true for +indirect routes. diff -durpN glibc-2.2.4/manual/libc.info-11 glibc-2.2.5/manual/libc.info-11 --- glibc-2.2.4/manual/libc.info-11 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-11 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1124 +33,1009 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Setting the Locale, Next: Standard Locales, Prev: Locale Categories, Up: Locales - -How Programs Set the Locale -=========================== - - A C program inherits its locale environment variables when it starts -up. This happens automatically. However, these variables do not -automatically control the locale used by the library functions, because -ISO C says that all programs start by default in the standard `C' -locale. To use the locales specified by the environment, you must call -`setlocale'. Call it as follows: - - setlocale (LC_ALL, ""); - -to select a locale based on the user choice of the appropriate -environment variables. - - You can also use `setlocale' to specify a particular locale, for -general use or for a specific category. - - The symbols in this section are defined in the header file -`locale.h'. - - - Function: char * setlocale (int CATEGORY, const char *LOCALE) - The function `setlocale' sets the current locale for category - CATEGORY to LOCALE. A list of all the locales the system provides - can be created by running - - locale -a - - If CATEGORY is `LC_ALL', this specifies the locale for all - purposes. The other possible values of CATEGORY specify an single - purpose (*note Locale Categories::). - - You can also use this function to find out the current locale by - passing a null pointer as the LOCALE argument. In this case, - `setlocale' returns a string that is the name of the locale - currently selected for category CATEGORY. - - The string returned by `setlocale' can be overwritten by subsequent - calls, so you should make a copy of the string (*note Copying and - Concatenation::) if you want to save it past any further calls to - `setlocale'. (The standard library is guaranteed never to call - `setlocale' itself.) - - You should not modify the string returned by `setlocale'. It might - be the same string that was passed as an argument in a previous - call to `setlocale'. One requirement is that the CATEGORY must be - the same in the call the string was returned and the one when the - string is passed in as LOCALE parameter. - - When you read the current locale for category `LC_ALL', the value - encodes the entire combination of selected locales for all - categories. In this case, the value is not just a single locale - name. In fact, we don't make any promises about what it looks - like. But if you specify the same "locale name" with `LC_ALL' in - a subsequent call to `setlocale', it restores the same combination - of locale selections. - - To be sure you can use the returned string encoding the currently - selected locale at a later time, you must make a copy of the - string. It is not guaranteed that the returned pointer remains - valid over time. - - When the LOCALE argument is not a null pointer, the string returned - by `setlocale' reflects the newly-modified locale. - - If you specify an empty string for LOCALE, this means to read the - appropriate environment variable and use its value to select the - locale for CATEGORY. - - If a nonempty string is given for LOCALE, then the locale of that - name is used if possible. - - If you specify an invalid locale name, `setlocale' returns a null - pointer and leaves the current locale unchanged. - - Here is an example showing how you might use `setlocale' to -temporarily switch to a new locale. - - #include - #include - #include - #include - - void - with_other_locale (char *new_locale, - void (*subroutine) (int), - int argument) - { - char *old_locale, *saved_locale; - - /* Get the name of the current locale. */ - old_locale = setlocale (LC_ALL, NULL); - - /* Copy the name so it won't be clobbered by `setlocale'. */ - saved_locale = strdup (old_locale); - if (saved_locale == NULL) - fatal ("Out of memory"); - - /* Now change the locale and do some stuff with it. */ - setlocale (LC_ALL, new_locale); - (*subroutine) (argument); - - /* Restore the original locale. */ - setlocale (LC_ALL, saved_locale); - free (saved_locale); - } - - *Portability Note:* Some ISO C systems may define additional locale -categories, and future versions of the library will do so. For -portability, assume that any symbol beginning with `LC_' might be -defined in `locale.h'. - - -File: libc.info, Node: Standard Locales, Next: Locale Information, Prev: Setting the Locale, Up: Locales - -Standard Locales -================ - - The only locale names you can count on finding on all operating -systems are these three standard ones: - -`"C"' - This is the standard C locale. The attributes and behavior it - provides are specified in the ISO C standard. When your program - starts up, it initially uses this locale by default. - -`"POSIX"' - This is the standard POSIX locale. Currently, it is an alias for - the standard C locale. - -`""' - The empty name says to select a locale based on environment - variables. *Note Locale Categories::. - - Defining and installing named locales is normally a responsibility of -the system administrator at your site (or the person who installed the -GNU C library). It is also possible for the user to create private -locales. All this will be discussed later when describing the tool to -do so. - - If your program needs to use something other than the `C' locale, it -will be more portable if you use whatever locale the user specifies -with the environment, rather than trying to specify some non-standard -locale explicitly by name. Remember, different machines might have -different sets of locales installed. - - -File: libc.info, Node: Locale Information, Next: Formatting Numbers, Prev: Standard Locales, Up: Locales - -Accessing Locale Information -============================ - - There are several ways to access locale information. The simplest -way is to let the C library itself do the work. Several of the -functions in this library implicitly access the locale data, and use -what information is provided by the currently selected locale. This is -how the locale model is meant to work normally. - - As an example take the `strftime' function, which is meant to nicely -format date and time information (*note Formatting Calendar Time::). -Part of the standard information contained in the `LC_TIME' category is -the names of the months. Instead of requiring the programmer to take -care of providing the translations the `strftime' function does this -all by itself. `%A' in the format string is replaced by the -appropriate weekday name of the locale currently selected by `LC_TIME'. -This is an easy example, and wherever possible functions do things -automatically in this way. - - But there are quite often situations when there is simply no function -to perform the task, or it is simply not possible to do the work -automatically. For these cases it is necessary to access the -information in the locale directly. To do this the C library provides -two functions: `localeconv' and `nl_langinfo'. The former is part of -ISO C and therefore portable, but has a brain-damaged interface. The -second is part of the Unix interface and is portable in as far as the -system follows the Unix standards. - -* Menu: - -* The Lame Way to Locale Data:: ISO C's `localeconv'. -* The Elegant and Fast Way:: X/Open's `nl_langinfo'. - - -File: libc.info, Node: The Lame Way to Locale Data, Next: The Elegant and Fast Way, Up: Locale Information - -`localeconv': It is portable but ... ------------------------------------- - - Together with the `setlocale' function the ISO C people invented the -`localeconv' function. It is a masterpiece of poor design. It is -expensive to use, not extendable, and not generally usable as it -provides access to only `LC_MONETARY' and `LC_NUMERIC' related -information. Nevertheless, if it is applicable to a given situation it -should be used since it is very portable. The function `strfmon' -formats monetary amounts according to the selected locale using this -information. - - - Function: struct lconv * localeconv (void) - The `localeconv' function returns a pointer to a structure whose - components contain information about how numeric and monetary - values should be formatted in the current locale. - - You should not modify the structure or its contents. The - structure might be overwritten by subsequent calls to - `localeconv', or by calls to `setlocale', but no other function in - the library overwrites this value. - - - Data Type: struct lconv - `localeconv''s return value is of this data type. Its elements are - described in the following subsections. - - If a member of the structure `struct lconv' has type `char', and the -value is `CHAR_MAX', it means that the current locale has no value for -that parameter. - -* Menu: - -* General Numeric:: Parameters for formatting numbers and - currency amounts. -* Currency Symbol:: How to print the symbol that identifies an - amount of money (e.g. `$'). -* Sign of Money Amount:: How to print the (positive or negative) sign - for a monetary amount, if one exists. - - -File: libc.info, Node: General Numeric, Next: Currency Symbol, Up: The Lame Way to Locale Data - -Generic Numeric Formatting Parameters -..................................... - - These are the standard members of `struct lconv'; there may be -others. - -`char *decimal_point' -`char *mon_decimal_point' - These are the decimal-point separators used in formatting - non-monetary and monetary quantities, respectively. In the `C' - locale, the value of `decimal_point' is `"."', and the value of - `mon_decimal_point' is `""'. - -`char *thousands_sep' -`char *mon_thousands_sep' - These are the separators used to delimit groups of digits to the - left of the decimal point in formatting non-monetary and monetary - quantities, respectively. In the `C' locale, both members have a - value of `""' (the empty string). - -`char *grouping' -`char *mon_grouping' - These are strings that specify how to group the digits to the left - of the decimal point. `grouping' applies to non-monetary - quantities and `mon_grouping' applies to monetary quantities. Use - either `thousands_sep' or `mon_thousands_sep' to separate the digit - groups. - - Each member of these strings is to be interpreted as an integer - value of type `char'. Successive numbers (from left to right) - give the sizes of successive groups (from right to left, starting - at the decimal point.) The last member is either `0', in which - case the previous member is used over and over again for all the - remaining groups, or `CHAR_MAX', in which case there is no more - grouping--or, put another way, any remaining digits form one large - group without separators. - - For example, if `grouping' is `"\04\03\02"', the correct grouping - for the number `123456787654321' is `12', `34', `56', `78', `765', - `4321'. This uses a group of 4 digits at the end, preceded by a - group of 3 digits, preceded by groups of 2 digits (as many as - needed). With a separator of `,', the number would be printed as - `12,34,56,78,765,4321'. +File: libc.info, Node: glibc iconv Implementation, Prev: Other iconv Implementations, Up: Generic Charset Conversion - A value of `"\03"' indicates repeated groups of three digits, as - normally used in the U.S. +The `iconv' Implementation in the GNU C library +----------------------------------------------- - In the standard `C' locale, both `grouping' and `mon_grouping' - have a value of `""'. This value specifies no grouping at all. + After reading about the problems of `iconv' implementations in the +last section it is certainly good to note that the implementation in +the GNU C library has none of the problems mentioned above. What +follows is a step-by-step analysis of the points raised above. The +evaluation is based on the current state of the development (as of +January 1999). The development of the `iconv' functions is not +complete, but basic functionality has solidified. -`char int_frac_digits' -`char frac_digits' - These are small integers indicating how many fractional digits (to - the right of the decimal point) should be displayed in a monetary - value in international and local formats, respectively. (Most - often, both members have the same value.) + The GNU C library's `iconv' implementation uses shared loadable +modules to implement the conversions. A very small number of +conversions are built into the library itself but these are only rather +trivial conversions. - In the standard `C' locale, both of these members have the value - `CHAR_MAX', meaning "unspecified". The ISO standard doesn't say - what to do when you find this value; we recommend printing no - fractional digits. (This locale also specifies the empty string - for `mon_decimal_point', so printing any fractional digits would be - confusing!) + All the benefits of loadable modules are available in the GNU C +library implementation. This is especially appealing since the +interface is well documented (see below), and it, therefore, is easy to +write new conversion modules. The drawback of using loadable objects +is not a problem in the GNU C library, at least on ELF systems. Since +the library is able to load shared objects even in statically linked +binaries, static linking need not be forbidden in case one wants to use +`iconv'. - -File: libc.info, Node: Currency Symbol, Next: Sign of Money Amount, Prev: General Numeric, Up: The Lame Way to Locale Data + The second mentioned problem is the number of supported conversions. +Currently, the GNU C library supports more than 150 character sets. The +way the implementation is designed the number of supported conversions +is greater than 22350 (150 times 149). If any conversion from or to a +character set is missing, it can be added easily. -Printing the Currency Symbol -............................ + Particularly impressive as it may be, this high number is due to the +fact that the GNU C library implementation of `iconv' does not have the +third problem mentioned above (i.e., whenever there is a conversion +from a character set A to B and from B to C it is always possible to +convert from A to C directly). If the `iconv_open' returns an error +and sets `errno' to `EINVAL', there is no known way, directly or +indirectly, to perform the wanted conversion. - These members of the `struct lconv' structure specify how to print -the symbol to identify a monetary value--the international analog of -`$' for US dollars. + Triangulation is achieved by providing for each character set a +conversion from and to UCS-4 encoded ISO 10646. Using ISO 10646 as an +intermediate representation it is possible to "triangulate" (i.e., +convert with an intermediate representation). - Each country has two standard currency symbols. The "local currency -symbol" is used commonly within the country, while the "international -currency symbol" is used internationally to refer to that country's -currency when it is necessary to indicate the country unambiguously. + There is no inherent requirement to provide a conversion to +ISO 10646 for a new character set, and it is also possible to provide +other conversions where neither source nor destination character set is +ISO 10646. The existing set of conversions is simply meant to cover all +conversions that might be of interest. - For example, many countries use the dollar as their monetary unit, -and when dealing with international currencies it's important to specify -that one is dealing with (say) Canadian dollars instead of U.S. dollars -or Australian dollars. But when the context is known to be Canada, -there is no need to make this explicit--dollar amounts are implicitly -assumed to be in Canadian dollars. + All currently available conversions use the triangulation method +above, making conversion run unnecessarily slow. If, for example, +somebody often needs the conversion from ISO-2022-JP to EUC-JP, a +quicker solution would involve direct conversion between the two +character sets, skipping the input to ISO 10646 first. The two +character sets of interest are much more similar to each other than to +ISO 10646. -`char *currency_symbol' - The local currency symbol for the selected locale. + In such a situation one easily can write a new conversion and +provide it as a better alternative. The GNU C library `iconv' +implementation would automatically use the module implementing the +conversion if it is specified to be more efficient. - In the standard `C' locale, this member has a value of `""' (the - empty string), meaning "unspecified". The ISO standard doesn't - say what to do when you find this value; we recommend you simply - print the empty string as you would print any other string pointed - to by this variable. +Format of `gconv-modules' files +............................... -`char *int_curr_symbol' - The international currency symbol for the selected locale. + All information about the available conversions comes from a file +named `gconv-modules', which can be found in any of the directories +along the `GCONV_PATH'. The `gconv-modules' files are line-oriented +text files, where each of the lines has one of the following formats: - The value of `int_curr_symbol' should normally consist of a - three-letter abbreviation determined by the international standard - `ISO 4217 Codes for the Representation of Currency and Funds', - followed by a one-character separator (often a space). + * If the first non-whitespace character is a `#' the line contains + only comments and is ignored. - In the standard `C' locale, this member has a value of `""' (the - empty string), meaning "unspecified". We recommend you simply - print the empty string as you would print any other string pointed - to by this variable. + * Lines starting with `alias' define an alias name for a character + set. Two more words are expected on the line. The first word + defines the alias name, and the second defines the original name + of the character set. The effect is that it is possible to use + the alias name in the FROMSET or TOSET parameters of `iconv_open' + and achieve the same result as when using the real character set + name. -`char p_cs_precedes' -`char n_cs_precedes' -`char int_p_cs_precedes' -`char int_n_cs_precedes' - These members are `1' if the `currency_symbol' or - `int_curr_symbol' strings should precede the value of a monetary - amount, or `0' if the strings should follow the value. The - `p_cs_precedes' and `int_p_cs_precedes' members apply to positive - amounts (or zero), and the `n_cs_precedes' and `int_n_cs_precedes' - members apply to negative amounts. + This is quite important as a character set has often many different + names. There is normally an official name but this need not + correspond to the most popular name. Beside this many character + sets have special names that are somehow constructed. For + example, all character sets specified by the ISO have an alias of + the form `ISO-IR-NNN' where NNN is the registration number. This + allows programs that know about the registration number to + construct character set names and use them in `iconv_open' calls. + More on the available names and aliases follows below. - In the standard `C' locale, all of these members have a value of - `CHAR_MAX', meaning "unspecified". The ISO standard doesn't say - what to do when you find this value. We recommend printing the - currency symbol before the amount, which is right for most - countries. In other words, treat all nonzero values alike in - these members. + * Lines starting with `module' introduce an available conversion + module. These lines must contain three or four more words. - The members with the `int_' prefix apply to the `int_curr_symbol' - while the other two apply to `currency_symbol'. + The first word specifies the source character set, the second word + the destination character set of conversion implemented in this + module, and the third word is the name of the loadable module. + The filename is constructed by appending the usual shared object + suffix (normally `.so') and this file is then supposed to be found + in the same directory the `gconv-modules' file is in. The last + word on the line, which is optional, is a numeric value + representing the cost of the conversion. If this word is missing, + a cost of 1 is assumed. The numeric value itself does not matter + that much; what counts are the relative values of the sums of + costs for all possible conversion paths. Below is a more precise + description of the use of the cost value. -`char p_sep_by_space' -`char n_sep_by_space' -`char int_p_sep_by_space' -`char int_n_sep_by_space' - These members are `1' if a space should appear between the - `currency_symbol' or `int_curr_symbol' strings and the amount, or - `0' if no space should appear. The `p_sep_by_space' and - `int_p_sep_by_space' members apply to positive amounts (or zero), - and the `n_sep_by_space' and `int_n_sep_by_space' members apply to - negative amounts. + Returning to the example above where one has written a module to +directly convert from ISO-2022-JP to EUC-JP and back. All that has to +be done is to put the new module, let its name be ISO2022JP-EUCJP.so, +in a directory and add a file `gconv-modules' with the following +content in the same directory: - In the standard `C' locale, all of these members have a value of - `CHAR_MAX', meaning "unspecified". The ISO standard doesn't say - what you should do when you find this value; we suggest you treat - it as 1 (print a space). In other words, treat all nonzero values - alike in these members. + module ISO-2022-JP// EUC-JP// ISO2022JP-EUCJP 1 + module EUC-JP// ISO-2022-JP// ISO2022JP-EUCJP 1 - The members with the `int_' prefix apply to the `int_curr_symbol' - while the other two apply to `currency_symbol'. There is one - specialty with the `int_curr_symbol', though. Since all legal - values contain a space at the end the string one either printf - this space (if the currency symbol must appear in front and must - be separated) or one has to avoid printing this character at all - (especially when at the end of the string). + To see why this is sufficient, it is necessary to understand how the +conversion used by `iconv' (and described in the descriptor) is +selected. The approach to this problem is quite simple. - -File: libc.info, Node: Sign of Money Amount, Prev: Currency Symbol, Up: The Lame Way to Locale Data + At the first call of the `iconv_open' function the program reads all +available `gconv-modules' files and builds up two tables: one +containing all the known aliases and another that contains the +information about the conversions and which shared object implements +them. -Printing the Sign of a Monetary Amount +Finding the conversion path in `iconv' ...................................... - These members of the `struct lconv' structure specify how to print -the sign (if any) of a monetary value. - -`char *positive_sign' -`char *negative_sign' - These are strings used to indicate positive (or zero) and negative - monetary quantities, respectively. - - In the standard `C' locale, both of these members have a value of - `""' (the empty string), meaning "unspecified". + The set of available conversions form a directed graph with weighted +edges. The weights on the edges are the costs specified in the +`gconv-modules' files. The `iconv_open' function uses an algorithm +suitable for search for the best path in such a graph and so constructs +a list of conversions that must be performed in succession to get the +transformation from the source to the destination character set. - The ISO standard doesn't say what to do when you find this value; - we recommend printing `positive_sign' as you find it, even if it is - empty. For a negative value, print `negative_sign' as you find it - unless both it and `positive_sign' are empty, in which case print - `-' instead. (Failing to indicate the sign at all seems rather - unreasonable.) + Explaining why the above `gconv-modules' files allows the `iconv' +implementation to resolve the specific ISO-2022-JP to EUC-JP conversion +module instead of the conversion coming with the library itself is +straightforward. Since the latter conversion takes two steps (from +ISO-2022-JP to ISO 10646 and then from ISO 10646 to EUC-JP), the cost +is 1+1 = 2. The above `gconv-modules' file, however, specifies that +the new conversion modules can perform this conversion with only the +cost of 1. -`char p_sign_posn' -`char n_sign_posn' -`char int_p_sign_posn' -`char int_n_sign_posn' - These members are small integers that indicate how to position the - sign for nonnegative and negative monetary quantities, - respectively. (The string used by the sign is what was specified - with `positive_sign' or `negative_sign'.) The possible values are - as follows: + A mysterious item about the `gconv-modules' file above (and also the +file coming with the GNU C library) are the names of the character sets +specified in the `module' lines. Why do almost all the names end in +`//'? And this is not all: the names can actually be regular +expressions. At this point in time this mystery should not be +revealed, unless you have the relevant spell-casting materials: ashes +from an original DOS 6.2 boot disk burnt in effigy, a crucifix blessed +by St. Emacs, assorted herbal roots from Central America, sand from +Cebu, etc. Sorry! *The part of the implementation where this is used +is not yet finished. For now please simply follow the existing +examples. It'll become clearer once it is. -drepper* - `0' - The currency symbol and quantity should be surrounded by - parentheses. + A last remark about the `gconv-modules' is about the names not +ending with `//'. A character set named `INTERNAL' is often mentioned. +From the discussion above and the chosen name it should have become +clear that this is the name for the representation used in the +intermediate step of the triangulation. We have said that this is UCS-4 +but actually that is not quite right. The UCS-4 specification also +includes the specification of the byte ordering used. Since a UCS-4 +value consists of four bytes, a stored value is effected by byte +ordering. The internal representation is _not_ the same as UCS-4 in +case the byte ordering of the processor (or at least the running +process) is not the same as the one required for UCS-4. This is done +for performance reasons as one does not want to perform unnecessary +byte-swapping operations if one is not interested in actually seeing +the result in UCS-4. To avoid trouble with endianess, the internal +representation consistently is named `INTERNAL' even on big-endian +systems where the representations are identical. - `1' - Print the sign string before the quantity and currency symbol. +`iconv' module data structures +.............................. - `2' - Print the sign string after the quantity and currency symbol. + So far this section has described how modules are located and +considered to be used. What remains to be described is the interface +of the modules so that one can write new ones. This section describes +the interface as it is in use in January 1999. The interface will +change a bit in the future but, with luck, only in an upwardly +compatible way. - `3' - Print the sign string right before the currency symbol. + The definitions necessary to write new modules are publicly available +in the non-standard header `gconv.h'. The following text, therefore, +describes the definitions from this header file. First, however, it is +necessary to get an overview. - `4' - Print the sign string right after the currency symbol. + From the perspective of the user of `iconv' the interface is quite +simple: the `iconv_open' function returns a handle that can be used in +calls to `iconv', and finally the handle is freed with a call to +`iconv_close'. The problem is that the handle has to be able to +represent the possibly long sequences of conversion steps and also the +state of each conversion since the handle is all that is passed to the +`iconv' function. Therefore, the data structures are really the +elements necessary to understanding the implementation. - `CHAR_MAX' - "Unspecified". Both members have this value in the standard - `C' locale. + We need two different kinds of data structures. The first describes +the conversion and the second describes the state etc. There are +really two type definitions like this in `gconv.h'. - The ISO standard doesn't say what you should do when the value is - `CHAR_MAX'. We recommend you print the sign after the currency - symbol. + - Data type: struct __gconv_step + This data structure describes one conversion a module can perform. + For each function in a loaded module with conversion functions + there is exactly one object of this type. This object is shared + by all users of the conversion (i.e., this object does not contain + any information corresponding to an actual conversion; it only + describes the conversion itself). - The members with the `int_' prefix apply to the `int_curr_symbol' - while the other two apply to `currency_symbol'. + `struct __gconv_loaded_object *__shlib_handle' + `const char *__modname' + `int __counter' + All these elements of the structure are used internally in + the C library to coordinate loading and unloading the shared. + One must not expect any of the other elements to be + available or initialized. - -File: libc.info, Node: The Elegant and Fast Way, Prev: The Lame Way to Locale Data, Up: Locale Information + `const char *__from_name' + `const char *__to_name' + `__from_name' and `__to_name' contain the names of the source + and destination character sets. They can be used to identify + the actual conversion to be carried out since one module + might implement conversions for more than one character set + and/or direction. -Pinpoint Access to Locale Data ------------------------------- + `gconv_fct __fct' + `gconv_init_fct __init_fct' + `gconv_end_fct __end_fct' + These elements contain pointers to the functions in the + loadable module. The interface will be explained below. - When writing the X/Open Portability Guide the authors realized that -the `localeconv' function is not enough to provide reasonable access to -locale information. The information which was meant to be available in -the locale (as later specified in the POSIX.1 standard) requires more -ways to access it. Therefore the `nl_langinfo' function was introduced. + `int __min_needed_from' + `int __max_needed_from' + `int __min_needed_to' + `int __max_needed_to;' + These values have to be supplied in the init function of the + module. The `__min_needed_from' value specifies how many + bytes a character of the source character set at least needs. + The `__max_needed_from' specifies the maximum value that + also includes possible shift sequences. - - Function: char * nl_langinfo (nl_item ITEM) - The `nl_langinfo' function can be used to access individual - elements of the locale categories. Unlike the `localeconv' - function, which returns all the information, `nl_langinfo' lets - the caller select what information it requires. This is very fast - and it is not a problem to call this function multiple times. + The `__min_needed_to' and `__max_needed_to' values serve the + same purpose as `__min_needed_from' and `__max_needed_from' + but this time for the destination character set. - A second advantage is that in addition to the numeric and monetary - formatting information, information from the `LC_TIME' and - `LC_MESSAGES' categories is available. + It is crucial that these values be accurate since otherwise + the conversion functions will have problems or not work at + all. - The type `nl_type' is defined in `nl_types.h'. The argument ITEM - is a numeric value defined in the header `langinfo.h'. The X/Open - standard defines the following values: + `int __stateful' + This element must also be initialized by the init function. + `int __stateful' is nonzero if the source character set is + stateful. Otherwise it is zero. - `CODESET' - `nl_langinfo' returns a string with the name of the coded - character set used in the selected locale. + `void *__data' + This element can be used freely by the conversion functions + in the module. `void *__data' can be used to communicate + extra information from one call to another. `void *__data' + need not be initialized if not needed at all. If `void + *__data' element is assigned a pointer to dynamically + allocated memory (presumably in the init function) it has to + be made sure that the end function deallocates the memory. + Otherwise the application will leak memory. - `ABDAY_1' - `ABDAY_2' - `ABDAY_3' - `ABDAY_4' - `ABDAY_5' - `ABDAY_6' - `ABDAY_7' - `nl_langinfo' returns the abbreviated weekday name. `ABDAY_1' - corresponds to Sunday. + It is important to be aware that this data structure is + shared by all users of this specification conversion and + therefore the `__data' element must not contain data specific + to one specific use of the conversion function. - `DAY_1' - `DAY_2' - `DAY_3' - `DAY_4' - `DAY_5' - `DAY_6' - `DAY_7' - Similar to `ABDAY_1' etc., but here the return value is the - unabbreviated weekday name. + - Data type: struct __gconv_step_data + This is the data structure that contains the information specific + to each use of the conversion functions. - `ABMON_1' - `ABMON_2' - `ABMON_3' - `ABMON_4' - `ABMON_5' - `ABMON_6' - `ABMON_7' - `ABMON_8' - `ABMON_9' - `ABMON_10' - `ABMON_11' - `ABMON_12' - The return value is abbreviated name of the month. `ABMON_1' - corresponds to January. + `char *__outbuf' + `char *__outbufend' + These elements specify the output buffer for the conversion + step. The `__outbuf' element points to the beginning of the + buffer, and `__outbufend' points to the byte following the + last byte in the buffer. The conversion function must not + assume anything about the size of the buffer but it can be + safely assumed the there is room for at least one complete + character in the output buffer. - `MON_1' - `MON_2' - `MON_3' - `MON_4' - `MON_5' - `MON_6' - `MON_7' - `MON_8' - `MON_9' - `MON_10' - `MON_11' - `MON_12' - Similar to `ABMON_1' etc., but here the month names are not - abbreviated. Here the first value `MON_1' also corresponds - to January. + Once the conversion is finished, if the conversion is the + last step, the `__outbuf' element must be modified to point + after the last byte written into the buffer to signal how + much output is available. If this conversion step is not the + last one, the element must not be modified. The + `__outbufend' element must not be modified. - `AM_STR' - `PM_STR' - The return values are strings which can be used in the - representation of time as an hour from 1 to 12 plus an am/pm - specifier. + `int __is_last' + This element is nonzero if this conversion step is the last + one. This information is necessary for the recursion. See + the description of the conversion function internals below. + This element must never be modified. - Note that in locales which do not use this time representation - these strings might be empty, in which case the am/pm format - cannot be used at all. + `int __invocation_counter' + The conversion function can use this element to see how many + calls of the conversion function already happened. Some + character sets require a certain prolog when generating + output, and by comparing this value with zero, one can find + out whether it is the first call and whether, therefore, the + prolog should be emitted. This element must never be + modified. - `D_T_FMT' - The return value can be used as a format string for - `strftime' to represent time and date in a locale-specific - way. + `int __internal_use' + This element is another one rarely used but needed in certain + situations. It is assigned a nonzero value in case the + conversion functions are used to implement `mbsrtowcs' et.al. + (i.e., the function is not used directly through the `iconv' + interface). - `D_FMT' - The return value can be used as a format string for - `strftime' to represent a date in a locale-specific way. + This sometimes makes a difference as it is expected that the + `iconv' functions are used to translate entire texts while the + `mbsrtowcs' functions are normally used only to convert single + strings and might be used multiple times to convert entire + texts. - `T_FMT' - The return value can be used as a format string for - `strftime' to represent time in a locale-specific way. + But in this situation we would have problem complying with + some rules of the character set specification. Some + character sets require a prolog, which must appear exactly + once for an entire text. If a number of `mbsrtowcs' calls + are used to convert the text, only the first call must add + the prolog. However, because there is no communication + between the different calls of `mbsrtowcs', the conversion + functions have no possibility to find this out. The + situation is different for sequences of `iconv' calls since + the handle allows access to the needed information. - `T_FMT_AMPM' - The return value can be used as a format string for - `strftime' to represent time in the am/pm format. + The `int __internal_use' element is mostly used together with + `__invocation_counter' as follows: - Note that if the am/pm format does not make any sense for the - selected locale, the return value might be the same as the - one for `T_FMT'. + if (!data->__internal_use + && data->__invocation_counter == 0) + /* Emit prolog. */ + ... - `ERA' - The return value represents the era used in the current - locale. + This element must never be modified. - Most locales do not define this value. An example of a - locale which does define this value is the Japanese one. In - Japan, the traditional representation of dates includes the - name of the era corresponding to the then-emperor's reign. + `mbstate_t *__statep' + The `__statep' element points to an object of type `mbstate_t' + (*note Keeping the state::). The conversion of a stateful + character set must use the object pointed to by `__statep' to + store information about the conversion state. The `__statep' + element itself must never be modified. - Normally it should not be necessary to use this value - directly. Specifying the `E' modifier in their format - strings causes the `strftime' functions to use this - information. The format of the returned string is not - specified, and therefore you should not assume knowledge of - it on different systems. + `mbstate_t __state' + This element must _never_ be used directly. It is only part + of this structure to have the needed space allocated. - `ERA_YEAR' - The return value gives the year in the relevant era of the - locale. As for `ERA' it should not be necessary to use this - value directly. +`iconv' module interfaces +......................... - `ERA_D_T_FMT' - This return value can be used as a format string for - `strftime' to represent dates and times in a locale-specific - era-based way. + With the knowledge about the data structures we now can describe the +conversion function itself. To understand the interface a bit of +knowledge is necessary about the functionality in the C library that +loads the objects with the conversions. - `ERA_D_FMT' - This return value can be used as a format string for - `strftime' to represent a date in a locale-specific era-based - way. + It is often the case that one conversion is used more than once +(i.e., there are several `iconv_open' calls for the same set of +character sets during one program run). The `mbsrtowcs' et.al. +functions in the GNU C library also use the `iconv' functionality, which +increases the number of uses of the same functions even more. - `ERA_T_FMT' - This return value can be used as a format string for - `strftime' to represent time in a locale-specific era-based - way. + Because of this multiple use of conversions, the modules do not get +loaded exclusively for one conversion. Instead a module once loaded can +be used by an arbitrary number of `iconv' or `mbsrtowcs' calls at the +same time. The splitting of the information between conversion- +function-specific information and conversion data makes this possible. +The last section showed the two data structures used to do this. - `ALT_DIGITS' - The return value is a representation of up to 100 values used - to represent the values 0 to 99. As for `ERA' this value is - not intended to be used directly, but instead indirectly - through the `strftime' function. When the modifier `O' is - used in a format which would otherwise use numerals to - represent hours, minutes, seconds, weekdays, months, or - weeks, the appropriate value for the locale is used instead. + This is of course also reflected in the interface and semantics of +the functions that the modules must provide. There are three functions +that must have the following names: - `INT_CURR_SYMBOL' - The same as the value returned by `localeconv' in the - `int_curr_symbol' element of the `struct lconv'. +`gconv_init' + The `gconv_init' function initializes the conversion function + specific data structure. This very same object is shared by all + conversions that use this conversion and, therefore, no state + information about the conversion itself must be stored in here. + If a module implements more than one conversion, the `gconv_init' + function will be called multiple times. - `CURRENCY_SYMBOL' - `CRNCYSTR' - The same as the value returned by `localeconv' in the - `currency_symbol' element of the `struct lconv'. +`gconv_end' + The `gconv_end' function is responsible for freeing all resources + allocated by the `gconv_init' function. If there is nothing to do, + this function can be missing. Special care must be taken if the + module implements more than one conversion and the `gconv_init' + function does not allocate the same resources for all conversions. - `CRNCYSTR' is a deprecated alias still required by Unix98. +`gconv' + This is the actual conversion function. It is called to convert + one block of text. It gets passed the conversion step information + initialized by `gconv_init' and the conversion data, specific to + this use of the conversion functions. - `MON_DECIMAL_POINT' - The same as the value returned by `localeconv' in the - `mon_decimal_point' element of the `struct lconv'. + There are three data types defined for the three module interface +functions and these define the interface. - `MON_THOUSANDS_SEP' - The same as the value returned by `localeconv' in the - `mon_thousands_sep' element of the `struct lconv'. + - Data type: int (*__gconv_init_fct) (struct __gconv_step *) + This specifies the interface of the initialization function of the + module. It is called exactly once for each conversion the module + implements. - `MON_GROUPING' - The same as the value returned by `localeconv' in the - `mon_grouping' element of the `struct lconv'. + As explained in the description of the `struct __gconv_step' data + structure above the initialization function has to initialize + parts of it. - `POSITIVE_SIGN' - The same as the value returned by `localeconv' in the - `positive_sign' element of the `struct lconv'. + `__min_needed_from' + `__max_needed_from' + `__min_needed_to' + `__max_needed_to' + These elements must be initialized to the exact numbers of + the minimum and maximum number of bytes used by one character + in the source and destination character sets, respectively. + If the characters all have the same size, the minimum and + maximum values are the same. - `NEGATIVE_SIGN' - The same as the value returned by `localeconv' in the - `negative_sign' element of the `struct lconv'. + `__stateful' + This element must be initialized to an nonzero value if the + source character set is stateful. Otherwise it must be zero. - `INT_FRAC_DIGITS' - The same as the value returned by `localeconv' in the - `int_frac_digits' element of the `struct lconv'. + If the initialization function needs to communicate some + information to the conversion function, this communication can + happen using the `__data' element of the `__gconv_step' structure. + But since this data is shared by all the conversions, it must not + be modified by the conversion function. The example below shows + how this can be used. - `FRAC_DIGITS' - The same as the value returned by `localeconv' in the - `frac_digits' element of the `struct lconv'. + #define MIN_NEEDED_FROM 1 + #define MAX_NEEDED_FROM 4 + #define MIN_NEEDED_TO 4 + #define MAX_NEEDED_TO 4 + + int + gconv_init (struct __gconv_step *step) + { + /* Determine which direction. */ + struct iso2022jp_data *new_data; + enum direction dir = illegal_dir; + enum variant var = illegal_var; + int result; + + if (__strcasecmp (step->__from_name, "ISO-2022-JP//") == 0) + { + dir = from_iso2022jp; + var = iso2022jp; + } + else if (__strcasecmp (step->__to_name, "ISO-2022-JP//") == 0) + { + dir = to_iso2022jp; + var = iso2022jp; + } + else if (__strcasecmp (step->__from_name, "ISO-2022-JP-2//") == 0) + { + dir = from_iso2022jp; + var = iso2022jp2; + } + else if (__strcasecmp (step->__to_name, "ISO-2022-JP-2//") == 0) + { + dir = to_iso2022jp; + var = iso2022jp2; + } + + result = __GCONV_NOCONV; + if (dir != illegal_dir) + { + new_data = (struct iso2022jp_data *) + malloc (sizeof (struct iso2022jp_data)); + + result = __GCONV_NOMEM; + if (new_data != NULL) + { + new_data->dir = dir; + new_data->var = var; + step->__data = new_data; + + if (dir == from_iso2022jp) + { + step->__min_needed_from = MIN_NEEDED_FROM; + step->__max_needed_from = MAX_NEEDED_FROM; + step->__min_needed_to = MIN_NEEDED_TO; + step->__max_needed_to = MAX_NEEDED_TO; + } + else + { + step->__min_needed_from = MIN_NEEDED_TO; + step->__max_needed_from = MAX_NEEDED_TO; + step->__min_needed_to = MIN_NEEDED_FROM; + step->__max_needed_to = MAX_NEEDED_FROM + 2; + } + + /* Yes, this is a stateful encoding. */ + step->__stateful = 1; + + result = __GCONV_OK; + } + } + + return result; + } - `P_CS_PRECEDES' - The same as the value returned by `localeconv' in the - `p_cs_precedes' element of the `struct lconv'. + The function first checks which conversion is wanted. The module + from which this function is taken implements four different + conversions; which one is selected can be determined by comparing + the names. The comparison should always be done without paying + attention to the case. - `P_SEP_BY_SPACE' - The same as the value returned by `localeconv' in the - `p_sep_by_space' element of the `struct lconv'. + Next, a data structure, which contains the necessary information + about which conversion is selected, is allocated. The data + structure `struct iso2022jp_data' is locally defined since, + outside the module, this data is not used at all. Please note + that if all four conversions this modules supports are requested + there are four data blocks. - `N_CS_PRECEDES' - The same as the value returned by `localeconv' in the - `n_cs_precedes' element of the `struct lconv'. + One interesting thing is the initialization of the `__min_' and + `__max_' elements of the step data object. A single ISO-2022-JP + character can consist of one to four bytes. Therefore the + `MIN_NEEDED_FROM' and `MAX_NEEDED_FROM' macros are defined this + way. The output is always the `INTERNAL' character set (aka + UCS-4) and therefore each character consists of exactly four + bytes. For the conversion from `INTERNAL' to ISO-2022-JP we have + to take into account that escape sequences might be necessary to + switch the character sets. Therefore the `__max_needed_to' + element for this direction gets assigned `MAX_NEEDED_FROM + 2'. + This takes into account the two bytes needed for the escape + sequences to single the switching. The asymmetry in the maximum + values for the two directions can be explained easily: when + reading ISO-2022-JP text, escape sequences can be handled alone + (i.e., it is not necessary to process a real character since the + effect of the escape sequence can be recorded in the state + information). The situation is different for the other direction. + Since it is in general not known which character comes next, one + cannot emit escape sequences to change the state in advance. This + means the escape sequences that have to be emitted together with + the next character. Therefore one needs more room than only for + the character itself. - `N_SEP_BY_SPACE' - The same as the value returned by `localeconv' in the - `n_sep_by_space' element of the `struct lconv'. + The possible return values of the initialization function are: - `P_SIGN_POSN' - The same as the value returned by `localeconv' in the - `p_sign_posn' element of the `struct lconv'. + `__GCONV_OK' + The initialization succeeded - `N_SIGN_POSN' - The same as the value returned by `localeconv' in the - `n_sign_posn' element of the `struct lconv'. + `__GCONV_NOCONV' + The requested conversion is not supported in the module. + This can happen if the `gconv-modules' file has errors. - `INT_P_CS_PRECEDES' - The same as the value returned by `localeconv' in the - `int_p_cs_precedes' element of the `struct lconv'. + `__GCONV_NOMEM' + Memory required to store additional information could not be + allocated. - `INT_P_SEP_BY_SPACE' - The same as the value returned by `localeconv' in the - `int_p_sep_by_space' element of the `struct lconv'. + The function called before the module is unloaded is significantly +easier. It often has nothing at all to do; in which case it can be left +out completely. - `INT_N_CS_PRECEDES' - The same as the value returned by `localeconv' in the - `int_n_cs_precedes' element of the `struct lconv'. + - Data type: void (*__gconv_end_fct) (struct gconv_step *) + The task of this function is to free all resources allocated in the + initialization function. Therefore only the `__data' element of + the object pointed to by the argument is of interest. Continuing + the example from the initialization function, the finalization + function looks like this: - `INT_N_SEP_BY_SPACE' - The same as the value returned by `localeconv' in the - `int_n_sep_by_space' element of the `struct lconv'. + void + gconv_end (struct __gconv_step *data) + { + free (data->__data); + } - `INT_P_SIGN_POSN' - The same as the value returned by `localeconv' in the - `int_p_sign_posn' element of the `struct lconv'. + The most important function is the conversion function itself, which +can get quite complicated for complex character sets. But since this +is not of interest here, we will only describe a possible skeleton for +the conversion function. - `INT_N_SIGN_POSN' - The same as the value returned by `localeconv' in the - `int_n_sign_posn' element of the `struct lconv'. + - Data type: int (*__gconv_fct) (struct __gconv_step *, struct + __gconv_step_data *, const char **, const char *, size_t *, + int) + The conversion function can be called for two basic reason: to + convert text or to reset the state. From the description of the + `iconv' function it can be seen why the flushing mode is + necessary. What mode is selected is determined by the sixth + argument, an integer. This argument being nonzero means that + flushing is selected. - `DECIMAL_POINT' - `RADIXCHAR' - The same as the value returned by `localeconv' in the - `decimal_point' element of the `struct lconv'. + Common to both modes is where the output buffer can be found. The + information about this buffer is stored in the conversion step + data. A pointer to this information is passed as the second + argument to this function. The description of the `struct + __gconv_step_data' structure has more information on the + conversion step data. - The name `RADIXCHAR' is a deprecated alias still used in - Unix98. + What has to be done for flushing depends on the source character + set. If the source character set is not stateful, nothing has to + be done. Otherwise the function has to emit a byte sequence to + bring the state object into the initial state. Once this all + happened the other conversion modules in the chain of conversions + have to get the same chance. Whether another step follows can be + determined from the `__is_last' element of the step data structure + to which the first parameter points. - `THOUSANDS_SEP' - `THOUSEP' - The same as the value returned by `localeconv' in the - `thousands_sep' element of the `struct lconv'. + The more interesting mode is when actual text has to be converted. + The first step in this case is to convert as much text as + possible from the input buffer and store the result in the output + buffer. The start of the input buffer is determined by the third + argument, which is a pointer to a pointer variable referencing the + beginning of the buffer. The fourth argument is a pointer to the + byte right after the last byte in the buffer. - The name `THOUSEP' is a deprecated alias still used in Unix98. + The conversion has to be performed according to the current state + if the character set is stateful. The state is stored in an + object pointed to by the `__statep' element of the step data + (second argument). Once either the input buffer is empty or the + output buffer is full the conversion stops. At this point, the + pointer variable referenced by the third parameter must point to + the byte following the last processed byte (i.e., if all of the + input is consumed, this pointer and the fourth parameter have the + same value). - `GROUPING' - The same as the value returned by `localeconv' in the - `grouping' element of the `struct lconv'. + What now happens depends on whether this step is the last one. If + it is the last step, the only thing that has to be done is to + update the `__outbuf' element of the step data structure to point + after the last written byte. This update gives the caller the + information on how much text is available in the output buffer. + In addition, the variable pointed to by the fifth parameter, which + is of type `size_t', must be incremented by the number of + characters (_not bytes_) that were converted in a non-reversible + way. Then, the function can return. - `YESEXPR' - The return value is a regular expression which can be used - with the `regex' function to recognize a positive response to - a yes/no question. The GNU C library provides the `rpmatch' - function for easier handling in applications. + In case the step is not the last one, the later conversion + functions have to get a chance to do their work. Therefore, the + appropriate conversion function has to be called. The information + about the functions is stored in the conversion data structures, + passed as the first parameter. This information and the step data + are stored in arrays, so the next element in both cases can be + found by simple pointer arithmetic: - `NOEXPR' - The return value is a regular expression which can be used - with the `regex' function to recognize a negative response to - a yes/no question. + int + gconv (struct __gconv_step *step, struct __gconv_step_data *data, + const char **inbuf, const char *inbufend, size_t *written, + int do_flush) + { + struct __gconv_step *next_step = step + 1; + struct __gconv_step_data *next_data = data + 1; + ... - `YESSTR' - The return value is a locale-specific translation of the - positive response to a yes/no question. + The `next_step' pointer references the next step information and + `next_data' the next data record. The call of the next function + therefore will look similar to this: - Using this value is deprecated since it is a very special - case of message translation, and is better handled by the - message translation functions (*note Message Translation::). + next_step->__fct (next_step, next_data, &outerr, outbuf, + written, 0) - The use of this symbol is deprecated. Instead message - translation should be used. + But this is not yet all. Once the function call returns the + conversion function might have some more to do. If the return + value of the function is `__GCONV_EMPTY_INPUT', more room is + available in the output buffer. Unless the input buffer is empty + the conversion, functions start all over again and process the + rest of the input buffer. If the return value is not + `__GCONV_EMPTY_INPUT', something went wrong and we have to recover + from this. - `NOSTR' - The return value is a locale-specific translation of the - negative response to a yes/no question. What is said for - `YESSTR' is also true here. + A requirement for the conversion function is that the input buffer + pointer (the third argument) always point to the last character + that was put in converted form into the output buffer. This is + trivially true after the conversion performed in the current step, + but if the conversion functions deeper downstream stop + prematurely, not all characters from the output buffer are + consumed and, therefore, the input buffer pointers must be backed + off to the right position. - The use of this symbol is deprecated. Instead message - translation should be used. + Correcting the input buffers is easy to do if the input and output + character sets have a fixed width for all characters. In this + situation we can compute how many characters are left in the + output buffer and, therefore, can correct the input buffer pointer + appropriately with a similar computation. Things are getting + tricky if either character set has characters represented with + variable length byte sequences, and it gets even more complicated + if the conversion has to take care of the state. In these cases + the conversion has to be performed once again, from the known + state before the initial conversion (i.e., if necessary the state + of the conversion has to be reset and the conversion loop has to be + executed again). The difference now is that it is known how much + input must be created, and the conversion can stop before + converting the first unused character. Once this is done the + input buffer pointers must be updated again and the function can + return. - The file `langinfo.h' defines a lot more symbols but none of them - is official. Using them is not portable, and the format of the - return values might change. Therefore we recommended you not use - them. + One final thing should be mentioned. If it is necessary for the + conversion to know whether it is the first invocation (in case a + prolog has to be emitted), the conversion function should + increment the `__invocation_counter' element of the step data + structure just before returning to the caller. See the + description of the `struct __gconv_step_data' structure above for + more information on how this can be used. - Note that the return value for any valid argument can be used for - in all situations (with the possible exception of the am/pm time - formatting codes). If the user has not selected any locale for the - appropriate category, `nl_langinfo' returns the information from - the `"C"' locale. It is therefore possible to use this function as - shown in the example below. + The return value must be one of the following values: - If the argument ITEM is not valid, a pointer to an empty string is - returned. + `__GCONV_EMPTY_INPUT' + All input was consumed and there is room left in the output + buffer. - An example of `nl_langinfo' usage is a function which has to print a -given date and time in a locale-specific way. At first one might think -that, since `strftime' internally uses the locale information, writing -something like the following is enough: + `__GCONV_FULL_OUTPUT' + No more room in the output buffer. In case this is not the + last step this value is propagated down from the call of the + next conversion function in the chain. - size_t - i18n_time_n_data (char *s, size_t len, const struct tm *tp) - { - return strftime (s, len, "%X %D", tp); - } + `__GCONV_INCOMPLETE_INPUT' + The input buffer is not entirely empty since it contains an + incomplete character sequence. - The format contains no weekday or month names and therefore is -internationally usable. Wrong! The output produced is something like -`"hh:mm:ss MM/DD/YY"'. This format is only recognizable in the USA. -Other countries use different formats. Therefore the function should -be rewritten like this: + The following example provides a framework for a conversion + function. In case a new conversion has to be written the holes in + this implementation have to be filled and that is it. - size_t - i18n_time_n_data (char *s, size_t len, const struct tm *tp) - { - return strftime (s, len, nl_langinfo (D_T_FMT), tp); - } + int + gconv (struct __gconv_step *step, struct __gconv_step_data *data, + const char **inbuf, const char *inbufend, size_t *written, + int do_flush) + { + struct __gconv_step *next_step = step + 1; + struct __gconv_step_data *next_data = data + 1; + gconv_fct fct = next_step->__fct; + int status; + + /* If the function is called with no input this means we have + to reset to the initial state. The possibly partly + converted input is dropped. */ + if (do_flush) + { + status = __GCONV_OK; + + /* Possible emit a byte sequence which put the state object + into the initial state. */ + + /* Call the steps down the chain if there are any but only + if we successfully emitted the escape sequence. */ + if (status == __GCONV_OK && ! data->__is_last) + status = fct (next_step, next_data, NULL, NULL, + written, 1); + } + else + { + /* We preserve the initial values of the pointer variables. */ + const char *inptr = *inbuf; + char *outbuf = data->__outbuf; + char *outend = data->__outbufend; + char *outptr; + + do + { + /* Remember the start value for this round. */ + inptr = *inbuf; + /* The outbuf buffer is empty. */ + outptr = outbuf; + + /* For stateful encodings the state must be safe here. */ + + /* Run the conversion loop. `status' is set + appropriately afterwards. */ + + /* If this is the last step, leave the loop. There is + nothing we can do. */ + if (data->__is_last) + { + /* Store information about how many bytes are + available. */ + data->__outbuf = outbuf; + + /* If any non-reversible conversions were performed, + add the number to `*written'. */ + + break; + } + + /* Write out all output that was produced. */ + if (outbuf > outptr) + { + const char *outerr = data->__outbuf; + int result; + + result = fct (next_step, next_data, &outerr, + outbuf, written, 0); + + if (result != __GCONV_EMPTY_INPUT) + { + if (outerr != outbuf) + { + /* Reset the input buffer pointer. We + document here the complex case. */ + size_t nstatus; + + /* Reload the pointers. */ + *inbuf = inptr; + outbuf = outptr; + + /* Possibly reset the state. */ + + /* Redo the conversion, but this time + the end of the output buffer is at + `outerr'. */ + } + + /* Change the status. */ + status = result; + } + else + /* All the output is consumed, we can make + another run if everything was ok. */ + if (status == __GCONV_FULL_OUTPUT) + status = __GCONV_OK; + } + } + while (status == __GCONV_OK); + + /* We finished one use of this step. */ + ++data->__invocation_counter; + } + + return status; + } - Now it uses the date and time format of the locale selected when the -program runs. If the user selects the locale correctly there should -never be a misunderstanding over the time and date format. + This information should be sufficient to write new modules. Anybody +doing so should also take a look at the available source code in the GNU +C library sources. It contains many examples of working and optimized +modules.  -File: libc.info, Node: Formatting Numbers, Next: Yes-or-No Questions, Prev: Locale Information, Up: Locales - -A dedicated function to format numbers -====================================== - - We have seen that the structure returned by `localeconv' as well as -the values given to `nl_langinfo' allow you to retrieve the various -pieces of locale-specific information to format numbers and monetary -amounts. We have also seen that the underlying rules are quite complex. - - Therefore the X/Open standards introduce a function which uses such -locale information, making it easier for the user to format numbers -according to these rules. - - - Function: ssize_t strfmon (char *S, size_t MAXSIZE, const char - *FORMAT, ...) - The `strfmon' function is similar to the `strftime' function in - that it takes a buffer, its size, a format string, and values to - write into the buffer as text in a form specified by the format - string. Like `strftime', the function also returns the number of - bytes written into the buffer. - - There are two differences: `strfmon' can take more than one - argument, and, of course, the format specification is different. - Like `strftime', the format string consists of normal text, which - is output as is, and format specifiers, which are indicated by a - `%'. Immediately after the `%', you can optionally specify - various flags and formatting information before the main - formatting character, in a similar way to `printf': - - * Immediately following the `%' there can be one or more of the - following flags: - `=F' - The single byte character F is used for this field as - the numeric fill character. By default this character - is a space character. Filling with this character is - only performed if a left precision is specified. It is - not just to fill to the given field width. - - `^' - The number is printed without grouping the digits - according to the rules of the current locale. By - default grouping is enabled. - - `+', `(' - At most one of these flags can be used. They select - which format to represent the sign of a currency amount. - By default, and if `+' is given, the locale equivalent - of +/- is used. If `(' is given, negative amounts are - enclosed in parentheses. The exact format is determined - by the values of the `LC_MONETARY' category of the - locale selected at program runtime. - - `!' - The output will not contain the currency symbol. - - `-' - The output will be formatted left-justified instead of - right-justified if it does not fill the entire field - width. - - The next part of a specification is an optional field width. If no - width is specified 0 is taken. During output, the function first - determines how much space is required. If it requires at least as - many characters as given by the field width, it is output using as - much space as necessary. Otherwise, it is extended to use the - full width by filling with the space character. The presence or - absence of the `-' flag determines the side at which such padding - occurs. If present, the spaces are added at the right making the - output left-justified, and vice versa. - - So far the format looks familiar, being similar to the `printf' and - `strftime' formats. However, the next two optional fields - introduce something new. The first one is a `#' character followed - by a decimal digit string. The value of the digit string - specifies the number of _digit_ positions to the left of the - decimal point (or equivalent). This does _not_ include the - grouping character when the `^' flag is not given. If the space - needed to print the number does not fill the whole width, the - field is padded at the left side with the fill character, which - can be selected using the `=' flag and by default is a space. For - example, if the field width is selected as 6 and the number is - 123, the fill character is `*' the result will be `***123'. - - The second optional field starts with a `.' (period) and consists - of another decimal digit string. Its value describes the number of - characters printed after the decimal point. The default is - selected from the current locale (`frac_digits', - `int_frac_digits', see *note General Numeric::). If the exact - representation needs more digits than given by the field width, - the displayed value is rounded. If the number of fractional - digits is selected to be zero, no decimal point is printed. - - As a GNU extension, the `strfmon' implementation in the GNU libc - allows an optional `L' next as a format modifier. If this modifier - is given, the argument is expected to be a `long double' instead of - a `double' value. - - Finally, the last component is a format specifier. There are three - specifiers defined: - - `i' - Use the locale's rules for formatting an international - currency value. +File: libc.info, Node: Locales, Next: Message Translation, Prev: Character Set Handling, Up: Top - `n' - Use the locale's rules for formatting a national currency - value. +Locales and Internationalization +******************************** - `%' - Place a `%' in the output. There must be no flag, width - specifier or modifier given, only `%%' is allowed. + Different countries and cultures have varying conventions for how to +communicate. These conventions range from very simple ones, such as the +format for representing dates and times, to very complex ones, such as +the language spoken. - As for `printf', the function reads the format string from left to - right and uses the values passed to the function following the - format string. The values are expected to be either of type - `double' or `long double', depending on the presence of the - modifier `L'. The result is stored in the buffer pointed to by S. - At most MAXSIZE characters are stored. + "Internationalization" of software means programming it to be able +to adapt to the user's favorite conventions. In ISO C, +internationalization works by means of "locales". Each locale +specifies a collection of conventions, one convention for each purpose. +The user chooses a set of conventions by specifying a locale (via +environment variables). - The return value of the function is the number of characters - stored in S, including the terminating `NULL' byte. If the number - of characters stored would exceed MAXSIZE, the function returns -1 - and the content of the buffer S is unspecified. In this case - `errno' is set to `E2BIG'. + All programs inherit the chosen locale as part of their environment. +Provided the programs are written to obey the choice of locale, they +will follow the conventions preferred by the user. - A few examples should make clear how the function works. It is -assumed that all the following pieces of code are executed in a program -which uses the USA locale (`en_US'). The simplest form of the format -is this: +* Menu: - strfmon (buf, 100, "@%n@%n@%n@", 123.45, -567.89, 12345.678); +* Effects of Locale:: Actions affected by the choice of + locale. +* Choosing Locale:: How the user specifies a locale. +* Locale Categories:: Different purposes for which you can + select a locale. +* Setting the Locale:: How a program specifies the locale + with library functions. +* Standard Locales:: Locale names available on all systems. +* Locale Information:: How to access the information for the locale. +* Formatting Numbers:: A dedicated function to format numbers. +* Yes-or-No Questions:: Check a Response against the locale. -The output produced is - "@$123.45@-$567.89@$12,345.68@" + +File: libc.info, Node: Effects of Locale, Next: Choosing Locale, Up: Locales - We can notice several things here. First, the widths of the output -numbers are different. We have not specified a width in the format -string, and so this is no wonder. Second, the third number is printed -using thousands separators. The thousands separator for the `en_US' -locale is a comma. The number is also rounded. .678 is rounded to .68 -since the format does not specify a precision and the default value in -the locale is 2. Finally, note that the national currency symbol is -printed since `%n' was used, not `i'. The next example shows how we -can align the output. +What Effects a Locale Has +========================= - strfmon (buf, 100, "@%=*11n@%=*11n@%=*11n@", 123.45, -567.89, 12345.678); + Each locale specifies conventions for several purposes, including the +following: -The output this time is: + * What multibyte character sequences are valid, and how they are + interpreted (*note Character Set Handling::). - "@ $123.45@ -$567.89@ $12,345.68@" + * Classification of which characters in the local character set are + considered alphabetic, and upper- and lower-case conversion + conventions (*note Character Handling::). - Two things stand out. Firstly, all fields have the same width -(eleven characters) since this is the width given in the format and -since no number required more characters to be printed. The second -important point is that the fill character is not used. This is -correct since the white space was not used to achieve a precision given -by a `#' modifier, but instead to fill to the given width. The -difference becomes obvious if we now add a width specification. + * The collating sequence for the local language and character set + (*note Collation Functions::). - strfmon (buf, 100, "@%=*11#5n@%=*11#5n@%=*11#5n@", - 123.45, -567.89, 12345.678); + * Formatting of numbers and currency amounts (*note General + Numeric::). -The output is + * Formatting of dates and times (*note Formatting Calendar Time::). - "@ $***123.45@-$***567.89@ $12,456.68@" + * What language to use for output, including error messages (*note + Message Translation::). - Here we can see that all the currency symbols are now aligned, and -that the space between the currency sign and the number is filled with -the selected fill character. Note that although the width is selected -to be 5 and 123.45 has three digits left of the decimal point, the -space is filled with three asterisks. This is correct since, as -explained above, the width does not include the positions used to store -thousands separators. One last example should explain the remaining -functionality. + * What language to use for user answers to yes-or-no questions + (*note Yes-or-No Questions::). - strfmon (buf, 100, "@%=0(16#5.3i@%=0(16#5.3i@%=0(16#5.3i@", - 123.45, -567.89, 12345.678); + * What language to use for more complex user input. (The C library + doesn't yet help you implement this.) -This rather complex format string produces the following output: + Some aspects of adapting to the specified locale are handled +automatically by the library subroutines. For example, all your program +needs to do in order to use the collating sequence of the chosen locale +is to use `strcoll' or `strxfrm' to compare strings. - "@ USD 000123,450 @(USD 000567.890)@ USD 12,345.678 @" + Other aspects of locales are beyond the comprehension of the library. +For example, the library can't automatically translate your program's +output messages into other languages. The only way you can support +output in the user's favorite language is to program this more or less +by hand. The C library provides functions to handle translations for +multiple languages easily. - The most noticeable change is the alternative way of representing -negative numbers. In financial circles this is often done using -parentheses, and this is what the `(' flag selected. The fill -character is now `0'. Note that this `0' character is not regarded as -a numeric zero, and therefore the first and second numbers are not -printed using a thousands separator. Since we used the format -specifier `i' instead of `n', the international form of the currency -symbol is used. This is a four letter string, in this case `"USD "'. -The last point is that since the precision right of the decimal point -is selected to be three, the first and second numbers are printed with -an extra zero at the end and the third number is printed without -rounding. + This chapter discusses the mechanism by which you can modify the +current locale. The effects of the current locale on specific library +functions are discussed in more detail in the descriptions of those +functions.  -File: libc.info, Node: Yes-or-No Questions, Prev: Formatting Numbers, Up: Locales - -Yes-or-No Questions -=================== - - Some non GUI programs ask a yes-or-no question. If the messages -(especially the questions) are translated into foreign languages, be -sure that you localize the answers too. It would be very bad habit to -ask a question in one language and request the answer in another, often -English. - - The GNU C library contains `rpmatch' to give applications easy -access to the corresponding locale definitions. - - - Function: int rpmatch (const char *RESPONSE) - The function `rpmatch' checks the string in RESPONSE whether or - not it is a correct yes-or-no answer and if yes, which one. The - check uses the `YESEXPR' and `NOEXPR' data in the `LC_MESSAGES' - category of the currently selected locale. The return value is as - follows: - - `1' - The user entered an affirmative answer. +File: libc.info, Node: Choosing Locale, Next: Locale Categories, Prev: Effects of Locale, Up: Locales - `0' - The user entered a negative answer. +Choosing a Locale +================= - `-1' - The answer matched neither the `YESEXPR' nor the `NOEXPR' - regular expression. + The simplest way for the user to choose a locale is to set the +environment variable `LANG'. This specifies a single locale to use for +all purposes. For example, a user could specify a hypothetical locale +named `espana-castellano' to use the standard conventions of most of +Spain. - This function is not standardized but available beside in GNU libc - at least also in the IBM AIX library. + The set of locales supported depends on the operating system you are +using, and so do their names. We can't make any promises about what +locales will exist, except for one standard locale called `C' or +`POSIX'. Later we will describe how to construct locales. -This function would normally be used like this: + A user also has the option of specifying different locales for +different purposes--in effect, choosing a mixture of multiple locales. - ... - /* Use a safe default. */ - _Bool doit = false; - - fputs (gettext ("Do you really want to do this? "), stdout); - fflush (stdout); - /* Prepare the `getline' call. */ - line = NULL; - len = 0; - while (getline (&line, &len, stdout) >= 0) - { - /* Check the response. */ - int res = rpmatch (line); - if (res >= 0) - { - /* We got a definitive answer. */ - if (res > 0) - doit = true; - break; - } - } - /* Free what `getline' allocated. */ - free (line); + For example, the user might specify the locale `espana-castellano' +for most purposes, but specify the locale `usa-english' for currency +formatting. This might make sense if the user is a Spanish-speaking +American, working in Spanish, but representing monetary amounts in US +dollars. - Note that the loop continues until an read error is detected or -until a definitive (positive or negative) answer is read. + Note that both locales `espana-castellano' and `usa-english', like +all locales, would include conventions for all of the purposes to which +locales apply. However, the user can choose to use each locale for a +particular subset of those purposes.  -File: libc.info, Node: Message Translation, Next: Searching and Sorting, Prev: Locales, Up: Top - -Message Translation -******************* - - The program's interface with the human should be designed in a way to -ease the human the task. One of the possibilities is to use messages in -whatever language the user prefers. - - Printing messages in different languages can be implemented in -different ways. One could add all the different languages in the -source code and add among the variants every time a message has to be -printed. This is certainly no good solution since extending the set of -languages is difficult (the code must be changed) and the code itself -can become really big with dozens of message sets. - - A better solution is to keep the message sets for each language are -kept in separate files which are loaded at runtime depending on the -language selection of the user. - - The GNU C Library provides two different sets of functions to support -message translation. The problem is that neither of the interfaces is -officially defined by the POSIX standard. The `catgets' family of -functions is defined in the X/Open standard but this is derived from -industry decisions and therefore not necessarily based on reasonable -decisions. - - As mentioned above the message catalog handling provides easy -extendibility by using external data files which contain the message -translations. I.e., these files contain for each of the messages used -in the program a translation for the appropriate language. So the tasks -of the message handling functions are - - * locate the external data file with the appropriate translations. - - * load the data and make it possible to address the messages - - * map a given key to the translated message - - The two approaches mainly differ in the implementation of this last -step. The design decisions made for this influences the whole rest. +File: libc.info, Node: Locale Categories, Next: Setting the Locale, Prev: Choosing Locale, Up: Locales -* Menu: +Categories of Activities that Locales Affect +============================================ -* Message catalogs a la X/Open:: The `catgets' family of functions. -* The Uniforum approach:: The `gettext' family of functions. + The purposes that locales serve are grouped into "categories", so +that a user or a program can choose the locale for each category +independently. Here is a table of categories; each name is both an +environment variable that a user can set, and a macro name that you can +use as an argument to `setlocale'. - -File: libc.info, Node: Message catalogs a la X/Open, Next: The Uniforum approach, Up: Message Translation +`LC_COLLATE' + This category applies to collation of strings (functions `strcoll' + and `strxfrm'); see *Note Collation Functions::. -X/Open Message Catalog Handling -=============================== +`LC_CTYPE' + This category applies to classification and conversion of + characters, and to multibyte and wide characters; see *Note + Character Handling::, and *Note Character Set Handling::. - The `catgets' functions are based on the simple scheme: +`LC_MONETARY' + This category applies to formatting monetary values; see *Note + General Numeric::. - Associate every message to translate in the source code with a - unique identifier. To retrieve a message from a catalog file - solely the identifier is used. +`LC_NUMERIC' + This category applies to formatting numeric values that are not + monetary; see *Note General Numeric::. - This means for the author of the program that s/he will have to make -sure the meaning of the identifier in the program code and in the -message catalogs are always the same. +`LC_TIME' + This category applies to formatting date and time values; see + *Note Formatting Calendar Time::. - Before a message can be translated the catalog file must be located. -The user of the program must be able to guide the responsible function -to find whatever catalog the user wants. This is separated from what -the programmer had in mind. +`LC_MESSAGES' + This category applies to selecting the language used in the user + interface for message translation (*note The Uniforum approach::; + *note Message catalogs a la X/Open::) and contains regular + expressions for affirmative and negative responses. - All the types, constants and functions for the `catgets' functions -are defined/declared in the `nl_types.h' header file. +`LC_ALL' + This is not an environment variable; it is only a macro that you + can use with `setlocale' to set a single locale for all purposes. + Setting this environment variable overwrites all selections by the + other `LC_*' variables or `LANG'. -* Menu: +`LANG' + If this environment variable is defined, its value specifies the + locale to use for all purposes except as overridden by the + variables above. -* The catgets Functions:: The `catgets' function family. -* The message catalog files:: Format of the message catalog files. -* The gencat program:: How to generate message catalogs files which - can be used by the functions. -* Common Usage:: How to use the `catgets' interface. + When developing the message translation functions it was felt that +the functionality provided by the variables above is not sufficient. +For example, it should be possible to specify more than one locale name. +Take a Swedish user who better speaks German than English, and a program +whose messages are output in English by default. It should be possible +to specify that the first choice of language is Swedish, the second +German, and if this also fails to use English. This is possible with +the variable `LANGUAGE'. For further description of this GNU extension +see *Note Using gettextized software::. diff -durpN glibc-2.2.4/manual/libc.info-12 glibc-2.2.5/manual/libc.info-12 --- glibc-2.2.4/manual/libc.info-12 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-12 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,906 +33,1124 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: The catgets Functions, Next: The message catalog files, Up: Message catalogs a la X/Open +File: libc.info, Node: Setting the Locale, Next: Standard Locales, Prev: Locale Categories, Up: Locales -The `catgets' function family ------------------------------ +How Programs Set the Locale +=========================== - - Function: nl_catd catopen (const char *CAT_NAME, int FLAG) - The `catgets' function tries to locate the message data file names - CAT_NAME and loads it when found. The return value is of an - opaque type and can be used in calls to the other functions to - refer to this loaded catalog. + A C program inherits its locale environment variables when it starts +up. This happens automatically. However, these variables do not +automatically control the locale used by the library functions, because +ISO C says that all programs start by default in the standard `C' +locale. To use the locales specified by the environment, you must call +`setlocale'. Call it as follows: - The return value is `(nl_catd) -1' in case the function failed and - no catalog was loaded. The global variable ERRNO contains a code - for the error causing the failure. But even if the function call - succeeded this does not mean that all messages can be translated. + setlocale (LC_ALL, ""); - Locating the catalog file must happen in a way which lets the user - of the program influence the decision. It is up to the user to - decide about the language to use and sometimes it is useful to use - alternate catalog files. All this can be specified by the user by - setting some environment variables. +to select a locale based on the user choice of the appropriate +environment variables. - The first problem is to find out where all the message catalogs are - stored. Every program could have its own place to keep all the - different files but usually the catalog files are grouped by - languages and the catalogs for all programs are kept in the same - place. + You can also use `setlocale' to specify a particular locale, for +general use or for a specific category. - To tell the `catopen' function where the catalog for the program - can be found the user can set the environment variable `NLSPATH' to - a value which describes her/his choice. Since this value must be - usable for different languages and locales it cannot be a simple - string. Instead it is a format string (similar to `printf''s). - An example is + The symbols in this section are defined in the header file +`locale.h'. - /usr/share/locale/%L/%N:/usr/share/locale/%L/LC_MESSAGES/%N + - Function: char * setlocale (int CATEGORY, const char *LOCALE) + The function `setlocale' sets the current locale for category + CATEGORY to LOCALE. A list of all the locales the system provides + can be created by running - First one can see that more than one directory can be specified - (with the usual syntax of separating them by colons). The next - things to observe are the format string, `%L' and `%N' in this - case. The `catopen' function knows about several of them and the - replacement for all of them is of course different. + locale -a - `%N' - This format element is substituted with the name of the - catalog file. This is the value of the CAT_NAME argument - given to `catgets'. + If CATEGORY is `LC_ALL', this specifies the locale for all + purposes. The other possible values of CATEGORY specify an single + purpose (*note Locale Categories::). - `%L' - This format element is substituted with the name of the - currently selected locale for translating messages. How this - is determined is explained below. + You can also use this function to find out the current locale by + passing a null pointer as the LOCALE argument. In this case, + `setlocale' returns a string that is the name of the locale + currently selected for category CATEGORY. - `%l' - (This is the lowercase ell.) This format element is - substituted with the language element of the locale name. - The string describing the selected locale is expected to have - the form `LANG[_TERR[.CODESET]]' and this format uses the - first part LANG. + The string returned by `setlocale' can be overwritten by subsequent + calls, so you should make a copy of the string (*note Copying and + Concatenation::) if you want to save it past any further calls to + `setlocale'. (The standard library is guaranteed never to call + `setlocale' itself.) - `%t' - This format element is substituted by the territory part TERR - of the name of the currently selected locale. See the - explanation of the format above. + You should not modify the string returned by `setlocale'. It might + be the same string that was passed as an argument in a previous + call to `setlocale'. One requirement is that the CATEGORY must be + the same in the call the string was returned and the one when the + string is passed in as LOCALE parameter. - `%c' - This format element is substituted by the codeset part - CODESET of the name of the currently selected locale. See - the explanation of the format above. + When you read the current locale for category `LC_ALL', the value + encodes the entire combination of selected locales for all + categories. In this case, the value is not just a single locale + name. In fact, we don't make any promises about what it looks + like. But if you specify the same "locale name" with `LC_ALL' in + a subsequent call to `setlocale', it restores the same combination + of locale selections. - `%%' - Since `%' is used in a meta character there must be a way to - express the `%' character in the result itself. Using `%%' - does this just like it works for `printf'. + To be sure you can use the returned string encoding the currently + selected locale at a later time, you must make a copy of the + string. It is not guaranteed that the returned pointer remains + valid over time. - Using `NLSPATH' allows arbitrary directories to be searched for - message catalogs while still allowing different languages to be - used. If the `NLSPATH' environment variable is not set, the - default value is + When the LOCALE argument is not a null pointer, the string returned + by `setlocale' reflects the newly-modified locale. - PREFIX/share/locale/%L/%N:PREFIX/share/locale/%L/LC_MESSAGES/%N + If you specify an empty string for LOCALE, this means to read the + appropriate environment variable and use its value to select the + locale for CATEGORY. - where PREFIX is given to `configure' while installing the GNU C - Library (this value is in many cases `/usr' or the empty string). + If a nonempty string is given for LOCALE, then the locale of that + name is used if possible. - The remaining problem is to decide which must be used. The value - decides about the substitution of the format elements mentioned - above. First of all the user can specify a path in the message - catalog name (i.e., the name contains a slash character). In this - situation the `NLSPATH' environment variable is not used. The - catalog must exist as specified in the program, perhaps relative - to the current working directory. This situation in not desirable - and catalogs names never should be written this way. Beside this, - this behavior is not portable to all other platforms providing the - `catgets' interface. + If you specify an invalid locale name, `setlocale' returns a null + pointer and leaves the current locale unchanged. - Otherwise the values of environment variables from the standard - environment are examined (*note Standard Environment::). Which - variables are examined is decided by the FLAG parameter of - `catopen'. If the value is `NL_CAT_LOCALE' (which is defined in - `nl_types.h') then the `catopen' function use the name of the - locale currently selected for the `LC_MESSAGES' category. + Here is an example showing how you might use `setlocale' to +temporarily switch to a new locale. - If FLAG is zero the `LANG' environment variable is examined. This - is a left-over from the early days where the concept of the locales - had not even reached the level of POSIX locales. + #include + #include + #include + #include + + void + with_other_locale (char *new_locale, + void (*subroutine) (int), + int argument) + { + char *old_locale, *saved_locale; + + /* Get the name of the current locale. */ + old_locale = setlocale (LC_ALL, NULL); + + /* Copy the name so it won't be clobbered by `setlocale'. */ + saved_locale = strdup (old_locale); + if (saved_locale == NULL) + fatal ("Out of memory"); + + /* Now change the locale and do some stuff with it. */ + setlocale (LC_ALL, new_locale); + (*subroutine) (argument); + + /* Restore the original locale. */ + setlocale (LC_ALL, saved_locale); + free (saved_locale); + } - The environment variable and the locale name should have a value - of the form `LANG[_TERR[.CODESET]]' as explained above. If no - environment variable is set the `"C"' locale is used which - prevents any translation. + *Portability Note:* Some ISO C systems may define additional locale +categories, and future versions of the library will do so. For +portability, assume that any symbol beginning with `LC_' might be +defined in `locale.h'. - The return value of the function is in any case a valid string. - Either it is a translation from a message catalog or it is the - same as the STRING parameter. So a piece of code to decide - whether a translation actually happened must look like this: + +File: libc.info, Node: Standard Locales, Next: Locale Information, Prev: Setting the Locale, Up: Locales - { - char *trans = catgets (desc, set, msg, input_string); - if (trans == input_string) - { - /* Something went wrong. */ - } - } +Standard Locales +================ - When an error occurred the global variable ERRNO is set to + The only locale names you can count on finding on all operating +systems are these three standard ones: - EBADF - The catalog does not exist. +`"C"' + This is the standard C locale. The attributes and behavior it + provides are specified in the ISO C standard. When your program + starts up, it initially uses this locale by default. - ENOMSG - The set/message tuple does not name an existing element in the - message catalog. +`"POSIX"' + This is the standard POSIX locale. Currently, it is an alias for + the standard C locale. - While it sometimes can be useful to test for errors programs - normally will avoid any test. If the translation is not available - it is no big problem if the original, untranslated message is - printed. Either the user understands this as well or s/he will - look for the reason why the messages are not translated. +`""' + The empty name says to select a locale based on environment + variables. *Note Locale Categories::. - Please note that the currently selected locale does not depend on a -call to the `setlocale' function. It is not necessary that the locale -data files for this locale exist and calling `setlocale' succeeds. The -`catopen' function directly reads the values of the environment -variables. + Defining and installing named locales is normally a responsibility of +the system administrator at your site (or the person who installed the +GNU C library). It is also possible for the user to create private +locales. All this will be discussed later when describing the tool to +do so. - - Function: char * catgets (nl_catd CATALOG_DESC, int SET, int - MESSAGE, const char *STRING) - The function `catgets' has to be used to access the massage catalog - previously opened using the `catopen' function. The CATALOG_DESC - parameter must be a value previously returned by `catopen'. + If your program needs to use something other than the `C' locale, it +will be more portable if you use whatever locale the user specifies +with the environment, rather than trying to specify some non-standard +locale explicitly by name. Remember, different machines might have +different sets of locales installed. - The next two parameters, SET and MESSAGE, reflect the internal - organization of the message catalog files. This will be explained - in detail below. For now it is interesting to know that a catalog - can consists of several set and the messages in each thread are - individually numbered using numbers. Neither the set number nor - the message number must be consecutive. They can be arbitrarily - chosen. But each message (unless equal to another one) must have - its own unique pair of set and message number. + +File: libc.info, Node: Locale Information, Next: Formatting Numbers, Prev: Standard Locales, Up: Locales - Since it is not guaranteed that the message catalog for the - language selected by the user exists the last parameter STRING - helps to handle this case gracefully. If no matching string can - be found STRING is returned. This means for the programmer that +Accessing Locale Information +============================ - * the STRING parameters should contain reasonable text (this - also helps to understand the program seems otherwise there - would be no hint on the string which is expected to be - returned. + There are several ways to access locale information. The simplest +way is to let the C library itself do the work. Several of the +functions in this library implicitly access the locale data, and use +what information is provided by the currently selected locale. This is +how the locale model is meant to work normally. - * all STRING arguments should be written in the same language. + As an example take the `strftime' function, which is meant to nicely +format date and time information (*note Formatting Calendar Time::). +Part of the standard information contained in the `LC_TIME' category is +the names of the months. Instead of requiring the programmer to take +care of providing the translations the `strftime' function does this +all by itself. `%A' in the format string is replaced by the +appropriate weekday name of the locale currently selected by `LC_TIME'. +This is an easy example, and wherever possible functions do things +automatically in this way. - It is somewhat uncomfortable to write a program using the `catgets' -functions if no supporting functionality is available. Since each -set/message number tuple must be unique the programmer must keep lists -of the messages at the same time the code is written. And the work -between several people working on the same project must be coordinated. -We will see some how these problems can be relaxed a bit (*note Common -Usage::). + But there are quite often situations when there is simply no function +to perform the task, or it is simply not possible to do the work +automatically. For these cases it is necessary to access the +information in the locale directly. To do this the C library provides +two functions: `localeconv' and `nl_langinfo'. The former is part of +ISO C and therefore portable, but has a brain-damaged interface. The +second is part of the Unix interface and is portable in as far as the +system follows the Unix standards. - - Function: int catclose (nl_catd CATALOG_DESC) - The `catclose' function can be used to free the resources - associated with a message catalog which previously was opened by a - call to `catopen'. If the resources can be successfully freed the - function returns `0'. Otherwise it return `-1' and the global - variable ERRNO is set. Errors can occur if the catalog descriptor - CATALOG_DESC is not valid in which case ERRNO is set to `EBADF'. +* Menu: + +* The Lame Way to Locale Data:: ISO C's `localeconv'. +* The Elegant and Fast Way:: X/Open's `nl_langinfo'.  -File: libc.info, Node: The message catalog files, Next: The gencat program, Prev: The catgets Functions, Up: Message catalogs a la X/Open +File: libc.info, Node: The Lame Way to Locale Data, Next: The Elegant and Fast Way, Up: Locale Information -Format of the message catalog files ------------------------------------ +`localeconv': It is portable but ... +------------------------------------ - The only reasonable way the translate all the messages of a function -and store the result in a message catalog file which can be read by the -`catopen' function is to write all the message text to the translator -and let her/him translate them all. I.e., we must have a file with -entries which associate the set/message tuple with a specific -translation. This file format is specified in the X/Open standard and -is as follows: + Together with the `setlocale' function the ISO C people invented the +`localeconv' function. It is a masterpiece of poor design. It is +expensive to use, not extendable, and not generally usable as it +provides access to only `LC_MONETARY' and `LC_NUMERIC' related +information. Nevertheless, if it is applicable to a given situation it +should be used since it is very portable. The function `strfmon' +formats monetary amounts according to the selected locale using this +information. - * Lines containing only whitespace characters or empty lines are - ignored. + - Function: struct lconv * localeconv (void) + The `localeconv' function returns a pointer to a structure whose + components contain information about how numeric and monetary + values should be formatted in the current locale. - * Lines which contain as the first non-whitespace character a `$' - followed by a whitespace character are comment and are also - ignored. + You should not modify the structure or its contents. The + structure might be overwritten by subsequent calls to + `localeconv', or by calls to `setlocale', but no other function in + the library overwrites this value. - * If a line contains as the first non-whitespace characters the - sequence `$set' followed by a whitespace character an additional - argument is required to follow. This argument can either be: + - Data Type: struct lconv + `localeconv''s return value is of this data type. Its elements are + described in the following subsections. - - a number. In this case the value of this number determines - the set to which the following messages are added. + If a member of the structure `struct lconv' has type `char', and the +value is `CHAR_MAX', it means that the current locale has no value for +that parameter. - - an identifier consisting of alphanumeric characters plus the - underscore character. In this case the set get automatically - a number assigned. This value is one added to the largest - set number which so far appeared. +* Menu: - How to use the symbolic names is explained in section *Note - Common Usage::. +* General Numeric:: Parameters for formatting numbers and + currency amounts. +* Currency Symbol:: How to print the symbol that identifies an + amount of money (e.g. `$'). +* Sign of Money Amount:: How to print the (positive or negative) sign + for a monetary amount, if one exists. - It is an error if a symbol name appears more than once. All - following messages are placed in a set with this number. + +File: libc.info, Node: General Numeric, Next: Currency Symbol, Up: The Lame Way to Locale Data - * If a line contains as the first non-whitespace characters the - sequence `$delset' followed by a whitespace character an - additional argument is required to follow. This argument can - either be: +Generic Numeric Formatting Parameters +..................................... - - a number. In this case the value of this number determines - the set which will be deleted. + These are the standard members of `struct lconv'; there may be +others. - - an identifier consisting of alphanumeric characters plus the - underscore character. This symbolic identifier must match a - name for a set which previously was defined. It is an error - if the name is unknown. +`char *decimal_point' +`char *mon_decimal_point' + These are the decimal-point separators used in formatting + non-monetary and monetary quantities, respectively. In the `C' + locale, the value of `decimal_point' is `"."', and the value of + `mon_decimal_point' is `""'. - In both cases all messages in the specified set will be removed. - They will not appear in the output. But if this set is later - again selected with a `$set' command again messages could be added - and these messages will appear in the output. +`char *thousands_sep' +`char *mon_thousands_sep' + These are the separators used to delimit groups of digits to the + left of the decimal point in formatting non-monetary and monetary + quantities, respectively. In the `C' locale, both members have a + value of `""' (the empty string). - * If a line contains after leading whitespaces the sequence - `$quote', the quoting character used for this input file is - changed to the first non-whitespace character following the - `$quote'. If no non-whitespace character is present before the - line ends quoting is disable. +`char *grouping' +`char *mon_grouping' + These are strings that specify how to group the digits to the left + of the decimal point. `grouping' applies to non-monetary + quantities and `mon_grouping' applies to monetary quantities. Use + either `thousands_sep' or `mon_thousands_sep' to separate the digit + groups. - By default no quoting character is used. In this mode strings are - terminated with the first unescaped line break. If there is a - `$quote' sequence present newline need not be escaped. Instead a - string is terminated with the first unescaped appearance of the - quote character. + Each member of these strings is to be interpreted as an integer + value of type `char'. Successive numbers (from left to right) + give the sizes of successive groups (from right to left, starting + at the decimal point.) The last member is either `0', in which + case the previous member is used over and over again for all the + remaining groups, or `CHAR_MAX', in which case there is no more + grouping--or, put another way, any remaining digits form one large + group without separators. - A common usage of this feature would be to set the quote character - to `"'. Then any appearance of the `"' in the strings must be - escaped using the backslash (i.e., `\"' must be written). + For example, if `grouping' is `"\04\03\02"', the correct grouping + for the number `123456787654321' is `12', `34', `56', `78', `765', + `4321'. This uses a group of 4 digits at the end, preceded by a + group of 3 digits, preceded by groups of 2 digits (as many as + needed). With a separator of `,', the number would be printed as + `12,34,56,78,765,4321'. - * Any other line must start with a number or an alphanumeric - identifier (with the underscore character included). The - following characters (starting after the first whitespace - character) will form the string which gets associated with the - currently selected set and the message number represented by the - number and identifier respectively. + A value of `"\03"' indicates repeated groups of three digits, as + normally used in the U.S. - If the start of the line is a number the message number is - obvious. It is an error if the same message number already - appeared for this set. + In the standard `C' locale, both `grouping' and `mon_grouping' + have a value of `""'. This value specifies no grouping at all. - If the leading token was an identifier the message number gets - automatically assigned. The value is the current maximum messages - number for this set plus one. It is an error if the identifier was - already used for a message in this set. It is OK to reuse the - identifier for a message in another thread. How to use the - symbolic identifiers will be explained below (*note Common - Usage::). There is one limitation with the identifier: it must - not be `Set'. The reason will be explained below. +`char int_frac_digits' +`char frac_digits' + These are small integers indicating how many fractional digits (to + the right of the decimal point) should be displayed in a monetary + value in international and local formats, respectively. (Most + often, both members have the same value.) - The text of the messages can contain escape characters. The usual - bunch of characters known from the ISO C language are recognized - (`\n', `\t', `\v', `\b', `\r', `\f', `\\', and `\NNN', where NNN - is the octal coding of a character code). + In the standard `C' locale, both of these members have the value + `CHAR_MAX', meaning "unspecified". The ISO standard doesn't say + what to do when you find this value; we recommend printing no + fractional digits. (This locale also specifies the empty string + for `mon_decimal_point', so printing any fractional digits would be + confusing!) - *Important:* The handling of identifiers instead of numbers for the -set and messages is a GNU extension. Systems strictly following the -X/Open specification do not have this feature. An example for a message -catalog file is this: + +File: libc.info, Node: Currency Symbol, Next: Sign of Money Amount, Prev: General Numeric, Up: The Lame Way to Locale Data - $ This is a leading comment. - $quote " - - $set SetOne - 1 Message with ID 1. - two " Message with ID \"two\", which gets the value 2 assigned" - - $set SetTwo - $ Since the last set got the number 1 assigned this set has number 2. - 4000 "The numbers can be arbitrary, they need not start at one." +Printing the Currency Symbol +............................ - This small example shows various aspects: - * Lines 1 and 9 are comments since they start with `$' followed by a - whitespace. + These members of the `struct lconv' structure specify how to print +the symbol to identify a monetary value--the international analog of +`$' for US dollars. - * The quoting character is set to `"'. Otherwise the quotes in the - message definition would have to be left away and in this case the - message with the identifier `two' would loose its leading - whitespace. + Each country has two standard currency symbols. The "local currency +symbol" is used commonly within the country, while the "international +currency symbol" is used internationally to refer to that country's +currency when it is necessary to indicate the country unambiguously. - * Mixing numbered messages with message having symbolic names is no - problem and the numbering happens automatically. + For example, many countries use the dollar as their monetary unit, +and when dealing with international currencies it's important to specify +that one is dealing with (say) Canadian dollars instead of U.S. dollars +or Australian dollars. But when the context is known to be Canada, +there is no need to make this explicit--dollar amounts are implicitly +assumed to be in Canadian dollars. - While this file format is pretty easy it is not the best possible for -use in a running program. The `catopen' function would have to parser -the file and handle syntactic errors gracefully. This is not so easy -and the whole process is pretty slow. Therefore the `catgets' -functions expect the data in another more compact and ready-to-use file -format. There is a special program `gencat' which is explained in -detail in the next section. +`char *currency_symbol' + The local currency symbol for the selected locale. - Files in this other format are not human readable. To be easy to -use by programs it is a binary file. But the format is byte order -independent so translation files can be shared by systems of arbitrary -architecture (as long as they use the GNU C Library). + In the standard `C' locale, this member has a value of `""' (the + empty string), meaning "unspecified". The ISO standard doesn't + say what to do when you find this value; we recommend you simply + print the empty string as you would print any other string pointed + to by this variable. - Details about the binary file format are not important to know since -these files are always created by the `gencat' program. The sources of -the GNU C Library also provide the sources for the `gencat' program and -so the interested reader can look through these source files to learn -about the file format. +`char *int_curr_symbol' + The international currency symbol for the selected locale. - -File: libc.info, Node: The gencat program, Next: Common Usage, Prev: The message catalog files, Up: Message catalogs a la X/Open + The value of `int_curr_symbol' should normally consist of a + three-letter abbreviation determined by the international standard + `ISO 4217 Codes for the Representation of Currency and Funds', + followed by a one-character separator (often a space). -Generate Message Catalogs files -------------------------------- + In the standard `C' locale, this member has a value of `""' (the + empty string), meaning "unspecified". We recommend you simply + print the empty string as you would print any other string pointed + to by this variable. - The `gencat' program is specified in the X/Open standard and the GNU -implementation follows this specification and so processes all -correctly formed input files. Additionally some extension are -implemented which help to work in a more reasonable way with the -`catgets' functions. +`char p_cs_precedes' +`char n_cs_precedes' +`char int_p_cs_precedes' +`char int_n_cs_precedes' + These members are `1' if the `currency_symbol' or + `int_curr_symbol' strings should precede the value of a monetary + amount, or `0' if the strings should follow the value. The + `p_cs_precedes' and `int_p_cs_precedes' members apply to positive + amounts (or zero), and the `n_cs_precedes' and `int_n_cs_precedes' + members apply to negative amounts. - The `gencat' program can be invoked in two ways: + In the standard `C' locale, all of these members have a value of + `CHAR_MAX', meaning "unspecified". The ISO standard doesn't say + what to do when you find this value. We recommend printing the + currency symbol before the amount, which is right for most + countries. In other words, treat all nonzero values alike in + these members. - `gencat [OPTION]... [OUTPUT-FILE [INPUT-FILE]...]` + The members with the `int_' prefix apply to the `int_curr_symbol' + while the other two apply to `currency_symbol'. - This is the interface defined in the X/Open standard. If no -INPUT-FILE parameter is given input will be read from standard input. -Multiple input files will be read as if they are concatenated. If -OUTPUT-FILE is also missing, the output will be written to standard -output. To provide the interface one is used to from other programs a -second interface is provided. +`char p_sep_by_space' +`char n_sep_by_space' +`char int_p_sep_by_space' +`char int_n_sep_by_space' + These members are `1' if a space should appear between the + `currency_symbol' or `int_curr_symbol' strings and the amount, or + `0' if no space should appear. The `p_sep_by_space' and + `int_p_sep_by_space' members apply to positive amounts (or zero), + and the `n_sep_by_space' and `int_n_sep_by_space' members apply to + negative amounts. - `gencat [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...` + In the standard `C' locale, all of these members have a value of + `CHAR_MAX', meaning "unspecified". The ISO standard doesn't say + what you should do when you find this value; we suggest you treat + it as 1 (print a space). In other words, treat all nonzero values + alike in these members. - The option `-o' is used to specify the output file and all file -arguments are used as input files. + The members with the `int_' prefix apply to the `int_curr_symbol' + while the other two apply to `currency_symbol'. There is one + specialty with the `int_curr_symbol', though. Since all legal + values contain a space at the end the string one either printf + this space (if the currency symbol must appear in front and must + be separated) or one has to avoid printing this character at all + (especially when at the end of the string). - Beside this one can use `-' or `/dev/stdin' for INPUT-FILE to denote -the standard input. Corresponding one can use `-' and `/dev/stdout' -for OUTPUT-FILE to denote standard output. Using `-' as a file name is -allowed in X/Open while using the device names is a GNU extension. + +File: libc.info, Node: Sign of Money Amount, Prev: Currency Symbol, Up: The Lame Way to Locale Data - The `gencat' program works by concatenating all input files and then -*merge* the resulting collection of message sets with a possibly -existing output file. This is done by removing all messages with -set/message number tuples matching any of the generated messages from -the output file and then adding all the new messages. To regenerate a -catalog file while ignoring the old contents therefore requires to -remove the output file if it exists. If the output is written to -standard output no merging takes place. +Printing the Sign of a Monetary Amount +...................................... -The following table shows the options understood by the `gencat' -program. The X/Open standard does not specify any option for the -program so all of these are GNU extensions. + These members of the `struct lconv' structure specify how to print +the sign (if any) of a monetary value. -`-V' -`--version' - Print the version information and exit. +`char *positive_sign' +`char *negative_sign' + These are strings used to indicate positive (or zero) and negative + monetary quantities, respectively. -`-h' -`--help' - Print a usage message listing all available options, then exit - successfully. + In the standard `C' locale, both of these members have a value of + `""' (the empty string), meaning "unspecified". -`--new' - Do never merge the new messages from the input files with the old - content of the output files. The old content of the output file - is discarded. + The ISO standard doesn't say what to do when you find this value; + we recommend printing `positive_sign' as you find it, even if it is + empty. For a negative value, print `negative_sign' as you find it + unless both it and `positive_sign' are empty, in which case print + `-' instead. (Failing to indicate the sign at all seems rather + unreasonable.) -`-H' -`--header=name' - This option is used to emit the symbolic names given to sets and - messages in the input files for use in the program. Details about - how to use this are given in the next section. The NAME parameter - to this option specifies the name of the output file. It will - contain a number of C preprocessor `#define's to associate a name - with a number. +`char p_sign_posn' +`char n_sign_posn' +`char int_p_sign_posn' +`char int_n_sign_posn' + These members are small integers that indicate how to position the + sign for nonnegative and negative monetary quantities, + respectively. (The string used by the sign is what was specified + with `positive_sign' or `negative_sign'.) The possible values are + as follows: - Please note that the generated file only contains the symbols from - the input files. If the output is merged with the previous - content of the output file the possibly existing symbols from the - file(s) which generated the old output files are not in the - generated header file. + `0' + The currency symbol and quantity should be surrounded by + parentheses. + + `1' + Print the sign string before the quantity and currency symbol. + + `2' + Print the sign string after the quantity and currency symbol. + + `3' + Print the sign string right before the currency symbol. + + `4' + Print the sign string right after the currency symbol. + + `CHAR_MAX' + "Unspecified". Both members have this value in the standard + `C' locale. + + The ISO standard doesn't say what you should do when the value is + `CHAR_MAX'. We recommend you print the sign after the currency + symbol. + + The members with the `int_' prefix apply to the `int_curr_symbol' + while the other two apply to `currency_symbol'.  -File: libc.info, Node: Common Usage, Prev: The gencat program, Up: Message catalogs a la X/Open +File: libc.info, Node: The Elegant and Fast Way, Prev: The Lame Way to Locale Data, Up: Locale Information -How to use the `catgets' interface ----------------------------------- +Pinpoint Access to Locale Data +------------------------------ - The `catgets' functions can be used in two different ways. By -following slavishly the X/Open specs and not relying on the extension -and by using the GNU extensions. We will take a look at the former -method first to understand the benefits of extensions. + When writing the X/Open Portability Guide the authors realized that +the `localeconv' function is not enough to provide reasonable access to +locale information. The information which was meant to be available in +the locale (as later specified in the POSIX.1 standard) requires more +ways to access it. Therefore the `nl_langinfo' function was introduced. -Not using symbolic names -........................ + - Function: char * nl_langinfo (nl_item ITEM) + The `nl_langinfo' function can be used to access individual + elements of the locale categories. Unlike the `localeconv' + function, which returns all the information, `nl_langinfo' lets + the caller select what information it requires. This is very fast + and it is not a problem to call this function multiple times. - Since the X/Open format of the message catalog files does not allow -symbol names we have to work with numbers all the time. When we start -writing a program we have to replace all appearances of translatable -strings with something like + A second advantage is that in addition to the numeric and monetary + formatting information, information from the `LC_TIME' and + `LC_MESSAGES' categories is available. - catgets (catdesc, set, msg, "string") + The type `nl_type' is defined in `nl_types.h'. The argument ITEM + is a numeric value defined in the header `langinfo.h'. The X/Open + standard defines the following values: -CATGETS is retrieved from a call to `catopen' which is normally done -once at the program start. The `"string"' is the string we want to -translate. The problems start with the set and message numbers. + `CODESET' + `nl_langinfo' returns a string with the name of the coded + character set used in the selected locale. - In a bigger program several programmers usually work at the same -time on the program and so coordinating the number allocation is -crucial. Though no two different strings must be indexed by the same -tuple of numbers it is highly desirable to reuse the numbers for equal -strings with equal translations (please note that there might be -strings which are equal in one language but have different translations -due to difference contexts). + `ABDAY_1' + `ABDAY_2' + `ABDAY_3' + `ABDAY_4' + `ABDAY_5' + `ABDAY_6' + `ABDAY_7' + `nl_langinfo' returns the abbreviated weekday name. `ABDAY_1' + corresponds to Sunday. - The allocation process can be relaxed a bit by different set numbers -for different parts of the program. So the number of developers who -have to coordinate the allocation can be reduced. But still lists must -be keep track of the allocation and errors can easily happen. These -errors cannot be discovered by the compiler or the `catgets' functions. -Only the user of the program might see wrong messages printed. In the -worst cases the messages are so irritating that they cannot be -recognized as wrong. Think about the translations for `"true"' and -`"false"' being exchanged. This could result in a disaster. + `DAY_1' + `DAY_2' + `DAY_3' + `DAY_4' + `DAY_5' + `DAY_6' + `DAY_7' + Similar to `ABDAY_1' etc., but here the return value is the + unabbreviated weekday name. -Using symbolic names -.................... + `ABMON_1' + `ABMON_2' + `ABMON_3' + `ABMON_4' + `ABMON_5' + `ABMON_6' + `ABMON_7' + `ABMON_8' + `ABMON_9' + `ABMON_10' + `ABMON_11' + `ABMON_12' + The return value is abbreviated name of the month. `ABMON_1' + corresponds to January. - The problems mentioned in the last section derive from the fact that: + `MON_1' + `MON_2' + `MON_3' + `MON_4' + `MON_5' + `MON_6' + `MON_7' + `MON_8' + `MON_9' + `MON_10' + `MON_11' + `MON_12' + Similar to `ABMON_1' etc., but here the month names are not + abbreviated. Here the first value `MON_1' also corresponds + to January. - 1. the numbers are allocated once and due to the possibly frequent - use of them it is difficult to change a number later. + `AM_STR' + `PM_STR' + The return values are strings which can be used in the + representation of time as an hour from 1 to 12 plus an am/pm + specifier. - 2. the numbers do not allow to guess anything about the string and - therefore collisions can easily happen. + Note that in locales which do not use this time representation + these strings might be empty, in which case the am/pm format + cannot be used at all. - By constantly using symbolic names and by providing a method which -maps the string content to a symbolic name (however this will happen) -one can prevent both problems above. The cost of this is that the -programmer has to write a complete message catalog file while s/he is -writing the program itself. + `D_T_FMT' + The return value can be used as a format string for + `strftime' to represent time and date in a locale-specific + way. - This is necessary since the symbolic names must be mapped to numbers -before the program sources can be compiled. In the last section it was -described how to generate a header containing the mapping of the names. -E.g., for the example message file given in the last section we could -call the `gencat' program as follow (assume `ex.msg' contains the -sources). + `D_FMT' + The return value can be used as a format string for + `strftime' to represent a date in a locale-specific way. - gencat -H ex.h -o ex.cat ex.msg + `T_FMT' + The return value can be used as a format string for + `strftime' to represent time in a locale-specific way. -This generates a header file with the following content: + `T_FMT_AMPM' + The return value can be used as a format string for + `strftime' to represent time in the am/pm format. - #define SetTwoSet 0x2 /* ex.msg:8 */ - - #define SetOneSet 0x1 /* ex.msg:4 */ - #define SetOnetwo 0x2 /* ex.msg:6 */ + Note that if the am/pm format does not make any sense for the + selected locale, the return value might be the same as the + one for `T_FMT'. - As can be seen the various symbols given in the source file are -mangled to generate unique identifiers and these identifiers get numbers -assigned. Reading the source file and knowing about the rules will -allow to predict the content of the header file (it is deterministic) -but this is not necessary. The `gencat' program can take care for -everything. All the programmer has to do is to put the generated header -file in the dependency list of the source files of her/his project and -to add a rules to regenerate the header of any of the input files -change. + `ERA' + The return value represents the era used in the current + locale. - One word about the symbol mangling. Every symbol consists of two -parts: the name of the message set plus the name of the message or the -special string `Set'. So `SetOnetwo' means this macro can be used to -access the translation with identifier `two' in the message set -`SetOne'. + Most locales do not define this value. An example of a + locale which does define this value is the Japanese one. In + Japan, the traditional representation of dates includes the + name of the era corresponding to the then-emperor's reign. - The other names denote the names of the message sets. The special -string `Set' is used in the place of the message identifier. + Normally it should not be necessary to use this value + directly. Specifying the `E' modifier in their format + strings causes the `strftime' functions to use this + information. The format of the returned string is not + specified, and therefore you should not assume knowledge of + it on different systems. - If in the code the second string of the set `SetOne' is used the C -code should look like this: + `ERA_YEAR' + The return value gives the year in the relevant era of the + locale. As for `ERA' it should not be necessary to use this + value directly. - catgets (catdesc, SetOneSet, SetOnetwo, - " Message with ID \"two\", which gets the value 2 assigned") + `ERA_D_T_FMT' + This return value can be used as a format string for + `strftime' to represent dates and times in a locale-specific + era-based way. - Writing the function this way will allow to change the message number -and even the set number without requiring any change in the C source -code. (The text of the string is normally not the same; this is only -for this example.) + `ERA_D_FMT' + This return value can be used as a format string for + `strftime' to represent a date in a locale-specific era-based + way. -How does to this allow to develop -................................. + `ERA_T_FMT' + This return value can be used as a format string for + `strftime' to represent time in a locale-specific era-based + way. - To illustrate the usual way to work with the symbolic version numbers -here is a little example. Assume we want to write the very complex and -famous greeting program. We start by writing the code as usual: + `ALT_DIGITS' + The return value is a representation of up to 100 values used + to represent the values 0 to 99. As for `ERA' this value is + not intended to be used directly, but instead indirectly + through the `strftime' function. When the modifier `O' is + used in a format which would otherwise use numerals to + represent hours, minutes, seconds, weekdays, months, or + weeks, the appropriate value for the locale is used instead. - #include - int - main (void) + `INT_CURR_SYMBOL' + The same as the value returned by `localeconv' in the + `int_curr_symbol' element of the `struct lconv'. + + `CURRENCY_SYMBOL' + `CRNCYSTR' + The same as the value returned by `localeconv' in the + `currency_symbol' element of the `struct lconv'. + + `CRNCYSTR' is a deprecated alias still required by Unix98. + + `MON_DECIMAL_POINT' + The same as the value returned by `localeconv' in the + `mon_decimal_point' element of the `struct lconv'. + + `MON_THOUSANDS_SEP' + The same as the value returned by `localeconv' in the + `mon_thousands_sep' element of the `struct lconv'. + + `MON_GROUPING' + The same as the value returned by `localeconv' in the + `mon_grouping' element of the `struct lconv'. + + `POSITIVE_SIGN' + The same as the value returned by `localeconv' in the + `positive_sign' element of the `struct lconv'. + + `NEGATIVE_SIGN' + The same as the value returned by `localeconv' in the + `negative_sign' element of the `struct lconv'. + + `INT_FRAC_DIGITS' + The same as the value returned by `localeconv' in the + `int_frac_digits' element of the `struct lconv'. + + `FRAC_DIGITS' + The same as the value returned by `localeconv' in the + `frac_digits' element of the `struct lconv'. + + `P_CS_PRECEDES' + The same as the value returned by `localeconv' in the + `p_cs_precedes' element of the `struct lconv'. + + `P_SEP_BY_SPACE' + The same as the value returned by `localeconv' in the + `p_sep_by_space' element of the `struct lconv'. + + `N_CS_PRECEDES' + The same as the value returned by `localeconv' in the + `n_cs_precedes' element of the `struct lconv'. + + `N_SEP_BY_SPACE' + The same as the value returned by `localeconv' in the + `n_sep_by_space' element of the `struct lconv'. + + `P_SIGN_POSN' + The same as the value returned by `localeconv' in the + `p_sign_posn' element of the `struct lconv'. + + `N_SIGN_POSN' + The same as the value returned by `localeconv' in the + `n_sign_posn' element of the `struct lconv'. + + `INT_P_CS_PRECEDES' + The same as the value returned by `localeconv' in the + `int_p_cs_precedes' element of the `struct lconv'. + + `INT_P_SEP_BY_SPACE' + The same as the value returned by `localeconv' in the + `int_p_sep_by_space' element of the `struct lconv'. + + `INT_N_CS_PRECEDES' + The same as the value returned by `localeconv' in the + `int_n_cs_precedes' element of the `struct lconv'. + + `INT_N_SEP_BY_SPACE' + The same as the value returned by `localeconv' in the + `int_n_sep_by_space' element of the `struct lconv'. + + `INT_P_SIGN_POSN' + The same as the value returned by `localeconv' in the + `int_p_sign_posn' element of the `struct lconv'. + + `INT_N_SIGN_POSN' + The same as the value returned by `localeconv' in the + `int_n_sign_posn' element of the `struct lconv'. + + `DECIMAL_POINT' + `RADIXCHAR' + The same as the value returned by `localeconv' in the + `decimal_point' element of the `struct lconv'. + + The name `RADIXCHAR' is a deprecated alias still used in + Unix98. + + `THOUSANDS_SEP' + `THOUSEP' + The same as the value returned by `localeconv' in the + `thousands_sep' element of the `struct lconv'. + + The name `THOUSEP' is a deprecated alias still used in Unix98. + + `GROUPING' + The same as the value returned by `localeconv' in the + `grouping' element of the `struct lconv'. + + `YESEXPR' + The return value is a regular expression which can be used + with the `regex' function to recognize a positive response to + a yes/no question. The GNU C library provides the `rpmatch' + function for easier handling in applications. + + `NOEXPR' + The return value is a regular expression which can be used + with the `regex' function to recognize a negative response to + a yes/no question. + + `YESSTR' + The return value is a locale-specific translation of the + positive response to a yes/no question. + + Using this value is deprecated since it is a very special + case of message translation, and is better handled by the + message translation functions (*note Message Translation::). + + The use of this symbol is deprecated. Instead message + translation should be used. + + `NOSTR' + The return value is a locale-specific translation of the + negative response to a yes/no question. What is said for + `YESSTR' is also true here. + + The use of this symbol is deprecated. Instead message + translation should be used. + + The file `langinfo.h' defines a lot more symbols but none of them + is official. Using them is not portable, and the format of the + return values might change. Therefore we recommended you not use + them. + + Note that the return value for any valid argument can be used for + in all situations (with the possible exception of the am/pm time + formatting codes). If the user has not selected any locale for the + appropriate category, `nl_langinfo' returns the information from + the `"C"' locale. It is therefore possible to use this function as + shown in the example below. + + If the argument ITEM is not valid, a pointer to an empty string is + returned. + + An example of `nl_langinfo' usage is a function which has to print a +given date and time in a locale-specific way. At first one might think +that, since `strftime' internally uses the locale information, writing +something like the following is enough: + + size_t + i18n_time_n_data (char *s, size_t len, const struct tm *tp) { - printf ("Hello, world!\n"); - return 0; + return strftime (s, len, "%X %D", tp); } - Now we want to internationalize the message and therefore replace the -message with whatever the user wants. + The format contains no weekday or month names and therefore is +internationally usable. Wrong! The output produced is something like +`"hh:mm:ss MM/DD/YY"'. This format is only recognizable in the USA. +Other countries use different formats. Therefore the function should +be rewritten like this: - #include - #include - #include "msgnrs.h" - int - main (void) + size_t + i18n_time_n_data (char *s, size_t len, const struct tm *tp) { - nl_catd catdesc = catopen ("hello.cat", NL_CAT_LOCALE); - printf (catgets (catdesc, SetMainSet, SetMainHello, - "Hello, world!\n")); - catclose (catdesc); - return 0; + return strftime (s, len, nl_langinfo (D_T_FMT), tp); } - We see how the catalog object is opened and the returned descriptor -used in the other function calls. It is not really necessary to check -for failure of any of the functions since even in these situations the -functions will behave reasonable. They simply will be return a -translation. + Now it uses the date and time format of the locale selected when the +program runs. If the user selects the locale correctly there should +never be a misunderstanding over the time and date format. - What remains unspecified here are the constants `SetMainSet' and -`SetMainHello'. These are the symbolic names describing the message. -To get the actual definitions which match the information in the -catalog file we have to create the message catalog source file and -process it using the `gencat' program. + +File: libc.info, Node: Formatting Numbers, Next: Yes-or-No Questions, Prev: Locale Information, Up: Locales - $ Messages for the famous greeting program. - $quote " - - $set Main - Hello "Hallo, Welt!\n" +A dedicated function to format numbers +====================================== - Now we can start building the program (assume the message catalog -source file is named `hello.msg' and the program source file `hello.c'): + We have seen that the structure returned by `localeconv' as well as +the values given to `nl_langinfo' allow you to retrieve the various +pieces of locale-specific information to format numbers and monetary +amounts. We have also seen that the underlying rules are quite complex. - % gencat -H msgnrs.h -o hello.cat hello.msg - % cat msgnrs.h - #define MainSet 0x1 /* hello.msg:4 */ - #define MainHello 0x1 /* hello.msg:5 */ - % gcc -o hello hello.c -I. - % cp hello.cat /usr/share/locale/de/LC_MESSAGES - % echo $LC_ALL - de - % ./hello - Hallo, Welt! - % + Therefore the X/Open standards introduce a function which uses such +locale information, making it easier for the user to format numbers +according to these rules. - The call of the `gencat' program creates the missing header file -`msgnrs.h' as well as the message catalog binary. The former is used -in the compilation of `hello.c' while the later is placed in a -directory in which the `catopen' function will try to locate it. -Please check the `LC_ALL' environment variable and the default path for -`catopen' presented in the description above. + - Function: ssize_t strfmon (char *S, size_t MAXSIZE, const char + *FORMAT, ...) + The `strfmon' function is similar to the `strftime' function in + that it takes a buffer, its size, a format string, and values to + write into the buffer as text in a form specified by the format + string. Like `strftime', the function also returns the number of + bytes written into the buffer. - -File: libc.info, Node: The Uniforum approach, Prev: Message catalogs a la X/Open, Up: Message Translation + There are two differences: `strfmon' can take more than one + argument, and, of course, the format specification is different. + Like `strftime', the format string consists of normal text, which + is output as is, and format specifiers, which are indicated by a + `%'. Immediately after the `%', you can optionally specify + various flags and formatting information before the main + formatting character, in a similar way to `printf': -The Uniforum approach to Message Translation -============================================ + * Immediately following the `%' there can be one or more of the + following flags: + `=F' + The single byte character F is used for this field as + the numeric fill character. By default this character + is a space character. Filling with this character is + only performed if a left precision is specified. It is + not just to fill to the given field width. - Sun Microsystems tried to standardize a different approach to message -translation in the Uniforum group. There never was a real standard -defined but still the interface was used in Sun's operation systems. -Since this approach fits better in the development process of free -software it is also used throughout the GNU project and the GNU -`gettext' package provides support for this outside the GNU C Library. + `^' + The number is printed without grouping the digits + according to the rules of the current locale. By + default grouping is enabled. - The code of the `libintl' from GNU `gettext' is the same as the code -in the GNU C Library. So the documentation in the GNU `gettext' manual -is also valid for the functionality here. The following text will -describe the library functions in detail. But the numerous helper -programs are not described in this manual. Instead people should read -the GNU `gettext' manual (*note GNU gettext utilities: (gettext)Top.). -We will only give a short overview. + `+', `(' + At most one of these flags can be used. They select + which format to represent the sign of a currency amount. + By default, and if `+' is given, the locale equivalent + of +/- is used. If `(' is given, negative amounts are + enclosed in parentheses. The exact format is determined + by the values of the `LC_MONETARY' category of the + locale selected at program runtime. - Though the `catgets' functions are available by default on more -systems the `gettext' interface is at least as portable as the former. -The GNU `gettext' package can be used wherever the functions are not -available. + `!' + The output will not contain the currency symbol. -* Menu: + `-' + The output will be formatted left-justified instead of + right-justified if it does not fill the entire field + width. -* Message catalogs with gettext:: The `gettext' family of functions. -* Helper programs for gettext:: Programs to handle message catalogs - for `gettext'. + The next part of a specification is an optional field width. If no + width is specified 0 is taken. During output, the function first + determines how much space is required. If it requires at least as + many characters as given by the field width, it is output using as + much space as necessary. Otherwise, it is extended to use the + full width by filling with the space character. The presence or + absence of the `-' flag determines the side at which such padding + occurs. If present, the spaces are added at the right making the + output left-justified, and vice versa. - -File: libc.info, Node: Message catalogs with gettext, Next: Helper programs for gettext, Up: The Uniforum approach + So far the format looks familiar, being similar to the `printf' and + `strftime' formats. However, the next two optional fields + introduce something new. The first one is a `#' character followed + by a decimal digit string. The value of the digit string + specifies the number of _digit_ positions to the left of the + decimal point (or equivalent). This does _not_ include the + grouping character when the `^' flag is not given. If the space + needed to print the number does not fill the whole width, the + field is padded at the left side with the fill character, which + can be selected using the `=' flag and by default is a space. For + example, if the field width is selected as 6 and the number is + 123, the fill character is `*' the result will be `***123'. -The `gettext' family of functions ---------------------------------- + The second optional field starts with a `.' (period) and consists + of another decimal digit string. Its value describes the number of + characters printed after the decimal point. The default is + selected from the current locale (`frac_digits', + `int_frac_digits', see *note General Numeric::). If the exact + representation needs more digits than given by the field width, + the displayed value is rounded. If the number of fractional + digits is selected to be zero, no decimal point is printed. - The paradigms underlying the `gettext' approach to message -translations is different from that of the `catgets' functions the -basic functionally is equivalent. There are functions of the following -categories: + As a GNU extension, the `strfmon' implementation in the GNU libc + allows an optional `L' next as a format modifier. If this modifier + is given, the argument is expected to be a `long double' instead of + a `double' value. -* Menu: + Finally, the last component is a format specifier. There are three + specifiers defined: -* Translation with gettext:: What has to be done to translate a message. -* Locating gettext catalog:: How to determine which catalog to be used. -* Advanced gettext functions:: Additional functions for more complicated - situations. -* Charset conversion in gettext:: How to specify the output character set - `gettext' uses. -* GUI program problems:: How to use `gettext' in GUI programs. -* Using gettextized software:: The possibilities of the user to influence - the way `gettext' works. + `i' + Use the locale's rules for formatting an international + currency value. - -File: libc.info, Node: Translation with gettext, Next: Locating gettext catalog, Up: Message catalogs with gettext + `n' + Use the locale's rules for formatting a national currency + value. -What has to be done to translate a message? -........................................... + `%' + Place a `%' in the output. There must be no flag, width + specifier or modifier given, only `%%' is allowed. - The `gettext' functions have a very simple interface. The most -basic function just takes the string which shall be translated as the -argument and it returns the translation. This is fundamentally -different from the `catgets' approach where an extra key is necessary -and the original string is only used for the error case. + As for `printf', the function reads the format string from left to + right and uses the values passed to the function following the + format string. The values are expected to be either of type + `double' or `long double', depending on the presence of the + modifier `L'. The result is stored in the buffer pointed to by S. + At most MAXSIZE characters are stored. - If the string which has to be translated is the only argument this of -course means the string itself is the key. I.e., the translation will -be selected based on the original string. The message catalogs must -therefore contain the original strings plus one translation for any such -string. The task of the `gettext' function is it to compare the -argument string with the available strings in the catalog and return the -appropriate translation. Of course this process is optimized so that -this process is not more expensive than an access using an atomic key -like in `catgets'. + The return value of the function is the number of characters + stored in S, including the terminating `NULL' byte. If the number + of characters stored would exceed MAXSIZE, the function returns -1 + and the content of the buffer S is unspecified. In this case + `errno' is set to `E2BIG'. - The `gettext' approach has some advantages but also some -disadvantages. Please see the GNU `gettext' manual for a detailed -discussion of the pros and cons. + A few examples should make clear how the function works. It is +assumed that all the following pieces of code are executed in a program +which uses the USA locale (`en_US'). The simplest form of the format +is this: - All the definitions and declarations for `gettext' can be found in -the `libintl.h' header file. On systems where these functions are not -part of the C library they can be found in a separate library named -`libintl.a' (or accordingly different for shared libraries). + strfmon (buf, 100, "@%n@%n@%n@", 123.45, -567.89, 12345.678); - - Function: char * gettext (const char *MSGID) - The `gettext' function searches the currently selected message - catalogs for a string which is equal to MSGID. If there is such a - string available it is returned. Otherwise the argument string - MSGID is returned. +The output produced is + "@$123.45@-$567.89@$12,345.68@" - Please note that all though the return value is `char *' the - returned string must not be changed. This broken type results - from the history of the function and does not reflect the way the - function should be used. + We can notice several things here. First, the widths of the output +numbers are different. We have not specified a width in the format +string, and so this is no wonder. Second, the third number is printed +using thousands separators. The thousands separator for the `en_US' +locale is a comma. The number is also rounded. .678 is rounded to .68 +since the format does not specify a precision and the default value in +the locale is 2. Finally, note that the national currency symbol is +printed since `%n' was used, not `i'. The next example shows how we +can align the output. - Please note that above we wrote "message catalogs" (plural). This - is a specialty of the GNU implementation of these functions and we - will say more about this when we talk about the ways message - catalogs are selected (*note Locating gettext catalog::). + strfmon (buf, 100, "@%=*11n@%=*11n@%=*11n@", 123.45, -567.89, 12345.678); - The `gettext' function does not modify the value of the global - ERRNO variable. This is necessary to make it possible to write - something like +The output this time is: - printf (gettext ("Operation failed: %m\n")); + "@ $123.45@ -$567.89@ $12,345.68@" - Here the ERRNO value is used in the `printf' function while - processing the `%m' format element and if the `gettext' function - would change this value (it is called before `printf' is called) - we would get a wrong message. + Two things stand out. Firstly, all fields have the same width +(eleven characters) since this is the width given in the format and +since no number required more characters to be printed. The second +important point is that the fill character is not used. This is +correct since the white space was not used to achieve a precision given +by a `#' modifier, but instead to fill to the given width. The +difference becomes obvious if we now add a width specification. - So there is no easy way to detect a missing message catalog beside - comparing the argument string with the result. But it is normally - the task of the user to react on missing catalogs. The program - cannot guess when a message catalog is really necessary since for - a user who speaks the language the program was developed in does - not need any translation. + strfmon (buf, 100, "@%=*11#5n@%=*11#5n@%=*11#5n@", + 123.45, -567.89, 12345.678); - The remaining two functions to access the message catalog add some -functionality to select a message catalog which is not the default one. -This is important if parts of the program are developed independently. -Every part can have its own message catalog and all of them can be used -at the same time. The C library itself is an example: internally it -uses the `gettext' functions but since it must not depend on a -currently selected default message catalog it must specify all ambiguous -information. +The output is - - Function: char * dgettext (const char *DOMAINNAME, const char *MSGID) - The `dgettext' functions acts just like the `gettext' function. - It only takes an additional first argument DOMAINNAME which guides - the selection of the message catalogs which are searched for the - translation. If the DOMAINNAME parameter is the null pointer the - `dgettext' function is exactly equivalent to `gettext' since the - default value for the domain name is used. + "@ $***123.45@-$***567.89@ $12,456.68@" - As for `gettext' the return value type is `char *' which is an - anachronism. The returned string must never be modified. + Here we can see that all the currency symbols are now aligned, and +that the space between the currency sign and the number is filled with +the selected fill character. Note that although the width is selected +to be 5 and 123.45 has three digits left of the decimal point, the +space is filled with three asterisks. This is correct since, as +explained above, the width does not include the positions used to store +thousands separators. One last example should explain the remaining +functionality. - - Function: char * dcgettext (const char *DOMAINNAME, const char - *MSGID, int CATEGORY) - The `dcgettext' adds another argument to those which `dgettext' - takes. This argument CATEGORY specifies the last piece of - information needed to localize the message catalog. I.e., the - domain name and the locale category exactly specify which message - catalog has to be used (relative to a given directory, see below). + strfmon (buf, 100, "@%=0(16#5.3i@%=0(16#5.3i@%=0(16#5.3i@", + 123.45, -567.89, 12345.678); - The `dgettext' function can be expressed in terms of `dcgettext' - by using +This rather complex format string produces the following output: - dcgettext (domain, string, LC_MESSAGES) + "@ USD 000123,450 @(USD 000567.890)@ USD 12,345.678 @" - instead of + The most noticeable change is the alternative way of representing +negative numbers. In financial circles this is often done using +parentheses, and this is what the `(' flag selected. The fill +character is now `0'. Note that this `0' character is not regarded as +a numeric zero, and therefore the first and second numbers are not +printed using a thousands separator. Since we used the format +specifier `i' instead of `n', the international form of the currency +symbol is used. This is a four letter string, in this case `"USD "'. +The last point is that since the precision right of the decimal point +is selected to be three, the first and second numbers are printed with +an extra zero at the end and the third number is printed without +rounding. - dgettext (domain, string) + +File: libc.info, Node: Yes-or-No Questions, Prev: Formatting Numbers, Up: Locales - This also shows which values are expected for the third parameter. - One has to use the available selectors for the categories - available in `locale.h'. Normally the available values are - `LC_CTYPE', `LC_COLLATE', `LC_MESSAGES', `LC_MONETARY', - `LC_NUMERIC', and `LC_TIME'. Please note that `LC_ALL' must not - be used and even though the names might suggest this, there is no - relation to the environments variables of this name. +Yes-or-No Questions +=================== - The `dcgettext' function is only implemented for compatibility with - other systems which have `gettext' functions. There is not really - any situation where it is necessary (or useful) to use a different - value but `LC_MESSAGES' in for the CATEGORY parameter. We are - dealing with messages here and any other choice can only be - irritating. + Some non GUI programs ask a yes-or-no question. If the messages +(especially the questions) are translated into foreign languages, be +sure that you localize the answers too. It would be very bad habit to +ask a question in one language and request the answer in another, often +English. - As for `gettext' the return value type is `char *' which is an - anachronism. The returned string must never be modified. + The GNU C library contains `rpmatch' to give applications easy +access to the corresponding locale definitions. - When using the three functions above in a program it is a frequent -case that the MSGID argument is a constant string. So it is worth to -optimize this case. Thinking shortly about this one will realize that -as long as no new message catalog is loaded the translation of a message -will not change. This optimization is actually implemented by the -`gettext', `dgettext' and `dcgettext' functions. + - Function: int rpmatch (const char *RESPONSE) + The function `rpmatch' checks the string in RESPONSE whether or + not it is a correct yes-or-no answer and if yes, which one. The + check uses the `YESEXPR' and `NOEXPR' data in the `LC_MESSAGES' + category of the currently selected locale. The return value is as + follows: - -File: libc.info, Node: Locating gettext catalog, Next: Advanced gettext functions, Prev: Translation with gettext, Up: Message catalogs with gettext + `1' + The user entered an affirmative answer. -How to determine which catalog to be used -......................................... + `0' + The user entered a negative answer. - The functions to retrieve the translations for a given message have a -remarkable simple interface. But to provide the user of the program -still the opportunity to select exactly the translation s/he wants and -also to provide the programmer the possibility to influence the way to -locate the search for catalogs files there is a quite complicated -underlying mechanism which controls all this. The code is complicated -the use is easy. + `-1' + The answer matched neither the `YESEXPR' nor the `NOEXPR' + regular expression. - Basically we have two different tasks to perform which can also be -performed by the `catgets' functions: + This function is not standardized but available beside in GNU libc + at least also in the IBM AIX library. - 1. Locate the set of message catalogs. There are a number of files - for different languages and which all belong to the package. - Usually they are all stored in the filesystem below a certain - directory. +This function would normally be used like this: - There can be arbitrary many packages installed and they can follow - different guidelines for the placement of their files. + ... + /* Use a safe default. */ + _Bool doit = false; + + fputs (gettext ("Do you really want to do this? "), stdout); + fflush (stdout); + /* Prepare the `getline' call. */ + line = NULL; + len = 0; + while (getline (&line, &len, stdout) >= 0) + { + /* Check the response. */ + int res = rpmatch (line); + if (res >= 0) + { + /* We got a definitive answer. */ + if (res > 0) + doit = true; + break; + } + } + /* Free what `getline' allocated. */ + free (line); - 2. Relative to the location specified by the package the actual - translation files must be searched, based on the wishes of the - user. I.e., for each language the user selects the program should - be able to locate the appropriate file. + Note that the loop continues until an read error is detected or +until a definitive (positive or negative) answer is read. - This is the functionality required by the specifications for -`gettext' and this is also what the `catgets' functions are able to do. -But there are some problems unresolved: + +File: libc.info, Node: Message Translation, Next: Searching and Sorting, Prev: Locales, Up: Top - * The language to be used can be specified in several different ways. - There is no generally accepted standard for this and the user - always expects the program understand what s/he means. E.g., to - select the German translation one could write `de', `german', or - `deutsch' and the program should always react the same. +Message Translation +******************* - * Sometimes the specification of the user is too detailed. If s/he, - e.g., specifies `de_DE.ISO-8859-1' which means German, spoken in - Germany, coded using the ISO 8859-1 character set there is the - possibility that a message catalog matching this exactly is not - available. But there could be a catalog matching `de' and if the - character set used on the machine is always ISO 8859-1 there is no - reason why this later message catalog should not be used. (We - call this "message inheritance".) + The program's interface with the human should be designed in a way to +ease the human the task. One of the possibilities is to use messages in +whatever language the user prefers. - * If a catalog for a wanted language is not available it is not - always the second best choice to fall back on the language of the - developer and simply not translate any message. Instead a user - might be better able to read the messages in another language and - so the user of the program should be able to define an precedence - order of languages. + Printing messages in different languages can be implemented in +different ways. One could add all the different languages in the +source code and add among the variants every time a message has to be +printed. This is certainly no good solution since extending the set of +languages is difficult (the code must be changed) and the code itself +can become really big with dozens of message sets. - We can divide the configuration actions in two parts: the one is -performed by the programmer, the other by the user. We will start with -the functions the programmer can use since the user configuration will -be based on this. + A better solution is to keep the message sets for each language are +kept in separate files which are loaded at runtime depending on the +language selection of the user. - As the functions described in the last sections already mention -separate sets of messages can be selected by a "domain name". This is a -simple string which should be unique for each program part with uses a -separate domain. It is possible to use in one program arbitrary many -domains at the same time. E.g., the GNU C Library itself uses a domain -named `libc' while the program using the C Library could use a domain -named `foo'. The important point is that at any time exactly one -domain is active. This is controlled with the following function. + The GNU C Library provides two different sets of functions to support +message translation. The problem is that neither of the interfaces is +officially defined by the POSIX standard. The `catgets' family of +functions is defined in the X/Open standard but this is derived from +industry decisions and therefore not necessarily based on reasonable +decisions. - - Function: char * textdomain (const char *DOMAINNAME) - The `textdomain' function sets the default domain, which is used in - all future `gettext' calls, to DOMAINNAME. Please note that - `dgettext' and `dcgettext' calls are not influenced if the - DOMAINNAME parameter of these functions is not the null pointer. + As mentioned above the message catalog handling provides easy +extendibility by using external data files which contain the message +translations. I.e., these files contain for each of the messages used +in the program a translation for the appropriate language. So the tasks +of the message handling functions are - Before the first call to `textdomain' the default domain is - `messages'. This is the name specified in the specification of - the `gettext' API. This name is as good as any other name. No - program should ever really use a domain with this name since this - can only lead to problems. + * locate the external data file with the appropriate translations. - The function returns the value which is from now on taken as the - default domain. If the system went out of memory the returned - value is `NULL' and the global variable ERRNO is set to `ENOMEM'. - Despite the return value type being `char *' the return string must - not be changed. It is allocated internally by the `textdomain' - function. + * load the data and make it possible to address the messages - If the DOMAINNAME parameter is the null pointer no new default - domain is set. Instead the currently selected default domain is - returned. + * map a given key to the translated message - If the DOMAINNAME parameter is the empty string the default domain - is reset to its initial value, the domain with the name `messages'. - This possibility is questionable to use since the domain `messages' - really never should be used. + The two approaches mainly differ in the implementation of this last +step. The design decisions made for this influences the whole rest. - - Function: char * bindtextdomain (const char *DOMAINNAME, const char - *DIRNAME) - The `bindtextdomain' function can be used to specify the directory - which contains the message catalogs for domain DOMAINNAME for the - different languages. To be correct, this is the directory where - the hierarchy of directories is expected. Details are explained - below. +* Menu: - For the programmer it is important to note that the translations - which come with the program have be placed in a directory - hierarchy starting at, say, `/foo/bar'. Then the program should - make a `bindtextdomain' call to bind the domain for the current - program to this directory. So it is made sure the catalogs are - found. A correctly running program does not depend on the user - setting an environment variable. +* Message catalogs a la X/Open:: The `catgets' family of functions. +* The Uniforum approach:: The `gettext' family of functions. - The `bindtextdomain' function can be used several times and if the - DOMAINNAME argument is different the previously bound domains will - not be overwritten. + +File: libc.info, Node: Message catalogs a la X/Open, Next: The Uniforum approach, Up: Message Translation - If the program which wish to use `bindtextdomain' at some point of - time use the `chdir' function to change the current working - directory it is important that the DIRNAME strings ought to be an - absolute pathname. Otherwise the addressed directory might vary - with the time. +X/Open Message Catalog Handling +=============================== - If the DIRNAME parameter is the null pointer `bindtextdomain' - returns the currently selected directory for the domain with the - name DOMAINNAME. + The `catgets' functions are based on the simple scheme: - The `bindtextdomain' function returns a pointer to a string - containing the name of the selected directory name. The string is - allocated internally in the function and must not be changed by the - user. If the system went out of core during the execution of - `bindtextdomain' the return value is `NULL' and the global - variable ERRNO is set accordingly. + Associate every message to translate in the source code with a + unique identifier. To retrieve a message from a catalog file + solely the identifier is used. + + This means for the author of the program that s/he will have to make +sure the meaning of the identifier in the program code and in the +message catalogs are always the same. + + Before a message can be translated the catalog file must be located. +The user of the program must be able to guide the responsible function +to find whatever catalog the user wants. This is separated from what +the programmer had in mind. + + All the types, constants and functions for the `catgets' functions +are defined/declared in the `nl_types.h' header file. + +* Menu: + +* The catgets Functions:: The `catgets' function family. +* The message catalog files:: Format of the message catalog files. +* The gencat program:: How to generate message catalogs files which + can be used by the functions. +* Common Usage:: How to use the `catgets' interface. diff -durpN glibc-2.2.4/manual/libc.info-13 glibc-2.2.5/manual/libc.info-13 --- glibc-2.2.4/manual/libc.info-13 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-13 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1128 +33,906 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Advanced gettext functions, Next: Charset conversion in gettext, Prev: Locating gettext catalog, Up: Message catalogs with gettext - -Additional functions for more complicated situations -.................................................... +File: libc.info, Node: The catgets Functions, Next: The message catalog files, Up: Message catalogs a la X/Open - The functions of the `gettext' family described so far (and all the -`catgets' functions as well) have one problem in the real world which -have been neglected completely in all existing approaches. What is -meant here is the handling of plural forms. +The `catgets' function family +----------------------------- - Looking through Unix source code before the time anybody thought -about internationalization (and, sadly, even afterwards) one can often -find code similar to the following: + - Function: nl_catd catopen (const char *CAT_NAME, int FLAG) + The `catgets' function tries to locate the message data file names + CAT_NAME and loads it when found. The return value is of an + opaque type and can be used in calls to the other functions to + refer to this loaded catalog. - printf ("%d file%s deleted", n, n == 1 ? "" : "s"); + The return value is `(nl_catd) -1' in case the function failed and + no catalog was loaded. The global variable ERRNO contains a code + for the error causing the failure. But even if the function call + succeeded this does not mean that all messages can be translated. -After the first complaints from people internationalizing the code -people either completely avoided formulations like this or used strings -like `"file(s)"'. Both look unnatural and should be avoided. First -tries to solve the problem correctly looked like this: + Locating the catalog file must happen in a way which lets the user + of the program influence the decision. It is up to the user to + decide about the language to use and sometimes it is useful to use + alternate catalog files. All this can be specified by the user by + setting some environment variables. - if (n == 1) - printf ("%d file deleted", n); - else - printf ("%d files deleted", n); + The first problem is to find out where all the message catalogs are + stored. Every program could have its own place to keep all the + different files but usually the catalog files are grouped by + languages and the catalogs for all programs are kept in the same + place. - But this does not solve the problem. It helps languages where the -plural form of a noun is not simply constructed by adding an `s' but -that is all. Once again people fell into the trap of believing the -rules their language is using are universal. But the handling of plural -forms differs widely between the language families. There are two -things we can differ between (and even inside language families); + To tell the `catopen' function where the catalog for the program + can be found the user can set the environment variable `NLSPATH' to + a value which describes her/his choice. Since this value must be + usable for different languages and locales it cannot be a simple + string. Instead it is a format string (similar to `printf''s). + An example is - * The form how plural forms are build differs. This is a problem - with language which have many irregularities. German, for - instance, is a drastic case. Though English and German are part - of the same language family (Germanic), the almost regular forming - of plural noun forms (appending an `s') is hardly found in German. + /usr/share/locale/%L/%N:/usr/share/locale/%L/LC_MESSAGES/%N - * The number of plural forms differ. This is somewhat surprising for - those who only have experiences with Romanic and Germanic languages - since here the number is the same (there are two). + First one can see that more than one directory can be specified + (with the usual syntax of separating them by colons). The next + things to observe are the format string, `%L' and `%N' in this + case. The `catopen' function knows about several of them and the + replacement for all of them is of course different. - But other language families have only one form or many forms. More - information on this in an extra section. + `%N' + This format element is substituted with the name of the + catalog file. This is the value of the CAT_NAME argument + given to `catgets'. - The consequence of this is that application writers should not try to -solve the problem in their code. This would be localization since it is -only usable for certain, hardcoded language environments. Instead the -extended `gettext' interface should be used. + `%L' + This format element is substituted with the name of the + currently selected locale for translating messages. How this + is determined is explained below. - These extra functions are taking instead of the one key string two -strings and an numerical argument. The idea behind this is that using -the numerical argument and the first string as a key, the implementation -can select using rules specified by the translator the right plural -form. The two string arguments then will be used to provide a return -value in case no message catalog is found (similar to the normal -`gettext' behavior). In this case the rules for Germanic language is -used and it is assumed that the first string argument is the singular -form, the second the plural form. + `%l' + (This is the lowercase ell.) This format element is + substituted with the language element of the locale name. + The string describing the selected locale is expected to have + the form `LANG[_TERR[.CODESET]]' and this format uses the + first part LANG. - This has the consequence that programs without language catalogs can -display the correct strings only if the program itself is written using -a Germanic language. This is a limitation but since the GNU C library -(as well as the GNU `gettext' package) are written as part of the GNU -package and the coding standards for the GNU project require program -being written in English, this solution nevertheless fulfills its -purpose. + `%t' + This format element is substituted by the territory part TERR + of the name of the currently selected locale. See the + explanation of the format above. - - Function: char * ngettext (const char *MSGID1, const char *MSGID2, - unsigned long int N) - The `ngettext' function is similar to the `gettext' function as it - finds the message catalogs in the same way. But it takes two - extra arguments. The MSGID1 parameter must contain the singular - form of the string to be converted. It is also used as the key - for the search in the catalog. The MSGID2 parameter is the plural - form. The parameter N is used to determine the plural form. If no - message catalog is found MSGID1 is returned if `n == 1', otherwise - `msgid2'. + `%c' + This format element is substituted by the codeset part + CODESET of the name of the currently selected locale. See + the explanation of the format above. - An example for the us of this function is: + `%%' + Since `%' is used in a meta character there must be a way to + express the `%' character in the result itself. Using `%%' + does this just like it works for `printf'. - printf (ngettext ("%d file removed", "%d files removed", n), n); + Using `NLSPATH' allows arbitrary directories to be searched for + message catalogs while still allowing different languages to be + used. If the `NLSPATH' environment variable is not set, the + default value is - Please note that the numeric value N has to be passed to the - `printf' function as well. It is not sufficient to pass it only to - `ngettext'. + PREFIX/share/locale/%L/%N:PREFIX/share/locale/%L/LC_MESSAGES/%N - - Function: char * dngettext (const char *DOMAIN, const char *MSGID1, - const char *MSGID2, unsigned long int N) - The `dngettext' is similar to the `dgettext' function in the way - the message catalog is selected. The difference is that it takes - two extra parameter to provide the correct plural form. These two - parameters are handled in the same way `ngettext' handles them. + where PREFIX is given to `configure' while installing the GNU C + Library (this value is in many cases `/usr' or the empty string). - - Function: char * dcngettext (const char *DOMAIN, const char *MSGID1, - const char *MSGID2, unsigned long int N, int CATEGORY) - The `dcngettext' is similar to the `dcgettext' function in the way - the message catalog is selected. The difference is that it takes - two extra parameter to provide the correct plural form. These two - parameters are handled in the same way `ngettext' handles them. + The remaining problem is to decide which must be used. The value + decides about the substitution of the format elements mentioned + above. First of all the user can specify a path in the message + catalog name (i.e., the name contains a slash character). In this + situation the `NLSPATH' environment variable is not used. The + catalog must exist as specified in the program, perhaps relative + to the current working directory. This situation in not desirable + and catalogs names never should be written this way. Beside this, + this behavior is not portable to all other platforms providing the + `catgets' interface. -The problem of plural forms -........................... + Otherwise the values of environment variables from the standard + environment are examined (*note Standard Environment::). Which + variables are examined is decided by the FLAG parameter of + `catopen'. If the value is `NL_CAT_LOCALE' (which is defined in + `nl_types.h') then the `catopen' function use the name of the + locale currently selected for the `LC_MESSAGES' category. - A description of the problem can be found at the beginning of the -last section. Now there is the question how to solve it. Without the -input of linguists (which was not available) it was not possible to -determine whether there are only a few different forms in which plural -forms are formed or whether the number can increase with every new -supported language. + If FLAG is zero the `LANG' environment variable is examined. This + is a left-over from the early days where the concept of the locales + had not even reached the level of POSIX locales. - Therefore the solution implemented is to allow the translator to -specify the rules of how to select the plural form. Since the formula -varies with every language this is the only viable solution except for -hardcoding the information in the code (which still would require the -possibility of extensions to not prevent the use of new languages). The -details are explained in the GNU `gettext' manual. Here only a a bit -of information is provided. + The environment variable and the locale name should have a value + of the form `LANG[_TERR[.CODESET]]' as explained above. If no + environment variable is set the `"C"' locale is used which + prevents any translation. - The information about the plural form selection has to be stored in -the header entry (the one with the empty (`msgid' string). It looks -like this: + The return value of the function is in any case a valid string. + Either it is a translation from a message catalog or it is the + same as the STRING parameter. So a piece of code to decide + whether a translation actually happened must look like this: - Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1; + { + char *trans = catgets (desc, set, msg, input_string); + if (trans == input_string) + { + /* Something went wrong. */ + } + } - The `nplurals' value must be a decimal number which specifies how -many different plural forms exist for this language. The string -following `plural' is an expression which is using the C language -syntax. Exceptions are that no negative number are allowed, numbers -must be decimal, and the only variable allowed is `n'. This expression -will be evaluated whenever one of the functions `ngettext', -`dngettext', or `dcngettext' is called. The numeric value passed to -these functions is then substituted for all uses of the variable `n' in -the expression. The resulting value then must be greater or equal to -zero and smaller than the value given as the value of `nplurals'. + When an error occurred the global variable ERRNO is set to -The following rules are known at this point. The language with families -are listed. But this does not necessarily mean the information can be -generalized for the whole family (as can be easily seen in the table -below).(1) + EBADF + The catalog does not exist. -Only one form: - Some languages only require one single form. There is no - distinction between the singular and plural form. An appropriate - header entry would look like this: + ENOMSG + The set/message tuple does not name an existing element in the + message catalog. - Plural-Forms: nplurals=1; plural=0; + While it sometimes can be useful to test for errors programs + normally will avoid any test. If the translation is not available + it is no big problem if the original, untranslated message is + printed. Either the user understands this as well or s/he will + look for the reason why the messages are not translated. - Languages with this property include: + Please note that the currently selected locale does not depend on a +call to the `setlocale' function. It is not necessary that the locale +data files for this locale exist and calling `setlocale' succeeds. The +`catopen' function directly reads the values of the environment +variables. - Finno-Ugric family - Hungarian + - Function: char * catgets (nl_catd CATALOG_DESC, int SET, int + MESSAGE, const char *STRING) + The function `catgets' has to be used to access the massage catalog + previously opened using the `catopen' function. The CATALOG_DESC + parameter must be a value previously returned by `catopen'. - Asian family - Japanese + The next two parameters, SET and MESSAGE, reflect the internal + organization of the message catalog files. This will be explained + in detail below. For now it is interesting to know that a catalog + can consists of several set and the messages in each thread are + individually numbered using numbers. Neither the set number nor + the message number must be consecutive. They can be arbitrarily + chosen. But each message (unless equal to another one) must have + its own unique pair of set and message number. - Turkic/Altaic family - Turkish + Since it is not guaranteed that the message catalog for the + language selected by the user exists the last parameter STRING + helps to handle this case gracefully. If no matching string can + be found STRING is returned. This means for the programmer that -Two forms, singular used for one only - This is the form used in most existing programs since it is what - English is using. A header entry would look like this: + * the STRING parameters should contain reasonable text (this + also helps to understand the program seems otherwise there + would be no hint on the string which is expected to be + returned. - Plural-Forms: nplurals=2; plural=n != 1; + * all STRING arguments should be written in the same language. - (Note: this uses the feature of C expressions that boolean - expressions have to value zero or one.) + It is somewhat uncomfortable to write a program using the `catgets' +functions if no supporting functionality is available. Since each +set/message number tuple must be unique the programmer must keep lists +of the messages at the same time the code is written. And the work +between several people working on the same project must be coordinated. +We will see some how these problems can be relaxed a bit (*note Common +Usage::). - Languages with this property include: + - Function: int catclose (nl_catd CATALOG_DESC) + The `catclose' function can be used to free the resources + associated with a message catalog which previously was opened by a + call to `catopen'. If the resources can be successfully freed the + function returns `0'. Otherwise it return `-1' and the global + variable ERRNO is set. Errors can occur if the catalog descriptor + CATALOG_DESC is not valid in which case ERRNO is set to `EBADF'. - Germanic family - Danish, Dutch, English, German, Norwegian, Swedish + +File: libc.info, Node: The message catalog files, Next: The gencat program, Prev: The catgets Functions, Up: Message catalogs a la X/Open - Finno-Ugric family - Estonian, Finnish +Format of the message catalog files +----------------------------------- - Latin/Greek family - Greek + The only reasonable way the translate all the messages of a function +and store the result in a message catalog file which can be read by the +`catopen' function is to write all the message text to the translator +and let her/him translate them all. I.e., we must have a file with +entries which associate the set/message tuple with a specific +translation. This file format is specified in the X/Open standard and +is as follows: - Semitic family - Hebrew + * Lines containing only whitespace characters or empty lines are + ignored. - Romance family - Italian, Spanish + * Lines which contain as the first non-whitespace character a `$' + followed by a whitespace character are comment and are also + ignored. - Artificial - Esperanto + * If a line contains as the first non-whitespace characters the + sequence `$set' followed by a whitespace character an additional + argument is required to follow. This argument can either be: -Two forms, singular used for zero and one - Exceptional case in the language family. The header entry would - be: + - a number. In this case the value of this number determines + the set to which the following messages are added. - Plural-Forms: nplurals=2; plural=n>1; + - an identifier consisting of alphanumeric characters plus the + underscore character. In this case the set get automatically + a number assigned. This value is one added to the largest + set number which so far appeared. - Languages with this property include: + How to use the symbolic names is explained in section *Note + Common Usage::. - Romanic family - French + It is an error if a symbol name appears more than once. All + following messages are placed in a set with this number. -Three forms, special cases for one and two - The header entry would be: + * If a line contains as the first non-whitespace characters the + sequence `$delset' followed by a whitespace character an + additional argument is required to follow. This argument can + either be: - Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2; + - a number. In this case the value of this number determines + the set which will be deleted. - Languages with this property include: + - an identifier consisting of alphanumeric characters plus the + underscore character. This symbolic identifier must match a + name for a set which previously was defined. It is an error + if the name is unknown. - Celtic - Gaeilge + In both cases all messages in the specified set will be removed. + They will not appear in the output. But if this set is later + again selected with a `$set' command again messages could be added + and these messages will appear in the output. -Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4] - The header entry would look like this: + * If a line contains after leading whitespaces the sequence + `$quote', the quoting character used for this input file is + changed to the first non-whitespace character following the + `$quote'. If no non-whitespace character is present before the + line ends quoting is disable. - Plural-Forms: nplurals=3; \ - plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1; + By default no quoting character is used. In this mode strings are + terminated with the first unescaped line break. If there is a + `$quote' sequence present newline need not be escaped. Instead a + string is terminated with the first unescaped appearance of the + quote character. - Languages with this property include: + A common usage of this feature would be to set the quote character + to `"'. Then any appearance of the `"' in the strings must be + escaped using the backslash (i.e., `\"' must be written). - Slavic family - Czech, Russian, Slovak + * Any other line must start with a number or an alphanumeric + identifier (with the underscore character included). The + following characters (starting after the first whitespace + character) will form the string which gets associated with the + currently selected set and the message number represented by the + number and identifier respectively. -Three forms, special case for one and some numbers ending in 2, 3, or 4 - The header entry would look like this: + If the start of the line is a number the message number is + obvious. It is an error if the same message number already + appeared for this set. - Plural-Forms: nplurals=3; \ - plural=n==1 ? 0 : \ - n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; + If the leading token was an identifier the message number gets + automatically assigned. The value is the current maximum messages + number for this set plus one. It is an error if the identifier was + already used for a message in this set. It is OK to reuse the + identifier for a message in another thread. How to use the + symbolic identifiers will be explained below (*note Common + Usage::). There is one limitation with the identifier: it must + not be `Set'. The reason will be explained below. - (Continuation in the next line is possible.) + The text of the messages can contain escape characters. The usual + bunch of characters known from the ISO C language are recognized + (`\n', `\t', `\v', `\b', `\r', `\f', `\\', and `\NNN', where NNN + is the octal coding of a character code). - Languages with this property include: + *Important:* The handling of identifiers instead of numbers for the +set and messages is a GNU extension. Systems strictly following the +X/Open specification do not have this feature. An example for a message +catalog file is this: - Slavic family - Polish + $ This is a leading comment. + $quote " + + $set SetOne + 1 Message with ID 1. + two " Message with ID \"two\", which gets the value 2 assigned" + + $set SetTwo + $ Since the last set got the number 1 assigned this set has number 2. + 4000 "The numbers can be arbitrary, they need not start at one." -Four forms, special case for one and all numbers ending in 2, 3, or 4 - The header entry would look like this: + This small example shows various aspects: + * Lines 1 and 9 are comments since they start with `$' followed by a + whitespace. - Plural-Forms: nplurals=4; \ - plural=n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3; + * The quoting character is set to `"'. Otherwise the quotes in the + message definition would have to be left away and in this case the + message with the identifier `two' would loose its leading + whitespace. - Languages with this property include: + * Mixing numbered messages with message having symbolic names is no + problem and the numbering happens automatically. - Slavic family - Slovenian + While this file format is pretty easy it is not the best possible for +use in a running program. The `catopen' function would have to parser +the file and handle syntactic errors gracefully. This is not so easy +and the whole process is pretty slow. Therefore the `catgets' +functions expect the data in another more compact and ready-to-use file +format. There is a special program `gencat' which is explained in +detail in the next section. - ---------- Footnotes ---------- + Files in this other format are not human readable. To be easy to +use by programs it is a binary file. But the format is byte order +independent so translation files can be shared by systems of arbitrary +architecture (as long as they use the GNU C Library). - (1) Additions are welcome. Send appropriate information to -. + Details about the binary file format are not important to know since +these files are always created by the `gencat' program. The sources of +the GNU C Library also provide the sources for the `gencat' program and +so the interested reader can look through these source files to learn +about the file format.  -File: libc.info, Node: Charset conversion in gettext, Next: GUI program problems, Prev: Advanced gettext functions, Up: Message catalogs with gettext - -How to specify the output character set `gettext' uses -...................................................... - - `gettext' not only looks up a translation in a message catalog. It -also converts the translation on the fly to the desired output character -set. This is useful if the user is working in a different character set -than the translator who created the message catalog, because it avoids -distributing variants of message catalogs which differ only in the -character set. - - The output character set is, by default, the value of `nl_langinfo -(CODESET)', which depends on the `LC_CTYPE' part of the current locale. -But programs which store strings in a locale independent way (e.g. -UTF-8) can request that `gettext' and related functions return the -translations in that encoding, by use of the `bind_textdomain_codeset' -function. - - Note that the MSGID argument to `gettext' is not subject to -character set conversion. Also, when `gettext' does not find a -translation for MSGID, it returns MSGID unchanged - independently of -the current output character set. It is therefore recommended that all -MSGIDs be US-ASCII strings. - - - Function: char * bind_textdomain_codeset (const char *DOMAINNAME, - const char *CODESET) - The `bind_textdomain_codeset' function can be used to specify the - output character set for message catalogs for domain DOMAINNAME. - The CODESET argument must be a valid codeset name which can be used - for the `iconv_open' function, or a null pointer. - - If the CODESET parameter is the null pointer, - `bind_textdomain_codeset' returns the currently selected codeset - for the domain with the name DOMAINNAME. It returns `NULL' if no - codeset has yet been selected. - - The `bind_textdomain_codeset' function can be used several times. - If used multiple times with the same DOMAINNAME argument, the - later call overrides the settings made by the earlier one. - - The `bind_textdomain_codeset' function returns a pointer to a - string containing the name of the selected codeset. The string is - allocated internally in the function and must not be changed by the - user. If the system went out of core during the execution of - `bind_textdomain_codeset', the return value is `NULL' and the - global variable ERRNO is set accordingly. +File: libc.info, Node: The gencat program, Next: Common Usage, Prev: The message catalog files, Up: Message catalogs a la X/Open - -File: libc.info, Node: GUI program problems, Next: Using gettextized software, Prev: Charset conversion in gettext, Up: Message catalogs with gettext +Generate Message Catalogs files +------------------------------- -How to use `gettext' in GUI programs -.................................... + The `gencat' program is specified in the X/Open standard and the GNU +implementation follows this specification and so processes all +correctly formed input files. Additionally some extension are +implemented which help to work in a more reasonable way with the +`catgets' functions. - One place where the `gettext' functions, if used normally, have big -problems is within programs with graphical user interfaces (GUIs). The -problem is that many of the strings which have to be translated are very -short. They have to appear in pull-down menus which restricts the -length. But strings which are not containing entire sentences or at -least large fragments of a sentence may appear in more than one -situation in the program but might have different translations. This is -especially true for the one-word strings which are frequently used in -GUI programs. + The `gencat' program can be invoked in two ways: - As a consequence many people say that the `gettext' approach is -wrong and instead `catgets' should be used which indeed does not have -this problem. But there is a very simple and powerful method to handle -these kind of problems with the `gettext' functions. + `gencat [OPTION]... [OUTPUT-FILE [INPUT-FILE]...]` -As as example consider the following fictional situation. A GUI program -has a menu bar with the following entries: + This is the interface defined in the X/Open standard. If no +INPUT-FILE parameter is given input will be read from standard input. +Multiple input files will be read as if they are concatenated. If +OUTPUT-FILE is also missing, the output will be written to standard +output. To provide the interface one is used to from other programs a +second interface is provided. - +------------+------------+--------------------------------------+ - | File | Printer | | - +------------+------------+--------------------------------------+ - | Open | | Select | - | New | | Open | - +----------+ | Connect | - +----------+ + `gencat [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...` - To have the strings `File', `Printer', `Open', `New', `Select', and -`Connect' translated there has to be at some point in the code a call -to a function of the `gettext' family. But in two places the string -passed into the function would be `Open'. The translations might not -be the same and therefore we are in the dilemma described above. + The option `-o' is used to specify the output file and all file +arguments are used as input files. - One solution to this problem is to artificially enlengthen the -strings to make them unambiguous. But what would the program do if no -translation is available? The enlengthened string is not what should be -printed. So we should use a little bit modified version of the -functions. + Beside this one can use `-' or `/dev/stdin' for INPUT-FILE to denote +the standard input. Corresponding one can use `-' and `/dev/stdout' +for OUTPUT-FILE to denote standard output. Using `-' as a file name is +allowed in X/Open while using the device names is a GNU extension. - To enlengthen the strings a uniform method should be used. E.g., in -the example above the strings could be chosen as + The `gencat' program works by concatenating all input files and then +*merge* the resulting collection of message sets with a possibly +existing output file. This is done by removing all messages with +set/message number tuples matching any of the generated messages from +the output file and then adding all the new messages. To regenerate a +catalog file while ignoring the old contents therefore requires to +remove the output file if it exists. If the output is written to +standard output no merging takes place. - Menu|File - Menu|Printer - Menu|File|Open - Menu|File|New - Menu|Printer|Select - Menu|Printer|Open - Menu|Printer|Connect +The following table shows the options understood by the `gencat' +program. The X/Open standard does not specify any option for the +program so all of these are GNU extensions. - Now all the strings are different and if now instead of `gettext' -the following little wrapper function is used, everything works just -fine: +`-V' +`--version' + Print the version information and exit. - char * - sgettext (const char *msgid) - { - char *msgval = gettext (msgid); - if (msgval == msgid) - msgval = strrchr (msgid, '|') + 1; - return msgval; - } +`-h' +`--help' + Print a usage message listing all available options, then exit + successfully. - What this little function does is to recognize the case when no -translation is available. This can be done very efficiently by a -pointer comparison since the return value is the input value. If there -is no translation we know that the input string is in the format we used -for the Menu entries and therefore contains a `|' character. We simply -search for the last occurrence of this character and return a pointer -to the character following it. That's it! +`--new' + Do never merge the new messages from the input files with the old + content of the output files. The old content of the output file + is discarded. - If one now consistently uses the enlengthened string form and -replaces the `gettext' calls with calls to `sgettext' (this is normally -limited to very few places in the GUI implementation) then it is -possible to produce a program which can be internationalized. +`-H' +`--header=name' + This option is used to emit the symbolic names given to sets and + messages in the input files for use in the program. Details about + how to use this are given in the next section. The NAME parameter + to this option specifies the name of the output file. It will + contain a number of C preprocessor `#define's to associate a name + with a number. - With advanced compilers (such as GNU C) one can write the `sgettext' -functions as an inline function or as a macro like this: + Please note that the generated file only contains the symbols from + the input files. If the output is merged with the previous + content of the output file the possibly existing symbols from the + file(s) which generated the old output files are not in the + generated header file. - #define sgettext(msgid) \ - ({ const char *__msgid = (msgid); \ - char *__msgstr = gettext (__msgid); \ - if (__msgval == __msgid) \ - __msgval = strrchr (__msgid, '|') + 1; \ - __msgval; }) + +File: libc.info, Node: Common Usage, Prev: The gencat program, Up: Message catalogs a la X/Open - The other `gettext' functions (`dgettext', `dcgettext' and the -`ngettext' equivalents) can and should have corresponding functions as -well which look almost identical, except for the parameters and the -call to the underlying function. +How to use the `catgets' interface +---------------------------------- - Now there is of course the question why such functions do not exist -in the GNU C library? There are two parts of the answer to this -question. + The `catgets' functions can be used in two different ways. By +following slavishly the X/Open specs and not relying on the extension +and by using the GNU extensions. We will take a look at the former +method first to understand the benefits of extensions. - * They are easy to write and therefore can be provided by the - project they are used in. This is not an answer by itself and - must be seen together with the second part which is: +Not using symbolic names +........................ - * There is no way the C library can contain a version which can work - everywhere. The problem is the selection of the character to - separate the prefix from the actual string in the enlenghtened - string. The examples above used `|' which is a quite good choice - because it resembles a notation frequently used in this context - and it also is a character not often used in message strings. + Since the X/Open format of the message catalog files does not allow +symbol names we have to work with numbers all the time. When we start +writing a program we have to replace all appearances of translatable +strings with something like - But what if the character is used in message strings. Or if the - chose character is not available in the character set on the - machine one compiles (e.g., `|' is not required to exist for - ISO C; this is why the `iso646.h' file exists in ISO C programming - environments). + catgets (catdesc, set, msg, "string") - There is only one more comment to make left. The wrapper function -above require that the translations strings are not enlengthened -themselves. This is only logical. There is no need to disambiguate -the strings (since they are never used as keys for a search) and one -also saves quite some memory and disk space by doing this. +CATGETS is retrieved from a call to `catopen' which is normally done +once at the program start. The `"string"' is the string we want to +translate. The problems start with the set and message numbers. - -File: libc.info, Node: Using gettextized software, Prev: GUI program problems, Up: Message catalogs with gettext + In a bigger program several programmers usually work at the same +time on the program and so coordinating the number allocation is +crucial. Though no two different strings must be indexed by the same +tuple of numbers it is highly desirable to reuse the numbers for equal +strings with equal translations (please note that there might be +strings which are equal in one language but have different translations +due to difference contexts). -User influence on `gettext' -........................... + The allocation process can be relaxed a bit by different set numbers +for different parts of the program. So the number of developers who +have to coordinate the allocation can be reduced. But still lists must +be keep track of the allocation and errors can easily happen. These +errors cannot be discovered by the compiler or the `catgets' functions. +Only the user of the program might see wrong messages printed. In the +worst cases the messages are so irritating that they cannot be +recognized as wrong. Think about the translations for `"true"' and +`"false"' being exchanged. This could result in a disaster. - The last sections described what the programmer can do to -internationalize the messages of the program. But it is finally up to -the user to select the message s/he wants to see. S/He must understand -them. +Using symbolic names +.................... - The POSIX locale model uses the environment variables `LC_COLLATE', -`LC_CTYPE', `LC_MESSAGES', `LC_MONETARY', `NUMERIC', and `LC_TIME' to -select the locale which is to be used. This way the user can influence -lots of functions. As we mentioned above the `gettext' functions also -take advantage of this. + The problems mentioned in the last section derive from the fact that: - To understand how this happens it is necessary to take a look at the -various components of the filename which gets computed to locate a -message catalog. It is composed as follows: + 1. the numbers are allocated once and due to the possibly frequent + use of them it is difficult to change a number later. - DIR_NAME/LOCALE/LC_CATEGORY/DOMAIN_NAME.mo + 2. the numbers do not allow to guess anything about the string and + therefore collisions can easily happen. - The default value for DIR_NAME is system specific. It is computed -from the value given as the prefix while configuring the C library. -This value normally is `/usr' or `/'. For the former the complete -DIR_NAME is: + By constantly using symbolic names and by providing a method which +maps the string content to a symbolic name (however this will happen) +one can prevent both problems above. The cost of this is that the +programmer has to write a complete message catalog file while s/he is +writing the program itself. - /usr/share/locale + This is necessary since the symbolic names must be mapped to numbers +before the program sources can be compiled. In the last section it was +described how to generate a header containing the mapping of the names. +E.g., for the example message file given in the last section we could +call the `gencat' program as follow (assume `ex.msg' contains the +sources). - We can use `/usr/share' since the `.mo' files containing the message -catalogs are system independent, so all systems can use the same files. -If the program executed the `bindtextdomain' function for the message -domain that is currently handled, the `dir_name' component is exactly -the value which was given to the function as the second parameter. -I.e., `bindtextdomain' allows overwriting the only system dependent and -fixed value to make it possible to address files anywhere in the -filesystem. + gencat -H ex.h -o ex.cat ex.msg - The CATEGORY is the name of the locale category which was selected -in the program code. For `gettext' and `dgettext' this is always -`LC_MESSAGES', for `dcgettext' this is selected by the value of the -third parameter. As said above it should be avoided to ever use a -category other than `LC_MESSAGES'. +This generates a header file with the following content: - The LOCALE component is computed based on the category used. Just -like for the `setlocale' function here comes the user selection into -the play. Some environment variables are examined in a fixed order and -the first environment variable set determines the return value of the -lookup process. In detail, for the category `LC_xxx' the following -variables in this order are examined: + #define SetTwoSet 0x2 /* ex.msg:8 */ + + #define SetOneSet 0x1 /* ex.msg:4 */ + #define SetOnetwo 0x2 /* ex.msg:6 */ -`LANGUAGE' + As can be seen the various symbols given in the source file are +mangled to generate unique identifiers and these identifiers get numbers +assigned. Reading the source file and knowing about the rules will +allow to predict the content of the header file (it is deterministic) +but this is not necessary. The `gencat' program can take care for +everything. All the programmer has to do is to put the generated header +file in the dependency list of the source files of her/his project and +to add a rules to regenerate the header of any of the input files +change. -`LC_ALL' + One word about the symbol mangling. Every symbol consists of two +parts: the name of the message set plus the name of the message or the +special string `Set'. So `SetOnetwo' means this macro can be used to +access the translation with identifier `two' in the message set +`SetOne'. -`LC_xxx' + The other names denote the names of the message sets. The special +string `Set' is used in the place of the message identifier. -`LANG' - This looks very familiar. With the exception of the `LANGUAGE' -environment variable this is exactly the lookup order the `setlocale' -function uses. But why introducing the `LANGUAGE' variable? + If in the code the second string of the set `SetOne' is used the C +code should look like this: - The reason is that the syntax of the values these variables can have -is different to what is expected by the `setlocale' function. If we -would set `LC_ALL' to a value following the extended syntax that would -mean the `setlocale' function will never be able to use the value of -this variable as well. An additional variable removes this problem -plus we can select the language independently of the locale setting -which sometimes is useful. + catgets (catdesc, SetOneSet, SetOnetwo, + " Message with ID \"two\", which gets the value 2 assigned") - While for the `LC_xxx' variables the value should consist of exactly -one specification of a locale the `LANGUAGE' variable's value can -consist of a colon separated list of locale names. The attentive -reader will realize that this is the way we manage to implement one of -our additional demands above: we want to be able to specify an ordered -list of language. + Writing the function this way will allow to change the message number +and even the set number without requiring any change in the C source +code. (The text of the string is normally not the same; this is only +for this example.) - Back to the constructed filename we have only one component missing. -The DOMAIN_NAME part is the name which was either registered using the -`textdomain' function or which was given to `dgettext' or `dcgettext' -as the first parameter. Now it becomes obvious that a good choice for -the domain name in the program code is a string which is closely -related to the program/package name. E.g., for the GNU C Library the -domain name is `libc'. +How does to this allow to develop +................................. -A limit piece of example code should show how the programmer is supposed -to work: + To illustrate the usual way to work with the symbolic version numbers +here is a little example. Assume we want to write the very complex and +famous greeting program. We start by writing the code as usual: + #include + int + main (void) { - setlocale (LC_ALL, ""); - textdomain ("test-package"); - bindtextdomain ("test-package", "/usr/local/share/locale"); - puts (gettext ("Hello, world!")); + printf ("Hello, world!\n"); + return 0; } - At the program start the default domain is `messages', and the -default locale is "C". The `setlocale' call sets the locale according -to the user's environment variables; remember that correct functioning -of `gettext' relies on the correct setting of the `LC_MESSAGES' locale -(for looking up the message catalog) and of the `LC_CTYPE' locale (for -the character set conversion). The `textdomain' call changes the -default domain to `test-package'. The `bindtextdomain' call specifies -that the message catalogs for the domain `test-package' can be found -below the directory `/usr/local/share/locale'. - - If now the user set in her/his environment the variable `LANGUAGE' -to `de' the `gettext' function will try to use the translations from -the file - - /usr/local/share/locale/de/LC_MESSAGES/test-package.mo - - From the above descriptions it should be clear which component of -this filename is determined by which source. - - In the above example we assumed that the `LANGUAGE' environment -variable to `de'. This might be an appropriate selection but what -happens if the user wants to use `LC_ALL' because of the wider -usability and here the required value is `de_DE.ISO-8859-1'? We -already mentioned above that a situation like this is not infrequent. -E.g., a person might prefer reading a dialect and if this is not -available fall back on the standard language. - - The `gettext' functions know about situations like this and can -handle them gracefully. The functions recognize the format of the value -of the environment variable. It can split the value is different pieces -and by leaving out the only or the other part it can construct new -values. This happens of course in a predictable way. To understand -this one must know the format of the environment variable value. There -are two more or less standardized forms: - -_X/Open Format_ - `language[_territory[.codeset]][@modifier]' - -_CEN Format (European Community Standard)_ - `language[_territory][+audience][+special][,[sponsor][_revision]]' - - The functions will automatically recognize which format is used. -Less specific locale names will be stripped of in the order of the -following list: - - 1. `revision' - - 2. `sponsor' - - 3. `special' - - 4. `codeset' - - 5. `normalized codeset' - - 6. `territory' - - 7. `audience'/`modifier' - - From the last entry one can see that the meaning of the `modifier' -field in the X/Open format and the `audience' format have the same -meaning. Beside one can see that the `language' field for obvious -reasons never will be dropped. - - The only new thing is the `normalized codeset' entry. This is -another goodie which is introduced to help reducing the chaos which -derives from the inability of the people to standardize the names of -character sets. Instead of ISO-8859-1 one can often see 8859-1, 88591, -iso8859-1, or iso_8859-1. The `normalized codeset' value is generated -from the user-provided character set name by applying the following -rules: + Now we want to internationalize the message and therefore replace the +message with whatever the user wants. - 1. Remove all characters beside numbers and letters. + #include + #include + #include "msgnrs.h" + int + main (void) + { + nl_catd catdesc = catopen ("hello.cat", NL_CAT_LOCALE); + printf (catgets (catdesc, SetMainSet, SetMainHello, + "Hello, world!\n")); + catclose (catdesc); + return 0; + } - 2. Fold letters to lowercase. + We see how the catalog object is opened and the returned descriptor +used in the other function calls. It is not really necessary to check +for failure of any of the functions since even in these situations the +functions will behave reasonable. They simply will be return a +translation. - 3. If the same only contains digits prepend the string `"iso"'. + What remains unspecified here are the constants `SetMainSet' and +`SetMainHello'. These are the symbolic names describing the message. +To get the actual definitions which match the information in the +catalog file we have to create the message catalog source file and +process it using the `gencat' program. -So all of the above name will be normalized to `iso88591'. This allows -the program user much more freely choosing the locale name. + $ Messages for the famous greeting program. + $quote " + + $set Main + Hello "Hallo, Welt!\n" - Even this extended functionality still does not help to solve the -problem that completely different names can be used to denote the same -locale (e.g., `de' and `german'). To be of help in this situation the -locale implementation and also the `gettext' functions know about -aliases. + Now we can start building the program (assume the message catalog +source file is named `hello.msg' and the program source file `hello.c'): - The file `/usr/share/locale/locale.alias' (replace `/usr' with -whatever prefix you used for configuring the C library) contains a -mapping of alternative names to more regular names. The system manager -is free to add new entries to fill her/his own needs. The selected -locale from the environment is compared with the entries in the first -column of this file ignoring the case. If they match the value of the -second column is used instead for the further handling. + % gencat -H msgnrs.h -o hello.cat hello.msg + % cat msgnrs.h + #define MainSet 0x1 /* hello.msg:4 */ + #define MainHello 0x1 /* hello.msg:5 */ + % gcc -o hello hello.c -I. + % cp hello.cat /usr/share/locale/de/LC_MESSAGES + % echo $LC_ALL + de + % ./hello + Hallo, Welt! + % - In the description of the format of the environment variables we -already mentioned the character set as a factor in the selection of the -message catalog. In fact, only catalogs which contain text written -using the character set of the system/program can be used (directly; -there will come a solution for this some day). This means for the user -that s/he will always have to take care for this. If in the collection -of the message catalogs there are files for the same language but coded -using different character sets the user has to be careful. + The call of the `gencat' program creates the missing header file +`msgnrs.h' as well as the message catalog binary. The former is used +in the compilation of `hello.c' while the later is placed in a +directory in which the `catopen' function will try to locate it. +Please check the `LC_ALL' environment variable and the default path for +`catopen' presented in the description above.  -File: libc.info, Node: Helper programs for gettext, Prev: Message catalogs with gettext, Up: The Uniforum approach - -Programs to handle message catalogs for `gettext' -------------------------------------------------- - - The GNU C Library does not contain the source code for the programs -to handle message catalogs for the `gettext' functions. As part of the -GNU project the GNU gettext package contains everything the developer -needs. The functionality provided by the tools in this package by far -exceeds the abilities of the `gencat' program described above for the -`catgets' functions. - - There is a program `msgfmt' which is the equivalent program to the -`gencat' program. It generates from the human-readable and -editable -form of the message catalog a binary file which can be used by the -`gettext' functions. But there are several more programs available. - - The `xgettext' program can be used to automatically extract the -translatable messages from a source file. I.e., the programmer need not -take care for the translations and the list of messages which have to be -translated. S/He will simply wrap the translatable string in calls to -`gettext' et.al and the rest will be done by `xgettext'. This program -has a lot of option which help to customize the output or do help to -understand the input better. +File: libc.info, Node: The Uniforum approach, Prev: Message catalogs a la X/Open, Up: Message Translation - Other programs help to manage development cycle when new messages -appear in the source files or when a new translation of the messages -appear. here it should only be noted that using all the tools in GNU -gettext it is possible to _completely_ automize the handling of message -catalog. Beside marking the translatable string in the source code and -generating the translations the developers do not have anything to do -themselves. +The Uniforum approach to Message Translation +============================================ - -File: libc.info, Node: Searching and Sorting, Next: Pattern Matching, Prev: Message Translation, Up: Top + Sun Microsystems tried to standardize a different approach to message +translation in the Uniforum group. There never was a real standard +defined but still the interface was used in Sun's operation systems. +Since this approach fits better in the development process of free +software it is also used throughout the GNU project and the GNU +`gettext' package provides support for this outside the GNU C Library. -Searching and Sorting -********************* + The code of the `libintl' from GNU `gettext' is the same as the code +in the GNU C Library. So the documentation in the GNU `gettext' manual +is also valid for the functionality here. The following text will +describe the library functions in detail. But the numerous helper +programs are not described in this manual. Instead people should read +the GNU `gettext' manual (*note GNU gettext utilities: (gettext)Top.). +We will only give a short overview. - This chapter describes functions for searching and sorting arrays of -arbitrary objects. You pass the appropriate comparison function to be -applied as an argument, along with the size of the objects in the array -and the total number of elements. + Though the `catgets' functions are available by default on more +systems the `gettext' interface is at least as portable as the former. +The GNU `gettext' package can be used wherever the functions are not +available. * Menu: -* Comparison Functions:: Defining how to compare two objects. - Since the sort and search facilities - are general, you have to specify the - ordering. -* Array Search Function:: The `bsearch' function. -* Array Sort Function:: The `qsort' function. -* Search/Sort Example:: An example program. -* Hash Search Function:: The `hsearch' function. -* Tree Search Function:: The `tsearch' function. +* Message catalogs with gettext:: The `gettext' family of functions. +* Helper programs for gettext:: Programs to handle message catalogs + for `gettext'.  -File: libc.info, Node: Comparison Functions, Next: Array Search Function, Up: Searching and Sorting - -Defining the Comparison Function -================================ - - In order to use the sorted array library functions, you have to -describe how to compare the elements of the array. - - To do this, you supply a comparison function to compare two elements -of the array. The library will call this function, passing as arguments -pointers to two array elements to be compared. Your comparison function -should return a value the way `strcmp' (*note String/Array -Comparison::) does: negative if the first argument is "less" than the -second, zero if they are "equal", and positive if the first argument is -"greater". +File: libc.info, Node: Message catalogs with gettext, Next: Helper programs for gettext, Up: The Uniforum approach - Here is an example of a comparison function which works with an -array of numbers of type `double': +The `gettext' family of functions +--------------------------------- - int - compare_doubles (const void *a, const void *b) - { - const double *da = (const double *) a; - const double *db = (const double *) b; - - return (*da > *db) - (*da < *db); - } + The paradigms underlying the `gettext' approach to message +translations is different from that of the `catgets' functions the +basic functionally is equivalent. There are functions of the following +categories: - The header file `stdlib.h' defines a name for the data type of -comparison functions. This type is a GNU extension. +* Menu: - int comparison_fn_t (const void *, const void *); +* Translation with gettext:: What has to be done to translate a message. +* Locating gettext catalog:: How to determine which catalog to be used. +* Advanced gettext functions:: Additional functions for more complicated + situations. +* Charset conversion in gettext:: How to specify the output character set + `gettext' uses. +* GUI program problems:: How to use `gettext' in GUI programs. +* Using gettextized software:: The possibilities of the user to influence + the way `gettext' works.  -File: libc.info, Node: Array Search Function, Next: Array Sort Function, Prev: Comparison Functions, Up: Searching and Sorting - -Array Search Function -===================== - - Generally searching for a specific element in an array means that -potentially all elements must be checked. The GNU C library contains -functions to perform linear search. The prototypes for the following -two functions can be found in `search.h'. - - - Function: void * lfind (const void *KEY, void *BASE, size_t *NMEMB, - size_t SIZE, comparison_fn_t COMPAR) - The `lfind' function searches in the array with `*NMEMB' elements - of SIZE bytes pointed to by BASE for an element which matches the - one pointed to by KEY. The function pointed to by COMPAR is used - decide whether two elements match. - - The return value is a pointer to the matching element in the array - starting at BASE if it is found. If no matching element is - available `NULL' is returned. - - The mean runtime of this function is `*NMEMB'/2. This function - should only be used elements often get added to or deleted from - the array in which case it might not be useful to sort the array - before searching. +File: libc.info, Node: Translation with gettext, Next: Locating gettext catalog, Up: Message catalogs with gettext - - Function: void * lsearch (const void *KEY, void *BASE, size_t - *NMEMB, size_t SIZE, comparison_fn_t COMPAR) - The `lsearch' function is similar to the `lfind' function. It - searches the given array for an element and returns it if found. - The difference is that if no matching element is found the - `lsearch' function adds the object pointed to by KEY (with a size - of SIZE bytes) at the end of the array and it increments the value - of `*NMEMB' to reflect this addition. +What has to be done to translate a message? +........................................... - This means for the caller that if it is not sure that the array - contains the element one is searching for the memory allocated for - the array starting at BASE must have room for at least SIZE more - bytes. If one is sure the element is in the array it is better to - use `lfind' so having more room in the array is always necessary - when calling `lsearch'. + The `gettext' functions have a very simple interface. The most +basic function just takes the string which shall be translated as the +argument and it returns the translation. This is fundamentally +different from the `catgets' approach where an extra key is necessary +and the original string is only used for the error case. - To search a sorted array for an element matching the key, use the -`bsearch' function. The prototype for this function is in the header -file `stdlib.h'. + If the string which has to be translated is the only argument this of +course means the string itself is the key. I.e., the translation will +be selected based on the original string. The message catalogs must +therefore contain the original strings plus one translation for any such +string. The task of the `gettext' function is it to compare the +argument string with the available strings in the catalog and return the +appropriate translation. Of course this process is optimized so that +this process is not more expensive than an access using an atomic key +like in `catgets'. - - Function: void * bsearch (const void *KEY, const void *ARRAY, size_t - COUNT, size_t SIZE, comparison_fn_t COMPARE) - The `bsearch' function searches the sorted array ARRAY for an - object that is equivalent to KEY. The array contains COUNT - elements, each of which is of size SIZE bytes. + The `gettext' approach has some advantages but also some +disadvantages. Please see the GNU `gettext' manual for a detailed +discussion of the pros and cons. - The COMPARE function is used to perform the comparison. This - function is called with two pointer arguments and should return an - integer less than, equal to, or greater than zero corresponding to - whether its first argument is considered less than, equal to, or - greater than its second argument. The elements of the ARRAY must - already be sorted in ascending order according to this comparison - function. + All the definitions and declarations for `gettext' can be found in +the `libintl.h' header file. On systems where these functions are not +part of the C library they can be found in a separate library named +`libintl.a' (or accordingly different for shared libraries). - The return value is a pointer to the matching array element, or a - null pointer if no match is found. If the array contains more - than one element that matches, the one that is returned is - unspecified. + - Function: char * gettext (const char *MSGID) + The `gettext' function searches the currently selected message + catalogs for a string which is equal to MSGID. If there is such a + string available it is returned. Otherwise the argument string + MSGID is returned. - This function derives its name from the fact that it is implemented - using the binary search algorithm. + Please note that all though the return value is `char *' the + returned string must not be changed. This broken type results + from the history of the function and does not reflect the way the + function should be used. - -File: libc.info, Node: Array Sort Function, Next: Search/Sort Example, Prev: Array Search Function, Up: Searching and Sorting + Please note that above we wrote "message catalogs" (plural). This + is a specialty of the GNU implementation of these functions and we + will say more about this when we talk about the ways message + catalogs are selected (*note Locating gettext catalog::). -Array Sort Function -=================== + The `gettext' function does not modify the value of the global + ERRNO variable. This is necessary to make it possible to write + something like - To sort an array using an arbitrary comparison function, use the -`qsort' function. The prototype for this function is in `stdlib.h'. + printf (gettext ("Operation failed: %m\n")); - - Function: void qsort (void *ARRAY, size_t COUNT, size_t SIZE, - comparison_fn_t COMPARE) - The QSORT function sorts the array ARRAY. The array contains - COUNT elements, each of which is of size SIZE. + Here the ERRNO value is used in the `printf' function while + processing the `%m' format element and if the `gettext' function + would change this value (it is called before `printf' is called) + we would get a wrong message. - The COMPARE function is used to perform the comparison on the - array elements. This function is called with two pointer - arguments and should return an integer less than, equal to, or - greater than zero corresponding to whether its first argument is - considered less than, equal to, or greater than its second - argument. + So there is no easy way to detect a missing message catalog beside + comparing the argument string with the result. But it is normally + the task of the user to react on missing catalogs. The program + cannot guess when a message catalog is really necessary since for + a user who speaks the language the program was developed in does + not need any translation. - *Warning:* If two objects compare as equal, their order after - sorting is unpredictable. That is to say, the sorting is not - stable. This can make a difference when the comparison considers - only part of the elements. Two elements with the same sort key - may differ in other respects. + The remaining two functions to access the message catalog add some +functionality to select a message catalog which is not the default one. +This is important if parts of the program are developed independently. +Every part can have its own message catalog and all of them can be used +at the same time. The C library itself is an example: internally it +uses the `gettext' functions but since it must not depend on a +currently selected default message catalog it must specify all ambiguous +information. - If you want the effect of a stable sort, you can get this result by - writing the comparison function so that, lacking other reason - distinguish between two elements, it compares them by their - addresses. Note that doing this may make the sorting algorithm - less efficient, so do it only if necessary. + - Function: char * dgettext (const char *DOMAINNAME, const char *MSGID) + The `dgettext' functions acts just like the `gettext' function. + It only takes an additional first argument DOMAINNAME which guides + the selection of the message catalogs which are searched for the + translation. If the DOMAINNAME parameter is the null pointer the + `dgettext' function is exactly equivalent to `gettext' since the + default value for the domain name is used. - Here is a simple example of sorting an array of doubles in - numerical order, using the comparison function defined above - (*note Comparison Functions::): + As for `gettext' the return value type is `char *' which is an + anachronism. The returned string must never be modified. - { - double *array; - int size; - ... - qsort (array, size, sizeof (double), compare_doubles); - } + - Function: char * dcgettext (const char *DOMAINNAME, const char + *MSGID, int CATEGORY) + The `dcgettext' adds another argument to those which `dgettext' + takes. This argument CATEGORY specifies the last piece of + information needed to localize the message catalog. I.e., the + domain name and the locale category exactly specify which message + catalog has to be used (relative to a given directory, see below). - The `qsort' function derives its name from the fact that it was - originally implemented using the "quick sort" algorithm. + The `dgettext' function can be expressed in terms of `dcgettext' + by using - The implementation of `qsort' in this library might not be an - in-place sort and might thereby use an extra amount of memory to - store the array. + dcgettext (domain, string, LC_MESSAGES) - -File: libc.info, Node: Search/Sort Example, Next: Hash Search Function, Prev: Array Sort Function, Up: Searching and Sorting + instead of -Searching and Sorting Example -============================= + dgettext (domain, string) - Here is an example showing the use of `qsort' and `bsearch' with an -array of structures. The objects in the array are sorted by comparing -their `name' fields with the `strcmp' function. Then, we can look up -individual objects based on their names. + This also shows which values are expected for the third parameter. + One has to use the available selectors for the categories + available in `locale.h'. Normally the available values are + `LC_CTYPE', `LC_COLLATE', `LC_MESSAGES', `LC_MONETARY', + `LC_NUMERIC', and `LC_TIME'. Please note that `LC_ALL' must not + be used and even though the names might suggest this, there is no + relation to the environments variables of this name. - #include - #include - #include - - /* Define an array of critters to sort. */ - - struct critter - { - const char *name; - const char *species; - }; - - struct critter muppets[] = - { - {"Kermit", "frog"}, - {"Piggy", "pig"}, - {"Gonzo", "whatever"}, - {"Fozzie", "bear"}, - {"Sam", "eagle"}, - {"Robin", "frog"}, - {"Animal", "animal"}, - {"Camilla", "chicken"}, - {"Sweetums", "monster"}, - {"Dr. Strangepork", "pig"}, - {"Link Hogthrob", "pig"}, - {"Zoot", "human"}, - {"Dr. Bunsen Honeydew", "human"}, - {"Beaker", "human"}, - {"Swedish Chef", "human"} - }; - - int count = sizeof (muppets) / sizeof (struct critter); - - - - /* This is the comparison function used for sorting and searching. */ - - int - critter_cmp (const struct critter *c1, const struct critter *c2) - { - return strcmp (c1->name, c2->name); - } - - - /* Print information about a critter. */ - - void - print_critter (const struct critter *c) - { - printf ("%s, the %s\n", c->name, c->species); - } - - - /* Do the lookup into the sorted array. */ - - void - find_critter (const char *name) - { - struct critter target, *result; - target.name = name; - result = bsearch (&target, muppets, count, sizeof (struct critter), - critter_cmp); - if (result) - print_critter (result); - else - printf ("Couldn't find %s.\n", name); - } - - /* Main program. */ - - int - main (void) - { - int i; - - for (i = 0; i < count; i++) - print_critter (&muppets[i]); - printf ("\n"); - - qsort (muppets, count, sizeof (struct critter), critter_cmp); - - for (i = 0; i < count; i++) - print_critter (&muppets[i]); - printf ("\n"); - - find_critter ("Kermit"); - find_critter ("Gonzo"); - find_critter ("Janice"); - - return 0; - } + The `dcgettext' function is only implemented for compatibility with + other systems which have `gettext' functions. There is not really + any situation where it is necessary (or useful) to use a different + value but `LC_MESSAGES' in for the CATEGORY parameter. We are + dealing with messages here and any other choice can only be + irritating. - The output from this program looks like: + As for `gettext' the return value type is `char *' which is an + anachronism. The returned string must never be modified. - Kermit, the frog - Piggy, the pig - Gonzo, the whatever - Fozzie, the bear - Sam, the eagle - Robin, the frog - Animal, the animal - Camilla, the chicken - Sweetums, the monster - Dr. Strangepork, the pig - Link Hogthrob, the pig - Zoot, the human - Dr. Bunsen Honeydew, the human - Beaker, the human - Swedish Chef, the human - - Animal, the animal - Beaker, the human - Camilla, the chicken - Dr. Bunsen Honeydew, the human - Dr. Strangepork, the pig - Fozzie, the bear - Gonzo, the whatever - Kermit, the frog - Link Hogthrob, the pig - Piggy, the pig - Robin, the frog - Sam, the eagle - Swedish Chef, the human - Sweetums, the monster - Zoot, the human - - Kermit, the frog - Gonzo, the whatever - Couldn't find Janice. + When using the three functions above in a program it is a frequent +case that the MSGID argument is a constant string. So it is worth to +optimize this case. Thinking shortly about this one will realize that +as long as no new message catalog is loaded the translation of a message +will not change. This optimization is actually implemented by the +`gettext', `dgettext' and `dcgettext' functions.  -File: libc.info, Node: Hash Search Function, Next: Tree Search Function, Prev: Search/Sort Example, Up: Searching and Sorting - -The `hsearch' function. -======================= +File: libc.info, Node: Locating gettext catalog, Next: Advanced gettext functions, Prev: Translation with gettext, Up: Message catalogs with gettext - The functions mentioned so far in this chapter are searching in a -sorted or unsorted array. There are other methods to organize -information which later should be searched. The costs of insert, -delete and search differ. One possible implementation is using hashing -tables. +How to determine which catalog to be used +......................................... - - Function: int hcreate (size_t NEL) - The `hcreate' function creates a hashing table which can contain at - least NEL elements. There is no possibility to grow this table so - it is necessary to choose the value for NEL wisely. The used - methods to implement this function might make it necessary to make - the number of elements in the hashing table larger than the - expected maximal number of elements. Hashing tables usually work - inefficient if they are filled 80% or more. The constant access - time guaranteed by hashing can only be achieved if few collisions - exist. See Knuth's "The Art of Computer Programming, Part 3: - Searching and Sorting" for more information. + The functions to retrieve the translations for a given message have a +remarkable simple interface. But to provide the user of the program +still the opportunity to select exactly the translation s/he wants and +also to provide the programmer the possibility to influence the way to +locate the search for catalogs files there is a quite complicated +underlying mechanism which controls all this. The code is complicated +the use is easy. - The weakest aspect of this function is that there can be at most - one hashing table used through the whole program. The table is - allocated in local memory out of control of the programmer. As an - extension the GNU C library provides an additional set of - functions with an reentrant interface which provide a similar - interface but which allow to keep arbitrarily many hashing tables. + Basically we have two different tasks to perform which can also be +performed by the `catgets' functions: - It is possible to use more than one hashing table in the program - run if the former table is first destroyed by a call to `hdestroy'. + 1. Locate the set of message catalogs. There are a number of files + for different languages and which all belong to the package. + Usually they are all stored in the filesystem below a certain + directory. - The function returns a non-zero value if successful. If it return - zero something went wrong. This could either mean there is - already a hashing table in use or the program runs out of memory. + There can be arbitrary many packages installed and they can follow + different guidelines for the placement of their files. - - Function: void hdestroy (void) - The `hdestroy' function can be used to free all the resources - allocated in a previous call of `hcreate'. After a call to this - function it is again possible to call `hcreate' and allocate a new - table with possibly different size. + 2. Relative to the location specified by the package the actual + translation files must be searched, based on the wishes of the + user. I.e., for each language the user selects the program should + be able to locate the appropriate file. - It is important to remember that the elements contained in the - hashing table at the time `hdestroy' is called are _not_ freed by - this function. It is the responsibility of the program code to - free those strings (if necessary at all). Freeing all the element - memory is not possible without extra, separately kept information - since there is no function to iterate through all available - elements in the hashing table. If it is really necessary to free - a table and all elements the programmer has to keep a list of all - table elements and before calling `hdestroy' s/he has to free all - element's data using this list. This is a very unpleasant - mechanism and it also shows that this kind of hashing tables is - mainly meant for tables which are created once and used until the - end of the program run. + This is the functionality required by the specifications for +`gettext' and this is also what the `catgets' functions are able to do. +But there are some problems unresolved: - Entries of the hashing table and keys for the search are defined -using this type: + * The language to be used can be specified in several different ways. + There is no generally accepted standard for this and the user + always expects the program understand what s/he means. E.g., to + select the German translation one could write `de', `german', or + `deutsch' and the program should always react the same. - - Data type: struct ENTRY - Both elements of this structure are pointers to zero-terminated - strings. This is a limiting restriction of the functionality of - the `hsearch' functions. They can only be used for data sets - which use the NUL character always and solely to terminate the - records. It is not possible to handle general binary data. + * Sometimes the specification of the user is too detailed. If s/he, + e.g., specifies `de_DE.ISO-8859-1' which means German, spoken in + Germany, coded using the ISO 8859-1 character set there is the + possibility that a message catalog matching this exactly is not + available. But there could be a catalog matching `de' and if the + character set used on the machine is always ISO 8859-1 there is no + reason why this later message catalog should not be used. (We + call this "message inheritance".) - `char *key' - Pointer to a zero-terminated string of characters describing - the key for the search or the element in the hashing table. + * If a catalog for a wanted language is not available it is not + always the second best choice to fall back on the language of the + developer and simply not translate any message. Instead a user + might be better able to read the messages in another language and + so the user of the program should be able to define an precedence + order of languages. - `char *data' - Pointer to a zero-terminated string of characters describing - the data. If the functions will be called only for searching - an existing entry this element might stay undefined since it - is not used. + We can divide the configuration actions in two parts: the one is +performed by the programmer, the other by the user. We will start with +the functions the programmer can use since the user configuration will +be based on this. - - Function: ENTRY * hsearch (ENTRY ITEM, ACTION ACTION) - To search in a hashing table created using `hcreate' the `hsearch' - function must be used. This function can perform simple search - for an element (if ACTION has the `FIND') or it can alternatively - insert the key element into the hashing table, possibly replacing - a previous value (if ACTION is `ENTER'). + As the functions described in the last sections already mention +separate sets of messages can be selected by a "domain name". This is a +simple string which should be unique for each program part with uses a +separate domain. It is possible to use in one program arbitrary many +domains at the same time. E.g., the GNU C Library itself uses a domain +named `libc' while the program using the C Library could use a domain +named `foo'. The important point is that at any time exactly one +domain is active. This is controlled with the following function. - The key is denoted by a pointer to an object of type `ENTRY'. For - locating the corresponding position in the hashing table only the - `key' element of the structure is used. + - Function: char * textdomain (const char *DOMAINNAME) + The `textdomain' function sets the default domain, which is used in + all future `gettext' calls, to DOMAINNAME. Please note that + `dgettext' and `dcgettext' calls are not influenced if the + DOMAINNAME parameter of these functions is not the null pointer. - The return value depends on the ACTION parameter value. If it is - `FIND' the value is a pointer to the matching element in the - hashing table or `NULL' if no matching element exists. If ACTION - is `ENTER' the return value is only `NULL' if the programs runs - out of memory while adding the new element to the table. - Otherwise the return value is a pointer to the element in the - hashing table which contains newly added element based on the data - in KEY. + Before the first call to `textdomain' the default domain is + `messages'. This is the name specified in the specification of + the `gettext' API. This name is as good as any other name. No + program should ever really use a domain with this name since this + can only lead to problems. - As mentioned before the hashing table used by the functions -described so far is global and there can be at any time at most one -hashing table in the program. A solution is to use the following -functions which are a GNU extension. All have in common that they -operate on a hashing table which is described by the content of an -object of the type `struct hsearch_data'. This type should be treated -as opaque, none of its members should be changed directly. + The function returns the value which is from now on taken as the + default domain. If the system went out of memory the returned + value is `NULL' and the global variable ERRNO is set to `ENOMEM'. + Despite the return value type being `char *' the return string must + not be changed. It is allocated internally by the `textdomain' + function. - - Function: int hcreate_r (size_t NEL, struct hsearch_data *HTAB) - The `hcreate_r' function initializes the object pointed to by HTAB - to contain a hashing table with at least NEL elements. So this - function is equivalent to the `hcreate' function except that the - initialized data structure is controlled by the user. + If the DOMAINNAME parameter is the null pointer no new default + domain is set. Instead the currently selected default domain is + returned. - This allows having more than one hashing table at one time. The - memory necessary for the `struct hsearch_data' object can be - allocated dynamically. + If the DOMAINNAME parameter is the empty string the default domain + is reset to its initial value, the domain with the name `messages'. + This possibility is questionable to use since the domain `messages' + really never should be used. - The return value is non-zero if the operation were successful. if - the return value is zero something went wrong which probably means - the programs runs out of memory. + - Function: char * bindtextdomain (const char *DOMAINNAME, const char + *DIRNAME) + The `bindtextdomain' function can be used to specify the directory + which contains the message catalogs for domain DOMAINNAME for the + different languages. To be correct, this is the directory where + the hierarchy of directories is expected. Details are explained + below. - - Function: void hdestroy_r (struct hsearch_data *HTAB) - The `hdestroy_r' function frees all resources allocated by the - `hcreate_r' function for this very same object HTAB. As for - `hdestroy' it is the programs responsibility to free the strings - for the elements of the table. + For the programmer it is important to note that the translations + which come with the program have be placed in a directory + hierarchy starting at, say, `/foo/bar'. Then the program should + make a `bindtextdomain' call to bind the domain for the current + program to this directory. So it is made sure the catalogs are + found. A correctly running program does not depend on the user + setting an environment variable. - - Function: int hsearch_r (ENTRY ITEM, ACTION ACTION, ENTRY **RETVAL, - struct hsearch_data *HTAB) - The `hsearch_r' function is equivalent to `hsearch'. The meaning - of the first two arguments is identical. But instead of operating - on a single global hashing table the function works on the table - described by the object pointed to by HTAB (which is initialized - by a call to `hcreate_r'). + The `bindtextdomain' function can be used several times and if the + DOMAINNAME argument is different the previously bound domains will + not be overwritten. - Another difference to `hcreate' is that the pointer to the found - entry in the table is not the return value of the functions. It is - returned by storing it in a pointer variables pointed to by the - RETVAL parameter. The return value of the function is an integer - value indicating success if it is non-zero and failure if it is - zero. In the latter case the global variable ERRNO signals the - reason for the failure. + If the program which wish to use `bindtextdomain' at some point of + time use the `chdir' function to change the current working + directory it is important that the DIRNAME strings ought to be an + absolute pathname. Otherwise the addressed directory might vary + with the time. - `ENOMEM' - The table is filled and `hsearch_r' was called with an so far - unknown key and ACTION set to `ENTER'. + If the DIRNAME parameter is the null pointer `bindtextdomain' + returns the currently selected directory for the domain with the + name DOMAINNAME. - `ESRCH' - The ACTION parameter is `FIND' and no corresponding element - is found in the table. + The `bindtextdomain' function returns a pointer to a string + containing the name of the selected directory name. The string is + allocated internally in the function and must not be changed by the + user. If the system went out of core during the execution of + `bindtextdomain' the return value is `NULL' and the global + variable ERRNO is set accordingly. diff -durpN glibc-2.2.4/manual/libc.info-14 glibc-2.2.5/manual/libc.info-14 --- glibc-2.2.4/manual/libc.info-14 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-14 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1164 +33,1139 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Tree Search Function, Prev: Hash Search Function, Up: Searching and Sorting - -The `tsearch' function. -======================= - - Another common form to organize data for efficient search is to use -trees. The `tsearch' function family provides a nice interface to -functions to organize possibly large amounts of data by providing a mean -access time proportional to the logarithm of the number of elements. -The GNU C library implementation even guarantees that this bound is -never exceeded even for input data which cause problems for simple -binary tree implementations. - - The functions described in the chapter are all described in the -System V and X/Open specifications and are therefore quite portable. - - In contrast to the `hsearch' functions the `tsearch' functions can -be used with arbitrary data and not only zero-terminated strings. - - The `tsearch' functions have the advantage that no function to -initialize data structures is necessary. A simple pointer of type -`void *' initialized to `NULL' is a valid tree and can be extended or -searched. - - - Function: void * tsearch (const void *KEY, void **ROOTP, - comparison_fn_t COMPAR) - The `tsearch' function searches in the tree pointed to by `*ROOTP' - for an element matching KEY. The function pointed to by COMPAR is - used to determine whether two elements match. *Note Comparison - Functions::, for a specification of the functions which can be - used for the COMPAR parameter. - - If the tree does not contain a matching entry the KEY value will - be added to the tree. `tsearch' does not make a copy of the object - pointed to by KEY (how could it since the size is unknown). - Instead it adds a reference to this object which means the object - must be available as long as the tree data structure is used. - - The tree is represented by a pointer to a pointer since it is - sometimes necessary to change the root node of the tree. So it - must not be assumed that the variable pointed to by ROOTP has the - same value after the call. This also shows that it is not safe to - call the `tsearch' function more than once at the same time using - the same tree. It is no problem to run it more than once at a - time on different trees. +File: libc.info, Node: Advanced gettext functions, Next: Charset conversion in gettext, Prev: Locating gettext catalog, Up: Message catalogs with gettext - The return value is a pointer to the matching element in the tree. - If a new element was created the pointer points to the new data - (which is in fact KEY). If an entry had to be created and the - program ran out of space `NULL' is returned. +Additional functions for more complicated situations +.................................................... - - Function: void * tfind (const void *KEY, void *const *ROOTP, - comparison_fn_t COMPAR) - The `tfind' function is similar to the `tsearch' function. It - locates an element matching the one pointed to by KEY and returns - a pointer to this element. But if no matching element is - available no new element is entered (note that the ROOTP parameter - points to a constant pointer). Instead the function returns - `NULL'. + The functions of the `gettext' family described so far (and all the +`catgets' functions as well) have one problem in the real world which +have been neglected completely in all existing approaches. What is +meant here is the handling of plural forms. - Another advantage of the `tsearch' function in contrast to the -`hsearch' functions is that there is an easy way to remove elements. + Looking through Unix source code before the time anybody thought +about internationalization (and, sadly, even afterwards) one can often +find code similar to the following: - - Function: void * tdelete (const void *KEY, void **ROOTP, - comparison_fn_t COMPAR) - To remove a specific element matching KEY from the tree `tdelete' - can be used. It locates the matching element using the same - method as `tfind'. The corresponding element is then removed and - a pointer to the parent of the deleted node is returned by the - function. If there is no matching entry in the tree nothing can be - deleted and the function returns `NULL'. If the root of the tree - is deleted `tdelete' returns some unspecified value not equal to - `NULL'. + printf ("%d file%s deleted", n, n == 1 ? "" : "s"); - - Function: void tdestroy (void *VROOT, __free_fn_t FREEFCT) - If the complete search tree has to be removed one can use - `tdestroy'. It frees all resources allocated by the `tsearch' - function to generate the tree pointed to by VROOT. +After the first complaints from people internationalizing the code +people either completely avoided formulations like this or used strings +like `"file(s)"'. Both look unnatural and should be avoided. First +tries to solve the problem correctly looked like this: - For the data in each tree node the function FREEFCT is called. - The pointer to the data is passed as the argument to the function. - If no such work is necessary FREEFCT must point to a function - doing nothing. It is called in any case. + if (n == 1) + printf ("%d file deleted", n); + else + printf ("%d files deleted", n); - This function is a GNU extension and not covered by the System V or - X/Open specifications. + But this does not solve the problem. It helps languages where the +plural form of a noun is not simply constructed by adding an `s' but +that is all. Once again people fell into the trap of believing the +rules their language is using are universal. But the handling of plural +forms differs widely between the language families. There are two +things we can differ between (and even inside language families); - In addition to the function to create and destroy the tree data -structure, there is another function which allows you to apply a -function to all elements of the tree. The function must have this type: + * The form how plural forms are build differs. This is a problem + with language which have many irregularities. German, for + instance, is a drastic case. Though English and German are part + of the same language family (Germanic), the almost regular forming + of plural noun forms (appending an `s') is hardly found in German. - void __action_fn_t (const void *nodep, VISIT value, int level); + * The number of plural forms differ. This is somewhat surprising for + those who only have experiences with Romanic and Germanic languages + since here the number is the same (there are two). - The NODEP is the data value of the current node (once given as the -KEY argument to `tsearch'). LEVEL is a numeric value which corresponds -to the depth of the current node in the tree. The root node has the -depth 0 and its children have a depth of 1 and so on. The `VISIT' type -is an enumeration type. + But other language families have only one form or many forms. More + information on this in an extra section. - - Data Type: VISIT - The `VISIT' value indicates the status of the current node in the - tree and how the function is called. The status of a node is - either `leaf' or `internal node'. For each leaf node the function - is called exactly once, for each internal node it is called three - times: before the first child is processed, after the first child - is processed and after both children are processed. This makes it - possible to handle all three methods of tree traversal (or even a - combination of them). + The consequence of this is that application writers should not try to +solve the problem in their code. This would be localization since it is +only usable for certain, hardcoded language environments. Instead the +extended `gettext' interface should be used. - `preorder' - The current node is an internal node and the function is - called before the first child was processed. + These extra functions are taking instead of the one key string two +strings and an numerical argument. The idea behind this is that using +the numerical argument and the first string as a key, the implementation +can select using rules specified by the translator the right plural +form. The two string arguments then will be used to provide a return +value in case no message catalog is found (similar to the normal +`gettext' behavior). In this case the rules for Germanic language is +used and it is assumed that the first string argument is the singular +form, the second the plural form. - `postorder' - The current node is an internal node and the function is - called after the first child was processed. + This has the consequence that programs without language catalogs can +display the correct strings only if the program itself is written using +a Germanic language. This is a limitation but since the GNU C library +(as well as the GNU `gettext' package) are written as part of the GNU +package and the coding standards for the GNU project require program +being written in English, this solution nevertheless fulfills its +purpose. - `endorder' - The current node is an internal node and the function is - called after the second child was processed. + - Function: char * ngettext (const char *MSGID1, const char *MSGID2, + unsigned long int N) + The `ngettext' function is similar to the `gettext' function as it + finds the message catalogs in the same way. But it takes two + extra arguments. The MSGID1 parameter must contain the singular + form of the string to be converted. It is also used as the key + for the search in the catalog. The MSGID2 parameter is the plural + form. The parameter N is used to determine the plural form. If no + message catalog is found MSGID1 is returned if `n == 1', otherwise + `msgid2'. - `leaf' - The current node is a leaf. + An example for the us of this function is: - - Function: void twalk (const void *ROOT, __action_fn_t ACTION) - For each node in the tree with a node pointed to by ROOT, the - `twalk' function calls the function provided by the parameter - ACTION. For leaf nodes the function is called exactly once with - VALUE set to `leaf'. For internal nodes the function is called - three times, setting the VALUE parameter or ACTION to the - appropriate value. The LEVEL argument for the ACTION function is - computed while descending the tree with increasing the value by - one for the descend to a child, starting with the value 0 for the - root node. + printf (ngettext ("%d file removed", "%d files removed", n), n); - Since the functions used for the ACTION parameter to `twalk' must - not modify the tree data, it is safe to run `twalk' in more than - one thread at the same time, working on the same tree. It is also - safe to call `tfind' in parallel. Functions which modify the tree - must not be used, otherwise the behavior is undefined. + Please note that the numeric value N has to be passed to the + `printf' function as well. It is not sufficient to pass it only to + `ngettext'. - -File: libc.info, Node: Pattern Matching, Next: I/O Overview, Prev: Searching and Sorting, Up: Top + - Function: char * dngettext (const char *DOMAIN, const char *MSGID1, + const char *MSGID2, unsigned long int N) + The `dngettext' is similar to the `dgettext' function in the way + the message catalog is selected. The difference is that it takes + two extra parameter to provide the correct plural form. These two + parameters are handled in the same way `ngettext' handles them. -Pattern Matching -**************** + - Function: char * dcngettext (const char *DOMAIN, const char *MSGID1, + const char *MSGID2, unsigned long int N, int CATEGORY) + The `dcngettext' is similar to the `dcgettext' function in the way + the message catalog is selected. The difference is that it takes + two extra parameter to provide the correct plural form. These two + parameters are handled in the same way `ngettext' handles them. - The GNU C Library provides pattern matching facilities for two kinds -of patterns: regular expressions and file-name wildcards. The library -also provides a facility for expanding variable and command references -and parsing text into words in the way the shell does. +The problem of plural forms +........................... -* Menu: + A description of the problem can be found at the beginning of the +last section. Now there is the question how to solve it. Without the +input of linguists (which was not available) it was not possible to +determine whether there are only a few different forms in which plural +forms are formed or whether the number can increase with every new +supported language. -* Wildcard Matching:: Matching a wildcard pattern against a single string. -* Globbing:: Finding the files that match a wildcard pattern. -* Regular Expressions:: Matching regular expressions against strings. -* Word Expansion:: Expanding shell variables, nested commands, - arithmetic, and wildcards. - This is what the shell does with shell commands. + Therefore the solution implemented is to allow the translator to +specify the rules of how to select the plural form. Since the formula +varies with every language this is the only viable solution except for +hardcoding the information in the code (which still would require the +possibility of extensions to not prevent the use of new languages). The +details are explained in the GNU `gettext' manual. Here only a a bit +of information is provided. - -File: libc.info, Node: Wildcard Matching, Next: Globbing, Up: Pattern Matching + The information about the plural form selection has to be stored in +the header entry (the one with the empty (`msgid' string). It looks +like this: -Wildcard Matching -================= + Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1; - This section describes how to match a wildcard pattern against a -particular string. The result is a yes or no answer: does the string -fit the pattern or not. The symbols described here are all declared in -`fnmatch.h'. + The `nplurals' value must be a decimal number which specifies how +many different plural forms exist for this language. The string +following `plural' is an expression which is using the C language +syntax. Exceptions are that no negative number are allowed, numbers +must be decimal, and the only variable allowed is `n'. This expression +will be evaluated whenever one of the functions `ngettext', +`dngettext', or `dcngettext' is called. The numeric value passed to +these functions is then substituted for all uses of the variable `n' in +the expression. The resulting value then must be greater or equal to +zero and smaller than the value given as the value of `nplurals'. - - Function: int fnmatch (const char *PATTERN, const char *STRING, int - FLAGS) - This function tests whether the string STRING matches the pattern - PATTERN. It returns `0' if they do match; otherwise, it returns - the nonzero value `FNM_NOMATCH'. The arguments PATTERN and STRING - are both strings. +The following rules are known at this point. The language with families +are listed. But this does not necessarily mean the information can be +generalized for the whole family (as can be easily seen in the table +below).(1) - The argument FLAGS is a combination of flag bits that alter the - details of matching. See below for a list of the defined flags. +Only one form: + Some languages only require one single form. There is no + distinction between the singular and plural form. An appropriate + header entry would look like this: - In the GNU C Library, `fnmatch' cannot experience an "error"--it - always returns an answer for whether the match succeeds. However, - other implementations of `fnmatch' might sometimes report "errors". - They would do so by returning nonzero values that are not equal to - `FNM_NOMATCH'. + Plural-Forms: nplurals=1; plural=0; - These are the available flags for the FLAGS argument: + Languages with this property include: -`FNM_FILE_NAME' - Treat the `/' character specially, for matching file names. If - this flag is set, wildcard constructs in PATTERN cannot match `/' - in STRING. Thus, the only way to match `/' is with an explicit - `/' in PATTERN. + Finno-Ugric family + Hungarian -`FNM_PATHNAME' - This is an alias for `FNM_FILE_NAME'; it comes from POSIX.2. We - don't recommend this name because we don't use the term "pathname" - for file names. + Asian family + Japanese -`FNM_PERIOD' - Treat the `.' character specially if it appears at the beginning of - STRING. If this flag is set, wildcard constructs in PATTERN - cannot match `.' as the first character of STRING. + Turkic/Altaic family + Turkish - If you set both `FNM_PERIOD' and `FNM_FILE_NAME', then the special - treatment applies to `.' following `/' as well as to `.' at the - beginning of STRING. (The shell uses the `FNM_PERIOD' and - `FNM_FILE_NAME' flags together for matching file names.) +Two forms, singular used for one only + This is the form used in most existing programs since it is what + English is using. A header entry would look like this: -`FNM_NOESCAPE' - Don't treat the `\' character specially in patterns. Normally, - `\' quotes the following character, turning off its special meaning - (if any) so that it matches only itself. When quoting is enabled, - the pattern `\?' matches only the string `?', because the question - mark in the pattern acts like an ordinary character. + Plural-Forms: nplurals=2; plural=n != 1; - If you use `FNM_NOESCAPE', then `\' is an ordinary character. + (Note: this uses the feature of C expressions that boolean + expressions have to value zero or one.) -`FNM_LEADING_DIR' - Ignore a trailing sequence of characters starting with a `/' in - STRING; that is to say, test whether STRING starts with a - directory name that PATTERN matches. + Languages with this property include: - If this flag is set, either `foo*' or `foobar' as a pattern would - match the string `foobar/frobozz'. + Germanic family + Danish, Dutch, English, German, Norwegian, Swedish -`FNM_CASEFOLD' - Ignore case in comparing STRING to PATTERN. + Finno-Ugric family + Estonian, Finnish -`FNM_EXTMATCH' - Recognize beside the normal patterns also the extended patterns - introduced in `ksh'. The patterns are written in the form - explained in the following table where PATTERN-LIST is a `|' - separated list of patterns. + Latin/Greek family + Greek - `?(PATTERN-LIST)' - The pattern matches if zero or one occurrences of any of the - patterns in the PATTERN-LIST allow matching the input string. + Semitic family + Hebrew - `*(PATTERN-LIST)' - The pattern matches if zero or more occurrences of any of the - patterns in the PATTERN-LIST allow matching the input string. + Romance family + Italian, Spanish - `+(PATTERN-LIST)' - The pattern matches if one or more occurrences of any of the - patterns in the PATTERN-LIST allow matching the input string. + Artificial + Esperanto - `@(PATTERN-LIST)' - The pattern matches if exactly one occurrence of any of the - patterns in the PATTERN-LIST allows matching the input string. +Two forms, singular used for zero and one + Exceptional case in the language family. The header entry would + be: - `!(PATTERN-LIST)' - The pattern matches if the input string cannot be matched - with any of the patterns in the PATTERN-LIST. + Plural-Forms: nplurals=2; plural=n>1; - -File: libc.info, Node: Globbing, Next: Regular Expressions, Prev: Wildcard Matching, Up: Pattern Matching + Languages with this property include: -Globbing -======== + Romanic family + French - The archetypal use of wildcards is for matching against the files in -a directory, and making a list of all the matches. This is called -"globbing". +Three forms, special cases for one and two + The header entry would be: - You could do this using `fnmatch', by reading the directory entries -one by one and testing each one with `fnmatch'. But that would be slow -(and complex, since you would have to handle subdirectories by hand). + Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2; - The library provides a function `glob' to make this particular use -of wildcards convenient. `glob' and the other symbols in this section -are declared in `glob.h'. + Languages with this property include: -* Menu: + Celtic + Gaeilge -* Calling Glob:: Basic use of `glob'. -* Flags for Globbing:: Flags that enable various options in `glob'. -* More Flags for Globbing:: GNU specific extensions to `glob'. +Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4] + The header entry would look like this: - -File: libc.info, Node: Calling Glob, Next: Flags for Globbing, Up: Globbing + Plural-Forms: nplurals=3; \ + plural=n%100/10==1 ? 2 : n%10==1 ? 0 : (n+9)%10>3 ? 2 : 1; -Calling `glob' --------------- + Languages with this property include: - The result of globbing is a vector of file names (strings). To -return this vector, `glob' uses a special data type, `glob_t', which is -a structure. You pass `glob' the address of the structure, and it -fills in the structure's fields to tell you about the results. + Slavic family + Czech, Russian - - Data Type: glob_t - This data type holds a pointer to a word vector. More precisely, - it records both the address of the word vector and its size. The - GNU implementation contains some more fields which are non-standard - extensions. +Three forms, special cases for 1 and 2, 3, 4 + The header entry would look like this: - `gl_pathc' - The number of elements in the vector, excluding the initial - null entries if the GLOB_DOOFFS flag is used (see gl_offs - below). + Plural-Forms: nplurals=3; \ + plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0; - `gl_pathv' - The address of the vector. This field has type `char **'. + Languages with this property include: - `gl_offs' - The offset of the first real element of the vector, from its - nominal address in the `gl_pathv' field. Unlike the other - fields, this is always an input to `glob', rather than an - output from it. + Slavic family + Slovak - If you use a nonzero offset, then that many elements at the - beginning of the vector are left empty. (The `glob' function - fills them with null pointers.) +Three forms, special case for one and some numbers ending in 2, 3, or 4 + The header entry would look like this: - The `gl_offs' field is meaningful only if you use the - `GLOB_DOOFFS' flag. Otherwise, the offset is always zero - regardless of what is in this field, and the first real - element comes at the beginning of the vector. + Plural-Forms: nplurals=3; \ + plural=n==1 ? 0 : \ + n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; - `gl_closedir' - The address of an alternative implementation of the `closedir' - function. It is used if the `GLOB_ALTDIRFUNC' bit is set in - the flag parameter. The type of this field is - `void (*) (void *)'. + (Continuation in the next line is possible.) - This is a GNU extension. + Languages with this property include: - `gl_readdir' - The address of an alternative implementation of the `readdir' - function used to read the contents of a directory. It is - used if the `GLOB_ALTDIRFUNC' bit is set in the flag - parameter. The type of this field is - `struct dirent *(*) (void *)'. + Slavic family + Polish - This is a GNU extension. +Four forms, special case for one and all numbers ending in 2, 3, or 4 + The header entry would look like this: - `gl_opendir' - The address of an alternative implementation of the `opendir' - function. It is used if the `GLOB_ALTDIRFUNC' bit is set in - the flag parameter. The type of this field is - `void *(*) (const char *)'. + Plural-Forms: nplurals=4; \ + plural=n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3; - This is a GNU extension. + Languages with this property include: - `gl_stat' - The address of an alternative implementation of the `stat' - function to get information about an object in the - filesystem. It is used if the `GLOB_ALTDIRFUNC' bit is set - in the flag parameter. The type of this field is - `int (*) (const char *, struct stat *)'. + Slavic family + Slovenian - This is a GNU extension. + ---------- Footnotes ---------- - `gl_lstat' - The address of an alternative implementation of the `lstat' - function to get information about an object in the - filesystems, not following symbolic links. It is used if the - `GLOB_ALTDIRFUNC' bit is set in the flag parameter. The type - of this field is `int (*) (const char *, struct stat *)'. + (1) Additions are welcome. Send appropriate information to +. - This is a GNU extension. + +File: libc.info, Node: Charset conversion in gettext, Next: GUI program problems, Prev: Advanced gettext functions, Up: Message catalogs with gettext - For use in the `glob64' function `glob.h' contains another -definition for a very similar type. `glob64_t' differs from `glob_t' -only in the types of the members `gl_readdir', `gl_stat', and -`gl_lstat'. +How to specify the output character set `gettext' uses +...................................................... - - Data Type: glob64_t - This data type holds a pointer to a word vector. More precisely, - it records both the address of the word vector and its size. The - GNU implementation contains some more fields which are non-standard - extensions. + `gettext' not only looks up a translation in a message catalog. It +also converts the translation on the fly to the desired output character +set. This is useful if the user is working in a different character set +than the translator who created the message catalog, because it avoids +distributing variants of message catalogs which differ only in the +character set. - `gl_pathc' - The number of elements in the vector, excluding the initial - null entries if the GLOB_DOOFFS flag is used (see gl_offs - below). + The output character set is, by default, the value of `nl_langinfo +(CODESET)', which depends on the `LC_CTYPE' part of the current locale. +But programs which store strings in a locale independent way (e.g. +UTF-8) can request that `gettext' and related functions return the +translations in that encoding, by use of the `bind_textdomain_codeset' +function. - `gl_pathv' - The address of the vector. This field has type `char **'. + Note that the MSGID argument to `gettext' is not subject to +character set conversion. Also, when `gettext' does not find a +translation for MSGID, it returns MSGID unchanged - independently of +the current output character set. It is therefore recommended that all +MSGIDs be US-ASCII strings. - `gl_offs' - The offset of the first real element of the vector, from its - nominal address in the `gl_pathv' field. Unlike the other - fields, this is always an input to `glob', rather than an - output from it. + - Function: char * bind_textdomain_codeset (const char *DOMAINNAME, + const char *CODESET) + The `bind_textdomain_codeset' function can be used to specify the + output character set for message catalogs for domain DOMAINNAME. + The CODESET argument must be a valid codeset name which can be used + for the `iconv_open' function, or a null pointer. - If you use a nonzero offset, then that many elements at the - beginning of the vector are left empty. (The `glob' function - fills them with null pointers.) + If the CODESET parameter is the null pointer, + `bind_textdomain_codeset' returns the currently selected codeset + for the domain with the name DOMAINNAME. It returns `NULL' if no + codeset has yet been selected. - The `gl_offs' field is meaningful only if you use the - `GLOB_DOOFFS' flag. Otherwise, the offset is always zero - regardless of what is in this field, and the first real - element comes at the beginning of the vector. + The `bind_textdomain_codeset' function can be used several times. + If used multiple times with the same DOMAINNAME argument, the + later call overrides the settings made by the earlier one. - `gl_closedir' - The address of an alternative implementation of the `closedir' - function. It is used if the `GLOB_ALTDIRFUNC' bit is set in - the flag parameter. The type of this field is - `void (*) (void *)'. + The `bind_textdomain_codeset' function returns a pointer to a + string containing the name of the selected codeset. The string is + allocated internally in the function and must not be changed by the + user. If the system went out of core during the execution of + `bind_textdomain_codeset', the return value is `NULL' and the + global variable ERRNO is set accordingly. - This is a GNU extension. + +File: libc.info, Node: GUI program problems, Next: Using gettextized software, Prev: Charset conversion in gettext, Up: Message catalogs with gettext - `gl_readdir' - The address of an alternative implementation of the - `readdir64' function used to read the contents of a - directory. It is used if the `GLOB_ALTDIRFUNC' bit is set in - the flag parameter. The type of this field is - `struct dirent64 *(*) (void *)'. +How to use `gettext' in GUI programs +.................................... - This is a GNU extension. + One place where the `gettext' functions, if used normally, have big +problems is within programs with graphical user interfaces (GUIs). The +problem is that many of the strings which have to be translated are very +short. They have to appear in pull-down menus which restricts the +length. But strings which are not containing entire sentences or at +least large fragments of a sentence may appear in more than one +situation in the program but might have different translations. This is +especially true for the one-word strings which are frequently used in +GUI programs. - `gl_opendir' - The address of an alternative implementation of the `opendir' - function. It is used if the `GLOB_ALTDIRFUNC' bit is set in - the flag parameter. The type of this field is - `void *(*) (const char *)'. + As a consequence many people say that the `gettext' approach is +wrong and instead `catgets' should be used which indeed does not have +this problem. But there is a very simple and powerful method to handle +these kind of problems with the `gettext' functions. - This is a GNU extension. +As as example consider the following fictional situation. A GUI program +has a menu bar with the following entries: - `gl_stat' - The address of an alternative implementation of the `stat64' - function to get information about an object in the - filesystem. It is used if the `GLOB_ALTDIRFUNC' bit is set - in the flag parameter. The type of this field is - `int (*) (const char *, struct stat64 *)'. + +------------+------------+--------------------------------------+ + | File | Printer | | + +------------+------------+--------------------------------------+ + | Open | | Select | + | New | | Open | + +----------+ | Connect | + +----------+ - This is a GNU extension. + To have the strings `File', `Printer', `Open', `New', `Select', and +`Connect' translated there has to be at some point in the code a call +to a function of the `gettext' family. But in two places the string +passed into the function would be `Open'. The translations might not +be the same and therefore we are in the dilemma described above. - `gl_lstat' - The address of an alternative implementation of the `lstat64' - function to get information about an object in the - filesystems, not following symbolic links. It is used if the - `GLOB_ALTDIRFUNC' bit is set in the flag parameter. The type - of this field is `int (*) (const char *, struct stat64 *)'. + One solution to this problem is to artificially enlengthen the +strings to make them unambiguous. But what would the program do if no +translation is available? The enlengthened string is not what should be +printed. So we should use a little bit modified version of the +functions. - This is a GNU extension. + To enlengthen the strings a uniform method should be used. E.g., in +the example above the strings could be chosen as - - Function: int glob (const char *PATTERN, int FLAGS, int (*ERRFUNC) - (const char *FILENAME, int ERROR-CODE), glob_t *VECTOR-PTR) - The function `glob' does globbing using the pattern PATTERN in the - current directory. It puts the result in a newly allocated - vector, and stores the size and address of this vector into - `*VECTOR-PTR'. The argument FLAGS is a combination of bit flags; - see *Note Flags for Globbing::, for details of the flags. + Menu|File + Menu|Printer + Menu|File|Open + Menu|File|New + Menu|Printer|Select + Menu|Printer|Open + Menu|Printer|Connect - The result of globbing is a sequence of file names. The function - `glob' allocates a string for each resulting word, then allocates - a vector of type `char **' to store the addresses of these - strings. The last element of the vector is a null pointer. This - vector is called the "word vector". + Now all the strings are different and if now instead of `gettext' +the following little wrapper function is used, everything works just +fine: - To return this vector, `glob' stores both its address and its - length (number of elements, not counting the terminating null - pointer) into `*VECTOR-PTR'. + char * + sgettext (const char *msgid) + { + char *msgval = gettext (msgid); + if (msgval == msgid) + msgval = strrchr (msgid, '|') + 1; + return msgval; + } - Normally, `glob' sorts the file names alphabetically before - returning them. You can turn this off with the flag `GLOB_NOSORT' - if you want to get the information as fast as possible. Usually - it's a good idea to let `glob' sort them--if you process the files - in alphabetical order, the users will have a feel for the rate of - progress that your application is making. + What this little function does is to recognize the case when no +translation is available. This can be done very efficiently by a +pointer comparison since the return value is the input value. If there +is no translation we know that the input string is in the format we used +for the Menu entries and therefore contains a `|' character. We simply +search for the last occurrence of this character and return a pointer +to the character following it. That's it! - If `glob' succeeds, it returns 0. Otherwise, it returns one of - these error codes: + If one now consistently uses the enlengthened string form and +replaces the `gettext' calls with calls to `sgettext' (this is normally +limited to very few places in the GUI implementation) then it is +possible to produce a program which can be internationalized. - `GLOB_ABORTED' - There was an error opening a directory, and you used the flag - `GLOB_ERR' or your specified ERRFUNC returned a nonzero value. - *Note Flags for Globbing::, for an explanation of the - `GLOB_ERR' flag and ERRFUNC. + With advanced compilers (such as GNU C) one can write the `sgettext' +functions as an inline function or as a macro like this: - `GLOB_NOMATCH' - The pattern didn't match any existing files. If you use the - `GLOB_NOCHECK' flag, then you never get this error code, - because that flag tells `glob' to _pretend_ that the pattern - matched at least one file. + #define sgettext(msgid) \ + ({ const char *__msgid = (msgid); \ + char *__msgstr = gettext (__msgid); \ + if (__msgval == __msgid) \ + __msgval = strrchr (__msgid, '|') + 1; \ + __msgval; }) - `GLOB_NOSPACE' - It was impossible to allocate memory to hold the result. + The other `gettext' functions (`dgettext', `dcgettext' and the +`ngettext' equivalents) can and should have corresponding functions as +well which look almost identical, except for the parameters and the +call to the underlying function. - In the event of an error, `glob' stores information in - `*VECTOR-PTR' about all the matches it has found so far. + Now there is of course the question why such functions do not exist +in the GNU C library? There are two parts of the answer to this +question. - It is important to notice that the `glob' function will not fail if - it encounters directories or files which cannot be handled without - the LFS interfaces. The implementation of `glob' is supposed to - use these functions internally. This at least is the assumptions - made by the Unix standard. The GNU extension of allowing the user - to provide own directory handling and `stat' functions complicates - things a bit. If these callback functions are used and a large - file or directory is encountered `glob' _can_ fail. + * They are easy to write and therefore can be provided by the + project they are used in. This is not an answer by itself and + must be seen together with the second part which is: - - Function: int glob64 (const char *PATTERN, int FLAGS, int (*ERRFUNC) - (const char *FILENAME, int ERROR-CODE), glob64_t *VECTOR-PTR) - The `glob64' function was added as part of the Large File Summit - extensions but is not part of the original LFS proposal. The - reason for this is simple: it is not necessary. The necessity for - a `glob64' function is added by the extensions of the GNU `glob' - implementation which allows the user to provide own directory - handling and `stat' functions. The `readdir' and `stat' functions - do depend on the choice of `_FILE_OFFSET_BITS' since the definition - of the types `struct dirent' and `struct stat' will change - depending on the choice. + * There is no way the C library can contain a version which can work + everywhere. The problem is the selection of the character to + separate the prefix from the actual string in the enlenghtened + string. The examples above used `|' which is a quite good choice + because it resembles a notation frequently used in this context + and it also is a character not often used in message strings. - Beside this difference the `glob64' works just like `glob' in all - aspects. + But what if the character is used in message strings. Or if the + chose character is not available in the character set on the + machine one compiles (e.g., `|' is not required to exist for + ISO C; this is why the `iso646.h' file exists in ISO C programming + environments). - This function is a GNU extension. + There is only one more comment to make left. The wrapper function +above require that the translations strings are not enlengthened +themselves. This is only logical. There is no need to disambiguate +the strings (since they are never used as keys for a search) and one +also saves quite some memory and disk space by doing this.  -File: libc.info, Node: Flags for Globbing, Next: More Flags for Globbing, Prev: Calling Glob, Up: Globbing +File: libc.info, Node: Using gettextized software, Prev: GUI program problems, Up: Message catalogs with gettext -Flags for Globbing ------------------- +User influence on `gettext' +........................... - This section describes the flags that you can specify in the FLAGS -argument to `glob'. Choose the flags you want, and combine them with -the C bitwise OR operator `|'. + The last sections described what the programmer can do to +internationalize the messages of the program. But it is finally up to +the user to select the message s/he wants to see. S/He must understand +them. -`GLOB_APPEND' - Append the words from this expansion to the vector of words - produced by previous calls to `glob'. This way you can - effectively expand several words as if they were concatenated with - spaces between them. + The POSIX locale model uses the environment variables `LC_COLLATE', +`LC_CTYPE', `LC_MESSAGES', `LC_MONETARY', `NUMERIC', and `LC_TIME' to +select the locale which is to be used. This way the user can influence +lots of functions. As we mentioned above the `gettext' functions also +take advantage of this. - In order for appending to work, you must not modify the contents - of the word vector structure between calls to `glob'. And, if you - set `GLOB_DOOFFS' in the first call to `glob', you must also set - it when you append to the results. + To understand how this happens it is necessary to take a look at the +various components of the filename which gets computed to locate a +message catalog. It is composed as follows: - Note that the pointer stored in `gl_pathv' may no longer be valid - after you call `glob' the second time, because `glob' might have - relocated the vector. So always fetch `gl_pathv' from the - `glob_t' structure after each `glob' call; *never* save the - pointer across calls. + DIR_NAME/LOCALE/LC_CATEGORY/DOMAIN_NAME.mo -`GLOB_DOOFFS' - Leave blank slots at the beginning of the vector of words. The - `gl_offs' field says how many slots to leave. The blank slots - contain null pointers. + The default value for DIR_NAME is system specific. It is computed +from the value given as the prefix while configuring the C library. +This value normally is `/usr' or `/'. For the former the complete +DIR_NAME is: -`GLOB_ERR' - Give up right away and report an error if there is any difficulty - reading the directories that must be read in order to expand - PATTERN fully. Such difficulties might include a directory in - which you don't have the requisite access. Normally, `glob' tries - its best to keep on going despite any errors, reading whatever - directories it can. + /usr/share/locale - You can exercise even more control than this by specifying an - error-handler function ERRFUNC when you call `glob'. If ERRFUNC - is not a null pointer, then `glob' doesn't give up right away when - it can't read a directory; instead, it calls ERRFUNC with two - arguments, like this: + We can use `/usr/share' since the `.mo' files containing the message +catalogs are system independent, so all systems can use the same files. +If the program executed the `bindtextdomain' function for the message +domain that is currently handled, the `dir_name' component is exactly +the value which was given to the function as the second parameter. +I.e., `bindtextdomain' allows overwriting the only system dependent and +fixed value to make it possible to address files anywhere in the +filesystem. - (*ERRFUNC) (FILENAME, ERROR-CODE) + The CATEGORY is the name of the locale category which was selected +in the program code. For `gettext' and `dgettext' this is always +`LC_MESSAGES', for `dcgettext' this is selected by the value of the +third parameter. As said above it should be avoided to ever use a +category other than `LC_MESSAGES'. - The argument FILENAME is the name of the directory that `glob' - couldn't open or couldn't read, and ERROR-CODE is the `errno' - value that was reported to `glob'. + The LOCALE component is computed based on the category used. Just +like for the `setlocale' function here comes the user selection into +the play. Some environment variables are examined in a fixed order and +the first environment variable set determines the return value of the +lookup process. In detail, for the category `LC_xxx' the following +variables in this order are examined: - If the error handler function returns nonzero, then `glob' gives up - right away. Otherwise, it continues. +`LANGUAGE' -`GLOB_MARK' - If the pattern matches the name of a directory, append `/' to the - directory's name when returning it. +`LC_ALL' -`GLOB_NOCHECK' - If the pattern doesn't match any file names, return the pattern - itself as if it were a file name that had been matched. - (Normally, when the pattern doesn't match anything, `glob' returns - that there were no matches.) +`LC_xxx' -`GLOB_NOSORT' - Don't sort the file names; return them in no particular order. - (In practice, the order will depend on the order of the entries in - the directory.) The only reason _not_ to sort is to save time. +`LANG' + This looks very familiar. With the exception of the `LANGUAGE' +environment variable this is exactly the lookup order the `setlocale' +function uses. But why introducing the `LANGUAGE' variable? -`GLOB_NOESCAPE' - Don't treat the `\' character specially in patterns. Normally, - `\' quotes the following character, turning off its special meaning - (if any) so that it matches only itself. When quoting is enabled, - the pattern `\?' matches only the string `?', because the question - mark in the pattern acts like an ordinary character. + The reason is that the syntax of the values these variables can have +is different to what is expected by the `setlocale' function. If we +would set `LC_ALL' to a value following the extended syntax that would +mean the `setlocale' function will never be able to use the value of +this variable as well. An additional variable removes this problem +plus we can select the language independently of the locale setting +which sometimes is useful. - If you use `GLOB_NOESCAPE', then `\' is an ordinary character. + While for the `LC_xxx' variables the value should consist of exactly +one specification of a locale the `LANGUAGE' variable's value can +consist of a colon separated list of locale names. The attentive +reader will realize that this is the way we manage to implement one of +our additional demands above: we want to be able to specify an ordered +list of language. - `glob' does its work by calling the function `fnmatch' repeatedly. - It handles the flag `GLOB_NOESCAPE' by turning on the - `FNM_NOESCAPE' flag in calls to `fnmatch'. + Back to the constructed filename we have only one component missing. +The DOMAIN_NAME part is the name which was either registered using the +`textdomain' function or which was given to `dgettext' or `dcgettext' +as the first parameter. Now it becomes obvious that a good choice for +the domain name in the program code is a string which is closely +related to the program/package name. E.g., for the GNU C Library the +domain name is `libc'. - -File: libc.info, Node: More Flags for Globbing, Prev: Flags for Globbing, Up: Globbing +A limit piece of example code should show how the programmer is supposed +to work: -More Flags for Globbing ------------------------ + { + setlocale (LC_ALL, ""); + textdomain ("test-package"); + bindtextdomain ("test-package", "/usr/local/share/locale"); + puts (gettext ("Hello, world!")); + } - Beside the flags described in the last section, the GNU -implementation of `glob' allows a few more flags which are also defined -in the `glob.h' file. Some of the extensions implement functionality -which is available in modern shell implementations. + At the program start the default domain is `messages', and the +default locale is "C". The `setlocale' call sets the locale according +to the user's environment variables; remember that correct functioning +of `gettext' relies on the correct setting of the `LC_MESSAGES' locale +(for looking up the message catalog) and of the `LC_CTYPE' locale (for +the character set conversion). The `textdomain' call changes the +default domain to `test-package'. The `bindtextdomain' call specifies +that the message catalogs for the domain `test-package' can be found +below the directory `/usr/local/share/locale'. -`GLOB_PERIOD' - The `.' character (period) is treated special. It cannot be - matched by wildcards. *Note Wildcard Matching::, `FNM_PERIOD'. + If now the user set in her/his environment the variable `LANGUAGE' +to `de' the `gettext' function will try to use the translations from +the file -`GLOB_MAGCHAR' - The `GLOB_MAGCHAR' value is not to be given to `glob' in the FLAGS - parameter. Instead, `glob' sets this bit in the GL_FLAGS element - of the GLOB_T structure provided as the result if the pattern used - for matching contains any wildcard character. + /usr/local/share/locale/de/LC_MESSAGES/test-package.mo -`GLOB_ALTDIRFUNC' - Instead of the using the using the normal functions for accessing - the filesystem the `glob' implementation uses the user-supplied - functions specified in the structure pointed to by PGLOB - parameter. For more information about the functions refer to the - sections about directory handling see *Note Accessing - Directories::, and *Note Reading Attributes::. + From the above descriptions it should be clear which component of +this filename is determined by which source. -`GLOB_BRACE' - If this flag is given the handling of braces in the pattern is - changed. It is now required that braces appear correctly grouped. - I.e., for each opening brace there must be a closing one. Braces - can be used recursively. So it is possible to define one brace - expression in another one. It is important to note that the range - of each brace expression is completely contained in the outer - brace expression (if there is one). + In the above example we assumed that the `LANGUAGE' environment +variable to `de'. This might be an appropriate selection but what +happens if the user wants to use `LC_ALL' because of the wider +usability and here the required value is `de_DE.ISO-8859-1'? We +already mentioned above that a situation like this is not infrequent. +E.g., a person might prefer reading a dialect and if this is not +available fall back on the standard language. - The string between the matching braces is separated into single - expressions by splitting at `,' (comma) characters. The commas - themselves are discarded. Please note what we said above about - recursive brace expressions. The commas used to separate the - subexpressions must be at the same level. Commas in brace - subexpressions are not matched. They are used during expansion of - the brace expression of the deeper level. The example below shows - this + The `gettext' functions know about situations like this and can +handle them gracefully. The functions recognize the format of the value +of the environment variable. It can split the value is different pieces +and by leaving out the only or the other part it can construct new +values. This happens of course in a predictable way. To understand +this one must know the format of the environment variable value. There +are two more or less standardized forms: - glob ("{foo/{,bar,biz},baz}", GLOB_BRACE, NULL, &result) +_X/Open Format_ + `language[_territory[.codeset]][@modifier]' - is equivalent to the sequence +_CEN Format (European Community Standard)_ + `language[_territory][+audience][+special][,[sponsor][_revision]]' - glob ("foo/", GLOB_BRACE, NULL, &result) - glob ("foo/bar", GLOB_BRACE|GLOB_APPEND, NULL, &result) - glob ("foo/biz", GLOB_BRACE|GLOB_APPEND, NULL, &result) - glob ("baz", GLOB_BRACE|GLOB_APPEND, NULL, &result) + The functions will automatically recognize which format is used. +Less specific locale names will be stripped of in the order of the +following list: - if we leave aside error handling. + 1. `revision' -`GLOB_NOMAGIC' - If the pattern contains no wildcard constructs (it is a literal - file name), return it as the sole "matching" word, even if no file - exists by that name. + 2. `sponsor' -`GLOB_TILDE' - If this flag is used the character `~' (tilde) is handled special - if it appears at the beginning of the pattern. Instead of being - taken verbatim it is used to represent the home directory of a - known user. + 3. `special' - If `~' is the only character in pattern or it is followed by a `/' - (slash), the home directory of the process owner is substituted. - Using `getlogin' and `getpwnam' the information is read from the - system databases. As an example take user `bart' with his home - directory at `/home/bart'. For him a call like + 4. `codeset' - glob ("~/bin/*", GLOB_TILDE, NULL, &result) + 5. `normalized codeset' - would return the contents of the directory `/home/bart/bin'. - Instead of referring to the own home directory it is also possible - to name the home directory of other users. To do so one has to - append the user name after the tilde character. So the contents - of user `homer''s `bin' directory can be retrieved by + 6. `territory' - glob ("~homer/bin/*", GLOB_TILDE, NULL, &result) + 7. `audience'/`modifier' - If the user name is not valid or the home directory cannot be - determined for some reason the pattern is left untouched and - itself used as the result. I.e., if in the last example `home' is - not available the tilde expansion yields to `"~homer/bin/*"' and - `glob' is not looking for a directory named `~homer'. + From the last entry one can see that the meaning of the `modifier' +field in the X/Open format and the `audience' format have the same +meaning. Beside one can see that the `language' field for obvious +reasons never will be dropped. - This functionality is equivalent to what is available in C-shells - if the `nonomatch' flag is set. + The only new thing is the `normalized codeset' entry. This is +another goodie which is introduced to help reducing the chaos which +derives from the inability of the people to standardize the names of +character sets. Instead of ISO-8859-1 one can often see 8859-1, 88591, +iso8859-1, or iso_8859-1. The `normalized codeset' value is generated +from the user-provided character set name by applying the following +rules: -`GLOB_TILDE_CHECK' - If this flag is used `glob' behaves like as if `GLOB_TILDE' is - given. The only difference is that if the user name is not - available or the home directory cannot be determined for other - reasons this leads to an error. `glob' will return `GLOB_NOMATCH' - instead of using the pattern itself as the name. + 1. Remove all characters beside numbers and letters. - This functionality is equivalent to what is available in C-shells - if `nonomatch' flag is not set. + 2. Fold letters to lowercase. -`GLOB_ONLYDIR' - If this flag is used the globbing function takes this as a *hint* - that the caller is only interested in directories matching the - pattern. If the information about the type of the file is easily - available non-directories will be rejected but no extra work will - be done to determine the information for each file. I.e., the - caller must still be able to filter directories out. + 3. If the same only contains digits prepend the string `"iso"'. - This functionality is only available with the GNU `glob' - implementation. It is mainly used internally to increase the - performance but might be useful for a user as well and therefore is - documented here. +So all of the above name will be normalized to `iso88591'. This allows +the program user much more freely choosing the locale name. - Calling `glob' will in most cases allocate resources which are used -to represent the result of the function call. If the same object of -type `glob_t' is used in multiple call to `glob' the resources are -freed or reused so that no leaks appear. But this does not include the -time when all `glob' calls are done. + Even this extended functionality still does not help to solve the +problem that completely different names can be used to denote the same +locale (e.g., `de' and `german'). To be of help in this situation the +locale implementation and also the `gettext' functions know about +aliases. - - Function: void globfree (glob_t *PGLOB) - The `globfree' function frees all resources allocated by previous - calls to `glob' associated with the object pointed to by PGLOB. - This function should be called whenever the currently used - `glob_t' typed object isn't used anymore. + The file `/usr/share/locale/locale.alias' (replace `/usr' with +whatever prefix you used for configuring the C library) contains a +mapping of alternative names to more regular names. The system manager +is free to add new entries to fill her/his own needs. The selected +locale from the environment is compared with the entries in the first +column of this file ignoring the case. If they match the value of the +second column is used instead for the further handling. - - Function: void globfree64 (glob64_t *PGLOB) - This function is equivalent to `globfree' but it frees records of - type `glob64_t' which were allocated by `glob64'. + In the description of the format of the environment variables we +already mentioned the character set as a factor in the selection of the +message catalog. In fact, only catalogs which contain text written +using the character set of the system/program can be used (directly; +there will come a solution for this some day). This means for the user +that s/he will always have to take care for this. If in the collection +of the message catalogs there are files for the same language but coded +using different character sets the user has to be careful.  -File: libc.info, Node: Regular Expressions, Next: Word Expansion, Prev: Globbing, Up: Pattern Matching +File: libc.info, Node: Helper programs for gettext, Prev: Message catalogs with gettext, Up: The Uniforum approach -Regular Expression Matching -=========================== +Programs to handle message catalogs for `gettext' +------------------------------------------------- - The GNU C library supports two interfaces for matching regular -expressions. One is the standard POSIX.2 interface, and the other is -what the GNU system has had for many years. + The GNU C Library does not contain the source code for the programs +to handle message catalogs for the `gettext' functions. As part of the +GNU project the GNU gettext package contains everything the developer +needs. The functionality provided by the tools in this package by far +exceeds the abilities of the `gencat' program described above for the +`catgets' functions. - Both interfaces are declared in the header file `regex.h'. If you -define `_POSIX_C_SOURCE', then only the POSIX.2 functions, structures, -and constants are declared. + There is a program `msgfmt' which is the equivalent program to the +`gencat' program. It generates from the human-readable and -editable +form of the message catalog a binary file which can be used by the +`gettext' functions. But there are several more programs available. -* Menu: + The `xgettext' program can be used to automatically extract the +translatable messages from a source file. I.e., the programmer need not +take care for the translations and the list of messages which have to be +translated. S/He will simply wrap the translatable string in calls to +`gettext' et.al and the rest will be done by `xgettext'. This program +has a lot of option which help to customize the output or do help to +understand the input better. -* POSIX Regexp Compilation:: Using `regcomp' to prepare to match. -* Flags for POSIX Regexps:: Syntax variations for `regcomp'. -* Matching POSIX Regexps:: Using `regexec' to match the compiled - pattern that you get from `regcomp'. -* Regexp Subexpressions:: Finding which parts of the string were matched. -* Subexpression Complications:: Find points of which parts were matched. -* Regexp Cleanup:: Freeing storage; reporting errors. + Other programs help to manage development cycle when new messages +appear in the source files or when a new translation of the messages +appear. here it should only be noted that using all the tools in GNU +gettext it is possible to _completely_ automize the handling of message +catalog. Beside marking the translatable string in the source code and +generating the translations the developers do not have anything to do +themselves.  -File: libc.info, Node: POSIX Regexp Compilation, Next: Flags for POSIX Regexps, Up: Regular Expressions - -POSIX Regular Expression Compilation ------------------------------------- - - Before you can actually match a regular expression, you must -"compile" it. This is not true compilation--it produces a special data -structure, not machine instructions. But it is like ordinary -compilation in that its purpose is to enable you to "execute" the -pattern fast. (*Note Matching POSIX Regexps::, for how to use the -compiled regular expression for matching.) - - There is a special data type for compiled regular expressions: - - - Data Type: regex_t - This type of object holds a compiled regular expression. It is - actually a structure. It has just one field that your programs - should look at: - - `re_nsub' - This field holds the number of parenthetical subexpressions - in the regular expression that was compiled. - - There are several other fields, but we don't describe them here, - because only the functions in the library should use them. - - After you create a `regex_t' object, you can compile a regular -expression into it by calling `regcomp'. - - - Function: int regcomp (regex_t *COMPILED, const char *PATTERN, int - CFLAGS) - The function `regcomp' "compiles" a regular expression into a data - structure that you can use with `regexec' to match against a - string. The compiled regular expression format is designed for - efficient matching. `regcomp' stores it into `*COMPILED'. - - It's up to you to allocate an object of type `regex_t' and pass its - address to `regcomp'. - - The argument CFLAGS lets you specify various options that control - the syntax and semantics of regular expressions. *Note Flags for - POSIX Regexps::. - - If you use the flag `REG_NOSUB', then `regcomp' omits from the - compiled regular expression the information necessary to record - how subexpressions actually match. In this case, you might as well - pass `0' for the MATCHPTR and NMATCH arguments when you call - `regexec'. - - If you don't use `REG_NOSUB', then the compiled regular expression - does have the capacity to record how subexpressions match. Also, - `regcomp' tells you how many subexpressions PATTERN has, by - storing the number in `COMPILED->re_nsub'. You can use that value - to decide how long an array to allocate to hold information about - subexpression matches. - - `regcomp' returns `0' if it succeeds in compiling the regular - expression; otherwise, it returns a nonzero error code (see the - table below). You can use `regerror' to produce an error message - string describing the reason for a nonzero value; see *Note Regexp - Cleanup::. - - - Here are the possible nonzero values that `regcomp' can return: - -`REG_BADBR' - There was an invalid `\{...\}' construct in the regular - expression. A valid `\{...\}' construct must contain either a - single number, or two numbers in increasing order separated by a - comma. - -`REG_BADPAT' - There was a syntax error in the regular expression. - -`REG_BADRPT' - A repetition operator such as `?' or `*' appeared in a bad - position (with no preceding subexpression to act on). - -`REG_ECOLLATE' - The regular expression referred to an invalid collating element - (one not defined in the current locale for string collation). - *Note Locale Categories::. - -`REG_ECTYPE' - The regular expression referred to an invalid character class name. - -`REG_EESCAPE' - The regular expression ended with `\'. - -`REG_ESUBREG' - There was an invalid number in the `\DIGIT' construct. - -`REG_EBRACK' - There were unbalanced square brackets in the regular expression. +File: libc.info, Node: Searching and Sorting, Next: Pattern Matching, Prev: Message Translation, Up: Top -`REG_EPAREN' - An extended regular expression had unbalanced parentheses, or a - basic regular expression had unbalanced `\(' and `\)'. +Searching and Sorting +********************* -`REG_EBRACE' - The regular expression had unbalanced `\{' and `\}'. + This chapter describes functions for searching and sorting arrays of +arbitrary objects. You pass the appropriate comparison function to be +applied as an argument, along with the size of the objects in the array +and the total number of elements. -`REG_ERANGE' - One of the endpoints in a range expression was invalid. +* Menu: -`REG_ESPACE' - `regcomp' ran out of memory. +* Comparison Functions:: Defining how to compare two objects. + Since the sort and search facilities + are general, you have to specify the + ordering. +* Array Search Function:: The `bsearch' function. +* Array Sort Function:: The `qsort' function. +* Search/Sort Example:: An example program. +* Hash Search Function:: The `hsearch' function. +* Tree Search Function:: The `tsearch' function.  -File: libc.info, Node: Flags for POSIX Regexps, Next: Matching POSIX Regexps, Prev: POSIX Regexp Compilation, Up: Regular Expressions +File: libc.info, Node: Comparison Functions, Next: Array Search Function, Up: Searching and Sorting -Flags for POSIX Regular Expressions ------------------------------------ +Defining the Comparison Function +================================ - These are the bit flags that you can use in the CFLAGS operand when -compiling a regular expression with `regcomp'. + In order to use the sorted array library functions, you have to +describe how to compare the elements of the array. -`REG_EXTENDED' - Treat the pattern as an extended regular expression, rather than - as a basic regular expression. + To do this, you supply a comparison function to compare two elements +of the array. The library will call this function, passing as arguments +pointers to two array elements to be compared. Your comparison function +should return a value the way `strcmp' (*note String/Array +Comparison::) does: negative if the first argument is "less" than the +second, zero if they are "equal", and positive if the first argument is +"greater". -`REG_ICASE' - Ignore case when matching letters. + Here is an example of a comparison function which works with an +array of numbers of type `double': -`REG_NOSUB' - Don't bother storing the contents of the MATCHES-PTR array. + int + compare_doubles (const void *a, const void *b) + { + const double *da = (const double *) a; + const double *db = (const double *) b; + + return (*da > *db) - (*da < *db); + } -`REG_NEWLINE' - Treat a newline in STRING as dividing STRING into multiple lines, - so that `$' can match before the newline and `^' can match after. - Also, don't permit `.' to match a newline, and don't permit - `[^...]' to match a newline. + The header file `stdlib.h' defines a name for the data type of +comparison functions. This type is a GNU extension. - Otherwise, newline acts like any other ordinary character. + int comparison_fn_t (const void *, const void *);  -File: libc.info, Node: Matching POSIX Regexps, Next: Regexp Subexpressions, Prev: Flags for POSIX Regexps, Up: Regular Expressions - -Matching a Compiled POSIX Regular Expression --------------------------------------------- +File: libc.info, Node: Array Search Function, Next: Array Sort Function, Prev: Comparison Functions, Up: Searching and Sorting - Once you have compiled a regular expression, as described in *Note -POSIX Regexp Compilation::, you can match it against strings using -`regexec'. A match anywhere inside the string counts as success, -unless the regular expression contains anchor characters (`^' or `$'). +Array Search Function +===================== - - Function: int regexec (regex_t *COMPILED, char *STRING, size_t - NMATCH, regmatch_t MATCHPTR [], int EFLAGS) - This function tries to match the compiled regular expression - `*COMPILED' against STRING. + Generally searching for a specific element in an array means that +potentially all elements must be checked. The GNU C library contains +functions to perform linear search. The prototypes for the following +two functions can be found in `search.h'. - `regexec' returns `0' if the regular expression matches; - otherwise, it returns a nonzero value. See the table below for - what nonzero values mean. You can use `regerror' to produce an - error message string describing the reason for a nonzero value; - see *Note Regexp Cleanup::. + - Function: void * lfind (const void *KEY, void *BASE, size_t *NMEMB, + size_t SIZE, comparison_fn_t COMPAR) + The `lfind' function searches in the array with `*NMEMB' elements + of SIZE bytes pointed to by BASE for an element which matches the + one pointed to by KEY. The function pointed to by COMPAR is used + decide whether two elements match. - The argument EFLAGS is a word of bit flags that enable various - options. + The return value is a pointer to the matching element in the array + starting at BASE if it is found. If no matching element is + available `NULL' is returned. - If you want to get information about what part of STRING actually - matched the regular expression or its subexpressions, use the - arguments MATCHPTR and NMATCH. Otherwise, pass `0' for NMATCH, - and `NULL' for MATCHPTR. *Note Regexp Subexpressions::. + The mean runtime of this function is `*NMEMB'/2. This function + should only be used elements often get added to or deleted from + the array in which case it might not be useful to sort the array + before searching. - You must match the regular expression with the same set of current -locales that were in effect when you compiled the regular expression. + - Function: void * lsearch (const void *KEY, void *BASE, size_t + *NMEMB, size_t SIZE, comparison_fn_t COMPAR) + The `lsearch' function is similar to the `lfind' function. It + searches the given array for an element and returns it if found. + The difference is that if no matching element is found the + `lsearch' function adds the object pointed to by KEY (with a size + of SIZE bytes) at the end of the array and it increments the value + of `*NMEMB' to reflect this addition. - The function `regexec' accepts the following flags in the EFLAGS -argument: + This means for the caller that if it is not sure that the array + contains the element one is searching for the memory allocated for + the array starting at BASE must have room for at least SIZE more + bytes. If one is sure the element is in the array it is better to + use `lfind' so having more room in the array is always necessary + when calling `lsearch'. -`REG_NOTBOL' - Do not regard the beginning of the specified string as the - beginning of a line; more generally, don't make any assumptions - about what text might precede it. + To search a sorted array for an element matching the key, use the +`bsearch' function. The prototype for this function is in the header +file `stdlib.h'. -`REG_NOTEOL' - Do not regard the end of the specified string as the end of a - line; more generally, don't make any assumptions about what text - might follow it. + - Function: void * bsearch (const void *KEY, const void *ARRAY, size_t + COUNT, size_t SIZE, comparison_fn_t COMPARE) + The `bsearch' function searches the sorted array ARRAY for an + object that is equivalent to KEY. The array contains COUNT + elements, each of which is of size SIZE bytes. - Here are the possible nonzero values that `regexec' can return: + The COMPARE function is used to perform the comparison. This + function is called with two pointer arguments and should return an + integer less than, equal to, or greater than zero corresponding to + whether its first argument is considered less than, equal to, or + greater than its second argument. The elements of the ARRAY must + already be sorted in ascending order according to this comparison + function. -`REG_NOMATCH' - The pattern didn't match the string. This isn't really an error. + The return value is a pointer to the matching array element, or a + null pointer if no match is found. If the array contains more + than one element that matches, the one that is returned is + unspecified. -`REG_ESPACE' - `regexec' ran out of memory. + This function derives its name from the fact that it is implemented + using the binary search algorithm.  -File: libc.info, Node: Regexp Subexpressions, Next: Subexpression Complications, Prev: Matching POSIX Regexps, Up: Regular Expressions - -Match Results with Subexpressions ---------------------------------- - - When `regexec' matches parenthetical subexpressions of PATTERN, it -records which parts of STRING they match. It returns that information -by storing the offsets into an array whose elements are structures of -type `regmatch_t'. The first element of the array (index `0') records -the part of the string that matched the entire regular expression. -Each other element of the array records the beginning and end of the -part that matched a single parenthetical subexpression. - - - Data Type: regmatch_t - This is the data type of the MATCHARRAY array that you pass to - `regexec'. It contains two structure fields, as follows: - - `rm_so' - The offset in STRING of the beginning of a substring. Add - this value to STRING to get the address of that part. - - `rm_eo' - The offset in STRING of the end of the substring. - - - Data Type: regoff_t - `regoff_t' is an alias for another signed integer type. The - fields of `regmatch_t' have type `regoff_t'. - - The `regmatch_t' elements correspond to subexpressions positionally; -the first element (index `1') records where the first subexpression -matched, the second element records the second subexpression, and so -on. The order of the subexpressions is the order in which they begin. +File: libc.info, Node: Array Sort Function, Next: Search/Sort Example, Prev: Array Search Function, Up: Searching and Sorting - When you call `regexec', you specify how long the MATCHPTR array is, -with the NMATCH argument. This tells `regexec' how many elements to -store. If the actual regular expression has more than NMATCH -subexpressions, then you won't get offset information about the rest of -them. But this doesn't alter whether the pattern matches a particular -string or not. +Array Sort Function +=================== - If you don't want `regexec' to return any information about where -the subexpressions matched, you can either supply `0' for NMATCH, or -use the flag `REG_NOSUB' when you compile the pattern with `regcomp'. + To sort an array using an arbitrary comparison function, use the +`qsort' function. The prototype for this function is in `stdlib.h'. - -File: libc.info, Node: Subexpression Complications, Next: Regexp Cleanup, Prev: Regexp Subexpressions, Up: Regular Expressions + - Function: void qsort (void *ARRAY, size_t COUNT, size_t SIZE, + comparison_fn_t COMPARE) + The QSORT function sorts the array ARRAY. The array contains + COUNT elements, each of which is of size SIZE. -Complications in Subexpression Matching ---------------------------------------- + The COMPARE function is used to perform the comparison on the + array elements. This function is called with two pointer + arguments and should return an integer less than, equal to, or + greater than zero corresponding to whether its first argument is + considered less than, equal to, or greater than its second + argument. - Sometimes a subexpression matches a substring of no characters. This -happens when `f\(o*\)' matches the string `fum'. (It really matches -just the `f'.) In this case, both of the offsets identify the point in -the string where the null substring was found. In this example, the -offsets are both `1'. + *Warning:* If two objects compare as equal, their order after + sorting is unpredictable. That is to say, the sorting is not + stable. This can make a difference when the comparison considers + only part of the elements. Two elements with the same sort key + may differ in other respects. - Sometimes the entire regular expression can match without using some -of its subexpressions at all--for example, when `ba\(na\)*' matches the -string `ba', the parenthetical subexpression is not used. When this -happens, `regexec' stores `-1' in both fields of the element for that -subexpression. + If you want the effect of a stable sort, you can get this result by + writing the comparison function so that, lacking other reason + distinguish between two elements, it compares them by their + addresses. Note that doing this may make the sorting algorithm + less efficient, so do it only if necessary. - Sometimes matching the entire regular expression can match a -particular subexpression more than once--for example, when `ba\(na\)*' -matches the string `bananana', the parenthetical subexpression matches -three times. When this happens, `regexec' usually stores the offsets -of the last part of the string that matched the subexpression. In the -case of `bananana', these offsets are `6' and `8'. + Here is a simple example of sorting an array of doubles in + numerical order, using the comparison function defined above + (*note Comparison Functions::): - But the last match is not always the one that is chosen. It's more -accurate to say that the last _opportunity_ to match is the one that -takes precedence. What this means is that when one subexpression -appears within another, then the results reported for the inner -subexpression reflect whatever happened on the last match of the outer -subexpression. For an example, consider `\(ba\(na\)*s \)*' matching -the string `bananas bas '. The last time the inner expression actually -matches is near the end of the first word. But it is _considered_ -again in the second word, and fails to match there. `regexec' reports -nonuse of the "na" subexpression. + { + double *array; + int size; + ... + qsort (array, size, sizeof (double), compare_doubles); + } - Another place where this rule applies is when the regular expression - \(ba\(na\)*s \|nefer\(ti\)* \)* + The `qsort' function derives its name from the fact that it was + originally implemented using the "quick sort" algorithm. -matches `bananas nefertiti'. The "na" subexpression does match in the -first word, but it doesn't match in the second word because the other -alternative is used there. Once again, the second repetition of the -outer subexpression overrides the first, and within that second -repetition, the "na" subexpression is not used. So `regexec' reports -nonuse of the "na" subexpression. + The implementation of `qsort' in this library might not be an + in-place sort and might thereby use an extra amount of memory to + store the array.  -File: libc.info, Node: Regexp Cleanup, Prev: Subexpression Complications, Up: Regular Expressions - -POSIX Regexp Matching Cleanup ------------------------------ - - When you are finished using a compiled regular expression, you can -free the storage it uses by calling `regfree'. +File: libc.info, Node: Search/Sort Example, Next: Hash Search Function, Prev: Array Sort Function, Up: Searching and Sorting - - Function: void regfree (regex_t *COMPILED) - Calling `regfree' frees all the storage that `*COMPILED' points - to. This includes various internal fields of the `regex_t' - structure that aren't documented in this manual. +Searching and Sorting Example +============================= - `regfree' does not free the object `*COMPILED' itself. + Here is an example showing the use of `qsort' and `bsearch' with an +array of structures. The objects in the array are sorted by comparing +their `name' fields with the `strcmp' function. Then, we can look up +individual objects based on their names. - You should always free the space in a `regex_t' structure with -`regfree' before using the structure to compile another regular -expression. + #include + #include + #include + + /* Define an array of critters to sort. */ + + struct critter + { + const char *name; + const char *species; + }; + + struct critter muppets[] = + { + {"Kermit", "frog"}, + {"Piggy", "pig"}, + {"Gonzo", "whatever"}, + {"Fozzie", "bear"}, + {"Sam", "eagle"}, + {"Robin", "frog"}, + {"Animal", "animal"}, + {"Camilla", "chicken"}, + {"Sweetums", "monster"}, + {"Dr. Strangepork", "pig"}, + {"Link Hogthrob", "pig"}, + {"Zoot", "human"}, + {"Dr. Bunsen Honeydew", "human"}, + {"Beaker", "human"}, + {"Swedish Chef", "human"} + }; + + int count = sizeof (muppets) / sizeof (struct critter); + + + + /* This is the comparison function used for sorting and searching. */ + + int + critter_cmp (const struct critter *c1, const struct critter *c2) + { + return strcmp (c1->name, c2->name); + } + + + /* Print information about a critter. */ + + void + print_critter (const struct critter *c) + { + printf ("%s, the %s\n", c->name, c->species); + } + + + /* Do the lookup into the sorted array. */ + + void + find_critter (const char *name) + { + struct critter target, *result; + target.name = name; + result = bsearch (&target, muppets, count, sizeof (struct critter), + critter_cmp); + if (result) + print_critter (result); + else + printf ("Couldn't find %s.\n", name); + } + + /* Main program. */ + + int + main (void) + { + int i; + + for (i = 0; i < count; i++) + print_critter (&muppets[i]); + printf ("\n"); + + qsort (muppets, count, sizeof (struct critter), critter_cmp); + + for (i = 0; i < count; i++) + print_critter (&muppets[i]); + printf ("\n"); + + find_critter ("Kermit"); + find_critter ("Gonzo"); + find_critter ("Janice"); + + return 0; + } - When `regcomp' or `regexec' reports an error, you can use the -function `regerror' to turn it into an error message string. + The output from this program looks like: - - Function: size_t regerror (int ERRCODE, regex_t *COMPILED, char - *BUFFER, size_t LENGTH) - This function produces an error message string for the error code - ERRCODE, and stores the string in LENGTH bytes of memory starting - at BUFFER. For the COMPILED argument, supply the same compiled - regular expression structure that `regcomp' or `regexec' was - working with when it got the error. Alternatively, you can supply - `NULL' for COMPILED; you will still get a meaningful error - message, but it might not be as detailed. + Kermit, the frog + Piggy, the pig + Gonzo, the whatever + Fozzie, the bear + Sam, the eagle + Robin, the frog + Animal, the animal + Camilla, the chicken + Sweetums, the monster + Dr. Strangepork, the pig + Link Hogthrob, the pig + Zoot, the human + Dr. Bunsen Honeydew, the human + Beaker, the human + Swedish Chef, the human + + Animal, the animal + Beaker, the human + Camilla, the chicken + Dr. Bunsen Honeydew, the human + Dr. Strangepork, the pig + Fozzie, the bear + Gonzo, the whatever + Kermit, the frog + Link Hogthrob, the pig + Piggy, the pig + Robin, the frog + Sam, the eagle + Swedish Chef, the human + Sweetums, the monster + Zoot, the human + + Kermit, the frog + Gonzo, the whatever + Couldn't find Janice. - If the error message can't fit in LENGTH bytes (including a - terminating null character), then `regerror' truncates it. The - string that `regerror' stores is always null-terminated even if it - has been truncated. + +File: libc.info, Node: Hash Search Function, Next: Tree Search Function, Prev: Search/Sort Example, Up: Searching and Sorting - The return value of `regerror' is the minimum length needed to - store the entire error message. If this is less than LENGTH, then - the error message was not truncated, and you can use it. - Otherwise, you should call `regerror' again with a larger buffer. +The `hsearch' function. +======================= - Here is a function which uses `regerror', but always dynamically - allocates a buffer for the error message: + The functions mentioned so far in this chapter are searching in a +sorted or unsorted array. There are other methods to organize +information which later should be searched. The costs of insert, +delete and search differ. One possible implementation is using hashing +tables. - char *get_regerror (int errcode, regex_t *compiled) - { - size_t length = regerror (errcode, compiled, NULL, 0); - char *buffer = xmalloc (length); - (void) regerror (errcode, compiled, buffer, length); - return buffer; - } + - Function: int hcreate (size_t NEL) + The `hcreate' function creates a hashing table which can contain at + least NEL elements. There is no possibility to grow this table so + it is necessary to choose the value for NEL wisely. The used + methods to implement this function might make it necessary to make + the number of elements in the hashing table larger than the + expected maximal number of elements. Hashing tables usually work + inefficient if they are filled 80% or more. The constant access + time guaranteed by hashing can only be achieved if few collisions + exist. See Knuth's "The Art of Computer Programming, Part 3: + Searching and Sorting" for more information. - -File: libc.info, Node: Word Expansion, Prev: Regular Expressions, Up: Pattern Matching + The weakest aspect of this function is that there can be at most + one hashing table used through the whole program. The table is + allocated in local memory out of control of the programmer. As an + extension the GNU C library provides an additional set of + functions with an reentrant interface which provide a similar + interface but which allow to keep arbitrarily many hashing tables. -Shell-Style Word Expansion -========================== + It is possible to use more than one hashing table in the program + run if the former table is first destroyed by a call to `hdestroy'. - "Word expansion" means the process of splitting a string into -"words" and substituting for variables, commands, and wildcards just as -the shell does. + The function returns a non-zero value if successful. If it return + zero something went wrong. This could either mean there is + already a hashing table in use or the program runs out of memory. - For example, when you write `ls -l foo.c', this string is split into -three separate words--`ls', `-l' and `foo.c'. This is the most basic -function of word expansion. + - Function: void hdestroy (void) + The `hdestroy' function can be used to free all the resources + allocated in a previous call of `hcreate'. After a call to this + function it is again possible to call `hcreate' and allocate a new + table with possibly different size. - When you write `ls *.c', this can become many words, because the -word `*.c' can be replaced with any number of file names. This is -called "wildcard expansion", and it is also a part of word expansion. + It is important to remember that the elements contained in the + hashing table at the time `hdestroy' is called are _not_ freed by + this function. It is the responsibility of the program code to + free those strings (if necessary at all). Freeing all the element + memory is not possible without extra, separately kept information + since there is no function to iterate through all available + elements in the hashing table. If it is really necessary to free + a table and all elements the programmer has to keep a list of all + table elements and before calling `hdestroy' s/he has to free all + element's data using this list. This is a very unpleasant + mechanism and it also shows that this kind of hashing tables is + mainly meant for tables which are created once and used until the + end of the program run. - When you use `echo $PATH' to print your path, you are taking -advantage of "variable substitution", which is also part of word -expansion. + Entries of the hashing table and keys for the search are defined +using this type: - Ordinary programs can perform word expansion just like the shell by -calling the library function `wordexp'. + - Data type: struct ENTRY + Both elements of this structure are pointers to zero-terminated + strings. This is a limiting restriction of the functionality of + the `hsearch' functions. They can only be used for data sets + which use the NUL character always and solely to terminate the + records. It is not possible to handle general binary data. -* Menu: + `char *key' + Pointer to a zero-terminated string of characters describing + the key for the search or the element in the hashing table. -* Expansion Stages:: What word expansion does to a string. -* Calling Wordexp:: How to call `wordexp'. -* Flags for Wordexp:: Options you can enable in `wordexp'. -* Wordexp Example:: A sample program that does word expansion. -* Tilde Expansion:: Details of how tilde expansion works. -* Variable Substitution:: Different types of variable substitution. + `char *data' + Pointer to a zero-terminated string of characters describing + the data. If the functions will be called only for searching + an existing entry this element might stay undefined since it + is not used. - -File: libc.info, Node: Expansion Stages, Next: Calling Wordexp, Up: Word Expansion + - Function: ENTRY * hsearch (ENTRY ITEM, ACTION ACTION) + To search in a hashing table created using `hcreate' the `hsearch' + function must be used. This function can perform simple search + for an element (if ACTION has the `FIND') or it can alternatively + insert the key element into the hashing table, possibly replacing + a previous value (if ACTION is `ENTER'). -The Stages of Word Expansion ----------------------------- + The key is denoted by a pointer to an object of type `ENTRY'. For + locating the corresponding position in the hashing table only the + `key' element of the structure is used. - When word expansion is applied to a sequence of words, it performs -the following transformations in the order shown here: + The return value depends on the ACTION parameter value. If it is + `FIND' the value is a pointer to the matching element in the + hashing table or `NULL' if no matching element exists. If ACTION + is `ENTER' the return value is only `NULL' if the programs runs + out of memory while adding the new element to the table. + Otherwise the return value is a pointer to the element in the + hashing table which contains newly added element based on the data + in KEY. - 1. "Tilde expansion": Replacement of `~foo' with the name of the home - directory of `foo'. + As mentioned before the hashing table used by the functions +described so far is global and there can be at any time at most one +hashing table in the program. A solution is to use the following +functions which are a GNU extension. All have in common that they +operate on a hashing table which is described by the content of an +object of the type `struct hsearch_data'. This type should be treated +as opaque, none of its members should be changed directly. - 2. Next, three different transformations are applied in the same step, - from left to right: + - Function: int hcreate_r (size_t NEL, struct hsearch_data *HTAB) + The `hcreate_r' function initializes the object pointed to by HTAB + to contain a hashing table with at least NEL elements. So this + function is equivalent to the `hcreate' function except that the + initialized data structure is controlled by the user. - * "Variable substitution": Environment variables are - substituted for references such as `$foo'. + This allows having more than one hashing table at one time. The + memory necessary for the `struct hsearch_data' object can be + allocated dynamically. - * "Command substitution": Constructs such as ``cat foo`' and - the equivalent `$(cat foo)' are replaced with the output from - the inner command. + The return value is non-zero if the operation were successful. if + the return value is zero something went wrong which probably means + the programs runs out of memory. - * "Arithmetic expansion": Constructs such as `$(($x-1))' are - replaced with the result of the arithmetic computation. + - Function: void hdestroy_r (struct hsearch_data *HTAB) + The `hdestroy_r' function frees all resources allocated by the + `hcreate_r' function for this very same object HTAB. As for + `hdestroy' it is the programs responsibility to free the strings + for the elements of the table. - 3. "Field splitting": subdivision of the text into "words". + - Function: int hsearch_r (ENTRY ITEM, ACTION ACTION, ENTRY **RETVAL, + struct hsearch_data *HTAB) + The `hsearch_r' function is equivalent to `hsearch'. The meaning + of the first two arguments is identical. But instead of operating + on a single global hashing table the function works on the table + described by the object pointed to by HTAB (which is initialized + by a call to `hcreate_r'). - 4. "Wildcard expansion": The replacement of a construct such as `*.c' - with a list of `.c' file names. Wildcard expansion applies to an - entire word at a time, and replaces that word with 0 or more file - names that are themselves words. + Another difference to `hcreate' is that the pointer to the found + entry in the table is not the return value of the functions. It is + returned by storing it in a pointer variables pointed to by the + RETVAL parameter. The return value of the function is an integer + value indicating success if it is non-zero and failure if it is + zero. In the latter case the global variable ERRNO signals the + reason for the failure. - 5. "Quote removal": The deletion of string-quotes, now that they have - done their job by inhibiting the above transformations when - appropriate. + `ENOMEM' + The table is filled and `hsearch_r' was called with an so far + unknown key and ACTION set to `ENTER'. - For the details of these transformations, and how to write the -constructs that use them, see `The BASH Manual' (to appear). + `ESRCH' + The ACTION parameter is `FIND' and no corresponding element + is found in the table. diff -durpN glibc-2.2.4/manual/libc.info-15 glibc-2.2.5/manual/libc.info-15 --- glibc-2.2.4/manual/libc.info-15 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-15 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1095 +33,1164 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Calling Wordexp, Next: Flags for Wordexp, Prev: Expansion Stages, Up: Word Expansion +File: libc.info, Node: Tree Search Function, Prev: Hash Search Function, Up: Searching and Sorting -Calling `wordexp' ------------------ +The `tsearch' function. +======================= - All the functions, constants and data types for word expansion are -declared in the header file `wordexp.h'. + Another common form to organize data for efficient search is to use +trees. The `tsearch' function family provides a nice interface to +functions to organize possibly large amounts of data by providing a mean +access time proportional to the logarithm of the number of elements. +The GNU C library implementation even guarantees that this bound is +never exceeded even for input data which cause problems for simple +binary tree implementations. - Word expansion produces a vector of words (strings). To return this -vector, `wordexp' uses a special data type, `wordexp_t', which is a -structure. You pass `wordexp' the address of the structure, and it -fills in the structure's fields to tell you about the results. + The functions described in the chapter are all described in the +System V and X/Open specifications and are therefore quite portable. - - Data Type: wordexp_t - This data type holds a pointer to a word vector. More precisely, - it records both the address of the word vector and its size. + In contrast to the `hsearch' functions the `tsearch' functions can +be used with arbitrary data and not only zero-terminated strings. - `we_wordc' - The number of elements in the vector. + The `tsearch' functions have the advantage that no function to +initialize data structures is necessary. A simple pointer of type +`void *' initialized to `NULL' is a valid tree and can be extended or +searched. - `we_wordv' - The address of the vector. This field has type `char **'. + - Function: void * tsearch (const void *KEY, void **ROOTP, + comparison_fn_t COMPAR) + The `tsearch' function searches in the tree pointed to by `*ROOTP' + for an element matching KEY. The function pointed to by COMPAR is + used to determine whether two elements match. *Note Comparison + Functions::, for a specification of the functions which can be + used for the COMPAR parameter. - `we_offs' - The offset of the first real element of the vector, from its - nominal address in the `we_wordv' field. Unlike the other - fields, this is always an input to `wordexp', rather than an - output from it. + If the tree does not contain a matching entry the KEY value will + be added to the tree. `tsearch' does not make a copy of the object + pointed to by KEY (how could it since the size is unknown). + Instead it adds a reference to this object which means the object + must be available as long as the tree data structure is used. - If you use a nonzero offset, then that many elements at the - beginning of the vector are left empty. (The `wordexp' - function fills them with null pointers.) + The tree is represented by a pointer to a pointer since it is + sometimes necessary to change the root node of the tree. So it + must not be assumed that the variable pointed to by ROOTP has the + same value after the call. This also shows that it is not safe to + call the `tsearch' function more than once at the same time using + the same tree. It is no problem to run it more than once at a + time on different trees. - The `we_offs' field is meaningful only if you use the - `WRDE_DOOFFS' flag. Otherwise, the offset is always zero - regardless of what is in this field, and the first real - element comes at the beginning of the vector. + The return value is a pointer to the matching element in the tree. + If a new element was created the pointer points to the new data + (which is in fact KEY). If an entry had to be created and the + program ran out of space `NULL' is returned. - - Function: int wordexp (const char *WORDS, wordexp_t - *WORD-VECTOR-PTR, int FLAGS) - Perform word expansion on the string WORDS, putting the result in - a newly allocated vector, and store the size and address of this - vector into `*WORD-VECTOR-PTR'. The argument FLAGS is a - combination of bit flags; see *Note Flags for Wordexp::, for - details of the flags. + - Function: void * tfind (const void *KEY, void *const *ROOTP, + comparison_fn_t COMPAR) + The `tfind' function is similar to the `tsearch' function. It + locates an element matching the one pointed to by KEY and returns + a pointer to this element. But if no matching element is + available no new element is entered (note that the ROOTP parameter + points to a constant pointer). Instead the function returns + `NULL'. - You shouldn't use any of the characters `|&;<>' in the string - WORDS unless they are quoted; likewise for newline. If you use - these characters unquoted, you will get the `WRDE_BADCHAR' error - code. Don't use parentheses or braces unless they are quoted or - part of a word expansion construct. If you use quotation - characters `'"`', they should come in pairs that balance. + Another advantage of the `tsearch' function in contrast to the +`hsearch' functions is that there is an easy way to remove elements. - The results of word expansion are a sequence of words. The - function `wordexp' allocates a string for each resulting word, then - allocates a vector of type `char **' to store the addresses of - these strings. The last element of the vector is a null pointer. - This vector is called the "word vector". + - Function: void * tdelete (const void *KEY, void **ROOTP, + comparison_fn_t COMPAR) + To remove a specific element matching KEY from the tree `tdelete' + can be used. It locates the matching element using the same + method as `tfind'. The corresponding element is then removed and + a pointer to the parent of the deleted node is returned by the + function. If there is no matching entry in the tree nothing can be + deleted and the function returns `NULL'. If the root of the tree + is deleted `tdelete' returns some unspecified value not equal to + `NULL'. - To return this vector, `wordexp' stores both its address and its - length (number of elements, not counting the terminating null - pointer) into `*WORD-VECTOR-PTR'. + - Function: void tdestroy (void *VROOT, __free_fn_t FREEFCT) + If the complete search tree has to be removed one can use + `tdestroy'. It frees all resources allocated by the `tsearch' + function to generate the tree pointed to by VROOT. - If `wordexp' succeeds, it returns 0. Otherwise, it returns one of - these error codes: + For the data in each tree node the function FREEFCT is called. + The pointer to the data is passed as the argument to the function. + If no such work is necessary FREEFCT must point to a function + doing nothing. It is called in any case. - `WRDE_BADCHAR' - The input string WORDS contains an unquoted invalid character - such as `|'. + This function is a GNU extension and not covered by the System V or + X/Open specifications. - `WRDE_BADVAL' - The input string refers to an undefined shell variable, and - you used the flag `WRDE_UNDEF' to forbid such references. + In addition to the function to create and destroy the tree data +structure, there is another function which allows you to apply a +function to all elements of the tree. The function must have this type: - `WRDE_CMDSUB' - The input string uses command substitution, and you used the - flag `WRDE_NOCMD' to forbid command substitution. + void __action_fn_t (const void *nodep, VISIT value, int level); - `WRDE_NOSPACE' - It was impossible to allocate memory to hold the result. In - this case, `wordexp' can store part of the results--as much - as it could allocate room for. + The NODEP is the data value of the current node (once given as the +KEY argument to `tsearch'). LEVEL is a numeric value which corresponds +to the depth of the current node in the tree. The root node has the +depth 0 and its children have a depth of 1 and so on. The `VISIT' type +is an enumeration type. - `WRDE_SYNTAX' - There was a syntax error in the input string. For example, - an unmatched quoting character is a syntax error. + - Data Type: VISIT + The `VISIT' value indicates the status of the current node in the + tree and how the function is called. The status of a node is + either `leaf' or `internal node'. For each leaf node the function + is called exactly once, for each internal node it is called three + times: before the first child is processed, after the first child + is processed and after both children are processed. This makes it + possible to handle all three methods of tree traversal (or even a + combination of them). - - Function: void wordfree (wordexp_t *WORD-VECTOR-PTR) - Free the storage used for the word-strings and vector that - `*WORD-VECTOR-PTR' points to. This does not free the structure - `*WORD-VECTOR-PTR' itself--only the other data it points to. + `preorder' + The current node is an internal node and the function is + called before the first child was processed. + + `postorder' + The current node is an internal node and the function is + called after the first child was processed. + + `endorder' + The current node is an internal node and the function is + called after the second child was processed. + + `leaf' + The current node is a leaf. + + - Function: void twalk (const void *ROOT, __action_fn_t ACTION) + For each node in the tree with a node pointed to by ROOT, the + `twalk' function calls the function provided by the parameter + ACTION. For leaf nodes the function is called exactly once with + VALUE set to `leaf'. For internal nodes the function is called + three times, setting the VALUE parameter or ACTION to the + appropriate value. The LEVEL argument for the ACTION function is + computed while descending the tree with increasing the value by + one for the descend to a child, starting with the value 0 for the + root node. + + Since the functions used for the ACTION parameter to `twalk' must + not modify the tree data, it is safe to run `twalk' in more than + one thread at the same time, working on the same tree. It is also + safe to call `tfind' in parallel. Functions which modify the tree + must not be used, otherwise the behavior is undefined.  -File: libc.info, Node: Flags for Wordexp, Next: Wordexp Example, Prev: Calling Wordexp, Up: Word Expansion +File: libc.info, Node: Pattern Matching, Next: I/O Overview, Prev: Searching and Sorting, Up: Top -Flags for Word Expansion ------------------------- +Pattern Matching +**************** - This section describes the flags that you can specify in the FLAGS -argument to `wordexp'. Choose the flags you want, and combine them -with the C operator `|'. + The GNU C Library provides pattern matching facilities for two kinds +of patterns: regular expressions and file-name wildcards. The library +also provides a facility for expanding variable and command references +and parsing text into words in the way the shell does. -`WRDE_APPEND' - Append the words from this expansion to the vector of words - produced by previous calls to `wordexp'. This way you can - effectively expand several words as if they were concatenated with - spaces between them. +* Menu: - In order for appending to work, you must not modify the contents - of the word vector structure between calls to `wordexp'. And, if - you set `WRDE_DOOFFS' in the first call to `wordexp', you must also - set it when you append to the results. +* Wildcard Matching:: Matching a wildcard pattern against a single string. +* Globbing:: Finding the files that match a wildcard pattern. +* Regular Expressions:: Matching regular expressions against strings. +* Word Expansion:: Expanding shell variables, nested commands, + arithmetic, and wildcards. + This is what the shell does with shell commands. -`WRDE_DOOFFS' - Leave blank slots at the beginning of the vector of words. The - `we_offs' field says how many slots to leave. The blank slots - contain null pointers. + +File: libc.info, Node: Wildcard Matching, Next: Globbing, Up: Pattern Matching -`WRDE_NOCMD' - Don't do command substitution; if the input requests command - substitution, report an error. +Wildcard Matching +================= -`WRDE_REUSE' - Reuse a word vector made by a previous call to `wordexp'. Instead - of allocating a new vector of words, this call to `wordexp' will - use the vector that already exists (making it larger if necessary). + This section describes how to match a wildcard pattern against a +particular string. The result is a yes or no answer: does the string +fit the pattern or not. The symbols described here are all declared in +`fnmatch.h'. - Note that the vector may move, so it is not safe to save an old - pointer and use it again after calling `wordexp'. You must fetch - `we_pathv' anew after each call. + - Function: int fnmatch (const char *PATTERN, const char *STRING, int + FLAGS) + This function tests whether the string STRING matches the pattern + PATTERN. It returns `0' if they do match; otherwise, it returns + the nonzero value `FNM_NOMATCH'. The arguments PATTERN and STRING + are both strings. -`WRDE_SHOWERR' - Do show any error messages printed by commands run by command - substitution. More precisely, allow these commands to inherit the - standard error output stream of the current process. By default, - `wordexp' gives these commands a standard error stream that - discards all output. + The argument FLAGS is a combination of flag bits that alter the + details of matching. See below for a list of the defined flags. -`WRDE_UNDEF' - If the input refers to a shell variable that is not defined, - report an error. + In the GNU C Library, `fnmatch' cannot experience an "error"--it + always returns an answer for whether the match succeeds. However, + other implementations of `fnmatch' might sometimes report "errors". + They would do so by returning nonzero values that are not equal to + `FNM_NOMATCH'. - -File: libc.info, Node: Wordexp Example, Next: Tilde Expansion, Prev: Flags for Wordexp, Up: Word Expansion + These are the available flags for the FLAGS argument: -`wordexp' Example ------------------ +`FNM_FILE_NAME' + Treat the `/' character specially, for matching file names. If + this flag is set, wildcard constructs in PATTERN cannot match `/' + in STRING. Thus, the only way to match `/' is with an explicit + `/' in PATTERN. - Here is an example of using `wordexp' to expand several strings and -use the results to run a shell command. It also shows the use of -`WRDE_APPEND' to concatenate the expansions and of `wordfree' to free -the space allocated by `wordexp'. +`FNM_PATHNAME' + This is an alias for `FNM_FILE_NAME'; it comes from POSIX.2. We + don't recommend this name because we don't use the term "pathname" + for file names. - int - expand_and_execute (const char *program, const char *options) - { - wordexp_t result; - pid_t pid - int status, i; - - /* Expand the string for the program to run. */ - switch (wordexp (program, &result, 0)) - { - case 0: /* Successful. */ - break; - case WRDE_NOSPACE: - /* If the error was `WRDE_NOSPACE', - then perhaps part of the result was allocated. */ - wordfree (&result); - default: /* Some other error. */ - return -1; - } - - /* Expand the strings specified for the arguments. */ - for (i = 0; args[i]; i++) - { - if (wordexp (options, &result, WRDE_APPEND)) - { - wordfree (&result); - return -1; - } - } - - pid = fork (); - if (pid == 0) - { - /* This is the child process. Execute the command. */ - execv (result.we_wordv[0], result.we_wordv); - exit (EXIT_FAILURE); - } - else if (pid < 0) - /* The fork failed. Report failure. */ - status = -1; - else - /* This is the parent process. Wait for the child to complete. */ - if (waitpid (pid, &status, 0) != pid) - status = -1; - - wordfree (&result); - return status; - } +`FNM_PERIOD' + Treat the `.' character specially if it appears at the beginning of + STRING. If this flag is set, wildcard constructs in PATTERN + cannot match `.' as the first character of STRING. + + If you set both `FNM_PERIOD' and `FNM_FILE_NAME', then the special + treatment applies to `.' following `/' as well as to `.' at the + beginning of STRING. (The shell uses the `FNM_PERIOD' and + `FNM_FILE_NAME' flags together for matching file names.) + +`FNM_NOESCAPE' + Don't treat the `\' character specially in patterns. Normally, + `\' quotes the following character, turning off its special meaning + (if any) so that it matches only itself. When quoting is enabled, + the pattern `\?' matches only the string `?', because the question + mark in the pattern acts like an ordinary character. + + If you use `FNM_NOESCAPE', then `\' is an ordinary character. + +`FNM_LEADING_DIR' + Ignore a trailing sequence of characters starting with a `/' in + STRING; that is to say, test whether STRING starts with a + directory name that PATTERN matches. + + If this flag is set, either `foo*' or `foobar' as a pattern would + match the string `foobar/frobozz'. + +`FNM_CASEFOLD' + Ignore case in comparing STRING to PATTERN. + +`FNM_EXTMATCH' + Recognize beside the normal patterns also the extended patterns + introduced in `ksh'. The patterns are written in the form + explained in the following table where PATTERN-LIST is a `|' + separated list of patterns. + + `?(PATTERN-LIST)' + The pattern matches if zero or one occurrences of any of the + patterns in the PATTERN-LIST allow matching the input string. + + `*(PATTERN-LIST)' + The pattern matches if zero or more occurrences of any of the + patterns in the PATTERN-LIST allow matching the input string. + + `+(PATTERN-LIST)' + The pattern matches if one or more occurrences of any of the + patterns in the PATTERN-LIST allow matching the input string. + + `@(PATTERN-LIST)' + The pattern matches if exactly one occurrence of any of the + patterns in the PATTERN-LIST allows matching the input string. + + `!(PATTERN-LIST)' + The pattern matches if the input string cannot be matched + with any of the patterns in the PATTERN-LIST.  -File: libc.info, Node: Tilde Expansion, Next: Variable Substitution, Prev: Wordexp Example, Up: Word Expansion +File: libc.info, Node: Globbing, Next: Regular Expressions, Prev: Wildcard Matching, Up: Pattern Matching -Details of Tilde Expansion --------------------------- +Globbing +======== - It's a standard part of shell syntax that you can use `~' at the -beginning of a file name to stand for your own home directory. You can -use `~USER' to stand for USER's home directory. + The archetypal use of wildcards is for matching against the files in +a directory, and making a list of all the matches. This is called +"globbing". - "Tilde expansion" is the process of converting these abbreviations -to the directory names that they stand for. + You could do this using `fnmatch', by reading the directory entries +one by one and testing each one with `fnmatch'. But that would be slow +(and complex, since you would have to handle subdirectories by hand). - Tilde expansion applies to the `~' plus all following characters up -to whitespace or a slash. It takes place only at the beginning of a -word, and only if none of the characters to be transformed is quoted in -any way. + The library provides a function `glob' to make this particular use +of wildcards convenient. `glob' and the other symbols in this section +are declared in `glob.h'. - Plain `~' uses the value of the environment variable `HOME' as the -proper home directory name. `~' followed by a user name uses -`getpwname' to look up that user in the user database, and uses -whatever directory is recorded there. Thus, `~' followed by your own -name can give different results from plain `~', if the value of `HOME' -is not really your home directory. +* Menu: + +* Calling Glob:: Basic use of `glob'. +* Flags for Globbing:: Flags that enable various options in `glob'. +* More Flags for Globbing:: GNU specific extensions to `glob'.  -File: libc.info, Node: Variable Substitution, Prev: Tilde Expansion, Up: Word Expansion +File: libc.info, Node: Calling Glob, Next: Flags for Globbing, Up: Globbing -Details of Variable Substitution --------------------------------- +Calling `glob' +-------------- - Part of ordinary shell syntax is the use of `$VARIABLE' to -substitute the value of a shell variable into a command. This is called -"variable substitution", and it is one part of doing word expansion. + The result of globbing is a vector of file names (strings). To +return this vector, `glob' uses a special data type, `glob_t', which is +a structure. You pass `glob' the address of the structure, and it +fills in the structure's fields to tell you about the results. - There are two basic ways you can write a variable reference for -substitution: + - Data Type: glob_t + This data type holds a pointer to a word vector. More precisely, + it records both the address of the word vector and its size. The + GNU implementation contains some more fields which are non-standard + extensions. -`${VARIABLE}' - If you write braces around the variable name, then it is completely - unambiguous where the variable name ends. You can concatenate - additional letters onto the end of the variable value by writing - them immediately after the close brace. For example, `${foo}s' - expands into `tractors'. + `gl_pathc' + The number of elements in the vector, excluding the initial + null entries if the GLOB_DOOFFS flag is used (see gl_offs + below). -`$VARIABLE' - If you do not put braces around the variable name, then the - variable name consists of all the alphanumeric characters and - underscores that follow the `$'. The next punctuation character - ends the variable name. Thus, `$foo-bar' refers to the variable - `foo' and expands into `tractor-bar'. + `gl_pathv' + The address of the vector. This field has type `char **'. - When you use braces, you can also use various constructs to modify -the value that is substituted, or test it in various ways. + `gl_offs' + The offset of the first real element of the vector, from its + nominal address in the `gl_pathv' field. Unlike the other + fields, this is always an input to `glob', rather than an + output from it. -`${VARIABLE:-DEFAULT}' - Substitute the value of VARIABLE, but if that is empty or - undefined, use DEFAULT instead. + If you use a nonzero offset, then that many elements at the + beginning of the vector are left empty. (The `glob' function + fills them with null pointers.) -`${VARIABLE:=DEFAULT}' - Substitute the value of VARIABLE, but if that is empty or - undefined, use DEFAULT instead and set the variable to DEFAULT. + The `gl_offs' field is meaningful only if you use the + `GLOB_DOOFFS' flag. Otherwise, the offset is always zero + regardless of what is in this field, and the first real + element comes at the beginning of the vector. -`${VARIABLE:?MESSAGE}' - If VARIABLE is defined and not empty, substitute its value. + `gl_closedir' + The address of an alternative implementation of the `closedir' + function. It is used if the `GLOB_ALTDIRFUNC' bit is set in + the flag parameter. The type of this field is + `void (*) (void *)'. - Otherwise, print MESSAGE as an error message on the standard error - stream, and consider word expansion a failure. + This is a GNU extension. -`${VARIABLE:+REPLACEMENT}' - Substitute REPLACEMENT, but only if VARIABLE is defined and - nonempty. Otherwise, substitute nothing for this construct. + `gl_readdir' + The address of an alternative implementation of the `readdir' + function used to read the contents of a directory. It is + used if the `GLOB_ALTDIRFUNC' bit is set in the flag + parameter. The type of this field is + `struct dirent *(*) (void *)'. -`${#VARIABLE}' - Substitute a numeral which expresses in base ten the number of - characters in the value of VARIABLE. `${#foo}' stands for `7', - because `tractor' is seven characters. + This is a GNU extension. - These variants of variable substitution let you remove part of the -variable's value before substituting it. The PREFIX and SUFFIX are not -mere strings; they are wildcard patterns, just like the patterns that -you use to match multiple file names. But in this context, they match -against parts of the variable value rather than against file names. + `gl_opendir' + The address of an alternative implementation of the `opendir' + function. It is used if the `GLOB_ALTDIRFUNC' bit is set in + the flag parameter. The type of this field is + `void *(*) (const char *)'. -`${VARIABLE%%SUFFIX}' - Substitute the value of VARIABLE, but first discard from that - variable any portion at the end that matches the pattern SUFFIX. + This is a GNU extension. - If there is more than one alternative for how to match against - SUFFIX, this construct uses the longest possible match. + `gl_stat' + The address of an alternative implementation of the `stat' + function to get information about an object in the + filesystem. It is used if the `GLOB_ALTDIRFUNC' bit is set + in the flag parameter. The type of this field is + `int (*) (const char *, struct stat *)'. - Thus, `${foo%%r*}' substitutes `t', because the largest match for - `r*' at the end of `tractor' is `ractor'. + This is a GNU extension. -`${VARIABLE%SUFFIX}' - Substitute the value of VARIABLE, but first discard from that - variable any portion at the end that matches the pattern SUFFIX. + `gl_lstat' + The address of an alternative implementation of the `lstat' + function to get information about an object in the + filesystems, not following symbolic links. It is used if the + `GLOB_ALTDIRFUNC' bit is set in the flag parameter. The type + of this field is `int (*) (const char *, struct stat *)'. - If there is more than one alternative for how to match against - SUFFIX, this construct uses the shortest possible alternative. + This is a GNU extension. - Thus, `${foo%%r*}' substitutes `tracto', because the shortest - match for `r*' at the end of `tractor' is just `r'. + For use in the `glob64' function `glob.h' contains another +definition for a very similar type. `glob64_t' differs from `glob_t' +only in the types of the members `gl_readdir', `gl_stat', and +`gl_lstat'. -`${VARIABLE##PREFIX}' - Substitute the value of VARIABLE, but first discard from that - variable any portion at the beginning that matches the pattern - PREFIX. + - Data Type: glob64_t + This data type holds a pointer to a word vector. More precisely, + it records both the address of the word vector and its size. The + GNU implementation contains some more fields which are non-standard + extensions. - If there is more than one alternative for how to match against - PREFIX, this construct uses the longest possible match. + `gl_pathc' + The number of elements in the vector, excluding the initial + null entries if the GLOB_DOOFFS flag is used (see gl_offs + below). - Thus, `${foo%%r*}' substitutes `t', because the largest match for - `r*' at the end of `tractor' is `ractor'. + `gl_pathv' + The address of the vector. This field has type `char **'. -`${VARIABLE#PREFIX}' - Substitute the value of VARIABLE, but first discard from that - variable any portion at the beginning that matches the pattern - PREFIX. + `gl_offs' + The offset of the first real element of the vector, from its + nominal address in the `gl_pathv' field. Unlike the other + fields, this is always an input to `glob', rather than an + output from it. - If there is more than one alternative for how to match against - PREFIX, this construct uses the shortest possible alternative. + If you use a nonzero offset, then that many elements at the + beginning of the vector are left empty. (The `glob' function + fills them with null pointers.) - Thus, `${foo%%r*}' substitutes `tracto', because the shortest - match for `r*' at the end of `tractor' is just `r'. + The `gl_offs' field is meaningful only if you use the + `GLOB_DOOFFS' flag. Otherwise, the offset is always zero + regardless of what is in this field, and the first real + element comes at the beginning of the vector. - -File: libc.info, Node: I/O Overview, Next: I/O on Streams, Prev: Pattern Matching, Up: Top + `gl_closedir' + The address of an alternative implementation of the `closedir' + function. It is used if the `GLOB_ALTDIRFUNC' bit is set in + the flag parameter. The type of this field is + `void (*) (void *)'. -Input/Output Overview -********************* + This is a GNU extension. - Most programs need to do either input (reading data) or output -(writing data), or most frequently both, in order to do anything -useful. The GNU C library provides such a large selection of input and -output functions that the hardest part is often deciding which function -is most appropriate! + `gl_readdir' + The address of an alternative implementation of the + `readdir64' function used to read the contents of a + directory. It is used if the `GLOB_ALTDIRFUNC' bit is set in + the flag parameter. The type of this field is + `struct dirent64 *(*) (void *)'. - This chapter introduces concepts and terminology relating to input -and output. Other chapters relating to the GNU I/O facilities are: + This is a GNU extension. - * *Note I/O on Streams::, which covers the high-level functions that - operate on streams, including formatted input and output. + `gl_opendir' + The address of an alternative implementation of the `opendir' + function. It is used if the `GLOB_ALTDIRFUNC' bit is set in + the flag parameter. The type of this field is + `void *(*) (const char *)'. - * *Note Low-Level I/O::, which covers the basic I/O and control - functions on file descriptors. + This is a GNU extension. - * *Note File System Interface::, which covers functions for - operating on directories and for manipulating file attributes such - as access modes and ownership. + `gl_stat' + The address of an alternative implementation of the `stat64' + function to get information about an object in the + filesystem. It is used if the `GLOB_ALTDIRFUNC' bit is set + in the flag parameter. The type of this field is + `int (*) (const char *, struct stat64 *)'. - * *Note Pipes and FIFOs::, which includes information on the basic - interprocess communication facilities. + This is a GNU extension. - * *Note Sockets::, which covers a more complicated interprocess - communication facility with support for networking. + `gl_lstat' + The address of an alternative implementation of the `lstat64' + function to get information about an object in the + filesystems, not following symbolic links. It is used if the + `GLOB_ALTDIRFUNC' bit is set in the flag parameter. The type + of this field is `int (*) (const char *, struct stat64 *)'. - * *Note Low-Level Terminal Interface::, which covers functions for - changing how input and output to terminals or other serial devices - are processed. + This is a GNU extension. -* Menu: + - Function: int glob (const char *PATTERN, int FLAGS, int (*ERRFUNC) + (const char *FILENAME, int ERROR-CODE), glob_t *VECTOR-PTR) + The function `glob' does globbing using the pattern PATTERN in the + current directory. It puts the result in a newly allocated + vector, and stores the size and address of this vector into + `*VECTOR-PTR'. The argument FLAGS is a combination of bit flags; + see *Note Flags for Globbing::, for details of the flags. -* I/O Concepts:: Some basic information and terminology. -* File Names:: How to refer to a file. + The result of globbing is a sequence of file names. The function + `glob' allocates a string for each resulting word, then allocates + a vector of type `char **' to store the addresses of these + strings. The last element of the vector is a null pointer. This + vector is called the "word vector". - -File: libc.info, Node: I/O Concepts, Next: File Names, Up: I/O Overview + To return this vector, `glob' stores both its address and its + length (number of elements, not counting the terminating null + pointer) into `*VECTOR-PTR'. -Input/Output Concepts -===================== + Normally, `glob' sorts the file names alphabetically before + returning them. You can turn this off with the flag `GLOB_NOSORT' + if you want to get the information as fast as possible. Usually + it's a good idea to let `glob' sort them--if you process the files + in alphabetical order, the users will have a feel for the rate of + progress that your application is making. - Before you can read or write the contents of a file, you must -establish a connection or communications channel to the file. This -process is called "opening" the file. You can open a file for reading, -writing, or both. + If `glob' succeeds, it returns 0. Otherwise, it returns one of + these error codes: - The connection to an open file is represented either as a stream or -as a file descriptor. You pass this as an argument to the functions -that do the actual read or write operations, to tell them which file to -operate on. Certain functions expect streams, and others are designed -to operate on file descriptors. + `GLOB_ABORTED' + There was an error opening a directory, and you used the flag + `GLOB_ERR' or your specified ERRFUNC returned a nonzero value. + *Note Flags for Globbing::, for an explanation of the + `GLOB_ERR' flag and ERRFUNC. - When you have finished reading to or writing from the file, you can -terminate the connection by "closing" the file. Once you have closed a -stream or file descriptor, you cannot do any more input or output -operations on it. + `GLOB_NOMATCH' + The pattern didn't match any existing files. If you use the + `GLOB_NOCHECK' flag, then you never get this error code, + because that flag tells `glob' to _pretend_ that the pattern + matched at least one file. -* Menu: + `GLOB_NOSPACE' + It was impossible to allocate memory to hold the result. -* Streams and File Descriptors:: The GNU Library provides two ways - to access the contents of files. -* File Position:: The number of bytes from the - beginning of the file. + In the event of an error, `glob' stores information in + `*VECTOR-PTR' about all the matches it has found so far. + + It is important to notice that the `glob' function will not fail if + it encounters directories or files which cannot be handled without + the LFS interfaces. The implementation of `glob' is supposed to + use these functions internally. This at least is the assumptions + made by the Unix standard. The GNU extension of allowing the user + to provide own directory handling and `stat' functions complicates + things a bit. If these callback functions are used and a large + file or directory is encountered `glob' _can_ fail. + + - Function: int glob64 (const char *PATTERN, int FLAGS, int (*ERRFUNC) + (const char *FILENAME, int ERROR-CODE), glob64_t *VECTOR-PTR) + The `glob64' function was added as part of the Large File Summit + extensions but is not part of the original LFS proposal. The + reason for this is simple: it is not necessary. The necessity for + a `glob64' function is added by the extensions of the GNU `glob' + implementation which allows the user to provide own directory + handling and `stat' functions. The `readdir' and `stat' functions + do depend on the choice of `_FILE_OFFSET_BITS' since the definition + of the types `struct dirent' and `struct stat' will change + depending on the choice. + + Beside this difference the `glob64' works just like `glob' in all + aspects. + + This function is a GNU extension.  -File: libc.info, Node: Streams and File Descriptors, Next: File Position, Up: I/O Concepts +File: libc.info, Node: Flags for Globbing, Next: More Flags for Globbing, Prev: Calling Glob, Up: Globbing -Streams and File Descriptors ----------------------------- +Flags for Globbing +------------------ - When you want to do input or output to a file, you have a choice of -two basic mechanisms for representing the connection between your -program and the file: file descriptors and streams. File descriptors -are represented as objects of type `int', while streams are represented -as `FILE *' objects. + This section describes the flags that you can specify in the FLAGS +argument to `glob'. Choose the flags you want, and combine them with +the C bitwise OR operator `|'. - File descriptors provide a primitive, low-level interface to input -and output operations. Both file descriptors and streams can represent -a connection to a device (such as a terminal), or a pipe or socket for -communicating with another process, as well as a normal file. But, if -you want to do control operations that are specific to a particular kind -of device, you must use a file descriptor; there are no facilities to -use streams in this way. You must also use file descriptors if your -program needs to do input or output in special modes, such as -nonblocking (or polled) input (*note File Status Flags::). +`GLOB_APPEND' + Append the words from this expansion to the vector of words + produced by previous calls to `glob'. This way you can + effectively expand several words as if they were concatenated with + spaces between them. - Streams provide a higher-level interface, layered on top of the -primitive file descriptor facilities. The stream interface treats all -kinds of files pretty much alike--the sole exception being the three -styles of buffering that you can choose (*note Stream Buffering::). + In order for appending to work, you must not modify the contents + of the word vector structure between calls to `glob'. And, if you + set `GLOB_DOOFFS' in the first call to `glob', you must also set + it when you append to the results. - The main advantage of using the stream interface is that the set of -functions for performing actual input and output operations (as opposed -to control operations) on streams is much richer and more powerful than -the corresponding facilities for file descriptors. The file descriptor -interface provides only simple functions for transferring blocks of -characters, but the stream interface also provides powerful formatted -input and output functions (`printf' and `scanf') as well as functions -for character- and line-oriented input and output. + Note that the pointer stored in `gl_pathv' may no longer be valid + after you call `glob' the second time, because `glob' might have + relocated the vector. So always fetch `gl_pathv' from the + `glob_t' structure after each `glob' call; *never* save the + pointer across calls. - Since streams are implemented in terms of file descriptors, you can -extract the file descriptor from a stream and perform low-level -operations directly on the file descriptor. You can also initially open -a connection as a file descriptor and then make a stream associated with -that file descriptor. +`GLOB_DOOFFS' + Leave blank slots at the beginning of the vector of words. The + `gl_offs' field says how many slots to leave. The blank slots + contain null pointers. - In general, you should stick with using streams rather than file -descriptors, unless there is some specific operation you want to do that -can only be done on a file descriptor. If you are a beginning -programmer and aren't sure what functions to use, we suggest that you -concentrate on the formatted input functions (*note Formatted Input::) -and formatted output functions (*note Formatted Output::). +`GLOB_ERR' + Give up right away and report an error if there is any difficulty + reading the directories that must be read in order to expand + PATTERN fully. Such difficulties might include a directory in + which you don't have the requisite access. Normally, `glob' tries + its best to keep on going despite any errors, reading whatever + directories it can. - If you are concerned about portability of your programs to systems -other than GNU, you should also be aware that file descriptors are not -as portable as streams. You can expect any system running ISO C to -support streams, but non-GNU systems may not support file descriptors at -all, or may only implement a subset of the GNU functions that operate on -file descriptors. Most of the file descriptor functions in the GNU -library are included in the POSIX.1 standard, however. + You can exercise even more control than this by specifying an + error-handler function ERRFUNC when you call `glob'. If ERRFUNC + is not a null pointer, then `glob' doesn't give up right away when + it can't read a directory; instead, it calls ERRFUNC with two + arguments, like this: - -File: libc.info, Node: File Position, Prev: Streams and File Descriptors, Up: I/O Concepts + (*ERRFUNC) (FILENAME, ERROR-CODE) -File Position -------------- + The argument FILENAME is the name of the directory that `glob' + couldn't open or couldn't read, and ERROR-CODE is the `errno' + value that was reported to `glob'. - One of the attributes of an open file is its "file position" that -keeps track of where in the file the next character is to be read or -written. In the GNU system, and all POSIX.1 systems, the file position -is simply an integer representing the number of bytes from the beginning -of the file. + If the error handler function returns nonzero, then `glob' gives up + right away. Otherwise, it continues. - The file position is normally set to the beginning of the file when -it is opened, and each time a character is read or written, the file -position is incremented. In other words, access to the file is normally -"sequential". +`GLOB_MARK' + If the pattern matches the name of a directory, append `/' to the + directory's name when returning it. - Ordinary files permit read or write operations at any position within -the file. Some other kinds of files may also permit this. Files which -do permit this are sometimes referred to as "random-access" files. You -can change the file position using the `fseek' function on a stream -(*note File Positioning::) or the `lseek' function on a file descriptor -(*note I/O Primitives::). If you try to change the file position on a -file that doesn't support random access, you get the `ESPIPE' error. +`GLOB_NOCHECK' + If the pattern doesn't match any file names, return the pattern + itself as if it were a file name that had been matched. + (Normally, when the pattern doesn't match anything, `glob' returns + that there were no matches.) - Streams and descriptors that are opened for "append access" are -treated specially for output: output to such files is _always_ appended -sequentially to the _end_ of the file, regardless of the file position. -However, the file position is still used to control where in the file -reading is done. +`GLOB_NOSORT' + Don't sort the file names; return them in no particular order. + (In practice, the order will depend on the order of the entries in + the directory.) The only reason _not_ to sort is to save time. - If you think about it, you'll realize that several programs can read -a given file at the same time. In order for each program to be able to -read the file at its own pace, each program must have its own file -pointer, which is not affected by anything the other programs do. +`GLOB_NOESCAPE' + Don't treat the `\' character specially in patterns. Normally, + `\' quotes the following character, turning off its special meaning + (if any) so that it matches only itself. When quoting is enabled, + the pattern `\?' matches only the string `?', because the question + mark in the pattern acts like an ordinary character. - In fact, each opening of a file creates a separate file position. -Thus, if you open a file twice even in the same program, you get two -streams or descriptors with independent file positions. + If you use `GLOB_NOESCAPE', then `\' is an ordinary character. - By contrast, if you open a descriptor and then duplicate it to get -another descriptor, these two descriptors share the same file position: -changing the file position of one descriptor will affect the other. + `glob' does its work by calling the function `fnmatch' repeatedly. + It handles the flag `GLOB_NOESCAPE' by turning on the + `FNM_NOESCAPE' flag in calls to `fnmatch'.  -File: libc.info, Node: File Names, Prev: I/O Concepts, Up: I/O Overview +File: libc.info, Node: More Flags for Globbing, Prev: Flags for Globbing, Up: Globbing -File Names -========== +More Flags for Globbing +----------------------- - In order to open a connection to a file, or to perform other -operations such as deleting a file, you need some way to refer to the -file. Nearly all files have names that are strings--even files which -are actually devices such as tape drives or terminals. These strings -are called "file names". You specify the file name to say which file -you want to open or operate on. + Beside the flags described in the last section, the GNU +implementation of `glob' allows a few more flags which are also defined +in the `glob.h' file. Some of the extensions implement functionality +which is available in modern shell implementations. - This section describes the conventions for file names and how the -operating system works with them. +`GLOB_PERIOD' + The `.' character (period) is treated special. It cannot be + matched by wildcards. *Note Wildcard Matching::, `FNM_PERIOD'. -* Menu: +`GLOB_MAGCHAR' + The `GLOB_MAGCHAR' value is not to be given to `glob' in the FLAGS + parameter. Instead, `glob' sets this bit in the GL_FLAGS element + of the GLOB_T structure provided as the result if the pattern used + for matching contains any wildcard character. -* Directories:: Directories contain entries for files. -* File Name Resolution:: A file name specifies how to look up a file. -* File Name Errors:: Error conditions relating to file names. -* File Name Portability:: File name portability and syntax issues. +`GLOB_ALTDIRFUNC' + Instead of the using the using the normal functions for accessing + the filesystem the `glob' implementation uses the user-supplied + functions specified in the structure pointed to by PGLOB + parameter. For more information about the functions refer to the + sections about directory handling see *Note Accessing + Directories::, and *Note Reading Attributes::. - -File: libc.info, Node: Directories, Next: File Name Resolution, Up: File Names +`GLOB_BRACE' + If this flag is given the handling of braces in the pattern is + changed. It is now required that braces appear correctly grouped. + I.e., for each opening brace there must be a closing one. Braces + can be used recursively. So it is possible to define one brace + expression in another one. It is important to note that the range + of each brace expression is completely contained in the outer + brace expression (if there is one). -Directories ------------ + The string between the matching braces is separated into single + expressions by splitting at `,' (comma) characters. The commas + themselves are discarded. Please note what we said above about + recursive brace expressions. The commas used to separate the + subexpressions must be at the same level. Commas in brace + subexpressions are not matched. They are used during expansion of + the brace expression of the deeper level. The example below shows + this - In order to understand the syntax of file names, you need to -understand how the file system is organized into a hierarchy of -directories. + glob ("{foo/{,bar,biz},baz}", GLOB_BRACE, NULL, &result) - A "directory" is a file that contains information to associate other -files with names; these associations are called "links" or "directory -entries". Sometimes, people speak of "files in a directory", but in -reality, a directory only contains pointers to files, not the files -themselves. + is equivalent to the sequence - The name of a file contained in a directory entry is called a "file -name component". In general, a file name consists of a sequence of one -or more such components, separated by the slash character (`/'). A -file name which is just one component names a file with respect to its -directory. A file name with multiple components names a directory, and -then a file in that directory, and so on. + glob ("foo/", GLOB_BRACE, NULL, &result) + glob ("foo/bar", GLOB_BRACE|GLOB_APPEND, NULL, &result) + glob ("foo/biz", GLOB_BRACE|GLOB_APPEND, NULL, &result) + glob ("baz", GLOB_BRACE|GLOB_APPEND, NULL, &result) - Some other documents, such as the POSIX standard, use the term -"pathname" for what we call a file name, and either "filename" or -"pathname component" for what this manual calls a file name component. -We don't use this terminology because a "path" is something completely -different (a list of directories to search), and we think that -"pathname" used for something else will confuse users. We always use -"file name" and "file name component" (or sometimes just "component", -where the context is obvious) in GNU documentation. Some macros use -the POSIX terminology in their names, such as `PATH_MAX'. These macros -are defined by the POSIX standard, so we cannot change their names. + if we leave aside error handling. - You can find more detailed information about operations on -directories in *Note File System Interface::. +`GLOB_NOMAGIC' + If the pattern contains no wildcard constructs (it is a literal + file name), return it as the sole "matching" word, even if no file + exists by that name. - -File: libc.info, Node: File Name Resolution, Next: File Name Errors, Prev: Directories, Up: File Names +`GLOB_TILDE' + If this flag is used the character `~' (tilde) is handled special + if it appears at the beginning of the pattern. Instead of being + taken verbatim it is used to represent the home directory of a + known user. -File Name Resolution --------------------- + If `~' is the only character in pattern or it is followed by a `/' + (slash), the home directory of the process owner is substituted. + Using `getlogin' and `getpwnam' the information is read from the + system databases. As an example take user `bart' with his home + directory at `/home/bart'. For him a call like - A file name consists of file name components separated by slash -(`/') characters. On the systems that the GNU C library supports, -multiple successive `/' characters are equivalent to a single `/' -character. + glob ("~/bin/*", GLOB_TILDE, NULL, &result) - The process of determining what file a file name refers to is called -"file name resolution". This is performed by examining the components -that make up a file name in left-to-right order, and locating each -successive component in the directory named by the previous component. -Of course, each of the files that are referenced as directories must -actually exist, be directories instead of regular files, and have the -appropriate permissions to be accessible by the process; otherwise the -file name resolution fails. + would return the contents of the directory `/home/bart/bin'. + Instead of referring to the own home directory it is also possible + to name the home directory of other users. To do so one has to + append the user name after the tilde character. So the contents + of user `homer''s `bin' directory can be retrieved by - If a file name begins with a `/', the first component in the file -name is located in the "root directory" of the process (usually all -processes on the system have the same root directory). Such a file name -is called an "absolute file name". + glob ("~homer/bin/*", GLOB_TILDE, NULL, &result) - Otherwise, the first component in the file name is located in the -current working directory (*note Working Directory::). This kind of -file name is called a "relative file name". + If the user name is not valid or the home directory cannot be + determined for some reason the pattern is left untouched and + itself used as the result. I.e., if in the last example `home' is + not available the tilde expansion yields to `"~homer/bin/*"' and + `glob' is not looking for a directory named `~homer'. - The file name components `.' ("dot") and `..' ("dot-dot") have -special meanings. Every directory has entries for these file name -components. The file name component `.' refers to the directory -itself, while the file name component `..' refers to its "parent -directory" (the directory that contains the link for the directory in -question). As a special case, `..' in the root directory refers to the -root directory itself, since it has no parent; thus `/..' is the same -as `/'. + This functionality is equivalent to what is available in C-shells + if the `nonomatch' flag is set. - Here are some examples of file names: +`GLOB_TILDE_CHECK' + If this flag is used `glob' behaves like as if `GLOB_TILDE' is + given. The only difference is that if the user name is not + available or the home directory cannot be determined for other + reasons this leads to an error. `glob' will return `GLOB_NOMATCH' + instead of using the pattern itself as the name. -`/a' - The file named `a', in the root directory. + This functionality is equivalent to what is available in C-shells + if `nonomatch' flag is not set. -`/a/b' - The file named `b', in the directory named `a' in the root - directory. +`GLOB_ONLYDIR' + If this flag is used the globbing function takes this as a *hint* + that the caller is only interested in directories matching the + pattern. If the information about the type of the file is easily + available non-directories will be rejected but no extra work will + be done to determine the information for each file. I.e., the + caller must still be able to filter directories out. -`a' - The file named `a', in the current working directory. + This functionality is only available with the GNU `glob' + implementation. It is mainly used internally to increase the + performance but might be useful for a user as well and therefore is + documented here. -`/a/./b' - This is the same as `/a/b'. + Calling `glob' will in most cases allocate resources which are used +to represent the result of the function call. If the same object of +type `glob_t' is used in multiple call to `glob' the resources are +freed or reused so that no leaks appear. But this does not include the +time when all `glob' calls are done. -`./a' - The file named `a', in the current working directory. + - Function: void globfree (glob_t *PGLOB) + The `globfree' function frees all resources allocated by previous + calls to `glob' associated with the object pointed to by PGLOB. + This function should be called whenever the currently used + `glob_t' typed object isn't used anymore. -`../a' - The file named `a', in the parent directory of the current working - directory. + - Function: void globfree64 (glob64_t *PGLOB) + This function is equivalent to `globfree' but it frees records of + type `glob64_t' which were allocated by `glob64'. - A file name that names a directory may optionally end in a `/'. You -can specify a file name of `/' to refer to the root directory, but the -empty string is not a meaningful file name. If you want to refer to -the current working directory, use a file name of `.' or `./'. + +File: libc.info, Node: Regular Expressions, Next: Word Expansion, Prev: Globbing, Up: Pattern Matching - Unlike some other operating systems, the GNU system doesn't have any -built-in support for file types (or extensions) or file versions as part -of its file name syntax. Many programs and utilities use conventions -for file names--for example, files containing C source code usually -have names suffixed with `.c'--but there is nothing in the file system -itself that enforces this kind of convention. +Regular Expression Matching +=========================== + + The GNU C library supports two interfaces for matching regular +expressions. One is the standard POSIX.2 interface, and the other is +what the GNU system has had for many years. + + Both interfaces are declared in the header file `regex.h'. If you +define `_POSIX_C_SOURCE', then only the POSIX.2 functions, structures, +and constants are declared. + +* Menu: + +* POSIX Regexp Compilation:: Using `regcomp' to prepare to match. +* Flags for POSIX Regexps:: Syntax variations for `regcomp'. +* Matching POSIX Regexps:: Using `regexec' to match the compiled + pattern that you get from `regcomp'. +* Regexp Subexpressions:: Finding which parts of the string were matched. +* Subexpression Complications:: Find points of which parts were matched. +* Regexp Cleanup:: Freeing storage; reporting errors.  -File: libc.info, Node: File Name Errors, Next: File Name Portability, Prev: File Name Resolution, Up: File Names +File: libc.info, Node: POSIX Regexp Compilation, Next: Flags for POSIX Regexps, Up: Regular Expressions -File Name Errors ----------------- +POSIX Regular Expression Compilation +------------------------------------ - Functions that accept file name arguments usually detect these -`errno' error conditions relating to the file name syntax or trouble -finding the named file. These errors are referred to throughout this -manual as the "usual file name errors". + Before you can actually match a regular expression, you must +"compile" it. This is not true compilation--it produces a special data +structure, not machine instructions. But it is like ordinary +compilation in that its purpose is to enable you to "execute" the +pattern fast. (*Note Matching POSIX Regexps::, for how to use the +compiled regular expression for matching.) -`EACCES' - The process does not have search permission for a directory - component of the file name. + There is a special data type for compiled regular expressions: -`ENAMETOOLONG' - This error is used when either the total length of a file name is - greater than `PATH_MAX', or when an individual file name component - has a length greater than `NAME_MAX'. *Note Limits for Files::. + - Data Type: regex_t + This type of object holds a compiled regular expression. It is + actually a structure. It has just one field that your programs + should look at: - In the GNU system, there is no imposed limit on overall file name - length, but some file systems may place limits on the length of a - component. + `re_nsub' + This field holds the number of parenthetical subexpressions + in the regular expression that was compiled. -`ENOENT' - This error is reported when a file referenced as a directory - component in the file name doesn't exist, or when a component is a - symbolic link whose target file does not exist. *Note Symbolic - Links::. + There are several other fields, but we don't describe them here, + because only the functions in the library should use them. -`ENOTDIR' - A file that is referenced as a directory component in the file name - exists, but it isn't a directory. + After you create a `regex_t' object, you can compile a regular +expression into it by calling `regcomp'. -`ELOOP' - Too many symbolic links were resolved while trying to look up the - file name. The system has an arbitrary limit on the number of - symbolic links that may be resolved in looking up a single file - name, as a primitive way to detect loops. *Note Symbolic Links::. + - Function: int regcomp (regex_t *COMPILED, const char *PATTERN, int + CFLAGS) + The function `regcomp' "compiles" a regular expression into a data + structure that you can use with `regexec' to match against a + string. The compiled regular expression format is designed for + efficient matching. `regcomp' stores it into `*COMPILED'. - -File: libc.info, Node: File Name Portability, Prev: File Name Errors, Up: File Names + It's up to you to allocate an object of type `regex_t' and pass its + address to `regcomp'. -Portability of File Names -------------------------- + The argument CFLAGS lets you specify various options that control + the syntax and semantics of regular expressions. *Note Flags for + POSIX Regexps::. - The rules for the syntax of file names discussed in *Note File -Names::, are the rules normally used by the GNU system and by other -POSIX systems. However, other operating systems may use other -conventions. + If you use the flag `REG_NOSUB', then `regcomp' omits from the + compiled regular expression the information necessary to record + how subexpressions actually match. In this case, you might as well + pass `0' for the MATCHPTR and NMATCH arguments when you call + `regexec'. - There are two reasons why it can be important for you to be aware of -file name portability issues: + If you don't use `REG_NOSUB', then the compiled regular expression + does have the capacity to record how subexpressions match. Also, + `regcomp' tells you how many subexpressions PATTERN has, by + storing the number in `COMPILED->re_nsub'. You can use that value + to decide how long an array to allocate to hold information about + subexpression matches. - * If your program makes assumptions about file name syntax, or - contains embedded literal file name strings, it is more difficult - to get it to run under other operating systems that use different - syntax conventions. + `regcomp' returns `0' if it succeeds in compiling the regular + expression; otherwise, it returns a nonzero error code (see the + table below). You can use `regerror' to produce an error message + string describing the reason for a nonzero value; see *Note Regexp + Cleanup::. - * Even if you are not concerned about running your program on - machines that run other operating systems, it may still be - possible to access files that use different naming conventions. - For example, you may be able to access file systems on another - computer running a different operating system over a network, or - read and write disks in formats used by other operating systems. - The ISO C standard says very little about file name syntax, only that -file names are strings. In addition to varying restrictions on the -length of file names and what characters can validly appear in a file -name, different operating systems use different conventions and syntax -for concepts such as structured directories and file types or -extensions. Some concepts such as file versions might be supported in -some operating systems and not by others. + Here are the possible nonzero values that `regcomp' can return: - The POSIX.1 standard allows implementations to put additional -restrictions on file name syntax, concerning what characters are -permitted in file names and on the length of file name and file name -component strings. However, in the GNU system, you do not need to worry -about these restrictions; any character except the null character is -permitted in a file name string, and there are no limits on the length -of file name strings. +`REG_BADBR' + There was an invalid `\{...\}' construct in the regular + expression. A valid `\{...\}' construct must contain either a + single number, or two numbers in increasing order separated by a + comma. - -File: libc.info, Node: I/O on Streams, Next: Low-Level I/O, Prev: I/O Overview, Up: Top +`REG_BADPAT' + There was a syntax error in the regular expression. -Input/Output on Streams -*********************** +`REG_BADRPT' + A repetition operator such as `?' or `*' appeared in a bad + position (with no preceding subexpression to act on). - This chapter describes the functions for creating streams and -performing input and output operations on them. As discussed in *Note -I/O Overview::, a stream is a fairly abstract, high-level concept -representing a communications channel to a file, device, or process. +`REG_ECOLLATE' + The regular expression referred to an invalid collating element + (one not defined in the current locale for string collation). + *Note Locale Categories::. -* Menu: +`REG_ECTYPE' + The regular expression referred to an invalid character class name. -* Streams:: About the data type representing a stream. -* Standard Streams:: Streams to the standard input and output - devices are created for you. -* Opening Streams:: How to create a stream to talk to a file. -* Closing Streams:: Close a stream when you are finished with it. -* Streams and Threads:: Issues with streams in threaded programs. -* Streams and I18N:: Streams in internationalized applications. -* Simple Output:: Unformatted output by characters and lines. -* Character Input:: Unformatted input by characters and words. -* Line Input:: Reading a line or a record from a stream. -* Unreading:: Peeking ahead/pushing back input just read. -* Block Input/Output:: Input and output operations on blocks of data. -* Formatted Output:: `printf' and related functions. -* Customizing Printf:: You can define new conversion specifiers for - `printf' and friends. -* Formatted Input:: `scanf' and related functions. -* EOF and Errors:: How you can tell if an I/O error happens. -* Error Recovery:: What you can do about errors. -* Binary Streams:: Some systems distinguish between text files - and binary files. -* File Positioning:: About random-access streams. -* Portable Positioning:: Random access on peculiar ISO C systems. -* Stream Buffering:: How to control buffering of streams. -* Other Kinds of Streams:: Streams that do not necessarily correspond - to an open file. -* Formatted Messages:: Print strictly formatted messages. +`REG_EESCAPE' + The regular expression ended with `\'. + +`REG_ESUBREG' + There was an invalid number in the `\DIGIT' construct. + +`REG_EBRACK' + There were unbalanced square brackets in the regular expression. + +`REG_EPAREN' + An extended regular expression had unbalanced parentheses, or a + basic regular expression had unbalanced `\(' and `\)'. + +`REG_EBRACE' + The regular expression had unbalanced `\{' and `\}'. + +`REG_ERANGE' + One of the endpoints in a range expression was invalid. + +`REG_ESPACE' + `regcomp' ran out of memory.  -File: libc.info, Node: Streams, Next: Standard Streams, Up: I/O on Streams +File: libc.info, Node: Flags for POSIX Regexps, Next: Matching POSIX Regexps, Prev: POSIX Regexp Compilation, Up: Regular Expressions -Streams -======= +Flags for POSIX Regular Expressions +----------------------------------- - For historical reasons, the type of the C data structure that -represents a stream is called `FILE' rather than "stream". Since most -of the library functions deal with objects of type `FILE *', sometimes -the term "file pointer" is also used to mean "stream". This leads to -unfortunate confusion over terminology in many books on C. This -manual, however, is careful to use the terms "file" and "stream" only -in the technical sense. + These are the bit flags that you can use in the CFLAGS operand when +compiling a regular expression with `regcomp'. - The `FILE' type is declared in the header file `stdio.h'. +`REG_EXTENDED' + Treat the pattern as an extended regular expression, rather than + as a basic regular expression. - - Data Type: FILE - This is the data type used to represent stream objects. A `FILE' - object holds all of the internal state information about the - connection to the associated file, including such things as the - file position indicator and buffering information. Each stream - also has error and end-of-file status indicators that can be - tested with the `ferror' and `feof' functions; see *Note EOF and - Errors::. +`REG_ICASE' + Ignore case when matching letters. - `FILE' objects are allocated and managed internally by the -input/output library functions. Don't try to create your own objects of -type `FILE'; let the library do it. Your programs should deal only -with pointers to these objects (that is, `FILE *' values) rather than -the objects themselves. +`REG_NOSUB' + Don't bother storing the contents of the MATCHES-PTR array. + +`REG_NEWLINE' + Treat a newline in STRING as dividing STRING into multiple lines, + so that `$' can match before the newline and `^' can match after. + Also, don't permit `.' to match a newline, and don't permit + `[^...]' to match a newline. + + Otherwise, newline acts like any other ordinary character.  -File: libc.info, Node: Standard Streams, Next: Opening Streams, Prev: Streams, Up: I/O on Streams +File: libc.info, Node: Matching POSIX Regexps, Next: Regexp Subexpressions, Prev: Flags for POSIX Regexps, Up: Regular Expressions -Standard Streams -================ +Matching a Compiled POSIX Regular Expression +-------------------------------------------- - When the `main' function of your program is invoked, it already has -three predefined streams open and available for use. These represent -the "standard" input and output channels that have been established for -the process. + Once you have compiled a regular expression, as described in *Note +POSIX Regexp Compilation::, you can match it against strings using +`regexec'. A match anywhere inside the string counts as success, +unless the regular expression contains anchor characters (`^' or `$'). - These streams are declared in the header file `stdio.h'. + - Function: int regexec (regex_t *COMPILED, char *STRING, size_t + NMATCH, regmatch_t MATCHPTR [], int EFLAGS) + This function tries to match the compiled regular expression + `*COMPILED' against STRING. - - Variable: FILE * stdin - The "standard input" stream, which is the normal source of input - for the program. + `regexec' returns `0' if the regular expression matches; + otherwise, it returns a nonzero value. See the table below for + what nonzero values mean. You can use `regerror' to produce an + error message string describing the reason for a nonzero value; + see *Note Regexp Cleanup::. - - Variable: FILE * stdout - The "standard output" stream, which is used for normal output from - the program. + The argument EFLAGS is a word of bit flags that enable various + options. - - Variable: FILE * stderr - The "standard error" stream, which is used for error messages and - diagnostics issued by the program. + If you want to get information about what part of STRING actually + matched the regular expression or its subexpressions, use the + arguments MATCHPTR and NMATCH. Otherwise, pass `0' for NMATCH, + and `NULL' for MATCHPTR. *Note Regexp Subexpressions::. - In the GNU system, you can specify what files or processes -correspond to these streams using the pipe and redirection facilities -provided by the shell. (The primitives shells use to implement these -facilities are described in *Note File System Interface::.) Most other -operating systems provide similar mechanisms, but the details of how to -use them can vary. + You must match the regular expression with the same set of current +locales that were in effect when you compiled the regular expression. - In the GNU C library, `stdin', `stdout', and `stderr' are normal -variables which you can set just like any others. For example, to -redirect the standard output to a file, you could do: + The function `regexec' accepts the following flags in the EFLAGS +argument: - fclose (stdout); - stdout = fopen ("standard-output-file", "w"); +`REG_NOTBOL' + Do not regard the beginning of the specified string as the + beginning of a line; more generally, don't make any assumptions + about what text might precede it. - Note however, that in other systems `stdin', `stdout', and `stderr' -are macros that you cannot assign to in the normal way. But you can -use `freopen' to get the effect of closing one and reopening it. *Note -Opening Streams::. +`REG_NOTEOL' + Do not regard the end of the specified string as the end of a + line; more generally, don't make any assumptions about what text + might follow it. - The three streams `stdin', `stdout', and `stderr' are not unoriented -at program start (*note Streams and I18N::). + Here are the possible nonzero values that `regexec' can return: - -File: libc.info, Node: Opening Streams, Next: Closing Streams, Prev: Standard Streams, Up: I/O on Streams +`REG_NOMATCH' + The pattern didn't match the string. This isn't really an error. -Opening Streams -=============== +`REG_ESPACE' + `regexec' ran out of memory. - Opening a file with the `fopen' function creates a new stream and -establishes a connection between the stream and a file. This may -involve creating a new file. + +File: libc.info, Node: Regexp Subexpressions, Next: Subexpression Complications, Prev: Matching POSIX Regexps, Up: Regular Expressions - Everything described in this section is declared in the header file -`stdio.h'. +Match Results with Subexpressions +--------------------------------- - - Function: FILE * fopen (const char *FILENAME, const char *OPENTYPE) - The `fopen' function opens a stream for I/O to the file FILENAME, - and returns a pointer to the stream. + When `regexec' matches parenthetical subexpressions of PATTERN, it +records which parts of STRING they match. It returns that information +by storing the offsets into an array whose elements are structures of +type `regmatch_t'. The first element of the array (index `0') records +the part of the string that matched the entire regular expression. +Each other element of the array records the beginning and end of the +part that matched a single parenthetical subexpression. - The OPENTYPE argument is a string that controls how the file is - opened and specifies attributes of the resulting stream. It must - begin with one of the following sequences of characters: + - Data Type: regmatch_t + This is the data type of the MATCHARRAY array that you pass to + `regexec'. It contains two structure fields, as follows: - `r' - Open an existing file for reading only. + `rm_so' + The offset in STRING of the beginning of a substring. Add + this value to STRING to get the address of that part. - `w' - Open the file for writing only. If the file already exists, - it is truncated to zero length. Otherwise a new file is - created. + `rm_eo' + The offset in STRING of the end of the substring. - `a' - Open a file for append access; that is, writing at the end of - file only. If the file already exists, its initial contents - are unchanged and output to the stream is appended to the end - of the file. Otherwise, a new, empty file is created. + - Data Type: regoff_t + `regoff_t' is an alias for another signed integer type. The + fields of `regmatch_t' have type `regoff_t'. - `r+' - Open an existing file for both reading and writing. The - initial contents of the file are unchanged and the initial - file position is at the beginning of the file. + The `regmatch_t' elements correspond to subexpressions positionally; +the first element (index `1') records where the first subexpression +matched, the second element records the second subexpression, and so +on. The order of the subexpressions is the order in which they begin. - `w+' - Open a file for both reading and writing. If the file - already exists, it is truncated to zero length. Otherwise, a - new file is created. + When you call `regexec', you specify how long the MATCHPTR array is, +with the NMATCH argument. This tells `regexec' how many elements to +store. If the actual regular expression has more than NMATCH +subexpressions, then you won't get offset information about the rest of +them. But this doesn't alter whether the pattern matches a particular +string or not. - `a+' - Open or create file for both reading and appending. If the - file exists, its initial contents are unchanged. Otherwise, - a new file is created. The initial file position for reading - is at the beginning of the file, but output is always - appended to the end of the file. + If you don't want `regexec' to return any information about where +the subexpressions matched, you can either supply `0' for NMATCH, or +use the flag `REG_NOSUB' when you compile the pattern with `regcomp'. - As you can see, `+' requests a stream that can do both input and - output. The ISO standard says that when using such a stream, you - must call `fflush' (*note Stream Buffering::) or a file positioning - function such as `fseek' (*note File Positioning::) when switching - from reading to writing or vice versa. Otherwise, internal buffers - might not be emptied properly. The GNU C library does not have - this limitation; you can do arbitrary reading and writing - operations on a stream in whatever order. + +File: libc.info, Node: Subexpression Complications, Next: Regexp Cleanup, Prev: Regexp Subexpressions, Up: Regular Expressions - Additional characters may appear after these to specify flags for - the call. Always put the mode (`r', `w+', etc.) first; that is - the only part you are guaranteed will be understood by all systems. +Complications in Subexpression Matching +--------------------------------------- - The GNU C library defines one additional character for use in - OPENTYPE: the character `x' insists on creating a new file--if a - file FILENAME already exists, `fopen' fails rather than opening - it. If you use `x' you are guaranteed that you will not clobber - an existing file. This is equivalent to the `O_EXCL' option to - the `open' function (*note Opening and Closing Files::). + Sometimes a subexpression matches a substring of no characters. This +happens when `f\(o*\)' matches the string `fum'. (It really matches +just the `f'.) In this case, both of the offsets identify the point in +the string where the null substring was found. In this example, the +offsets are both `1'. - The character `b' in OPENTYPE has a standard meaning; it requests - a binary stream rather than a text stream. But this makes no - difference in POSIX systems (including the GNU system). If both - `+' and `b' are specified, they can appear in either order. *Note - Binary Streams::. + Sometimes the entire regular expression can match without using some +of its subexpressions at all--for example, when `ba\(na\)*' matches the +string `ba', the parenthetical subexpression is not used. When this +happens, `regexec' stores `-1' in both fields of the element for that +subexpression. - If the OPENTYPE string contains the sequence `,ccs=STRING' then - STRING is taken as the name of a coded character set and `fopen' - will mark the stream as wide-oriented which appropriate conversion - functions in place to convert from and to the character set STRING - is place. Any other stream is opened initially unoriented and the - orientation is decided with the first file operation. If the - first operation is a wide character operation, the stream is not - only marked as wide-oriented, also the conversion functions to - convert to the coded character set used for the current locale are - loaded. This will not change anymore from this point on even if - the locale selected for the `LC_CTYPE' category is changed. + Sometimes matching the entire regular expression can match a +particular subexpression more than once--for example, when `ba\(na\)*' +matches the string `bananana', the parenthetical subexpression matches +three times. When this happens, `regexec' usually stores the offsets +of the last part of the string that matched the subexpression. In the +case of `bananana', these offsets are `6' and `8'. - Any other characters in OPENTYPE are simply ignored. They may be - meaningful in other systems. + But the last match is not always the one that is chosen. It's more +accurate to say that the last _opportunity_ to match is the one that +takes precedence. What this means is that when one subexpression +appears within another, then the results reported for the inner +subexpression reflect whatever happened on the last match of the outer +subexpression. For an example, consider `\(ba\(na\)*s \)*' matching +the string `bananas bas '. The last time the inner expression actually +matches is near the end of the first word. But it is _considered_ +again in the second word, and fails to match there. `regexec' reports +nonuse of the "na" subexpression. - If the open fails, `fopen' returns a null pointer. + Another place where this rule applies is when the regular expression + \(ba\(na\)*s \|nefer\(ti\)* \)* - When the sources are compiling with `_FILE_OFFSET_BITS == 64' on a - 32 bit machine this function is in fact `fopen64' since the LFS - interface replaces transparently the old interface. +matches `bananas nefertiti'. The "na" subexpression does match in the +first word, but it doesn't match in the second word because the other +alternative is used there. Once again, the second repetition of the +outer subexpression overrides the first, and within that second +repetition, the "na" subexpression is not used. So `regexec' reports +nonuse of the "na" subexpression. - You can have multiple streams (or file descriptors) pointing to the -same file open at the same time. If you do only input, this works -straightforwardly, but you must be careful if any output streams are -included. *Note Stream/Descriptor Precautions::. This is equally true -whether the streams are in one program (not usual) or in several -programs (which can easily happen). It may be advantageous to use the -file locking facilities to avoid simultaneous access. *Note File -Locks::. + +File: libc.info, Node: Regexp Cleanup, Prev: Subexpression Complications, Up: Regular Expressions - - Function: FILE * fopen64 (const char *FILENAME, const char *OPENTYPE) - This function is similar to `fopen' but the stream it returns a - pointer for is opened using `open64'. Therefore this stream can be - used even on files larger then 2^31 bytes on 32 bit machines. +POSIX Regexp Matching Cleanup +----------------------------- - Please note that the return type is still `FILE *'. There is no - special `FILE' type for the LFS interface. + When you are finished using a compiled regular expression, you can +free the storage it uses by calling `regfree'. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `fopen' and - so transparently replaces the old interface. + - Function: void regfree (regex_t *COMPILED) + Calling `regfree' frees all the storage that `*COMPILED' points + to. This includes various internal fields of the `regex_t' + structure that aren't documented in this manual. - - Macro: int FOPEN_MAX - The value of this macro is an integer constant expression that - represents the minimum number of streams that the implementation - guarantees can be open simultaneously. You might be able to open - more than this many streams, but that is not guaranteed. The - value of this constant is at least eight, which includes the three - standard streams `stdin', `stdout', and `stderr'. In POSIX.1 - systems this value is determined by the `OPEN_MAX' parameter; - *note General Limits::. In BSD and GNU, it is controlled by the - `RLIMIT_NOFILE' resource limit; *note Limits on Resources::. + `regfree' does not free the object `*COMPILED' itself. - - Function: FILE * freopen (const char *FILENAME, const char - *OPENTYPE, FILE *STREAM) - This function is like a combination of `fclose' and `fopen'. It - first closes the stream referred to by STREAM, ignoring any errors - that are detected in the process. (Because errors are ignored, - you should not use `freopen' on an output stream if you have - actually done any output using the stream.) Then the file named by - FILENAME is opened with mode OPENTYPE as for `fopen', and - associated with the same stream object STREAM. + You should always free the space in a `regex_t' structure with +`regfree' before using the structure to compile another regular +expression. - If the operation fails, a null pointer is returned; otherwise, - `freopen' returns STREAM. + When `regcomp' or `regexec' reports an error, you can use the +function `regerror' to turn it into an error message string. - `freopen' has traditionally been used to connect a standard stream - such as `stdin' with a file of your own choice. This is useful in - programs in which use of a standard stream for certain purposes is - hard-coded. In the GNU C library, you can simply close the - standard streams and open new ones with `fopen'. But other - systems lack this ability, so using `freopen' is more portable. + - Function: size_t regerror (int ERRCODE, regex_t *COMPILED, char + *BUFFER, size_t LENGTH) + This function produces an error message string for the error code + ERRCODE, and stores the string in LENGTH bytes of memory starting + at BUFFER. For the COMPILED argument, supply the same compiled + regular expression structure that `regcomp' or `regexec' was + working with when it got the error. Alternatively, you can supply + `NULL' for COMPILED; you will still get a meaningful error + message, but it might not be as detailed. - When the sources are compiling with `_FILE_OFFSET_BITS == 64' on a - 32 bit machine this function is in fact `freopen64' since the LFS - interface replaces transparently the old interface. + If the error message can't fit in LENGTH bytes (including a + terminating null character), then `regerror' truncates it. The + string that `regerror' stores is always null-terminated even if it + has been truncated. - - Function: FILE * freopen64 (const char *FILENAME, const char - *OPENTYPE, FILE *STREAM) - This function is similar to `freopen'. The only difference is that - on 32 bit machine the stream returned is able to read beyond the - 2^31 bytes limits imposed by the normal interface. It should be - noted that the stream pointed to by STREAM need not be opened - using `fopen64' or `freopen64' since its mode is not important for - this function. + The return value of `regerror' is the minimum length needed to + store the entire error message. If this is less than LENGTH, then + the error message was not truncated, and you can use it. + Otherwise, you should call `regerror' again with a larger buffer. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `freopen' - and so transparently replaces the old interface. + Here is a function which uses `regerror', but always dynamically + allocates a buffer for the error message: - In some situations it is useful to know whether a given stream is -available for reading or writing. This information is normally not -available and would have to be remembered separately. Solaris -introduced a few functions to get this information from the stream -descriptor and these functions are also available in the GNU C library. + char *get_regerror (int errcode, regex_t *compiled) + { + size_t length = regerror (errcode, compiled, NULL, 0); + char *buffer = xmalloc (length); + (void) regerror (errcode, compiled, buffer, length); + return buffer; + } - - Function: int __freadable (FILE *STREAM) - The `__freadable' function determines whether the stream STREAM - was opened to allow reading. In this case the return value is - nonzero. For write-only streams the function returns zero. + +File: libc.info, Node: Word Expansion, Prev: Regular Expressions, Up: Pattern Matching - This function is declared in `stdio_ext.h'. +Shell-Style Word Expansion +========================== - - Function: int __fwritable (FILE *STREAM) - The `__fwritable' function determines whether the stream STREAM - was opened to allow writing. In this case the return value is - nonzero. For read-only streams the function returns zero. + "Word expansion" means the process of splitting a string into +"words" and substituting for variables, commands, and wildcards just as +the shell does. - This function is declared in `stdio_ext.h'. + For example, when you write `ls -l foo.c', this string is split into +three separate words--`ls', `-l' and `foo.c'. This is the most basic +function of word expansion. - For slightly different kind of problems there are two more functions. -They provide even finer-grained information. + When you write `ls *.c', this can become many words, because the +word `*.c' can be replaced with any number of file names. This is +called "wildcard expansion", and it is also a part of word expansion. - - Function: int __freading (FILE *STREAM) - The `__freading' function determines whether the stream STREAM was - last read from or whether it is opened read-only. In this case - the return value is nonzero, otherwise it is zero. Determining - whether a stream opened for reading and writing was last used for - writing allows to draw conclusions about the content about the - buffer, among other things. + When you use `echo $PATH' to print your path, you are taking +advantage of "variable substitution", which is also part of word +expansion. - This function is declared in `stdio_ext.h'. + Ordinary programs can perform word expansion just like the shell by +calling the library function `wordexp'. - - Function: int __fwriting (FILE *STREAM) - The `__fwriting' function determines whether the stream STREAM was - last written to or whether it is opened write-only. In this case - the return value is nonzero, otherwise it is zero. +* Menu: - This function is declared in `stdio_ext.h'. +* Expansion Stages:: What word expansion does to a string. +* Calling Wordexp:: How to call `wordexp'. +* Flags for Wordexp:: Options you can enable in `wordexp'. +* Wordexp Example:: A sample program that does word expansion. +* Tilde Expansion:: Details of how tilde expansion works. +* Variable Substitution:: Different types of variable substitution.  -File: libc.info, Node: Closing Streams, Next: Streams and Threads, Prev: Opening Streams, Up: I/O on Streams +File: libc.info, Node: Expansion Stages, Next: Calling Wordexp, Up: Word Expansion -Closing Streams -=============== +The Stages of Word Expansion +---------------------------- - When a stream is closed with `fclose', the connection between the -stream and the file is canceled. After you have closed a stream, you -cannot perform any additional operations on it. + When word expansion is applied to a sequence of words, it performs +the following transformations in the order shown here: - - Function: int fclose (FILE *STREAM) - This function causes STREAM to be closed and the connection to the - corresponding file to be broken. Any buffered output is written - and any buffered input is discarded. The `fclose' function returns - a value of `0' if the file was closed successfully, and `EOF' if - an error was detected. + 1. "Tilde expansion": Replacement of `~foo' with the name of the home + directory of `foo'. - It is important to check for errors when you call `fclose' to close - an output stream, because real, everyday errors can be detected at - this time. For example, when `fclose' writes the remaining - buffered output, it might get an error because the disk is full. - Even if you know the buffer is empty, errors can still occur when - closing a file if you are using NFS. + 2. Next, three different transformations are applied in the same step, + from left to right: - The function `fclose' is declared in `stdio.h'. + * "Variable substitution": Environment variables are + substituted for references such as `$foo'. - To close all streams currently available the GNU C Library provides -another function. + * "Command substitution": Constructs such as ``cat foo`' and + the equivalent `$(cat foo)' are replaced with the output from + the inner command. - - Function: int fcloseall (void) - This function causes all open streams of the process to be closed - and the connection to corresponding files to be broken. All - buffered data is written and any buffered input is discarded. The - `fcloseall' function returns a value of `0' if all the files were - closed successfully, and `EOF' if an error was detected. + * "Arithmetic expansion": Constructs such as `$(($x-1))' are + replaced with the result of the arithmetic computation. - This function should be used only in special situations, e.g., - when an error occurred and the program must be aborted. Normally - each single stream should be closed separately so that problems - with individual streams can be identified. It is also problematic - since the standard streams (*note Standard Streams::) will also be - closed. + 3. "Field splitting": subdivision of the text into "words". - The function `fcloseall' is declared in `stdio.h'. + 4. "Wildcard expansion": The replacement of a construct such as `*.c' + with a list of `.c' file names. Wildcard expansion applies to an + entire word at a time, and replaces that word with 0 or more file + names that are themselves words. - If the `main' function to your program returns, or if you call the -`exit' function (*note Normal Termination::), all open streams are -automatically closed properly. If your program terminates in any other -manner, such as by calling the `abort' function (*note Aborting a -Program::) or from a fatal signal (*note Signal Handling::), open -streams might not be closed properly. Buffered output might not be -flushed and files may be incomplete. For more information on buffering -of streams, see *Note Stream Buffering::. + 5. "Quote removal": The deletion of string-quotes, now that they have + done their job by inhibiting the above transformations when + appropriate. + + For the details of these transformations, and how to write the +constructs that use them, see `The BASH Manual' (to appear). diff -durpN glibc-2.2.4/manual/libc.info-16 glibc-2.2.5/manual/libc.info-16 --- glibc-2.2.4/manual/libc.info-16 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-16 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1098 +33,1095 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Streams and Threads, Next: Streams and I18N, Prev: Closing Streams, Up: I/O on Streams +File: libc.info, Node: Calling Wordexp, Next: Flags for Wordexp, Prev: Expansion Stages, Up: Word Expansion -Streams and Threads -=================== +Calling `wordexp' +----------------- - Streams can be used in multi-threaded applications in the same way -they are used in single-threaded applications. But the programmer must -be aware of a the possible complications. It is important to know about -these also if the program one writes never use threads since the design -and implementation of many stream functions is heavily influenced by the -requirements added by multi-threaded programming. + All the functions, constants and data types for word expansion are +declared in the header file `wordexp.h'. - The POSIX standard requires that by default the stream operations are -atomic. I.e., issuing two stream operations for the same stream in two -threads at the same time will cause the operations to be executed as if -they were issued sequentially. The buffer operations performed while -reading or writing are protected from other uses of the same stream. To -do this each stream has an internal lock object which has to be -(implicitly) acquired before any work can be done. + Word expansion produces a vector of words (strings). To return this +vector, `wordexp' uses a special data type, `wordexp_t', which is a +structure. You pass `wordexp' the address of the structure, and it +fills in the structure's fields to tell you about the results. - But there are situations where this is not enough and there are also -situations where this is not wanted. The implicit locking is not enough -if the program requires more than one stream function call to happen -atomically. One example would be if an output line a program wants to -generate is created by several function calls. The functions by -themselves would ensure only atomicity of their own operation, but not -atomicity over all the function calls. For this it is necessary to -perform the stream locking in the application code. + - Data Type: wordexp_t + This data type holds a pointer to a word vector. More precisely, + it records both the address of the word vector and its size. - - Function: void flockfile (FILE *STREAM) - The `flockfile' function acquires the internal locking object - associated with the stream STREAM. This ensures that no other - thread can explicitly through `flockfile'/`ftrylockfile' or - implicit through a call of a stream function lock the stream. The - thread will block until the lock is acquired. An explicit call to - `funlockfile' has to be used to release the lock. + `we_wordc' + The number of elements in the vector. - - Function: int ftrylockfile (FILE *STREAM) - The `ftrylockfile' function tries to acquire the internal locking - object associated with the stream STREAM just like `flockfile'. - But unlike `flockfile' this function does not block if the lock is - not available. `ftrylockfile' returns zero if the lock was - successfully acquired. Otherwise the stream is locked by another - thread. + `we_wordv' + The address of the vector. This field has type `char **'. - - Function: void funlockfile (FILE *STREAM) - The `funlockfile' function releases the internal locking object of - the stream STREAM. The stream must have been locked before by a - call to `flockfile' or a successful call of `ftrylockfile'. The - implicit locking performed by the stream operations do not count. - The `funlockfile' function does not return an error status and the - behavior of a call for a stream which is not locked by the current - thread is undefined. + `we_offs' + The offset of the first real element of the vector, from its + nominal address in the `we_wordv' field. Unlike the other + fields, this is always an input to `wordexp', rather than an + output from it. - The following example shows how the functions above can be used to -generate an output line atomically even in multi-threaded applications -(yes, the same job could be done with one `fprintf' call but it is -sometimes not possible): + If you use a nonzero offset, then that many elements at the + beginning of the vector are left empty. (The `wordexp' + function fills them with null pointers.) - FILE *fp; - { - ... - flockfile (fp); - fputs ("This is test number ", fp); - fprintf (fp, "%d\n", test); - funlockfile (fp) - } + The `we_offs' field is meaningful only if you use the + `WRDE_DOOFFS' flag. Otherwise, the offset is always zero + regardless of what is in this field, and the first real + element comes at the beginning of the vector. - Without the explicit locking it would be possible for another thread -to use the stream FP after the `fputs' call return and before `fprintf' -was called with the result that the number does not follow the word -`number'. + - Function: int wordexp (const char *WORDS, wordexp_t + *WORD-VECTOR-PTR, int FLAGS) + Perform word expansion on the string WORDS, putting the result in + a newly allocated vector, and store the size and address of this + vector into `*WORD-VECTOR-PTR'. The argument FLAGS is a + combination of bit flags; see *Note Flags for Wordexp::, for + details of the flags. - From this description it might already be clear that the locking -objects in streams are no simple mutexes. Since locking the same -stream twice in the same thread is allowed the locking objects must be -equivalent to recursive mutexes. These mutexes keep track of the owner -and the number of times the lock is acquired. The same number of -`funlockfile' calls by the same threads is necessary to unlock the -stream completely. For instance: + You shouldn't use any of the characters `|&;<>' in the string + WORDS unless they are quoted; likewise for newline. If you use + these characters unquoted, you will get the `WRDE_BADCHAR' error + code. Don't use parentheses or braces unless they are quoted or + part of a word expansion construct. If you use quotation + characters `'"`', they should come in pairs that balance. - void - foo (FILE *fp) - { - ftrylockfile (fp); - fputs ("in foo\n", fp); - /* This is very wrong!!! */ - funlockfile (fp); - } + The results of word expansion are a sequence of words. The + function `wordexp' allocates a string for each resulting word, then + allocates a vector of type `char **' to store the addresses of + these strings. The last element of the vector is a null pointer. + This vector is called the "word vector". - It is important here that the `funlockfile' function is only called -if the `ftrylockfile' function succeeded in locking the stream. It is -therefore always wrong to ignore the result of `ftrylockfile'. And it -makes no sense since otherwise one would use `flockfile'. The result -of code like that above is that either `funlockfile' tries to free a -stream that hasn't been locked by the current thread or it frees the -stream prematurely. The code should look like this: + To return this vector, `wordexp' stores both its address and its + length (number of elements, not counting the terminating null + pointer) into `*WORD-VECTOR-PTR'. - void - foo (FILE *fp) - { - if (ftrylockfile (fp) == 0) - { - fputs ("in foo\n", fp); - funlockfile (fp); - } - } + If `wordexp' succeeds, it returns 0. Otherwise, it returns one of + these error codes: - Now that we covered why it is necessary to have these locking it is -necessary to talk about situations when locking is unwanted and what can -be done. The locking operations (explicit or implicit) don't come for -free. Even if a lock is not taken the cost is not zero. The operations -which have to be performed require memory operations that are safe in -multi-processor environments. With the many local caches involved in -such systems this is quite costly. So it is best to avoid the locking -completely if it is not needed - because the code in question is never -used in a context where two or more threads may use a stream at a time. -This can be determined most of the time for application code; for -library code which can be used in many contexts one should default to be -conservative and use locking. + `WRDE_BADCHAR' + The input string WORDS contains an unquoted invalid character + such as `|'. - There are two basic mechanisms to avoid locking. The first is to use -the `_unlocked' variants of the stream operations. The POSIX standard -defines quite a few of those and the GNU library adds a few more. -These variants of the functions behave just like the functions with the -name without the suffix except that they do not lock the stream. Using -these functions is very desirable since they are potentially much -faster. This is not only because the locking operation itself is -avoided. More importantly, functions like `putc' and `getc' are very -simple and traditionally (before the introduction of threads) were -implemented as macros which are very fast if the buffer is not empty. -With the addition of locking requirements these functions are no longer -implemented as macros since they would would expand to too much code. -But these macros are still available with the same functionality under -the new names `putc_unlocked' and `getc_unlocked'. This possibly huge -difference of speed also suggests the use of the `_unlocked' functions -even if locking is required. The difference is that the locking then -has to be performed in the program: + `WRDE_BADVAL' + The input string refers to an undefined shell variable, and + you used the flag `WRDE_UNDEF' to forbid such references. - void - foo (FILE *fp, char *buf) - { - flockfile (fp); - while (*buf != '/') - putc_unlocked (*buf++, fp); - funlockfile (fp); - } + `WRDE_CMDSUB' + The input string uses command substitution, and you used the + flag `WRDE_NOCMD' to forbid command substitution. - If in this example the `putc' function would be used and the -explicit locking would be missing the `putc' function would have to -acquire the lock in every call, potentially many times depending on when -the loop terminates. Writing it the way illustrated above allows the -`putc_unlocked' macro to be used which means no locking and direct -manipulation of the buffer of the stream. + `WRDE_NOSPACE' + It was impossible to allocate memory to hold the result. In + this case, `wordexp' can store part of the results--as much + as it could allocate room for. - A second way to avoid locking is by using a non-standard function -which was introduced in Solaris and is available in the GNU C library -as well. + `WRDE_SYNTAX' + There was a syntax error in the input string. For example, + an unmatched quoting character is a syntax error. - - Function: int __fsetlocking (FILE *STREAM, int TYPE) - The `__fsetlocking' function can be used to select whether the - stream operations will implicitly acquire the locking object of the - stream STREAM. By default this is done but it can be disabled and - reinstated using this function. There are three values defined - for the TYPE parameter. + - Function: void wordfree (wordexp_t *WORD-VECTOR-PTR) + Free the storage used for the word-strings and vector that + `*WORD-VECTOR-PTR' points to. This does not free the structure + `*WORD-VECTOR-PTR' itself--only the other data it points to. - `FSETLOCKING_INTERNAL' - The stream `stream' will from now on use the default internal - locking. Every stream operation with exception of the - `_unlocked' variants will implicitly lock the stream. + +File: libc.info, Node: Flags for Wordexp, Next: Wordexp Example, Prev: Calling Wordexp, Up: Word Expansion - `FSETLOCKING_BYCALLER' - After the `__fsetlocking' function returns the user is - responsible for locking the stream. None of the stream - operations will implicitly do this anymore until the state is - set back to `FSETLOCKING_INTERNAL'. +Flags for Word Expansion +------------------------ - `FSETLOCKING_QUERY' - `__fsetlocking' only queries the current locking state of the - stream. The return value will be `FSETLOCKING_INTERNAL' or - `FSETLOCKING_BYCALLER' depending on the state. + This section describes the flags that you can specify in the FLAGS +argument to `wordexp'. Choose the flags you want, and combine them +with the C operator `|'. - The return value of `__fsetlocking' is either - `FSETLOCKING_INTERNAL' or `FSETLOCKING_BYCALLER' depending on the - state of the stream before the call. +`WRDE_APPEND' + Append the words from this expansion to the vector of words + produced by previous calls to `wordexp'. This way you can + effectively expand several words as if they were concatenated with + spaces between them. - This function and the values for the TYPE parameter are declared - in `stdio_ext.h'. + In order for appending to work, you must not modify the contents + of the word vector structure between calls to `wordexp'. And, if + you set `WRDE_DOOFFS' in the first call to `wordexp', you must also + set it when you append to the results. - This function is especially useful when program code has to be used -which is written without knowledge about the `_unlocked' functions (or -if the programmer was too lazy to use them). +`WRDE_DOOFFS' + Leave blank slots at the beginning of the vector of words. The + `we_offs' field says how many slots to leave. The blank slots + contain null pointers. - -File: libc.info, Node: Streams and I18N, Next: Simple Output, Prev: Streams and Threads, Up: I/O on Streams +`WRDE_NOCMD' + Don't do command substitution; if the input requests command + substitution, report an error. -Streams in Internationalized Applications -========================================= +`WRDE_REUSE' + Reuse a word vector made by a previous call to `wordexp'. Instead + of allocating a new vector of words, this call to `wordexp' will + use the vector that already exists (making it larger if necessary). - ISO C90 introduced the new type `wchar_t' to allow handling larger -character sets. What was missing was a possibility to output strings -of `wchar_t' directly. One had to convert them into multibyte strings -using `mbstowcs' (there was no `mbsrtowcs' yet) and then use the normal -stream functions. While this is doable it is very cumbersome since -performing the conversions is not trivial and greatly increases program -complexity and size. + Note that the vector may move, so it is not safe to save an old + pointer and use it again after calling `wordexp'. You must fetch + `we_pathv' anew after each call. - The Unix standard early on (I think in XPG4.2) introduced two -additional format specifiers for the `printf' and `scanf' families of -functions. Printing and reading of single wide characters was made -possible using the `%C' specifier and wide character strings can be -handled with `%S'. These modifiers behave just like `%c' and `%s' only -that they expect the corresponding argument to have the wide character -type and that the wide character and string are transformed into/from -multibyte strings before being used. +`WRDE_SHOWERR' + Do show any error messages printed by commands run by command + substitution. More precisely, allow these commands to inherit the + standard error output stream of the current process. By default, + `wordexp' gives these commands a standard error stream that + discards all output. - This was a beginning but it is still not good enough. Not always is -it desirable to use `printf' and `scanf'. The other, smaller and -faster functions cannot handle wide characters. Second, it is not -possible to have a format string for `printf' and `scanf' consisting of -wide characters. The result is that format strings would have to be -generated if they have to contain non-basic characters. +`WRDE_UNDEF' + If the input refers to a shell variable that is not defined, + report an error. - In the Amendment 1 to ISO C90 a whole new set of functions was added -to solve the problem. Most of the stream functions got a counterpart -which take a wide character or wide character string instead of a -character or string respectively. The new functions operate on the -same streams (like `stdout'). This is different from the model of the -C++ runtime library where separate streams for wide and normal I/O are -used. + +File: libc.info, Node: Wordexp Example, Next: Tilde Expansion, Prev: Flags for Wordexp, Up: Word Expansion - Being able to use the same stream for wide and normal operations -comes with a restriction: a stream can be used either for wide -operations or for normal operations. Once it is decided there is no -way back. Only a call to `freopen' or `freopen64' can reset the -"orientation". The orientation can be decided in three ways: +`wordexp' Example +----------------- - * If any of the normal character functions is used (this includes the - `fread' and `fwrite' functions) the stream is marked as not wide - oriented. + Here is an example of using `wordexp' to expand several strings and +use the results to run a shell command. It also shows the use of +`WRDE_APPEND' to concatenate the expansions and of `wordfree' to free +the space allocated by `wordexp'. - * If any of the wide character functions is used the stream is - marked as wide oriented. + int + expand_and_execute (const char *program, const char *options) + { + wordexp_t result; + pid_t pid + int status, i; + + /* Expand the string for the program to run. */ + switch (wordexp (program, &result, 0)) + { + case 0: /* Successful. */ + break; + case WRDE_NOSPACE: + /* If the error was `WRDE_NOSPACE', + then perhaps part of the result was allocated. */ + wordfree (&result); + default: /* Some other error. */ + return -1; + } + + /* Expand the strings specified for the arguments. */ + for (i = 0; args[i]; i++) + { + if (wordexp (options, &result, WRDE_APPEND)) + { + wordfree (&result); + return -1; + } + } + + pid = fork (); + if (pid == 0) + { + /* This is the child process. Execute the command. */ + execv (result.we_wordv[0], result.we_wordv); + exit (EXIT_FAILURE); + } + else if (pid < 0) + /* The fork failed. Report failure. */ + status = -1; + else + /* This is the parent process. Wait for the child to complete. */ + if (waitpid (pid, &status, 0) != pid) + status = -1; + + wordfree (&result); + return status; + } - * The `fwide' function can be used to set the orientation either way. + +File: libc.info, Node: Tilde Expansion, Next: Variable Substitution, Prev: Wordexp Example, Up: Word Expansion - It is important to never mix the use of wide and not wide operations -on a stream. There are no diagnostics issued. The application behavior -will simply be strange or the application will simply crash. The -`fwide' function can help avoiding this. +Details of Tilde Expansion +-------------------------- - - Function: int fwide (FILE *STREAM, int MODE) - The `fwide' function can be used to set and query the state of the - orientation of the stream STREAM. If the MODE parameter has a - positive value the streams get wide oriented, for negative values - narrow oriented. It is not possible to overwrite previous - orientations with `fwide'. I.e., if the stream STREAM was already - oriented before the call nothing is done. + It's a standard part of shell syntax that you can use `~' at the +beginning of a file name to stand for your own home directory. You can +use `~USER' to stand for USER's home directory. - If MODE is zero the current orientation state is queried and - nothing is changed. + "Tilde expansion" is the process of converting these abbreviations +to the directory names that they stand for. - The `fwide' function returns a negative value, zero, or a positive - value if the stream is narrow, not at all, or wide oriented - respectively. + Tilde expansion applies to the `~' plus all following characters up +to whitespace or a slash. It takes place only at the beginning of a +word, and only if none of the characters to be transformed is quoted in +any way. - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + Plain `~' uses the value of the environment variable `HOME' as the +proper home directory name. `~' followed by a user name uses +`getpwname' to look up that user in the user database, and uses +whatever directory is recorded there. Thus, `~' followed by your own +name can give different results from plain `~', if the value of `HOME' +is not really your home directory. - It is generally a good idea to orient a stream as early as possible. -This can prevent surprise especially for the standard streams `stdin', -`stdout', and `stderr'. If some library function in some situations -uses one of these streams and this use orients the stream in a -different way the rest of the application expects it one might end up -with hard to reproduce errors. Remember that no errors are signal if -the streams are used incorrectly. Leaving a stream unoriented after -creation is normally only necessary for library functions which create -streams which can be used in different contexts. + +File: libc.info, Node: Variable Substitution, Prev: Tilde Expansion, Up: Word Expansion - When writing code which uses streams and which can be used in -different contexts it is important to query the orientation of the -stream before using it (unless the rules of the library interface -demand a specific orientation). The following little, silly function -illustrates this. +Details of Variable Substitution +-------------------------------- - void - print_f (FILE *fp) - { - if (fwide (fp, 0) > 0) - /* Positive return value means wide orientation. */ - fputwc (L'f', fp); - else - fputc ('f', fp); - } + Part of ordinary shell syntax is the use of `$VARIABLE' to +substitute the value of a shell variable into a command. This is called +"variable substitution", and it is one part of doing word expansion. - Note that in this case the function `print_f' decides about the -orientation of the stream if it was unoriented before (will not happen -if the advise above is followed). + There are two basic ways you can write a variable reference for +substitution: - The encoding used for the `wchar_t' values is unspecified and the -user must not make any assumptions about it. For I/O of `wchar_t' -values this means that it is impossible to write these values directly -to the stream. This is not what follows from the ISO C locale model -either. What happens instead is that the bytes read from or written to -the underlying media are first converted into the internal encoding -chosen by the implementation for `wchar_t'. The external encoding is -determined by the `LC_CTYPE' category of the current locale or by the -`ccs' part of the mode specification given to `fopen', `fopen64', -`freopen', or `freopen64'. How and when the conversion happens is -unspecified and it happens invisible to the user. +`${VARIABLE}' + If you write braces around the variable name, then it is completely + unambiguous where the variable name ends. You can concatenate + additional letters onto the end of the variable value by writing + them immediately after the close brace. For example, `${foo}s' + expands into `tractors'. - Since a stream is created in the unoriented state it has at that -point no conversion associated with it. The conversion which will be -used is determined by the `LC_CTYPE' category selected at the time the -stream is oriented. If the locales are changed at the runtime this -might produce surprising results unless one pays attention. This is -just another good reason to orient the stream explicitly as soon as -possible, perhaps with a call to `fwide'. +`$VARIABLE' + If you do not put braces around the variable name, then the + variable name consists of all the alphanumeric characters and + underscores that follow the `$'. The next punctuation character + ends the variable name. Thus, `$foo-bar' refers to the variable + `foo' and expands into `tractor-bar'. - -File: libc.info, Node: Simple Output, Next: Character Input, Prev: Streams and I18N, Up: I/O on Streams + When you use braces, you can also use various constructs to modify +the value that is substituted, or test it in various ways. -Simple Output by Characters or Lines -==================================== +`${VARIABLE:-DEFAULT}' + Substitute the value of VARIABLE, but if that is empty or + undefined, use DEFAULT instead. - This section describes functions for performing character- and -line-oriented output. +`${VARIABLE:=DEFAULT}' + Substitute the value of VARIABLE, but if that is empty or + undefined, use DEFAULT instead and set the variable to DEFAULT. - These narrow streams functions are declared in the header file -`stdio.h' and the wide stream functions in `wchar.h'. +`${VARIABLE:?MESSAGE}' + If VARIABLE is defined and not empty, substitute its value. - - Function: int fputc (int C, FILE *STREAM) - The `fputc' function converts the character C to type `unsigned - char', and writes it to the stream STREAM. `EOF' is returned if a - write error occurs; otherwise the character C is returned. + Otherwise, print MESSAGE as an error message on the standard error + stream, and consider word expansion a failure. - - Function: wint_t fputwc (wchar_t WC, FILE *STREAM) - The `fputwc' function writes the wide character WC to the stream - STREAM. `WEOF' is returned if a write error occurs; otherwise the - character WC is returned. +`${VARIABLE:+REPLACEMENT}' + Substitute REPLACEMENT, but only if VARIABLE is defined and + nonempty. Otherwise, substitute nothing for this construct. - - Function: int fputc_unlocked (int C, FILE *STREAM) - The `fputc_unlocked' function is equivalent to the `fputc' - function except that it does not implicitly lock the stream. +`${#VARIABLE}' + Substitute a numeral which expresses in base ten the number of + characters in the value of VARIABLE. `${#foo}' stands for `7', + because `tractor' is seven characters. - - Function: wint_t fputwc_unlocked (wint_t WC, FILE *STREAM) - The `fputwc_unlocked' function is equivalent to the `fputwc' - function except that it does not implicitly lock the stream. + These variants of variable substitution let you remove part of the +variable's value before substituting it. The PREFIX and SUFFIX are not +mere strings; they are wildcard patterns, just like the patterns that +you use to match multiple file names. But in this context, they match +against parts of the variable value rather than against file names. - This function is a GNU extension. +`${VARIABLE%%SUFFIX}' + Substitute the value of VARIABLE, but first discard from that + variable any portion at the end that matches the pattern SUFFIX. - - Function: int putc (int C, FILE *STREAM) - This is just like `fputc', except that most systems implement it as - a macro, making it faster. One consequence is that it may - evaluate the STREAM argument more than once, which is an exception - to the general rule for macros. `putc' is usually the best - function to use for writing a single character. + If there is more than one alternative for how to match against + SUFFIX, this construct uses the longest possible match. - - Function: wint_t putwc (wchar_t WC, FILE *STREAM) - This is just like `fputwc', except that it can be implement as a - macro, making it faster. One consequence is that it may evaluate - the STREAM argument more than once, which is an exception to the - general rule for macros. `putwc' is usually the best function to - use for writing a single wide character. + Thus, `${foo%%r*}' substitutes `t', because the largest match for + `r*' at the end of `tractor' is `ractor'. - - Function: int putc_unlocked (int C, FILE *STREAM) - The `putc_unlocked' function is equivalent to the `putc' function - except that it does not implicitly lock the stream. +`${VARIABLE%SUFFIX}' + Substitute the value of VARIABLE, but first discard from that + variable any portion at the end that matches the pattern SUFFIX. - - Function: wint_t putwc_unlocked (wchar_t WC, FILE *STREAM) - The `putwc_unlocked' function is equivalent to the `putwc' - function except that it does not implicitly lock the stream. + If there is more than one alternative for how to match against + SUFFIX, this construct uses the shortest possible alternative. - This function is a GNU extension. + Thus, `${foo%%r*}' substitutes `tracto', because the shortest + match for `r*' at the end of `tractor' is just `r'. - - Function: int putchar (int C) - The `putchar' function is equivalent to `putc' with `stdout' as - the value of the STREAM argument. +`${VARIABLE##PREFIX}' + Substitute the value of VARIABLE, but first discard from that + variable any portion at the beginning that matches the pattern + PREFIX. - - Function: wint_t putwchar (wchar_t WC) - The `putwchar' function is equivalent to `putwc' with `stdout' as - the value of the STREAM argument. + If there is more than one alternative for how to match against + PREFIX, this construct uses the longest possible match. - - Function: int putchar_unlocked (int C) - The `putchar_unlocked' function is equivalent to the `putchar' - function except that it does not implicitly lock the stream. + Thus, `${foo%%r*}' substitutes `t', because the largest match for + `r*' at the end of `tractor' is `ractor'. - - Function: wint_t putwchar_unlocked (wchar_t WC) - The `putwchar_unlocked' function is equivalent to the `putwchar' - function except that it does not implicitly lock the stream. +`${VARIABLE#PREFIX}' + Substitute the value of VARIABLE, but first discard from that + variable any portion at the beginning that matches the pattern + PREFIX. - This function is a GNU extension. + If there is more than one alternative for how to match against + PREFIX, this construct uses the shortest possible alternative. - - Function: int fputs (const char *S, FILE *STREAM) - The function `fputs' writes the string S to the stream STREAM. - The terminating null character is not written. This function does - _not_ add a newline character, either. It outputs only the - characters in the string. + Thus, `${foo%%r*}' substitutes `tracto', because the shortest + match for `r*' at the end of `tractor' is just `r'. - This function returns `EOF' if a write error occurs, and otherwise - a non-negative value. + +File: libc.info, Node: I/O Overview, Next: I/O on Streams, Prev: Pattern Matching, Up: Top - For example: +Input/Output Overview +********************* - fputs ("Are ", stdout); - fputs ("you ", stdout); - fputs ("hungry?\n", stdout); + Most programs need to do either input (reading data) or output +(writing data), or most frequently both, in order to do anything +useful. The GNU C library provides such a large selection of input and +output functions that the hardest part is often deciding which function +is most appropriate! - outputs the text `Are you hungry?' followed by a newline. + This chapter introduces concepts and terminology relating to input +and output. Other chapters relating to the GNU I/O facilities are: - - Function: int fputws (const wchar_t *WS, FILE *STREAM) - The function `fputws' writes the wide character string WS to the - stream STREAM. The terminating null character is not written. - This function does _not_ add a newline character, either. It - outputs only the characters in the string. + * *Note I/O on Streams::, which covers the high-level functions that + operate on streams, including formatted input and output. - This function returns `WEOF' if a write error occurs, and otherwise - a non-negative value. + * *Note Low-Level I/O::, which covers the basic I/O and control + functions on file descriptors. - - Function: int fputs_unlocked (const char *S, FILE *STREAM) - The `fputs_unlocked' function is equivalent to the `fputs' - function except that it does not implicitly lock the stream. + * *Note File System Interface::, which covers functions for + operating on directories and for manipulating file attributes such + as access modes and ownership. - This function is a GNU extension. + * *Note Pipes and FIFOs::, which includes information on the basic + interprocess communication facilities. - - Function: int fputws_unlocked (const wchar_t *WS, FILE *STREAM) - The `fputws_unlocked' function is equivalent to the `fputws' - function except that it does not implicitly lock the stream. + * *Note Sockets::, which covers a more complicated interprocess + communication facility with support for networking. - This function is a GNU extension. + * *Note Low-Level Terminal Interface::, which covers functions for + changing how input and output to terminals or other serial devices + are processed. - - Function: int puts (const char *S) - The `puts' function writes the string S to the stream `stdout' - followed by a newline. The terminating null character of the - string is not written. (Note that `fputs' does _not_ write a - newline as this function does.) +* Menu: - `puts' is the most convenient function for printing simple - messages. For example: +* I/O Concepts:: Some basic information and terminology. +* File Names:: How to refer to a file. - puts ("This is a message."); + +File: libc.info, Node: I/O Concepts, Next: File Names, Up: I/O Overview - outputs the text `This is a message.' followed by a newline. +Input/Output Concepts +===================== - - Function: int putw (int W, FILE *STREAM) - This function writes the word W (that is, an `int') to STREAM. It - is provided for compatibility with SVID, but we recommend you use - `fwrite' instead (*note Block Input/Output::). + Before you can read or write the contents of a file, you must +establish a connection or communications channel to the file. This +process is called "opening" the file. You can open a file for reading, +writing, or both. + + The connection to an open file is represented either as a stream or +as a file descriptor. You pass this as an argument to the functions +that do the actual read or write operations, to tell them which file to +operate on. Certain functions expect streams, and others are designed +to operate on file descriptors. + + When you have finished reading to or writing from the file, you can +terminate the connection by "closing" the file. Once you have closed a +stream or file descriptor, you cannot do any more input or output +operations on it. + +* Menu: + +* Streams and File Descriptors:: The GNU Library provides two ways + to access the contents of files. +* File Position:: The number of bytes from the + beginning of the file.  -File: libc.info, Node: Character Input, Next: Line Input, Prev: Simple Output, Up: I/O on Streams +File: libc.info, Node: Streams and File Descriptors, Next: File Position, Up: I/O Concepts -Character Input -=============== +Streams and File Descriptors +---------------------------- - This section describes functions for performing character-oriented -input. These narrow streams functions are declared in the header file -`stdio.h' and the wide character functions are declared in `wchar.h'. + When you want to do input or output to a file, you have a choice of +two basic mechanisms for representing the connection between your +program and the file: file descriptors and streams. File descriptors +are represented as objects of type `int', while streams are represented +as `FILE *' objects. - These functions return an `int' or `wint_t' value (for narrow and -wide stream functions respectively) that is either a character of -input, or the special value `EOF'/`WEOF' (usually -1). For the narrow -stream functions it is important to store the result of these functions -in a variable of type `int' instead of `char', even when you plan to -use it only as a character. Storing `EOF' in a `char' variable -truncates its value to the size of a character, so that it is no longer -distinguishable from the valid character `(char) -1'. So always use an -`int' for the result of `getc' and friends, and check for `EOF' after -the call; once you've verified that the result is not `EOF', you can be -sure that it will fit in a `char' variable without loss of information. + File descriptors provide a primitive, low-level interface to input +and output operations. Both file descriptors and streams can represent +a connection to a device (such as a terminal), or a pipe or socket for +communicating with another process, as well as a normal file. But, if +you want to do control operations that are specific to a particular kind +of device, you must use a file descriptor; there are no facilities to +use streams in this way. You must also use file descriptors if your +program needs to do input or output in special modes, such as +nonblocking (or polled) input (*note File Status Flags::). - - Function: int fgetc (FILE *STREAM) - This function reads the next character as an `unsigned char' from - the stream STREAM and returns its value, converted to an `int'. - If an end-of-file condition or read error occurs, `EOF' is - returned instead. + Streams provide a higher-level interface, layered on top of the +primitive file descriptor facilities. The stream interface treats all +kinds of files pretty much alike--the sole exception being the three +styles of buffering that you can choose (*note Stream Buffering::). - - Function: wint_t fgetwc (FILE *STREAM) - This function reads the next wide character from the stream STREAM - and returns its value. If an end-of-file condition or read error - occurs, `WEOF' is returned instead. + The main advantage of using the stream interface is that the set of +functions for performing actual input and output operations (as opposed +to control operations) on streams is much richer and more powerful than +the corresponding facilities for file descriptors. The file descriptor +interface provides only simple functions for transferring blocks of +characters, but the stream interface also provides powerful formatted +input and output functions (`printf' and `scanf') as well as functions +for character- and line-oriented input and output. - - Function: int fgetc_unlocked (FILE *STREAM) - The `fgetc_unlocked' function is equivalent to the `fgetc' - function except that it does not implicitly lock the stream. + Since streams are implemented in terms of file descriptors, you can +extract the file descriptor from a stream and perform low-level +operations directly on the file descriptor. You can also initially open +a connection as a file descriptor and then make a stream associated with +that file descriptor. - - Function: wint_t fgetwc_unlocked (FILE *STREAM) - The `fgetwc_unlocked' function is equivalent to the `fgetwc' - function except that it does not implicitly lock the stream. + In general, you should stick with using streams rather than file +descriptors, unless there is some specific operation you want to do that +can only be done on a file descriptor. If you are a beginning +programmer and aren't sure what functions to use, we suggest that you +concentrate on the formatted input functions (*note Formatted Input::) +and formatted output functions (*note Formatted Output::). - This function is a GNU extension. + If you are concerned about portability of your programs to systems +other than GNU, you should also be aware that file descriptors are not +as portable as streams. You can expect any system running ISO C to +support streams, but non-GNU systems may not support file descriptors at +all, or may only implement a subset of the GNU functions that operate on +file descriptors. Most of the file descriptor functions in the GNU +library are included in the POSIX.1 standard, however. - - Function: int getc (FILE *STREAM) - This is just like `fgetc', except that it is permissible (and - typical) for it to be implemented as a macro that evaluates the - STREAM argument more than once. `getc' is often highly optimized, - so it is usually the best function to use to read a single - character. + +File: libc.info, Node: File Position, Prev: Streams and File Descriptors, Up: I/O Concepts - - Function: wint_t getwc (FILE *STREAM) - This is just like `fgetwc', except that it is permissible for it to - be implemented as a macro that evaluates the STREAM argument more - than once. `getwc' can be highly optimized, so it is usually the - best function to use to read a single wide character. +File Position +------------- - - Function: int getc_unlocked (FILE *STREAM) - The `getc_unlocked' function is equivalent to the `getc' function - except that it does not implicitly lock the stream. + One of the attributes of an open file is its "file position" that +keeps track of where in the file the next character is to be read or +written. In the GNU system, and all POSIX.1 systems, the file position +is simply an integer representing the number of bytes from the beginning +of the file. - - Function: wint_t getwc_unlocked (FILE *STREAM) - The `getwc_unlocked' function is equivalent to the `getwc' - function except that it does not implicitly lock the stream. + The file position is normally set to the beginning of the file when +it is opened, and each time a character is read or written, the file +position is incremented. In other words, access to the file is normally +"sequential". - This function is a GNU extension. + Ordinary files permit read or write operations at any position within +the file. Some other kinds of files may also permit this. Files which +do permit this are sometimes referred to as "random-access" files. You +can change the file position using the `fseek' function on a stream +(*note File Positioning::) or the `lseek' function on a file descriptor +(*note I/O Primitives::). If you try to change the file position on a +file that doesn't support random access, you get the `ESPIPE' error. - - Function: int getchar (void) - The `getchar' function is equivalent to `getc' with `stdin' as the - value of the STREAM argument. + Streams and descriptors that are opened for "append access" are +treated specially for output: output to such files is _always_ appended +sequentially to the _end_ of the file, regardless of the file position. +However, the file position is still used to control where in the file +reading is done. - - Function: wint_t getwchar (void) - The `getwchar' function is equivalent to `getwc' with `stdin' as - the value of the STREAM argument. + If you think about it, you'll realize that several programs can read +a given file at the same time. In order for each program to be able to +read the file at its own pace, each program must have its own file +pointer, which is not affected by anything the other programs do. - - Function: int getchar_unlocked (void) - The `getchar_unlocked' function is equivalent to the `getchar' - function except that it does not implicitly lock the stream. + In fact, each opening of a file creates a separate file position. +Thus, if you open a file twice even in the same program, you get two +streams or descriptors with independent file positions. - - Function: wint_t getwchar_unlocked (void) - The `getwchar_unlocked' function is equivalent to the `getwchar' - function except that it does not implicitly lock the stream. + By contrast, if you open a descriptor and then duplicate it to get +another descriptor, these two descriptors share the same file position: +changing the file position of one descriptor will affect the other. - This function is a GNU extension. + +File: libc.info, Node: File Names, Prev: I/O Concepts, Up: I/O Overview - Here is an example of a function that does input using `fgetc'. It -would work just as well using `getc' instead, or using `getchar ()' -instead of `fgetc (stdin)'. The code would also work the same for the -wide character stream functions. +File Names +========== - int - y_or_n_p (const char *question) - { - fputs (question, stdout); - while (1) - { - int c, answer; - /* Write a space to separate answer from question. */ - fputc (' ', stdout); - /* Read the first character of the line. - This should be the answer character, but might not be. */ - c = tolower (fgetc (stdin)); - answer = c; - /* Discard rest of input line. */ - while (c != '\n' && c != EOF) - c = fgetc (stdin); - /* Obey the answer if it was valid. */ - if (answer == 'y') - return 1; - if (answer == 'n') - return 0; - /* Answer was invalid: ask for valid answer. */ - fputs ("Please answer y or n:", stdout); - } - } + In order to open a connection to a file, or to perform other +operations such as deleting a file, you need some way to refer to the +file. Nearly all files have names that are strings--even files which +are actually devices such as tape drives or terminals. These strings +are called "file names". You specify the file name to say which file +you want to open or operate on. - - Function: int getw (FILE *STREAM) - This function reads a word (that is, an `int') from STREAM. It's - provided for compatibility with SVID. We recommend you use - `fread' instead (*note Block Input/Output::). Unlike `getc', any - `int' value could be a valid result. `getw' returns `EOF' when it - encounters end-of-file or an error, but there is no way to - distinguish this from an input word with value -1. + This section describes the conventions for file names and how the +operating system works with them. + +* Menu: + +* Directories:: Directories contain entries for files. +* File Name Resolution:: A file name specifies how to look up a file. +* File Name Errors:: Error conditions relating to file names. +* File Name Portability:: File name portability and syntax issues.  -File: libc.info, Node: Line Input, Next: Unreading, Prev: Character Input, Up: I/O on Streams +File: libc.info, Node: Directories, Next: File Name Resolution, Up: File Names -Line-Oriented Input -=================== +Directories +----------- - Since many programs interpret input on the basis of lines, it is -convenient to have functions to read a line of text from a stream. + In order to understand the syntax of file names, you need to +understand how the file system is organized into a hierarchy of +directories. - Standard C has functions to do this, but they aren't very safe: null -characters and even (for `gets') long lines can confuse them. So the -GNU library provides the nonstandard `getline' function that makes it -easy to read lines reliably. + A "directory" is a file that contains information to associate other +files with names; these associations are called "links" or "directory +entries". Sometimes, people speak of "files in a directory", but in +reality, a directory only contains pointers to files, not the files +themselves. - Another GNU extension, `getdelim', generalizes `getline'. It reads -a delimited record, defined as everything through the next occurrence -of a specified delimiter character. + The name of a file contained in a directory entry is called a "file +name component". In general, a file name consists of a sequence of one +or more such components, separated by the slash character (`/'). A +file name which is just one component names a file with respect to its +directory. A file name with multiple components names a directory, and +then a file in that directory, and so on. - All these functions are declared in `stdio.h'. + Some other documents, such as the POSIX standard, use the term +"pathname" for what we call a file name, and either "filename" or +"pathname component" for what this manual calls a file name component. +We don't use this terminology because a "path" is something completely +different (a list of directories to search), and we think that +"pathname" used for something else will confuse users. We always use +"file name" and "file name component" (or sometimes just "component", +where the context is obvious) in GNU documentation. Some macros use +the POSIX terminology in their names, such as `PATH_MAX'. These macros +are defined by the POSIX standard, so we cannot change their names. - - Function: ssize_t getline (char **LINEPTR, size_t *N, FILE *STREAM) - This function reads an entire line from STREAM, storing the text - (including the newline and a terminating null character) in a - buffer and storing the buffer address in `*LINEPTR'. + You can find more detailed information about operations on +directories in *Note File System Interface::. - Before calling `getline', you should place in `*LINEPTR' the - address of a buffer `*N' bytes long, allocated with `malloc'. If - this buffer is long enough to hold the line, `getline' stores the - line in this buffer. Otherwise, `getline' makes the buffer bigger - using `realloc', storing the new buffer address back in `*LINEPTR' - and the increased size back in `*N'. *Note Unconstrained - Allocation::. + +File: libc.info, Node: File Name Resolution, Next: File Name Errors, Prev: Directories, Up: File Names - If you set `*LINEPTR' to a null pointer, and `*N' to zero, before - the call, then `getline' allocates the initial buffer for you by - calling `malloc'. +File Name Resolution +-------------------- - In either case, when `getline' returns, `*LINEPTR' is a `char *' - which points to the text of the line. + A file name consists of file name components separated by slash +(`/') characters. On the systems that the GNU C library supports, +multiple successive `/' characters are equivalent to a single `/' +character. - When `getline' is successful, it returns the number of characters - read (including the newline, but not including the terminating - null). This value enables you to distinguish null characters that - are part of the line from the null character inserted as a - terminator. + The process of determining what file a file name refers to is called +"file name resolution". This is performed by examining the components +that make up a file name in left-to-right order, and locating each +successive component in the directory named by the previous component. +Of course, each of the files that are referenced as directories must +actually exist, be directories instead of regular files, and have the +appropriate permissions to be accessible by the process; otherwise the +file name resolution fails. - This function is a GNU extension, but it is the recommended way to - read lines from a stream. The alternative standard functions are - unreliable. + If a file name begins with a `/', the first component in the file +name is located in the "root directory" of the process (usually all +processes on the system have the same root directory). Such a file name +is called an "absolute file name". - If an error occurs or end of file is reached without any bytes - read, `getline' returns `-1'. + Otherwise, the first component in the file name is located in the +current working directory (*note Working Directory::). This kind of +file name is called a "relative file name". - - Function: ssize_t getdelim (char **LINEPTR, size_t *N, int - DELIMITER, FILE *STREAM) - This function is like `getline' except that the character which - tells it to stop reading is not necessarily newline. The argument - DELIMITER specifies the delimiter character; `getdelim' keeps - reading until it sees that character (or end of file). + The file name components `.' ("dot") and `..' ("dot-dot") have +special meanings. Every directory has entries for these file name +components. The file name component `.' refers to the directory +itself, while the file name component `..' refers to its "parent +directory" (the directory that contains the link for the directory in +question). As a special case, `..' in the root directory refers to the +root directory itself, since it has no parent; thus `/..' is the same +as `/'. - The text is stored in LINEPTR, including the delimiter character - and a terminating null. Like `getline', `getdelim' makes LINEPTR - bigger if it isn't big enough. + Here are some examples of file names: - `getline' is in fact implemented in terms of `getdelim', just like - this: +`/a' + The file named `a', in the root directory. - ssize_t - getline (char **lineptr, size_t *n, FILE *stream) - { - return getdelim (lineptr, n, '\n', stream); - } +`/a/b' + The file named `b', in the directory named `a' in the root + directory. - - Function: char * fgets (char *S, int COUNT, FILE *STREAM) - The `fgets' function reads characters from the stream STREAM up to - and including a newline character and stores them in the string S, - adding a null character to mark the end of the string. You must - supply COUNT characters worth of space in S, but the number of - characters read is at most COUNT - 1. The extra character space - is used to hold the null character at the end of the string. +`a' + The file named `a', in the current working directory. - If the system is already at end of file when you call `fgets', then - the contents of the array S are unchanged and a null pointer is - returned. A null pointer is also returned if a read error occurs. - Otherwise, the return value is the pointer S. +`/a/./b' + This is the same as `/a/b'. - *Warning:* If the input data has a null character, you can't tell. - So don't use `fgets' unless you know the data cannot contain a - null. Don't use it to read files edited by the user because, if - the user inserts a null character, you should either handle it - properly or print a clear error message. We recommend using - `getline' instead of `fgets'. +`./a' + The file named `a', in the current working directory. - - Function: wchar_t * fgetws (wchar_t *WS, int COUNT, FILE *STREAM) - The `fgetws' function reads wide characters from the stream STREAM - up to and including a newline character and stores them in the - string WS, adding a null wide character to mark the end of the - string. You must supply COUNT wide characters worth of space in - WS, but the number of characters read is at most COUNT - 1. The - extra character space is used to hold the null wide character at - the end of the string. +`../a' + The file named `a', in the parent directory of the current working + directory. - If the system is already at end of file when you call `fgetws', - then the contents of the array WS are unchanged and a null pointer - is returned. A null pointer is also returned if a read error - occurs. Otherwise, the return value is the pointer WS. + A file name that names a directory may optionally end in a `/'. You +can specify a file name of `/' to refer to the root directory, but the +empty string is not a meaningful file name. If you want to refer to +the current working directory, use a file name of `.' or `./'. - *Warning:* If the input data has a null wide character (which are - null bytes in the input stream), you can't tell. So don't use - `fgetws' unless you know the data cannot contain a null. Don't use - it to read files edited by the user because, if the user inserts a - null character, you should either handle it properly or print a - clear error message. + Unlike some other operating systems, the GNU system doesn't have any +built-in support for file types (or extensions) or file versions as part +of its file name syntax. Many programs and utilities use conventions +for file names--for example, files containing C source code usually +have names suffixed with `.c'--but there is nothing in the file system +itself that enforces this kind of convention. - - Function: char * fgets_unlocked (char *S, int COUNT, FILE *STREAM) - The `fgets_unlocked' function is equivalent to the `fgets' - function except that it does not implicitly lock the stream. + +File: libc.info, Node: File Name Errors, Next: File Name Portability, Prev: File Name Resolution, Up: File Names - This function is a GNU extension. +File Name Errors +---------------- - - Function: wchar_t * fgetws_unlocked (wchar_t *WS, int COUNT, FILE - *STREAM) - The `fgetws_unlocked' function is equivalent to the `fgetws' - function except that it does not implicitly lock the stream. + Functions that accept file name arguments usually detect these +`errno' error conditions relating to the file name syntax or trouble +finding the named file. These errors are referred to throughout this +manual as the "usual file name errors". - This function is a GNU extension. +`EACCES' + The process does not have search permission for a directory + component of the file name. - - Deprecated function: char * gets (char *S) - The function `gets' reads characters from the stream `stdin' up to - the next newline character, and stores them in the string S. The - newline character is discarded (note that this differs from the - behavior of `fgets', which copies the newline character into the - string). If `gets' encounters a read error or end-of-file, it - returns a null pointer; otherwise it returns S. +`ENAMETOOLONG' + This error is used when either the total length of a file name is + greater than `PATH_MAX', or when an individual file name component + has a length greater than `NAME_MAX'. *Note Limits for Files::. - *Warning:* The `gets' function is *very dangerous* because it - provides no protection against overflowing the string S. The GNU - library includes it for compatibility only. You should *always* - use `fgets' or `getline' instead. To remind you of this, the - linker (if using GNU `ld') will issue a warning whenever you use - `gets'. + In the GNU system, there is no imposed limit on overall file name + length, but some file systems may place limits on the length of a + component. + +`ENOENT' + This error is reported when a file referenced as a directory + component in the file name doesn't exist, or when a component is a + symbolic link whose target file does not exist. *Note Symbolic + Links::. + +`ENOTDIR' + A file that is referenced as a directory component in the file name + exists, but it isn't a directory. + +`ELOOP' + Too many symbolic links were resolved while trying to look up the + file name. The system has an arbitrary limit on the number of + symbolic links that may be resolved in looking up a single file + name, as a primitive way to detect loops. *Note Symbolic Links::.  -File: libc.info, Node: Unreading, Next: Block Input/Output, Prev: Line Input, Up: I/O on Streams +File: libc.info, Node: File Name Portability, Prev: File Name Errors, Up: File Names -Unreading -========= +Portability of File Names +------------------------- - In parser programs it is often useful to examine the next character -in the input stream without removing it from the stream. This is called -"peeking ahead" at the input because your program gets a glimpse of the -input it will read next. + The rules for the syntax of file names discussed in *Note File +Names::, are the rules normally used by the GNU system and by other +POSIX systems. However, other operating systems may use other +conventions. - Using stream I/O, you can peek ahead at input by first reading it and -then "unreading" it (also called "pushing it back" on the stream). -Unreading a character makes it available to be input again from the -stream, by the next call to `fgetc' or other input function on that -stream. + There are two reasons why it can be important for you to be aware of +file name portability issues: -* Menu: + * If your program makes assumptions about file name syntax, or + contains embedded literal file name strings, it is more difficult + to get it to run under other operating systems that use different + syntax conventions. -* Unreading Idea:: An explanation of unreading with pictures. -* How Unread:: How to call `ungetc' to do unreading. + * Even if you are not concerned about running your program on + machines that run other operating systems, it may still be + possible to access files that use different naming conventions. + For example, you may be able to access file systems on another + computer running a different operating system over a network, or + read and write disks in formats used by other operating systems. + + The ISO C standard says very little about file name syntax, only that +file names are strings. In addition to varying restrictions on the +length of file names and what characters can validly appear in a file +name, different operating systems use different conventions and syntax +for concepts such as structured directories and file types or +extensions. Some concepts such as file versions might be supported in +some operating systems and not by others. + + The POSIX.1 standard allows implementations to put additional +restrictions on file name syntax, concerning what characters are +permitted in file names and on the length of file name and file name +component strings. However, in the GNU system, you do not need to worry +about these restrictions; any character except the null character is +permitted in a file name string, and there are no limits on the length +of file name strings.  -File: libc.info, Node: Unreading Idea, Next: How Unread, Up: Unreading +File: libc.info, Node: I/O on Streams, Next: Low-Level I/O, Prev: I/O Overview, Up: Top -What Unreading Means --------------------- +Input/Output on Streams +*********************** - Here is a pictorial explanation of unreading. Suppose you have a -stream reading a file that contains just six characters, the letters -`foobar'. Suppose you have read three characters so far. The -situation looks like this: + This chapter describes the functions for creating streams and +performing input and output operations on them. As discussed in *Note +I/O Overview::, a stream is a fairly abstract, high-level concept +representing a communications channel to a file, device, or process. - f o o b a r - ^ +* Menu: -so the next input character will be `b'. +* Streams:: About the data type representing a stream. +* Standard Streams:: Streams to the standard input and output + devices are created for you. +* Opening Streams:: How to create a stream to talk to a file. +* Closing Streams:: Close a stream when you are finished with it. +* Streams and Threads:: Issues with streams in threaded programs. +* Streams and I18N:: Streams in internationalized applications. +* Simple Output:: Unformatted output by characters and lines. +* Character Input:: Unformatted input by characters and words. +* Line Input:: Reading a line or a record from a stream. +* Unreading:: Peeking ahead/pushing back input just read. +* Block Input/Output:: Input and output operations on blocks of data. +* Formatted Output:: `printf' and related functions. +* Customizing Printf:: You can define new conversion specifiers for + `printf' and friends. +* Formatted Input:: `scanf' and related functions. +* EOF and Errors:: How you can tell if an I/O error happens. +* Error Recovery:: What you can do about errors. +* Binary Streams:: Some systems distinguish between text files + and binary files. +* File Positioning:: About random-access streams. +* Portable Positioning:: Random access on peculiar ISO C systems. +* Stream Buffering:: How to control buffering of streams. +* Other Kinds of Streams:: Streams that do not necessarily correspond + to an open file. +* Formatted Messages:: Print strictly formatted messages. - If instead of reading `b' you unread the letter `o', you get a -situation like this: + +File: libc.info, Node: Streams, Next: Standard Streams, Up: I/O on Streams - f o o b a r - | - o-- - ^ +Streams +======= -so that the next input characters will be `o' and `b'. + For historical reasons, the type of the C data structure that +represents a stream is called `FILE' rather than "stream". Since most +of the library functions deal with objects of type `FILE *', sometimes +the term "file pointer" is also used to mean "stream". This leads to +unfortunate confusion over terminology in many books on C. This +manual, however, is careful to use the terms "file" and "stream" only +in the technical sense. - If you unread `9' instead of `o', you get this situation: + The `FILE' type is declared in the header file `stdio.h'. - f o o b a r - | - 9-- - ^ + - Data Type: FILE + This is the data type used to represent stream objects. A `FILE' + object holds all of the internal state information about the + connection to the associated file, including such things as the + file position indicator and buffering information. Each stream + also has error and end-of-file status indicators that can be + tested with the `ferror' and `feof' functions; see *Note EOF and + Errors::. -so that the next input characters will be `9' and `b'. + `FILE' objects are allocated and managed internally by the +input/output library functions. Don't try to create your own objects of +type `FILE'; let the library do it. Your programs should deal only +with pointers to these objects (that is, `FILE *' values) rather than +the objects themselves.  -File: libc.info, Node: How Unread, Prev: Unreading Idea, Up: Unreading +File: libc.info, Node: Standard Streams, Next: Opening Streams, Prev: Streams, Up: I/O on Streams -Using `ungetc' To Do Unreading ------------------------------- +Standard Streams +================ - The function to unread a character is called `ungetc', because it -reverses the action of `getc'. + When the `main' function of your program is invoked, it already has +three predefined streams open and available for use. These represent +the "standard" input and output channels that have been established for +the process. - - Function: int ungetc (int C, FILE *STREAM) - The `ungetc' function pushes back the character C onto the input - stream STREAM. So the next input from STREAM will read C before - anything else. + These streams are declared in the header file `stdio.h'. - If C is `EOF', `ungetc' does nothing and just returns `EOF'. This - lets you call `ungetc' with the return value of `getc' without - needing to check for an error from `getc'. + - Variable: FILE * stdin + The "standard input" stream, which is the normal source of input + for the program. - The character that you push back doesn't have to be the same as - the last character that was actually read from the stream. In - fact, it isn't necessary to actually read any characters from the - stream before unreading them with `ungetc'! But that is a strange - way to write a program; usually `ungetc' is used only to unread a - character that was just read from the same stream. + - Variable: FILE * stdout + The "standard output" stream, which is used for normal output from + the program. - The GNU C library only supports one character of pushback--in other - words, it does not work to call `ungetc' twice without doing input - in between. Other systems might let you push back multiple - characters; then reading from the stream retrieves the characters - in the reverse order that they were pushed. + - Variable: FILE * stderr + The "standard error" stream, which is used for error messages and + diagnostics issued by the program. - Pushing back characters doesn't alter the file; only the internal - buffering for the stream is affected. If a file positioning - function (such as `fseek', `fseeko' or `rewind'; *note File - Positioning::) is called, any pending pushed-back characters are - discarded. + In the GNU system, you can specify what files or processes +correspond to these streams using the pipe and redirection facilities +provided by the shell. (The primitives shells use to implement these +facilities are described in *Note File System Interface::.) Most other +operating systems provide similar mechanisms, but the details of how to +use them can vary. - Unreading a character on a stream that is at end of file clears the - end-of-file indicator for the stream, because it makes the - character of input available. After you read that character, - trying to read again will encounter end of file. + In the GNU C library, `stdin', `stdout', and `stderr' are normal +variables which you can set just like any others. For example, to +redirect the standard output to a file, you could do: - - Function: wint_t ungetwc (wint_t WC, FILE *STREAM) - The `ungetwc' function behaves just like `ungetc' just that it - pushes back a wide character. + fclose (stdout); + stdout = fopen ("standard-output-file", "w"); - Here is an example showing the use of `getc' and `ungetc' to skip -over whitespace characters. When this function reaches a -non-whitespace character, it unreads that character to be seen again on -the next read operation on the stream. + Note however, that in other systems `stdin', `stdout', and `stderr' +are macros that you cannot assign to in the normal way. But you can +use `freopen' to get the effect of closing one and reopening it. *Note +Opening Streams::. - #include - #include - - void - skip_whitespace (FILE *stream) - { - int c; - do - /* No need to check for `EOF' because it is not - `isspace', and `ungetc' ignores `EOF'. */ - c = getc (stream); - while (isspace (c)); - ungetc (c, stream); - } + The three streams `stdin', `stdout', and `stderr' are not unoriented +at program start (*note Streams and I18N::).  -File: libc.info, Node: Block Input/Output, Next: Formatted Output, Prev: Unreading, Up: I/O on Streams - -Block Input/Output -================== +File: libc.info, Node: Opening Streams, Next: Closing Streams, Prev: Standard Streams, Up: I/O on Streams - This section describes how to do input and output operations on -blocks of data. You can use these functions to read and write binary -data, as well as to read and write text in fixed-size blocks instead of -by characters or lines. +Opening Streams +=============== - Binary files are typically used to read and write blocks of data in -the same format as is used to represent the data in a running program. -In other words, arbitrary blocks of memory--not just character or string -objects--can be written to a binary file, and meaningfully read in -again by the same program. + Opening a file with the `fopen' function creates a new stream and +establishes a connection between the stream and a file. This may +involve creating a new file. - Storing data in binary form is often considerably more efficient than -using the formatted I/O functions. Also, for floating-point numbers, -the binary form avoids possible loss of precision in the conversion -process. On the other hand, binary files can't be examined or modified -easily using many standard file utilities (such as text editors), and -are not portable between different implementations of the language, or -different kinds of computers. + Everything described in this section is declared in the header file +`stdio.h'. - These functions are declared in `stdio.h'. + - Function: FILE * fopen (const char *FILENAME, const char *OPENTYPE) + The `fopen' function opens a stream for I/O to the file FILENAME, + and returns a pointer to the stream. - - Function: size_t fread (void *DATA, size_t SIZE, size_t COUNT, FILE - *STREAM) - This function reads up to COUNT objects of size SIZE into the - array DATA, from the stream STREAM. It returns the number of - objects actually read, which might be less than COUNT if a read - error occurs or the end of the file is reached. This function - returns a value of zero (and doesn't read anything) if either SIZE - or COUNT is zero. + The OPENTYPE argument is a string that controls how the file is + opened and specifies attributes of the resulting stream. It must + begin with one of the following sequences of characters: - If `fread' encounters end of file in the middle of an object, it - returns the number of complete objects read, and discards the - partial object. Therefore, the stream remains at the actual end - of the file. + `r' + Open an existing file for reading only. - - Function: size_t fread_unlocked (void *DATA, size_t SIZE, size_t - COUNT, FILE *STREAM) - The `fread_unlocked' function is equivalent to the `fread' - function except that it does not implicitly lock the stream. + `w' + Open the file for writing only. If the file already exists, + it is truncated to zero length. Otherwise a new file is + created. - This function is a GNU extension. + `a' + Open a file for append access; that is, writing at the end of + file only. If the file already exists, its initial contents + are unchanged and output to the stream is appended to the end + of the file. Otherwise, a new, empty file is created. - - Function: size_t fwrite (const void *DATA, size_t SIZE, size_t - COUNT, FILE *STREAM) - This function writes up to COUNT objects of size SIZE from the - array DATA, to the stream STREAM. The return value is normally - COUNT, if the call succeeds. Any other value indicates some sort - of error, such as running out of space. + `r+' + Open an existing file for both reading and writing. The + initial contents of the file are unchanged and the initial + file position is at the beginning of the file. - - Function: size_t fwrite_unlocked (const void *DATA, size_t SIZE, - size_t COUNT, FILE *STREAM) - The `fwrite_unlocked' function is equivalent to the `fwrite' - function except that it does not implicitly lock the stream. + `w+' + Open a file for both reading and writing. If the file + already exists, it is truncated to zero length. Otherwise, a + new file is created. - This function is a GNU extension. + `a+' + Open or create file for both reading and appending. If the + file exists, its initial contents are unchanged. Otherwise, + a new file is created. The initial file position for reading + is at the beginning of the file, but output is always + appended to the end of the file. - -File: libc.info, Node: Formatted Output, Next: Customizing Printf, Prev: Block Input/Output, Up: I/O on Streams + As you can see, `+' requests a stream that can do both input and + output. The ISO standard says that when using such a stream, you + must call `fflush' (*note Stream Buffering::) or a file positioning + function such as `fseek' (*note File Positioning::) when switching + from reading to writing or vice versa. Otherwise, internal buffers + might not be emptied properly. The GNU C library does not have + this limitation; you can do arbitrary reading and writing + operations on a stream in whatever order. -Formatted Output -================ + Additional characters may appear after these to specify flags for + the call. Always put the mode (`r', `w+', etc.) first; that is + the only part you are guaranteed will be understood by all systems. - The functions described in this section (`printf' and related -functions) provide a convenient way to perform formatted output. You -call `printf' with a "format string" or "template string" that -specifies how to format the values of the remaining arguments. + The GNU C library defines one additional character for use in + OPENTYPE: the character `x' insists on creating a new file--if a + file FILENAME already exists, `fopen' fails rather than opening + it. If you use `x' you are guaranteed that you will not clobber + an existing file. This is equivalent to the `O_EXCL' option to + the `open' function (*note Opening and Closing Files::). - Unless your program is a filter that specifically performs line- or -character-oriented processing, using `printf' or one of the other -related functions described in this section is usually the easiest and -most concise way to perform output. These functions are especially -useful for printing error messages, tables of data, and the like. + The character `b' in OPENTYPE has a standard meaning; it requests + a binary stream rather than a text stream. But this makes no + difference in POSIX systems (including the GNU system). If both + `+' and `b' are specified, they can appear in either order. *Note + Binary Streams::. -* Menu: + If the OPENTYPE string contains the sequence `,ccs=STRING' then + STRING is taken as the name of a coded character set and `fopen' + will mark the stream as wide-oriented which appropriate conversion + functions in place to convert from and to the character set STRING + is place. Any other stream is opened initially unoriented and the + orientation is decided with the first file operation. If the + first operation is a wide character operation, the stream is not + only marked as wide-oriented, also the conversion functions to + convert to the coded character set used for the current locale are + loaded. This will not change anymore from this point on even if + the locale selected for the `LC_CTYPE' category is changed. -* Formatted Output Basics:: Some examples to get you started. -* Output Conversion Syntax:: General syntax of conversion - specifications. -* Table of Output Conversions:: Summary of output conversions and - what they do. -* Integer Conversions:: Details about formatting of integers. -* Floating-Point Conversions:: Details about formatting of - floating-point numbers. -* Other Output Conversions:: Details about formatting of strings, - characters, pointers, and the like. -* Formatted Output Functions:: Descriptions of the actual functions. -* Dynamic Output:: Functions that allocate memory for the output. -* Variable Arguments Output:: `vprintf' and friends. -* Parsing a Template String:: What kinds of args does a given template - call for? -* Example of Parsing:: Sample program using `parse_printf_format'. + Any other characters in OPENTYPE are simply ignored. They may be + meaningful in other systems. - -File: libc.info, Node: Formatted Output Basics, Next: Output Conversion Syntax, Up: Formatted Output + If the open fails, `fopen' returns a null pointer. -Formatted Output Basics ------------------------ + When the sources are compiling with `_FILE_OFFSET_BITS == 64' on a + 32 bit machine this function is in fact `fopen64' since the LFS + interface replaces transparently the old interface. - The `printf' function can be used to print any number of arguments. -The template string argument you supply in a call provides information -not only about the number of additional arguments, but also about their -types and what style should be used for printing them. + You can have multiple streams (or file descriptors) pointing to the +same file open at the same time. If you do only input, this works +straightforwardly, but you must be careful if any output streams are +included. *Note Stream/Descriptor Precautions::. This is equally true +whether the streams are in one program (not usual) or in several +programs (which can easily happen). It may be advantageous to use the +file locking facilities to avoid simultaneous access. *Note File +Locks::. - Ordinary characters in the template string are simply written to the -output stream as-is, while "conversion specifications" introduced by a -`%' character in the template cause subsequent arguments to be -formatted and written to the output stream. For example, + - Function: FILE * fopen64 (const char *FILENAME, const char *OPENTYPE) + This function is similar to `fopen' but the stream it returns a + pointer for is opened using `open64'. Therefore this stream can be + used even on files larger then 2^31 bytes on 32 bit machines. - int pct = 37; - char filename[] = "foo.txt"; - printf ("Processing of `%s' is %d%% finished.\nPlease be patient.\n", - filename, pct); + Please note that the return type is still `FILE *'. There is no + special `FILE' type for the LFS interface. -produces output like + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `fopen' and + so transparently replaces the old interface. - Processing of `foo.txt' is 37% finished. - Please be patient. + - Macro: int FOPEN_MAX + The value of this macro is an integer constant expression that + represents the minimum number of streams that the implementation + guarantees can be open simultaneously. You might be able to open + more than this many streams, but that is not guaranteed. The + value of this constant is at least eight, which includes the three + standard streams `stdin', `stdout', and `stderr'. In POSIX.1 + systems this value is determined by the `OPEN_MAX' parameter; + *note General Limits::. In BSD and GNU, it is controlled by the + `RLIMIT_NOFILE' resource limit; *note Limits on Resources::. - This example shows the use of the `%d' conversion to specify that an -`int' argument should be printed in decimal notation, the `%s' -conversion to specify printing of a string argument, and the `%%' -conversion to print a literal `%' character. + - Function: FILE * freopen (const char *FILENAME, const char + *OPENTYPE, FILE *STREAM) + This function is like a combination of `fclose' and `fopen'. It + first closes the stream referred to by STREAM, ignoring any errors + that are detected in the process. (Because errors are ignored, + you should not use `freopen' on an output stream if you have + actually done any output using the stream.) Then the file named by + FILENAME is opened with mode OPENTYPE as for `fopen', and + associated with the same stream object STREAM. - There are also conversions for printing an integer argument as an -unsigned value in octal, decimal, or hexadecimal radix (`%o', `%u', or -`%x', respectively); or as a character value (`%c'). + If the operation fails, a null pointer is returned; otherwise, + `freopen' returns STREAM. - Floating-point numbers can be printed in normal, fixed-point notation -using the `%f' conversion or in exponential notation using the `%e' -conversion. The `%g' conversion uses either `%e' or `%f' format, -depending on what is more appropriate for the magnitude of the -particular number. + `freopen' has traditionally been used to connect a standard stream + such as `stdin' with a file of your own choice. This is useful in + programs in which use of a standard stream for certain purposes is + hard-coded. In the GNU C library, you can simply close the + standard streams and open new ones with `fopen'. But other + systems lack this ability, so using `freopen' is more portable. - You can control formatting more precisely by writing "modifiers" -between the `%' and the character that indicates which conversion to -apply. These slightly alter the ordinary behavior of the conversion. -For example, most conversion specifications permit you to specify a -minimum field width and a flag indicating whether you want the result -left- or right-justified within the field. + When the sources are compiling with `_FILE_OFFSET_BITS == 64' on a + 32 bit machine this function is in fact `freopen64' since the LFS + interface replaces transparently the old interface. - The specific flags and modifiers that are permitted and their -interpretation vary depending on the particular conversion. They're all -described in more detail in the following sections. Don't worry if this -all seems excessively complicated at first; you can almost always get -reasonable free-format output without using any of the modifiers at all. -The modifiers are mostly used to make the output look "prettier" in -tables. + - Function: FILE * freopen64 (const char *FILENAME, const char + *OPENTYPE, FILE *STREAM) + This function is similar to `freopen'. The only difference is that + on 32 bit machine the stream returned is able to read beyond the + 2^31 bytes limits imposed by the normal interface. It should be + noted that the stream pointed to by STREAM need not be opened + using `fopen64' or `freopen64' since its mode is not important for + this function. - -File: libc.info, Node: Output Conversion Syntax, Next: Table of Output Conversions, Prev: Formatted Output Basics, Up: Formatted Output + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `freopen' + and so transparently replaces the old interface. -Output Conversion Syntax ------------------------- + In some situations it is useful to know whether a given stream is +available for reading or writing. This information is normally not +available and would have to be remembered separately. Solaris +introduced a few functions to get this information from the stream +descriptor and these functions are also available in the GNU C library. - This section provides details about the precise syntax of conversion -specifications that can appear in a `printf' template string. + - Function: int __freadable (FILE *STREAM) + The `__freadable' function determines whether the stream STREAM + was opened to allow reading. In this case the return value is + nonzero. For write-only streams the function returns zero. - Characters in the template string that are not part of a conversion -specification are printed as-is to the output stream. Multibyte -character sequences (*note Character Set Handling::) are permitted in a -template string. + This function is declared in `stdio_ext.h'. - The conversion specifications in a `printf' template string have the -general form: + - Function: int __fwritable (FILE *STREAM) + The `__fwritable' function determines whether the stream STREAM + was opened to allow writing. In this case the return value is + nonzero. For read-only streams the function returns zero. - % [ PARAM-NO $] FLAGS WIDTH [ . PRECISION ] TYPE CONVERSION + This function is declared in `stdio_ext.h'. - For example, in the conversion specifier `%-10.8ld', the `-' is a -flag, `10' specifies the field width, the precision is `8', the letter -`l' is a type modifier, and `d' specifies the conversion style. (This -particular type specifier says to print a `long int' argument in -decimal notation, with a minimum of 8 digits left-justified in a field -at least 10 characters wide.) + For slightly different kind of problems there are two more functions. +They provide even finer-grained information. - In more detail, output conversion specifications consist of an -initial `%' character followed in sequence by: + - Function: int __freading (FILE *STREAM) + The `__freading' function determines whether the stream STREAM was + last read from or whether it is opened read-only. In this case + the return value is nonzero, otherwise it is zero. Determining + whether a stream opened for reading and writing was last used for + writing allows to draw conclusions about the content about the + buffer, among other things. - * An optional specification of the parameter used for this format. - Normally the parameters to the `printf' function are assigned to - the formats in the order of appearance in the format string. But - in some situations (such as message translation) this is not - desirable and this extension allows an explicit parameter to be - specified. + This function is declared in `stdio_ext.h'. - The PARAM-NO part of the format must be an integer in the range of - 1 to the maximum number of arguments present to the function call. - Some implementations limit this number to a certainly upper - bound. The exact limit can be retrieved by the following constant. + - Function: int __fwriting (FILE *STREAM) + The `__fwriting' function determines whether the stream STREAM was + last written to or whether it is opened write-only. In this case + the return value is nonzero, otherwise it is zero. - - Macro: NL_ARGMAX - The value of `ARGMAX' is the maximum value allowed for the - specification of an positional parameter in a `printf' call. - The actual value in effect at runtime can be retrieved by - using `sysconf' using the `_SC_NL_ARGMAX' parameter *note - Sysconf Definition::. + This function is declared in `stdio_ext.h'. - Some system have a quite low limit such as 9 for System V - systems. The GNU C library has no real limit. + +File: libc.info, Node: Closing Streams, Next: Streams and Threads, Prev: Opening Streams, Up: I/O on Streams - If any of the formats has a specification for the parameter - position all of them in the format string shall have one. - Otherwise the behavior is undefined. +Closing Streams +=============== - * Zero or more "flag characters" that modify the normal behavior of - the conversion specification. + When a stream is closed with `fclose', the connection between the +stream and the file is canceled. After you have closed a stream, you +cannot perform any additional operations on it. - * An optional decimal integer specifying the "minimum field width". - If the normal conversion produces fewer characters than this, the - field is padded with spaces to the specified width. This is a - _minimum_ value; if the normal conversion produces more characters - than this, the field is _not_ truncated. Normally, the output is - right-justified within the field. + - Function: int fclose (FILE *STREAM) + This function causes STREAM to be closed and the connection to the + corresponding file to be broken. Any buffered output is written + and any buffered input is discarded. The `fclose' function returns + a value of `0' if the file was closed successfully, and `EOF' if + an error was detected. - You can also specify a field width of `*'. This means that the - next argument in the argument list (before the actual value to be - printed) is used as the field width. The value must be an `int'. - If the value is negative, this means to set the `-' flag (see - below) and to use the absolute value as the field width. + It is important to check for errors when you call `fclose' to close + an output stream, because real, everyday errors can be detected at + this time. For example, when `fclose' writes the remaining + buffered output, it might get an error because the disk is full. + Even if you know the buffer is empty, errors can still occur when + closing a file if you are using NFS. - * An optional "precision" to specify the number of digits to be - written for the numeric conversions. If the precision is - specified, it consists of a period (`.') followed optionally by a - decimal integer (which defaults to zero if omitted). + The function `fclose' is declared in `stdio.h'. - You can also specify a precision of `*'. This means that the next - argument in the argument list (before the actual value to be - printed) is used as the precision. The value must be an `int', - and is ignored if it is negative. If you specify `*' for both the - field width and precision, the field width argument precedes the - precision argument. Other C library versions may not recognize - this syntax. + To close all streams currently available the GNU C Library provides +another function. - * An optional "type modifier character", which is used to specify the - data type of the corresponding argument if it differs from the - default type. (For example, the integer conversions assume a type - of `int', but you can specify `h', `l', or `L' for other integer - types.) + - Function: int fcloseall (void) + This function causes all open streams of the process to be closed + and the connection to corresponding files to be broken. All + buffered data is written and any buffered input is discarded. The + `fcloseall' function returns a value of `0' if all the files were + closed successfully, and `EOF' if an error was detected. - * A character that specifies the conversion to be applied. + This function should be used only in special situations, e.g., + when an error occurred and the program must be aborted. Normally + each single stream should be closed separately so that problems + with individual streams can be identified. It is also problematic + since the standard streams (*note Standard Streams::) will also be + closed. - The exact options that are permitted and how they are interpreted -vary between the different conversion specifiers. See the descriptions -of the individual conversions for information about the particular -options that they use. + The function `fcloseall' is declared in `stdio.h'. - With the `-Wformat' option, the GNU C compiler checks calls to -`printf' and related functions. It examines the format string and -verifies that the correct number and types of arguments are supplied. -There is also a GNU C syntax to tell the compiler that a function you -write uses a `printf'-style format string. *Note Declaring Attributes -of Functions: (gcc.info)Function Attributes, for more information. + If the `main' function to your program returns, or if you call the +`exit' function (*note Normal Termination::), all open streams are +automatically closed properly. If your program terminates in any other +manner, such as by calling the `abort' function (*note Aborting a +Program::) or from a fatal signal (*note Signal Handling::), open +streams might not be closed properly. Buffered output might not be +flushed and files may be incomplete. For more information on buffering +of streams, see *Note Stream Buffering::. diff -durpN glibc-2.2.4/manual/libc.info-17 glibc-2.2.5/manual/libc.info-17 --- glibc-2.2.4/manual/libc.info-17 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-17 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1179 +33,1098 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Table of Output Conversions, Next: Integer Conversions, Prev: Output Conversion Syntax, Up: Formatted Output - -Table of Output Conversions ---------------------------- - - Here is a table summarizing what all the different conversions do: - -`%d', `%i' - Print an integer as a signed decimal number. *Note Integer - Conversions::, for details. `%d' and `%i' are synonymous for - output, but are different when used with `scanf' for input (*note - Table of Input Conversions::). - -`%o' - Print an integer as an unsigned octal number. *Note Integer - Conversions::, for details. - -`%u' - Print an integer as an unsigned decimal number. *Note Integer - Conversions::, for details. - -`%x', `%X' - Print an integer as an unsigned hexadecimal number. `%x' uses - lower-case letters and `%X' uses upper-case. *Note Integer - Conversions::, for details. - -`%f' - Print a floating-point number in normal (fixed-point) notation. - *Note Floating-Point Conversions::, for details. - -`%e', `%E' - Print a floating-point number in exponential notation. `%e' uses - lower-case letters and `%E' uses upper-case. *Note Floating-Point - Conversions::, for details. - -`%g', `%G' - Print a floating-point number in either normal or exponential - notation, whichever is more appropriate for its magnitude. `%g' - uses lower-case letters and `%G' uses upper-case. *Note - Floating-Point Conversions::, for details. - -`%a', `%A' - Print a floating-point number in a hexadecimal fractional notation - which the exponent to base 2 represented in decimal digits. `%a' - uses lower-case letters and `%A' uses upper-case. *Note - Floating-Point Conversions::, for details. - -`%c' - Print a single character. *Note Other Output Conversions::. - -`%C' - This is an alias for `%lc' which is supported for compatibility - with the Unix standard. - -`%s' - Print a string. *Note Other Output Conversions::. - -`%S' - This is an alias for `%ls' which is supported for compatibility - with the Unix standard. - -`%p' - Print the value of a pointer. *Note Other Output Conversions::. - -`%n' - Get the number of characters printed so far. *Note Other Output - Conversions::. Note that this conversion specification never - produces any output. - -`%m' - Print the string corresponding to the value of `errno'. (This is - a GNU extension.) *Note Other Output Conversions::. - -`%%' - Print a literal `%' character. *Note Other Output Conversions::. - - If the syntax of a conversion specification is invalid, unpredictable -things will happen, so don't do this. If there aren't enough function -arguments provided to supply values for all the conversion -specifications in the template string, or if the arguments are not of -the correct types, the results are unpredictable. If you supply more -arguments than conversion specifications, the extra argument values are -simply ignored; this is sometimes useful. - - -File: libc.info, Node: Integer Conversions, Next: Floating-Point Conversions, Prev: Table of Output Conversions, Up: Formatted Output - -Integer Conversions -------------------- - - This section describes the options for the `%d', `%i', `%o', `%u', -`%x', and `%X' conversion specifications. These conversions print -integers in various formats. - - The `%d' and `%i' conversion specifications both print an `int' -argument as a signed decimal number; while `%o', `%u', and `%x' print -the argument as an unsigned octal, decimal, or hexadecimal number -(respectively). The `%X' conversion specification is just like `%x' -except that it uses the characters `ABCDEF' as digits instead of -`abcdef'. - - The following flags are meaningful: - -`-' - Left-justify the result in the field (instead of the normal - right-justification). - -`+' - For the signed `%d' and `%i' conversions, print a plus sign if the - value is positive. - -` ' - For the signed `%d' and `%i' conversions, if the result doesn't - start with a plus or minus sign, prefix it with a space character - instead. Since the `+' flag ensures that the result includes a - sign, this flag is ignored if you supply both of them. +File: libc.info, Node: Streams and Threads, Next: Streams and I18N, Prev: Closing Streams, Up: I/O on Streams -`#' - For the `%o' conversion, this forces the leading digit to be `0', - as if by increasing the precision. For `%x' or `%X', this - prefixes a leading `0x' or `0X' (respectively) to the result. - This doesn't do anything useful for the `%d', `%i', or `%u' - conversions. Using this flag produces output which can be parsed - by the `strtoul' function (*note Parsing of Integers::) and - `scanf' with the `%i' conversion (*note Numeric Input - Conversions::). +Streams and Threads +=================== -`'' - Separate the digits into groups as specified by the locale - specified for the `LC_NUMERIC' category; *note General Numeric::. - This flag is a GNU extension. + Streams can be used in multi-threaded applications in the same way +they are used in single-threaded applications. But the programmer must +be aware of a the possible complications. It is important to know about +these also if the program one writes never use threads since the design +and implementation of many stream functions is heavily influenced by the +requirements added by multi-threaded programming. -`0' - Pad the field with zeros instead of spaces. The zeros are placed - after any indication of sign or base. This flag is ignored if the - `-' flag is also specified, or if a precision is specified. + The POSIX standard requires that by default the stream operations are +atomic. I.e., issuing two stream operations for the same stream in two +threads at the same time will cause the operations to be executed as if +they were issued sequentially. The buffer operations performed while +reading or writing are protected from other uses of the same stream. To +do this each stream has an internal lock object which has to be +(implicitly) acquired before any work can be done. - If a precision is supplied, it specifies the minimum number of -digits to appear; leading zeros are produced if necessary. If you -don't specify a precision, the number is printed with as many digits as -it needs. If you convert a value of zero with an explicit precision of -zero, then no characters at all are produced. + But there are situations where this is not enough and there are also +situations where this is not wanted. The implicit locking is not enough +if the program requires more than one stream function call to happen +atomically. One example would be if an output line a program wants to +generate is created by several function calls. The functions by +themselves would ensure only atomicity of their own operation, but not +atomicity over all the function calls. For this it is necessary to +perform the stream locking in the application code. - Without a type modifier, the corresponding argument is treated as an -`int' (for the signed conversions `%i' and `%d') or `unsigned int' (for -the unsigned conversions `%o', `%u', `%x', and `%X'). Recall that -since `printf' and friends are variadic, any `char' and `short' -arguments are automatically converted to `int' by the default argument -promotions. For arguments of other integer types, you can use these -modifiers: + - Function: void flockfile (FILE *STREAM) + The `flockfile' function acquires the internal locking object + associated with the stream STREAM. This ensures that no other + thread can explicitly through `flockfile'/`ftrylockfile' or + implicit through a call of a stream function lock the stream. The + thread will block until the lock is acquired. An explicit call to + `funlockfile' has to be used to release the lock. -`hh' - Specifies that the argument is a `signed char' or `unsigned char', - as appropriate. A `char' argument is converted to an `int' or - `unsigned int' by the default argument promotions anyway, but the - `h' modifier says to convert it back to a `char' again. + - Function: int ftrylockfile (FILE *STREAM) + The `ftrylockfile' function tries to acquire the internal locking + object associated with the stream STREAM just like `flockfile'. + But unlike `flockfile' this function does not block if the lock is + not available. `ftrylockfile' returns zero if the lock was + successfully acquired. Otherwise the stream is locked by another + thread. - This modifier was introduced in ISO C99. + - Function: void funlockfile (FILE *STREAM) + The `funlockfile' function releases the internal locking object of + the stream STREAM. The stream must have been locked before by a + call to `flockfile' or a successful call of `ftrylockfile'. The + implicit locking performed by the stream operations do not count. + The `funlockfile' function does not return an error status and the + behavior of a call for a stream which is not locked by the current + thread is undefined. -`h' - Specifies that the argument is a `short int' or `unsigned short - int', as appropriate. A `short' argument is converted to an `int' - or `unsigned int' by the default argument promotions anyway, but - the `h' modifier says to convert it back to a `short' again. + The following example shows how the functions above can be used to +generate an output line atomically even in multi-threaded applications +(yes, the same job could be done with one `fprintf' call but it is +sometimes not possible): -`j' - Specifies that the argument is a `intmax_t' or `uintmax_t', as - appropriate. + FILE *fp; + { + ... + flockfile (fp); + fputs ("This is test number ", fp); + fprintf (fp, "%d\n", test); + funlockfile (fp) + } - This modifier was introduced in ISO C99. + Without the explicit locking it would be possible for another thread +to use the stream FP after the `fputs' call return and before `fprintf' +was called with the result that the number does not follow the word +`number'. -`l' - Specifies that the argument is a `long int' or `unsigned long - int', as appropriate. Two `l' characters is like the `L' - modifier, below. + From this description it might already be clear that the locking +objects in streams are no simple mutexes. Since locking the same +stream twice in the same thread is allowed the locking objects must be +equivalent to recursive mutexes. These mutexes keep track of the owner +and the number of times the lock is acquired. The same number of +`funlockfile' calls by the same threads is necessary to unlock the +stream completely. For instance: - If used with `%c' or `%s' the corresponding parameter is - considered as a wide character or wide character string - respectively. This use of `l' was introduced in Amendment 1 to - ISO C90. + void + foo (FILE *fp) + { + ftrylockfile (fp); + fputs ("in foo\n", fp); + /* This is very wrong!!! */ + funlockfile (fp); + } -`L' -`ll' -`q' - Specifies that the argument is a `long long int'. (This type is - an extension supported by the GNU C compiler. On systems that - don't support extra-long integers, this is the same as `long int'.) + It is important here that the `funlockfile' function is only called +if the `ftrylockfile' function succeeded in locking the stream. It is +therefore always wrong to ignore the result of `ftrylockfile'. And it +makes no sense since otherwise one would use `flockfile'. The result +of code like that above is that either `funlockfile' tries to free a +stream that hasn't been locked by the current thread or it frees the +stream prematurely. The code should look like this: - The `q' modifier is another name for the same thing, which comes - from 4.4 BSD; a `long long int' is sometimes called a "quad" `int'. + void + foo (FILE *fp) + { + if (ftrylockfile (fp) == 0) + { + fputs ("in foo\n", fp); + funlockfile (fp); + } + } -`t' - Specifies that the argument is a `ptrdiff_t'. + Now that we covered why it is necessary to have these locking it is +necessary to talk about situations when locking is unwanted and what can +be done. The locking operations (explicit or implicit) don't come for +free. Even if a lock is not taken the cost is not zero. The operations +which have to be performed require memory operations that are safe in +multi-processor environments. With the many local caches involved in +such systems this is quite costly. So it is best to avoid the locking +completely if it is not needed - because the code in question is never +used in a context where two or more threads may use a stream at a time. +This can be determined most of the time for application code; for +library code which can be used in many contexts one should default to be +conservative and use locking. - This modifier was introduced in ISO C99. + There are two basic mechanisms to avoid locking. The first is to use +the `_unlocked' variants of the stream operations. The POSIX standard +defines quite a few of those and the GNU library adds a few more. +These variants of the functions behave just like the functions with the +name without the suffix except that they do not lock the stream. Using +these functions is very desirable since they are potentially much +faster. This is not only because the locking operation itself is +avoided. More importantly, functions like `putc' and `getc' are very +simple and traditionally (before the introduction of threads) were +implemented as macros which are very fast if the buffer is not empty. +With the addition of locking requirements these functions are no longer +implemented as macros since they would would expand to too much code. +But these macros are still available with the same functionality under +the new names `putc_unlocked' and `getc_unlocked'. This possibly huge +difference of speed also suggests the use of the `_unlocked' functions +even if locking is required. The difference is that the locking then +has to be performed in the program: -`z' -`Z' - Specifies that the argument is a `size_t'. + void + foo (FILE *fp, char *buf) + { + flockfile (fp); + while (*buf != '/') + putc_unlocked (*buf++, fp); + funlockfile (fp); + } - `z' was introduced in ISO C99. `Z' is a GNU extension predating - this addition and should not be used in new code. + If in this example the `putc' function would be used and the +explicit locking would be missing the `putc' function would have to +acquire the lock in every call, potentially many times depending on when +the loop terminates. Writing it the way illustrated above allows the +`putc_unlocked' macro to be used which means no locking and direct +manipulation of the buffer of the stream. - Here is an example. Using the template string: + A second way to avoid locking is by using a non-standard function +which was introduced in Solaris and is available in the GNU C library +as well. - "|%5d|%-5d|%+5d|%+-5d|% 5d|%05d|%5.0d|%5.2d|%d|\n" + - Function: int __fsetlocking (FILE *STREAM, int TYPE) + The `__fsetlocking' function can be used to select whether the + stream operations will implicitly acquire the locking object of the + stream STREAM. By default this is done but it can be disabled and + reinstated using this function. There are three values defined + for the TYPE parameter. -to print numbers using the different options for the `%d' conversion -gives results like: + `FSETLOCKING_INTERNAL' + The stream `stream' will from now on use the default internal + locking. Every stream operation with exception of the + `_unlocked' variants will implicitly lock the stream. - | 0|0 | +0|+0 | 0|00000| | 00|0| - | 1|1 | +1|+1 | 1|00001| 1| 01|1| - | -1|-1 | -1|-1 | -1|-0001| -1| -01|-1| - |100000|100000|+100000| 100000|100000|100000|100000|100000| + `FSETLOCKING_BYCALLER' + After the `__fsetlocking' function returns the user is + responsible for locking the stream. None of the stream + operations will implicitly do this anymore until the state is + set back to `FSETLOCKING_INTERNAL'. - In particular, notice what happens in the last case where the number -is too large to fit in the minimum field width specified. + `FSETLOCKING_QUERY' + `__fsetlocking' only queries the current locking state of the + stream. The return value will be `FSETLOCKING_INTERNAL' or + `FSETLOCKING_BYCALLER' depending on the state. - Here are some more examples showing how unsigned integers print under -various format options, using the template string: + The return value of `__fsetlocking' is either + `FSETLOCKING_INTERNAL' or `FSETLOCKING_BYCALLER' depending on the + state of the stream before the call. - "|%5u|%5o|%5x|%5X|%#5o|%#5x|%#5X|%#10.8x|\n" + This function and the values for the TYPE parameter are declared + in `stdio_ext.h'. - | 0| 0| 0| 0| 0| 0x0| 0X0|0x00000000| - | 1| 1| 1| 1| 01| 0x1| 0X1|0x00000001| - |100000|303240|186a0|186A0|0303240|0x186a0|0X186A0|0x000186a0| + This function is especially useful when program code has to be used +which is written without knowledge about the `_unlocked' functions (or +if the programmer was too lazy to use them).  -File: libc.info, Node: Floating-Point Conversions, Next: Other Output Conversions, Prev: Integer Conversions, Up: Formatted Output - -Floating-Point Conversions --------------------------- - - This section discusses the conversion specifications for -floating-point numbers: the `%f', `%e', `%E', `%g', and `%G' -conversions. +File: libc.info, Node: Streams and I18N, Next: Simple Output, Prev: Streams and Threads, Up: I/O on Streams - The `%f' conversion prints its argument in fixed-point notation, -producing output of the form [`-']DDD`.'DDD, where the number of digits -following the decimal point is controlled by the precision you specify. +Streams in Internationalized Applications +========================================= - The `%e' conversion prints its argument in exponential notation, -producing output of the form [`-']D`.'DDD`e'[`+'|`-']DD. Again, the -number of digits following the decimal point is controlled by the -precision. The exponent always contains at least two digits. The `%E' -conversion is similar but the exponent is marked with the letter `E' -instead of `e'. + ISO C90 introduced the new type `wchar_t' to allow handling larger +character sets. What was missing was a possibility to output strings +of `wchar_t' directly. One had to convert them into multibyte strings +using `mbstowcs' (there was no `mbsrtowcs' yet) and then use the normal +stream functions. While this is doable it is very cumbersome since +performing the conversions is not trivial and greatly increases program +complexity and size. - The `%g' and `%G' conversions print the argument in the style of -`%e' or `%E' (respectively) if the exponent would be less than -4 or -greater than or equal to the precision; otherwise they use the `%f' -style. Trailing zeros are removed from the fractional portion of the -result and a decimal-point character appears only if it is followed by -a digit. + The Unix standard early on (I think in XPG4.2) introduced two +additional format specifiers for the `printf' and `scanf' families of +functions. Printing and reading of single wide characters was made +possible using the `%C' specifier and wide character strings can be +handled with `%S'. These modifiers behave just like `%c' and `%s' only +that they expect the corresponding argument to have the wide character +type and that the wide character and string are transformed into/from +multibyte strings before being used. - The `%a' and `%A' conversions are meant for representing -floating-point numbers exactly in textual form so that they can be -exchanged as texts between different programs and/or machines. The -numbers are represented is the form [`-']`0x'H`.'HHH`p'[`+'|`-']DD. At -the left of the decimal-point character exactly one digit is print. -This character is only `0' if the number is denormalized. Otherwise -the value is unspecified; it is implementation dependent how many bits -are used. The number of hexadecimal digits on the right side of the -decimal-point character is equal to the precision. If the precision is -zero it is determined to be large enough to provide an exact -representation of the number (or it is large enough to distinguish two -adjacent values if the `FLT_RADIX' is not a power of 2, *note Floating -Point Parameters::). For the `%a' conversion lower-case characters are -used to represent the hexadecimal number and the prefix and exponent -sign are printed as `0x' and `p' respectively. Otherwise upper-case -characters are used and `0X' and `P' are used for the representation of -prefix and exponent string. The exponent to the base of two is printed -as a decimal number using at least one digit but at most as many digits -as necessary to represent the value exactly. + This was a beginning but it is still not good enough. Not always is +it desirable to use `printf' and `scanf'. The other, smaller and +faster functions cannot handle wide characters. Second, it is not +possible to have a format string for `printf' and `scanf' consisting of +wide characters. The result is that format strings would have to be +generated if they have to contain non-basic characters. - If the value to be printed represents infinity or a NaN, the output -is [`-']`inf' or `nan' respectively if the conversion specifier is -`%a', `%e', `%f', or `%g' and it is [`-']`INF' or `NAN' respectively if -the conversion is `%A', `%E', or `%G'. + In the Amendment 1 to ISO C90 a whole new set of functions was added +to solve the problem. Most of the stream functions got a counterpart +which take a wide character or wide character string instead of a +character or string respectively. The new functions operate on the +same streams (like `stdout'). This is different from the model of the +C++ runtime library where separate streams for wide and normal I/O are +used. - The following flags can be used to modify the behavior: + Being able to use the same stream for wide and normal operations +comes with a restriction: a stream can be used either for wide +operations or for normal operations. Once it is decided there is no +way back. Only a call to `freopen' or `freopen64' can reset the +"orientation". The orientation can be decided in three ways: -`-' - Left-justify the result in the field. Normally the result is - right-justified. + * If any of the normal character functions is used (this includes the + `fread' and `fwrite' functions) the stream is marked as not wide + oriented. -`+' - Always include a plus or minus sign in the result. + * If any of the wide character functions is used the stream is + marked as wide oriented. -` ' - If the result doesn't start with a plus or minus sign, prefix it - with a space instead. Since the `+' flag ensures that the result - includes a sign, this flag is ignored if you supply both of them. + * The `fwide' function can be used to set the orientation either way. -`#' - Specifies that the result should always include a decimal point, - even if no digits follow it. For the `%g' and `%G' conversions, - this also forces trailing zeros after the decimal point to be left - in place where they would otherwise be removed. + It is important to never mix the use of wide and not wide operations +on a stream. There are no diagnostics issued. The application behavior +will simply be strange or the application will simply crash. The +`fwide' function can help avoiding this. -`'' - Separate the digits of the integer part of the result into groups - as specified by the locale specified for the `LC_NUMERIC' category; - *note General Numeric::. This flag is a GNU extension. + - Function: int fwide (FILE *STREAM, int MODE) + The `fwide' function can be used to set and query the state of the + orientation of the stream STREAM. If the MODE parameter has a + positive value the streams get wide oriented, for negative values + narrow oriented. It is not possible to overwrite previous + orientations with `fwide'. I.e., if the stream STREAM was already + oriented before the call nothing is done. -`0' - Pad the field with zeros instead of spaces; the zeros are placed - after any sign. This flag is ignored if the `-' flag is also - specified. + If MODE is zero the current orientation state is queried and + nothing is changed. - The precision specifies how many digits follow the decimal-point -character for the `%f', `%e', and `%E' conversions. For these -conversions, the default precision is `6'. If the precision is -explicitly `0', this suppresses the decimal point character entirely. -For the `%g' and `%G' conversions, the precision specifies how many -significant digits to print. Significant digits are the first digit -before the decimal point, and all the digits after it. If the -precision is `0' or not specified for `%g' or `%G', it is treated like -a value of `1'. If the value being printed cannot be expressed -accurately in the specified number of digits, the value is rounded to -the nearest number that fits. + The `fwide' function returns a negative value, zero, or a positive + value if the stream is narrow, not at all, or wide oriented + respectively. - Without a type modifier, the floating-point conversions use an -argument of type `double'. (By the default argument promotions, any -`float' arguments are automatically converted to `double'.) The -following type modifier is supported: + This function was introduced in Amendment 1 to ISO C90 and is + declared in `wchar.h'. -`L' - An uppercase `L' specifies that the argument is a `long double'. + It is generally a good idea to orient a stream as early as possible. +This can prevent surprise especially for the standard streams `stdin', +`stdout', and `stderr'. If some library function in some situations +uses one of these streams and this use orients the stream in a +different way the rest of the application expects it one might end up +with hard to reproduce errors. Remember that no errors are signal if +the streams are used incorrectly. Leaving a stream unoriented after +creation is normally only necessary for library functions which create +streams which can be used in different contexts. - Here are some examples showing how numbers print using the various -floating-point conversions. All of the numbers were printed using this -template string: + When writing code which uses streams and which can be used in +different contexts it is important to query the orientation of the +stream before using it (unless the rules of the library interface +demand a specific orientation). The following little, silly function +illustrates this. - "|%13.4a|%13.4f|%13.4e|%13.4g|\n" + void + print_f (FILE *fp) + { + if (fwide (fp, 0) > 0) + /* Positive return value means wide orientation. */ + fputwc (L'f', fp); + else + fputc ('f', fp); + } - Here is the output: + Note that in this case the function `print_f' decides about the +orientation of the stream if it was unoriented before (will not happen +if the advise above is followed). - | 0x0.0000p+0| 0.0000| 0.0000e+00| 0| - | 0x1.0000p-1| 0.5000| 5.0000e-01| 0.5| - | 0x1.0000p+0| 1.0000| 1.0000e+00| 1| - | -0x1.0000p+0| -1.0000| -1.0000e+00| -1| - | 0x1.9000p+6| 100.0000| 1.0000e+02| 100| - | 0x1.f400p+9| 1000.0000| 1.0000e+03| 1000| - | 0x1.3880p+13| 10000.0000| 1.0000e+04| 1e+04| - | 0x1.81c8p+13| 12345.0000| 1.2345e+04| 1.234e+04| - | 0x1.86a0p+16| 100000.0000| 1.0000e+05| 1e+05| - | 0x1.e240p+16| 123456.0000| 1.2346e+05| 1.235e+05| + The encoding used for the `wchar_t' values is unspecified and the +user must not make any assumptions about it. For I/O of `wchar_t' +values this means that it is impossible to write these values directly +to the stream. This is not what follows from the ISO C locale model +either. What happens instead is that the bytes read from or written to +the underlying media are first converted into the internal encoding +chosen by the implementation for `wchar_t'. The external encoding is +determined by the `LC_CTYPE' category of the current locale or by the +`ccs' part of the mode specification given to `fopen', `fopen64', +`freopen', or `freopen64'. How and when the conversion happens is +unspecified and it happens invisible to the user. - Notice how the `%g' conversion drops trailing zeros. + Since a stream is created in the unoriented state it has at that +point no conversion associated with it. The conversion which will be +used is determined by the `LC_CTYPE' category selected at the time the +stream is oriented. If the locales are changed at the runtime this +might produce surprising results unless one pays attention. This is +just another good reason to orient the stream explicitly as soon as +possible, perhaps with a call to `fwide'.  -File: libc.info, Node: Other Output Conversions, Next: Formatted Output Functions, Prev: Floating-Point Conversions, Up: Formatted Output - -Other Output Conversions ------------------------- - - This section describes miscellaneous conversions for `printf'. +File: libc.info, Node: Simple Output, Next: Character Input, Prev: Streams and I18N, Up: I/O on Streams - The `%c' conversion prints a single character. In case there is no -`l' modifier the `int' argument is first converted to an `unsigned -char'. Then, if used in a wide stream function, the character is -converted into the corresponding wide character. The `-' flag can be -used to specify left-justification in the field, but no other flags are -defined, and no precision or type modifier can be given. For example: +Simple Output by Characters or Lines +==================================== - printf ("%c%c%c%c%c", 'h', 'e', 'l', 'l', 'o'); + This section describes functions for performing character- and +line-oriented output. -prints `hello'. + These narrow streams functions are declared in the header file +`stdio.h' and the wide stream functions in `wchar.h'. - If there is a `l' modifier present the argument is expected to be of -type `wint_t'. If used in a multibyte function the wide character is -converted into a multibyte character before being added to the output. -In this case more than one output byte can be produced. + - Function: int fputc (int C, FILE *STREAM) + The `fputc' function converts the character C to type `unsigned + char', and writes it to the stream STREAM. `EOF' is returned if a + write error occurs; otherwise the character C is returned. - The `%s' conversion prints a string. If no `l' modifier is present -the corresponding argument must be of type `char *' (or `const char -*'). If used in a wide stream function the string is first converted -in a wide character string. A precision can be specified to indicate -the maximum number of characters to write; otherwise characters in the -string up to but not including the terminating null character are -written to the output stream. The `-' flag can be used to specify -left-justification in the field, but no other flags or type modifiers -are defined for this conversion. For example: + - Function: wint_t fputwc (wchar_t WC, FILE *STREAM) + The `fputwc' function writes the wide character WC to the stream + STREAM. `WEOF' is returned if a write error occurs; otherwise the + character WC is returned. - printf ("%3s%-6s", "no", "where"); + - Function: int fputc_unlocked (int C, FILE *STREAM) + The `fputc_unlocked' function is equivalent to the `fputc' + function except that it does not implicitly lock the stream. -prints ` nowhere '. + - Function: wint_t fputwc_unlocked (wint_t WC, FILE *STREAM) + The `fputwc_unlocked' function is equivalent to the `fputwc' + function except that it does not implicitly lock the stream. - If there is a `l' modifier present the argument is expected to be of -type `wchar_t' (or `const wchar_t *'). + This function is a GNU extension. - If you accidentally pass a null pointer as the argument for a `%s' -conversion, the GNU library prints it as `(null)'. We think this is -more useful than crashing. But it's not good practice to pass a null -argument intentionally. + - Function: int putc (int C, FILE *STREAM) + This is just like `fputc', except that most systems implement it as + a macro, making it faster. One consequence is that it may + evaluate the STREAM argument more than once, which is an exception + to the general rule for macros. `putc' is usually the best + function to use for writing a single character. - The `%m' conversion prints the string corresponding to the error -code in `errno'. *Note Error Messages::. Thus: + - Function: wint_t putwc (wchar_t WC, FILE *STREAM) + This is just like `fputwc', except that it can be implement as a + macro, making it faster. One consequence is that it may evaluate + the STREAM argument more than once, which is an exception to the + general rule for macros. `putwc' is usually the best function to + use for writing a single wide character. - fprintf (stderr, "can't open `%s': %m\n", filename); + - Function: int putc_unlocked (int C, FILE *STREAM) + The `putc_unlocked' function is equivalent to the `putc' function + except that it does not implicitly lock the stream. -is equivalent to: + - Function: wint_t putwc_unlocked (wchar_t WC, FILE *STREAM) + The `putwc_unlocked' function is equivalent to the `putwc' + function except that it does not implicitly lock the stream. - fprintf (stderr, "can't open `%s': %s\n", filename, strerror (errno)); + This function is a GNU extension. -The `%m' conversion is a GNU C library extension. + - Function: int putchar (int C) + The `putchar' function is equivalent to `putc' with `stdout' as + the value of the STREAM argument. - The `%p' conversion prints a pointer value. The corresponding -argument must be of type `void *'. In practice, you can use any type -of pointer. + - Function: wint_t putwchar (wchar_t WC) + The `putwchar' function is equivalent to `putwc' with `stdout' as + the value of the STREAM argument. - In the GNU system, non-null pointers are printed as unsigned -integers, as if a `%#x' conversion were used. Null pointers print as -`(nil)'. (Pointers might print differently in other systems.) + - Function: int putchar_unlocked (int C) + The `putchar_unlocked' function is equivalent to the `putchar' + function except that it does not implicitly lock the stream. - For example: + - Function: wint_t putwchar_unlocked (wchar_t WC) + The `putwchar_unlocked' function is equivalent to the `putwchar' + function except that it does not implicitly lock the stream. - printf ("%p", "testing"); + This function is a GNU extension. -prints `0x' followed by a hexadecimal number--the address of the string -constant `"testing"'. It does not print the word `testing'. + - Function: int fputs (const char *S, FILE *STREAM) + The function `fputs' writes the string S to the stream STREAM. + The terminating null character is not written. This function does + _not_ add a newline character, either. It outputs only the + characters in the string. - You can supply the `-' flag with the `%p' conversion to specify -left-justification, but no other flags, precision, or type modifiers -are defined. + This function returns `EOF' if a write error occurs, and otherwise + a non-negative value. - The `%n' conversion is unlike any of the other output conversions. -It uses an argument which must be a pointer to an `int', but instead of -printing anything it stores the number of characters printed so far by -this call at that location. The `h' and `l' type modifiers are -permitted to specify that the argument is of type `short int *' or -`long int *' instead of `int *', but no flags, field width, or -precision are permitted. + For example: - For example, + fputs ("Are ", stdout); + fputs ("you ", stdout); + fputs ("hungry?\n", stdout); - int nchar; - printf ("%d %s%n\n", 3, "bears", &nchar); + outputs the text `Are you hungry?' followed by a newline. -prints: + - Function: int fputws (const wchar_t *WS, FILE *STREAM) + The function `fputws' writes the wide character string WS to the + stream STREAM. The terminating null character is not written. + This function does _not_ add a newline character, either. It + outputs only the characters in the string. - 3 bears + This function returns `WEOF' if a write error occurs, and otherwise + a non-negative value. -and sets `nchar' to `7', because `3 bears' is seven characters. + - Function: int fputs_unlocked (const char *S, FILE *STREAM) + The `fputs_unlocked' function is equivalent to the `fputs' + function except that it does not implicitly lock the stream. - The `%%' conversion prints a literal `%' character. This conversion -doesn't use an argument, and no flags, field width, precision, or type -modifiers are permitted. + This function is a GNU extension. - -File: libc.info, Node: Formatted Output Functions, Next: Dynamic Output, Prev: Other Output Conversions, Up: Formatted Output + - Function: int fputws_unlocked (const wchar_t *WS, FILE *STREAM) + The `fputws_unlocked' function is equivalent to the `fputws' + function except that it does not implicitly lock the stream. -Formatted Output Functions --------------------------- + This function is a GNU extension. - This section describes how to call `printf' and related functions. -Prototypes for these functions are in the header file `stdio.h'. -Because these functions take a variable number of arguments, you _must_ -declare prototypes for them before using them. Of course, the easiest -way to make sure you have all the right prototypes is to just include -`stdio.h'. + - Function: int puts (const char *S) + The `puts' function writes the string S to the stream `stdout' + followed by a newline. The terminating null character of the + string is not written. (Note that `fputs' does _not_ write a + newline as this function does.) - - Function: int printf (const char *TEMPLATE, ...) - The `printf' function prints the optional arguments under the - control of the template string TEMPLATE to the stream `stdout'. - It returns the number of characters printed, or a negative value - if there was an output error. + `puts' is the most convenient function for printing simple + messages. For example: - - Function: int wprintf (const wchar_t *TEMPLATE, ...) - The `wprintf' function prints the optional arguments under the - control of the wide template string TEMPLATE to the stream - `stdout'. It returns the number of wide characters printed, or a - negative value if there was an output error. + puts ("This is a message."); - - Function: int fprintf (FILE *STREAM, const char *TEMPLATE, ...) - This function is just like `printf', except that the output is - written to the stream STREAM instead of `stdout'. + outputs the text `This is a message.' followed by a newline. - - Function: int fwprintf (FILE *STREAM, const wchar_t *TEMPLATE, ...) - This function is just like `wprintf', except that the output is - written to the stream STREAM instead of `stdout'. + - Function: int putw (int W, FILE *STREAM) + This function writes the word W (that is, an `int') to STREAM. It + is provided for compatibility with SVID, but we recommend you use + `fwrite' instead (*note Block Input/Output::). - - Function: int sprintf (char *S, const char *TEMPLATE, ...) - This is like `printf', except that the output is stored in the - character array S instead of written to a stream. A null - character is written to mark the end of the string. + +File: libc.info, Node: Character Input, Next: Line Input, Prev: Simple Output, Up: I/O on Streams - The `sprintf' function returns the number of characters stored in - the array S, not including the terminating null character. +Character Input +=============== - The behavior of this function is undefined if copying takes place - between objects that overlap--for example, if S is also given as - an argument to be printed under control of the `%s' conversion. - *Note Copying and Concatenation::. + This section describes functions for performing character-oriented +input. These narrow streams functions are declared in the header file +`stdio.h' and the wide character functions are declared in `wchar.h'. - *Warning:* The `sprintf' function can be *dangerous* because it - can potentially output more characters than can fit in the - allocation size of the string S. Remember that the field width - given in a conversion specification is only a _minimum_ value. + These functions return an `int' or `wint_t' value (for narrow and +wide stream functions respectively) that is either a character of +input, or the special value `EOF'/`WEOF' (usually -1). For the narrow +stream functions it is important to store the result of these functions +in a variable of type `int' instead of `char', even when you plan to +use it only as a character. Storing `EOF' in a `char' variable +truncates its value to the size of a character, so that it is no longer +distinguishable from the valid character `(char) -1'. So always use an +`int' for the result of `getc' and friends, and check for `EOF' after +the call; once you've verified that the result is not `EOF', you can be +sure that it will fit in a `char' variable without loss of information. - To avoid this problem, you can use `snprintf' or `asprintf', - described below. + - Function: int fgetc (FILE *STREAM) + This function reads the next character as an `unsigned char' from + the stream STREAM and returns its value, converted to an `int'. + If an end-of-file condition or read error occurs, `EOF' is + returned instead. - - Function: int swprintf (wchar_t *S, size_t SIZE, const wchar_t - *TEMPLATE, ...) - This is like `wprintf', except that the output is stored in the - wide character array WS instead of written to a stream. A null - wide character is written to mark the end of the string. The SIZE - argument specifies the maximum number of characters to produce. - The trailing null character is counted towards this limit, so you - should allocate at least SIZE wide characters for the string WS. + - Function: wint_t fgetwc (FILE *STREAM) + This function reads the next wide character from the stream STREAM + and returns its value. If an end-of-file condition or read error + occurs, `WEOF' is returned instead. - The return value is the number of characters generated for the - given input, excluding the trailing null. If not all output fits - into the provided buffer a negative value is returned. You should - try again with a bigger output string. _Note:_ this is different - from how `snprintf' handles this situation. + - Function: int fgetc_unlocked (FILE *STREAM) + The `fgetc_unlocked' function is equivalent to the `fgetc' + function except that it does not implicitly lock the stream. - Note that the corresponding narrow stream function takes fewer - parameters. `swprintf' in fact corresponds to the `snprintf' - function. Since the `sprintf' function can be dangerous and should - be avoided the ISO C committee refused to make the same mistake - again and decided to not define an function exactly corresponding - to `sprintf'. + - Function: wint_t fgetwc_unlocked (FILE *STREAM) + The `fgetwc_unlocked' function is equivalent to the `fgetwc' + function except that it does not implicitly lock the stream. - - Function: int snprintf (char *S, size_t SIZE, const char *TEMPLATE, - ...) - The `snprintf' function is similar to `sprintf', except that the - SIZE argument specifies the maximum number of characters to - produce. The trailing null character is counted towards this - limit, so you should allocate at least SIZE characters for the - string S. + This function is a GNU extension. - The return value is the number of characters which would be - generated for the given input, excluding the trailing null. If - this value is greater or equal to SIZE, not all characters from - the result have been stored in S. You should try again with a - bigger output string. Here is an example of doing this: + - Function: int getc (FILE *STREAM) + This is just like `fgetc', except that it is permissible (and + typical) for it to be implemented as a macro that evaluates the + STREAM argument more than once. `getc' is often highly optimized, + so it is usually the best function to use to read a single + character. - /* Construct a message describing the value of a variable - whose name is NAME and whose value is VALUE. */ - char * - make_message (char *name, char *value) - { - /* Guess we need no more than 100 chars of space. */ - int size = 100; - char *buffer = (char *) xmalloc (size); - int nchars; - if (buffer == NULL) - return NULL; - - /* Try to print in the allocated space. */ - nchars = snprintf (buffer, size, "value of %s is %s", - name, value); - if (nchars >= size) - { - /* Reallocate buffer now that we know - how much space is needed. */ - buffer = (char *) xrealloc (buffer, nchars + 1); - - if (buffer != NULL) - /* Try again. */ - snprintf (buffer, size, "value of %s is %s", - name, value); - } - /* The last call worked, return the string. */ - return buffer; - } + - Function: wint_t getwc (FILE *STREAM) + This is just like `fgetwc', except that it is permissible for it to + be implemented as a macro that evaluates the STREAM argument more + than once. `getwc' can be highly optimized, so it is usually the + best function to use to read a single wide character. - In practice, it is often easier just to use `asprintf', below. + - Function: int getc_unlocked (FILE *STREAM) + The `getc_unlocked' function is equivalent to the `getc' function + except that it does not implicitly lock the stream. - *Attention:* In versions of the GNU C library prior to 2.1 the - return value is the number of characters stored, not including the - terminating null; unless there was not enough space in S to store - the result in which case `-1' is returned. This was changed in - order to comply with the ISO C99 standard. + - Function: wint_t getwc_unlocked (FILE *STREAM) + The `getwc_unlocked' function is equivalent to the `getwc' + function except that it does not implicitly lock the stream. - -File: libc.info, Node: Dynamic Output, Next: Variable Arguments Output, Prev: Formatted Output Functions, Up: Formatted Output + This function is a GNU extension. -Dynamically Allocating Formatted Output ---------------------------------------- + - Function: int getchar (void) + The `getchar' function is equivalent to `getc' with `stdin' as the + value of the STREAM argument. - The functions in this section do formatted output and place the -results in dynamically allocated memory. + - Function: wint_t getwchar (void) + The `getwchar' function is equivalent to `getwc' with `stdin' as + the value of the STREAM argument. - - Function: int asprintf (char **PTR, const char *TEMPLATE, ...) - This function is similar to `sprintf', except that it dynamically - allocates a string (as with `malloc'; *note Unconstrained - Allocation::) to hold the output, instead of putting the output in - a buffer you allocate in advance. The PTR argument should be the - address of a `char *' object, and `asprintf' stores a pointer to - the newly allocated string at that location. + - Function: int getchar_unlocked (void) + The `getchar_unlocked' function is equivalent to the `getchar' + function except that it does not implicitly lock the stream. - The return value is the number of characters allocated for the - buffer, or less than zero if an error occurred. Usually this means - that the buffer could not be allocated. + - Function: wint_t getwchar_unlocked (void) + The `getwchar_unlocked' function is equivalent to the `getwchar' + function except that it does not implicitly lock the stream. - Here is how to use `asprintf' to get the same result as the - `snprintf' example, but more easily: + This function is a GNU extension. - /* Construct a message describing the value of a variable - whose name is NAME and whose value is VALUE. */ - char * - make_message (char *name, char *value) - { - char *result; - if (asprintf (&result, "value of %s is %s", name, value) < 0) - return NULL; - return result; - } + Here is an example of a function that does input using `fgetc'. It +would work just as well using `getc' instead, or using `getchar ()' +instead of `fgetc (stdin)'. The code would also work the same for the +wide character stream functions. - - Function: int obstack_printf (struct obstack *OBSTACK, const char - *TEMPLATE, ...) - This function is similar to `asprintf', except that it uses the - obstack OBSTACK to allocate the space. *Note Obstacks::. + int + y_or_n_p (const char *question) + { + fputs (question, stdout); + while (1) + { + int c, answer; + /* Write a space to separate answer from question. */ + fputc (' ', stdout); + /* Read the first character of the line. + This should be the answer character, but might not be. */ + c = tolower (fgetc (stdin)); + answer = c; + /* Discard rest of input line. */ + while (c != '\n' && c != EOF) + c = fgetc (stdin); + /* Obey the answer if it was valid. */ + if (answer == 'y') + return 1; + if (answer == 'n') + return 0; + /* Answer was invalid: ask for valid answer. */ + fputs ("Please answer y or n:", stdout); + } + } - The characters are written onto the end of the current object. To - get at them, you must finish the object with `obstack_finish' - (*note Growing Objects::). + - Function: int getw (FILE *STREAM) + This function reads a word (that is, an `int') from STREAM. It's + provided for compatibility with SVID. We recommend you use + `fread' instead (*note Block Input/Output::). Unlike `getc', any + `int' value could be a valid result. `getw' returns `EOF' when it + encounters end-of-file or an error, but there is no way to + distinguish this from an input word with value -1.  -File: libc.info, Node: Variable Arguments Output, Next: Parsing a Template String, Prev: Dynamic Output, Up: Formatted Output +File: libc.info, Node: Line Input, Next: Unreading, Prev: Character Input, Up: I/O on Streams -Variable Arguments Output Functions ------------------------------------ +Line-Oriented Input +=================== - The functions `vprintf' and friends are provided so that you can -define your own variadic `printf'-like functions that make use of the -same internals as the built-in formatted output functions. + Since many programs interpret input on the basis of lines, it is +convenient to have functions to read a line of text from a stream. - The most natural way to define such functions would be to use a -language construct to say, "Call `printf' and pass this template plus -all of my arguments after the first five." But there is no way to do -this in C, and it would be hard to provide a way, since at the C -language level there is no way to tell how many arguments your function -received. + Standard C has functions to do this, but they aren't very safe: null +characters and even (for `gets') long lines can confuse them. So the +GNU library provides the nonstandard `getline' function that makes it +easy to read lines reliably. - Since that method is impossible, we provide alternative functions, -the `vprintf' series, which lets you pass a `va_list' to describe "all -of my arguments after the first five." + Another GNU extension, `getdelim', generalizes `getline'. It reads +a delimited record, defined as everything through the next occurrence +of a specified delimiter character. - When it is sufficient to define a macro rather than a real function, -the GNU C compiler provides a way to do this much more easily with -macros. For example: + All these functions are declared in `stdio.h'. - #define myprintf(a, b, c, d, e, rest...) \ - printf (mytemplate , ## rest...) + - Function: ssize_t getline (char **LINEPTR, size_t *N, FILE *STREAM) + This function reads an entire line from STREAM, storing the text + (including the newline and a terminating null character) in a + buffer and storing the buffer address in `*LINEPTR'. -*Note Macros with Variable Numbers of Arguments: (gcc.info)Macro -Varargs, for details. But this is limited to macros, and does not -apply to real functions at all. + Before calling `getline', you should place in `*LINEPTR' the + address of a buffer `*N' bytes long, allocated with `malloc'. If + this buffer is long enough to hold the line, `getline' stores the + line in this buffer. Otherwise, `getline' makes the buffer bigger + using `realloc', storing the new buffer address back in `*LINEPTR' + and the increased size back in `*N'. *Note Unconstrained + Allocation::. - Before calling `vprintf' or the other functions listed in this -section, you _must_ call `va_start' (*note Variadic Functions::) to -initialize a pointer to the variable arguments. Then you can call -`va_arg' to fetch the arguments that you want to handle yourself. This -advances the pointer past those arguments. + If you set `*LINEPTR' to a null pointer, and `*N' to zero, before + the call, then `getline' allocates the initial buffer for you by + calling `malloc'. - Once your `va_list' pointer is pointing at the argument of your -choice, you are ready to call `vprintf'. That argument and all -subsequent arguments that were passed to your function are used by -`vprintf' along with the template that you specified separately. + In either case, when `getline' returns, `*LINEPTR' is a `char *' + which points to the text of the line. - In some other systems, the `va_list' pointer may become invalid -after the call to `vprintf', so you must not use `va_arg' after you -call `vprintf'. Instead, you should call `va_end' to retire the -pointer from service. However, you can safely call `va_start' on -another pointer variable and begin fetching the arguments again through -that pointer. Calling `vprintf' does not destroy the argument list of -your function, merely the particular pointer that you passed to it. + When `getline' is successful, it returns the number of characters + read (including the newline, but not including the terminating + null). This value enables you to distinguish null characters that + are part of the line from the null character inserted as a + terminator. - GNU C does not have such restrictions. You can safely continue to -fetch arguments from a `va_list' pointer after passing it to `vprintf', -and `va_end' is a no-op. (Note, however, that subsequent `va_arg' -calls will fetch the same arguments which `vprintf' previously used.) + This function is a GNU extension, but it is the recommended way to + read lines from a stream. The alternative standard functions are + unreliable. - Prototypes for these functions are declared in `stdio.h'. + If an error occurs or end of file is reached without any bytes + read, `getline' returns `-1'. - - Function: int vprintf (const char *TEMPLATE, va_list AP) - This function is similar to `printf' except that, instead of taking - a variable number of arguments directly, it takes an argument list - pointer AP. + - Function: ssize_t getdelim (char **LINEPTR, size_t *N, int + DELIMITER, FILE *STREAM) + This function is like `getline' except that the character which + tells it to stop reading is not necessarily newline. The argument + DELIMITER specifies the delimiter character; `getdelim' keeps + reading until it sees that character (or end of file). - - Function: int vwprintf (const wchar_t *TEMPLATE, va_list AP) - This function is similar to `wprintf' except that, instead of - taking a variable number of arguments directly, it takes an - argument list pointer AP. + The text is stored in LINEPTR, including the delimiter character + and a terminating null. Like `getline', `getdelim' makes LINEPTR + bigger if it isn't big enough. - - Function: int vfprintf (FILE *STREAM, const char *TEMPLATE, va_list - AP) - This is the equivalent of `fprintf' with the variable argument list - specified directly as for `vprintf'. + `getline' is in fact implemented in terms of `getdelim', just like + this: - - Function: int vfwprintf (FILE *STREAM, const wchar_t *TEMPLATE, - va_list AP) - This is the equivalent of `fwprintf' with the variable argument - list specified directly as for `vwprintf'. + ssize_t + getline (char **lineptr, size_t *n, FILE *stream) + { + return getdelim (lineptr, n, '\n', stream); + } - - Function: int vsprintf (char *S, const char *TEMPLATE, va_list AP) - This is the equivalent of `sprintf' with the variable argument list - specified directly as for `vprintf'. + - Function: char * fgets (char *S, int COUNT, FILE *STREAM) + The `fgets' function reads characters from the stream STREAM up to + and including a newline character and stores them in the string S, + adding a null character to mark the end of the string. You must + supply COUNT characters worth of space in S, but the number of + characters read is at most COUNT - 1. The extra character space + is used to hold the null character at the end of the string. - - Function: int vswprintf (wchar_t *S, size_t SIZE, const wchar_t - *TEMPLATE, va_list AP) - This is the equivalent of `swprintf' with the variable argument - list specified directly as for `vwprintf'. + If the system is already at end of file when you call `fgets', then + the contents of the array S are unchanged and a null pointer is + returned. A null pointer is also returned if a read error occurs. + Otherwise, the return value is the pointer S. - - Function: int vsnprintf (char *S, size_t SIZE, const char *TEMPLATE, - va_list AP) - This is the equivalent of `snprintf' with the variable argument - list specified directly as for `vprintf'. + *Warning:* If the input data has a null character, you can't tell. + So don't use `fgets' unless you know the data cannot contain a + null. Don't use it to read files edited by the user because, if + the user inserts a null character, you should either handle it + properly or print a clear error message. We recommend using + `getline' instead of `fgets'. - - Function: int vasprintf (char **PTR, const char *TEMPLATE, va_list - AP) - The `vasprintf' function is the equivalent of `asprintf' with the - variable argument list specified directly as for `vprintf'. + - Function: wchar_t * fgetws (wchar_t *WS, int COUNT, FILE *STREAM) + The `fgetws' function reads wide characters from the stream STREAM + up to and including a newline character and stores them in the + string WS, adding a null wide character to mark the end of the + string. You must supply COUNT wide characters worth of space in + WS, but the number of characters read is at most COUNT - 1. The + extra character space is used to hold the null wide character at + the end of the string. - - Function: int obstack_vprintf (struct obstack *OBSTACK, const char - *TEMPLATE, va_list AP) - The `obstack_vprintf' function is the equivalent of - `obstack_printf' with the variable argument list specified directly - as for `vprintf'. + If the system is already at end of file when you call `fgetws', + then the contents of the array WS are unchanged and a null pointer + is returned. A null pointer is also returned if a read error + occurs. Otherwise, the return value is the pointer WS. - Here's an example showing how you might use `vfprintf'. This is a -function that prints error messages to the stream `stderr', along with -a prefix indicating the name of the program (*note Error Messages::, -for a description of `program_invocation_short_name'). + *Warning:* If the input data has a null wide character (which are + null bytes in the input stream), you can't tell. So don't use + `fgetws' unless you know the data cannot contain a null. Don't use + it to read files edited by the user because, if the user inserts a + null character, you should either handle it properly or print a + clear error message. - #include - #include - - void - eprintf (const char *template, ...) - { - va_list ap; - extern char *program_invocation_short_name; - - fprintf (stderr, "%s: ", program_invocation_short_name); - va_start (ap, template); - vfprintf (stderr, template, ap); - va_end (ap); - } + - Function: char * fgets_unlocked (char *S, int COUNT, FILE *STREAM) + The `fgets_unlocked' function is equivalent to the `fgets' + function except that it does not implicitly lock the stream. -You could call `eprintf' like this: + This function is a GNU extension. - eprintf ("file `%s' does not exist\n", filename); + - Function: wchar_t * fgetws_unlocked (wchar_t *WS, int COUNT, FILE + *STREAM) + The `fgetws_unlocked' function is equivalent to the `fgetws' + function except that it does not implicitly lock the stream. - In GNU C, there is a special construct you can use to let the -compiler know that a function uses a `printf'-style format string. -Then it can check the number and types of arguments in each call to the -function, and warn you when they do not match the format string. For -example, take this declaration of `eprintf': + This function is a GNU extension. - void eprintf (const char *template, ...) - __attribute__ ((format (printf, 1, 2))); + - Deprecated function: char * gets (char *S) + The function `gets' reads characters from the stream `stdin' up to + the next newline character, and stores them in the string S. The + newline character is discarded (note that this differs from the + behavior of `fgets', which copies the newline character into the + string). If `gets' encounters a read error or end-of-file, it + returns a null pointer; otherwise it returns S. -This tells the compiler that `eprintf' uses a format string like -`printf' (as opposed to `scanf'; *note Formatted Input::); the format -string appears as the first argument; and the arguments to satisfy the -format begin with the second. *Note Declaring Attributes of Functions: -(gcc.info)Function Attributes, for more information. + *Warning:* The `gets' function is *very dangerous* because it + provides no protection against overflowing the string S. The GNU + library includes it for compatibility only. You should *always* + use `fgets' or `getline' instead. To remind you of this, the + linker (if using GNU `ld') will issue a warning whenever you use + `gets'.  -File: libc.info, Node: Parsing a Template String, Next: Example of Parsing, Prev: Variable Arguments Output, Up: Formatted Output +File: libc.info, Node: Unreading, Next: Block Input/Output, Prev: Line Input, Up: I/O on Streams -Parsing a Template String -------------------------- +Unreading +========= - You can use the function `parse_printf_format' to obtain information -about the number and types of arguments that are expected by a given -template string. This function permits interpreters that provide -interfaces to `printf' to avoid passing along invalid arguments from -the user's program, which could cause a crash. + In parser programs it is often useful to examine the next character +in the input stream without removing it from the stream. This is called +"peeking ahead" at the input because your program gets a glimpse of the +input it will read next. - All the symbols described in this section are declared in the header -file `printf.h'. + Using stream I/O, you can peek ahead at input by first reading it and +then "unreading" it (also called "pushing it back" on the stream). +Unreading a character makes it available to be input again from the +stream, by the next call to `fgetc' or other input function on that +stream. - - Function: size_t parse_printf_format (const char *TEMPLATE, size_t - N, int *ARGTYPES) - This function returns information about the number and types of - arguments expected by the `printf' template string TEMPLATE. The - information is stored in the array ARGTYPES; each element of this - array describes one argument. This information is encoded using - the various `PA_' macros, listed below. +* Menu: - The argument N specifies the number of elements in the array - ARGTYPES. This is the maximum number of elements that - `parse_printf_format' will try to write. +* Unreading Idea:: An explanation of unreading with pictures. +* How Unread:: How to call `ungetc' to do unreading. - `parse_printf_format' returns the total number of arguments - required by TEMPLATE. If this number is greater than N, then the - information returned describes only the first N arguments. If you - want information about additional arguments, allocate a bigger - array and call `parse_printf_format' again. + +File: libc.info, Node: Unreading Idea, Next: How Unread, Up: Unreading - The argument types are encoded as a combination of a basic type and -modifier flag bits. +What Unreading Means +-------------------- - - Macro: int PA_FLAG_MASK - This macro is a bitmask for the type modifier flag bits. You can - write the expression `(argtypes[i] & PA_FLAG_MASK)' to extract - just the flag bits for an argument, or `(argtypes[i] & - ~PA_FLAG_MASK)' to extract just the basic type code. + Here is a pictorial explanation of unreading. Suppose you have a +stream reading a file that contains just six characters, the letters +`foobar'. Suppose you have read three characters so far. The +situation looks like this: - Here are symbolic constants that represent the basic types; they -stand for integer values. + f o o b a r + ^ -`PA_INT' - This specifies that the base type is `int'. +so the next input character will be `b'. -`PA_CHAR' - This specifies that the base type is `int', cast to `char'. + If instead of reading `b' you unread the letter `o', you get a +situation like this: -`PA_STRING' - This specifies that the base type is `char *', a null-terminated - string. + f o o b a r + | + o-- + ^ -`PA_POINTER' - This specifies that the base type is `void *', an arbitrary - pointer. +so that the next input characters will be `o' and `b'. -`PA_FLOAT' - This specifies that the base type is `float'. + If you unread `9' instead of `o', you get this situation: -`PA_DOUBLE' - This specifies that the base type is `double'. + f o o b a r + | + 9-- + ^ -`PA_LAST' - You can define additional base types for your own programs as - offsets from `PA_LAST'. For example, if you have data types `foo' - and `bar' with their own specialized `printf' conversions, you - could define encodings for these types as: +so that the next input characters will be `9' and `b'. - #define PA_FOO PA_LAST - #define PA_BAR (PA_LAST + 1) + +File: libc.info, Node: How Unread, Prev: Unreading Idea, Up: Unreading - Here are the flag bits that modify a basic type. They are combined -with the code for the basic type using inclusive-or. +Using `ungetc' To Do Unreading +------------------------------ -`PA_FLAG_PTR' - If this bit is set, it indicates that the encoded type is a - pointer to the base type, rather than an immediate value. For - example, `PA_INT|PA_FLAG_PTR' represents the type `int *'. + The function to unread a character is called `ungetc', because it +reverses the action of `getc'. -`PA_FLAG_SHORT' - If this bit is set, it indicates that the base type is modified - with `short'. (This corresponds to the `h' type modifier.) + - Function: int ungetc (int C, FILE *STREAM) + The `ungetc' function pushes back the character C onto the input + stream STREAM. So the next input from STREAM will read C before + anything else. -`PA_FLAG_LONG' - If this bit is set, it indicates that the base type is modified - with `long'. (This corresponds to the `l' type modifier.) + If C is `EOF', `ungetc' does nothing and just returns `EOF'. This + lets you call `ungetc' with the return value of `getc' without + needing to check for an error from `getc'. -`PA_FLAG_LONG_LONG' - If this bit is set, it indicates that the base type is modified - with `long long'. (This corresponds to the `L' type modifier.) + The character that you push back doesn't have to be the same as + the last character that was actually read from the stream. In + fact, it isn't necessary to actually read any characters from the + stream before unreading them with `ungetc'! But that is a strange + way to write a program; usually `ungetc' is used only to unread a + character that was just read from the same stream. -`PA_FLAG_LONG_DOUBLE' - This is a synonym for `PA_FLAG_LONG_LONG', used by convention with - a base type of `PA_DOUBLE' to indicate a type of `long double'. + The GNU C library only supports one character of pushback--in other + words, it does not work to call `ungetc' twice without doing input + in between. Other systems might let you push back multiple + characters; then reading from the stream retrieves the characters + in the reverse order that they were pushed. - For an example of using these facilities, see *Note Example of -Parsing::. + Pushing back characters doesn't alter the file; only the internal + buffering for the stream is affected. If a file positioning + function (such as `fseek', `fseeko' or `rewind'; *note File + Positioning::) is called, any pending pushed-back characters are + discarded. - -File: libc.info, Node: Example of Parsing, Prev: Parsing a Template String, Up: Formatted Output + Unreading a character on a stream that is at end of file clears the + end-of-file indicator for the stream, because it makes the + character of input available. After you read that character, + trying to read again will encounter end of file. -Example of Parsing a Template String ------------------------------------- + - Function: wint_t ungetwc (wint_t WC, FILE *STREAM) + The `ungetwc' function behaves just like `ungetc' just that it + pushes back a wide character. - Here is an example of decoding argument types for a format string. -We assume this is part of an interpreter which contains arguments of -type `NUMBER', `CHAR', `STRING' and `STRUCTURE' (and perhaps others -which are not valid here). + Here is an example showing the use of `getc' and `ungetc' to skip +over whitespace characters. When this function reaches a +non-whitespace character, it unreads that character to be seen again on +the next read operation on the stream. - /* Test whether the NARGS specified objects - in the vector ARGS are valid - for the format string FORMAT: - if so, return 1. - If not, return 0 after printing an error message. */ + #include + #include - int - validate_args (char *format, int nargs, OBJECT *args) + void + skip_whitespace (FILE *stream) { - int *argtypes; - int nwanted; - - /* Get the information about the arguments. - Each conversion specification must be at least two characters - long, so there cannot be more specifications than half the - length of the string. */ - - argtypes = (int *) alloca (strlen (format) / 2 * sizeof (int)); - nwanted = parse_printf_format (string, nelts, argtypes); - - /* Check the number of arguments. */ - if (nwanted > nargs) - { - error ("too few arguments (at least %d required)", nwanted); - return 0; - } - - /* Check the C type wanted for each argument - and see if the object given is suitable. */ - for (i = 0; i < nwanted; i++) - { - int wanted; - - if (argtypes[i] & PA_FLAG_PTR) - wanted = STRUCTURE; - else - switch (argtypes[i] & ~PA_FLAG_MASK) - { - case PA_INT: - case PA_FLOAT: - case PA_DOUBLE: - wanted = NUMBER; - break; - case PA_CHAR: - wanted = CHAR; - break; - case PA_STRING: - wanted = STRING; - break; - case PA_POINTER: - wanted = STRUCTURE; - break; - } - if (TYPE (args[i]) != wanted) - { - error ("type mismatch for arg number %d", i); - return 0; - } - } - return 1; + int c; + do + /* No need to check for `EOF' because it is not + `isspace', and `ungetc' ignores `EOF'. */ + c = getc (stream); + while (isspace (c)); + ungetc (c, stream); }  -File: libc.info, Node: Customizing Printf, Next: Formatted Input, Prev: Formatted Output, Up: I/O on Streams - -Customizing `printf' -==================== +File: libc.info, Node: Block Input/Output, Next: Formatted Output, Prev: Unreading, Up: I/O on Streams - The GNU C library lets you define your own custom conversion -specifiers for `printf' template strings, to teach `printf' clever ways -to print the important data structures of your program. +Block Input/Output +================== - The way you do this is by registering the conversion with the -function `register_printf_function'; see *Note Registering New -Conversions::. One of the arguments you pass to this function is a -pointer to a handler function that produces the actual output; see -*Note Defining the Output Handler::, for information on how to write -this function. + This section describes how to do input and output operations on +blocks of data. You can use these functions to read and write binary +data, as well as to read and write text in fixed-size blocks instead of +by characters or lines. - You can also install a function that just returns information about -the number and type of arguments expected by the conversion specifier. -*Note Parsing a Template String::, for information about this. + Binary files are typically used to read and write blocks of data in +the same format as is used to represent the data in a running program. +In other words, arbitrary blocks of memory--not just character or string +objects--can be written to a binary file, and meaningfully read in +again by the same program. - The facilities of this section are declared in the header file -`printf.h'. + Storing data in binary form is often considerably more efficient than +using the formatted I/O functions. Also, for floating-point numbers, +the binary form avoids possible loss of precision in the conversion +process. On the other hand, binary files can't be examined or modified +easily using many standard file utilities (such as text editors), and +are not portable between different implementations of the language, or +different kinds of computers. -* Menu: + These functions are declared in `stdio.h'. -* Registering New Conversions:: Using `register_printf_function' - to register a new output conversion. -* Conversion Specifier Options:: The handler must be able to get - the options specified in the - template when it is called. -* Defining the Output Handler:: Defining the handler and arginfo - functions that are passed as arguments - to `register_printf_function'. -* Printf Extension Example:: How to define a `printf' - handler function. -* Predefined Printf Handlers:: Predefined `printf' handlers. + - Function: size_t fread (void *DATA, size_t SIZE, size_t COUNT, FILE + *STREAM) + This function reads up to COUNT objects of size SIZE into the + array DATA, from the stream STREAM. It returns the number of + objects actually read, which might be less than COUNT if a read + error occurs or the end of the file is reached. This function + returns a value of zero (and doesn't read anything) if either SIZE + or COUNT is zero. - *Portability Note:* The ability to extend the syntax of `printf' -template strings is a GNU extension. ISO standard C has nothing -similar. + If `fread' encounters end of file in the middle of an object, it + returns the number of complete objects read, and discards the + partial object. Therefore, the stream remains at the actual end + of the file. - -File: libc.info, Node: Registering New Conversions, Next: Conversion Specifier Options, Up: Customizing Printf + - Function: size_t fread_unlocked (void *DATA, size_t SIZE, size_t + COUNT, FILE *STREAM) + The `fread_unlocked' function is equivalent to the `fread' + function except that it does not implicitly lock the stream. -Registering New Conversions ---------------------------- + This function is a GNU extension. - The function to register a new output conversion is -`register_printf_function', declared in `printf.h'. + - Function: size_t fwrite (const void *DATA, size_t SIZE, size_t + COUNT, FILE *STREAM) + This function writes up to COUNT objects of size SIZE from the + array DATA, to the stream STREAM. The return value is normally + COUNT, if the call succeeds. Any other value indicates some sort + of error, such as running out of space. - - Function: int register_printf_function (int SPEC, printf_function - HANDLER-FUNCTION, printf_arginfo_function ARGINFO-FUNCTION) - This function defines the conversion specifier character SPEC. - Thus, if SPEC is `'Y'', it defines the conversion `%Y'. You can - redefine the built-in conversions like `%s', but flag characters - like `#' and type modifiers like `l' can never be used as - conversions; calling `register_printf_function' for those - characters has no effect. It is advisable not to use lowercase - letters, since the ISO C standard warns that additional lowercase - letters may be standardized in future editions of the standard. + - Function: size_t fwrite_unlocked (const void *DATA, size_t SIZE, + size_t COUNT, FILE *STREAM) + The `fwrite_unlocked' function is equivalent to the `fwrite' + function except that it does not implicitly lock the stream. - The HANDLER-FUNCTION is the function called by `printf' and - friends when this conversion appears in a template string. *Note - Defining the Output Handler::, for information about how to define - a function to pass as this argument. If you specify a null - pointer, any existing handler function for SPEC is removed. + This function is a GNU extension. - The ARGINFO-FUNCTION is the function called by - `parse_printf_format' when this conversion appears in a template - string. *Note Parsing a Template String::, for information about - this. + +File: libc.info, Node: Formatted Output, Next: Customizing Printf, Prev: Block Input/Output, Up: I/O on Streams - *Attention:* In the GNU C library versions before 2.0 the - ARGINFO-FUNCTION function did not need to be installed unless the - user used the `parse_printf_format' function. This has changed. - Now a call to any of the `printf' functions will call this - function when this format specifier appears in the format string. +Formatted Output +================ - The return value is `0' on success, and `-1' on failure (which - occurs if SPEC is out of range). + The functions described in this section (`printf' and related +functions) provide a convenient way to perform formatted output. You +call `printf' with a "format string" or "template string" that +specifies how to format the values of the remaining arguments. - You can redefine the standard output conversions, but this is - probably not a good idea because of the potential for confusion. - Library routines written by other people could break if you do - this. + Unless your program is a filter that specifically performs line- or +character-oriented processing, using `printf' or one of the other +related functions described in this section is usually the easiest and +most concise way to perform output. These functions are especially +useful for printing error messages, tables of data, and the like. - -File: libc.info, Node: Conversion Specifier Options, Next: Defining the Output Handler, Prev: Registering New Conversions, Up: Customizing Printf +* Menu: -Conversion Specifier Options ----------------------------- +* Formatted Output Basics:: Some examples to get you started. +* Output Conversion Syntax:: General syntax of conversion + specifications. +* Table of Output Conversions:: Summary of output conversions and + what they do. +* Integer Conversions:: Details about formatting of integers. +* Floating-Point Conversions:: Details about formatting of + floating-point numbers. +* Other Output Conversions:: Details about formatting of strings, + characters, pointers, and the like. +* Formatted Output Functions:: Descriptions of the actual functions. +* Dynamic Output:: Functions that allocate memory for the output. +* Variable Arguments Output:: `vprintf' and friends. +* Parsing a Template String:: What kinds of args does a given template + call for? +* Example of Parsing:: Sample program using `parse_printf_format'. - If you define a meaning for `%A', what if the template contains -`%+23A' or `%-#A'? To implement a sensible meaning for these, the -handler when called needs to be able to get the options specified in -the template. + +File: libc.info, Node: Formatted Output Basics, Next: Output Conversion Syntax, Up: Formatted Output - Both the HANDLER-FUNCTION and ARGINFO-FUNCTION accept an argument -that points to a `struct printf_info', which contains information about -the options appearing in an instance of the conversion specifier. This -data type is declared in the header file `printf.h'. +Formatted Output Basics +----------------------- - - Type: struct printf_info - This structure is used to pass information about the options - appearing in an instance of a conversion specifier in a `printf' - template string to the handler and arginfo functions for that - specifier. It contains the following members: + The `printf' function can be used to print any number of arguments. +The template string argument you supply in a call provides information +not only about the number of additional arguments, but also about their +types and what style should be used for printing them. - `int prec' - This is the precision specified. The value is `-1' if no - precision was specified. If the precision was given as `*', - the `printf_info' structure passed to the handler function - contains the actual value retrieved from the argument list. - But the structure passed to the arginfo function contains a - value of `INT_MIN', since the actual value is not known. + Ordinary characters in the template string are simply written to the +output stream as-is, while "conversion specifications" introduced by a +`%' character in the template cause subsequent arguments to be +formatted and written to the output stream. For example, - `int width' - This is the minimum field width specified. The value is `0' - if no width was specified. If the field width was given as - `*', the `printf_info' structure passed to the handler - function contains the actual value retrieved from the - argument list. But the structure passed to the arginfo - function contains a value of `INT_MIN', since the actual - value is not known. + int pct = 37; + char filename[] = "foo.txt"; + printf ("Processing of `%s' is %d%% finished.\nPlease be patient.\n", + filename, pct); - `wchar_t spec' - This is the conversion specifier character specified. It's - stored in the structure so that you can register the same - handler function for multiple characters, but still have a - way to tell them apart when the handler function is called. +produces output like - `unsigned int is_long_double' - This is a boolean that is true if the `L', `ll', or `q' type - modifier was specified. For integer conversions, this - indicates `long long int', as opposed to `long double' for - floating point conversions. + Processing of `foo.txt' is 37% finished. + Please be patient. - `unsigned int is_char' - This is a boolean that is true if the `hh' type modifier was - specified. + This example shows the use of the `%d' conversion to specify that an +`int' argument should be printed in decimal notation, the `%s' +conversion to specify printing of a string argument, and the `%%' +conversion to print a literal `%' character. - `unsigned int is_short' - This is a boolean that is true if the `h' type modifier was - specified. + There are also conversions for printing an integer argument as an +unsigned value in octal, decimal, or hexadecimal radix (`%o', `%u', or +`%x', respectively); or as a character value (`%c'). - `unsigned int is_long' - This is a boolean that is true if the `l' type modifier was - specified. + Floating-point numbers can be printed in normal, fixed-point notation +using the `%f' conversion or in exponential notation using the `%e' +conversion. The `%g' conversion uses either `%e' or `%f' format, +depending on what is more appropriate for the magnitude of the +particular number. - `unsigned int alt' - This is a boolean that is true if the `#' flag was specified. + You can control formatting more precisely by writing "modifiers" +between the `%' and the character that indicates which conversion to +apply. These slightly alter the ordinary behavior of the conversion. +For example, most conversion specifications permit you to specify a +minimum field width and a flag indicating whether you want the result +left- or right-justified within the field. - `unsigned int space' - This is a boolean that is true if the ` ' flag was specified. + The specific flags and modifiers that are permitted and their +interpretation vary depending on the particular conversion. They're all +described in more detail in the following sections. Don't worry if this +all seems excessively complicated at first; you can almost always get +reasonable free-format output without using any of the modifiers at all. +The modifiers are mostly used to make the output look "prettier" in +tables. - `unsigned int left' - This is a boolean that is true if the `-' flag was specified. + +File: libc.info, Node: Output Conversion Syntax, Next: Table of Output Conversions, Prev: Formatted Output Basics, Up: Formatted Output - `unsigned int showsign' - This is a boolean that is true if the `+' flag was specified. +Output Conversion Syntax +------------------------ - `unsigned int group' - This is a boolean that is true if the `'' flag was specified. + This section provides details about the precise syntax of conversion +specifications that can appear in a `printf' template string. - `unsigned int extra' - This flag has a special meaning depending on the context. It - could be used freely by the user-defined handlers but when - called from the `printf' function this variable always - contains the value `0'. + Characters in the template string that are not part of a conversion +specification are printed as-is to the output stream. Multibyte +character sequences (*note Character Set Handling::) are permitted in a +template string. - `unsigned int wide' - This flag is set if the stream is wide oriented. + The conversion specifications in a `printf' template string have the +general form: - `wchar_t pad' - This is the character to use for padding the output to the - minimum field width. The value is `'0'' if the `0' flag was - specified, and `' '' otherwise. + % [ PARAM-NO $] FLAGS WIDTH [ . PRECISION ] TYPE CONVERSION - -File: libc.info, Node: Defining the Output Handler, Next: Printf Extension Example, Prev: Conversion Specifier Options, Up: Customizing Printf + For example, in the conversion specifier `%-10.8ld', the `-' is a +flag, `10' specifies the field width, the precision is `8', the letter +`l' is a type modifier, and `d' specifies the conversion style. (This +particular type specifier says to print a `long int' argument in +decimal notation, with a minimum of 8 digits left-justified in a field +at least 10 characters wide.) -Defining the Output Handler ---------------------------- + In more detail, output conversion specifications consist of an +initial `%' character followed in sequence by: - Now let's look at how to define the handler and arginfo functions -which are passed as arguments to `register_printf_function'. + * An optional specification of the parameter used for this format. + Normally the parameters to the `printf' function are assigned to + the formats in the order of appearance in the format string. But + in some situations (such as message translation) this is not + desirable and this extension allows an explicit parameter to be + specified. - *Compatibility Note:* The interface changed in GNU libc version 2.0. -Previously the third argument was of type `va_list *'. + The PARAM-NO part of the format must be an integer in the range of + 1 to the maximum number of arguments present to the function call. + Some implementations limit this number to a certainly upper + bound. The exact limit can be retrieved by the following constant. - You should define your handler functions with a prototype like: + - Macro: NL_ARGMAX + The value of `ARGMAX' is the maximum value allowed for the + specification of an positional parameter in a `printf' call. + The actual value in effect at runtime can be retrieved by + using `sysconf' using the `_SC_NL_ARGMAX' parameter *note + Sysconf Definition::. - int FUNCTION (FILE *stream, const struct printf_info *info, - const void *const *args) + Some system have a quite low limit such as 9 for System V + systems. The GNU C library has no real limit. - The STREAM argument passed to the handler function is the stream to -which it should write output. + If any of the formats has a specification for the parameter + position all of them in the format string shall have one. + Otherwise the behavior is undefined. - The INFO argument is a pointer to a structure that contains -information about the various options that were included with the -conversion in the template string. You should not modify this structure -inside your handler function. *Note Conversion Specifier Options::, for -a description of this data structure. + * Zero or more "flag characters" that modify the normal behavior of + the conversion specification. - The ARGS is a vector of pointers to the arguments data. The number -of arguments was determined by calling the argument information -function provided by the user. + * An optional decimal integer specifying the "minimum field width". + If the normal conversion produces fewer characters than this, the + field is padded with spaces to the specified width. This is a + _minimum_ value; if the normal conversion produces more characters + than this, the field is _not_ truncated. Normally, the output is + right-justified within the field. - Your handler function should return a value just like `printf' does: -it should return the number of characters it has written, or a negative -value to indicate an error. + You can also specify a field width of `*'. This means that the + next argument in the argument list (before the actual value to be + printed) is used as the field width. The value must be an `int'. + If the value is negative, this means to set the `-' flag (see + below) and to use the absolute value as the field width. - - Data Type: printf_function - This is the data type that a handler function should have. + * An optional "precision" to specify the number of digits to be + written for the numeric conversions. If the precision is + specified, it consists of a period (`.') followed optionally by a + decimal integer (which defaults to zero if omitted). - If you are going to use `parse_printf_format' in your application, -you must also define a function to pass as the ARGINFO-FUNCTION -argument for each new conversion you install with -`register_printf_function'. + You can also specify a precision of `*'. This means that the next + argument in the argument list (before the actual value to be + printed) is used as the precision. The value must be an `int', + and is ignored if it is negative. If you specify `*' for both the + field width and precision, the field width argument precedes the + precision argument. Other C library versions may not recognize + this syntax. - You have to define these functions with a prototype like: + * An optional "type modifier character", which is used to specify the + data type of the corresponding argument if it differs from the + default type. (For example, the integer conversions assume a type + of `int', but you can specify `h', `l', or `L' for other integer + types.) - int FUNCTION (const struct printf_info *info, - size_t n, int *argtypes) + * A character that specifies the conversion to be applied. - The return value from the function should be the number of arguments -the conversion expects. The function should also fill in no more than -N elements of the ARGTYPES array with information about the types of -each of these arguments. This information is encoded using the various -`PA_' macros. (You will notice that this is the same calling -convention `parse_printf_format' itself uses.) + The exact options that are permitted and how they are interpreted +vary between the different conversion specifiers. See the descriptions +of the individual conversions for information about the particular +options that they use. - - Data Type: printf_arginfo_function - This type is used to describe functions that return information - about the number and type of arguments used by a conversion - specifier. + With the `-Wformat' option, the GNU C compiler checks calls to +`printf' and related functions. It examines the format string and +verifies that the correct number and types of arguments are supplied. +There is also a GNU C syntax to tell the compiler that a function you +write uses a `printf'-style format string. *Note Declaring Attributes +of Functions: (gcc.info)Function Attributes, for more information. diff -durpN glibc-2.2.4/manual/libc.info-18 glibc-2.2.5/manual/libc.info-18 --- glibc-2.2.4/manual/libc.info-18 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-18 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1149 +33,1179 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Printf Extension Example, Next: Predefined Printf Handlers, Prev: Defining the Output Handler, Up: Customizing Printf - -`printf' Extension Example --------------------------- +File: libc.info, Node: Table of Output Conversions, Next: Integer Conversions, Prev: Output Conversion Syntax, Up: Formatted Output - Here is an example showing how to define a `printf' handler function. -This program defines a data structure called a `Widget' and defines the -`%W' conversion to print information about `Widget *' arguments, -including the pointer value and the name stored in the data structure. -The `%W' conversion supports the minimum field width and -left-justification options, but ignores everything else. +Table of Output Conversions +--------------------------- - #include - #include - #include - - typedef struct - { - char *name; - } - Widget; - - int - print_widget (FILE *stream, - const struct printf_info *info, - const void *const *args) - { - const Widget *w; - char *buffer; - int len; - - /* Format the output into a string. */ - w = *((const Widget **) (args[0])); - len = asprintf (&buffer, "", w, w->name); - if (len == -1) - return -1; - - /* Pad to the minimum field width and print to the stream. */ - len = fprintf (stream, "%*s", - (info->left ? -info->width : info->width), - buffer); - - /* Clean up and return. */ - free (buffer); - return len; - } - - - int - print_widget_arginfo (const struct printf_info *info, size_t n, - int *argtypes) - { - /* We always take exactly one argument and this is a pointer to the - structure.. */ - if (n > 0) - argtypes[0] = PA_POINTER; - return 1; - } - - - int - main (void) - { - /* Make a widget to print. */ - Widget mywidget; - mywidget.name = "mywidget"; - - /* Register the print function for widgets. */ - register_printf_function ('W', print_widget, print_widget_arginfo); - - /* Now print the widget. */ - printf ("|%W|\n", &mywidget); - printf ("|%35W|\n", &mywidget); - printf ("|%-35W|\n", &mywidget); - - return 0; - } + Here is a table summarizing what all the different conversions do: - The output produced by this program looks like: +`%d', `%i' + Print an integer as a signed decimal number. *Note Integer + Conversions::, for details. `%d' and `%i' are synonymous for + output, but are different when used with `scanf' for input (*note + Table of Input Conversions::). - || - | | - | | +`%o' + Print an integer as an unsigned octal number. *Note Integer + Conversions::, for details. - -File: libc.info, Node: Predefined Printf Handlers, Prev: Printf Extension Example, Up: Customizing Printf +`%u' + Print an integer as an unsigned decimal number. *Note Integer + Conversions::, for details. -Predefined `printf' Handlers ----------------------------- +`%x', `%X' + Print an integer as an unsigned hexadecimal number. `%x' uses + lower-case letters and `%X' uses upper-case. *Note Integer + Conversions::, for details. - The GNU libc also contains a concrete and useful application of the -`printf' handler extension. There are two functions available which -implement a special way to print floating-point numbers. +`%f' + Print a floating-point number in normal (fixed-point) notation. + *Note Floating-Point Conversions::, for details. - - Function: int printf_size (FILE *FP, const struct printf_info *INFO, - const void *const *ARGS) - Print a given floating point number as for the format `%f' except - that there is a postfix character indicating the divisor for the - number to make this less than 1000. There are two possible - divisors: powers of 1024 or powers of 1000. Which one is used - depends on the format character specified while registered this - handler. If the character is of lower case, 1024 is used. For - upper case characters, 1000 is used. +`%e', `%E' + Print a floating-point number in exponential notation. `%e' uses + lower-case letters and `%E' uses upper-case. *Note Floating-Point + Conversions::, for details. - The postfix tag corresponds to bytes, kilobytes, megabytes, - gigabytes, etc. The full table is: +`%g', `%G' + Print a floating-point number in either normal or exponential + notation, whichever is more appropriate for its magnitude. `%g' + uses lower-case letters and `%G' uses upper-case. *Note + Floating-Point Conversions::, for details. - +------+--------------+--------+--------+---------------+ - |low|Multiplier|From|Upper|Multiplier| - +------+--------------+--------+--------+---------------+ - |' '|1||' '|1| - +------+--------------+--------+--------+---------------+ - |k|2^10 (1024)|kilo|K|10^3 (1000)| - +------+--------------+--------+--------+---------------+ - |m|2^20|mega|M|10^6| - +------+--------------+--------+--------+---------------+ - |g|2^30|giga|G|10^9| - +------+--------------+--------+--------+---------------+ - |t|2^40|tera|T|10^12| - +------+--------------+--------+--------+---------------+ - |p|2^50|peta|P|10^15| - +------+--------------+--------+--------+---------------+ - |e|2^60|exa|E|10^18| - +------+--------------+--------+--------+---------------+ - |z|2^70|zetta|Z|10^21| - +------+--------------+--------+--------+---------------+ - |y|2^80|yotta|Y|10^24| - +------+--------------+--------+--------+---------------+ +`%a', `%A' + Print a floating-point number in a hexadecimal fractional notation + which the exponent to base 2 represented in decimal digits. `%a' + uses lower-case letters and `%A' uses upper-case. *Note + Floating-Point Conversions::, for details. - The default precision is 3, i.e., 1024 is printed with a lower-case - format character as if it were `%.3fk' and will yield `1.000k'. +`%c' + Print a single character. *Note Other Output Conversions::. - Due to the requirements of `register_printf_function' we must also -provide the function which returns information about the arguments. +`%C' + This is an alias for `%lc' which is supported for compatibility + with the Unix standard. - - Function: int printf_size_info (const struct printf_info *INFO, - size_t N, int *ARGTYPES) - This function will return in ARGTYPES the information about the - used parameters in the way the `vfprintf' implementation expects - it. The format always takes one argument. +`%s' + Print a string. *Note Other Output Conversions::. - To use these functions both functions must be registered with a call -like +`%S' + This is an alias for `%ls' which is supported for compatibility + with the Unix standard. - register_printf_function ('B', printf_size, printf_size_info); +`%p' + Print the value of a pointer. *Note Other Output Conversions::. - Here we register the functions to print numbers as powers of 1000 -since the format character `'B'' is an upper-case character. If we -would additionally use `'b'' in a line like +`%n' + Get the number of characters printed so far. *Note Other Output + Conversions::. Note that this conversion specification never + produces any output. - register_printf_function ('b', printf_size, printf_size_info); +`%m' + Print the string corresponding to the value of `errno'. (This is + a GNU extension.) *Note Other Output Conversions::. -we could also print using a power of 1024. Please note that all that is -different in these two lines is the format specifier. The -`printf_size' function knows about the difference between lower and -upper case format specifiers. +`%%' + Print a literal `%' character. *Note Other Output Conversions::. - The use of `'B'' and `'b'' is no coincidence. Rather it is the -preferred way to use this functionality since it is available on some -other systems which also use format specifiers. + If the syntax of a conversion specification is invalid, unpredictable +things will happen, so don't do this. If there aren't enough function +arguments provided to supply values for all the conversion +specifications in the template string, or if the arguments are not of +the correct types, the results are unpredictable. If you supply more +arguments than conversion specifications, the extra argument values are +simply ignored; this is sometimes useful.  -File: libc.info, Node: Formatted Input, Next: EOF and Errors, Prev: Customizing Printf, Up: I/O on Streams - -Formatted Input -=============== - - The functions described in this section (`scanf' and related -functions) provide facilities for formatted input analogous to the -formatted output facilities. These functions provide a mechanism for -reading arbitrary values under the control of a "format string" or -"template string". +File: libc.info, Node: Integer Conversions, Next: Floating-Point Conversions, Prev: Table of Output Conversions, Up: Formatted Output -* Menu: +Integer Conversions +------------------- -* Formatted Input Basics:: Some basics to get you started. -* Input Conversion Syntax:: Syntax of conversion specifications. -* Table of Input Conversions:: Summary of input conversions and what they do. -* Numeric Input Conversions:: Details of conversions for reading numbers. -* String Input Conversions:: Details of conversions for reading strings. -* Dynamic String Input:: String conversions that `malloc' the buffer. -* Other Input Conversions:: Details of miscellaneous other conversions. -* Formatted Input Functions:: Descriptions of the actual functions. -* Variable Arguments Input:: `vscanf' and friends. + This section describes the options for the `%d', `%i', `%o', `%u', +`%x', and `%X' conversion specifications. These conversions print +integers in various formats. - -File: libc.info, Node: Formatted Input Basics, Next: Input Conversion Syntax, Up: Formatted Input + The `%d' and `%i' conversion specifications both print an `int' +argument as a signed decimal number; while `%o', `%u', and `%x' print +the argument as an unsigned octal, decimal, or hexadecimal number +(respectively). The `%X' conversion specification is just like `%x' +except that it uses the characters `ABCDEF' as digits instead of +`abcdef'. -Formatted Input Basics ----------------------- + The following flags are meaningful: - Calls to `scanf' are superficially similar to calls to `printf' in -that arbitrary arguments are read under the control of a template -string. While the syntax of the conversion specifications in the -template is very similar to that for `printf', the interpretation of -the template is oriented more towards free-format input and simple -pattern matching, rather than fixed-field formatting. For example, -most `scanf' conversions skip over any amount of "white space" -(including spaces, tabs, and newlines) in the input file, and there is -no concept of precision for the numeric input conversions as there is -for the corresponding output conversions. Ordinarily, non-whitespace -characters in the template are expected to match characters in the -input stream exactly, but a matching failure is distinct from an input -error on the stream. +`-' + Left-justify the result in the field (instead of the normal + right-justification). - Another area of difference between `scanf' and `printf' is that you -must remember to supply pointers rather than immediate values as the -optional arguments to `scanf'; the values that are read are stored in -the objects that the pointers point to. Even experienced programmers -tend to forget this occasionally, so if your program is getting strange -errors that seem to be related to `scanf', you might want to -double-check this. +`+' + For the signed `%d' and `%i' conversions, print a plus sign if the + value is positive. - When a "matching failure" occurs, `scanf' returns immediately, -leaving the first non-matching character as the next character to be -read from the stream. The normal return value from `scanf' is the -number of values that were assigned, so you can use this to determine if -a matching error happened before all the expected values were read. +` ' + For the signed `%d' and `%i' conversions, if the result doesn't + start with a plus or minus sign, prefix it with a space character + instead. Since the `+' flag ensures that the result includes a + sign, this flag is ignored if you supply both of them. - The `scanf' function is typically used for things like reading in -the contents of tables. For example, here is a function that uses -`scanf' to initialize an array of `double': +`#' + For the `%o' conversion, this forces the leading digit to be `0', + as if by increasing the precision. For `%x' or `%X', this + prefixes a leading `0x' or `0X' (respectively) to the result. + This doesn't do anything useful for the `%d', `%i', or `%u' + conversions. Using this flag produces output which can be parsed + by the `strtoul' function (*note Parsing of Integers::) and + `scanf' with the `%i' conversion (*note Numeric Input + Conversions::). - void - readarray (double *array, int n) - { - int i; - for (i=0; i= size) + { + /* Reallocate buffer now that we know + how much space is needed. */ + buffer = (char *) xrealloc (buffer, nchars + 1); + + if (buffer != NULL) + /* Try again. */ + snprintf (buffer, size, "value of %s is %s", + name, value); + } + /* The last call worked, return the string. */ + return buffer; + } - Here is an example of using the `a' flag with the `%[...]' -conversion specification to read a "variable assignment" of the form -`VARIABLE = VALUE'. + In practice, it is often easier just to use `asprintf', below. - { - char *variable, *value; - - if (2 > scanf ("%a[a-zA-Z0-9] = %a[^\n]\n", - &variable, &value)) - { - invalid_input_error (); - return 0; - } - - ... - } + *Attention:* In versions of the GNU C library prior to 2.1 the + return value is the number of characters stored, not including the + terminating null; unless there was not enough space in S to store + the result in which case `-1' is returned. This was changed in + order to comply with the ISO C99 standard.  -File: libc.info, Node: Other Input Conversions, Next: Formatted Input Functions, Prev: Dynamic String Input, Up: Formatted Input +File: libc.info, Node: Dynamic Output, Next: Variable Arguments Output, Prev: Formatted Output Functions, Up: Formatted Output -Other Input Conversions ------------------------ +Dynamically Allocating Formatted Output +--------------------------------------- - This section describes the miscellaneous input conversions. + The functions in this section do formatted output and place the +results in dynamically allocated memory. - The `%p' conversion is used to read a pointer value. It recognizes -the same syntax used by the `%p' output conversion for `printf' (*note -Other Output Conversions::); that is, a hexadecimal number just as the -`%x' conversion accepts. The corresponding argument should be of type -`void **'; that is, the address of a place to store a pointer. + - Function: int asprintf (char **PTR, const char *TEMPLATE, ...) + This function is similar to `sprintf', except that it dynamically + allocates a string (as with `malloc'; *note Unconstrained + Allocation::) to hold the output, instead of putting the output in + a buffer you allocate in advance. The PTR argument should be the + address of a `char *' object, and `asprintf' stores a pointer to + the newly allocated string at that location. - The resulting pointer value is not guaranteed to be valid if it was -not originally written during the same program execution that reads it -in. + The return value is the number of characters allocated for the + buffer, or less than zero if an error occurred. Usually this means + that the buffer could not be allocated. - The `%n' conversion produces the number of characters read so far by -this call. The corresponding argument should be of type `int *'. This -conversion works in the same way as the `%n' conversion for `printf'; -see *Note Other Output Conversions::, for an example. + Here is how to use `asprintf' to get the same result as the + `snprintf' example, but more easily: - The `%n' conversion is the only mechanism for determining the -success of literal matches or conversions with suppressed assignments. -If the `%n' follows the locus of a matching failure, then no value is -stored for it since `scanf' returns before processing the `%n'. If you -store `-1' in that argument slot before calling `scanf', the presence -of `-1' after `scanf' indicates an error occurred before the `%n' was -reached. + /* Construct a message describing the value of a variable + whose name is NAME and whose value is VALUE. */ + char * + make_message (char *name, char *value) + { + char *result; + if (asprintf (&result, "value of %s is %s", name, value) < 0) + return NULL; + return result; + } - Finally, the `%%' conversion matches a literal `%' character in the -input stream, without using an argument. This conversion does not -permit any flags, field width, or type modifier to be specified. + - Function: int obstack_printf (struct obstack *OBSTACK, const char + *TEMPLATE, ...) + This function is similar to `asprintf', except that it uses the + obstack OBSTACK to allocate the space. *Note Obstacks::. - -File: libc.info, Node: Formatted Input Functions, Next: Variable Arguments Input, Prev: Other Input Conversions, Up: Formatted Input + The characters are written onto the end of the current object. To + get at them, you must finish the object with `obstack_finish' + (*note Growing Objects::). -Formatted Input Functions -------------------------- + +File: libc.info, Node: Variable Arguments Output, Next: Parsing a Template String, Prev: Dynamic Output, Up: Formatted Output - Here are the descriptions of the functions for performing formatted -input. Prototypes for these functions are in the header file `stdio.h'. +Variable Arguments Output Functions +----------------------------------- - - Function: int scanf (const char *TEMPLATE, ...) - The `scanf' function reads formatted input from the stream `stdin' - under the control of the template string TEMPLATE. The optional - arguments are pointers to the places which receive the resulting - values. + The functions `vprintf' and friends are provided so that you can +define your own variadic `printf'-like functions that make use of the +same internals as the built-in formatted output functions. - The return value is normally the number of successful assignments. - If an end-of-file condition is detected before any matches are - performed, including matches against whitespace and literal - characters in the template, then `EOF' is returned. + The most natural way to define such functions would be to use a +language construct to say, "Call `printf' and pass this template plus +all of my arguments after the first five." But there is no way to do +this in C, and it would be hard to provide a way, since at the C +language level there is no way to tell how many arguments your function +received. - - Function: int wscanf (const wchar_t *TEMPLATE, ...) - The `wscanf' function reads formatted input from the stream - `stdin' under the control of the template string TEMPLATE. The - optional arguments are pointers to the places which receive the - resulting values. + Since that method is impossible, we provide alternative functions, +the `vprintf' series, which lets you pass a `va_list' to describe "all +of my arguments after the first five." - The return value is normally the number of successful assignments. - If an end-of-file condition is detected before any matches are - performed, including matches against whitespace and literal - characters in the template, then `WEOF' is returned. + When it is sufficient to define a macro rather than a real function, +the GNU C compiler provides a way to do this much more easily with +macros. For example: - - Function: int fscanf (FILE *STREAM, const char *TEMPLATE, ...) - This function is just like `scanf', except that the input is read - from the stream STREAM instead of `stdin'. + #define myprintf(a, b, c, d, e, rest...) \ + printf (mytemplate , ## rest...) - - Function: int fwscanf (FILE *STREAM, const wchar_t *TEMPLATE, ...) - This function is just like `wscanf', except that the input is read - from the stream STREAM instead of `stdin'. +*Note Macros with Variable Numbers of Arguments: (gcc.info)Macro +Varargs, for details. But this is limited to macros, and does not +apply to real functions at all. - - Function: int sscanf (const char *S, const char *TEMPLATE, ...) - This is like `scanf', except that the characters are taken from the - null-terminated string S instead of from a stream. Reaching the - end of the string is treated as an end-of-file condition. + Before calling `vprintf' or the other functions listed in this +section, you _must_ call `va_start' (*note Variadic Functions::) to +initialize a pointer to the variable arguments. Then you can call +`va_arg' to fetch the arguments that you want to handle yourself. This +advances the pointer past those arguments. - The behavior of this function is undefined if copying takes place - between objects that overlap--for example, if S is also given as - an argument to receive a string read under control of the `%s', - `%S', or `%[' conversion. + Once your `va_list' pointer is pointing at the argument of your +choice, you are ready to call `vprintf'. That argument and all +subsequent arguments that were passed to your function are used by +`vprintf' along with the template that you specified separately. - - Function: int swscanf (const wchar_t *WS, const char *TEMPLATE, ...) - This is like `wscanf', except that the characters are taken from - the null-terminated string WS instead of from a stream. Reaching - the end of the string is treated as an end-of-file condition. + In some other systems, the `va_list' pointer may become invalid +after the call to `vprintf', so you must not use `va_arg' after you +call `vprintf'. Instead, you should call `va_end' to retire the +pointer from service. However, you can safely call `va_start' on +another pointer variable and begin fetching the arguments again through +that pointer. Calling `vprintf' does not destroy the argument list of +your function, merely the particular pointer that you passed to it. - The behavior of this function is undefined if copying takes place - between objects that overlap--for example, if WS is also given as - an argument to receive a string read under control of the `%s', - `%S', or `%[' conversion. + GNU C does not have such restrictions. You can safely continue to +fetch arguments from a `va_list' pointer after passing it to `vprintf', +and `va_end' is a no-op. (Note, however, that subsequent `va_arg' +calls will fetch the same arguments which `vprintf' previously used.) - -File: libc.info, Node: Variable Arguments Input, Prev: Formatted Input Functions, Up: Formatted Input + Prototypes for these functions are declared in `stdio.h'. -Variable Arguments Input Functions ----------------------------------- + - Function: int vprintf (const char *TEMPLATE, va_list AP) + This function is similar to `printf' except that, instead of taking + a variable number of arguments directly, it takes an argument list + pointer AP. - The functions `vscanf' and friends are provided so that you can -define your own variadic `scanf'-like functions that make use of the -same internals as the built-in formatted output functions. These -functions are analogous to the `vprintf' series of output functions. -*Note Variable Arguments Output::, for important information on how to -use them. + - Function: int vwprintf (const wchar_t *TEMPLATE, va_list AP) + This function is similar to `wprintf' except that, instead of + taking a variable number of arguments directly, it takes an + argument list pointer AP. - *Portability Note:* The functions listed in this section were -introduced in ISO C99 and were before available as GNU extensions. + - Function: int vfprintf (FILE *STREAM, const char *TEMPLATE, va_list + AP) + This is the equivalent of `fprintf' with the variable argument list + specified directly as for `vprintf'. - - Function: int vscanf (const char *TEMPLATE, va_list AP) - This function is similar to `scanf', but instead of taking a - variable number of arguments directly, it takes an argument list - pointer AP of type `va_list' (*note Variadic Functions::). + - Function: int vfwprintf (FILE *STREAM, const wchar_t *TEMPLATE, + va_list AP) + This is the equivalent of `fwprintf' with the variable argument + list specified directly as for `vwprintf'. - - Function: int vwscanf (const wchar_t *TEMPLATE, va_list AP) - This function is similar to `wscanf', but instead of taking a - variable number of arguments directly, it takes an argument list - pointer AP of type `va_list' (*note Variadic Functions::). + - Function: int vsprintf (char *S, const char *TEMPLATE, va_list AP) + This is the equivalent of `sprintf' with the variable argument list + specified directly as for `vprintf'. - - Function: int vfscanf (FILE *STREAM, const char *TEMPLATE, va_list - AP) - This is the equivalent of `fscanf' with the variable argument list - specified directly as for `vscanf'. + - Function: int vswprintf (wchar_t *S, size_t SIZE, const wchar_t + *TEMPLATE, va_list AP) + This is the equivalent of `swprintf' with the variable argument + list specified directly as for `vwprintf'. - - Function: int vfwscanf (FILE *STREAM, const wchar_t *TEMPLATE, + - Function: int vsnprintf (char *S, size_t SIZE, const char *TEMPLATE, va_list AP) - This is the equivalent of `fwscanf' with the variable argument list - specified directly as for `vwscanf'. + This is the equivalent of `snprintf' with the variable argument + list specified directly as for `vprintf'. - - Function: int vsscanf (const char *S, const char *TEMPLATE, va_list + - Function: int vasprintf (char **PTR, const char *TEMPLATE, va_list AP) - This is the equivalent of `sscanf' with the variable argument list - specified directly as for `vscanf'. + The `vasprintf' function is the equivalent of `asprintf' with the + variable argument list specified directly as for `vprintf'. - - Function: int vswscanf (const wchar_t *S, const wchar_t *TEMPLATE, - va_list AP) - This is the equivalent of `swscanf' with the variable argument list - specified directly as for `vwscanf'. + - Function: int obstack_vprintf (struct obstack *OBSTACK, const char + *TEMPLATE, va_list AP) + The `obstack_vprintf' function is the equivalent of + `obstack_printf' with the variable argument list specified directly + as for `vprintf'. + + Here's an example showing how you might use `vfprintf'. This is a +function that prints error messages to the stream `stderr', along with +a prefix indicating the name of the program (*note Error Messages::, +for a description of `program_invocation_short_name'). + + #include + #include + + void + eprintf (const char *template, ...) + { + va_list ap; + extern char *program_invocation_short_name; + + fprintf (stderr, "%s: ", program_invocation_short_name); + va_start (ap, template); + vfprintf (stderr, template, ap); + va_end (ap); + } + +You could call `eprintf' like this: + + eprintf ("file `%s' does not exist\n", filename); In GNU C, there is a special construct you can use to let the -compiler know that a function uses a `scanf'-style format string. Then -it can check the number and types of arguments in each call to the +compiler know that a function uses a `printf'-style format string. +Then it can check the number and types of arguments in each call to the function, and warn you when they do not match the format string. For -details, *Note Declaring Attributes of Functions: (gcc.info)Function -Attributes. +example, take this declaration of `eprintf': + + void eprintf (const char *template, ...) + __attribute__ ((format (printf, 1, 2))); + +This tells the compiler that `eprintf' uses a format string like +`printf' (as opposed to `scanf'; *note Formatted Input::); the format +string appears as the first argument; and the arguments to satisfy the +format begin with the second. *Note Declaring Attributes of Functions: +(gcc.info)Function Attributes, for more information.  -File: libc.info, Node: EOF and Errors, Next: Error Recovery, Prev: Formatted Input, Up: I/O on Streams +File: libc.info, Node: Parsing a Template String, Next: Example of Parsing, Prev: Variable Arguments Output, Up: Formatted Output -End-Of-File and Errors -====================== +Parsing a Template String +------------------------- - Many of the functions described in this chapter return the value of -the macro `EOF' to indicate unsuccessful completion of the operation. -Since `EOF' is used to report both end of file and random errors, it's -often better to use the `feof' function to check explicitly for end of -file and `ferror' to check for errors. These functions check -indicators that are part of the internal state of the stream object, -indicators set if the appropriate condition was detected by a previous -I/O operation on that stream. + You can use the function `parse_printf_format' to obtain information +about the number and types of arguments that are expected by a given +template string. This function permits interpreters that provide +interfaces to `printf' to avoid passing along invalid arguments from +the user's program, which could cause a crash. - - Macro: int EOF - This macro is an integer value that is returned by a number of - narrow stream functions to indicate an end-of-file condition, or - some other error situation. With the GNU library, `EOF' is `-1'. - In other libraries, its value may be some other negative number. + All the symbols described in this section are declared in the header +file `printf.h'. - This symbol is declared in `stdio.h'. + - Function: size_t parse_printf_format (const char *TEMPLATE, size_t + N, int *ARGTYPES) + This function returns information about the number and types of + arguments expected by the `printf' template string TEMPLATE. The + information is stored in the array ARGTYPES; each element of this + array describes one argument. This information is encoded using + the various `PA_' macros, listed below. - - Macro: int WEOF - This macro is an integer value that is returned by a number of wide - stream functions to indicate an end-of-file condition, or some - other error situation. With the GNU library, `WEOF' is `-1'. In - other libraries, its value may be some other negative number. + The argument N specifies the number of elements in the array + ARGTYPES. This is the maximum number of elements that + `parse_printf_format' will try to write. - This symbol is declared in `wchar.h'. + `parse_printf_format' returns the total number of arguments + required by TEMPLATE. If this number is greater than N, then the + information returned describes only the first N arguments. If you + want information about additional arguments, allocate a bigger + array and call `parse_printf_format' again. - - Function: int feof (FILE *STREAM) - The `feof' function returns nonzero if and only if the end-of-file - indicator for the stream STREAM is set. + The argument types are encoded as a combination of a basic type and +modifier flag bits. - This symbol is declared in `stdio.h'. + - Macro: int PA_FLAG_MASK + This macro is a bitmask for the type modifier flag bits. You can + write the expression `(argtypes[i] & PA_FLAG_MASK)' to extract + just the flag bits for an argument, or `(argtypes[i] & + ~PA_FLAG_MASK)' to extract just the basic type code. - - Function: int feof_unlocked (FILE *STREAM) - The `feof_unlocked' function is equivalent to the `feof' function - except that it does not implicitly lock the stream. + Here are symbolic constants that represent the basic types; they +stand for integer values. - This function is a GNU extension. +`PA_INT' + This specifies that the base type is `int'. - This symbol is declared in `stdio.h'. +`PA_CHAR' + This specifies that the base type is `int', cast to `char'. - - Function: int ferror (FILE *STREAM) - The `ferror' function returns nonzero if and only if the error - indicator for the stream STREAM is set, indicating that an error - has occurred on a previous operation on the stream. +`PA_STRING' + This specifies that the base type is `char *', a null-terminated + string. - This symbol is declared in `stdio.h'. +`PA_POINTER' + This specifies that the base type is `void *', an arbitrary + pointer. - - Function: int ferror_unlocked (FILE *STREAM) - The `ferror_unlocked' function is equivalent to the `ferror' - function except that it does not implicitly lock the stream. +`PA_FLOAT' + This specifies that the base type is `float'. - This function is a GNU extension. +`PA_DOUBLE' + This specifies that the base type is `double'. - This symbol is declared in `stdio.h'. +`PA_LAST' + You can define additional base types for your own programs as + offsets from `PA_LAST'. For example, if you have data types `foo' + and `bar' with their own specialized `printf' conversions, you + could define encodings for these types as: - In addition to setting the error indicator associated with the -stream, the functions that operate on streams also set `errno' in the -same way as the corresponding low-level functions that operate on file -descriptors. For example, all of the functions that perform output to a -stream--such as `fputc', `printf', and `fflush'--are implemented in -terms of `write', and all of the `errno' error conditions defined for -`write' are meaningful for these functions. For more information about -the descriptor-level I/O functions, see *Note Low-Level I/O::. + #define PA_FOO PA_LAST + #define PA_BAR (PA_LAST + 1) + + Here are the flag bits that modify a basic type. They are combined +with the code for the basic type using inclusive-or. + +`PA_FLAG_PTR' + If this bit is set, it indicates that the encoded type is a + pointer to the base type, rather than an immediate value. For + example, `PA_INT|PA_FLAG_PTR' represents the type `int *'. + +`PA_FLAG_SHORT' + If this bit is set, it indicates that the base type is modified + with `short'. (This corresponds to the `h' type modifier.) + +`PA_FLAG_LONG' + If this bit is set, it indicates that the base type is modified + with `long'. (This corresponds to the `l' type modifier.) + +`PA_FLAG_LONG_LONG' + If this bit is set, it indicates that the base type is modified + with `long long'. (This corresponds to the `L' type modifier.) + +`PA_FLAG_LONG_DOUBLE' + This is a synonym for `PA_FLAG_LONG_LONG', used by convention with + a base type of `PA_DOUBLE' to indicate a type of `long double'. + + For an example of using these facilities, see *Note Example of +Parsing::.  -File: libc.info, Node: Error Recovery, Next: Binary Streams, Prev: EOF and Errors, Up: I/O on Streams +File: libc.info, Node: Example of Parsing, Prev: Parsing a Template String, Up: Formatted Output -Recovering from errors -====================== +Example of Parsing a Template String +------------------------------------ - You may explicitly clear the error and EOF flags with the `clearerr' -function. + Here is an example of decoding argument types for a format string. +We assume this is part of an interpreter which contains arguments of +type `NUMBER', `CHAR', `STRING' and `STRUCTURE' (and perhaps others +which are not valid here). - - Function: void clearerr (FILE *STREAM) - This function clears the end-of-file and error indicators for the - stream STREAM. + /* Test whether the NARGS specified objects + in the vector ARGS are valid + for the format string FORMAT: + if so, return 1. + If not, return 0 after printing an error message. */ + + int + validate_args (char *format, int nargs, OBJECT *args) + { + int *argtypes; + int nwanted; + + /* Get the information about the arguments. + Each conversion specification must be at least two characters + long, so there cannot be more specifications than half the + length of the string. */ + + argtypes = (int *) alloca (strlen (format) / 2 * sizeof (int)); + nwanted = parse_printf_format (string, nelts, argtypes); + + /* Check the number of arguments. */ + if (nwanted > nargs) + { + error ("too few arguments (at least %d required)", nwanted); + return 0; + } + + /* Check the C type wanted for each argument + and see if the object given is suitable. */ + for (i = 0; i < nwanted; i++) + { + int wanted; + + if (argtypes[i] & PA_FLAG_PTR) + wanted = STRUCTURE; + else + switch (argtypes[i] & ~PA_FLAG_MASK) + { + case PA_INT: + case PA_FLOAT: + case PA_DOUBLE: + wanted = NUMBER; + break; + case PA_CHAR: + wanted = CHAR; + break; + case PA_STRING: + wanted = STRING; + break; + case PA_POINTER: + wanted = STRUCTURE; + break; + } + if (TYPE (args[i]) != wanted) + { + error ("type mismatch for arg number %d", i); + return 0; + } + } + return 1; + } - The file positioning functions (*note File Positioning::) also - clear the end-of-file indicator for the stream. + +File: libc.info, Node: Customizing Printf, Next: Formatted Input, Prev: Formatted Output, Up: I/O on Streams - - Function: void clearerr_unlocked (FILE *STREAM) - The `clearerr_unlocked' function is equivalent to the `clearerr' - function except that it does not implicitly lock the stream. +Customizing `printf' +==================== - This function is a GNU extension. + The GNU C library lets you define your own custom conversion +specifiers for `printf' template strings, to teach `printf' clever ways +to print the important data structures of your program. - Note that it is _not_ correct to just clear the error flag and retry -a failed stream operation. After a failed write, any number of -characters since the last buffer flush may have been committed to the -file, while some buffered data may have been discarded. Merely retrying -can thus cause lost or repeated data. + The way you do this is by registering the conversion with the +function `register_printf_function'; see *Note Registering New +Conversions::. One of the arguments you pass to this function is a +pointer to a handler function that produces the actual output; see +*Note Defining the Output Handler::, for information on how to write +this function. - A failed read may leave the file pointer in an inappropriate -position for a second try. In both cases, you should seek to a known -position before retrying. + You can also install a function that just returns information about +the number and type of arguments expected by the conversion specifier. +*Note Parsing a Template String::, for information about this. - Most errors that can happen are not recoverable -- a second try will -always fail again in the same way. So usually it is best to give up and -report the error to the user, rather than install complicated recovery -logic. + The facilities of this section are declared in the header file +`printf.h'. - One important exception is `EINTR' (*note Interrupted Primitives::). -Many stream I/O implementations will treat it as an ordinary error, -which can be quite inconvenient. You can avoid this hassle by -installing all signals with the `SA_RESTART' flag. +* Menu: - For similar reasons, setting nonblocking I/O on a stream's file -descriptor is not usually advisable. +* Registering New Conversions:: Using `register_printf_function' + to register a new output conversion. +* Conversion Specifier Options:: The handler must be able to get + the options specified in the + template when it is called. +* Defining the Output Handler:: Defining the handler and arginfo + functions that are passed as arguments + to `register_printf_function'. +* Printf Extension Example:: How to define a `printf' + handler function. +* Predefined Printf Handlers:: Predefined `printf' handlers. + + *Portability Note:* The ability to extend the syntax of `printf' +template strings is a GNU extension. ISO standard C has nothing +similar.  -File: libc.info, Node: Binary Streams, Next: File Positioning, Prev: Error Recovery, Up: I/O on Streams +File: libc.info, Node: Registering New Conversions, Next: Conversion Specifier Options, Up: Customizing Printf -Text and Binary Streams -======================= +Registering New Conversions +--------------------------- - The GNU system and other POSIX-compatible operating systems organize -all files as uniform sequences of characters. However, some other -systems make a distinction between files containing text and files -containing binary data, and the input and output facilities of ISO C -provide for this distinction. This section tells you how to write -programs portable to such systems. + The function to register a new output conversion is +`register_printf_function', declared in `printf.h'. - When you open a stream, you can specify either a "text stream" or a -"binary stream". You indicate that you want a binary stream by -specifying the `b' modifier in the OPENTYPE argument to `fopen'; see -*Note Opening Streams::. Without this option, `fopen' opens the file -as a text stream. + - Function: int register_printf_function (int SPEC, printf_function + HANDLER-FUNCTION, printf_arginfo_function ARGINFO-FUNCTION) + This function defines the conversion specifier character SPEC. + Thus, if SPEC is `'Y'', it defines the conversion `%Y'. You can + redefine the built-in conversions like `%s', but flag characters + like `#' and type modifiers like `l' can never be used as + conversions; calling `register_printf_function' for those + characters has no effect. It is advisable not to use lowercase + letters, since the ISO C standard warns that additional lowercase + letters may be standardized in future editions of the standard. - Text and binary streams differ in several ways: + The HANDLER-FUNCTION is the function called by `printf' and + friends when this conversion appears in a template string. *Note + Defining the Output Handler::, for information about how to define + a function to pass as this argument. If you specify a null + pointer, any existing handler function for SPEC is removed. - * The data read from a text stream is divided into "lines" which are - terminated by newline (`'\n'') characters, while a binary stream is - simply a long series of characters. A text stream might on some - systems fail to handle lines more than 254 characters long - (including the terminating newline character). + The ARGINFO-FUNCTION is the function called by + `parse_printf_format' when this conversion appears in a template + string. *Note Parsing a Template String::, for information about + this. - * On some systems, text files can contain only printing characters, - horizontal tab characters, and newlines, and so text streams may - not support other characters. However, binary streams can handle - any character value. + *Attention:* In the GNU C library versions before 2.0 the + ARGINFO-FUNCTION function did not need to be installed unless the + user used the `parse_printf_format' function. This has changed. + Now a call to any of the `printf' functions will call this + function when this format specifier appears in the format string. - * Space characters that are written immediately preceding a newline - character in a text stream may disappear when the file is read in - again. + The return value is `0' on success, and `-1' on failure (which + occurs if SPEC is out of range). - * More generally, there need not be a one-to-one mapping between - characters that are read from or written to a text stream, and the - characters in the actual file. + You can redefine the standard output conversions, but this is + probably not a good idea because of the potential for confusion. + Library routines written by other people could break if you do + this. - Since a binary stream is always more capable and more predictable -than a text stream, you might wonder what purpose text streams serve. -Why not simply always use binary streams? The answer is that on these -operating systems, text and binary streams use different file formats, -and the only way to read or write "an ordinary file of text" that can -work with other text-oriented programs is through a text stream. + +File: libc.info, Node: Conversion Specifier Options, Next: Defining the Output Handler, Prev: Registering New Conversions, Up: Customizing Printf - In the GNU library, and on all POSIX systems, there is no difference -between text streams and binary streams. When you open a stream, you -get the same kind of stream regardless of whether you ask for binary. -This stream can handle any file content, and has none of the -restrictions that text streams sometimes have. +Conversion Specifier Options +---------------------------- - -File: libc.info, Node: File Positioning, Next: Portable Positioning, Prev: Binary Streams, Up: I/O on Streams + If you define a meaning for `%A', what if the template contains +`%+23A' or `%-#A'? To implement a sensible meaning for these, the +handler when called needs to be able to get the options specified in +the template. -File Positioning -================ + Both the HANDLER-FUNCTION and ARGINFO-FUNCTION accept an argument +that points to a `struct printf_info', which contains information about +the options appearing in an instance of the conversion specifier. This +data type is declared in the header file `printf.h'. - The "file position" of a stream describes where in the file the -stream is currently reading or writing. I/O on the stream advances the -file position through the file. In the GNU system, the file position is -represented as an integer, which counts the number of bytes from the -beginning of the file. *Note File Position::. + - Type: struct printf_info + This structure is used to pass information about the options + appearing in an instance of a conversion specifier in a `printf' + template string to the handler and arginfo functions for that + specifier. It contains the following members: - During I/O to an ordinary disk file, you can change the file position -whenever you wish, so as to read or write any portion of the file. Some -other kinds of files may also permit this. Files which support changing -the file position are sometimes referred to as "random-access" files. + `int prec' + This is the precision specified. The value is `-1' if no + precision was specified. If the precision was given as `*', + the `printf_info' structure passed to the handler function + contains the actual value retrieved from the argument list. + But the structure passed to the arginfo function contains a + value of `INT_MIN', since the actual value is not known. - You can use the functions in this section to examine or modify the -file position indicator associated with a stream. The symbols listed -below are declared in the header file `stdio.h'. + `int width' + This is the minimum field width specified. The value is `0' + if no width was specified. If the field width was given as + `*', the `printf_info' structure passed to the handler + function contains the actual value retrieved from the + argument list. But the structure passed to the arginfo + function contains a value of `INT_MIN', since the actual + value is not known. - - Function: long int ftell (FILE *STREAM) - This function returns the current file position of the stream - STREAM. + `wchar_t spec' + This is the conversion specifier character specified. It's + stored in the structure so that you can register the same + handler function for multiple characters, but still have a + way to tell them apart when the handler function is called. - This function can fail if the stream doesn't support file - positioning, or if the file position can't be represented in a - `long int', and possibly for other reasons as well. If a failure - occurs, a value of `-1' is returned. + `unsigned int is_long_double' + This is a boolean that is true if the `L', `ll', or `q' type + modifier was specified. For integer conversions, this + indicates `long long int', as opposed to `long double' for + floating point conversions. - - Function: off_t ftello (FILE *STREAM) - The `ftello' function is similar to `ftell', except that it - returns a value of type `off_t'. Systems which support this type - use it to describe all file positions, unlike the POSIX - specification which uses a long int. The two are not necessarily - the same size. Therefore, using ftell can lead to problems if the - implementation is written on top of a POSIX compliant low-level - I/O implementation, and using `ftello' is preferable whenever it - is available. + `unsigned int is_char' + This is a boolean that is true if the `hh' type modifier was + specified. - If this function fails it returns `(off_t) -1'. This can happen - due to missing support for file positioning or internal errors. - Otherwise the return value is the current file position. + `unsigned int is_short' + This is a boolean that is true if the `h' type modifier was + specified. - The function is an extension defined in the Unix Single - Specification version 2. + `unsigned int is_long' + This is a boolean that is true if the `l' type modifier was + specified. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32 bit system this function is in fact `ftello64'. I.e., the LFS - interface transparently replaces the old interface. + `unsigned int alt' + This is a boolean that is true if the `#' flag was specified. - - Function: off64_t ftello64 (FILE *STREAM) - This function is similar to `ftello' with the only difference that - the return value is of type `off64_t'. This also requires that the - stream STREAM was opened using either `fopen64', `freopen64', or - `tmpfile64' since otherwise the underlying file operations to - position the file pointer beyond the 2^31 bytes limit might fail. + `unsigned int space' + This is a boolean that is true if the ` ' flag was specified. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `ftello' - and so transparently replaces the old interface. + `unsigned int left' + This is a boolean that is true if the `-' flag was specified. - - Function: int fseek (FILE *STREAM, long int OFFSET, int WHENCE) - The `fseek' function is used to change the file position of the - stream STREAM. The value of WHENCE must be one of the constants - `SEEK_SET', `SEEK_CUR', or `SEEK_END', to indicate whether the - OFFSET is relative to the beginning of the file, the current file - position, or the end of the file, respectively. + `unsigned int showsign' + This is a boolean that is true if the `+' flag was specified. - This function returns a value of zero if the operation was - successful, and a nonzero value to indicate failure. A successful - call also clears the end-of-file indicator of STREAM and discards - any characters that were "pushed back" by the use of `ungetc'. + `unsigned int group' + This is a boolean that is true if the `'' flag was specified. - `fseek' either flushes any buffered output before setting the file - position or else remembers it so it will be written later in its - proper place in the file. + `unsigned int extra' + This flag has a special meaning depending on the context. It + could be used freely by the user-defined handlers but when + called from the `printf' function this variable always + contains the value `0'. - - Function: int fseeko (FILE *STREAM, off_t OFFSET, int WHENCE) - This function is similar to `fseek' but it corrects a problem with - `fseek' in a system with POSIX types. Using a value of type `long - int' for the offset is not compatible with POSIX. `fseeko' uses - the correct type `off_t' for the OFFSET parameter. + `unsigned int wide' + This flag is set if the stream is wide oriented. - For this reason it is a good idea to prefer `ftello' whenever it is - available since its functionality is (if different at all) closer - the underlying definition. + `wchar_t pad' + This is the character to use for padding the output to the + minimum field width. The value is `'0'' if the `0' flag was + specified, and `' '' otherwise. - The functionality and return value is the same as for `fseek'. + +File: libc.info, Node: Defining the Output Handler, Next: Printf Extension Example, Prev: Conversion Specifier Options, Up: Customizing Printf - The function is an extension defined in the Unix Single - Specification version 2. +Defining the Output Handler +--------------------------- - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32 bit system this function is in fact `fseeko64'. I.e., the LFS - interface transparently replaces the old interface. + Now let's look at how to define the handler and arginfo functions +which are passed as arguments to `register_printf_function'. - - Function: int fseeko64 (FILE *STREAM, off64_t OFFSET, int WHENCE) - This function is similar to `fseeko' with the only difference that - the OFFSET parameter is of type `off64_t'. This also requires - that the stream STREAM was opened using either `fopen64', - `freopen64', or `tmpfile64' since otherwise the underlying file - operations to position the file pointer beyond the 2^31 bytes - limit might fail. + *Compatibility Note:* The interface changed in GNU libc version 2.0. +Previously the third argument was of type `va_list *'. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `fseeko' - and so transparently replaces the old interface. + You should define your handler functions with a prototype like: - *Portability Note:* In non-POSIX systems, `ftell', `ftello', `fseek' -and `fseeko' might work reliably only on binary streams. *Note Binary -Streams::. + int FUNCTION (FILE *stream, const struct printf_info *info, + const void *const *args) - The following symbolic constants are defined for use as the WHENCE -argument to `fseek'. They are also used with the `lseek' function -(*note I/O Primitives::) and to specify offsets for file locks (*note -Control Operations::). + The STREAM argument passed to the handler function is the stream to +which it should write output. - - Macro: int SEEK_SET - This is an integer constant which, when used as the WHENCE - argument to the `fseek' or `fseeko' function, specifies that the - offset provided is relative to the beginning of the file. + The INFO argument is a pointer to a structure that contains +information about the various options that were included with the +conversion in the template string. You should not modify this structure +inside your handler function. *Note Conversion Specifier Options::, for +a description of this data structure. - - Macro: int SEEK_CUR - This is an integer constant which, when used as the WHENCE - argument to the `fseek' or `fseeko' function, specifies that the - offset provided is relative to the current file position. + The ARGS is a vector of pointers to the arguments data. The number +of arguments was determined by calling the argument information +function provided by the user. - - Macro: int SEEK_END - This is an integer constant which, when used as the WHENCE - argument to the `fseek' or `fseeko' function, specifies that the - offset provided is relative to the end of the file. + Your handler function should return a value just like `printf' does: +it should return the number of characters it has written, or a negative +value to indicate an error. - - Function: void rewind (FILE *STREAM) - The `rewind' function positions the stream STREAM at the beginning - of the file. It is equivalent to calling `fseek' or `fseeko' on - the STREAM with an OFFSET argument of `0L' and a WHENCE argument - of `SEEK_SET', except that the return value is discarded and the - error indicator for the stream is reset. + - Data Type: printf_function + This is the data type that a handler function should have. - These three aliases for the `SEEK_...' constants exist for the sake -of compatibility with older BSD systems. They are defined in two -different header files: `fcntl.h' and `sys/file.h'. + If you are going to use `parse_printf_format' in your application, +you must also define a function to pass as the ARGINFO-FUNCTION +argument for each new conversion you install with +`register_printf_function'. -`L_SET' - An alias for `SEEK_SET'. + You have to define these functions with a prototype like: -`L_INCR' - An alias for `SEEK_CUR'. + int FUNCTION (const struct printf_info *info, + size_t n, int *argtypes) -`L_XTND' - An alias for `SEEK_END'. + The return value from the function should be the number of arguments +the conversion expects. The function should also fill in no more than +N elements of the ARGTYPES array with information about the types of +each of these arguments. This information is encoded using the various +`PA_' macros. (You will notice that this is the same calling +convention `parse_printf_format' itself uses.) + + - Data Type: printf_arginfo_function + This type is used to describe functions that return information + about the number and type of arguments used by a conversion + specifier. diff -durpN glibc-2.2.4/manual/libc.info-19 glibc-2.2.5/manual/libc.info-19 --- glibc-2.2.4/manual/libc.info-19 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-19 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1105 +33,1149 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Portable Positioning, Next: Stream Buffering, Prev: File Positioning, Up: I/O on Streams - -Portable File-Position Functions -================================ - - On the GNU system, the file position is truly a character count. You -can specify any character count value as an argument to `fseek' or -`fseeko' and get reliable results for any random access file. However, -some ISO C systems do not represent file positions in this way. - - On some systems where text streams truly differ from binary streams, -it is impossible to represent the file position of a text stream as a -count of characters from the beginning of the file. For example, the -file position on some systems must encode both a record offset within -the file, and a character offset within the record. +File: libc.info, Node: Printf Extension Example, Next: Predefined Printf Handlers, Prev: Defining the Output Handler, Up: Customizing Printf - As a consequence, if you want your programs to be portable to these -systems, you must observe certain rules: +`printf' Extension Example +-------------------------- - * The value returned from `ftell' on a text stream has no predictable - relationship to the number of characters you have read so far. - The only thing you can rely on is that you can use it subsequently - as the OFFSET argument to `fseek' or `fseeko' to move back to the - same file position. + Here is an example showing how to define a `printf' handler function. +This program defines a data structure called a `Widget' and defines the +`%W' conversion to print information about `Widget *' arguments, +including the pointer value and the name stored in the data structure. +The `%W' conversion supports the minimum field width and +left-justification options, but ignores everything else. - * In a call to `fseek' or `fseeko' on a text stream, either the - OFFSET must be zero, or WHENCE must be `SEEK_SET' and and the - OFFSET must be the result of an earlier call to `ftell' on the - same stream. + #include + #include + #include + + typedef struct + { + char *name; + } + Widget; + + int + print_widget (FILE *stream, + const struct printf_info *info, + const void *const *args) + { + const Widget *w; + char *buffer; + int len; + + /* Format the output into a string. */ + w = *((const Widget **) (args[0])); + len = asprintf (&buffer, "", w, w->name); + if (len == -1) + return -1; + + /* Pad to the minimum field width and print to the stream. */ + len = fprintf (stream, "%*s", + (info->left ? -info->width : info->width), + buffer); + + /* Clean up and return. */ + free (buffer); + return len; + } + + + int + print_widget_arginfo (const struct printf_info *info, size_t n, + int *argtypes) + { + /* We always take exactly one argument and this is a pointer to the + structure.. */ + if (n > 0) + argtypes[0] = PA_POINTER; + return 1; + } + + + int + main (void) + { + /* Make a widget to print. */ + Widget mywidget; + mywidget.name = "mywidget"; + + /* Register the print function for widgets. */ + register_printf_function ('W', print_widget, print_widget_arginfo); + + /* Now print the widget. */ + printf ("|%W|\n", &mywidget); + printf ("|%35W|\n", &mywidget); + printf ("|%-35W|\n", &mywidget); + + return 0; + } - * The value of the file position indicator of a text stream is - undefined while there are characters that have been pushed back - with `ungetc' that haven't been read or discarded. *Note - Unreading::. + The output produced by this program looks like: - But even if you observe these rules, you may still have trouble for -long files, because `ftell' and `fseek' use a `long int' value to -represent the file position. This type may not have room to encode all -the file positions in a large file. Using the `ftello' and `fseeko' -functions might help here since the `off_t' type is expected to be able -to hold all file position values but this still does not help to handle -additional information which must be associated with a file position. + || + | | + | | - So if you do want to support systems with peculiar encodings for the -file positions, it is better to use the functions `fgetpos' and -`fsetpos' instead. These functions represent the file position using -the data type `fpos_t', whose internal representation varies from -system to system. + +File: libc.info, Node: Predefined Printf Handlers, Prev: Printf Extension Example, Up: Customizing Printf - These symbols are declared in the header file `stdio.h'. +Predefined `printf' Handlers +---------------------------- - - Data Type: fpos_t - This is the type of an object that can encode information about the - file position of a stream, for use by the functions `fgetpos' and - `fsetpos'. + The GNU libc also contains a concrete and useful application of the +`printf' handler extension. There are two functions available which +implement a special way to print floating-point numbers. - In the GNU system, `fpos_t' is an opaque data structure that - contains internal data to represent file offset and conversion - state information. In other systems, it might have a different - internal representation. + - Function: int printf_size (FILE *FP, const struct printf_info *INFO, + const void *const *ARGS) + Print a given floating point number as for the format `%f' except + that there is a postfix character indicating the divisor for the + number to make this less than 1000. There are two possible + divisors: powers of 1024 or powers of 1000. Which one is used + depends on the format character specified while registered this + handler. If the character is of lower case, 1024 is used. For + upper case characters, 1000 is used. - When compiling with `_FILE_OFFSET_BITS == 64' on a 32 bit machine - this type is in fact equivalent to `fpos64_t' since the LFS - interface transparently replaces the old interface. + The postfix tag corresponds to bytes, kilobytes, megabytes, + gigabytes, etc. The full table is: - - Data Type: fpos64_t - This is the type of an object that can encode information about the - file position of a stream, for use by the functions `fgetpos64' and - `fsetpos64'. + +------+--------------+--------+--------+---------------+ + |low|Multiplier|From|Upper|Multiplier| + +------+--------------+--------+--------+---------------+ + |' '|1||' '|1| + +------+--------------+--------+--------+---------------+ + |k|2^10 (1024)|kilo|K|10^3 (1000)| + +------+--------------+--------+--------+---------------+ + |m|2^20|mega|M|10^6| + +------+--------------+--------+--------+---------------+ + |g|2^30|giga|G|10^9| + +------+--------------+--------+--------+---------------+ + |t|2^40|tera|T|10^12| + +------+--------------+--------+--------+---------------+ + |p|2^50|peta|P|10^15| + +------+--------------+--------+--------+---------------+ + |e|2^60|exa|E|10^18| + +------+--------------+--------+--------+---------------+ + |z|2^70|zetta|Z|10^21| + +------+--------------+--------+--------+---------------+ + |y|2^80|yotta|Y|10^24| + +------+--------------+--------+--------+---------------+ - In the GNU system, `fpos64_t' is an opaque data structure that - contains internal data to represent file offset and conversion - state information. In other systems, it might have a different - internal representation. + The default precision is 3, i.e., 1024 is printed with a lower-case + format character as if it were `%.3fk' and will yield `1.000k'. - - Function: int fgetpos (FILE *STREAM, fpos_t *POSITION) - This function stores the value of the file position indicator for - the stream STREAM in the `fpos_t' object pointed to by POSITION. - If successful, `fgetpos' returns zero; otherwise it returns a - nonzero value and stores an implementation-defined positive value - in `errno'. + Due to the requirements of `register_printf_function' we must also +provide the function which returns information about the arguments. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32 bit system the function is in fact `fgetpos64'. I.e., the LFS - interface transparently replaces the old interface. + - Function: int printf_size_info (const struct printf_info *INFO, + size_t N, int *ARGTYPES) + This function will return in ARGTYPES the information about the + used parameters in the way the `vfprintf' implementation expects + it. The format always takes one argument. - - Function: int fgetpos64 (FILE *STREAM, fpos64_t *POSITION) - This function is similar to `fgetpos' but the file position is - returned in a variable of type `fpos64_t' to which POSITION points. + To use these functions both functions must be registered with a call +like - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `fgetpos' - and so transparently replaces the old interface. + register_printf_function ('B', printf_size, printf_size_info); - - Function: int fsetpos (FILE *STREAM, const fpos_t *POSITION) - This function sets the file position indicator for the stream - STREAM to the position POSITION, which must have been set by a - previous call to `fgetpos' on the same stream. If successful, - `fsetpos' clears the end-of-file indicator on the stream, discards - any characters that were "pushed back" by the use of `ungetc', and - returns a value of zero. Otherwise, `fsetpos' returns a nonzero - value and stores an implementation-defined positive value in - `errno'. + Here we register the functions to print numbers as powers of 1000 +since the format character `'B'' is an upper-case character. If we +would additionally use `'b'' in a line like - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32 bit system the function is in fact `fsetpos64'. I.e., the LFS - interface transparently replaces the old interface. + register_printf_function ('b', printf_size, printf_size_info); - - Function: int fsetpos64 (FILE *STREAM, const fpos64_t *POSITION) - This function is similar to `fsetpos' but the file position used - for positioning is provided in a variable of type `fpos64_t' to - which POSITION points. +we could also print using a power of 1024. Please note that all that is +different in these two lines is the format specifier. The +`printf_size' function knows about the difference between lower and +upper case format specifiers. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `fsetpos' - and so transparently replaces the old interface. + The use of `'B'' and `'b'' is no coincidence. Rather it is the +preferred way to use this functionality since it is available on some +other systems which also use format specifiers.  -File: libc.info, Node: Stream Buffering, Next: Other Kinds of Streams, Prev: Portable Positioning, Up: I/O on Streams - -Stream Buffering -================ - - Characters that are written to a stream are normally accumulated and -transmitted asynchronously to the file in a block, instead of appearing -as soon as they are output by the application program. Similarly, -streams often retrieve input from the host environment in blocks rather -than on a character-by-character basis. This is called "buffering". - - If you are writing programs that do interactive input and output -using streams, you need to understand how buffering works when you -design the user interface to your program. Otherwise, you might find -that output (such as progress or prompt messages) doesn't appear when -you intended it to, or displays some other unexpected behavior. +File: libc.info, Node: Formatted Input, Next: EOF and Errors, Prev: Customizing Printf, Up: I/O on Streams - This section deals only with controlling when characters are -transmitted between the stream and the file or device, and _not_ with -how things like echoing, flow control, and the like are handled on -specific classes of devices. For information on common control -operations on terminal devices, see *Note Low-Level Terminal -Interface::. +Formatted Input +=============== - You can bypass the stream buffering facilities altogether by using -the low-level input and output functions that operate on file -descriptors instead. *Note Low-Level I/O::. + The functions described in this section (`scanf' and related +functions) provide facilities for formatted input analogous to the +formatted output facilities. These functions provide a mechanism for +reading arbitrary values under the control of a "format string" or +"template string". * Menu: -* Buffering Concepts:: Terminology is defined here. -* Flushing Buffers:: How to ensure that output buffers are flushed. -* Controlling Buffering:: How to specify what kind of buffering to use. +* Formatted Input Basics:: Some basics to get you started. +* Input Conversion Syntax:: Syntax of conversion specifications. +* Table of Input Conversions:: Summary of input conversions and what they do. +* Numeric Input Conversions:: Details of conversions for reading numbers. +* String Input Conversions:: Details of conversions for reading strings. +* Dynamic String Input:: String conversions that `malloc' the buffer. +* Other Input Conversions:: Details of miscellaneous other conversions. +* Formatted Input Functions:: Descriptions of the actual functions. +* Variable Arguments Input:: `vscanf' and friends.  -File: libc.info, Node: Buffering Concepts, Next: Flushing Buffers, Up: Stream Buffering - -Buffering Concepts ------------------- - - There are three different kinds of buffering strategies: - - * Characters written to or read from an "unbuffered" stream are - transmitted individually to or from the file as soon as possible. +File: libc.info, Node: Formatted Input Basics, Next: Input Conversion Syntax, Up: Formatted Input - * Characters written to a "line buffered" stream are transmitted to - the file in blocks when a newline character is encountered. +Formatted Input Basics +---------------------- - * Characters written to or read from a "fully buffered" stream are - transmitted to or from the file in blocks of arbitrary size. + Calls to `scanf' are superficially similar to calls to `printf' in +that arbitrary arguments are read under the control of a template +string. While the syntax of the conversion specifications in the +template is very similar to that for `printf', the interpretation of +the template is oriented more towards free-format input and simple +pattern matching, rather than fixed-field formatting. For example, +most `scanf' conversions skip over any amount of "white space" +(including spaces, tabs, and newlines) in the input file, and there is +no concept of precision for the numeric input conversions as there is +for the corresponding output conversions. Ordinarily, non-whitespace +characters in the template are expected to match characters in the +input stream exactly, but a matching failure is distinct from an input +error on the stream. - Newly opened streams are normally fully buffered, with one -exception: a stream connected to an interactive device such as a -terminal is initially line buffered. *Note Controlling Buffering::, -for information on how to select a different kind of buffering. -Usually the automatic selection gives you the most convenient kind of -buffering for the file or device you open. + Another area of difference between `scanf' and `printf' is that you +must remember to supply pointers rather than immediate values as the +optional arguments to `scanf'; the values that are read are stored in +the objects that the pointers point to. Even experienced programmers +tend to forget this occasionally, so if your program is getting strange +errors that seem to be related to `scanf', you might want to +double-check this. - The use of line buffering for interactive devices implies that output -messages ending in a newline will appear immediately--which is usually -what you want. Output that doesn't end in a newline might or might not -show up immediately, so if you want them to appear immediately, you -should flush buffered output explicitly with `fflush', as described in -*Note Flushing Buffers::. + When a "matching failure" occurs, `scanf' returns immediately, +leaving the first non-matching character as the next character to be +read from the stream. The normal return value from `scanf' is the +number of values that were assigned, so you can use this to determine if +a matching error happened before all the expected values were read. - -File: libc.info, Node: Flushing Buffers, Next: Controlling Buffering, Prev: Buffering Concepts, Up: Stream Buffering + The `scanf' function is typically used for things like reading in +the contents of tables. For example, here is a function that uses +`scanf' to initialize an array of `double': -Flushing Buffers ----------------- + void + readarray (double *array, int n) + { + int i; + for (i=0; i - - static char buffer[] = "foobar"; - - int - main (void) - { - int ch; - FILE *stream; - - stream = fmemopen (buffer, strlen (buffer), "r"); - while ((ch = fgetc (stream)) != EOF) - printf ("Got %c\n", ch); - fclose (stream); - - return 0; - } + If the `"C"' or `"POSIX"' locale is selected there is no difference. +But for a locale which specifies values for the appropriate fields in +the locale the input must have the correct form in the input. +Otherwise the longest prefix with a correct form is processed. - This program produces the following output: + +File: libc.info, Node: String Input Conversions, Next: Dynamic String Input, Prev: Numeric Input Conversions, Up: Formatted Input - Got f - Got o - Got o - Got b - Got a - Got r +String Input Conversions +------------------------ - - Function: FILE * open_memstream (char **PTR, size_t *SIZELOC) - This function opens a stream for writing to a buffer. The buffer - is allocated dynamically (as with `malloc'; *note Unconstrained - Allocation::) and grown as necessary. + This section describes the `scanf' input conversions for reading +string and character values: `%s', `%S', `%[', `%c', and `%C'. - When the stream is closed with `fclose' or flushed with `fflush', - the locations PTR and SIZELOC are updated to contain the pointer - to the buffer and its size. The values thus stored remain valid - only as long as no further output on the stream takes place. If - you do more output, you must flush the stream again to store new - values before you use them again. + You have two options for how to receive the input from these +conversions: - A null character is written at the end of the buffer. This null - character is _not_ included in the size value stored at SIZELOC. + * Provide a buffer to store it in. This is the default. You should + provide an argument of type `char *' or `wchar_t *' (the latter of + the `l' modifier is present). - You can move the stream's file position with `fseek' or `fseeko' - (*note File Positioning::). Moving the file position past the end - of the data already written fills the intervening space with - zeroes. + *Warning:* To make a robust program, you must make sure that the + input (plus its terminating null) cannot possibly exceed the size + of the buffer you provide. In general, the only way to do this is + to specify a maximum field width one less than the buffer size. + *If you provide the buffer, always specify a maximum field width + to prevent overflow.* - Here is an example of using `open_memstream': + * Ask `scanf' to allocate a big enough buffer, by specifying the `a' + flag character. This is a GNU extension. You should provide an + argument of type `char **' for the buffer address to be stored in. + *Note Dynamic String Input::. - #include - - int - main (void) - { - char *bp; - size_t size; - FILE *stream; - - stream = open_memstream (&bp, &size); - fprintf (stream, "hello"); - fflush (stream); - printf ("buf = `%s', size = %d\n", bp, size); - fprintf (stream, ", world"); - fclose (stream); - printf ("buf = `%s', size = %d\n", bp, size); - - return 0; - } + The `%c' conversion is the simplest: it matches a fixed number of +characters, always. The maximum field width says how many characters to +read; if you don't specify the maximum, the default is 1. This +conversion doesn't append a null character to the end of the text it +reads. It also does not skip over initial whitespace characters. It +reads precisely the next N characters, and fails if it cannot get that +many. Since there is always a maximum field width with `%c' (whether +specified, or 1 by default), you can always prevent overflow by making +the buffer long enough. - This program produces the following output: + If the format is `%lc' or `%C' the function stores wide characters +which are converted using the conversion determined at the time the +stream was opened from the external byte stream. The number of bytes +read from the medium is limited by `MB_CUR_LEN * N' but at most N wide +character get stored in the output string. - buf = `hello', size = 5 - buf = `hello, world', size = 12 + The `%s' conversion matches a string of non-whitespace characters. +It skips and discards initial whitespace, but stops when it encounters +more whitespace after having read something. It stores a null character +at the end of the text that it reads. - -File: libc.info, Node: Obstack Streams, Next: Custom Streams, Prev: String Streams, Up: Other Kinds of Streams + For example, reading the input: -Obstack Streams ---------------- + hello, world - You can open an output stream that puts it data in an obstack. -*Note Obstacks::. +with the conversion `%10c' produces `" hello, wo"', but reading the +same input with the conversion `%10s' produces `"hello,"'. - - Function: FILE * open_obstack_stream (struct obstack *OBSTACK) - This function opens a stream for writing data into the obstack - OBSTACK. This starts an object in the obstack and makes it grow - as data is written (*note Growing Objects::). + *Warning:* If you do not specify a field width for `%s', then the +number of characters read is limited only by where the next whitespace +character appears. This almost certainly means that invalid input can +make your program crash--which is a bug. - Calling `fflush' on this stream updates the current size of the - object to match the amount of data that has been written. After a - call to `fflush', you can examine the object temporarily. + The `%ls' and `%S' format are handled just like `%s' except that the +external byte sequence is converted using the conversion associated +with the stream to wide characters with their own encoding. A width or +precision specified with the format do not directly determine how many +bytes are read from the stream since they measure wide characters. But +an upper limit can be computed by multiplying the value of the width or +precision by `MB_CUR_MAX'. - You can move the file position of an obstack stream with `fseek' or - `fseeko' (*note File Positioning::). Moving the file position past - the end of the data written fills the intervening space with zeros. + To read in characters that belong to an arbitrary set of your choice, +use the `%[' conversion. You specify the set between the `[' character +and a following `]' character, using the same syntax used in regular +expressions. As special cases: - To make the object permanent, update the obstack with `fflush', and - then use `obstack_finish' to finalize the object and get its - address. The following write to the stream starts a new object in - the obstack, and later writes add to that object until you do - another `fflush' and `obstack_finish'. + * A literal `]' character can be specified as the first character of + the set. - But how do you find out how long the object is? You can get the - length in bytes by calling `obstack_object_size' (*note Status of - an Obstack::), or you can null-terminate the object like this: + * An embedded `-' character (that is, one that is not the first or + last character of the set) is used to specify a range of + characters. - obstack_1grow (OBSTACK, 0); + * If a caret character `^' immediately follows the initial `[', then + the set of allowed input characters is the everything _except_ the + characters listed. - Whichever one you do, you must do it _before_ calling - `obstack_finish'. (You can do both if you wish.) + The `%[' conversion does not skip over initial whitespace characters. - Here is a sample function that uses `open_obstack_stream': + Here are some examples of `%[' conversions and what they mean: - char * - make_message_string (const char *a, int b) - { - FILE *stream = open_obstack_stream (&message_obstack); - output_task (stream); - fprintf (stream, ": "); - fprintf (stream, a, b); - fprintf (stream, "\n"); - fclose (stream); - obstack_1grow (&message_obstack, 0); - return obstack_finish (&message_obstack); - } +`%25[1234567890]' + Matches a string of up to 25 digits. - -File: libc.info, Node: Custom Streams, Prev: Obstack Streams, Up: Other Kinds of Streams +`%25[][]' + Matches a string of up to 25 square brackets. -Programming Your Own Custom Streams ------------------------------------ +`%25[^ \f\n\r\t\v]' + Matches a string up to 25 characters long that doesn't contain any + of the standard whitespace characters. This is slightly different + from `%s', because if the input begins with a whitespace character, + `%[' reports a matching failure while `%s' simply discards the + initial whitespace. - This section describes how you can make a stream that gets input -from an arbitrary data source or writes output to an arbitrary data sink -programmed by you. We call these "custom streams". The functions and -types described here are all GNU extensions. +`%25[a-z]' + Matches up to 25 lowercase characters. -* Menu: + As for `%c' and `%s' the `%[' format is also modified to produce +wide characters if the `l' modifier is present. All what is said about +`%ls' above is true for `%l['. -* Streams and Cookies:: The "cookie" records where to fetch or - store data that is read or written. -* Hook Functions:: How you should define the four "hook - functions" that a custom stream needs. + One more reminder: the `%s' and `%[' conversions are *dangerous* if +you don't specify a maximum width or use the `a' flag, because input +too long would overflow whatever buffer you have provided for it. No +matter how long your buffer is, a user could supply input that is +longer. A well-written program reports invalid input with a +comprehensible error message, not with a crash.  -File: libc.info, Node: Streams and Cookies, Next: Hook Functions, Up: Custom Streams +File: libc.info, Node: Dynamic String Input, Next: Other Input Conversions, Prev: String Input Conversions, Up: Formatted Input -Custom Streams and Cookies -.......................... +Dynamically Allocating String Conversions +----------------------------------------- - Inside every custom stream is a special object called the "cookie". -This is an object supplied by you which records where to fetch or store -the data read or written. It is up to you to define a data type to use -for the cookie. The stream functions in the library never refer -directly to its contents, and they don't even know what the type is; -they record its address with type `void *'. + A GNU extension to formatted input lets you safely read a string +with no maximum size. Using this feature, you don't supply a buffer; +instead, `scanf' allocates a buffer big enough to hold the data and +gives you its address. To use this feature, write `a' as a flag +character, as in `%as' or `%a[0-9a-z]'. - To implement a custom stream, you must specify _how_ to fetch or -store the data in the specified place. You do this by defining "hook -functions" to read, write, change "file position", and close the -stream. All four of these functions will be passed the stream's cookie -so they can tell where to fetch or store the data. The library -functions don't know what's inside the cookie, but your functions will -know. + The pointer argument you supply for where to store the input should +have type `char **'. The `scanf' function allocates a buffer and +stores its address in the word that the argument points to. You should +free the buffer with `free' when you no longer need it. - When you create a custom stream, you must specify the cookie pointer, -and also the four hook functions stored in a structure of type -`cookie_io_functions_t'. + Here is an example of using the `a' flag with the `%[...]' +conversion specification to read a "variable assignment" of the form +`VARIABLE = VALUE'. - These facilities are declared in `stdio.h'. + { + char *variable, *value; + + if (2 > scanf ("%a[a-zA-Z0-9] = %a[^\n]\n", + &variable, &value)) + { + invalid_input_error (); + return 0; + } + + ... + } - - Data Type: cookie_io_functions_t - This is a structure type that holds the functions that define the - communications protocol between the stream and its cookie. It has - the following members: + +File: libc.info, Node: Other Input Conversions, Next: Formatted Input Functions, Prev: Dynamic String Input, Up: Formatted Input - `cookie_read_function_t *read' - This is the function that reads data from the cookie. If the - value is a null pointer instead of a function, then read - operations on this stream always return `EOF'. +Other Input Conversions +----------------------- - `cookie_write_function_t *write' - This is the function that writes data to the cookie. If the - value is a null pointer instead of a function, then data - written to the stream is discarded. + This section describes the miscellaneous input conversions. - `cookie_seek_function_t *seek' - This is the function that performs the equivalent of file - positioning on the cookie. If the value is a null pointer - instead of a function, calls to `fseek' or `fseeko' on this - stream can only seek to locations within the buffer; any - attempt to seek outside the buffer will return an `ESPIPE' - error. + The `%p' conversion is used to read a pointer value. It recognizes +the same syntax used by the `%p' output conversion for `printf' (*note +Other Output Conversions::); that is, a hexadecimal number just as the +`%x' conversion accepts. The corresponding argument should be of type +`void **'; that is, the address of a place to store a pointer. - `cookie_close_function_t *close' - This function performs any appropriate cleanup on the cookie - when closing the stream. If the value is a null pointer - instead of a function, nothing special is done to close the - cookie when the stream is closed. + The resulting pointer value is not guaranteed to be valid if it was +not originally written during the same program execution that reads it +in. - - Function: FILE * fopencookie (void *COOKIE, const char *OPENTYPE, - cookie_io_functions_t IO-FUNCTIONS) - This function actually creates the stream for communicating with - the COOKIE using the functions in the IO-FUNCTIONS argument. The - OPENTYPE argument is interpreted as for `fopen'; see *Note Opening - Streams::. (But note that the "truncate on open" option is - ignored.) The new stream is fully buffered. + The `%n' conversion produces the number of characters read so far by +this call. The corresponding argument should be of type `int *'. This +conversion works in the same way as the `%n' conversion for `printf'; +see *Note Other Output Conversions::, for an example. - The `fopencookie' function returns the newly created stream, or a - null pointer in case of an error. + The `%n' conversion is the only mechanism for determining the +success of literal matches or conversions with suppressed assignments. +If the `%n' follows the locus of a matching failure, then no value is +stored for it since `scanf' returns before processing the `%n'. If you +store `-1' in that argument slot before calling `scanf', the presence +of `-1' after `scanf' indicates an error occurred before the `%n' was +reached. - -File: libc.info, Node: Hook Functions, Prev: Streams and Cookies, Up: Custom Streams + Finally, the `%%' conversion matches a literal `%' character in the +input stream, without using an argument. This conversion does not +permit any flags, field width, or type modifier to be specified. -Custom Stream Hook Functions -............................ + +File: libc.info, Node: Formatted Input Functions, Next: Variable Arguments Input, Prev: Other Input Conversions, Up: Formatted Input - Here are more details on how you should define the four hook -functions that a custom stream needs. +Formatted Input Functions +------------------------- - You should define the function to read data from the cookie as: + Here are the descriptions of the functions for performing formatted +input. Prototypes for these functions are in the header file `stdio.h'. - ssize_t READER (void *COOKIE, char *BUFFER, size_t SIZE) + - Function: int scanf (const char *TEMPLATE, ...) + The `scanf' function reads formatted input from the stream `stdin' + under the control of the template string TEMPLATE. The optional + arguments are pointers to the places which receive the resulting + values. - This is very similar to the `read' function; see *Note I/O -Primitives::. Your function should transfer up to SIZE bytes into the -BUFFER, and return the number of bytes read, or zero to indicate -end-of-file. You can return a value of `-1' to indicate an error. + The return value is normally the number of successful assignments. + If an end-of-file condition is detected before any matches are + performed, including matches against whitespace and literal + characters in the template, then `EOF' is returned. - You should define the function to write data to the cookie as: + - Function: int wscanf (const wchar_t *TEMPLATE, ...) + The `wscanf' function reads formatted input from the stream + `stdin' under the control of the template string TEMPLATE. The + optional arguments are pointers to the places which receive the + resulting values. - ssize_t WRITER (void *COOKIE, const char *BUFFER, size_t SIZE) + The return value is normally the number of successful assignments. + If an end-of-file condition is detected before any matches are + performed, including matches against whitespace and literal + characters in the template, then `WEOF' is returned. - This is very similar to the `write' function; see *Note I/O -Primitives::. Your function should transfer up to SIZE bytes from the -buffer, and return the number of bytes written. You can return a value -of `-1' to indicate an error. + - Function: int fscanf (FILE *STREAM, const char *TEMPLATE, ...) + This function is just like `scanf', except that the input is read + from the stream STREAM instead of `stdin'. - You should define the function to perform seek operations on the -cookie as: + - Function: int fwscanf (FILE *STREAM, const wchar_t *TEMPLATE, ...) + This function is just like `wscanf', except that the input is read + from the stream STREAM instead of `stdin'. - int SEEKER (void *COOKIE, fpos_t *POSITION, int WHENCE) + - Function: int sscanf (const char *S, const char *TEMPLATE, ...) + This is like `scanf', except that the characters are taken from the + null-terminated string S instead of from a stream. Reaching the + end of the string is treated as an end-of-file condition. - For this function, the POSITION and WHENCE arguments are interpreted -as for `fgetpos'; see *Note Portable Positioning::. In the GNU -library, `fpos_t' is equivalent to `off_t' or `long int', and simply -represents the number of bytes from the beginning of the file. + The behavior of this function is undefined if copying takes place + between objects that overlap--for example, if S is also given as + an argument to receive a string read under control of the `%s', + `%S', or `%[' conversion. - After doing the seek operation, your function should store the -resulting file position relative to the beginning of the file in -POSITION. Your function should return a value of `0' on success and -`-1' to indicate an error. + - Function: int swscanf (const wchar_t *WS, const char *TEMPLATE, ...) + This is like `wscanf', except that the characters are taken from + the null-terminated string WS instead of from a stream. Reaching + the end of the string is treated as an end-of-file condition. - You should define the function to do cleanup operations on the cookie -appropriate for closing the stream as: + The behavior of this function is undefined if copying takes place + between objects that overlap--for example, if WS is also given as + an argument to receive a string read under control of the `%s', + `%S', or `%[' conversion. - int CLEANER (void *COOKIE) + +File: libc.info, Node: Variable Arguments Input, Prev: Formatted Input Functions, Up: Formatted Input - Your function should return `-1' to indicate an error, and `0' -otherwise. +Variable Arguments Input Functions +---------------------------------- - - Data Type: cookie_read_function - This is the data type that the read function for a custom stream - should have. If you declare the function as shown above, this is - the type it will have. + The functions `vscanf' and friends are provided so that you can +define your own variadic `scanf'-like functions that make use of the +same internals as the built-in formatted output functions. These +functions are analogous to the `vprintf' series of output functions. +*Note Variable Arguments Output::, for important information on how to +use them. - - Data Type: cookie_write_function - The data type of the write function for a custom stream. + *Portability Note:* The functions listed in this section were +introduced in ISO C99 and were before available as GNU extensions. - - Data Type: cookie_seek_function - The data type of the seek function for a custom stream. + - Function: int vscanf (const char *TEMPLATE, va_list AP) + This function is similar to `scanf', but instead of taking a + variable number of arguments directly, it takes an argument list + pointer AP of type `va_list' (*note Variadic Functions::). - - Data Type: cookie_close_function - The data type of the close function for a custom stream. + - Function: int vwscanf (const wchar_t *TEMPLATE, va_list AP) + This function is similar to `wscanf', but instead of taking a + variable number of arguments directly, it takes an argument list + pointer AP of type `va_list' (*note Variadic Functions::). - -File: libc.info, Node: Formatted Messages, Prev: Other Kinds of Streams, Up: I/O on Streams + - Function: int vfscanf (FILE *STREAM, const char *TEMPLATE, va_list + AP) + This is the equivalent of `fscanf' with the variable argument list + specified directly as for `vscanf'. -Formatted Messages -================== + - Function: int vfwscanf (FILE *STREAM, const wchar_t *TEMPLATE, + va_list AP) + This is the equivalent of `fwscanf' with the variable argument list + specified directly as for `vwscanf'. - On systems which are based on System V messages of programs -(especially the system tools) are printed in a strict form using the -`fmtmsg' function. The uniformity sometimes helps the user to -interpret messages and the strictness tests of the `fmtmsg' function -ensure that the programmer follows some minimal requirements. + - Function: int vsscanf (const char *S, const char *TEMPLATE, va_list + AP) + This is the equivalent of `sscanf' with the variable argument list + specified directly as for `vscanf'. -* Menu: + - Function: int vswscanf (const wchar_t *S, const wchar_t *TEMPLATE, + va_list AP) + This is the equivalent of `swscanf' with the variable argument list + specified directly as for `vwscanf'. -* Printing Formatted Messages:: The `fmtmsg' function. -* Adding Severity Classes:: Add more severity classes. -* Example:: How to use `fmtmsg' and `addseverity'. + In GNU C, there is a special construct you can use to let the +compiler know that a function uses a `scanf'-style format string. Then +it can check the number and types of arguments in each call to the +function, and warn you when they do not match the format string. For +details, *Note Declaring Attributes of Functions: (gcc.info)Function +Attributes.  -File: libc.info, Node: Printing Formatted Messages, Next: Adding Severity Classes, Up: Formatted Messages - -Printing Formatted Messages ---------------------------- - - Messages can be printed to standard error and/or to the console. To -select the destination the programmer can use the following two values, -bitwise OR combined if wanted, for the CLASSIFICATION parameter of -`fmtmsg': - -`MM_PRINT' - Display the message in standard error. - -`MM_CONSOLE' - Display the message on the system console. - - The erroneous piece of the system can be signalled by exactly one of -the following values which also is bitwise ORed with the CLASSIFICATION -parameter to `fmtmsg': +File: libc.info, Node: EOF and Errors, Next: Error Recovery, Prev: Formatted Input, Up: I/O on Streams -`MM_HARD' - The source of the condition is some hardware. +End-Of-File and Errors +====================== -`MM_SOFT' - The source of the condition is some software. + Many of the functions described in this chapter return the value of +the macro `EOF' to indicate unsuccessful completion of the operation. +Since `EOF' is used to report both end of file and random errors, it's +often better to use the `feof' function to check explicitly for end of +file and `ferror' to check for errors. These functions check +indicators that are part of the internal state of the stream object, +indicators set if the appropriate condition was detected by a previous +I/O operation on that stream. -`MM_FIRM' - The source of the condition is some firmware. + - Macro: int EOF + This macro is an integer value that is returned by a number of + narrow stream functions to indicate an end-of-file condition, or + some other error situation. With the GNU library, `EOF' is `-1'. + In other libraries, its value may be some other negative number. - A third component of the CLASSIFICATION parameter to `fmtmsg' can -describe the part of the system which detects the problem. This is -done by using exactly one of the following values: + This symbol is declared in `stdio.h'. -`MM_APPL' - The erroneous condition is detected by the application. + - Macro: int WEOF + This macro is an integer value that is returned by a number of wide + stream functions to indicate an end-of-file condition, or some + other error situation. With the GNU library, `WEOF' is `-1'. In + other libraries, its value may be some other negative number. -`MM_UTIL' - The erroneous condition is detected by a utility. + This symbol is declared in `wchar.h'. -`MM_OPSYS' - The erroneous condition is detected by the operating system. + - Function: int feof (FILE *STREAM) + The `feof' function returns nonzero if and only if the end-of-file + indicator for the stream STREAM is set. - A last component of CLASSIFICATION can signal the results of this -message. Exactly one of the following values can be used: + This symbol is declared in `stdio.h'. -`MM_RECOVER' - It is a recoverable error. + - Function: int feof_unlocked (FILE *STREAM) + The `feof_unlocked' function is equivalent to the `feof' function + except that it does not implicitly lock the stream. -`MM_NRECOV' - It is a non-recoverable error. + This function is a GNU extension. - - Function: int fmtmsg (long int CLASSIFICATION, const char *LABEL, - int SEVERITY, const char *TEXT, const char *ACTION, const - char *TAG) - Display a message described by its parameters on the device(s) - specified in the CLASSIFICATION parameter. The LABEL parameter - identifies the source of the message. The string should consist - of two colon separated parts where the first part has not more - than 10 and the second part not more than 14 characters. The TEXT - parameter describes the condition of the error, the ACTION - parameter possible steps to recover from the error and the TAG - parameter is a reference to the online documentation where more - information can be found. It should contain the LABEL value and a - unique identification number. + This symbol is declared in `stdio.h'. - Each of the parameters can be a special value which means this - value is to be omitted. The symbolic names for these values are: + - Function: int ferror (FILE *STREAM) + The `ferror' function returns nonzero if and only if the error + indicator for the stream STREAM is set, indicating that an error + has occurred on a previous operation on the stream. - `MM_NULLLBL' - Ignore LABEL parameter. + This symbol is declared in `stdio.h'. - `MM_NULLSEV' - Ignore SEVERITY parameter. + - Function: int ferror_unlocked (FILE *STREAM) + The `ferror_unlocked' function is equivalent to the `ferror' + function except that it does not implicitly lock the stream. - `MM_NULLMC' - Ignore CLASSIFICATION parameter. This implies that nothing is - actually printed. + This function is a GNU extension. - `MM_NULLTXT' - Ignore TEXT parameter. + This symbol is declared in `stdio.h'. - `MM_NULLACT' - Ignore ACTION parameter. + In addition to setting the error indicator associated with the +stream, the functions that operate on streams also set `errno' in the +same way as the corresponding low-level functions that operate on file +descriptors. For example, all of the functions that perform output to a +stream--such as `fputc', `printf', and `fflush'--are implemented in +terms of `write', and all of the `errno' error conditions defined for +`write' are meaningful for these functions. For more information about +the descriptor-level I/O functions, see *Note Low-Level I/O::. - `MM_NULLTAG' - Ignore TAG parameter. + +File: libc.info, Node: Error Recovery, Next: Binary Streams, Prev: EOF and Errors, Up: I/O on Streams - There is another way certain fields can be omitted from the output - to standard error. This is described below in the description of - environment variables influencing the behavior. +Recovering from errors +====================== - The SEVERITY parameter can have one of the values in the following - table: + You may explicitly clear the error and EOF flags with the `clearerr' +function. - `MM_NOSEV' - Nothing is printed, this value is the same as `MM_NULLSEV'. + - Function: void clearerr (FILE *STREAM) + This function clears the end-of-file and error indicators for the + stream STREAM. - `MM_HALT' - This value is printed as `HALT'. + The file positioning functions (*note File Positioning::) also + clear the end-of-file indicator for the stream. - `MM_ERROR' - This value is printed as `ERROR'. + - Function: void clearerr_unlocked (FILE *STREAM) + The `clearerr_unlocked' function is equivalent to the `clearerr' + function except that it does not implicitly lock the stream. - `MM_WARNING' - This value is printed as `WARNING'. + This function is a GNU extension. - `MM_INFO' - This value is printed as `INFO'. + Note that it is _not_ correct to just clear the error flag and retry +a failed stream operation. After a failed write, any number of +characters since the last buffer flush may have been committed to the +file, while some buffered data may have been discarded. Merely retrying +can thus cause lost or repeated data. - The numeric value of these five macros are between `0' and `4'. - Using the environment variable `SEV_LEVEL' or using the - `addseverity' function one can add more severity levels with their - corresponding string to print. This is described below (*note - Adding Severity Classes::). + A failed read may leave the file pointer in an inappropriate +position for a second try. In both cases, you should seek to a known +position before retrying. - If no parameter is ignored the output looks like this: + Most errors that can happen are not recoverable -- a second try will +always fail again in the same way. So usually it is best to give up and +report the error to the user, rather than install complicated recovery +logic. - LABEL: SEVERITY-STRING: TEXT - TO FIX: ACTION TAG + One important exception is `EINTR' (*note Interrupted Primitives::). +Many stream I/O implementations will treat it as an ordinary error, +which can be quite inconvenient. You can avoid this hassle by +installing all signals with the `SA_RESTART' flag. - The colons, new line characters and the `TO FIX' string are - inserted if necessary, i.e., if the corresponding parameter is not - ignored. + For similar reasons, setting nonblocking I/O on a stream's file +descriptor is not usually advisable. - This function is specified in the X/Open Portability Guide. It is - also available on all systems derived from System V. + +File: libc.info, Node: Binary Streams, Next: File Positioning, Prev: Error Recovery, Up: I/O on Streams - The function returns the value `MM_OK' if no error occurred. If - only the printing to standard error failed, it returns `MM_NOMSG'. - If printing to the console fails, it returns `MM_NOCON'. If - nothing is printed `MM_NOTOK' is returned. Among situations where - all outputs fail this last value is also returned if a parameter - value is incorrect. +Text and Binary Streams +======================= - There are two environment variables which influence the behavior of -`fmtmsg'. The first is `MSGVERB'. It is used to control the output -actually happening on standard error (_not_ the console output). Each -of the five fields can explicitly be enabled. To do this the user has -to put the `MSGVERB' variable with a format like the following in the -environment before calling the `fmtmsg' function the first time: + The GNU system and other POSIX-compatible operating systems organize +all files as uniform sequences of characters. However, some other +systems make a distinction between files containing text and files +containing binary data, and the input and output facilities of ISO C +provide for this distinction. This section tells you how to write +programs portable to such systems. - MSGVERB=KEYWORD[:KEYWORD[:...]] + When you open a stream, you can specify either a "text stream" or a +"binary stream". You indicate that you want a binary stream by +specifying the `b' modifier in the OPENTYPE argument to `fopen'; see +*Note Opening Streams::. Without this option, `fopen' opens the file +as a text stream. - Valid KEYWORDs are `label', `severity', `text', `action', and `tag'. -If the environment variable is not given or is the empty string, a not -supported keyword is given or the value is somehow else invalid, no -part of the message is masked out. + Text and binary streams differ in several ways: - The second environment variable which influences the behavior of -`fmtmsg' is `SEV_LEVEL'. This variable and the change in the behavior -of `fmtmsg' is not specified in the X/Open Portability Guide. It is -available in System V systems, though. It can be used to introduce new -severity levels. By default, only the five severity levels described -above are available. Any other numeric value would make `fmtmsg' print -nothing. + * The data read from a text stream is divided into "lines" which are + terminated by newline (`'\n'') characters, while a binary stream is + simply a long series of characters. A text stream might on some + systems fail to handle lines more than 254 characters long + (including the terminating newline character). - If the user puts `SEV_LEVEL' with a format like + * On some systems, text files can contain only printing characters, + horizontal tab characters, and newlines, and so text streams may + not support other characters. However, binary streams can handle + any character value. - SEV_LEVEL=[DESCRIPTION[:DESCRIPTION[:...]]] + * Space characters that are written immediately preceding a newline + character in a text stream may disappear when the file is read in + again. -in the environment of the process before the first call to `fmtmsg', -where DESCRIPTION has a value of the form + * More generally, there need not be a one-to-one mapping between + characters that are read from or written to a text stream, and the + characters in the actual file. - SEVERITY-KEYWORD,LEVEL,PRINTSTRING + Since a binary stream is always more capable and more predictable +than a text stream, you might wonder what purpose text streams serve. +Why not simply always use binary streams? The answer is that on these +operating systems, text and binary streams use different file formats, +and the only way to read or write "an ordinary file of text" that can +work with other text-oriented programs is through a text stream. - The SEVERITY-KEYWORD part is not used by `fmtmsg' but it has to be -present. The LEVEL part is a string representation of a number. The -numeric value must be a number greater than 4. This value must be used -in the SEVERITY parameter of `fmtmsg' to select this class. It is not -possible to overwrite any of the predefined classes. The PRINTSTRING -is the string printed when a message of this class is processed by -`fmtmsg' (see above, `fmtsmg' does not print the numeric value but -instead the string representation). + In the GNU library, and on all POSIX systems, there is no difference +between text streams and binary streams. When you open a stream, you +get the same kind of stream regardless of whether you ask for binary. +This stream can handle any file content, and has none of the +restrictions that text streams sometimes have.  -File: libc.info, Node: Adding Severity Classes, Next: Example, Prev: Printing Formatted Messages, Up: Formatted Messages +File: libc.info, Node: File Positioning, Next: Portable Positioning, Prev: Binary Streams, Up: I/O on Streams -Adding Severity Classes ------------------------ +File Positioning +================ - There is another possibility to introduce severity classes besides -using the environment variable `SEV_LEVEL'. This simplifies the task of -introducing new classes in a running program. One could use the -`setenv' or `putenv' function to set the environment variable, but this -is toilsome. + The "file position" of a stream describes where in the file the +stream is currently reading or writing. I/O on the stream advances the +file position through the file. In the GNU system, the file position is +represented as an integer, which counts the number of bytes from the +beginning of the file. *Note File Position::. - - Function: int addseverity (int SEVERITY, const char *STRING) - This function allows the introduction of new severity classes - which can be addressed by the SEVERITY parameter of the `fmtmsg' - function. The SEVERITY parameter of `addseverity' must match the - value for the parameter with the same name of `fmtmsg', and STRING - is the string printed in the actual messages instead of the numeric - value. + During I/O to an ordinary disk file, you can change the file position +whenever you wish, so as to read or write any portion of the file. Some +other kinds of files may also permit this. Files which support changing +the file position are sometimes referred to as "random-access" files. - If STRING is `NULL' the severity class with the numeric value - according to SEVERITY is removed. + You can use the functions in this section to examine or modify the +file position indicator associated with a stream. The symbols listed +below are declared in the header file `stdio.h'. - It is not possible to overwrite or remove one of the default - severity classes. All calls to `addseverity' with SEVERITY set to - one of the values for the default classes will fail. + - Function: long int ftell (FILE *STREAM) + This function returns the current file position of the stream + STREAM. - The return value is `MM_OK' if the task was successfully performed. - If the return value is `MM_NOTOK' something went wrong. This could - mean that no more memory is available or a class is not available - when it has to be removed. + This function can fail if the stream doesn't support file + positioning, or if the file position can't be represented in a + `long int', and possibly for other reasons as well. If a failure + occurs, a value of `-1' is returned. - This function is not specified in the X/Open Portability Guide - although the `fmtsmg' function is. It is available on System V - systems. + - Function: off_t ftello (FILE *STREAM) + The `ftello' function is similar to `ftell', except that it + returns a value of type `off_t'. Systems which support this type + use it to describe all file positions, unlike the POSIX + specification which uses a long int. The two are not necessarily + the same size. Therefore, using ftell can lead to problems if the + implementation is written on top of a POSIX compliant low-level + I/O implementation, and using `ftello' is preferable whenever it + is available. - -File: libc.info, Node: Example, Prev: Adding Severity Classes, Up: Formatted Messages + If this function fails it returns `(off_t) -1'. This can happen + due to missing support for file positioning or internal errors. + Otherwise the return value is the current file position. -How to use `fmtmsg' and `addseverity' -------------------------------------- + The function is an extension defined in the Unix Single + Specification version 2. - Here is a simple example program to illustrate the use of the both -functions described in this section. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32 bit system this function is in fact `ftello64'. I.e., the LFS + interface transparently replaces the old interface. - #include - - int - main (void) - { - addseverity (5, "NOTE2"); - fmtmsg (MM_PRINT, "only1field", MM_INFO, "text2", "action2", "tag2"); - fmtmsg (MM_PRINT, "UX:cat", 5, "invalid syntax", "refer to manual", - "UX:cat:001"); - fmtmsg (MM_PRINT, "label:foo", 6, "text", "action", "tag"); - return 0; - } + - Function: off64_t ftello64 (FILE *STREAM) + This function is similar to `ftello' with the only difference that + the return value is of type `off64_t'. This also requires that the + stream STREAM was opened using either `fopen64', `freopen64', or + `tmpfile64' since otherwise the underlying file operations to + position the file pointer beyond the 2^31 bytes limit might fail. - The second call to `fmtmsg' illustrates a use of this function as it -usually occurs on System V systems, which heavily use this function. -It seems worthwhile to give a short explanation here of how this system -works on System V. The value of the LABEL field (`UX:cat') says that -the error occurred in the Unix program `cat'. The explanation of the -error follows and the value for the ACTION parameter is `"refer to -manual"'. One could be more specific here, if necessary. The TAG -field contains, as proposed above, the value of the string given for -the LABEL parameter, and additionally a unique ID (`001' in this case). -For a GNU environment this string could contain a reference to the -corresponding node in the Info page for the program. + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `ftello' + and so transparently replaces the old interface. -Running this program without specifying the `MSGVERB' and `SEV_LEVEL' -function produces the following output: + - Function: int fseek (FILE *STREAM, long int OFFSET, int WHENCE) + The `fseek' function is used to change the file position of the + stream STREAM. The value of WHENCE must be one of the constants + `SEEK_SET', `SEEK_CUR', or `SEEK_END', to indicate whether the + OFFSET is relative to the beginning of the file, the current file + position, or the end of the file, respectively. - UX:cat: NOTE2: invalid syntax - TO FIX: refer to manual UX:cat:001 + This function returns a value of zero if the operation was + successful, and a nonzero value to indicate failure. A successful + call also clears the end-of-file indicator of STREAM and discards + any characters that were "pushed back" by the use of `ungetc'. - We see the different fields of the message and how the extra glue -(the colons and the `TO FIX' string) are printed. But only one of the -three calls to `fmtmsg' produced output. The first call does not print -anything because the LABEL parameter is not in the correct form. The -string must contain two fields, separated by a colon (*note Printing -Formatted Messages::). The third `fmtmsg' call produced no output -since the class with the numeric value `6' is not defined. Although a -class with numeric value `5' is also not defined by default, the call -to `addseverity' introduces it and the second call to `fmtmsg' produces -the above output. + `fseek' either flushes any buffered output before setting the file + position or else remembers it so it will be written later in its + proper place in the file. - When we change the environment of the program to contain -`SEV_LEVEL=XXX,6,NOTE' when running it we get a different result: + - Function: int fseeko (FILE *STREAM, off_t OFFSET, int WHENCE) + This function is similar to `fseek' but it corrects a problem with + `fseek' in a system with POSIX types. Using a value of type `long + int' for the offset is not compatible with POSIX. `fseeko' uses + the correct type `off_t' for the OFFSET parameter. - UX:cat: NOTE2: invalid syntax - TO FIX: refer to manual UX:cat:001 - label:foo: NOTE: text - TO FIX: action tag + For this reason it is a good idea to prefer `ftello' whenever it is + available since its functionality is (if different at all) closer + the underlying definition. - Now the third call to `fmtmsg' produced some output and we see how -the string `NOTE' from the environment variable appears in the message. + The functionality and return value is the same as for `fseek'. - Now we can reduce the output by specifying which fields we are -interested in. If we additionally set the environment variable -`MSGVERB' to the value `severity:label:action' we get the following -output: + The function is an extension defined in the Unix Single + Specification version 2. - UX:cat: NOTE2 - TO FIX: refer to manual - label:foo: NOTE - TO FIX: action + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32 bit system this function is in fact `fseeko64'. I.e., the LFS + interface transparently replaces the old interface. -I.e., the output produced by the TEXT and the TAG parameters to -`fmtmsg' vanished. Please also note that now there is no colon after -the `NOTE' and `NOTE2' strings in the output. This is not necessary -since there is no more output on this line because the text is missing. + - Function: int fseeko64 (FILE *STREAM, off64_t OFFSET, int WHENCE) + This function is similar to `fseeko' with the only difference that + the OFFSET parameter is of type `off64_t'. This also requires + that the stream STREAM was opened using either `fopen64', + `freopen64', or `tmpfile64' since otherwise the underlying file + operations to position the file pointer beyond the 2^31 bytes + limit might fail. - -File: libc.info, Node: Low-Level I/O, Next: File System Interface, Prev: I/O on Streams, Up: Top + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `fseeko' + and so transparently replaces the old interface. -Low-Level Input/Output -********************** + *Portability Note:* In non-POSIX systems, `ftell', `ftello', `fseek' +and `fseeko' might work reliably only on binary streams. *Note Binary +Streams::. - This chapter describes functions for performing low-level -input/output operations on file descriptors. These functions include -the primitives for the higher-level I/O functions described in *Note -I/O on Streams::, as well as functions for performing low-level control -operations for which there are no equivalents on streams. + The following symbolic constants are defined for use as the WHENCE +argument to `fseek'. They are also used with the `lseek' function +(*note I/O Primitives::) and to specify offsets for file locks (*note +Control Operations::). - Stream-level I/O is more flexible and usually more convenient; -therefore, programmers generally use the descriptor-level functions only -when necessary. These are some of the usual reasons: + - Macro: int SEEK_SET + This is an integer constant which, when used as the WHENCE + argument to the `fseek' or `fseeko' function, specifies that the + offset provided is relative to the beginning of the file. - * For reading binary files in large chunks. + - Macro: int SEEK_CUR + This is an integer constant which, when used as the WHENCE + argument to the `fseek' or `fseeko' function, specifies that the + offset provided is relative to the current file position. - * For reading an entire file into core before parsing it. + - Macro: int SEEK_END + This is an integer constant which, when used as the WHENCE + argument to the `fseek' or `fseeko' function, specifies that the + offset provided is relative to the end of the file. - * To perform operations other than data transfer, which can only be - done with a descriptor. (You can use `fileno' to get the - descriptor corresponding to a stream.) + - Function: void rewind (FILE *STREAM) + The `rewind' function positions the stream STREAM at the beginning + of the file. It is equivalent to calling `fseek' or `fseeko' on + the STREAM with an OFFSET argument of `0L' and a WHENCE argument + of `SEEK_SET', except that the return value is discarded and the + error indicator for the stream is reset. - * To pass descriptors to a child process. (The child can create its - own stream to use a descriptor that it inherits, but cannot - inherit a stream directly.) + These three aliases for the `SEEK_...' constants exist for the sake +of compatibility with older BSD systems. They are defined in two +different header files: `fcntl.h' and `sys/file.h'. -* Menu: +`L_SET' + An alias for `SEEK_SET'. -* Opening and Closing Files:: How to open and close file - descriptors. -* I/O Primitives:: Reading and writing data. -* File Position Primitive:: Setting a descriptor's file - position. -* Descriptors and Streams:: Converting descriptor to stream - or vice-versa. -* Stream/Descriptor Precautions:: Precautions needed if you use both - descriptors and streams. -* Scatter-Gather:: Fast I/O to discontinuous buffers. -* Memory-mapped I/O:: Using files like memory. -* Waiting for I/O:: How to check for input or output - on multiple file descriptors. -* Synchronizing I/O:: Making sure all I/O actions completed. -* Asynchronous I/O:: Perform I/O in parallel. -* Control Operations:: Various other operations on file - descriptors. -* Duplicating Descriptors:: Fcntl commands for duplicating - file descriptors. -* Descriptor Flags:: Fcntl commands for manipulating - flags associated with file - descriptors. -* File Status Flags:: Fcntl commands for manipulating - flags associated with open files. -* File Locks:: Fcntl commands for implementing - file locking. -* Interrupt Input:: Getting an asynchronous signal when - input arrives. -* IOCTLs:: Generic I/O Control operations. +`L_INCR' + An alias for `SEEK_CUR'. + +`L_XTND' + An alias for `SEEK_END'. diff -durpN glibc-2.2.4/manual/libc.info-2 glibc-2.2.5/manual/libc.info-2 --- glibc-2.2.4/manual/libc.info-2 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-2 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: diff -durpN glibc-2.2.4/manual/libc.info-20 glibc-2.2.5/manual/libc.info-20 --- glibc-2.2.4/manual/libc.info-20 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-20 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,929 +33,1105 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Opening and Closing Files, Next: I/O Primitives, Up: Low-Level I/O - -Opening and Closing Files -========================= +File: libc.info, Node: Portable Positioning, Next: Stream Buffering, Prev: File Positioning, Up: I/O on Streams - This section describes the primitives for opening and closing files -using file descriptors. The `open' and `creat' functions are declared -in the header file `fcntl.h', while `close' is declared in `unistd.h'. +Portable File-Position Functions +================================ - - Function: int open (const char *FILENAME, int FLAGS[, mode_t MODE]) - The `open' function creates and returns a new file descriptor for - the file named by FILENAME. Initially, the file position - indicator for the file is at the beginning of the file. The - argument MODE is used only when a file is created, but it doesn't - hurt to supply the argument in any case. + On the GNU system, the file position is truly a character count. You +can specify any character count value as an argument to `fseek' or +`fseeko' and get reliable results for any random access file. However, +some ISO C systems do not represent file positions in this way. - The FLAGS argument controls how the file is to be opened. This is - a bit mask; you create the value by the bitwise OR of the - appropriate parameters (using the `|' operator in C). *Note File - Status Flags::, for the parameters available. + On some systems where text streams truly differ from binary streams, +it is impossible to represent the file position of a text stream as a +count of characters from the beginning of the file. For example, the +file position on some systems must encode both a record offset within +the file, and a character offset within the record. - The normal return value from `open' is a non-negative integer file - descriptor. In the case of an error, a value of -1 is returned - instead. In addition to the usual file name errors (*note File - Name Errors::), the following `errno' error conditions are defined - for this function: + As a consequence, if you want your programs to be portable to these +systems, you must observe certain rules: - `EACCES' - The file exists but is not readable/writable as requested by - the FLAGS argument, the file does not exist and the directory - is unwritable so it cannot be created. + * The value returned from `ftell' on a text stream has no predictable + relationship to the number of characters you have read so far. + The only thing you can rely on is that you can use it subsequently + as the OFFSET argument to `fseek' or `fseeko' to move back to the + same file position. - `EEXIST' - Both `O_CREAT' and `O_EXCL' are set, and the named file - already exists. + * In a call to `fseek' or `fseeko' on a text stream, either the + OFFSET must be zero, or WHENCE must be `SEEK_SET' and and the + OFFSET must be the result of an earlier call to `ftell' on the + same stream. - `EINTR' - The `open' operation was interrupted by a signal. *Note - Interrupted Primitives::. + * The value of the file position indicator of a text stream is + undefined while there are characters that have been pushed back + with `ungetc' that haven't been read or discarded. *Note + Unreading::. - `EISDIR' - The FLAGS argument specified write access, and the file is a - directory. + But even if you observe these rules, you may still have trouble for +long files, because `ftell' and `fseek' use a `long int' value to +represent the file position. This type may not have room to encode all +the file positions in a large file. Using the `ftello' and `fseeko' +functions might help here since the `off_t' type is expected to be able +to hold all file position values but this still does not help to handle +additional information which must be associated with a file position. - `EMFILE' - The process has too many files open. The maximum number of - file descriptors is controlled by the `RLIMIT_NOFILE' - resource limit; *note Limits on Resources::. + So if you do want to support systems with peculiar encodings for the +file positions, it is better to use the functions `fgetpos' and +`fsetpos' instead. These functions represent the file position using +the data type `fpos_t', whose internal representation varies from +system to system. - `ENFILE' - The entire system, or perhaps the file system which contains - the directory, cannot support any additional open files at - the moment. (This problem cannot happen on the GNU system.) + These symbols are declared in the header file `stdio.h'. - `ENOENT' - The named file does not exist, and `O_CREAT' is not specified. + - Data Type: fpos_t + This is the type of an object that can encode information about the + file position of a stream, for use by the functions `fgetpos' and + `fsetpos'. - `ENOSPC' - The directory or file system that would contain the new file - cannot be extended, because there is no disk space left. + In the GNU system, `fpos_t' is an opaque data structure that + contains internal data to represent file offset and conversion + state information. In other systems, it might have a different + internal representation. - `ENXIO' - `O_NONBLOCK' and `O_WRONLY' are both set in the FLAGS - argument, the file named by FILENAME is a FIFO (*note Pipes - and FIFOs::), and no process has the file open for reading. + When compiling with `_FILE_OFFSET_BITS == 64' on a 32 bit machine + this type is in fact equivalent to `fpos64_t' since the LFS + interface transparently replaces the old interface. - `EROFS' - The file resides on a read-only file system and any of - `O_WRONLY', `O_RDWR', and `O_TRUNC' are set in the FLAGS - argument, or `O_CREAT' is set and the file does not already - exist. + - Data Type: fpos64_t + This is the type of an object that can encode information about the + file position of a stream, for use by the functions `fgetpos64' and + `fsetpos64'. - If on a 32 bit machine the sources are translated with - `_FILE_OFFSET_BITS == 64' the function `open' returns a file - descriptor opened in the large file mode which enables the file - handling functions to use files up to 2^63 bytes in size and - offset from -2^63 to 2^63. This happens transparently for the user - since all of the lowlevel file handling functions are equally - replaced. + In the GNU system, `fpos64_t' is an opaque data structure that + contains internal data to represent file offset and conversion + state information. In other systems, it might have a different + internal representation. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `open' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `open' should be protected using cancellation handlers. + - Function: int fgetpos (FILE *STREAM, fpos_t *POSITION) + This function stores the value of the file position indicator for + the stream STREAM in the `fpos_t' object pointed to by POSITION. + If successful, `fgetpos' returns zero; otherwise it returns a + nonzero value and stores an implementation-defined positive value + in `errno'. - The `open' function is the underlying primitive for the `fopen' - and `freopen' functions, that create streams. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32 bit system the function is in fact `fgetpos64'. I.e., the LFS + interface transparently replaces the old interface. - - Function: int open64 (const char *FILENAME, int FLAGS[, mode_t MODE]) - This function is similar to `open'. It returns a file descriptor - which can be used to access the file named by FILENAME. The only - difference is that on 32 bit systems the file is opened in the - large file mode. I.e., file length and file offsets can exceed 31 - bits. + - Function: int fgetpos64 (FILE *STREAM, fpos64_t *POSITION) + This function is similar to `fgetpos' but the file position is + returned in a variable of type `fpos64_t' to which POSITION points. - When the sources are translated with `_FILE_OFFSET_BITS == 64' this - function is actually available under the name `open'. I.e., the - new, extended API using 64 bit file sizes and offsets transparently - replaces the old API. + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `fgetpos' + and so transparently replaces the old interface. - - Obsolete function: int creat (const char *FILENAME, mode_t MODE) - This function is obsolete. The call: + - Function: int fsetpos (FILE *STREAM, const fpos_t *POSITION) + This function sets the file position indicator for the stream + STREAM to the position POSITION, which must have been set by a + previous call to `fgetpos' on the same stream. If successful, + `fsetpos' clears the end-of-file indicator on the stream, discards + any characters that were "pushed back" by the use of `ungetc', and + returns a value of zero. Otherwise, `fsetpos' returns a nonzero + value and stores an implementation-defined positive value in + `errno'. - creat (FILENAME, MODE) + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32 bit system the function is in fact `fsetpos64'. I.e., the LFS + interface transparently replaces the old interface. - is equivalent to: + - Function: int fsetpos64 (FILE *STREAM, const fpos64_t *POSITION) + This function is similar to `fsetpos' but the file position used + for positioning is provided in a variable of type `fpos64_t' to + which POSITION points. - open (FILENAME, O_WRONLY | O_CREAT | O_TRUNC, MODE) + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `fsetpos' + and so transparently replaces the old interface. - If on a 32 bit machine the sources are translated with - `_FILE_OFFSET_BITS == 64' the function `creat' returns a file - descriptor opened in the large file mode which enables the file - handling functions to use files up to 2^63 in size and offset from - -2^63 to 2^63. This happens transparently for the user since all - of the lowlevel file handling functions are equally replaced. + +File: libc.info, Node: Stream Buffering, Next: Other Kinds of Streams, Prev: Portable Positioning, Up: I/O on Streams - - Obsolete function: int creat64 (const char *FILENAME, mode_t MODE) - This function is similar to `creat'. It returns a file descriptor - which can be used to access the file named by FILENAME. The only - the difference is that on 32 bit systems the file is opened in the - large file mode. I.e., file length and file offsets can exceed 31 - bits. +Stream Buffering +================ - To use this file descriptor one must not use the normal operations - but instead the counterparts named `*64', e.g., `read64'. + Characters that are written to a stream are normally accumulated and +transmitted asynchronously to the file in a block, instead of appearing +as soon as they are output by the application program. Similarly, +streams often retrieve input from the host environment in blocks rather +than on a character-by-character basis. This is called "buffering". - When the sources are translated with `_FILE_OFFSET_BITS == 64' this - function is actually available under the name `open'. I.e., the - new, extended API using 64 bit file sizes and offsets transparently - replaces the old API. + If you are writing programs that do interactive input and output +using streams, you need to understand how buffering works when you +design the user interface to your program. Otherwise, you might find +that output (such as progress or prompt messages) doesn't appear when +you intended it to, or displays some other unexpected behavior. - - Function: int close (int FILEDES) - The function `close' closes the file descriptor FILEDES. Closing - a file has the following consequences: + This section deals only with controlling when characters are +transmitted between the stream and the file or device, and _not_ with +how things like echoing, flow control, and the like are handled on +specific classes of devices. For information on common control +operations on terminal devices, see *Note Low-Level Terminal +Interface::. - * The file descriptor is deallocated. + You can bypass the stream buffering facilities altogether by using +the low-level input and output functions that operate on file +descriptors instead. *Note Low-Level I/O::. - * Any record locks owned by the process on the file are - unlocked. +* Menu: - * When all file descriptors associated with a pipe or FIFO have - been closed, any unread data is discarded. +* Buffering Concepts:: Terminology is defined here. +* Flushing Buffers:: How to ensure that output buffers are flushed. +* Controlling Buffering:: How to specify what kind of buffering to use. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `close' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this, calls to - `close' should be protected using cancellation handlers. + +File: libc.info, Node: Buffering Concepts, Next: Flushing Buffers, Up: Stream Buffering - The normal return value from `close' is 0; a value of -1 is - returned in case of failure. The following `errno' error - conditions are defined for this function: +Buffering Concepts +------------------ - `EBADF' - The FILEDES argument is not a valid file descriptor. + There are three different kinds of buffering strategies: - `EINTR' - The `close' call was interrupted by a signal. *Note - Interrupted Primitives::. Here is an example of how to - handle `EINTR' properly: + * Characters written to or read from an "unbuffered" stream are + transmitted individually to or from the file as soon as possible. - TEMP_FAILURE_RETRY (close (desc)); + * Characters written to a "line buffered" stream are transmitted to + the file in blocks when a newline character is encountered. - `ENOSPC' - `EIO' - `EDQUOT' - When the file is accessed by NFS, these errors from `write' - can sometimes not be detected until `close'. *Note I/O - Primitives::, for details on their meaning. + * Characters written to or read from a "fully buffered" stream are + transmitted to or from the file in blocks of arbitrary size. - Please note that there is _no_ separate `close64' function. This - is not necessary since this function does not determine nor depend - on the mode of the file. The kernel which performs the `close' - operation knows which mode the descriptor is used for and can - handle this situation. + Newly opened streams are normally fully buffered, with one +exception: a stream connected to an interactive device such as a +terminal is initially line buffered. *Note Controlling Buffering::, +for information on how to select a different kind of buffering. +Usually the automatic selection gives you the most convenient kind of +buffering for the file or device you open. - To close a stream, call `fclose' (*note Closing Streams::) instead -of trying to close its underlying file descriptor with `close'. This -flushes any buffered output and updates the stream object to indicate -that it is closed. + The use of line buffering for interactive devices implies that output +messages ending in a newline will appear immediately--which is usually +what you want. Output that doesn't end in a newline might or might not +show up immediately, so if you want them to appear immediately, you +should flush buffered output explicitly with `fflush', as described in +*Note Flushing Buffers::.  -File: libc.info, Node: I/O Primitives, Next: File Position Primitive, Prev: Opening and Closing Files, Up: Low-Level I/O +File: libc.info, Node: Flushing Buffers, Next: Controlling Buffering, Prev: Buffering Concepts, Up: Stream Buffering -Input and Output Primitives -=========================== +Flushing Buffers +---------------- - This section describes the functions for performing primitive input -and output operations on file descriptors: `read', `write', and -`lseek'. These functions are declared in the header file `unistd.h'. + "Flushing" output on a buffered stream means transmitting all +accumulated characters to the file. There are many circumstances when +buffered output on a stream is flushed automatically: - - Data Type: ssize_t - This data type is used to represent the sizes of blocks that can be - read or written in a single operation. It is similar to `size_t', - but must be a signed type. + * When you try to do output and the output buffer is full. - - Function: ssize_t read (int FILEDES, void *BUFFER, size_t SIZE) - The `read' function reads up to SIZE bytes from the file with - descriptor FILEDES, storing the results in the BUFFER. (This is - not necessarily a character string, and no terminating null - character is added.) + * When the stream is closed. *Note Closing Streams::. - The return value is the number of bytes actually read. This might - be less than SIZE; for example, if there aren't that many bytes - left in the file or if there aren't that many bytes immediately - available. The exact behavior depends on what kind of file it is. - Note that reading less than SIZE bytes is not an error. + * When the program terminates by calling `exit'. *Note Normal + Termination::. - A value of zero indicates end-of-file (except if the value of the - SIZE argument is also zero). This is not considered an error. If - you keep calling `read' while at end-of-file, it will keep - returning zero and doing nothing else. + * When a newline is written, if the stream is line buffered. - If `read' returns at least one character, there is no way you can - tell whether end-of-file was reached. But if you did reach the - end, the next read will return zero. + * Whenever an input operation on _any_ stream actually reads data + from its file. - In case of an error, `read' returns -1. The following `errno' - error conditions are defined for this function: + If you want to flush the buffered output at another time, call +`fflush', which is declared in the header file `stdio.h'. - `EAGAIN' - Normally, when no input is immediately available, `read' - waits for some input. But if the `O_NONBLOCK' flag is set - for the file (*note File Status Flags::), `read' returns - immediately without reading any data, and reports this error. + - Function: int fflush (FILE *STREAM) + This function causes any buffered output on STREAM to be delivered + to the file. If STREAM is a null pointer, then `fflush' causes + buffered output on _all_ open output streams to be flushed. - *Compatibility Note:* Most versions of BSD Unix use a - different error code for this: `EWOULDBLOCK'. In the GNU - library, `EWOULDBLOCK' is an alias for `EAGAIN', so it - doesn't matter which name you use. + This function returns `EOF' if a write error occurs, or zero + otherwise. - On some systems, reading a large amount of data from a - character special file can also fail with `EAGAIN' if the - kernel cannot find enough physical memory to lock down the - user's pages. This is limited to devices that transfer with - direct memory access into the user's memory, which means it - does not include terminals, since they always use separate - buffers inside the kernel. This problem never happens in the - GNU system. + - Function: int fflush_unlocked (FILE *STREAM) + The `fflush_unlocked' function is equivalent to the `fflush' + function except that it does not implicitly lock the stream. - Any condition that could result in `EAGAIN' can instead - result in a successful `read' which returns fewer bytes than - requested. Calling `read' again immediately would result in - `EAGAIN'. + The `fflush' function can be used to flush all streams currently +opened. While this is useful in some situations it does often more than +necessary since it might be done in situations when terminal input is +required and the program wants to be sure that all output is visible on +the terminal. But this means that only line buffered streams have to be +flushed. Solaris introduced a function especially for this. It was +always available in the GNU C library in some form but never officially +exported. - `EBADF' - The FILEDES argument is not a valid file descriptor, or is - not open for reading. + - Function: void _flushlbf (void) + The `_flushlbf' function flushes all line buffered streams + currently opened. - `EINTR' - `read' was interrupted by a signal while it was waiting for - input. *Note Interrupted Primitives::. A signal will not - necessary cause `read' to return `EINTR'; it may instead - result in a successful `read' which returns fewer bytes than - requested. + This function is declared in the `stdio_ext.h' header. - `EIO' - For many devices, and for disk files, this error code - indicates a hardware error. + *Compatibility Note:* Some brain-damaged operating systems have been +known to be so thoroughly fixated on line-oriented input and output +that flushing a line buffered stream causes a newline to be written! +Fortunately, this "feature" seems to be becoming less common. You do +not need to worry about this in the GNU system. - `EIO' also occurs when a background process tries to read - from the controlling terminal, and the normal action of - stopping the process by sending it a `SIGTTIN' signal isn't - working. This might happen if the signal is being blocked or - ignored, or because the process group is orphaned. *Note Job - Control::, for more information about job control, and *Note - Signal Handling::, for information about signals. + In some situations it might be useful to not flush the output pending +for a stream but instead simply forget it. If transmission is costly +and the output is not needed anymore this is valid reasoning. In this +situation a non-standard function introduced in Solaris and available in +the GNU C library can be used. - Please note that there is no function named `read64'. This is not - necessary since this function does not directly modify or handle - the possibly wide file offset. Since the kernel handles this state - internally, the `read' function can be used for all cases. + - Function: void __fpurge (FILE *STREAM) + The `__fpurge' function causes the buffer of the stream STREAM to + be emptied. If the stream is currently in read mode all input in + the buffer is lost. If the stream is in output mode the buffered + output is not written to the device (or whatever other underlying + storage) and the buffer the cleared. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `read' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this, calls to - `read' should be protected using cancellation handlers. + This function is declared in `stdio_ext.h'. - The `read' function is the underlying primitive for all of the - functions that read from streams, such as `fgetc'. + +File: libc.info, Node: Controlling Buffering, Prev: Flushing Buffers, Up: Stream Buffering - - Function: ssize_t pread (int FILEDES, void *BUFFER, size_t SIZE, - off_t OFFSET) - The `pread' function is similar to the `read' function. The first - three arguments are identical, and the return values and error - codes also correspond. +Controlling Which Kind of Buffering +----------------------------------- - The difference is the fourth argument and its handling. The data - block is not read from the current position of the file descriptor - `filedes'. Instead the data is read from the file starting at - position OFFSET. The position of the file descriptor itself is - not affected by the operation. The value is the same as before - the call. + After opening a stream (but before any other operations have been +performed on it), you can explicitly specify what kind of buffering you +want it to have using the `setvbuf' function. - When the source file is compiled with `_FILE_OFFSET_BITS == 64' the - `pread' function is in fact `pread64' and the type `off_t' has 64 - bits, which makes it possible to handle files up to 2^63 bytes in - length. + The facilities listed in this section are declared in the header +file `stdio.h'. - The return value of `pread' describes the number of bytes read. - In the error case it returns -1 like `read' does and the error - codes are also the same, with these additions: + - Function: int setvbuf (FILE *STREAM, char *BUF, int MODE, size_t + SIZE) + This function is used to specify that the stream STREAM should + have the buffering mode MODE, which can be either `_IOFBF' (for + full buffering), `_IOLBF' (for line buffering), or `_IONBF' (for + unbuffered input/output). - `EINVAL' - The value given for OFFSET is negative and therefore illegal. + If you specify a null pointer as the BUF argument, then `setvbuf' + allocates a buffer itself using `malloc'. This buffer will be + freed when you close the stream. - `ESPIPE' - The file descriptor FILEDES is associate with a pipe or a - FIFO and this device does not allow positioning of the file - pointer. + Otherwise, BUF should be a character array that can hold at least + SIZE characters. You should not free the space for this array as + long as the stream remains open and this array remains its buffer. + You should usually either allocate it statically, or `malloc' + (*note Unconstrained Allocation::) the buffer. Using an automatic + array is not a good idea unless you close the file before exiting + the block that declares the array. - The function is an extension defined in the Unix Single - Specification version 2. + While the array remains a stream buffer, the stream I/O functions + will use the buffer for their internal purposes. You shouldn't + try to access the values in the array directly while the stream is + using it for buffering. - - Function: ssize_t pread64 (int FILEDES, void *BUFFER, size_t SIZE, - off64_t OFFSET) - This function is similar to the `pread' function. The difference - is that the OFFSET parameter is of type `off64_t' instead of - `off_t' which makes it possible on 32 bit machines to address - files larger than 2^31 bytes and up to 2^63 bytes. The file - descriptor `filedes' must be opened using `open64' since otherwise - the large offsets possible with `off64_t' will lead to errors with - a descriptor in small file mode. + The `setvbuf' function returns zero on success, or a nonzero value + if the value of MODE is not valid or if the request could not be + honored. - When the source file is compiled with `_FILE_OFFSET_BITS == 64' on - a 32 bit machine this function is actually available under the name - `pread' and so transparently replaces the 32 bit interface. + - Macro: int _IOFBF + The value of this macro is an integer constant expression that can + be used as the MODE argument to the `setvbuf' function to specify + that the stream should be fully buffered. - - Function: ssize_t write (int FILEDES, const void *BUFFER, size_t - SIZE) - The `write' function writes up to SIZE bytes from BUFFER to the - file with descriptor FILEDES. The data in BUFFER is not - necessarily a character string and a null character is output like - any other character. + - Macro: int _IOLBF + The value of this macro is an integer constant expression that can + be used as the MODE argument to the `setvbuf' function to specify + that the stream should be line buffered. - The return value is the number of bytes actually written. This - may be SIZE, but can always be smaller. Your program should - always call `write' in a loop, iterating until all the data is - written. + - Macro: int _IONBF + The value of this macro is an integer constant expression that can + be used as the MODE argument to the `setvbuf' function to specify + that the stream should be unbuffered. - Once `write' returns, the data is enqueued to be written and can be - read back right away, but it is not necessarily written out to - permanent storage immediately. You can use `fsync' when you need - to be sure your data has been permanently stored before - continuing. (It is more efficient for the system to batch up - consecutive writes and do them all at once when convenient. - Normally they will always be written to disk within a minute or - less.) Modern systems provide another function `fdatasync' which - guarantees integrity only for the file data and is therefore - faster. You can use the `O_FSYNC' open mode to make `write' always - store the data to disk before returning; *note Operating Modes::. + - Macro: int BUFSIZ + The value of this macro is an integer constant expression that is + good to use for the SIZE argument to `setvbuf'. This value is + guaranteed to be at least `256'. - In the case of an error, `write' returns -1. The following - `errno' error conditions are defined for this function: + The value of `BUFSIZ' is chosen on each system so as to make stream + I/O efficient. So it is a good idea to use `BUFSIZ' as the size + for the buffer when you call `setvbuf'. - `EAGAIN' - Normally, `write' blocks until the write operation is - complete. But if the `O_NONBLOCK' flag is set for the file - (*note Control Operations::), it returns immediately without - writing any data and reports this error. An example of a - situation that might cause the process to block on output is - writing to a terminal device that supports flow control, - where output has been suspended by receipt of a STOP - character. + Actually, you can get an even better value to use for the buffer + size by means of the `fstat' system call: it is found in the + `st_blksize' field of the file attributes. *Note Attribute + Meanings::. - *Compatibility Note:* Most versions of BSD Unix use a - different error code for this: `EWOULDBLOCK'. In the GNU - library, `EWOULDBLOCK' is an alias for `EAGAIN', so it - doesn't matter which name you use. + Sometimes people also use `BUFSIZ' as the allocation size of + buffers used for related purposes, such as strings used to receive + a line of input with `fgets' (*note Character Input::). There is + no particular reason to use `BUFSIZ' for this instead of any other + integer, except that it might lead to doing I/O in chunks of an + efficient size. - On some systems, writing a large amount of data from a - character special file can also fail with `EAGAIN' if the - kernel cannot find enough physical memory to lock down the - user's pages. This is limited to devices that transfer with - direct memory access into the user's memory, which means it - does not include terminals, since they always use separate - buffers inside the kernel. This problem does not arise in the - GNU system. + - Function: void setbuf (FILE *STREAM, char *BUF) + If BUF is a null pointer, the effect of this function is + equivalent to calling `setvbuf' with a MODE argument of `_IONBF'. + Otherwise, it is equivalent to calling `setvbuf' with BUF, and a + MODE of `_IOFBF' and a SIZE argument of `BUFSIZ'. - `EBADF' - The FILEDES argument is not a valid file descriptor, or is - not open for writing. + The `setbuf' function is provided for compatibility with old code; + use `setvbuf' in all new programs. - `EFBIG' - The size of the file would become larger than the - implementation can support. + - Function: void setbuffer (FILE *STREAM, char *BUF, size_t SIZE) + If BUF is a null pointer, this function makes STREAM unbuffered. + Otherwise, it makes STREAM fully buffered using BUF as the buffer. + The SIZE argument specifies the length of BUF. - `EINTR' - The `write' operation was interrupted by a signal while it was - blocked waiting for completion. A signal will not - necessarily cause `write' to return `EINTR'; it may instead - result in a successful `write' which writes fewer bytes than - requested. *Note Interrupted Primitives::. + This function is provided for compatibility with old BSD code. Use + `setvbuf' instead. - `EIO' - For many devices, and for disk files, this error code - indicates a hardware error. + - Function: void setlinebuf (FILE *STREAM) + This function makes STREAM be line buffered, and allocates the + buffer for you. - `ENOSPC' - The device containing the file is full. + This function is provided for compatibility with old BSD code. Use + `setvbuf' instead. - `EPIPE' - This error is returned when you try to write to a pipe or - FIFO that isn't open for reading by any process. When this - happens, a `SIGPIPE' signal is also sent to the process; see - *Note Signal Handling::. + It is possible to query whether a given stream is line buffered or +not using a non-standard function introduced in Solaris and available +in the GNU C library. - Unless you have arranged to prevent `EINTR' failures, you should - check `errno' after each failing call to `write', and if the error - was `EINTR', you should simply repeat the call. *Note Interrupted - Primitives::. The easy way to do this is with the macro - `TEMP_FAILURE_RETRY', as follows: + - Function: int __flbf (FILE *STREAM) + The `__flbf' function will return a nonzero value in case the + stream STREAM is line buffered. Otherwise the return value is + zero. - nbytes = TEMP_FAILURE_RETRY (write (desc, buffer, count)); + This function is declared in the `stdio_ext.h' header. - Please note that there is no function named `write64'. This is not - necessary since this function does not directly modify or handle - the possibly wide file offset. Since the kernel handles this state - internally the `write' function can be used for all cases. + Two more extensions allow to determine the size of the buffer and how +much of it is used. These functions were also introduced in Solaris. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `write' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this, calls to - `write' should be protected using cancellation handlers. + - Function: size_t __fbufsize (FILE *STREAM) + The `__fbufsize' function return the size of the buffer in the + stream STREAM. This value can be used to optimize the use of the + stream. - The `write' function is the underlying primitive for all of the - functions that write to streams, such as `fputc'. + This function is declared in the `stdio_ext.h' header. - - Function: ssize_t pwrite (int FILEDES, const void *BUFFER, size_t - SIZE, off_t OFFSET) - The `pwrite' function is similar to the `write' function. The - first three arguments are identical, and the return values and - error codes also correspond. + - Function: size_t __fpending (FILE *STREAM) The `__fpending' + function returns the number of bytes currently in the output + buffer. For wide-oriented stream the measuring unit is wide + characters. This function should not be used on buffers in read + mode or opened read-only. - The difference is the fourth argument and its handling. The data - block is not written to the current position of the file descriptor - `filedes'. Instead the data is written to the file starting at - position OFFSET. The position of the file descriptor itself is - not affected by the operation. The value is the same as before - the call. + This function is declared in the `stdio_ext.h' header. - When the source file is compiled with `_FILE_OFFSET_BITS == 64' the - `pwrite' function is in fact `pwrite64' and the type `off_t' has - 64 bits, which makes it possible to handle files up to 2^63 bytes - in length. + +File: libc.info, Node: Other Kinds of Streams, Next: Formatted Messages, Prev: Stream Buffering, Up: I/O on Streams - The return value of `pwrite' describes the number of written bytes. - In the error case it returns -1 like `write' does and the error - codes are also the same, with these additions: +Other Kinds of Streams +====================== - `EINVAL' - The value given for OFFSET is negative and therefore illegal. + The GNU library provides ways for you to define additional kinds of +streams that do not necessarily correspond to an open file. - `ESPIPE' - The file descriptor FILEDES is associated with a pipe or a - FIFO and this device does not allow positioning of the file - pointer. + One such type of stream takes input from or writes output to a +string. These kinds of streams are used internally to implement the +`sprintf' and `sscanf' functions. You can also create such a stream +explicitly, using the functions described in *Note String Streams::. - The function is an extension defined in the Unix Single - Specification version 2. + More generally, you can define streams that do input/output to +arbitrary objects using functions supplied by your program. This +protocol is discussed in *Note Custom Streams::. - - Function: ssize_t pwrite64 (int FILEDES, const void *BUFFER, size_t - SIZE, off64_t OFFSET) - This function is similar to the `pwrite' function. The difference - is that the OFFSET parameter is of type `off64_t' instead of - `off_t' which makes it possible on 32 bit machines to address - files larger than 2^31 bytes and up to 2^63 bytes. The file - descriptor `filedes' must be opened using `open64' since otherwise - the large offsets possible with `off64_t' will lead to errors with - a descriptor in small file mode. + *Portability Note:* The facilities described in this section are +specific to GNU. Other systems or C implementations might or might not +provide equivalent functionality. - When the source file is compiled using `_FILE_OFFSET_BITS == 64' - on a 32 bit machine this function is actually available under the - name `pwrite' and so transparently replaces the 32 bit interface. +* Menu: + +* String Streams:: Streams that get data from or put data in + a string or memory buffer. +* Obstack Streams:: Streams that store data in an obstack. +* Custom Streams:: Defining your own streams with an arbitrary + input data source and/or output data sink.  -File: libc.info, Node: File Position Primitive, Next: Descriptors and Streams, Prev: I/O Primitives, Up: Low-Level I/O +File: libc.info, Node: String Streams, Next: Obstack Streams, Up: Other Kinds of Streams -Setting the File Position of a Descriptor -========================================= +String Streams +-------------- - Just as you can set the file position of a stream with `fseek', you -can set the file position of a descriptor with `lseek'. This specifies -the position in the file for the next `read' or `write' operation. -*Note File Positioning::, for more information on the file position and -what it means. + The `fmemopen' and `open_memstream' functions allow you to do I/O to +a string or memory buffer. These facilities are declared in `stdio.h'. - To read the current file position value from a descriptor, use -`lseek (DESC, 0, SEEK_CUR)'. + - Function: FILE * fmemopen (void *BUF, size_t SIZE, const char + *OPENTYPE) + This function opens a stream that allows the access specified by + the OPENTYPE argument, that reads from or writes to the buffer + specified by the argument BUF. This array must be at least SIZE + bytes long. - - Function: off_t lseek (int FILEDES, off_t OFFSET, int WHENCE) - The `lseek' function is used to change the file position of the - file with descriptor FILEDES. + If you specify a null pointer as the BUF argument, `fmemopen' + dynamically allocates an array SIZE bytes long (as with `malloc'; + *note Unconstrained Allocation::). This is really only useful if + you are going to write things to the buffer and then read them back + in again, because you have no way of actually getting a pointer to + the buffer (for this, try `open_memstream', below). The buffer is + freed when the stream is closed. - The WHENCE argument specifies how the OFFSET should be - interpreted, in the same way as for the `fseek' function, and it - must be one of the symbolic constants `SEEK_SET', `SEEK_CUR', or - `SEEK_END'. + The argument OPENTYPE is the same as in `fopen' (*note Opening + Streams::). If the OPENTYPE specifies append mode, then the + initial file position is set to the first null character in the + buffer. Otherwise the initial file position is at the beginning + of the buffer. - `SEEK_SET' - Specifies that WHENCE is a count of characters from the - beginning of the file. + When a stream open for writing is flushed or closed, a null + character (zero byte) is written at the end of the buffer if it + fits. You should add an extra byte to the SIZE argument to + account for this. Attempts to write more than SIZE bytes to the + buffer result in an error. - `SEEK_CUR' - Specifies that WHENCE is a count of characters from the - current file position. This count may be positive or - negative. + For a stream open for reading, null characters (zero bytes) in the + buffer do not count as "end of file". Read operations indicate + end of file only when the file position advances past SIZE bytes. + So, if you want to read characters from a null-terminated string, + you should supply the length of the string as the SIZE argument. - `SEEK_END' - Specifies that WHENCE is a count of characters from the end of - the file. A negative count specifies a position within the - current extent of the file; a positive count specifies a - position past the current end. If you set the position past - the current end, and actually write data, you will extend the - file with zeros up to that position. + Here is an example of using `fmemopen' to create a stream for +reading from a string: - The return value from `lseek' is normally the resulting file - position, measured in bytes from the beginning of the file. You - can use this feature together with `SEEK_CUR' to read the current - file position. + #include + + static char buffer[] = "foobar"; + + int + main (void) + { + int ch; + FILE *stream; + + stream = fmemopen (buffer, strlen (buffer), "r"); + while ((ch = fgetc (stream)) != EOF) + printf ("Got %c\n", ch); + fclose (stream); + + return 0; + } - If you want to append to the file, setting the file position to the - current end of file with `SEEK_END' is not sufficient. Another - process may write more data after you seek but before you write, - extending the file so the position you write onto clobbers their - data. Instead, use the `O_APPEND' operating mode; *note Operating - Modes::. + This program produces the following output: - You can set the file position past the current end of the file. - This does not by itself make the file longer; `lseek' never - changes the file. But subsequent output at that position will - extend the file. Characters between the previous end of file and - the new position are filled with zeros. Extending the file in - this way can create a "hole": the blocks of zeros are not actually - allocated on disk, so the file takes up less space than it appears - to; it is then called a "sparse file". + Got f + Got o + Got o + Got b + Got a + Got r - If the file position cannot be changed, or the operation is in - some way invalid, `lseek' returns a value of -1. The following - `errno' error conditions are defined for this function: + - Function: FILE * open_memstream (char **PTR, size_t *SIZELOC) + This function opens a stream for writing to a buffer. The buffer + is allocated dynamically (as with `malloc'; *note Unconstrained + Allocation::) and grown as necessary. - `EBADF' - The FILEDES is not a valid file descriptor. + When the stream is closed with `fclose' or flushed with `fflush', + the locations PTR and SIZELOC are updated to contain the pointer + to the buffer and its size. The values thus stored remain valid + only as long as no further output on the stream takes place. If + you do more output, you must flush the stream again to store new + values before you use them again. - `EINVAL' - The WHENCE argument value is not valid, or the resulting file - offset is not valid. A file offset is invalid. + A null character is written at the end of the buffer. This null + character is _not_ included in the size value stored at SIZELOC. - `ESPIPE' - The FILEDES corresponds to an object that cannot be - positioned, such as a pipe, FIFO or terminal device. - (POSIX.1 specifies this error only for pipes and FIFOs, but - in the GNU system, you always get `ESPIPE' if the object is - not seekable.) + You can move the stream's file position with `fseek' or `fseeko' + (*note File Positioning::). Moving the file position past the end + of the data already written fills the intervening space with + zeroes. - When the source file is compiled with `_FILE_OFFSET_BITS == 64' the - `lseek' function is in fact `lseek64' and the type `off_t' has 64 - bits which makes it possible to handle files up to 2^63 bytes in - length. + Here is an example of using `open_memstream': - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `lseek' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `lseek' should be protected using cancellation handlers. + #include + + int + main (void) + { + char *bp; + size_t size; + FILE *stream; + + stream = open_memstream (&bp, &size); + fprintf (stream, "hello"); + fflush (stream); + printf ("buf = `%s', size = %d\n", bp, size); + fprintf (stream, ", world"); + fclose (stream); + printf ("buf = `%s', size = %d\n", bp, size); + + return 0; + } - The `lseek' function is the underlying primitive for the `fseek', - `fseeko', `ftell', `ftello' and `rewind' functions, which operate - on streams instead of file descriptors. + This program produces the following output: - - Function: off64_t lseek64 (int FILEDES, off64_t OFFSET, int WHENCE) - This function is similar to the `lseek' function. The difference - is that the OFFSET parameter is of type `off64_t' instead of - `off_t' which makes it possible on 32 bit machines to address - files larger than 2^31 bytes and up to 2^63 bytes. The file - descriptor `filedes' must be opened using `open64' since otherwise - the large offsets possible with `off64_t' will lead to errors with - a descriptor in small file mode. + buf = `hello', size = 5 + buf = `hello, world', size = 12 - When the source file is compiled with `_FILE_OFFSET_BITS == 64' on - a 32 bits machine this function is actually available under the - name `lseek' and so transparently replaces the 32 bit interface. + +File: libc.info, Node: Obstack Streams, Next: Custom Streams, Prev: String Streams, Up: Other Kinds of Streams - You can have multiple descriptors for the same file if you open the -file more than once, or if you duplicate a descriptor with `dup'. -Descriptors that come from separate calls to `open' have independent -file positions; using `lseek' on one descriptor has no effect on the -other. For example, +Obstack Streams +--------------- - { - int d1, d2; - char buf[4]; - d1 = open ("foo", O_RDONLY); - d2 = open ("foo", O_RDONLY); - lseek (d1, 1024, SEEK_SET); - read (d2, buf, 4); - } + You can open an output stream that puts it data in an obstack. +*Note Obstacks::. -will read the first four characters of the file `foo'. (The -error-checking code necessary for a real program has been omitted here -for brevity.) + - Function: FILE * open_obstack_stream (struct obstack *OBSTACK) + This function opens a stream for writing data into the obstack + OBSTACK. This starts an object in the obstack and makes it grow + as data is written (*note Growing Objects::). - By contrast, descriptors made by duplication share a common file -position with the original descriptor that was duplicated. Anything -which alters the file position of one of the duplicates, including -reading or writing data, affects all of them alike. Thus, for example, + Calling `fflush' on this stream updates the current size of the + object to match the amount of data that has been written. After a + call to `fflush', you can examine the object temporarily. + + You can move the file position of an obstack stream with `fseek' or + `fseeko' (*note File Positioning::). Moving the file position past + the end of the data written fills the intervening space with zeros. + + To make the object permanent, update the obstack with `fflush', and + then use `obstack_finish' to finalize the object and get its + address. The following write to the stream starts a new object in + the obstack, and later writes add to that object until you do + another `fflush' and `obstack_finish'. + + But how do you find out how long the object is? You can get the + length in bytes by calling `obstack_object_size' (*note Status of + an Obstack::), or you can null-terminate the object like this: + obstack_1grow (OBSTACK, 0); + + Whichever one you do, you must do it _before_ calling + `obstack_finish'. (You can do both if you wish.) + + Here is a sample function that uses `open_obstack_stream': + + char * + make_message_string (const char *a, int b) { - int d1, d2, d3; - char buf1[4], buf2[4]; - d1 = open ("foo", O_RDONLY); - d2 = dup (d1); - d3 = dup (d2); - lseek (d3, 1024, SEEK_SET); - read (d1, buf1, 4); - read (d2, buf2, 4); + FILE *stream = open_obstack_stream (&message_obstack); + output_task (stream); + fprintf (stream, ": "); + fprintf (stream, a, b); + fprintf (stream, "\n"); + fclose (stream); + obstack_1grow (&message_obstack, 0); + return obstack_finish (&message_obstack); } -will read four characters starting with the 1024'th character of `foo', -and then four more characters starting with the 1028'th character. + +File: libc.info, Node: Custom Streams, Prev: Obstack Streams, Up: Other Kinds of Streams - - Data Type: off_t - This is an arithmetic data type used to represent file sizes. In - the GNU system, this is equivalent to `fpos_t' or `long int'. +Programming Your Own Custom Streams +----------------------------------- - If the source is compiled with `_FILE_OFFSET_BITS == 64' this type - is transparently replaced by `off64_t'. + This section describes how you can make a stream that gets input +from an arbitrary data source or writes output to an arbitrary data sink +programmed by you. We call these "custom streams". The functions and +types described here are all GNU extensions. - - Data Type: off64_t - This type is used similar to `off_t'. The difference is that even - on 32 bit machines, where the `off_t' type would have 32 bits, - `off64_t' has 64 bits and so is able to address files up to 2^63 - bytes in length. +* Menu: - When compiling with `_FILE_OFFSET_BITS == 64' this type is - available under the name `off_t'. +* Streams and Cookies:: The "cookie" records where to fetch or + store data that is read or written. +* Hook Functions:: How you should define the four "hook + functions" that a custom stream needs. - These aliases for the `SEEK_...' constants exist for the sake of -compatibility with older BSD systems. They are defined in two -different header files: `fcntl.h' and `sys/file.h'. + +File: libc.info, Node: Streams and Cookies, Next: Hook Functions, Up: Custom Streams -`L_SET' - An alias for `SEEK_SET'. +Custom Streams and Cookies +.......................... -`L_INCR' - An alias for `SEEK_CUR'. + Inside every custom stream is a special object called the "cookie". +This is an object supplied by you which records where to fetch or store +the data read or written. It is up to you to define a data type to use +for the cookie. The stream functions in the library never refer +directly to its contents, and they don't even know what the type is; +they record its address with type `void *'. -`L_XTND' - An alias for `SEEK_END'. + To implement a custom stream, you must specify _how_ to fetch or +store the data in the specified place. You do this by defining "hook +functions" to read, write, change "file position", and close the +stream. All four of these functions will be passed the stream's cookie +so they can tell where to fetch or store the data. The library +functions don't know what's inside the cookie, but your functions will +know. + + When you create a custom stream, you must specify the cookie pointer, +and also the four hook functions stored in a structure of type +`cookie_io_functions_t'. + + These facilities are declared in `stdio.h'. + + - Data Type: cookie_io_functions_t + This is a structure type that holds the functions that define the + communications protocol between the stream and its cookie. It has + the following members: + + `cookie_read_function_t *read' + This is the function that reads data from the cookie. If the + value is a null pointer instead of a function, then read + operations on this stream always return `EOF'. + + `cookie_write_function_t *write' + This is the function that writes data to the cookie. If the + value is a null pointer instead of a function, then data + written to the stream is discarded. + + `cookie_seek_function_t *seek' + This is the function that performs the equivalent of file + positioning on the cookie. If the value is a null pointer + instead of a function, calls to `fseek' or `fseeko' on this + stream can only seek to locations within the buffer; any + attempt to seek outside the buffer will return an `ESPIPE' + error. + + `cookie_close_function_t *close' + This function performs any appropriate cleanup on the cookie + when closing the stream. If the value is a null pointer + instead of a function, nothing special is done to close the + cookie when the stream is closed. + + - Function: FILE * fopencookie (void *COOKIE, const char *OPENTYPE, + cookie_io_functions_t IO-FUNCTIONS) + This function actually creates the stream for communicating with + the COOKIE using the functions in the IO-FUNCTIONS argument. The + OPENTYPE argument is interpreted as for `fopen'; see *Note Opening + Streams::. (But note that the "truncate on open" option is + ignored.) The new stream is fully buffered. + + The `fopencookie' function returns the newly created stream, or a + null pointer in case of an error.  -File: libc.info, Node: Descriptors and Streams, Next: Stream/Descriptor Precautions, Prev: File Position Primitive, Up: Low-Level I/O +File: libc.info, Node: Hook Functions, Prev: Streams and Cookies, Up: Custom Streams -Descriptors and Streams -======================= +Custom Stream Hook Functions +............................ - Given an open file descriptor, you can create a stream for it with -the `fdopen' function. You can get the underlying file descriptor for -an existing stream with the `fileno' function. These functions are -declared in the header file `stdio.h'. + Here are more details on how you should define the four hook +functions that a custom stream needs. - - Function: FILE * fdopen (int FILEDES, const char *OPENTYPE) - The `fdopen' function returns a new stream for the file descriptor - FILEDES. + You should define the function to read data from the cookie as: - The OPENTYPE argument is interpreted in the same way as for the - `fopen' function (*note Opening Streams::), except that the `b' - option is not permitted; this is because GNU makes no distinction - between text and binary files. Also, `"w"' and `"w+"' do not - cause truncation of the file; these have an effect only when - opening a file, and in this case the file has already been opened. - You must make sure that the OPENTYPE argument matches the actual - mode of the open file descriptor. + ssize_t READER (void *COOKIE, char *BUFFER, size_t SIZE) - The return value is the new stream. If the stream cannot be - created (for example, if the modes for the file indicated by the - file descriptor do not permit the access specified by the OPENTYPE - argument), a null pointer is returned instead. + This is very similar to the `read' function; see *Note I/O +Primitives::. Your function should transfer up to SIZE bytes into the +BUFFER, and return the number of bytes read, or zero to indicate +end-of-file. You can return a value of `-1' to indicate an error. - In some other systems, `fdopen' may fail to detect that the modes - for file descriptor do not permit the access specified by - `opentype'. The GNU C library always checks for this. + You should define the function to write data to the cookie as: - For an example showing the use of the `fdopen' function, see *Note -Creating a Pipe::. + ssize_t WRITER (void *COOKIE, const char *BUFFER, size_t SIZE) - - Function: int fileno (FILE *STREAM) - This function returns the file descriptor associated with the - stream STREAM. If an error is detected (for example, if the STREAM - is not valid) or if STREAM does not do I/O to a file, `fileno' - returns -1. + This is very similar to the `write' function; see *Note I/O +Primitives::. Your function should transfer up to SIZE bytes from the +buffer, and return the number of bytes written. You can return a value +of `-1' to indicate an error. - - Function: int fileno_unlocked (FILE *STREAM) - The `fileno_unlocked' function is equivalent to the `fileno' - function except that it does not implicitly lock the stream if the - state is `FSETLOCKING_INTERNAL'. + You should define the function to perform seek operations on the +cookie as: - This function is a GNU extension. + int SEEKER (void *COOKIE, fpos_t *POSITION, int WHENCE) - There are also symbolic constants defined in `unistd.h' for the file -descriptors belonging to the standard streams `stdin', `stdout', and -`stderr'; see *Note Standard Streams::. + For this function, the POSITION and WHENCE arguments are interpreted +as for `fgetpos'; see *Note Portable Positioning::. In the GNU +library, `fpos_t' is equivalent to `off_t' or `long int', and simply +represents the number of bytes from the beginning of the file. -`STDIN_FILENO' - This macro has value `0', which is the file descriptor for - standard input. + After doing the seek operation, your function should store the +resulting file position relative to the beginning of the file in +POSITION. Your function should return a value of `0' on success and +`-1' to indicate an error. -`STDOUT_FILENO' - This macro has value `1', which is the file descriptor for - standard output. + You should define the function to do cleanup operations on the cookie +appropriate for closing the stream as: -`STDERR_FILENO' - This macro has value `2', which is the file descriptor for - standard error output. + int CLEANER (void *COOKIE) - -File: libc.info, Node: Stream/Descriptor Precautions, Next: Scatter-Gather, Prev: Descriptors and Streams, Up: Low-Level I/O + Your function should return `-1' to indicate an error, and `0' +otherwise. -Dangers of Mixing Streams and Descriptors -========================================= + - Data Type: cookie_read_function + This is the data type that the read function for a custom stream + should have. If you declare the function as shown above, this is + the type it will have. - You can have multiple file descriptors and streams (let's call both -streams and descriptors "channels" for short) connected to the same -file, but you must take care to avoid confusion between channels. There -are two cases to consider: "linked" channels that share a single file -position value, and "independent" channels that have their own file -positions. + - Data Type: cookie_write_function + The data type of the write function for a custom stream. - It's best to use just one channel in your program for actual data -transfer to any given file, except when all the access is for input. -For example, if you open a pipe (something you can only do at the file -descriptor level), either do all I/O with the descriptor, or construct a -stream from the descriptor with `fdopen' and then do all I/O with the -stream. + - Data Type: cookie_seek_function + The data type of the seek function for a custom stream. + + - Data Type: cookie_close_function + The data type of the close function for a custom stream. + + +File: libc.info, Node: Formatted Messages, Prev: Other Kinds of Streams, Up: I/O on Streams + +Formatted Messages +================== + + On systems which are based on System V messages of programs +(especially the system tools) are printed in a strict form using the +`fmtmsg' function. The uniformity sometimes helps the user to +interpret messages and the strictness tests of the `fmtmsg' function +ensure that the programmer follows some minimal requirements. * Menu: -* Linked Channels:: Dealing with channels sharing a file position. -* Independent Channels:: Dealing with separately opened, unlinked channels. -* Cleaning Streams:: Cleaning a stream makes it safe to use - another channel. +* Printing Formatted Messages:: The `fmtmsg' function. +* Adding Severity Classes:: Add more severity classes. +* Example:: How to use `fmtmsg' and `addseverity'.  -File: libc.info, Node: Linked Channels, Next: Independent Channels, Up: Stream/Descriptor Precautions +File: libc.info, Node: Printing Formatted Messages, Next: Adding Severity Classes, Up: Formatted Messages -Linked Channels ---------------- +Printing Formatted Messages +--------------------------- - Channels that come from a single opening share the same file -position; we call them "linked" channels. Linked channels result when -you make a stream from a descriptor using `fdopen', when you get a -descriptor from a stream with `fileno', when you copy a descriptor with -`dup' or `dup2', and when descriptors are inherited during `fork'. For -files that don't support random access, such as terminals and pipes, -_all_ channels are effectively linked. On random-access files, all -append-type output streams are effectively linked to each other. + Messages can be printed to standard error and/or to the console. To +select the destination the programmer can use the following two values, +bitwise OR combined if wanted, for the CLASSIFICATION parameter of +`fmtmsg': - If you have been using a stream for I/O, and you want to do I/O using -another channel (either a stream or a descriptor) that is linked to it, -you must first "clean up" the stream that you have been using. *Note -Cleaning Streams::. +`MM_PRINT' + Display the message in standard error. - Terminating a process, or executing a new program in the process, -destroys all the streams in the process. If descriptors linked to these -streams persist in other processes, their file positions become -undefined as a result. To prevent this, you must clean up the streams -before destroying them. +`MM_CONSOLE' + Display the message on the system console. - -File: libc.info, Node: Independent Channels, Next: Cleaning Streams, Prev: Linked Channels, Up: Stream/Descriptor Precautions + The erroneous piece of the system can be signalled by exactly one of +the following values which also is bitwise ORed with the CLASSIFICATION +parameter to `fmtmsg': -Independent Channels --------------------- +`MM_HARD' + The source of the condition is some hardware. - When you open channels (streams or descriptors) separately on a -seekable file, each channel has its own file position. These are called -"independent channels". +`MM_SOFT' + The source of the condition is some software. - The system handles each channel independently. Most of the time, -this is quite predictable and natural (especially for input): each -channel can read or write sequentially at its own place in the file. -However, if some of the channels are streams, you must take these -precautions: +`MM_FIRM' + The source of the condition is some firmware. - * You should clean an output stream after use, before doing anything - else that might read or write from the same part of the file. + A third component of the CLASSIFICATION parameter to `fmtmsg' can +describe the part of the system which detects the problem. This is +done by using exactly one of the following values: - * You should clean an input stream before reading data that may have - been modified using an independent channel. Otherwise, you might - read obsolete data that had been in the stream's buffer. +`MM_APPL' + The erroneous condition is detected by the application. - If you do output to one channel at the end of the file, this will -certainly leave the other independent channels positioned somewhere -before the new end. You cannot reliably set their file positions to the -new end of file before writing, because the file can always be extended -by another process between when you set the file position and when you -write the data. Instead, use an append-type descriptor or stream; they -always output at the current end of the file. In order to make the -end-of-file position accurate, you must clean the output channel you -were using, if it is a stream. +`MM_UTIL' + The erroneous condition is detected by a utility. - It's impossible for two channels to have separate file pointers for a -file that doesn't support random access. Thus, channels for reading or -writing such files are always linked, never independent. Append-type -channels are also always linked. For these channels, follow the rules -for linked channels; see *Note Linked Channels::. +`MM_OPSYS' + The erroneous condition is detected by the operating system. - -File: libc.info, Node: Cleaning Streams, Prev: Independent Channels, Up: Stream/Descriptor Precautions + A last component of CLASSIFICATION can signal the results of this +message. Exactly one of the following values can be used: -Cleaning Streams ----------------- +`MM_RECOVER' + It is a recoverable error. - On the GNU system, you can clean up any stream with `fclean': +`MM_NRECOV' + It is a non-recoverable error. - - Function: int fclean (FILE *STREAM) - Clean up the stream STREAM so that its buffer is empty. If STREAM - is doing output, force it out. If STREAM is doing input, give the - data in the buffer back to the system, arranging to reread it. + - Function: int fmtmsg (long int CLASSIFICATION, const char *LABEL, + int SEVERITY, const char *TEXT, const char *ACTION, const + char *TAG) + Display a message described by its parameters on the device(s) + specified in the CLASSIFICATION parameter. The LABEL parameter + identifies the source of the message. The string should consist + of two colon separated parts where the first part has not more + than 10 and the second part not more than 14 characters. The TEXT + parameter describes the condition of the error, the ACTION + parameter possible steps to recover from the error and the TAG + parameter is a reference to the online documentation where more + information can be found. It should contain the LABEL value and a + unique identification number. - On other systems, you can use `fflush' to clean a stream in most -cases. + Each of the parameters can be a special value which means this + value is to be omitted. The symbolic names for these values are: - You can skip the `fclean' or `fflush' if you know the stream is -already clean. A stream is clean whenever its buffer is empty. For -example, an unbuffered stream is always clean. An input stream that is -at end-of-file is clean. A line-buffered stream is clean when the last -character output was a newline. + `MM_NULLLBL' + Ignore LABEL parameter. - There is one case in which cleaning a stream is impossible on most -systems. This is when the stream is doing input from a file that is not -random-access. Such streams typically read ahead, and when the file is -not random access, there is no way to give back the excess data already -read. When an input stream reads from a random-access file, `fflush' -does clean the stream, but leaves the file pointer at an unpredictable -place; you must set the file pointer before doing any further I/O. On -the GNU system, using `fclean' avoids both of these problems. + `MM_NULLSEV' + Ignore SEVERITY parameter. - Closing an output-only stream also does `fflush', so this is a valid -way of cleaning an output stream. On the GNU system, closing an input -stream does `fclean'. + `MM_NULLMC' + Ignore CLASSIFICATION parameter. This implies that nothing is + actually printed. - You need not clean a stream before using its descriptor for control -operations such as setting terminal modes; these operations don't affect -the file position and are not affected by it. You can use any -descriptor for these operations, and all channels are affected -simultaneously. However, text already "output" to a stream but still -buffered by the stream will be subject to the new terminal modes when -subsequently flushed. To make sure "past" output is covered by the -terminal settings that were in effect at the time, flush the output -streams for that terminal before setting the modes. *Note Terminal -Modes::. + `MM_NULLTXT' + Ignore TEXT parameter. + + `MM_NULLACT' + Ignore ACTION parameter. + + `MM_NULLTAG' + Ignore TAG parameter. + + There is another way certain fields can be omitted from the output + to standard error. This is described below in the description of + environment variables influencing the behavior. + + The SEVERITY parameter can have one of the values in the following + table: + + `MM_NOSEV' + Nothing is printed, this value is the same as `MM_NULLSEV'. + + `MM_HALT' + This value is printed as `HALT'. + + `MM_ERROR' + This value is printed as `ERROR'. + + `MM_WARNING' + This value is printed as `WARNING'. + + `MM_INFO' + This value is printed as `INFO'. + + The numeric value of these five macros are between `0' and `4'. + Using the environment variable `SEV_LEVEL' or using the + `addseverity' function one can add more severity levels with their + corresponding string to print. This is described below (*note + Adding Severity Classes::). + + If no parameter is ignored the output looks like this: + + LABEL: SEVERITY-STRING: TEXT + TO FIX: ACTION TAG + + The colons, new line characters and the `TO FIX' string are + inserted if necessary, i.e., if the corresponding parameter is not + ignored. + + This function is specified in the X/Open Portability Guide. It is + also available on all systems derived from System V. + + The function returns the value `MM_OK' if no error occurred. If + only the printing to standard error failed, it returns `MM_NOMSG'. + If printing to the console fails, it returns `MM_NOCON'. If + nothing is printed `MM_NOTOK' is returned. Among situations where + all outputs fail this last value is also returned if a parameter + value is incorrect. + + There are two environment variables which influence the behavior of +`fmtmsg'. The first is `MSGVERB'. It is used to control the output +actually happening on standard error (_not_ the console output). Each +of the five fields can explicitly be enabled. To do this the user has +to put the `MSGVERB' variable with a format like the following in the +environment before calling the `fmtmsg' function the first time: + + MSGVERB=KEYWORD[:KEYWORD[:...]] + + Valid KEYWORDs are `label', `severity', `text', `action', and `tag'. +If the environment variable is not given or is the empty string, a not +supported keyword is given or the value is somehow else invalid, no +part of the message is masked out. + + The second environment variable which influences the behavior of +`fmtmsg' is `SEV_LEVEL'. This variable and the change in the behavior +of `fmtmsg' is not specified in the X/Open Portability Guide. It is +available in System V systems, though. It can be used to introduce new +severity levels. By default, only the five severity levels described +above are available. Any other numeric value would make `fmtmsg' print +nothing. + + If the user puts `SEV_LEVEL' with a format like + + SEV_LEVEL=[DESCRIPTION[:DESCRIPTION[:...]]] + +in the environment of the process before the first call to `fmtmsg', +where DESCRIPTION has a value of the form + + SEVERITY-KEYWORD,LEVEL,PRINTSTRING + + The SEVERITY-KEYWORD part is not used by `fmtmsg' but it has to be +present. The LEVEL part is a string representation of a number. The +numeric value must be a number greater than 4. This value must be used +in the SEVERITY parameter of `fmtmsg' to select this class. It is not +possible to overwrite any of the predefined classes. The PRINTSTRING +is the string printed when a message of this class is processed by +`fmtmsg' (see above, `fmtsmg' does not print the numeric value but +instead the string representation).  -File: libc.info, Node: Scatter-Gather, Next: Memory-mapped I/O, Prev: Stream/Descriptor Precautions, Up: Low-Level I/O +File: libc.info, Node: Adding Severity Classes, Next: Example, Prev: Printing Formatted Messages, Up: Formatted Messages -Fast Scatter-Gather I/O -======================= +Adding Severity Classes +----------------------- - Some applications may need to read or write data to multiple buffers, -which are separated in memory. Although this can be done easily enough -with multiple calls to `read' and `write', it is inefficient because -there is overhead associated with each kernel call. + There is another possibility to introduce severity classes besides +using the environment variable `SEV_LEVEL'. This simplifies the task of +introducing new classes in a running program. One could use the +`setenv' or `putenv' function to set the environment variable, but this +is toilsome. - Instead, many platforms provide special high-speed primitives to -perform these "scatter-gather" operations in a single kernel call. The -GNU C library will provide an emulation on any system that lacks these -primitives, so they are not a portability threat. They are defined in -`sys/uio.h'. + - Function: int addseverity (int SEVERITY, const char *STRING) + This function allows the introduction of new severity classes + which can be addressed by the SEVERITY parameter of the `fmtmsg' + function. The SEVERITY parameter of `addseverity' must match the + value for the parameter with the same name of `fmtmsg', and STRING + is the string printed in the actual messages instead of the numeric + value. - These functions are controlled with arrays of `iovec' structures, -which describe the location and size of each buffer. + If STRING is `NULL' the severity class with the numeric value + according to SEVERITY is removed. - - Data Type: struct iovec - The `iovec' structure describes a buffer. It contains two fields: + It is not possible to overwrite or remove one of the default + severity classes. All calls to `addseverity' with SEVERITY set to + one of the values for the default classes will fail. - `void *iov_base' - Contains the address of a buffer. + The return value is `MM_OK' if the task was successfully performed. + If the return value is `MM_NOTOK' something went wrong. This could + mean that no more memory is available or a class is not available + when it has to be removed. - `size_t iov_len' - Contains the length of the buffer. + This function is not specified in the X/Open Portability Guide + although the `fmtsmg' function is. It is available on System V + systems. + +File: libc.info, Node: Example, Prev: Adding Severity Classes, Up: Formatted Messages - - Function: ssize_t readv (int FILEDES, const struct iovec *VECTOR, - int COUNT) - The `readv' function reads data from FILEDES and scatters it into - the buffers described in VECTOR, which is taken to be COUNT - structures long. As each buffer is filled, data is sent to the - next. +How to use `fmtmsg' and `addseverity' +------------------------------------- - Note that `readv' is not guaranteed to fill all the buffers. It - may stop at any point, for the same reasons `read' would. + Here is a simple example program to illustrate the use of the both +functions described in this section. - The return value is a count of bytes (_not_ buffers) read, 0 - indicating end-of-file, or -1 indicating an error. The possible - errors are the same as in `read'. + #include + + int + main (void) + { + addseverity (5, "NOTE2"); + fmtmsg (MM_PRINT, "only1field", MM_INFO, "text2", "action2", "tag2"); + fmtmsg (MM_PRINT, "UX:cat", 5, "invalid syntax", "refer to manual", + "UX:cat:001"); + fmtmsg (MM_PRINT, "label:foo", 6, "text", "action", "tag"); + return 0; + } + The second call to `fmtmsg' illustrates a use of this function as it +usually occurs on System V systems, which heavily use this function. +It seems worthwhile to give a short explanation here of how this system +works on System V. The value of the LABEL field (`UX:cat') says that +the error occurred in the Unix program `cat'. The explanation of the +error follows and the value for the ACTION parameter is `"refer to +manual"'. One could be more specific here, if necessary. The TAG +field contains, as proposed above, the value of the string given for +the LABEL parameter, and additionally a unique ID (`001' in this case). +For a GNU environment this string could contain a reference to the +corresponding node in the Info page for the program. - - Function: ssize_t writev (int FILEDES, const struct iovec *VECTOR, - int COUNT) - The `writev' function gathers data from the buffers described in - VECTOR, which is taken to be COUNT structures long, and writes - them to `filedes'. As each buffer is written, it moves on to the - next. +Running this program without specifying the `MSGVERB' and `SEV_LEVEL' +function produces the following output: - Like `readv', `writev' may stop midstream under the same - conditions `write' would. + UX:cat: NOTE2: invalid syntax + TO FIX: refer to manual UX:cat:001 - The return value is a count of bytes written, or -1 indicating an - error. The possible errors are the same as in `write'. + We see the different fields of the message and how the extra glue +(the colons and the `TO FIX' string) are printed. But only one of the +three calls to `fmtmsg' produced output. The first call does not print +anything because the LABEL parameter is not in the correct form. The +string must contain two fields, separated by a colon (*note Printing +Formatted Messages::). The third `fmtmsg' call produced no output +since the class with the numeric value `6' is not defined. Although a +class with numeric value `5' is also not defined by default, the call +to `addseverity' introduces it and the second call to `fmtmsg' produces +the above output. + When we change the environment of the program to contain +`SEV_LEVEL=XXX,6,NOTE' when running it we get a different result: - Note that if the buffers are small (under about 1kB), high-level -streams may be easier to use than these functions. However, `readv' and -`writev' are more efficient when the individual buffers themselves (as -opposed to the total output), are large. In that case, a high-level -stream would not be able to cache the data effectively. + UX:cat: NOTE2: invalid syntax + TO FIX: refer to manual UX:cat:001 + label:foo: NOTE: text + TO FIX: action tag + + Now the third call to `fmtmsg' produced some output and we see how +the string `NOTE' from the environment variable appears in the message. + + Now we can reduce the output by specifying which fields we are +interested in. If we additionally set the environment variable +`MSGVERB' to the value `severity:label:action' we get the following +output: + + UX:cat: NOTE2 + TO FIX: refer to manual + label:foo: NOTE + TO FIX: action + +I.e., the output produced by the TEXT and the TAG parameters to +`fmtmsg' vanished. Please also note that now there is no colon after +the `NOTE' and `NOTE2' strings in the output. This is not necessary +since there is no more output on this line because the text is missing. + + +File: libc.info, Node: Low-Level I/O, Next: File System Interface, Prev: I/O on Streams, Up: Top + +Low-Level Input/Output +********************** + + This chapter describes functions for performing low-level +input/output operations on file descriptors. These functions include +the primitives for the higher-level I/O functions described in *Note +I/O on Streams::, as well as functions for performing low-level control +operations for which there are no equivalents on streams. + + Stream-level I/O is more flexible and usually more convenient; +therefore, programmers generally use the descriptor-level functions only +when necessary. These are some of the usual reasons: + + * For reading binary files in large chunks. + + * For reading an entire file into core before parsing it. + + * To perform operations other than data transfer, which can only be + done with a descriptor. (You can use `fileno' to get the + descriptor corresponding to a stream.) + + * To pass descriptors to a child process. (The child can create its + own stream to use a descriptor that it inherits, but cannot + inherit a stream directly.) + +* Menu: + +* Opening and Closing Files:: How to open and close file + descriptors. +* I/O Primitives:: Reading and writing data. +* File Position Primitive:: Setting a descriptor's file + position. +* Descriptors and Streams:: Converting descriptor to stream + or vice-versa. +* Stream/Descriptor Precautions:: Precautions needed if you use both + descriptors and streams. +* Scatter-Gather:: Fast I/O to discontinuous buffers. +* Memory-mapped I/O:: Using files like memory. +* Waiting for I/O:: How to check for input or output + on multiple file descriptors. +* Synchronizing I/O:: Making sure all I/O actions completed. +* Asynchronous I/O:: Perform I/O in parallel. +* Control Operations:: Various other operations on file + descriptors. +* Duplicating Descriptors:: Fcntl commands for duplicating + file descriptors. +* Descriptor Flags:: Fcntl commands for manipulating + flags associated with file + descriptors. +* File Status Flags:: Fcntl commands for manipulating + flags associated with open files. +* File Locks:: Fcntl commands for implementing + file locking. +* Interrupt Input:: Getting an asynchronous signal when + input arrives. +* IOCTLs:: Generic I/O Control operations. diff -durpN glibc-2.2.4/manual/libc.info-21 glibc-2.2.5/manual/libc.info-21 --- glibc-2.2.4/manual/libc.info-21 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-21 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1068 +33,929 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Memory-mapped I/O, Next: Waiting for I/O, Prev: Scatter-Gather, Up: Low-Level I/O - -Memory-mapped I/O -================= - - On modern operating systems, it is possible to "mmap" (pronounced -"em-map") a file to a region of memory. When this is done, the file can -be accessed just like an array in the program. - - This is more efficient than `read' or `write', as only the regions -of the file that a program actually accesses are loaded. Accesses to -not-yet-loaded parts of the mmapped region are handled in the same way -as swapped out pages. +File: libc.info, Node: Opening and Closing Files, Next: I/O Primitives, Up: Low-Level I/O - Since mmapped pages can be stored back to their file when physical -memory is low, it is possible to mmap files orders of magnitude larger -than both the physical memory _and_ swap space. The only limit is -address space. The theoretical limit is 4GB on a 32-bit machine - -however, the actual limit will be smaller since some areas will be -reserved for other purposes. If the LFS interface is used the file size -on 32-bit systems is not limited to 2GB (offsets are signed which -reduces the addressable area of 4GB by half); the full 64-bit are -available. +Opening and Closing Files +========================= - Memory mapping only works on entire pages of memory. Thus, addresses -for mapping must be page-aligned, and length values will be rounded up. -To determine the size of a page the machine uses one should use + This section describes the primitives for opening and closing files +using file descriptors. The `open' and `creat' functions are declared +in the header file `fcntl.h', while `close' is declared in `unistd.h'. - size_t page_size = (size_t) sysconf (_SC_PAGESIZE); + - Function: int open (const char *FILENAME, int FLAGS[, mode_t MODE]) + The `open' function creates and returns a new file descriptor for + the file named by FILENAME. Initially, the file position + indicator for the file is at the beginning of the file. The + argument MODE is used only when a file is created, but it doesn't + hurt to supply the argument in any case. -These functions are declared in `sys/mman.h'. + The FLAGS argument controls how the file is to be opened. This is + a bit mask; you create the value by the bitwise OR of the + appropriate parameters (using the `|' operator in C). *Note File + Status Flags::, for the parameters available. - - Function: void * mmap (void *ADDRESS, size_t LENGTH,int PROTECT, int - FLAGS, int FILEDES, off_t OFFSET) - The `mmap' function creates a new mapping, connected to bytes - (OFFSET) to (OFFSET + LENGTH - 1) in the file open on FILEDES. + The normal return value from `open' is a non-negative integer file + descriptor. In the case of an error, a value of -1 is returned + instead. In addition to the usual file name errors (*note File + Name Errors::), the following `errno' error conditions are defined + for this function: - ADDRESS gives a preferred starting address for the mapping. - `NULL' expresses no preference. Any previous mapping at that - address is automatically removed. The address you give may still be - changed, unless you use the `MAP_FIXED' flag. + `EACCES' + The file exists but is not readable/writable as requested by + the FLAGS argument, the file does not exist and the directory + is unwritable so it cannot be created. - PROTECT contains flags that control what kind of access is - permitted. They include `PROT_READ', `PROT_WRITE', and - `PROT_EXEC', which permit reading, writing, and execution, - respectively. Inappropriate access will cause a segfault (*note - Program Error Signals::). + `EEXIST' + Both `O_CREAT' and `O_EXCL' are set, and the named file + already exists. - Note that most hardware designs cannot support write permission - without read permission, and many do not distinguish read and - execute permission. Thus, you may receive wider permissions than - you ask for, and mappings of write-only files may be denied even - if you do not use `PROT_READ'. + `EINTR' + The `open' operation was interrupted by a signal. *Note + Interrupted Primitives::. - FLAGS contains flags that control the nature of the map. One of - `MAP_SHARED' or `MAP_PRIVATE' must be specified. + `EISDIR' + The FLAGS argument specified write access, and the file is a + directory. - They include: + `EMFILE' + The process has too many files open. The maximum number of + file descriptors is controlled by the `RLIMIT_NOFILE' + resource limit; *note Limits on Resources::. - `MAP_PRIVATE' - This specifies that writes to the region should never be - written back to the attached file. Instead, a copy is made - for the process, and the region will be swapped normally if - memory runs low. No other process will see the changes. + `ENFILE' + The entire system, or perhaps the file system which contains + the directory, cannot support any additional open files at + the moment. (This problem cannot happen on the GNU system.) - Since private mappings effectively revert to ordinary memory - when written to, you must have enough virtual memory for a - copy of the entire mmapped region if you use this mode with - `PROT_WRITE'. + `ENOENT' + The named file does not exist, and `O_CREAT' is not specified. - `MAP_SHARED' - This specifies that writes to the region will be written back - to the file. Changes made will be shared immediately with - other processes mmaping the same file. + `ENOSPC' + The directory or file system that would contain the new file + cannot be extended, because there is no disk space left. - Note that actual writing may take place at any time. You - need to use `msync', described below, if it is important that - other processes using conventional I/O get a consistent view - of the file. + `ENXIO' + `O_NONBLOCK' and `O_WRONLY' are both set in the FLAGS + argument, the file named by FILENAME is a FIFO (*note Pipes + and FIFOs::), and no process has the file open for reading. - `MAP_FIXED' - This forces the system to use the exact mapping address - specified in ADDRESS and fail if it can't. + `EROFS' + The file resides on a read-only file system and any of + `O_WRONLY', `O_RDWR', and `O_TRUNC' are set in the FLAGS + argument, or `O_CREAT' is set and the file does not already + exist. - `MAP_ANONYMOUS' - `MAP_ANON' - This flag tells the system to create an anonymous mapping, - not connected to a file. FILEDES and OFF are ignored, and - the region is initialized with zeros. + If on a 32 bit machine the sources are translated with + `_FILE_OFFSET_BITS == 64' the function `open' returns a file + descriptor opened in the large file mode which enables the file + handling functions to use files up to 2^63 bytes in size and + offset from -2^63 to 2^63. This happens transparently for the user + since all of the lowlevel file handling functions are equally + replaced. - Anonymous maps are used as the basic primitive to extend the - heap on some systems. They are also useful to share data - between multiple tasks without creating a file. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `open' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `open' should be protected using cancellation handlers. - On some systems using private anonymous mmaps is more - efficient than using `malloc' for large blocks. This is not - an issue with the GNU C library, as the included `malloc' - automatically uses `mmap' where appropriate. + The `open' function is the underlying primitive for the `fopen' + and `freopen' functions, that create streams. - `mmap' returns the address of the new mapping, or -1 for an error. + - Function: int open64 (const char *FILENAME, int FLAGS[, mode_t MODE]) + This function is similar to `open'. It returns a file descriptor + which can be used to access the file named by FILENAME. The only + difference is that on 32 bit systems the file is opened in the + large file mode. I.e., file length and file offsets can exceed 31 + bits. - Possible errors include: + When the sources are translated with `_FILE_OFFSET_BITS == 64' this + function is actually available under the name `open'. I.e., the + new, extended API using 64 bit file sizes and offsets transparently + replaces the old API. - `EINVAL' - Either ADDRESS was unusable, or inconsistent FLAGS were given. + - Obsolete function: int creat (const char *FILENAME, mode_t MODE) + This function is obsolete. The call: - `EACCES' - FILEDES was not open for the type of access specified in - PROTECT. + creat (FILENAME, MODE) - `ENOMEM' - Either there is not enough memory for the operation, or the - process is out of address space. + is equivalent to: - `ENODEV' - This file is of a type that doesn't support mapping. + open (FILENAME, O_WRONLY | O_CREAT | O_TRUNC, MODE) - `ENOEXEC' - The file is on a filesystem that doesn't support mapping. + If on a 32 bit machine the sources are translated with + `_FILE_OFFSET_BITS == 64' the function `creat' returns a file + descriptor opened in the large file mode which enables the file + handling functions to use files up to 2^63 in size and offset from + -2^63 to 2^63. This happens transparently for the user since all + of the lowlevel file handling functions are equally replaced. + - Obsolete function: int creat64 (const char *FILENAME, mode_t MODE) + This function is similar to `creat'. It returns a file descriptor + which can be used to access the file named by FILENAME. The only + the difference is that on 32 bit systems the file is opened in the + large file mode. I.e., file length and file offsets can exceed 31 + bits. - - Function: void * mmap64 (void *ADDRESS, size_t LENGTH,int PROTECT, - int FLAGS, int FILEDES, off64_t OFFSET) - The `mmap64' function is equivalent to the `mmap' function but the - OFFSET parameter is of type `off64_t'. On 32-bit systems this - allows the file associated with the FILEDES descriptor to be - larger than 2GB. FILEDES must be a descriptor returned from a - call to `open64' or `fopen64' and `freopen64' where the descriptor - is retrieved with `fileno'. + To use this file descriptor one must not use the normal operations + but instead the counterparts named `*64', e.g., `read64'. When the sources are translated with `_FILE_OFFSET_BITS == 64' this - function is actually available under the name `mmap'. I.e., the + function is actually available under the name `open'. I.e., the new, extended API using 64 bit file sizes and offsets transparently replaces the old API. - - Function: int munmap (void *ADDR, size_t LENGTH) - `munmap' removes any memory maps from (ADDR) to (ADDR + LENGTH). - LENGTH should be the length of the mapping. - - It is safe to unmap multiple mappings in one command, or include - unmapped space in the range. It is also possible to unmap only - part of an existing mapping. However, only entire pages can be - removed. If LENGTH is not an even number of pages, it will be - rounded up. - - It returns 0 for success and -1 for an error. + - Function: int close (int FILEDES) + The function `close' closes the file descriptor FILEDES. Closing + a file has the following consequences: - One error is possible: + * The file descriptor is deallocated. - `EINVAL' - The memory range given was outside the user mmap range or - wasn't page aligned. + * Any record locks owned by the process on the file are + unlocked. + * When all file descriptors associated with a pipe or FIFO have + been closed, any unread data is discarded. - - Function: int msync (void *ADDRESS, size_t LENGTH, int FLAGS) - When using shared mappings, the kernel can write the file at any - time before the mapping is removed. To be certain data has - actually been written to the file and will be accessible to - non-memory-mapped I/O, it is necessary to use this function. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `close' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this, calls to + `close' should be protected using cancellation handlers. - It operates on the region ADDRESS to (ADDRESS + LENGTH). It may - be used on part of a mapping or multiple mappings, however the - region given should not contain any unmapped space. + The normal return value from `close' is 0; a value of -1 is + returned in case of failure. The following `errno' error + conditions are defined for this function: - FLAGS can contain some options: + `EBADF' + The FILEDES argument is not a valid file descriptor. - `MS_SYNC' - This flag makes sure the data is actually written _to disk_. - Normally `msync' only makes sure that accesses to a file with - conventional I/O reflect the recent changes. + `EINTR' + The `close' call was interrupted by a signal. *Note + Interrupted Primitives::. Here is an example of how to + handle `EINTR' properly: - `MS_ASYNC' - This tells `msync' to begin the synchronization, but not to - wait for it to complete. + TEMP_FAILURE_RETRY (close (desc)); - `msync' returns 0 for success and -1 for error. Errors include: + `ENOSPC' + `EIO' + `EDQUOT' + When the file is accessed by NFS, these errors from `write' + can sometimes not be detected until `close'. *Note I/O + Primitives::, for details on their meaning. - `EINVAL' - An invalid region was given, or the FLAGS were invalid. + Please note that there is _no_ separate `close64' function. This + is not necessary since this function does not determine nor depend + on the mode of the file. The kernel which performs the `close' + operation knows which mode the descriptor is used for and can + handle this situation. - `EFAULT' - There is no existing mapping in at least part of the given - region. + To close a stream, call `fclose' (*note Closing Streams::) instead +of trying to close its underlying file descriptor with `close'. This +flushes any buffered output and updates the stream object to indicate +that it is closed. + +File: libc.info, Node: I/O Primitives, Next: File Position Primitive, Prev: Opening and Closing Files, Up: Low-Level I/O - - Function: void * mremap (void *ADDRESS, size_t LENGTH, size_t - NEW_LENGTH, int FLAG) - This function can be used to change the size of an existing memory - area. ADDRESS and LENGTH must cover a region entirely mapped in - the same `mmap' statement. A new mapping with the same - characteristics will be returned with the length NEW_LENGTH. +Input and Output Primitives +=========================== - One option is possible, `MREMAP_MAYMOVE'. If it is given in FLAGS, - the system may remove the existing mapping and create a new one of - the desired length in another location. + This section describes the functions for performing primitive input +and output operations on file descriptors: `read', `write', and +`lseek'. These functions are declared in the header file `unistd.h'. - The address of the resulting mapping is returned, or -1. Possible - error codes include: + - Data Type: ssize_t + This data type is used to represent the sizes of blocks that can be + read or written in a single operation. It is similar to `size_t', + but must be a signed type. - `EFAULT' - There is no existing mapping in at least part of the original - region, or the region covers two or more distinct mappings. + - Function: ssize_t read (int FILEDES, void *BUFFER, size_t SIZE) + The `read' function reads up to SIZE bytes from the file with + descriptor FILEDES, storing the results in the BUFFER. (This is + not necessarily a character string, and no terminating null + character is added.) - `EINVAL' - The address given is misaligned or inappropriate. + The return value is the number of bytes actually read. This might + be less than SIZE; for example, if there aren't that many bytes + left in the file or if there aren't that many bytes immediately + available. The exact behavior depends on what kind of file it is. + Note that reading less than SIZE bytes is not an error. - `EAGAIN' - The region has pages locked, and if extended it would exceed - the process's resource limit for locked pages. *Note Limits - on Resources::. + A value of zero indicates end-of-file (except if the value of the + SIZE argument is also zero). This is not considered an error. If + you keep calling `read' while at end-of-file, it will keep + returning zero and doing nothing else. - `ENOMEM' - The region is private writable, and insufficient virtual - memory is available to extend it. Also, this error will - occur if `MREMAP_MAYMOVE' is not given and the extension - would collide with another mapped region. + If `read' returns at least one character, there is no way you can + tell whether end-of-file was reached. But if you did reach the + end, the next read will return zero. + In case of an error, `read' returns -1. The following `errno' + error conditions are defined for this function: - This function is only available on a few systems. Except for -performing optional optimizations one should not rely on this function. + `EAGAIN' + Normally, when no input is immediately available, `read' + waits for some input. But if the `O_NONBLOCK' flag is set + for the file (*note File Status Flags::), `read' returns + immediately without reading any data, and reports this error. - Not all file descriptors may be mapped. Sockets, pipes, and most -devices only allow sequential access and do not fit into the mapping -abstraction. In addition, some regular files may not be mmapable, and -older kernels may not support mapping at all. Thus, programs using -`mmap' should have a fallback method to use should it fail. *Note Mmap: -(standards)Mmap. + *Compatibility Note:* Most versions of BSD Unix use a + different error code for this: `EWOULDBLOCK'. In the GNU + library, `EWOULDBLOCK' is an alias for `EAGAIN', so it + doesn't matter which name you use. - - Function: int madvise (void *ADDR, size_t LENGTH, int ADVICE) - This function can be used to provide the system with ADVICE about - the intended usage patterns of the memory region starting at ADDR - and extending LENGTH bytes. + On some systems, reading a large amount of data from a + character special file can also fail with `EAGAIN' if the + kernel cannot find enough physical memory to lock down the + user's pages. This is limited to devices that transfer with + direct memory access into the user's memory, which means it + does not include terminals, since they always use separate + buffers inside the kernel. This problem never happens in the + GNU system. - The valid BSD values for ADVICE are: + Any condition that could result in `EAGAIN' can instead + result in a successful `read' which returns fewer bytes than + requested. Calling `read' again immediately would result in + `EAGAIN'. - `MADV_NORMAL' - The region should receive no further special treatment. + `EBADF' + The FILEDES argument is not a valid file descriptor, or is + not open for reading. - `MADV_RANDOM' - The region will be accessed via random page references. The - kernel should page-in the minimal number of pages for each - page fault. + `EINTR' + `read' was interrupted by a signal while it was waiting for + input. *Note Interrupted Primitives::. A signal will not + necessary cause `read' to return `EINTR'; it may instead + result in a successful `read' which returns fewer bytes than + requested. - `MADV_SEQUENTIAL' - The region will be accessed via sequential page references. - This may cause the kernel to aggressively read-ahead, - expecting further sequential references after any page fault - within this region. + `EIO' + For many devices, and for disk files, this error code + indicates a hardware error. - `MADV_WILLNEED' - The region will be needed. The pages within this region may - be pre-faulted in by the kernel. + `EIO' also occurs when a background process tries to read + from the controlling terminal, and the normal action of + stopping the process by sending it a `SIGTTIN' signal isn't + working. This might happen if the signal is being blocked or + ignored, or because the process group is orphaned. *Note Job + Control::, for more information about job control, and *Note + Signal Handling::, for information about signals. - `MADV_DONTNEED' - The region is no longer needed. The kernel may free these - pages, causing any changes to the pages to be lost, as well - as swapped out pages to be discarded. + Please note that there is no function named `read64'. This is not + necessary since this function does not directly modify or handle + the possibly wide file offset. Since the kernel handles this state + internally, the `read' function can be used for all cases. - The POSIX names are slightly different, but with the same meanings: + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `read' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this, calls to + `read' should be protected using cancellation handlers. - `POSIX_MADV_NORMAL' - This corresponds with BSD's `MADV_NORMAL'. + The `read' function is the underlying primitive for all of the + functions that read from streams, such as `fgetc'. - `POSIX_MADV_RANDOM' - This corresponds with BSD's `MADV_RANDOM'. + - Function: ssize_t pread (int FILEDES, void *BUFFER, size_t SIZE, + off_t OFFSET) + The `pread' function is similar to the `read' function. The first + three arguments are identical, and the return values and error + codes also correspond. - `POSIX_MADV_SEQUENTIAL' - This corresponds with BSD's `MADV_SEQUENTIAL'. + The difference is the fourth argument and its handling. The data + block is not read from the current position of the file descriptor + `filedes'. Instead the data is read from the file starting at + position OFFSET. The position of the file descriptor itself is + not affected by the operation. The value is the same as before + the call. - `POSIX_MADV_WILLNEED' - This corresponds with BSD's `MADV_WILLNEED'. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' the + `pread' function is in fact `pread64' and the type `off_t' has 64 + bits, which makes it possible to handle files up to 2^63 bytes in + length. - `POSIX_MADV_DONTNEED' - This corresponds with BSD's `MADV_DONTNEED'. + The return value of `pread' describes the number of bytes read. + In the error case it returns -1 like `read' does and the error + codes are also the same, with these additions: - `msync' returns 0 for success and -1 for error. Errors include: `EINVAL' - An invalid region was given, or the ADVICE was invalid. - - `EFAULT' - There is no existing mapping in at least part of the given - region. - + The value given for OFFSET is negative and therefore illegal. - -File: libc.info, Node: Waiting for I/O, Next: Synchronizing I/O, Prev: Memory-mapped I/O, Up: Low-Level I/O + `ESPIPE' + The file descriptor FILEDES is associate with a pipe or a + FIFO and this device does not allow positioning of the file + pointer. -Waiting for Input or Output -=========================== + The function is an extension defined in the Unix Single + Specification version 2. - Sometimes a program needs to accept input on multiple input channels -whenever input arrives. For example, some workstations may have devices -such as a digitizing tablet, function button box, or dial box that are -connected via normal asynchronous serial interfaces; good user interface -style requires responding immediately to input on any device. Another -example is a program that acts as a server to several other processes -via pipes or sockets. + - Function: ssize_t pread64 (int FILEDES, void *BUFFER, size_t SIZE, + off64_t OFFSET) + This function is similar to the `pread' function. The difference + is that the OFFSET parameter is of type `off64_t' instead of + `off_t' which makes it possible on 32 bit machines to address + files larger than 2^31 bytes and up to 2^63 bytes. The file + descriptor `filedes' must be opened using `open64' since otherwise + the large offsets possible with `off64_t' will lead to errors with + a descriptor in small file mode. - You cannot normally use `read' for this purpose, because this blocks -the program until input is available on one particular file descriptor; -input on other channels won't wake it up. You could set nonblocking -mode and poll each file descriptor in turn, but this is very -inefficient. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' on + a 32 bit machine this function is actually available under the name + `pread' and so transparently replaces the 32 bit interface. - A better solution is to use the `select' function. This blocks the -program until input or output is ready on a specified set of file -descriptors, or until a timer expires, whichever comes first. This -facility is declared in the header file `sys/types.h'. + - Function: ssize_t write (int FILEDES, const void *BUFFER, size_t + SIZE) + The `write' function writes up to SIZE bytes from BUFFER to the + file with descriptor FILEDES. The data in BUFFER is not + necessarily a character string and a null character is output like + any other character. - In the case of a server socket (*note Listening::), we say that -"input" is available when there are pending connections that could be -accepted (*note Accepting Connections::). `accept' for server sockets -blocks and interacts with `select' just as `read' does for normal input. + The return value is the number of bytes actually written. This + may be SIZE, but can always be smaller. Your program should + always call `write' in a loop, iterating until all the data is + written. - The file descriptor sets for the `select' function are specified as -`fd_set' objects. Here is the description of the data type and some -macros for manipulating these objects. + Once `write' returns, the data is enqueued to be written and can be + read back right away, but it is not necessarily written out to + permanent storage immediately. You can use `fsync' when you need + to be sure your data has been permanently stored before + continuing. (It is more efficient for the system to batch up + consecutive writes and do them all at once when convenient. + Normally they will always be written to disk within a minute or + less.) Modern systems provide another function `fdatasync' which + guarantees integrity only for the file data and is therefore + faster. You can use the `O_FSYNC' open mode to make `write' always + store the data to disk before returning; *note Operating Modes::. - - Data Type: fd_set - The `fd_set' data type represents file descriptor sets for the - `select' function. It is actually a bit array. + In the case of an error, `write' returns -1. The following + `errno' error conditions are defined for this function: - - Macro: int FD_SETSIZE - The value of this macro is the maximum number of file descriptors - that a `fd_set' object can hold information about. On systems - with a fixed maximum number, `FD_SETSIZE' is at least that number. - On some systems, including GNU, there is no absolute limit on the - number of descriptors open, but this macro still has a constant - value which controls the number of bits in an `fd_set'; if you get - a file descriptor with a value as high as `FD_SETSIZE', you cannot - put that descriptor into an `fd_set'. + `EAGAIN' + Normally, `write' blocks until the write operation is + complete. But if the `O_NONBLOCK' flag is set for the file + (*note Control Operations::), it returns immediately without + writing any data and reports this error. An example of a + situation that might cause the process to block on output is + writing to a terminal device that supports flow control, + where output has been suspended by receipt of a STOP + character. - - Macro: void FD_ZERO (fd_set *SET) - This macro initializes the file descriptor set SET to be the empty - set. + *Compatibility Note:* Most versions of BSD Unix use a + different error code for this: `EWOULDBLOCK'. In the GNU + library, `EWOULDBLOCK' is an alias for `EAGAIN', so it + doesn't matter which name you use. - - Macro: void FD_SET (int FILEDES, fd_set *SET) - This macro adds FILEDES to the file descriptor set SET. + On some systems, writing a large amount of data from a + character special file can also fail with `EAGAIN' if the + kernel cannot find enough physical memory to lock down the + user's pages. This is limited to devices that transfer with + direct memory access into the user's memory, which means it + does not include terminals, since they always use separate + buffers inside the kernel. This problem does not arise in the + GNU system. - - Macro: void FD_CLR (int FILEDES, fd_set *SET) - This macro removes FILEDES from the file descriptor set SET. + `EBADF' + The FILEDES argument is not a valid file descriptor, or is + not open for writing. - - Macro: int FD_ISSET (int FILEDES, fd_set *SET) - This macro returns a nonzero value (true) if FILEDES is a member - of the file descriptor set SET, and zero (false) otherwise. + `EFBIG' + The size of the file would become larger than the + implementation can support. - Next, here is the description of the `select' function itself. + `EINTR' + The `write' operation was interrupted by a signal while it was + blocked waiting for completion. A signal will not + necessarily cause `write' to return `EINTR'; it may instead + result in a successful `write' which writes fewer bytes than + requested. *Note Interrupted Primitives::. - - Function: int select (int NFDS, fd_set *READ-FDS, fd_set *WRITE-FDS, - fd_set *EXCEPT-FDS, struct timeval *TIMEOUT) - The `select' function blocks the calling process until there is - activity on any of the specified sets of file descriptors, or - until the timeout period has expired. + `EIO' + For many devices, and for disk files, this error code + indicates a hardware error. - The file descriptors specified by the READ-FDS argument are - checked to see if they are ready for reading; the WRITE-FDS file - descriptors are checked to see if they are ready for writing; and - the EXCEPT-FDS file descriptors are checked for exceptional - conditions. You can pass a null pointer for any of these - arguments if you are not interested in checking for that kind of - condition. + `ENOSPC' + The device containing the file is full. - A file descriptor is considered ready for reading if it is not at - end of file. A server socket is considered ready for reading if - there is a pending connection which can be accepted with `accept'; - *note Accepting Connections::. A client socket is ready for - writing when its connection is fully established; *note - Connecting::. + `EPIPE' + This error is returned when you try to write to a pipe or + FIFO that isn't open for reading by any process. When this + happens, a `SIGPIPE' signal is also sent to the process; see + *Note Signal Handling::. - "Exceptional conditions" does not mean errors--errors are reported - immediately when an erroneous system call is executed, and do not - constitute a state of the descriptor. Rather, they include - conditions such as the presence of an urgent message on a socket. - (*Note Sockets::, for information on urgent messages.) + Unless you have arranged to prevent `EINTR' failures, you should + check `errno' after each failing call to `write', and if the error + was `EINTR', you should simply repeat the call. *Note Interrupted + Primitives::. The easy way to do this is with the macro + `TEMP_FAILURE_RETRY', as follows: - The `select' function checks only the first NFDS file descriptors. - The usual thing is to pass `FD_SETSIZE' as the value of this - argument. + nbytes = TEMP_FAILURE_RETRY (write (desc, buffer, count)); - The TIMEOUT specifies the maximum time to wait. If you pass a - null pointer for this argument, it means to block indefinitely - until one of the file descriptors is ready. Otherwise, you should - provide the time in `struct timeval' format; see *Note - High-Resolution Calendar::. Specify zero as the time (a `struct - timeval' containing all zeros) if you want to find out which - descriptors are ready without waiting if none are ready. + Please note that there is no function named `write64'. This is not + necessary since this function does not directly modify or handle + the possibly wide file offset. Since the kernel handles this state + internally the `write' function can be used for all cases. - The normal return value from `select' is the total number of ready - file descriptors in all of the sets. Each of the argument sets is - overwritten with information about the descriptors that are ready - for the corresponding operation. Thus, to see if a particular - descriptor DESC has input, use `FD_ISSET (DESC, READ-FDS)' after - `select' returns. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `write' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this, calls to + `write' should be protected using cancellation handlers. - If `select' returns because the timeout period expires, it returns - a value of zero. + The `write' function is the underlying primitive for all of the + functions that write to streams, such as `fputc'. - Any signal will cause `select' to return immediately. So if your - program uses signals, you can't rely on `select' to keep waiting - for the full time specified. If you want to be sure of waiting - for a particular amount of time, you must check for `EINTR' and - repeat the `select' with a newly calculated timeout based on the - current time. See the example below. See also *Note Interrupted - Primitives::. + - Function: ssize_t pwrite (int FILEDES, const void *BUFFER, size_t + SIZE, off_t OFFSET) + The `pwrite' function is similar to the `write' function. The + first three arguments are identical, and the return values and + error codes also correspond. - If an error occurs, `select' returns `-1' and does not modify the - argument file descriptor sets. The following `errno' error - conditions are defined for this function: + The difference is the fourth argument and its handling. The data + block is not written to the current position of the file descriptor + `filedes'. Instead the data is written to the file starting at + position OFFSET. The position of the file descriptor itself is + not affected by the operation. The value is the same as before + the call. - `EBADF' - One of the file descriptor sets specified an invalid file - descriptor. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' the + `pwrite' function is in fact `pwrite64' and the type `off_t' has + 64 bits, which makes it possible to handle files up to 2^63 bytes + in length. - `EINTR' - The operation was interrupted by a signal. *Note Interrupted - Primitives::. + The return value of `pwrite' describes the number of written bytes. + In the error case it returns -1 like `write' does and the error + codes are also the same, with these additions: `EINVAL' - The TIMEOUT argument is invalid; one of the components is - negative or too large. + The value given for OFFSET is negative and therefore illegal. - *Portability Note:* The `select' function is a BSD Unix feature. + `ESPIPE' + The file descriptor FILEDES is associated with a pipe or a + FIFO and this device does not allow positioning of the file + pointer. - Here is an example showing how you can use `select' to establish a -timeout period for reading from a file descriptor. The `input_timeout' -function blocks the calling process until input is available on the -file descriptor, or until the timeout period expires. + The function is an extension defined in the Unix Single + Specification version 2. - #include - #include - #include - #include - - int - input_timeout (int filedes, unsigned int seconds) - { - fd_set set; - struct timeval timeout; - - /* Initialize the file descriptor set. */ - FD_ZERO (&set); - FD_SET (filedes, &set); - - /* Initialize the timeout data structure. */ - timeout.tv_sec = seconds; - timeout.tv_usec = 0; - - /* `select' returns 0 if timeout, 1 if input available, -1 if error. */ - return TEMP_FAILURE_RETRY (select (FD_SETSIZE, - &set, NULL, NULL, - &timeout)); - } - - int - main (void) - { - fprintf (stderr, "select returned %d.\n", - input_timeout (STDIN_FILENO, 5)); - return 0; - } + - Function: ssize_t pwrite64 (int FILEDES, const void *BUFFER, size_t + SIZE, off64_t OFFSET) + This function is similar to the `pwrite' function. The difference + is that the OFFSET parameter is of type `off64_t' instead of + `off_t' which makes it possible on 32 bit machines to address + files larger than 2^31 bytes and up to 2^63 bytes. The file + descriptor `filedes' must be opened using `open64' since otherwise + the large offsets possible with `off64_t' will lead to errors with + a descriptor in small file mode. - There is another example showing the use of `select' to multiplex -input from multiple sockets in *Note Server Example::. + When the source file is compiled using `_FILE_OFFSET_BITS == 64' + on a 32 bit machine this function is actually available under the + name `pwrite' and so transparently replaces the 32 bit interface.  -File: libc.info, Node: Synchronizing I/O, Next: Asynchronous I/O, Prev: Waiting for I/O, Up: Low-Level I/O - -Synchronizing I/O operations -============================ - - In most modern operating systems, the normal I/O operations are not -executed synchronously. I.e., even if a `write' system call returns, -this does not mean the data is actually written to the media, e.g., the -disk. - - In situations where synchronization points are necessary, you can use -special functions which ensure that all operations finish before they -return. - - - Function: int sync (void) - A call to this function will not return as long as there is data - which has not been written to the device. All dirty buffers in - the kernel will be written and so an overall consistent system can - be achieved (if no other process in parallel writes data). +File: libc.info, Node: File Position Primitive, Next: Descriptors and Streams, Prev: I/O Primitives, Up: Low-Level I/O - A prototype for `sync' can be found in `unistd.h'. +Setting the File Position of a Descriptor +========================================= - The return value is zero to indicate no error. + Just as you can set the file position of a stream with `fseek', you +can set the file position of a descriptor with `lseek'. This specifies +the position in the file for the next `read' or `write' operation. +*Note File Positioning::, for more information on the file position and +what it means. - Programs more often want to ensure that data written to a given file -is committed, rather than all data in the system. For this, `sync' is -overkill. + To read the current file position value from a descriptor, use +`lseek (DESC, 0, SEEK_CUR)'. - - Function: int fsync (int FILDES) - The `fsync' function can be used to make sure all data associated - with the open file FILDES is written to the device associated with - the descriptor. The function call does not return unless all - actions have finished. + - Function: off_t lseek (int FILEDES, off_t OFFSET, int WHENCE) + The `lseek' function is used to change the file position of the + file with descriptor FILEDES. - A prototype for `fsync' can be found in `unistd.h'. + The WHENCE argument specifies how the OFFSET should be + interpreted, in the same way as for the `fseek' function, and it + must be one of the symbolic constants `SEEK_SET', `SEEK_CUR', or + `SEEK_END'. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `fsync' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this, calls to - `fsync' should be protected using cancellation handlers. + `SEEK_SET' + Specifies that WHENCE is a count of characters from the + beginning of the file. - The return value of the function is zero if no error occurred. - Otherwise it is -1 and the global variable ERRNO is set to the - following values: - `EBADF' - The descriptor FILDES is not valid. + `SEEK_CUR' + Specifies that WHENCE is a count of characters from the + current file position. This count may be positive or + negative. - `EINVAL' - No synchronization is possible since the system does not - implement this. + `SEEK_END' + Specifies that WHENCE is a count of characters from the end of + the file. A negative count specifies a position within the + current extent of the file; a positive count specifies a + position past the current end. If you set the position past + the current end, and actually write data, you will extend the + file with zeros up to that position. - Sometimes it is not even necessary to write all data associated with -a file descriptor. E.g., in database files which do not change in size -it is enough to write all the file content data to the device. -Meta-information, like the modification time etc., are not that -important and leaving such information uncommitted does not prevent a -successful recovering of the file in case of a problem. + The return value from `lseek' is normally the resulting file + position, measured in bytes from the beginning of the file. You + can use this feature together with `SEEK_CUR' to read the current + file position. - - Function: int fdatasync (int FILDES) - When a call to the `fdatasync' function returns, it is ensured - that all of the file data is written to the device. For all - pending I/O operations, the parts guaranteeing data integrity - finished. + If you want to append to the file, setting the file position to the + current end of file with `SEEK_END' is not sufficient. Another + process may write more data after you seek but before you write, + extending the file so the position you write onto clobbers their + data. Instead, use the `O_APPEND' operating mode; *note Operating + Modes::. - Not all systems implement the `fdatasync' operation. On systems - missing this functionality `fdatasync' is emulated by a call to - `fsync' since the performed actions are a superset of those - required by `fdatasync'. + You can set the file position past the current end of the file. + This does not by itself make the file longer; `lseek' never + changes the file. But subsequent output at that position will + extend the file. Characters between the previous end of file and + the new position are filled with zeros. Extending the file in + this way can create a "hole": the blocks of zeros are not actually + allocated on disk, so the file takes up less space than it appears + to; it is then called a "sparse file". - The prototype for `fdatasync' is in `unistd.h'. + If the file position cannot be changed, or the operation is in + some way invalid, `lseek' returns a value of -1. The following + `errno' error conditions are defined for this function: - The return value of the function is zero if no error occurred. - Otherwise it is -1 and the global variable ERRNO is set to the - following values: `EBADF' - The descriptor FILDES is not valid. + The FILEDES is not a valid file descriptor. `EINVAL' - No synchronization is possible since the system does not - implement this. - - -File: libc.info, Node: Asynchronous I/O, Next: Control Operations, Prev: Synchronizing I/O, Up: Low-Level I/O - -Perform I/O Operations in Parallel -================================== - - The POSIX.1b standard defines a new set of I/O operations which can -significantly reduce the time an application spends waiting at I/O. The -new functions allow a program to initiate one or more I/O operations and -then immediately resume normal work while the I/O operations are -executed in parallel. This functionality is available if the -`unistd.h' file defines the symbol `_POSIX_ASYNCHRONOUS_IO'. - - These functions are part of the library with realtime functions named -`librt'. They are not actually part of the `libc' binary. The -implementation of these functions can be done using support in the -kernel (if available) or using an implementation based on threads at -userlevel. In the latter case it might be necessary to link -applications with the thread library `libpthread' in addition to -`librt'. - - All AIO operations operate on files which were opened previously. -There might be arbitrarily many operations running for one file. The -asynchronous I/O operations are controlled using a data structure named -`struct aiocb' ("AIO control block"). It is defined in `aio.h' as -follows. - - - Data Type: struct aiocb - The POSIX.1b standard mandates that the `struct aiocb' structure - contains at least the members described in the following table. - There might be more elements which are used by the implementation, - but depending upon these elements is not portable and is highly - deprecated. - - `int aio_fildes' - This element specifies the file descriptor to be used for the - operation. It must be a legal descriptor, otherwise the - operation will fail. - - The device on which the file is opened must allow the seek - operation. I.e., it is not possible to use any of the AIO - operations on devices like terminals where an `lseek' call - would lead to an error. - - `off_t aio_offset' - This element specifies the offset in the file at which the - operation (input or output) is performed. Since the - operations are carried out in arbitrary order and more than - one operation for one file descriptor can be started, one - cannot expect a current read/write position of the file - descriptor. - - `volatile void *aio_buf' - This is a pointer to the buffer with the data to be written - or the place where the read data is stored. + The WHENCE argument value is not valid, or the resulting file + offset is not valid. A file offset is invalid. - `size_t aio_nbytes' - This element specifies the length of the buffer pointed to by - `aio_buf'. + `ESPIPE' + The FILEDES corresponds to an object that cannot be + positioned, such as a pipe, FIFO or terminal device. + (POSIX.1 specifies this error only for pipes and FIFOs, but + in the GNU system, you always get `ESPIPE' if the object is + not seekable.) - `int aio_reqprio' - If the platform has defined `_POSIX_PRIORITIZED_IO' and - `_POSIX_PRIORITY_SCHEDULING', the AIO requests are processed - based on the current scheduling priority. The `aio_reqprio' - element can then be used to lower the priority of the AIO - operation. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' the + `lseek' function is in fact `lseek64' and the type `off_t' has 64 + bits which makes it possible to handle files up to 2^63 bytes in + length. - `struct sigevent aio_sigevent' - This element specifies how the calling process is notified - once the operation terminates. If the `sigev_notify' element - is `SIGEV_NONE', no notification is sent. If it is - `SIGEV_SIGNAL', the signal determined by `sigev_signo' is - sent. Otherwise, `sigev_notify' must be `SIGEV_THREAD'. In - this case, a thread is created which starts executing the - function pointed to by `sigev_notify_function'. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `lseek' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `lseek' should be protected using cancellation handlers. - `int aio_lio_opcode' - This element is only used by the `lio_listio' and - `lio_listio64' functions. Since these functions allow an - arbitrary number of operations to start at once, and each - operation can be input or output (or nothing), the - information must be stored in the control block. The - possible values are: + The `lseek' function is the underlying primitive for the `fseek', + `fseeko', `ftell', `ftello' and `rewind' functions, which operate + on streams instead of file descriptors. - `LIO_READ' - Start a read operation. Read from the file at position - `aio_offset' and store the next `aio_nbytes' bytes in the - buffer pointed to by `aio_buf'. + - Function: off64_t lseek64 (int FILEDES, off64_t OFFSET, int WHENCE) + This function is similar to the `lseek' function. The difference + is that the OFFSET parameter is of type `off64_t' instead of + `off_t' which makes it possible on 32 bit machines to address + files larger than 2^31 bytes and up to 2^63 bytes. The file + descriptor `filedes' must be opened using `open64' since otherwise + the large offsets possible with `off64_t' will lead to errors with + a descriptor in small file mode. - `LIO_WRITE' - Start a write operation. Write `aio_nbytes' bytes - starting at `aio_buf' into the file starting at position - `aio_offset'. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' on + a 32 bits machine this function is actually available under the + name `lseek' and so transparently replaces the 32 bit interface. - `LIO_NOP' - Do nothing for this control block. This value is useful - sometimes when an array of `struct aiocb' values - contains holes, i.e., some of the values must not be - handled although the whole array is presented to the - `lio_listio' function. + You can have multiple descriptors for the same file if you open the +file more than once, or if you duplicate a descriptor with `dup'. +Descriptors that come from separate calls to `open' have independent +file positions; using `lseek' on one descriptor has no effect on the +other. For example, - When the sources are compiled using `_FILE_OFFSET_BITS == 64' on a - 32 bit machine, this type is in fact `struct aiocb64', since the - LFS interface transparently replaces the `struct aiocb' definition. + { + int d1, d2; + char buf[4]; + d1 = open ("foo", O_RDONLY); + d2 = open ("foo", O_RDONLY); + lseek (d1, 1024, SEEK_SET); + read (d2, buf, 4); + } - For use with the AIO functions defined in the LFS, there is a -similar type defined which replaces the types of the appropriate -members with larger types but otherwise is equivalent to `struct -aiocb'. Particularly, all member names are the same. +will read the first four characters of the file `foo'. (The +error-checking code necessary for a real program has been omitted here +for brevity.) - - Data Type: struct aiocb64 - `int aio_fildes' - This element specifies the file descriptor which is used for - the operation. It must be a legal descriptor since otherwise - the operation fails for obvious reasons. + By contrast, descriptors made by duplication share a common file +position with the original descriptor that was duplicated. Anything +which alters the file position of one of the duplicates, including +reading or writing data, affects all of them alike. Thus, for example, - The device on which the file is opened must allow the seek - operation. I.e., it is not possible to use any of the AIO - operations on devices like terminals where an `lseek' call - would lead to an error. + { + int d1, d2, d3; + char buf1[4], buf2[4]; + d1 = open ("foo", O_RDONLY); + d2 = dup (d1); + d3 = dup (d2); + lseek (d3, 1024, SEEK_SET); + read (d1, buf1, 4); + read (d2, buf2, 4); + } - `off64_t aio_offset' - This element specifies at which offset in the file the - operation (input or output) is performed. Since the - operation are carried in arbitrary order and more than one - operation for one file descriptor can be started, one cannot - expect a current read/write position of the file descriptor. +will read four characters starting with the 1024'th character of `foo', +and then four more characters starting with the 1028'th character. - `volatile void *aio_buf' - This is a pointer to the buffer with the data to be written - or the place where the read data is stored. + - Data Type: off_t + This is an arithmetic data type used to represent file sizes. In + the GNU system, this is equivalent to `fpos_t' or `long int'. - `size_t aio_nbytes' - This element specifies the length of the buffer pointed to by - `aio_buf'. + If the source is compiled with `_FILE_OFFSET_BITS == 64' this type + is transparently replaced by `off64_t'. - `int aio_reqprio' - If for the platform `_POSIX_PRIORITIZED_IO' and - `_POSIX_PRIORITY_SCHEDULING' are defined the AIO requests are - processed based on the current scheduling priority. The - `aio_reqprio' element can then be used to lower the priority - of the AIO operation. + - Data Type: off64_t + This type is used similar to `off_t'. The difference is that even + on 32 bit machines, where the `off_t' type would have 32 bits, + `off64_t' has 64 bits and so is able to address files up to 2^63 + bytes in length. - `struct sigevent aio_sigevent' - This element specifies how the calling process is notified - once the operation terminates. If the `sigev_notify', - element is `SIGEV_NONE' no notification is sent. If it is - `SIGEV_SIGNAL', the signal determined by `sigev_signo' is - sent. Otherwise, `sigev_notify' must be `SIGEV_THREAD' in - which case a thread which starts executing the function - pointed to by `sigev_notify_function'. + When compiling with `_FILE_OFFSET_BITS == 64' this type is + available under the name `off_t'. - `int aio_lio_opcode' - This element is only used by the `lio_listio' and - `[lio_listio64' functions. Since these functions allow an - arbitrary number of operations to start at once, and since - each operation can be input or output (or nothing), the - information must be stored in the control block. See the - description of `struct aiocb' for a description of the - possible values. + These aliases for the `SEEK_...' constants exist for the sake of +compatibility with older BSD systems. They are defined in two +different header files: `fcntl.h' and `sys/file.h'. - When the sources are compiled using `_FILE_OFFSET_BITS == 64' on a - 32 bit machine, this type is available under the name `struct - aiocb64', since the LFS transparently replaces the old interface. +`L_SET' + An alias for `SEEK_SET'. -* Menu: +`L_INCR' + An alias for `SEEK_CUR'. -* Asynchronous Reads/Writes:: Asynchronous Read and Write Operations. -* Status of AIO Operations:: Getting the Status of AIO Operations. -* Synchronizing AIO Operations:: Getting into a consistent state. -* Cancel AIO Operations:: Cancellation of AIO Operations. -* Configuration of AIO:: How to optimize the AIO implementation. +`L_XTND' + An alias for `SEEK_END'.  -File: libc.info, Node: Asynchronous Reads/Writes, Next: Status of AIO Operations, Up: Asynchronous I/O - -Asynchronous Read and Write Operations --------------------------------------- - - - Function: int aio_read (struct aiocb *AIOCBP) - This function initiates an asynchronous read operation. It - immediately returns after the operation was enqueued or when an - error was encountered. - - The first `aiocbp->aio_nbytes' bytes of the file for which - `aiocbp->aio_fildes' is a descriptor are written to the buffer - starting at `aiocbp->aio_buf'. Reading starts at the absolute - position `aiocbp->aio_offset' in the file. - - If prioritized I/O is supported by the platform the - `aiocbp->aio_reqprio' value is used to adjust the priority before - the request is actually enqueued. - - The calling process is notified about the termination of the read - request according to the `aiocbp->aio_sigevent' value. +File: libc.info, Node: Descriptors and Streams, Next: Stream/Descriptor Precautions, Prev: File Position Primitive, Up: Low-Level I/O - When `aio_read' returns, the return value is zero if no error - occurred that can be found before the process is enqueued. If - such an early error is found, the function returns -1 and sets - `errno' to one of the following values: +Descriptors and Streams +======================= - `EAGAIN' - The request was not enqueued due to (temporarily) exceeded - resource limitations. + Given an open file descriptor, you can create a stream for it with +the `fdopen' function. You can get the underlying file descriptor for +an existing stream with the `fileno' function. These functions are +declared in the header file `stdio.h'. - `ENOSYS' - The `aio_read' function is not implemented. + - Function: FILE * fdopen (int FILEDES, const char *OPENTYPE) + The `fdopen' function returns a new stream for the file descriptor + FILEDES. - `EBADF' - The `aiocbp->aio_fildes' descriptor is not valid. This - condition need not be recognized before enqueueing the - request and so this error might also be signaled - asynchronously. + The OPENTYPE argument is interpreted in the same way as for the + `fopen' function (*note Opening Streams::), except that the `b' + option is not permitted; this is because GNU makes no distinction + between text and binary files. Also, `"w"' and `"w+"' do not + cause truncation of the file; these have an effect only when + opening a file, and in this case the file has already been opened. + You must make sure that the OPENTYPE argument matches the actual + mode of the open file descriptor. - `EINVAL' - The `aiocbp->aio_offset' or `aiocbp->aio_reqpiro' value is - invalid. This condition need not be recognized before - enqueueing the request and so this error might also be - signaled asynchronously. + The return value is the new stream. If the stream cannot be + created (for example, if the modes for the file indicated by the + file descriptor do not permit the access specified by the OPENTYPE + argument), a null pointer is returned instead. - If `aio_read' returns zero, the current status of the request can - be queried using `aio_error' and `aio_return' functions. As long - as the value returned by `aio_error' is `EINPROGRESS' the - operation has not yet completed. If `aio_error' returns zero, the - operation successfully terminated, otherwise the value is to be - interpreted as an error code. If the function terminated, the - result of the operation can be obtained using a call to - `aio_return'. The returned value is the same as an equivalent - call to `read' would have returned. Possible error codes returned - by `aio_error' are: + In some other systems, `fdopen' may fail to detect that the modes + for file descriptor do not permit the access specified by + `opentype'. The GNU C library always checks for this. - `EBADF' - The `aiocbp->aio_fildes' descriptor is not valid. + For an example showing the use of the `fdopen' function, see *Note +Creating a Pipe::. - `ECANCELED' - The operation was canceled before the operation was finished - (*note Cancel AIO Operations::) + - Function: int fileno (FILE *STREAM) + This function returns the file descriptor associated with the + stream STREAM. If an error is detected (for example, if the STREAM + is not valid) or if STREAM does not do I/O to a file, `fileno' + returns -1. - `EINVAL' - The `aiocbp->aio_offset' value is invalid. + - Function: int fileno_unlocked (FILE *STREAM) + The `fileno_unlocked' function is equivalent to the `fileno' + function except that it does not implicitly lock the stream if the + state is `FSETLOCKING_INTERNAL'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `aio_read64' since the LFS interface - transparently replaces the normal implementation. + This function is a GNU extension. - - Function: int aio_read64 (struct aiocb *AIOCBP) - This function is similar to the `aio_read' function. The only - difference is that on 32 bit machines, the file descriptor should - be opened in the large file mode. Internally, `aio_read64' uses - functionality equivalent to `lseek64' (*note File Position - Primitive::) to position the file descriptor correctly for the - reading, as opposed to `lseek' functionality used in `aio_read'. + There are also symbolic constants defined in `unistd.h' for the file +descriptors belonging to the standard streams `stdin', `stdout', and +`stderr'; see *Note Standard Streams::. - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is available under the name `aio_read' and so - transparently replaces the interface for small files on 32 bit - machines. +`STDIN_FILENO' + This macro has value `0', which is the file descriptor for + standard input. - To write data asynchronously to a file, there exists an equivalent -pair of functions with a very similar interface. +`STDOUT_FILENO' + This macro has value `1', which is the file descriptor for + standard output. - - Function: int aio_write (struct aiocb *AIOCBP) - This function initiates an asynchronous write operation. The - function call immediately returns after the operation was enqueued - or if before this happens an error was encountered. +`STDERR_FILENO' + This macro has value `2', which is the file descriptor for + standard error output. - The first `aiocbp->aio_nbytes' bytes from the buffer starting at - `aiocbp->aio_buf' are written to the file for which - `aiocbp->aio_fildes' is an descriptor, starting at the absolute - position `aiocbp->aio_offset' in the file. + +File: libc.info, Node: Stream/Descriptor Precautions, Next: Scatter-Gather, Prev: Descriptors and Streams, Up: Low-Level I/O - If prioritized I/O is supported by the platform, the - `aiocbp->aio_reqprio' value is used to adjust the priority before - the request is actually enqueued. +Dangers of Mixing Streams and Descriptors +========================================= - The calling process is notified about the termination of the read - request according to the `aiocbp->aio_sigevent' value. + You can have multiple file descriptors and streams (let's call both +streams and descriptors "channels" for short) connected to the same +file, but you must take care to avoid confusion between channels. There +are two cases to consider: "linked" channels that share a single file +position value, and "independent" channels that have their own file +positions. - When `aio_write' returns, the return value is zero if no error - occurred that can be found before the process is enqueued. If - such an early error is found the function returns -1 and sets - `errno' to one of the following values. + It's best to use just one channel in your program for actual data +transfer to any given file, except when all the access is for input. +For example, if you open a pipe (something you can only do at the file +descriptor level), either do all I/O with the descriptor, or construct a +stream from the descriptor with `fdopen' and then do all I/O with the +stream. - `EAGAIN' - The request was not enqueued due to (temporarily) exceeded - resource limitations. +* Menu: - `ENOSYS' - The `aio_write' function is not implemented. +* Linked Channels:: Dealing with channels sharing a file position. +* Independent Channels:: Dealing with separately opened, unlinked channels. +* Cleaning Streams:: Cleaning a stream makes it safe to use + another channel. - `EBADF' - The `aiocbp->aio_fildes' descriptor is not valid. This - condition may not be recognized before enqueueing the - request, and so this error might also be signaled - asynchronously. + +File: libc.info, Node: Linked Channels, Next: Independent Channels, Up: Stream/Descriptor Precautions - `EINVAL' - The `aiocbp->aio_offset' or `aiocbp->aio_reqprio' value is - invalid. This condition may not be recognized before - enqueueing the request and so this error might also be - signaled asynchronously. +Linked Channels +--------------- - In the case `aio_write' returns zero, the current status of the - request can be queried using `aio_error' and `aio_return' - functions. As long as the value returned by `aio_error' is - `EINPROGRESS' the operation has not yet completed. If `aio_error' - returns zero, the operation successfully terminated, otherwise the - value is to be interpreted as an error code. If the function - terminated, the result of the operation can be get using a call to - `aio_return'. The returned value is the same as an equivalent - call to `read' would have returned. Possible error codes returned - by `aio_error' are: + Channels that come from a single opening share the same file +position; we call them "linked" channels. Linked channels result when +you make a stream from a descriptor using `fdopen', when you get a +descriptor from a stream with `fileno', when you copy a descriptor with +`dup' or `dup2', and when descriptors are inherited during `fork'. For +files that don't support random access, such as terminals and pipes, +_all_ channels are effectively linked. On random-access files, all +append-type output streams are effectively linked to each other. - `EBADF' - The `aiocbp->aio_fildes' descriptor is not valid. + If you have been using a stream for I/O, and you want to do I/O using +another channel (either a stream or a descriptor) that is linked to it, +you must first "clean up" the stream that you have been using. *Note +Cleaning Streams::. - `ECANCELED' - The operation was canceled before the operation was finished. - (*note Cancel AIO Operations::) + Terminating a process, or executing a new program in the process, +destroys all the streams in the process. If descriptors linked to these +streams persist in other processes, their file positions become +undefined as a result. To prevent this, you must clean up the streams +before destroying them. - `EINVAL' - The `aiocbp->aio_offset' value is invalid. + +File: libc.info, Node: Independent Channels, Next: Cleaning Streams, Prev: Linked Channels, Up: Stream/Descriptor Precautions - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is in fact `aio_write64' since the LFS interface - transparently replaces the normal implementation. +Independent Channels +-------------------- - - Function: int aio_write64 (struct aiocb *AIOCBP) - This function is similar to the `aio_write' function. The only - difference is that on 32 bit machines the file descriptor should - be opened in the large file mode. Internally `aio_write64' uses - functionality equivalent to `lseek64' (*note File Position - Primitive::) to position the file descriptor correctly for the - writing, as opposed to `lseek' functionality used in `aio_write'. + When you open channels (streams or descriptors) separately on a +seekable file, each channel has its own file position. These are called +"independent channels". - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is available under the name `aio_write' and so - transparently replaces the interface for small files on 32 bit - machines. + The system handles each channel independently. Most of the time, +this is quite predictable and natural (especially for input): each +channel can read or write sequentially at its own place in the file. +However, if some of the channels are streams, you must take these +precautions: - Besides these functions with the more or less traditional interface, -POSIX.1b also defines a function which can initiate more than one -operation at a time, and which can handle freely mixed read and write -operations. It is therefore similar to a combination of `readv' and -`writev'. + * You should clean an output stream after use, before doing anything + else that might read or write from the same part of the file. - - Function: int lio_listio (int MODE, struct aiocb *const LIST[], int - NENT, struct sigevent *SIG) - The `lio_listio' function can be used to enqueue an arbitrary - number of read and write requests at one time. The requests can - all be meant for the same file, all for different files or every - solution in between. + * You should clean an input stream before reading data that may have + been modified using an independent channel. Otherwise, you might + read obsolete data that had been in the stream's buffer. - `lio_listio' gets the NENT requests from the array pointed to by - LIST. The operation to be performed is determined by the - `aio_lio_opcode' member in each element of LIST. If this field is - `LIO_READ' a read operation is enqueued, similar to a call of - `aio_read' for this element of the array (except that the way the - termination is signalled is different, as we will see below). If - the `aio_lio_opcode' member is `LIO_WRITE' a write operation is - enqueued. Otherwise the `aio_lio_opcode' must be `LIO_NOP' in - which case this element of LIST is simply ignored. This - "operation" is useful in situations where one has a fixed array of - `struct aiocb' elements from which only a few need to be handled at - a time. Another situation is where the `lio_listio' call was - canceled before all requests are processed (*note Cancel AIO - Operations::) and the remaining requests have to be reissued. + If you do output to one channel at the end of the file, this will +certainly leave the other independent channels positioned somewhere +before the new end. You cannot reliably set their file positions to the +new end of file before writing, because the file can always be extended +by another process between when you set the file position and when you +write the data. Instead, use an append-type descriptor or stream; they +always output at the current end of the file. In order to make the +end-of-file position accurate, you must clean the output channel you +were using, if it is a stream. - The other members of each element of the array pointed to by - `list' must have values suitable for the operation as described in - the documentation for `aio_read' and `aio_write' above. + It's impossible for two channels to have separate file pointers for a +file that doesn't support random access. Thus, channels for reading or +writing such files are always linked, never independent. Append-type +channels are also always linked. For these channels, follow the rules +for linked channels; see *Note Linked Channels::. - The MODE argument determines how `lio_listio' behaves after having - enqueued all the requests. If MODE is `LIO_WAIT' it waits until - all requests terminated. Otherwise MODE must be `LIO_NOWAIT' and - in this case the function returns immediately after having - enqueued all the requests. In this case the caller gets a - notification of the termination of all requests according to the - SIG parameter. If SIG is `NULL' no notification is send. - Otherwise a signal is sent or a thread is started, just as - described in the description for `aio_read' or `aio_write'. + +File: libc.info, Node: Cleaning Streams, Prev: Independent Channels, Up: Stream/Descriptor Precautions - If MODE is `LIO_WAIT', the return value of `lio_listio' is 0 when - all requests completed successfully. Otherwise the function - return -1 and `errno' is set accordingly. To find out which - request or requests failed one has to use the `aio_error' function - on all the elements of the array LIST. +Cleaning Streams +---------------- - In case MODE is `LIO_NOWAIT', the function returns 0 if all - requests were enqueued correctly. The current state of the - requests can be found using `aio_error' and `aio_return' as - described above. If `lio_listio' returns -1 in this mode, the - global variable `errno' is set accordingly. If a request did not - yet terminate, a call to `aio_error' returns `EINPROGRESS'. If - the value is different, the request is finished and the error - value (or 0) is returned and the result of the operation can be - retrieved using `aio_return'. + On the GNU system, you can clean up any stream with `fclean': - Possible values for `errno' are: + - Function: int fclean (FILE *STREAM) + Clean up the stream STREAM so that its buffer is empty. If STREAM + is doing output, force it out. If STREAM is doing input, give the + data in the buffer back to the system, arranging to reread it. - `EAGAIN' - The resources necessary to queue all the requests are not - available at the moment. The error status for each element - of LIST must be checked to determine which request failed. + On other systems, you can use `fflush' to clean a stream in most +cases. - Another reason could be that the system wide limit of AIO - requests is exceeded. This cannot be the case for the - implementation on GNU systems since no arbitrary limits exist. + You can skip the `fclean' or `fflush' if you know the stream is +already clean. A stream is clean whenever its buffer is empty. For +example, an unbuffered stream is always clean. An input stream that is +at end-of-file is clean. A line-buffered stream is clean when the last +character output was a newline. - `EINVAL' - The MODE parameter is invalid or NENT is larger than - `AIO_LISTIO_MAX'. + There is one case in which cleaning a stream is impossible on most +systems. This is when the stream is doing input from a file that is not +random-access. Such streams typically read ahead, and when the file is +not random access, there is no way to give back the excess data already +read. When an input stream reads from a random-access file, `fflush' +does clean the stream, but leaves the file pointer at an unpredictable +place; you must set the file pointer before doing any further I/O. On +the GNU system, using `fclean' avoids both of these problems. - `EIO' - One or more of the request's I/O operations failed. The - error status of each request should be checked to determine - which one failed. + Closing an output-only stream also does `fflush', so this is a valid +way of cleaning an output stream. On the GNU system, closing an input +stream does `fclean'. - `ENOSYS' - The `lio_listio' function is not supported. + You need not clean a stream before using its descriptor for control +operations such as setting terminal modes; these operations don't affect +the file position and are not affected by it. You can use any +descriptor for these operations, and all channels are affected +simultaneously. However, text already "output" to a stream but still +buffered by the stream will be subject to the new terminal modes when +subsequently flushed. To make sure "past" output is covered by the +terminal settings that were in effect at the time, flush the output +streams for that terminal before setting the modes. *Note Terminal +Modes::. - If the MODE parameter is `LIO_NOWAIT' and the caller cancels a - request, the error status for this request returned by `aio_error' - is `ECANCELED'. + +File: libc.info, Node: Scatter-Gather, Next: Memory-mapped I/O, Prev: Stream/Descriptor Precautions, Up: Low-Level I/O - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is in fact `lio_listio64' since the LFS interface - transparently replaces the normal implementation. +Fast Scatter-Gather I/O +======================= - - Function: int lio_listio64 (int MODE, struct aiocb *const LIST, int - NENT, struct sigevent *SIG) - This function is similar to the `lio_listio' function. The only - difference is that on 32 bit machines, the file descriptor should - be opened in the large file mode. Internally, `lio_listio64' uses - functionality equivalent to `lseek64' (*note File Position - Primitive::) to position the file descriptor correctly for the - reading or writing, as opposed to `lseek' functionality used in - `lio_listio'. + Some applications may need to read or write data to multiple buffers, +which are separated in memory. Although this can be done easily enough +with multiple calls to `read' and `write', it is inefficient because +there is overhead associated with each kernel call. - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is available under the name `lio_listio' and so - transparently replaces the interface for small files on 32 bit - machines. + Instead, many platforms provide special high-speed primitives to +perform these "scatter-gather" operations in a single kernel call. The +GNU C library will provide an emulation on any system that lacks these +primitives, so they are not a portability threat. They are defined in +`sys/uio.h'. - -File: libc.info, Node: Status of AIO Operations, Next: Synchronizing AIO Operations, Prev: Asynchronous Reads/Writes, Up: Asynchronous I/O + These functions are controlled with arrays of `iovec' structures, +which describe the location and size of each buffer. -Getting the Status of AIO Operations ------------------------------------- + - Data Type: struct iovec + The `iovec' structure describes a buffer. It contains two fields: - As already described in the documentation of the functions in the -last section, it must be possible to get information about the status -of an I/O request. When the operation is performed truly -asynchronously (as with `aio_read' and `aio_write' and with -`lio_listio' when the mode is `LIO_NOWAIT'), one sometimes needs to -know whether a specific request already terminated and if so, what the -result was. The following two functions allow you to get this kind of -information. + `void *iov_base' + Contains the address of a buffer. - - Function: int aio_error (const struct aiocb *AIOCBP) - This function determines the error state of the request described - by the `struct aiocb' variable pointed to by AIOCBP. If the - request has not yet terminated the value returned is always - `EINPROGRESS'. Once the request has terminated the value - `aio_error' returns is either 0 if the request completed - successfully or it returns the value which would be stored in the - `errno' variable if the request would have been done using `read', - `write', or `fsync'. + `size_t iov_len' + Contains the length of the buffer. - The function can return `ENOSYS' if it is not implemented. It - could also return `EINVAL' if the AIOCBP parameter does not refer - to an asynchronous operation whose return status is not yet known. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `aio_error64' since the LFS interface - transparently replaces the normal implementation. + - Function: ssize_t readv (int FILEDES, const struct iovec *VECTOR, + int COUNT) + The `readv' function reads data from FILEDES and scatters it into + the buffers described in VECTOR, which is taken to be COUNT + structures long. As each buffer is filled, data is sent to the + next. - - Function: int aio_error64 (const struct aiocb64 *AIOCBP) - This function is similar to `aio_error' with the only difference - that the argument is a reference to a variable of type `struct - aiocb64'. + Note that `readv' is not guaranteed to fill all the buffers. It + may stop at any point, for the same reasons `read' would. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `aio_error' and so - transparently replaces the interface for small files on 32 bit - machines. + The return value is a count of bytes (_not_ buffers) read, 0 + indicating end-of-file, or -1 indicating an error. The possible + errors are the same as in `read'. - - Function: ssize_t aio_return (const struct aiocb *AIOCBP) - This function can be used to retrieve the return status of the - operation carried out by the request described in the variable - pointed to by AIOCBP. As long as the error status of this request - as returned by `aio_error' is `EINPROGRESS' the return of this - function is undefined. - Once the request is finished this function can be used exactly - once to retrieve the return value. Following calls might lead to - undefined behavior. The return value itself is the value which - would have been returned by the `read', `write', or `fsync' call. + - Function: ssize_t writev (int FILEDES, const struct iovec *VECTOR, + int COUNT) + The `writev' function gathers data from the buffers described in + VECTOR, which is taken to be COUNT structures long, and writes + them to `filedes'. As each buffer is written, it moves on to the + next. - The function can return `ENOSYS' if it is not implemented. It - could also return `EINVAL' if the AIOCBP parameter does not refer - to an asynchronous operation whose return status is not yet known. + Like `readv', `writev' may stop midstream under the same + conditions `write' would. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `aio_return64' since the LFS interface - transparently replaces the normal implementation. + The return value is a count of bytes written, or -1 indicating an + error. The possible errors are the same as in `write'. - - Function: int aio_return64 (const struct aiocb64 *AIOCBP) - This function is similar to `aio_return' with the only difference - that the argument is a reference to a variable of type `struct - aiocb64'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `aio_return' and so - transparently replaces the interface for small files on 32 bit - machines. + Note that if the buffers are small (under about 1kB), high-level +streams may be easier to use than these functions. However, `readv' and +`writev' are more efficient when the individual buffers themselves (as +opposed to the total output), are large. In that case, a high-level +stream would not be able to cache the data effectively. diff -durpN glibc-2.2.4/manual/libc.info-22 glibc-2.2.5/manual/libc.info-22 --- glibc-2.2.4/manual/libc.info-22 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-22 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1188 +33,1070 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Synchronizing AIO Operations, Next: Cancel AIO Operations, Prev: Status of AIO Operations, Up: Asynchronous I/O - -Getting into a Consistent State -------------------------------- - - When dealing with asynchronous operations it is sometimes necessary -to get into a consistent state. This would mean for AIO that one wants -to know whether a certain request or a group of request were processed. -This could be done by waiting for the notification sent by the system -after the operation terminated, but this sometimes would mean wasting -resources (mainly computation time). Instead POSIX.1b defines two -functions which will help with most kinds of consistency. - - The `aio_fsync' and `aio_fsync64' functions are only available if -the symbol `_POSIX_SYNCHRONIZED_IO' is defined in `unistd.h'. - - - Function: int aio_fsync (int OP, struct aiocb *AIOCBP) - Calling this function forces all I/O operations operating queued - at the time of the function call operating on the file descriptor - `aiocbp->aio_fildes' into the synchronized I/O completion state - (*note Synchronizing I/O::). The `aio_fsync' function returns - immediately but the notification through the method described in - `aiocbp->aio_sigevent' will happen only after all requests for this - file descriptor have terminated and the file is synchronized. - This also means that requests for this very same file descriptor - which are queued after the synchronization request are not - affected. - - If OP is `O_DSYNC' the synchronization happens as with a call to - `fdatasync'. Otherwise OP should be `O_SYNC' and the - synchronization happens as with `fsync'. - - As long as the synchronization has not happened, a call to - `aio_error' with the reference to the object pointed to by AIOCBP - returns `EINPROGRESS'. Once the synchronization is done - `aio_error' return 0 if the synchronization was not successful. - Otherwise the value returned is the value to which the `fsync' or - `fdatasync' function would have set the `errno' variable. In this - case nothing can be assumed about the consistency for the data - written to this file descriptor. +File: libc.info, Node: Memory-mapped I/O, Next: Waiting for I/O, Prev: Scatter-Gather, Up: Low-Level I/O - The return value of this function is 0 if the request was - successfully enqueued. Otherwise the return value is -1 and - `errno' is set to one of the following values: +Memory-mapped I/O +================= - `EAGAIN' - The request could not be enqueued due to temporary lack of - resources. + On modern operating systems, it is possible to "mmap" (pronounced +"em-map") a file to a region of memory. When this is done, the file can +be accessed just like an array in the program. - `EBADF' - The file descriptor `aiocbp->aio_fildes' is not valid or not - open for writing. + This is more efficient than `read' or `write', as only the regions +of the file that a program actually accesses are loaded. Accesses to +not-yet-loaded parts of the mmapped region are handled in the same way +as swapped out pages. - `EINVAL' - The implementation does not support I/O synchronization or - the OP parameter is other than `O_DSYNC' and `O_SYNC'. + Since mmapped pages can be stored back to their file when physical +memory is low, it is possible to mmap files orders of magnitude larger +than both the physical memory _and_ swap space. The only limit is +address space. The theoretical limit is 4GB on a 32-bit machine - +however, the actual limit will be smaller since some areas will be +reserved for other purposes. If the LFS interface is used the file size +on 32-bit systems is not limited to 2GB (offsets are signed which +reduces the addressable area of 4GB by half); the full 64-bit are +available. - `ENOSYS' - This function is not implemented. + Memory mapping only works on entire pages of memory. Thus, addresses +for mapping must be page-aligned, and length values will be rounded up. +To determine the size of a page the machine uses one should use - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `aio_return64' since the LFS interface - transparently replaces the normal implementation. + size_t page_size = (size_t) sysconf (_SC_PAGESIZE); - - Function: int aio_fsync64 (int OP, struct aiocb64 *AIOCBP) - This function is similar to `aio_fsync' with the only difference - that the argument is a reference to a variable of type `struct - aiocb64'. +These functions are declared in `sys/mman.h'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `aio_fsync' and so - transparently replaces the interface for small files on 32 bit - machines. + - Function: void * mmap (void *ADDRESS, size_t LENGTH,int PROTECT, int + FLAGS, int FILEDES, off_t OFFSET) + The `mmap' function creates a new mapping, connected to bytes + (OFFSET) to (OFFSET + LENGTH - 1) in the file open on FILEDES. A + new reference for the file specified by FILEDES is created, which + is not removed by closing the file. - Another method of synchronization is to wait until one or more -requests of a specific set terminated. This could be achieved by the -`aio_*' functions to notify the initiating process about the -termination but in some situations this is not the ideal solution. In -a program which constantly updates clients somehow connected to the -server it is not always the best solution to go round robin since some -connections might be slow. On the other hand letting the `aio_*' -function notify the caller might also be not the best solution since -whenever the process works on preparing data for on client it makes no -sense to be interrupted by a notification since the new client will not -be handled before the current client is served. For situations like -this `aio_suspend' should be used. + ADDRESS gives a preferred starting address for the mapping. + `NULL' expresses no preference. Any previous mapping at that + address is automatically removed. The address you give may still be + changed, unless you use the `MAP_FIXED' flag. - - Function: int aio_suspend (const struct aiocb *const LIST[], int - NENT, const struct timespec *TIMEOUT) - When calling this function, the calling thread is suspended until - at least one of the requests pointed to by the NENT elements of the - array LIST has completed. If any of the requests has already - completed at the time `aio_suspend' is called, the function returns - immediately. Whether a request has terminated or not is - determined by comparing the error status of the request with - `EINPROGRESS'. If an element of LIST is `NULL', the entry is - simply ignored. + PROTECT contains flags that control what kind of access is + permitted. They include `PROT_READ', `PROT_WRITE', and + `PROT_EXEC', which permit reading, writing, and execution, + respectively. Inappropriate access will cause a segfault (*note + Program Error Signals::). - If no request has finished, the calling process is suspended. If - TIMEOUT is `NULL', the process is not woken until a request has - finished. If TIMEOUT is not `NULL', the process remains suspended - at least as long as specified in TIMEOUT. In this case, - `aio_suspend' returns with an error. + Note that most hardware designs cannot support write permission + without read permission, and many do not distinguish read and + execute permission. Thus, you may receive wider permissions than + you ask for, and mappings of write-only files may be denied even + if you do not use `PROT_READ'. - The return value of the function is 0 if one or more requests from - the LIST have terminated. Otherwise the function returns -1 and - `errno' is set to one of the following values: + FLAGS contains flags that control the nature of the map. One of + `MAP_SHARED' or `MAP_PRIVATE' must be specified. - `EAGAIN' - None of the requests from the LIST completed in the time - specified by TIMEOUT. + They include: - `EINTR' - A signal interrupted the `aio_suspend' function. This signal - might also be sent by the AIO implementation while signalling - the termination of one of the requests. + `MAP_PRIVATE' + This specifies that writes to the region should never be + written back to the attached file. Instead, a copy is made + for the process, and the region will be swapped normally if + memory runs low. No other process will see the changes. - `ENOSYS' - The `aio_suspend' function is not implemented. + Since private mappings effectively revert to ordinary memory + when written to, you must have enough virtual memory for a + copy of the entire mmapped region if you use this mode with + `PROT_WRITE'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `aio_suspend64' since the LFS interface - transparently replaces the normal implementation. + `MAP_SHARED' + This specifies that writes to the region will be written back + to the file. Changes made will be shared immediately with + other processes mmaping the same file. - - Function: int aio_suspend64 (const struct aiocb64 *const LIST[], int - NENT, const struct timespec *TIMEOUT) - This function is similar to `aio_suspend' with the only difference - that the argument is a reference to a variable of type `struct - aiocb64'. + Note that actual writing may take place at any time. You + need to use `msync', described below, if it is important that + other processes using conventional I/O get a consistent view + of the file. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `aio_suspend' and so - transparently replaces the interface for small files on 32 bit - machines. + `MAP_FIXED' + This forces the system to use the exact mapping address + specified in ADDRESS and fail if it can't. - -File: libc.info, Node: Cancel AIO Operations, Next: Configuration of AIO, Prev: Synchronizing AIO Operations, Up: Asynchronous I/O + `MAP_ANONYMOUS' + `MAP_ANON' + This flag tells the system to create an anonymous mapping, + not connected to a file. FILEDES and OFF are ignored, and + the region is initialized with zeros. -Cancellation of AIO Operations ------------------------------- + Anonymous maps are used as the basic primitive to extend the + heap on some systems. They are also useful to share data + between multiple tasks without creating a file. - When one or more requests are asynchronously processed, it might be -useful in some situations to cancel a selected operation, e.g., if it -becomes obvious that the written data is no longer accurate and would -have to be overwritten soon. As an example, assume an application, -which writes data in files in a situation where new incoming data would -have to be written in a file which will be updated by an enqueued -request. The POSIX AIO implementation provides such a function, but -this function is not capable of forcing the cancellation of the -request. It is up to the implementation to decide whether it is -possible to cancel the operation or not. Therefore using this function -is merely a hint. + On some systems using private anonymous mmaps is more + efficient than using `malloc' for large blocks. This is not + an issue with the GNU C library, as the included `malloc' + automatically uses `mmap' where appropriate. - - Function: int aio_cancel (int FILDES, struct aiocb *AIOCBP) - The `aio_cancel' function can be used to cancel one or more - outstanding requests. If the AIOCBP parameter is `NULL', the - function tries to cancel all of the outstanding requests which - would process the file descriptor FILDES (i.e., whose `aio_fildes' - member is FILDES). If AIOCBP is not `NULL', `aio_cancel' attempts - to cancel the specific request pointed to by AIOCBP. + `mmap' returns the address of the new mapping, or -1 for an error. - For requests which were successfully canceled, the normal - notification about the termination of the request should take - place. I.e., depending on the `struct sigevent' object which - controls this, nothing happens, a signal is sent or a thread is - started. If the request cannot be canceled, it terminates the - usual way after performing the operation. + Possible errors include: - After a request is successfully canceled, a call to `aio_error' - with a reference to this request as the parameter will return - `ECANCELED' and a call to `aio_return' will return -1. If the - request wasn't canceled and is still running the error status is - still `EINPROGRESS'. + `EINVAL' + Either ADDRESS was unusable, or inconsistent FLAGS were given. - The return value of the function is `AIO_CANCELED' if there were - requests which haven't terminated and which were successfully - canceled. If there is one or more requests left which couldn't be - canceled, the return value is `AIO_NOTCANCELED'. In this case - `aio_error' must be used to find out which of the, perhaps - multiple, requests (in AIOCBP is `NULL') weren't successfully - canceled. If all requests already terminated at the time - `aio_cancel' is called the return value is `AIO_ALLDONE'. + `EACCES' + FILEDES was not open for the type of access specified in + PROTECT. - If an error occurred during the execution of `aio_cancel' the - function returns -1 and sets `errno' to one of the following - values. + `ENOMEM' + Either there is not enough memory for the operation, or the + process is out of address space. - `EBADF' - The file descriptor FILDES is not valid. + `ENODEV' + This file is of a type that doesn't support mapping. - `ENOSYS' - `aio_cancel' is not implemented. + `ENOEXEC' + The file is on a filesystem that doesn't support mapping. - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is in fact `aio_cancel64' since the LFS interface - transparently replaces the normal implementation. - - Function: int aio_cancel64 (int FILDES, struct aiocb64 *AIOCBP) - This function is similar to `aio_cancel' with the only difference - that the argument is a reference to a variable of type `struct - aiocb64'. + - Function: void * mmap64 (void *ADDRESS, size_t LENGTH,int PROTECT, + int FLAGS, int FILEDES, off64_t OFFSET) + The `mmap64' function is equivalent to the `mmap' function but the + OFFSET parameter is of type `off64_t'. On 32-bit systems this + allows the file associated with the FILEDES descriptor to be + larger than 2GB. FILEDES must be a descriptor returned from a + call to `open64' or `fopen64' and `freopen64' where the descriptor + is retrieved with `fileno'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64', this - function is available under the name `aio_cancel' and so - transparently replaces the interface for small files on 32 bit - machines. + When the sources are translated with `_FILE_OFFSET_BITS == 64' this + function is actually available under the name `mmap'. I.e., the + new, extended API using 64 bit file sizes and offsets transparently + replaces the old API. - -File: libc.info, Node: Configuration of AIO, Prev: Cancel AIO Operations, Up: Asynchronous I/O + - Function: int munmap (void *ADDR, size_t LENGTH) + `munmap' removes any memory maps from (ADDR) to (ADDR + LENGTH). + LENGTH should be the length of the mapping. -How to optimize the AIO implementation --------------------------------------- + It is safe to unmap multiple mappings in one command, or include + unmapped space in the range. It is also possible to unmap only + part of an existing mapping. However, only entire pages can be + removed. If LENGTH is not an even number of pages, it will be + rounded up. - The POSIX standard does not specify how the AIO functions are -implemented. They could be system calls, but it is also possible to -emulate them at userlevel. + It returns 0 for success and -1 for an error. - At the point of this writing, the available implementation is a -userlevel implementation which uses threads for handling the enqueued -requests. While this implementation requires making some decisions -about limitations, hard limitations are something which is best avoided -in the GNU C library. Therefore, the GNU C library provides a means -for tuning the AIO implementation according to the individual use. + One error is possible: - - Data Type: struct aioinit - This data type is used to pass the configuration or tunable - parameters to the implementation. The program has to initialize - the members of this struct and pass it to the implementation using - the `aio_init' function. + `EINVAL' + The memory range given was outside the user mmap range or + wasn't page aligned. - `int aio_threads' - This member specifies the maximal number of threads which may - be used at any one time. - `int aio_num' - This number provides an estimate on the maximal number of - simultaneously enqueued requests. + - Function: int msync (void *ADDRESS, size_t LENGTH, int FLAGS) + When using shared mappings, the kernel can write the file at any + time before the mapping is removed. To be certain data has + actually been written to the file and will be accessible to + non-memory-mapped I/O, it is necessary to use this function. - `int aio_locks' - Unused. + It operates on the region ADDRESS to (ADDRESS + LENGTH). It may + be used on part of a mapping or multiple mappings, however the + region given should not contain any unmapped space. - `int aio_usedba' - Unused. + FLAGS can contain some options: - `int aio_debug' - Unused. + `MS_SYNC' + This flag makes sure the data is actually written _to disk_. + Normally `msync' only makes sure that accesses to a file with + conventional I/O reflect the recent changes. - `int aio_numusers' - Unused. + `MS_ASYNC' + This tells `msync' to begin the synchronization, but not to + wait for it to complete. - `int aio_reserved[2]' - Unused. + `msync' returns 0 for success and -1 for error. Errors include: - - Function: void aio_init (const struct aioinit *INIT) - This function must be called before any other AIO function. - Calling it is completely voluntary, as it is only meant to help - the AIO implementation perform better. + `EINVAL' + An invalid region was given, or the FLAGS were invalid. - Before calling the `aio_init', function the members of a variable - of type `struct aioinit' must be initialized. Then a reference to - this variable is passed as the parameter to `aio_init' which itself - may or may not pay attention to the hints. + `EFAULT' + There is no existing mapping in at least part of the given + region. - The function has no return value and no error cases are defined. - It is a extension which follows a proposal from the SGI - implementation in Irix 6. It is not covered by POSIX.1b or Unix98. - -File: libc.info, Node: Control Operations, Next: Duplicating Descriptors, Prev: Asynchronous I/O, Up: Low-Level I/O + - Function: void * mremap (void *ADDRESS, size_t LENGTH, size_t + NEW_LENGTH, int FLAG) + This function can be used to change the size of an existing memory + area. ADDRESS and LENGTH must cover a region entirely mapped in + the same `mmap' statement. A new mapping with the same + characteristics will be returned with the length NEW_LENGTH. -Control Operations on Files -=========================== + One option is possible, `MREMAP_MAYMOVE'. If it is given in FLAGS, + the system may remove the existing mapping and create a new one of + the desired length in another location. - This section describes how you can perform various other operations -on file descriptors, such as inquiring about or setting flags describing -the status of the file descriptor, manipulating record locks, and the -like. All of these operations are performed by the function `fcntl'. + The address of the resulting mapping is returned, or -1. Possible + error codes include: - The second argument to the `fcntl' function is a command that -specifies which operation to perform. The function and macros that name -various flags that are used with it are declared in the header file -`fcntl.h'. Many of these flags are also used by the `open' function; -see *Note Opening and Closing Files::. + `EFAULT' + There is no existing mapping in at least part of the original + region, or the region covers two or more distinct mappings. - - Function: int fcntl (int FILEDES, int COMMAND, ...) - The `fcntl' function performs the operation specified by COMMAND - on the file descriptor FILEDES. Some commands require additional - arguments to be supplied. These additional arguments and the - return value and error conditions are given in the detailed - descriptions of the individual commands. + `EINVAL' + The address given is misaligned or inappropriate. - Briefly, here is a list of what the various commands are. + `EAGAIN' + The region has pages locked, and if extended it would exceed + the process's resource limit for locked pages. *Note Limits + on Resources::. - `F_DUPFD' - Duplicate the file descriptor (return another file descriptor - pointing to the same open file). *Note Duplicating - Descriptors::. + `ENOMEM' + The region is private writable, and insufficient virtual + memory is available to extend it. Also, this error will + occur if `MREMAP_MAYMOVE' is not given and the extension + would collide with another mapped region. - `F_GETFD' - Get flags associated with the file descriptor. *Note - Descriptor Flags::. - `F_SETFD' - Set flags associated with the file descriptor. *Note - Descriptor Flags::. + This function is only available on a few systems. Except for +performing optional optimizations one should not rely on this function. - `F_GETFL' - Get flags associated with the open file. *Note File Status - Flags::. + Not all file descriptors may be mapped. Sockets, pipes, and most +devices only allow sequential access and do not fit into the mapping +abstraction. In addition, some regular files may not be mmapable, and +older kernels may not support mapping at all. Thus, programs using +`mmap' should have a fallback method to use should it fail. *Note Mmap: +(standards)Mmap. - `F_SETFL' - Set flags associated with the open file. *Note File Status - Flags::. + - Function: int madvise (void *ADDR, size_t LENGTH, int ADVICE) + This function can be used to provide the system with ADVICE about + the intended usage patterns of the memory region starting at ADDR + and extending LENGTH bytes. - `F_GETLK' - Get a file lock. *Note File Locks::. + The valid BSD values for ADVICE are: - `F_SETLK' - Set or clear a file lock. *Note File Locks::. + `MADV_NORMAL' + The region should receive no further special treatment. - `F_SETLKW' - Like `F_SETLK', but wait for completion. *Note File Locks::. + `MADV_RANDOM' + The region will be accessed via random page references. The + kernel should page-in the minimal number of pages for each + page fault. - `F_GETOWN' - Get process or process group ID to receive `SIGIO' signals. - *Note Interrupt Input::. + `MADV_SEQUENTIAL' + The region will be accessed via sequential page references. + This may cause the kernel to aggressively read-ahead, + expecting further sequential references after any page fault + within this region. - `F_SETOWN' - Set process or process group ID to receive `SIGIO' signals. - *Note Interrupt Input::. + `MADV_WILLNEED' + The region will be needed. The pages within this region may + be pre-faulted in by the kernel. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `fcntl' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `fcntl' should be protected using cancellation handlers. + `MADV_DONTNEED' + The region is no longer needed. The kernel may free these + pages, causing any changes to the pages to be lost, as well + as swapped out pages to be discarded. - -File: libc.info, Node: Duplicating Descriptors, Next: Descriptor Flags, Prev: Control Operations, Up: Low-Level I/O + The POSIX names are slightly different, but with the same meanings: -Duplicating Descriptors -======================= + `POSIX_MADV_NORMAL' + This corresponds with BSD's `MADV_NORMAL'. - You can "duplicate" a file descriptor, or allocate another file -descriptor that refers to the same open file as the original. Duplicate -descriptors share one file position and one set of file status flags -(*note File Status Flags::), but each has its own set of file descriptor -flags (*note Descriptor Flags::). + `POSIX_MADV_RANDOM' + This corresponds with BSD's `MADV_RANDOM'. - The major use of duplicating a file descriptor is to implement -"redirection" of input or output: that is, to change the file or pipe -that a particular file descriptor corresponds to. + `POSIX_MADV_SEQUENTIAL' + This corresponds with BSD's `MADV_SEQUENTIAL'. - You can perform this operation using the `fcntl' function with the -`F_DUPFD' command, but there are also convenient functions `dup' and -`dup2' for duplicating descriptors. + `POSIX_MADV_WILLNEED' + This corresponds with BSD's `MADV_WILLNEED'. - The `fcntl' function and flags are declared in `fcntl.h', while -prototypes for `dup' and `dup2' are in the header file `unistd.h'. + `POSIX_MADV_DONTNEED' + This corresponds with BSD's `MADV_DONTNEED'. - - Function: int dup (int OLD) - This function copies descriptor OLD to the first available - descriptor number (the first number not currently open). It is - equivalent to `fcntl (OLD, F_DUPFD, 0)'. + `msync' returns 0 for success and -1 for error. Errors include: + `EINVAL' + An invalid region was given, or the ADVICE was invalid. - - Function: int dup2 (int OLD, int NEW) - This function copies the descriptor OLD to descriptor number NEW. + `EFAULT' + There is no existing mapping in at least part of the given + region. - If OLD is an invalid descriptor, then `dup2' does nothing; it does - not close NEW. Otherwise, the new duplicate of OLD replaces any - previous meaning of descriptor NEW, as if NEW were closed first. - If OLD and NEW are different numbers, and OLD is a valid - descriptor number, then `dup2' is equivalent to: + +File: libc.info, Node: Waiting for I/O, Next: Synchronizing I/O, Prev: Memory-mapped I/O, Up: Low-Level I/O - close (NEW); - fcntl (OLD, F_DUPFD, NEW) +Waiting for Input or Output +=========================== - However, `dup2' does this atomically; there is no instant in the - middle of calling `dup2' at which NEW is closed and not yet a - duplicate of OLD. + Sometimes a program needs to accept input on multiple input channels +whenever input arrives. For example, some workstations may have devices +such as a digitizing tablet, function button box, or dial box that are +connected via normal asynchronous serial interfaces; good user interface +style requires responding immediately to input on any device. Another +example is a program that acts as a server to several other processes +via pipes or sockets. - - Macro: int F_DUPFD - This macro is used as the COMMAND argument to `fcntl', to copy the - file descriptor given as the first argument. + You cannot normally use `read' for this purpose, because this blocks +the program until input is available on one particular file descriptor; +input on other channels won't wake it up. You could set nonblocking +mode and poll each file descriptor in turn, but this is very +inefficient. - The form of the call in this case is: + A better solution is to use the `select' function. This blocks the +program until input or output is ready on a specified set of file +descriptors, or until a timer expires, whichever comes first. This +facility is declared in the header file `sys/types.h'. - fcntl (OLD, F_DUPFD, NEXT-FILEDES) + In the case of a server socket (*note Listening::), we say that +"input" is available when there are pending connections that could be +accepted (*note Accepting Connections::). `accept' for server sockets +blocks and interacts with `select' just as `read' does for normal input. - The NEXT-FILEDES argument is of type `int' and specifies that the - file descriptor returned should be the next available one greater - than or equal to this value. + The file descriptor sets for the `select' function are specified as +`fd_set' objects. Here is the description of the data type and some +macros for manipulating these objects. - The return value from `fcntl' with this command is normally the - value of the new file descriptor. A return value of -1 indicates - an error. The following `errno' error conditions are defined for - this command: + - Data Type: fd_set + The `fd_set' data type represents file descriptor sets for the + `select' function. It is actually a bit array. - `EBADF' - The OLD argument is invalid. + - Macro: int FD_SETSIZE + The value of this macro is the maximum number of file descriptors + that a `fd_set' object can hold information about. On systems + with a fixed maximum number, `FD_SETSIZE' is at least that number. + On some systems, including GNU, there is no absolute limit on the + number of descriptors open, but this macro still has a constant + value which controls the number of bits in an `fd_set'; if you get + a file descriptor with a value as high as `FD_SETSIZE', you cannot + put that descriptor into an `fd_set'. - `EINVAL' - The NEXT-FILEDES argument is invalid. + - Macro: void FD_ZERO (fd_set *SET) + This macro initializes the file descriptor set SET to be the empty + set. - `EMFILE' - There are no more file descriptors available--your program is - already using the maximum. In BSD and GNU, the maximum is - controlled by a resource limit that can be changed; *note - Limits on Resources::, for more information about the - `RLIMIT_NOFILE' limit. + - Macro: void FD_SET (int FILEDES, fd_set *SET) + This macro adds FILEDES to the file descriptor set SET. - `ENFILE' is not a possible error code for `dup2' because `dup2' - does not create a new opening of a file; duplicate descriptors do - not count toward the limit which `ENFILE' indicates. `EMFILE' is - possible because it refers to the limit on distinct descriptor - numbers in use in one process. + - Macro: void FD_CLR (int FILEDES, fd_set *SET) + This macro removes FILEDES from the file descriptor set SET. - Here is an example showing how to use `dup2' to do redirection. -Typically, redirection of the standard streams (like `stdin') is done -by a shell or shell-like program before calling one of the `exec' -functions (*note Executing a File::) to execute a new program in a -child process. When the new program is executed, it creates and -initializes the standard streams to point to the corresponding file -descriptors, before its `main' function is invoked. + - Macro: int FD_ISSET (int FILEDES, fd_set *SET) + This macro returns a nonzero value (true) if FILEDES is a member + of the file descriptor set SET, and zero (false) otherwise. - So, to redirect standard input to a file, the shell could do -something like: + Next, here is the description of the `select' function itself. - pid = fork (); - if (pid == 0) - { - char *filename; - char *program; - int file; - ... - file = TEMP_FAILURE_RETRY (open (filename, O_RDONLY)); - dup2 (file, STDIN_FILENO); - TEMP_FAILURE_RETRY (close (file)); - execv (program, NULL); - } + - Function: int select (int NFDS, fd_set *READ-FDS, fd_set *WRITE-FDS, + fd_set *EXCEPT-FDS, struct timeval *TIMEOUT) + The `select' function blocks the calling process until there is + activity on any of the specified sets of file descriptors, or + until the timeout period has expired. - There is also a more detailed example showing how to implement -redirection in the context of a pipeline of processes in *Note -Launching Jobs::. + The file descriptors specified by the READ-FDS argument are + checked to see if they are ready for reading; the WRITE-FDS file + descriptors are checked to see if they are ready for writing; and + the EXCEPT-FDS file descriptors are checked for exceptional + conditions. You can pass a null pointer for any of these + arguments if you are not interested in checking for that kind of + condition. - -File: libc.info, Node: Descriptor Flags, Next: File Status Flags, Prev: Duplicating Descriptors, Up: Low-Level I/O + A file descriptor is considered ready for reading if it is not at + end of file. A server socket is considered ready for reading if + there is a pending connection which can be accepted with `accept'; + *note Accepting Connections::. A client socket is ready for + writing when its connection is fully established; *note + Connecting::. -File Descriptor Flags -===================== + "Exceptional conditions" does not mean errors--errors are reported + immediately when an erroneous system call is executed, and do not + constitute a state of the descriptor. Rather, they include + conditions such as the presence of an urgent message on a socket. + (*Note Sockets::, for information on urgent messages.) - "File descriptor flags" are miscellaneous attributes of a file -descriptor. These flags are associated with particular file -descriptors, so that if you have created duplicate file descriptors -from a single opening of a file, each descriptor has its own set of -flags. + The `select' function checks only the first NFDS file descriptors. + The usual thing is to pass `FD_SETSIZE' as the value of this + argument. - Currently there is just one file descriptor flag: `FD_CLOEXEC', -which causes the descriptor to be closed if you use any of the -`exec...' functions (*note Executing a File::). + The TIMEOUT specifies the maximum time to wait. If you pass a + null pointer for this argument, it means to block indefinitely + until one of the file descriptors is ready. Otherwise, you should + provide the time in `struct timeval' format; see *Note + High-Resolution Calendar::. Specify zero as the time (a `struct + timeval' containing all zeros) if you want to find out which + descriptors are ready without waiting if none are ready. - The symbols in this section are defined in the header file `fcntl.h'. + The normal return value from `select' is the total number of ready + file descriptors in all of the sets. Each of the argument sets is + overwritten with information about the descriptors that are ready + for the corresponding operation. Thus, to see if a particular + descriptor DESC has input, use `FD_ISSET (DESC, READ-FDS)' after + `select' returns. - - Macro: int F_GETFD - This macro is used as the COMMAND argument to `fcntl', to specify - that it should return the file descriptor flags associated with - the FILEDES argument. + If `select' returns because the timeout period expires, it returns + a value of zero. - The normal return value from `fcntl' with this command is a - nonnegative number which can be interpreted as the bitwise OR of - the individual flags (except that currently there is only one flag - to use). + Any signal will cause `select' to return immediately. So if your + program uses signals, you can't rely on `select' to keep waiting + for the full time specified. If you want to be sure of waiting + for a particular amount of time, you must check for `EINTR' and + repeat the `select' with a newly calculated timeout based on the + current time. See the example below. See also *Note Interrupted + Primitives::. - In case of an error, `fcntl' returns -1. The following `errno' - error conditions are defined for this command: + If an error occurs, `select' returns `-1' and does not modify the + argument file descriptor sets. The following `errno' error + conditions are defined for this function: `EBADF' - The FILEDES argument is invalid. - - - Macro: int F_SETFD - This macro is used as the COMMAND argument to `fcntl', to specify - that it should set the file descriptor flags associated with the - FILEDES argument. This requires a third `int' argument to specify - the new flags, so the form of the call is: - - fcntl (FILEDES, F_SETFD, NEW-FLAGS) + One of the file descriptor sets specified an invalid file + descriptor. - The normal return value from `fcntl' with this command is an - unspecified value other than -1, which indicates an error. The - flags and error conditions are the same as for the `F_GETFD' - command. + `EINTR' + The operation was interrupted by a signal. *Note Interrupted + Primitives::. - The following macro is defined for use as a file descriptor flag with -the `fcntl' function. The value is an integer constant usable as a bit -mask value. + `EINVAL' + The TIMEOUT argument is invalid; one of the components is + negative or too large. - - Macro: int FD_CLOEXEC - This flag specifies that the file descriptor should be closed when - an `exec' function is invoked; see *Note Executing a File::. When - a file descriptor is allocated (as with `open' or `dup'), this bit - is initially cleared on the new file descriptor, meaning that - descriptor will survive into the new program after `exec'. + *Portability Note:* The `select' function is a BSD Unix feature. - If you want to modify the file descriptor flags, you should get the -current flags with `F_GETFD' and modify the value. Don't assume that -the flags listed here are the only ones that are implemented; your -program may be run years from now and more flags may exist then. For -example, here is a function to set or clear the flag `FD_CLOEXEC' -without altering any other flags: + Here is an example showing how you can use `select' to establish a +timeout period for reading from a file descriptor. The `input_timeout' +function blocks the calling process until input is available on the +file descriptor, or until the timeout period expires. - /* Set the `FD_CLOEXEC' flag of DESC if VALUE is nonzero, - or clear the flag if VALUE is 0. - Return 0 on success, or -1 on error with `errno' set. */ + #include + #include + #include + #include int - set_cloexec_flag (int desc, int value) + input_timeout (int filedes, unsigned int seconds) { - int oldflags = fcntl (desc, F_GETFD, 0); - /* If reading the flags failed, return error indication now. - if (oldflags < 0) - return oldflags; - /* Set just the flag we want to set. */ - if (value != 0) - oldflags |= FD_CLOEXEC; - else - oldflags &= ~FD_CLOEXEC; - /* Store modified flag word in the descriptor. */ - return fcntl (desc, F_SETFD, oldflags); + fd_set set; + struct timeval timeout; + + /* Initialize the file descriptor set. */ + FD_ZERO (&set); + FD_SET (filedes, &set); + + /* Initialize the timeout data structure. */ + timeout.tv_sec = seconds; + timeout.tv_usec = 0; + + /* `select' returns 0 if timeout, 1 if input available, -1 if error. */ + return TEMP_FAILURE_RETRY (select (FD_SETSIZE, + &set, NULL, NULL, + &timeout)); + } + + int + main (void) + { + fprintf (stderr, "select returned %d.\n", + input_timeout (STDIN_FILENO, 5)); + return 0; } - -File: libc.info, Node: File Status Flags, Next: File Locks, Prev: Descriptor Flags, Up: Low-Level I/O - -File Status Flags -================= - - "File status flags" are used to specify attributes of the opening of -a file. Unlike the file descriptor flags discussed in *Note Descriptor -Flags::, the file status flags are shared by duplicated file descriptors -resulting from a single opening of the file. The file status flags are -specified with the FLAGS argument to `open'; *note Opening and Closing -Files::. - - File status flags fall into three categories, which are described in -the following sections. - - * *Note Access Modes::, specify what type of access is allowed to the - file: reading, writing, or both. They are set by `open' and are - returned by `fcntl', but cannot be changed. - - * *Note Open-time Flags::, control details of what `open' will do. - These flags are not preserved after the `open' call. - - * *Note Operating Modes::, affect how operations such as `read' and - `write' are done. They are set by `open', and can be fetched or - changed with `fcntl'. - - The symbols in this section are defined in the header file `fcntl.h'. - -* Menu: - -* Access Modes:: Whether the descriptor can read or write. -* Open-time Flags:: Details of `open'. -* Operating Modes:: Special modes to control I/O operations. -* Getting File Status Flags:: Fetching and changing these flags. + There is another example showing the use of `select' to multiplex +input from multiple sockets in *Note Server Example::.  -File: libc.info, Node: Access Modes, Next: Open-time Flags, Up: File Status Flags - -File Access Modes ------------------ +File: libc.info, Node: Synchronizing I/O, Next: Asynchronous I/O, Prev: Waiting for I/O, Up: Low-Level I/O - The file access modes allow a file descriptor to be used for reading, -writing, or both. (In the GNU system, they can also allow none of -these, and allow execution of the file as a program.) The access modes -are chosen when the file is opened, and never change. +Synchronizing I/O operations +============================ - - Macro: int O_RDONLY - Open the file for read access. + In most modern operating systems, the normal I/O operations are not +executed synchronously. I.e., even if a `write' system call returns, +this does not mean the data is actually written to the media, e.g., the +disk. - - Macro: int O_WRONLY - Open the file for write access. + In situations where synchronization points are necessary, you can use +special functions which ensure that all operations finish before they +return. - - Macro: int O_RDWR - Open the file for both reading and writing. + - Function: int sync (void) + A call to this function will not return as long as there is data + which has not been written to the device. All dirty buffers in + the kernel will be written and so an overall consistent system can + be achieved (if no other process in parallel writes data). - In the GNU system (and not in other systems), `O_RDONLY' and -`O_WRONLY' are independent bits that can be bitwise-ORed together, and -it is valid for either bit to be set or clear. This means that -`O_RDWR' is the same as `O_RDONLY|O_WRONLY'. A file access mode of -zero is permissible; it allows no operations that do input or output to -the file, but does allow other operations such as `fchmod'. On the GNU -system, since "read-only" or "write-only" is a misnomer, `fcntl.h' -defines additional names for the file access modes. These names are -preferred when writing GNU-specific code. But most programs will want -to be portable to other POSIX.1 systems and should use the POSIX.1 -names above instead. + A prototype for `sync' can be found in `unistd.h'. - - Macro: int O_READ - Open the file for reading. Same as `O_RDWR'; only defined on GNU. + The return value is zero to indicate no error. - - Macro: int O_WRITE - Open the file for reading. Same as `O_WRONLY'; only defined on - GNU. + Programs more often want to ensure that data written to a given file +is committed, rather than all data in the system. For this, `sync' is +overkill. - - Macro: int O_EXEC - Open the file for executing. Only defined on GNU. + - Function: int fsync (int FILDES) + The `fsync' function can be used to make sure all data associated + with the open file FILDES is written to the device associated with + the descriptor. The function call does not return unless all + actions have finished. - To determine the file access mode with `fcntl', you must extract the -access mode bits from the retrieved file status flags. In the GNU -system, you can just test the `O_READ' and `O_WRITE' bits in the flags -word. But in other POSIX.1 systems, reading and writing access modes -are not stored as distinct bit flags. The portable way to extract the -file access mode bits is with `O_ACCMODE'. + A prototype for `fsync' can be found in `unistd.h'. - - Macro: int O_ACCMODE - This macro stands for a mask that can be bitwise-ANDed with the - file status flag value to produce a value representing the file - access mode. The mode will be `O_RDONLY', `O_WRONLY', or `O_RDWR'. - (In the GNU system it could also be zero, and it never includes the - `O_EXEC' bit.) + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `fsync' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this, calls to + `fsync' should be protected using cancellation handlers. - -File: libc.info, Node: Open-time Flags, Next: Operating Modes, Prev: Access Modes, Up: File Status Flags + The return value of the function is zero if no error occurred. + Otherwise it is -1 and the global variable ERRNO is set to the + following values: + `EBADF' + The descriptor FILDES is not valid. -Open-time Flags ---------------- + `EINVAL' + No synchronization is possible since the system does not + implement this. - The open-time flags specify options affecting how `open' will behave. -These options are not preserved once the file is open. The exception to -this is `O_NONBLOCK', which is also an I/O operating mode and so it -_is_ saved. *Note Opening and Closing Files::, for how to call `open'. + Sometimes it is not even necessary to write all data associated with +a file descriptor. E.g., in database files which do not change in size +it is enough to write all the file content data to the device. +Meta-information, like the modification time etc., are not that +important and leaving such information uncommitted does not prevent a +successful recovering of the file in case of a problem. - There are two sorts of options specified by open-time flags. + - Function: int fdatasync (int FILDES) + When a call to the `fdatasync' function returns, it is ensured + that all of the file data is written to the device. For all + pending I/O operations, the parts guaranteeing data integrity + finished. - * "File name translation flags" affect how `open' looks up the file - name to locate the file, and whether the file can be created. + Not all systems implement the `fdatasync' operation. On systems + missing this functionality `fdatasync' is emulated by a call to + `fsync' since the performed actions are a superset of those + required by `fdatasync'. - * "Open-time action flags" specify extra operations that `open' will - perform on the file once it is open. + The prototype for `fdatasync' is in `unistd.h'. - Here are the file name translation flags. + The return value of the function is zero if no error occurred. + Otherwise it is -1 and the global variable ERRNO is set to the + following values: + `EBADF' + The descriptor FILDES is not valid. - - Macro: int O_CREAT - If set, the file will be created if it doesn't already exist. + `EINVAL' + No synchronization is possible since the system does not + implement this. - - Macro: int O_EXCL - If both `O_CREAT' and `O_EXCL' are set, then `open' fails if the - specified file already exists. This is guaranteed to never - clobber an existing file. + +File: libc.info, Node: Asynchronous I/O, Next: Control Operations, Prev: Synchronizing I/O, Up: Low-Level I/O - - Macro: int O_NONBLOCK - This prevents `open' from blocking for a "long time" to open the - file. This is only meaningful for some kinds of files, usually - devices such as serial ports; when it is not meaningful, it is - harmless and ignored. Often opening a port to a modem blocks - until the modem reports carrier detection; if `O_NONBLOCK' is - specified, `open' will return immediately without a carrier. +Perform I/O Operations in Parallel +================================== - Note that the `O_NONBLOCK' flag is overloaded as both an I/O - operating mode and a file name translation flag. This means that - specifying `O_NONBLOCK' in `open' also sets nonblocking I/O mode; - *note Operating Modes::. To open the file without blocking but do - normal I/O that blocks, you must call `open' with `O_NONBLOCK' set - and then call `fcntl' to turn the bit off. + The POSIX.1b standard defines a new set of I/O operations which can +significantly reduce the time an application spends waiting at I/O. The +new functions allow a program to initiate one or more I/O operations and +then immediately resume normal work while the I/O operations are +executed in parallel. This functionality is available if the +`unistd.h' file defines the symbol `_POSIX_ASYNCHRONOUS_IO'. - - Macro: int O_NOCTTY - If the named file is a terminal device, don't make it the - controlling terminal for the process. *Note Job Control::, for - information about what it means to be the controlling terminal. + These functions are part of the library with realtime functions named +`librt'. They are not actually part of the `libc' binary. The +implementation of these functions can be done using support in the +kernel (if available) or using an implementation based on threads at +userlevel. In the latter case it might be necessary to link +applications with the thread library `libpthread' in addition to +`librt'. - In the GNU system and 4.4 BSD, opening a file never makes it the - controlling terminal and `O_NOCTTY' is zero. However, other - systems may use a nonzero value for `O_NOCTTY' and set the - controlling terminal when you open a file that is a terminal - device; so to be portable, use `O_NOCTTY' when it is important to - avoid this. + All AIO operations operate on files which were opened previously. +There might be arbitrarily many operations running for one file. The +asynchronous I/O operations are controlled using a data structure named +`struct aiocb' ("AIO control block"). It is defined in `aio.h' as +follows. - The following three file name translation flags exist only in the -GNU system. + - Data Type: struct aiocb + The POSIX.1b standard mandates that the `struct aiocb' structure + contains at least the members described in the following table. + There might be more elements which are used by the implementation, + but depending upon these elements is not portable and is highly + deprecated. - - Macro: int O_IGNORE_CTTY - Do not recognize the named file as the controlling terminal, even - if it refers to the process's existing controlling terminal - device. Operations on the new file descriptor will never induce - job control signals. *Note Job Control::. + `int aio_fildes' + This element specifies the file descriptor to be used for the + operation. It must be a legal descriptor, otherwise the + operation will fail. - - Macro: int O_NOLINK - If the named file is a symbolic link, open the link itself instead - of the file it refers to. (`fstat' on the new file descriptor will - return the information returned by `lstat' on the link's name.) + The device on which the file is opened must allow the seek + operation. I.e., it is not possible to use any of the AIO + operations on devices like terminals where an `lseek' call + would lead to an error. - - Macro: int O_NOTRANS - If the named file is specially translated, do not invoke the - translator. Open the bare file the translator itself sees. + `off_t aio_offset' + This element specifies the offset in the file at which the + operation (input or output) is performed. Since the + operations are carried out in arbitrary order and more than + one operation for one file descriptor can be started, one + cannot expect a current read/write position of the file + descriptor. - The open-time action flags tell `open' to do additional operations -which are not really related to opening the file. The reason to do them -as part of `open' instead of in separate calls is that `open' can do -them atomically. + `volatile void *aio_buf' + This is a pointer to the buffer with the data to be written + or the place where the read data is stored. - - Macro: int O_TRUNC - Truncate the file to zero length. This option is only useful for - regular files, not special files such as directories or FIFOs. - POSIX.1 requires that you open the file for writing to use - `O_TRUNC'. In BSD and GNU you must have permission to write the - file to truncate it, but you need not open for write access. + `size_t aio_nbytes' + This element specifies the length of the buffer pointed to by + `aio_buf'. - This is the only open-time action flag specified by POSIX.1. - There is no good reason for truncation to be done by `open', - instead of by calling `ftruncate' afterwards. The `O_TRUNC' flag - existed in Unix before `ftruncate' was invented, and is retained - for backward compatibility. + `int aio_reqprio' + If the platform has defined `_POSIX_PRIORITIZED_IO' and + `_POSIX_PRIORITY_SCHEDULING', the AIO requests are processed + based on the current scheduling priority. The `aio_reqprio' + element can then be used to lower the priority of the AIO + operation. - The remaining operating modes are BSD extensions. They exist only -on some systems. On other systems, these macros are not defined. + `struct sigevent aio_sigevent' + This element specifies how the calling process is notified + once the operation terminates. If the `sigev_notify' element + is `SIGEV_NONE', no notification is sent. If it is + `SIGEV_SIGNAL', the signal determined by `sigev_signo' is + sent. Otherwise, `sigev_notify' must be `SIGEV_THREAD'. In + this case, a thread is created which starts executing the + function pointed to by `sigev_notify_function'. - - Macro: int O_SHLOCK - Acquire a shared lock on the file, as with `flock'. *Note File - Locks::. + `int aio_lio_opcode' + This element is only used by the `lio_listio' and + `lio_listio64' functions. Since these functions allow an + arbitrary number of operations to start at once, and each + operation can be input or output (or nothing), the + information must be stored in the control block. The + possible values are: - If `O_CREAT' is specified, the locking is done atomically when - creating the file. You are guaranteed that no other process will - get the lock on the new file first. + `LIO_READ' + Start a read operation. Read from the file at position + `aio_offset' and store the next `aio_nbytes' bytes in the + buffer pointed to by `aio_buf'. - - Macro: int O_EXLOCK - Acquire an exclusive lock on the file, as with `flock'. *Note - File Locks::. This is atomic like `O_SHLOCK'. + `LIO_WRITE' + Start a write operation. Write `aio_nbytes' bytes + starting at `aio_buf' into the file starting at position + `aio_offset'. - -File: libc.info, Node: Operating Modes, Next: Getting File Status Flags, Prev: Open-time Flags, Up: File Status Flags + `LIO_NOP' + Do nothing for this control block. This value is useful + sometimes when an array of `struct aiocb' values + contains holes, i.e., some of the values must not be + handled although the whole array is presented to the + `lio_listio' function. -I/O Operating Modes -------------------- + When the sources are compiled using `_FILE_OFFSET_BITS == 64' on a + 32 bit machine, this type is in fact `struct aiocb64', since the + LFS interface transparently replaces the `struct aiocb' definition. - The operating modes affect how input and output operations using a -file descriptor work. These flags are set by `open' and can be fetched -and changed with `fcntl'. + For use with the AIO functions defined in the LFS, there is a +similar type defined which replaces the types of the appropriate +members with larger types but otherwise is equivalent to `struct +aiocb'. Particularly, all member names are the same. - - Macro: int O_APPEND - The bit that enables append mode for the file. If set, then all - `write' operations write the data at the end of the file, extending - it, regardless of the current file position. This is the only - reliable way to append to a file. In append mode, you are - guaranteed that the data you write will always go to the current - end of the file, regardless of other processes writing to the - file. Conversely, if you simply set the file position to the end - of file and write, then another process can extend the file after - you set the file position but before you write, resulting in your - data appearing someplace before the real end of file. + - Data Type: struct aiocb64 + `int aio_fildes' + This element specifies the file descriptor which is used for + the operation. It must be a legal descriptor since otherwise + the operation fails for obvious reasons. - - Macro: int O_NONBLOCK - The bit that enables nonblocking mode for the file. If this bit - is set, `read' requests on the file can return immediately with a - failure status if there is no input immediately available, instead - of blocking. Likewise, `write' requests can also return - immediately with a failure status if the output can't be written - immediately. + The device on which the file is opened must allow the seek + operation. I.e., it is not possible to use any of the AIO + operations on devices like terminals where an `lseek' call + would lead to an error. - Note that the `O_NONBLOCK' flag is overloaded as both an I/O - operating mode and a file name translation flag; *note Open-time - Flags::. + `off64_t aio_offset' + This element specifies at which offset in the file the + operation (input or output) is performed. Since the + operation are carried in arbitrary order and more than one + operation for one file descriptor can be started, one cannot + expect a current read/write position of the file descriptor. - - Macro: int O_NDELAY - This is an obsolete name for `O_NONBLOCK', provided for - compatibility with BSD. It is not defined by the POSIX.1 standard. + `volatile void *aio_buf' + This is a pointer to the buffer with the data to be written + or the place where the read data is stored. - The remaining operating modes are BSD and GNU extensions. They -exist only on some systems. On other systems, these macros are not -defined. + `size_t aio_nbytes' + This element specifies the length of the buffer pointed to by + `aio_buf'. - - Macro: int O_ASYNC - The bit that enables asynchronous input mode. If set, then `SIGIO' - signals will be generated when input is available. *Note - Interrupt Input::. + `int aio_reqprio' + If for the platform `_POSIX_PRIORITIZED_IO' and + `_POSIX_PRIORITY_SCHEDULING' are defined the AIO requests are + processed based on the current scheduling priority. The + `aio_reqprio' element can then be used to lower the priority + of the AIO operation. - Asynchronous input mode is a BSD feature. + `struct sigevent aio_sigevent' + This element specifies how the calling process is notified + once the operation terminates. If the `sigev_notify', + element is `SIGEV_NONE' no notification is sent. If it is + `SIGEV_SIGNAL', the signal determined by `sigev_signo' is + sent. Otherwise, `sigev_notify' must be `SIGEV_THREAD' in + which case a thread which starts executing the function + pointed to by `sigev_notify_function'. - - Macro: int O_FSYNC - The bit that enables synchronous writing for the file. If set, - each `write' call will make sure the data is reliably stored on - disk before returning. Synchronous writing is a BSD feature. + `int aio_lio_opcode' + This element is only used by the `lio_listio' and + `[lio_listio64' functions. Since these functions allow an + arbitrary number of operations to start at once, and since + each operation can be input or output (or nothing), the + information must be stored in the control block. See the + description of `struct aiocb' for a description of the + possible values. - - Macro: int O_SYNC - This is another name for `O_FSYNC'. They have the same value. + When the sources are compiled using `_FILE_OFFSET_BITS == 64' on a + 32 bit machine, this type is available under the name `struct + aiocb64', since the LFS transparently replaces the old interface. - - Macro: int O_NOATIME - If this bit is set, `read' will not update the access time of the - file. *Note File Times::. This is used by programs that do - backups, so that backing a file up does not count as reading it. - Only the owner of the file or the superuser may use this bit. +* Menu: - This is a GNU extension. +* Asynchronous Reads/Writes:: Asynchronous Read and Write Operations. +* Status of AIO Operations:: Getting the Status of AIO Operations. +* Synchronizing AIO Operations:: Getting into a consistent state. +* Cancel AIO Operations:: Cancellation of AIO Operations. +* Configuration of AIO:: How to optimize the AIO implementation.  -File: libc.info, Node: Getting File Status Flags, Prev: Operating Modes, Up: File Status Flags - -Getting and Setting File Status Flags -------------------------------------- - - The `fcntl' function can fetch or change file status flags. - - - Macro: int F_GETFL - This macro is used as the COMMAND argument to `fcntl', to read the - file status flags for the open file with descriptor FILEDES. - - The normal return value from `fcntl' with this command is a - nonnegative number which can be interpreted as the bitwise OR of - the individual flags. Since the file access modes are not - single-bit values, you can mask off other bits in the returned - flags with `O_ACCMODE' to compare them. - - In case of an error, `fcntl' returns -1. The following `errno' - error conditions are defined for this command: - - `EBADF' - The FILEDES argument is invalid. - - - Macro: int F_SETFL - This macro is used as the COMMAND argument to `fcntl', to set the - file status flags for the open file corresponding to the FILEDES - argument. This command requires a third `int' argument to specify - the new flags, so the call looks like this: +File: libc.info, Node: Asynchronous Reads/Writes, Next: Status of AIO Operations, Up: Asynchronous I/O - fcntl (FILEDES, F_SETFL, NEW-FLAGS) +Asynchronous Read and Write Operations +-------------------------------------- - You can't change the access mode for the file in this way; that is, - whether the file descriptor was opened for reading or writing. + - Function: int aio_read (struct aiocb *AIOCBP) + This function initiates an asynchronous read operation. It + immediately returns after the operation was enqueued or when an + error was encountered. - The normal return value from `fcntl' with this command is an - unspecified value other than -1, which indicates an error. The - error conditions are the same as for the `F_GETFL' command. + The first `aiocbp->aio_nbytes' bytes of the file for which + `aiocbp->aio_fildes' is a descriptor are written to the buffer + starting at `aiocbp->aio_buf'. Reading starts at the absolute + position `aiocbp->aio_offset' in the file. - If you want to modify the file status flags, you should get the -current flags with `F_GETFL' and modify the value. Don't assume that -the flags listed here are the only ones that are implemented; your -program may be run years from now and more flags may exist then. For -example, here is a function to set or clear the flag `O_NONBLOCK' -without altering any other flags: + If prioritized I/O is supported by the platform the + `aiocbp->aio_reqprio' value is used to adjust the priority before + the request is actually enqueued. - /* Set the `O_NONBLOCK' flag of DESC if VALUE is nonzero, - or clear the flag if VALUE is 0. - Return 0 on success, or -1 on error with `errno' set. */ - - int - set_nonblock_flag (int desc, int value) - { - int oldflags = fcntl (desc, F_GETFL, 0); - /* If reading the flags failed, return error indication now. */ - if (oldflags == -1) - return -1; - /* Set just the flag we want to set. */ - if (value != 0) - oldflags |= O_NONBLOCK; - else - oldflags &= ~O_NONBLOCK; - /* Store modified flag word in the descriptor. */ - return fcntl (desc, F_SETFL, oldflags); - } + The calling process is notified about the termination of the read + request according to the `aiocbp->aio_sigevent' value. - -File: libc.info, Node: File Locks, Next: Interrupt Input, Prev: File Status Flags, Up: Low-Level I/O + When `aio_read' returns, the return value is zero if no error + occurred that can be found before the process is enqueued. If + such an early error is found, the function returns -1 and sets + `errno' to one of the following values: -File Locks -========== + `EAGAIN' + The request was not enqueued due to (temporarily) exceeded + resource limitations. - The remaining `fcntl' commands are used to support "record locking", -which permits multiple cooperating programs to prevent each other from -simultaneously accessing parts of a file in error-prone ways. + `ENOSYS' + The `aio_read' function is not implemented. - An "exclusive" or "write" lock gives a process exclusive access for -writing to the specified part of the file. While a write lock is in -place, no other process can lock that part of the file. + `EBADF' + The `aiocbp->aio_fildes' descriptor is not valid. This + condition need not be recognized before enqueueing the + request and so this error might also be signaled + asynchronously. - A "shared" or "read" lock prohibits any other process from -requesting a write lock on the specified part of the file. However, -other processes can request read locks. + `EINVAL' + The `aiocbp->aio_offset' or `aiocbp->aio_reqpiro' value is + invalid. This condition need not be recognized before + enqueueing the request and so this error might also be + signaled asynchronously. - The `read' and `write' functions do not actually check to see -whether there are any locks in place. If you want to implement a -locking protocol for a file shared by multiple processes, your -application must do explicit `fcntl' calls to request and clear locks -at the appropriate points. + If `aio_read' returns zero, the current status of the request can + be queried using `aio_error' and `aio_return' functions. As long + as the value returned by `aio_error' is `EINPROGRESS' the + operation has not yet completed. If `aio_error' returns zero, the + operation successfully terminated, otherwise the value is to be + interpreted as an error code. If the function terminated, the + result of the operation can be obtained using a call to + `aio_return'. The returned value is the same as an equivalent + call to `read' would have returned. Possible error codes returned + by `aio_error' are: - Locks are associated with processes. A process can only have one -kind of lock set for each byte of a given file. When any file -descriptor for that file is closed by the process, all of the locks -that process holds on that file are released, even if the locks were -made using other descriptors that remain open. Likewise, locks are -released when a process exits, and are not inherited by child processes -created using `fork' (*note Creating a Process::). + `EBADF' + The `aiocbp->aio_fildes' descriptor is not valid. - When making a lock, use a `struct flock' to specify what kind of -lock and where. This data type and the associated macros for the -`fcntl' function are declared in the header file `fcntl.h'. + `ECANCELED' + The operation was canceled before the operation was finished + (*note Cancel AIO Operations::) - - Data Type: struct flock - This structure is used with the `fcntl' function to describe a file - lock. It has these members: + `EINVAL' + The `aiocbp->aio_offset' value is invalid. - `short int l_type' - Specifies the type of the lock; one of `F_RDLCK', `F_WRLCK', - or `F_UNLCK'. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `aio_read64' since the LFS interface + transparently replaces the normal implementation. - `short int l_whence' - This corresponds to the WHENCE argument to `fseek' or - `lseek', and specifies what the offset is relative to. Its - value can be one of `SEEK_SET', `SEEK_CUR', or `SEEK_END'. + - Function: int aio_read64 (struct aiocb *AIOCBP) + This function is similar to the `aio_read' function. The only + difference is that on 32 bit machines, the file descriptor should + be opened in the large file mode. Internally, `aio_read64' uses + functionality equivalent to `lseek64' (*note File Position + Primitive::) to position the file descriptor correctly for the + reading, as opposed to `lseek' functionality used in `aio_read'. - `off_t l_start' - This specifies the offset of the start of the region to which - the lock applies, and is given in bytes relative to the point - specified by `l_whence' member. + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is available under the name `aio_read' and so + transparently replaces the interface for small files on 32 bit + machines. - `off_t l_len' - This specifies the length of the region to be locked. A - value of `0' is treated specially; it means the region - extends to the end of the file. + To write data asynchronously to a file, there exists an equivalent +pair of functions with a very similar interface. - `pid_t l_pid' - This field is the process ID (*note Process Creation - Concepts::) of the process holding the lock. It is filled in - by calling `fcntl' with the `F_GETLK' command, but is ignored - when making a lock. + - Function: int aio_write (struct aiocb *AIOCBP) + This function initiates an asynchronous write operation. The + function call immediately returns after the operation was enqueued + or if before this happens an error was encountered. - - Macro: int F_GETLK - This macro is used as the COMMAND argument to `fcntl', to specify - that it should get information about a lock. This command - requires a third argument of type `struct flock *' to be passed to - `fcntl', so that the form of the call is: + The first `aiocbp->aio_nbytes' bytes from the buffer starting at + `aiocbp->aio_buf' are written to the file for which + `aiocbp->aio_fildes' is an descriptor, starting at the absolute + position `aiocbp->aio_offset' in the file. - fcntl (FILEDES, F_GETLK, LOCKP) + If prioritized I/O is supported by the platform, the + `aiocbp->aio_reqprio' value is used to adjust the priority before + the request is actually enqueued. - If there is a lock already in place that would block the lock - described by the LOCKP argument, information about that lock - overwrites `*LOCKP'. Existing locks are not reported if they are - compatible with making a new lock as specified. Thus, you should - specify a lock type of `F_WRLCK' if you want to find out about both - read and write locks, or `F_RDLCK' if you want to find out about - write locks only. + The calling process is notified about the termination of the read + request according to the `aiocbp->aio_sigevent' value. - There might be more than one lock affecting the region specified - by the LOCKP argument, but `fcntl' only returns information about - one of them. The `l_whence' member of the LOCKP structure is set - to `SEEK_SET' and the `l_start' and `l_len' fields set to identify - the locked region. + When `aio_write' returns, the return value is zero if no error + occurred that can be found before the process is enqueued. If + such an early error is found the function returns -1 and sets + `errno' to one of the following values. - If no lock applies, the only change to the LOCKP structure is to - update the `l_type' to a value of `F_UNLCK'. + `EAGAIN' + The request was not enqueued due to (temporarily) exceeded + resource limitations. - The normal return value from `fcntl' with this command is an - unspecified value other than -1, which is reserved to indicate an - error. The following `errno' error conditions are defined for - this command: + `ENOSYS' + The `aio_write' function is not implemented. `EBADF' - The FILEDES argument is invalid. + The `aiocbp->aio_fildes' descriptor is not valid. This + condition may not be recognized before enqueueing the + request, and so this error might also be signaled + asynchronously. `EINVAL' - Either the LOCKP argument doesn't specify valid lock - information, or the file associated with FILEDES doesn't - support locks. - - - Macro: int F_SETLK - This macro is used as the COMMAND argument to `fcntl', to specify - that it should set or clear a lock. This command requires a third - argument of type `struct flock *' to be passed to `fcntl', so that - the form of the call is: - - fcntl (FILEDES, F_SETLK, LOCKP) - - If the process already has a lock on any part of the region, the - old lock on that part is replaced with the new lock. You can - remove a lock by specifying a lock type of `F_UNLCK'. - - If the lock cannot be set, `fcntl' returns immediately with a value - of -1. This function does not block waiting for other processes - to release locks. If `fcntl' succeeds, it return a value other - than -1. - - The following `errno' error conditions are defined for this - function: + The `aiocbp->aio_offset' or `aiocbp->aio_reqprio' value is + invalid. This condition may not be recognized before + enqueueing the request and so this error might also be + signaled asynchronously. - `EAGAIN' - `EACCES' - The lock cannot be set because it is blocked by an existing - lock on the file. Some systems use `EAGAIN' in this case, - and other systems use `EACCES'; your program should treat - them alike, after `F_SETLK'. (The GNU system always uses - `EAGAIN'.) + In the case `aio_write' returns zero, the current status of the + request can be queried using `aio_error' and `aio_return' + functions. As long as the value returned by `aio_error' is + `EINPROGRESS' the operation has not yet completed. If `aio_error' + returns zero, the operation successfully terminated, otherwise the + value is to be interpreted as an error code. If the function + terminated, the result of the operation can be get using a call to + `aio_return'. The returned value is the same as an equivalent + call to `read' would have returned. Possible error codes returned + by `aio_error' are: `EBADF' - Either: the FILEDES argument is invalid; you requested a read - lock but the FILEDES is not open for read access; or, you - requested a write lock but the FILEDES is not open for write - access. - - `EINVAL' - Either the LOCKP argument doesn't specify valid lock - information, or the file associated with FILEDES doesn't - support locks. - - `ENOLCK' - The system has run out of file lock resources; there are - already too many file locks in place. - - Well-designed file systems never report this error, because - they have no limitation on the number of locks. However, you - must still take account of the possibility of this error, as - it could result from network access to a file system on - another machine. - - - Macro: int F_SETLKW - This macro is used as the COMMAND argument to `fcntl', to specify - that it should set or clear a lock. It is just like the `F_SETLK' - command, but causes the process to block (or wait) until the - request can be specified. - - This command requires a third argument of type `struct flock *', as - for the `F_SETLK' command. - - The `fcntl' return values and errors are the same as for the - `F_SETLK' command, but these additional `errno' error conditions - are defined for this command: - - `EINTR' - The function was interrupted by a signal while it was waiting. - *Note Interrupted Primitives::. - - `EDEADLK' - The specified region is being locked by another process. But - that process is waiting to lock a region which the current - process has locked, so waiting for the lock would result in - deadlock. The system does not guarantee that it will detect - all such conditions, but it lets you know if it notices one. - - The following macros are defined for use as values for the `l_type' -member of the `flock' structure. The values are integer constants. + The `aiocbp->aio_fildes' descriptor is not valid. -`F_RDLCK' - This macro is used to specify a read (or shared) lock. + `ECANCELED' + The operation was canceled before the operation was finished. + (*note Cancel AIO Operations::) -`F_WRLCK' - This macro is used to specify a write (or exclusive) lock. + `EINVAL' + The `aiocbp->aio_offset' value is invalid. -`F_UNLCK' - This macro is used to specify that the region is unlocked. + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is in fact `aio_write64' since the LFS interface + transparently replaces the normal implementation. - As an example of a situation where file locking is useful, consider a -program that can be run simultaneously by several different users, that -logs status information to a common file. One example of such a program -might be a game that uses a file to keep track of high scores. Another -example might be a program that records usage or accounting information -for billing purposes. + - Function: int aio_write64 (struct aiocb *AIOCBP) + This function is similar to the `aio_write' function. The only + difference is that on 32 bit machines the file descriptor should + be opened in the large file mode. Internally `aio_write64' uses + functionality equivalent to `lseek64' (*note File Position + Primitive::) to position the file descriptor correctly for the + writing, as opposed to `lseek' functionality used in `aio_write'. - Having multiple copies of the program simultaneously writing to the -file could cause the contents of the file to become mixed up. But you -can prevent this kind of problem by setting a write lock on the file -before actually writing to the file. + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is available under the name `aio_write' and so + transparently replaces the interface for small files on 32 bit + machines. - If the program also needs to read the file and wants to make sure -that the contents of the file are in a consistent state, then it can -also use a read lock. While the read lock is set, no other process can -lock that part of the file for writing. + Besides these functions with the more or less traditional interface, +POSIX.1b also defines a function which can initiate more than one +operation at a time, and which can handle freely mixed read and write +operations. It is therefore similar to a combination of `readv' and +`writev'. - Remember that file locks are only a _voluntary_ protocol for -controlling access to a file. There is still potential for access to -the file by programs that don't use the lock protocol. + - Function: int lio_listio (int MODE, struct aiocb *const LIST[], int + NENT, struct sigevent *SIG) + The `lio_listio' function can be used to enqueue an arbitrary + number of read and write requests at one time. The requests can + all be meant for the same file, all for different files or every + solution in between. - -File: libc.info, Node: Interrupt Input, Next: IOCTLs, Prev: File Locks, Up: Low-Level I/O + `lio_listio' gets the NENT requests from the array pointed to by + LIST. The operation to be performed is determined by the + `aio_lio_opcode' member in each element of LIST. If this field is + `LIO_READ' a read operation is enqueued, similar to a call of + `aio_read' for this element of the array (except that the way the + termination is signalled is different, as we will see below). If + the `aio_lio_opcode' member is `LIO_WRITE' a write operation is + enqueued. Otherwise the `aio_lio_opcode' must be `LIO_NOP' in + which case this element of LIST is simply ignored. This + "operation" is useful in situations where one has a fixed array of + `struct aiocb' elements from which only a few need to be handled at + a time. Another situation is where the `lio_listio' call was + canceled before all requests are processed (*note Cancel AIO + Operations::) and the remaining requests have to be reissued. -Interrupt-Driven Input -====================== + The other members of each element of the array pointed to by + `list' must have values suitable for the operation as described in + the documentation for `aio_read' and `aio_write' above. - If you set the `O_ASYNC' status flag on a file descriptor (*note -File Status Flags::), a `SIGIO' signal is sent whenever input or output -becomes possible on that file descriptor. The process or process group -to receive the signal can be selected by using the `F_SETOWN' command -to the `fcntl' function. If the file descriptor is a socket, this also -selects the recipient of `SIGURG' signals that are delivered when -out-of-band data arrives on that socket; see *Note Out-of-Band Data::. -(`SIGURG' is sent in any situation where `select' would report the -socket as having an "exceptional condition". *Note Waiting for I/O::.) + The MODE argument determines how `lio_listio' behaves after having + enqueued all the requests. If MODE is `LIO_WAIT' it waits until + all requests terminated. Otherwise MODE must be `LIO_NOWAIT' and + in this case the function returns immediately after having + enqueued all the requests. In this case the caller gets a + notification of the termination of all requests according to the + SIG parameter. If SIG is `NULL' no notification is send. + Otherwise a signal is sent or a thread is started, just as + described in the description for `aio_read' or `aio_write'. - If the file descriptor corresponds to a terminal device, then `SIGIO' -signals are sent to the foreground process group of the terminal. -*Note Job Control::. + If MODE is `LIO_WAIT', the return value of `lio_listio' is 0 when + all requests completed successfully. Otherwise the function + return -1 and `errno' is set accordingly. To find out which + request or requests failed one has to use the `aio_error' function + on all the elements of the array LIST. - The symbols in this section are defined in the header file `fcntl.h'. + In case MODE is `LIO_NOWAIT', the function returns 0 if all + requests were enqueued correctly. The current state of the + requests can be found using `aio_error' and `aio_return' as + described above. If `lio_listio' returns -1 in this mode, the + global variable `errno' is set accordingly. If a request did not + yet terminate, a call to `aio_error' returns `EINPROGRESS'. If + the value is different, the request is finished and the error + value (or 0) is returned and the result of the operation can be + retrieved using `aio_return'. - - Macro: int F_GETOWN - This macro is used as the COMMAND argument to `fcntl', to specify - that it should get information about the process or process group - to which `SIGIO' signals are sent. (For a terminal, this is - actually the foreground process group ID, which you can get using - `tcgetpgrp'; see *Note Terminal Access Functions::.) + Possible values for `errno' are: - The return value is interpreted as a process ID; if negative, its - absolute value is the process group ID. + `EAGAIN' + The resources necessary to queue all the requests are not + available at the moment. The error status for each element + of LIST must be checked to determine which request failed. - The following `errno' error condition is defined for this command: + Another reason could be that the system wide limit of AIO + requests is exceeded. This cannot be the case for the + implementation on GNU systems since no arbitrary limits exist. - `EBADF' - The FILEDES argument is invalid. + `EINVAL' + The MODE parameter is invalid or NENT is larger than + `AIO_LISTIO_MAX'. - - Macro: int F_SETOWN - This macro is used as the COMMAND argument to `fcntl', to specify - that it should set the process or process group to which `SIGIO' - signals are sent. This command requires a third argument of type - `pid_t' to be passed to `fcntl', so that the form of the call is: + `EIO' + One or more of the request's I/O operations failed. The + error status of each request should be checked to determine + which one failed. - fcntl (FILEDES, F_SETOWN, PID) + `ENOSYS' + The `lio_listio' function is not supported. - The PID argument should be a process ID. You can also pass a - negative number whose absolute value is a process group ID. + If the MODE parameter is `LIO_NOWAIT' and the caller cancels a + request, the error status for this request returned by `aio_error' + is `ECANCELED'. - The return value from `fcntl' with this command is -1 in case of - error and some other value if successful. The following `errno' - error conditions are defined for this command: + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is in fact `lio_listio64' since the LFS interface + transparently replaces the normal implementation. - `EBADF' - The FILEDES argument is invalid. + - Function: int lio_listio64 (int MODE, struct aiocb *const LIST, int + NENT, struct sigevent *SIG) + This function is similar to the `lio_listio' function. The only + difference is that on 32 bit machines, the file descriptor should + be opened in the large file mode. Internally, `lio_listio64' uses + functionality equivalent to `lseek64' (*note File Position + Primitive::) to position the file descriptor correctly for the + reading or writing, as opposed to `lseek' functionality used in + `lio_listio'. - `ESRCH' - There is no process or process group corresponding to PID. + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is available under the name `lio_listio' and so + transparently replaces the interface for small files on 32 bit + machines.  -File: libc.info, Node: IOCTLs, Prev: Interrupt Input, Up: Low-Level I/O - -Generic I/O Control operations -============================== - - The GNU system can handle most input/output operations on many -different devices and objects in terms of a few file primitives - -`read', `write' and `lseek'. However, most devices also have a few -peculiar operations which do not fit into this model. Such as: - - * Changing the character font used on a terminal. - - * Telling a magnetic tape system to rewind or fast forward. (Since - they cannot move in byte increments, `lseek' is inapplicable). +File: libc.info, Node: Status of AIO Operations, Next: Synchronizing AIO Operations, Prev: Asynchronous Reads/Writes, Up: Asynchronous I/O - * Ejecting a disk from a drive. +Getting the Status of AIO Operations +------------------------------------ - * Playing an audio track from a CD-ROM drive. + As already described in the documentation of the functions in the +last section, it must be possible to get information about the status +of an I/O request. When the operation is performed truly +asynchronously (as with `aio_read' and `aio_write' and with +`lio_listio' when the mode is `LIO_NOWAIT'), one sometimes needs to +know whether a specific request already terminated and if so, what the +result was. The following two functions allow you to get this kind of +information. - * Maintaining routing tables for a network. + - Function: int aio_error (const struct aiocb *AIOCBP) + This function determines the error state of the request described + by the `struct aiocb' variable pointed to by AIOCBP. If the + request has not yet terminated the value returned is always + `EINPROGRESS'. Once the request has terminated the value + `aio_error' returns is either 0 if the request completed + successfully or it returns the value which would be stored in the + `errno' variable if the request would have been done using `read', + `write', or `fsync'. + The function can return `ENOSYS' if it is not implemented. It + could also return `EINVAL' if the AIOCBP parameter does not refer + to an asynchronous operation whose return status is not yet known. - Although some such objects such as sockets and terminals (1) have -special functions of their own, it would not be practical to create -functions for all these cases. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `aio_error64' since the LFS interface + transparently replaces the normal implementation. - Instead these minor operations, known as "IOCTL"s, are assigned code -numbers and multiplexed through the `ioctl' function, defined in -`sys/ioctl.h'. The code numbers themselves are defined in many -different headers. + - Function: int aio_error64 (const struct aiocb64 *AIOCBP) + This function is similar to `aio_error' with the only difference + that the argument is a reference to a variable of type `struct + aiocb64'. - - Function: int ioctl (int FILEDES, int COMMAND, ...) - The `ioctl' function performs the generic I/O operation COMMAND on - FILEDES. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `aio_error' and so + transparently replaces the interface for small files on 32 bit + machines. - A third argument is usually present, either a single number or a - pointer to a structure. The meaning of this argument, the - returned value, and any error codes depends upon the command used. - Often -1 is returned for a failure. + - Function: ssize_t aio_return (const struct aiocb *AIOCBP) + This function can be used to retrieve the return status of the + operation carried out by the request described in the variable + pointed to by AIOCBP. As long as the error status of this request + as returned by `aio_error' is `EINPROGRESS' the return of this + function is undefined. + Once the request is finished this function can be used exactly + once to retrieve the return value. Following calls might lead to + undefined behavior. The return value itself is the value which + would have been returned by the `read', `write', or `fsync' call. - On some systems, IOCTLs used by different devices share the same -numbers. Thus, although use of an inappropriate IOCTL _usually_ only -produces an error, you should not attempt to use device-specific IOCTLs -on an unknown device. + The function can return `ENOSYS' if it is not implemented. It + could also return `EINVAL' if the AIOCBP parameter does not refer + to an asynchronous operation whose return status is not yet known. - Most IOCTLs are OS-specific and/or only used in special system -utilities, and are thus beyond the scope of this document. For an -example of the use of an IOCTL, see *Note Out-of-Band Data::. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `aio_return64' since the LFS interface + transparently replaces the normal implementation. - ---------- Footnotes ---------- + - Function: int aio_return64 (const struct aiocb64 *AIOCBP) + This function is similar to `aio_return' with the only difference + that the argument is a reference to a variable of type `struct + aiocb64'. - (1) Actually, the terminal-specific functions are implemented with -IOCTLs on many platforms. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `aio_return' and so + transparently replaces the interface for small files on 32 bit + machines. diff -durpN glibc-2.2.4/manual/libc.info-23 glibc-2.2.5/manual/libc.info-23 --- glibc-2.2.4/manual/libc.info-23 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-23 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1136 +33,1188 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: File System Interface, Next: Pipes and FIFOs, Prev: Low-Level I/O, Up: Top +File: libc.info, Node: Synchronizing AIO Operations, Next: Cancel AIO Operations, Prev: Status of AIO Operations, Up: Asynchronous I/O -File System Interface -********************* +Getting into a Consistent State +------------------------------- - This chapter describes the GNU C library's functions for manipulating -files. Unlike the input and output functions (*note I/O on Streams::; -*note Low-Level I/O::), these functions are concerned with operating on -the files themselves rather than on their contents. + When dealing with asynchronous operations it is sometimes necessary +to get into a consistent state. This would mean for AIO that one wants +to know whether a certain request or a group of request were processed. +This could be done by waiting for the notification sent by the system +after the operation terminated, but this sometimes would mean wasting +resources (mainly computation time). Instead POSIX.1b defines two +functions which will help with most kinds of consistency. - Among the facilities described in this chapter are functions for -examining or modifying directories, functions for renaming and deleting -files, and functions for examining and setting file attributes such as -access permissions and modification times. + The `aio_fsync' and `aio_fsync64' functions are only available if +the symbol `_POSIX_SYNCHRONIZED_IO' is defined in `unistd.h'. -* Menu: + - Function: int aio_fsync (int OP, struct aiocb *AIOCBP) + Calling this function forces all I/O operations operating queued + at the time of the function call operating on the file descriptor + `aiocbp->aio_fildes' into the synchronized I/O completion state + (*note Synchronizing I/O::). The `aio_fsync' function returns + immediately but the notification through the method described in + `aiocbp->aio_sigevent' will happen only after all requests for this + file descriptor have terminated and the file is synchronized. + This also means that requests for this very same file descriptor + which are queued after the synchronization request are not + affected. -* Working Directory:: This is used to resolve relative - file names. -* Accessing Directories:: Finding out what files a directory - contains. -* Working with Directory Trees:: Apply actions to all files or a selectable - subset of a directory hierarchy. -* Hard Links:: Adding alternate names to a file. -* Symbolic Links:: A file that ``points to'' a file name. -* Deleting Files:: How to delete a file, and what that means. -* Renaming Files:: Changing a file's name. -* Creating Directories:: A system call just for creating a directory. -* File Attributes:: Attributes of individual files. -* Making Special Files:: How to create special files. -* Temporary Files:: Naming and creating temporary files. + If OP is `O_DSYNC' the synchronization happens as with a call to + `fdatasync'. Otherwise OP should be `O_SYNC' and the + synchronization happens as with `fsync'. - -File: libc.info, Node: Working Directory, Next: Accessing Directories, Up: File System Interface + As long as the synchronization has not happened, a call to + `aio_error' with the reference to the object pointed to by AIOCBP + returns `EINPROGRESS'. Once the synchronization is done + `aio_error' return 0 if the synchronization was not successful. + Otherwise the value returned is the value to which the `fsync' or + `fdatasync' function would have set the `errno' variable. In this + case nothing can be assumed about the consistency for the data + written to this file descriptor. -Working Directory -================= + The return value of this function is 0 if the request was + successfully enqueued. Otherwise the return value is -1 and + `errno' is set to one of the following values: - Each process has associated with it a directory, called its "current -working directory" or simply "working directory", that is used in the -resolution of relative file names (*note File Name Resolution::). + `EAGAIN' + The request could not be enqueued due to temporary lack of + resources. - When you log in and begin a new session, your working directory is -initially set to the home directory associated with your login account -in the system user database. You can find any user's home directory -using the `getpwuid' or `getpwnam' functions; see *Note User Database::. + `EBADF' + The file descriptor `aiocbp->aio_fildes' is not valid or not + open for writing. - Users can change the working directory using shell commands like -`cd'. The functions described in this section are the primitives used -by those commands and by other programs for examining and changing the -working directory. + `EINVAL' + The implementation does not support I/O synchronization or + the OP parameter is other than `O_DSYNC' and `O_SYNC'. - Prototypes for these functions are declared in the header file -`unistd.h'. + `ENOSYS' + This function is not implemented. - - Function: char * getcwd (char *BUFFER, size_t SIZE) - The `getcwd' function returns an absolute file name representing - the current working directory, storing it in the character array - BUFFER that you provide. The SIZE argument is how you tell the - system the allocation size of BUFFER. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `aio_return64' since the LFS interface + transparently replaces the normal implementation. - The GNU library version of this function also permits you to - specify a null pointer for the BUFFER argument. Then `getcwd' - allocates a buffer automatically, as with `malloc' (*note - Unconstrained Allocation::). If the SIZE is greater than zero, - then the buffer is that large; otherwise, the buffer is as large - as necessary to hold the result. + - Function: int aio_fsync64 (int OP, struct aiocb64 *AIOCBP) + This function is similar to `aio_fsync' with the only difference + that the argument is a reference to a variable of type `struct + aiocb64'. - The return value is BUFFER on success and a null pointer on - failure. The following `errno' error conditions are defined for - this function: + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `aio_fsync' and so + transparently replaces the interface for small files on 32 bit + machines. - `EINVAL' - The SIZE argument is zero and BUFFER is not a null pointer. + Another method of synchronization is to wait until one or more +requests of a specific set terminated. This could be achieved by the +`aio_*' functions to notify the initiating process about the +termination but in some situations this is not the ideal solution. In +a program which constantly updates clients somehow connected to the +server it is not always the best solution to go round robin since some +connections might be slow. On the other hand letting the `aio_*' +function notify the caller might also be not the best solution since +whenever the process works on preparing data for on client it makes no +sense to be interrupted by a notification since the new client will not +be handled before the current client is served. For situations like +this `aio_suspend' should be used. - `ERANGE' - The SIZE argument is less than the length of the working - directory name. You need to allocate a bigger array and try - again. + - Function: int aio_suspend (const struct aiocb *const LIST[], int + NENT, const struct timespec *TIMEOUT) + When calling this function, the calling thread is suspended until + at least one of the requests pointed to by the NENT elements of the + array LIST has completed. If any of the requests has already + completed at the time `aio_suspend' is called, the function returns + immediately. Whether a request has terminated or not is + determined by comparing the error status of the request with + `EINPROGRESS'. If an element of LIST is `NULL', the entry is + simply ignored. - `EACCES' - Permission to read or search a component of the file name was - denied. + If no request has finished, the calling process is suspended. If + TIMEOUT is `NULL', the process is not woken until a request has + finished. If TIMEOUT is not `NULL', the process remains suspended + at least as long as specified in TIMEOUT. In this case, + `aio_suspend' returns with an error. - You could implement the behavior of GNU's `getcwd (NULL, 0)' using -only the standard behavior of `getcwd': + The return value of the function is 0 if one or more requests from + the LIST have terminated. Otherwise the function returns -1 and + `errno' is set to one of the following values: - char * - gnu_getcwd () - { - size_t size = 100; - - while (1) - { - char *buffer = (char *) xmalloc (size); - if (getcwd (buffer, size) == buffer) - return buffer; - free (buffer); - if (errno != ERANGE) - return 0; - size *= 2; - } - } + `EAGAIN' + None of the requests from the LIST completed in the time + specified by TIMEOUT. -*Note Malloc Examples::, for information about `xmalloc', which is not -a library function but is a customary name used in most GNU software. + `EINTR' + A signal interrupted the `aio_suspend' function. This signal + might also be sent by the AIO implementation while signalling + the termination of one of the requests. - - Deprecated Function: char * getwd (char *BUFFER) - This is similar to `getcwd', but has no way to specify the size of - the buffer. The GNU library provides `getwd' only for backwards - compatibility with BSD. + `ENOSYS' + The `aio_suspend' function is not implemented. - The BUFFER argument should be a pointer to an array at least - `PATH_MAX' bytes long (*note Limits for Files::). In the GNU - system there is no limit to the size of a file name, so this is not - necessarily enough space to contain the directory name. That is - why this function is deprecated. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `aio_suspend64' since the LFS interface + transparently replaces the normal implementation. - - Function: char * get_current_dir_name (void) - This `get_current_dir_name' function is bascially equivalent to - `getcwd (NULL, 0)'. The only difference is that the value of the - `PWD' variable is returned if this value is correct. This is a - subtle difference which is visible if the path described by the - `PWD' value is using one or more symbol links in which case the - value returned by `getcwd' can resolve the symbol links and - therefore yield a different result. + - Function: int aio_suspend64 (const struct aiocb64 *const LIST[], int + NENT, const struct timespec *TIMEOUT) + This function is similar to `aio_suspend' with the only difference + that the argument is a reference to a variable of type `struct + aiocb64'. - This function is a GNU extension. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `aio_suspend' and so + transparently replaces the interface for small files on 32 bit + machines. - - Function: int chdir (const char *FILENAME) - This function is used to set the process's working directory to - FILENAME. + +File: libc.info, Node: Cancel AIO Operations, Next: Configuration of AIO, Prev: Synchronizing AIO Operations, Up: Asynchronous I/O - The normal, successful return value from `chdir' is `0'. A value - of `-1' is returned to indicate an error. The `errno' error - conditions defined for this function are the usual file name - syntax errors (*note File Name Errors::), plus `ENOTDIR' if the - file FILENAME is not a directory. +Cancellation of AIO Operations +------------------------------ - - Function: int fchdir (int FILEDES) - This function is used to set the process's working directory to - directory associated with the file descriptor FILEDES. + When one or more requests are asynchronously processed, it might be +useful in some situations to cancel a selected operation, e.g., if it +becomes obvious that the written data is no longer accurate and would +have to be overwritten soon. As an example, assume an application, +which writes data in files in a situation where new incoming data would +have to be written in a file which will be updated by an enqueued +request. The POSIX AIO implementation provides such a function, but +this function is not capable of forcing the cancellation of the +request. It is up to the implementation to decide whether it is +possible to cancel the operation or not. Therefore using this function +is merely a hint. - The normal, successful return value from `fchdir' is `0'. A value - of `-1' is returned to indicate an error. The following `errno' - error conditions are defined for this function: + - Function: int aio_cancel (int FILDES, struct aiocb *AIOCBP) + The `aio_cancel' function can be used to cancel one or more + outstanding requests. If the AIOCBP parameter is `NULL', the + function tries to cancel all of the outstanding requests which + would process the file descriptor FILDES (i.e., whose `aio_fildes' + member is FILDES). If AIOCBP is not `NULL', `aio_cancel' attempts + to cancel the specific request pointed to by AIOCBP. - `EACCES' - Read permission is denied for the directory named by - `dirname'. + For requests which were successfully canceled, the normal + notification about the termination of the request should take + place. I.e., depending on the `struct sigevent' object which + controls this, nothing happens, a signal is sent or a thread is + started. If the request cannot be canceled, it terminates the + usual way after performing the operation. + + After a request is successfully canceled, a call to `aio_error' + with a reference to this request as the parameter will return + `ECANCELED' and a call to `aio_return' will return -1. If the + request wasn't canceled and is still running the error status is + still `EINPROGRESS'. + + The return value of the function is `AIO_CANCELED' if there were + requests which haven't terminated and which were successfully + canceled. If there is one or more requests left which couldn't be + canceled, the return value is `AIO_NOTCANCELED'. In this case + `aio_error' must be used to find out which of the, perhaps + multiple, requests (in AIOCBP is `NULL') weren't successfully + canceled. If all requests already terminated at the time + `aio_cancel' is called the return value is `AIO_ALLDONE'. + + If an error occurred during the execution of `aio_cancel' the + function returns -1 and sets `errno' to one of the following + values. `EBADF' - The FILEDES argument is not a valid file descriptor. + The file descriptor FILDES is not valid. - `ENOTDIR' - The file descriptor FILEDES is not associated with a - directory. + `ENOSYS' + `aio_cancel' is not implemented. - `EINTR' - The function call was interrupt by a signal. + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is in fact `aio_cancel64' since the LFS interface + transparently replaces the normal implementation. - `EIO' - An I/O error occurred. + - Function: int aio_cancel64 (int FILDES, struct aiocb64 *AIOCBP) + This function is similar to `aio_cancel' with the only difference + that the argument is a reference to a variable of type `struct + aiocb64'. + + When the sources are compiled with `_FILE_OFFSET_BITS == 64', this + function is available under the name `aio_cancel' and so + transparently replaces the interface for small files on 32 bit + machines.  -File: libc.info, Node: Accessing Directories, Next: Working with Directory Trees, Prev: Working Directory, Up: File System Interface +File: libc.info, Node: Configuration of AIO, Prev: Cancel AIO Operations, Up: Asynchronous I/O -Accessing Directories -===================== +How to optimize the AIO implementation +-------------------------------------- - The facilities described in this section let you read the contents -of a directory file. This is useful if you want your program to list -all the files in a directory, perhaps as part of a menu. + The POSIX standard does not specify how the AIO functions are +implemented. They could be system calls, but it is also possible to +emulate them at userlevel. - The `opendir' function opens a "directory stream" whose elements are -directory entries. You use the `readdir' function on the directory -stream to retrieve these entries, represented as `struct dirent' -objects. The name of the file for each entry is stored in the `d_name' -member of this structure. There are obvious parallels here to the -stream facilities for ordinary files, described in *Note I/O on -Streams::. + At the point of this writing, the available implementation is a +userlevel implementation which uses threads for handling the enqueued +requests. While this implementation requires making some decisions +about limitations, hard limitations are something which is best avoided +in the GNU C library. Therefore, the GNU C library provides a means +for tuning the AIO implementation according to the individual use. -* Menu: + - Data Type: struct aioinit + This data type is used to pass the configuration or tunable + parameters to the implementation. The program has to initialize + the members of this struct and pass it to the implementation using + the `aio_init' function. -* Directory Entries:: Format of one directory entry. -* Opening a Directory:: How to open a directory stream. -* Reading/Closing Directory:: How to read directory entries from the stream. -* Simple Directory Lister:: A very simple directory listing program. -* Random Access Directory:: Rereading part of the directory - already read with the same stream. -* Scanning Directory Content:: Get entries for user selected subset of - contents in given directory. -* Simple Directory Lister Mark II:: Revised version of the program. + `int aio_threads' + This member specifies the maximal number of threads which may + be used at any one time. - -File: libc.info, Node: Directory Entries, Next: Opening a Directory, Up: Accessing Directories + `int aio_num' + This number provides an estimate on the maximal number of + simultaneously enqueued requests. -Format of a Directory Entry ---------------------------- + `int aio_locks' + Unused. - This section describes what you find in a single directory entry, as -you might obtain it from a directory stream. All the symbols are -declared in the header file `dirent.h'. + `int aio_usedba' + Unused. - - Data Type: struct dirent - This is a structure type used to return information about directory - entries. It contains the following fields: + `int aio_debug' + Unused. - `char d_name[]' - This is the null-terminated file name component. This is the - only field you can count on in all POSIX systems. + `int aio_numusers' + Unused. - `ino_t d_fileno' - This is the file serial number. For BSD compatibility, you - can also refer to this member as `d_ino'. In the GNU system - and most POSIX systems, for most files this the same as the - `st_ino' member that `stat' will return for the file. *Note - File Attributes::. + `int aio_reserved[2]' + Unused. - `unsigned char d_namlen' - This is the length of the file name, not including the - terminating null character. Its type is `unsigned char' - because that is the integer type of the appropriate size + - Function: void aio_init (const struct aioinit *INIT) + This function must be called before any other AIO function. + Calling it is completely voluntary, as it is only meant to help + the AIO implementation perform better. - `unsigned char d_type' - This is the type of the file, possibly unknown. The - following constants are defined for its value: + Before calling the `aio_init', function the members of a variable + of type `struct aioinit' must be initialized. Then a reference to + this variable is passed as the parameter to `aio_init' which itself + may or may not pay attention to the hints. - `DT_UNKNOWN' - The type is unknown. On some systems this is the only - value returned. + The function has no return value and no error cases are defined. + It is a extension which follows a proposal from the SGI + implementation in Irix 6. It is not covered by POSIX.1b or Unix98. - `DT_REG' - A regular file. + +File: libc.info, Node: Control Operations, Next: Duplicating Descriptors, Prev: Asynchronous I/O, Up: Low-Level I/O - `DT_DIR' - A directory. +Control Operations on Files +=========================== - `DT_FIFO' - A named pipe, or FIFO. *Note FIFO Special Files::. + This section describes how you can perform various other operations +on file descriptors, such as inquiring about or setting flags describing +the status of the file descriptor, manipulating record locks, and the +like. All of these operations are performed by the function `fcntl'. - `DT_SOCK' - A local-domain socket. + The second argument to the `fcntl' function is a command that +specifies which operation to perform. The function and macros that name +various flags that are used with it are declared in the header file +`fcntl.h'. Many of these flags are also used by the `open' function; +see *Note Opening and Closing Files::. - `DT_CHR' - A character device. + - Function: int fcntl (int FILEDES, int COMMAND, ...) + The `fcntl' function performs the operation specified by COMMAND + on the file descriptor FILEDES. Some commands require additional + arguments to be supplied. These additional arguments and the + return value and error conditions are given in the detailed + descriptions of the individual commands. - `DT_BLK' - A block device. + Briefly, here is a list of what the various commands are. - This member is a BSD extension. The symbol - `_DIRENT_HAVE_D_TYPE' is defined if this member is available. - On systems where it is used, it corresponds to the file type - bits in the `st_mode' member of `struct statbuf'. If the - value cannot be determine the member value is DT_UNKNOWN. - These two macros convert between `d_type' values and - `st_mode' values: + `F_DUPFD' + Duplicate the file descriptor (return another file descriptor + pointing to the same open file). *Note Duplicating + Descriptors::. - - Function: int IFTODT (mode_t MODE) - This returns the `d_type' value corresponding to MODE. + `F_GETFD' + Get flags associated with the file descriptor. *Note + Descriptor Flags::. - - Function: mode_t DTTOIF (int DTYPE) - This returns the `st_mode' value corresponding to DTYPE. + `F_SETFD' + Set flags associated with the file descriptor. *Note + Descriptor Flags::. - This structure may contain additional members in the future. Their - availability is always announced in the compilation environment by - a macro names `_DIRENT_HAVE_D_XXX' where XXX is replaced by the - name of the new member. For instance, the member `d_reclen' - available on some systems is announced through the macro - `_DIRENT_HAVE_D_RECLEN'. + `F_GETFL' + Get flags associated with the open file. *Note File Status + Flags::. - When a file has multiple names, each name has its own directory - entry. The only way you can tell that the directory entries - belong to a single file is that they have the same value for the - `d_fileno' field. + `F_SETFL' + Set flags associated with the open file. *Note File Status + Flags::. - File attributes such as size, modification times etc., are part of - the file itself, not of any particular directory entry. *Note - File Attributes::. + `F_GETLK' + Get a file lock. *Note File Locks::. - -File: libc.info, Node: Opening a Directory, Next: Reading/Closing Directory, Prev: Directory Entries, Up: Accessing Directories + `F_SETLK' + Set or clear a file lock. *Note File Locks::. -Opening a Directory Stream --------------------------- + `F_SETLKW' + Like `F_SETLK', but wait for completion. *Note File Locks::. - This section describes how to open a directory stream. All the -symbols are declared in the header file `dirent.h'. + `F_GETOWN' + Get process or process group ID to receive `SIGIO' signals. + *Note Interrupt Input::. - - Data Type: DIR - The `DIR' data type represents a directory stream. + `F_SETOWN' + Set process or process group ID to receive `SIGIO' signals. + *Note Interrupt Input::. - You shouldn't ever allocate objects of the `struct dirent' or `DIR' -data types, since the directory access functions do that for you. -Instead, you refer to these objects using the pointers returned by the -following functions. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `fcntl' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `fcntl' should be protected using cancellation handlers. - - Function: DIR * opendir (const char *DIRNAME) - The `opendir' function opens and returns a directory stream for - reading the directory whose file name is DIRNAME. The stream has - type `DIR *'. + +File: libc.info, Node: Duplicating Descriptors, Next: Descriptor Flags, Prev: Control Operations, Up: Low-Level I/O - If unsuccessful, `opendir' returns a null pointer. In addition to - the usual file name errors (*note File Name Errors::), the - following `errno' error conditions are defined for this function: +Duplicating Descriptors +======================= - `EACCES' - Read permission is denied for the directory named by - `dirname'. + You can "duplicate" a file descriptor, or allocate another file +descriptor that refers to the same open file as the original. Duplicate +descriptors share one file position and one set of file status flags +(*note File Status Flags::), but each has its own set of file descriptor +flags (*note Descriptor Flags::). - `EMFILE' - The process has too many files open. + The major use of duplicating a file descriptor is to implement +"redirection" of input or output: that is, to change the file or pipe +that a particular file descriptor corresponds to. - `ENFILE' - The entire system, or perhaps the file system which contains - the directory, cannot support any additional open files at - the moment. (This problem cannot happen on the GNU system.) + You can perform this operation using the `fcntl' function with the +`F_DUPFD' command, but there are also convenient functions `dup' and +`dup2' for duplicating descriptors. - The `DIR' type is typically implemented using a file descriptor, - and the `opendir' function in terms of the `open' function. *Note - Low-Level I/O::. Directory streams and the underlying file - descriptors are closed on `exec' (*note Executing a File::). + The `fcntl' function and flags are declared in `fcntl.h', while +prototypes for `dup' and `dup2' are in the header file `unistd.h'. - In some situations it can be desirable to get hold of the file -descriptor which is created by the `opendir' call. For instance, to -switch the current working directory to the directory just read the -`fchdir' function could be used. Historically the `DIR' type was -exposed and programs could access the fields. This does not happen in -the GNU C library. Instead a separate function is provided to allow -access. + - Function: int dup (int OLD) + This function copies descriptor OLD to the first available + descriptor number (the first number not currently open). It is + equivalent to `fcntl (OLD, F_DUPFD, 0)'. - - Function: int dirfd (DIR *DIRSTREAM) - The function `dirfd' returns the file descriptor associated with - the directory stream DIRSTREAM. This descriptor can be used until - the directory is closed with `closedir'. If the directory stream - implementation is not using file descriptors the return value is - `-1'. + - Function: int dup2 (int OLD, int NEW) + This function copies the descriptor OLD to descriptor number NEW. - -File: libc.info, Node: Reading/Closing Directory, Next: Simple Directory Lister, Prev: Opening a Directory, Up: Accessing Directories + If OLD is an invalid descriptor, then `dup2' does nothing; it does + not close NEW. Otherwise, the new duplicate of OLD replaces any + previous meaning of descriptor NEW, as if NEW were closed first. -Reading and Closing a Directory Stream --------------------------------------- + If OLD and NEW are different numbers, and OLD is a valid + descriptor number, then `dup2' is equivalent to: - This section describes how to read directory entries from a directory -stream, and how to close the stream when you are done with it. All the -symbols are declared in the header file `dirent.h'. + close (NEW); + fcntl (OLD, F_DUPFD, NEW) - - Function: struct dirent * readdir (DIR *DIRSTREAM) - This function reads the next entry from the directory. It normally - returns a pointer to a structure containing information about the - file. This structure is statically allocated and can be rewritten - by a subsequent call. + However, `dup2' does this atomically; there is no instant in the + middle of calling `dup2' at which NEW is closed and not yet a + duplicate of OLD. - *Portability Note:* On some systems `readdir' may not return - entries for `.' and `..', even though these are always valid file - names in any directory. *Note File Name Resolution::. + - Macro: int F_DUPFD + This macro is used as the COMMAND argument to `fcntl', to copy the + file descriptor given as the first argument. - If there are no more entries in the directory or an error is - detected, `readdir' returns a null pointer. The following `errno' - error conditions are defined for this function: + The form of the call in this case is: + + fcntl (OLD, F_DUPFD, NEXT-FILEDES) + + The NEXT-FILEDES argument is of type `int' and specifies that the + file descriptor returned should be the next available one greater + than or equal to this value. + + The return value from `fcntl' with this command is normally the + value of the new file descriptor. A return value of -1 indicates + an error. The following `errno' error conditions are defined for + this command: `EBADF' - The DIRSTREAM argument is not valid. + The OLD argument is invalid. - `readdir' is not thread safe. Multiple threads using `readdir' on - the same DIRSTREAM may overwrite the return value. Use - `readdir_r' when this is critical. + `EINVAL' + The NEXT-FILEDES argument is invalid. - - Function: int readdir_r (DIR *DIRSTREAM, struct dirent *ENTRY, - struct dirent **RESULT) - This function is the reentrant version of `readdir'. Like - `readdir' it returns the next entry from the directory. But to - prevent conflicts between simultaneously running threads the - result is not stored in statically allocated memory. Instead the - argument ENTRY points to a place to store the result. + `EMFILE' + There are no more file descriptors available--your program is + already using the maximum. In BSD and GNU, the maximum is + controlled by a resource limit that can be changed; *note + Limits on Resources::, for more information about the + `RLIMIT_NOFILE' limit. - The return value is `0' in case the next entry was read - successfully. In this case a pointer to the result is returned in - *RESULT. It is not required that *RESULT is the same as ENTRY. - If something goes wrong while executing `readdir_r' the function - returns a value indicating the error (as described for `readdir'). + `ENFILE' is not a possible error code for `dup2' because `dup2' + does not create a new opening of a file; duplicate descriptors do + not count toward the limit which `ENFILE' indicates. `EMFILE' is + possible because it refers to the limit on distinct descriptor + numbers in use in one process. - If there are no more directory entries, `readdir_r''s return value - is `0', and *RESULT is set to `NULL'. + Here is an example showing how to use `dup2' to do redirection. +Typically, redirection of the standard streams (like `stdin') is done +by a shell or shell-like program before calling one of the `exec' +functions (*note Executing a File::) to execute a new program in a +child process. When the new program is executed, it creates and +initializes the standard streams to point to the corresponding file +descriptors, before its `main' function is invoked. - *Portability Note:* On some systems `readdir_r' may not return a - NUL terminated string for the file name, even when there is no - `d_reclen' field in `struct dirent' and the file name is the - maximum allowed size. Modern systems all have the `d_reclen' - field, and on old systems multi-threading is not critical. In any - case there is no such problem with the `readdir' function, so that - even on systems without the `d_reclen' member one could use - multiple threads by using external locking. + So, to redirect standard input to a file, the shell could do +something like: - It is also important to look at the definition of the `struct - dirent' type. Simply passing a pointer to an object of this type - for the second parameter of `readdir_r' might not be enough. Some - systems don't define the `d_name' element sufficiently long. In - this case the user has to provide additional space. There must be - room for at least `NAME_MAX + 1' characters in the `d_name' array. - Code to call `readdir_r' could look like this: + pid = fork (); + if (pid == 0) + { + char *filename; + char *program; + int file; + ... + file = TEMP_FAILURE_RETRY (open (filename, O_RDONLY)); + dup2 (file, STDIN_FILENO); + TEMP_FAILURE_RETRY (close (file)); + execv (program, NULL); + } - union - { - struct dirent d; - char b[offsetof (struct dirent, d_name) + NAME_MAX + 1]; - } u; - - if (readdir_r (dir, &u.d, &res) == 0) - ... + There is also a more detailed example showing how to implement +redirection in the context of a pipeline of processes in *Note +Launching Jobs::. - To support large filesystems on 32-bit machines there are LFS -variants of the last two functions. + +File: libc.info, Node: Descriptor Flags, Next: File Status Flags, Prev: Duplicating Descriptors, Up: Low-Level I/O - - Function: struct dirent64 * readdir64 (DIR *DIRSTREAM) - The `readdir64' function is just like the `readdir' function - except that it returns a pointer to a record of type `struct - dirent64'. Some of the members of this data type (notably `d_ino') - might have a different size to allow large filesystems. +File Descriptor Flags +===================== - In all other aspects this function is equivalent to `readdir'. + "File descriptor flags" are miscellaneous attributes of a file +descriptor. These flags are associated with particular file +descriptors, so that if you have created duplicate file descriptors +from a single opening of a file, each descriptor has its own set of +flags. - - Function: int readdir64_r (DIR *DIRSTREAM, struct dirent64 *ENTRY, - struct dirent64 **RESULT) - The `readdir64_r' function is equivalent to the `readdir_r' - function except that it takes parameters of base type `struct - dirent64' instead of `struct dirent' in the second and third - position. The same precautions mentioned in the documentation of - `readdir_r' also apply here. + Currently there is just one file descriptor flag: `FD_CLOEXEC', +which causes the descriptor to be closed if you use any of the +`exec...' functions (*note Executing a File::). - - Function: int closedir (DIR *DIRSTREAM) - This function closes the directory stream DIRSTREAM. It returns - `0' on success and `-1' on failure. + The symbols in this section are defined in the header file `fcntl.h'. - The following `errno' error conditions are defined for this - function: + - Macro: int F_GETFD + This macro is used as the COMMAND argument to `fcntl', to specify + that it should return the file descriptor flags associated with + the FILEDES argument. + + The normal return value from `fcntl' with this command is a + nonnegative number which can be interpreted as the bitwise OR of + the individual flags (except that currently there is only one flag + to use). + + In case of an error, `fcntl' returns -1. The following `errno' + error conditions are defined for this command: `EBADF' - The DIRSTREAM argument is not valid. + The FILEDES argument is invalid. - -File: libc.info, Node: Simple Directory Lister, Next: Random Access Directory, Prev: Reading/Closing Directory, Up: Accessing Directories + - Macro: int F_SETFD + This macro is used as the COMMAND argument to `fcntl', to specify + that it should set the file descriptor flags associated with the + FILEDES argument. This requires a third `int' argument to specify + the new flags, so the form of the call is: -Simple Program to List a Directory ----------------------------------- + fcntl (FILEDES, F_SETFD, NEW-FLAGS) - Here's a simple program that prints the names of the files in the -current working directory: + The normal return value from `fcntl' with this command is an + unspecified value other than -1, which indicates an error. The + flags and error conditions are the same as for the `F_GETFD' + command. - #include - #include - #include - #include + The following macro is defined for use as a file descriptor flag with +the `fcntl' function. The value is an integer constant usable as a bit +mask value. + + - Macro: int FD_CLOEXEC + This flag specifies that the file descriptor should be closed when + an `exec' function is invoked; see *Note Executing a File::. When + a file descriptor is allocated (as with `open' or `dup'), this bit + is initially cleared on the new file descriptor, meaning that + descriptor will survive into the new program after `exec'. + + If you want to modify the file descriptor flags, you should get the +current flags with `F_GETFD' and modify the value. Don't assume that +the flags listed here are the only ones that are implemented; your +program may be run years from now and more flags may exist then. For +example, here is a function to set or clear the flag `FD_CLOEXEC' +without altering any other flags: + + /* Set the `FD_CLOEXEC' flag of DESC if VALUE is nonzero, + or clear the flag if VALUE is 0. + Return 0 on success, or -1 on error with `errno' set. */ int - main (void) + set_cloexec_flag (int desc, int value) { - DIR *dp; - struct dirent *ep; - - dp = opendir ("./"); - if (dp != NULL) - { - while (ep = readdir (dp)) - puts (ep->d_name); - (void) closedir (dp); - } + int oldflags = fcntl (desc, F_GETFD, 0); + /* If reading the flags failed, return error indication now. + if (oldflags < 0) + return oldflags; + /* Set just the flag we want to set. */ + if (value != 0) + oldflags |= FD_CLOEXEC; else - perror ("Couldn't open the directory"); - - return 0; + oldflags &= ~FD_CLOEXEC; + /* Store modified flag word in the descriptor. */ + return fcntl (desc, F_SETFD, oldflags); } - The order in which files appear in a directory tends to be fairly -random. A more useful program would sort the entries (perhaps by -alphabetizing them) before printing them; see *Note Scanning Directory -Content::, and *Note Array Sort Function::. + +File: libc.info, Node: File Status Flags, Next: File Locks, Prev: Descriptor Flags, Up: Low-Level I/O + +File Status Flags +================= + + "File status flags" are used to specify attributes of the opening of +a file. Unlike the file descriptor flags discussed in *Note Descriptor +Flags::, the file status flags are shared by duplicated file descriptors +resulting from a single opening of the file. The file status flags are +specified with the FLAGS argument to `open'; *note Opening and Closing +Files::. + + File status flags fall into three categories, which are described in +the following sections. + + * *Note Access Modes::, specify what type of access is allowed to the + file: reading, writing, or both. They are set by `open' and are + returned by `fcntl', but cannot be changed. + + * *Note Open-time Flags::, control details of what `open' will do. + These flags are not preserved after the `open' call. + + * *Note Operating Modes::, affect how operations such as `read' and + `write' are done. They are set by `open', and can be fetched or + changed with `fcntl'. + + The symbols in this section are defined in the header file `fcntl.h'. + +* Menu: + +* Access Modes:: Whether the descriptor can read or write. +* Open-time Flags:: Details of `open'. +* Operating Modes:: Special modes to control I/O operations. +* Getting File Status Flags:: Fetching and changing these flags.  -File: libc.info, Node: Random Access Directory, Next: Scanning Directory Content, Prev: Simple Directory Lister, Up: Accessing Directories +File: libc.info, Node: Access Modes, Next: Open-time Flags, Up: File Status Flags -Random Access in a Directory Stream ------------------------------------ +File Access Modes +----------------- - This section describes how to reread parts of a directory that you -have already read from an open directory stream. All the symbols are -declared in the header file `dirent.h'. + The file access modes allow a file descriptor to be used for reading, +writing, or both. (In the GNU system, they can also allow none of +these, and allow execution of the file as a program.) The access modes +are chosen when the file is opened, and never change. - - Function: void rewinddir (DIR *DIRSTREAM) - The `rewinddir' function is used to reinitialize the directory - stream DIRSTREAM, so that if you call `readdir' it returns - information about the first entry in the directory again. This - function also notices if files have been added or removed to the - directory since it was opened with `opendir'. (Entries for these - files might or might not be returned by `readdir' if they were - added or removed since you last called `opendir' or `rewinddir'.) + - Macro: int O_RDONLY + Open the file for read access. - - Function: off_t telldir (DIR *DIRSTREAM) - The `telldir' function returns the file position of the directory - stream DIRSTREAM. You can use this value with `seekdir' to - restore the directory stream to that position. + - Macro: int O_WRONLY + Open the file for write access. - - Function: void seekdir (DIR *DIRSTREAM, off_t POS) - The `seekdir' function sets the file position of the directory - stream DIRSTREAM to POS. The value POS must be the result of a - previous call to `telldir' on this particular stream; closing and - reopening the directory can invalidate values returned by - `telldir'. + - Macro: int O_RDWR + Open the file for both reading and writing. + + In the GNU system (and not in other systems), `O_RDONLY' and +`O_WRONLY' are independent bits that can be bitwise-ORed together, and +it is valid for either bit to be set or clear. This means that +`O_RDWR' is the same as `O_RDONLY|O_WRONLY'. A file access mode of +zero is permissible; it allows no operations that do input or output to +the file, but does allow other operations such as `fchmod'. On the GNU +system, since "read-only" or "write-only" is a misnomer, `fcntl.h' +defines additional names for the file access modes. These names are +preferred when writing GNU-specific code. But most programs will want +to be portable to other POSIX.1 systems and should use the POSIX.1 +names above instead. + + - Macro: int O_READ + Open the file for reading. Same as `O_RDWR'; only defined on GNU. + + - Macro: int O_WRITE + Open the file for reading. Same as `O_WRONLY'; only defined on + GNU. + + - Macro: int O_EXEC + Open the file for executing. Only defined on GNU. + + To determine the file access mode with `fcntl', you must extract the +access mode bits from the retrieved file status flags. In the GNU +system, you can just test the `O_READ' and `O_WRITE' bits in the flags +word. But in other POSIX.1 systems, reading and writing access modes +are not stored as distinct bit flags. The portable way to extract the +file access mode bits is with `O_ACCMODE'. + + - Macro: int O_ACCMODE + This macro stands for a mask that can be bitwise-ANDed with the + file status flag value to produce a value representing the file + access mode. The mode will be `O_RDONLY', `O_WRONLY', or `O_RDWR'. + (In the GNU system it could also be zero, and it never includes the + `O_EXEC' bit.)  -File: libc.info, Node: Scanning Directory Content, Next: Simple Directory Lister Mark II, Prev: Random Access Directory, Up: Accessing Directories +File: libc.info, Node: Open-time Flags, Next: Operating Modes, Prev: Access Modes, Up: File Status Flags -Scanning the Content of a Directory ------------------------------------ +Open-time Flags +--------------- - A higher-level interface to the directory handling functions is the -`scandir' function. With its help one can select a subset of the -entries in a directory, possibly sort them and get a list of names as -the result. + The open-time flags specify options affecting how `open' will behave. +These options are not preserved once the file is open. The exception to +this is `O_NONBLOCK', which is also an I/O operating mode and so it +_is_ saved. *Note Opening and Closing Files::, for how to call `open'. - - Function: int scandir (const char *DIR, struct dirent ***NAMELIST, - int (*SELECTOR) (const struct dirent *), int (*CMP) (const - void *, const void *)) - The `scandir' function scans the contents of the directory selected - by DIR. The result in *NAMELIST is an array of pointers to - structure of type `struct dirent' which describe all selected - directory entries and which is allocated using `malloc'. Instead - of always getting all directory entries returned, the user supplied - function SELECTOR can be used to decide which entries are in the - result. Only the entries for which SELECTOR returns a non-zero - value are selected. + There are two sorts of options specified by open-time flags. - Finally the entries in *NAMELIST are sorted using the - user-supplied function CMP. The arguments passed to the CMP - function are of type `struct dirent **', therefore one cannot - directly use the `strcmp' or `strcoll' functions; instead see the - functions `alphasort' and `versionsort' below. + * "File name translation flags" affect how `open' looks up the file + name to locate the file, and whether the file can be created. - The return value of the function is the number of entries placed in - *NAMELIST. If it is `-1' an error occurred (either the directory - could not be opened for reading or the malloc call failed) and the - global variable `errno' contains more information on the error. + * "Open-time action flags" specify extra operations that `open' will + perform on the file once it is open. - As described above the fourth argument to the `scandir' function -must be a pointer to a sorting function. For the convenience of the -programmer the GNU C library contains implementations of functions which -are very helpful for this purpose. + Here are the file name translation flags. - - Function: int alphasort (const void *A, const void *B) - The `alphasort' function behaves like the `strcoll' function - (*note String/Array Comparison::). The difference is that the - arguments are not string pointers but instead they are of type - `struct dirent **'. + - Macro: int O_CREAT + If set, the file will be created if it doesn't already exist. - The return value of `alphasort' is less than, equal to, or greater - than zero depending on the order of the two entries A and B. + - Macro: int O_EXCL + If both `O_CREAT' and `O_EXCL' are set, then `open' fails if the + specified file already exists. This is guaranteed to never + clobber an existing file. - - Function: int versionsort (const void *A, const void *B) - The `versionsort' function is like `alphasort' except that it uses - the `strverscmp' function internally. + - Macro: int O_NONBLOCK + This prevents `open' from blocking for a "long time" to open the + file. This is only meaningful for some kinds of files, usually + devices such as serial ports; when it is not meaningful, it is + harmless and ignored. Often opening a port to a modem blocks + until the modem reports carrier detection; if `O_NONBLOCK' is + specified, `open' will return immediately without a carrier. - If the filesystem supports large files we cannot use the `scandir' -anymore since the `dirent' structure might not able to contain all the -information. The LFS provides the new type `struct dirent64'. To use -this we need a new function. + Note that the `O_NONBLOCK' flag is overloaded as both an I/O + operating mode and a file name translation flag. This means that + specifying `O_NONBLOCK' in `open' also sets nonblocking I/O mode; + *note Operating Modes::. To open the file without blocking but do + normal I/O that blocks, you must call `open' with `O_NONBLOCK' set + and then call `fcntl' to turn the bit off. - - Function: int scandir64 (const char *DIR, struct dirent64 - ***NAMELIST, int (*SELECTOR) (const struct dirent64 *), int - (*CMP) (const void *, const void *)) - The `scandir64' function works like the `scandir' function except - that the directory entries it returns are described by elements of - type `struct dirent64'. The function pointed to by SELECTOR is - again used to select the desired entries, except that SELECTOR now - must point to a function which takes a `struct dirent64 *' - parameter. + - Macro: int O_NOCTTY + If the named file is a terminal device, don't make it the + controlling terminal for the process. *Note Job Control::, for + information about what it means to be the controlling terminal. - Similarly the CMP function should expect its two arguments to be - of type `struct dirent64 **'. + In the GNU system and 4.4 BSD, opening a file never makes it the + controlling terminal and `O_NOCTTY' is zero. However, other + systems may use a nonzero value for `O_NOCTTY' and set the + controlling terminal when you open a file that is a terminal + device; so to be portable, use `O_NOCTTY' when it is important to + avoid this. - As CMP is now a function of a different type, the functions -`alphasort' and `versionsort' cannot be supplied for that argument. -Instead we provide the two replacement functions below. + The following three file name translation flags exist only in the +GNU system. - - Function: int alphasort64 (const void *A, const void *B) - The `alphasort64' function behaves like the `strcoll' function - (*note String/Array Comparison::). The difference is that the - arguments are not string pointers but instead they are of type - `struct dirent64 **'. + - Macro: int O_IGNORE_CTTY + Do not recognize the named file as the controlling terminal, even + if it refers to the process's existing controlling terminal + device. Operations on the new file descriptor will never induce + job control signals. *Note Job Control::. - Return value of `alphasort64' is less than, equal to, or greater - than zero depending on the order of the two entries A and B. + - Macro: int O_NOLINK + If the named file is a symbolic link, open the link itself instead + of the file it refers to. (`fstat' on the new file descriptor will + return the information returned by `lstat' on the link's name.) - - Function: int versionsort64 (const void *A, const void *B) - The `versionsort64' function is like `alphasort64', excepted that - it uses the `strverscmp' function internally. + - Macro: int O_NOTRANS + If the named file is specially translated, do not invoke the + translator. Open the bare file the translator itself sees. - It is important not to mix the use of `scandir' and the 64-bit -comparison functions or vice versa. There are systems on which this -works but on others it will fail miserably. + The open-time action flags tell `open' to do additional operations +which are not really related to opening the file. The reason to do them +as part of `open' instead of in separate calls is that `open' can do +them atomically. - -File: libc.info, Node: Simple Directory Lister Mark II, Prev: Scanning Directory Content, Up: Accessing Directories + - Macro: int O_TRUNC + Truncate the file to zero length. This option is only useful for + regular files, not special files such as directories or FIFOs. + POSIX.1 requires that you open the file for writing to use + `O_TRUNC'. In BSD and GNU you must have permission to write the + file to truncate it, but you need not open for write access. -Simple Program to List a Directory, Mark II -------------------------------------------- + This is the only open-time action flag specified by POSIX.1. + There is no good reason for truncation to be done by `open', + instead of by calling `ftruncate' afterwards. The `O_TRUNC' flag + existed in Unix before `ftruncate' was invented, and is retained + for backward compatibility. - Here is a revised version of the directory lister found above (*note -Simple Directory Lister::). Using the `scandir' function we can avoid -the functions which work directly with the directory contents. After -the call the returned entries are available for direct use. + The remaining operating modes are BSD extensions. They exist only +on some systems. On other systems, these macros are not defined. - #include - #include - - static int - one (struct dirent *unused) - { - return 1; - } - - int - main (void) - { - struct dirent **eps; - int n; - - n = scandir ("./", &eps, one, alphasort); - if (n >= 0) - { - int cnt; - for (cnt = 0; cnt < n; ++cnt) - puts (eps[cnt]->d_name); - } - else - perror ("Couldn't open the directory"); - - return 0; - } + - Macro: int O_SHLOCK + Acquire a shared lock on the file, as with `flock'. *Note File + Locks::. - Note the simple selector function in this example. Since we want to -see all directory entries we always return `1'. + If `O_CREAT' is specified, the locking is done atomically when + creating the file. You are guaranteed that no other process will + get the lock on the new file first. + + - Macro: int O_EXLOCK + Acquire an exclusive lock on the file, as with `flock'. *Note + File Locks::. This is atomic like `O_SHLOCK'.  -File: libc.info, Node: Working with Directory Trees, Next: Hard Links, Prev: Accessing Directories, Up: File System Interface +File: libc.info, Node: Operating Modes, Next: Getting File Status Flags, Prev: Open-time Flags, Up: File Status Flags -Working with Directory Trees -============================ +I/O Operating Modes +------------------- - The functions described so far for handling the files in a directory -have allowed you to either retrieve the information bit by bit, or to -process all the files as a group (see `scandir'). Sometimes it is -useful to process whole hierarchies of directories and their contained -files. The X/Open specification defines two functions to do this. The -simpler form is derived from an early definition in System V systems -and therefore this function is available on SVID-derived systems. The -prototypes and required definitions can be found in the `ftw.h' header. + The operating modes affect how input and output operations using a +file descriptor work. These flags are set by `open' and can be fetched +and changed with `fcntl'. - There are four functions in this family: `ftw', `nftw' and their -64-bit counterparts `ftw64' and `nftw64'. These functions take as one -of their arguments a pointer to a callback function of the appropriate -type. + - Macro: int O_APPEND + The bit that enables append mode for the file. If set, then all + `write' operations write the data at the end of the file, extending + it, regardless of the current file position. This is the only + reliable way to append to a file. In append mode, you are + guaranteed that the data you write will always go to the current + end of the file, regardless of other processes writing to the + file. Conversely, if you simply set the file position to the end + of file and write, then another process can extend the file after + you set the file position but before you write, resulting in your + data appearing someplace before the real end of file. - - Data Type: __ftw_func_t - int (*) (const char *, const struct stat *, int) + - Macro: int O_NONBLOCK + The bit that enables nonblocking mode for the file. If this bit + is set, `read' requests on the file can return immediately with a + failure status if there is no input immediately available, instead + of blocking. Likewise, `write' requests can also return + immediately with a failure status if the output can't be written + immediately. - The type of callback functions given to the `ftw' function. The - first parameter points to the file name, the second parameter to an - object of type `struct stat' which is filled in for the file named - in the first parameter. + Note that the `O_NONBLOCK' flag is overloaded as both an I/O + operating mode and a file name translation flag; *note Open-time + Flags::. - The last parameter is a flag giving more information about the - current file. It can have the following values: + - Macro: int O_NDELAY + This is an obsolete name for `O_NONBLOCK', provided for + compatibility with BSD. It is not defined by the POSIX.1 standard. - `FTW_F' - The item is either a normal file or a file which does not fit - into one of the following categories. This could be special - files, sockets etc. + The remaining operating modes are BSD and GNU extensions. They +exist only on some systems. On other systems, these macros are not +defined. - `FTW_D' - The item is a directory. + - Macro: int O_ASYNC + The bit that enables asynchronous input mode. If set, then `SIGIO' + signals will be generated when input is available. *Note + Interrupt Input::. - `FTW_NS' - The `stat' call failed and so the information pointed to by - the second paramater is invalid. + Asynchronous input mode is a BSD feature. - `FTW_DNR' - The item is a directory which cannot be read. + - Macro: int O_FSYNC + The bit that enables synchronous writing for the file. If set, + each `write' call will make sure the data is reliably stored on + disk before returning. Synchronous writing is a BSD feature. - `FTW_SL' - The item is a symbolic link. Since symbolic links are - normally followed seeing this value in a `ftw' callback - function means the referenced file does not exist. The - situation for `nftw' is different. + - Macro: int O_SYNC + This is another name for `O_FSYNC'. They have the same value. - This value is only available if the program is compiled with - `_BSD_SOURCE' or `_XOPEN_EXTENDED' defined before including - the first header. The original SVID systems do not have - symbolic links. + - Macro: int O_NOATIME + If this bit is set, `read' will not update the access time of the + file. *Note File Times::. This is used by programs that do + backups, so that backing a file up does not count as reading it. + Only the owner of the file or the superuser may use this bit. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' this - type is in fact `__ftw64_func_t' since this mode changes `struct - stat' to be `struct stat64'. + This is a GNU extension. - For the LFS interface and for use in the function `ftw64', the -header `ftw.h' defines another function type. + +File: libc.info, Node: Getting File Status Flags, Prev: Operating Modes, Up: File Status Flags - - Data Type: __ftw64_func_t - int (*) (const char *, const struct stat64 *, int) +Getting and Setting File Status Flags +------------------------------------- - This type is used just like `__ftw_func_t' for the callback - function, but this time is called from `ftw64'. The second - parameter to the function is a pointer to a variable of type - `struct stat64' which is able to represent the larger values. + The `fcntl' function can fetch or change file status flags. - - Data Type: __nftw_func_t - int (*) (const char *, const struct stat *, int, struct FTW *) + - Macro: int F_GETFL + This macro is used as the COMMAND argument to `fcntl', to read the + file status flags for the open file with descriptor FILEDES. - The first three arguments are the same as for the `__ftw_func_t' - type. However for the third argument some additional values are - defined to allow finer differentiation: - `FTW_DP' - The current item is a directory and all subdirectories have - already been visited and reported. This flag is returned - instead of `FTW_D' if the `FTW_DEPTH' flag is passed to - `nftw' (see below). + The normal return value from `fcntl' with this command is a + nonnegative number which can be interpreted as the bitwise OR of + the individual flags. Since the file access modes are not + single-bit values, you can mask off other bits in the returned + flags with `O_ACCMODE' to compare them. - `FTW_SLN' - The current item is a stale symbolic link. The file it - points to does not exist. + In case of an error, `fcntl' returns -1. The following `errno' + error conditions are defined for this command: - The last parameter of the callback function is a pointer to a - structure with some extra information as described below. + `EBADF' + The FILEDES argument is invalid. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' this - type is in fact `__nftw64_func_t' since this mode changes `struct - stat' to be `struct stat64'. + - Macro: int F_SETFL + This macro is used as the COMMAND argument to `fcntl', to set the + file status flags for the open file corresponding to the FILEDES + argument. This command requires a third `int' argument to specify + the new flags, so the call looks like this: - For the LFS interface there is also a variant of this data type -available which has to be used with the `nftw64' function. + fcntl (FILEDES, F_SETFL, NEW-FLAGS) - - Data Type: __nftw64_func_t - int (*) (const char *, const struct stat64 *, int, struct FTW *) + You can't change the access mode for the file in this way; that is, + whether the file descriptor was opened for reading or writing. - This type is used just like `__nftw_func_t' for the callback - function, but this time is called from `nftw64'. The second - parameter to the function is this time a pointer to a variable of - type `struct stat64' which is able to represent the larger values. + The normal return value from `fcntl' with this command is an + unspecified value other than -1, which indicates an error. The + error conditions are the same as for the `F_GETFL' command. - - Data Type: struct FTW - The information contained in this structure helps in interpreting - the name parameter and gives some information about the current - state of the traversal of the directory hierarchy. + If you want to modify the file status flags, you should get the +current flags with `F_GETFL' and modify the value. Don't assume that +the flags listed here are the only ones that are implemented; your +program may be run years from now and more flags may exist then. For +example, here is a function to set or clear the flag `O_NONBLOCK' +without altering any other flags: - `int base' - The value is the offset into the string passed in the first - parameter to the callback function of the beginning of the - file name. The rest of the string is the path of the file. - This information is especially important if the `FTW_CHDIR' - flag was set in calling `nftw' since then the current - directory is the one the current item is found in. + /* Set the `O_NONBLOCK' flag of DESC if VALUE is nonzero, + or clear the flag if VALUE is 0. + Return 0 on success, or -1 on error with `errno' set. */ + + int + set_nonblock_flag (int desc, int value) + { + int oldflags = fcntl (desc, F_GETFL, 0); + /* If reading the flags failed, return error indication now. */ + if (oldflags == -1) + return -1; + /* Set just the flag we want to set. */ + if (value != 0) + oldflags |= O_NONBLOCK; + else + oldflags &= ~O_NONBLOCK; + /* Store modified flag word in the descriptor. */ + return fcntl (desc, F_SETFL, oldflags); + } - `int level' - Whilst processing, the code tracks how many directories down - it has gone to find the current file. This nesting level - starts at 0 for files in the initial directory (or is zero - for the initial file if a file was passed). + +File: libc.info, Node: File Locks, Next: Interrupt Input, Prev: File Status Flags, Up: Low-Level I/O - - Function: int ftw (const char *FILENAME, __ftw_func_t FUNC, int - DESCRIPTORS) - The `ftw' function calls the callback function given in the - parameter FUNC for every item which is found in the directory - specified by FILENAME and all directories below. The function - follows symbolic links if necessary but does not process an item - twice. If FILENAME is not a directory then it itself is the only - object returned to the callback function. +File Locks +========== - The file name passed to the callback function is constructed by - taking the FILENAME parameter and appending the names of all passed - directories and then the local file name. So the callback - function can use this parameter to access the file. `ftw' also - calls `stat' for the file and passes that information on to the - callback function. If this `stat' call was not successful the - failure is indicated by setting the third argument of the callback - function to `FTW_NS'. Otherwise it is set according to the - description given in the account of `__ftw_func_t' above. + The remaining `fcntl' commands are used to support "record locking", +which permits multiple cooperating programs to prevent each other from +simultaneously accessing parts of a file in error-prone ways. - The callback function is expected to return 0 to indicate that no - error occurred and that processing should continue. If an error - occurred in the callback function or it wants `ftw' to return - immediately, the callback function can return a value other than - 0. This is the only correct way to stop the function. The - program must not use `setjmp' or similar techniques to continue - from another place. This would leave resources allocated by the - `ftw' function unfreed. + An "exclusive" or "write" lock gives a process exclusive access for +writing to the specified part of the file. While a write lock is in +place, no other process can lock that part of the file. - The DESCRIPTORS parameter to `ftw' specifies how many file - descriptors it is allowed to consume. The function runs faster - the more descriptors it can use. For each level in the directory - hierarchy at most one descriptor is used, but for very deep ones - any limit on open file descriptors for the process or the system - may be exceeded. Moreover, file descriptor limits in a - multi-threaded program apply to all the threads as a group, and - therefore it is a good idea to supply a reasonable limit to the - number of open descriptors. + A "shared" or "read" lock prohibits any other process from +requesting a write lock on the specified part of the file. However, +other processes can request read locks. - The return value of the `ftw' function is 0 if all callback - function calls returned 0 and all actions performed by the `ftw' - succeeded. If a function call failed (other than calling `stat' - on an item) the function returns -1. If a callback function - returns a value other than 0 this value is returned as the return - value of `ftw'. + The `read' and `write' functions do not actually check to see +whether there are any locks in place. If you want to implement a +locking protocol for a file shared by multiple processes, your +application must do explicit `fcntl' calls to request and clear locks +at the appropriate points. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is in fact `ftw64', i.e. the LFS - interface transparently replaces the old interface. + Locks are associated with processes. A process can only have one +kind of lock set for each byte of a given file. When any file +descriptor for that file is closed by the process, all of the locks +that process holds on that file are released, even if the locks were +made using other descriptors that remain open. Likewise, locks are +released when a process exits, and are not inherited by child processes +created using `fork' (*note Creating a Process::). - - Function: int ftw64 (const char *FILENAME, __ftw64_func_t FUNC, int - DESCRIPTORS) - This function is similar to `ftw' but it can work on filesystems - with large files. File information is reported using a variable - of type `struct stat64' which is passed by reference to the - callback function. + When making a lock, use a `struct flock' to specify what kind of +lock and where. This data type and the associated macros for the +`fcntl' function are declared in the header file `fcntl.h'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is available under the name `ftw' and - transparently replaces the old implementation. + - Data Type: struct flock + This structure is used with the `fcntl' function to describe a file + lock. It has these members: - - Function: int nftw (const char *FILENAME, __nftw_func_t FUNC, int - DESCRIPTORS, int FLAG) - The `nftw' function works like the `ftw' functions. They call the - callback function FUNC for all items found in the directory - FILENAME and below. At most DESCRIPTORS file descriptors are - consumed during the `nftw' call. + `short int l_type' + Specifies the type of the lock; one of `F_RDLCK', `F_WRLCK', + or `F_UNLCK'. - One difference is that the callback function is of a different - type. It is of type `struct FTW *' and provides the callback - function with the extra information described above. + `short int l_whence' + This corresponds to the WHENCE argument to `fseek' or + `lseek', and specifies what the offset is relative to. Its + value can be one of `SEEK_SET', `SEEK_CUR', or `SEEK_END'. - A second difference is that `nftw' takes a fourth argument, which - is 0 or a bitwise-OR combination of any of the following values. + `off_t l_start' + This specifies the offset of the start of the region to which + the lock applies, and is given in bytes relative to the point + specified by `l_whence' member. - `FTW_PHYS' - While traversing the directory symbolic links are not - followed. Instead symbolic links are reported using the - `FTW_SL' value for the type parameter to the callback - function. If the file referenced by a symbolic link does not - exist `FTW_SLN' is returned instead. + `off_t l_len' + This specifies the length of the region to be locked. A + value of `0' is treated specially; it means the region + extends to the end of the file. - `FTW_MOUNT' - The callback function is only called for items which are on - the same mounted filesystem as the directory given by the - FILENAME parameter to `nftw'. + `pid_t l_pid' + This field is the process ID (*note Process Creation + Concepts::) of the process holding the lock. It is filled in + by calling `fcntl' with the `F_GETLK' command, but is ignored + when making a lock. - `FTW_CHDIR' - If this flag is given the current working directory is - changed to the directory of the reported object before the - callback function is called. When `ntfw' finally returns the - current directory is restored to its original value. + - Macro: int F_GETLK + This macro is used as the COMMAND argument to `fcntl', to specify + that it should get information about a lock. This command + requires a third argument of type `struct flock *' to be passed to + `fcntl', so that the form of the call is: - `FTW_DEPTH' - If this option is specified then all subdirectories and files - within them are processed before processing the top directory - itself (depth-first processing). This also means the type - flag given to the callback function is `FTW_DP' and not - `FTW_D'. + fcntl (FILEDES, F_GETLK, LOCKP) - The return value is computed in the same way as for `ftw'. `nftw' - returns 0 if no failures occurred and all callback functions - returned 0. In case of internal errors, such as memory problems, - the return value is -1 and ERRNO is set accordingly. If the - return value of a callback invocation was non-zero then that value - is returned. + If there is a lock already in place that would block the lock + described by the LOCKP argument, information about that lock + overwrites `*LOCKP'. Existing locks are not reported if they are + compatible with making a new lock as specified. Thus, you should + specify a lock type of `F_WRLCK' if you want to find out about both + read and write locks, or `F_RDLCK' if you want to find out about + write locks only. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is in fact `nftw64', i.e. the LFS - interface transparently replaces the old interface. + There might be more than one lock affecting the region specified + by the LOCKP argument, but `fcntl' only returns information about + one of them. The `l_whence' member of the LOCKP structure is set + to `SEEK_SET' and the `l_start' and `l_len' fields set to identify + the locked region. - - Function: int nftw64 (const char *FILENAME, __nftw64_func_t FUNC, - int DESCRIPTORS, int FLAG) - This function is similar to `nftw' but it can work on filesystems - with large files. File information is reported using a variable - of type `struct stat64' which is passed by reference to the - callback function. + If no lock applies, the only change to the LOCKP structure is to + update the `l_type' to a value of `F_UNLCK'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is available under the name `nftw' and - transparently replaces the old implementation. + The normal return value from `fcntl' with this command is an + unspecified value other than -1, which is reserved to indicate an + error. The following `errno' error conditions are defined for + this command: - -File: libc.info, Node: Hard Links, Next: Symbolic Links, Prev: Working with Directory Trees, Up: File System Interface + `EBADF' + The FILEDES argument is invalid. -Hard Links -========== + `EINVAL' + Either the LOCKP argument doesn't specify valid lock + information, or the file associated with FILEDES doesn't + support locks. - In POSIX systems, one file can have many names at the same time. -All of the names are equally real, and no one of them is preferred to -the others. + - Macro: int F_SETLK + This macro is used as the COMMAND argument to `fcntl', to specify + that it should set or clear a lock. This command requires a third + argument of type `struct flock *' to be passed to `fcntl', so that + the form of the call is: - To add a name to a file, use the `link' function. (The new name is -also called a "hard link" to the file.) Creating a new link to a file -does not copy the contents of the file; it simply makes a new name by -which the file can be known, in addition to the file's existing name or -names. + fcntl (FILEDES, F_SETLK, LOCKP) - One file can have names in several directories, so the organization -of the file system is not a strict hierarchy or tree. + If the process already has a lock on any part of the region, the + old lock on that part is replaced with the new lock. You can + remove a lock by specifying a lock type of `F_UNLCK'. - In most implementations, it is not possible to have hard links to the -same file in multiple file systems. `link' reports an error if you try -to make a hard link to the file from another file system when this -cannot be done. + If the lock cannot be set, `fcntl' returns immediately with a value + of -1. This function does not block waiting for other processes + to release locks. If `fcntl' succeeds, it return a value other + than -1. - The prototype for the `link' function is declared in the header file -`unistd.h'. + The following `errno' error conditions are defined for this + function: - - Function: int link (const char *OLDNAME, const char *NEWNAME) - The `link' function makes a new link to the existing file named by - OLDNAME, under the new name NEWNAME. + `EAGAIN' + `EACCES' + The lock cannot be set because it is blocked by an existing + lock on the file. Some systems use `EAGAIN' in this case, + and other systems use `EACCES'; your program should treat + them alike, after `F_SETLK'. (The GNU system always uses + `EAGAIN'.) - This function returns a value of `0' if it is successful and `-1' - on failure. In addition to the usual file name errors (*note File - Name Errors::) for both OLDNAME and NEWNAME, the following `errno' - error conditions are defined for this function: + `EBADF' + Either: the FILEDES argument is invalid; you requested a read + lock but the FILEDES is not open for read access; or, you + requested a write lock but the FILEDES is not open for write + access. - `EACCES' - You are not allowed to write to the directory in which the - new link is to be written. + `EINVAL' + Either the LOCKP argument doesn't specify valid lock + information, or the file associated with FILEDES doesn't + support locks. - `EEXIST' - There is already a file named NEWNAME. If you want to replace - this link with a new link, you must remove the old link - explicitly first. + `ENOLCK' + The system has run out of file lock resources; there are + already too many file locks in place. - `EMLINK' - There are already too many links to the file named by OLDNAME. - (The maximum number of links to a file is `LINK_MAX'; see - *Note Limits for Files::.) + Well-designed file systems never report this error, because + they have no limitation on the number of locks. However, you + must still take account of the possibility of this error, as + it could result from network access to a file system on + another machine. - `ENOENT' - The file named by OLDNAME doesn't exist. You can't make a - link to a file that doesn't exist. + - Macro: int F_SETLKW + This macro is used as the COMMAND argument to `fcntl', to specify + that it should set or clear a lock. It is just like the `F_SETLK' + command, but causes the process to block (or wait) until the + request can be specified. - `ENOSPC' - The directory or file system that would contain the new link - is full and cannot be extended. + This command requires a third argument of type `struct flock *', as + for the `F_SETLK' command. - `EPERM' - In the GNU system and some others, you cannot make links to - directories. Many systems allow only privileged users to do - so. This error is used to report the problem. + The `fcntl' return values and errors are the same as for the + `F_SETLK' command, but these additional `errno' error conditions + are defined for this command: - `EROFS' - The directory containing the new link can't be modified - because it's on a read-only file system. + `EINTR' + The function was interrupted by a signal while it was waiting. + *Note Interrupted Primitives::. - `EXDEV' - The directory specified in NEWNAME is on a different file - system than the existing file. + `EDEADLK' + The specified region is being locked by another process. But + that process is waiting to lock a region which the current + process has locked, so waiting for the lock would result in + deadlock. The system does not guarantee that it will detect + all such conditions, but it lets you know if it notices one. - `EIO' - A hardware error occurred while trying to read or write the - to filesystem. + The following macros are defined for use as values for the `l_type' +member of the `flock' structure. The values are integer constants. - -File: libc.info, Node: Symbolic Links, Next: Deleting Files, Prev: Hard Links, Up: File System Interface +`F_RDLCK' + This macro is used to specify a read (or shared) lock. -Symbolic Links -============== +`F_WRLCK' + This macro is used to specify a write (or exclusive) lock. - The GNU system supports "soft links" or "symbolic links". This is a -kind of "file" that is essentially a pointer to another file name. -Unlike hard links, symbolic links can be made to directories or across -file systems with no restrictions. You can also make a symbolic link -to a name which is not the name of any file. (Opening this link will -fail until a file by that name is created.) Likewise, if the symbolic -link points to an existing file which is later deleted, the symbolic -link continues to point to the same file name even though the name no -longer names any file. +`F_UNLCK' + This macro is used to specify that the region is unlocked. - The reason symbolic links work the way they do is that special things -happen when you try to open the link. The `open' function realizes you -have specified the name of a link, reads the file name contained in the -link, and opens that file name instead. The `stat' function likewise -operates on the file that the symbolic link points to, instead of on -the link itself. + As an example of a situation where file locking is useful, consider a +program that can be run simultaneously by several different users, that +logs status information to a common file. One example of such a program +might be a game that uses a file to keep track of high scores. Another +example might be a program that records usage or accounting information +for billing purposes. - By contrast, other operations such as deleting or renaming the file -operate on the link itself. The functions `readlink' and `lstat' also -refrain from following symbolic links, because their purpose is to -obtain information about the link. `link', the function that makes a -hard link, does too. It makes a hard link to the symbolic link, which -one rarely wants. + Having multiple copies of the program simultaneously writing to the +file could cause the contents of the file to become mixed up. But you +can prevent this kind of problem by setting a write lock on the file +before actually writing to the file. - Some systems have for some functions operating on files have a limit -on how many symbolic links are followed when resolving a path name. The -limit if it exists is published in the `sys/param.h' header file. + If the program also needs to read the file and wants to make sure +that the contents of the file are in a consistent state, then it can +also use a read lock. While the read lock is set, no other process can +lock that part of the file for writing. - - Macro: int MAXSYMLINKS - The macro `MAXSYMLINKS' specifies how many symlinks some function - will follow before returning `ELOOP'. Not all functions behave the - same and this value is not the same a that returned for - `_SC_SYMLOOP' by `sysconf'. In fact, the `sysconf' result can - indicate that there is no fixed limit although `MAXSYMLINKS' - exists and has a finite value. + Remember that file locks are only a _voluntary_ protocol for +controlling access to a file. There is still potential for access to +the file by programs that don't use the lock protocol. - Prototypes for most of the functions listed in this section are in -`unistd.h'. + +File: libc.info, Node: Interrupt Input, Next: IOCTLs, Prev: File Locks, Up: Low-Level I/O - - Function: int symlink (const char *OLDNAME, const char *NEWNAME) - The `symlink' function makes a symbolic link to OLDNAME named - NEWNAME. +Interrupt-Driven Input +====================== - The normal return value from `symlink' is `0'. A return value of - `-1' indicates an error. In addition to the usual file name - syntax errors (*note File Name Errors::), the following `errno' - error conditions are defined for this function: + If you set the `O_ASYNC' status flag on a file descriptor (*note +File Status Flags::), a `SIGIO' signal is sent whenever input or output +becomes possible on that file descriptor. The process or process group +to receive the signal can be selected by using the `F_SETOWN' command +to the `fcntl' function. If the file descriptor is a socket, this also +selects the recipient of `SIGURG' signals that are delivered when +out-of-band data arrives on that socket; see *Note Out-of-Band Data::. +(`SIGURG' is sent in any situation where `select' would report the +socket as having an "exceptional condition". *Note Waiting for I/O::.) - `EEXIST' - There is already an existing file named NEWNAME. + If the file descriptor corresponds to a terminal device, then `SIGIO' +signals are sent to the foreground process group of the terminal. +*Note Job Control::. - `EROFS' - The file NEWNAME would exist on a read-only file system. + The symbols in this section are defined in the header file `fcntl.h'. - `ENOSPC' - The directory or file system cannot be extended to make the - new link. + - Macro: int F_GETOWN + This macro is used as the COMMAND argument to `fcntl', to specify + that it should get information about the process or process group + to which `SIGIO' signals are sent. (For a terminal, this is + actually the foreground process group ID, which you can get using + `tcgetpgrp'; see *Note Terminal Access Functions::.) - `EIO' - A hardware error occurred while reading or writing data on - the disk. + The return value is interpreted as a process ID; if negative, its + absolute value is the process group ID. + The following `errno' error condition is defined for this command: - - Function: int readlink (const char *FILENAME, char *BUFFER, size_t - SIZE) - The `readlink' function gets the value of the symbolic link - FILENAME. The file name that the link points to is copied into - BUFFER. This file name string is _not_ null-terminated; - `readlink' normally returns the number of characters copied. The - SIZE argument specifies the maximum number of characters to copy, - usually the allocation size of BUFFER. + `EBADF' + The FILEDES argument is invalid. - If the return value equals SIZE, you cannot tell whether or not - there was room to return the entire name. So make a bigger buffer - and call `readlink' again. Here is an example: + - Macro: int F_SETOWN + This macro is used as the COMMAND argument to `fcntl', to specify + that it should set the process or process group to which `SIGIO' + signals are sent. This command requires a third argument of type + `pid_t' to be passed to `fcntl', so that the form of the call is: - char * - readlink_malloc (const char *filename) - { - int size = 100; - - while (1) - { - char *buffer = (char *) xmalloc (size); - int nchars = readlink (filename, buffer, size); - if (nchars < 0) - return NULL; - if (nchars < size) - return buffer; - free (buffer); - size *= 2; - } - } + fcntl (FILEDES, F_SETOWN, PID) - A value of `-1' is returned in case of error. In addition to the - usual file name errors (*note File Name Errors::), the following - `errno' error conditions are defined for this function: + The PID argument should be a process ID. You can also pass a + negative number whose absolute value is a process group ID. - `EINVAL' - The named file is not a symbolic link. + The return value from `fcntl' with this command is -1 in case of + error and some other value if successful. The following `errno' + error conditions are defined for this command: - `EIO' - A hardware error occurred while reading or writing data on - the disk. + `EBADF' + The FILEDES argument is invalid. - In some situations it is desirable to resolve all the to get the real -name of a file where no prefix names a symbolic link which is followed -and no filename in the path is `.' or `..'. This is for instance -desirable if files have to be compare in which case different names can -refer to the same inode. + `ESRCH' + There is no process or process group corresponding to PID. - - Function: char * canonicalize_file_name (const char *NAME) - The `canonicalize_file_name' function returns the absolute name of - the file named by NAME which contains no `.', `..' components nor - any repeated path separators (`/') or symlinks. The result is - passed back as the return value of the function in a block of - memory allocated with `malloc'. If the result is not used anymore - the memory should be freed with a call to `free'. + +File: libc.info, Node: IOCTLs, Prev: Interrupt Input, Up: Low-Level I/O - In any of the path components except the last one is missing the - function returns a NULL pointer. This is also what is returned if - the length of the path reaches or exceeds `PATH_MAX' characters. - In any case `errno' is set accordingly. +Generic I/O Control operations +============================== - `ENAMETOOLONG' - The resulting path is too long. This error only occurs on - systems which have a limit on the file name length. + The GNU system can handle most input/output operations on many +different devices and objects in terms of a few file primitives - +`read', `write' and `lseek'. However, most devices also have a few +peculiar operations which do not fit into this model. Such as: - `EACCES' - At least one of the path components is not readable. + * Changing the character font used on a terminal. - `ENOENT' - The input file name is empty. + * Telling a magnetic tape system to rewind or fast forward. (Since + they cannot move in byte increments, `lseek' is inapplicable). - `ENOENT' - At least one of the path components does not exist. + * Ejecting a disk from a drive. - `ELOOP' - More than `MAXSYMLINKS' many symlinks have been followed. + * Playing an audio track from a CD-ROM drive. - This function is a GNU extension and is declared in `stdlib.h'. + * Maintaining routing tables for a network. - The Unix standard includes a similar function which differs from -`canonicalize_file_name' in that the user has to provide the buffer -where the result is placed in. - - Function: char * realpath (const char *restrict NAME, char *restrict - RESOLVED) - The `realpath' function behaves just like `canonicalize_file_name' - but instead of allocating a buffer for the result it is placed in - the buffer pointed to by RESOLVED. + Although some such objects such as sockets and terminals (1) have +special functions of their own, it would not be practical to create +functions for all these cases. - One other difference is that the buffer RESOLVED will contain the - part of the path component which does not exist or is not readable - if the function returns `NULL' and `errno' is set to `EACCES' or - `ENOENT'. + Instead these minor operations, known as "IOCTL"s, are assigned code +numbers and multiplexed through the `ioctl' function, defined in +`sys/ioctl.h'. The code numbers themselves are defined in many +different headers. - This function is declared in `stdlib.h'. + - Function: int ioctl (int FILEDES, int COMMAND, ...) + The `ioctl' function performs the generic I/O operation COMMAND on + FILEDES. - The advantage of using this function is that it is more widely -available. The drawback is that it reports failures for long path on -systems which have no limits on the file name length. + A third argument is usually present, either a single number or a + pointer to a structure. The meaning of this argument, the + returned value, and any error codes depends upon the command used. + Often -1 is returned for a failure. + + + On some systems, IOCTLs used by different devices share the same +numbers. Thus, although use of an inappropriate IOCTL _usually_ only +produces an error, you should not attempt to use device-specific IOCTLs +on an unknown device. + + Most IOCTLs are OS-specific and/or only used in special system +utilities, and are thus beyond the scope of this document. For an +example of the use of an IOCTL, see *Note Out-of-Band Data::. + + ---------- Footnotes ---------- + + (1) Actually, the terminal-specific functions are implemented with +IOCTLs on many platforms. diff -durpN glibc-2.2.4/manual/libc.info-24 glibc-2.2.5/manual/libc.info-24 --- glibc-2.2.4/manual/libc.info-24 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-24 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1131 +33,1136 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Deleting Files, Next: Renaming Files, Prev: Symbolic Links, Up: File System Interface - -Deleting Files -============== - - You can delete a file with `unlink' or `remove'. - - Deletion actually deletes a file name. If this is the file's only -name, then the file is deleted as well. If the file has other -remaining names (*note Hard Links::), it remains accessible under those -names. - - - Function: int unlink (const char *FILENAME) - The `unlink' function deletes the file name FILENAME. If this is - a file's sole name, the file itself is also deleted. (Actually, - if any process has the file open when this happens, deletion is - postponed until all processes have closed the file.) - - The function `unlink' is declared in the header file `unistd.h'. - - This function returns `0' on successful completion, and `-1' on - error. In addition to the usual file name errors (*note File Name - Errors::), the following `errno' error conditions are defined for - this function: - - `EACCES' - Write permission is denied for the directory from which the - file is to be removed, or the directory has the sticky bit - set and you do not own the file. - - `EBUSY' - This error indicates that the file is being used by the - system in such a way that it can't be unlinked. For example, - you might see this error if the file name specifies the root - directory or a mount point for a file system. - - `ENOENT' - The file name to be deleted doesn't exist. - - `EPERM' - On some systems `unlink' cannot be used to delete the name of - a directory, or at least can only be used this way by a - privileged user. To avoid such problems, use `rmdir' to - delete directories. (In the GNU system `unlink' can never - delete the name of a directory.) - - `EROFS' - The directory containing the file name to be deleted is on a - read-only file system and can't be modified. - - - Function: int rmdir (const char *FILENAME) - The `rmdir' function deletes a directory. The directory must be - empty before it can be removed; in other words, it can only contain - entries for `.' and `..'. +File: libc.info, Node: File System Interface, Next: Pipes and FIFOs, Prev: Low-Level I/O, Up: Top - In most other respects, `rmdir' behaves like `unlink'. There are - two additional `errno' error conditions defined for `rmdir': +File System Interface +********************* - `ENOTEMPTY' - `EEXIST' - The directory to be deleted is not empty. + This chapter describes the GNU C library's functions for manipulating +files. Unlike the input and output functions (*note I/O on Streams::; +*note Low-Level I/O::), these functions are concerned with operating on +the files themselves rather than on their contents. - These two error codes are synonymous; some systems use one, and - some use the other. The GNU system always uses `ENOTEMPTY'. + Among the facilities described in this chapter are functions for +examining or modifying directories, functions for renaming and deleting +files, and functions for examining and setting file attributes such as +access permissions and modification times. - The prototype for this function is declared in the header file - `unistd.h'. +* Menu: - - Function: int remove (const char *FILENAME) - This is the ISO C function to remove a file. It works like - `unlink' for files and like `rmdir' for directories. `remove' is - declared in `stdio.h'. +* Working Directory:: This is used to resolve relative + file names. +* Accessing Directories:: Finding out what files a directory + contains. +* Working with Directory Trees:: Apply actions to all files or a selectable + subset of a directory hierarchy. +* Hard Links:: Adding alternate names to a file. +* Symbolic Links:: A file that ``points to'' a file name. +* Deleting Files:: How to delete a file, and what that means. +* Renaming Files:: Changing a file's name. +* Creating Directories:: A system call just for creating a directory. +* File Attributes:: Attributes of individual files. +* Making Special Files:: How to create special files. +* Temporary Files:: Naming and creating temporary files.  -File: libc.info, Node: Renaming Files, Next: Creating Directories, Prev: Deleting Files, Up: File System Interface - -Renaming Files -============== - - The `rename' function is used to change a file's name. - - - Function: int rename (const char *OLDNAME, const char *NEWNAME) - The `rename' function renames the file OLDNAME to NEWNAME. The - file formerly accessible under the name OLDNAME is afterwards - accessible as NEWNAME instead. (If the file had any other names - aside from OLDNAME, it continues to have those names.) - - The directory containing the name NEWNAME must be on the same file - system as the directory containing the name OLDNAME. +File: libc.info, Node: Working Directory, Next: Accessing Directories, Up: File System Interface - One special case for `rename' is when OLDNAME and NEWNAME are two - names for the same file. The consistent way to handle this case - is to delete OLDNAME. However, in this case POSIX requires that - `rename' do nothing and report success--which is inconsistent. We - don't know what your operating system will do. +Working Directory +================= - If OLDNAME is not a directory, then any existing file named - NEWNAME is removed during the renaming operation. However, if - NEWNAME is the name of a directory, `rename' fails in this case. + Each process has associated with it a directory, called its "current +working directory" or simply "working directory", that is used in the +resolution of relative file names (*note File Name Resolution::). - If OLDNAME is a directory, then either NEWNAME must not exist or - it must name a directory that is empty. In the latter case, the - existing directory named NEWNAME is deleted first. The name - NEWNAME must not specify a subdirectory of the directory `oldname' - which is being renamed. + When you log in and begin a new session, your working directory is +initially set to the home directory associated with your login account +in the system user database. You can find any user's home directory +using the `getpwuid' or `getpwnam' functions; see *Note User Database::. - One useful feature of `rename' is that the meaning of NEWNAME - changes "atomically" from any previously existing file by that - name to its new meaning (i.e. the file that was called OLDNAME). - There is no instant at which NEWNAME is non-existent "in between" - the old meaning and the new meaning. If there is a system crash - during the operation, it is possible for both names to still - exist; but NEWNAME will always be intact if it exists at all. + Users can change the working directory using shell commands like +`cd'. The functions described in this section are the primitives used +by those commands and by other programs for examining and changing the +working directory. - If `rename' fails, it returns `-1'. In addition to the usual file - name errors (*note File Name Errors::), the following `errno' - error conditions are defined for this function: + Prototypes for these functions are declared in the header file +`unistd.h'. - `EACCES' - One of the directories containing NEWNAME or OLDNAME refuses - write permission; or NEWNAME and OLDNAME are directories and - write permission is refused for one of them. + - Function: char * getcwd (char *BUFFER, size_t SIZE) + The `getcwd' function returns an absolute file name representing + the current working directory, storing it in the character array + BUFFER that you provide. The SIZE argument is how you tell the + system the allocation size of BUFFER. - `EBUSY' - A directory named by OLDNAME or NEWNAME is being used by the - system in a way that prevents the renaming from working. - This includes directories that are mount points for - filesystems, and directories that are the current working - directories of processes. + The GNU library version of this function also permits you to + specify a null pointer for the BUFFER argument. Then `getcwd' + allocates a buffer automatically, as with `malloc' (*note + Unconstrained Allocation::). If the SIZE is greater than zero, + then the buffer is that large; otherwise, the buffer is as large + as necessary to hold the result. - `ENOTEMPTY' - `EEXIST' - The directory NEWNAME isn't empty. The GNU system always - returns `ENOTEMPTY' for this, but some other systems return - `EEXIST'. + The return value is BUFFER on success and a null pointer on + failure. The following `errno' error conditions are defined for + this function: `EINVAL' - OLDNAME is a directory that contains NEWNAME. + The SIZE argument is zero and BUFFER is not a null pointer. - `EISDIR' - NEWNAME is a directory but the OLDNAME isn't. + `ERANGE' + The SIZE argument is less than the length of the working + directory name. You need to allocate a bigger array and try + again. - `EMLINK' - The parent directory of NEWNAME would have too many links - (entries). + `EACCES' + Permission to read or search a component of the file name was + denied. - `ENOENT' - The file OLDNAME doesn't exist. + You could implement the behavior of GNU's `getcwd (NULL, 0)' using +only the standard behavior of `getcwd': - `ENOSPC' - The directory that would contain NEWNAME has no room for - another entry, and there is no space left in the file system - to expand it. + char * + gnu_getcwd () + { + size_t size = 100; + + while (1) + { + char *buffer = (char *) xmalloc (size); + if (getcwd (buffer, size) == buffer) + return buffer; + free (buffer); + if (errno != ERANGE) + return 0; + size *= 2; + } + } - `EROFS' - The operation would involve writing to a directory on a - read-only file system. +*Note Malloc Examples::, for information about `xmalloc', which is not +a library function but is a customary name used in most GNU software. - `EXDEV' - The two file names NEWNAME and OLDNAME are on different file - systems. + - Deprecated Function: char * getwd (char *BUFFER) + This is similar to `getcwd', but has no way to specify the size of + the buffer. The GNU library provides `getwd' only for backwards + compatibility with BSD. - -File: libc.info, Node: Creating Directories, Next: File Attributes, Prev: Renaming Files, Up: File System Interface + The BUFFER argument should be a pointer to an array at least + `PATH_MAX' bytes long (*note Limits for Files::). In the GNU + system there is no limit to the size of a file name, so this is not + necessarily enough space to contain the directory name. That is + why this function is deprecated. -Creating Directories -==================== + - Function: char * get_current_dir_name (void) + This `get_current_dir_name' function is bascially equivalent to + `getcwd (NULL, 0)'. The only difference is that the value of the + `PWD' variable is returned if this value is correct. This is a + subtle difference which is visible if the path described by the + `PWD' value is using one or more symbol links in which case the + value returned by `getcwd' can resolve the symbol links and + therefore yield a different result. - Directories are created with the `mkdir' function. (There is also a -shell command `mkdir' which does the same thing.) + This function is a GNU extension. - - Function: int mkdir (const char *FILENAME, mode_t MODE) - The `mkdir' function creates a new, empty directory with name + - Function: int chdir (const char *FILENAME) + This function is used to set the process's working directory to FILENAME. - The argument MODE specifies the file permissions for the new - directory file. *Note Permission Bits::, for more information - about this. - - A return value of `0' indicates successful completion, and `-1' - indicates failure. In addition to the usual file name syntax - errors (*note File Name Errors::), the following `errno' error - conditions are defined for this function: + The normal, successful return value from `chdir' is `0'. A value + of `-1' is returned to indicate an error. The `errno' error + conditions defined for this function are the usual file name + syntax errors (*note File Name Errors::), plus `ENOTDIR' if the + file FILENAME is not a directory. - `EACCES' - Write permission is denied for the parent directory in which - the new directory is to be added. + - Function: int fchdir (int FILEDES) + This function is used to set the process's working directory to + directory associated with the file descriptor FILEDES. - `EEXIST' - A file named FILENAME already exists. + The normal, successful return value from `fchdir' is `0'. A value + of `-1' is returned to indicate an error. The following `errno' + error conditions are defined for this function: - `EMLINK' - The parent directory has too many links (entries). + `EACCES' + Read permission is denied for the directory named by + `dirname'. - Well-designed file systems never report this error, because - they permit more links than your disk could possibly hold. - However, you must still take account of the possibility of - this error, as it could result from network access to a file - system on another machine. + `EBADF' + The FILEDES argument is not a valid file descriptor. - `ENOSPC' - The file system doesn't have enough room to create the new + `ENOTDIR' + The file descriptor FILEDES is not associated with a directory. - `EROFS' - The parent directory of the directory being created is on a - read-only file system and cannot be modified. + `EINTR' + The function call was interrupt by a signal. - To use this function, your program should include the header file - `sys/stat.h'. + `EIO' + An I/O error occurred.  -File: libc.info, Node: File Attributes, Next: Making Special Files, Prev: Creating Directories, Up: File System Interface +File: libc.info, Node: Accessing Directories, Next: Working with Directory Trees, Prev: Working Directory, Up: File System Interface -File Attributes -=============== +Accessing Directories +===================== - When you issue an `ls -l' shell command on a file, it gives you -information about the size of the file, who owns it, when it was last -modified, etc. These are called the "file attributes", and are -associated with the file itself and not a particular one of its names. + The facilities described in this section let you read the contents +of a directory file. This is useful if you want your program to list +all the files in a directory, perhaps as part of a menu. - This section contains information about how you can inquire about and -modify the attributes of a file. + The `opendir' function opens a "directory stream" whose elements are +directory entries. You use the `readdir' function on the directory +stream to retrieve these entries, represented as `struct dirent' +objects. The name of the file for each entry is stored in the `d_name' +member of this structure. There are obvious parallels here to the +stream facilities for ordinary files, described in *Note I/O on +Streams::. * Menu: -* Attribute Meanings:: The names of the file attributes, - and what their values mean. -* Reading Attributes:: How to read the attributes of a file. -* Testing File Type:: Distinguishing ordinary files, - directories, links... -* File Owner:: How ownership for new files is determined, - and how to change it. -* Permission Bits:: How information about a file's access - mode is stored. -* Access Permission:: How the system decides who can access a file. -* Setting Permissions:: How permissions for new files are assigned, - and how to change them. -* Testing File Access:: How to find out if your process can - access a file. -* File Times:: About the time attributes of a file. -* File Size:: Manually changing the size of a file. +* Directory Entries:: Format of one directory entry. +* Opening a Directory:: How to open a directory stream. +* Reading/Closing Directory:: How to read directory entries from the stream. +* Simple Directory Lister:: A very simple directory listing program. +* Random Access Directory:: Rereading part of the directory + already read with the same stream. +* Scanning Directory Content:: Get entries for user selected subset of + contents in given directory. +* Simple Directory Lister Mark II:: Revised version of the program.  -File: libc.info, Node: Attribute Meanings, Next: Reading Attributes, Up: File Attributes - -The meaning of the File Attributes ----------------------------------- - - When you read the attributes of a file, they come back in a structure -called `struct stat'. This section describes the names of the -attributes, their data types, and what they mean. For the functions to -read the attributes of a file, see *Note Reading Attributes::. - - The header file `sys/stat.h' declares all the symbols defined in -this section. - - - Data Type: struct stat - The `stat' structure type is used to return information about the - attributes of a file. It contains at least the following members: - - `mode_t st_mode' - Specifies the mode of the file. This includes file type - information (*note Testing File Type::) and the file - permission bits (*note Permission Bits::). - - `ino_t st_ino' - The file serial number, which distinguishes this file from - all other files on the same device. - - `dev_t st_dev' - Identifies the device containing the file. The `st_ino' and - `st_dev', taken together, uniquely identify the file. The - `st_dev' value is not necessarily consistent across reboots or - system crashes, however. - - `nlink_t st_nlink' - The number of hard links to the file. This count keeps track - of how many directories have entries for this file. If the - count is ever decremented to zero, then the file itself is - discarded as soon as no process still holds it open. - Symbolic links are not counted in the total. - - `uid_t st_uid' - The user ID of the file's owner. *Note File Owner::. - - `gid_t st_gid' - The group ID of the file. *Note File Owner::. - - `off_t st_size' - This specifies the size of a regular file in bytes. For - files that are really devices this field isn't usually - meaningful. For symbolic links this specifies the length of - the file name the link refers to. +File: libc.info, Node: Directory Entries, Next: Opening a Directory, Up: Accessing Directories - `time_t st_atime' - This is the last access time for the file. *Note File - Times::. +Format of a Directory Entry +--------------------------- - `unsigned long int st_atime_usec' - This is the fractional part of the last access time for the - file. *Note File Times::. + This section describes what you find in a single directory entry, as +you might obtain it from a directory stream. All the symbols are +declared in the header file `dirent.h'. - `time_t st_mtime' - This is the time of the last modification to the contents of - the file. *Note File Times::. + - Data Type: struct dirent + This is a structure type used to return information about directory + entries. It contains the following fields: - `unsigned long int st_mtime_usec' - This is the fractional part of the time of the last - modification to the contents of the file. *Note File Times::. + `char d_name[]' + This is the null-terminated file name component. This is the + only field you can count on in all POSIX systems. - `time_t st_ctime' - This is the time of the last modification to the attributes - of the file. *Note File Times::. + `ino_t d_fileno' + This is the file serial number. For BSD compatibility, you + can also refer to this member as `d_ino'. In the GNU system + and most POSIX systems, for most files this the same as the + `st_ino' member that `stat' will return for the file. *Note + File Attributes::. - `unsigned long int st_ctime_usec' - This is the fractional part of the time of the last - modification to the attributes of the file. *Note File - Times::. + `unsigned char d_namlen' + This is the length of the file name, not including the + terminating null character. Its type is `unsigned char' + because that is the integer type of the appropriate size - `blkcnt_t st_blocks' - This is the amount of disk space that the file occupies, - measured in units of 512-byte blocks. + `unsigned char d_type' + This is the type of the file, possibly unknown. The + following constants are defined for its value: - The number of disk blocks is not strictly proportional to the - size of the file, for two reasons: the file system may use - some blocks for internal record keeping; and the file may be - sparse--it may have "holes" which contain zeros but do not - actually take up space on the disk. + `DT_UNKNOWN' + The type is unknown. On some systems this is the only + value returned. - You can tell (approximately) whether a file is sparse by - comparing this value with `st_size', like this: + `DT_REG' + A regular file. - (st.st_blocks * 512 < st.st_size) + `DT_DIR' + A directory. - This test is not perfect because a file that is just slightly - sparse might not be detected as sparse at all. For practical - applications, this is not a problem. + `DT_FIFO' + A named pipe, or FIFO. *Note FIFO Special Files::. - `unsigned int st_blksize' - The optimal block size for reading of writing this file, in - bytes. You might use this size for allocating the buffer - space for reading of writing the file. (This is unrelated to - `st_blocks'.) + `DT_SOCK' + A local-domain socket. - The extensions for the Large File Support (LFS) require, even on -32-bit machines, types which can handle file sizes up to 2^63. -Therefore a new definition of `struct stat' is necessary. + `DT_CHR' + A character device. - - Data Type: struct stat64 - The members of this type are the same and have the same names as - those in `struct stat'. The only difference is that the members - `st_ino', `st_size', and `st_blocks' have a different type to - support larger values. + `DT_BLK' + A block device. - `mode_t st_mode' - Specifies the mode of the file. This includes file type - information (*note Testing File Type::) and the file - permission bits (*note Permission Bits::). + This member is a BSD extension. The symbol + `_DIRENT_HAVE_D_TYPE' is defined if this member is available. + On systems where it is used, it corresponds to the file type + bits in the `st_mode' member of `struct statbuf'. If the + value cannot be determine the member value is DT_UNKNOWN. + These two macros convert between `d_type' values and + `st_mode' values: - `ino64_t st_ino' - The file serial number, which distinguishes this file from - all other files on the same device. + - Function: int IFTODT (mode_t MODE) + This returns the `d_type' value corresponding to MODE. - `dev_t st_dev' - Identifies the device containing the file. The `st_ino' and - `st_dev', taken together, uniquely identify the file. The - `st_dev' value is not necessarily consistent across reboots or - system crashes, however. + - Function: mode_t DTTOIF (int DTYPE) + This returns the `st_mode' value corresponding to DTYPE. - `nlink_t st_nlink' - The number of hard links to the file. This count keeps track - of how many directories have entries for this file. If the - count is ever decremented to zero, then the file itself is - discarded as soon as no process still holds it open. - Symbolic links are not counted in the total. + This structure may contain additional members in the future. Their + availability is always announced in the compilation environment by + a macro names `_DIRENT_HAVE_D_XXX' where XXX is replaced by the + name of the new member. For instance, the member `d_reclen' + available on some systems is announced through the macro + `_DIRENT_HAVE_D_RECLEN'. - `uid_t st_uid' - The user ID of the file's owner. *Note File Owner::. + When a file has multiple names, each name has its own directory + entry. The only way you can tell that the directory entries + belong to a single file is that they have the same value for the + `d_fileno' field. - `gid_t st_gid' - The group ID of the file. *Note File Owner::. + File attributes such as size, modification times etc., are part of + the file itself, not of any particular directory entry. *Note + File Attributes::. - `off64_t st_size' - This specifies the size of a regular file in bytes. For - files that are really devices this field isn't usually - meaningful. For symbolic links this specifies the length of - the file name the link refers to. + +File: libc.info, Node: Opening a Directory, Next: Reading/Closing Directory, Prev: Directory Entries, Up: Accessing Directories - `time_t st_atime' - This is the last access time for the file. *Note File - Times::. +Opening a Directory Stream +-------------------------- - `unsigned long int st_atime_usec' - This is the fractional part of the last access time for the - file. *Note File Times::. + This section describes how to open a directory stream. All the +symbols are declared in the header file `dirent.h'. - `time_t st_mtime' - This is the time of the last modification to the contents of - the file. *Note File Times::. + - Data Type: DIR + The `DIR' data type represents a directory stream. - `unsigned long int st_mtime_usec' - This is the fractional part of the time of the last - modification to the contents of the file. *Note File Times::. + You shouldn't ever allocate objects of the `struct dirent' or `DIR' +data types, since the directory access functions do that for you. +Instead, you refer to these objects using the pointers returned by the +following functions. - `time_t st_ctime' - This is the time of the last modification to the attributes - of the file. *Note File Times::. + - Function: DIR * opendir (const char *DIRNAME) + The `opendir' function opens and returns a directory stream for + reading the directory whose file name is DIRNAME. The stream has + type `DIR *'. - `unsigned long int st_ctime_usec' - This is the fractional part of the time of the last - modification to the attributes of the file. *Note File - Times::. + If unsuccessful, `opendir' returns a null pointer. In addition to + the usual file name errors (*note File Name Errors::), the + following `errno' error conditions are defined for this function: - `blkcnt64_t st_blocks' - This is the amount of disk space that the file occupies, - measured in units of 512-byte blocks. + `EACCES' + Read permission is denied for the directory named by + `dirname'. - `unsigned int st_blksize' - The optimal block size for reading of writing this file, in - bytes. You might use this size for allocating the buffer - space for reading of writing the file. (This is unrelated to - `st_blocks'.) + `EMFILE' + The process has too many files open. - Some of the file attributes have special data type names which exist -specifically for those attributes. (They are all aliases for well-known -integer types that you know and love.) These typedef names are defined -in the header file `sys/types.h' as well as in `sys/stat.h'. Here is a -list of them. + `ENFILE' + The entire system, or perhaps the file system which contains + the directory, cannot support any additional open files at + the moment. (This problem cannot happen on the GNU system.) - - Data Type: mode_t - This is an integer data type used to represent file modes. In the - GNU system, this is equivalent to `unsigned int'. + The `DIR' type is typically implemented using a file descriptor, + and the `opendir' function in terms of the `open' function. *Note + Low-Level I/O::. Directory streams and the underlying file + descriptors are closed on `exec' (*note Executing a File::). - - Data Type: ino_t - This is an arithmetic data type used to represent file serial - numbers. (In Unix jargon, these are sometimes called "inode - numbers".) In the GNU system, this type is equivalent to - `unsigned long int'. + In some situations it can be desirable to get hold of the file +descriptor which is created by the `opendir' call. For instance, to +switch the current working directory to the directory just read the +`fchdir' function could be used. Historically the `DIR' type was +exposed and programs could access the fields. This does not happen in +the GNU C library. Instead a separate function is provided to allow +access. - If the source is compiled with `_FILE_OFFSET_BITS == 64' this type - is transparently replaced by `ino64_t'. + - Function: int dirfd (DIR *DIRSTREAM) + The function `dirfd' returns the file descriptor associated with + the directory stream DIRSTREAM. This descriptor can be used until + the directory is closed with `closedir'. If the directory stream + implementation is not using file descriptors the return value is + `-1'. - - Data Type: ino64_t - This is an arithmetic data type used to represent file serial - numbers for the use in LFS. In the GNU system, this type is - equivalent to `unsigned long longint'. + +File: libc.info, Node: Reading/Closing Directory, Next: Simple Directory Lister, Prev: Opening a Directory, Up: Accessing Directories - When compiling with `_FILE_OFFSET_BITS == 64' this type is - available under the name `ino_t'. +Reading and Closing a Directory Stream +-------------------------------------- - - Data Type: dev_t - This is an arithmetic data type used to represent file device - numbers. In the GNU system, this is equivalent to `int'. + This section describes how to read directory entries from a directory +stream, and how to close the stream when you are done with it. All the +symbols are declared in the header file `dirent.h'. - - Data Type: nlink_t - This is an arithmetic data type used to represent file link counts. - In the GNU system, this is equivalent to `unsigned short int'. + - Function: struct dirent * readdir (DIR *DIRSTREAM) + This function reads the next entry from the directory. It normally + returns a pointer to a structure containing information about the + file. This structure is statically allocated and can be rewritten + by a subsequent call. - - Data Type: blkcnt_t - This is an arithmetic data type used to represent block counts. - In the GNU system, this is equivalent to `unsigned long int'. + *Portability Note:* On some systems `readdir' may not return + entries for `.' and `..', even though these are always valid file + names in any directory. *Note File Name Resolution::. - If the source is compiled with `_FILE_OFFSET_BITS == 64' this type - is transparently replaced by `blkcnt64_t'. + If there are no more entries in the directory or an error is + detected, `readdir' returns a null pointer. The following `errno' + error conditions are defined for this function: - - Data Type: blkcnt64_t - This is an arithmetic data type used to represent block counts for - the use in LFS. In the GNU system, this is equivalent to `unsigned - long long int'. + `EBADF' + The DIRSTREAM argument is not valid. - When compiling with `_FILE_OFFSET_BITS == 64' this type is - available under the name `blkcnt_t'. + `readdir' is not thread safe. Multiple threads using `readdir' on + the same DIRSTREAM may overwrite the return value. Use + `readdir_r' when this is critical. - -File: libc.info, Node: Reading Attributes, Next: Testing File Type, Prev: Attribute Meanings, Up: File Attributes + - Function: int readdir_r (DIR *DIRSTREAM, struct dirent *ENTRY, + struct dirent **RESULT) + This function is the reentrant version of `readdir'. Like + `readdir' it returns the next entry from the directory. But to + prevent conflicts between simultaneously running threads the + result is not stored in statically allocated memory. Instead the + argument ENTRY points to a place to store the result. -Reading the Attributes of a File --------------------------------- + The return value is `0' in case the next entry was read + successfully. In this case a pointer to the result is returned in + *RESULT. It is not required that *RESULT is the same as ENTRY. + If something goes wrong while executing `readdir_r' the function + returns a value indicating the error (as described for `readdir'). - To examine the attributes of files, use the functions `stat', -`fstat' and `lstat'. They return the attribute information in a -`struct stat' object. All three functions are declared in the header -file `sys/stat.h'. + If there are no more directory entries, `readdir_r''s return value + is `0', and *RESULT is set to `NULL'. - - Function: int stat (const char *FILENAME, struct stat *BUF) - The `stat' function returns information about the attributes of the - file named by FILENAME in the structure pointed to by BUF. + *Portability Note:* On some systems `readdir_r' may not return a + NUL terminated string for the file name, even when there is no + `d_reclen' field in `struct dirent' and the file name is the + maximum allowed size. Modern systems all have the `d_reclen' + field, and on old systems multi-threading is not critical. In any + case there is no such problem with the `readdir' function, so that + even on systems without the `d_reclen' member one could use + multiple threads by using external locking. - If FILENAME is the name of a symbolic link, the attributes you get - describe the file that the link points to. If the link points to a - nonexistent file name, then `stat' fails reporting a nonexistent - file. + It is also important to look at the definition of the `struct + dirent' type. Simply passing a pointer to an object of this type + for the second parameter of `readdir_r' might not be enough. Some + systems don't define the `d_name' element sufficiently long. In + this case the user has to provide additional space. There must be + room for at least `NAME_MAX + 1' characters in the `d_name' array. + Code to call `readdir_r' could look like this: - The return value is `0' if the operation is successful, or `-1' on - failure. In addition to the usual file name errors (*note File - Name Errors::, the following `errno' error conditions are defined - for this function: + union + { + struct dirent d; + char b[offsetof (struct dirent, d_name) + NAME_MAX + 1]; + } u; + + if (readdir_r (dir, &u.d, &res) == 0) + ... - `ENOENT' - The file named by FILENAME doesn't exist. + To support large filesystems on 32-bit machines there are LFS +variants of the last two functions. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `stat64' since the LFS interface transparently - replaces the normal implementation. + - Function: struct dirent64 * readdir64 (DIR *DIRSTREAM) + The `readdir64' function is just like the `readdir' function + except that it returns a pointer to a record of type `struct + dirent64'. Some of the members of this data type (notably `d_ino') + might have a different size to allow large filesystems. - - Function: int stat64 (const char *FILENAME, struct stat64 *BUF) - This function is similar to `stat' but it is also able to work on - files larger then 2^31 bytes on 32-bit systems. To be able to do - this the result is stored in a variable of type `struct stat64' to - which BUF must point. + In all other aspects this function is equivalent to `readdir'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `stat' and so transparently - replaces the interface for small files on 32-bit machines. + - Function: int readdir64_r (DIR *DIRSTREAM, struct dirent64 *ENTRY, + struct dirent64 **RESULT) + The `readdir64_r' function is equivalent to the `readdir_r' + function except that it takes parameters of base type `struct + dirent64' instead of `struct dirent' in the second and third + position. The same precautions mentioned in the documentation of + `readdir_r' also apply here. - - Function: int fstat (int FILEDES, struct stat *BUF) - The `fstat' function is like `stat', except that it takes an open - file descriptor as an argument instead of a file name. *Note - Low-Level I/O::. + - Function: int closedir (DIR *DIRSTREAM) + This function closes the directory stream DIRSTREAM. It returns + `0' on success and `-1' on failure. - Like `stat', `fstat' returns `0' on success and `-1' on failure. - The following `errno' error conditions are defined for `fstat': + The following `errno' error conditions are defined for this + function: `EBADF' - The FILEDES argument is not a valid file descriptor. - - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `fstat64' since the LFS interface transparently - replaces the normal implementation. - - - Function: int fstat64 (int FILEDES, struct stat64 *BUF) - This function is similar to `fstat' but is able to work on large - files on 32-bit platforms. For large files the file descriptor - FILEDES should be obtained by `open64' or `creat64'. The BUF - pointer points to a variable of type `struct stat64' which is able - to represent the larger values. + The DIRSTREAM argument is not valid. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `fstat' and so transparently - replaces the interface for small files on 32-bit machines. + +File: libc.info, Node: Simple Directory Lister, Next: Random Access Directory, Prev: Reading/Closing Directory, Up: Accessing Directories - - Function: int lstat (const char *FILENAME, struct stat *BUF) - The `lstat' function is like `stat', except that it does not - follow symbolic links. If FILENAME is the name of a symbolic - link, `lstat' returns information about the link itself; otherwise - `lstat' works like `stat'. *Note Symbolic Links::. +Simple Program to List a Directory +---------------------------------- - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is in fact `lstat64' since the LFS interface transparently - replaces the normal implementation. + Here's a simple program that prints the names of the files in the +current working directory: - - Function: int lstat64 (const char *FILENAME, struct stat64 *BUF) - This function is similar to `lstat' but it is also able to work on - files larger then 2^31 bytes on 32-bit systems. To be able to do - this the result is stored in a variable of type `struct stat64' to - which BUF must point. + #include + #include + #include + #include + + int + main (void) + { + DIR *dp; + struct dirent *ep; + + dp = opendir ("./"); + if (dp != NULL) + { + while (ep = readdir (dp)) + puts (ep->d_name); + (void) closedir (dp); + } + else + perror ("Couldn't open the directory"); + + return 0; + } - When the sources are compiled with `_FILE_OFFSET_BITS == 64' this - function is available under the name `lstat' and so transparently - replaces the interface for small files on 32-bit machines. + The order in which files appear in a directory tends to be fairly +random. A more useful program would sort the entries (perhaps by +alphabetizing them) before printing them; see *Note Scanning Directory +Content::, and *Note Array Sort Function::.  -File: libc.info, Node: Testing File Type, Next: File Owner, Prev: Reading Attributes, Up: File Attributes - -Testing the Type of a File --------------------------- +File: libc.info, Node: Random Access Directory, Next: Scanning Directory Content, Prev: Simple Directory Lister, Up: Accessing Directories - The "file mode", stored in the `st_mode' field of the file -attributes, contains two kinds of information: the file type code, and -the access permission bits. This section discusses only the type code, -which you can use to tell whether the file is a directory, socket, -symbolic link, and so on. For details about access permissions see -*Note Permission Bits::. +Random Access in a Directory Stream +----------------------------------- - There are two ways you can access the file type information in a file -mode. Firstly, for each file type there is a "predicate macro" which -examines a given file mode and returns whether it is of that type or -not. Secondly, you can mask out the rest of the file mode to leave -just the file type code, and compare this against constants for each of -the supported file types. + This section describes how to reread parts of a directory that you +have already read from an open directory stream. All the symbols are +declared in the header file `dirent.h'. - All of the symbols listed in this section are defined in the header -file `sys/stat.h'. + - Function: void rewinddir (DIR *DIRSTREAM) + The `rewinddir' function is used to reinitialize the directory + stream DIRSTREAM, so that if you call `readdir' it returns + information about the first entry in the directory again. This + function also notices if files have been added or removed to the + directory since it was opened with `opendir'. (Entries for these + files might or might not be returned by `readdir' if they were + added or removed since you last called `opendir' or `rewinddir'.) - The following predicate macros test the type of a file, given the -value M which is the `st_mode' field returned by `stat' on that file: + - Function: off_t telldir (DIR *DIRSTREAM) + The `telldir' function returns the file position of the directory + stream DIRSTREAM. You can use this value with `seekdir' to + restore the directory stream to that position. - - Macro: int S_ISDIR (mode_t M) - This macro returns non-zero if the file is a directory. + - Function: void seekdir (DIR *DIRSTREAM, off_t POS) + The `seekdir' function sets the file position of the directory + stream DIRSTREAM to POS. The value POS must be the result of a + previous call to `telldir' on this particular stream; closing and + reopening the directory can invalidate values returned by + `telldir'. - - Macro: int S_ISCHR (mode_t M) - This macro returns non-zero if the file is a character special - file (a device like a terminal). + +File: libc.info, Node: Scanning Directory Content, Next: Simple Directory Lister Mark II, Prev: Random Access Directory, Up: Accessing Directories - - Macro: int S_ISBLK (mode_t M) - This macro returns non-zero if the file is a block special file (a - device like a disk). +Scanning the Content of a Directory +----------------------------------- - - Macro: int S_ISREG (mode_t M) - This macro returns non-zero if the file is a regular file. + A higher-level interface to the directory handling functions is the +`scandir' function. With its help one can select a subset of the +entries in a directory, possibly sort them and get a list of names as +the result. - - Macro: int S_ISFIFO (mode_t M) - This macro returns non-zero if the file is a FIFO special file, or - a pipe. *Note Pipes and FIFOs::. + - Function: int scandir (const char *DIR, struct dirent ***NAMELIST, + int (*SELECTOR) (const struct dirent *), int (*CMP) (const + void *, const void *)) + The `scandir' function scans the contents of the directory selected + by DIR. The result in *NAMELIST is an array of pointers to + structure of type `struct dirent' which describe all selected + directory entries and which is allocated using `malloc'. Instead + of always getting all directory entries returned, the user supplied + function SELECTOR can be used to decide which entries are in the + result. Only the entries for which SELECTOR returns a non-zero + value are selected. - - Macro: int S_ISLNK (mode_t M) - This macro returns non-zero if the file is a symbolic link. *Note - Symbolic Links::. + Finally the entries in *NAMELIST are sorted using the + user-supplied function CMP. The arguments passed to the CMP + function are of type `struct dirent **', therefore one cannot + directly use the `strcmp' or `strcoll' functions; instead see the + functions `alphasort' and `versionsort' below. - - Macro: int S_ISSOCK (mode_t M) - This macro returns non-zero if the file is a socket. *Note - Sockets::. + The return value of the function is the number of entries placed in + *NAMELIST. If it is `-1' an error occurred (either the directory + could not be opened for reading or the malloc call failed) and the + global variable `errno' contains more information on the error. - An alternate non-POSIX method of testing the file type is supported -for compatibility with BSD. The mode can be bitwise AND-ed with -`S_IFMT' to extract the file type code, and compared to the appropriate -constant. For example, + As described above the fourth argument to the `scandir' function +must be a pointer to a sorting function. For the convenience of the +programmer the GNU C library contains implementations of functions which +are very helpful for this purpose. - S_ISCHR (MODE) + - Function: int alphasort (const void *A, const void *B) + The `alphasort' function behaves like the `strcoll' function + (*note String/Array Comparison::). The difference is that the + arguments are not string pointers but instead they are of type + `struct dirent **'. -is equivalent to: + The return value of `alphasort' is less than, equal to, or greater + than zero depending on the order of the two entries A and B. - ((MODE & S_IFMT) == S_IFCHR) + - Function: int versionsort (const void *A, const void *B) + The `versionsort' function is like `alphasort' except that it uses + the `strverscmp' function internally. - - Macro: int S_IFMT - This is a bit mask used to extract the file type code from a mode - value. + If the filesystem supports large files we cannot use the `scandir' +anymore since the `dirent' structure might not able to contain all the +information. The LFS provides the new type `struct dirent64'. To use +this we need a new function. - These are the symbolic names for the different file type codes: + - Function: int scandir64 (const char *DIR, struct dirent64 + ***NAMELIST, int (*SELECTOR) (const struct dirent64 *), int + (*CMP) (const void *, const void *)) + The `scandir64' function works like the `scandir' function except + that the directory entries it returns are described by elements of + type `struct dirent64'. The function pointed to by SELECTOR is + again used to select the desired entries, except that SELECTOR now + must point to a function which takes a `struct dirent64 *' + parameter. -`S_IFDIR' - This is the file type constant of a directory file. + Similarly the CMP function should expect its two arguments to be + of type `struct dirent64 **'. -`S_IFCHR' - This is the file type constant of a character-oriented device file. + As CMP is now a function of a different type, the functions +`alphasort' and `versionsort' cannot be supplied for that argument. +Instead we provide the two replacement functions below. -`S_IFBLK' - This is the file type constant of a block-oriented device file. + - Function: int alphasort64 (const void *A, const void *B) + The `alphasort64' function behaves like the `strcoll' function + (*note String/Array Comparison::). The difference is that the + arguments are not string pointers but instead they are of type + `struct dirent64 **'. -`S_IFREG' - This is the file type constant of a regular file. + Return value of `alphasort64' is less than, equal to, or greater + than zero depending on the order of the two entries A and B. -`S_IFLNK' - This is the file type constant of a symbolic link. + - Function: int versionsort64 (const void *A, const void *B) + The `versionsort64' function is like `alphasort64', excepted that + it uses the `strverscmp' function internally. -`S_IFSOCK' - This is the file type constant of a socket. + It is important not to mix the use of `scandir' and the 64-bit +comparison functions or vice versa. There are systems on which this +works but on others it will fail miserably. -`S_IFIFO' - This is the file type constant of a FIFO or pipe. + +File: libc.info, Node: Simple Directory Lister Mark II, Prev: Scanning Directory Content, Up: Accessing Directories - The POSIX.1b standard introduced a few more objects which possibly -can be implemented as object in the filesystem. These are message -queues, semaphores, and shared memory objects. To allow -differentiating these objects from other files the POSIX standard -introduces three new test macros. But unlike the other macros it does -not take the value of the `st_mode' field as the parameter. Instead -they expect a pointer to the whole `struct stat' structure. +Simple Program to List a Directory, Mark II +------------------------------------------- - - Macro: int S_TYPEISMQ (struct stat *S) - If the system implement POSIX message queues as distinct objects - and the file is a message queue object, this macro returns a - non-zero value. In all other cases the result is zero. + Here is a revised version of the directory lister found above (*note +Simple Directory Lister::). Using the `scandir' function we can avoid +the functions which work directly with the directory contents. After +the call the returned entries are available for direct use. - - Macro: int S_TYPEISSEM (struct stat *S) - If the system implement POSIX semaphores as distinct objects and - the file is a semaphore object, this macro returns a non-zero - value. In all other cases the result is zero. + #include + #include + + static int + one (struct dirent *unused) + { + return 1; + } + + int + main (void) + { + struct dirent **eps; + int n; + + n = scandir ("./", &eps, one, alphasort); + if (n >= 0) + { + int cnt; + for (cnt = 0; cnt < n; ++cnt) + puts (eps[cnt]->d_name); + } + else + perror ("Couldn't open the directory"); + + return 0; + } - - Macro: int S_TYPEISSHM (struct stat *S) - If the system implement POSIX shared memory objects as distinct - objects and the file is an shared memory object, this macro - returns a non-zero value. In all other cases the result is zero. + Note the simple selector function in this example. Since we want to +see all directory entries we always return `1'.  -File: libc.info, Node: File Owner, Next: Permission Bits, Prev: Testing File Type, Up: File Attributes +File: libc.info, Node: Working with Directory Trees, Next: Hard Links, Prev: Accessing Directories, Up: File System Interface -File Owner ----------- +Working with Directory Trees +============================ - Every file has an "owner" which is one of the registered user names -defined on the system. Each file also has a "group" which is one of -the defined groups. The file owner can often be useful for showing you -who edited the file (especially when you edit with GNU Emacs), but its -main purpose is for access control. + The functions described so far for handling the files in a directory +have allowed you to either retrieve the information bit by bit, or to +process all the files as a group (see `scandir'). Sometimes it is +useful to process whole hierarchies of directories and their contained +files. The X/Open specification defines two functions to do this. The +simpler form is derived from an early definition in System V systems +and therefore this function is available on SVID-derived systems. The +prototypes and required definitions can be found in the `ftw.h' header. - The file owner and group play a role in determining access because -the file has one set of access permission bits for the owner, another -set that applies to users who belong to the file's group, and a third -set of bits that applies to everyone else. *Note Access Permission::, -for the details of how access is decided based on this data. + There are four functions in this family: `ftw', `nftw' and their +64-bit counterparts `ftw64' and `nftw64'. These functions take as one +of their arguments a pointer to a callback function of the appropriate +type. - When a file is created, its owner is set to the effective user ID of -the process that creates it (*note Process Persona::). The file's -group ID may be set to either the effective group ID of the process, or -the group ID of the directory that contains the file, depending on the -system where the file is stored. When you access a remote file system, -it behaves according to its own rules, not according to the system your -program is running on. Thus, your program must be prepared to encounter -either kind of behavior no matter what kind of system you run it on. + - Data Type: __ftw_func_t + int (*) (const char *, const struct stat *, int) - You can change the owner and/or group owner of an existing file using -the `chown' function. This is the primitive for the `chown' and -`chgrp' shell commands. + The type of callback functions given to the `ftw' function. The + first parameter points to the file name, the second parameter to an + object of type `struct stat' which is filled in for the file named + in the first parameter. - The prototype for this function is declared in `unistd.h'. + The last parameter is a flag giving more information about the + current file. It can have the following values: - - Function: int chown (const char *FILENAME, uid_t OWNER, gid_t GROUP) - The `chown' function changes the owner of the file FILENAME to - OWNER, and its group owner to GROUP. + `FTW_F' + The item is either a normal file or a file which does not fit + into one of the following categories. This could be special + files, sockets etc. - Changing the owner of the file on certain systems clears the - set-user-ID and set-group-ID permission bits. (This is because - those bits may not be appropriate for the new owner.) Other file - permission bits are not changed. + `FTW_D' + The item is a directory. - The return value is `0' on success and `-1' on failure. In - addition to the usual file name errors (*note File Name Errors::), - the following `errno' error conditions are defined for this - function: + `FTW_NS' + The `stat' call failed and so the information pointed to by + the second paramater is invalid. - `EPERM' - This process lacks permission to make the requested change. + `FTW_DNR' + The item is a directory which cannot be read. - Only privileged users or the file's owner can change the - file's group. On most file systems, only privileged users - can change the file owner; some file systems allow you to - change the owner if you are currently the owner. When you - access a remote file system, the behavior you encounter is - determined by the system that actually holds the file, not by - the system your program is running on. + `FTW_SL' + The item is a symbolic link. Since symbolic links are + normally followed seeing this value in a `ftw' callback + function means the referenced file does not exist. The + situation for `nftw' is different. - *Note Options for Files::, for information about the - `_POSIX_CHOWN_RESTRICTED' macro. + This value is only available if the program is compiled with + `_BSD_SOURCE' or `_XOPEN_EXTENDED' defined before including + the first header. The original SVID systems do not have + symbolic links. - `EROFS' - The file is on a read-only file system. + If the sources are compiled with `_FILE_OFFSET_BITS == 64' this + type is in fact `__ftw64_func_t' since this mode changes `struct + stat' to be `struct stat64'. - - Function: int fchown (int FILEDES, int OWNER, int GROUP) - This is like `chown', except that it changes the owner of the open - file with descriptor FILEDES. + For the LFS interface and for use in the function `ftw64', the +header `ftw.h' defines another function type. - The return value from `fchown' is `0' on success and `-1' on - failure. The following `errno' error codes are defined for this - function: + - Data Type: __ftw64_func_t + int (*) (const char *, const struct stat64 *, int) - `EBADF' - The FILEDES argument is not a valid file descriptor. + This type is used just like `__ftw_func_t' for the callback + function, but this time is called from `ftw64'. The second + parameter to the function is a pointer to a variable of type + `struct stat64' which is able to represent the larger values. - `EINVAL' - The FILEDES argument corresponds to a pipe or socket, not an - ordinary file. + - Data Type: __nftw_func_t + int (*) (const char *, const struct stat *, int, struct FTW *) - `EPERM' - This process lacks permission to make the requested change. - For details see `chmod' above. + The first three arguments are the same as for the `__ftw_func_t' + type. However for the third argument some additional values are + defined to allow finer differentiation: + `FTW_DP' + The current item is a directory and all subdirectories have + already been visited and reported. This flag is returned + instead of `FTW_D' if the `FTW_DEPTH' flag is passed to + `nftw' (see below). - `EROFS' - The file resides on a read-only file system. + `FTW_SLN' + The current item is a stale symbolic link. The file it + points to does not exist. - -File: libc.info, Node: Permission Bits, Next: Access Permission, Prev: File Owner, Up: File Attributes + The last parameter of the callback function is a pointer to a + structure with some extra information as described below. -The Mode Bits for Access Permission ------------------------------------ + If the sources are compiled with `_FILE_OFFSET_BITS == 64' this + type is in fact `__nftw64_func_t' since this mode changes `struct + stat' to be `struct stat64'. - The "file mode", stored in the `st_mode' field of the file -attributes, contains two kinds of information: the file type code, and -the access permission bits. This section discusses only the access -permission bits, which control who can read or write the file. *Note -Testing File Type::, for information about the file type code. + For the LFS interface there is also a variant of this data type +available which has to be used with the `nftw64' function. - All of the symbols listed in this section are defined in the header -file `sys/stat.h'. + - Data Type: __nftw64_func_t + int (*) (const char *, const struct stat64 *, int, struct FTW *) - These symbolic constants are defined for the file mode bits that -control access permission for the file: + This type is used just like `__nftw_func_t' for the callback + function, but this time is called from `nftw64'. The second + parameter to the function is this time a pointer to a variable of + type `struct stat64' which is able to represent the larger values. -`S_IRUSR' -`S_IREAD' - Read permission bit for the owner of the file. On many systems - this bit is 0400. `S_IREAD' is an obsolete synonym provided for - BSD compatibility. + - Data Type: struct FTW + The information contained in this structure helps in interpreting + the name parameter and gives some information about the current + state of the traversal of the directory hierarchy. -`S_IWUSR' -`S_IWRITE' - Write permission bit for the owner of the file. Usually 0200. - `S_IWRITE' is an obsolete synonym provided for BSD compatibility. + `int base' + The value is the offset into the string passed in the first + parameter to the callback function of the beginning of the + file name. The rest of the string is the path of the file. + This information is especially important if the `FTW_CHDIR' + flag was set in calling `nftw' since then the current + directory is the one the current item is found in. -`S_IXUSR' -`S_IEXEC' - Execute (for ordinary files) or search (for directories) - permission bit for the owner of the file. Usually 0100. - `S_IEXEC' is an obsolete synonym provided for BSD compatibility. + `int level' + Whilst processing, the code tracks how many directories down + it has gone to find the current file. This nesting level + starts at 0 for files in the initial directory (or is zero + for the initial file if a file was passed). -`S_IRWXU' - This is equivalent to `(S_IRUSR | S_IWUSR | S_IXUSR)'. + - Function: int ftw (const char *FILENAME, __ftw_func_t FUNC, int + DESCRIPTORS) + The `ftw' function calls the callback function given in the + parameter FUNC for every item which is found in the directory + specified by FILENAME and all directories below. The function + follows symbolic links if necessary but does not process an item + twice. If FILENAME is not a directory then it itself is the only + object returned to the callback function. -`S_IRGRP' - Read permission bit for the group owner of the file. Usually 040. + The file name passed to the callback function is constructed by + taking the FILENAME parameter and appending the names of all passed + directories and then the local file name. So the callback + function can use this parameter to access the file. `ftw' also + calls `stat' for the file and passes that information on to the + callback function. If this `stat' call was not successful the + failure is indicated by setting the third argument of the callback + function to `FTW_NS'. Otherwise it is set according to the + description given in the account of `__ftw_func_t' above. -`S_IWGRP' - Write permission bit for the group owner of the file. Usually 020. + The callback function is expected to return 0 to indicate that no + error occurred and that processing should continue. If an error + occurred in the callback function or it wants `ftw' to return + immediately, the callback function can return a value other than + 0. This is the only correct way to stop the function. The + program must not use `setjmp' or similar techniques to continue + from another place. This would leave resources allocated by the + `ftw' function unfreed. -`S_IXGRP' - Execute or search permission bit for the group owner of the file. - Usually 010. + The DESCRIPTORS parameter to `ftw' specifies how many file + descriptors it is allowed to consume. The function runs faster + the more descriptors it can use. For each level in the directory + hierarchy at most one descriptor is used, but for very deep ones + any limit on open file descriptors for the process or the system + may be exceeded. Moreover, file descriptor limits in a + multi-threaded program apply to all the threads as a group, and + therefore it is a good idea to supply a reasonable limit to the + number of open descriptors. -`S_IRWXG' - This is equivalent to `(S_IRGRP | S_IWGRP | S_IXGRP)'. + The return value of the `ftw' function is 0 if all callback + function calls returned 0 and all actions performed by the `ftw' + succeeded. If a function call failed (other than calling `stat' + on an item) the function returns -1. If a callback function + returns a value other than 0 this value is returned as the return + value of `ftw'. -`S_IROTH' - Read permission bit for other users. Usually 04. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is in fact `ftw64', i.e. the LFS + interface transparently replaces the old interface. -`S_IWOTH' - Write permission bit for other users. Usually 02. + - Function: int ftw64 (const char *FILENAME, __ftw64_func_t FUNC, int + DESCRIPTORS) + This function is similar to `ftw' but it can work on filesystems + with large files. File information is reported using a variable + of type `struct stat64' which is passed by reference to the + callback function. -`S_IXOTH' - Execute or search permission bit for other users. Usually 01. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is available under the name `ftw' and + transparently replaces the old implementation. -`S_IRWXO' - This is equivalent to `(S_IROTH | S_IWOTH | S_IXOTH)'. + - Function: int nftw (const char *FILENAME, __nftw_func_t FUNC, int + DESCRIPTORS, int FLAG) + The `nftw' function works like the `ftw' functions. They call the + callback function FUNC for all items found in the directory + FILENAME and below. At most DESCRIPTORS file descriptors are + consumed during the `nftw' call. -`S_ISUID' - This is the set-user-ID on execute bit, usually 04000. *Note How - Change Persona::. + One difference is that the callback function is of a different + type. It is of type `struct FTW *' and provides the callback + function with the extra information described above. -`S_ISGID' - This is the set-group-ID on execute bit, usually 02000. *Note How - Change Persona::. + A second difference is that `nftw' takes a fourth argument, which + is 0 or a bitwise-OR combination of any of the following values. -`S_ISVTX' - This is the "sticky" bit, usually 01000. + `FTW_PHYS' + While traversing the directory symbolic links are not + followed. Instead symbolic links are reported using the + `FTW_SL' value for the type parameter to the callback + function. If the file referenced by a symbolic link does not + exist `FTW_SLN' is returned instead. - For a directory it gives permission to delete a file in that - directory only if you own that file. Ordinarily, a user can - either delete all the files in a directory or cannot delete any of - them (based on whether the user has write permission for the - directory). The same restriction applies--you must have both - write permission for the directory and own the file you want to - delete. The one exception is that the owner of the directory can - delete any file in the directory, no matter who owns it (provided - the owner has given himself write permission for the directory). - This is commonly used for the `/tmp' directory, where anyone may - create files but not delete files created by other users. + `FTW_MOUNT' + The callback function is only called for items which are on + the same mounted filesystem as the directory given by the + FILENAME parameter to `nftw'. - Originally the sticky bit on an executable file modified the - swapping policies of the system. Normally, when a program - terminated, its pages in core were immediately freed and reused. - If the sticky bit was set on the executable file, the system kept - the pages in core for a while as if the program were still - running. This was advantageous for a program likely to be run - many times in succession. This usage is obsolete in modern - systems. When a program terminates, its pages always remain in - core as long as there is no shortage of memory in the system. - When the program is next run, its pages will still be in core if - no shortage arose since the last run. + `FTW_CHDIR' + If this flag is given the current working directory is + changed to the directory of the reported object before the + callback function is called. When `ntfw' finally returns the + current directory is restored to its original value. - On some modern systems where the sticky bit has no useful meaning - for an executable file, you cannot set the bit at all for a - non-directory. If you try, `chmod' fails with `EFTYPE'; *note - Setting Permissions::. + `FTW_DEPTH' + If this option is specified then all subdirectories and files + within them are processed before processing the top directory + itself (depth-first processing). This also means the type + flag given to the callback function is `FTW_DP' and not + `FTW_D'. - Some systems (particularly SunOS) have yet another use for the - sticky bit. If the sticky bit is set on a file that is _not_ - executable, it means the opposite: never cache the pages of this - file at all. The main use of this is for the files on an NFS - server machine which are used as the swap area of diskless client - machines. The idea is that the pages of the file will be cached - in the client's memory, so it is a waste of the server's memory to - cache them a second time. With this usage the sticky bit also - implies that the filesystem may fail to record the file's - modification time onto disk reliably (the idea being that no-one - cares for a swap file). + The return value is computed in the same way as for `ftw'. `nftw' + returns 0 if no failures occurred and all callback functions + returned 0. In case of internal errors, such as memory problems, + the return value is -1 and ERRNO is set accordingly. If the + return value of a callback invocation was non-zero then that value + is returned. - This bit is only available on BSD systems (and those derived from - them). Therefore one has to use the `_BSD_SOURCE' feature select - macro to get the definition (*note Feature Test Macros::). + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is in fact `nftw64', i.e. the LFS + interface transparently replaces the old interface. - The actual bit values of the symbols are listed in the table above -so you can decode file mode values when debugging your programs. These -bit values are correct for most systems, but they are not guaranteed. + - Function: int nftw64 (const char *FILENAME, __nftw64_func_t FUNC, + int DESCRIPTORS, int FLAG) + This function is similar to `nftw' but it can work on filesystems + with large files. File information is reported using a variable + of type `struct stat64' which is passed by reference to the + callback function. - *Warning:* Writing explicit numbers for file permissions is bad -practice. Not only is it not portable, it also requires everyone who -reads your program to remember what the bits mean. To make your program -clean use the symbolic names. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is available under the name `nftw' and + transparently replaces the old implementation.  -File: libc.info, Node: Access Permission, Next: Setting Permissions, Prev: Permission Bits, Up: File Attributes - -How Your Access to a File is Decided ------------------------------------- - - Recall that the operating system normally decides access permission -for a file based on the effective user and group IDs of the process and -its supplementary group IDs, together with the file's owner, group and -permission bits. These concepts are discussed in detail in *Note -Process Persona::. - - If the effective user ID of the process matches the owner user ID of -the file, then permissions for read, write, and execute/search are -controlled by the corresponding "user" (or "owner") bits. Likewise, if -any of the effective group ID or supplementary group IDs of the process -matches the group owner ID of the file, then permissions are controlled -by the "group" bits. Otherwise, permissions are controlled by the -"other" bits. +File: libc.info, Node: Hard Links, Next: Symbolic Links, Prev: Working with Directory Trees, Up: File System Interface - Privileged users, like `root', can access any file regardless of its -permission bits. As a special case, for a file to be executable even -by a privileged user, at least one of its execute bits must be set. +Hard Links +========== - -File: libc.info, Node: Setting Permissions, Next: Testing File Access, Prev: Access Permission, Up: File Attributes + In POSIX systems, one file can have many names at the same time. +All of the names are equally real, and no one of them is preferred to +the others. -Assigning File Permissions --------------------------- + To add a name to a file, use the `link' function. (The new name is +also called a "hard link" to the file.) Creating a new link to a file +does not copy the contents of the file; it simply makes a new name by +which the file can be known, in addition to the file's existing name or +names. - The primitive functions for creating files (for example, `open' or -`mkdir') take a MODE argument, which specifies the file permissions to -give the newly created file. This mode is modified by the process's -"file creation mask", or "umask", before it is used. + One file can have names in several directories, so the organization +of the file system is not a strict hierarchy or tree. - The bits that are set in the file creation mask identify permissions -that are always to be disabled for newly created files. For example, if -you set all the "other" access bits in the mask, then newly created -files are not accessible at all to processes in the "other" category, -even if the MODE argument passed to the create function would permit -such access. In other words, the file creation mask is the complement -of the ordinary access permissions you want to grant. + In most implementations, it is not possible to have hard links to the +same file in multiple file systems. `link' reports an error if you try +to make a hard link to the file from another file system when this +cannot be done. - Programs that create files typically specify a MODE argument that -includes all the permissions that make sense for the particular file. -For an ordinary file, this is typically read and write permission for -all classes of users. These permissions are then restricted as -specified by the individual user's own file creation mask. + The prototype for the `link' function is declared in the header file +`unistd.h'. - To change the permission of an existing file given its name, call -`chmod'. This function uses the specified permission bits and ignores -the file creation mask. + - Function: int link (const char *OLDNAME, const char *NEWNAME) + The `link' function makes a new link to the existing file named by + OLDNAME, under the new name NEWNAME. - In normal use, the file creation mask is initialized by the user's -login shell (using the `umask' shell command), and inherited by all -subprocesses. Application programs normally don't need to worry about -the file creation mask. It will automatically do what it is supposed to -do. + This function returns a value of `0' if it is successful and `-1' + on failure. In addition to the usual file name errors (*note File + Name Errors::) for both OLDNAME and NEWNAME, the following `errno' + error conditions are defined for this function: - When your program needs to create a file and bypass the umask for its -access permissions, the easiest way to do this is to use `fchmod' after -opening the file, rather than changing the umask. In fact, changing -the umask is usually done only by shells. They use the `umask' -function. + `EACCES' + You are not allowed to write to the directory in which the + new link is to be written. - The functions in this section are declared in `sys/stat.h'. + `EEXIST' + There is already a file named NEWNAME. If you want to replace + this link with a new link, you must remove the old link + explicitly first. - - Function: mode_t umask (mode_t MASK) - The `umask' function sets the file creation mask of the current - process to MASK, and returns the previous value of the file - creation mask. + `EMLINK' + There are already too many links to the file named by OLDNAME. + (The maximum number of links to a file is `LINK_MAX'; see + *Note Limits for Files::.) - Here is an example showing how to read the mask with `umask' - without changing it permanently: + `ENOENT' + The file named by OLDNAME doesn't exist. You can't make a + link to a file that doesn't exist. - mode_t - read_umask (void) - { - mode_t mask = umask (0); - umask (mask); - return mask; - } + `ENOSPC' + The directory or file system that would contain the new link + is full and cannot be extended. - However, it is better to use `getumask' if you just want to read - the mask value, because it is reentrant (at least if you use the - GNU operating system). + `EPERM' + In the GNU system and some others, you cannot make links to + directories. Many systems allow only privileged users to do + so. This error is used to report the problem. - - Function: mode_t getumask (void) - Return the current value of the file creation mask for the current - process. This function is a GNU extension. + `EROFS' + The directory containing the new link can't be modified + because it's on a read-only file system. - - Function: int chmod (const char *FILENAME, mode_t MODE) - The `chmod' function sets the access permission bits for the file - named by FILENAME to MODE. + `EXDEV' + The directory specified in NEWNAME is on a different file + system than the existing file. - If FILENAME is a symbolic link, `chmod' changes the permissions of - the file pointed to by the link, not those of the link itself. + `EIO' + A hardware error occurred while trying to read or write the + to filesystem. - This function returns `0' if successful and `-1' if not. In - addition to the usual file name errors (*note File Name Errors::), - the following `errno' error conditions are defined for this - function: + +File: libc.info, Node: Symbolic Links, Next: Deleting Files, Prev: Hard Links, Up: File System Interface - `ENOENT' - The named file doesn't exist. +Symbolic Links +============== - `EPERM' - This process does not have permission to change the access - permissions of this file. Only the file's owner (as judged - by the effective user ID of the process) or a privileged user - can change them. + The GNU system supports "soft links" or "symbolic links". This is a +kind of "file" that is essentially a pointer to another file name. +Unlike hard links, symbolic links can be made to directories or across +file systems with no restrictions. You can also make a symbolic link +to a name which is not the name of any file. (Opening this link will +fail until a file by that name is created.) Likewise, if the symbolic +link points to an existing file which is later deleted, the symbolic +link continues to point to the same file name even though the name no +longer names any file. - `EROFS' - The file resides on a read-only file system. + The reason symbolic links work the way they do is that special things +happen when you try to open the link. The `open' function realizes you +have specified the name of a link, reads the file name contained in the +link, and opens that file name instead. The `stat' function likewise +operates on the file that the symbolic link points to, instead of on +the link itself. - `EFTYPE' - MODE has the `S_ISVTX' bit (the "sticky bit") set, and the - named file is not a directory. Some systems do not allow - setting the sticky bit on non-directory files, and some do - (and only some of those assign a useful meaning to the bit - for non-directory files). + By contrast, other operations such as deleting or renaming the file +operate on the link itself. The functions `readlink' and `lstat' also +refrain from following symbolic links, because their purpose is to +obtain information about the link. `link', the function that makes a +hard link, does too. It makes a hard link to the symbolic link, which +one rarely wants. - You only get `EFTYPE' on systems where the sticky bit has no - useful meaning for non-directory files, so it is always safe - to just clear the bit in MODE and call `chmod' again. *Note - Permission Bits::, for full details on the sticky bit. + Some systems have for some functions operating on files have a limit +on how many symbolic links are followed when resolving a path name. The +limit if it exists is published in the `sys/param.h' header file. - - Function: int fchmod (int FILEDES, int MODE) - This is like `chmod', except that it changes the permissions of the - currently open file given by FILEDES. + - Macro: int MAXSYMLINKS + The macro `MAXSYMLINKS' specifies how many symlinks some function + will follow before returning `ELOOP'. Not all functions behave the + same and this value is not the same a that returned for + `_SC_SYMLOOP' by `sysconf'. In fact, the `sysconf' result can + indicate that there is no fixed limit although `MAXSYMLINKS' + exists and has a finite value. - The return value from `fchmod' is `0' on success and `-1' on - failure. The following `errno' error codes are defined for this - function: + Prototypes for most of the functions listed in this section are in +`unistd.h'. - `EBADF' - The FILEDES argument is not a valid file descriptor. + - Function: int symlink (const char *OLDNAME, const char *NEWNAME) + The `symlink' function makes a symbolic link to OLDNAME named + NEWNAME. - `EINVAL' - The FILEDES argument corresponds to a pipe or socket, or - something else that doesn't really have access permissions. + The normal return value from `symlink' is `0'. A return value of + `-1' indicates an error. In addition to the usual file name + syntax errors (*note File Name Errors::), the following `errno' + error conditions are defined for this function: - `EPERM' - This process does not have permission to change the access - permissions of this file. Only the file's owner (as judged - by the effective user ID of the process) or a privileged user - can change them. + `EEXIST' + There is already an existing file named NEWNAME. `EROFS' - The file resides on a read-only file system. + The file NEWNAME would exist on a read-only file system. - -File: libc.info, Node: Testing File Access, Next: File Times, Prev: Setting Permissions, Up: File Attributes + `ENOSPC' + The directory or file system cannot be extended to make the + new link. -Testing Permission to Access a File ------------------------------------ + `EIO' + A hardware error occurred while reading or writing data on + the disk. - In some situations it is desirable to allow programs to access files -or devices even if this is not possible with the permissions granted to -the user. One possible solution is to set the setuid-bit of the program -file. If such a program is started the _effective_ user ID of the -process is changed to that of the owner of the program file. So to -allow write access to files like `/etc/passwd', which normally can be -written only by the super-user, the modifying program will have to be -owned by `root' and the setuid-bit must be set. - But beside the files the program is intended to change the user -should not be allowed to access any file to which s/he would not have -access anyway. The program therefore must explicitly check whether _the -user_ would have the necessary access to a file, before it reads or -writes the file. + - Function: int readlink (const char *FILENAME, char *BUFFER, size_t + SIZE) + The `readlink' function gets the value of the symbolic link + FILENAME. The file name that the link points to is copied into + BUFFER. This file name string is _not_ null-terminated; + `readlink' normally returns the number of characters copied. The + SIZE argument specifies the maximum number of characters to copy, + usually the allocation size of BUFFER. - To do this, use the function `access', which checks for access -permission based on the process's _real_ user ID rather than the -effective user ID. (The setuid feature does not alter the real user ID, -so it reflects the user who actually ran the program.) + If the return value equals SIZE, you cannot tell whether or not + there was room to return the entire name. So make a bigger buffer + and call `readlink' again. Here is an example: - There is another way you could check this access, which is easy to -describe, but very hard to use. This is to examine the file mode bits -and mimic the system's own access computation. This method is -undesirable because many systems have additional access control -features; your program cannot portably mimic them, and you would not -want to try to keep track of the diverse features that different systems -have. Using `access' is simple and automatically does whatever is -appropriate for the system you are using. + char * + readlink_malloc (const char *filename) + { + int size = 100; + + while (1) + { + char *buffer = (char *) xmalloc (size); + int nchars = readlink (filename, buffer, size); + if (nchars < 0) + return NULL; + if (nchars < size) + return buffer; + free (buffer); + size *= 2; + } + } - `access' is _only_ only appropriate to use in setuid programs. A -non-setuid program will always use the effective ID rather than the -real ID. + A value of `-1' is returned in case of error. In addition to the + usual file name errors (*note File Name Errors::), the following + `errno' error conditions are defined for this function: - The symbols in this section are declared in `unistd.h'. + `EINVAL' + The named file is not a symbolic link. - - Function: int access (const char *FILENAME, int HOW) - The `access' function checks to see whether the file named by - FILENAME can be accessed in the way specified by the HOW argument. - The HOW argument either can be the bitwise OR of the flags - `R_OK', `W_OK', `X_OK', or the existence test `F_OK'. + `EIO' + A hardware error occurred while reading or writing data on + the disk. - This function uses the _real_ user and group IDs of the calling - process, rather than the _effective_ IDs, to check for access - permission. As a result, if you use the function from a `setuid' - or `setgid' program (*note How Change Persona::), it gives - information relative to the user who actually ran the program. + In some situations it is desirable to resolve all the to get the real +name of a file where no prefix names a symbolic link which is followed +and no filename in the path is `.' or `..'. This is for instance +desirable if files have to be compare in which case different names can +refer to the same inode. - The return value is `0' if the access is permitted, and `-1' - otherwise. (In other words, treated as a predicate function, - `access' returns true if the requested access is _denied_.) + - Function: char * canonicalize_file_name (const char *NAME) + The `canonicalize_file_name' function returns the absolute name of + the file named by NAME which contains no `.', `..' components nor + any repeated path separators (`/') or symlinks. The result is + passed back as the return value of the function in a block of + memory allocated with `malloc'. If the result is not used anymore + the memory should be freed with a call to `free'. - In addition to the usual file name errors (*note File Name - Errors::), the following `errno' error conditions are defined for - this function: + In any of the path components except the last one is missing the + function returns a NULL pointer. This is also what is returned if + the length of the path reaches or exceeds `PATH_MAX' characters. + In any case `errno' is set accordingly. + + `ENAMETOOLONG' + The resulting path is too long. This error only occurs on + systems which have a limit on the file name length. `EACCES' - The access specified by HOW is denied. + At least one of the path components is not readable. `ENOENT' - The file doesn't exist. + The input file name is empty. - `EROFS' - Write permission was requested for a file on a read-only file - system. + `ENOENT' + At least one of the path components does not exist. - These macros are defined in the header file `unistd.h' for use as -the HOW argument to the `access' function. The values are integer -constants. + `ELOOP' + More than `MAXSYMLINKS' many symlinks have been followed. - - Macro: int R_OK - Flag meaning test for read permission. + This function is a GNU extension and is declared in `stdlib.h'. - - Macro: int W_OK - Flag meaning test for write permission. + The Unix standard includes a similar function which differs from +`canonicalize_file_name' in that the user has to provide the buffer +where the result is placed in. - - Macro: int X_OK - Flag meaning test for execute/search permission. + - Function: char * realpath (const char *restrict NAME, char *restrict + RESOLVED) + The `realpath' function behaves just like `canonicalize_file_name' + but instead of allocating a buffer for the result it is placed in + the buffer pointed to by RESOLVED. - - Macro: int F_OK - Flag meaning test for existence of the file. + One other difference is that the buffer RESOLVED will contain the + part of the path component which does not exist or is not readable + if the function returns `NULL' and `errno' is set to `EACCES' or + `ENOENT'. + + This function is declared in `stdlib.h'. + + The advantage of using this function is that it is more widely +available. The drawback is that it reports failures for long path on +systems which have no limits on the file name length. diff -durpN glibc-2.2.4/manual/libc.info-25 glibc-2.2.5/manual/libc.info-25 --- glibc-2.2.4/manual/libc.info-25 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-25 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1202 +33,1131 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: File Times, Next: File Size, Prev: Testing File Access, Up: File Attributes - -File Times ----------- - - Each file has three time stamps associated with it: its access time, -its modification time, and its attribute modification time. These -correspond to the `st_atime', `st_mtime', and `st_ctime' members of the -`stat' structure; see *Note File Attributes::. - - All of these times are represented in calendar time format, as -`time_t' objects. This data type is defined in `time.h'. For more -information about representation and manipulation of time values, see -*Note Calendar Time::. - - Reading from a file updates its access time attribute, and writing -updates its modification time. When a file is created, all three time -stamps for that file are set to the current time. In addition, the -attribute change time and modification time fields of the directory that -contains the new entry are updated. - - Adding a new name for a file with the `link' function updates the -attribute change time field of the file being linked, and both the -attribute change time and modification time fields of the directory -containing the new name. These same fields are affected if a file name -is deleted with `unlink', `remove' or `rmdir'. Renaming a file with -`rename' affects only the attribute change time and modification time -fields of the two parent directories involved, and not the times for -the file being renamed. - - Changing the attributes of a file (for example, with `chmod') -updates its attribute change time field. - - You can also change some of the time stamps of a file explicitly -using the `utime' function--all except the attribute change time. You -need to include the header file `utime.h' to use this facility. - - - Data Type: struct utimbuf - The `utimbuf' structure is used with the `utime' function to - specify new access and modification times for a file. It contains - the following members: +File: libc.info, Node: Deleting Files, Next: Renaming Files, Prev: Symbolic Links, Up: File System Interface - `time_t actime' - This is the access time for the file. +Deleting Files +============== - `time_t modtime' - This is the modification time for the file. + You can delete a file with `unlink' or `remove'. - - Function: int utime (const char *FILENAME, const struct utimbuf - *TIMES) - This function is used to modify the file times associated with the - file named FILENAME. + Deletion actually deletes a file name. If this is the file's only +name, then the file is deleted as well. If the file has other +remaining names (*note Hard Links::), it remains accessible under those +names. - If TIMES is a null pointer, then the access and modification times - of the file are set to the current time. Otherwise, they are set - to the values from the `actime' and `modtime' members - (respectively) of the `utimbuf' structure pointed to by TIMES. + - Function: int unlink (const char *FILENAME) + The `unlink' function deletes the file name FILENAME. If this is + a file's sole name, the file itself is also deleted. (Actually, + if any process has the file open when this happens, deletion is + postponed until all processes have closed the file.) - The attribute modification time for the file is set to the current - time in either case (since changing the time stamps is itself a - modification of the file attributes). + The function `unlink' is declared in the header file `unistd.h'. - The `utime' function returns `0' if successful and `-1' on - failure. In addition to the usual file name errors (*note File - Name Errors::), the following `errno' error conditions are defined - for this function: + This function returns `0' on successful completion, and `-1' on + error. In addition to the usual file name errors (*note File Name + Errors::), the following `errno' error conditions are defined for + this function: `EACCES' - There is a permission problem in the case where a null - pointer was passed as the TIMES argument. In order to update - the time stamp on the file, you must either be the owner of - the file, have write permission for the file, or be a - privileged user. + Write permission is denied for the directory from which the + file is to be removed, or the directory has the sticky bit + set and you do not own the file. + + `EBUSY' + This error indicates that the file is being used by the + system in such a way that it can't be unlinked. For example, + you might see this error if the file name specifies the root + directory or a mount point for a file system. `ENOENT' - The file doesn't exist. + The file name to be deleted doesn't exist. `EPERM' - If the TIMES argument is not a null pointer, you must either - be the owner of the file or be a privileged user. + On some systems `unlink' cannot be used to delete the name of + a directory, or at least can only be used this way by a + privileged user. To avoid such problems, use `rmdir' to + delete directories. (In the GNU system `unlink' can never + delete the name of a directory.) `EROFS' - The file lives on a read-only file system. + The directory containing the file name to be deleted is on a + read-only file system and can't be modified. - Each of the three time stamps has a corresponding microsecond part, -which extends its resolution. These fields are called `st_atime_usec', -`st_mtime_usec', and `st_ctime_usec'; each has a value between 0 and -999,999, which indicates the time in microseconds. They correspond to -the `tv_usec' field of a `timeval' structure; see *Note High-Resolution -Calendar::. + - Function: int rmdir (const char *FILENAME) + The `rmdir' function deletes a directory. The directory must be + empty before it can be removed; in other words, it can only contain + entries for `.' and `..'. - The `utimes' function is like `utime', but also lets you specify the -fractional part of the file times. The prototype for this function is -in the header file `sys/time.h'. + In most other respects, `rmdir' behaves like `unlink'. There are + two additional `errno' error conditions defined for `rmdir': - - Function: int utimes (const char *FILENAME, struct timeval TVP[2]) - This function sets the file access and modification times of the - file FILENAME. The new file access time is specified by `TVP[0]', - and the new modification time by `TVP[1]'. This function comes - from BSD. + `ENOTEMPTY' + `EEXIST' + The directory to be deleted is not empty. - The return values and error conditions are the same as for the - `utime' function. + These two error codes are synonymous; some systems use one, and + some use the other. The GNU system always uses `ENOTEMPTY'. + + The prototype for this function is declared in the header file + `unistd.h'. + + - Function: int remove (const char *FILENAME) + This is the ISO C function to remove a file. It works like + `unlink' for files and like `rmdir' for directories. `remove' is + declared in `stdio.h'.  -File: libc.info, Node: File Size, Prev: File Times, Up: File Attributes +File: libc.info, Node: Renaming Files, Next: Creating Directories, Prev: Deleting Files, Up: File System Interface -File Size ---------- +Renaming Files +============== - Normally file sizes are maintained automatically. A file begins -with a size of 0 and is automatically extended when data is written past -its end. It is also possible to empty a file completely by an `open' -or `fopen' call. + The `rename' function is used to change a file's name. - However, sometimes it is necessary to _reduce_ the size of a file. -This can be done with the `truncate' and `ftruncate' functions. They -were introduced in BSD Unix. `ftruncate' was later added to POSIX.1. + - Function: int rename (const char *OLDNAME, const char *NEWNAME) + The `rename' function renames the file OLDNAME to NEWNAME. The + file formerly accessible under the name OLDNAME is afterwards + accessible as NEWNAME instead. (If the file had any other names + aside from OLDNAME, it continues to have those names.) - Some systems allow you to extend a file (creating holes) with these -functions. This is useful when using memory-mapped I/O (*note -Memory-mapped I/O::), where files are not automatically extended. -However, it is not portable but must be implemented if `mmap' allows -mapping of files (i.e., `_POSIX_MAPPED_FILES' is defined). + The directory containing the name NEWNAME must be on the same file + system as the directory containing the name OLDNAME. - Using these functions on anything other than a regular file gives -_undefined_ results. On many systems, such a call will appear to -succeed, without actually accomplishing anything. + One special case for `rename' is when OLDNAME and NEWNAME are two + names for the same file. The consistent way to handle this case + is to delete OLDNAME. However, in this case POSIX requires that + `rename' do nothing and report success--which is inconsistent. We + don't know what your operating system will do. - - Function: int truncate (const char *FILENAME, off_t LENGTH) - The `truncate' function changes the size of FILENAME to LENGTH. - If LENGTH is shorter than the previous length, data at the end - will be lost. The file must be writable by the user to perform - this operation. + If OLDNAME is not a directory, then any existing file named + NEWNAME is removed during the renaming operation. However, if + NEWNAME is the name of a directory, `rename' fails in this case. - If LENGTH is longer, holes will be added to the end. However, some - systems do not support this feature and will leave the file - unchanged. + If OLDNAME is a directory, then either NEWNAME must not exist or + it must name a directory that is empty. In the latter case, the + existing directory named NEWNAME is deleted first. The name + NEWNAME must not specify a subdirectory of the directory `oldname' + which is being renamed. - When the source file is compiled with `_FILE_OFFSET_BITS == 64' the - `truncate' function is in fact `truncate64' and the type `off_t' - has 64 bits which makes it possible to handle files up to 2^63 - bytes in length. + One useful feature of `rename' is that the meaning of NEWNAME + changes "atomically" from any previously existing file by that + name to its new meaning (i.e. the file that was called OLDNAME). + There is no instant at which NEWNAME is non-existent "in between" + the old meaning and the new meaning. If there is a system crash + during the operation, it is possible for both names to still + exist; but NEWNAME will always be intact if it exists at all. - The return value is 0 for success, or -1 for an error. In - addition to the usual file name errors, the following errors may - occur: + If `rename' fails, it returns `-1'. In addition to the usual file + name errors (*note File Name Errors::), the following `errno' + error conditions are defined for this function: `EACCES' - The file is a directory or not writable. + One of the directories containing NEWNAME or OLDNAME refuses + write permission; or NEWNAME and OLDNAME are directories and + write permission is refused for one of them. - `EINVAL' - LENGTH is negative. + `EBUSY' + A directory named by OLDNAME or NEWNAME is being used by the + system in a way that prevents the renaming from working. + This includes directories that are mount points for + filesystems, and directories that are the current working + directories of processes. - `EFBIG' - The operation would extend the file beyond the limits of the - operating system. + `ENOTEMPTY' + `EEXIST' + The directory NEWNAME isn't empty. The GNU system always + returns `ENOTEMPTY' for this, but some other systems return + `EEXIST'. - `EIO' - A hardware I/O error occurred. + `EINVAL' + OLDNAME is a directory that contains NEWNAME. - `EPERM' - The file is "append-only" or "immutable". + `EISDIR' + NEWNAME is a directory but the OLDNAME isn't. - `EINTR' - The operation was interrupted by a signal. + `EMLINK' + The parent directory of NEWNAME would have too many links + (entries). + `ENOENT' + The file OLDNAME doesn't exist. - - Function: int truncate64 (const char *NAME, off64_t LENGTH) - This function is similar to the `truncate' function. The - difference is that the LENGTH argument is 64 bits wide even on 32 - bits machines, which allows the handling of files with sizes up to - 2^63 bytes. + `ENOSPC' + The directory that would contain NEWNAME has no room for + another entry, and there is no space left in the file system + to expand it. - When the source file is compiled with `_FILE_OFFSET_BITS == 64' on - a 32 bits machine this function is actually available under the - name `truncate' and so transparently replaces the 32 bits - interface. + `EROFS' + The operation would involve writing to a directory on a + read-only file system. - - Function: int ftruncate (int FD, off_t LENGTH) - This is like `truncate', but it works on a file descriptor FD for - an opened file instead of a file name to identify the object. The - file must be opened for writing to successfully carry out the - operation. + `EXDEV' + The two file names NEWNAME and OLDNAME are on different file + systems. - The POSIX standard leaves it implementation defined what happens - if the specified new LENGTH of the file is bigger than the - original size. The `ftruncate' function might simply leave the - file alone and do nothing or it can increase the size to the - desired size. In this later case the extended area should be - zero-filled. So using `ftruncate' is no reliable way to increase - the file size but if it is possible it is probably the fastest - way. The function also operates on POSIX shared memory segments - if these are implemented by the system. + +File: libc.info, Node: Creating Directories, Next: File Attributes, Prev: Renaming Files, Up: File System Interface - `ftruncate' is especially useful in combination with `mmap'. - Since the mapped region must have a fixed size one cannot enlarge - the file by writing something beyond the last mapped page. - Instead one has to enlarge the file itself and then remap the file - with the new size. The example below shows how this works. +Creating Directories +==================== - When the source file is compiled with `_FILE_OFFSET_BITS == 64' the - `ftruncate' function is in fact `ftruncate64' and the type `off_t' - has 64 bits which makes it possible to handle files up to 2^63 - bytes in length. + Directories are created with the `mkdir' function. (There is also a +shell command `mkdir' which does the same thing.) - The return value is 0 for success, or -1 for an error. The - following errors may occur: + - Function: int mkdir (const char *FILENAME, mode_t MODE) + The `mkdir' function creates a new, empty directory with name + FILENAME. - `EBADF' - FD does not correspond to an open file. + The argument MODE specifies the file permissions for the new + directory file. *Note Permission Bits::, for more information + about this. + + A return value of `0' indicates successful completion, and `-1' + indicates failure. In addition to the usual file name syntax + errors (*note File Name Errors::), the following `errno' error + conditions are defined for this function: `EACCES' - FD is a directory or not open for writing. + Write permission is denied for the parent directory in which + the new directory is to be added. - `EINVAL' - LENGTH is negative. + `EEXIST' + A file named FILENAME already exists. - `EFBIG' - The operation would extend the file beyond the limits of the - operating system. + `EMLINK' + The parent directory has too many links (entries). - `EIO' - A hardware I/O error occurred. + Well-designed file systems never report this error, because + they permit more links than your disk could possibly hold. + However, you must still take account of the possibility of + this error, as it could result from network access to a file + system on another machine. - `EPERM' - The file is "append-only" or "immutable". + `ENOSPC' + The file system doesn't have enough room to create the new + directory. - `EINTR' - The operation was interrupted by a signal. + `EROFS' + The parent directory of the directory being created is on a + read-only file system and cannot be modified. + To use this function, your program should include the header file + `sys/stat.h'. - - Function: int ftruncate64 (int ID, off64_t LENGTH) - This function is similar to the `ftruncate' function. The - difference is that the LENGTH argument is 64 bits wide even on 32 - bits machines which allows the handling of files with sizes up to - 2^63 bytes. + +File: libc.info, Node: File Attributes, Next: Making Special Files, Prev: Creating Directories, Up: File System Interface - When the source file is compiled with `_FILE_OFFSET_BITS == 64' on - a 32 bits machine this function is actually available under the - name `ftruncate' and so transparently replaces the 32 bits - interface. +File Attributes +=============== - As announced here is a little example of how to use `ftruncate' in -combination with `mmap': + When you issue an `ls -l' shell command on a file, it gives you +information about the size of the file, who owns it, when it was last +modified, etc. These are called the "file attributes", and are +associated with the file itself and not a particular one of its names. - int fd; - void *start; - size_t len; - - int - add (off_t at, void *block, size_t size) - { - if (at + size > len) - { - /* Resize the file and remap. */ - size_t ps = sysconf (_SC_PAGESIZE); - size_t ns = (at + size + ps - 1) & ~(ps - 1); - void *np; - if (ftruncate (fd, ns) < 0) - return -1; - np = mmap (NULL, ns, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); - if (np == MAP_FAILED) - return -1; - start = np; - len = ns; - } - memcpy ((char *) start + at, block, size); - return 0; - } + This section contains information about how you can inquire about and +modify the attributes of a file. - The function `add' writes a block of memory at an arbitrary position -in the file. If the current size of the file is too small it is -extended. Note the it is extended by a round number of pages. This is -a requirement of `mmap'. The program has to keep track of the real -size, and when it has finished a final `ftruncate' call should set the -real size of the file. +* Menu: + +* Attribute Meanings:: The names of the file attributes, + and what their values mean. +* Reading Attributes:: How to read the attributes of a file. +* Testing File Type:: Distinguishing ordinary files, + directories, links... +* File Owner:: How ownership for new files is determined, + and how to change it. +* Permission Bits:: How information about a file's access + mode is stored. +* Access Permission:: How the system decides who can access a file. +* Setting Permissions:: How permissions for new files are assigned, + and how to change them. +* Testing File Access:: How to find out if your process can + access a file. +* File Times:: About the time attributes of a file. +* File Size:: Manually changing the size of a file.  -File: libc.info, Node: Making Special Files, Next: Temporary Files, Prev: File Attributes, Up: File System Interface +File: libc.info, Node: Attribute Meanings, Next: Reading Attributes, Up: File Attributes -Making Special Files -==================== +The meaning of the File Attributes +---------------------------------- - The `mknod' function is the primitive for making special files, such -as files that correspond to devices. The GNU library includes this -function for compatibility with BSD. + When you read the attributes of a file, they come back in a structure +called `struct stat'. This section describes the names of the +attributes, their data types, and what they mean. For the functions to +read the attributes of a file, see *Note Reading Attributes::. - The prototype for `mknod' is declared in `sys/stat.h'. + The header file `sys/stat.h' declares all the symbols defined in +this section. - - Function: int mknod (const char *FILENAME, int MODE, int DEV) - The `mknod' function makes a special file with name FILENAME. The - MODE specifies the mode of the file, and may include the various - special file bits, such as `S_IFCHR' (for a character special file) - or `S_IFBLK' (for a block special file). *Note Testing File - Type::. + - Data Type: struct stat + The `stat' structure type is used to return information about the + attributes of a file. It contains at least the following members: - The DEV argument specifies which device the special file refers to. - Its exact interpretation depends on the kind of special file being - created. + `mode_t st_mode' + Specifies the mode of the file. This includes file type + information (*note Testing File Type::) and the file + permission bits (*note Permission Bits::). - The return value is `0' on success and `-1' on error. In addition - to the usual file name errors (*note File Name Errors::), the - following `errno' error conditions are defined for this function: + `ino_t st_ino' + The file serial number, which distinguishes this file from + all other files on the same device. - `EPERM' - The calling process is not privileged. Only the superuser - can create special files. + `dev_t st_dev' + Identifies the device containing the file. The `st_ino' and + `st_dev', taken together, uniquely identify the file. The + `st_dev' value is not necessarily consistent across reboots or + system crashes, however. - `ENOSPC' - The directory or file system that would contain the new file - is full and cannot be extended. + `nlink_t st_nlink' + The number of hard links to the file. This count keeps track + of how many directories have entries for this file. If the + count is ever decremented to zero, then the file itself is + discarded as soon as no process still holds it open. + Symbolic links are not counted in the total. - `EROFS' - The directory containing the new file can't be modified - because it's on a read-only file system. + `uid_t st_uid' + The user ID of the file's owner. *Note File Owner::. - `EEXIST' - There is already a file named FILENAME. If you want to - replace this file, you must remove the old file explicitly - first. + `gid_t st_gid' + The group ID of the file. *Note File Owner::. - -File: libc.info, Node: Temporary Files, Prev: Making Special Files, Up: File System Interface + `off_t st_size' + This specifies the size of a regular file in bytes. For + files that are really devices this field isn't usually + meaningful. For symbolic links this specifies the length of + the file name the link refers to. -Temporary Files -=============== + `time_t st_atime' + This is the last access time for the file. *Note File + Times::. - If you need to use a temporary file in your program, you can use the -`tmpfile' function to open it. Or you can use the `tmpnam' (better: -`tmpnam_r') function to provide a name for a temporary file and then -you can open it in the usual way with `fopen'. + `unsigned long int st_atime_usec' + This is the fractional part of the last access time for the + file. *Note File Times::. - The `tempnam' function is like `tmpnam' but lets you choose what -directory temporary files will go in, and something about what their -file names will look like. Important for multi-threaded programs is -that `tempnam' is reentrant, while `tmpnam' is not since it returns a -pointer to a static buffer. + `time_t st_mtime' + This is the time of the last modification to the contents of + the file. *Note File Times::. - These facilities are declared in the header file `stdio.h'. + `unsigned long int st_mtime_usec' + This is the fractional part of the time of the last + modification to the contents of the file. *Note File Times::. - - Function: FILE * tmpfile (void) - This function creates a temporary binary file for update mode, as - if by calling `fopen' with mode `"wb+"'. The file is deleted - automatically when it is closed or when the program terminates. - (On some other ISO C systems the file may fail to be deleted if - the program terminates abnormally). + `time_t st_ctime' + This is the time of the last modification to the attributes + of the file. *Note File Times::. - This function is reentrant. + `unsigned long int st_ctime_usec' + This is the fractional part of the time of the last + modification to the attributes of the file. *Note File + Times::. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is in fact `tmpfile64', i.e. the LFS - interface transparently replaces the old interface. + `blkcnt_t st_blocks' + This is the amount of disk space that the file occupies, + measured in units of 512-byte blocks. - - Function: FILE * tmpfile64 (void) - This function is similar to `tmpfile', but the stream it returns a - pointer to was opened using `tmpfile64'. Therefore this stream can - be used for files larger then 2^31 bytes on 32-bit machines. + The number of disk blocks is not strictly proportional to the + size of the file, for two reasons: the file system may use + some blocks for internal record keeping; and the file may be + sparse--it may have "holes" which contain zeros but do not + actually take up space on the disk. - Please note that the return type is still `FILE *'. There is no - special `FILE' type for the LFS interface. + You can tell (approximately) whether a file is sparse by + comparing this value with `st_size', like this: - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 - bits machine this function is available under the name `tmpfile' - and so transparently replaces the old interface. + (st.st_blocks * 512 < st.st_size) - - Function: char * tmpnam (char *RESULT) - This function constructs and returns a valid file name that does - not refer to any existing file. If the RESULT argument is a null - pointer, the return value is a pointer to an internal static - string, which might be modified by subsequent calls and therefore - makes this function non-reentrant. Otherwise, the RESULT argument - should be a pointer to an array of at least `L_tmpnam' characters, - and the result is written into that array. + This test is not perfect because a file that is just slightly + sparse might not be detected as sparse at all. For practical + applications, this is not a problem. - It is possible for `tmpnam' to fail if you call it too many times - without removing previously-created files. This is because the - limited length of the temporary file names gives room for only a - finite number of different names. If `tmpnam' fails it returns a - null pointer. + `unsigned int st_blksize' + The optimal block size for reading of writing this file, in + bytes. You might use this size for allocating the buffer + space for reading of writing the file. (This is unrelated to + `st_blocks'.) - *Warning:* Between the time the pathname is constructed and the - file is created another process might have created a file with the - same name using `tmpnam', leading to a possible security hole. The - implementation generates names which can hardly be predicted, but - when opening the file you should use the `O_EXCL' flag. Using - `tmpfile' or `mkstemp' is a safe way to avoid this problem. + The extensions for the Large File Support (LFS) require, even on +32-bit machines, types which can handle file sizes up to 2^63. +Therefore a new definition of `struct stat' is necessary. - - Function: char * tmpnam_r (char *RESULT) - This function is nearly identical to the `tmpnam' function, except - that if RESULT is a null pointer it returns a null pointer. + - Data Type: struct stat64 + The members of this type are the same and have the same names as + those in `struct stat'. The only difference is that the members + `st_ino', `st_size', and `st_blocks' have a different type to + support larger values. - This guarantees reentrancy because the non-reentrant situation of - `tmpnam' cannot happen here. + `mode_t st_mode' + Specifies the mode of the file. This includes file type + information (*note Testing File Type::) and the file + permission bits (*note Permission Bits::). - *Warning*: This function has the same security problems as - `tmpnam'. + `ino64_t st_ino' + The file serial number, which distinguishes this file from + all other files on the same device. - - Macro: int L_tmpnam - The value of this macro is an integer constant expression that - represents the minimum size of a string large enough to hold a - file name generated by the `tmpnam' function. + `dev_t st_dev' + Identifies the device containing the file. The `st_ino' and + `st_dev', taken together, uniquely identify the file. The + `st_dev' value is not necessarily consistent across reboots or + system crashes, however. - - Macro: int TMP_MAX - The macro `TMP_MAX' is a lower bound for how many temporary names - you can create with `tmpnam'. You can rely on being able to call - `tmpnam' at least this many times before it might fail saying you - have made too many temporary file names. + `nlink_t st_nlink' + The number of hard links to the file. This count keeps track + of how many directories have entries for this file. If the + count is ever decremented to zero, then the file itself is + discarded as soon as no process still holds it open. + Symbolic links are not counted in the total. - With the GNU library, you can create a very large number of - temporary file names. If you actually created the files, you - would probably run out of disk space before you ran out of names. - Some other systems have a fixed, small limit on the number of - temporary files. The limit is never less than `25'. + `uid_t st_uid' + The user ID of the file's owner. *Note File Owner::. - - Function: char * tempnam (const char *DIR, const char *PREFIX) - This function generates a unique temporary file name. If PREFIX - is not a null pointer, up to five characters of this string are - used as a prefix for the file name. The return value is a string - newly allocated with `malloc', so you should release its storage - with `free' when it is no longer needed. + `gid_t st_gid' + The group ID of the file. *Note File Owner::. - Because the string is dynamically allocated this function is - reentrant. + `off64_t st_size' + This specifies the size of a regular file in bytes. For + files that are really devices this field isn't usually + meaningful. For symbolic links this specifies the length of + the file name the link refers to. - The directory prefix for the temporary file name is determined by - testing each of the following in sequence. The directory must - exist and be writable. + `time_t st_atime' + This is the last access time for the file. *Note File + Times::. - * The environment variable `TMPDIR', if it is defined. For - security reasons this only happens if the program is not SUID - or SGID enabled. + `unsigned long int st_atime_usec' + This is the fractional part of the last access time for the + file. *Note File Times::. - * The DIR argument, if it is not a null pointer. + `time_t st_mtime' + This is the time of the last modification to the contents of + the file. *Note File Times::. - * The value of the `P_tmpdir' macro. + `unsigned long int st_mtime_usec' + This is the fractional part of the time of the last + modification to the contents of the file. *Note File Times::. - * The directory `/tmp'. + `time_t st_ctime' + This is the time of the last modification to the attributes + of the file. *Note File Times::. - This function is defined for SVID compatibility. + `unsigned long int st_ctime_usec' + This is the fractional part of the time of the last + modification to the attributes of the file. *Note File + Times::. - *Warning:* Between the time the pathname is constructed and the - file is created another process might have created a file with the - same name using `tempnam', leading to a possible security hole. - The implementation generates names which can hardly be predicted, - but when opening the file you should use the `O_EXCL' flag. Using - `tmpfile' or `mkstemp' is a safe way to avoid this problem. + `blkcnt64_t st_blocks' + This is the amount of disk space that the file occupies, + measured in units of 512-byte blocks. - - SVID Macro: char * P_tmpdir - This macro is the name of the default directory for temporary - files. + `unsigned int st_blksize' + The optimal block size for reading of writing this file, in + bytes. You might use this size for allocating the buffer + space for reading of writing the file. (This is unrelated to + `st_blocks'.) - Older Unix systems did not have the functions just described. -Instead they used `mktemp' and `mkstemp'. Both of these functions work -by modifying a file name template string you pass. The last six -characters of this string must be `XXXXXX'. These six `X's are -replaced with six characters which make the whole string a unique file -name. Usually the template string is something like -`/tmp/PREFIXXXXXXX', and each program uses a unique PREFIX. + Some of the file attributes have special data type names which exist +specifically for those attributes. (They are all aliases for well-known +integer types that you know and love.) These typedef names are defined +in the header file `sys/types.h' as well as in `sys/stat.h'. Here is a +list of them. - *Note:* Because `mktemp' and `mkstemp' modify the template string, -you _must not_ pass string constants to them. String constants are -normally in read-only storage, so your program would crash when -`mktemp' or `mkstemp' tried to modify the string. + - Data Type: mode_t + This is an integer data type used to represent file modes. In the + GNU system, this is equivalent to `unsigned int'. - - Function: char * mktemp (char *TEMPLATE) - The `mktemp' function generates a unique file name by modifying - TEMPLATE as described above. If successful, it returns TEMPLATE - as modified. If `mktemp' cannot find a unique file name, it makes - TEMPLATE an empty string and returns that. If TEMPLATE does not - end with `XXXXXX', `mktemp' returns a null pointer. + - Data Type: ino_t + This is an arithmetic data type used to represent file serial + numbers. (In Unix jargon, these are sometimes called "inode + numbers".) In the GNU system, this type is equivalent to + `unsigned long int'. - *Warning:* Between the time the pathname is constructed and the - file is created another process might have created a file with the - same name using `mktemp', leading to a possible security hole. The - implementation generates names which can hardly be predicted, but - when opening the file you should use the `O_EXCL' flag. Using - `mkstemp' is a safe way to avoid this problem. + If the source is compiled with `_FILE_OFFSET_BITS == 64' this type + is transparently replaced by `ino64_t'. - - Function: int mkstemp (char *TEMPLATE) - The `mkstemp' function generates a unique file name just as - `mktemp' does, but it also opens the file for you with `open' - (*note Opening and Closing Files::). If successful, it modifies - TEMPLATE in place and returns a file descriptor for that file open - for reading and writing. If `mkstemp' cannot create a - uniquely-named file, it returns `-1'. If TEMPLATE does not end - with `XXXXXX', `mkstemp' returns `-1' and does not modify TEMPLATE. + - Data Type: ino64_t + This is an arithmetic data type used to represent file serial + numbers for the use in LFS. In the GNU system, this type is + equivalent to `unsigned long longint'. - The file is opened using mode `0600'. If the file is meant to be - used by other users this mode must be changed explicitly. + When compiling with `_FILE_OFFSET_BITS == 64' this type is + available under the name `ino_t'. - Unlike `mktemp', `mkstemp' is actually guaranteed to create a unique -file that cannot possibly clash with any other program trying to create -a temporary file. This is because it works by calling `open' with the -`O_EXCL' flag, which says you want to create a new file and get an -error if the file already exists. + - Data Type: dev_t + This is an arithmetic data type used to represent file device + numbers. In the GNU system, this is equivalent to `int'. - - Function: char * mkdtemp (char *TEMPLATE) - The `mkdtemp' function creates a directory with a unique name. If - it succeeds, it overwrites TEMPLATE with the name of the - directory, and returns TEMPLATE. As with `mktemp' and `mkstemp', - TEMPLATE should be a string ending with `XXXXXX'. + - Data Type: nlink_t + This is an arithmetic data type used to represent file link counts. + In the GNU system, this is equivalent to `unsigned short int'. - If `mkdtemp' cannot create an uniquely named directory, it returns - `NULL' and sets ERRNO appropriately. If TEMPLATE does not end - with `XXXXXX', `mkdtemp' returns `NULL' and does not modify - TEMPLATE. ERRNO will be set to `EINVAL' in this case. + - Data Type: blkcnt_t + This is an arithmetic data type used to represent block counts. + In the GNU system, this is equivalent to `unsigned long int'. - The directory is created using mode `0700'. + If the source is compiled with `_FILE_OFFSET_BITS == 64' this type + is transparently replaced by `blkcnt64_t'. - The directory created by `mkdtemp' cannot clash with temporary files -or directories created by other users. This is because directory -creation always works like `open' with `O_EXCL'. *Note Creating -Directories::. + - Data Type: blkcnt64_t + This is an arithmetic data type used to represent block counts for + the use in LFS. In the GNU system, this is equivalent to `unsigned + long long int'. - The `mkdtemp' function comes from OpenBSD. + When compiling with `_FILE_OFFSET_BITS == 64' this type is + available under the name `blkcnt_t'.  -File: libc.info, Node: Pipes and FIFOs, Next: Sockets, Prev: File System Interface, Up: Top +File: libc.info, Node: Reading Attributes, Next: Testing File Type, Prev: Attribute Meanings, Up: File Attributes -Pipes and FIFOs -*************** +Reading the Attributes of a File +-------------------------------- - A "pipe" is a mechanism for interprocess communication; data written -to the pipe by one process can be read by another process. The data is -handled in a first-in, first-out (FIFO) order. The pipe has no name; it -is created for one use and both ends must be inherited from the single -process which created the pipe. + To examine the attributes of files, use the functions `stat', +`fstat' and `lstat'. They return the attribute information in a +`struct stat' object. All three functions are declared in the header +file `sys/stat.h'. - A "FIFO special file" is similar to a pipe, but instead of being an -anonymous, temporary connection, a FIFO has a name or names like any -other file. Processes open the FIFO by name in order to communicate -through it. + - Function: int stat (const char *FILENAME, struct stat *BUF) + The `stat' function returns information about the attributes of the + file named by FILENAME in the structure pointed to by BUF. - A pipe or FIFO has to be open at both ends simultaneously. If you -read from a pipe or FIFO file that doesn't have any processes writing -to it (perhaps because they have all closed the file, or exited), the -read returns end-of-file. Writing to a pipe or FIFO that doesn't have a -reading process is treated as an error condition; it generates a -`SIGPIPE' signal, and fails with error code `EPIPE' if the signal is -handled or blocked. + If FILENAME is the name of a symbolic link, the attributes you get + describe the file that the link points to. If the link points to a + nonexistent file name, then `stat' fails reporting a nonexistent + file. - Neither pipes nor FIFO special files allow file positioning. Both -reading and writing operations happen sequentially; reading from the -beginning of the file and writing at the end. + The return value is `0' if the operation is successful, or `-1' on + failure. In addition to the usual file name errors (*note File + Name Errors::, the following `errno' error conditions are defined + for this function: -* Menu: + `ENOENT' + The file named by FILENAME doesn't exist. -* Creating a Pipe:: Making a pipe with the `pipe' function. -* Pipe to a Subprocess:: Using a pipe to communicate with a - child process. -* FIFO Special Files:: Making a FIFO special file. -* Pipe Atomicity:: When pipe (or FIFO) I/O is atomic. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `stat64' since the LFS interface transparently + replaces the normal implementation. - -File: libc.info, Node: Creating a Pipe, Next: Pipe to a Subprocess, Up: Pipes and FIFOs + - Function: int stat64 (const char *FILENAME, struct stat64 *BUF) + This function is similar to `stat' but it is also able to work on + files larger then 2^31 bytes on 32-bit systems. To be able to do + this the result is stored in a variable of type `struct stat64' to + which BUF must point. -Creating a Pipe -=============== + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `stat' and so transparently + replaces the interface for small files on 32-bit machines. - The primitive for creating a pipe is the `pipe' function. This -creates both the reading and writing ends of the pipe. It is not very -useful for a single process to use a pipe to talk to itself. In typical -use, a process creates a pipe just before it forks one or more child -processes (*note Creating a Process::). The pipe is then used for -communication either between the parent or child processes, or between -two sibling processes. + - Function: int fstat (int FILEDES, struct stat *BUF) + The `fstat' function is like `stat', except that it takes an open + file descriptor as an argument instead of a file name. *Note + Low-Level I/O::. - The `pipe' function is declared in the header file `unistd.h'. + Like `stat', `fstat' returns `0' on success and `-1' on failure. + The following `errno' error conditions are defined for `fstat': - - Function: int pipe (int FILEDES[2]) - The `pipe' function creates a pipe and puts the file descriptors - for the reading and writing ends of the pipe (respectively) into - `FILEDES[0]' and `FILEDES[1]'. + `EBADF' + The FILEDES argument is not a valid file descriptor. - An easy way to remember that the input end comes first is that file - descriptor `0' is standard input, and file descriptor `1' is - standard output. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `fstat64' since the LFS interface transparently + replaces the normal implementation. - If successful, `pipe' returns a value of `0'. On failure, `-1' is - returned. The following `errno' error conditions are defined for - this function: + - Function: int fstat64 (int FILEDES, struct stat64 *BUF) + This function is similar to `fstat' but is able to work on large + files on 32-bit platforms. For large files the file descriptor + FILEDES should be obtained by `open64' or `creat64'. The BUF + pointer points to a variable of type `struct stat64' which is able + to represent the larger values. - `EMFILE' - The process has too many files open. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `fstat' and so transparently + replaces the interface for small files on 32-bit machines. - `ENFILE' - There are too many open files in the entire system. *Note - Error Codes::, for more information about `ENFILE'. This - error never occurs in the GNU system. + - Function: int lstat (const char *FILENAME, struct stat *BUF) + The `lstat' function is like `stat', except that it does not + follow symbolic links. If FILENAME is the name of a symbolic + link, `lstat' returns information about the link itself; otherwise + `lstat' works like `stat'. *Note Symbolic Links::. - Here is an example of a simple program that creates a pipe. This -program uses the `fork' function (*note Creating a Process::) to create -a child process. The parent process writes data to the pipe, which is -read by the child process. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is in fact `lstat64' since the LFS interface transparently + replaces the normal implementation. - #include - #include - #include - #include - - /* Read characters from the pipe and echo them to `stdout'. */ - - void - read_from_pipe (int file) - { - FILE *stream; - int c; - stream = fdopen (file, "r"); - while ((c = fgetc (stream)) != EOF) - putchar (c); - fclose (stream); - } - - /* Write some random text to the pipe. */ - - void - write_to_pipe (int file) - { - FILE *stream; - stream = fdopen (file, "w"); - fprintf (stream, "hello, world!\n"); - fprintf (stream, "goodbye, world!\n"); - fclose (stream); - } - - int - main (void) - { - pid_t pid; - int mypipe[2]; - - /* Create the pipe. */ - if (pipe (mypipe)) - { - fprintf (stderr, "Pipe failed.\n"); - return EXIT_FAILURE; - } - - /* Create the child process. */ - pid = fork (); - if (pid == (pid_t) 0) - { - /* This is the child process. - Close other end first. */ - close (mypipe[1]); - read_from_pipe (mypipe[0]); - return EXIT_SUCCESS; - } - else if (pid < (pid_t) 0) - { - /* The fork failed. */ - fprintf (stderr, "Fork failed.\n"); - return EXIT_FAILURE; - } - else - { - /* This is the parent process. - Close other end first. */ - close (mypipe[0]); - write_to_pipe (mypipe[1]); - return EXIT_SUCCESS; - } - } + - Function: int lstat64 (const char *FILENAME, struct stat64 *BUF) + This function is similar to `lstat' but it is also able to work on + files larger then 2^31 bytes on 32-bit systems. To be able to do + this the result is stored in a variable of type `struct stat64' to + which BUF must point. + + When the sources are compiled with `_FILE_OFFSET_BITS == 64' this + function is available under the name `lstat' and so transparently + replaces the interface for small files on 32-bit machines.  -File: libc.info, Node: Pipe to a Subprocess, Next: FIFO Special Files, Prev: Creating a Pipe, Up: Pipes and FIFOs +File: libc.info, Node: Testing File Type, Next: File Owner, Prev: Reading Attributes, Up: File Attributes -Pipe to a Subprocess -==================== +Testing the Type of a File +-------------------------- - A common use of pipes is to send data to or receive data from a -program being run as a subprocess. One way of doing this is by using a -combination of `pipe' (to create the pipe), `fork' (to create the -subprocess), `dup2' (to force the subprocess to use the pipe as its -standard input or output channel), and `exec' (to execute the new -program). Or, you can use `popen' and `pclose'. + The "file mode", stored in the `st_mode' field of the file +attributes, contains two kinds of information: the file type code, and +the access permission bits. This section discusses only the type code, +which you can use to tell whether the file is a directory, socket, +symbolic link, and so on. For details about access permissions see +*Note Permission Bits::. - The advantage of using `popen' and `pclose' is that the interface is -much simpler and easier to use. But it doesn't offer as much -flexibility as using the low-level functions directly. + There are two ways you can access the file type information in a file +mode. Firstly, for each file type there is a "predicate macro" which +examines a given file mode and returns whether it is of that type or +not. Secondly, you can mask out the rest of the file mode to leave +just the file type code, and compare this against constants for each of +the supported file types. - - Function: FILE * popen (const char *COMMAND, const char *MODE) - The `popen' function is closely related to the `system' function; - see *Note Running a Command::. It executes the shell command - COMMAND as a subprocess. However, instead of waiting for the - command to complete, it creates a pipe to the subprocess and - returns a stream that corresponds to that pipe. + All of the symbols listed in this section are defined in the header +file `sys/stat.h'. - If you specify a MODE argument of `"r"', you can read from the - stream to retrieve data from the standard output channel of the - subprocess. The subprocess inherits its standard input channel - from the parent process. + The following predicate macros test the type of a file, given the +value M which is the `st_mode' field returned by `stat' on that file: - Similarly, if you specify a MODE argument of `"w"', you can write - to the stream to send data to the standard input channel of the - subprocess. The subprocess inherits its standard output channel - from the parent process. + - Macro: int S_ISDIR (mode_t M) + This macro returns non-zero if the file is a directory. - In the event of an error `popen' returns a null pointer. This - might happen if the pipe or stream cannot be created, if the - subprocess cannot be forked, or if the program cannot be executed. + - Macro: int S_ISCHR (mode_t M) + This macro returns non-zero if the file is a character special + file (a device like a terminal). - - Function: int pclose (FILE *STREAM) - The `pclose' function is used to close a stream created by `popen'. - It waits for the child process to terminate and returns its status - value, as for the `system' function. + - Macro: int S_ISBLK (mode_t M) + This macro returns non-zero if the file is a block special file (a + device like a disk). - Here is an example showing how to use `popen' and `pclose' to filter -output through another program, in this case the paging program `more'. + - Macro: int S_ISREG (mode_t M) + This macro returns non-zero if the file is a regular file. - #include - #include - - void - write_data (FILE * stream) - { - int i; - for (i = 0; i < 100; i++) - fprintf (stream, "%d\n", i); - if (ferror (stream)) - { - fprintf (stderr, "Output to stream failed.\n"); - exit (EXIT_FAILURE); - } - } - - int - main (void) - { - FILE *output; - - output = popen ("more", "w"); - if (!output) - { - fprintf (stderr, - "incorrect parameters or too many files.\n"); - return EXIT_FAILURE; - } - write_data (output); - if (pclose (output) != 0) - { - fprintf (stderr, - "Could not run more or other error.\n"); - } - return EXIT_SUCCESS; - } + - Macro: int S_ISFIFO (mode_t M) + This macro returns non-zero if the file is a FIFO special file, or + a pipe. *Note Pipes and FIFOs::. - -File: libc.info, Node: FIFO Special Files, Next: Pipe Atomicity, Prev: Pipe to a Subprocess, Up: Pipes and FIFOs + - Macro: int S_ISLNK (mode_t M) + This macro returns non-zero if the file is a symbolic link. *Note + Symbolic Links::. -FIFO Special Files -================== + - Macro: int S_ISSOCK (mode_t M) + This macro returns non-zero if the file is a socket. *Note + Sockets::. - A FIFO special file is similar to a pipe, except that it is created -in a different way. Instead of being an anonymous communications -channel, a FIFO special file is entered into the file system by calling -`mkfifo'. + An alternate non-POSIX method of testing the file type is supported +for compatibility with BSD. The mode can be bitwise AND-ed with +`S_IFMT' to extract the file type code, and compared to the appropriate +constant. For example, - Once you have created a FIFO special file in this way, any process -can open it for reading or writing, in the same way as an ordinary file. -However, it has to be open at both ends simultaneously before you can -proceed to do any input or output operations on it. Opening a FIFO for -reading normally blocks until some other process opens the same FIFO for -writing, and vice versa. + S_ISCHR (MODE) - The `mkfifo' function is declared in the header file `sys/stat.h'. +is equivalent to: - - Function: int mkfifo (const char *FILENAME, mode_t MODE) - The `mkfifo' function makes a FIFO special file with name - FILENAME. The MODE argument is used to set the file's - permissions; see *Note Setting Permissions::. + ((MODE & S_IFMT) == S_IFCHR) - The normal, successful return value from `mkfifo' is `0'. In the - case of an error, `-1' is returned. In addition to the usual file - name errors (*note File Name Errors::), the following `errno' - error conditions are defined for this function: + - Macro: int S_IFMT + This is a bit mask used to extract the file type code from a mode + value. - `EEXIST' - The named file already exists. + These are the symbolic names for the different file type codes: - `ENOSPC' - The directory or file system cannot be extended. +`S_IFDIR' + This is the file type constant of a directory file. - `EROFS' - The directory that would contain the file resides on a - read-only file system. +`S_IFCHR' + This is the file type constant of a character-oriented device file. - -File: libc.info, Node: Pipe Atomicity, Prev: FIFO Special Files, Up: Pipes and FIFOs +`S_IFBLK' + This is the file type constant of a block-oriented device file. -Atomicity of Pipe I/O -===================== +`S_IFREG' + This is the file type constant of a regular file. - Reading or writing pipe data is "atomic" if the size of data written -is not greater than `PIPE_BUF'. This means that the data transfer -seems to be an instantaneous unit, in that nothing else in the system -can observe a state in which it is partially complete. Atomic I/O may -not begin right away (it may need to wait for buffer space or for data), -but once it does begin it finishes immediately. +`S_IFLNK' + This is the file type constant of a symbolic link. - Reading or writing a larger amount of data may not be atomic; for -example, output data from other processes sharing the descriptor may be -interspersed. Also, once `PIPE_BUF' characters have been written, -further writes will block until some characters are read. +`S_IFSOCK' + This is the file type constant of a socket. - *Note Limits for Files::, for information about the `PIPE_BUF' -parameter. +`S_IFIFO' + This is the file type constant of a FIFO or pipe. - -File: libc.info, Node: Sockets, Next: Low-Level Terminal Interface, Prev: Pipes and FIFOs, Up: Top + The POSIX.1b standard introduced a few more objects which possibly +can be implemented as object in the filesystem. These are message +queues, semaphores, and shared memory objects. To allow +differentiating these objects from other files the POSIX standard +introduces three new test macros. But unlike the other macros it does +not take the value of the `st_mode' field as the parameter. Instead +they expect a pointer to the whole `struct stat' structure. -Sockets -******* + - Macro: int S_TYPEISMQ (struct stat *S) + If the system implement POSIX message queues as distinct objects + and the file is a message queue object, this macro returns a + non-zero value. In all other cases the result is zero. - This chapter describes the GNU facilities for interprocess -communication using sockets. + - Macro: int S_TYPEISSEM (struct stat *S) + If the system implement POSIX semaphores as distinct objects and + the file is a semaphore object, this macro returns a non-zero + value. In all other cases the result is zero. - A "socket" is a generalized interprocess communication channel. -Like a pipe, a socket is represented as a file descriptor. Unlike pipes -sockets support communication between unrelated processes, and even -between processes running on different machines that communicate over a -network. Sockets are the primary means of communicating with other -machines; `telnet', `rlogin', `ftp', `talk' and the other familiar -network programs use sockets. + - Macro: int S_TYPEISSHM (struct stat *S) + If the system implement POSIX shared memory objects as distinct + objects and the file is an shared memory object, this macro + returns a non-zero value. In all other cases the result is zero. - Not all operating systems support sockets. In the GNU library, the -header file `sys/socket.h' exists regardless of the operating system, -and the socket functions always exist, but if the system does not -really support sockets these functions always fail. + +File: libc.info, Node: File Owner, Next: Permission Bits, Prev: Testing File Type, Up: File Attributes - *Incomplete:* We do not currently document the facilities for -broadcast messages or for configuring Internet interfaces. The -reentrant functions and some newer functions that are related to IPv6 -aren't documented either so far. +File Owner +---------- -* Menu: + Every file has an "owner" which is one of the registered user names +defined on the system. Each file also has a "group" which is one of +the defined groups. The file owner can often be useful for showing you +who edited the file (especially when you edit with GNU Emacs), but its +main purpose is for access control. -* Socket Concepts:: Basic concepts you need to know about. -* Communication Styles::Stream communication, datagrams and other styles. -* Socket Addresses:: How socket names (``addresses'') work. -* Interface Naming:: Identifying specific network interfaces. -* Local Namespace:: Details about the local namespace. -* Internet Namespace:: Details about the Internet namespace. -* Misc Namespaces:: Other namespaces not documented fully here. -* Open/Close Sockets:: Creating sockets and destroying them. -* Connections:: Operations on sockets with connection state. -* Datagrams:: Operations on datagram sockets. -* Inetd:: Inetd is a daemon that starts servers on request. - The most convenient way to write a server - is to make it work with Inetd. -* Socket Options:: Miscellaneous low-level socket options. -* Networks Database:: Accessing the database of network names. + The file owner and group play a role in determining access because +the file has one set of access permission bits for the owner, another +set that applies to users who belong to the file's group, and a third +set of bits that applies to everyone else. *Note Access Permission::, +for the details of how access is decided based on this data. - -File: libc.info, Node: Socket Concepts, Next: Communication Styles, Up: Sockets + When a file is created, its owner is set to the effective user ID of +the process that creates it (*note Process Persona::). The file's +group ID may be set to either the effective group ID of the process, or +the group ID of the directory that contains the file, depending on the +system where the file is stored. When you access a remote file system, +it behaves according to its own rules, not according to the system your +program is running on. Thus, your program must be prepared to encounter +either kind of behavior no matter what kind of system you run it on. -Socket Concepts -=============== + You can change the owner and/or group owner of an existing file using +the `chown' function. This is the primitive for the `chown' and +`chgrp' shell commands. - When you create a socket, you must specify the style of communication -you want to use and the type of protocol that should implement it. The -"communication style" of a socket defines the user-level semantics of -sending and receiving data on the socket. Choosing a communication -style specifies the answers to questions such as these: + The prototype for this function is declared in `unistd.h'. - * *What are the units of data transmission?* Some communication - styles regard the data as a sequence of bytes with no larger - structure; others group the bytes into records (which are known in - this context as "packets"). + - Function: int chown (const char *FILENAME, uid_t OWNER, gid_t GROUP) + The `chown' function changes the owner of the file FILENAME to + OWNER, and its group owner to GROUP. - * *Can data be lost during normal operation?* Some communication - styles guarantee that all the data sent arrives in the order it was - sent (barring system or network crashes); other styles occasionally - lose data as a normal part of operation, and may sometimes deliver - packets more than once or in the wrong order. + Changing the owner of the file on certain systems clears the + set-user-ID and set-group-ID permission bits. (This is because + those bits may not be appropriate for the new owner.) Other file + permission bits are not changed. - Designing a program to use unreliable communication styles usually - involves taking precautions to detect lost or misordered packets - and to retransmit data as needed. + The return value is `0' on success and `-1' on failure. In + addition to the usual file name errors (*note File Name Errors::), + the following `errno' error conditions are defined for this + function: - * *Is communication entirely with one partner?* Some communication - styles are like a telephone call--you make a "connection" with one - remote socket and then exchange data freely. Other styles are - like mailing letters--you specify a destination address for each - message you send. + `EPERM' + This process lacks permission to make the requested change. - You must also choose a "namespace" for naming the socket. A socket -name ("address") is meaningful only in the context of a particular -namespace. In fact, even the data type to use for a socket name may -depend on the namespace. Namespaces are also called "domains", but we -avoid that word as it can be confused with other usage of the same -term. Each namespace has a symbolic name that starts with `PF_'. A -corresponding symbolic name starting with `AF_' designates the address -format for that namespace. + Only privileged users or the file's owner can change the + file's group. On most file systems, only privileged users + can change the file owner; some file systems allow you to + change the owner if you are currently the owner. When you + access a remote file system, the behavior you encounter is + determined by the system that actually holds the file, not by + the system your program is running on. - Finally you must choose the "protocol" to carry out the -communication. The protocol determines what low-level mechanism is used -to transmit and receive data. Each protocol is valid for a particular -namespace and communication style; a namespace is sometimes called a -"protocol family" because of this, which is why the namespace names -start with `PF_'. + *Note Options for Files::, for information about the + `_POSIX_CHOWN_RESTRICTED' macro. - The rules of a protocol apply to the data passing between two -programs, perhaps on different computers; most of these rules are -handled by the operating system and you need not know about them. What -you do need to know about protocols is this: + `EROFS' + The file is on a read-only file system. - * In order to have communication between two sockets, they must - specify the _same_ protocol. + - Function: int fchown (int FILEDES, int OWNER, int GROUP) + This is like `chown', except that it changes the owner of the open + file with descriptor FILEDES. - * Each protocol is meaningful with particular style/namespace - combinations and cannot be used with inappropriate combinations. - For example, the TCP protocol fits only the byte stream style of - communication and the Internet namespace. + The return value from `fchown' is `0' on success and `-1' on + failure. The following `errno' error codes are defined for this + function: - * For each combination of style and namespace there is a "default - protocol", which you can request by specifying 0 as the protocol - number. And that's what you should normally do--use the default. + `EBADF' + The FILEDES argument is not a valid file descriptor. - Throughout the following description at various places -variables/parameters to denote sizes are required. And here the trouble -starts. In the first implementations the type of these variables was -simply `int'. On most machines at that time an `int' was 32 bits wide, -which created a _de facto_ standard requiring 32-bit variables. This -is important since references to variables of this type are passed to -the kernel. + `EINVAL' + The FILEDES argument corresponds to a pipe or socket, not an + ordinary file. - Then the POSIX people came and unified the interface with the words -"all size values are of type `size_t'". On 64-bit machines `size_t' is -64 bits wide, so pointers to variables were no longer possible. + `EPERM' + This process lacks permission to make the requested change. + For details see `chmod' above. - The Unix98 specification provides a solution by introducing a type -`socklen_t'. This type is used in all of the cases that POSIX changed -to use `size_t'. The only requirement of this type is that it be an -unsigned type of at least 32 bits. Therefore, implementations which -require that references to 32-bit variables be passed can be as happy -as implementations which use 64-bit values. + `EROFS' + The file resides on a read-only file system.  -File: libc.info, Node: Communication Styles, Next: Socket Addresses, Prev: Socket Concepts, Up: Sockets +File: libc.info, Node: Permission Bits, Next: Access Permission, Prev: File Owner, Up: File Attributes -Communication Styles -==================== +The Mode Bits for Access Permission +----------------------------------- - The GNU library includes support for several different kinds of -sockets, each with different characteristics. This section describes -the supported socket types. The symbolic constants listed here are -defined in `sys/socket.h'. + The "file mode", stored in the `st_mode' field of the file +attributes, contains two kinds of information: the file type code, and +the access permission bits. This section discusses only the access +permission bits, which control who can read or write the file. *Note +Testing File Type::, for information about the file type code. - - Macro: int SOCK_STREAM - The `SOCK_STREAM' style is like a pipe (*note Pipes and FIFOs::). - It operates over a connection with a particular remote socket and - transmits data reliably as a stream of bytes. + All of the symbols listed in this section are defined in the header +file `sys/stat.h'. - Use of this style is covered in detail in *Note Connections::. + These symbolic constants are defined for the file mode bits that +control access permission for the file: - - Macro: int SOCK_DGRAM - The `SOCK_DGRAM' style is used for sending individually-addressed - packets unreliably. It is the diametrical opposite of - `SOCK_STREAM'. +`S_IRUSR' +`S_IREAD' + Read permission bit for the owner of the file. On many systems + this bit is 0400. `S_IREAD' is an obsolete synonym provided for + BSD compatibility. - Each time you write data to a socket of this kind, that data - becomes one packet. Since `SOCK_DGRAM' sockets do not have - connections, you must specify the recipient address with each - packet. +`S_IWUSR' +`S_IWRITE' + Write permission bit for the owner of the file. Usually 0200. + `S_IWRITE' is an obsolete synonym provided for BSD compatibility. - The only guarantee that the system makes about your requests to - transmit data is that it will try its best to deliver each packet - you send. It may succeed with the sixth packet after failing with - the fourth and fifth packets; the seventh packet may arrive before - the sixth, and may arrive a second time after the sixth. +`S_IXUSR' +`S_IEXEC' + Execute (for ordinary files) or search (for directories) + permission bit for the owner of the file. Usually 0100. + `S_IEXEC' is an obsolete synonym provided for BSD compatibility. - The typical use for `SOCK_DGRAM' is in situations where it is - acceptable to simply re-send a packet if no response is seen in a - reasonable amount of time. +`S_IRWXU' + This is equivalent to `(S_IRUSR | S_IWUSR | S_IXUSR)'. - *Note Datagrams::, for detailed information about how to use - datagram sockets. +`S_IRGRP' + Read permission bit for the group owner of the file. Usually 040. - - Macro: int SOCK_RAW - This style provides access to low-level network protocols and - interfaces. Ordinary user programs usually have no need to use - this style. +`S_IWGRP' + Write permission bit for the group owner of the file. Usually 020. - -File: libc.info, Node: Socket Addresses, Next: Interface Naming, Prev: Communication Styles, Up: Sockets +`S_IXGRP' + Execute or search permission bit for the group owner of the file. + Usually 010. -Socket Addresses -================ +`S_IRWXG' + This is equivalent to `(S_IRGRP | S_IWGRP | S_IXGRP)'. - The name of a socket is normally called an "address". The functions -and symbols for dealing with socket addresses were named -inconsistently, sometimes using the term "name" and sometimes using -"address". You can regard these terms as synonymous where sockets are -concerned. +`S_IROTH' + Read permission bit for other users. Usually 04. - A socket newly created with the `socket' function has no address. -Other processes can find it for communication only if you give it an -address. We call this "binding" the address to the socket, and the way -to do it is with the `bind' function. +`S_IWOTH' + Write permission bit for other users. Usually 02. - You need be concerned with the address of a socket if other processes -are to find it and start communicating with it. You can specify an -address for other sockets, but this is usually pointless; the first time -you send data from a socket, or use it to initiate a connection, the -system assigns an address automatically if you have not specified one. +`S_IXOTH' + Execute or search permission bit for other users. Usually 01. - Occasionally a client needs to specify an address because the server -discriminates based on address; for example, the rsh and rlogin -protocols look at the client's socket address and only bypass password -checking if it is less than `IPPORT_RESERVED' (*note Ports::). +`S_IRWXO' + This is equivalent to `(S_IROTH | S_IWOTH | S_IXOTH)'. - The details of socket addresses vary depending on what namespace you -are using. *Note Local Namespace::, or *Note Internet Namespace::, for -specific information. +`S_ISUID' + This is the set-user-ID on execute bit, usually 04000. *Note How + Change Persona::. - Regardless of the namespace, you use the same functions `bind' and -`getsockname' to set and examine a socket's address. These functions -use a phony data type, `struct sockaddr *', to accept the address. In -practice, the address lives in a structure of some other data type -appropriate to the address format you are using, but you cast its -address to `struct sockaddr *' when you pass it to `bind'. +`S_ISGID' + This is the set-group-ID on execute bit, usually 02000. *Note How + Change Persona::. -* Menu: +`S_ISVTX' + This is the "sticky" bit, usually 01000. -* Address Formats:: About `struct sockaddr'. -* Setting Address:: Binding an address to a socket. -* Reading Address:: Reading the address of a socket. + For a directory it gives permission to delete a file in that + directory only if you own that file. Ordinarily, a user can + either delete all the files in a directory or cannot delete any of + them (based on whether the user has write permission for the + directory). The same restriction applies--you must have both + write permission for the directory and own the file you want to + delete. The one exception is that the owner of the directory can + delete any file in the directory, no matter who owns it (provided + the owner has given himself write permission for the directory). + This is commonly used for the `/tmp' directory, where anyone may + create files but not delete files created by other users. + + Originally the sticky bit on an executable file modified the + swapping policies of the system. Normally, when a program + terminated, its pages in core were immediately freed and reused. + If the sticky bit was set on the executable file, the system kept + the pages in core for a while as if the program were still + running. This was advantageous for a program likely to be run + many times in succession. This usage is obsolete in modern + systems. When a program terminates, its pages always remain in + core as long as there is no shortage of memory in the system. + When the program is next run, its pages will still be in core if + no shortage arose since the last run. + + On some modern systems where the sticky bit has no useful meaning + for an executable file, you cannot set the bit at all for a + non-directory. If you try, `chmod' fails with `EFTYPE'; *note + Setting Permissions::. + + Some systems (particularly SunOS) have yet another use for the + sticky bit. If the sticky bit is set on a file that is _not_ + executable, it means the opposite: never cache the pages of this + file at all. The main use of this is for the files on an NFS + server machine which are used as the swap area of diskless client + machines. The idea is that the pages of the file will be cached + in the client's memory, so it is a waste of the server's memory to + cache them a second time. With this usage the sticky bit also + implies that the filesystem may fail to record the file's + modification time onto disk reliably (the idea being that no-one + cares for a swap file). + + This bit is only available on BSD systems (and those derived from + them). Therefore one has to use the `_BSD_SOURCE' feature select + macro to get the definition (*note Feature Test Macros::). + + The actual bit values of the symbols are listed in the table above +so you can decode file mode values when debugging your programs. These +bit values are correct for most systems, but they are not guaranteed. + + *Warning:* Writing explicit numbers for file permissions is bad +practice. Not only is it not portable, it also requires everyone who +reads your program to remember what the bits mean. To make your program +clean use the symbolic names.  -File: libc.info, Node: Address Formats, Next: Setting Address, Up: Socket Addresses +File: libc.info, Node: Access Permission, Next: Setting Permissions, Prev: Permission Bits, Up: File Attributes -Address Formats ---------------- +How Your Access to a File is Decided +------------------------------------ - The functions `bind' and `getsockname' use the generic data type -`struct sockaddr *' to represent a pointer to a socket address. You -can't use this data type effectively to interpret an address or -construct one; for that, you must use the proper data type for the -socket's namespace. + Recall that the operating system normally decides access permission +for a file based on the effective user and group IDs of the process and +its supplementary group IDs, together with the file's owner, group and +permission bits. These concepts are discussed in detail in *Note +Process Persona::. - Thus, the usual practice is to construct an address of the proper -namespace-specific type, then cast a pointer to `struct sockaddr *' -when you call `bind' or `getsockname'. + If the effective user ID of the process matches the owner user ID of +the file, then permissions for read, write, and execute/search are +controlled by the corresponding "user" (or "owner") bits. Likewise, if +any of the effective group ID or supplementary group IDs of the process +matches the group owner ID of the file, then permissions are controlled +by the "group" bits. Otherwise, permissions are controlled by the +"other" bits. - The one piece of information that you can get from the `struct -sockaddr' data type is the "address format designator". This tells you -which data type to use to understand the address fully. + Privileged users, like `root', can access any file regardless of its +permission bits. As a special case, for a file to be executable even +by a privileged user, at least one of its execute bits must be set. - The symbols in this section are defined in the header file -`sys/socket.h'. + +File: libc.info, Node: Setting Permissions, Next: Testing File Access, Prev: Access Permission, Up: File Attributes - - Data Type: struct sockaddr - The `struct sockaddr' type itself has the following members: +Assigning File Permissions +-------------------------- - `short int sa_family' - This is the code for the address format of this address. It - identifies the format of the data which follows. + The primitive functions for creating files (for example, `open' or +`mkdir') take a MODE argument, which specifies the file permissions to +give the newly created file. This mode is modified by the process's +"file creation mask", or "umask", before it is used. - `char sa_data[14]' - This is the actual socket address data, which is - format-dependent. Its length also depends on the format, and - may well be more than 14. The length 14 of `sa_data' is - essentially arbitrary. + The bits that are set in the file creation mask identify permissions +that are always to be disabled for newly created files. For example, if +you set all the "other" access bits in the mask, then newly created +files are not accessible at all to processes in the "other" category, +even if the MODE argument passed to the create function would permit +such access. In other words, the file creation mask is the complement +of the ordinary access permissions you want to grant. - Each address format has a symbolic name which starts with `AF_'. -Each of them corresponds to a `PF_' symbol which designates the -corresponding namespace. Here is a list of address format names: + Programs that create files typically specify a MODE argument that +includes all the permissions that make sense for the particular file. +For an ordinary file, this is typically read and write permission for +all classes of users. These permissions are then restricted as +specified by the individual user's own file creation mask. -`AF_LOCAL' - This designates the address format that goes with the local - namespace. (`PF_LOCAL' is the name of that namespace.) *Note - Local Namespace Details::, for information about this address - format. + To change the permission of an existing file given its name, call +`chmod'. This function uses the specified permission bits and ignores +the file creation mask. -`AF_UNIX' - This is a synonym for `AF_LOCAL'. Although `AF_LOCAL' is mandated - by POSIX.1g, `AF_UNIX' is portable to more systems. `AF_UNIX' was - the traditional name stemming from BSD, so even most POSIX systems - support it. It is also the name of choice in the Unix98 - specification. (The same is true for `PF_UNIX' vs. `PF_LOCAL'). + In normal use, the file creation mask is initialized by the user's +login shell (using the `umask' shell command), and inherited by all +subprocesses. Application programs normally don't need to worry about +the file creation mask. It will automatically do what it is supposed to +do. -`AF_FILE' - This is another synonym for `AF_LOCAL', for compatibility. - (`PF_FILE' is likewise a synonym for `PF_LOCAL'.) + When your program needs to create a file and bypass the umask for its +access permissions, the easiest way to do this is to use `fchmod' after +opening the file, rather than changing the umask. In fact, changing +the umask is usually done only by shells. They use the `umask' +function. -`AF_INET' - This designates the address format that goes with the Internet - namespace. (`PF_INET' is the name of that namespace.) *Note - Internet Address Formats::. + The functions in this section are declared in `sys/stat.h'. -`AF_INET6' - This is similar to `AF_INET', but refers to the IPv6 protocol. - (`PF_INET6' is the name of the corresponding namespace.) + - Function: mode_t umask (mode_t MASK) + The `umask' function sets the file creation mask of the current + process to MASK, and returns the previous value of the file + creation mask. -`AF_UNSPEC' - This designates no particular address format. It is used only in - rare cases, such as to clear out the default destination address - of a "connected" datagram socket. *Note Sending Datagrams::. + Here is an example showing how to read the mask with `umask' + without changing it permanently: - The corresponding namespace designator symbol `PF_UNSPEC' exists - for completeness, but there is no reason to use it in a program. + mode_t + read_umask (void) + { + mode_t mask = umask (0); + umask (mask); + return mask; + } - `sys/socket.h' defines symbols starting with `AF_' for many -different kinds of networks, most or all of which are not actually -implemented. We will document those that really work as we receive -information about how to use them. + However, it is better to use `getumask' if you just want to read + the mask value, because it is reentrant (at least if you use the + GNU operating system). - -File: libc.info, Node: Setting Address, Next: Reading Address, Prev: Address Formats, Up: Socket Addresses + - Function: mode_t getumask (void) + Return the current value of the file creation mask for the current + process. This function is a GNU extension. -Setting the Address of a Socket -------------------------------- + - Function: int chmod (const char *FILENAME, mode_t MODE) + The `chmod' function sets the access permission bits for the file + named by FILENAME to MODE. - Use the `bind' function to assign an address to a socket. The -prototype for `bind' is in the header file `sys/socket.h'. For -examples of use, see *Note Local Socket Example::, or see *Note Inet -Example::. + If FILENAME is a symbolic link, `chmod' changes the permissions of + the file pointed to by the link, not those of the link itself. - - Function: int bind (int SOCKET, struct sockaddr *ADDR, socklen_t - LENGTH) - The `bind' function assigns an address to the socket SOCKET. The - ADDR and LENGTH arguments specify the address; the detailed format - of the address depends on the namespace. The first part of the - address is always the format designator, which specifies a - namespace, and says that the address is in the format of that - namespace. + This function returns `0' if successful and `-1' if not. In + addition to the usual file name errors (*note File Name Errors::), + the following `errno' error conditions are defined for this + function: - The return value is `0' on success and `-1' on failure. The - following `errno' error conditions are defined for this function: + `ENOENT' + The named file doesn't exist. - `EBADF' - The SOCKET argument is not a valid file descriptor. + `EPERM' + This process does not have permission to change the access + permissions of this file. Only the file's owner (as judged + by the effective user ID of the process) or a privileged user + can change them. - `ENOTSOCK' - The descriptor SOCKET is not a socket. + `EROFS' + The file resides on a read-only file system. - `EADDRNOTAVAIL' - The specified address is not available on this machine. + `EFTYPE' + MODE has the `S_ISVTX' bit (the "sticky bit") set, and the + named file is not a directory. Some systems do not allow + setting the sticky bit on non-directory files, and some do + (and only some of those assign a useful meaning to the bit + for non-directory files). - `EADDRINUSE' - Some other socket is already using the specified address. + You only get `EFTYPE' on systems where the sticky bit has no + useful meaning for non-directory files, so it is always safe + to just clear the bit in MODE and call `chmod' again. *Note + Permission Bits::, for full details on the sticky bit. + + - Function: int fchmod (int FILEDES, int MODE) + This is like `chmod', except that it changes the permissions of the + currently open file given by FILEDES. + + The return value from `fchmod' is `0' on success and `-1' on + failure. The following `errno' error codes are defined for this + function: + + `EBADF' + The FILEDES argument is not a valid file descriptor. `EINVAL' - The socket SOCKET already has an address. + The FILEDES argument corresponds to a pipe or socket, or + something else that doesn't really have access permissions. - `EACCES' - You do not have permission to access the requested address. - (In the Internet domain, only the super-user is allowed to - specify a port number in the range 0 through - `IPPORT_RESERVED' minus one; see *Note Ports::.) + `EPERM' + This process does not have permission to change the access + permissions of this file. Only the file's owner (as judged + by the effective user ID of the process) or a privileged user + can change them. - Additional conditions may be possible depending on the particular - namespace of the socket. + `EROFS' + The file resides on a read-only file system.  -File: libc.info, Node: Reading Address, Prev: Setting Address, Up: Socket Addresses +File: libc.info, Node: Testing File Access, Next: File Times, Prev: Setting Permissions, Up: File Attributes -Reading the Address of a Socket -------------------------------- +Testing Permission to Access a File +----------------------------------- - Use the function `getsockname' to examine the address of an Internet -socket. The prototype for this function is in the header file -`sys/socket.h'. + In some situations it is desirable to allow programs to access files +or devices even if this is not possible with the permissions granted to +the user. One possible solution is to set the setuid-bit of the program +file. If such a program is started the _effective_ user ID of the +process is changed to that of the owner of the program file. So to +allow write access to files like `/etc/passwd', which normally can be +written only by the super-user, the modifying program will have to be +owned by `root' and the setuid-bit must be set. - - Function: int getsockname (int SOCKET, struct sockaddr *ADDR, - socklen_t *LENGTH-PTR) - The `getsockname' function returns information about the address - of the socket SOCKET in the locations specified by the ADDR and - LENGTH-PTR arguments. Note that the LENGTH-PTR is a pointer; you - should initialize it to be the allocation size of ADDR, and on - return it contains the actual size of the address data. + But beside the files the program is intended to change the user +should not be allowed to access any file to which s/he would not have +access anyway. The program therefore must explicitly check whether _the +user_ would have the necessary access to a file, before it reads or +writes the file. - The format of the address data depends on the socket namespace. - The length of the information is usually fixed for a given - namespace, so normally you can know exactly how much space is - needed and can provide that much. The usual practice is to - allocate a place for the value using the proper data type for the - socket's namespace, then cast its address to `struct sockaddr *' - to pass it to `getsockname'. + To do this, use the function `access', which checks for access +permission based on the process's _real_ user ID rather than the +effective user ID. (The setuid feature does not alter the real user ID, +so it reflects the user who actually ran the program.) - The return value is `0' on success and `-1' on error. The - following `errno' error conditions are defined for this function: + There is another way you could check this access, which is easy to +describe, but very hard to use. This is to examine the file mode bits +and mimic the system's own access computation. This method is +undesirable because many systems have additional access control +features; your program cannot portably mimic them, and you would not +want to try to keep track of the diverse features that different systems +have. Using `access' is simple and automatically does whatever is +appropriate for the system you are using. - `EBADF' - The SOCKET argument is not a valid file descriptor. + `access' is _only_ only appropriate to use in setuid programs. A +non-setuid program will always use the effective ID rather than the +real ID. - `ENOTSOCK' - The descriptor SOCKET is not a socket. + The symbols in this section are declared in `unistd.h'. - `ENOBUFS' - There are not enough internal buffers available for the - operation. + - Function: int access (const char *FILENAME, int HOW) + The `access' function checks to see whether the file named by + FILENAME can be accessed in the way specified by the HOW argument. + The HOW argument either can be the bitwise OR of the flags + `R_OK', `W_OK', `X_OK', or the existence test `F_OK'. - You can't read the address of a socket in the file namespace. This -is consistent with the rest of the system; in general, there's no way to -find a file's name from a descriptor for that file. + This function uses the _real_ user and group IDs of the calling + process, rather than the _effective_ IDs, to check for access + permission. As a result, if you use the function from a `setuid' + or `setgid' program (*note How Change Persona::), it gives + information relative to the user who actually ran the program. + + The return value is `0' if the access is permitted, and `-1' + otherwise. (In other words, treated as a predicate function, + `access' returns true if the requested access is _denied_.) + + In addition to the usual file name errors (*note File Name + Errors::), the following `errno' error conditions are defined for + this function: + + `EACCES' + The access specified by HOW is denied. + + `ENOENT' + The file doesn't exist. + + `EROFS' + Write permission was requested for a file on a read-only file + system. + + These macros are defined in the header file `unistd.h' for use as +the HOW argument to the `access' function. The values are integer +constants. + + - Macro: int R_OK + Flag meaning test for read permission. + + - Macro: int W_OK + Flag meaning test for write permission. + + - Macro: int X_OK + Flag meaning test for execute/search permission. + + - Macro: int F_OK + Flag meaning test for existence of the file. diff -durpN glibc-2.2.4/manual/libc.info-26 glibc-2.2.5/manual/libc.info-26 --- glibc-2.2.4/manual/libc.info-26 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-26 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1182 +33,1202 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Interface Naming, Next: Local Namespace, Prev: Socket Addresses, Up: Sockets - -Interface Naming -================ +File: libc.info, Node: File Times, Next: File Size, Prev: Testing File Access, Up: File Attributes - Each network interface has a name. This usually consists of a few -letters that relate to the type of interface, which may be followed by a -number if there is more than one interface of that type. Examples -might be `lo' (the loopback interface) and `eth0' (the first Ethernet -interface). +File Times +---------- - Although such names are convenient for humans, it would be clumsy to -have to use them whenever a program needs to refer to an interface. In -such situations an interface is referred to by its "index", which is an -arbitrarily-assigned small positive integer. + Each file has three time stamps associated with it: its access time, +its modification time, and its attribute modification time. These +correspond to the `st_atime', `st_mtime', and `st_ctime' members of the +`stat' structure; see *Note File Attributes::. - The following functions, constants and data types are declared in the -header file `net/if.h'. + All of these times are represented in calendar time format, as +`time_t' objects. This data type is defined in `time.h'. For more +information about representation and manipulation of time values, see +*Note Calendar Time::. - - Constant: size_t IFNAMSIZ - This constant defines the maximum buffer size needed to hold an - interface name, including its terminating zero byte. + Reading from a file updates its access time attribute, and writing +updates its modification time. When a file is created, all three time +stamps for that file are set to the current time. In addition, the +attribute change time and modification time fields of the directory that +contains the new entry are updated. - - Function: unsigned int if_nametoindex (const char *ifname) - This function yields the interface index corresponding to a - particular name. If no interface exists with the name given, it - returns 0. + Adding a new name for a file with the `link' function updates the +attribute change time field of the file being linked, and both the +attribute change time and modification time fields of the directory +containing the new name. These same fields are affected if a file name +is deleted with `unlink', `remove' or `rmdir'. Renaming a file with +`rename' affects only the attribute change time and modification time +fields of the two parent directories involved, and not the times for +the file being renamed. - - Function: char * if_indextoname (unsigned int ifindex, char *ifname) - This function maps an interface index to its corresponding name. - The returned name is placed in the buffer pointed to by `ifname', - which must be at least `IFNAMSIZ' bytes in length. If the index - was invalid, the function's return value is a null pointer, - otherwise it is `ifname'. + Changing the attributes of a file (for example, with `chmod') +updates its attribute change time field. - - Data Type: struct if_nameindex - This data type is used to hold the information about a single - interface. It has the following members: + You can also change some of the time stamps of a file explicitly +using the `utime' function--all except the attribute change time. You +need to include the header file `utime.h' to use this facility. - `unsigned int if_index;' - This is the interface index. + - Data Type: struct utimbuf + The `utimbuf' structure is used with the `utime' function to + specify new access and modification times for a file. It contains + the following members: - `char *if_name' - This is the null-terminated index name. + `time_t actime' + This is the access time for the file. + `time_t modtime' + This is the modification time for the file. - - Function: struct if_nameindex * if_nameindex (void) - This function returns an array of `if_nameindex' structures, one - for every interface that is present. The end of the list is - indicated by a structure with an interface of 0 and a null name - pointer. If an error occurs, this function returns a null pointer. + - Function: int utime (const char *FILENAME, const struct utimbuf + *TIMES) + This function is used to modify the file times associated with the + file named FILENAME. - The returned structure must be freed with `if_freenameindex' after - use. + If TIMES is a null pointer, then the access and modification times + of the file are set to the current time. Otherwise, they are set + to the values from the `actime' and `modtime' members + (respectively) of the `utimbuf' structure pointed to by TIMES. - - Function: void if_freenameindex (struct if_nameindex *ptr) - This function frees the structure returned by an earlier call to - `if_nameindex'. + The attribute modification time for the file is set to the current + time in either case (since changing the time stamps is itself a + modification of the file attributes). - -File: libc.info, Node: Local Namespace, Next: Internet Namespace, Prev: Interface Naming, Up: Sockets + The `utime' function returns `0' if successful and `-1' on + failure. In addition to the usual file name errors (*note File + Name Errors::), the following `errno' error conditions are defined + for this function: -The Local Namespace -=================== + `EACCES' + There is a permission problem in the case where a null + pointer was passed as the TIMES argument. In order to update + the time stamp on the file, you must either be the owner of + the file, have write permission for the file, or be a + privileged user. - This section describes the details of the local namespace, whose -symbolic name (required when you create a socket) is `PF_LOCAL'. The -local namespace is also known as "Unix domain sockets". Another name -is file namespace since socket addresses are normally implemented as -file names. + `ENOENT' + The file doesn't exist. -* Menu: + `EPERM' + If the TIMES argument is not a null pointer, you must either + be the owner of the file or be a privileged user. -* Concepts: Local Namespace Concepts. What you need to understand. -* Details: Local Namespace Details. Address format, symbolic names, etc. -* Example: Local Socket Example. Example of creating a socket. + `EROFS' + The file lives on a read-only file system. - -File: libc.info, Node: Local Namespace Concepts, Next: Local Namespace Details, Up: Local Namespace + Each of the three time stamps has a corresponding microsecond part, +which extends its resolution. These fields are called `st_atime_usec', +`st_mtime_usec', and `st_ctime_usec'; each has a value between 0 and +999,999, which indicates the time in microseconds. They correspond to +the `tv_usec' field of a `timeval' structure; see *Note High-Resolution +Calendar::. -Local Namespace Concepts ------------------------- + The `utimes' function is like `utime', but also lets you specify the +fractional part of the file times. The prototype for this function is +in the header file `sys/time.h'. - In the local namespace socket addresses are file names. You can -specify any file name you want as the address of the socket, but you -must have write permission on the directory containing it. It's common -to put these files in the `/tmp' directory. + - Function: int utimes (const char *FILENAME, struct timeval TVP[2]) + This function sets the file access and modification times of the + file FILENAME. The new file access time is specified by `TVP[0]', + and the new modification time by `TVP[1]'. This function comes + from BSD. - One peculiarity of the local namespace is that the name is only used -when opening the connection; once open the address is not meaningful and -may not exist. + The return values and error conditions are the same as for the + `utime' function. - Another peculiarity is that you cannot connect to such a socket from -another machine-not even if the other machine shares the file system -which contains the name of the socket. You can see the socket in a -directory listing, but connecting to it never succeeds. Some programs -take advantage of this, such as by asking the client to send its own -process ID, and using the process IDs to distinguish between clients. -However, we recommend you not use this method in protocols you design, -as we might someday permit connections from other machines that mount -the same file systems. Instead, send each new client an identifying -number if you want it to have one. + +File: libc.info, Node: File Size, Prev: File Times, Up: File Attributes - After you close a socket in the local namespace, you should delete -the file name from the file system. Use `unlink' or `remove' to do -this; see *Note Deleting Files::. +File Size +--------- - The local namespace supports just one protocol for any communication -style; it is protocol number `0'. + Normally file sizes are maintained automatically. A file begins +with a size of 0 and is automatically extended when data is written past +its end. It is also possible to empty a file completely by an `open' +or `fopen' call. - -File: libc.info, Node: Local Namespace Details, Next: Local Socket Example, Prev: Local Namespace Concepts, Up: Local Namespace + However, sometimes it is necessary to _reduce_ the size of a file. +This can be done with the `truncate' and `ftruncate' functions. They +were introduced in BSD Unix. `ftruncate' was later added to POSIX.1. -Details of Local Namespace --------------------------- + Some systems allow you to extend a file (creating holes) with these +functions. This is useful when using memory-mapped I/O (*note +Memory-mapped I/O::), where files are not automatically extended. +However, it is not portable but must be implemented if `mmap' allows +mapping of files (i.e., `_POSIX_MAPPED_FILES' is defined). - To create a socket in the local namespace, use the constant -`PF_LOCAL' as the NAMESPACE argument to `socket' or `socketpair'. This -constant is defined in `sys/socket.h'. + Using these functions on anything other than a regular file gives +_undefined_ results. On many systems, such a call will appear to +succeed, without actually accomplishing anything. - - Macro: int PF_LOCAL - This designates the local namespace, in which socket addresses are - local names, and its associated family of protocols. `PF_Local' - is the macro used by Posix.1g. + - Function: int truncate (const char *FILENAME, off_t LENGTH) + The `truncate' function changes the size of FILENAME to LENGTH. + If LENGTH is shorter than the previous length, data at the end + will be lost. The file must be writable by the user to perform + this operation. - - Macro: int PF_UNIX - This is a synonym for `PF_LOCAL', for compatibility's sake. + If LENGTH is longer, holes will be added to the end. However, some + systems do not support this feature and will leave the file + unchanged. - - Macro: int PF_FILE - This is a synonym for `PF_LOCAL', for compatibility's sake. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' the + `truncate' function is in fact `truncate64' and the type `off_t' + has 64 bits which makes it possible to handle files up to 2^63 + bytes in length. - The structure for specifying socket names in the local namespace is -defined in the header file `sys/un.h': + The return value is 0 for success, or -1 for an error. In + addition to the usual file name errors, the following errors may + occur: - - Data Type: struct sockaddr_un - This structure is used to specify local namespace socket - addresses. It has the following members: + `EACCES' + The file is a directory or not writable. - `short int sun_family' - This identifies the address family or format of the socket - address. You should store the value `AF_LOCAL' to designate - the local namespace. *Note Socket Addresses::. + `EINVAL' + LENGTH is negative. - `char sun_path[108]' - This is the file name to use. + `EFBIG' + The operation would extend the file beyond the limits of the + operating system. - *Incomplete:* Why is 108 a magic number? RMS suggests making - this a zero-length array and tweaking the following example - to use `alloca' to allocate an appropriate amount of storage - based on the length of the filename. + `EIO' + A hardware I/O error occurred. - You should compute the LENGTH parameter for a socket address in the -local namespace as the sum of the size of the `sun_family' component -and the string length (_not_ the allocation size!) of the file name -string. This can be done using the macro `SUN_LEN': + `EPERM' + The file is "append-only" or "immutable". - - Macro: int SUN_LEN (_struct sockaddr_un *_ PTR) - The macro computes the length of socket address in the local - namespace. + `EINTR' + The operation was interrupted by a signal. - -File: libc.info, Node: Local Socket Example, Prev: Local Namespace Details, Up: Local Namespace -Example of Local-Namespace Sockets ----------------------------------- + - Function: int truncate64 (const char *NAME, off64_t LENGTH) + This function is similar to the `truncate' function. The + difference is that the LENGTH argument is 64 bits wide even on 32 + bits machines, which allows the handling of files with sizes up to + 2^63 bytes. - Here is an example showing how to create and name a socket in the -local namespace. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' on + a 32 bits machine this function is actually available under the + name `truncate' and so transparently replaces the 32 bits + interface. - #include - #include - #include - #include - #include - #include - - int - make_named_socket (const char *filename) - { - struct sockaddr_un name; - int sock; - size_t size; - - /* Create the socket. */ - sock = socket (PF_LOCAL, SOCK_DGRAM, 0); - if (sock < 0) - { - perror ("socket"); - exit (EXIT_FAILURE); - } - - /* Bind a name to the socket. */ - name.sun_family = AF_LOCAL; - strncpy (name.sun_path, filename, sizeof (name.sun_path)); - - /* The size of the address is - the offset of the start of the filename, - plus its length, - plus one for the terminating null byte. - Alternatively you can just do: - size = SUN_LEN (&name); - */ - size = (offsetof (struct sockaddr_un, sun_path) - + strlen (name.sun_path) + 1); - - if (bind (sock, (struct sockaddr *) &name, size) < 0) - { - perror ("bind"); - exit (EXIT_FAILURE); - } - - return sock; - } + - Function: int ftruncate (int FD, off_t LENGTH) + This is like `truncate', but it works on a file descriptor FD for + an opened file instead of a file name to identify the object. The + file must be opened for writing to successfully carry out the + operation. - -File: libc.info, Node: Internet Namespace, Next: Misc Namespaces, Prev: Local Namespace, Up: Sockets + The POSIX standard leaves it implementation defined what happens + if the specified new LENGTH of the file is bigger than the + original size. The `ftruncate' function might simply leave the + file alone and do nothing or it can increase the size to the + desired size. In this later case the extended area should be + zero-filled. So using `ftruncate' is no reliable way to increase + the file size but if it is possible it is probably the fastest + way. The function also operates on POSIX shared memory segments + if these are implemented by the system. -The Internet Namespace -====================== + `ftruncate' is especially useful in combination with `mmap'. + Since the mapped region must have a fixed size one cannot enlarge + the file by writing something beyond the last mapped page. + Instead one has to enlarge the file itself and then remap the file + with the new size. The example below shows how this works. - This section describes the details of the protocols and socket naming -conventions used in the Internet namespace. + When the source file is compiled with `_FILE_OFFSET_BITS == 64' the + `ftruncate' function is in fact `ftruncate64' and the type `off_t' + has 64 bits which makes it possible to handle files up to 2^63 + bytes in length. - Originally the Internet namespace used only IP version 4 (IPv4). -With the growing number of hosts on the Internet, a new protocol with a -larger address space was necessary: IP version 6 (IPv6). IPv6 -introduces 128-bit addresses (IPv4 has 32-bit addresses) and other -features, and will eventually replace IPv4. + The return value is 0 for success, or -1 for an error. The + following errors may occur: - To create a socket in the IPv4 Internet namespace, use the symbolic -name `PF_INET' of this namespace as the NAMESPACE argument to `socket' -or `socketpair'. For IPv6 addresses you need the macro `PF_INET6'. -These macros are defined in `sys/socket.h'. + `EBADF' + FD does not correspond to an open file. - - Macro: int PF_INET - This designates the IPv4 Internet namespace and associated family - of protocols. + `EACCES' + FD is a directory or not open for writing. - - Macro: int PF_INET6 - This designates the IPv6 Internet namespace and associated family - of protocols. + `EINVAL' + LENGTH is negative. - A socket address for the Internet namespace includes the following -components: + `EFBIG' + The operation would extend the file beyond the limits of the + operating system. - * The address of the machine you want to connect to. Internet - addresses can be specified in several ways; these are discussed in - *Note Internet Address Formats::, *Note Host Addresses:: and *Note - Host Names::. + `EIO' + A hardware I/O error occurred. - * A port number for that machine. *Note Ports::. + `EPERM' + The file is "append-only" or "immutable". - You must ensure that the address and port number are represented in a -canonical format called "network byte order". *Note Byte Order::, for -information about this. + `EINTR' + The operation was interrupted by a signal. -* Menu: -* Internet Address Formats:: How socket addresses are specified in the - Internet namespace. -* Host Addresses:: All about host addresses of Internet host. -* Protocols Database:: Referring to protocols by name. -* Ports:: Internet port numbers. -* Services Database:: Ports may have symbolic names. -* Byte Order:: Different hosts may use different byte - ordering conventions; you need to - canonicalize host address and port number. -* Inet Example:: Putting it all together. + - Function: int ftruncate64 (int ID, off64_t LENGTH) + This function is similar to the `ftruncate' function. The + difference is that the LENGTH argument is 64 bits wide even on 32 + bits machines which allows the handling of files with sizes up to + 2^63 bytes. - -File: libc.info, Node: Internet Address Formats, Next: Host Addresses, Up: Internet Namespace + When the source file is compiled with `_FILE_OFFSET_BITS == 64' on + a 32 bits machine this function is actually available under the + name `ftruncate' and so transparently replaces the 32 bits + interface. -Internet Socket Address Formats -------------------------------- + As announced here is a little example of how to use `ftruncate' in +combination with `mmap': - In the Internet namespace, for both IPv4 (`AF_INET') and IPv6 -(`AF_INET6'), a socket address consists of a host address and a port on -that host. In addition, the protocol you choose serves effectively as -a part of the address because local port numbers are meaningful only -within a particular protocol. + int fd; + void *start; + size_t len; + + int + add (off_t at, void *block, size_t size) + { + if (at + size > len) + { + /* Resize the file and remap. */ + size_t ps = sysconf (_SC_PAGESIZE); + size_t ns = (at + size + ps - 1) & ~(ps - 1); + void *np; + if (ftruncate (fd, ns) < 0) + return -1; + np = mmap (NULL, ns, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + if (np == MAP_FAILED) + return -1; + start = np; + len = ns; + } + memcpy ((char *) start + at, block, size); + return 0; + } - The data types for representing socket addresses in the Internet -namespace are defined in the header file `netinet/in.h'. + The function `add' writes a block of memory at an arbitrary position +in the file. If the current size of the file is too small it is +extended. Note the it is extended by a round number of pages. This is +a requirement of `mmap'. The program has to keep track of the real +size, and when it has finished a final `ftruncate' call should set the +real size of the file. - - Data Type: struct sockaddr_in - This is the data type used to represent socket addresses in the - Internet namespace. It has the following members: + +File: libc.info, Node: Making Special Files, Next: Temporary Files, Prev: File Attributes, Up: File System Interface - `sa_family_t sin_family' - This identifies the address family or format of the socket - address. You should store the value `AF_INET' in this member. - *Note Socket Addresses::. +Making Special Files +==================== - `struct in_addr sin_addr' - This is the Internet address of the host machine. *Note Host - Addresses::, and *Note Host Names::, for how to get a value - to store here. + The `mknod' function is the primitive for making special files, such +as files that correspond to devices. The GNU library includes this +function for compatibility with BSD. - `unsigned short int sin_port' - This is the port number. *Note Ports::. + The prototype for `mknod' is declared in `sys/stat.h'. - When you call `bind' or `getsockname', you should specify `sizeof -(struct sockaddr_in)' as the LENGTH parameter if you are using an IPv4 -Internet namespace socket address. + - Function: int mknod (const char *FILENAME, int MODE, int DEV) + The `mknod' function makes a special file with name FILENAME. The + MODE specifies the mode of the file, and may include the various + special file bits, such as `S_IFCHR' (for a character special file) + or `S_IFBLK' (for a block special file). *Note Testing File + Type::. - - Data Type: struct sockaddr_in6 - This is the data type used to represent socket addresses in the - IPv6 namespace. It has the following members: + The DEV argument specifies which device the special file refers to. + Its exact interpretation depends on the kind of special file being + created. - `sa_family_t sin6_family' - This identifies the address family or format of the socket - address. You should store the value of `AF_INET6' in this - member. *Note Socket Addresses::. + The return value is `0' on success and `-1' on error. In addition + to the usual file name errors (*note File Name Errors::), the + following `errno' error conditions are defined for this function: - `struct in6_addr sin6_addr' - This is the IPv6 address of the host machine. *Note Host - Addresses::, and *Note Host Names::, for how to get a value - to store here. + `EPERM' + The calling process is not privileged. Only the superuser + can create special files. - `uint32_t sin6_flowinfo' - This is a currently unimplemented field. + `ENOSPC' + The directory or file system that would contain the new file + is full and cannot be extended. - `uint16_t sin6_port' - This is the port number. *Note Ports::. + `EROFS' + The directory containing the new file can't be modified + because it's on a read-only file system. + `EEXIST' + There is already a file named FILENAME. If you want to + replace this file, you must remove the old file explicitly + first.  -File: libc.info, Node: Host Addresses, Next: Protocols Database, Prev: Internet Address Formats, Up: Internet Namespace +File: libc.info, Node: Temporary Files, Prev: Making Special Files, Up: File System Interface -Host Addresses --------------- +Temporary Files +=============== - Each computer on the Internet has one or more "Internet addresses", -numbers which identify that computer among all those on the Internet. -Users typically write IPv4 numeric host addresses as sequences of four -numbers, separated by periods, as in `128.52.46.32', and IPv6 numeric -host addresses as sequences of up to eight numbers separated by colons, -as in `5f03:1200:836f:c100::1'. + If you need to use a temporary file in your program, you can use the +`tmpfile' function to open it. Or you can use the `tmpnam' (better: +`tmpnam_r') function to provide a name for a temporary file and then +you can open it in the usual way with `fopen'. - Each computer also has one or more "host names", which are strings -of words separated by periods, as in `mescaline.gnu.org'. + The `tempnam' function is like `tmpnam' but lets you choose what +directory temporary files will go in, and something about what their +file names will look like. Important for multi-threaded programs is +that `tempnam' is reentrant, while `tmpnam' is not since it returns a +pointer to a static buffer. - Programs that let the user specify a host typically accept both -numeric addresses and host names. To open a connection a program needs -a numeric address, and so must convert a host name to the numeric -address it stands for. + These facilities are declared in the header file `stdio.h'. -* Menu: + - Function: FILE * tmpfile (void) + This function creates a temporary binary file for update mode, as + if by calling `fopen' with mode `"wb+"'. The file is deleted + automatically when it is closed or when the program terminates. + (On some other ISO C systems the file may fail to be deleted if + the program terminates abnormally). -* Abstract Host Addresses:: What a host number consists of. -* Data type: Host Address Data Type. Data type for a host number. -* Functions: Host Address Functions. Functions to operate on them. -* Names: Host Names. Translating host names to host numbers. + This function is reentrant. - -File: libc.info, Node: Abstract Host Addresses, Next: Host Address Data Type, Up: Host Addresses + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is in fact `tmpfile64', i.e. the LFS + interface transparently replaces the old interface. -Internet Host Addresses -....................... + - Function: FILE * tmpfile64 (void) + This function is similar to `tmpfile', but the stream it returns a + pointer to was opened using `tmpfile64'. Therefore this stream can + be used for files larger then 2^31 bytes on 32-bit machines. - Each computer on the Internet has one or more Internet addresses, -numbers which identify that computer among all those on the Internet. + Please note that the return type is still `FILE *'. There is no + special `FILE' type for the LFS interface. - An IPv4 Internet host address is a number containing four bytes of -data. Historically these are divided into two parts, a "network -number" and a "local network address number" within that network. In -the mid-1990s classless addresses were introduced which changed this -behavior. Since some functions implicitly expect the old definitions, -we first describe the class-based network and will then describe -classless addresses. IPv6 uses only classless addresses and therefore -the following paragraphs don't apply. + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a 32 + bits machine this function is available under the name `tmpfile' + and so transparently replaces the old interface. - The class-based IPv4 network number consists of the first one, two or -three bytes; the rest of the bytes are the local address. + - Function: char * tmpnam (char *RESULT) + This function constructs and returns a valid file name that does + not refer to any existing file. If the RESULT argument is a null + pointer, the return value is a pointer to an internal static + string, which might be modified by subsequent calls and therefore + makes this function non-reentrant. Otherwise, the RESULT argument + should be a pointer to an array of at least `L_tmpnam' characters, + and the result is written into that array. - IPv4 network numbers are registered with the Network Information -Center (NIC), and are divided into three classes--A, B and C. The local -network address numbers of individual machines are registered with the -administrator of the particular network. + It is possible for `tmpnam' to fail if you call it too many times + without removing previously-created files. This is because the + limited length of the temporary file names gives room for only a + finite number of different names. If `tmpnam' fails it returns a + null pointer. - Class A networks have single-byte numbers in the range 0 to 127. -There are only a small number of Class A networks, but they can each -support a very large number of hosts. Medium-sized Class B networks -have two-byte network numbers, with the first byte in the range 128 to -191. Class C networks are the smallest; they have three-byte network -numbers, with the first byte in the range 192-255. Thus, the first 1, -2, or 3 bytes of an Internet address specify a network. The remaining -bytes of the Internet address specify the address within that network. + *Warning:* Between the time the pathname is constructed and the + file is created another process might have created a file with the + same name using `tmpnam', leading to a possible security hole. The + implementation generates names which can hardly be predicted, but + when opening the file you should use the `O_EXCL' flag. Using + `tmpfile' or `mkstemp' is a safe way to avoid this problem. - The Class A network 0 is reserved for broadcast to all networks. In -addition, the host number 0 within each network is reserved for -broadcast to all hosts in that network. These uses are obsolete now -but for compatibility reasons you shouldn't use network 0 and host -number 0. + - Function: char * tmpnam_r (char *RESULT) + This function is nearly identical to the `tmpnam' function, except + that if RESULT is a null pointer it returns a null pointer. - The Class A network 127 is reserved for loopback; you can always use -the Internet address `127.0.0.1' to refer to the host machine. + This guarantees reentrancy because the non-reentrant situation of + `tmpnam' cannot happen here. - Since a single machine can be a member of multiple networks, it can -have multiple Internet host addresses. However, there is never -supposed to be more than one machine with the same host address. + *Warning*: This function has the same security problems as + `tmpnam'. - There are four forms of the "standard numbers-and-dots notation" for -Internet addresses: + - Macro: int L_tmpnam + The value of this macro is an integer constant expression that + represents the minimum size of a string large enough to hold a + file name generated by the `tmpnam' function. -`A.B.C.D' - This specifies all four bytes of the address individually and is - the commonly used representation. + - Macro: int TMP_MAX + The macro `TMP_MAX' is a lower bound for how many temporary names + you can create with `tmpnam'. You can rely on being able to call + `tmpnam' at least this many times before it might fail saying you + have made too many temporary file names. -`A.B.C' - The last part of the address, C, is interpreted as a 2-byte - quantity. This is useful for specifying host addresses in a Class - B network with network address number `A.B'. + With the GNU library, you can create a very large number of + temporary file names. If you actually created the files, you + would probably run out of disk space before you ran out of names. + Some other systems have a fixed, small limit on the number of + temporary files. The limit is never less than `25'. -`A.B' - The last part of the address, B, is interpreted as a 3-byte - quantity. This is useful for specifying host addresses in a Class - A network with network address number A. + - Function: char * tempnam (const char *DIR, const char *PREFIX) + This function generates a unique temporary file name. If PREFIX + is not a null pointer, up to five characters of this string are + used as a prefix for the file name. The return value is a string + newly allocated with `malloc', so you should release its storage + with `free' when it is no longer needed. -`A' - If only one part is given, this corresponds directly to the host - address number. + Because the string is dynamically allocated this function is + reentrant. - Within each part of the address, the usual C conventions for -specifying the radix apply. In other words, a leading `0x' or `0X' -implies hexadecimal radix; a leading `0' implies octal; and otherwise -decimal radix is assumed. + The directory prefix for the temporary file name is determined by + testing each of the following in sequence. The directory must + exist and be writable. -Classless Addresses -................... + * The environment variable `TMPDIR', if it is defined. For + security reasons this only happens if the program is not SUID + or SGID enabled. - IPv4 addresses (and IPv6 addresses also) are now considered -classless; the distinction between classes A, B and C can be ignored. -Instead an IPv4 host address consists of a 32-bit address and a 32-bit -mask. The mask contains set bits for the network part and cleared bits -for the host part. The network part is contiguous from the left, with -the remaining bits representing the host. As a consequence, the -netmask can simply be specified as the number of set bits. Classes A, -B and C are just special cases of this general rule. For example, -class A addresses have a netmask of `255.0.0.0' or a prefix length of 8. + * The DIR argument, if it is not a null pointer. - Classless IPv4 network addresses are written in numbers-and-dots -notation with the prefix length appended and a slash as separator. For -example the class A network 10 is written as `10.0.0.0/8'. + * The value of the `P_tmpdir' macro. -IPv6 Addresses -.............. + * The directory `/tmp'. - IPv6 addresses contain 128 bits (IPv4 has 32 bits) of data. A host -address is usually written as eight 16-bit hexadecimal numbers that are -separated by colons. Two colons are used to abbreviate strings of -consecutive zeros. For example, the IPv6 loopback address -`0:0:0:0:0:0:0:1' can just be written as `::1'. + This function is defined for SVID compatibility. - -File: libc.info, Node: Host Address Data Type, Next: Host Address Functions, Prev: Abstract Host Addresses, Up: Host Addresses + *Warning:* Between the time the pathname is constructed and the + file is created another process might have created a file with the + same name using `tempnam', leading to a possible security hole. + The implementation generates names which can hardly be predicted, + but when opening the file you should use the `O_EXCL' flag. Using + `tmpfile' or `mkstemp' is a safe way to avoid this problem. -Host Address Data Type -...................... + - SVID Macro: char * P_tmpdir + This macro is the name of the default directory for temporary + files. - IPv4 Internet host addresses are represented in some contexts as -integers (type `uint32_t'). In other contexts, the integer is packaged -inside a structure of type `struct in_addr'. It would be better if the -usage were made consistent, but it is not hard to extract the integer -from the structure or put the integer into a structure. + Older Unix systems did not have the functions just described. +Instead they used `mktemp' and `mkstemp'. Both of these functions work +by modifying a file name template string you pass. The last six +characters of this string must be `XXXXXX'. These six `X's are +replaced with six characters which make the whole string a unique file +name. Usually the template string is something like +`/tmp/PREFIXXXXXXX', and each program uses a unique PREFIX. - You will find older code that uses `unsigned long int' for IPv4 -Internet host addresses instead of `uint32_t' or `struct in_addr'. -Historically `unsigned long int' was a 32-bit number but with 64-bit -machines this has changed. Using `unsigned long int' might break the -code if it is used on machines where this type doesn't have 32 bits. -`uint32_t' is specified by Unix98 and guaranteed to have 32 bits. + *Note:* Because `mktemp' and `mkstemp' modify the template string, +you _must not_ pass string constants to them. String constants are +normally in read-only storage, so your program would crash when +`mktemp' or `mkstemp' tried to modify the string. - IPv6 Internet host addresses have 128 bits and are packaged inside a -structure of type `struct in6_addr'. + - Function: char * mktemp (char *TEMPLATE) + The `mktemp' function generates a unique file name by modifying + TEMPLATE as described above. If successful, it returns TEMPLATE + as modified. If `mktemp' cannot find a unique file name, it makes + TEMPLATE an empty string and returns that. If TEMPLATE does not + end with `XXXXXX', `mktemp' returns a null pointer. - The following basic definitions for Internet addresses are declared -in the header file `netinet/in.h': + *Warning:* Between the time the pathname is constructed and the + file is created another process might have created a file with the + same name using `mktemp', leading to a possible security hole. The + implementation generates names which can hardly be predicted, but + when opening the file you should use the `O_EXCL' flag. Using + `mkstemp' is a safe way to avoid this problem. - - Data Type: struct in_addr - This data type is used in certain contexts to contain an IPv4 - Internet host address. It has just one field, named `s_addr', - which records the host address number as an `uint32_t'. + - Function: int mkstemp (char *TEMPLATE) + The `mkstemp' function generates a unique file name just as + `mktemp' does, but it also opens the file for you with `open' + (*note Opening and Closing Files::). If successful, it modifies + TEMPLATE in place and returns a file descriptor for that file open + for reading and writing. If `mkstemp' cannot create a + uniquely-named file, it returns `-1'. If TEMPLATE does not end + with `XXXXXX', `mkstemp' returns `-1' and does not modify TEMPLATE. - - Macro: uint32_t INADDR_LOOPBACK - You can use this constant to stand for "the address of this - machine," instead of finding its actual address. It is the IPv4 - Internet address `127.0.0.1', which is usually called `localhost'. - This special constant saves you the trouble of looking up the - address of your own machine. Also, the system usually implements - `INADDR_LOOPBACK' specially, avoiding any network traffic for the - case of one machine talking to itself. + The file is opened using mode `0600'. If the file is meant to be + used by other users this mode must be changed explicitly. - - Macro: uint32_t INADDR_ANY - You can use this constant to stand for "any incoming address" when - binding to an address. *Note Setting Address::. This is the usual - address to give in the `sin_addr' member of `struct sockaddr_in' - when you want to accept Internet connections. + Unlike `mktemp', `mkstemp' is actually guaranteed to create a unique +file that cannot possibly clash with any other program trying to create +a temporary file. This is because it works by calling `open' with the +`O_EXCL' flag, which says you want to create a new file and get an +error if the file already exists. - - Macro: uint32_t INADDR_BROADCAST - This constant is the address you use to send a broadcast message. + - Function: char * mkdtemp (char *TEMPLATE) + The `mkdtemp' function creates a directory with a unique name. If + it succeeds, it overwrites TEMPLATE with the name of the + directory, and returns TEMPLATE. As with `mktemp' and `mkstemp', + TEMPLATE should be a string ending with `XXXXXX'. - - Macro: uint32_t INADDR_NONE - This constant is returned by some functions to indicate an error. + If `mkdtemp' cannot create an uniquely named directory, it returns + `NULL' and sets ERRNO appropriately. If TEMPLATE does not end + with `XXXXXX', `mkdtemp' returns `NULL' and does not modify + TEMPLATE. ERRNO will be set to `EINVAL' in this case. - - Data Type: struct in6_addr - This data type is used to store an IPv6 address. It stores 128 - bits of data, which can be accessed (via a union) in a variety of - ways. + The directory is created using mode `0700'. - - Constant: struct in6_addr in6addr_loopback - This constant is the IPv6 address `::1', the loopback address. See - above for a description of what this means. The macro - `IN6ADDR_LOOPBACK_INIT' is provided to allow you to initialize your - own variables to this value. + The directory created by `mkdtemp' cannot clash with temporary files +or directories created by other users. This is because directory +creation always works like `open' with `O_EXCL'. *Note Creating +Directories::. - - Constant: struct in6_addr in6addr_any - This constant is the IPv6 address `::', the unspecified address. - See above for a description of what this means. The macro - `IN6ADDR_ANY_INIT' is provided to allow you to initialize your own - variables to this value. + The `mkdtemp' function comes from OpenBSD.  -File: libc.info, Node: Host Address Functions, Next: Host Names, Prev: Host Address Data Type, Up: Host Addresses +File: libc.info, Node: Pipes and FIFOs, Next: Sockets, Prev: File System Interface, Up: Top -Host Address Functions -...................... +Pipes and FIFOs +*************** -These additional functions for manipulating Internet addresses are -declared in the header file `arpa/inet.h'. They represent Internet -addresses in network byte order, and network numbers and -local-address-within-network numbers in host byte order. *Note Byte -Order::, for an explanation of network and host byte order. + A "pipe" is a mechanism for interprocess communication; data written +to the pipe by one process can be read by another process. The data is +handled in a first-in, first-out (FIFO) order. The pipe has no name; it +is created for one use and both ends must be inherited from the single +process which created the pipe. - - Function: int inet_aton (const char *NAME, struct in_addr *ADDR) - This function converts the IPv4 Internet host address NAME from - the standard numbers-and-dots notation into binary data and stores - it in the `struct in_addr' that ADDR points to. `inet_aton' - returns nonzero if the address is valid, zero if not. + A "FIFO special file" is similar to a pipe, but instead of being an +anonymous, temporary connection, a FIFO has a name or names like any +other file. Processes open the FIFO by name in order to communicate +through it. - - Function: uint32_t inet_addr (const char *NAME) - This function converts the IPv4 Internet host address NAME from the - standard numbers-and-dots notation into binary data. If the input - is not valid, `inet_addr' returns `INADDR_NONE'. This is an - obsolete interface to `inet_aton', described immediately above. It - is obsolete because `INADDR_NONE' is a valid address - (255.255.255.255), and `inet_aton' provides a cleaner way to - indicate error return. + A pipe or FIFO has to be open at both ends simultaneously. If you +read from a pipe or FIFO file that doesn't have any processes writing +to it (perhaps because they have all closed the file, or exited), the +read returns end-of-file. Writing to a pipe or FIFO that doesn't have a +reading process is treated as an error condition; it generates a +`SIGPIPE' signal, and fails with error code `EPIPE' if the signal is +handled or blocked. - - Function: uint32_t inet_network (const char *NAME) - This function extracts the network number from the address NAME, - given in the standard numbers-and-dots notation. The returned - address is in host order. If the input is not valid, - `inet_network' returns `-1'. + Neither pipes nor FIFO special files allow file positioning. Both +reading and writing operations happen sequentially; reading from the +beginning of the file and writing at the end. - The function works only with traditional IPv4 class A, B and C - network types. It doesn't work with classless addresses and - shouldn't be used anymore. +* Menu: - - Function: char * inet_ntoa (struct in_addr ADDR) - This function converts the IPv4 Internet host address ADDR to a - string in the standard numbers-and-dots notation. The return - value is a pointer into a statically-allocated buffer. Subsequent - calls will overwrite the same buffer, so you should copy the - string if you need to save it. +* Creating a Pipe:: Making a pipe with the `pipe' function. +* Pipe to a Subprocess:: Using a pipe to communicate with a + child process. +* FIFO Special Files:: Making a FIFO special file. +* Pipe Atomicity:: When pipe (or FIFO) I/O is atomic. - In multi-threaded programs each thread has an own - statically-allocated buffer. But still subsequent calls of - `inet_ntoa' in the same thread will overwrite the result of the - last call. + +File: libc.info, Node: Creating a Pipe, Next: Pipe to a Subprocess, Up: Pipes and FIFOs - Instead of `inet_ntoa' the newer function `inet_ntop' which is - described below should be used since it handles both IPv4 and IPv6 - addresses. +Creating a Pipe +=============== - - Function: struct in_addr inet_makeaddr (uint32_t NET, uint32_t LOCAL) - This function makes an IPv4 Internet host address by combining the - network number NET with the local-address-within-network number - LOCAL. + The primitive for creating a pipe is the `pipe' function. This +creates both the reading and writing ends of the pipe. It is not very +useful for a single process to use a pipe to talk to itself. In typical +use, a process creates a pipe just before it forks one or more child +processes (*note Creating a Process::). The pipe is then used for +communication either between the parent or child processes, or between +two sibling processes. - - Function: uint32_t inet_lnaof (struct in_addr ADDR) - This function returns the local-address-within-network part of the - Internet host address ADDR. + The `pipe' function is declared in the header file `unistd.h'. - The function works only with traditional IPv4 class A, B and C - network types. It doesn't work with classless addresses and - shouldn't be used anymore. + - Function: int pipe (int FILEDES[2]) + The `pipe' function creates a pipe and puts the file descriptors + for the reading and writing ends of the pipe (respectively) into + `FILEDES[0]' and `FILEDES[1]'. - - Function: uint32_t inet_netof (struct in_addr ADDR) - This function returns the network number part of the Internet host - address ADDR. + An easy way to remember that the input end comes first is that file + descriptor `0' is standard input, and file descriptor `1' is + standard output. - The function works only with traditional IPv4 class A, B and C - network types. It doesn't work with classless addresses and - shouldn't be used anymore. + If successful, `pipe' returns a value of `0'. On failure, `-1' is + returned. The following `errno' error conditions are defined for + this function: - - Function: int inet_pton (int AF, const char *CP, void *BUF) - This function converts an Internet address (either IPv4 or IPv6) - from presentation (textual) to network (binary) format. AF should - be either `AF_INET' or `AF_INET6', as appropriate for the type of - address being converted. CP is a pointer to the input string, and - BUF is a pointer to a buffer for the result. It is the caller's - responsibility to make sure the buffer is large enough. + `EMFILE' + The process has too many files open. - - Function: const char * inet_ntop (int AF, const void *CP, char *BUF, - size_t LEN) - This function converts an Internet address (either IPv4 or IPv6) - from network (binary) to presentation (textual) form. AF should be - either `AF_INET' or `AF_INET6', as appropriate. CP is a pointer - to the address to be converted. BUF should be a pointer to a - buffer to hold the result, and LEN is the length of this buffer. - The return value from the function will be this buffer address. + `ENFILE' + There are too many open files in the entire system. *Note + Error Codes::, for more information about `ENFILE'. This + error never occurs in the GNU system. - -File: libc.info, Node: Host Names, Prev: Host Address Functions, Up: Host Addresses + Here is an example of a simple program that creates a pipe. This +program uses the `fork' function (*note Creating a Process::) to create +a child process. The parent process writes data to the pipe, which is +read by the child process. -Host Names -.......... + #include + #include + #include + #include + + /* Read characters from the pipe and echo them to `stdout'. */ + + void + read_from_pipe (int file) + { + FILE *stream; + int c; + stream = fdopen (file, "r"); + while ((c = fgetc (stream)) != EOF) + putchar (c); + fclose (stream); + } + + /* Write some random text to the pipe. */ + + void + write_to_pipe (int file) + { + FILE *stream; + stream = fdopen (file, "w"); + fprintf (stream, "hello, world!\n"); + fprintf (stream, "goodbye, world!\n"); + fclose (stream); + } + + int + main (void) + { + pid_t pid; + int mypipe[2]; + + /* Create the pipe. */ + if (pipe (mypipe)) + { + fprintf (stderr, "Pipe failed.\n"); + return EXIT_FAILURE; + } + + /* Create the child process. */ + pid = fork (); + if (pid == (pid_t) 0) + { + /* This is the child process. + Close other end first. */ + close (mypipe[1]); + read_from_pipe (mypipe[0]); + return EXIT_SUCCESS; + } + else if (pid < (pid_t) 0) + { + /* The fork failed. */ + fprintf (stderr, "Fork failed.\n"); + return EXIT_FAILURE; + } + else + { + /* This is the parent process. + Close other end first. */ + close (mypipe[0]); + write_to_pipe (mypipe[1]); + return EXIT_SUCCESS; + } + } - Besides the standard numbers-and-dots notation for Internet -addresses, you can also refer to a host by a symbolic name. The -advantage of a symbolic name is that it is usually easier to remember. -For example, the machine with Internet address `158.121.106.19' is also -known as `alpha.gnu.org'; and other machines in the `gnu.org' domain -can refer to it simply as `alpha'. + +File: libc.info, Node: Pipe to a Subprocess, Next: FIFO Special Files, Prev: Creating a Pipe, Up: Pipes and FIFOs - Internally, the system uses a database to keep track of the mapping -between host names and host numbers. This database is usually either -the file `/etc/hosts' or an equivalent provided by a name server. The -functions and other symbols for accessing this database are declared in -`netdb.h'. They are BSD features, defined unconditionally if you -include `netdb.h'. +Pipe to a Subprocess +==================== - - Data Type: struct hostent - This data type is used to represent an entry in the hosts - database. It has the following members: + A common use of pipes is to send data to or receive data from a +program being run as a subprocess. One way of doing this is by using a +combination of `pipe' (to create the pipe), `fork' (to create the +subprocess), `dup2' (to force the subprocess to use the pipe as its +standard input or output channel), and `exec' (to execute the new +program). Or, you can use `popen' and `pclose'. - `char *h_name' - This is the "official" name of the host. + The advantage of using `popen' and `pclose' is that the interface is +much simpler and easier to use. But it doesn't offer as much +flexibility as using the low-level functions directly. - `char **h_aliases' - These are alternative names for the host, represented as a - null-terminated vector of strings. + - Function: FILE * popen (const char *COMMAND, const char *MODE) + The `popen' function is closely related to the `system' function; + see *Note Running a Command::. It executes the shell command + COMMAND as a subprocess. However, instead of waiting for the + command to complete, it creates a pipe to the subprocess and + returns a stream that corresponds to that pipe. - `int h_addrtype' - This is the host address type; in practice, its value is - always either `AF_INET' or `AF_INET6', with the latter being - used for IPv6 hosts. In principle other kinds of addresses - could be represented in the database as well as Internet - addresses; if this were done, you might find a value in this - field other than `AF_INET' or `AF_INET6'. *Note Socket - Addresses::. + If you specify a MODE argument of `"r"', you can read from the + stream to retrieve data from the standard output channel of the + subprocess. The subprocess inherits its standard input channel + from the parent process. - `int h_length' - This is the length, in bytes, of each address. + Similarly, if you specify a MODE argument of `"w"', you can write + to the stream to send data to the standard input channel of the + subprocess. The subprocess inherits its standard output channel + from the parent process. - `char **h_addr_list' - This is the vector of addresses for the host. (Recall that - the host might be connected to multiple networks and have - different addresses on each one.) The vector is terminated - by a null pointer. + In the event of an error `popen' returns a null pointer. This + might happen if the pipe or stream cannot be created, if the + subprocess cannot be forked, or if the program cannot be executed. - `char *h_addr' - This is a synonym for `h_addr_list[0]'; in other words, it is - the first host address. + - Function: int pclose (FILE *STREAM) + The `pclose' function is used to close a stream created by `popen'. + It waits for the child process to terminate and returns its status + value, as for the `system' function. - As far as the host database is concerned, each address is just a -block of memory `h_length' bytes long. But in other contexts there is -an implicit assumption that you can convert IPv4 addresses to a `struct -in_addr' or an `uint32_t'. Host addresses in a `struct hostent' -structure are always given in network byte order; see *Note Byte -Order::. + Here is an example showing how to use `popen' and `pclose' to filter +output through another program, in this case the paging program `more'. - You can use `gethostbyname', `gethostbyname2' or `gethostbyaddr' to -search the hosts database for information about a particular host. The -information is returned in a statically-allocated structure; you must -copy the information if you need to save it across calls. You can also -use `getaddrinfo' and `getnameinfo' to obtain this information. + #include + #include + + void + write_data (FILE * stream) + { + int i; + for (i = 0; i < 100; i++) + fprintf (stream, "%d\n", i); + if (ferror (stream)) + { + fprintf (stderr, "Output to stream failed.\n"); + exit (EXIT_FAILURE); + } + } + + int + main (void) + { + FILE *output; + + output = popen ("more", "w"); + if (!output) + { + fprintf (stderr, + "incorrect parameters or too many files.\n"); + return EXIT_FAILURE; + } + write_data (output); + if (pclose (output) != 0) + { + fprintf (stderr, + "Could not run more or other error.\n"); + } + return EXIT_SUCCESS; + } - - Function: struct hostent * gethostbyname (const char *NAME) - The `gethostbyname' function returns information about the host - named NAME. If the lookup fails, it returns a null pointer. + +File: libc.info, Node: FIFO Special Files, Next: Pipe Atomicity, Prev: Pipe to a Subprocess, Up: Pipes and FIFOs - - Function: struct hostent * gethostbyname2 (const char *NAME, int AF) - The `gethostbyname2' function is like `gethostbyname', but allows - the caller to specify the desired address family (e.g. `AF_INET' - or `AF_INET6') of the result. +FIFO Special Files +================== - - Function: struct hostent * gethostbyaddr (const char *ADDR, size_t - LENGTH, int FORMAT) - The `gethostbyaddr' function returns information about the host - with Internet address ADDR. The parameter ADDR is not really a - pointer to char - it can be a pointer to an IPv4 or an IPv6 - address. The LENGTH argument is the size (in bytes) of the address - at ADDR. FORMAT specifies the address format; for an IPv4 - Internet address, specify a value of `AF_INET'; for an IPv6 - Internet address, use `AF_INET6'. + A FIFO special file is similar to a pipe, except that it is created +in a different way. Instead of being an anonymous communications +channel, a FIFO special file is entered into the file system by calling +`mkfifo'. - If the lookup fails, `gethostbyaddr' returns a null pointer. + Once you have created a FIFO special file in this way, any process +can open it for reading or writing, in the same way as an ordinary file. +However, it has to be open at both ends simultaneously before you can +proceed to do any input or output operations on it. Opening a FIFO for +reading normally blocks until some other process opens the same FIFO for +writing, and vice versa. - If the name lookup by `gethostbyname' or `gethostbyaddr' fails, you -can find out the reason by looking at the value of the variable -`h_errno'. (It would be cleaner design for these functions to set -`errno', but use of `h_errno' is compatible with other systems.) + The `mkfifo' function is declared in the header file `sys/stat.h'. - Here are the error codes that you may find in `h_errno': + - Function: int mkfifo (const char *FILENAME, mode_t MODE) + The `mkfifo' function makes a FIFO special file with name + FILENAME. The MODE argument is used to set the file's + permissions; see *Note Setting Permissions::. -`HOST_NOT_FOUND' - No such host is known in the database. + The normal, successful return value from `mkfifo' is `0'. In the + case of an error, `-1' is returned. In addition to the usual file + name errors (*note File Name Errors::), the following `errno' + error conditions are defined for this function: -`TRY_AGAIN' - This condition happens when the name server could not be - contacted. If you try again later, you may succeed then. + `EEXIST' + The named file already exists. -`NO_RECOVERY' - A non-recoverable error occurred. + `ENOSPC' + The directory or file system cannot be extended. -`NO_ADDRESS' - The host database contains an entry for the name, but it doesn't - have an associated Internet address. + `EROFS' + The directory that would contain the file resides on a + read-only file system. - The lookup functions above all have one in common: they are not -reentrant and therefore unusable in multi-threaded applications. -Therefore provides the GNU C library a new set of functions which can be -used in this context. + +File: libc.info, Node: Pipe Atomicity, Prev: FIFO Special Files, Up: Pipes and FIFOs - - Function: int gethostbyname_r (const char *restrict NAME, struct - hostent *restrict RESULT_BUF, char *restrict BUF, size_t - BUFLEN, struct hostent **restrict RESULT, int *restrict - H_ERRNOP) - The `gethostbyname_r' function returns information about the host - named NAME. The caller must pass a pointer to an object of type - `struct hostent' in the RESULT_BUF parameter. In addition the - function may need extra buffer space and the caller must pass an - pointer and the size of the buffer in the BUF and BUFLEN - parameters. +Atomicity of Pipe I/O +===================== - A pointer to the buffer, in which the result is stored, is - available in `*RESULT' after the function call successfully - returned. If an error occurs or if no entry is found, the pointer - `*RESULT' is a null pointer. Success is signalled by a zero - return value. If the function failed the return value is an error - number. In addition to the errors defined for `gethostbyname' it - can also be `ERANGE'. In this case the call should be repeated - with a larger buffer. Additional error information is not stored - in the global variable `h_errno' but instead in the object pointed - to by H_ERRNOP. + Reading or writing pipe data is "atomic" if the size of data written +is not greater than `PIPE_BUF'. This means that the data transfer +seems to be an instantaneous unit, in that nothing else in the system +can observe a state in which it is partially complete. Atomic I/O may +not begin right away (it may need to wait for buffer space or for data), +but once it does begin it finishes immediately. - Here's a small example: - struct hostent * - gethostname (char *host) - { - struct hostent hostbuf, *hp; - size_t hstbuflen; - char *tmphstbuf; - int res; - int herr; - - hstbuflen = 1024; - /* Allocate buffer, remember to free it to avoid memory leakage. */ - tmphstbuf = malloc (hstbuflen); - - while ((res = gethostbyname_r (host, &hostbuf, tmphstbuf, hstbuflen, - &hp, &herr)) == ERANGE) - { - /* Enlarge the buffer. */ - hstbuflen *= 2; - tmphstbuf = realloc (tmphstbuf, hstbuflen); - } - /* Check for errors. */ - if (res || hp == NULL) - return NULL; - return hp; - } + Reading or writing a larger amount of data may not be atomic; for +example, output data from other processes sharing the descriptor may be +interspersed. Also, once `PIPE_BUF' characters have been written, +further writes will block until some characters are read. - - Function: int gethostbyname2_r (const char *NAME, int AF, struct - hostent *restrict RESULT_BUF, char *restrict BUF, size_t - BUFLEN, struct hostent **restrict RESULT, int *restrict - H_ERRNOP) - The `gethostbyname2_r' function is like `gethostbyname_r', but - allows the caller to specify the desired address family (e.g. - `AF_INET' or `AF_INET6') for the result. + *Note Limits for Files::, for information about the `PIPE_BUF' +parameter. - - Function: int gethostbyaddr_r (const char *ADDR, size_t LENGTH, int - FORMAT, struct hostent *restrict RESULT_BUF, char *restrict - BUF, size_t BUFLEN, struct hostent **restrict RESULT, int - *restrict H_ERRNOP) - The `gethostbyaddr_r' function returns information about the host - with Internet address ADDR. The parameter ADDR is not really a - pointer to char - it can be a pointer to an IPv4 or an IPv6 - address. The LENGTH argument is the size (in bytes) of the address - at ADDR. FORMAT specifies the address format; for an IPv4 - Internet address, specify a value of `AF_INET'; for an IPv6 - Internet address, use `AF_INET6'. + +File: libc.info, Node: Sockets, Next: Low-Level Terminal Interface, Prev: Pipes and FIFOs, Up: Top - Similar to the `gethostbyname_r' function, the caller must provide - buffers for the result and memory used internally. In case of - success the function returns zero. Otherwise the value is an - error number where `ERANGE' has the special meaning that the - caller-provided buffer is too small. +Sockets +******* - You can also scan the entire hosts database one entry at a time using -`sethostent', `gethostent' and `endhostent'. Be careful when using -these functions because they are not reentrant. + This chapter describes the GNU facilities for interprocess +communication using sockets. - - Function: void sethostent (int STAYOPEN) - This function opens the hosts database to begin scanning it. You - can then call `gethostent' to read the entries. + A "socket" is a generalized interprocess communication channel. +Like a pipe, a socket is represented as a file descriptor. Unlike pipes +sockets support communication between unrelated processes, and even +between processes running on different machines that communicate over a +network. Sockets are the primary means of communicating with other +machines; `telnet', `rlogin', `ftp', `talk' and the other familiar +network programs use sockets. - If the STAYOPEN argument is nonzero, this sets a flag so that - subsequent calls to `gethostbyname' or `gethostbyaddr' will not - close the database (as they usually would). This makes for more - efficiency if you call those functions several times, by avoiding - reopening the database for each call. + Not all operating systems support sockets. In the GNU library, the +header file `sys/socket.h' exists regardless of the operating system, +and the socket functions always exist, but if the system does not +really support sockets these functions always fail. - - Function: struct hostent * gethostent (void) - This function returns the next entry in the hosts database. It - returns a null pointer if there are no more entries. + *Incomplete:* We do not currently document the facilities for +broadcast messages or for configuring Internet interfaces. The +reentrant functions and some newer functions that are related to IPv6 +aren't documented either so far. - - Function: void endhostent (void) - This function closes the hosts database. +* Menu: + +* Socket Concepts:: Basic concepts you need to know about. +* Communication Styles::Stream communication, datagrams and other styles. +* Socket Addresses:: How socket names (``addresses'') work. +* Interface Naming:: Identifying specific network interfaces. +* Local Namespace:: Details about the local namespace. +* Internet Namespace:: Details about the Internet namespace. +* Misc Namespaces:: Other namespaces not documented fully here. +* Open/Close Sockets:: Creating sockets and destroying them. +* Connections:: Operations on sockets with connection state. +* Datagrams:: Operations on datagram sockets. +* Inetd:: Inetd is a daemon that starts servers on request. + The most convenient way to write a server + is to make it work with Inetd. +* Socket Options:: Miscellaneous low-level socket options. +* Networks Database:: Accessing the database of network names.  -File: libc.info, Node: Ports, Next: Services Database, Prev: Protocols Database, Up: Internet Namespace +File: libc.info, Node: Socket Concepts, Next: Communication Styles, Up: Sockets -Internet Ports --------------- +Socket Concepts +=============== - A socket address in the Internet namespace consists of a machine's -Internet address plus a "port number" which distinguishes the sockets -on a given machine (for a given protocol). Port numbers range from 0 -to 65,535. + When you create a socket, you must specify the style of communication +you want to use and the type of protocol that should implement it. The +"communication style" of a socket defines the user-level semantics of +sending and receiving data on the socket. Choosing a communication +style specifies the answers to questions such as these: - Port numbers less than `IPPORT_RESERVED' are reserved for standard -servers, such as `finger' and `telnet'. There is a database that keeps -track of these, and you can use the `getservbyname' function to map a -service name onto a port number; see *Note Services Database::. + * *What are the units of data transmission?* Some communication + styles regard the data as a sequence of bytes with no larger + structure; others group the bytes into records (which are known in + this context as "packets"). - If you write a server that is not one of the standard ones defined in -the database, you must choose a port number for it. Use a number -greater than `IPPORT_USERRESERVED'; such numbers are reserved for -servers and won't ever be generated automatically by the system. -Avoiding conflicts with servers being run by other users is up to you. + * *Can data be lost during normal operation?* Some communication + styles guarantee that all the data sent arrives in the order it was + sent (barring system or network crashes); other styles occasionally + lose data as a normal part of operation, and may sometimes deliver + packets more than once or in the wrong order. - When you use a socket without specifying its address, the system -generates a port number for it. This number is between -`IPPORT_RESERVED' and `IPPORT_USERRESERVED'. + Designing a program to use unreliable communication styles usually + involves taking precautions to detect lost or misordered packets + and to retransmit data as needed. - On the Internet, it is actually legitimate to have two different -sockets with the same port number, as long as they never both try to -communicate with the same socket address (host address plus port -number). You shouldn't duplicate a port number except in special -circumstances where a higher-level protocol requires it. Normally, the -system won't let you do it; `bind' normally insists on distinct port -numbers. To reuse a port number, you must set the socket option -`SO_REUSEADDR'. *Note Socket-Level Options::. + * *Is communication entirely with one partner?* Some communication + styles are like a telephone call--you make a "connection" with one + remote socket and then exchange data freely. Other styles are + like mailing letters--you specify a destination address for each + message you send. - These macros are defined in the header file `netinet/in.h'. + You must also choose a "namespace" for naming the socket. A socket +name ("address") is meaningful only in the context of a particular +namespace. In fact, even the data type to use for a socket name may +depend on the namespace. Namespaces are also called "domains", but we +avoid that word as it can be confused with other usage of the same +term. Each namespace has a symbolic name that starts with `PF_'. A +corresponding symbolic name starting with `AF_' designates the address +format for that namespace. - - Macro: int IPPORT_RESERVED - Port numbers less than `IPPORT_RESERVED' are reserved for - superuser use. + Finally you must choose the "protocol" to carry out the +communication. The protocol determines what low-level mechanism is used +to transmit and receive data. Each protocol is valid for a particular +namespace and communication style; a namespace is sometimes called a +"protocol family" because of this, which is why the namespace names +start with `PF_'. - - Macro: int IPPORT_USERRESERVED - Port numbers greater than or equal to `IPPORT_USERRESERVED' are - reserved for explicit use; they will never be allocated - automatically. + The rules of a protocol apply to the data passing between two +programs, perhaps on different computers; most of these rules are +handled by the operating system and you need not know about them. What +you do need to know about protocols is this: - -File: libc.info, Node: Services Database, Next: Byte Order, Prev: Ports, Up: Internet Namespace + * In order to have communication between two sockets, they must + specify the _same_ protocol. -The Services Database ---------------------- + * Each protocol is meaningful with particular style/namespace + combinations and cannot be used with inappropriate combinations. + For example, the TCP protocol fits only the byte stream style of + communication and the Internet namespace. - The database that keeps track of "well-known" services is usually -either the file `/etc/services' or an equivalent from a name server. -You can use these utilities, declared in `netdb.h', to access the -services database. + * For each combination of style and namespace there is a "default + protocol", which you can request by specifying 0 as the protocol + number. And that's what you should normally do--use the default. - - Data Type: struct servent - This data type holds information about entries from the services - database. It has the following members: + Throughout the following description at various places +variables/parameters to denote sizes are required. And here the trouble +starts. In the first implementations the type of these variables was +simply `int'. On most machines at that time an `int' was 32 bits wide, +which created a _de facto_ standard requiring 32-bit variables. This +is important since references to variables of this type are passed to +the kernel. - `char *s_name' - This is the "official" name of the service. + Then the POSIX people came and unified the interface with the words +"all size values are of type `size_t'". On 64-bit machines `size_t' is +64 bits wide, so pointers to variables were no longer possible. - `char **s_aliases' - These are alternate names for the service, represented as an - array of strings. A null pointer terminates the array. + The Unix98 specification provides a solution by introducing a type +`socklen_t'. This type is used in all of the cases that POSIX changed +to use `size_t'. The only requirement of this type is that it be an +unsigned type of at least 32 bits. Therefore, implementations which +require that references to 32-bit variables be passed can be as happy +as implementations which use 64-bit values. - `int s_port' - This is the port number for the service. Port numbers are - given in network byte order; see *Note Byte Order::. + +File: libc.info, Node: Communication Styles, Next: Socket Addresses, Prev: Socket Concepts, Up: Sockets - `char *s_proto' - This is the name of the protocol to use with this service. - *Note Protocols Database::. +Communication Styles +==================== - To get information about a particular service, use the -`getservbyname' or `getservbyport' functions. The information is -returned in a statically-allocated structure; you must copy the -information if you need to save it across calls. + The GNU library includes support for several different kinds of +sockets, each with different characteristics. This section describes +the supported socket types. The symbolic constants listed here are +defined in `sys/socket.h'. - - Function: struct servent * getservbyname (const char *NAME, const - char *PROTO) - The `getservbyname' function returns information about the service - named NAME using protocol PROTO. If it can't find such a service, - it returns a null pointer. + - Macro: int SOCK_STREAM + The `SOCK_STREAM' style is like a pipe (*note Pipes and FIFOs::). + It operates over a connection with a particular remote socket and + transmits data reliably as a stream of bytes. - This function is useful for servers as well as for clients; servers - use it to determine which port they should listen on (*note - Listening::). + Use of this style is covered in detail in *Note Connections::. - - Function: struct servent * getservbyport (int PORT, const char - *PROTO) - The `getservbyport' function returns information about the service - at port PORT using protocol PROTO. If it can't find such a - service, it returns a null pointer. + - Macro: int SOCK_DGRAM + The `SOCK_DGRAM' style is used for sending individually-addressed + packets unreliably. It is the diametrical opposite of + `SOCK_STREAM'. -You can also scan the services database using `setservent', -`getservent' and `endservent'. Be careful when using these functions -because they are not reentrant. + Each time you write data to a socket of this kind, that data + becomes one packet. Since `SOCK_DGRAM' sockets do not have + connections, you must specify the recipient address with each + packet. - - Function: void setservent (int STAYOPEN) - This function opens the services database to begin scanning it. + The only guarantee that the system makes about your requests to + transmit data is that it will try its best to deliver each packet + you send. It may succeed with the sixth packet after failing with + the fourth and fifth packets; the seventh packet may arrive before + the sixth, and may arrive a second time after the sixth. - If the STAYOPEN argument is nonzero, this sets a flag so that - subsequent calls to `getservbyname' or `getservbyport' will not - close the database (as they usually would). This makes for more - efficiency if you call those functions several times, by avoiding - reopening the database for each call. + The typical use for `SOCK_DGRAM' is in situations where it is + acceptable to simply re-send a packet if no response is seen in a + reasonable amount of time. - - Function: struct servent * getservent (void) - This function returns the next entry in the services database. If - there are no more entries, it returns a null pointer. + *Note Datagrams::, for detailed information about how to use + datagram sockets. - - Function: void endservent (void) - This function closes the services database. + - Macro: int SOCK_RAW + This style provides access to low-level network protocols and + interfaces. Ordinary user programs usually have no need to use + this style.  -File: libc.info, Node: Byte Order, Next: Inet Example, Prev: Services Database, Up: Internet Namespace +File: libc.info, Node: Socket Addresses, Next: Interface Naming, Prev: Communication Styles, Up: Sockets -Byte Order Conversion ---------------------- +Socket Addresses +================ - Different kinds of computers use different conventions for the -ordering of bytes within a word. Some computers put the most -significant byte within a word first (this is called "big-endian" -order), and others put it last ("little-endian" order). + The name of a socket is normally called an "address". The functions +and symbols for dealing with socket addresses were named +inconsistently, sometimes using the term "name" and sometimes using +"address". You can regard these terms as synonymous where sockets are +concerned. - So that machines with different byte order conventions can -communicate, the Internet protocols specify a canonical byte order -convention for data transmitted over the network. This is known as -"network byte order". + A socket newly created with the `socket' function has no address. +Other processes can find it for communication only if you give it an +address. We call this "binding" the address to the socket, and the way +to do it is with the `bind' function. - When establishing an Internet socket connection, you must make sure -that the data in the `sin_port' and `sin_addr' members of the -`sockaddr_in' structure are represented in network byte order. If you -are encoding integer data in the messages sent through the socket, you -should convert this to network byte order too. If you don't do this, -your program may fail when running on or talking to other kinds of -machines. + You need be concerned with the address of a socket if other processes +are to find it and start communicating with it. You can specify an +address for other sockets, but this is usually pointless; the first time +you send data from a socket, or use it to initiate a connection, the +system assigns an address automatically if you have not specified one. - If you use `getservbyname' and `gethostbyname' or `inet_addr' to get -the port number and host address, the values are already in network -byte order, and you can copy them directly into the `sockaddr_in' -structure. + Occasionally a client needs to specify an address because the server +discriminates based on address; for example, the rsh and rlogin +protocols look at the client's socket address and only bypass password +checking if it is less than `IPPORT_RESERVED' (*note Ports::). - Otherwise, you have to convert the values explicitly. Use `htons' -and `ntohs' to convert values for the `sin_port' member. Use `htonl' -and `ntohl' to convert IPv4 addresses for the `sin_addr' member. -(Remember, `struct in_addr' is equivalent to `uint32_t'.) These -functions are declared in `netinet/in.h'. + The details of socket addresses vary depending on what namespace you +are using. *Note Local Namespace::, or *Note Internet Namespace::, for +specific information. - - Function: uint16_t htons (uint16_t HOSTSHORT) - This function converts the `uint16_t' integer HOSTSHORT from host - byte order to network byte order. + Regardless of the namespace, you use the same functions `bind' and +`getsockname' to set and examine a socket's address. These functions +use a phony data type, `struct sockaddr *', to accept the address. In +practice, the address lives in a structure of some other data type +appropriate to the address format you are using, but you cast its +address to `struct sockaddr *' when you pass it to `bind'. - - Function: uint16_t ntohs (uint16_t NETSHORT) - This function converts the `uint16_t' integer NETSHORT from - network byte order to host byte order. +* Menu: - - Function: uint32_t htonl (uint32_t HOSTLONG) - This function converts the `uint32_t' integer HOSTLONG from host - byte order to network byte order. +* Address Formats:: About `struct sockaddr'. +* Setting Address:: Binding an address to a socket. +* Reading Address:: Reading the address of a socket. - This is used for IPv4 Internet addresses. + +File: libc.info, Node: Address Formats, Next: Setting Address, Up: Socket Addresses - - Function: uint32_t ntohl (uint32_t NETLONG) - This function converts the `uint32_t' integer NETLONG from network - byte order to host byte order. +Address Formats +--------------- - This is used for IPv4 Internet addresses. + The functions `bind' and `getsockname' use the generic data type +`struct sockaddr *' to represent a pointer to a socket address. You +can't use this data type effectively to interpret an address or +construct one; for that, you must use the proper data type for the +socket's namespace. - -File: libc.info, Node: Protocols Database, Next: Ports, Prev: Host Addresses, Up: Internet Namespace + Thus, the usual practice is to construct an address of the proper +namespace-specific type, then cast a pointer to `struct sockaddr *' +when you call `bind' or `getsockname'. -Protocols Database ------------------- + The one piece of information that you can get from the `struct +sockaddr' data type is the "address format designator". This tells you +which data type to use to understand the address fully. - The communications protocol used with a socket controls low-level -details of how data are exchanged. For example, the protocol implements -things like checksums to detect errors in transmissions, and routing -instructions for messages. Normal user programs have little reason to -mess with these details directly. + The symbols in this section are defined in the header file +`sys/socket.h'. - The default communications protocol for the Internet namespace -depends on the communication style. For stream communication, the -default is TCP ("transmission control protocol"). For datagram -communication, the default is UDP ("user datagram protocol"). For -reliable datagram communication, the default is RDP ("reliable datagram -protocol"). You should nearly always use the default. + - Data Type: struct sockaddr + The `struct sockaddr' type itself has the following members: - Internet protocols are generally specified by a name instead of a -number. The network protocols that a host knows about are stored in a -database. This is usually either derived from the file -`/etc/protocols', or it may be an equivalent provided by a name server. -You look up the protocol number associated with a named protocol in -the database using the `getprotobyname' function. + `short int sa_family' + This is the code for the address format of this address. It + identifies the format of the data which follows. - Here are detailed descriptions of the utilities for accessing the -protocols database. These are declared in `netdb.h'. + `char sa_data[14]' + This is the actual socket address data, which is + format-dependent. Its length also depends on the format, and + may well be more than 14. The length 14 of `sa_data' is + essentially arbitrary. - - Data Type: struct protoent - This data type is used to represent entries in the network - protocols database. It has the following members: + Each address format has a symbolic name which starts with `AF_'. +Each of them corresponds to a `PF_' symbol which designates the +corresponding namespace. Here is a list of address format names: - `char *p_name' - This is the official name of the protocol. +`AF_LOCAL' + This designates the address format that goes with the local + namespace. (`PF_LOCAL' is the name of that namespace.) *Note + Local Namespace Details::, for information about this address + format. - `char **p_aliases' - These are alternate names for the protocol, specified as an - array of strings. The last element of the array is a null - pointer. +`AF_UNIX' + This is a synonym for `AF_LOCAL'. Although `AF_LOCAL' is mandated + by POSIX.1g, `AF_UNIX' is portable to more systems. `AF_UNIX' was + the traditional name stemming from BSD, so even most POSIX systems + support it. It is also the name of choice in the Unix98 + specification. (The same is true for `PF_UNIX' vs. `PF_LOCAL'). - `int p_proto' - This is the protocol number (in host byte order); use this - member as the PROTOCOL argument to `socket'. +`AF_FILE' + This is another synonym for `AF_LOCAL', for compatibility. + (`PF_FILE' is likewise a synonym for `PF_LOCAL'.) - You can use `getprotobyname' and `getprotobynumber' to search the -protocols database for a specific protocol. The information is -returned in a statically-allocated structure; you must copy the -information if you need to save it across calls. +`AF_INET' + This designates the address format that goes with the Internet + namespace. (`PF_INET' is the name of that namespace.) *Note + Internet Address Formats::. - - Function: struct protoent * getprotobyname (const char *NAME) - The `getprotobyname' function returns information about the - network protocol named NAME. If there is no such protocol, it - returns a null pointer. +`AF_INET6' + This is similar to `AF_INET', but refers to the IPv6 protocol. + (`PF_INET6' is the name of the corresponding namespace.) - - Function: struct protoent * getprotobynumber (int PROTOCOL) - The `getprotobynumber' function returns information about the - network protocol with number PROTOCOL. If there is no such - protocol, it returns a null pointer. +`AF_UNSPEC' + This designates no particular address format. It is used only in + rare cases, such as to clear out the default destination address + of a "connected" datagram socket. *Note Sending Datagrams::. - You can also scan the whole protocols database one protocol at a -time by using `setprotoent', `getprotoent' and `endprotoent'. Be -careful when using these functions because they are not reentrant. + The corresponding namespace designator symbol `PF_UNSPEC' exists + for completeness, but there is no reason to use it in a program. - - Function: void setprotoent (int STAYOPEN) - This function opens the protocols database to begin scanning it. + `sys/socket.h' defines symbols starting with `AF_' for many +different kinds of networks, most or all of which are not actually +implemented. We will document those that really work as we receive +information about how to use them. - If the STAYOPEN argument is nonzero, this sets a flag so that - subsequent calls to `getprotobyname' or `getprotobynumber' will - not close the database (as they usually would). This makes for - more efficiency if you call those functions several times, by - avoiding reopening the database for each call. + +File: libc.info, Node: Setting Address, Next: Reading Address, Prev: Address Formats, Up: Socket Addresses - - Function: struct protoent * getprotoent (void) - This function returns the next entry in the protocols database. It - returns a null pointer if there are no more entries. +Setting the Address of a Socket +------------------------------- - - Function: void endprotoent (void) - This function closes the protocols database. + Use the `bind' function to assign an address to a socket. The +prototype for `bind' is in the header file `sys/socket.h'. For +examples of use, see *Note Local Socket Example::, or see *Note Inet +Example::. - -File: libc.info, Node: Inet Example, Prev: Byte Order, Up: Internet Namespace + - Function: int bind (int SOCKET, struct sockaddr *ADDR, socklen_t + LENGTH) + The `bind' function assigns an address to the socket SOCKET. The + ADDR and LENGTH arguments specify the address; the detailed format + of the address depends on the namespace. The first part of the + address is always the format designator, which specifies a + namespace, and says that the address is in the format of that + namespace. -Internet Socket Example ------------------------ + The return value is `0' on success and `-1' on failure. The + following `errno' error conditions are defined for this function: - Here is an example showing how to create and name a socket in the -Internet namespace. The newly created socket exists on the machine that -the program is running on. Rather than finding and using the machine's -Internet address, this example specifies `INADDR_ANY' as the host -address; the system replaces that with the machine's actual address. + `EBADF' + The SOCKET argument is not a valid file descriptor. - #include - #include - #include - #include - - int - make_socket (uint16_t port) - { - int sock; - struct sockaddr_in name; - - /* Create the socket. */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) - { - perror ("socket"); - exit (EXIT_FAILURE); - } - - /* Give the socket a name. */ - name.sin_family = AF_INET; - name.sin_port = htons (port); - name.sin_addr.s_addr = htonl (INADDR_ANY); - if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) - { - perror ("bind"); - exit (EXIT_FAILURE); - } - - return sock; - } + `ENOTSOCK' + The descriptor SOCKET is not a socket. - Here is another example, showing how you can fill in a `sockaddr_in' -structure, given a host name string and a port number: + `EADDRNOTAVAIL' + The specified address is not available on this machine. - #include - #include - #include - #include - #include - - void - init_sockaddr (struct sockaddr_in *name, - const char *hostname, - uint16_t port) - { - struct hostent *hostinfo; - - name->sin_family = AF_INET; - name->sin_port = htons (port); - hostinfo = gethostbyname (hostname); - if (hostinfo == NULL) - { - fprintf (stderr, "Unknown host %s.\n", hostname); - exit (EXIT_FAILURE); - } - name->sin_addr = *(struct in_addr *) hostinfo->h_addr; - } + `EADDRINUSE' + Some other socket is already using the specified address. + + `EINVAL' + The socket SOCKET already has an address. + + `EACCES' + You do not have permission to access the requested address. + (In the Internet domain, only the super-user is allowed to + specify a port number in the range 0 through + `IPPORT_RESERVED' minus one; see *Note Ports::.) + + Additional conditions may be possible depending on the particular + namespace of the socket.  -File: libc.info, Node: Misc Namespaces, Next: Open/Close Sockets, Prev: Internet Namespace, Up: Sockets +File: libc.info, Node: Reading Address, Prev: Setting Address, Up: Socket Addresses -Other Namespaces -================ +Reading the Address of a Socket +------------------------------- - Certain other namespaces and associated protocol families are -supported but not documented yet because they are not often used. -`PF_NS' refers to the Xerox Network Software protocols. `PF_ISO' stands -for Open Systems Interconnect. `PF_CCITT' refers to protocols from -CCITT. `socket.h' defines these symbols and others naming protocols -not actually implemented. + Use the function `getsockname' to examine the address of an Internet +socket. The prototype for this function is in the header file +`sys/socket.h'. - `PF_IMPLINK' is used for communicating between hosts and Internet -Message Processors. For information on this and `PF_ROUTE', an -occasionally-used local area routing protocol, see the GNU Hurd Manual -(to appear in the future). + - Function: int getsockname (int SOCKET, struct sockaddr *ADDR, + socklen_t *LENGTH-PTR) + The `getsockname' function returns information about the address + of the socket SOCKET in the locations specified by the ADDR and + LENGTH-PTR arguments. Note that the LENGTH-PTR is a pointer; you + should initialize it to be the allocation size of ADDR, and on + return it contains the actual size of the address data. - -File: libc.info, Node: Open/Close Sockets, Next: Connections, Prev: Misc Namespaces, Up: Sockets + The format of the address data depends on the socket namespace. + The length of the information is usually fixed for a given + namespace, so normally you can know exactly how much space is + needed and can provide that much. The usual practice is to + allocate a place for the value using the proper data type for the + socket's namespace, then cast its address to `struct sockaddr *' + to pass it to `getsockname'. -Opening and Closing Sockets -=========================== + The return value is `0' on success and `-1' on error. The + following `errno' error conditions are defined for this function: - This section describes the actual library functions for opening and -closing sockets. The same functions work for all namespaces and -connection styles. + `EBADF' + The SOCKET argument is not a valid file descriptor. -* Menu: + `ENOTSOCK' + The descriptor SOCKET is not a socket. -* Creating a Socket:: How to open a socket. -* Closing a Socket:: How to close a socket. -* Socket Pairs:: These are created like pipes. + `ENOBUFS' + There are not enough internal buffers available for the + operation. + + You can't read the address of a socket in the file namespace. This +is consistent with the rest of the system; in general, there's no way to +find a file's name from a descriptor for that file. diff -durpN glibc-2.2.4/manual/libc.info-27 glibc-2.2.5/manual/libc.info-27 --- glibc-2.2.4/manual/libc.info-27 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-27 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1304 +33,1182 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Creating a Socket, Next: Closing a Socket, Up: Open/Close Sockets +File: libc.info, Node: Interface Naming, Next: Local Namespace, Prev: Socket Addresses, Up: Sockets -Creating a Socket ------------------ +Interface Naming +================ - The primitive for creating a socket is the `socket' function, -declared in `sys/socket.h'. + Each network interface has a name. This usually consists of a few +letters that relate to the type of interface, which may be followed by a +number if there is more than one interface of that type. Examples +might be `lo' (the loopback interface) and `eth0' (the first Ethernet +interface). - - Function: int socket (int NAMESPACE, int STYLE, int PROTOCOL) - This function creates a socket and specifies communication style - STYLE, which should be one of the socket styles listed in *Note - Communication Styles::. The NAMESPACE argument specifies the - namespace; it must be `PF_LOCAL' (*note Local Namespace::) or - `PF_INET' (*note Internet Namespace::). PROTOCOL designates the - specific protocol (*note Socket Concepts::); zero is usually right - for PROTOCOL. + Although such names are convenient for humans, it would be clumsy to +have to use them whenever a program needs to refer to an interface. In +such situations an interface is referred to by its "index", which is an +arbitrarily-assigned small positive integer. - The return value from `socket' is the file descriptor for the new - socket, or `-1' in case of error. The following `errno' error - conditions are defined for this function: + The following functions, constants and data types are declared in the +header file `net/if.h'. - `EPROTONOSUPPORT' - The PROTOCOL or STYLE is not supported by the NAMESPACE - specified. + - Constant: size_t IFNAMSIZ + This constant defines the maximum buffer size needed to hold an + interface name, including its terminating zero byte. - `EMFILE' - The process already has too many file descriptors open. + - Function: unsigned int if_nametoindex (const char *ifname) + This function yields the interface index corresponding to a + particular name. If no interface exists with the name given, it + returns 0. - `ENFILE' - The system already has too many file descriptors open. + - Function: char * if_indextoname (unsigned int ifindex, char *ifname) + This function maps an interface index to its corresponding name. + The returned name is placed in the buffer pointed to by `ifname', + which must be at least `IFNAMSIZ' bytes in length. If the index + was invalid, the function's return value is a null pointer, + otherwise it is `ifname'. - `EACCES' - The process does not have the privilege to create a socket of - the specified STYLE or PROTOCOL. + - Data Type: struct if_nameindex + This data type is used to hold the information about a single + interface. It has the following members: - `ENOBUFS' - The system ran out of internal buffer space. + `unsigned int if_index;' + This is the interface index. - The file descriptor returned by the `socket' function supports both - read and write operations. However, like pipes, sockets do not - support file positioning operations. + `char *if_name' + This is the null-terminated index name. - For examples of how to call the `socket' function, see *Note Local -Socket Example::, or *Note Inet Example::. + + - Function: struct if_nameindex * if_nameindex (void) + This function returns an array of `if_nameindex' structures, one + for every interface that is present. The end of the list is + indicated by a structure with an interface of 0 and a null name + pointer. If an error occurs, this function returns a null pointer. + + The returned structure must be freed with `if_freenameindex' after + use. + + - Function: void if_freenameindex (struct if_nameindex *ptr) + This function frees the structure returned by an earlier call to + `if_nameindex'.  -File: libc.info, Node: Closing a Socket, Next: Socket Pairs, Prev: Creating a Socket, Up: Open/Close Sockets +File: libc.info, Node: Local Namespace, Next: Internet Namespace, Prev: Interface Naming, Up: Sockets -Closing a Socket ----------------- +The Local Namespace +=================== - When you have finished using a socket, you can simply close its file -descriptor with `close'; see *Note Opening and Closing Files::. If -there is still data waiting to be transmitted over the connection, -normally `close' tries to complete this transmission. You can control -this behavior using the `SO_LINGER' socket option to specify a timeout -period; see *Note Socket Options::. + This section describes the details of the local namespace, whose +symbolic name (required when you create a socket) is `PF_LOCAL'. The +local namespace is also known as "Unix domain sockets". Another name +is file namespace since socket addresses are normally implemented as +file names. - You can also shut down only reception or transmission on a -connection by calling `shutdown', which is declared in `sys/socket.h'. +* Menu: - - Function: int shutdown (int SOCKET, int HOW) - The `shutdown' function shuts down the connection of socket - SOCKET. The argument HOW specifies what action to perform: +* Concepts: Local Namespace Concepts. What you need to understand. +* Details: Local Namespace Details. Address format, symbolic names, etc. +* Example: Local Socket Example. Example of creating a socket. - `0' - Stop receiving data for this socket. If further data arrives, - reject it. + +File: libc.info, Node: Local Namespace Concepts, Next: Local Namespace Details, Up: Local Namespace - `1' - Stop trying to transmit data from this socket. Discard any - data waiting to be sent. Stop looking for acknowledgement of - data already sent; don't retransmit it if it is lost. +Local Namespace Concepts +------------------------ - `2' - Stop both reception and transmission. + In the local namespace socket addresses are file names. You can +specify any file name you want as the address of the socket, but you +must have write permission on the directory containing it. It's common +to put these files in the `/tmp' directory. - The return value is `0' on success and `-1' on failure. The - following `errno' error conditions are defined for this function: + One peculiarity of the local namespace is that the name is only used +when opening the connection; once open the address is not meaningful and +may not exist. - `EBADF' - SOCKET is not a valid file descriptor. + Another peculiarity is that you cannot connect to such a socket from +another machine-not even if the other machine shares the file system +which contains the name of the socket. You can see the socket in a +directory listing, but connecting to it never succeeds. Some programs +take advantage of this, such as by asking the client to send its own +process ID, and using the process IDs to distinguish between clients. +However, we recommend you not use this method in protocols you design, +as we might someday permit connections from other machines that mount +the same file systems. Instead, send each new client an identifying +number if you want it to have one. - `ENOTSOCK' - SOCKET is not a socket. + After you close a socket in the local namespace, you should delete +the file name from the file system. Use `unlink' or `remove' to do +this; see *Note Deleting Files::. - `ENOTCONN' - SOCKET is not connected. + The local namespace supports just one protocol for any communication +style; it is protocol number `0'.  -File: libc.info, Node: Socket Pairs, Prev: Closing a Socket, Up: Open/Close Sockets +File: libc.info, Node: Local Namespace Details, Next: Local Socket Example, Prev: Local Namespace Concepts, Up: Local Namespace -Socket Pairs ------------- +Details of Local Namespace +-------------------------- - A "socket pair" consists of a pair of connected (but unnamed) -sockets. It is very similar to a pipe and is used in much the same -way. Socket pairs are created with the `socketpair' function, declared -in `sys/socket.h'. A socket pair is much like a pipe; the main -difference is that the socket pair is bidirectional, whereas the pipe -has one input-only end and one output-only end (*note Pipes and -FIFOs::). + To create a socket in the local namespace, use the constant +`PF_LOCAL' as the NAMESPACE argument to `socket' or `socketpair'. This +constant is defined in `sys/socket.h'. - - Function: int socketpair (int NAMESPACE, int STYLE, int PROTOCOL, - int FILEDES[2]) - This function creates a socket pair, returning the file - descriptors in `FILEDES[0]' and `FILEDES[1]'. The socket pair is - a full-duplex communications channel, so that both reading and - writing may be performed at either end. + - Macro: int PF_LOCAL + This designates the local namespace, in which socket addresses are + local names, and its associated family of protocols. `PF_Local' + is the macro used by Posix.1g. - The NAMESPACE, STYLE and PROTOCOL arguments are interpreted as for - the `socket' function. STYLE should be one of the communication - styles listed in *Note Communication Styles::. The NAMESPACE - argument specifies the namespace, which must be `AF_LOCAL' (*note - Local Namespace::); PROTOCOL specifies the communications - protocol, but zero is the only meaningful value. + - Macro: int PF_UNIX + This is a synonym for `PF_LOCAL', for compatibility's sake. - If STYLE specifies a connectionless communication style, then the - two sockets you get are not _connected_, strictly speaking, but - each of them knows the other as the default destination address, - so they can send packets to each other. + - Macro: int PF_FILE + This is a synonym for `PF_LOCAL', for compatibility's sake. - The `socketpair' function returns `0' on success and `-1' on - failure. The following `errno' error conditions are defined for - this function: + The structure for specifying socket names in the local namespace is +defined in the header file `sys/un.h': - `EMFILE' - The process has too many file descriptors open. + - Data Type: struct sockaddr_un + This structure is used to specify local namespace socket + addresses. It has the following members: - `EAFNOSUPPORT' - The specified namespace is not supported. + `short int sun_family' + This identifies the address family or format of the socket + address. You should store the value `AF_LOCAL' to designate + the local namespace. *Note Socket Addresses::. - `EPROTONOSUPPORT' - The specified protocol is not supported. + `char sun_path[108]' + This is the file name to use. - `EOPNOTSUPP' - The specified protocol does not support the creation of - socket pairs. + *Incomplete:* Why is 108 a magic number? RMS suggests making + this a zero-length array and tweaking the following example + to use `alloca' to allocate an appropriate amount of storage + based on the length of the filename. + + You should compute the LENGTH parameter for a socket address in the +local namespace as the sum of the size of the `sun_family' component +and the string length (_not_ the allocation size!) of the file name +string. This can be done using the macro `SUN_LEN': + + - Macro: int SUN_LEN (_struct sockaddr_un *_ PTR) + The macro computes the length of socket address in the local + namespace.  -File: libc.info, Node: Connections, Next: Datagrams, Prev: Open/Close Sockets, Up: Sockets +File: libc.info, Node: Local Socket Example, Prev: Local Namespace Details, Up: Local Namespace -Using Sockets with Connections -============================== +Example of Local-Namespace Sockets +---------------------------------- - The most common communication styles involve making a connection to a -particular other socket, and then exchanging data with that socket over -and over. Making a connection is asymmetric; one side (the "client") -acts to request a connection, while the other side (the "server") makes -a socket and waits for the connection request. + Here is an example showing how to create and name a socket in the +local namespace. + + #include + #include + #include + #include + #include + #include + + int + make_named_socket (const char *filename) + { + struct sockaddr_un name; + int sock; + size_t size; + + /* Create the socket. */ + sock = socket (PF_LOCAL, SOCK_DGRAM, 0); + if (sock < 0) + { + perror ("socket"); + exit (EXIT_FAILURE); + } + + /* Bind a name to the socket. */ + name.sun_family = AF_LOCAL; + strncpy (name.sun_path, filename, sizeof (name.sun_path)); + + /* The size of the address is + the offset of the start of the filename, + plus its length, + plus one for the terminating null byte. + Alternatively you can just do: + size = SUN_LEN (&name); + */ + size = (offsetof (struct sockaddr_un, sun_path) + + strlen (name.sun_path) + 1); + + if (bind (sock, (struct sockaddr *) &name, size) < 0) + { + perror ("bind"); + exit (EXIT_FAILURE); + } + + return sock; + } + + +File: libc.info, Node: Internet Namespace, Next: Misc Namespaces, Prev: Local Namespace, Up: Sockets + +The Internet Namespace +====================== + + This section describes the details of the protocols and socket naming +conventions used in the Internet namespace. + + Originally the Internet namespace used only IP version 4 (IPv4). +With the growing number of hosts on the Internet, a new protocol with a +larger address space was necessary: IP version 6 (IPv6). IPv6 +introduces 128-bit addresses (IPv4 has 32-bit addresses) and other +features, and will eventually replace IPv4. + + To create a socket in the IPv4 Internet namespace, use the symbolic +name `PF_INET' of this namespace as the NAMESPACE argument to `socket' +or `socketpair'. For IPv6 addresses you need the macro `PF_INET6'. +These macros are defined in `sys/socket.h'. + + - Macro: int PF_INET + This designates the IPv4 Internet namespace and associated family + of protocols. + + - Macro: int PF_INET6 + This designates the IPv6 Internet namespace and associated family + of protocols. + + A socket address for the Internet namespace includes the following +components: + + * The address of the machine you want to connect to. Internet + addresses can be specified in several ways; these are discussed in + *Note Internet Address Formats::, *Note Host Addresses:: and *Note + Host Names::. + + * A port number for that machine. *Note Ports::. + + You must ensure that the address and port number are represented in a +canonical format called "network byte order". *Note Byte Order::, for +information about this. * Menu: -* Connecting:: What the client program must do. -* Listening:: How a server program waits for requests. -* Accepting Connections:: What the server does when it gets a request. -* Who is Connected:: Getting the address of the - other side of a connection. -* Transferring Data:: How to send and receive data. -* Byte Stream Example:: An example program: a client for communicating - over a byte stream socket in the Internet namespace. -* Server Example:: A corresponding server program. -* Out-of-Band Data:: This is an advanced feature. +* Internet Address Formats:: How socket addresses are specified in the + Internet namespace. +* Host Addresses:: All about host addresses of Internet host. +* Protocols Database:: Referring to protocols by name. +* Ports:: Internet port numbers. +* Services Database:: Ports may have symbolic names. +* Byte Order:: Different hosts may use different byte + ordering conventions; you need to + canonicalize host address and port number. +* Inet Example:: Putting it all together.  -File: libc.info, Node: Connecting, Next: Listening, Up: Connections +File: libc.info, Node: Internet Address Formats, Next: Host Addresses, Up: Internet Namespace -Making a Connection -------------------- +Internet Socket Address Formats +------------------------------- - In making a connection, the client makes a connection while the -server waits for and accepts the connection. Here we discuss what the -client program must do with the `connect' function, which is declared in -`sys/socket.h'. + In the Internet namespace, for both IPv4 (`AF_INET') and IPv6 +(`AF_INET6'), a socket address consists of a host address and a port on +that host. In addition, the protocol you choose serves effectively as +a part of the address because local port numbers are meaningful only +within a particular protocol. - - Function: int connect (int SOCKET, struct sockaddr *ADDR, socklen_t - LENGTH) - The `connect' function initiates a connection from the socket with - file descriptor SOCKET to the socket whose address is specified by - the ADDR and LENGTH arguments. (This socket is typically on - another machine, and it must be already set up as a server.) - *Note Socket Addresses::, for information about how these - arguments are interpreted. + The data types for representing socket addresses in the Internet +namespace are defined in the header file `netinet/in.h'. - Normally, `connect' waits until the server responds to the request - before it returns. You can set nonblocking mode on the socket - SOCKET to make `connect' return immediately without waiting for - the response. *Note File Status Flags::, for information about - nonblocking mode. + - Data Type: struct sockaddr_in + This is the data type used to represent socket addresses in the + Internet namespace. It has the following members: - The normal return value from `connect' is `0'. If an error - occurs, `connect' returns `-1'. The following `errno' error - conditions are defined for this function: + `sa_family_t sin_family' + This identifies the address family or format of the socket + address. You should store the value `AF_INET' in this member. + *Note Socket Addresses::. - `EBADF' - The socket SOCKET is not a valid file descriptor. + `struct in_addr sin_addr' + This is the Internet address of the host machine. *Note Host + Addresses::, and *Note Host Names::, for how to get a value + to store here. - `ENOTSOCK' - File descriptor SOCKET is not a socket. + `unsigned short int sin_port' + This is the port number. *Note Ports::. - `EADDRNOTAVAIL' - The specified address is not available on the remote machine. + When you call `bind' or `getsockname', you should specify `sizeof +(struct sockaddr_in)' as the LENGTH parameter if you are using an IPv4 +Internet namespace socket address. - `EAFNOSUPPORT' - The namespace of the ADDR is not supported by this socket. + - Data Type: struct sockaddr_in6 + This is the data type used to represent socket addresses in the + IPv6 namespace. It has the following members: - `EISCONN' - The socket SOCKET is already connected. + `sa_family_t sin6_family' + This identifies the address family or format of the socket + address. You should store the value of `AF_INET6' in this + member. *Note Socket Addresses::. - `ETIMEDOUT' - The attempt to establish the connection timed out. + `struct in6_addr sin6_addr' + This is the IPv6 address of the host machine. *Note Host + Addresses::, and *Note Host Names::, for how to get a value + to store here. - `ECONNREFUSED' - The server has actively refused to establish the connection. + `uint32_t sin6_flowinfo' + This is a currently unimplemented field. - `ENETUNREACH' - The network of the given ADDR isn't reachable from this host. + `uint16_t sin6_port' + This is the port number. *Note Ports::. - `EADDRINUSE' - The socket address of the given ADDR is already in use. - `EINPROGRESS' - The socket SOCKET is non-blocking and the connection could - not be established immediately. You can determine when the - connection is completely established with `select'; *note - Waiting for I/O::. Another `connect' call on the same - socket, before the connection is completely established, will - fail with `EALREADY'. + +File: libc.info, Node: Host Addresses, Next: Protocols Database, Prev: Internet Address Formats, Up: Internet Namespace - `EALREADY' - The socket SOCKET is non-blocking and already has a pending - connection in progress (see `EINPROGRESS' above). +Host Addresses +-------------- - This function is defined as a cancellation point in multi-threaded - programs, so one has to be prepared for this and make sure that - allocated resources (like memory, files descriptors, semaphores or - whatever) are freed even if the thread is canceled. + Each computer on the Internet has one or more "Internet addresses", +numbers which identify that computer among all those on the Internet. +Users typically write IPv4 numeric host addresses as sequences of four +numbers, separated by periods, as in `128.52.46.32', and IPv6 numeric +host addresses as sequences of up to eight numbers separated by colons, +as in `5f03:1200:836f:c100::1'. + + Each computer also has one or more "host names", which are strings +of words separated by periods, as in `mescaline.gnu.org'. + + Programs that let the user specify a host typically accept both +numeric addresses and host names. To open a connection a program needs +a numeric address, and so must convert a host name to the numeric +address it stands for. + +* Menu: + +* Abstract Host Addresses:: What a host number consists of. +* Data type: Host Address Data Type. Data type for a host number. +* Functions: Host Address Functions. Functions to operate on them. +* Names: Host Names. Translating host names to host numbers.  -File: libc.info, Node: Listening, Next: Accepting Connections, Prev: Connecting, Up: Connections +File: libc.info, Node: Abstract Host Addresses, Next: Host Address Data Type, Up: Host Addresses -Listening for Connections -------------------------- +Internet Host Addresses +....................... - Now let us consider what the server process must do to accept -connections on a socket. First it must use the `listen' function to -enable connection requests on the socket, and then accept each incoming -connection with a call to `accept' (*note Accepting Connections::). -Once connection requests are enabled on a server socket, the `select' -function reports when the socket has a connection ready to be accepted -(*note Waiting for I/O::). + Each computer on the Internet has one or more Internet addresses, +numbers which identify that computer among all those on the Internet. - The `listen' function is not allowed for sockets using -connectionless communication styles. + An IPv4 Internet host address is a number containing four bytes of +data. Historically these are divided into two parts, a "network +number" and a "local network address number" within that network. In +the mid-1990s classless addresses were introduced which changed this +behavior. Since some functions implicitly expect the old definitions, +we first describe the class-based network and will then describe +classless addresses. IPv6 uses only classless addresses and therefore +the following paragraphs don't apply. - You can write a network server that does not even start running -until a connection to it is requested. *Note Inetd Servers::. + The class-based IPv4 network number consists of the first one, two or +three bytes; the rest of the bytes are the local address. - In the Internet namespace, there are no special protection mechanisms -for controlling access to a port; any process on any machine can make a -connection to your server. If you want to restrict access to your -server, make it examine the addresses associated with connection -requests or implement some other handshaking or identification protocol. + IPv4 network numbers are registered with the Network Information +Center (NIC), and are divided into three classes--A, B and C. The local +network address numbers of individual machines are registered with the +administrator of the particular network. - In the local namespace, the ordinary file protection bits control -who has access to connect to the socket. + Class A networks have single-byte numbers in the range 0 to 127. +There are only a small number of Class A networks, but they can each +support a very large number of hosts. Medium-sized Class B networks +have two-byte network numbers, with the first byte in the range 128 to +191. Class C networks are the smallest; they have three-byte network +numbers, with the first byte in the range 192-255. Thus, the first 1, +2, or 3 bytes of an Internet address specify a network. The remaining +bytes of the Internet address specify the address within that network. - - Function: int listen (int SOCKET, unsigned int N) - The `listen' function enables the socket SOCKET to accept - connections, thus making it a server socket. + The Class A network 0 is reserved for broadcast to all networks. In +addition, the host number 0 within each network is reserved for +broadcast to all hosts in that network. These uses are obsolete now +but for compatibility reasons you shouldn't use network 0 and host +number 0. - The argument N specifies the length of the queue for pending - connections. When the queue fills, new clients attempting to - connect fail with `ECONNREFUSED' until the server calls `accept' to - accept a connection from the queue. + The Class A network 127 is reserved for loopback; you can always use +the Internet address `127.0.0.1' to refer to the host machine. - The `listen' function returns `0' on success and `-1' on failure. - The following `errno' error conditions are defined for this - function: + Since a single machine can be a member of multiple networks, it can +have multiple Internet host addresses. However, there is never +supposed to be more than one machine with the same host address. - `EBADF' - The argument SOCKET is not a valid file descriptor. + There are four forms of the "standard numbers-and-dots notation" for +Internet addresses: - `ENOTSOCK' - The argument SOCKET is not a socket. +`A.B.C.D' + This specifies all four bytes of the address individually and is + the commonly used representation. - `EOPNOTSUPP' - The socket SOCKET does not support this operation. +`A.B.C' + The last part of the address, C, is interpreted as a 2-byte + quantity. This is useful for specifying host addresses in a Class + B network with network address number `A.B'. - -File: libc.info, Node: Accepting Connections, Next: Who is Connected, Prev: Listening, Up: Connections +`A.B' + The last part of the address, B, is interpreted as a 3-byte + quantity. This is useful for specifying host addresses in a Class + A network with network address number A. -Accepting Connections ---------------------- +`A' + If only one part is given, this corresponds directly to the host + address number. - When a server receives a connection request, it can complete the -connection by accepting the request. Use the function `accept' to do -this. + Within each part of the address, the usual C conventions for +specifying the radix apply. In other words, a leading `0x' or `0X' +implies hexadecimal radix; a leading `0' implies octal; and otherwise +decimal radix is assumed. - A socket that has been established as a server can accept connection -requests from multiple clients. The server's original socket _does not -become part of the connection_; instead, `accept' makes a new socket -which participates in the connection. `accept' returns the descriptor -for this socket. The server's original socket remains available for -listening for further connection requests. +Classless Addresses +................... - The number of pending connection requests on a server socket is -finite. If connection requests arrive from clients faster than the -server can act upon them, the queue can fill up and additional requests -are refused with an `ECONNREFUSED' error. You can specify the maximum -length of this queue as an argument to the `listen' function, although -the system may also impose its own internal limit on the length of this -queue. + IPv4 addresses (and IPv6 addresses also) are now considered +classless; the distinction between classes A, B and C can be ignored. +Instead an IPv4 host address consists of a 32-bit address and a 32-bit +mask. The mask contains set bits for the network part and cleared bits +for the host part. The network part is contiguous from the left, with +the remaining bits representing the host. As a consequence, the +netmask can simply be specified as the number of set bits. Classes A, +B and C are just special cases of this general rule. For example, +class A addresses have a netmask of `255.0.0.0' or a prefix length of 8. - - Function: int accept (int SOCKET, struct sockaddr *ADDR, socklen_t - *LENGTH_PTR) - This function is used to accept a connection request on the server - socket SOCKET. + Classless IPv4 network addresses are written in numbers-and-dots +notation with the prefix length appended and a slash as separator. For +example the class A network 10 is written as `10.0.0.0/8'. - The `accept' function waits if there are no connections pending, - unless the socket SOCKET has nonblocking mode set. (You can use - `select' to wait for a pending connection, with a nonblocking - socket.) *Note File Status Flags::, for information about - nonblocking mode. +IPv6 Addresses +.............. - The ADDR and LENGTH-PTR arguments are used to return information - about the name of the client socket that initiated the connection. - *Note Socket Addresses::, for information about the format of the - information. + IPv6 addresses contain 128 bits (IPv4 has 32 bits) of data. A host +address is usually written as eight 16-bit hexadecimal numbers that are +separated by colons. Two colons are used to abbreviate strings of +consecutive zeros. For example, the IPv6 loopback address +`0:0:0:0:0:0:0:1' can just be written as `::1'. - Accepting a connection does not make SOCKET part of the - connection. Instead, it creates a new socket which becomes - connected. The normal return value of `accept' is the file - descriptor for the new socket. + +File: libc.info, Node: Host Address Data Type, Next: Host Address Functions, Prev: Abstract Host Addresses, Up: Host Addresses - After `accept', the original socket SOCKET remains open and - unconnected, and continues listening until you close it. You can - accept further connections with SOCKET by calling `accept' again. +Host Address Data Type +...................... - If an error occurs, `accept' returns `-1'. The following `errno' - error conditions are defined for this function: + IPv4 Internet host addresses are represented in some contexts as +integers (type `uint32_t'). In other contexts, the integer is packaged +inside a structure of type `struct in_addr'. It would be better if the +usage were made consistent, but it is not hard to extract the integer +from the structure or put the integer into a structure. - `EBADF' - The SOCKET argument is not a valid file descriptor. + You will find older code that uses `unsigned long int' for IPv4 +Internet host addresses instead of `uint32_t' or `struct in_addr'. +Historically `unsigned long int' was a 32-bit number but with 64-bit +machines this has changed. Using `unsigned long int' might break the +code if it is used on machines where this type doesn't have 32 bits. +`uint32_t' is specified by Unix98 and guaranteed to have 32 bits. - `ENOTSOCK' - The descriptor SOCKET argument is not a socket. + IPv6 Internet host addresses have 128 bits and are packaged inside a +structure of type `struct in6_addr'. - `EOPNOTSUPP' - The descriptor SOCKET does not support this operation. + The following basic definitions for Internet addresses are declared +in the header file `netinet/in.h': - `EWOULDBLOCK' - SOCKET has nonblocking mode set, and there are no pending - connections immediately available. + - Data Type: struct in_addr + This data type is used in certain contexts to contain an IPv4 + Internet host address. It has just one field, named `s_addr', + which records the host address number as an `uint32_t'. - This function is defined as a cancellation point in multi-threaded - programs, so one has to be prepared for this and make sure that - allocated resources (like memory, files descriptors, semaphores or - whatever) are freed even if the thread is canceled. + - Macro: uint32_t INADDR_LOOPBACK + You can use this constant to stand for "the address of this + machine," instead of finding its actual address. It is the IPv4 + Internet address `127.0.0.1', which is usually called `localhost'. + This special constant saves you the trouble of looking up the + address of your own machine. Also, the system usually implements + `INADDR_LOOPBACK' specially, avoiding any network traffic for the + case of one machine talking to itself. - The `accept' function is not allowed for sockets using -connectionless communication styles. + - Macro: uint32_t INADDR_ANY + You can use this constant to stand for "any incoming address" when + binding to an address. *Note Setting Address::. This is the usual + address to give in the `sin_addr' member of `struct sockaddr_in' + when you want to accept Internet connections. + + - Macro: uint32_t INADDR_BROADCAST + This constant is the address you use to send a broadcast message. + + - Macro: uint32_t INADDR_NONE + This constant is returned by some functions to indicate an error. + + - Data Type: struct in6_addr + This data type is used to store an IPv6 address. It stores 128 + bits of data, which can be accessed (via a union) in a variety of + ways. + + - Constant: struct in6_addr in6addr_loopback + This constant is the IPv6 address `::1', the loopback address. See + above for a description of what this means. The macro + `IN6ADDR_LOOPBACK_INIT' is provided to allow you to initialize your + own variables to this value. + + - Constant: struct in6_addr in6addr_any + This constant is the IPv6 address `::', the unspecified address. + See above for a description of what this means. The macro + `IN6ADDR_ANY_INIT' is provided to allow you to initialize your own + variables to this value.  -File: libc.info, Node: Who is Connected, Next: Transferring Data, Prev: Accepting Connections, Up: Connections +File: libc.info, Node: Host Address Functions, Next: Host Names, Prev: Host Address Data Type, Up: Host Addresses -Who is Connected to Me? ------------------------ +Host Address Functions +...................... - - Function: int getpeername (int SOCKET, struct sockaddr *ADDR, - socklen_t *LENGTH-PTR) - The `getpeername' function returns the address of the socket that - SOCKET is connected to; it stores the address in the memory space - specified by ADDR and LENGTH-PTR. It stores the length of the - address in `*LENGTH-PTR'. +These additional functions for manipulating Internet addresses are +declared in the header file `arpa/inet.h'. They represent Internet +addresses in network byte order, and network numbers and +local-address-within-network numbers in host byte order. *Note Byte +Order::, for an explanation of network and host byte order. - *Note Socket Addresses::, for information about the format of the - address. In some operating systems, `getpeername' works only for - sockets in the Internet domain. + - Function: int inet_aton (const char *NAME, struct in_addr *ADDR) + This function converts the IPv4 Internet host address NAME from + the standard numbers-and-dots notation into binary data and stores + it in the `struct in_addr' that ADDR points to. `inet_aton' + returns nonzero if the address is valid, zero if not. - The return value is `0' on success and `-1' on error. The - following `errno' error conditions are defined for this function: + - Function: uint32_t inet_addr (const char *NAME) + This function converts the IPv4 Internet host address NAME from the + standard numbers-and-dots notation into binary data. If the input + is not valid, `inet_addr' returns `INADDR_NONE'. This is an + obsolete interface to `inet_aton', described immediately above. It + is obsolete because `INADDR_NONE' is a valid address + (255.255.255.255), and `inet_aton' provides a cleaner way to + indicate error return. - `EBADF' - The argument SOCKET is not a valid file descriptor. + - Function: uint32_t inet_network (const char *NAME) + This function extracts the network number from the address NAME, + given in the standard numbers-and-dots notation. The returned + address is in host order. If the input is not valid, + `inet_network' returns `-1'. - `ENOTSOCK' - The descriptor SOCKET is not a socket. + The function works only with traditional IPv4 class A, B and C + network types. It doesn't work with classless addresses and + shouldn't be used anymore. - `ENOTCONN' - The socket SOCKET is not connected. + - Function: char * inet_ntoa (struct in_addr ADDR) + This function converts the IPv4 Internet host address ADDR to a + string in the standard numbers-and-dots notation. The return + value is a pointer into a statically-allocated buffer. Subsequent + calls will overwrite the same buffer, so you should copy the + string if you need to save it. - `ENOBUFS' - There are not enough internal buffers available. + In multi-threaded programs each thread has an own + statically-allocated buffer. But still subsequent calls of + `inet_ntoa' in the same thread will overwrite the result of the + last call. - -File: libc.info, Node: Transferring Data, Next: Byte Stream Example, Prev: Who is Connected, Up: Connections + Instead of `inet_ntoa' the newer function `inet_ntop' which is + described below should be used since it handles both IPv4 and IPv6 + addresses. -Transferring Data ------------------ + - Function: struct in_addr inet_makeaddr (uint32_t NET, uint32_t LOCAL) + This function makes an IPv4 Internet host address by combining the + network number NET with the local-address-within-network number + LOCAL. - Once a socket has been connected to a peer, you can use the ordinary -`read' and `write' operations (*note I/O Primitives::) to transfer -data. A socket is a two-way communications channel, so read and write -operations can be performed at either end. + - Function: uint32_t inet_lnaof (struct in_addr ADDR) + This function returns the local-address-within-network part of the + Internet host address ADDR. - There are also some I/O modes that are specific to socket operations. -In order to specify these modes, you must use the `recv' and `send' -functions instead of the more generic `read' and `write' functions. -The `recv' and `send' functions take an additional argument which you -can use to specify various flags to control special I/O modes. For -example, you can specify the `MSG_OOB' flag to read or write -out-of-band data, the `MSG_PEEK' flag to peek at input, or the -`MSG_DONTROUTE' flag to control inclusion of routing information on -output. + The function works only with traditional IPv4 class A, B and C + network types. It doesn't work with classless addresses and + shouldn't be used anymore. -* Menu: + - Function: uint32_t inet_netof (struct in_addr ADDR) + This function returns the network number part of the Internet host + address ADDR. -* Sending Data:: Sending data with `send'. -* Receiving Data:: Reading data with `recv'. -* Socket Data Options:: Using `send' and `recv'. + The function works only with traditional IPv4 class A, B and C + network types. It doesn't work with classless addresses and + shouldn't be used anymore. + + - Function: int inet_pton (int AF, const char *CP, void *BUF) + This function converts an Internet address (either IPv4 or IPv6) + from presentation (textual) to network (binary) format. AF should + be either `AF_INET' or `AF_INET6', as appropriate for the type of + address being converted. CP is a pointer to the input string, and + BUF is a pointer to a buffer for the result. It is the caller's + responsibility to make sure the buffer is large enough. + + - Function: const char * inet_ntop (int AF, const void *CP, char *BUF, + size_t LEN) + This function converts an Internet address (either IPv4 or IPv6) + from network (binary) to presentation (textual) form. AF should be + either `AF_INET' or `AF_INET6', as appropriate. CP is a pointer + to the address to be converted. BUF should be a pointer to a + buffer to hold the result, and LEN is the length of this buffer. + The return value from the function will be this buffer address.  -File: libc.info, Node: Sending Data, Next: Receiving Data, Up: Transferring Data +File: libc.info, Node: Host Names, Prev: Host Address Functions, Up: Host Addresses -Sending Data -............ +Host Names +.......... - The `send' function is declared in the header file `sys/socket.h'. -If your FLAGS argument is zero, you can just as well use `write' -instead of `send'; see *Note I/O Primitives::. If the socket was -connected but the connection has broken, you get a `SIGPIPE' signal for -any use of `send' or `write' (*note Miscellaneous Signals::). + Besides the standard numbers-and-dots notation for Internet +addresses, you can also refer to a host by a symbolic name. The +advantage of a symbolic name is that it is usually easier to remember. +For example, the machine with Internet address `158.121.106.19' is also +known as `alpha.gnu.org'; and other machines in the `gnu.org' domain +can refer to it simply as `alpha'. - - Function: int send (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS) - The `send' function is like `write', but with the additional flags - FLAGS. The possible values of FLAGS are described in *Note Socket - Data Options::. + Internally, the system uses a database to keep track of the mapping +between host names and host numbers. This database is usually either +the file `/etc/hosts' or an equivalent provided by a name server. The +functions and other symbols for accessing this database are declared in +`netdb.h'. They are BSD features, defined unconditionally if you +include `netdb.h'. - This function returns the number of bytes transmitted, or `-1' on - failure. If the socket is nonblocking, then `send' (like `write') - can return after sending just part of the data. *Note File Status - Flags::, for information about nonblocking mode. + - Data Type: struct hostent + This data type is used to represent an entry in the hosts + database. It has the following members: - Note, however, that a successful return value merely indicates that - the message has been sent without error, not necessarily that it - has been received without error. + `char *h_name' + This is the "official" name of the host. - The following `errno' error conditions are defined for this - function: + `char **h_aliases' + These are alternative names for the host, represented as a + null-terminated vector of strings. - `EBADF' - The SOCKET argument is not a valid file descriptor. + `int h_addrtype' + This is the host address type; in practice, its value is + always either `AF_INET' or `AF_INET6', with the latter being + used for IPv6 hosts. In principle other kinds of addresses + could be represented in the database as well as Internet + addresses; if this were done, you might find a value in this + field other than `AF_INET' or `AF_INET6'. *Note Socket + Addresses::. - `EINTR' - The operation was interrupted by a signal before any data was - sent. *Note Interrupted Primitives::. + `int h_length' + This is the length, in bytes, of each address. - `ENOTSOCK' - The descriptor SOCKET is not a socket. + `char **h_addr_list' + This is the vector of addresses for the host. (Recall that + the host might be connected to multiple networks and have + different addresses on each one.) The vector is terminated + by a null pointer. - `EMSGSIZE' - The socket type requires that the message be sent atomically, - but the message is too large for this to be possible. + `char *h_addr' + This is a synonym for `h_addr_list[0]'; in other words, it is + the first host address. - `EWOULDBLOCK' - Nonblocking mode has been set on the socket, and the write - operation would block. (Normally `send' blocks until the - operation can be completed.) + As far as the host database is concerned, each address is just a +block of memory `h_length' bytes long. But in other contexts there is +an implicit assumption that you can convert IPv4 addresses to a `struct +in_addr' or an `uint32_t'. Host addresses in a `struct hostent' +structure are always given in network byte order; see *Note Byte +Order::. - `ENOBUFS' - There is not enough internal buffer space available. + You can use `gethostbyname', `gethostbyname2' or `gethostbyaddr' to +search the hosts database for information about a particular host. The +information is returned in a statically-allocated structure; you must +copy the information if you need to save it across calls. You can also +use `getaddrinfo' and `getnameinfo' to obtain this information. - `ENOTCONN' - You never connected this socket. + - Function: struct hostent * gethostbyname (const char *NAME) + The `gethostbyname' function returns information about the host + named NAME. If the lookup fails, it returns a null pointer. - `EPIPE' - This socket was connected but the connection is now broken. - In this case, `send' generates a `SIGPIPE' signal first; if - that signal is ignored or blocked, or if its handler returns, - then `send' fails with `EPIPE'. + - Function: struct hostent * gethostbyname2 (const char *NAME, int AF) + The `gethostbyname2' function is like `gethostbyname', but allows + the caller to specify the desired address family (e.g. `AF_INET' + or `AF_INET6') of the result. - This function is defined as a cancellation point in multi-threaded - programs, so one has to be prepared for this and make sure that - allocated resources (like memory, files descriptors, semaphores or - whatever) are freed even if the thread is canceled. + - Function: struct hostent * gethostbyaddr (const char *ADDR, size_t + LENGTH, int FORMAT) + The `gethostbyaddr' function returns information about the host + with Internet address ADDR. The parameter ADDR is not really a + pointer to char - it can be a pointer to an IPv4 or an IPv6 + address. The LENGTH argument is the size (in bytes) of the address + at ADDR. FORMAT specifies the address format; for an IPv4 + Internet address, specify a value of `AF_INET'; for an IPv6 + Internet address, use `AF_INET6'. - -File: libc.info, Node: Receiving Data, Next: Socket Data Options, Prev: Sending Data, Up: Transferring Data + If the lookup fails, `gethostbyaddr' returns a null pointer. -Receiving Data -.............. + If the name lookup by `gethostbyname' or `gethostbyaddr' fails, you +can find out the reason by looking at the value of the variable +`h_errno'. (It would be cleaner design for these functions to set +`errno', but use of `h_errno' is compatible with other systems.) - The `recv' function is declared in the header file `sys/socket.h'. -If your FLAGS argument is zero, you can just as well use `read' instead -of `recv'; see *Note I/O Primitives::. + Here are the error codes that you may find in `h_errno': - - Function: int recv (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS) - The `recv' function is like `read', but with the additional flags - FLAGS. The possible values of FLAGS are described in *Note Socket - Data Options::. +`HOST_NOT_FOUND' + No such host is known in the database. - If nonblocking mode is set for SOCKET, and no data are available to - be read, `recv' fails immediately rather than waiting. *Note File - Status Flags::, for information about nonblocking mode. +`TRY_AGAIN' + This condition happens when the name server could not be + contacted. If you try again later, you may succeed then. - This function returns the number of bytes received, or `-1' on - failure. The following `errno' error conditions are defined for - this function: +`NO_RECOVERY' + A non-recoverable error occurred. - `EBADF' - The SOCKET argument is not a valid file descriptor. +`NO_ADDRESS' + The host database contains an entry for the name, but it doesn't + have an associated Internet address. - `ENOTSOCK' - The descriptor SOCKET is not a socket. + The lookup functions above all have one in common: they are not +reentrant and therefore unusable in multi-threaded applications. +Therefore provides the GNU C library a new set of functions which can be +used in this context. - `EWOULDBLOCK' - Nonblocking mode has been set on the socket, and the read - operation would block. (Normally, `recv' blocks until there - is input available to be read.) + - Function: int gethostbyname_r (const char *restrict NAME, struct + hostent *restrict RESULT_BUF, char *restrict BUF, size_t + BUFLEN, struct hostent **restrict RESULT, int *restrict + H_ERRNOP) + The `gethostbyname_r' function returns information about the host + named NAME. The caller must pass a pointer to an object of type + `struct hostent' in the RESULT_BUF parameter. In addition the + function may need extra buffer space and the caller must pass an + pointer and the size of the buffer in the BUF and BUFLEN + parameters. - `EINTR' - The operation was interrupted by a signal before any data was - read. *Note Interrupted Primitives::. + A pointer to the buffer, in which the result is stored, is + available in `*RESULT' after the function call successfully + returned. If an error occurs or if no entry is found, the pointer + `*RESULT' is a null pointer. Success is signalled by a zero + return value. If the function failed the return value is an error + number. In addition to the errors defined for `gethostbyname' it + can also be `ERANGE'. In this case the call should be repeated + with a larger buffer. Additional error information is not stored + in the global variable `h_errno' but instead in the object pointed + to by H_ERRNOP. - `ENOTCONN' - You never connected this socket. + Here's a small example: + struct hostent * + gethostname (char *host) + { + struct hostent hostbuf, *hp; + size_t hstbuflen; + char *tmphstbuf; + int res; + int herr; + + hstbuflen = 1024; + /* Allocate buffer, remember to free it to avoid memory leakage. */ + tmphstbuf = malloc (hstbuflen); + + while ((res = gethostbyname_r (host, &hostbuf, tmphstbuf, hstbuflen, + &hp, &herr)) == ERANGE) + { + /* Enlarge the buffer. */ + hstbuflen *= 2; + tmphstbuf = realloc (tmphstbuf, hstbuflen); + } + /* Check for errors. */ + if (res || hp == NULL) + return NULL; + return hp; + } - This function is defined as a cancellation point in multi-threaded - programs, so one has to be prepared for this and make sure that - allocated resources (like memory, files descriptors, semaphores or - whatever) are freed even if the thread is canceled. + - Function: int gethostbyname2_r (const char *NAME, int AF, struct + hostent *restrict RESULT_BUF, char *restrict BUF, size_t + BUFLEN, struct hostent **restrict RESULT, int *restrict + H_ERRNOP) + The `gethostbyname2_r' function is like `gethostbyname_r', but + allows the caller to specify the desired address family (e.g. + `AF_INET' or `AF_INET6') for the result. - -File: libc.info, Node: Socket Data Options, Prev: Receiving Data, Up: Transferring Data + - Function: int gethostbyaddr_r (const char *ADDR, size_t LENGTH, int + FORMAT, struct hostent *restrict RESULT_BUF, char *restrict + BUF, size_t BUFLEN, struct hostent **restrict RESULT, int + *restrict H_ERRNOP) + The `gethostbyaddr_r' function returns information about the host + with Internet address ADDR. The parameter ADDR is not really a + pointer to char - it can be a pointer to an IPv4 or an IPv6 + address. The LENGTH argument is the size (in bytes) of the address + at ADDR. FORMAT specifies the address format; for an IPv4 + Internet address, specify a value of `AF_INET'; for an IPv6 + Internet address, use `AF_INET6'. -Socket Data Options -................... + Similar to the `gethostbyname_r' function, the caller must provide + buffers for the result and memory used internally. In case of + success the function returns zero. Otherwise the value is an + error number where `ERANGE' has the special meaning that the + caller-provided buffer is too small. - The FLAGS argument to `send' and `recv' is a bit mask. You can -bitwise-OR the values of the following macros together to obtain a -value for this argument. All are defined in the header file -`sys/socket.h'. + You can also scan the entire hosts database one entry at a time using +`sethostent', `gethostent' and `endhostent'. Be careful when using +these functions because they are not reentrant. - - Macro: int MSG_OOB - Send or receive out-of-band data. *Note Out-of-Band Data::. + - Function: void sethostent (int STAYOPEN) + This function opens the hosts database to begin scanning it. You + can then call `gethostent' to read the entries. - - Macro: int MSG_PEEK - Look at the data but don't remove it from the input queue. This is - only meaningful with input functions such as `recv', not with - `send'. + If the STAYOPEN argument is nonzero, this sets a flag so that + subsequent calls to `gethostbyname' or `gethostbyaddr' will not + close the database (as they usually would). This makes for more + efficiency if you call those functions several times, by avoiding + reopening the database for each call. - - Macro: int MSG_DONTROUTE - Don't include routing information in the message. This is only - meaningful with output operations, and is usually only of interest - for diagnostic or routing programs. We don't try to explain it - here. + - Function: struct hostent * gethostent (void) + This function returns the next entry in the hosts database. It + returns a null pointer if there are no more entries. - -File: libc.info, Node: Byte Stream Example, Next: Server Example, Prev: Transferring Data, Up: Connections + - Function: void endhostent (void) + This function closes the hosts database. -Byte Stream Socket Example --------------------------- + +File: libc.info, Node: Ports, Next: Services Database, Prev: Protocols Database, Up: Internet Namespace - Here is an example client program that makes a connection for a byte -stream socket in the Internet namespace. It doesn't do anything -particularly interesting once it has connected to the server; it just -sends a text string to the server and exits. +Internet Ports +-------------- - This program uses `init_sockaddr' to set up the socket address; see -*Note Inet Example::. + A socket address in the Internet namespace consists of a machine's +Internet address plus a "port number" which distinguishes the sockets +on a given machine (for a given protocol). Port numbers range from 0 +to 65,535. - #include - #include - #include - #include - #include - #include - #include - #include - - #define PORT 5555 - #define MESSAGE "Yow!!! Are we having fun yet?!?" - #define SERVERHOST "mescaline.gnu.org" - - void - write_to_server (int filedes) - { - int nbytes; - - nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1); - if (nbytes < 0) - { - perror ("write"); - exit (EXIT_FAILURE); - } - } - - - int - main (void) - { - extern void init_sockaddr (struct sockaddr_in *name, - const char *hostname, - uint16_t port); - int sock; - struct sockaddr_in servername; - - /* Create the socket. */ - sock = socket (PF_INET, SOCK_STREAM, 0); - if (sock < 0) - { - perror ("socket (client)"); - exit (EXIT_FAILURE); - } - - /* Connect to the server. */ - init_sockaddr (&servername, SERVERHOST, PORT); - if (0 > connect (sock, - (struct sockaddr *) &servername, - sizeof (servername))) - { - perror ("connect (client)"); - exit (EXIT_FAILURE); - } - - /* Send data to the server. */ - write_to_server (sock); - close (sock); - exit (EXIT_SUCCESS); - } + Port numbers less than `IPPORT_RESERVED' are reserved for standard +servers, such as `finger' and `telnet'. There is a database that keeps +track of these, and you can use the `getservbyname' function to map a +service name onto a port number; see *Note Services Database::. - -File: libc.info, Node: Server Example, Next: Out-of-Band Data, Prev: Byte Stream Example, Up: Connections + If you write a server that is not one of the standard ones defined in +the database, you must choose a port number for it. Use a number +greater than `IPPORT_USERRESERVED'; such numbers are reserved for +servers and won't ever be generated automatically by the system. +Avoiding conflicts with servers being run by other users is up to you. -Byte Stream Connection Server Example -------------------------------------- + When you use a socket without specifying its address, the system +generates a port number for it. This number is between +`IPPORT_RESERVED' and `IPPORT_USERRESERVED'. - The server end is much more complicated. Since we want to allow -multiple clients to be connected to the server at the same time, it -would be incorrect to wait for input from a single client by simply -calling `read' or `recv'. Instead, the right thing to do is to use -`select' (*note Waiting for I/O::) to wait for input on all of the open -sockets. This also allows the server to deal with additional -connection requests. + On the Internet, it is actually legitimate to have two different +sockets with the same port number, as long as they never both try to +communicate with the same socket address (host address plus port +number). You shouldn't duplicate a port number except in special +circumstances where a higher-level protocol requires it. Normally, the +system won't let you do it; `bind' normally insists on distinct port +numbers. To reuse a port number, you must set the socket option +`SO_REUSEADDR'. *Note Socket-Level Options::. - This particular server doesn't do anything interesting once it has -gotten a message from a client. It does close the socket for that -client when it detects an end-of-file condition (resulting from the -client shutting down its end of the connection). + These macros are defined in the header file `netinet/in.h'. - This program uses `make_socket' to set up the socket address; see -*Note Inet Example::. + - Macro: int IPPORT_RESERVED + Port numbers less than `IPPORT_RESERVED' are reserved for + superuser use. - #include - #include - #include - #include - #include - #include - #include - #include - - #define PORT 5555 - #define MAXMSG 512 - - int - read_from_client (int filedes) - { - char buffer[MAXMSG]; - int nbytes; - - nbytes = read (filedes, buffer, MAXMSG); - if (nbytes < 0) - { - /* Read error. */ - perror ("read"); - exit (EXIT_FAILURE); - } - else if (nbytes == 0) - /* End-of-file. */ - return -1; - else - { - /* Data read. */ - fprintf (stderr, "Server: got message: `%s'\n", buffer); - return 0; - } - } - - int - main (void) - { - extern int make_socket (uint16_t port); - int sock; - fd_set active_fd_set, read_fd_set; - int i; - struct sockaddr_in clientname; - size_t size; - - /* Create the socket and set it up to accept connections. */ - sock = make_socket (PORT); - if (listen (sock, 1) < 0) - { - perror ("listen"); - exit (EXIT_FAILURE); - } - - /* Initialize the set of active sockets. */ - FD_ZERO (&active_fd_set); - FD_SET (sock, &active_fd_set); - - while (1) - { - /* Block until input arrives on one or more active sockets. */ - read_fd_set = active_fd_set; - if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0) - { - perror ("select"); - exit (EXIT_FAILURE); - } - - /* Service all the sockets with input pending. */ - for (i = 0; i < FD_SETSIZE; ++i) - if (FD_ISSET (i, &read_fd_set)) - { - if (i == sock) - { - /* Connection request on original socket. */ - int new; - size = sizeof (clientname); - new = accept (sock, - (struct sockaddr *) &clientname, - &size); - if (new < 0) - { - perror ("accept"); - exit (EXIT_FAILURE); - } - fprintf (stderr, - "Server: connect from host %s, port %hd.\n", - inet_ntoa (clientname.sin_addr), - ntohs (clientname.sin_port)); - FD_SET (new, &active_fd_set); - } - else - { - /* Data arriving on an already-connected socket. */ - if (read_from_client (i) < 0) - { - close (i); - FD_CLR (i, &active_fd_set); - } - } - } - } - } + - Macro: int IPPORT_USERRESERVED + Port numbers greater than or equal to `IPPORT_USERRESERVED' are + reserved for explicit use; they will never be allocated + automatically.  -File: libc.info, Node: Out-of-Band Data, Prev: Server Example, Up: Connections +File: libc.info, Node: Services Database, Next: Byte Order, Prev: Ports, Up: Internet Namespace -Out-of-Band Data ----------------- +The Services Database +--------------------- - Streams with connections permit "out-of-band" data that is delivered -with higher priority than ordinary data. Typically the reason for -sending out-of-band data is to send notice of an exceptional condition. -To send out-of-band data use `send', specifying the flag `MSG_OOB' -(*note Sending Data::). + The database that keeps track of "well-known" services is usually +either the file `/etc/services' or an equivalent from a name server. +You can use these utilities, declared in `netdb.h', to access the +services database. - Out-of-band data are received with higher priority because the -receiving process need not read it in sequence; to read the next -available out-of-band data, use `recv' with the `MSG_OOB' flag (*note -Receiving Data::). Ordinary read operations do not read out-of-band -data; they read only ordinary data. + - Data Type: struct servent + This data type holds information about entries from the services + database. It has the following members: - When a socket finds that out-of-band data are on their way, it sends -a `SIGURG' signal to the owner process or process group of the socket. -You can specify the owner using the `F_SETOWN' command to the `fcntl' -function; see *Note Interrupt Input::. You must also establish a -handler for this signal, as described in *Note Signal Handling::, in -order to take appropriate action such as reading the out-of-band data. + `char *s_name' + This is the "official" name of the service. - Alternatively, you can test for pending out-of-band data, or wait -until there is out-of-band data, using the `select' function; it can -wait for an exceptional condition on the socket. *Note Waiting for -I/O::, for more information about `select'. + `char **s_aliases' + These are alternate names for the service, represented as an + array of strings. A null pointer terminates the array. - Notification of out-of-band data (whether with `SIGURG' or with -`select') indicates that out-of-band data are on the way; the data may -not actually arrive until later. If you try to read the out-of-band -data before it arrives, `recv' fails with an `EWOULDBLOCK' error. + `int s_port' + This is the port number for the service. Port numbers are + given in network byte order; see *Note Byte Order::. - Sending out-of-band data automatically places a "mark" in the stream -of ordinary data, showing where in the sequence the out-of-band data -"would have been". This is useful when the meaning of out-of-band data -is "cancel everything sent so far". Here is how you can test, in the -receiving process, whether any ordinary data was sent before the mark: + `char *s_proto' + This is the name of the protocol to use with this service. + *Note Protocols Database::. - success = ioctl (socket, SIOCATMARK, &atmark); + To get information about a particular service, use the +`getservbyname' or `getservbyport' functions. The information is +returned in a statically-allocated structure; you must copy the +information if you need to save it across calls. - The `integer' variable ATMARK is set to a nonzero value if the -socket's read pointer has reached the "mark". + - Function: struct servent * getservbyname (const char *NAME, const + char *PROTO) + The `getservbyname' function returns information about the service + named NAME using protocol PROTO. If it can't find such a service, + it returns a null pointer. - Here's a function to discard any ordinary data preceding the -out-of-band mark: + This function is useful for servers as well as for clients; servers + use it to determine which port they should listen on (*note + Listening::). - int - discard_until_mark (int socket) - { - while (1) - { - /* This is not an arbitrary limit; any size will do. */ - char buffer[1024]; - int atmark, success; - - /* If we have reached the mark, return. */ - success = ioctl (socket, SIOCATMARK, &atmark); - if (success < 0) - perror ("ioctl"); - if (result) - return; - - /* Otherwise, read a bunch of ordinary data and discard it. - This is guaranteed not to read past the mark - if it starts before the mark. */ - success = read (socket, buffer, sizeof buffer); - if (success < 0) - perror ("read"); - } - } + - Function: struct servent * getservbyport (int PORT, const char + *PROTO) + The `getservbyport' function returns information about the service + at port PORT using protocol PROTO. If it can't find such a + service, it returns a null pointer. - If you don't want to discard the ordinary data preceding the mark, -you may need to read some of it anyway, to make room in internal system -buffers for the out-of-band data. If you try to read out-of-band data -and get an `EWOULDBLOCK' error, try reading some ordinary data (saving -it so that you can use it when you want it) and see if that makes room. -Here is an example: +You can also scan the services database using `setservent', +`getservent' and `endservent'. Be careful when using these functions +because they are not reentrant. - struct buffer - { - char *buf; - int size; - struct buffer *next; - }; - - /* Read the out-of-band data from SOCKET and return it - as a `struct buffer', which records the address of the data - and its size. - - It may be necessary to read some ordinary data - in order to make room for the out-of-band data. - If so, the ordinary data are saved as a chain of buffers - found in the `next' field of the value. */ - - struct buffer * - read_oob (int socket) - { - struct buffer *tail = 0; - struct buffer *list = 0; - - while (1) - { - /* This is an arbitrary limit. - Does anyone know how to do this without a limit? */ - #define BUF_SZ 1024 - char *buf = (char *) xmalloc (BUF_SZ); - int success; - int atmark; - - /* Try again to read the out-of-band data. */ - success = recv (socket, buf, BUF_SZ, MSG_OOB); - if (success >= 0) - { - /* We got it, so return it. */ - struct buffer *link - = (struct buffer *) xmalloc (sizeof (struct buffer)); - link->buf = buf; - link->size = success; - link->next = list; - return link; - } - - /* If we fail, see if we are at the mark. */ - success = ioctl (socket, SIOCATMARK, &atmark); - if (success < 0) - perror ("ioctl"); - if (atmark) - { - /* At the mark; skipping past more ordinary data cannot help. - So just wait a while. */ - sleep (1); - continue; - } - - /* Otherwise, read a bunch of ordinary data and save it. - This is guaranteed not to read past the mark - if it starts before the mark. */ - success = read (socket, buf, BUF_SZ); - if (success < 0) - perror ("read"); - - /* Save this data in the buffer list. */ - { - struct buffer *link - = (struct buffer *) xmalloc (sizeof (struct buffer)); - link->buf = buf; - link->size = success; - - /* Add the new link to the end of the list. */ - if (tail) - tail->next = link; - else - list = link; - tail = link; - } - } - } + - Function: void setservent (int STAYOPEN) + This function opens the services database to begin scanning it. + + If the STAYOPEN argument is nonzero, this sets a flag so that + subsequent calls to `getservbyname' or `getservbyport' will not + close the database (as they usually would). This makes for more + efficiency if you call those functions several times, by avoiding + reopening the database for each call. + + - Function: struct servent * getservent (void) + This function returns the next entry in the services database. If + there are no more entries, it returns a null pointer. + + - Function: void endservent (void) + This function closes the services database.  -File: libc.info, Node: Datagrams, Next: Inetd, Prev: Connections, Up: Sockets +File: libc.info, Node: Byte Order, Next: Inet Example, Prev: Services Database, Up: Internet Namespace -Datagram Socket Operations -========================== +Byte Order Conversion +--------------------- - This section describes how to use communication styles that don't use -connections (styles `SOCK_DGRAM' and `SOCK_RDM'). Using these styles, -you group data into packets and each packet is an independent -communication. You specify the destination for each packet -individually. + Different kinds of computers use different conventions for the +ordering of bytes within a word. Some computers put the most +significant byte within a word first (this is called "big-endian" +order), and others put it last ("little-endian" order). - Datagram packets are like letters: you send each one independently -with its own destination address, and they may arrive in the wrong -order or not at all. + So that machines with different byte order conventions can +communicate, the Internet protocols specify a canonical byte order +convention for data transmitted over the network. This is known as +"network byte order". - The `listen' and `accept' functions are not allowed for sockets -using connectionless communication styles. + When establishing an Internet socket connection, you must make sure +that the data in the `sin_port' and `sin_addr' members of the +`sockaddr_in' structure are represented in network byte order. If you +are encoding integer data in the messages sent through the socket, you +should convert this to network byte order too. If you don't do this, +your program may fail when running on or talking to other kinds of +machines. -* Menu: + If you use `getservbyname' and `gethostbyname' or `inet_addr' to get +the port number and host address, the values are already in network +byte order, and you can copy them directly into the `sockaddr_in' +structure. -* Sending Datagrams:: Sending packets on a datagram socket. -* Receiving Datagrams:: Receiving packets on a datagram socket. -* Datagram Example:: An example program: packets sent over a - datagram socket in the local namespace. -* Example Receiver:: Another program, that receives those packets. + Otherwise, you have to convert the values explicitly. Use `htons' +and `ntohs' to convert values for the `sin_port' member. Use `htonl' +and `ntohl' to convert IPv4 addresses for the `sin_addr' member. +(Remember, `struct in_addr' is equivalent to `uint32_t'.) These +functions are declared in `netinet/in.h'. + + - Function: uint16_t htons (uint16_t HOSTSHORT) + This function converts the `uint16_t' integer HOSTSHORT from host + byte order to network byte order. + + - Function: uint16_t ntohs (uint16_t NETSHORT) + This function converts the `uint16_t' integer NETSHORT from + network byte order to host byte order. + + - Function: uint32_t htonl (uint32_t HOSTLONG) + This function converts the `uint32_t' integer HOSTLONG from host + byte order to network byte order. + + This is used for IPv4 Internet addresses. + + - Function: uint32_t ntohl (uint32_t NETLONG) + This function converts the `uint32_t' integer NETLONG from network + byte order to host byte order. + + This is used for IPv4 Internet addresses.  -File: libc.info, Node: Sending Datagrams, Next: Receiving Datagrams, Up: Datagrams +File: libc.info, Node: Protocols Database, Next: Ports, Prev: Host Addresses, Up: Internet Namespace -Sending Datagrams ------------------ +Protocols Database +------------------ - The normal way of sending data on a datagram socket is by using the -`sendto' function, declared in `sys/socket.h'. + The communications protocol used with a socket controls low-level +details of how data are exchanged. For example, the protocol implements +things like checksums to detect errors in transmissions, and routing +instructions for messages. Normal user programs have little reason to +mess with these details directly. - You can call `connect' on a datagram socket, but this only specifies -a default destination for further data transmission on the socket. -When a socket has a default destination you can use `send' (*note -Sending Data::) or even `write' (*note I/O Primitives::) to send a -packet there. You can cancel the default destination by calling -`connect' using an address format of `AF_UNSPEC' in the ADDR argument. -*Note Connecting::, for more information about the `connect' function. + The default communications protocol for the Internet namespace +depends on the communication style. For stream communication, the +default is TCP ("transmission control protocol"). For datagram +communication, the default is UDP ("user datagram protocol"). For +reliable datagram communication, the default is RDP ("reliable datagram +protocol"). You should nearly always use the default. - - Function: int sendto (int SOCKET, void *BUFFER. size_t SIZE, int - FLAGS, struct sockaddr *ADDR, socklen_t LENGTH) - The `sendto' function transmits the data in the BUFFER through the - socket SOCKET to the destination address specified by the ADDR and - LENGTH arguments. The SIZE argument specifies the number of bytes - to be transmitted. + Internet protocols are generally specified by a name instead of a +number. The network protocols that a host knows about are stored in a +database. This is usually either derived from the file +`/etc/protocols', or it may be an equivalent provided by a name server. +You look up the protocol number associated with a named protocol in +the database using the `getprotobyname' function. - The FLAGS are interpreted the same way as for `send'; see *Note - Socket Data Options::. + Here are detailed descriptions of the utilities for accessing the +protocols database. These are declared in `netdb.h'. - The return value and error conditions are also the same as for - `send', but you cannot rely on the system to detect errors and - report them; the most common error is that the packet is lost or - there is no-one at the specified address to receive it, and the - operating system on your machine usually does not know this. + - Data Type: struct protoent + This data type is used to represent entries in the network + protocols database. It has the following members: - It is also possible for one call to `sendto' to report an error - owing to a problem related to a previous call. + `char *p_name' + This is the official name of the protocol. - This function is defined as a cancellation point in multi-threaded - programs, so one has to be prepared for this and make sure that - allocated resources (like memory, files descriptors, semaphores or - whatever) are freed even if the thread is canceled. + `char **p_aliases' + These are alternate names for the protocol, specified as an + array of strings. The last element of the array is a null + pointer. - -File: libc.info, Node: Receiving Datagrams, Next: Datagram Example, Prev: Sending Datagrams, Up: Datagrams + `int p_proto' + This is the protocol number (in host byte order); use this + member as the PROTOCOL argument to `socket'. -Receiving Datagrams -------------------- + You can use `getprotobyname' and `getprotobynumber' to search the +protocols database for a specific protocol. The information is +returned in a statically-allocated structure; you must copy the +information if you need to save it across calls. - The `recvfrom' function reads a packet from a datagram socket and -also tells you where it was sent from. This function is declared in -`sys/socket.h'. + - Function: struct protoent * getprotobyname (const char *NAME) + The `getprotobyname' function returns information about the + network protocol named NAME. If there is no such protocol, it + returns a null pointer. - - Function: int recvfrom (int SOCKET, void *BUFFER, size_t SIZE, int - FLAGS, struct sockaddr *ADDR, socklen_t *LENGTH-PTR) - The `recvfrom' function reads one packet from the socket SOCKET - into the buffer BUFFER. The SIZE argument specifies the maximum - number of bytes to be read. + - Function: struct protoent * getprotobynumber (int PROTOCOL) + The `getprotobynumber' function returns information about the + network protocol with number PROTOCOL. If there is no such + protocol, it returns a null pointer. - If the packet is longer than SIZE bytes, then you get the first - SIZE bytes of the packet and the rest of the packet is lost. - There's no way to read the rest of the packet. Thus, when you use - a packet protocol, you must always know how long a packet to - expect. + You can also scan the whole protocols database one protocol at a +time by using `setprotoent', `getprotoent' and `endprotoent'. Be +careful when using these functions because they are not reentrant. - The ADDR and LENGTH-PTR arguments are used to return the address - where the packet came from. *Note Socket Addresses::. For a - socket in the local domain the address information won't be - meaningful, since you can't read the address of such a socket - (*note Local Namespace::). You can specify a null pointer as the - ADDR argument if you are not interested in this information. + - Function: void setprotoent (int STAYOPEN) + This function opens the protocols database to begin scanning it. - The FLAGS are interpreted the same way as for `recv' (*note Socket - Data Options::). The return value and error conditions are also - the same as for `recv'. + If the STAYOPEN argument is nonzero, this sets a flag so that + subsequent calls to `getprotobyname' or `getprotobynumber' will + not close the database (as they usually would). This makes for + more efficiency if you call those functions several times, by + avoiding reopening the database for each call. - This function is defined as a cancellation point in multi-threaded - programs, so one has to be prepared for this and make sure that - allocated resources (like memory, files descriptors, semaphores or - whatever) are freed even if the thread is canceled. + - Function: struct protoent * getprotoent (void) + This function returns the next entry in the protocols database. It + returns a null pointer if there are no more entries. - You can use plain `recv' (*note Receiving Data::) instead of -`recvfrom' if you don't need to find out who sent the packet (either -because you know where it should come from or because you treat all -possible senders alike). Even `read' can be used if you don't want to -specify FLAGS (*note I/O Primitives::). + - Function: void endprotoent (void) + This function closes the protocols database.  -File: libc.info, Node: Datagram Example, Next: Example Receiver, Prev: Receiving Datagrams, Up: Datagrams +File: libc.info, Node: Inet Example, Prev: Byte Order, Up: Internet Namespace -Datagram Socket Example +Internet Socket Example ----------------------- - Here is a set of example programs that send messages over a datagram -stream in the local namespace. Both the client and server programs use -the `make_named_socket' function that was presented in *Note Local -Socket Example::, to create and name their sockets. - - First, here is the server program. It sits in a loop waiting for -messages to arrive, bouncing each message back to the sender. -Obviously this isn't a particularly useful program, but it does show -the general ideas involved. + Here is an example showing how to create and name a socket in the +Internet namespace. The newly created socket exists on the machine that +the program is running on. Rather than finding and using the machine's +Internet address, this example specifies `INADDR_ANY' as the host +address; the system replaces that with the machine's actual address. #include - #include #include #include - #include - - #define SERVER "/tmp/serversocket" - #define MAXMSG 512 + #include int - main (void) + make_socket (uint16_t port) { int sock; - char message[MAXMSG]; - struct sockaddr_un name; - size_t size; - int nbytes; - - /* Remove the filename first, it's ok if the call fails */ - unlink (SERVER); + struct sockaddr_in name; - /* Make the socket, then loop endlessly. */ - sock = make_named_socket (SERVER); - while (1) + /* Create the socket. */ + sock = socket (PF_INET, SOCK_STREAM, 0); + if (sock < 0) { - /* Wait for a datagram. */ - size = sizeof (name); - nbytes = recvfrom (sock, message, MAXMSG, 0, - (struct sockaddr *) & name, &size); - if (nbytes < 0) - { - perror ("recfrom (server)"); - exit (EXIT_FAILURE); - } - - /* Give a diagnostic message. */ - fprintf (stderr, "Server: got message: %s\n", message); + perror ("socket"); + exit (EXIT_FAILURE); + } - /* Bounce the message back to the sender. */ - nbytes = sendto (sock, message, nbytes, 0, - (struct sockaddr *) & name, size); - if (nbytes < 0) - { - perror ("sendto (server)"); - exit (EXIT_FAILURE); - } + /* Give the socket a name. */ + name.sin_family = AF_INET; + name.sin_port = htons (port); + name.sin_addr.s_addr = htonl (INADDR_ANY); + if (bind (sock, (struct sockaddr *) &name, sizeof (name)) < 0) + { + perror ("bind"); + exit (EXIT_FAILURE); } + + return sock; } - -File: libc.info, Node: Example Receiver, Prev: Datagram Example, Up: Datagrams - -Example of Reading Datagrams ----------------------------- - - Here is the client program corresponding to the server above. - - It sends a datagram to the server and then waits for a reply. Notice -that the socket for the client (as well as for the server) in this -example has to be given a name. This is so that the server can direct -a message back to the client. Since the socket has no associated -connection state, the only way the server can do this is by referencing -the name of the client. + Here is another example, showing how you can fill in a `sockaddr_in' +structure, given a host name string and a port number: #include - #include - #include #include #include - #include - - #define SERVER "/tmp/serversocket" - #define CLIENT "/tmp/mysocket" - #define MAXMSG 512 - #define MESSAGE "Yow!!! Are we having fun yet?!?" + #include + #include - int - main (void) + void + init_sockaddr (struct sockaddr_in *name, + const char *hostname, + uint16_t port) { - extern int make_named_socket (const char *name); - int sock; - char message[MAXMSG]; - struct sockaddr_un name; - size_t size; - int nbytes; - - /* Make the socket. */ - sock = make_named_socket (CLIENT); - - /* Initialize the server socket address. */ - name.sun_family = AF_LOCAL; - strcpy (name.sun_path, SERVER); - size = strlen (name.sun_path) + sizeof (name.sun_family); - - /* Send the datagram. */ - nbytes = sendto (sock, MESSAGE, strlen (MESSAGE) + 1, 0, - (struct sockaddr *) & name, size); - if (nbytes < 0) - { - perror ("sendto (client)"); - exit (EXIT_FAILURE); - } + struct hostent *hostinfo; - /* Wait for a reply. */ - nbytes = recvfrom (sock, message, MAXMSG, 0, NULL, 0); - if (nbytes < 0) + name->sin_family = AF_INET; + name->sin_port = htons (port); + hostinfo = gethostbyname (hostname); + if (hostinfo == NULL) { - perror ("recfrom (client)"); + fprintf (stderr, "Unknown host %s.\n", hostname); exit (EXIT_FAILURE); } - - /* Print a diagnostic message. */ - fprintf (stderr, "Client: got message: %s\n", message); - - /* Clean up. */ - remove (CLIENT); - close (sock); + name->sin_addr = *(struct in_addr *) hostinfo->h_addr; } - Keep in mind that datagram socket communications are unreliable. In -this example, the client program waits indefinitely if the message -never reaches the server or if the server's response never comes back. -It's up to the user running the program to kill and restart it if -desired. A more automatic solution could be to use `select' (*note -Waiting for I/O::) to establish a timeout period for the reply, and in -case of timeout either re-send the message or shut down the socket and -exit. -  -File: libc.info, Node: Inetd, Next: Socket Options, Prev: Datagrams, Up: Sockets - -The `inetd' Daemon -================== - - We've explained above how to write a server program that does its own -listening. Such a server must already be running in order for anyone -to connect to it. - - Another way to provide a service on an Internet port is to let the -daemon program `inetd' do the listening. `inetd' is a program that -runs all the time and waits (using `select') for messages on a -specified set of ports. When it receives a message, it accepts the -connection (if the socket style calls for connections) and then forks a -child process to run the corresponding server program. You specify the -ports and their programs in the file `/etc/inetd.conf'. - -* Menu: - -* Inetd Servers:: -* Configuring Inetd:: - - -File: libc.info, Node: Inetd Servers, Next: Configuring Inetd, Up: Inetd - -`inetd' Servers ---------------- - - Writing a server program to be run by `inetd' is very simple. Each -time someone requests a connection to the appropriate port, a new server -process starts. The connection already exists at this time; the socket -is available as the standard input descriptor and as the standard -output descriptor (descriptors 0 and 1) in the server process. Thus -the server program can begin reading and writing data right away. -Often the program needs only the ordinary I/O facilities; in fact, a -general-purpose filter program that knows nothing about sockets can -work as a byte stream server run by `inetd'. - - You can also use `inetd' for servers that use connectionless -communication styles. For these servers, `inetd' does not try to accept -a connection since no connection is possible. It just starts the -server program, which can read the incoming datagram packet from -descriptor 0. The server program can handle one request and then exit, -or you can choose to write it to keep reading more requests until no -more arrive, and then exit. You must specify which of these two -techniques the server uses when you configure `inetd'. - - -File: libc.info, Node: Configuring Inetd, Prev: Inetd Servers, Up: Inetd - -Configuring `inetd' -------------------- - - The file `/etc/inetd.conf' tells `inetd' which ports to listen to -and what server programs to run for them. Normally each entry in the -file is one line, but you can split it onto multiple lines provided all -but the first line of the entry start with whitespace. Lines that -start with `#' are comments. - - Here are two standard entries in `/etc/inetd.conf': - - ftp stream tcp nowait root /libexec/ftpd ftpd - talk dgram udp wait root /libexec/talkd talkd - - An entry has this format: - - SERVICE STYLE PROTOCOL WAIT USERNAME PROGRAM ARGUMENTS - - The SERVICE field says which service this program provides. It -should be the name of a service defined in `/etc/services'. `inetd' -uses SERVICE to decide which port to listen on for this entry. - - The fields STYLE and PROTOCOL specify the communication style and -the protocol to use for the listening socket. The style should be the -name of a communication style, converted to lower case and with `SOCK_' -deleted--for example, `stream' or `dgram'. PROTOCOL should be one of -the protocols listed in `/etc/protocols'. The typical protocol names -are `tcp' for byte stream connections and `udp' for unreliable -datagrams. - - The WAIT field should be either `wait' or `nowait'. Use `wait' if -STYLE is a connectionless style and the server, once started, handles -multiple requests as they come in. Use `nowait' if `inetd' should -start a new process for each message or request that comes in. If -STYLE uses connections, then WAIT *must* be `nowait'. +File: libc.info, Node: Misc Namespaces, Next: Open/Close Sockets, Prev: Internet Namespace, Up: Sockets - USER is the user name that the server should run as. `inetd' runs -as root, so it can set the user ID of its children arbitrarily. It's -best to avoid using `root' for USER if you can; but some servers, such -as Telnet and FTP, read a username and password themselves. These -servers need to be root initially so they can log in as commanded by -the data coming over the network. +Other Namespaces +================ - PROGRAM together with ARGUMENTS specifies the command to run to -start the server. PROGRAM should be an absolute file name specifying -the executable file to run. ARGUMENTS consists of any number of -whitespace-separated words, which become the command-line arguments of -PROGRAM. The first word in ARGUMENTS is argument zero, which should by -convention be the program name itself (sans directories). + Certain other namespaces and associated protocol families are +supported but not documented yet because they are not often used. +`PF_NS' refers to the Xerox Network Software protocols. `PF_ISO' stands +for Open Systems Interconnect. `PF_CCITT' refers to protocols from +CCITT. `socket.h' defines these symbols and others naming protocols +not actually implemented. - If you edit `/etc/inetd.conf', you can tell `inetd' to reread the -file and obey its new contents by sending the `inetd' process the -`SIGHUP' signal. You'll have to use `ps' to determine the process ID -of the `inetd' process as it is not fixed. + `PF_IMPLINK' is used for communicating between hosts and Internet +Message Processors. For information on this and `PF_ROUTE', an +occasionally-used local area routing protocol, see the GNU Hurd Manual +(to appear in the future).  -File: libc.info, Node: Socket Options, Next: Networks Database, Prev: Inetd, Up: Sockets - -Socket Options -============== +File: libc.info, Node: Open/Close Sockets, Next: Connections, Prev: Misc Namespaces, Up: Sockets - This section describes how to read or set various options that modify -the behavior of sockets and their underlying communications protocols. +Opening and Closing Sockets +=========================== - When you are manipulating a socket option, you must specify which -"level" the option pertains to. This describes whether the option -applies to the socket interface, or to a lower-level communications -protocol interface. + This section describes the actual library functions for opening and +closing sockets. The same functions work for all namespaces and +connection styles. * Menu: -* Socket Option Functions:: The basic functions for setting and getting - socket options. -* Socket-Level Options:: Details of the options at the socket level. +* Creating a Socket:: How to open a socket. +* Closing a Socket:: How to close a socket. +* Socket Pairs:: These are created like pipes. diff -durpN glibc-2.2.4/manual/libc.info-28 glibc-2.2.5/manual/libc.info-28 --- glibc-2.2.4/manual/libc.info-28 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-28 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1142 +33,1304 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Socket Option Functions, Next: Socket-Level Options, Up: Socket Options - -Socket Option Functions ------------------------ +File: libc.info, Node: Creating a Socket, Next: Closing a Socket, Up: Open/Close Sockets - Here are the functions for examining and modifying socket options. -They are declared in `sys/socket.h'. +Creating a Socket +----------------- - - Function: int getsockopt (int SOCKET, int LEVEL, int OPTNAME, void - *OPTVAL, socklen_t *OPTLEN-PTR) - The `getsockopt' function gets information about the value of - option OPTNAME at level LEVEL for socket SOCKET. + The primitive for creating a socket is the `socket' function, +declared in `sys/socket.h'. - The option value is stored in a buffer that OPTVAL points to. - Before the call, you should supply in `*OPTLEN-PTR' the size of - this buffer; on return, it contains the number of bytes of - information actually stored in the buffer. + - Function: int socket (int NAMESPACE, int STYLE, int PROTOCOL) + This function creates a socket and specifies communication style + STYLE, which should be one of the socket styles listed in *Note + Communication Styles::. The NAMESPACE argument specifies the + namespace; it must be `PF_LOCAL' (*note Local Namespace::) or + `PF_INET' (*note Internet Namespace::). PROTOCOL designates the + specific protocol (*note Socket Concepts::); zero is usually right + for PROTOCOL. - Most options interpret the OPTVAL buffer as a single `int' value. + The return value from `socket' is the file descriptor for the new + socket, or `-1' in case of error. The following `errno' error + conditions are defined for this function: - The actual return value of `getsockopt' is `0' on success and `-1' - on failure. The following `errno' error conditions are defined: + `EPROTONOSUPPORT' + The PROTOCOL or STYLE is not supported by the NAMESPACE + specified. - `EBADF' - The SOCKET argument is not a valid file descriptor. + `EMFILE' + The process already has too many file descriptors open. - `ENOTSOCK' - The descriptor SOCKET is not a socket. + `ENFILE' + The system already has too many file descriptors open. - `ENOPROTOOPT' - The OPTNAME doesn't make sense for the given LEVEL. + `EACCES' + The process does not have the privilege to create a socket of + the specified STYLE or PROTOCOL. - - Function: int setsockopt (int SOCKET, int LEVEL, int OPTNAME, void - *OPTVAL, socklen_t OPTLEN) - This function is used to set the socket option OPTNAME at level - LEVEL for socket SOCKET. The value of the option is passed in the - buffer OPTVAL of size OPTLEN. + `ENOBUFS' + The system ran out of internal buffer space. - The return value and error codes for `setsockopt' are the same as - for `getsockopt'. + The file descriptor returned by the `socket' function supports both + read and write operations. However, like pipes, sockets do not + support file positioning operations. + For examples of how to call the `socket' function, see *Note Local +Socket Example::, or *Note Inet Example::.  -File: libc.info, Node: Socket-Level Options, Prev: Socket Option Functions, Up: Socket Options - -Socket-Level Options --------------------- - - - Constant: int SOL_SOCKET - Use this constant as the LEVEL argument to `getsockopt' or - `setsockopt' to manipulate the socket-level options described in - this section. - -Here is a table of socket-level option names; all are defined in the -header file `sys/socket.h'. - -`SO_DEBUG' - This option toggles recording of debugging information in the - underlying protocol modules. The value has type `int'; a nonzero - value means "yes". - -`SO_REUSEADDR' - This option controls whether `bind' (*note Setting Address::) - should permit reuse of local addresses for this socket. If you - enable this option, you can actually have two sockets with the - same Internet port number; but the system won't allow you to use - the two identically-named sockets in a way that would confuse the - Internet. The reason for this option is that some higher-level - Internet protocols, including FTP, require you to keep reusing the - same port number. - - The value has type `int'; a nonzero value means "yes". - -`SO_KEEPALIVE' - This option controls whether the underlying protocol should - periodically transmit messages on a connected socket. If the peer - fails to respond to these messages, the connection is considered - broken. The value has type `int'; a nonzero value means "yes". +File: libc.info, Node: Closing a Socket, Next: Socket Pairs, Prev: Creating a Socket, Up: Open/Close Sockets -`SO_DONTROUTE' - This option controls whether outgoing messages bypass the normal - message routing facilities. If set, messages are sent directly to - the network interface instead. The value has type `int'; a nonzero - value means "yes". +Closing a Socket +---------------- -`SO_LINGER' - This option specifies what should happen when the socket of a type - that promises reliable delivery still has untransmitted messages - when it is closed; see *Note Closing a Socket::. The value has - type `struct linger'. + When you have finished using a socket, you can simply close its file +descriptor with `close'; see *Note Opening and Closing Files::. If +there is still data waiting to be transmitted over the connection, +normally `close' tries to complete this transmission. You can control +this behavior using the `SO_LINGER' socket option to specify a timeout +period; see *Note Socket Options::. - - Data Type: struct linger - This structure type has the following members: + You can also shut down only reception or transmission on a +connection by calling `shutdown', which is declared in `sys/socket.h'. - `int l_onoff' - This field is interpreted as a boolean. If nonzero, - `close' blocks until the data are transmitted or the - timeout period has expired. + - Function: int shutdown (int SOCKET, int HOW) + The `shutdown' function shuts down the connection of socket + SOCKET. The argument HOW specifies what action to perform: - `int l_linger' - This specifies the timeout period, in seconds. + `0' + Stop receiving data for this socket. If further data arrives, + reject it. -`SO_BROADCAST' - This option controls whether datagrams may be broadcast from the - socket. The value has type `int'; a nonzero value means "yes". + `1' + Stop trying to transmit data from this socket. Discard any + data waiting to be sent. Stop looking for acknowledgement of + data already sent; don't retransmit it if it is lost. -`SO_OOBINLINE' - If this option is set, out-of-band data received on the socket is - placed in the normal input queue. This permits it to be read using - `read' or `recv' without specifying the `MSG_OOB' flag. *Note - Out-of-Band Data::. The value has type `int'; a nonzero value - means "yes". + `2' + Stop both reception and transmission. -`SO_SNDBUF' - This option gets or sets the size of the output buffer. The value - is a `size_t', which is the size in bytes. + The return value is `0' on success and `-1' on failure. The + following `errno' error conditions are defined for this function: -`SO_RCVBUF' - This option gets or sets the size of the input buffer. The value - is a `size_t', which is the size in bytes. + `EBADF' + SOCKET is not a valid file descriptor. -`SO_STYLE' -`SO_TYPE' - This option can be used with `getsockopt' only. It is used to get - the socket's communication style. `SO_TYPE' is the historical - name, and `SO_STYLE' is the preferred name in GNU. The value has - type `int' and its value designates a communication style; see - *Note Communication Styles::. + `ENOTSOCK' + SOCKET is not a socket. -`SO_ERROR' - This option can be used with `getsockopt' only. It is used to - reset the error status of the socket. The value is an `int', - which represents the previous error status. + `ENOTCONN' + SOCKET is not connected.  -File: libc.info, Node: Networks Database, Prev: Socket Options, Up: Sockets - -Networks Database -================= - - Many systems come with a database that records a list of networks -known to the system developer. This is usually kept either in the file -`/etc/networks' or in an equivalent from a name server. This data base -is useful for routing programs such as `route', but it is not useful -for programs that simply communicate over the network. We provide -functions to access this database, which are declared in `netdb.h'. - - - Data Type: struct netent - This data type is used to represent information about entries in - the networks database. It has the following members: - - `char *n_name' - This is the "official" name of the network. - - `char **n_aliases' - These are alternative names for the network, represented as a - vector of strings. A null pointer terminates the array. - - `int n_addrtype' - This is the type of the network number; this is always equal - to `AF_INET' for Internet networks. +File: libc.info, Node: Socket Pairs, Prev: Closing a Socket, Up: Open/Close Sockets - `unsigned long int n_net' - This is the network number. Network numbers are returned in - host byte order; see *Note Byte Order::. +Socket Pairs +------------ - Use the `getnetbyname' or `getnetbyaddr' functions to search the -networks database for information about a specific network. The -information is returned in a statically-allocated structure; you must -copy the information if you need to save it. + A "socket pair" consists of a pair of connected (but unnamed) +sockets. It is very similar to a pipe and is used in much the same +way. Socket pairs are created with the `socketpair' function, declared +in `sys/socket.h'. A socket pair is much like a pipe; the main +difference is that the socket pair is bidirectional, whereas the pipe +has one input-only end and one output-only end (*note Pipes and +FIFOs::). - - Function: struct netent * getnetbyname (const char *NAME) - The `getnetbyname' function returns information about the network - named NAME. It returns a null pointer if there is no such network. + - Function: int socketpair (int NAMESPACE, int STYLE, int PROTOCOL, + int FILEDES[2]) + This function creates a socket pair, returning the file + descriptors in `FILEDES[0]' and `FILEDES[1]'. The socket pair is + a full-duplex communications channel, so that both reading and + writing may be performed at either end. - - Function: struct netent * getnetbyaddr (unsigned long int NET, int - TYPE) - The `getnetbyaddr' function returns information about the network - of type TYPE with number NET. You should specify a value of - `AF_INET' for the TYPE argument for Internet networks. + The NAMESPACE, STYLE and PROTOCOL arguments are interpreted as for + the `socket' function. STYLE should be one of the communication + styles listed in *Note Communication Styles::. The NAMESPACE + argument specifies the namespace, which must be `AF_LOCAL' (*note + Local Namespace::); PROTOCOL specifies the communications + protocol, but zero is the only meaningful value. - `getnetbyaddr' returns a null pointer if there is no such network. + If STYLE specifies a connectionless communication style, then the + two sockets you get are not _connected_, strictly speaking, but + each of them knows the other as the default destination address, + so they can send packets to each other. - You can also scan the networks database using `setnetent', -`getnetent' and `endnetent'. Be careful when using these functions -because they are not reentrant. + The `socketpair' function returns `0' on success and `-1' on + failure. The following `errno' error conditions are defined for + this function: - - Function: void setnetent (int STAYOPEN) - This function opens and rewinds the networks database. + `EMFILE' + The process has too many file descriptors open. - If the STAYOPEN argument is nonzero, this sets a flag so that - subsequent calls to `getnetbyname' or `getnetbyaddr' will not - close the database (as they usually would). This makes for more - efficiency if you call those functions several times, by avoiding - reopening the database for each call. + `EAFNOSUPPORT' + The specified namespace is not supported. - - Function: struct netent * getnetent (void) - This function returns the next entry in the networks database. It - returns a null pointer if there are no more entries. + `EPROTONOSUPPORT' + The specified protocol is not supported. - - Function: void endnetent (void) - This function closes the networks database. + `EOPNOTSUPP' + The specified protocol does not support the creation of + socket pairs.  -File: libc.info, Node: Low-Level Terminal Interface, Next: Syslog, Prev: Sockets, Up: Top - -Low-Level Terminal Interface -**************************** +File: libc.info, Node: Connections, Next: Datagrams, Prev: Open/Close Sockets, Up: Sockets - This chapter describes functions that are specific to terminal -devices. You can use these functions to do things like turn off input -echoing; set serial line characteristics such as line speed and flow -control; and change which characters are used for end-of-file, -command-line editing, sending signals, and similar control functions. +Using Sockets with Connections +============================== - Most of the functions in this chapter operate on file descriptors. -*Note Low-Level I/O::, for more information about what a file -descriptor is and how to open a file descriptor for a terminal device. + The most common communication styles involve making a connection to a +particular other socket, and then exchanging data with that socket over +and over. Making a connection is asymmetric; one side (the "client") +acts to request a connection, while the other side (the "server") makes +a socket and waits for the connection request. * Menu: -* Is It a Terminal:: How to determine if a file is a terminal - device, and what its name is. -* I/O Queues:: About flow control and typeahead. -* Canonical or Not:: Two basic styles of input processing. -* Terminal Modes:: How to examine and modify flags controlling - details of terminal I/O: echoing, - signals, editing. Posix. -* BSD Terminal Modes:: BSD compatible terminal mode setting -* Line Control:: Sending break sequences, clearing - terminal buffers ... -* Noncanon Example:: How to read single characters without echo. -* Pseudo-Terminals:: How to open a pseudo-terminal. +* Connecting:: What the client program must do. +* Listening:: How a server program waits for requests. +* Accepting Connections:: What the server does when it gets a request. +* Who is Connected:: Getting the address of the + other side of a connection. +* Transferring Data:: How to send and receive data. +* Byte Stream Example:: An example program: a client for communicating + over a byte stream socket in the Internet namespace. +* Server Example:: A corresponding server program. +* Out-of-Band Data:: This is an advanced feature.  -File: libc.info, Node: Is It a Terminal, Next: I/O Queues, Up: Low-Level Terminal Interface - -Identifying Terminals -===================== +File: libc.info, Node: Connecting, Next: Listening, Up: Connections - The functions described in this chapter only work on files that -correspond to terminal devices. You can find out whether a file -descriptor is associated with a terminal by using the `isatty' function. +Making a Connection +------------------- - Prototypes for the functions in this section are declared in the -header file `unistd.h'. + In making a connection, the client makes a connection while the +server waits for and accepts the connection. Here we discuss what the +client program must do with the `connect' function, which is declared in +`sys/socket.h'. - - Function: int isatty (int FILEDES) - This function returns `1' if FILEDES is a file descriptor - associated with an open terminal device, and 0 otherwise. + - Function: int connect (int SOCKET, struct sockaddr *ADDR, socklen_t + LENGTH) + The `connect' function initiates a connection from the socket with + file descriptor SOCKET to the socket whose address is specified by + the ADDR and LENGTH arguments. (This socket is typically on + another machine, and it must be already set up as a server.) + *Note Socket Addresses::, for information about how these + arguments are interpreted. - If a file descriptor is associated with a terminal, you can get its -associated file name using the `ttyname' function. See also the -`ctermid' function, described in *Note Identifying the Terminal::. + Normally, `connect' waits until the server responds to the request + before it returns. You can set nonblocking mode on the socket + SOCKET to make `connect' return immediately without waiting for + the response. *Note File Status Flags::, for information about + nonblocking mode. - - Function: char * ttyname (int FILEDES) - If the file descriptor FILEDES is associated with a terminal - device, the `ttyname' function returns a pointer to a - statically-allocated, null-terminated string containing the file - name of the terminal file. The value is a null pointer if the - file descriptor isn't associated with a terminal, or the file name - cannot be determined. + The normal return value from `connect' is `0'. If an error + occurs, `connect' returns `-1'. The following `errno' error + conditions are defined for this function: - - Function: int ttyname_r (int FILEDES, char *BUF, size_t LEN) - The `ttyname_r' function is similar to the `ttyname' function - except that it places its result into the user-specified buffer - starting at BUF with length LEN. + `EBADF' + The socket SOCKET is not a valid file descriptor. - The normal return value from `ttyname_r' is 0. Otherwise an error - number is returned to indicate the error. The following `errno' - error conditions are defined for this function: + `ENOTSOCK' + File descriptor SOCKET is not a socket. - `EBADF' - The FILEDES argument is not a valid file descriptor. + `EADDRNOTAVAIL' + The specified address is not available on the remote machine. - `ENOTTY' - The FILEDES is not associated with a terminal. + `EAFNOSUPPORT' + The namespace of the ADDR is not supported by this socket. - `ERANGE' - The buffer length LEN is too small to store the string to be - returned. + `EISCONN' + The socket SOCKET is already connected. - -File: libc.info, Node: I/O Queues, Next: Canonical or Not, Prev: Is It a Terminal, Up: Low-Level Terminal Interface + `ETIMEDOUT' + The attempt to establish the connection timed out. -I/O Queues -========== + `ECONNREFUSED' + The server has actively refused to establish the connection. - Many of the remaining functions in this section refer to the input -and output queues of a terminal device. These queues implement a form -of buffering _within the kernel_ independent of the buffering -implemented by I/O streams (*note I/O on Streams::). + `ENETUNREACH' + The network of the given ADDR isn't reachable from this host. - The "terminal input queue" is also sometimes referred to as its -"typeahead buffer". It holds the characters that have been received -from the terminal but not yet read by any process. + `EADDRINUSE' + The socket address of the given ADDR is already in use. - The size of the input queue is described by the `MAX_INPUT' and -`_POSIX_MAX_INPUT' parameters; see *Note Limits for Files::. You are -guaranteed a queue size of at least `MAX_INPUT', but the queue might be -larger, and might even dynamically change size. If input flow control -is enabled by setting the `IXOFF' input mode bit (*note Input Modes::), -the terminal driver transmits STOP and START characters to the terminal -when necessary to prevent the queue from overflowing. Otherwise, input -may be lost if it comes in too fast from the terminal. In canonical -mode, all input stays in the queue until a newline character is -received, so the terminal input queue can fill up when you type a very -long line. *Note Canonical or Not::. + `EINPROGRESS' + The socket SOCKET is non-blocking and the connection could + not be established immediately. You can determine when the + connection is completely established with `select'; *note + Waiting for I/O::. Another `connect' call on the same + socket, before the connection is completely established, will + fail with `EALREADY'. - The "terminal output queue" is like the input queue, but for output; -it contains characters that have been written by processes, but not yet -transmitted to the terminal. If output flow control is enabled by -setting the `IXON' input mode bit (*note Input Modes::), the terminal -driver obeys START and STOP characters sent by the terminal to stop and -restart transmission of output. + `EALREADY' + The socket SOCKET is non-blocking and already has a pending + connection in progress (see `EINPROGRESS' above). - "Clearing" the terminal input queue means discarding any characters -that have been received but not yet read. Similarly, clearing the -terminal output queue means discarding any characters that have been -written but not yet transmitted. + This function is defined as a cancellation point in multi-threaded + programs, so one has to be prepared for this and make sure that + allocated resources (like memory, files descriptors, semaphores or + whatever) are freed even if the thread is canceled.  -File: libc.info, Node: Canonical or Not, Next: Terminal Modes, Prev: I/O Queues, Up: Low-Level Terminal Interface +File: libc.info, Node: Listening, Next: Accepting Connections, Prev: Connecting, Up: Connections -Two Styles of Input: Canonical or Not -===================================== +Listening for Connections +------------------------- - POSIX systems support two basic modes of input: canonical and -noncanonical. + Now let us consider what the server process must do to accept +connections on a socket. First it must use the `listen' function to +enable connection requests on the socket, and then accept each incoming +connection with a call to `accept' (*note Accepting Connections::). +Once connection requests are enabled on a server socket, the `select' +function reports when the socket has a connection ready to be accepted +(*note Waiting for I/O::). - In "canonical input processing" mode, terminal input is processed in -lines terminated by newline (`'\n''), EOF, or EOL characters. No input -can be read until an entire line has been typed by the user, and the -`read' function (*note I/O Primitives::) returns at most a single line -of input, no matter how many bytes are requested. + The `listen' function is not allowed for sockets using +connectionless communication styles. - In canonical input mode, the operating system provides input editing -facilities: some characters are interpreted specially to perform editing -operations within the current line of text, such as ERASE and KILL. -*Note Editing Characters::. + You can write a network server that does not even start running +until a connection to it is requested. *Note Inetd Servers::. - The constants `_POSIX_MAX_CANON' and `MAX_CANON' parameterize the -maximum number of bytes which may appear in a single line of canonical -input. *Note Limits for Files::. You are guaranteed a maximum line -length of at least `MAX_CANON' bytes, but the maximum might be larger, -and might even dynamically change size. + In the Internet namespace, there are no special protection mechanisms +for controlling access to a port; any process on any machine can make a +connection to your server. If you want to restrict access to your +server, make it examine the addresses associated with connection +requests or implement some other handshaking or identification protocol. - In "noncanonical input processing" mode, characters are not grouped -into lines, and ERASE and KILL processing is not performed. The -granularity with which bytes are read in noncanonical input mode is -controlled by the MIN and TIME settings. *Note Noncanonical Input::. + In the local namespace, the ordinary file protection bits control +who has access to connect to the socket. - Most programs use canonical input mode, because this gives the user a -way to edit input line by line. The usual reason to use noncanonical -mode is when the program accepts single-character commands or provides -its own editing facilities. + - Function: int listen (int SOCKET, unsigned int N) + The `listen' function enables the socket SOCKET to accept + connections, thus making it a server socket. - The choice of canonical or noncanonical input is controlled by the -`ICANON' flag in the `c_lflag' member of `struct termios'. *Note Local -Modes::. + The argument N specifies the length of the queue for pending + connections. When the queue fills, new clients attempting to + connect fail with `ECONNREFUSED' until the server calls `accept' to + accept a connection from the queue. - -File: libc.info, Node: Terminal Modes, Next: BSD Terminal Modes, Prev: Canonical or Not, Up: Low-Level Terminal Interface + The `listen' function returns `0' on success and `-1' on failure. + The following `errno' error conditions are defined for this + function: -Terminal Modes -============== + `EBADF' + The argument SOCKET is not a valid file descriptor. - This section describes the various terminal attributes that control -how input and output are done. The functions, data structures, and -symbolic constants are all declared in the header file `termios.h'. + `ENOTSOCK' + The argument SOCKET is not a socket. - Don't confuse terminal attributes with file attributes. A device -special file which is associated with a terminal has file attributes as -described in *Note File Attributes::. These are unrelated to the -attributes of the terminal device itself, which are discussed in this -section. + `EOPNOTSUPP' + The socket SOCKET does not support this operation. -* Menu: + +File: libc.info, Node: Accepting Connections, Next: Who is Connected, Prev: Listening, Up: Connections -* Mode Data Types:: The data type `struct termios' and - related types. -* Mode Functions:: Functions to read and set the terminal - attributes. -* Setting Modes:: The right way to set terminal attributes - reliably. -* Input Modes:: Flags controlling low-level input handling. -* Output Modes:: Flags controlling low-level output handling. -* Control Modes:: Flags controlling serial port behavior. -* Local Modes:: Flags controlling high-level input handling. -* Line Speed:: How to read and set the terminal line speed. -* Special Characters:: Characters that have special effects, - and how to change them. -* Noncanonical Input:: Controlling how long to wait for input. +Accepting Connections +--------------------- - -File: libc.info, Node: Mode Data Types, Next: Mode Functions, Up: Terminal Modes + When a server receives a connection request, it can complete the +connection by accepting the request. Use the function `accept' to do +this. -Terminal Mode Data Types ------------------------- + A socket that has been established as a server can accept connection +requests from multiple clients. The server's original socket _does not +become part of the connection_; instead, `accept' makes a new socket +which participates in the connection. `accept' returns the descriptor +for this socket. The server's original socket remains available for +listening for further connection requests. - The entire collection of attributes of a terminal is stored in a -structure of type `struct termios'. This structure is used with the -functions `tcgetattr' and `tcsetattr' to read and set the attributes. + The number of pending connection requests on a server socket is +finite. If connection requests arrive from clients faster than the +server can act upon them, the queue can fill up and additional requests +are refused with an `ECONNREFUSED' error. You can specify the maximum +length of this queue as an argument to the `listen' function, although +the system may also impose its own internal limit on the length of this +queue. - - Data Type: struct termios - Structure that records all the I/O attributes of a terminal. The - structure includes at least the following members: + - Function: int accept (int SOCKET, struct sockaddr *ADDR, socklen_t + *LENGTH_PTR) + This function is used to accept a connection request on the server + socket SOCKET. - `tcflag_t c_iflag' - A bit mask specifying flags for input modes; see *Note Input - Modes::. + The `accept' function waits if there are no connections pending, + unless the socket SOCKET has nonblocking mode set. (You can use + `select' to wait for a pending connection, with a nonblocking + socket.) *Note File Status Flags::, for information about + nonblocking mode. - `tcflag_t c_oflag' - A bit mask specifying flags for output modes; see *Note - Output Modes::. + The ADDR and LENGTH-PTR arguments are used to return information + about the name of the client socket that initiated the connection. + *Note Socket Addresses::, for information about the format of the + information. - `tcflag_t c_cflag' - A bit mask specifying flags for control modes; see *Note - Control Modes::. + Accepting a connection does not make SOCKET part of the + connection. Instead, it creates a new socket which becomes + connected. The normal return value of `accept' is the file + descriptor for the new socket. - `tcflag_t c_lflag' - A bit mask specifying flags for local modes; see *Note Local - Modes::. + After `accept', the original socket SOCKET remains open and + unconnected, and continues listening until you close it. You can + accept further connections with SOCKET by calling `accept' again. - `cc_t c_cc[NCCS]' - An array specifying which characters are associated with - various control functions; see *Note Special Characters::. + If an error occurs, `accept' returns `-1'. The following `errno' + error conditions are defined for this function: - The `struct termios' structure also contains members which encode - input and output transmission speeds, but the representation is - not specified. *Note Line Speed::, for how to examine and store - the speed values. + `EBADF' + The SOCKET argument is not a valid file descriptor. - The following sections describe the details of the members of the -`struct termios' structure. + `ENOTSOCK' + The descriptor SOCKET argument is not a socket. - - Data Type: tcflag_t - This is an unsigned integer type used to represent the various bit - masks for terminal flags. + `EOPNOTSUPP' + The descriptor SOCKET does not support this operation. - - Data Type: cc_t - This is an unsigned integer type used to represent characters - associated with various terminal control functions. + `EWOULDBLOCK' + SOCKET has nonblocking mode set, and there are no pending + connections immediately available. - - Macro: int NCCS - The value of this macro is the number of elements in the `c_cc' - array. + This function is defined as a cancellation point in multi-threaded + programs, so one has to be prepared for this and make sure that + allocated resources (like memory, files descriptors, semaphores or + whatever) are freed even if the thread is canceled. + + The `accept' function is not allowed for sockets using +connectionless communication styles.  -File: libc.info, Node: Mode Functions, Next: Setting Modes, Prev: Mode Data Types, Up: Terminal Modes +File: libc.info, Node: Who is Connected, Next: Transferring Data, Prev: Accepting Connections, Up: Connections -Terminal Mode Functions +Who is Connected to Me? ----------------------- - - Function: int tcgetattr (int FILEDES, struct termios *TERMIOS-P) - This function is used to examine the attributes of the terminal - device with file descriptor FILEDES. The attributes are returned - in the structure that TERMIOS-P points to. + - Function: int getpeername (int SOCKET, struct sockaddr *ADDR, + socklen_t *LENGTH-PTR) + The `getpeername' function returns the address of the socket that + SOCKET is connected to; it stores the address in the memory space + specified by ADDR and LENGTH-PTR. It stores the length of the + address in `*LENGTH-PTR'. - If successful, `tcgetattr' returns 0. A return value of -1 - indicates an error. The following `errno' error conditions are - defined for this function: + *Note Socket Addresses::, for information about the format of the + address. In some operating systems, `getpeername' works only for + sockets in the Internet domain. + + The return value is `0' on success and `-1' on error. The + following `errno' error conditions are defined for this function: `EBADF' - The FILEDES argument is not a valid file descriptor. + The argument SOCKET is not a valid file descriptor. - `ENOTTY' - The FILEDES is not associated with a terminal. + `ENOTSOCK' + The descriptor SOCKET is not a socket. - - Function: int tcsetattr (int FILEDES, int WHEN, const struct termios - *TERMIOS-P) - This function sets the attributes of the terminal device with file - descriptor FILEDES. The new attributes are taken from the - structure that TERMIOS-P points to. + `ENOTCONN' + The socket SOCKET is not connected. - The WHEN argument specifies how to deal with input and output - already queued. It can be one of the following values: + `ENOBUFS' + There are not enough internal buffers available. - `TCSANOW' - Make the change immediately. + +File: libc.info, Node: Transferring Data, Next: Byte Stream Example, Prev: Who is Connected, Up: Connections - `TCSADRAIN' - Make the change after waiting until all queued output has - been written. You should usually use this option when - changing parameters that affect output. +Transferring Data +----------------- - `TCSAFLUSH' - This is like `TCSADRAIN', but also discards any queued input. + Once a socket has been connected to a peer, you can use the ordinary +`read' and `write' operations (*note I/O Primitives::) to transfer +data. A socket is a two-way communications channel, so read and write +operations can be performed at either end. - `TCSASOFT' - This is a flag bit that you can add to any of the above - alternatives. Its meaning is to inhibit alteration of the - state of the terminal hardware. It is a BSD extension; it is - only supported on BSD systems and the GNU system. + There are also some I/O modes that are specific to socket operations. +In order to specify these modes, you must use the `recv' and `send' +functions instead of the more generic `read' and `write' functions. +The `recv' and `send' functions take an additional argument which you +can use to specify various flags to control special I/O modes. For +example, you can specify the `MSG_OOB' flag to read or write +out-of-band data, the `MSG_PEEK' flag to peek at input, or the +`MSG_DONTROUTE' flag to control inclusion of routing information on +output. - Using `TCSASOFT' is exactly the same as setting the `CIGNORE' - bit in the `c_cflag' member of the structure TERMIOS-P points - to. *Note Control Modes::, for a description of `CIGNORE'. +* Menu: - If this function is called from a background process on its - controlling terminal, normally all processes in the process group - are sent a `SIGTTOU' signal, in the same way as if the process - were trying to write to the terminal. The exception is if the - calling process itself is ignoring or blocking `SIGTTOU' signals, - in which case the operation is performed and no signal is sent. - *Note Job Control::. +* Sending Data:: Sending data with `send'. +* Receiving Data:: Reading data with `recv'. +* Socket Data Options:: Using `send' and `recv'. - If successful, `tcsetattr' returns 0. A return value of -1 - indicates an error. The following `errno' error conditions are - defined for this function: + +File: libc.info, Node: Sending Data, Next: Receiving Data, Up: Transferring Data - `EBADF' - The FILEDES argument is not a valid file descriptor. +Sending Data +............ - `ENOTTY' - The FILEDES is not associated with a terminal. + The `send' function is declared in the header file `sys/socket.h'. +If your FLAGS argument is zero, you can just as well use `write' +instead of `send'; see *Note I/O Primitives::. If the socket was +connected but the connection has broken, you get a `SIGPIPE' signal for +any use of `send' or `write' (*note Miscellaneous Signals::). - `EINVAL' - Either the value of the `when' argument is not valid, or - there is something wrong with the data in the TERMIOS-P - argument. + - Function: int send (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS) + The `send' function is like `write', but with the additional flags + FLAGS. The possible values of FLAGS are described in *Note Socket + Data Options::. - Although `tcgetattr' and `tcsetattr' specify the terminal device -with a file descriptor, the attributes are those of the terminal device -itself and not of the file descriptor. This means that the effects of -changing terminal attributes are persistent; if another process opens -the terminal file later on, it will see the changed attributes even -though it doesn't have anything to do with the open file descriptor you -originally specified in changing the attributes. + This function returns the number of bytes transmitted, or `-1' on + failure. If the socket is nonblocking, then `send' (like `write') + can return after sending just part of the data. *Note File Status + Flags::, for information about nonblocking mode. - Similarly, if a single process has multiple or duplicated file -descriptors for the same terminal device, changing the terminal -attributes affects input and output to all of these file descriptors. -This means, for example, that you can't open one file descriptor or -stream to read from a terminal in the normal line-buffered, echoed -mode; and simultaneously have another file descriptor for the same -terminal that you use to read from it in single-character, non-echoed -mode. Instead, you have to explicitly switch the terminal back and -forth between the two modes. + Note, however, that a successful return value merely indicates that + the message has been sent without error, not necessarily that it + has been received without error. - -File: libc.info, Node: Setting Modes, Next: Input Modes, Prev: Mode Functions, Up: Terminal Modes + The following `errno' error conditions are defined for this + function: -Setting Terminal Modes Properly -------------------------------- + `EBADF' + The SOCKET argument is not a valid file descriptor. - When you set terminal modes, you should call `tcgetattr' first to -get the current modes of the particular terminal device, modify only -those modes that you are really interested in, and store the result with -`tcsetattr'. + `EINTR' + The operation was interrupted by a signal before any data was + sent. *Note Interrupted Primitives::. - It's a bad idea to simply initialize a `struct termios' structure to -a chosen set of attributes and pass it directly to `tcsetattr'. Your -program may be run years from now, on systems that support members not -documented in this manual. The way to avoid setting these members to -unreasonable values is to avoid changing them. + `ENOTSOCK' + The descriptor SOCKET is not a socket. - What's more, different terminal devices may require different mode -settings in order to function properly. So you should avoid blindly -copying attributes from one terminal device to another. + `EMSGSIZE' + The socket type requires that the message be sent atomically, + but the message is too large for this to be possible. - When a member contains a collection of independent flags, as the -`c_iflag', `c_oflag' and `c_cflag' members do, even setting the entire -member is a bad idea, because particular operating systems have their -own flags. Instead, you should start with the current value of the -member and alter only the flags whose values matter in your program, -leaving any other flags unchanged. + `EWOULDBLOCK' + Nonblocking mode has been set on the socket, and the write + operation would block. (Normally `send' blocks until the + operation can be completed.) - Here is an example of how to set one flag (`ISTRIP') in the `struct -termios' structure while properly preserving all the other data in the -structure: + `ENOBUFS' + There is not enough internal buffer space available. - int - set_istrip (int desc, int value) - { - struct termios settings; - int result; - - result = tcgetattr (desc, &settings); - if (result < 0) - { - perror ("error in tcgetattr"); - return 0; - } - settings.c_iflag &= ~ISTRIP; - if (value) - settings.c_iflag |= ISTRIP; - result = tcsetattr (desc, TCSANOW, &settings); - if (result < 0) - { - perror ("error in tcgetattr"); - return; - } - return 1; - } + `ENOTCONN' + You never connected this socket. - -File: libc.info, Node: Input Modes, Next: Output Modes, Prev: Setting Modes, Up: Terminal Modes + `EPIPE' + This socket was connected but the connection is now broken. + In this case, `send' generates a `SIGPIPE' signal first; if + that signal is ignored or blocked, or if its handler returns, + then `send' fails with `EPIPE'. -Input Modes ------------ + This function is defined as a cancellation point in multi-threaded + programs, so one has to be prepared for this and make sure that + allocated resources (like memory, files descriptors, semaphores or + whatever) are freed even if the thread is canceled. - This section describes the terminal attribute flags that control -fairly low-level aspects of input processing: handling of parity errors, -break signals, flow control, and and characters. + +File: libc.info, Node: Receiving Data, Next: Socket Data Options, Prev: Sending Data, Up: Transferring Data - All of these flags are bits in the `c_iflag' member of the `struct -termios' structure. The member is an integer, and you change flags -using the operators `&', `|' and `^'. Don't try to specify the entire -value for `c_iflag'--instead, change only specific flags and leave the -rest untouched (*note Setting Modes::). +Receiving Data +.............. - - Macro: tcflag_t INPCK - If this bit is set, input parity checking is enabled. If it is - not set, no checking at all is done for parity errors on input; the - characters are simply passed through to the application. + The `recv' function is declared in the header file `sys/socket.h'. +If your FLAGS argument is zero, you can just as well use `read' instead +of `recv'; see *Note I/O Primitives::. - Parity checking on input processing is independent of whether - parity detection and generation on the underlying terminal - hardware is enabled; see *Note Control Modes::. For example, you - could clear the `INPCK' input mode flag and set the `PARENB' - control mode flag to ignore parity errors on input, but still - generate parity on output. + - Function: int recv (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS) + The `recv' function is like `read', but with the additional flags + FLAGS. The possible values of FLAGS are described in *Note Socket + Data Options::. - If this bit is set, what happens when a parity error is detected - depends on whether the `IGNPAR' or `PARMRK' bits are set. If - neither of these bits are set, a byte with a parity error is - passed to the application as a `'\0'' character. + If nonblocking mode is set for SOCKET, and no data are available to + be read, `recv' fails immediately rather than waiting. *Note File + Status Flags::, for information about nonblocking mode. - - Macro: tcflag_t IGNPAR - If this bit is set, any byte with a framing or parity error is - ignored. This is only useful if `INPCK' is also set. + This function returns the number of bytes received, or `-1' on + failure. The following `errno' error conditions are defined for + this function: - - Macro: tcflag_t PARMRK - If this bit is set, input bytes with parity or framing errors are - marked when passed to the program. This bit is meaningful only - when `INPCK' is set and `IGNPAR' is not set. + `EBADF' + The SOCKET argument is not a valid file descriptor. - The way erroneous bytes are marked is with two preceding bytes, - `377' and `0'. Thus, the program actually reads three bytes for - one erroneous byte received from the terminal. + `ENOTSOCK' + The descriptor SOCKET is not a socket. - If a valid byte has the value `0377', and `ISTRIP' (see below) is - not set, the program might confuse it with the prefix that marks a - parity error. So a valid byte `0377' is passed to the program as - two bytes, `0377' `0377', in this case. + `EWOULDBLOCK' + Nonblocking mode has been set on the socket, and the read + operation would block. (Normally, `recv' blocks until there + is input available to be read.) - - Macro: tcflag_t ISTRIP - If this bit is set, valid input bytes are stripped to seven bits; - otherwise, all eight bits are available for programs to read. + `EINTR' + The operation was interrupted by a signal before any data was + read. *Note Interrupted Primitives::. - - Macro: tcflag_t IGNBRK - If this bit is set, break conditions are ignored. + `ENOTCONN' + You never connected this socket. - A "break condition" is defined in the context of asynchronous - serial data transmission as a series of zero-value bits longer - than a single byte. + This function is defined as a cancellation point in multi-threaded + programs, so one has to be prepared for this and make sure that + allocated resources (like memory, files descriptors, semaphores or + whatever) are freed even if the thread is canceled. - - Macro: tcflag_t BRKINT - If this bit is set and `IGNBRK' is not set, a break condition - clears the terminal input and output queues and raises a `SIGINT' - signal for the foreground process group associated with the - terminal. + +File: libc.info, Node: Socket Data Options, Prev: Receiving Data, Up: Transferring Data - If neither `BRKINT' nor `IGNBRK' are set, a break condition is - passed to the application as a single `'\0'' character if `PARMRK' - is not set, or otherwise as a three-character sequence `'\377'', - `'\0'', `'\0''. +Socket Data Options +................... - - Macro: tcflag_t IGNCR - If this bit is set, carriage return characters (`'\r'') are - discarded on input. Discarding carriage return may be useful on - terminals that send both carriage return and linefeed when you - type the key. + The FLAGS argument to `send' and `recv' is a bit mask. You can +bitwise-OR the values of the following macros together to obtain a +value for this argument. All are defined in the header file +`sys/socket.h'. - - Macro: tcflag_t ICRNL - If this bit is set and `IGNCR' is not set, carriage return - characters (`'\r'') received as input are passed to the - application as newline characters (`'\n''). + - Macro: int MSG_OOB + Send or receive out-of-band data. *Note Out-of-Band Data::. - - Macro: tcflag_t INLCR - If this bit is set, newline characters (`'\n'') received as input - are passed to the application as carriage return characters - (`'\r''). + - Macro: int MSG_PEEK + Look at the data but don't remove it from the input queue. This is + only meaningful with input functions such as `recv', not with + `send'. - - Macro: tcflag_t IXOFF - If this bit is set, start/stop control on input is enabled. In - other words, the computer sends STOP and START characters as - necessary to prevent input from coming in faster than programs are - reading it. The idea is that the actual terminal hardware that is - generating the input data responds to a STOP character by - suspending transmission, and to a START character by resuming - transmission. *Note Start/Stop Characters::. + - Macro: int MSG_DONTROUTE + Don't include routing information in the message. This is only + meaningful with output operations, and is usually only of interest + for diagnostic or routing programs. We don't try to explain it + here. - - Macro: tcflag_t IXON - If this bit is set, start/stop control on output is enabled. In - other words, if the computer receives a STOP character, it - suspends output until a START character is received. In this - case, the STOP and START characters are never passed to the - application program. If this bit is not set, then START and STOP - can be read as ordinary characters. *Note Start/Stop Characters::. + +File: libc.info, Node: Byte Stream Example, Next: Server Example, Prev: Transferring Data, Up: Connections - - Macro: tcflag_t IXANY - If this bit is set, any input character restarts output when - output has been suspended with the STOP character. Otherwise, - only the START character restarts output. +Byte Stream Socket Example +-------------------------- - This is a BSD extension; it exists only on BSD systems and the GNU - system. + Here is an example client program that makes a connection for a byte +stream socket in the Internet namespace. It doesn't do anything +particularly interesting once it has connected to the server; it just +sends a text string to the server and exits. - - Macro: tcflag_t IMAXBEL - If this bit is set, then filling up the terminal input buffer - sends a BEL character (code `007') to the terminal to ring the - bell. + This program uses `init_sockaddr' to set up the socket address; see +*Note Inet Example::. - This is a BSD extension. + #include + #include + #include + #include + #include + #include + #include + #include + + #define PORT 5555 + #define MESSAGE "Yow!!! Are we having fun yet?!?" + #define SERVERHOST "mescaline.gnu.org" + + void + write_to_server (int filedes) + { + int nbytes; + + nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1); + if (nbytes < 0) + { + perror ("write"); + exit (EXIT_FAILURE); + } + } + + + int + main (void) + { + extern void init_sockaddr (struct sockaddr_in *name, + const char *hostname, + uint16_t port); + int sock; + struct sockaddr_in servername; + + /* Create the socket. */ + sock = socket (PF_INET, SOCK_STREAM, 0); + if (sock < 0) + { + perror ("socket (client)"); + exit (EXIT_FAILURE); + } + + /* Connect to the server. */ + init_sockaddr (&servername, SERVERHOST, PORT); + if (0 > connect (sock, + (struct sockaddr *) &servername, + sizeof (servername))) + { + perror ("connect (client)"); + exit (EXIT_FAILURE); + } + + /* Send data to the server. */ + write_to_server (sock); + close (sock); + exit (EXIT_SUCCESS); + }  -File: libc.info, Node: Output Modes, Next: Control Modes, Prev: Input Modes, Up: Terminal Modes - -Output Modes ------------- - - This section describes the terminal flags and fields that control how -output characters are translated and padded for display. All of these -are contained in the `c_oflag' member of the `struct termios' structure. - - The `c_oflag' member itself is an integer, and you change the flags -and fields using the operators `&', `|', and `^'. Don't try to specify -the entire value for `c_oflag'--instead, change only specific flags and -leave the rest untouched (*note Setting Modes::). - - - Macro: tcflag_t OPOST - If this bit is set, output data is processed in some unspecified - way so that it is displayed appropriately on the terminal device. - This typically includes mapping newline characters (`'\n'') onto - carriage return and linefeed pairs. +File: libc.info, Node: Server Example, Next: Out-of-Band Data, Prev: Byte Stream Example, Up: Connections - If this bit isn't set, the characters are transmitted as-is. +Byte Stream Connection Server Example +------------------------------------- - The following three bits are BSD features, and they exist only BSD -systems and the GNU system. They are effective only if `OPOST' is set. + The server end is much more complicated. Since we want to allow +multiple clients to be connected to the server at the same time, it +would be incorrect to wait for input from a single client by simply +calling `read' or `recv'. Instead, the right thing to do is to use +`select' (*note Waiting for I/O::) to wait for input on all of the open +sockets. This also allows the server to deal with additional +connection requests. - - Macro: tcflag_t ONLCR - If this bit is set, convert the newline character on output into a - pair of characters, carriage return followed by linefeed. + This particular server doesn't do anything interesting once it has +gotten a message from a client. It does close the socket for that +client when it detects an end-of-file condition (resulting from the +client shutting down its end of the connection). - - Macro: tcflag_t OXTABS - If this bit is set, convert tab characters on output into the - appropriate number of spaces to emulate a tab stop every eight - columns. + This program uses `make_socket' to set up the socket address; see +*Note Inet Example::. - - Macro: tcflag_t ONOEOT - If this bit is set, discard `C-d' characters (code `004') on - output. These characters cause many dial-up terminals to - disconnect. + #include + #include + #include + #include + #include + #include + #include + #include + + #define PORT 5555 + #define MAXMSG 512 + + int + read_from_client (int filedes) + { + char buffer[MAXMSG]; + int nbytes; + + nbytes = read (filedes, buffer, MAXMSG); + if (nbytes < 0) + { + /* Read error. */ + perror ("read"); + exit (EXIT_FAILURE); + } + else if (nbytes == 0) + /* End-of-file. */ + return -1; + else + { + /* Data read. */ + fprintf (stderr, "Server: got message: `%s'\n", buffer); + return 0; + } + } + + int + main (void) + { + extern int make_socket (uint16_t port); + int sock; + fd_set active_fd_set, read_fd_set; + int i; + struct sockaddr_in clientname; + size_t size; + + /* Create the socket and set it up to accept connections. */ + sock = make_socket (PORT); + if (listen (sock, 1) < 0) + { + perror ("listen"); + exit (EXIT_FAILURE); + } + + /* Initialize the set of active sockets. */ + FD_ZERO (&active_fd_set); + FD_SET (sock, &active_fd_set); + + while (1) + { + /* Block until input arrives on one or more active sockets. */ + read_fd_set = active_fd_set; + if (select (FD_SETSIZE, &read_fd_set, NULL, NULL, NULL) < 0) + { + perror ("select"); + exit (EXIT_FAILURE); + } + + /* Service all the sockets with input pending. */ + for (i = 0; i < FD_SETSIZE; ++i) + if (FD_ISSET (i, &read_fd_set)) + { + if (i == sock) + { + /* Connection request on original socket. */ + int new; + size = sizeof (clientname); + new = accept (sock, + (struct sockaddr *) &clientname, + &size); + if (new < 0) + { + perror ("accept"); + exit (EXIT_FAILURE); + } + fprintf (stderr, + "Server: connect from host %s, port %hd.\n", + inet_ntoa (clientname.sin_addr), + ntohs (clientname.sin_port)); + FD_SET (new, &active_fd_set); + } + else + { + /* Data arriving on an already-connected socket. */ + if (read_from_client (i) < 0) + { + close (i); + FD_CLR (i, &active_fd_set); + } + } + } + } + }  -File: libc.info, Node: Control Modes, Next: Local Modes, Prev: Output Modes, Up: Terminal Modes - -Control Modes -------------- +File: libc.info, Node: Out-of-Band Data, Prev: Server Example, Up: Connections - This section describes the terminal flags and fields that control -parameters usually associated with asynchronous serial data -transmission. These flags may not make sense for other kinds of -terminal ports (such as a network connection pseudo-terminal). All of -these are contained in the `c_cflag' member of the `struct termios' -structure. +Out-of-Band Data +---------------- - The `c_cflag' member itself is an integer, and you change the flags -and fields using the operators `&', `|', and `^'. Don't try to specify -the entire value for `c_cflag'--instead, change only specific flags and -leave the rest untouched (*note Setting Modes::). + Streams with connections permit "out-of-band" data that is delivered +with higher priority than ordinary data. Typically the reason for +sending out-of-band data is to send notice of an exceptional condition. +To send out-of-band data use `send', specifying the flag `MSG_OOB' +(*note Sending Data::). - - Macro: tcflag_t CLOCAL - If this bit is set, it indicates that the terminal is connected - "locally" and that the modem status lines (such as carrier detect) - should be ignored. + Out-of-band data are received with higher priority because the +receiving process need not read it in sequence; to read the next +available out-of-band data, use `recv' with the `MSG_OOB' flag (*note +Receiving Data::). Ordinary read operations do not read out-of-band +data; they read only ordinary data. - On many systems if this bit is not set and you call `open' without - the `O_NONBLOCK' flag set, `open' blocks until a modem connection - is established. + When a socket finds that out-of-band data are on their way, it sends +a `SIGURG' signal to the owner process or process group of the socket. +You can specify the owner using the `F_SETOWN' command to the `fcntl' +function; see *Note Interrupt Input::. You must also establish a +handler for this signal, as described in *Note Signal Handling::, in +order to take appropriate action such as reading the out-of-band data. - If this bit is not set and a modem disconnect is detected, a - `SIGHUP' signal is sent to the controlling process group for the - terminal (if it has one). Normally, this causes the process to - exit; see *Note Signal Handling::. Reading from the terminal - after a disconnect causes an end-of-file condition, and writing - causes an `EIO' error to be returned. The terminal device must be - closed and reopened to clear the condition. + Alternatively, you can test for pending out-of-band data, or wait +until there is out-of-band data, using the `select' function; it can +wait for an exceptional condition on the socket. *Note Waiting for +I/O::, for more information about `select'. - - Macro: tcflag_t HUPCL - If this bit is set, a modem disconnect is generated when all - processes that have the terminal device open have either closed - the file or exited. + Notification of out-of-band data (whether with `SIGURG' or with +`select') indicates that out-of-band data are on the way; the data may +not actually arrive until later. If you try to read the out-of-band +data before it arrives, `recv' fails with an `EWOULDBLOCK' error. - - Macro: tcflag_t CREAD - If this bit is set, input can be read from the terminal. - Otherwise, input is discarded when it arrives. + Sending out-of-band data automatically places a "mark" in the stream +of ordinary data, showing where in the sequence the out-of-band data +"would have been". This is useful when the meaning of out-of-band data +is "cancel everything sent so far". Here is how you can test, in the +receiving process, whether any ordinary data was sent before the mark: - - Macro: tcflag_t CSTOPB - If this bit is set, two stop bits are used. Otherwise, only one - stop bit is used. + success = ioctl (socket, SIOCATMARK, &atmark); - - Macro: tcflag_t PARENB - If this bit is set, generation and detection of a parity bit are - enabled. *Note Input Modes::, for information on how input parity - errors are handled. + The `integer' variable ATMARK is set to a nonzero value if the +socket's read pointer has reached the "mark". - If this bit is not set, no parity bit is added to output - characters, and input characters are not checked for correct - parity. + Here's a function to discard any ordinary data preceding the +out-of-band mark: - - Macro: tcflag_t PARODD - This bit is only useful if `PARENB' is set. If `PARODD' is set, - odd parity is used, otherwise even parity is used. + int + discard_until_mark (int socket) + { + while (1) + { + /* This is not an arbitrary limit; any size will do. */ + char buffer[1024]; + int atmark, success; + + /* If we have reached the mark, return. */ + success = ioctl (socket, SIOCATMARK, &atmark); + if (success < 0) + perror ("ioctl"); + if (result) + return; + + /* Otherwise, read a bunch of ordinary data and discard it. + This is guaranteed not to read past the mark + if it starts before the mark. */ + success = read (socket, buffer, sizeof buffer); + if (success < 0) + perror ("read"); + } + } - The control mode flags also includes a field for the number of bits -per character. You can use the `CSIZE' macro as a mask to extract the -value, like this: `settings.c_cflag & CSIZE'. + If you don't want to discard the ordinary data preceding the mark, +you may need to read some of it anyway, to make room in internal system +buffers for the out-of-band data. If you try to read out-of-band data +and get an `EWOULDBLOCK' error, try reading some ordinary data (saving +it so that you can use it when you want it) and see if that makes room. +Here is an example: - - Macro: tcflag_t CSIZE - This is a mask for the number of bits per character. + struct buffer + { + char *buf; + int size; + struct buffer *next; + }; + + /* Read the out-of-band data from SOCKET and return it + as a `struct buffer', which records the address of the data + and its size. + + It may be necessary to read some ordinary data + in order to make room for the out-of-band data. + If so, the ordinary data are saved as a chain of buffers + found in the `next' field of the value. */ + + struct buffer * + read_oob (int socket) + { + struct buffer *tail = 0; + struct buffer *list = 0; + + while (1) + { + /* This is an arbitrary limit. + Does anyone know how to do this without a limit? */ + #define BUF_SZ 1024 + char *buf = (char *) xmalloc (BUF_SZ); + int success; + int atmark; + + /* Try again to read the out-of-band data. */ + success = recv (socket, buf, BUF_SZ, MSG_OOB); + if (success >= 0) + { + /* We got it, so return it. */ + struct buffer *link + = (struct buffer *) xmalloc (sizeof (struct buffer)); + link->buf = buf; + link->size = success; + link->next = list; + return link; + } + + /* If we fail, see if we are at the mark. */ + success = ioctl (socket, SIOCATMARK, &atmark); + if (success < 0) + perror ("ioctl"); + if (atmark) + { + /* At the mark; skipping past more ordinary data cannot help. + So just wait a while. */ + sleep (1); + continue; + } + + /* Otherwise, read a bunch of ordinary data and save it. + This is guaranteed not to read past the mark + if it starts before the mark. */ + success = read (socket, buf, BUF_SZ); + if (success < 0) + perror ("read"); + + /* Save this data in the buffer list. */ + { + struct buffer *link + = (struct buffer *) xmalloc (sizeof (struct buffer)); + link->buf = buf; + link->size = success; + + /* Add the new link to the end of the list. */ + if (tail) + tail->next = link; + else + list = link; + tail = link; + } + } + } - - Macro: tcflag_t CS5 - This specifies five bits per byte. + +File: libc.info, Node: Datagrams, Next: Inetd, Prev: Connections, Up: Sockets - - Macro: tcflag_t CS6 - This specifies six bits per byte. +Datagram Socket Operations +========================== - - Macro: tcflag_t CS7 - This specifies seven bits per byte. + This section describes how to use communication styles that don't use +connections (styles `SOCK_DGRAM' and `SOCK_RDM'). Using these styles, +you group data into packets and each packet is an independent +communication. You specify the destination for each packet +individually. - - Macro: tcflag_t CS8 - This specifies eight bits per byte. + Datagram packets are like letters: you send each one independently +with its own destination address, and they may arrive in the wrong +order or not at all. - The following four bits are BSD extensions; this exist only on BSD -systems and the GNU system. + The `listen' and `accept' functions are not allowed for sockets +using connectionless communication styles. - - Macro: tcflag_t CCTS_OFLOW - If this bit is set, enable flow control of output based on the CTS - wire (RS232 protocol). +* Menu: - - Macro: tcflag_t CRTS_IFLOW - If this bit is set, enable flow control of input based on the RTS - wire (RS232 protocol). +* Sending Datagrams:: Sending packets on a datagram socket. +* Receiving Datagrams:: Receiving packets on a datagram socket. +* Datagram Example:: An example program: packets sent over a + datagram socket in the local namespace. +* Example Receiver:: Another program, that receives those packets. - - Macro: tcflag_t MDMBUF - If this bit is set, enable carrier-based flow control of output. + +File: libc.info, Node: Sending Datagrams, Next: Receiving Datagrams, Up: Datagrams - - Macro: tcflag_t CIGNORE - If this bit is set, it says to ignore the control modes and line - speed values entirely. This is only meaningful in a call to - `tcsetattr'. +Sending Datagrams +----------------- - The `c_cflag' member and the line speed values returned by - `cfgetispeed' and `cfgetospeed' will be unaffected by the call. - `CIGNORE' is useful if you want to set all the software modes in - the other members, but leave the hardware details in `c_cflag' - unchanged. (This is how the `TCSASOFT' flag to `tcsettattr' - works.) + The normal way of sending data on a datagram socket is by using the +`sendto' function, declared in `sys/socket.h'. - This bit is never set in the structure filled in by `tcgetattr'. + You can call `connect' on a datagram socket, but this only specifies +a default destination for further data transmission on the socket. +When a socket has a default destination you can use `send' (*note +Sending Data::) or even `write' (*note I/O Primitives::) to send a +packet there. You can cancel the default destination by calling +`connect' using an address format of `AF_UNSPEC' in the ADDR argument. +*Note Connecting::, for more information about the `connect' function. - -File: libc.info, Node: Local Modes, Next: Line Speed, Prev: Control Modes, Up: Terminal Modes + - Function: int sendto (int SOCKET, void *BUFFER. size_t SIZE, int + FLAGS, struct sockaddr *ADDR, socklen_t LENGTH) + The `sendto' function transmits the data in the BUFFER through the + socket SOCKET to the destination address specified by the ADDR and + LENGTH arguments. The SIZE argument specifies the number of bytes + to be transmitted. -Local Modes ------------ + The FLAGS are interpreted the same way as for `send'; see *Note + Socket Data Options::. - This section describes the flags for the `c_lflag' member of the -`struct termios' structure. These flags generally control higher-level -aspects of input processing than the input modes flags described in -*Note Input Modes::, such as echoing, signals, and the choice of -canonical or noncanonical input. + The return value and error conditions are also the same as for + `send', but you cannot rely on the system to detect errors and + report them; the most common error is that the packet is lost or + there is no-one at the specified address to receive it, and the + operating system on your machine usually does not know this. - The `c_lflag' member itself is an integer, and you change the flags -and fields using the operators `&', `|', and `^'. Don't try to specify -the entire value for `c_lflag'--instead, change only specific flags and -leave the rest untouched (*note Setting Modes::). + It is also possible for one call to `sendto' to report an error + owing to a problem related to a previous call. - - Macro: tcflag_t ICANON - This bit, if set, enables canonical input processing mode. - Otherwise, input is processed in noncanonical mode. *Note - Canonical or Not::. + This function is defined as a cancellation point in multi-threaded + programs, so one has to be prepared for this and make sure that + allocated resources (like memory, files descriptors, semaphores or + whatever) are freed even if the thread is canceled. - - Macro: tcflag_t ECHO - If this bit is set, echoing of input characters back to the - terminal is enabled. + +File: libc.info, Node: Receiving Datagrams, Next: Datagram Example, Prev: Sending Datagrams, Up: Datagrams - - Macro: tcflag_t ECHOE - If this bit is set, echoing indicates erasure of input with the - ERASE character by erasing the last character in the current line - from the screen. Otherwise, the character erased is re-echoed to - show what has happened (suitable for a printing terminal). +Receiving Datagrams +------------------- - This bit only controls the display behavior; the `ICANON' bit by - itself controls actual recognition of the ERASE character and - erasure of input, without which `ECHOE' is simply irrelevant. + The `recvfrom' function reads a packet from a datagram socket and +also tells you where it was sent from. This function is declared in +`sys/socket.h'. - - Macro: tcflag_t ECHOPRT - This bit is like `ECHOE', enables display of the ERASE character in - a way that is geared to a hardcopy terminal. When you type the - ERASE character, a `\' character is printed followed by the first - character erased. Typing the ERASE character again just prints - the next character erased. Then, the next time you type a normal - character, a `/' character is printed before the character echoes. + - Function: int recvfrom (int SOCKET, void *BUFFER, size_t SIZE, int + FLAGS, struct sockaddr *ADDR, socklen_t *LENGTH-PTR) + The `recvfrom' function reads one packet from the socket SOCKET + into the buffer BUFFER. The SIZE argument specifies the maximum + number of bytes to be read. - This is a BSD extension, and exists only in BSD systems and the - GNU system. + If the packet is longer than SIZE bytes, then you get the first + SIZE bytes of the packet and the rest of the packet is lost. + There's no way to read the rest of the packet. Thus, when you use + a packet protocol, you must always know how long a packet to + expect. - - Macro: tcflag_t ECHOK - This bit enables special display of the KILL character by moving - to a new line after echoing the KILL character normally. The - behavior of `ECHOKE' (below) is nicer to look at. + The ADDR and LENGTH-PTR arguments are used to return the address + where the packet came from. *Note Socket Addresses::. For a + socket in the local domain the address information won't be + meaningful, since you can't read the address of such a socket + (*note Local Namespace::). You can specify a null pointer as the + ADDR argument if you are not interested in this information. - If this bit is not set, the KILL character echoes just as it would - if it were not the KILL character. Then it is up to the user to - remember that the KILL character has erased the preceding input; - there is no indication of this on the screen. + The FLAGS are interpreted the same way as for `recv' (*note Socket + Data Options::). The return value and error conditions are also + the same as for `recv'. - This bit only controls the display behavior; the `ICANON' bit by - itself controls actual recognition of the KILL character and - erasure of input, without which `ECHOK' is simply irrelevant. + This function is defined as a cancellation point in multi-threaded + programs, so one has to be prepared for this and make sure that + allocated resources (like memory, files descriptors, semaphores or + whatever) are freed even if the thread is canceled. - - Macro: tcflag_t ECHOKE - This bit is similar to `ECHOK'. It enables special display of the - KILL character by erasing on the screen the entire line that has - been killed. This is a BSD extension, and exists only in BSD - systems and the GNU system. + You can use plain `recv' (*note Receiving Data::) instead of +`recvfrom' if you don't need to find out who sent the packet (either +because you know where it should come from or because you treat all +possible senders alike). Even `read' can be used if you don't want to +specify FLAGS (*note I/O Primitives::). - - Macro: tcflag_t ECHONL - If this bit is set and the `ICANON' bit is also set, then the - newline (`'\n'') character is echoed even if the `ECHO' bit is not - set. + +File: libc.info, Node: Datagram Example, Next: Example Receiver, Prev: Receiving Datagrams, Up: Datagrams - - Macro: tcflag_t ECHOCTL - If this bit is set and the `ECHO' bit is also set, echo control - characters with `^' followed by the corresponding text character. - Thus, control-A echoes as `^A'. This is usually the preferred mode - for interactive input, because echoing a control character back to - the terminal could have some undesired effect on the terminal. +Datagram Socket Example +----------------------- - This is a BSD extension, and exists only in BSD systems and the - GNU system. + Here is a set of example programs that send messages over a datagram +stream in the local namespace. Both the client and server programs use +the `make_named_socket' function that was presented in *Note Local +Socket Example::, to create and name their sockets. - - Macro: tcflag_t ISIG - This bit controls whether the INTR, QUIT, and SUSP characters are - recognized. The functions associated with these characters are - performed if and only if this bit is set. Being in canonical or - noncanonical input mode has no affect on the interpretation of - these characters. + First, here is the server program. It sits in a loop waiting for +messages to arrive, bouncing each message back to the sender. +Obviously this isn't a particularly useful program, but it does show +the general ideas involved. - You should use caution when disabling recognition of these - characters. Programs that cannot be interrupted interactively are - very user-unfriendly. If you clear this bit, your program should - provide some alternate interface that allows the user to - interactively send the signals associated with these characters, - or to escape from the program. + #include + #include + #include + #include + #include + + #define SERVER "/tmp/serversocket" + #define MAXMSG 512 + + int + main (void) + { + int sock; + char message[MAXMSG]; + struct sockaddr_un name; + size_t size; + int nbytes; + + /* Remove the filename first, it's ok if the call fails */ + unlink (SERVER); + + /* Make the socket, then loop endlessly. */ + sock = make_named_socket (SERVER); + while (1) + { + /* Wait for a datagram. */ + size = sizeof (name); + nbytes = recvfrom (sock, message, MAXMSG, 0, + (struct sockaddr *) & name, &size); + if (nbytes < 0) + { + perror ("recfrom (server)"); + exit (EXIT_FAILURE); + } + + /* Give a diagnostic message. */ + fprintf (stderr, "Server: got message: %s\n", message); + + /* Bounce the message back to the sender. */ + nbytes = sendto (sock, message, nbytes, 0, + (struct sockaddr *) & name, size); + if (nbytes < 0) + { + perror ("sendto (server)"); + exit (EXIT_FAILURE); + } + } + } - *Note Signal Characters::. + +File: libc.info, Node: Example Receiver, Prev: Datagram Example, Up: Datagrams - - Macro: tcflag_t IEXTEN - POSIX.1 gives `IEXTEN' implementation-defined meaning, so you - cannot rely on this interpretation on all systems. +Example of Reading Datagrams +---------------------------- - On BSD systems and the GNU system, it enables the LNEXT and - DISCARD characters. *Note Other Special::. + Here is the client program corresponding to the server above. - - Macro: tcflag_t NOFLSH - Normally, the INTR, QUIT, and SUSP characters cause input and - output queues for the terminal to be cleared. If this bit is set, - the queues are not cleared. + It sends a datagram to the server and then waits for a reply. Notice +that the socket for the client (as well as for the server) in this +example has to be given a name. This is so that the server can direct +a message back to the client. Since the socket has no associated +connection state, the only way the server can do this is by referencing +the name of the client. - - Macro: tcflag_t TOSTOP - If this bit is set and the system supports job control, then - `SIGTTOU' signals are generated by background processes that - attempt to write to the terminal. *Note Access to the Terminal::. + #include + #include + #include + #include + #include + #include + + #define SERVER "/tmp/serversocket" + #define CLIENT "/tmp/mysocket" + #define MAXMSG 512 + #define MESSAGE "Yow!!! Are we having fun yet?!?" + + int + main (void) + { + extern int make_named_socket (const char *name); + int sock; + char message[MAXMSG]; + struct sockaddr_un name; + size_t size; + int nbytes; + + /* Make the socket. */ + sock = make_named_socket (CLIENT); + + /* Initialize the server socket address. */ + name.sun_family = AF_LOCAL; + strcpy (name.sun_path, SERVER); + size = strlen (name.sun_path) + sizeof (name.sun_family); + + /* Send the datagram. */ + nbytes = sendto (sock, MESSAGE, strlen (MESSAGE) + 1, 0, + (struct sockaddr *) & name, size); + if (nbytes < 0) + { + perror ("sendto (client)"); + exit (EXIT_FAILURE); + } + + /* Wait for a reply. */ + nbytes = recvfrom (sock, message, MAXMSG, 0, NULL, 0); + if (nbytes < 0) + { + perror ("recfrom (client)"); + exit (EXIT_FAILURE); + } + + /* Print a diagnostic message. */ + fprintf (stderr, "Client: got message: %s\n", message); + + /* Clean up. */ + remove (CLIENT); + close (sock); + } - The following bits are BSD extensions; they exist only in BSD systems -and the GNU system. + Keep in mind that datagram socket communications are unreliable. In +this example, the client program waits indefinitely if the message +never reaches the server or if the server's response never comes back. +It's up to the user running the program to kill and restart it if +desired. A more automatic solution could be to use `select' (*note +Waiting for I/O::) to establish a timeout period for the reply, and in +case of timeout either re-send the message or shut down the socket and +exit. - - Macro: tcflag_t ALTWERASE - This bit determines how far the WERASE character should erase. The - WERASE character erases back to the beginning of a word; the - question is, where do words begin? + +File: libc.info, Node: Inetd, Next: Socket Options, Prev: Datagrams, Up: Sockets - If this bit is clear, then the beginning of a word is a - nonwhitespace character following a whitespace character. If the - bit is set, then the beginning of a word is an alphanumeric - character or underscore following a character which is none of - those. +The `inetd' Daemon +================== - *Note Editing Characters::, for more information about the WERASE - character. + We've explained above how to write a server program that does its own +listening. Such a server must already be running in order for anyone +to connect to it. - - Macro: tcflag_t FLUSHO - This is the bit that toggles when the user types the DISCARD - character. While this bit is set, all output is discarded. *Note - Other Special::. + Another way to provide a service on an Internet port is to let the +daemon program `inetd' do the listening. `inetd' is a program that +runs all the time and waits (using `select') for messages on a +specified set of ports. When it receives a message, it accepts the +connection (if the socket style calls for connections) and then forks a +child process to run the corresponding server program. You specify the +ports and their programs in the file `/etc/inetd.conf'. - - Macro: tcflag_t NOKERNINFO - Setting this bit disables handling of the STATUS character. *Note - Other Special::. +* Menu: - - Macro: tcflag_t PENDIN - If this bit is set, it indicates that there is a line of input that - needs to be reprinted. Typing the REPRINT character sets this - bit; the bit remains set until reprinting is finished. *Note - Editing Characters::. +* Inetd Servers:: +* Configuring Inetd::  -File: libc.info, Node: Line Speed, Next: Special Characters, Prev: Local Modes, Up: Terminal Modes +File: libc.info, Node: Inetd Servers, Next: Configuring Inetd, Up: Inetd -Line Speed ----------- +`inetd' Servers +--------------- - The terminal line speed tells the computer how fast to read and write -data on the terminal. + Writing a server program to be run by `inetd' is very simple. Each +time someone requests a connection to the appropriate port, a new server +process starts. The connection already exists at this time; the socket +is available as the standard input descriptor and as the standard +output descriptor (descriptors 0 and 1) in the server process. Thus +the server program can begin reading and writing data right away. +Often the program needs only the ordinary I/O facilities; in fact, a +general-purpose filter program that knows nothing about sockets can +work as a byte stream server run by `inetd'. - If the terminal is connected to a real serial line, the terminal -speed you specify actually controls the line--if it doesn't match the -terminal's own idea of the speed, communication does not work. Real -serial ports accept only certain standard speeds. Also, particular -hardware may not support even all the standard speeds. Specifying a -speed of zero hangs up a dialup connection and turns off modem control -signals. + You can also use `inetd' for servers that use connectionless +communication styles. For these servers, `inetd' does not try to accept +a connection since no connection is possible. It just starts the +server program, which can read the incoming datagram packet from +descriptor 0. The server program can handle one request and then exit, +or you can choose to write it to keep reading more requests until no +more arrive, and then exit. You must specify which of these two +techniques the server uses when you configure `inetd'. - If the terminal is not a real serial line (for example, if it is a -network connection), then the line speed won't really affect data -transmission speed, but some programs will use it to determine the -amount of padding needed. It's best to specify a line speed value that -matches the actual speed of the actual terminal, but you can safely -experiment with different values to vary the amount of padding. + +File: libc.info, Node: Configuring Inetd, Prev: Inetd Servers, Up: Inetd - There are actually two line speeds for each terminal, one for input -and one for output. You can set them independently, but most often -terminals use the same speed for both directions. +Configuring `inetd' +------------------- - The speed values are stored in the `struct termios' structure, but -don't try to access them in the `struct termios' structure directly. -Instead, you should use the following functions to read and store them: + The file `/etc/inetd.conf' tells `inetd' which ports to listen to +and what server programs to run for them. Normally each entry in the +file is one line, but you can split it onto multiple lines provided all +but the first line of the entry start with whitespace. Lines that +start with `#' are comments. - - Function: speed_t cfgetospeed (const struct termios *TERMIOS-P) - This function returns the output line speed stored in the structure - `*TERMIOS-P'. + Here are two standard entries in `/etc/inetd.conf': - - Function: speed_t cfgetispeed (const struct termios *TERMIOS-P) - This function returns the input line speed stored in the structure - `*TERMIOS-P'. + ftp stream tcp nowait root /libexec/ftpd ftpd + talk dgram udp wait root /libexec/talkd talkd - - Function: int cfsetospeed (struct termios *TERMIOS-P, speed_t SPEED) - This function stores SPEED in `*TERMIOS-P' as the output speed. - The normal return value is 0; a value of -1 indicates an error. - If SPEED is not a speed, `cfsetospeed' returns -1. + An entry has this format: - - Function: int cfsetispeed (struct termios *TERMIOS-P, speed_t SPEED) - This function stores SPEED in `*TERMIOS-P' as the input speed. - The normal return value is 0; a value of -1 indicates an error. - If SPEED is not a speed, `cfsetospeed' returns -1. + SERVICE STYLE PROTOCOL WAIT USERNAME PROGRAM ARGUMENTS - - Function: int cfsetspeed (struct termios *TERMIOS-P, speed_t SPEED) - This function stores SPEED in `*TERMIOS-P' as both the input and - output speeds. The normal return value is 0; a value of -1 - indicates an error. If SPEED is not a speed, `cfsetspeed' returns - -1. This function is an extension in 4.4 BSD. + The SERVICE field says which service this program provides. It +should be the name of a service defined in `/etc/services'. `inetd' +uses SERVICE to decide which port to listen on for this entry. - - Data Type: speed_t - The `speed_t' type is an unsigned integer data type used to - represent line speeds. + The fields STYLE and PROTOCOL specify the communication style and +the protocol to use for the listening socket. The style should be the +name of a communication style, converted to lower case and with `SOCK_' +deleted--for example, `stream' or `dgram'. PROTOCOL should be one of +the protocols listed in `/etc/protocols'. The typical protocol names +are `tcp' for byte stream connections and `udp' for unreliable +datagrams. - The functions `cfsetospeed' and `cfsetispeed' report errors only for -speed values that the system simply cannot handle. If you specify a -speed value that is basically acceptable, then those functions will -succeed. But they do not check that a particular hardware device can -actually support the specified speeds--in fact, they don't know which -device you plan to set the speed for. If you use `tcsetattr' to set -the speed of a particular device to a value that it cannot handle, -`tcsetattr' returns -1. + The WAIT field should be either `wait' or `nowait'. Use `wait' if +STYLE is a connectionless style and the server, once started, handles +multiple requests as they come in. Use `nowait' if `inetd' should +start a new process for each message or request that comes in. If +STYLE uses connections, then WAIT *must* be `nowait'. - *Portability note:* In the GNU library, the functions above accept -speeds measured in bits per second as input, and return speed values -measured in bits per second. Other libraries require speeds to be -indicated by special codes. For POSIX.1 portability, you must use one -of the following symbols to represent the speed; their precise numeric -values are system-dependent, but each name has a fixed meaning: `B110' -stands for 110 bps, `B300' for 300 bps, and so on. There is no -portable way to represent any speed but these, but these are the only -speeds that typical serial lines can support. + USER is the user name that the server should run as. `inetd' runs +as root, so it can set the user ID of its children arbitrarily. It's +best to avoid using `root' for USER if you can; but some servers, such +as Telnet and FTP, read a username and password themselves. These +servers need to be root initially so they can log in as commanded by +the data coming over the network. - B0 B50 B75 B110 B134 B150 B200 - B300 B600 B1200 B1800 B2400 B4800 - B9600 B19200 B38400 B57600 B115200 - B230400 B460800 + PROGRAM together with ARGUMENTS specifies the command to run to +start the server. PROGRAM should be an absolute file name specifying +the executable file to run. ARGUMENTS consists of any number of +whitespace-separated words, which become the command-line arguments of +PROGRAM. The first word in ARGUMENTS is argument zero, which should by +convention be the program name itself (sans directories). - BSD defines two additional speed symbols as aliases: `EXTA' is an -alias for `B19200' and `EXTB' is an alias for `B38400'. These aliases -are obsolete. + If you edit `/etc/inetd.conf', you can tell `inetd' to reread the +file and obey its new contents by sending the `inetd' process the +`SIGHUP' signal. You'll have to use `ps' to determine the process ID +of the `inetd' process as it is not fixed.  -File: libc.info, Node: Special Characters, Next: Noncanonical Input, Prev: Line Speed, Up: Terminal Modes - -Special Characters ------------------- +File: libc.info, Node: Socket Options, Next: Networks Database, Prev: Inetd, Up: Sockets - In canonical input, the terminal driver recognizes a number of -special characters which perform various control functions. These -include the ERASE character (usually ) for editing input, and -other editing characters. The INTR character (normally `C-c') for -sending a `SIGINT' signal, and other signal-raising characters, may be -available in either canonical or noncanonical input mode. All these -characters are described in this section. +Socket Options +============== - The particular characters used are specified in the `c_cc' member of -the `struct termios' structure. This member is an array; each element -specifies the character for a particular role. Each element has a -symbolic constant that stands for the index of that element--for -example, `VINTR' is the index of the element that specifies the INTR -character, so storing `'='' in `TERMIOS.c_cc[VINTR]' specifies `=' as -the INTR character. + This section describes how to read or set various options that modify +the behavior of sockets and their underlying communications protocols. - On some systems, you can disable a particular special character -function by specifying the value `_POSIX_VDISABLE' for that role. This -value is unequal to any possible character code. *Note Options for -Files::, for more information about how to tell whether the operating -system you are using supports `_POSIX_VDISABLE'. + When you are manipulating a socket option, you must specify which +"level" the option pertains to. This describes whether the option +applies to the socket interface, or to a lower-level communications +protocol interface. * Menu: -* Editing Characters:: Special characters that terminate lines and - delete text, and other editing functions. -* Signal Characters:: Special characters that send or raise signals - to or for certain classes of processes. -* Start/Stop Characters:: Special characters that suspend or resume - suspended output. -* Other Special:: Other special characters for BSD systems: - they can discard output, and print status. +* Socket Option Functions:: The basic functions for setting and getting + socket options. +* Socket-Level Options:: Details of the options at the socket level. diff -durpN glibc-2.2.4/manual/libc.info-29 glibc-2.2.5/manual/libc.info-29 --- glibc-2.2.4/manual/libc.info-29 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-29 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1301 +33,1142 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Editing Characters, Next: Signal Characters, Up: Special Characters - -Characters for Input Editing -............................ - - These special characters are active only in canonical input mode. -*Note Canonical or Not::. - - - Macro: int VEOF - This is the subscript for the EOF character in the special control - character array. `TERMIOS.c_cc[VEOF]' holds the character itself. - - The EOF character is recognized only in canonical input mode. It - acts as a line terminator in the same way as a newline character, - but if the EOF character is typed at the beginning of a line it - causes `read' to return a byte count of zero, indicating - end-of-file. The EOF character itself is discarded. - - Usually, the EOF character is `C-d'. - - - Macro: int VEOL - This is the subscript for the EOL character in the special control - character array. `TERMIOS.c_cc[VEOL]' holds the character itself. +File: libc.info, Node: Socket Option Functions, Next: Socket-Level Options, Up: Socket Options - The EOL character is recognized only in canonical input mode. It - acts as a line terminator, just like a newline character. The EOL - character is not discarded; it is read as the last character in - the input line. +Socket Option Functions +----------------------- - You don't need to use the EOL character to make end a line. - Just set the ICRNL flag. In fact, this is the default state of - affairs. + Here are the functions for examining and modifying socket options. +They are declared in `sys/socket.h'. - - Macro: int VEOL2 - This is the subscript for the EOL2 character in the special control - character array. `TERMIOS.c_cc[VEOL2]' holds the character itself. + - Function: int getsockopt (int SOCKET, int LEVEL, int OPTNAME, void + *OPTVAL, socklen_t *OPTLEN-PTR) + The `getsockopt' function gets information about the value of + option OPTNAME at level LEVEL for socket SOCKET. - The EOL2 character works just like the EOL character (see above), - but it can be a different character. Thus, you can specify two - characters to terminate an input line, by setting EOL to one of - them and EOL2 to the other. + The option value is stored in a buffer that OPTVAL points to. + Before the call, you should supply in `*OPTLEN-PTR' the size of + this buffer; on return, it contains the number of bytes of + information actually stored in the buffer. - The EOL2 character is a BSD extension; it exists only on BSD - systems and the GNU system. + Most options interpret the OPTVAL buffer as a single `int' value. - - Macro: int VERASE - This is the subscript for the ERASE character in the special - control character array. `TERMIOS.c_cc[VERASE]' holds the - character itself. + The actual return value of `getsockopt' is `0' on success and `-1' + on failure. The following `errno' error conditions are defined: - The ERASE character is recognized only in canonical input mode. - When the user types the erase character, the previous character - typed is discarded. (If the terminal generates multibyte - character sequences, this may cause more than one byte of input to - be discarded.) This cannot be used to erase past the beginning of - the current line of text. The ERASE character itself is discarded. + `EBADF' + The SOCKET argument is not a valid file descriptor. - Usually, the ERASE character is . + `ENOTSOCK' + The descriptor SOCKET is not a socket. - - Macro: int VWERASE - This is the subscript for the WERASE character in the special - control character array. `TERMIOS.c_cc[VWERASE]' holds the - character itself. + `ENOPROTOOPT' + The OPTNAME doesn't make sense for the given LEVEL. - The WERASE character is recognized only in canonical mode. It - erases an entire word of prior input, and any whitespace after it; - whitespace characters before the word are not erased. + - Function: int setsockopt (int SOCKET, int LEVEL, int OPTNAME, void + *OPTVAL, socklen_t OPTLEN) + This function is used to set the socket option OPTNAME at level + LEVEL for socket SOCKET. The value of the option is passed in the + buffer OPTVAL of size OPTLEN. - The definition of a "word" depends on the setting of the - `ALTWERASE' mode; *note Local Modes::. + The return value and error codes for `setsockopt' are the same as + for `getsockopt'. - If the `ALTWERASE' mode is not set, a word is defined as a sequence - of any characters except space or tab. - If the `ALTWERASE' mode is set, a word is defined as a sequence of - characters containing only letters, numbers, and underscores, - optionally followed by one character that is not a letter, number, - or underscore. + +File: libc.info, Node: Socket-Level Options, Prev: Socket Option Functions, Up: Socket Options - The WERASE character is usually `C-w'. +Socket-Level Options +-------------------- - This is a BSD extension. + - Constant: int SOL_SOCKET + Use this constant as the LEVEL argument to `getsockopt' or + `setsockopt' to manipulate the socket-level options described in + this section. - - Macro: int VKILL - This is the subscript for the KILL character in the special control - character array. `TERMIOS.c_cc[VKILL]' holds the character itself. +Here is a table of socket-level option names; all are defined in the +header file `sys/socket.h'. - The KILL character is recognized only in canonical input mode. - When the user types the kill character, the entire contents of the - current line of input are discarded. The kill character itself is - discarded too. +`SO_DEBUG' + This option toggles recording of debugging information in the + underlying protocol modules. The value has type `int'; a nonzero + value means "yes". - The KILL character is usually `C-u'. +`SO_REUSEADDR' + This option controls whether `bind' (*note Setting Address::) + should permit reuse of local addresses for this socket. If you + enable this option, you can actually have two sockets with the + same Internet port number; but the system won't allow you to use + the two identically-named sockets in a way that would confuse the + Internet. The reason for this option is that some higher-level + Internet protocols, including FTP, require you to keep reusing the + same port number. - - Macro: int VREPRINT - This is the subscript for the REPRINT character in the special - control character array. `TERMIOS.c_cc[VREPRINT]' holds the - character itself. + The value has type `int'; a nonzero value means "yes". - The REPRINT character is recognized only in canonical mode. It - reprints the current input line. If some asynchronous output has - come while you are typing, this lets you see the line you are - typing clearly again. +`SO_KEEPALIVE' + This option controls whether the underlying protocol should + periodically transmit messages on a connected socket. If the peer + fails to respond to these messages, the connection is considered + broken. The value has type `int'; a nonzero value means "yes". - The REPRINT character is usually `C-r'. +`SO_DONTROUTE' + This option controls whether outgoing messages bypass the normal + message routing facilities. If set, messages are sent directly to + the network interface instead. The value has type `int'; a nonzero + value means "yes". - This is a BSD extension. +`SO_LINGER' + This option specifies what should happen when the socket of a type + that promises reliable delivery still has untransmitted messages + when it is closed; see *Note Closing a Socket::. The value has + type `struct linger'. - -File: libc.info, Node: Signal Characters, Next: Start/Stop Characters, Prev: Editing Characters, Up: Special Characters + - Data Type: struct linger + This structure type has the following members: -Characters that Cause Signals -............................. + `int l_onoff' + This field is interpreted as a boolean. If nonzero, + `close' blocks until the data are transmitted or the + timeout period has expired. - These special characters may be active in either canonical or -noncanonical input mode, but only when the `ISIG' flag is set (*note -Local Modes::). + `int l_linger' + This specifies the timeout period, in seconds. - - Macro: int VINTR - This is the subscript for the INTR character in the special control - character array. `TERMIOS.c_cc[VINTR]' holds the character itself. +`SO_BROADCAST' + This option controls whether datagrams may be broadcast from the + socket. The value has type `int'; a nonzero value means "yes". - The INTR (interrupt) character raises a `SIGINT' signal for all - processes in the foreground job associated with the terminal. The - INTR character itself is then discarded. *Note Signal Handling::, - for more information about signals. +`SO_OOBINLINE' + If this option is set, out-of-band data received on the socket is + placed in the normal input queue. This permits it to be read using + `read' or `recv' without specifying the `MSG_OOB' flag. *Note + Out-of-Band Data::. The value has type `int'; a nonzero value + means "yes". - Typically, the INTR character is `C-c'. +`SO_SNDBUF' + This option gets or sets the size of the output buffer. The value + is a `size_t', which is the size in bytes. - - Macro: int VQUIT - This is the subscript for the QUIT character in the special control - character array. `TERMIOS.c_cc[VQUIT]' holds the character itself. +`SO_RCVBUF' + This option gets or sets the size of the input buffer. The value + is a `size_t', which is the size in bytes. - The QUIT character raises a `SIGQUIT' signal for all processes in - the foreground job associated with the terminal. The QUIT - character itself is then discarded. *Note Signal Handling::, for - more information about signals. +`SO_STYLE' +`SO_TYPE' + This option can be used with `getsockopt' only. It is used to get + the socket's communication style. `SO_TYPE' is the historical + name, and `SO_STYLE' is the preferred name in GNU. The value has + type `int' and its value designates a communication style; see + *Note Communication Styles::. - Typically, the QUIT character is `C-\'. +`SO_ERROR' + This option can be used with `getsockopt' only. It is used to + reset the error status of the socket. The value is an `int', + which represents the previous error status. - - Macro: int VSUSP - This is the subscript for the SUSP character in the special control - character array. `TERMIOS.c_cc[VSUSP]' holds the character itself. + +File: libc.info, Node: Networks Database, Prev: Socket Options, Up: Sockets - The SUSP (suspend) character is recognized only if the - implementation supports job control (*note Job Control::). It - causes a `SIGTSTP' signal to be sent to all processes in the - foreground job associated with the terminal. The SUSP character - itself is then discarded. *Note Signal Handling::, for more - information about signals. +Networks Database +================= - Typically, the SUSP character is `C-z'. + Many systems come with a database that records a list of networks +known to the system developer. This is usually kept either in the file +`/etc/networks' or in an equivalent from a name server. This data base +is useful for routing programs such as `route', but it is not useful +for programs that simply communicate over the network. We provide +functions to access this database, which are declared in `netdb.h'. - Few applications disable the normal interpretation of the SUSP -character. If your program does this, it should provide some other -mechanism for the user to stop the job. When the user invokes this -mechanism, the program should send a `SIGTSTP' signal to the process -group of the process, not just to the process itself. *Note Signaling -Another Process::. + - Data Type: struct netent + This data type is used to represent information about entries in + the networks database. It has the following members: - - Macro: int VDSUSP - This is the subscript for the DSUSP character in the special - control character array. `TERMIOS.c_cc[VDSUSP]' holds the - character itself. + `char *n_name' + This is the "official" name of the network. - The DSUSP (suspend) character is recognized only if the - implementation supports job control (*note Job Control::). It - sends a `SIGTSTP' signal, like the SUSP character, but not right - away--only when the program tries to read it as input. Not all - systems with job control support DSUSP; only BSD-compatible - systems (including the GNU system). + `char **n_aliases' + These are alternative names for the network, represented as a + vector of strings. A null pointer terminates the array. - *Note Signal Handling::, for more information about signals. + `int n_addrtype' + This is the type of the network number; this is always equal + to `AF_INET' for Internet networks. - Typically, the DSUSP character is `C-y'. + `unsigned long int n_net' + This is the network number. Network numbers are returned in + host byte order; see *Note Byte Order::. - -File: libc.info, Node: Start/Stop Characters, Next: Other Special, Prev: Signal Characters, Up: Special Characters + Use the `getnetbyname' or `getnetbyaddr' functions to search the +networks database for information about a specific network. The +information is returned in a statically-allocated structure; you must +copy the information if you need to save it. -Special Characters for Flow Control -................................... + - Function: struct netent * getnetbyname (const char *NAME) + The `getnetbyname' function returns information about the network + named NAME. It returns a null pointer if there is no such network. - These special characters may be active in either canonical or -noncanonical input mode, but their use is controlled by the flags -`IXON' and `IXOFF' (*note Input Modes::). + - Function: struct netent * getnetbyaddr (unsigned long int NET, int + TYPE) + The `getnetbyaddr' function returns information about the network + of type TYPE with number NET. You should specify a value of + `AF_INET' for the TYPE argument for Internet networks. - - Macro: int VSTART - This is the subscript for the START character in the special - control character array. `TERMIOS.c_cc[VSTART]' holds the - character itself. + `getnetbyaddr' returns a null pointer if there is no such network. - The START character is used to support the `IXON' and `IXOFF' - input modes. If `IXON' is set, receiving a START character resumes - suspended output; the START character itself is discarded. If - `IXANY' is set, receiving any character at all resumes suspended - output; the resuming character is not discarded unless it is the - START character. `IXOFF' is set, the system may also transmit - START characters to the terminal. + You can also scan the networks database using `setnetent', +`getnetent' and `endnetent'. Be careful when using these functions +because they are not reentrant. - The usual value for the START character is `C-q'. You may not be - able to change this value--the hardware may insist on using `C-q' - regardless of what you specify. + - Function: void setnetent (int STAYOPEN) + This function opens and rewinds the networks database. - - Macro: int VSTOP - This is the subscript for the STOP character in the special control - character array. `TERMIOS.c_cc[VSTOP]' holds the character itself. + If the STAYOPEN argument is nonzero, this sets a flag so that + subsequent calls to `getnetbyname' or `getnetbyaddr' will not + close the database (as they usually would). This makes for more + efficiency if you call those functions several times, by avoiding + reopening the database for each call. - The STOP character is used to support the `IXON' and `IXOFF' input - modes. If `IXON' is set, receiving a STOP character causes output - to be suspended; the STOP character itself is discarded. If - `IXOFF' is set, the system may also transmit STOP characters to the - terminal, to prevent the input queue from overflowing. + - Function: struct netent * getnetent (void) + This function returns the next entry in the networks database. It + returns a null pointer if there are no more entries. - The usual value for the STOP character is `C-s'. You may not be - able to change this value--the hardware may insist on using `C-s' - regardless of what you specify. + - Function: void endnetent (void) + This function closes the networks database.  -File: libc.info, Node: Other Special, Prev: Start/Stop Characters, Up: Special Characters - -Other Special Characters -........................ - - These special characters exist only in BSD systems and the GNU -system. - - - Macro: int VLNEXT - This is the subscript for the LNEXT character in the special - control character array. `TERMIOS.c_cc[VLNEXT]' holds the - character itself. - - The LNEXT character is recognized only when `IEXTEN' is set, but in - both canonical and noncanonical mode. It disables any special - significance of the next character the user types. Even if the - character would normally perform some editing function or generate - a signal, it is read as a plain character. This is the analogue - of the `C-q' command in Emacs. "LNEXT" stands for "literal next." - - The LNEXT character is usually `C-v'. +File: libc.info, Node: Low-Level Terminal Interface, Next: Syslog, Prev: Sockets, Up: Top - - Macro: int VDISCARD - This is the subscript for the DISCARD character in the special - control character array. `TERMIOS.c_cc[VDISCARD]' holds the - character itself. +Low-Level Terminal Interface +**************************** - The DISCARD character is recognized only when `IEXTEN' is set, but - in both canonical and noncanonical mode. Its effect is to toggle - the discard-output flag. When this flag is set, all program - output is discarded. Setting the flag also discards all output - currently in the output buffer. Typing any other character resets - the flag. + This chapter describes functions that are specific to terminal +devices. You can use these functions to do things like turn off input +echoing; set serial line characteristics such as line speed and flow +control; and change which characters are used for end-of-file, +command-line editing, sending signals, and similar control functions. - - Macro: int VSTATUS - This is the subscript for the STATUS character in the special - control character array. `TERMIOS.c_cc[VSTATUS]' holds the - character itself. + Most of the functions in this chapter operate on file descriptors. +*Note Low-Level I/O::, for more information about what a file +descriptor is and how to open a file descriptor for a terminal device. - The STATUS character's effect is to print out a status message - about how the current process is running. +* Menu: - The STATUS character is recognized only in canonical mode, and - only if `NOKERNINFO' is not set. +* Is It a Terminal:: How to determine if a file is a terminal + device, and what its name is. +* I/O Queues:: About flow control and typeahead. +* Canonical or Not:: Two basic styles of input processing. +* Terminal Modes:: How to examine and modify flags controlling + details of terminal I/O: echoing, + signals, editing. Posix. +* BSD Terminal Modes:: BSD compatible terminal mode setting +* Line Control:: Sending break sequences, clearing + terminal buffers ... +* Noncanon Example:: How to read single characters without echo. +* Pseudo-Terminals:: How to open a pseudo-terminal.  -File: libc.info, Node: Noncanonical Input, Prev: Special Characters, Up: Terminal Modes - -Noncanonical Input ------------------- - - In noncanonical input mode, the special editing characters such as -ERASE and KILL are ignored. The system facilities for the user to edit -input are disabled in noncanonical mode, so that all input characters -(unless they are special for signal or flow-control purposes) are passed -to the application program exactly as typed. It is up to the -application program to give the user ways to edit the input, if -appropriate. - - Noncanonical mode offers special parameters called MIN and TIME for -controlling whether and how long to wait for input to be available. You -can even use them to avoid ever waiting--to return immediately with -whatever input is available, or with no input. - - The MIN and TIME are stored in elements of the `c_cc' array, which -is a member of the `struct termios' structure. Each element of this -array has a particular role, and each element has a symbolic constant -that stands for the index of that element. `VMIN' and `VMAX' are the -names for the indices in the array of the MIN and TIME slots. +File: libc.info, Node: Is It a Terminal, Next: I/O Queues, Up: Low-Level Terminal Interface - - Macro: int VMIN - This is the subscript for the MIN slot in the `c_cc' array. Thus, - `TERMIOS.c_cc[VMIN]' is the value itself. +Identifying Terminals +===================== - The MIN slot is only meaningful in noncanonical input mode; it - specifies the minimum number of bytes that must be available in the - input queue in order for `read' to return. + The functions described in this chapter only work on files that +correspond to terminal devices. You can find out whether a file +descriptor is associated with a terminal by using the `isatty' function. - - Macro: int VTIME - This is the subscript for the TIME slot in the `c_cc' array. Thus, - `TERMIOS.c_cc[VTIME]' is the value itself. + Prototypes for the functions in this section are declared in the +header file `unistd.h'. - The TIME slot is only meaningful in noncanonical input mode; it - specifies how long to wait for input before returning, in units of - 0.1 seconds. + - Function: int isatty (int FILEDES) + This function returns `1' if FILEDES is a file descriptor + associated with an open terminal device, and 0 otherwise. - The MIN and TIME values interact to determine the criterion for when -`read' should return; their precise meanings depend on which of them -are nonzero. There are four possible cases: + If a file descriptor is associated with a terminal, you can get its +associated file name using the `ttyname' function. See also the +`ctermid' function, described in *Note Identifying the Terminal::. - * Both TIME and MIN are nonzero. + - Function: char * ttyname (int FILEDES) + If the file descriptor FILEDES is associated with a terminal + device, the `ttyname' function returns a pointer to a + statically-allocated, null-terminated string containing the file + name of the terminal file. The value is a null pointer if the + file descriptor isn't associated with a terminal, or the file name + cannot be determined. - In this case, TIME specifies how long to wait after each input - character to see if more input arrives. After the first character - received, `read' keeps waiting until either MIN bytes have arrived - in all, or TIME elapses with no further input. + - Function: int ttyname_r (int FILEDES, char *BUF, size_t LEN) + The `ttyname_r' function is similar to the `ttyname' function + except that it places its result into the user-specified buffer + starting at BUF with length LEN. - `read' always blocks until the first character arrives, even if - TIME elapses first. `read' can return more than MIN characters if - more than MIN happen to be in the queue. + The normal return value from `ttyname_r' is 0. Otherwise an error + number is returned to indicate the error. The following `errno' + error conditions are defined for this function: - * Both MIN and TIME are zero. + `EBADF' + The FILEDES argument is not a valid file descriptor. - In this case, `read' always returns immediately with as many - characters as are available in the queue, up to the number - requested. If no input is immediately available, `read' returns a - value of zero. + `ENOTTY' + The FILEDES is not associated with a terminal. - * MIN is zero but TIME has a nonzero value. + `ERANGE' + The buffer length LEN is too small to store the string to be + returned. - In this case, `read' waits for time TIME for input to become - available; the availability of a single byte is enough to satisfy - the read request and cause `read' to return. When it returns, it - returns as many characters as are available, up to the number - requested. If no input is available before the timer expires, - `read' returns a value of zero. + +File: libc.info, Node: I/O Queues, Next: Canonical or Not, Prev: Is It a Terminal, Up: Low-Level Terminal Interface - * TIME is zero but MIN has a nonzero value. +I/O Queues +========== - In this case, `read' waits until at least MIN bytes are available - in the queue. At that time, `read' returns as many characters as - are available, up to the number requested. `read' can return more - than MIN characters if more than MIN happen to be in the queue. + Many of the remaining functions in this section refer to the input +and output queues of a terminal device. These queues implement a form +of buffering _within the kernel_ independent of the buffering +implemented by I/O streams (*note I/O on Streams::). - What happens if MIN is 50 and you ask to read just 10 bytes? -Normally, `read' waits until there are 50 bytes in the buffer (or, more -generally, the wait condition described above is satisfied), and then -reads 10 of them, leaving the other 40 buffered in the operating system -for a subsequent call to `read'. + The "terminal input queue" is also sometimes referred to as its +"typeahead buffer". It holds the characters that have been received +from the terminal but not yet read by any process. - *Portability note:* On some systems, the MIN and TIME slots are -actually the same as the EOF and EOL slots. This causes no serious -problem because the MIN and TIME slots are used only in noncanonical -input and the EOF and EOL slots are used only in canonical input, but it -isn't very clean. The GNU library allocates separate slots for these -uses. + The size of the input queue is described by the `MAX_INPUT' and +`_POSIX_MAX_INPUT' parameters; see *Note Limits for Files::. You are +guaranteed a queue size of at least `MAX_INPUT', but the queue might be +larger, and might even dynamically change size. If input flow control +is enabled by setting the `IXOFF' input mode bit (*note Input Modes::), +the terminal driver transmits STOP and START characters to the terminal +when necessary to prevent the queue from overflowing. Otherwise, input +may be lost if it comes in too fast from the terminal. In canonical +mode, all input stays in the queue until a newline character is +received, so the terminal input queue can fill up when you type a very +long line. *Note Canonical or Not::. - - Function: int cfmakeraw (struct termios *TERMIOS-P) - This function provides an easy way to set up `*TERMIOS-P' for what - has traditionally been called "raw mode" in BSD. This uses - noncanonical input, and turns off most processing to give an - unmodified channel to the terminal. + The "terminal output queue" is like the input queue, but for output; +it contains characters that have been written by processes, but not yet +transmitted to the terminal. If output flow control is enabled by +setting the `IXON' input mode bit (*note Input Modes::), the terminal +driver obeys START and STOP characters sent by the terminal to stop and +restart transmission of output. - It does exactly this: - TERMIOS-P->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP - |INLCR|IGNCR|ICRNL|IXON); - TERMIOS-P->c_oflag &= ~OPOST; - TERMIOS-P->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); - TERMIOS-P->c_cflag &= ~(CSIZE|PARENB); - TERMIOS-P->c_cflag |= CS8; + "Clearing" the terminal input queue means discarding any characters +that have been received but not yet read. Similarly, clearing the +terminal output queue means discarding any characters that have been +written but not yet transmitted.  -File: libc.info, Node: BSD Terminal Modes, Next: Line Control, Prev: Terminal Modes, Up: Low-Level Terminal Interface +File: libc.info, Node: Canonical or Not, Next: Terminal Modes, Prev: I/O Queues, Up: Low-Level Terminal Interface -BSD Terminal Modes -================== +Two Styles of Input: Canonical or Not +===================================== - The usual way to get and set terminal modes is with the functions -described in *Note Terminal Modes::. However, on some systems you can -use the BSD-derived functions in this section to do some of the same -thing. On many systems, these functions do not exist. Even with the -GNU C library, the functions simply fail with `errno' = `ENOSYS' with -many kernels, including Linux. + POSIX systems support two basic modes of input: canonical and +noncanonical. - The symbols used in this section are declared in `sgtty.h'. + In "canonical input processing" mode, terminal input is processed in +lines terminated by newline (`'\n''), EOF, or EOL characters. No input +can be read until an entire line has been typed by the user, and the +`read' function (*note I/O Primitives::) returns at most a single line +of input, no matter how many bytes are requested. - - Data Type: struct sgttyb - This structure is an input or output parameter list for `gtty' and - `stty'. + In canonical input mode, the operating system provides input editing +facilities: some characters are interpreted specially to perform editing +operations within the current line of text, such as ERASE and KILL. +*Note Editing Characters::. - `char sg_ispeed' - Line speed for input + The constants `_POSIX_MAX_CANON' and `MAX_CANON' parameterize the +maximum number of bytes which may appear in a single line of canonical +input. *Note Limits for Files::. You are guaranteed a maximum line +length of at least `MAX_CANON' bytes, but the maximum might be larger, +and might even dynamically change size. - `char sg_ospeed' - Line speed for output + In "noncanonical input processing" mode, characters are not grouped +into lines, and ERASE and KILL processing is not performed. The +granularity with which bytes are read in noncanonical input mode is +controlled by the MIN and TIME settings. *Note Noncanonical Input::. - `char sg_erase' - Erase character + Most programs use canonical input mode, because this gives the user a +way to edit input line by line. The usual reason to use noncanonical +mode is when the program accepts single-character commands or provides +its own editing facilities. - `char sg_kill' - Kill character + The choice of canonical or noncanonical input is controlled by the +`ICANON' flag in the `c_lflag' member of `struct termios'. *Note Local +Modes::. - `int sg_flags' - Various flags + +File: libc.info, Node: Terminal Modes, Next: BSD Terminal Modes, Prev: Canonical or Not, Up: Low-Level Terminal Interface - - Function: int gtty (int FILEDES, struct sgttyb *ATTRIBUTES) - This function gets the attributes of a terminal. +Terminal Modes +============== - `gtty' sets *ATTRIBUTES to describe the terminal attributes of the - terminal which is open with file descriptor FILEDES. + This section describes the various terminal attributes that control +how input and output are done. The functions, data structures, and +symbolic constants are all declared in the header file `termios.h'. - - Function: int stty (int FILEDES, struct sgttyb * attributes) - This function sets the attributes of a terminal. + Don't confuse terminal attributes with file attributes. A device +special file which is associated with a terminal has file attributes as +described in *Note File Attributes::. These are unrelated to the +attributes of the terminal device itself, which are discussed in this +section. - `stty' sets the terminal attributes of the terminal which is open - with file descriptor FILEDES to those described by *FILEDES. +* Menu: - -File: libc.info, Node: Line Control, Next: Noncanon Example, Prev: BSD Terminal Modes, Up: Low-Level Terminal Interface +* Mode Data Types:: The data type `struct termios' and + related types. +* Mode Functions:: Functions to read and set the terminal + attributes. +* Setting Modes:: The right way to set terminal attributes + reliably. +* Input Modes:: Flags controlling low-level input handling. +* Output Modes:: Flags controlling low-level output handling. +* Control Modes:: Flags controlling serial port behavior. +* Local Modes:: Flags controlling high-level input handling. +* Line Speed:: How to read and set the terminal line speed. +* Special Characters:: Characters that have special effects, + and how to change them. +* Noncanonical Input:: Controlling how long to wait for input. -Line Control Functions -====================== + +File: libc.info, Node: Mode Data Types, Next: Mode Functions, Up: Terminal Modes - These functions perform miscellaneous control actions on terminal -devices. As regards terminal access, they are treated like doing -output: if any of these functions is used by a background process on its -controlling terminal, normally all processes in the process group are -sent a `SIGTTOU' signal. The exception is if the calling process -itself is ignoring or blocking `SIGTTOU' signals, in which case the -operation is performed and no signal is sent. *Note Job Control::. +Terminal Mode Data Types +------------------------ - - Function: int tcsendbreak (int FILEDES, int DURATION) - This function generates a break condition by transmitting a stream - of zero bits on the terminal associated with the file descriptor - FILEDES. The duration of the break is controlled by the DURATION - argument. If zero, the duration is between 0.25 and 0.5 seconds. - The meaning of a nonzero value depends on the operating system. + The entire collection of attributes of a terminal is stored in a +structure of type `struct termios'. This structure is used with the +functions `tcgetattr' and `tcsetattr' to read and set the attributes. - This function does nothing if the terminal is not an asynchronous - serial data port. + - Data Type: struct termios + Structure that records all the I/O attributes of a terminal. The + structure includes at least the following members: - The return value is normally zero. In the event of an error, a - value of -1 is returned. The following `errno' error conditions - are defined for this function: + `tcflag_t c_iflag' + A bit mask specifying flags for input modes; see *Note Input + Modes::. - `EBADF' - The FILEDES is not a valid file descriptor. + `tcflag_t c_oflag' + A bit mask specifying flags for output modes; see *Note + Output Modes::. - `ENOTTY' - The FILEDES is not associated with a terminal device. + `tcflag_t c_cflag' + A bit mask specifying flags for control modes; see *Note + Control Modes::. - - Function: int tcdrain (int FILEDES) - The `tcdrain' function waits until all queued output to the - terminal FILEDES has been transmitted. + `tcflag_t c_lflag' + A bit mask specifying flags for local modes; see *Note Local + Modes::. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `tcdrain' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `tcdrain' should be protected using cancellation handlers. + `cc_t c_cc[NCCS]' + An array specifying which characters are associated with + various control functions; see *Note Special Characters::. - The return value is normally zero. In the event of an error, a - value of -1 is returned. The following `errno' error conditions - are defined for this function: + The `struct termios' structure also contains members which encode + input and output transmission speeds, but the representation is + not specified. *Note Line Speed::, for how to examine and store + the speed values. - `EBADF' - The FILEDES is not a valid file descriptor. + The following sections describe the details of the members of the +`struct termios' structure. - `ENOTTY' - The FILEDES is not associated with a terminal device. + - Data Type: tcflag_t + This is an unsigned integer type used to represent the various bit + masks for terminal flags. - `EINTR' - The operation was interrupted by delivery of a signal. *Note - Interrupted Primitives::. + - Data Type: cc_t + This is an unsigned integer type used to represent characters + associated with various terminal control functions. - - Function: int tcflush (int FILEDES, int QUEUE) - The `tcflush' function is used to clear the input and/or output - queues associated with the terminal file FILEDES. The QUEUE - argument specifies which queue(s) to clear, and can be one of the - following values: + - Macro: int NCCS + The value of this macro is the number of elements in the `c_cc' + array. - `TCIFLUSH' - Clear any input data received, but not yet read. + +File: libc.info, Node: Mode Functions, Next: Setting Modes, Prev: Mode Data Types, Up: Terminal Modes - `TCOFLUSH' - Clear any output data written, but not yet transmitted. +Terminal Mode Functions +----------------------- - `TCIOFLUSH' - Clear both queued input and output. + - Function: int tcgetattr (int FILEDES, struct termios *TERMIOS-P) + This function is used to examine the attributes of the terminal + device with file descriptor FILEDES. The attributes are returned + in the structure that TERMIOS-P points to. - The return value is normally zero. In the event of an error, a - value of -1 is returned. The following `errno' error conditions - are defined for this function: + If successful, `tcgetattr' returns 0. A return value of -1 + indicates an error. The following `errno' error conditions are + defined for this function: `EBADF' - The FILEDES is not a valid file descriptor. + The FILEDES argument is not a valid file descriptor. `ENOTTY' - The FILEDES is not associated with a terminal device. - - `EINVAL' - A bad value was supplied as the QUEUE argument. + The FILEDES is not associated with a terminal. - It is unfortunate that this function is named `tcflush', because - the term "flush" is normally used for quite another - operation--waiting until all output is transmitted--and using it - for discarding input or output would be confusing. Unfortunately, - the name `tcflush' comes from POSIX and we cannot change it. + - Function: int tcsetattr (int FILEDES, int WHEN, const struct termios + *TERMIOS-P) + This function sets the attributes of the terminal device with file + descriptor FILEDES. The new attributes are taken from the + structure that TERMIOS-P points to. - - Function: int tcflow (int FILEDES, int ACTION) - The `tcflow' function is used to perform operations relating to - XON/XOFF flow control on the terminal file specified by FILEDES. + The WHEN argument specifies how to deal with input and output + already queued. It can be one of the following values: - The ACTION argument specifies what operation to perform, and can - be one of the following values: + `TCSANOW' + Make the change immediately. - `TCOOFF' - Suspend transmission of output. + `TCSADRAIN' + Make the change after waiting until all queued output has + been written. You should usually use this option when + changing parameters that affect output. - `TCOON' - Restart transmission of output. + `TCSAFLUSH' + This is like `TCSADRAIN', but also discards any queued input. - `TCIOFF' - Transmit a STOP character. + `TCSASOFT' + This is a flag bit that you can add to any of the above + alternatives. Its meaning is to inhibit alteration of the + state of the terminal hardware. It is a BSD extension; it is + only supported on BSD systems and the GNU system. - `TCION' - Transmit a START character. + Using `TCSASOFT' is exactly the same as setting the `CIGNORE' + bit in the `c_cflag' member of the structure TERMIOS-P points + to. *Note Control Modes::, for a description of `CIGNORE'. - For more information about the STOP and START characters, see - *Note Special Characters::. + If this function is called from a background process on its + controlling terminal, normally all processes in the process group + are sent a `SIGTTOU' signal, in the same way as if the process + were trying to write to the terminal. The exception is if the + calling process itself is ignoring or blocking `SIGTTOU' signals, + in which case the operation is performed and no signal is sent. + *Note Job Control::. - The return value is normally zero. In the event of an error, a - value of -1 is returned. The following `errno' error conditions - are defined for this function: + If successful, `tcsetattr' returns 0. A return value of -1 + indicates an error. The following `errno' error conditions are + defined for this function: `EBADF' - The FILEDES is not a valid file descriptor. + The FILEDES argument is not a valid file descriptor. `ENOTTY' - The FILEDES is not associated with a terminal device. + The FILEDES is not associated with a terminal. `EINVAL' - A bad value was supplied as the ACTION argument. - - -File: libc.info, Node: Noncanon Example, Next: Pseudo-Terminals, Prev: Line Control, Up: Low-Level Terminal Interface - -Noncanonical Mode Example -========================= - - Here is an example program that shows how you can set up a terminal -device to read single characters in noncanonical input mode, without -echo. - - #include - #include - #include - #include - - /* Use this variable to remember original terminal attributes. */ - - struct termios saved_attributes; - - void - reset_input_mode (void) - { - tcsetattr (STDIN_FILENO, TCSANOW, &saved_attributes); - } - - void - set_input_mode (void) - { - struct termios tattr; - char *name; - - /* Make sure stdin is a terminal. */ - if (!isatty (STDIN_FILENO)) - { - fprintf (stderr, "Not a terminal.\n"); - exit (EXIT_FAILURE); - } - - /* Save the terminal attributes so we can restore them later. */ - tcgetattr (STDIN_FILENO, &saved_attributes); - atexit (reset_input_mode); - - /* Set the funny terminal modes. */ - tcgetattr (STDIN_FILENO, &tattr); - tattr.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */ - tattr.c_cc[VMIN] = 1; - tattr.c_cc[VTIME] = 0; - tcsetattr (STDIN_FILENO, TCSAFLUSH, &tattr); - } - - int - main (void) - { - char c; - - set_input_mode (); - - while (1) - { - read (STDIN_FILENO, &c, 1); - if (c == '\004') /* `C-d' */ - break; - else - putchar (c); - } - - return EXIT_SUCCESS; - } - - This program is careful to restore the original terminal modes before -exiting or terminating with a signal. It uses the `atexit' function -(*note Cleanups on Exit::) to make sure this is done by `exit'. - - The shell is supposed to take care of resetting the terminal modes -when a process is stopped or continued; see *Note Job Control::. But -some existing shells do not actually do this, so you may wish to -establish handlers for job control signals that reset terminal modes. -The above example does so. - - -File: libc.info, Node: Pseudo-Terminals, Prev: Noncanon Example, Up: Low-Level Terminal Interface - -Pseudo-Terminals -================ - - A "pseudo-terminal" is a special interprocess communication channel -that acts like a terminal. One end of the channel is called the -"master" side or "master pseudo-terminal device", the other side is -called the "slave" side. Data written to the master side is received -by the slave side as if it was the result of a user typing at an -ordinary terminal, and data written to the slave side is sent to the -master side as if it was written on an ordinary terminal. - - Pseudo terminals are the way programs like `xterm' and `emacs' -implement their terminal emulation functionality. + Either the value of the `when' argument is not valid, or + there is something wrong with the data in the TERMIOS-P + argument. -* Menu: + Although `tcgetattr' and `tcsetattr' specify the terminal device +with a file descriptor, the attributes are those of the terminal device +itself and not of the file descriptor. This means that the effects of +changing terminal attributes are persistent; if another process opens +the terminal file later on, it will see the changed attributes even +though it doesn't have anything to do with the open file descriptor you +originally specified in changing the attributes. -* Allocation:: Allocating a pseudo terminal. -* Pseudo-Terminal Pairs:: How to open both sides of a - pseudo-terminal in a single operation. + Similarly, if a single process has multiple or duplicated file +descriptors for the same terminal device, changing the terminal +attributes affects input and output to all of these file descriptors. +This means, for example, that you can't open one file descriptor or +stream to read from a terminal in the normal line-buffered, echoed +mode; and simultaneously have another file descriptor for the same +terminal that you use to read from it in single-character, non-echoed +mode. Instead, you have to explicitly switch the terminal back and +forth between the two modes.  -File: libc.info, Node: Allocation, Next: Pseudo-Terminal Pairs, Up: Pseudo-Terminals - -Allocating Pseudo-Terminals ---------------------------- - - This subsection describes functions for allocating a pseudo-terminal, -and for making this pseudo-terminal available for actual use. These -functions are declared in the header file `stdlib.h'. - - - Function: int getpt (void) - The `getpt' function returns a new file descriptor for the next - available master pseudo-terminal. The normal return value from - `getpt' is a non-negative integer file descriptor. In the case of - an error, a value of -1 is returned instead. The following - `errno' conditions are defined for this function: - - `ENOENT' - There are no free master pseudo-terminals available. - - This function is a GNU extension. - - - Function: int grantpt (int FILEDES) - The `grantpt' function changes the ownership and access permission - of the slave pseudo-terminal device corresponding to the master - pseudo-terminal device associated with the file descriptor - FILEDES. The owner is set from the real user ID of the calling - process (*note Process Persona::), and the group is set to a - special group (typically "tty") or from the real group ID of the - calling process. The access permission is set such that the file - is both readable and writable by the owner and only writable by - the group. - - On some systems this function is implemented by invoking a special - `setuid' root program (*note How Change Persona::). As a - consequence, installing a signal handler for the `SIGCHLD' signal - (*note Job Control Signals::) may interfere with a call to - `grantpt'. - - The normal return value from `grantpt' is 0; a value of -1 is - returned in case of failure. The following `errno' error - conditions are defined for this function: - - `EBADF' - The FILEDES argument is not a valid file descriptor. - - `EINVAL' - The FILEDES argument is not associated with a master - pseudo-terminal device. - - `EACCES' - The slave pseudo-terminal device corresponding to the master - associated with FILEDES could not be accessed. - - - - Function: int unlockpt (int FILEDES) - The `unlockpt' function unlocks the slave pseudo-terminal device - corresponding to the master pseudo-terminal device associated with - the file descriptor FILEDES. On many systems, the slave can only - be opened after unlocking, so portable applications should always - call `unlockpt' before trying to open the slave. - - The normal return value from `unlockpt' is 0; a value of -1 is - returned in case of failure. The following `errno' error - conditions are defined for this function: +File: libc.info, Node: Setting Modes, Next: Input Modes, Prev: Mode Functions, Up: Terminal Modes - `EBADF' - The FILEDES argument is not a valid file descriptor. +Setting Terminal Modes Properly +------------------------------- - `EINVAL' - The FILEDES argument is not associated with a master - pseudo-terminal device. + When you set terminal modes, you should call `tcgetattr' first to +get the current modes of the particular terminal device, modify only +those modes that you are really interested in, and store the result with +`tcsetattr'. - - Function: char * ptsname (int FILEDES) - If the file descriptor FILEDES is associated with a master - pseudo-terminal device, the `ptsname' function returns a pointer - to a statically-allocated, null-terminated string containing the - file name of the associated slave pseudo-terminal file. This - string might be overwritten by subsequent calls to `ptsname'. + It's a bad idea to simply initialize a `struct termios' structure to +a chosen set of attributes and pass it directly to `tcsetattr'. Your +program may be run years from now, on systems that support members not +documented in this manual. The way to avoid setting these members to +unreasonable values is to avoid changing them. - - Function: int ptsname_r (int FILEDES, char *BUF, size_t LEN) - The `ptsname_r' function is similar to the `ptsname' function - except that it places its result into the user-specified buffer - starting at BUF with length LEN. + What's more, different terminal devices may require different mode +settings in order to function properly. So you should avoid blindly +copying attributes from one terminal device to another. - This function is a GNU extension. + When a member contains a collection of independent flags, as the +`c_iflag', `c_oflag' and `c_cflag' members do, even setting the entire +member is a bad idea, because particular operating systems have their +own flags. Instead, you should start with the current value of the +member and alter only the flags whose values matter in your program, +leaving any other flags unchanged. - *Portability Note:* On System V derived systems, the file returned -by the `ptsname' and `ptsname_r' functions may be STREAMS-based, and -therefore require additional processing after opening before it -actually behaves as a pseudo terminal. + Here is an example of how to set one flag (`ISTRIP') in the `struct +termios' structure while properly preserving all the other data in the +structure: - Typical usage of these functions is illustrated by the following -example: int - open_pty_pair (int *amaster, int *aslave) + set_istrip (int desc, int value) { - int master, slave; - char *name; - - master = getpt (); - if (master < 0) - return 0; - - if (grantpt (master) < 0 || unlockpt (master) < 0) - goto close_master; - name = ptsname (master); - if (name == NULL) - goto close_master; - - slave = open (name, O_RDWR); - if (slave == -1) - goto close_master; + struct termios settings; + int result; - if (isastream (slave)) + result = tcgetattr (desc, &settings); + if (result < 0) { - if (ioctl (slave, I_PUSH, "ptem") < 0 - || ioctl (slave, I_PUSH, "ldterm") < 0) - goto close_slave; + perror ("error in tcgetattr"); + return 0; } - - *amaster = master; - *aslave = slave; + settings.c_iflag &= ~ISTRIP; + if (value) + settings.c_iflag |= ISTRIP; + result = tcsetattr (desc, TCSANOW, &settings); + if (result < 0) + { + perror ("error in tcgetattr"); + return; + } return 1; - - close_slave: - close (slave); - - close_master: - close (master); - return 0; }  -File: libc.info, Node: Pseudo-Terminal Pairs, Prev: Allocation, Up: Pseudo-Terminals - -Opening a Pseudo-Terminal Pair ------------------------------- - - These functions, derived from BSD, are available in the separate -`libutil' library, and declared in `pty.h'. - - - Function: int openpty (int *AMASTER, int *ASLAVE, char *NAME, struct - termios *TERMP, struct winsize *WINP) - This function allocates and opens a pseudo-terminal pair, - returning the file descriptor for the master in *AMASTER, and the - file descriptor for the slave in *ASLAVE. If the argument NAME is - not a null pointer, the file name of the slave pseudo-terminal - device is stored in `*name'. If TERMP is not a null pointer, the - terminal attributes of the slave are set to the ones specified in - the structure that TERMP points to (*note Terminal Modes::). - Likewise, if the WINP is not a null pointer, the screen size of - the slave is set to the values specified in the structure that - WINP points to. - - The normal return value from `openpty' is 0; a value of -1 is - returned in case of failure. The following `errno' conditions are - defined for this function: - - `ENOENT' - There are no free pseudo-terminal pairs available. - - *Warning:* Using the `openpty' function with NAME not set to - `NULL' is *very dangerous* because it provides no protection - against overflowing the string NAME. You should use the `ttyname' - function on the file descriptor returned in *SLAVE to find out the - file name of the slave pseudo-terminal device instead. - - - Function: int forkpty (int *AMASTER, char *NAME, struct termios - *TERMP, struct winsize *WINP) - This function is similar to the `openpty' function, but in - addition, forks a new process (*note Creating a Process::) and - makes the newly opened slave pseudo-terminal device the - controlling terminal (*note Controlling Terminal::) for the child - process. - - If the operation is successful, there are then both parent and - child processes and both see `forkpty' return, but with different - values: it returns a value of 0 in the child process and returns - the child's process ID in the parent process. - - If the allocation of a pseudo-terminal pair or the process creation - failed, `forkpty' returns a value of -1 in the parent process. - - *Warning:* The `forkpty' function has the same problems with - respect to the NAME argument as `openpty'. - - -File: libc.info, Node: Syslog, Next: Mathematics, Prev: Low-Level Terminal Interface, Up: Top - -Syslog -****** - - This chapter describes facilities for issuing and logging messages of -system administration interest. This chapter has nothing to do with -programs issuing messages to their own users or keeping private logs -(One would typically do that with the facilities described in *Note I/O -on Streams::). - - Most systems have a facility called "Syslog" that allows programs to -submit messages of interest to system administrators and can be -configured to pass these messages on in various ways, such as printing -on the console, mailing to a particular person, or recording in a log -file for future reference. - - A program uses the facilities in this chapter to submit such -messages. - -* Menu: - -* Overview of Syslog:: Overview of a system's Syslog facility -* Submitting Syslog Messages:: Functions to submit messages to Syslog - - -File: libc.info, Node: Overview of Syslog, Next: Submitting Syslog Messages, Up: Syslog - -Overview of Syslog -================== +File: libc.info, Node: Input Modes, Next: Output Modes, Prev: Setting Modes, Up: Terminal Modes - System administrators have to deal with lots of different kinds of -messages from a plethora of subsystems within each system, and usually -lots of systems as well. For example, an FTP server might report every -connection it gets. The kernel might report hardware failures on a disk -drive. A DNS server might report usage statistics at regular intervals. +Input Modes +----------- - Some of these messages need to be brought to a system administrator's -attention immediately. And it may not be just any system administrator -- there may be a particular system administrator who deals with a -particular kind of message. Other messages just need to be recorded for -future reference if there is a problem. Still others may need to have -information extracted from them by an automated process that generates -monthly reports. + This section describes the terminal attribute flags that control +fairly low-level aspects of input processing: handling of parity errors, +break signals, flow control, and and characters. - To deal with these messages, most Unix systems have a facility called -"Syslog." It is generally based on a daemon called "Syslogd" Syslogd -listens for messages on a Unix domain socket named `/dev/log'. Based -on classification information in the messages and its configuration -file (usually `/etc/syslog.conf'), Syslogd routes them in various ways. -Some of the popular routings are: + All of these flags are bits in the `c_iflag' member of the `struct +termios' structure. The member is an integer, and you change flags +using the operators `&', `|' and `^'. Don't try to specify the entire +value for `c_iflag'--instead, change only specific flags and leave the +rest untouched (*note Setting Modes::). - * Write to the system console + - Macro: tcflag_t INPCK + If this bit is set, input parity checking is enabled. If it is + not set, no checking at all is done for parity errors on input; the + characters are simply passed through to the application. - * Mail to a specific user + Parity checking on input processing is independent of whether + parity detection and generation on the underlying terminal + hardware is enabled; see *Note Control Modes::. For example, you + could clear the `INPCK' input mode flag and set the `PARENB' + control mode flag to ignore parity errors on input, but still + generate parity on output. - * Write to a log file + If this bit is set, what happens when a parity error is detected + depends on whether the `IGNPAR' or `PARMRK' bits are set. If + neither of these bits are set, a byte with a parity error is + passed to the application as a `'\0'' character. - * Pass to another daemon + - Macro: tcflag_t IGNPAR + If this bit is set, any byte with a framing or parity error is + ignored. This is only useful if `INPCK' is also set. - * Discard + - Macro: tcflag_t PARMRK + If this bit is set, input bytes with parity or framing errors are + marked when passed to the program. This bit is meaningful only + when `INPCK' is set and `IGNPAR' is not set. - Syslogd can also handle messages from other systems. It listens on -the `syslog' UDP port as well as the local socket for messages. + The way erroneous bytes are marked is with two preceding bytes, + `377' and `0'. Thus, the program actually reads three bytes for + one erroneous byte received from the terminal. - Syslog can handle messages from the kernel itself. But the kernel -doesn't write to `/dev/log'; rather, another daemon (sometimes called -"Klogd") extracts messages from the kernel and passes them on to Syslog -as any other process would (and it properly identifies them as messages -from the kernel). + If a valid byte has the value `0377', and `ISTRIP' (see below) is + not set, the program might confuse it with the prefix that marks a + parity error. So a valid byte `0377' is passed to the program as + two bytes, `0377' `0377', in this case. - Syslog can even handle messages that the kernel issued before -Syslogd or Klogd was running. A Linux kernel, for example, stores -startup messages in a kernel message ring and they are normally still -there when Klogd later starts up. Assuming Syslogd is running by the -time Klogd starts, Klogd then passes everything in the message ring to -it. + - Macro: tcflag_t ISTRIP + If this bit is set, valid input bytes are stripped to seven bits; + otherwise, all eight bits are available for programs to read. - In order to classify messages for disposition, Syslog requires any -process that submits a message to it to provide two pieces of -classification information with it: + - Macro: tcflag_t IGNBRK + If this bit is set, break conditions are ignored. -facility - This identifies who submitted the message. There are a small - number of facilities defined. The kernel, the mail subsystem, and - an FTP server are examples of recognized facilities. For the - complete list, *Note syslog; vsyslog::. Keep in mind that these - are essentially arbitrary classifications. "Mail subsystem" - doesn't have any more meaning than the system administrator gives - to it. + A "break condition" is defined in the context of asynchronous + serial data transmission as a series of zero-value bits longer + than a single byte. -priority - This tells how important the content of the message is. Examples - of defined priority values are: debug, informational, warning, - critical. For the complete list, *Note syslog; vsyslog::. Except - for the fact that the priorities have a defined order, the meaning - of each of these priorities is entirely determined by the system - administrator. + - Macro: tcflag_t BRKINT + If this bit is set and `IGNBRK' is not set, a break condition + clears the terminal input and output queues and raises a `SIGINT' + signal for the foreground process group associated with the + terminal. - A "facility/priority" is a number that indicates both the facility -and the priority. + If neither `BRKINT' nor `IGNBRK' are set, a break condition is + passed to the application as a single `'\0'' character if `PARMRK' + is not set, or otherwise as a three-character sequence `'\377'', + `'\0'', `'\0''. - *Warning:* This terminology is not universal. Some people use -"level" to refer to the priority and "priority" to refer to the -combination of facility and priority. A Linux kernel has a concept of a -message "level," which corresponds both to a Syslog priority and to a -Syslog facility/priority (It can be both because the facility code for -the kernel is zero, and that makes priority and facility/priority the -same value). + - Macro: tcflag_t IGNCR + If this bit is set, carriage return characters (`'\r'') are + discarded on input. Discarding carriage return may be useful on + terminals that send both carriage return and linefeed when you + type the key. - The GNU C library provides functions to submit messages to Syslog. -They do it by writing to the `/dev/log' socket. *Note Submitting -Syslog Messages::. + - Macro: tcflag_t ICRNL + If this bit is set and `IGNCR' is not set, carriage return + characters (`'\r'') received as input are passed to the + application as newline characters (`'\n''). - The GNU C library functions only work to submit messages to the -Syslog facility on the same system. To submit a message to the Syslog -facility on another system, use the socket I/O functions to write a UDP -datagram to the `syslog' UDP port on that system. *Note Sockets::. + - Macro: tcflag_t INLCR + If this bit is set, newline characters (`'\n'') received as input + are passed to the application as carriage return characters + (`'\r''). - -File: libc.info, Node: Submitting Syslog Messages, Prev: Overview of Syslog, Up: Syslog + - Macro: tcflag_t IXOFF + If this bit is set, start/stop control on input is enabled. In + other words, the computer sends STOP and START characters as + necessary to prevent input from coming in faster than programs are + reading it. The idea is that the actual terminal hardware that is + generating the input data responds to a STOP character by + suspending transmission, and to a START character by resuming + transmission. *Note Start/Stop Characters::. -Submitting Syslog Messages -========================== + - Macro: tcflag_t IXON + If this bit is set, start/stop control on output is enabled. In + other words, if the computer receives a STOP character, it + suspends output until a START character is received. In this + case, the STOP and START characters are never passed to the + application program. If this bit is not set, then START and STOP + can be read as ordinary characters. *Note Start/Stop Characters::. - The GNU C library provides functions to submit messages to the Syslog -facility: + - Macro: tcflag_t IXANY + If this bit is set, any input character restarts output when + output has been suspended with the STOP character. Otherwise, + only the START character restarts output. -* Menu: + This is a BSD extension; it exists only on BSD systems and the GNU + system. -* openlog:: Open connection to Syslog -* syslog; vsyslog:: Submit message to Syslog -* closelog:: Close connection to Syslog -* setlogmask:: Cause certain messages to be ignored -* Syslog Example:: Example of all of the above + - Macro: tcflag_t IMAXBEL + If this bit is set, then filling up the terminal input buffer + sends a BEL character (code `007') to the terminal to ring the + bell. - These functions only work to submit messages to the Syslog facility -on the same system. To submit a message to the Syslog facility on -another system, use the socket I/O functions to write a UDP datagram to -the `syslog' UDP port on that system. *Note Sockets::. + This is a BSD extension.  -File: libc.info, Node: openlog, Next: syslog; vsyslog, Up: Submitting Syslog Messages +File: libc.info, Node: Output Modes, Next: Control Modes, Prev: Input Modes, Up: Terminal Modes -openlog -------- +Output Modes +------------ - The symbols referred to in this section are declared in the file -`syslog.h'. + This section describes the terminal flags and fields that control how +output characters are translated and padded for display. All of these +are contained in the `c_oflag' member of the `struct termios' structure. - - Function: void openlog (char *IDENT, int OPTION, - int FACILITY) + The `c_oflag' member itself is an integer, and you change the flags +and fields using the operators `&', `|', and `^'. Don't try to specify +the entire value for `c_oflag'--instead, change only specific flags and +leave the rest untouched (*note Setting Modes::). - `openlog' opens or reopens a connection to Syslog in preparation - for submitting messages. + - Macro: tcflag_t OPOST + If this bit is set, output data is processed in some unspecified + way so that it is displayed appropriately on the terminal device. + This typically includes mapping newline characters (`'\n'') onto + carriage return and linefeed pairs. - IDENT is an arbitrary identification string which future `syslog' - invocations will prefix to each message. This is intended to - identify the source of the message, and people conventionally set - it to the name of the program that will submit the messages. + If this bit isn't set, the characters are transmitted as-is. - `openlog' may or may not open the `/dev/log' socket, depending on - OPTION. If it does, it tries to open it and connect it as a - stream socket. If that doesn't work, it tries to open it and - connect it as a datagram socket. The socket has the "Close on - Exec" attribute, so the kernel will close it if the process - performs an exec. + The following three bits are BSD features, and they exist only BSD +systems and the GNU system. They are effective only if `OPOST' is set. - You don't have to use `openlog'. If you call `syslog' without - having called `openlog', `syslog' just opens the connection - implicitly and uses defaults for the information in IDENT and - OPTIONS. + - Macro: tcflag_t ONLCR + If this bit is set, convert the newline character on output into a + pair of characters, carriage return followed by linefeed. - OPTIONS is a bit string, with the bits as defined by the following - single bit masks: + - Macro: tcflag_t OXTABS + If this bit is set, convert tab characters on output into the + appropriate number of spaces to emulate a tab stop every eight + columns. - `LOG_PERROR' - If on, `openlog' sets up the connection so that any `syslog' - on this connection writes its message to the calling process' - Standard Error stream in addition to submitting it to Syslog. - If off, `syslog' does not write the message to Standard - Error. + - Macro: tcflag_t ONOEOT + If this bit is set, discard `C-d' characters (code `004') on + output. These characters cause many dial-up terminals to + disconnect. - `LOG_CONS' - If on, `openlog' sets up the connection so that a `syslog' on - this connection that fails to submit a message to Syslog - writes the message instead to system console. If off, - `syslog' does not write to the system console (but of course - Syslog may write messages it receives to the console). + +File: libc.info, Node: Control Modes, Next: Local Modes, Prev: Output Modes, Up: Terminal Modes - `LOG_PID' - When on, `openlog' sets up the connection so that a `syslog' - on this connection inserts the calling process' Process ID - (PID) into the message. When off, `openlog' does not insert - the PID. +Control Modes +------------- - `LOG_NDELAY' - When on, `openlog' opens and connects the `/dev/log' socket. - When off, a future `syslog' call must open and connect the - socket. + This section describes the terminal flags and fields that control +parameters usually associated with asynchronous serial data +transmission. These flags may not make sense for other kinds of +terminal ports (such as a network connection pseudo-terminal). All of +these are contained in the `c_cflag' member of the `struct termios' +structure. - *Portability note:* In early systems, the sense of this bit - was exactly the opposite. + The `c_cflag' member itself is an integer, and you change the flags +and fields using the operators `&', `|', and `^'. Don't try to specify +the entire value for `c_cflag'--instead, change only specific flags and +leave the rest untouched (*note Setting Modes::). - `LOG_ODELAY' - This bit does nothing. It exists for backward compatibility. + - Macro: tcflag_t CLOCAL + If this bit is set, it indicates that the terminal is connected + "locally" and that the modem status lines (such as carrier detect) + should be ignored. - If any other bit in OPTIONS is on, the result is undefined. + On many systems if this bit is not set and you call `open' without + the `O_NONBLOCK' flag set, `open' blocks until a modem connection + is established. - FACILITY is the default facility code for this connection. A - `syslog' on this connection that specifies default facility causes - this facility to be associated with the message. See `syslog' for - possible values. A value of zero means the default default, which - is `LOG_USER'. + If this bit is not set and a modem disconnect is detected, a + `SIGHUP' signal is sent to the controlling process group for the + terminal (if it has one). Normally, this causes the process to + exit; see *Note Signal Handling::. Reading from the terminal + after a disconnect causes an end-of-file condition, and writing + causes an `EIO' error to be returned. The terminal device must be + closed and reopened to clear the condition. - If a Syslog connection is already open when you call `openlog', - `openlog' "reopens" the connection. Reopening is like opening - except that if you specify zero for the default facility code, the - default facility code simply remains unchanged and if you specify - LOG_NDELAY and the socket is already open and connected, `openlog' - just leaves it that way. + - Macro: tcflag_t HUPCL + If this bit is set, a modem disconnect is generated when all + processes that have the terminal device open have either closed + the file or exited. + - Macro: tcflag_t CREAD + If this bit is set, input can be read from the terminal. + Otherwise, input is discarded when it arrives. - -File: libc.info, Node: syslog; vsyslog, Next: closelog, Prev: openlog, Up: Submitting Syslog Messages + - Macro: tcflag_t CSTOPB + If this bit is set, two stop bits are used. Otherwise, only one + stop bit is used. -syslog, vsyslog ---------------- + - Macro: tcflag_t PARENB + If this bit is set, generation and detection of a parity bit are + enabled. *Note Input Modes::, for information on how input parity + errors are handled. - The symbols referred to in this section are declared in the file -`syslog.h'. + If this bit is not set, no parity bit is added to output + characters, and input characters are not checked for correct + parity. - - Function: void syslog (int FACILITY_PRIORITY, char *FORMAT, ...) - `syslog' submits a message to the Syslog facility. It does this by - writing to the Unix domain socket `/dev/log'. + - Macro: tcflag_t PARODD + This bit is only useful if `PARENB' is set. If `PARODD' is set, + odd parity is used, otherwise even parity is used. - `syslog' submits the message with the facility and priority - indicated by FACILITY_PRIORITY. The macro `LOG_MAKEPRI' generates - a facility/priority from a facility and a priority, as in the - following example: + The control mode flags also includes a field for the number of bits +per character. You can use the `CSIZE' macro as a mask to extract the +value, like this: `settings.c_cflag & CSIZE'. - LOG_MAKEPRI(LOG_USER, LOG_WARNING) + - Macro: tcflag_t CSIZE + This is a mask for the number of bits per character. - The possible values for the facility code are (macros): + - Macro: tcflag_t CS5 + This specifies five bits per byte. - `LOG_USER' - A miscellaneous user process + - Macro: tcflag_t CS6 + This specifies six bits per byte. - `LOG_MAIL' - Mail + - Macro: tcflag_t CS7 + This specifies seven bits per byte. - `LOG_DAEMON' - A miscellaneous system daemon + - Macro: tcflag_t CS8 + This specifies eight bits per byte. - `LOG_AUTH' - Security (authorization) + The following four bits are BSD extensions; this exist only on BSD +systems and the GNU system. - `LOG_SYSLOG' - Syslog + - Macro: tcflag_t CCTS_OFLOW + If this bit is set, enable flow control of output based on the CTS + wire (RS232 protocol). - `LOG_LPR' - Central printer + - Macro: tcflag_t CRTS_IFLOW + If this bit is set, enable flow control of input based on the RTS + wire (RS232 protocol). - `LOG_NEWS' - Network news (e.g. Usenet) + - Macro: tcflag_t MDMBUF + If this bit is set, enable carrier-based flow control of output. - `LOG_UUCP' - UUCP + - Macro: tcflag_t CIGNORE + If this bit is set, it says to ignore the control modes and line + speed values entirely. This is only meaningful in a call to + `tcsetattr'. - `LOG_CRON' - Cron and At + The `c_cflag' member and the line speed values returned by + `cfgetispeed' and `cfgetospeed' will be unaffected by the call. + `CIGNORE' is useful if you want to set all the software modes in + the other members, but leave the hardware details in `c_cflag' + unchanged. (This is how the `TCSASOFT' flag to `tcsettattr' + works.) - `LOG_AUTHPRIV' - Private security (authorization) + This bit is never set in the structure filled in by `tcgetattr'. - `LOG_FTP' - Ftp server + +File: libc.info, Node: Local Modes, Next: Line Speed, Prev: Control Modes, Up: Terminal Modes - `LOG_LOCAL0' - Locally defined +Local Modes +----------- - `LOG_LOCAL1' - Locally defined + This section describes the flags for the `c_lflag' member of the +`struct termios' structure. These flags generally control higher-level +aspects of input processing than the input modes flags described in +*Note Input Modes::, such as echoing, signals, and the choice of +canonical or noncanonical input. - `LOG_LOCAL2' - Locally defined + The `c_lflag' member itself is an integer, and you change the flags +and fields using the operators `&', `|', and `^'. Don't try to specify +the entire value for `c_lflag'--instead, change only specific flags and +leave the rest untouched (*note Setting Modes::). - `LOG_LOCAL3' - Locally defined + - Macro: tcflag_t ICANON + This bit, if set, enables canonical input processing mode. + Otherwise, input is processed in noncanonical mode. *Note + Canonical or Not::. - `LOG_LOCAL4' - Locally defined + - Macro: tcflag_t ECHO + If this bit is set, echoing of input characters back to the + terminal is enabled. - `LOG_LOCAL5' - Locally defined + - Macro: tcflag_t ECHOE + If this bit is set, echoing indicates erasure of input with the + ERASE character by erasing the last character in the current line + from the screen. Otherwise, the character erased is re-echoed to + show what has happened (suitable for a printing terminal). - `LOG_LOCAL6' - Locally defined + This bit only controls the display behavior; the `ICANON' bit by + itself controls actual recognition of the ERASE character and + erasure of input, without which `ECHOE' is simply irrelevant. - `LOG_LOCAL7' - Locally defined + - Macro: tcflag_t ECHOPRT + This bit is like `ECHOE', enables display of the ERASE character in + a way that is geared to a hardcopy terminal. When you type the + ERASE character, a `\' character is printed followed by the first + character erased. Typing the ERASE character again just prints + the next character erased. Then, the next time you type a normal + character, a `/' character is printed before the character echoes. - Results are undefined if the facility code is anything else. + This is a BSD extension, and exists only in BSD systems and the + GNU system. - *note:* `syslog' recognizes one other facility code: that of the - kernel. But you can't specify that facility code with these - functions. If you try, it looks the same to `syslog' as if you are - requesting the default facility. But you wouldn't want to anyway, - because any program that uses the GNU C library is not the kernel. + - Macro: tcflag_t ECHOK + This bit enables special display of the KILL character by moving + to a new line after echoing the KILL character normally. The + behavior of `ECHOKE' (below) is nicer to look at. - You can use just a priority code as FACILITY_PRIORITY. In that - case, `syslog' assumes the default facility established when the - Syslog connection was opened. *Note Syslog Example::. + If this bit is not set, the KILL character echoes just as it would + if it were not the KILL character. Then it is up to the user to + remember that the KILL character has erased the preceding input; + there is no indication of this on the screen. - The possible values for the priority code are (macros): + This bit only controls the display behavior; the `ICANON' bit by + itself controls actual recognition of the KILL character and + erasure of input, without which `ECHOK' is simply irrelevant. - `LOG_EMERG' - The message says the system is unusable. + - Macro: tcflag_t ECHOKE + This bit is similar to `ECHOK'. It enables special display of the + KILL character by erasing on the screen the entire line that has + been killed. This is a BSD extension, and exists only in BSD + systems and the GNU system. - `LOG_ALERT' - Action on the message must be taken immediately. + - Macro: tcflag_t ECHONL + If this bit is set and the `ICANON' bit is also set, then the + newline (`'\n'') character is echoed even if the `ECHO' bit is not + set. - `LOG_CRIT' - The message states a critical condition. + - Macro: tcflag_t ECHOCTL + If this bit is set and the `ECHO' bit is also set, echo control + characters with `^' followed by the corresponding text character. + Thus, control-A echoes as `^A'. This is usually the preferred mode + for interactive input, because echoing a control character back to + the terminal could have some undesired effect on the terminal. - `LOG_ERR' - The message describes an error. + This is a BSD extension, and exists only in BSD systems and the + GNU system. - `LOG_WARNING' - The message is a warning. + - Macro: tcflag_t ISIG + This bit controls whether the INTR, QUIT, and SUSP characters are + recognized. The functions associated with these characters are + performed if and only if this bit is set. Being in canonical or + noncanonical input mode has no affect on the interpretation of + these characters. - `LOG_NOTICE' - The message describes a normal but important event. + You should use caution when disabling recognition of these + characters. Programs that cannot be interrupted interactively are + very user-unfriendly. If you clear this bit, your program should + provide some alternate interface that allows the user to + interactively send the signals associated with these characters, + or to escape from the program. - `LOG_INFO' - The message is purely informational. + *Note Signal Characters::. - `LOG_DEBUG' - The message is only for debugging purposes. + - Macro: tcflag_t IEXTEN + POSIX.1 gives `IEXTEN' implementation-defined meaning, so you + cannot rely on this interpretation on all systems. - Results are undefined if the priority code is anything else. + On BSD systems and the GNU system, it enables the LNEXT and + DISCARD characters. *Note Other Special::. - If the process does not presently have a Syslog connection open - (i.e. it did not call `openlog'), `syslog' implicitly opens the - connection the same as `openlog' would, with the following defaults - for information that would otherwise be included in an `openlog' - call: The default identification string is the program name. The - default default facility is `LOG_USER'. The default for all the - connection options in OPTIONS is as if those bits were off. - `syslog' leaves the Syslog connection open. + - Macro: tcflag_t NOFLSH + Normally, the INTR, QUIT, and SUSP characters cause input and + output queues for the terminal to be cleared. If this bit is set, + the queues are not cleared. - If the `dev/log' socket is not open and connected, `syslog' opens - and connects it, the same as `openlog' with the `LOG_NDELAY' - option would. + - Macro: tcflag_t TOSTOP + If this bit is set and the system supports job control, then + `SIGTTOU' signals are generated by background processes that + attempt to write to the terminal. *Note Access to the Terminal::. - `syslog' leaves `/dev/log' open and connected unless its attempt - to send the message failed, in which case `syslog' closes it (with - the hope that a future implicit open will restore the Syslog - connection to a usable state). + The following bits are BSD extensions; they exist only in BSD systems +and the GNU system. - Example: + - Macro: tcflag_t ALTWERASE + This bit determines how far the WERASE character should erase. The + WERASE character erases back to the beginning of a word; the + question is, where do words begin? + If this bit is clear, then the beginning of a word is a + nonwhitespace character following a whitespace character. If the + bit is set, then the beginning of a word is an alphanumeric + character or underscore following a character which is none of + those. - #include - syslog (LOG_MAKEPRI(LOG_LOCAL1, LOG_ERROR), - "Unable to make network connection to %s. Error=%m", host); + *Note Editing Characters::, for more information about the WERASE + character. + - Macro: tcflag_t FLUSHO + This is the bit that toggles when the user types the DISCARD + character. While this bit is set, all output is discarded. *Note + Other Special::. - - Function: void vsyslog (int FACILITY_PRIORITY, char *FORMAT, va_list - arglist) - This is functionally identical to `syslog', with the BSD style - variable length argument. + - Macro: tcflag_t NOKERNINFO + Setting this bit disables handling of the STATUS character. *Note + Other Special::. + - Macro: tcflag_t PENDIN + If this bit is set, it indicates that there is a line of input that + needs to be reprinted. Typing the REPRINT character sets this + bit; the bit remains set until reprinting is finished. *Note + Editing Characters::.  -File: libc.info, Node: closelog, Next: setlogmask, Prev: syslog; vsyslog, Up: Submitting Syslog Messages - -closelog --------- - - The symbols referred to in this section are declared in the file -`syslog.h'. +File: libc.info, Node: Line Speed, Next: Special Characters, Prev: Local Modes, Up: Terminal Modes - - Function: void closelog (void) - `closelog' closes the current Syslog connection, if there is one. - This include closing the `dev/log' socket, if it is open. +Line Speed +---------- - There is very little reason to use this function. It does not - flush any buffers; you can reopen a Syslog connection without - closing it first; The connection gets closed automatically on exec - or exit. `closelog' has primarily aesthetic value. + The terminal line speed tells the computer how fast to read and write +data on the terminal. + If the terminal is connected to a real serial line, the terminal +speed you specify actually controls the line--if it doesn't match the +terminal's own idea of the speed, communication does not work. Real +serial ports accept only certain standard speeds. Also, particular +hardware may not support even all the standard speeds. Specifying a +speed of zero hangs up a dialup connection and turns off modem control +signals. - -File: libc.info, Node: setlogmask, Next: Syslog Example, Prev: closelog, Up: Submitting Syslog Messages + If the terminal is not a real serial line (for example, if it is a +network connection), then the line speed won't really affect data +transmission speed, but some programs will use it to determine the +amount of padding needed. It's best to specify a line speed value that +matches the actual speed of the actual terminal, but you can safely +experiment with different values to vary the amount of padding. -setlogmask ----------- + There are actually two line speeds for each terminal, one for input +and one for output. You can set them independently, but most often +terminals use the same speed for both directions. - The symbols referred to in this section are declared in the file -`syslog.h'. + The speed values are stored in the `struct termios' structure, but +don't try to access them in the `struct termios' structure directly. +Instead, you should use the following functions to read and store them: - - Function: int setlogmask (int MASK) - `setlogmask' sets a mask (the "logmask") that determines which - future `syslog' calls shall be ignored. If a program has not - called `setlogmask', `syslog' doesn't ignore any calls. You can - use `setlogmask' to specify that messages of particular priorities - shall be ignored in the future. + - Function: speed_t cfgetospeed (const struct termios *TERMIOS-P) + This function returns the output line speed stored in the structure + `*TERMIOS-P'. - A `setlogmask' call overrides any previous `setlogmask' call. + - Function: speed_t cfgetispeed (const struct termios *TERMIOS-P) + This function returns the input line speed stored in the structure + `*TERMIOS-P'. - Note that the logmask exists entirely independently of opening and - closing of Syslog connections. + - Function: int cfsetospeed (struct termios *TERMIOS-P, speed_t SPEED) + This function stores SPEED in `*TERMIOS-P' as the output speed. + The normal return value is 0; a value of -1 indicates an error. + If SPEED is not a speed, `cfsetospeed' returns -1. - Setting the logmask has a similar effect to, but is not the same - as, configuring Syslog. The Syslog configuration may cause Syslog - to discard certain messages it receives, but the logmask causes - certain messages never to get submitted to Syslog in the first - place. + - Function: int cfsetispeed (struct termios *TERMIOS-P, speed_t SPEED) + This function stores SPEED in `*TERMIOS-P' as the input speed. + The normal return value is 0; a value of -1 indicates an error. + If SPEED is not a speed, `cfsetospeed' returns -1. - MASK is a bit string with one bit corresponding to each of the - possible message priorities. If the bit is on, `syslog' handles - messages of that priority normally. If it is off, `syslog' - discards messages of that priority. Use the message priority - macros described in *Note syslog; vsyslog:: and the `LOG_MASK' to - construct an appropriate MASK value, as in this example: + - Function: int cfsetspeed (struct termios *TERMIOS-P, speed_t SPEED) + This function stores SPEED in `*TERMIOS-P' as both the input and + output speeds. The normal return value is 0; a value of -1 + indicates an error. If SPEED is not a speed, `cfsetspeed' returns + -1. This function is an extension in 4.4 BSD. - LOG_MASK(LOG_EMERG) | LOG_MASK(LOG_ERROR) + - Data Type: speed_t + The `speed_t' type is an unsigned integer data type used to + represent line speeds. - or + The functions `cfsetospeed' and `cfsetispeed' report errors only for +speed values that the system simply cannot handle. If you specify a +speed value that is basically acceptable, then those functions will +succeed. But they do not check that a particular hardware device can +actually support the specified speeds--in fact, they don't know which +device you plan to set the speed for. If you use `tcsetattr' to set +the speed of a particular device to a value that it cannot handle, +`tcsetattr' returns -1. - ~(LOG_MASK(LOG_INFO)) + *Portability note:* In the GNU library, the functions above accept +speeds measured in bits per second as input, and return speed values +measured in bits per second. Other libraries require speeds to be +indicated by special codes. For POSIX.1 portability, you must use one +of the following symbols to represent the speed; their precise numeric +values are system-dependent, but each name has a fixed meaning: `B110' +stands for 110 bps, `B300' for 300 bps, and so on. There is no +portable way to represent any speed but these, but these are the only +speeds that typical serial lines can support. - There is also a `LOG_UPTO' macro, which generates a mask with the - bits on for a certain priority and all priorities above it: + B0 B50 B75 B110 B134 B150 B200 + B300 B600 B1200 B1800 B2400 B4800 + B9600 B19200 B38400 B57600 B115200 + B230400 B460800 - LOG_UPTO(LOG_ERROR) + BSD defines two additional speed symbols as aliases: `EXTA' is an +alias for `B19200' and `EXTB' is an alias for `B38400'. These aliases +are obsolete. - The unfortunate naming of the macro is due to the fact that - internally, higher numbers are used for lower message priorities. + +File: libc.info, Node: Special Characters, Next: Noncanonical Input, Prev: Line Speed, Up: Terminal Modes +Special Characters +------------------ - -File: libc.info, Node: Syslog Example, Prev: setlogmask, Up: Submitting Syslog Messages + In canonical input, the terminal driver recognizes a number of +special characters which perform various control functions. These +include the ERASE character (usually ) for editing input, and +other editing characters. The INTR character (normally `C-c') for +sending a `SIGINT' signal, and other signal-raising characters, may be +available in either canonical or noncanonical input mode. All these +characters are described in this section. -Syslog Example --------------- + The particular characters used are specified in the `c_cc' member of +the `struct termios' structure. This member is an array; each element +specifies the character for a particular role. Each element has a +symbolic constant that stands for the index of that element--for +example, `VINTR' is the index of the element that specifies the INTR +character, so storing `'='' in `TERMIOS.c_cc[VINTR]' specifies `=' as +the INTR character. - Here is an example of `openlog', `syslog', and `closelog': + On some systems, you can disable a particular special character +function by specifying the value `_POSIX_VDISABLE' for that role. This +value is unequal to any possible character code. *Note Options for +Files::, for more information about how to tell whether the operating +system you are using supports `_POSIX_VDISABLE'. - This example sets the logmask so that debug and informational -messages get discarded without ever reaching Syslog. So the second -`syslog' in the example does nothing. +* Menu: - #include - - setlogmask (LOG_UPTO (LOG_NOTICE)); - - openlog ("exampleprog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1); - - syslog (LOG_NOTICE, "Program started by User %d", getuid ()); - syslog (LOG_INFO, "A tree falls in a forest"); - - closelog (); +* Editing Characters:: Special characters that terminate lines and + delete text, and other editing functions. +* Signal Characters:: Special characters that send or raise signals + to or for certain classes of processes. +* Start/Stop Characters:: Special characters that suspend or resume + suspended output. +* Other Special:: Other special characters for BSD systems: + they can discard output, and print status. diff -durpN glibc-2.2.4/manual/libc.info-3 glibc-2.2.5/manual/libc.info-3 --- glibc-2.2.4/manual/libc.info-3 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-3 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -643,7 +644,8 @@ access to the name of the program that e - Function: void perror (const char *MESSAGE) This function prints an error message to the stream `stderr'; see - *Note Standard Streams::. + *Note Standard Streams::. The orientation of `stderr' is not + changed. If you call `perror' with a MESSAGE that is either a null pointer or an empty string, `perror' just prints the error message @@ -662,8 +664,8 @@ system, the messages are fairly short; t or embedded newlines. Each error message begins with a capital letter and does not include any terminating punctuation. - *Compatibility Note:* The `strerror' function is a new feature of -ISO C. Many older C systems do not support this function yet. + *Compatibility Note:* The `strerror' function was introduced in +ISO C89. Many older C systems do not support this function yet. Many programs that don't read input from the terminal are designed to exit if any system call fails. By convention, the error message from @@ -727,6 +729,191 @@ variable instead, because those other li return stream; } + Using `perror' has the advantage that the function is portable and +available on all systems implementing ISO C. But often the text +`perror' generates is not what is wanted and there is no way to extend +or change what `perror' does. The GNU coding standard, for instance, +requires error messages to be preceded by the program name and programs +which read some input files should should provide information about the +input file name and the line number in case an error is encountered +while reading the file. For these occasions there are two functions +available which are widely used throughout the GNU project. These +functions are declared in `error.h'. + + - Function: void error (int STATUS, int ERRNUM, const char *FORMAT, + ...) + The `error' function can be used to report general problems during + program execution. The FORMAT argument is a format string just + like those given to the `printf' family of functions. The + arguments required for the format can follow the FORMAT parameter. + Just like `perror', `error' also can report an error code in + textual form. But unlike `perror' the error value is explicitly + passed to the function in the ERRNUM parameter. This elimintates + the problem mentioned above that the error reporting function must + be called immediately after the function causing the error since + otherwise `errno' might have a different value. + + The `error' prints first the program name. If the application + defined a global variable `error_print_progname' and points it to a + function this function will be called to print the program name. + Otherwise the string from the global variable `program_name' is + used. The program name is followed by a colon and a space which + in turn is followed by the output produced by the format string. + If the ERRNUM parameter is non-zero the format string output is + followed by a colon and a space, followed by the error message for + the error code ERRNUM. In any case is the output terminated with + a newline. + + The output is directed to the `stderr' stream. If the `stderr' + wasn't oriented before the call it will be narrow-oriented + afterwards. + + The function will return unless the STATUS parameter has a + non-zero value. In this case the function will call `exit' with + the STATUS value for its parameter and therefore never return. If + `error' returns the global variable `error_message_count' is + incremented by one to keep track of the number of errors reported. + + - Function: void error_at_line (int STATUS, int ERRNUM, const char + *FNAME, unsigned int LINENO, const char *FORMAT, ...) + The `error_at_line' function is very similar to the `error' + function. The only difference are the additional parameters FNAME + and LINENO. The handling of the other parameters is identical to + that of `error' except that between the program name and the string + generated by the format string additional text is inserted. + + Directly following the program name a colon, followed by the file + name pointer to by FNAME, another colon, and a value of LINENO is + printed. + + This additional output of course is meant to be used to locate an + error in an input file (like a programming language source code + file etc). + + If the global variable `error_one_per_line' is set to a non-zero + value `error_at_line' will avoid printing consecutive messages for + the same file anem line. Repetition which are not directly + following each other are not caught. + + Just like `error' this function only returned if STATUS is zero. + Otherwise `exit' is called with the non-zero value. If `error' + returns the global variable `error_message_count' is incremented + by one to keep track of the number of errors reported. + + As mentioned above the `error' and `error_at_line' functions can be +customized by defining a variable named `error_print_progname'. + + - Variable: void (* error_print_progname ) (void) + If the `error_print_progname' variable is defined to a non-zero + value the function pointed to is called by `error' or + `error_at_line'. It is expected to print the program name or do + something similarly useful. + + The function is expected to be print to the `stderr' stream and + must be able to handle whatever orientation the stream has. + + The variable is global and shared by all threads. + + - Variable: unsigned int error_message_count + The `error_message_count' variable is incremented whenever one of + the functions `error' or `error_at_line' returns. The variable is + global and shared by all threads. + + - Variable: int error_one_per_line + The `error_one_per_line' variable influences only `error_at_line'. + Normally the `error_at_line' function creates output for every + invocation. If `error_one_per_line' is set to a non-zero value + `error_at_line' keeps track of the last file name and line number + for which an error was reported and avoid directly following + messages for the same file and line. This variable is global and + shared by all threads. + +A program which read some input file and reports errors in it could look +like this: + + { + char *line = NULL; + size_t len = 0; + unsigned int lineno = 0; + + error_message_count = 0; + while (! feof_unlocked (fp)) + { + ssize_t n = getline (&line, &len, fp); + if (n <= 0) + /* End of file or error. */ + break; + ++lineno; + + /* Process the line. */ + ... + + if (Detect error in line) + error_at_line (0, errval, filename, lineno, + "some error text %s", some_variable); + } + + if (error_message_count != 0) + error (EXIT_FAILURE, 0, "%u errors found", error_message_count); + } + + `error' and `error_at_line' are clearly the functions of choice and +enable the programmer to write applications which follow the GNU coding +standard. The GNU libc additionally contains functions which are used +in BSD for the same purpose. These functions are declared in `err.h'. +It is generally advised to not use these functions. They are included +only for compatibility. + + - Function: void warn (const char *FORMAT, ...) + The `warn' function is roughly equivalent to a call like + error (0, errno, format, the parameters) + + except that the global variables `error' respects and modifies are + not used. + + - Function: void vwarn (const char *FORMAT, va_list) + The `vwarn' function is just like `warn' except that the + parameters for the handling of the format string FORMAT are passed + in as an value of type `va_list'. + + - Function: void warnx (const char *FORMAT, ...) + The `warnx' function is roughly equivalent to a call like + error (0, 0, format, the parameters) + + except that the global variables `error' respects and modifies are + not used. The difference to `warn' is that no error number string + is printed. + + - Function: void vwarnx (const char *FORMAT, va_list) + The `vwarnx' function is just like `warnx' except that the + parameters for the handling of the format string FORMAT are passed + in as an value of type `va_list'. + + - Function: void err (int STATUS, const char *FORMAT, ...) + The `err' function is roughly equivalent to a call like + error (status, errno, format, the parameters) + + except that the global variables `error' respects and modifies are + not used and that the program is exited even if STATUS is zero. + + - Function: void verr (int STATUS, const char *FORMAT, va_list) + The `verr' function is just like `err' except that the parameters + for the handling of the format string FORMAT are passed in as an + value of type `va_list'. + + - Function: void errx (int STATUS, const char *FORMAT, ...) + The `errx' function is roughly equivalent to a call like + error (status, 0, format, the parameters) + + except that the global variables `error' respects and modifies are + not used and that the program is exited even if STATUS is zero. + The difference to `err' is that no error number string is printed. + + - Function: void verrx (int STATUS, const char *FORMAT, va_list) + The `verrx' function is just like `errx' except that the + parameters for the handling of the format string FORMAT are passed + in as an value of type `va_list'. +  File: libc.info, Node: Memory, Next: Character Handling, Prev: Error Reporting, Up: Top @@ -1084,220 +1271,4 @@ than you asked for it to be, you are lia contents of another block. If you have already allocated a block and discover you want it to be bigger, use `realloc' (*note Changing Block Size::). - - -File: libc.info, Node: Freeing after Malloc, Next: Changing Block Size, Prev: Malloc Examples, Up: Unconstrained Allocation - -Freeing Memory Allocated with `malloc' -...................................... - - When you no longer need a block that you got with `malloc', use the -function `free' to make the block available to be allocated again. The -prototype for this function is in `stdlib.h'. - - - Function: void free (void *PTR) - The `free' function deallocates the block of memory pointed at by - PTR. - - - Function: void cfree (void *PTR) - This function does the same thing as `free'. It's provided for - backward compatibility with SunOS; you should use `free' instead. - - Freeing a block alters the contents of the block. *Do not expect to -find any data (such as a pointer to the next block in a chain of -blocks) in the block after freeing it.* Copy whatever you need out of -the block before freeing it! Here is an example of the proper way to -free all the blocks in a chain, and the strings that they point to: - - struct chain - { - struct chain *next; - char *name; - } - - void - free_chain (struct chain *chain) - { - while (chain != 0) - { - struct chain *next = chain->next; - free (chain->name); - free (chain); - chain = next; - } - } - - Occasionally, `free' can actually return memory to the operating -system and make the process smaller. Usually, all it can do is allow a -later call to `malloc' to reuse the space. In the meantime, the space -remains in your program as part of a free-list used internally by -`malloc'. - - There is no point in freeing blocks at the end of a program, because -all of the program's space is given back to the system when the process -terminates. - - -File: libc.info, Node: Changing Block Size, Next: Allocating Cleared Space, Prev: Freeing after Malloc, Up: Unconstrained Allocation - -Changing the Size of a Block -............................ - - Often you do not know for certain how big a block you will -ultimately need at the time you must begin to use the block. For -example, the block might be a buffer that you use to hold a line being -read from a file; no matter how long you make the buffer initially, you -may encounter a line that is longer. - - You can make the block longer by calling `realloc'. This function -is declared in `stdlib.h'. - - - Function: void * realloc (void *PTR, size_t NEWSIZE) - The `realloc' function changes the size of the block whose address - is PTR to be NEWSIZE. - - Since the space after the end of the block may be in use, `realloc' - may find it necessary to copy the block to a new address where - more free space is available. The value of `realloc' is the new - address of the block. If the block needs to be moved, `realloc' - copies the old contents. - - If you pass a null pointer for PTR, `realloc' behaves just like - `malloc (NEWSIZE)'. This can be convenient, but beware that older - implementations (before ISO C) may not support this behavior, and - will probably crash when `realloc' is passed a null pointer. - - Like `malloc', `realloc' may return a null pointer if no memory -space is available to make the block bigger. When this happens, the -original block is untouched; it has not been modified or relocated. - - In most cases it makes no difference what happens to the original -block when `realloc' fails, because the application program cannot -continue when it is out of memory, and the only thing to do is to give -a fatal error message. Often it is convenient to write and use a -subroutine, conventionally called `xrealloc', that takes care of the -error message as `xmalloc' does for `malloc': - - void * - xrealloc (void *ptr, size_t size) - { - register void *value = realloc (ptr, size); - if (value == 0) - fatal ("Virtual memory exhausted"); - return value; - } - - You can also use `realloc' to make a block smaller. The reason you -would do this is to avoid tying up a lot of memory space when only a -little is needed. In several allocation implementations, making a -block smaller sometimes necessitates copying it, so it can fail if no -other space is available. - - If the new size you specify is the same as the old size, `realloc' -is guaranteed to change nothing and return the same address that you -gave. - - -File: libc.info, Node: Allocating Cleared Space, Next: Efficiency and Malloc, Prev: Changing Block Size, Up: Unconstrained Allocation - -Allocating Cleared Space -........................ - - The function `calloc' allocates memory and clears it to zero. It is -declared in `stdlib.h'. - - - Function: void * calloc (size_t COUNT, size_t ELTSIZE) - This function allocates a block long enough to contain a vector of - COUNT elements, each of size ELTSIZE. Its contents are cleared to - zero before `calloc' returns. - - You could define `calloc' as follows: - - void * - calloc (size_t count, size_t eltsize) - { - size_t size = count * eltsize; - void *value = malloc (size); - if (value != 0) - memset (value, 0, size); - return value; - } - - But in general, it is not guaranteed that `calloc' calls `malloc' -internally. Therefore, if an application provides its own -`malloc'/`realloc'/`free' outside the C library, it should always -define `calloc', too. - - -File: libc.info, Node: Efficiency and Malloc, Next: Aligned Memory Blocks, Prev: Allocating Cleared Space, Up: Unconstrained Allocation - -Efficiency Considerations for `malloc' -...................................... - - As opposed to other versions, the `malloc' in the GNU C Library does -not round up block sizes to powers of two, neither for large nor for -small sizes. Neighboring chunks can be coalesced on a `free' no matter -what their size is. This makes the implementation suitable for all -kinds of allocation patterns without generally incurring high memory -waste through fragmentation. - - Very large blocks (much larger than a page) are allocated with -`mmap' (anonymous or via `/dev/zero') by this implementation. This has -the great advantage that these chunks are returned to the system -immediately when they are freed. Therefore, it cannot happen that a -large chunk becomes "locked" in between smaller ones and even after -calling `free' wastes memory. The size threshold for `mmap' to be used -can be adjusted with `mallopt'. The use of `mmap' can also be disabled -completely. - - -File: libc.info, Node: Aligned Memory Blocks, Next: Malloc Tunable Parameters, Prev: Efficiency and Malloc, Up: Unconstrained Allocation - -Allocating Aligned Memory Blocks -................................ - - The address of a block returned by `malloc' or `realloc' in the GNU -system is always a multiple of eight (or sixteen on 64-bit systems). -If you need a block whose address is a multiple of a higher power of -two than that, use `memalign', `posix_memalign', or `valloc'. These -functions are declared in `stdlib.h'. - - With the GNU library, you can use `free' to free the blocks that -`memalign', `posix_memalign', and `valloc' return. That does not work -in BSD, however--BSD does not provide any way to free such blocks. - - - Function: void * memalign (size_t BOUNDARY, size_t SIZE) - The `memalign' function allocates a block of SIZE bytes whose - address is a multiple of BOUNDARY. The BOUNDARY must be a power - of two! The function `memalign' works by allocating a somewhat - larger block, and then returning an address within the block that - is on the specified boundary. - - - Function: int posix_memalign (void **MEMPTR, size_t ALIGNMENT, - size_t SIZE) - The `posix_memalign' function is similar to the `memalign' - function in that it returns a buffer of SIZE bytes aligned to a - multiple of ALIGNMENT. But it adds one requirement to the - parameter ALIGNMENT: the value must be a power of two multiple of - `sizeof (void *)'. - - If the function succeeds in allocation memory a pointer to the - allocated memory is returned in `*MEMPTR' and the return value is - zero. Otherwise the function returns an error value indicating - the problem. - - This function was introduced in POSIX 1003.1d. - - - Function: void * valloc (size_t SIZE) - Using `valloc' is like using `memalign' and passing the page size - as the value of the second argument. It is implemented like this: - - void * - valloc (size_t size) - { - return memalign (getpagesize (), size); - } - - *Note Query Memory Parameters:: for more information about the - memory subsystem. diff -durpN glibc-2.2.4/manual/libc.info-30 glibc-2.2.5/manual/libc.info-30 --- glibc-2.2.4/manual/libc.info-30 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-30 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,695 +33,1301 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Mathematics, Next: Arithmetic, Prev: Syslog, Up: Top +File: libc.info, Node: Editing Characters, Next: Signal Characters, Up: Special Characters -Mathematics -*********** +Characters for Input Editing +............................ - This chapter contains information about functions for performing -mathematical computations, such as trigonometric functions. Most of -these functions have prototypes declared in the header file `math.h'. -The complex-valued functions are defined in `complex.h'. + These special characters are active only in canonical input mode. +*Note Canonical or Not::. - All mathematical functions which take a floating-point argument have -three variants, one each for `double', `float', and `long double' -arguments. The `double' versions are mostly defined in ISO C89. The -`float' and `long double' versions are from the numeric extensions to C -included in ISO C99. + - Macro: int VEOF + This is the subscript for the EOF character in the special control + character array. `TERMIOS.c_cc[VEOF]' holds the character itself. - Which of the three versions of a function should be used depends on -the situation. For most calculations, the `float' functions are the -fastest. On the other hand, the `long double' functions have the -highest precision. `double' is somewhere in between. It is usually -wise to pick the narrowest type that can accommodate your data. Not -all machines have a distinct `long double' type; it may be the same as -`double'. + The EOF character is recognized only in canonical input mode. It + acts as a line terminator in the same way as a newline character, + but if the EOF character is typed at the beginning of a line it + causes `read' to return a byte count of zero, indicating + end-of-file. The EOF character itself is discarded. -* Menu: + Usually, the EOF character is `C-d'. -* Mathematical Constants:: Precise numeric values for often-used - constants. -* Trig Functions:: Sine, cosine, tangent, and friends. -* Inverse Trig Functions:: Arcsine, arccosine, etc. -* Exponents and Logarithms:: Also pow and sqrt. -* Hyperbolic Functions:: sinh, cosh, tanh, etc. -* Special Functions:: Bessel, gamma, erf. -* Errors in Math Functions:: Known Maximum Errors in Math Functions. -* Pseudo-Random Numbers:: Functions for generating pseudo-random - numbers. -* FP Function Optimizations:: Fast code or small code. + - Macro: int VEOL + This is the subscript for the EOL character in the special control + character array. `TERMIOS.c_cc[VEOL]' holds the character itself. + + The EOL character is recognized only in canonical input mode. It + acts as a line terminator, just like a newline character. The EOL + character is not discarded; it is read as the last character in + the input line. + + You don't need to use the EOL character to make end a line. + Just set the ICRNL flag. In fact, this is the default state of + affairs. + + - Macro: int VEOL2 + This is the subscript for the EOL2 character in the special control + character array. `TERMIOS.c_cc[VEOL2]' holds the character itself. + + The EOL2 character works just like the EOL character (see above), + but it can be a different character. Thus, you can specify two + characters to terminate an input line, by setting EOL to one of + them and EOL2 to the other. + + The EOL2 character is a BSD extension; it exists only on BSD + systems and the GNU system. + + - Macro: int VERASE + This is the subscript for the ERASE character in the special + control character array. `TERMIOS.c_cc[VERASE]' holds the + character itself. + + The ERASE character is recognized only in canonical input mode. + When the user types the erase character, the previous character + typed is discarded. (If the terminal generates multibyte + character sequences, this may cause more than one byte of input to + be discarded.) This cannot be used to erase past the beginning of + the current line of text. The ERASE character itself is discarded. + + Usually, the ERASE character is . + + - Macro: int VWERASE + This is the subscript for the WERASE character in the special + control character array. `TERMIOS.c_cc[VWERASE]' holds the + character itself. + + The WERASE character is recognized only in canonical mode. It + erases an entire word of prior input, and any whitespace after it; + whitespace characters before the word are not erased. + + The definition of a "word" depends on the setting of the + `ALTWERASE' mode; *note Local Modes::. + + If the `ALTWERASE' mode is not set, a word is defined as a sequence + of any characters except space or tab. + + If the `ALTWERASE' mode is set, a word is defined as a sequence of + characters containing only letters, numbers, and underscores, + optionally followed by one character that is not a letter, number, + or underscore. + + The WERASE character is usually `C-w'. + + This is a BSD extension. + + - Macro: int VKILL + This is the subscript for the KILL character in the special control + character array. `TERMIOS.c_cc[VKILL]' holds the character itself. + + The KILL character is recognized only in canonical input mode. + When the user types the kill character, the entire contents of the + current line of input are discarded. The kill character itself is + discarded too. + + The KILL character is usually `C-u'. + + - Macro: int VREPRINT + This is the subscript for the REPRINT character in the special + control character array. `TERMIOS.c_cc[VREPRINT]' holds the + character itself. + + The REPRINT character is recognized only in canonical mode. It + reprints the current input line. If some asynchronous output has + come while you are typing, this lets you see the line you are + typing clearly again. + + The REPRINT character is usually `C-r'. + + This is a BSD extension.  -File: libc.info, Node: Mathematical Constants, Next: Trig Functions, Up: Mathematics +File: libc.info, Node: Signal Characters, Next: Start/Stop Characters, Prev: Editing Characters, Up: Special Characters -Predefined Mathematical Constants -================================= +Characters that Cause Signals +............................. - The header `math.h' defines several useful mathematical constants. -All values are defined as preprocessor macros starting with `M_'. The -values provided are: + These special characters may be active in either canonical or +noncanonical input mode, but only when the `ISIG' flag is set (*note +Local Modes::). -`M_E' - The base of natural logarithms. + - Macro: int VINTR + This is the subscript for the INTR character in the special control + character array. `TERMIOS.c_cc[VINTR]' holds the character itself. -`M_LOG2E' - The logarithm to base `2' of `M_E'. + The INTR (interrupt) character raises a `SIGINT' signal for all + processes in the foreground job associated with the terminal. The + INTR character itself is then discarded. *Note Signal Handling::, + for more information about signals. -`M_LOG10E' - The logarithm to base `10' of `M_E'. + Typically, the INTR character is `C-c'. -`M_LN2' - The natural logarithm of `2'. + - Macro: int VQUIT + This is the subscript for the QUIT character in the special control + character array. `TERMIOS.c_cc[VQUIT]' holds the character itself. -`M_LN10' - The natural logarithm of `10'. + The QUIT character raises a `SIGQUIT' signal for all processes in + the foreground job associated with the terminal. The QUIT + character itself is then discarded. *Note Signal Handling::, for + more information about signals. -`M_PI' - Pi, the ratio of a circle's circumference to its diameter. + Typically, the QUIT character is `C-\'. -`M_PI_2' - Pi divided by two. + - Macro: int VSUSP + This is the subscript for the SUSP character in the special control + character array. `TERMIOS.c_cc[VSUSP]' holds the character itself. -`M_PI_4' - Pi divided by four. + The SUSP (suspend) character is recognized only if the + implementation supports job control (*note Job Control::). It + causes a `SIGTSTP' signal to be sent to all processes in the + foreground job associated with the terminal. The SUSP character + itself is then discarded. *Note Signal Handling::, for more + information about signals. -`M_1_PI' - The reciprocal of pi (1/pi) + Typically, the SUSP character is `C-z'. -`M_2_PI' - Two times the reciprocal of pi. + Few applications disable the normal interpretation of the SUSP +character. If your program does this, it should provide some other +mechanism for the user to stop the job. When the user invokes this +mechanism, the program should send a `SIGTSTP' signal to the process +group of the process, not just to the process itself. *Note Signaling +Another Process::. -`M_2_SQRTPI' - Two times the reciprocal of the square root of pi. + - Macro: int VDSUSP + This is the subscript for the DSUSP character in the special + control character array. `TERMIOS.c_cc[VDSUSP]' holds the + character itself. -`M_SQRT2' - The square root of two. + The DSUSP (suspend) character is recognized only if the + implementation supports job control (*note Job Control::). It + sends a `SIGTSTP' signal, like the SUSP character, but not right + away--only when the program tries to read it as input. Not all + systems with job control support DSUSP; only BSD-compatible + systems (including the GNU system). -`M_SQRT1_2' - The reciprocal of the square root of two (also the square root of - 1/2). + *Note Signal Handling::, for more information about signals. - These constants come from the Unix98 standard and were also -available in 4.4BSD; therefore they are only defined if `_BSD_SOURCE' or -`_XOPEN_SOURCE=500', or a more general feature select macro, is -defined. The default set of features includes these constants. *Note -Feature Test Macros::. + Typically, the DSUSP character is `C-y'. - All values are of type `double'. As an extension, the GNU C library -also defines these constants with type `long double'. The `long -double' macros have a lowercase `l' appended to their names: `M_El', -`M_PIl', and so forth. These are only available if `_GNU_SOURCE' is -defined. + +File: libc.info, Node: Start/Stop Characters, Next: Other Special, Prev: Signal Characters, Up: Special Characters - _Note:_ Some programs use a constant named `PI' which has the same -value as `M_PI'. This constant is not standard; it may have appeared -in some old AT&T headers, and is mentioned in Stroustrup's book on C++. -It infringes on the user's name space, so the GNU C library does not -define it. Fixing programs written to expect it is simple: replace -`PI' with `M_PI' throughout, or put `-DPI=M_PI' on the compiler command -line. +Special Characters for Flow Control +................................... + + These special characters may be active in either canonical or +noncanonical input mode, but their use is controlled by the flags +`IXON' and `IXOFF' (*note Input Modes::). + + - Macro: int VSTART + This is the subscript for the START character in the special + control character array. `TERMIOS.c_cc[VSTART]' holds the + character itself. + + The START character is used to support the `IXON' and `IXOFF' + input modes. If `IXON' is set, receiving a START character resumes + suspended output; the START character itself is discarded. If + `IXANY' is set, receiving any character at all resumes suspended + output; the resuming character is not discarded unless it is the + START character. `IXOFF' is set, the system may also transmit + START characters to the terminal. + + The usual value for the START character is `C-q'. You may not be + able to change this value--the hardware may insist on using `C-q' + regardless of what you specify. + + - Macro: int VSTOP + This is the subscript for the STOP character in the special control + character array. `TERMIOS.c_cc[VSTOP]' holds the character itself. + + The STOP character is used to support the `IXON' and `IXOFF' input + modes. If `IXON' is set, receiving a STOP character causes output + to be suspended; the STOP character itself is discarded. If + `IXOFF' is set, the system may also transmit STOP characters to the + terminal, to prevent the input queue from overflowing. + + The usual value for the STOP character is `C-s'. You may not be + able to change this value--the hardware may insist on using `C-s' + regardless of what you specify.  -File: libc.info, Node: Trig Functions, Next: Inverse Trig Functions, Prev: Mathematical Constants, Up: Mathematics +File: libc.info, Node: Other Special, Prev: Start/Stop Characters, Up: Special Characters -Trigonometric Functions -======================= +Other Special Characters +........................ - These are the familiar `sin', `cos', and `tan' functions. The -arguments to all of these functions are in units of radians; recall -that pi radians equals 180 degrees. + These special characters exist only in BSD systems and the GNU +system. - The math library normally defines `M_PI' to a `double' approximation -of pi. If strict ISO and/or POSIX compliance are requested this -constant is not defined, but you can easily define it yourself: + - Macro: int VLNEXT + This is the subscript for the LNEXT character in the special + control character array. `TERMIOS.c_cc[VLNEXT]' holds the + character itself. - #define M_PI 3.14159265358979323846264338327 + The LNEXT character is recognized only when `IEXTEN' is set, but in + both canonical and noncanonical mode. It disables any special + significance of the next character the user types. Even if the + character would normally perform some editing function or generate + a signal, it is read as a plain character. This is the analogue + of the `C-q' command in Emacs. "LNEXT" stands for "literal next." -You can also compute the value of pi with the expression `acos (-1.0)'. + The LNEXT character is usually `C-v'. - - Function: double sin (double X) - - Function: float sinf (float X) - - Function: long double sinl (long double X) - These functions return the sine of X, where X is given in radians. - The return value is in the range `-1' to `1'. + - Macro: int VDISCARD + This is the subscript for the DISCARD character in the special + control character array. `TERMIOS.c_cc[VDISCARD]' holds the + character itself. - - Function: double cos (double X) - - Function: float cosf (float X) - - Function: long double cosl (long double X) - These functions return the cosine of X, where X is given in - radians. The return value is in the range `-1' to `1'. + The DISCARD character is recognized only when `IEXTEN' is set, but + in both canonical and noncanonical mode. Its effect is to toggle + the discard-output flag. When this flag is set, all program + output is discarded. Setting the flag also discards all output + currently in the output buffer. Typing any other character resets + the flag. - - Function: double tan (double X) - - Function: float tanf (float X) - - Function: long double tanl (long double X) - These functions return the tangent of X, where X is given in - radians. + - Macro: int VSTATUS + This is the subscript for the STATUS character in the special + control character array. `TERMIOS.c_cc[VSTATUS]' holds the + character itself. - Mathematically, the tangent function has singularities at odd - multiples of pi/2. If the argument X is too close to one of these - singularities, `tan' will signal overflow. + The STATUS character's effect is to print out a status message + about how the current process is running. - In many applications where `sin' and `cos' are used, the sine and -cosine of the same angle are needed at the same time. It is more -efficient to compute them simultaneously, so the library provides a -function to do that. + The STATUS character is recognized only in canonical mode, and + only if `NOKERNINFO' is not set. - - Function: void sincos (double X, double *SINX, double *COSX) - - Function: void sincosf (float X, float *SINX, float *COSX) - - Function: void sincosl (long double X, long double *SINX, long - double *COSX) - These functions return the sine of X in `*SINX' and the cosine of - X in `*COS', where X is given in radians. Both values, `*SINX' - and `*COSX', are in the range of `-1' to `1'. + +File: libc.info, Node: Noncanonical Input, Prev: Special Characters, Up: Terminal Modes - This function is a GNU extension. Portable programs should be - prepared to cope with its absence. +Noncanonical Input +------------------ - ISO C99 defines variants of the trig functions which work on complex -numbers. The GNU C library provides these functions, but they are only -useful if your compiler supports the new complex types defined by the -standard. (As of this writing GCC supports complex numbers, but there -are bugs in the implementation.) + In noncanonical input mode, the special editing characters such as +ERASE and KILL are ignored. The system facilities for the user to edit +input are disabled in noncanonical mode, so that all input characters +(unless they are special for signal or flow-control purposes) are passed +to the application program exactly as typed. It is up to the +application program to give the user ways to edit the input, if +appropriate. - - Function: complex double csin (complex double Z) - - Function: complex float csinf (complex float Z) - - Function: complex long double csinl (complex long double Z) - These functions return the complex sine of Z. The mathematical - definition of the complex sine is + Noncanonical mode offers special parameters called MIN and TIME for +controlling whether and how long to wait for input to be available. You +can even use them to avoid ever waiting--to return immediately with +whatever input is available, or with no input. - sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i)). + The MIN and TIME are stored in elements of the `c_cc' array, which +is a member of the `struct termios' structure. Each element of this +array has a particular role, and each element has a symbolic constant +that stands for the index of that element. `VMIN' and `VMAX' are the +names for the indices in the array of the MIN and TIME slots. - - Function: complex double ccos (complex double Z) - - Function: complex float ccosf (complex float Z) - - Function: complex long double ccosl (complex long double Z) - These functions return the complex cosine of Z. The mathematical - definition of the complex cosine is + - Macro: int VMIN + This is the subscript for the MIN slot in the `c_cc' array. Thus, + `TERMIOS.c_cc[VMIN]' is the value itself. - cos (z) = 1/2 * (exp (z*i) + exp (-z*i)) + The MIN slot is only meaningful in noncanonical input mode; it + specifies the minimum number of bytes that must be available in the + input queue in order for `read' to return. - - Function: complex double ctan (complex double Z) - - Function: complex float ctanf (complex float Z) - - Function: complex long double ctanl (complex long double Z) - These functions return the complex tangent of Z. The mathematical - definition of the complex tangent is + - Macro: int VTIME + This is the subscript for the TIME slot in the `c_cc' array. Thus, + `TERMIOS.c_cc[VTIME]' is the value itself. - tan (z) = -i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i)) + The TIME slot is only meaningful in noncanonical input mode; it + specifies how long to wait for input before returning, in units of + 0.1 seconds. - The complex tangent has poles at pi/2 + 2n, where n is an integer. - `ctan' may signal overflow if Z is too close to a pole. + The MIN and TIME values interact to determine the criterion for when +`read' should return; their precise meanings depend on which of them +are nonzero. There are four possible cases: + + * Both TIME and MIN are nonzero. + + In this case, TIME specifies how long to wait after each input + character to see if more input arrives. After the first character + received, `read' keeps waiting until either MIN bytes have arrived + in all, or TIME elapses with no further input. + + `read' always blocks until the first character arrives, even if + TIME elapses first. `read' can return more than MIN characters if + more than MIN happen to be in the queue. + + * Both MIN and TIME are zero. + + In this case, `read' always returns immediately with as many + characters as are available in the queue, up to the number + requested. If no input is immediately available, `read' returns a + value of zero. + + * MIN is zero but TIME has a nonzero value. + + In this case, `read' waits for time TIME for input to become + available; the availability of a single byte is enough to satisfy + the read request and cause `read' to return. When it returns, it + returns as many characters as are available, up to the number + requested. If no input is available before the timer expires, + `read' returns a value of zero. + + * TIME is zero but MIN has a nonzero value. + + In this case, `read' waits until at least MIN bytes are available + in the queue. At that time, `read' returns as many characters as + are available, up to the number requested. `read' can return more + than MIN characters if more than MIN happen to be in the queue. + + What happens if MIN is 50 and you ask to read just 10 bytes? +Normally, `read' waits until there are 50 bytes in the buffer (or, more +generally, the wait condition described above is satisfied), and then +reads 10 of them, leaving the other 40 buffered in the operating system +for a subsequent call to `read'. + + *Portability note:* On some systems, the MIN and TIME slots are +actually the same as the EOF and EOL slots. This causes no serious +problem because the MIN and TIME slots are used only in noncanonical +input and the EOF and EOL slots are used only in canonical input, but it +isn't very clean. The GNU library allocates separate slots for these +uses. + + - Function: int cfmakeraw (struct termios *TERMIOS-P) + This function provides an easy way to set up `*TERMIOS-P' for what + has traditionally been called "raw mode" in BSD. This uses + noncanonical input, and turns off most processing to give an + unmodified channel to the terminal. + + It does exactly this: + TERMIOS-P->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP + |INLCR|IGNCR|ICRNL|IXON); + TERMIOS-P->c_oflag &= ~OPOST; + TERMIOS-P->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + TERMIOS-P->c_cflag &= ~(CSIZE|PARENB); + TERMIOS-P->c_cflag |= CS8;  -File: libc.info, Node: Inverse Trig Functions, Next: Exponents and Logarithms, Prev: Trig Functions, Up: Mathematics +File: libc.info, Node: BSD Terminal Modes, Next: Line Control, Prev: Terminal Modes, Up: Low-Level Terminal Interface -Inverse Trigonometric Functions -=============================== +BSD Terminal Modes +================== - These are the usual arc sine, arc cosine and arc tangent functions, -which are the inverses of the sine, cosine and tangent functions -respectively. + The usual way to get and set terminal modes is with the functions +described in *Note Terminal Modes::. However, on some systems you can +use the BSD-derived functions in this section to do some of the same +thing. On many systems, these functions do not exist. Even with the +GNU C library, the functions simply fail with `errno' = `ENOSYS' with +many kernels, including Linux. - - Function: double asin (double X) - - Function: float asinf (float X) - - Function: long double asinl (long double X) - These functions compute the arc sine of X--that is, the value whose - sine is X. The value is in units of radians. Mathematically, - there are infinitely many such values; the one actually returned - is the one between `-pi/2' and `pi/2' (inclusive). + The symbols used in this section are declared in `sgtty.h'. - The arc sine function is defined mathematically only over the - domain `-1' to `1'. If X is outside the domain, `asin' signals a - domain error. + - Data Type: struct sgttyb + This structure is an input or output parameter list for `gtty' and + `stty'. - - Function: double acos (double X) - - Function: float acosf (float X) - - Function: long double acosl (long double X) - These functions compute the arc cosine of X--that is, the value - whose cosine is X. The value is in units of radians. - Mathematically, there are infinitely many such values; the one - actually returned is the one between `0' and `pi' (inclusive). + `char sg_ispeed' + Line speed for input - The arc cosine function is defined mathematically only over the - domain `-1' to `1'. If X is outside the domain, `acos' signals a - domain error. + `char sg_ospeed' + Line speed for output - - Function: double atan (double X) - - Function: float atanf (float X) - - Function: long double atanl (long double X) - These functions compute the arc tangent of X--that is, the value - whose tangent is X. The value is in units of radians. - Mathematically, there are infinitely many such values; the one - actually returned is the one between `-pi/2' and `pi/2' - (inclusive). + `char sg_erase' + Erase character - - Function: double atan2 (double Y, double X) - - Function: float atan2f (float Y, float X) - - Function: long double atan2l (long double Y, long double X) - This function computes the arc tangent of Y/X, but the signs of - both arguments are used to determine the quadrant of the result, - and X is permitted to be zero. The return value is given in - radians and is in the range `-pi' to `pi', inclusive. + `char sg_kill' + Kill character - If X and Y are coordinates of a point in the plane, `atan2' - returns the signed angle between the line from the origin to that - point and the x-axis. Thus, `atan2' is useful for converting - Cartesian coordinates to polar coordinates. (To compute the - radial coordinate, use `hypot'; see *Note Exponents and - Logarithms::.) + `int sg_flags' + Various flags - If both X and Y are zero, `atan2' returns zero. + - Function: int gtty (int FILEDES, struct sgttyb *ATTRIBUTES) + This function gets the attributes of a terminal. - ISO C99 defines complex versions of the inverse trig functions. + `gtty' sets *ATTRIBUTES to describe the terminal attributes of the + terminal which is open with file descriptor FILEDES. - - Function: complex double casin (complex double Z) - - Function: complex float casinf (complex float Z) - - Function: complex long double casinl (complex long double Z) - These functions compute the complex arc sine of Z--that is, the - value whose sine is Z. The value returned is in radians. + - Function: int stty (int FILEDES, struct sgttyb * attributes) + This function sets the attributes of a terminal. - Unlike the real-valued functions, `casin' is defined for all - values of Z. + `stty' sets the terminal attributes of the terminal which is open + with file descriptor FILEDES to those described by *FILEDES. - - Function: complex double cacos (complex double Z) - - Function: complex float cacosf (complex float Z) - - Function: complex long double cacosl (complex long double Z) - These functions compute the complex arc cosine of Z--that is, the - value whose cosine is Z. The value returned is in radians. + +File: libc.info, Node: Line Control, Next: Noncanon Example, Prev: BSD Terminal Modes, Up: Low-Level Terminal Interface - Unlike the real-valued functions, `cacos' is defined for all - values of Z. +Line Control Functions +====================== - - Function: complex double catan (complex double Z) - - Function: complex float catanf (complex float Z) - - Function: complex long double catanl (complex long double Z) - These functions compute the complex arc tangent of Z--that is, the - value whose tangent is Z. The value is in units of radians. + These functions perform miscellaneous control actions on terminal +devices. As regards terminal access, they are treated like doing +output: if any of these functions is used by a background process on its +controlling terminal, normally all processes in the process group are +sent a `SIGTTOU' signal. The exception is if the calling process +itself is ignoring or blocking `SIGTTOU' signals, in which case the +operation is performed and no signal is sent. *Note Job Control::. + + - Function: int tcsendbreak (int FILEDES, int DURATION) + This function generates a break condition by transmitting a stream + of zero bits on the terminal associated with the file descriptor + FILEDES. The duration of the break is controlled by the DURATION + argument. If zero, the duration is between 0.25 and 0.5 seconds. + The meaning of a nonzero value depends on the operating system. + + This function does nothing if the terminal is not an asynchronous + serial data port. + + The return value is normally zero. In the event of an error, a + value of -1 is returned. The following `errno' error conditions + are defined for this function: + + `EBADF' + The FILEDES is not a valid file descriptor. + + `ENOTTY' + The FILEDES is not associated with a terminal device. + + - Function: int tcdrain (int FILEDES) + The `tcdrain' function waits until all queued output to the + terminal FILEDES has been transmitted. + + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `tcdrain' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `tcdrain' should be protected using cancellation handlers. + + The return value is normally zero. In the event of an error, a + value of -1 is returned. The following `errno' error conditions + are defined for this function: + + `EBADF' + The FILEDES is not a valid file descriptor. + + `ENOTTY' + The FILEDES is not associated with a terminal device. + + `EINTR' + The operation was interrupted by delivery of a signal. *Note + Interrupted Primitives::. + + - Function: int tcflush (int FILEDES, int QUEUE) + The `tcflush' function is used to clear the input and/or output + queues associated with the terminal file FILEDES. The QUEUE + argument specifies which queue(s) to clear, and can be one of the + following values: + + `TCIFLUSH' + Clear any input data received, but not yet read. + + `TCOFLUSH' + Clear any output data written, but not yet transmitted. + + `TCIOFLUSH' + Clear both queued input and output. + + The return value is normally zero. In the event of an error, a + value of -1 is returned. The following `errno' error conditions + are defined for this function: + + `EBADF' + The FILEDES is not a valid file descriptor. + + `ENOTTY' + The FILEDES is not associated with a terminal device. + + `EINVAL' + A bad value was supplied as the QUEUE argument. + + It is unfortunate that this function is named `tcflush', because + the term "flush" is normally used for quite another + operation--waiting until all output is transmitted--and using it + for discarding input or output would be confusing. Unfortunately, + the name `tcflush' comes from POSIX and we cannot change it. + + - Function: int tcflow (int FILEDES, int ACTION) + The `tcflow' function is used to perform operations relating to + XON/XOFF flow control on the terminal file specified by FILEDES. + + The ACTION argument specifies what operation to perform, and can + be one of the following values: + + `TCOOFF' + Suspend transmission of output. + + `TCOON' + Restart transmission of output. + + `TCIOFF' + Transmit a STOP character. + + `TCION' + Transmit a START character. + + For more information about the STOP and START characters, see + *Note Special Characters::. + + The return value is normally zero. In the event of an error, a + value of -1 is returned. The following `errno' error conditions + are defined for this function: + + `EBADF' + The FILEDES is not a valid file descriptor. + + `ENOTTY' + The FILEDES is not associated with a terminal device. + + `EINVAL' + A bad value was supplied as the ACTION argument.  -File: libc.info, Node: Exponents and Logarithms, Next: Hyperbolic Functions, Prev: Inverse Trig Functions, Up: Mathematics +File: libc.info, Node: Noncanon Example, Next: Pseudo-Terminals, Prev: Line Control, Up: Low-Level Terminal Interface -Exponentiation and Logarithms -============================= +Noncanonical Mode Example +========================= - - Function: double exp (double X) - - Function: float expf (float X) - - Function: long double expl (long double X) - These functions compute `e' (the base of natural logarithms) raised - to the power X. + Here is an example program that shows how you can set up a terminal +device to read single characters in noncanonical input mode, without +echo. - If the magnitude of the result is too large to be representable, - `exp' signals overflow. + #include + #include + #include + #include + + /* Use this variable to remember original terminal attributes. */ + + struct termios saved_attributes; + + void + reset_input_mode (void) + { + tcsetattr (STDIN_FILENO, TCSANOW, &saved_attributes); + } + + void + set_input_mode (void) + { + struct termios tattr; + char *name; + + /* Make sure stdin is a terminal. */ + if (!isatty (STDIN_FILENO)) + { + fprintf (stderr, "Not a terminal.\n"); + exit (EXIT_FAILURE); + } + + /* Save the terminal attributes so we can restore them later. */ + tcgetattr (STDIN_FILENO, &saved_attributes); + atexit (reset_input_mode); + + /* Set the funny terminal modes. */ + tcgetattr (STDIN_FILENO, &tattr); + tattr.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */ + tattr.c_cc[VMIN] = 1; + tattr.c_cc[VTIME] = 0; + tcsetattr (STDIN_FILENO, TCSAFLUSH, &tattr); + } + + int + main (void) + { + char c; + + set_input_mode (); + + while (1) + { + read (STDIN_FILENO, &c, 1); + if (c == '\004') /* `C-d' */ + break; + else + putchar (c); + } + + return EXIT_SUCCESS; + } - - Function: double exp2 (double X) - - Function: float exp2f (float X) - - Function: long double exp2l (long double X) - These functions compute `2' raised to the power X. - Mathematically, `exp2 (x)' is the same as `exp (x * log (2))'. + This program is careful to restore the original terminal modes before +exiting or terminating with a signal. It uses the `atexit' function +(*note Cleanups on Exit::) to make sure this is done by `exit'. - - Function: double exp10 (double X) - - Function: float exp10f (float X) - - Function: long double exp10l (long double X) - - Function: double pow10 (double X) - - Function: float pow10f (float X) - - Function: long double pow10l (long double X) - These functions compute `10' raised to the power X. - Mathematically, `exp10 (x)' is the same as `exp (x * log (10))'. + The shell is supposed to take care of resetting the terminal modes +when a process is stopped or continued; see *Note Job Control::. But +some existing shells do not actually do this, so you may wish to +establish handlers for job control signals that reset terminal modes. +The above example does so. - These functions are GNU extensions. The name `exp10' is - preferred, since it is analogous to `exp' and `exp2'. + +File: libc.info, Node: Pseudo-Terminals, Prev: Noncanon Example, Up: Low-Level Terminal Interface - - Function: double log (double X) - - Function: float logf (float X) - - Function: long double logl (long double X) - These functions compute the natural logarithm of X. `exp (log - (X))' equals X, exactly in mathematics and approximately in C. +Pseudo-Terminals +================ - If X is negative, `log' signals a domain error. If X is zero, it - returns negative infinity; if X is too close to zero, it may - signal overflow. + A "pseudo-terminal" is a special interprocess communication channel +that acts like a terminal. One end of the channel is called the +"master" side or "master pseudo-terminal device", the other side is +called the "slave" side. Data written to the master side is received +by the slave side as if it was the result of a user typing at an +ordinary terminal, and data written to the slave side is sent to the +master side as if it was written on an ordinary terminal. - - Function: double log10 (double X) - - Function: float log10f (float X) - - Function: long double log10l (long double X) - These functions return the base-10 logarithm of X. `log10 (X)' - equals `log (X) / log (10)'. + Pseudo terminals are the way programs like `xterm' and `emacs' +implement their terminal emulation functionality. +* Menu: - - Function: double log2 (double X) - - Function: float log2f (float X) - - Function: long double log2l (long double X) - These functions return the base-2 logarithm of X. `log2 (X)' - equals `log (X) / log (2)'. +* Allocation:: Allocating a pseudo terminal. +* Pseudo-Terminal Pairs:: How to open both sides of a + pseudo-terminal in a single operation. - - Function: double logb (double X) - - Function: float logbf (float X) - - Function: long double logbl (long double X) - These functions extract the exponent of X and return it as a - floating-point value. If `FLT_RADIX' is two, `logb' is equal to - `floor (log2 (x))', except it's probably faster. + +File: libc.info, Node: Allocation, Next: Pseudo-Terminal Pairs, Up: Pseudo-Terminals - If X is de-normalized, `logb' returns the exponent X would have if - it were normalized. If X is infinity (positive or negative), - `logb' returns oo. If X is zero, `logb' returns oo. It does not - signal. +Allocating Pseudo-Terminals +--------------------------- - - Function: int ilogb (double X) - - Function: int ilogbf (float X) - - Function: int ilogbl (long double X) - These functions are equivalent to the corresponding `logb' - functions except that they return signed integer values. + This subsection describes functions for allocating a pseudo-terminal, +and for making this pseudo-terminal available for actual use. These +functions are declared in the header file `stdlib.h'. -Since integers cannot represent infinity and NaN, `ilogb' instead -returns an integer that can't be the exponent of a normal floating-point -number. `math.h' defines constants so you can check for this. + - Function: int getpt (void) + The `getpt' function returns a new file descriptor for the next + available master pseudo-terminal. The normal return value from + `getpt' is a non-negative integer file descriptor. In the case of + an error, a value of -1 is returned instead. The following + `errno' conditions are defined for this function: - - Macro: int FP_ILOGB0 - `ilogb' returns this value if its argument is `0'. The numeric - value is either `INT_MIN' or `-INT_MAX'. + `ENOENT' + There are no free master pseudo-terminals available. - This macro is defined in ISO C99. + This function is a GNU extension. - - Macro: int FP_ILOGBNAN - `ilogb' returns this value if its argument is `NaN'. The numeric - value is either `INT_MIN' or `INT_MAX'. + - Function: int grantpt (int FILEDES) + The `grantpt' function changes the ownership and access permission + of the slave pseudo-terminal device corresponding to the master + pseudo-terminal device associated with the file descriptor + FILEDES. The owner is set from the real user ID of the calling + process (*note Process Persona::), and the group is set to a + special group (typically "tty") or from the real group ID of the + calling process. The access permission is set such that the file + is both readable and writable by the owner and only writable by + the group. - This macro is defined in ISO C99. + On some systems this function is implemented by invoking a special + `setuid' root program (*note How Change Persona::). As a + consequence, installing a signal handler for the `SIGCHLD' signal + (*note Job Control Signals::) may interfere with a call to + `grantpt'. - These values are system specific. They might even be the same. The -proper way to test the result of `ilogb' is as follows: + The normal return value from `grantpt' is 0; a value of -1 is + returned in case of failure. The following `errno' error + conditions are defined for this function: - i = ilogb (f); - if (i == FP_ILOGB0 || i == FP_ILOGBNAN) - { - if (isnan (f)) - { - /* Handle NaN. */ - } - else if (f == 0.0) - { - /* Handle 0.0. */ - } - else - { - /* Some other value with large exponent, - perhaps +Inf. */ - } - } + `EBADF' + The FILEDES argument is not a valid file descriptor. - - Function: double pow (double BASE, double POWER) - - Function: float powf (float BASE, float POWER) - - Function: long double powl (long double BASE, long double POWER) - These are general exponentiation functions, returning BASE raised - to POWER. + `EINVAL' + The FILEDES argument is not associated with a master + pseudo-terminal device. - Mathematically, `pow' would return a complex number when BASE is - negative and POWER is not an integral value. `pow' can't do that, - so instead it signals a domain error. `pow' may also underflow or - overflow the destination type. + `EACCES' + The slave pseudo-terminal device corresponding to the master + associated with FILEDES could not be accessed. - - Function: double sqrt (double X) - - Function: float sqrtf (float X) - - Function: long double sqrtl (long double X) - These functions return the nonnegative square root of X. - If X is negative, `sqrt' signals a domain error. Mathematically, - it should return a complex number. + - Function: int unlockpt (int FILEDES) + The `unlockpt' function unlocks the slave pseudo-terminal device + corresponding to the master pseudo-terminal device associated with + the file descriptor FILEDES. On many systems, the slave can only + be opened after unlocking, so portable applications should always + call `unlockpt' before trying to open the slave. - - Function: double cbrt (double X) - - Function: float cbrtf (float X) - - Function: long double cbrtl (long double X) - These functions return the cube root of X. They cannot fail; - every representable real value has a representable real cube root. + The normal return value from `unlockpt' is 0; a value of -1 is + returned in case of failure. The following `errno' error + conditions are defined for this function: - - Function: double hypot (double X, double Y) - - Function: float hypotf (float X, float Y) - - Function: long double hypotl (long double X, long double Y) - These functions return `sqrt (X*X + Y*Y)'. This is the length of - the hypotenuse of a right triangle with sides of length X and Y, - or the distance of the point (X, Y) from the origin. Using this - function instead of the direct formula is wise, since the error is - much smaller. See also the function `cabs' in *Note Absolute - Value::. + `EBADF' + The FILEDES argument is not a valid file descriptor. - - Function: double expm1 (double X) - - Function: float expm1f (float X) - - Function: long double expm1l (long double X) - These functions return a value equivalent to `exp (X) - 1'. They - are computed in a way that is accurate even if X is near zero--a - case where `exp (X) - 1' would be inaccurate owing to subtraction - of two numbers that are nearly equal. + `EINVAL' + The FILEDES argument is not associated with a master + pseudo-terminal device. - - Function: double log1p (double X) - - Function: float log1pf (float X) - - Function: long double log1pl (long double X) - These functions returns a value equivalent to `log (1 + X)'. They - are computed in a way that is accurate even if X is near zero. + - Function: char * ptsname (int FILEDES) + If the file descriptor FILEDES is associated with a master + pseudo-terminal device, the `ptsname' function returns a pointer + to a statically-allocated, null-terminated string containing the + file name of the associated slave pseudo-terminal file. This + string might be overwritten by subsequent calls to `ptsname'. - ISO C99 defines complex variants of some of the exponentiation and -logarithm functions. + - Function: int ptsname_r (int FILEDES, char *BUF, size_t LEN) + The `ptsname_r' function is similar to the `ptsname' function + except that it places its result into the user-specified buffer + starting at BUF with length LEN. - - Function: complex double cexp (complex double Z) - - Function: complex float cexpf (complex float Z) - - Function: complex long double cexpl (complex long double Z) - These functions return `e' (the base of natural logarithms) raised - to the power of Z. Mathematically, this corresponds to the value + This function is a GNU extension. - exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z))) + *Portability Note:* On System V derived systems, the file returned +by the `ptsname' and `ptsname_r' functions may be STREAMS-based, and +therefore require additional processing after opening before it +actually behaves as a pseudo terminal. - - Function: complex double clog (complex double Z) - - Function: complex float clogf (complex float Z) - - Function: complex long double clogl (complex long double Z) - These functions return the natural logarithm of Z. - Mathematically, this corresponds to the value + Typical usage of these functions is illustrated by the following +example: + int + open_pty_pair (int *amaster, int *aslave) + { + int master, slave; + char *name; + + master = getpt (); + if (master < 0) + return 0; + + if (grantpt (master) < 0 || unlockpt (master) < 0) + goto close_master; + name = ptsname (master); + if (name == NULL) + goto close_master; + + slave = open (name, O_RDWR); + if (slave == -1) + goto close_master; + + if (isastream (slave)) + { + if (ioctl (slave, I_PUSH, "ptem") < 0 + || ioctl (slave, I_PUSH, "ldterm") < 0) + goto close_slave; + } + + *amaster = master; + *aslave = slave; + return 1; + + close_slave: + close (slave); + + close_master: + close (master); + return 0; + } - log (z) = log (cabs (z)) + I * carg (z) + +File: libc.info, Node: Pseudo-Terminal Pairs, Prev: Allocation, Up: Pseudo-Terminals - `clog' has a pole at 0, and will signal overflow if Z equals or is - very close to 0. It is well-defined for all other values of Z. +Opening a Pseudo-Terminal Pair +------------------------------ - - Function: complex double clog10 (complex double Z) - - Function: complex float clog10f (complex float Z) - - Function: complex long double clog10l (complex long double Z) - These functions return the base 10 logarithm of the complex value - Z. Mathematically, this corresponds to the value + These functions, derived from BSD, are available in the separate +`libutil' library, and declared in `pty.h'. - log (z) = log10 (cabs (z)) + I * carg (z) + - Function: int openpty (int *AMASTER, int *ASLAVE, char *NAME, struct + termios *TERMP, struct winsize *WINP) + This function allocates and opens a pseudo-terminal pair, + returning the file descriptor for the master in *AMASTER, and the + file descriptor for the slave in *ASLAVE. If the argument NAME is + not a null pointer, the file name of the slave pseudo-terminal + device is stored in `*name'. If TERMP is not a null pointer, the + terminal attributes of the slave are set to the ones specified in + the structure that TERMP points to (*note Terminal Modes::). + Likewise, if the WINP is not a null pointer, the screen size of + the slave is set to the values specified in the structure that + WINP points to. - These functions are GNU extensions. + The normal return value from `openpty' is 0; a value of -1 is + returned in case of failure. The following `errno' conditions are + defined for this function: - - Function: complex double csqrt (complex double Z) - - Function: complex float csqrtf (complex float Z) - - Function: complex long double csqrtl (complex long double Z) - These functions return the complex square root of the argument Z. - Unlike the real-valued functions, they are defined for all values - of Z. + `ENOENT' + There are no free pseudo-terminal pairs available. - - Function: complex double cpow (complex double BASE, complex double - POWER) - - Function: complex float cpowf (complex float BASE, complex float - POWER) - - Function: complex long double cpowl (complex long double BASE, - complex long double POWER) - These functions return BASE raised to the power of POWER. This is - equivalent to `cexp (y * clog (x))' + *Warning:* Using the `openpty' function with NAME not set to + `NULL' is *very dangerous* because it provides no protection + against overflowing the string NAME. You should use the `ttyname' + function on the file descriptor returned in *SLAVE to find out the + file name of the slave pseudo-terminal device instead. + + - Function: int forkpty (int *AMASTER, char *NAME, struct termios + *TERMP, struct winsize *WINP) + This function is similar to the `openpty' function, but in + addition, forks a new process (*note Creating a Process::) and + makes the newly opened slave pseudo-terminal device the + controlling terminal (*note Controlling Terminal::) for the child + process. + + If the operation is successful, there are then both parent and + child processes and both see `forkpty' return, but with different + values: it returns a value of 0 in the child process and returns + the child's process ID in the parent process. + + If the allocation of a pseudo-terminal pair or the process creation + failed, `forkpty' returns a value of -1 in the parent process. + + *Warning:* The `forkpty' function has the same problems with + respect to the NAME argument as `openpty'.  -File: libc.info, Node: Hyperbolic Functions, Next: Special Functions, Prev: Exponents and Logarithms, Up: Mathematics +File: libc.info, Node: Syslog, Next: Mathematics, Prev: Low-Level Terminal Interface, Up: Top -Hyperbolic Functions -==================== +Syslog +****** - The functions in this section are related to the exponential -functions; see *Note Exponents and Logarithms::. + This chapter describes facilities for issuing and logging messages of +system administration interest. This chapter has nothing to do with +programs issuing messages to their own users or keeping private logs +(One would typically do that with the facilities described in *Note I/O +on Streams::). - - Function: double sinh (double X) - - Function: float sinhf (float X) - - Function: long double sinhl (long double X) - These functions return the hyperbolic sine of X, defined - mathematically as `(exp (X) - exp (-X)) / 2'. They may signal - overflow if X is too large. + Most systems have a facility called "Syslog" that allows programs to +submit messages of interest to system administrators and can be +configured to pass these messages on in various ways, such as printing +on the console, mailing to a particular person, or recording in a log +file for future reference. - - Function: double cosh (double X) - - Function: float coshf (float X) - - Function: long double coshl (long double X) - These function return the hyperbolic cosine of X, defined - mathematically as `(exp (X) + exp (-X)) / 2'. They may signal - overflow if X is too large. + A program uses the facilities in this chapter to submit such +messages. - - Function: double tanh (double X) - - Function: float tanhf (float X) - - Function: long double tanhl (long double X) - These functions return the hyperbolic tangent of X, defined - mathematically as `sinh (X) / cosh (X)'. They may signal overflow - if X is too large. +* Menu: - There are counterparts for the hyperbolic functions which take -complex arguments. +* Overview of Syslog:: Overview of a system's Syslog facility +* Submitting Syslog Messages:: Functions to submit messages to Syslog - - Function: complex double csinh (complex double Z) - - Function: complex float csinhf (complex float Z) - - Function: complex long double csinhl (complex long double Z) - These functions return the complex hyperbolic sine of Z, defined - mathematically as `(exp (Z) - exp (-Z)) / 2'. + +File: libc.info, Node: Overview of Syslog, Next: Submitting Syslog Messages, Up: Syslog - - Function: complex double ccosh (complex double Z) - - Function: complex float ccoshf (complex float Z) - - Function: complex long double ccoshl (complex long double Z) - These functions return the complex hyperbolic cosine of Z, defined - mathematically as `(exp (Z) + exp (-Z)) / 2'. +Overview of Syslog +================== - - Function: complex double ctanh (complex double Z) - - Function: complex float ctanhf (complex float Z) - - Function: complex long double ctanhl (complex long double Z) - These functions return the complex hyperbolic tangent of Z, - defined mathematically as `csinh (Z) / ccosh (Z)'. + System administrators have to deal with lots of different kinds of +messages from a plethora of subsystems within each system, and usually +lots of systems as well. For example, an FTP server might report every +connection it gets. The kernel might report hardware failures on a disk +drive. A DNS server might report usage statistics at regular intervals. - - Function: double asinh (double X) - - Function: float asinhf (float X) - - Function: long double asinhl (long double X) - These functions return the inverse hyperbolic sine of X--the value - whose hyperbolic sine is X. + Some of these messages need to be brought to a system administrator's +attention immediately. And it may not be just any system administrator +- there may be a particular system administrator who deals with a +particular kind of message. Other messages just need to be recorded for +future reference if there is a problem. Still others may need to have +information extracted from them by an automated process that generates +monthly reports. - - Function: double acosh (double X) - - Function: float acoshf (float X) - - Function: long double acoshl (long double X) - These functions return the inverse hyperbolic cosine of X--the - value whose hyperbolic cosine is X. If X is less than `1', - `acosh' signals a domain error. + To deal with these messages, most Unix systems have a facility called +"Syslog." It is generally based on a daemon called "Syslogd" Syslogd +listens for messages on a Unix domain socket named `/dev/log'. Based +on classification information in the messages and its configuration +file (usually `/etc/syslog.conf'), Syslogd routes them in various ways. +Some of the popular routings are: - - Function: double atanh (double X) - - Function: float atanhf (float X) - - Function: long double atanhl (long double X) - These functions return the inverse hyperbolic tangent of X--the - value whose hyperbolic tangent is X. If the absolute value of X - is greater than `1', `atanh' signals a domain error; if it is - equal to 1, `atanh' returns infinity. + * Write to the system console - - Function: complex double casinh (complex double Z) - - Function: complex float casinhf (complex float Z) - - Function: complex long double casinhl (complex long double Z) - These functions return the inverse complex hyperbolic sine of - Z--the value whose complex hyperbolic sine is Z. + * Mail to a specific user - - Function: complex double cacosh (complex double Z) - - Function: complex float cacoshf (complex float Z) - - Function: complex long double cacoshl (complex long double Z) - These functions return the inverse complex hyperbolic cosine of - Z--the value whose complex hyperbolic cosine is Z. Unlike the - real-valued functions, there are no restrictions on the value of Z. + * Write to a log file - - Function: complex double catanh (complex double Z) - - Function: complex float catanhf (complex float Z) - - Function: complex long double catanhl (complex long double Z) - These functions return the inverse complex hyperbolic tangent of - Z--the value whose complex hyperbolic tangent is Z. Unlike the - real-valued functions, there are no restrictions on the value of Z. + * Pass to another daemon + + * Discard + + Syslogd can also handle messages from other systems. It listens on +the `syslog' UDP port as well as the local socket for messages. + + Syslog can handle messages from the kernel itself. But the kernel +doesn't write to `/dev/log'; rather, another daemon (sometimes called +"Klogd") extracts messages from the kernel and passes them on to Syslog +as any other process would (and it properly identifies them as messages +from the kernel). + + Syslog can even handle messages that the kernel issued before +Syslogd or Klogd was running. A Linux kernel, for example, stores +startup messages in a kernel message ring and they are normally still +there when Klogd later starts up. Assuming Syslogd is running by the +time Klogd starts, Klogd then passes everything in the message ring to +it. + + In order to classify messages for disposition, Syslog requires any +process that submits a message to it to provide two pieces of +classification information with it: + +facility + This identifies who submitted the message. There are a small + number of facilities defined. The kernel, the mail subsystem, and + an FTP server are examples of recognized facilities. For the + complete list, *Note syslog; vsyslog::. Keep in mind that these + are essentially arbitrary classifications. "Mail subsystem" + doesn't have any more meaning than the system administrator gives + to it. + +priority + This tells how important the content of the message is. Examples + of defined priority values are: debug, informational, warning, + critical. For the complete list, *Note syslog; vsyslog::. Except + for the fact that the priorities have a defined order, the meaning + of each of these priorities is entirely determined by the system + administrator. + + A "facility/priority" is a number that indicates both the facility +and the priority. + + *Warning:* This terminology is not universal. Some people use +"level" to refer to the priority and "priority" to refer to the +combination of facility and priority. A Linux kernel has a concept of a +message "level," which corresponds both to a Syslog priority and to a +Syslog facility/priority (It can be both because the facility code for +the kernel is zero, and that makes priority and facility/priority the +same value). + + The GNU C library provides functions to submit messages to Syslog. +They do it by writing to the `/dev/log' socket. *Note Submitting +Syslog Messages::. + + The GNU C library functions only work to submit messages to the +Syslog facility on the same system. To submit a message to the Syslog +facility on another system, use the socket I/O functions to write a UDP +datagram to the `syslog' UDP port on that system. *Note Sockets::.  -File: libc.info, Node: Special Functions, Next: Errors in Math Functions, Prev: Hyperbolic Functions, Up: Mathematics +File: libc.info, Node: Submitting Syslog Messages, Prev: Overview of Syslog, Up: Syslog -Special Functions -================= +Submitting Syslog Messages +========================== - These are some more exotic mathematical functions which are sometimes -useful. Currently they only have real-valued versions. + The GNU C library provides functions to submit messages to the Syslog +facility: - - Function: double erf (double X) - - Function: float erff (float X) - - Function: long double erfl (long double X) - `erf' returns the error function of X. The error function is - defined as - erf (x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt +* Menu: - - Function: double erfc (double X) - - Function: float erfcf (float X) - - Function: long double erfcl (long double X) - `erfc' returns `1.0 - erf(X)', but computed in a fashion that - avoids round-off error when X is large. +* openlog:: Open connection to Syslog +* syslog; vsyslog:: Submit message to Syslog +* closelog:: Close connection to Syslog +* setlogmask:: Cause certain messages to be ignored +* Syslog Example:: Example of all of the above - - Function: double lgamma (double X) - - Function: float lgammaf (float X) - - Function: long double lgammal (long double X) - `lgamma' returns the natural logarithm of the absolute value of - the gamma function of X. The gamma function is defined as - gamma (x) = integral from 0 to oo of t^(x-1) e^-t dt + These functions only work to submit messages to the Syslog facility +on the same system. To submit a message to the Syslog facility on +another system, use the socket I/O functions to write a UDP datagram to +the `syslog' UDP port on that system. *Note Sockets::. - The sign of the gamma function is stored in the global variable - SIGNGAM, which is declared in `math.h'. It is `1' if the - intermediate result was positive or zero, or `-1' if it was - negative. + +File: libc.info, Node: openlog, Next: syslog; vsyslog, Up: Submitting Syslog Messages - To compute the real gamma function you can use the `tgamma' - function or you can compute the values as follows: - lgam = lgamma(x); - gam = signgam*exp(lgam); +openlog +------- - The gamma function has singularities at the non-positive integers. - `lgamma' will raise the zero divide exception if evaluated at a - singularity. + The symbols referred to in this section are declared in the file +`syslog.h'. - - Function: double lgamma_r (double X, int *SIGNP) - - Function: float lgammaf_r (float X, int *SIGNP) - - Function: long double lgammal_r (long double X, int *SIGNP) - `lgamma_r' is just like `lgamma', but it stores the sign of the - intermediate result in the variable pointed to by SIGNP instead of - in the SIGNGAM global. This means it is reentrant. + - Function: void openlog (char *IDENT, int OPTION, + int FACILITY) - - Function: double gamma (double X) - - Function: float gammaf (float X) - - Function: long double gammal (long double X) - These functions exist for compatibility reasons. They are - equivalent to `lgamma' etc. It is better to use `lgamma' since - for one the name reflects better the actual computation, moreover - `lgamma' is standardized in ISO C99 while `gamma' is not. + `openlog' opens or reopens a connection to Syslog in preparation + for submitting messages. - - Function: double tgamma (double X) - - Function: float tgammaf (float X) - - Function: long double tgammal (long double X) - `tgamma' applies the gamma function to X. The gamma function is - defined as - gamma (x) = integral from 0 to oo of t^(x-1) e^-t dt + IDENT is an arbitrary identification string which future `syslog' + invocations will prefix to each message. This is intended to + identify the source of the message, and people conventionally set + it to the name of the program that will submit the messages. - This function was introduced in ISO C99. + `openlog' may or may not open the `/dev/log' socket, depending on + OPTION. If it does, it tries to open it and connect it as a + stream socket. If that doesn't work, it tries to open it and + connect it as a datagram socket. The socket has the "Close on + Exec" attribute, so the kernel will close it if the process + performs an exec. - - Function: double j0 (double X) - - Function: float j0f (float X) - - Function: long double j0l (long double X) - `j0' returns the Bessel function of the first kind of order 0 of - X. It may signal underflow if X is too large. + You don't have to use `openlog'. If you call `syslog' without + having called `openlog', `syslog' just opens the connection + implicitly and uses defaults for the information in IDENT and + OPTIONS. - - Function: double j1 (double X) - - Function: float j1f (float X) - - Function: long double j1l (long double X) - `j1' returns the Bessel function of the first kind of order 1 of - X. It may signal underflow if X is too large. + OPTIONS is a bit string, with the bits as defined by the following + single bit masks: - - Function: double jn (int n, double X) - - Function: float jnf (int n, float X) - - Function: long double jnl (int n, long double X) - `jn' returns the Bessel function of the first kind of order N of - X. It may signal underflow if X is too large. + `LOG_PERROR' + If on, `openlog' sets up the connection so that any `syslog' + on this connection writes its message to the calling process' + Standard Error stream in addition to submitting it to Syslog. + If off, `syslog' does not write the message to Standard + Error. - - Function: double y0 (double X) - - Function: float y0f (float X) - - Function: long double y0l (long double X) - `y0' returns the Bessel function of the second kind of order 0 of - X. It may signal underflow if X is too large. If X is negative, - `y0' signals a domain error; if it is zero, `y0' signals overflow - and returns -oo. + `LOG_CONS' + If on, `openlog' sets up the connection so that a `syslog' on + this connection that fails to submit a message to Syslog + writes the message instead to system console. If off, + `syslog' does not write to the system console (but of course + Syslog may write messages it receives to the console). - - Function: double y1 (double X) - - Function: float y1f (float X) - - Function: long double y1l (long double X) - `y1' returns the Bessel function of the second kind of order 1 of - X. It may signal underflow if X is too large. If X is negative, - `y1' signals a domain error; if it is zero, `y1' signals overflow - and returns -oo. + `LOG_PID' + When on, `openlog' sets up the connection so that a `syslog' + on this connection inserts the calling process' Process ID + (PID) into the message. When off, `openlog' does not insert + the PID. - - Function: double yn (int n, double X) - - Function: float ynf (int n, float X) - - Function: long double ynl (int n, long double X) - `yn' returns the Bessel function of the second kind of order N of - X. It may signal underflow if X is too large. If X is negative, - `yn' signals a domain error; if it is zero, `yn' signals overflow - and returns -oo. + `LOG_NDELAY' + When on, `openlog' opens and connects the `/dev/log' socket. + When off, a future `syslog' call must open and connect the + socket. + + *Portability note:* In early systems, the sense of this bit + was exactly the opposite. + + `LOG_ODELAY' + This bit does nothing. It exists for backward compatibility. + + If any other bit in OPTIONS is on, the result is undefined. + + FACILITY is the default facility code for this connection. A + `syslog' on this connection that specifies default facility causes + this facility to be associated with the message. See `syslog' for + possible values. A value of zero means the default default, which + is `LOG_USER'. + + If a Syslog connection is already open when you call `openlog', + `openlog' "reopens" the connection. Reopening is like opening + except that if you specify zero for the default facility code, the + default facility code simply remains unchanged and if you specify + LOG_NDELAY and the socket is already open and connected, `openlog' + just leaves it that way. + + + +File: libc.info, Node: syslog; vsyslog, Next: closelog, Prev: openlog, Up: Submitting Syslog Messages + +syslog, vsyslog +--------------- + + The symbols referred to in this section are declared in the file +`syslog.h'. + + - Function: void syslog (int FACILITY_PRIORITY, char *FORMAT, ...) + `syslog' submits a message to the Syslog facility. It does this by + writing to the Unix domain socket `/dev/log'. + + `syslog' submits the message with the facility and priority + indicated by FACILITY_PRIORITY. The macro `LOG_MAKEPRI' generates + a facility/priority from a facility and a priority, as in the + following example: + + LOG_MAKEPRI(LOG_USER, LOG_WARNING) + + The possible values for the facility code are (macros): + + `LOG_USER' + A miscellaneous user process + + `LOG_MAIL' + Mail + + `LOG_DAEMON' + A miscellaneous system daemon + + `LOG_AUTH' + Security (authorization) + + `LOG_SYSLOG' + Syslog + + `LOG_LPR' + Central printer + + `LOG_NEWS' + Network news (e.g. Usenet) + + `LOG_UUCP' + UUCP + + `LOG_CRON' + Cron and At + + `LOG_AUTHPRIV' + Private security (authorization) + + `LOG_FTP' + Ftp server + + `LOG_LOCAL0' + Locally defined + + `LOG_LOCAL1' + Locally defined + + `LOG_LOCAL2' + Locally defined + + `LOG_LOCAL3' + Locally defined + + `LOG_LOCAL4' + Locally defined + + `LOG_LOCAL5' + Locally defined + + `LOG_LOCAL6' + Locally defined + + `LOG_LOCAL7' + Locally defined + + Results are undefined if the facility code is anything else. + + *note:* `syslog' recognizes one other facility code: that of the + kernel. But you can't specify that facility code with these + functions. If you try, it looks the same to `syslog' as if you are + requesting the default facility. But you wouldn't want to anyway, + because any program that uses the GNU C library is not the kernel. + + You can use just a priority code as FACILITY_PRIORITY. In that + case, `syslog' assumes the default facility established when the + Syslog connection was opened. *Note Syslog Example::. + + The possible values for the priority code are (macros): + + `LOG_EMERG' + The message says the system is unusable. + + `LOG_ALERT' + Action on the message must be taken immediately. + + `LOG_CRIT' + The message states a critical condition. + + `LOG_ERR' + The message describes an error. + + `LOG_WARNING' + The message is a warning. + + `LOG_NOTICE' + The message describes a normal but important event. + + `LOG_INFO' + The message is purely informational. + + `LOG_DEBUG' + The message is only for debugging purposes. + + Results are undefined if the priority code is anything else. + + If the process does not presently have a Syslog connection open + (i.e. it did not call `openlog'), `syslog' implicitly opens the + connection the same as `openlog' would, with the following defaults + for information that would otherwise be included in an `openlog' + call: The default identification string is the program name. The + default default facility is `LOG_USER'. The default for all the + connection options in OPTIONS is as if those bits were off. + `syslog' leaves the Syslog connection open. + + If the `dev/log' socket is not open and connected, `syslog' opens + and connects it, the same as `openlog' with the `LOG_NDELAY' + option would. + + `syslog' leaves `/dev/log' open and connected unless its attempt + to send the message failed, in which case `syslog' closes it (with + the hope that a future implicit open will restore the Syslog + connection to a usable state). + + Example: + + + #include + syslog (LOG_MAKEPRI(LOG_LOCAL1, LOG_ERROR), + "Unable to make network connection to %s. Error=%m", host); + + + - Function: void vsyslog (int FACILITY_PRIORITY, char *FORMAT, va_list + arglist) + This is functionally identical to `syslog', with the BSD style + variable length argument. + + + +File: libc.info, Node: closelog, Next: setlogmask, Prev: syslog; vsyslog, Up: Submitting Syslog Messages + +closelog +-------- + + The symbols referred to in this section are declared in the file +`syslog.h'. + + - Function: void closelog (void) + `closelog' closes the current Syslog connection, if there is one. + This include closing the `dev/log' socket, if it is open. + + There is very little reason to use this function. It does not + flush any buffers; you can reopen a Syslog connection without + closing it first; The connection gets closed automatically on exec + or exit. `closelog' has primarily aesthetic value. + + + +File: libc.info, Node: setlogmask, Next: Syslog Example, Prev: closelog, Up: Submitting Syslog Messages + +setlogmask +---------- + + The symbols referred to in this section are declared in the file +`syslog.h'. + + - Function: int setlogmask (int MASK) + `setlogmask' sets a mask (the "logmask") that determines which + future `syslog' calls shall be ignored. If a program has not + called `setlogmask', `syslog' doesn't ignore any calls. You can + use `setlogmask' to specify that messages of particular priorities + shall be ignored in the future. + + A `setlogmask' call overrides any previous `setlogmask' call. + + Note that the logmask exists entirely independently of opening and + closing of Syslog connections. + + Setting the logmask has a similar effect to, but is not the same + as, configuring Syslog. The Syslog configuration may cause Syslog + to discard certain messages it receives, but the logmask causes + certain messages never to get submitted to Syslog in the first + place. + + MASK is a bit string with one bit corresponding to each of the + possible message priorities. If the bit is on, `syslog' handles + messages of that priority normally. If it is off, `syslog' + discards messages of that priority. Use the message priority + macros described in *Note syslog; vsyslog:: and the `LOG_MASK' to + construct an appropriate MASK value, as in this example: + + LOG_MASK(LOG_EMERG) | LOG_MASK(LOG_ERROR) + + or + + ~(LOG_MASK(LOG_INFO)) + + There is also a `LOG_UPTO' macro, which generates a mask with the + bits on for a certain priority and all priorities above it: + + LOG_UPTO(LOG_ERROR) + + The unfortunate naming of the macro is due to the fact that + internally, higher numbers are used for lower message priorities. + + + +File: libc.info, Node: Syslog Example, Prev: setlogmask, Up: Submitting Syslog Messages + +Syslog Example +-------------- + + Here is an example of `openlog', `syslog', and `closelog': + + This example sets the logmask so that debug and informational +messages get discarded without ever reaching Syslog. So the second +`syslog' in the example does nothing. + + #include + + setlogmask (LOG_UPTO (LOG_NOTICE)); + + openlog ("exampleprog", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1); + + syslog (LOG_NOTICE, "Program started by User %d", getuid ()); + syslog (LOG_INFO, "A tree falls in a forest"); + + closelog (); diff -durpN glibc-2.2.4/manual/libc.info-31 glibc-2.2.5/manual/libc.info-31 --- glibc-2.2.4/manual/libc.info-31 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-31 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,300 +33,695 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Errors in Math Functions, Next: Pseudo-Random Numbers, Prev: Special Functions, Up: Mathematics +File: libc.info, Node: Mathematics, Next: Arithmetic, Prev: Syslog, Up: Top -Known Maximum Errors in Math Functions -====================================== +Mathematics +*********** - This section lists the known errors of the functions in the math -library. Errors are measured in "units of the last place". This is a -measure for the relative error. For a number z with the representation -d.d...d*2^e (we assume IEEE floating-point numbers with base 2) the ULP -is represented by + This chapter contains information about functions for performing +mathematical computations, such as trigonometric functions. Most of +these functions have prototypes declared in the header file `math.h'. +The complex-valued functions are defined in `complex.h'. - |d.d...d - (z / 2^e)| / 2^(p - 1) + All mathematical functions which take a floating-point argument have +three variants, one each for `double', `float', and `long double' +arguments. The `double' versions are mostly defined in ISO C89. The +`float' and `long double' versions are from the numeric extensions to C +included in ISO C99. -where p is the number of bits in the mantissa of the floating-point -number representation. Ideally the error for all functions is always -less than 0.5ulps. Using rounding bits this is also possible and -normally implemented for the basic operations. To achieve the same for -the complex math functions requires a lot more work and this was not -spend so far. + Which of the three versions of a function should be used depends on +the situation. For most calculations, the `float' functions are the +fastest. On the other hand, the `long double' functions have the +highest precision. `double' is somewhere in between. It is usually +wise to pick the narrowest type that can accommodate your data. Not +all machines have a distinct `long double' type; it may be the same as +`double'. - Therefore many of the functions in the math library have errors. The -table lists the maximum error for each function which is exposed by one -of the existing tests in the test suite. It is tried to cover as much -as possible and really list the maximum error (or at least a ballpark -figure) but this is often not achieved due to the large search space. +* Menu: - The table lists the ULP values for different architectures. -Different architectures have different results since their hardware -support for floating-point operations varies and also the existing -hardware support is different. +* Mathematical Constants:: Precise numeric values for often-used + constants. +* Trig Functions:: Sine, cosine, tangent, and friends. +* Inverse Trig Functions:: Arcsine, arccosine, etc. +* Exponents and Logarithms:: Also pow and sqrt. +* Hyperbolic Functions:: sinh, cosh, tanh, etc. +* Special Functions:: Bessel, gamma, erf. +* Errors in Math Functions:: Known Maximum Errors in Math Functions. +* Pseudo-Random Numbers:: Functions for generating pseudo-random + numbers. +* FP Function Optimizations:: Fast code or small code. -Function alpha/fpu arm Generic ix86 ia64/fpu m68k/fpu mips/fpu powerpc/fpu sparc/sparc32/fpusparc/sparc64/fpush/sh4/fpu s390/fpu -acosf - - - - - - - - - - - - -acos - - - - - - - - - - - - -acosl - - - 1150 - 1 - - - 1 - - -acoshf - - - - - - - - - - - - -acosh - - - - - - - - - - - - -acoshl - - - 1 - 1 - - - - - - -asinf 2 2 - - - - 2 2 2 2 2 2 -asin 1 1 - 1 1 1 1 1 1 1 1 1 -asinl - - - 1 1 1 - - - - - - -asinhf - - - - - - - - - - - - -asinh - - - - 1 - - - - - - - -asinhl - - - 656 656 14 - - - - - - -atanf - - - - - - - - - - - - -atan - - - - - - - - - - - - -atanl - - - 549 - - - - - 1 - - -atanhf - - - - - - - - - - - - -atanh 1 1 - 1 1 1 1 1 1 1 1 1 -atanhl - - - 1605 1605 - - - - - - - -atan2f 4 - - - - - 4 4 4.0000 4 4 4 -atan2 - - - - - - - - - - - - -atan2l - - - 549 - - - - - 1 - - -cabsf 1 1 - 1 1 1 1 1 1 1 1 1 -cabs 1 1 - 1 1 - 1 1 1 1 1 1 -cabsl - - - 560 560 1 - - - - - - -cacosf 1 + i 1 1 + i 1 - 1 + i 2 1 + i 2 1 + i 2 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -cacos 1 + i 0 1 + i 0 - 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 -cacosl - - - 151 + i 329 151 + i 329 1 + i 1 - - - 0 + i 3 - - -cacoshf 7 + i 3 7 + i 3 - 4 + i 4 7 + i 3 7 + i 0 7 + i 3 7 + i 3 7 + i 3 7 + i 3 7 + i 3 7 + i 3 -cacosh 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -cacoshl - - - 328 + i 151 328 + i 151 6 + i 2 - - - 5 + i 1 - - -cargf - - - - - - - - - - - - -carg - - - - - - - - - - - - -cargl - - - - - - - - - - - - -casinf 2 + i 1 2 + i 1 - 2 + i 2 2 + i 2 2 + i 2 2 + i 1 2 + i 1 2 + i 1 2 + i 1 2 + i 1 2 + i 1 -casin 3 + i 0 3 + i 0 - 3 + i 0 3 + i 0 3 + i 0 3 + i 0 3 + i 0 3 + i 0 3 + i 0 3 + i 0 3 + i 0 -casinl - - - 603 + i 329 603 + i 329 1 + i 1 - - - 1 + i 3 - - -casinhf 1 + i 6 1 + i 6 - 1 + i 6 1 + i 6 19 + i 2 1 + i 6 1 + i 6 1 + i 6 1 + i 6 1 + i 6 1 + i 6 -casinh 5 + i 3 5 + i 3 - 5 + i 3 5 + i 3 6 + i 13 5 + i 3 5 + i 3 5 + i 3 5 + i 3 5 + i 3 5 + i 3 -casinhl - - - 892 + i 12 892 + i 12 6 + i 7 - - - 4 + i 2 - - -catanf 4 + i 1 4 + i 1 - 0 + i 1 4 + i 1 0 + i 1 4 + i 1 4 + i 1 4 + i 1 4 + i 1 4 + i 1 4 + i 1 -catan 0 + i 1 0 + i 1 - 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 -catanl - - - 251 + i 474 251 + i 474 1 + i 7 - - - 0 + i 1 - - -catanhf 1 + i 6 1 + i 6 - 1 + i 0 0 + i 6 - 1 + i 6 0 + i 6 1 + i 6 1 + i 6 1 + i 6 1 + i 6 -catanh 4 + i 1 4 + i 1 - 2 + i 0 4 + i 1 - 4 + i 1 4 + i 1 4 + i 1 4 + i 1 4 + i 1 4 + i 1 -catanhl - - - 66 + i 447 66 + i 447 2 + i 2 - - - - - - -cbrtf - - - - - - - - - - - - -cbrt 1 1 - 1 1 1 1 1 1 1 1 1 -cbrtl - - - 716 - 948 - - - - - - -ccosf 0 + i 1 0 + i 1 - 1 + i 1 1 + i 1 1 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 -ccos 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 0 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -ccosl - - - 5 + i 1901 5 + i 1901 0 + i 1 - - - - - - -ccoshf 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 3 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -ccosh 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -ccoshl - - - 1467 + i 1183 1467 + i 1183 1 + i 2 - - - - - - -ceilf - - - - - - - - - - - - -ceil - - - - - - - - - - - - -ceill - - - - - - - - - - - - -cexpf 1 + i 1 1 + i 1 - 1 + i 0 1 + i 1 3 + i 2 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -cexp 1 + i 0 1 + i 0 - - 1 + i 0 - 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 -cexpl - - - 940 + i 1067 940 + i 1067 2 + i 0 - - - 1 + i 1 - - -cimagf - - - - - - - - - - - - -cimag - - - - - - - - - - - - -cimagl - - - - - - - - - - - - -clogf 0 + i 3 0 + i 3 - - 0 + i 3 - 0 + i 3 0 + i 3 0 + i 3 0 + i 3 0 + i 3 0 + i 3 -clog 0 + i 1 0 + i 1 - - 0 + i 1 - 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 -clogl - - - 0 + i 1 0 + i 1 0 + i 1 - - - - - - -clog10f 1 + i 5 1 + i 5 - 1 + i 1 1 + i 5 1 + i 1 1 + i 5 1 + i 5 1 + i 5 1 + i 5 1 + i 5 1 + i 5 -clog10 1 + i 1 1 + i 1 - 2 + i 1 2 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -clog10l - - - 1403 + i 186 1402 + i 186 1 + i 3 - - - - - - -conjf - - - - - - - - - - - - -conj - - - - - - - - - - - - -conjl - - - - - - - - - - - - -copysignf - - - - - - - - - - - - -copysign - - - - - - - - - - - - -copysignl - - - - - - - - - - - - -cosf 1 1 - 1 1 1 1 1 1 1 1 1 -cos 2 2 - 2 2 2 2 2 2 2 2 2 -cosl - - - 529 529 1 - - - 1 - - -coshf - - - - - - - - - - - - -cosh - - - - - - - - - - - - -coshl - - - 309 2 2 - - - - - - -cpowf 4 + i 2 4 + i 2 - 4 + i 2.5333 5 + i 2.5333 1 + i 6 4 + i 2 4 + i 2 4 + i 2 4 + i 2 4 + i 2 4 + i 2 -cpow 1 + i 1.1031 1 + i 1.1031 - 1 + i 1.104 1 + i 1.104 1 + i 1.103 1 + i 1.1031 1 + i 2 1 + i 1.1031 1 + i 1.1031 1 + i 1.1031 1 + i 1.1031 -cpowl - - - 2 + i 9 1 + i 4 5 + i 2 - - - 3 + i 0.9006 - - -cprojf - - - - - - - - - - - - -cproj - - - - - - - - - - - - -cprojl - - - - - - - - - - - - -crealf - - - - - - - - - - - - -creal - - - - - - - - - - - - -creall - - - - - - - - - - - - -csinf 0 + i 1 0 + i 1 - - 1 + i 1 1 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 -csin - - - - - - - - - - - - -csinl - - - 966 + i 168 966 + i 168 - - - - - - - -csinhf 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -csinh 0 + i 1 0 + i 1 - 1 + i 1 1 + i 1 - 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 -csinhl - - - 413 + i 477 413 + i 477 1 + i 2 - - - - - - -csqrtf 1 + i 1 1 + i 1 - - 1 + i 2 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -csqrt 1 + i 0 1 + i 0 - 1 + i 0 1 + i 0 - 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 -csqrtl - - - 237 + i 128 237 + i 128 - - - - 1 + i 1 - - -ctanf 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -ctan 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 -ctanl - - - 690 + i 367 690 + i 367 439 + i 2 - - - - - - -ctanhf 2 + i 1 2 + i 1 - 1 + i 1 2 + i 2 1 + i 0 2 + i 1 2 + i 1 2 + i 1 2 + i 1 2 + i 1 2 + i 1 -ctanh 2 + i 2 2 + i 2 - 0 + i 1 2 + i 2 0 + i 1 2 + i 2 2 + i 2 2 + i 2 2 + i 2 2 + i 2 2 + i 2 -ctanhl - - - 286 + i 3074 286 + i 3074 2 + i 25 - - - - - - -erff - - - - - - - - - - - - -erf - - - - - - - - - - - - -erfl - - - - - - - - - - - - -erfcf 12 12 - 12 12 11 12 12 12 12 12 12 -erfc 24 24 - 24 24 24 24 24 24 24 24 24 -erfcl - - - 36 12 12 - - - - - - -expf - - - - - - - - - - - - -exp - - - - - - - - - - - - -expl - - - 754 412 - - - - - - - -exp10f 2 2 - - 2 - 2 2 2 2 2 2 -exp10 6 6 - 1 6 1 6 6 6 6 6 6 -exp10l - - - 1182 1182 1 - - - 1 - - -exp2f - - - - - - - - - - - - -exp2 - - - - - - - - - - - - -exp2l - - - 462 462 - - - - - - - -expm1f 1 1 - - 1 - 1 1 1 1 1 1 -expm1 - - - - 1 - - - - 1 - - -expm1l - - - 825 825 1 - - - - - - -fabsf - - - - - - - - - - - - -fabs - - - - - - - - - - - - -fabsl - - - - - - - - - - - - -fdimf - - - - - - - - - - - - -fdim - - - - - - - - - - - - -fdiml - - - - - - - - - - - - -floorf - - - - - - - - - - - - -floor - - - - - - - - - - - - -floorl - - - - - - - - - - - - -fmaf - - - - - - - - - - - - -fma - - - - - - - - - - - - -fmal - - - - - - - - - - - - -fmaxf - - - - - - - - - - - - -fmax - - - - - - - - - - - - -fmaxl - - - - - - - - - - - - -fminf - - - - - - - - - - - - -fmin - - - - - - - - - - - - -fminl - - - - - - - - - - - - -fmodf 1 1 - 1 1 1 1 1 1 1 1 1 -fmod 2 2 - 2 2 2 2 2 2 2 2 2 -fmodl - - - 4096 4096 1 - - - 2 - - -frexpf - - - - - - - - - - - - -frexp - - - - - - - - - - - - -frexpl - - - - - - - - - - - - -gammaf - - - - - - - - - - - - -gamma - - - 1 1 - - - - - - - -gammal - - - 1 1 1 - - - - - - -hypotf 1 1 - 1 1 1 1 1 1 1 1 1 -hypot 1 1 - 1 1 - 1 1 1 1 1 1 -hypotl - - - 560 560 1 - - - - - - -ilogbf - - - - - - - - - - - - -ilogb - - - - - - - - - - - - -ilogbl - - - - - - - - - - - - -j0f 2 2 - 1 1 1 2 1 2 2 2 2 -j0 2 2 - 2 2 1 2 2 2 2 2 2 -j0l - - - - - - - - - - - - -j1f 2 2 - 1 2 2 2 2 2 2 2 2 -j1 1 1 - 2 2 - 1 1 1 1 1 1 -j1l - - - 2 - 2 - - - - - - -jnf 4 4 - 2 4 11 4 4 4 4 4 4 -jn 6 6 - 5 6 4 6 6 6 6 6 6 -jnl - - - 2 2 2 - - - - - - -lgammaf 2 2 - 2 2 2 2 2 2 2 2 2 -lgamma 1 1 - 1 1 1 1 1 1 1 1 1 -lgammal - - - 1 1 1 - - - - - - -lrintf - - - - - - - - - - - - -lrint - - - - - - - - - - - - -lrintl - - - - - - - - - - - - -llrintf - - - - - - - - - - - - -llrint - - - - - - - - - - - - -llrintl - - - - - - - - - - - - -logf 1 1 - 1 1 1 1 1 1 1 1 1 -log 1 1 - 1 1 1 1 1 1 1 1 1 -logl - - - 2341 2341 2 - - - 1 - - -log10f 1 1 - 1 1 1 1 1 1 1 1 1 -log10 1 1 - 1 1 1 1 1 1 1 1 1 -log10l - - - 2033 2033 1 - - - - - - -log1pf 1 1 - 1 1 1 1 1 1 1 1 1 -log1p 1 1 - 1 1 1 1 1 1 1 1 1 -log1pl - - - 585 585 2 - - - 1 - - -log2f 1 1 - 1 1 1 1 1 1 1 1 1 -log2 1 1 - 1 1 1 1 1 1 1 1 1 -log2l - - - 1688 1688 1 - - - - - - -logbf - - - - - - - - - - - - -logb - - - - - - - - - - - - -logbl - - - - - - - - - - - - -lroundf - - - - - - - - - - - - -lround - - - - - - - - - - - - -lroundl - - - - - - - - - - - - -llroundf - - - - - - - - - - - - -llround - - - - - - - - - - - - -llroundl - - - - - - - - - - - - -modff - - - - - - - - - - - - -modf - - - - - - - - - - - - -modfl - - - - - - - - - - - - -nearbyintf - - - - - - - - - - - - -nearbyint - - - - - - - - - - - - -nearbyintl - - - - - - - - - - - - -nextafterf - - - - - - - - - - - - -nextafter - - - - - - - - - - - - -nextafterl - - - - - - - - - - - - -nexttowardf - - - - - - - - - - - - -nexttoward - - - - - - - - - - - - -nexttowardl - - - - - - - - - - - - -powf - - - - - - - - - - - - -pow - - - - - - - - - - - - -powl - - - 725 725 1 - - - - - - -remainderf - - - - - - - - - - - - -remainder - - - - - - - - - - - - -remainderl - - - - - - - - - - - - -remquof - - - - - - - - - - - - -remquo - - - - - - - - - - - - -remquol - - - - - - - - - - - - -rintf - - - - - - - - - - - - -rint - - - - - - - - - - - - -rintl - - - - - - - - - - - - -roundf - - - - - - - - - - - - -round - - - - - - - - - - - - -roundl - - - - - - - - - - - - -scalbf - - - - - - - - - - - - -scalb - - - - - - - - - - - - -scalbl - - - - - - - - - - - - -scalbnf - - - - - - - - - - - - -scalbn - - - - - - - - - - - - -scalbnl - - - - - - - - - - - - -scalblnf - - - - - - - - - - - - -scalbln - - - - - - - - - - - - -scalblnl - - - - - - - - - - - - -sinf - - - - - - - - - - - - -sin - - - - - - - - - - - - -sinl - - - 627 627 1 - - - - - - -sincosf 1 1 - 1 1 1 1 1 1 1 1 1 -sincos 1 1 - 1 1 1 1 1 1 1 1 1 -sincosl - - - 627 627 1 - - - 1 - - -sinhf 1 1 - 1 1 1 1 1 1 1 1 1 -sinh 1 1 - - 1 - 1 1 1 1 1 1 -sinhl - - - 1029 1029 - - - - - - - -sqrtf - - - - - - - - - - - - -sqrt - - - - - - - - - - - - -sqrtl - - - 489 489 - - - - 1 - - -tanf - - - - - - - - - - - - -tan 0.5 0.5 - 0.5 0.5 0.5 0.5 1 0.5 0.5 0.5 0.5 -tanl - - - 1401 1401 1 - - - 1 - - -tanhf 1 1 - - 1 - 1 1 1 1 1 1 -tanh 1 1 - - 1 - 1 1 1 1 1 1 -tanhl - - - 521 521 - - - - - - - -tgammaf 1 1 - 1 1 1 1 1 1 1 1 1 -tgamma 1 1 - 2 2 1 1 1 1 1 1 1 -tgammal - - - 2 1 1 - - - - - - -truncf - - - - - - - - - - - - -trunc - - - - - - - - - - - - -truncl - - - - - - - - - - - - -y0f 1 1 - 1 1 2 1 1 1 1 1 1 -y0 2 2 - 3 2 2 2 2 2 2 2 2 -y0l - - - 2 2 2 - - - - - - -y1f 2 2 - 2 2 2 2 2 2 2 2 2 -y1 3 3 - 3 3 1 3 3 3 3 3 3 -y1l - - - 2 1 2 - - - - - - -ynf 2 2 - 3 3 2 2 2 2 2 2 2 -yn 3 3 - 6 6 6 3 3 3 3 3 3 -ynl - - - 7 7 7 - - - - - - + +File: libc.info, Node: Mathematical Constants, Next: Trig Functions, Up: Mathematics + +Predefined Mathematical Constants +================================= + + The header `math.h' defines several useful mathematical constants. +All values are defined as preprocessor macros starting with `M_'. The +values provided are: + +`M_E' + The base of natural logarithms. + +`M_LOG2E' + The logarithm to base `2' of `M_E'. + +`M_LOG10E' + The logarithm to base `10' of `M_E'. + +`M_LN2' + The natural logarithm of `2'. + +`M_LN10' + The natural logarithm of `10'. + +`M_PI' + Pi, the ratio of a circle's circumference to its diameter. + +`M_PI_2' + Pi divided by two. + +`M_PI_4' + Pi divided by four. + +`M_1_PI' + The reciprocal of pi (1/pi) + +`M_2_PI' + Two times the reciprocal of pi. + +`M_2_SQRTPI' + Two times the reciprocal of the square root of pi. + +`M_SQRT2' + The square root of two. + +`M_SQRT1_2' + The reciprocal of the square root of two (also the square root of + 1/2). + + These constants come from the Unix98 standard and were also +available in 4.4BSD; therefore they are only defined if `_BSD_SOURCE' or +`_XOPEN_SOURCE=500', or a more general feature select macro, is +defined. The default set of features includes these constants. *Note +Feature Test Macros::. + + All values are of type `double'. As an extension, the GNU C library +also defines these constants with type `long double'. The `long +double' macros have a lowercase `l' appended to their names: `M_El', +`M_PIl', and so forth. These are only available if `_GNU_SOURCE' is +defined. + + _Note:_ Some programs use a constant named `PI' which has the same +value as `M_PI'. This constant is not standard; it may have appeared +in some old AT&T headers, and is mentioned in Stroustrup's book on C++. +It infringes on the user's name space, so the GNU C library does not +define it. Fixing programs written to expect it is simple: replace +`PI' with `M_PI' throughout, or put `-DPI=M_PI' on the compiler command +line. + + +File: libc.info, Node: Trig Functions, Next: Inverse Trig Functions, Prev: Mathematical Constants, Up: Mathematics + +Trigonometric Functions +======================= + + These are the familiar `sin', `cos', and `tan' functions. The +arguments to all of these functions are in units of radians; recall +that pi radians equals 180 degrees. + + The math library normally defines `M_PI' to a `double' approximation +of pi. If strict ISO and/or POSIX compliance are requested this +constant is not defined, but you can easily define it yourself: + + #define M_PI 3.14159265358979323846264338327 + +You can also compute the value of pi with the expression `acos (-1.0)'. + + - Function: double sin (double X) + - Function: float sinf (float X) + - Function: long double sinl (long double X) + These functions return the sine of X, where X is given in radians. + The return value is in the range `-1' to `1'. + + - Function: double cos (double X) + - Function: float cosf (float X) + - Function: long double cosl (long double X) + These functions return the cosine of X, where X is given in + radians. The return value is in the range `-1' to `1'. + + - Function: double tan (double X) + - Function: float tanf (float X) + - Function: long double tanl (long double X) + These functions return the tangent of X, where X is given in + radians. + + Mathematically, the tangent function has singularities at odd + multiples of pi/2. If the argument X is too close to one of these + singularities, `tan' will signal overflow. + + In many applications where `sin' and `cos' are used, the sine and +cosine of the same angle are needed at the same time. It is more +efficient to compute them simultaneously, so the library provides a +function to do that. + + - Function: void sincos (double X, double *SINX, double *COSX) + - Function: void sincosf (float X, float *SINX, float *COSX) + - Function: void sincosl (long double X, long double *SINX, long + double *COSX) + These functions return the sine of X in `*SINX' and the cosine of + X in `*COS', where X is given in radians. Both values, `*SINX' + and `*COSX', are in the range of `-1' to `1'. + + This function is a GNU extension. Portable programs should be + prepared to cope with its absence. + + ISO C99 defines variants of the trig functions which work on complex +numbers. The GNU C library provides these functions, but they are only +useful if your compiler supports the new complex types defined by the +standard. (As of this writing GCC supports complex numbers, but there +are bugs in the implementation.) + + - Function: complex double csin (complex double Z) + - Function: complex float csinf (complex float Z) + - Function: complex long double csinl (complex long double Z) + These functions return the complex sine of Z. The mathematical + definition of the complex sine is + + sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i)). + + - Function: complex double ccos (complex double Z) + - Function: complex float ccosf (complex float Z) + - Function: complex long double ccosl (complex long double Z) + These functions return the complex cosine of Z. The mathematical + definition of the complex cosine is + + cos (z) = 1/2 * (exp (z*i) + exp (-z*i)) + + - Function: complex double ctan (complex double Z) + - Function: complex float ctanf (complex float Z) + - Function: complex long double ctanl (complex long double Z) + These functions return the complex tangent of Z. The mathematical + definition of the complex tangent is + + tan (z) = -i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i)) + + The complex tangent has poles at pi/2 + 2n, where n is an integer. + `ctan' may signal overflow if Z is too close to a pole. + + +File: libc.info, Node: Inverse Trig Functions, Next: Exponents and Logarithms, Prev: Trig Functions, Up: Mathematics + +Inverse Trigonometric Functions +=============================== + + These are the usual arc sine, arc cosine and arc tangent functions, +which are the inverses of the sine, cosine and tangent functions +respectively. + + - Function: double asin (double X) + - Function: float asinf (float X) + - Function: long double asinl (long double X) + These functions compute the arc sine of X--that is, the value whose + sine is X. The value is in units of radians. Mathematically, + there are infinitely many such values; the one actually returned + is the one between `-pi/2' and `pi/2' (inclusive). + + The arc sine function is defined mathematically only over the + domain `-1' to `1'. If X is outside the domain, `asin' signals a + domain error. + + - Function: double acos (double X) + - Function: float acosf (float X) + - Function: long double acosl (long double X) + These functions compute the arc cosine of X--that is, the value + whose cosine is X. The value is in units of radians. + Mathematically, there are infinitely many such values; the one + actually returned is the one between `0' and `pi' (inclusive). + + The arc cosine function is defined mathematically only over the + domain `-1' to `1'. If X is outside the domain, `acos' signals a + domain error. + + - Function: double atan (double X) + - Function: float atanf (float X) + - Function: long double atanl (long double X) + These functions compute the arc tangent of X--that is, the value + whose tangent is X. The value is in units of radians. + Mathematically, there are infinitely many such values; the one + actually returned is the one between `-pi/2' and `pi/2' + (inclusive). + + - Function: double atan2 (double Y, double X) + - Function: float atan2f (float Y, float X) + - Function: long double atan2l (long double Y, long double X) + This function computes the arc tangent of Y/X, but the signs of + both arguments are used to determine the quadrant of the result, + and X is permitted to be zero. The return value is given in + radians and is in the range `-pi' to `pi', inclusive. + + If X and Y are coordinates of a point in the plane, `atan2' + returns the signed angle between the line from the origin to that + point and the x-axis. Thus, `atan2' is useful for converting + Cartesian coordinates to polar coordinates. (To compute the + radial coordinate, use `hypot'; see *Note Exponents and + Logarithms::.) + + If both X and Y are zero, `atan2' returns zero. + + ISO C99 defines complex versions of the inverse trig functions. + + - Function: complex double casin (complex double Z) + - Function: complex float casinf (complex float Z) + - Function: complex long double casinl (complex long double Z) + These functions compute the complex arc sine of Z--that is, the + value whose sine is Z. The value returned is in radians. + + Unlike the real-valued functions, `casin' is defined for all + values of Z. + + - Function: complex double cacos (complex double Z) + - Function: complex float cacosf (complex float Z) + - Function: complex long double cacosl (complex long double Z) + These functions compute the complex arc cosine of Z--that is, the + value whose cosine is Z. The value returned is in radians. + + Unlike the real-valued functions, `cacos' is defined for all + values of Z. + + - Function: complex double catan (complex double Z) + - Function: complex float catanf (complex float Z) + - Function: complex long double catanl (complex long double Z) + These functions compute the complex arc tangent of Z--that is, the + value whose tangent is Z. The value is in units of radians. + + +File: libc.info, Node: Exponents and Logarithms, Next: Hyperbolic Functions, Prev: Inverse Trig Functions, Up: Mathematics + +Exponentiation and Logarithms +============================= + + - Function: double exp (double X) + - Function: float expf (float X) + - Function: long double expl (long double X) + These functions compute `e' (the base of natural logarithms) raised + to the power X. + + If the magnitude of the result is too large to be representable, + `exp' signals overflow. + + - Function: double exp2 (double X) + - Function: float exp2f (float X) + - Function: long double exp2l (long double X) + These functions compute `2' raised to the power X. + Mathematically, `exp2 (x)' is the same as `exp (x * log (2))'. + + - Function: double exp10 (double X) + - Function: float exp10f (float X) + - Function: long double exp10l (long double X) + - Function: double pow10 (double X) + - Function: float pow10f (float X) + - Function: long double pow10l (long double X) + These functions compute `10' raised to the power X. + Mathematically, `exp10 (x)' is the same as `exp (x * log (10))'. + + These functions are GNU extensions. The name `exp10' is + preferred, since it is analogous to `exp' and `exp2'. + + - Function: double log (double X) + - Function: float logf (float X) + - Function: long double logl (long double X) + These functions compute the natural logarithm of X. `exp (log + (X))' equals X, exactly in mathematics and approximately in C. + + If X is negative, `log' signals a domain error. If X is zero, it + returns negative infinity; if X is too close to zero, it may + signal overflow. + + - Function: double log10 (double X) + - Function: float log10f (float X) + - Function: long double log10l (long double X) + These functions return the base-10 logarithm of X. `log10 (X)' + equals `log (X) / log (10)'. + + + - Function: double log2 (double X) + - Function: float log2f (float X) + - Function: long double log2l (long double X) + These functions return the base-2 logarithm of X. `log2 (X)' + equals `log (X) / log (2)'. + + - Function: double logb (double X) + - Function: float logbf (float X) + - Function: long double logbl (long double X) + These functions extract the exponent of X and return it as a + floating-point value. If `FLT_RADIX' is two, `logb' is equal to + `floor (log2 (x))', except it's probably faster. + + If X is de-normalized, `logb' returns the exponent X would have if + it were normalized. If X is infinity (positive or negative), + `logb' returns oo. If X is zero, `logb' returns oo. It does not + signal. + + - Function: int ilogb (double X) + - Function: int ilogbf (float X) + - Function: int ilogbl (long double X) + These functions are equivalent to the corresponding `logb' + functions except that they return signed integer values. + +Since integers cannot represent infinity and NaN, `ilogb' instead +returns an integer that can't be the exponent of a normal floating-point +number. `math.h' defines constants so you can check for this. + + - Macro: int FP_ILOGB0 + `ilogb' returns this value if its argument is `0'. The numeric + value is either `INT_MIN' or `-INT_MAX'. + + This macro is defined in ISO C99. + + - Macro: int FP_ILOGBNAN + `ilogb' returns this value if its argument is `NaN'. The numeric + value is either `INT_MIN' or `INT_MAX'. + + This macro is defined in ISO C99. + + These values are system specific. They might even be the same. The +proper way to test the result of `ilogb' is as follows: + + i = ilogb (f); + if (i == FP_ILOGB0 || i == FP_ILOGBNAN) + { + if (isnan (f)) + { + /* Handle NaN. */ + } + else if (f == 0.0) + { + /* Handle 0.0. */ + } + else + { + /* Some other value with large exponent, + perhaps +Inf. */ + } + } + + - Function: double pow (double BASE, double POWER) + - Function: float powf (float BASE, float POWER) + - Function: long double powl (long double BASE, long double POWER) + These are general exponentiation functions, returning BASE raised + to POWER. + + Mathematically, `pow' would return a complex number when BASE is + negative and POWER is not an integral value. `pow' can't do that, + so instead it signals a domain error. `pow' may also underflow or + overflow the destination type. + + - Function: double sqrt (double X) + - Function: float sqrtf (float X) + - Function: long double sqrtl (long double X) + These functions return the nonnegative square root of X. + + If X is negative, `sqrt' signals a domain error. Mathematically, + it should return a complex number. + + - Function: double cbrt (double X) + - Function: float cbrtf (float X) + - Function: long double cbrtl (long double X) + These functions return the cube root of X. They cannot fail; + every representable real value has a representable real cube root. + + - Function: double hypot (double X, double Y) + - Function: float hypotf (float X, float Y) + - Function: long double hypotl (long double X, long double Y) + These functions return `sqrt (X*X + Y*Y)'. This is the length of + the hypotenuse of a right triangle with sides of length X and Y, + or the distance of the point (X, Y) from the origin. Using this + function instead of the direct formula is wise, since the error is + much smaller. See also the function `cabs' in *Note Absolute + Value::. + + - Function: double expm1 (double X) + - Function: float expm1f (float X) + - Function: long double expm1l (long double X) + These functions return a value equivalent to `exp (X) - 1'. They + are computed in a way that is accurate even if X is near zero--a + case where `exp (X) - 1' would be inaccurate owing to subtraction + of two numbers that are nearly equal. + + - Function: double log1p (double X) + - Function: float log1pf (float X) + - Function: long double log1pl (long double X) + These functions returns a value equivalent to `log (1 + X)'. They + are computed in a way that is accurate even if X is near zero. + + ISO C99 defines complex variants of some of the exponentiation and +logarithm functions. + + - Function: complex double cexp (complex double Z) + - Function: complex float cexpf (complex float Z) + - Function: complex long double cexpl (complex long double Z) + These functions return `e' (the base of natural logarithms) raised + to the power of Z. Mathematically, this corresponds to the value + + exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z))) + + - Function: complex double clog (complex double Z) + - Function: complex float clogf (complex float Z) + - Function: complex long double clogl (complex long double Z) + These functions return the natural logarithm of Z. + Mathematically, this corresponds to the value + + log (z) = log (cabs (z)) + I * carg (z) + + `clog' has a pole at 0, and will signal overflow if Z equals or is + very close to 0. It is well-defined for all other values of Z. + + - Function: complex double clog10 (complex double Z) + - Function: complex float clog10f (complex float Z) + - Function: complex long double clog10l (complex long double Z) + These functions return the base 10 logarithm of the complex value + Z. Mathematically, this corresponds to the value + + log (z) = log10 (cabs (z)) + I * carg (z) + + These functions are GNU extensions. + + - Function: complex double csqrt (complex double Z) + - Function: complex float csqrtf (complex float Z) + - Function: complex long double csqrtl (complex long double Z) + These functions return the complex square root of the argument Z. + Unlike the real-valued functions, they are defined for all values + of Z. + + - Function: complex double cpow (complex double BASE, complex double + POWER) + - Function: complex float cpowf (complex float BASE, complex float + POWER) + - Function: complex long double cpowl (complex long double BASE, + complex long double POWER) + These functions return BASE raised to the power of POWER. This is + equivalent to `cexp (y * clog (x))' + + +File: libc.info, Node: Hyperbolic Functions, Next: Special Functions, Prev: Exponents and Logarithms, Up: Mathematics + +Hyperbolic Functions +==================== + + The functions in this section are related to the exponential +functions; see *Note Exponents and Logarithms::. + + - Function: double sinh (double X) + - Function: float sinhf (float X) + - Function: long double sinhl (long double X) + These functions return the hyperbolic sine of X, defined + mathematically as `(exp (X) - exp (-X)) / 2'. They may signal + overflow if X is too large. + + - Function: double cosh (double X) + - Function: float coshf (float X) + - Function: long double coshl (long double X) + These function return the hyperbolic cosine of X, defined + mathematically as `(exp (X) + exp (-X)) / 2'. They may signal + overflow if X is too large. + + - Function: double tanh (double X) + - Function: float tanhf (float X) + - Function: long double tanhl (long double X) + These functions return the hyperbolic tangent of X, defined + mathematically as `sinh (X) / cosh (X)'. They may signal overflow + if X is too large. + + There are counterparts for the hyperbolic functions which take +complex arguments. + + - Function: complex double csinh (complex double Z) + - Function: complex float csinhf (complex float Z) + - Function: complex long double csinhl (complex long double Z) + These functions return the complex hyperbolic sine of Z, defined + mathematically as `(exp (Z) - exp (-Z)) / 2'. + + - Function: complex double ccosh (complex double Z) + - Function: complex float ccoshf (complex float Z) + - Function: complex long double ccoshl (complex long double Z) + These functions return the complex hyperbolic cosine of Z, defined + mathematically as `(exp (Z) + exp (-Z)) / 2'. + + - Function: complex double ctanh (complex double Z) + - Function: complex float ctanhf (complex float Z) + - Function: complex long double ctanhl (complex long double Z) + These functions return the complex hyperbolic tangent of Z, + defined mathematically as `csinh (Z) / ccosh (Z)'. + + - Function: double asinh (double X) + - Function: float asinhf (float X) + - Function: long double asinhl (long double X) + These functions return the inverse hyperbolic sine of X--the value + whose hyperbolic sine is X. + + - Function: double acosh (double X) + - Function: float acoshf (float X) + - Function: long double acoshl (long double X) + These functions return the inverse hyperbolic cosine of X--the + value whose hyperbolic cosine is X. If X is less than `1', + `acosh' signals a domain error. + + - Function: double atanh (double X) + - Function: float atanhf (float X) + - Function: long double atanhl (long double X) + These functions return the inverse hyperbolic tangent of X--the + value whose hyperbolic tangent is X. If the absolute value of X + is greater than `1', `atanh' signals a domain error; if it is + equal to 1, `atanh' returns infinity. + + - Function: complex double casinh (complex double Z) + - Function: complex float casinhf (complex float Z) + - Function: complex long double casinhl (complex long double Z) + These functions return the inverse complex hyperbolic sine of + Z--the value whose complex hyperbolic sine is Z. + + - Function: complex double cacosh (complex double Z) + - Function: complex float cacoshf (complex float Z) + - Function: complex long double cacoshl (complex long double Z) + These functions return the inverse complex hyperbolic cosine of + Z--the value whose complex hyperbolic cosine is Z. Unlike the + real-valued functions, there are no restrictions on the value of Z. + + - Function: complex double catanh (complex double Z) + - Function: complex float catanhf (complex float Z) + - Function: complex long double catanhl (complex long double Z) + These functions return the inverse complex hyperbolic tangent of + Z--the value whose complex hyperbolic tangent is Z. Unlike the + real-valued functions, there are no restrictions on the value of Z. + + +File: libc.info, Node: Special Functions, Next: Errors in Math Functions, Prev: Hyperbolic Functions, Up: Mathematics + +Special Functions +================= + + These are some more exotic mathematical functions which are sometimes +useful. Currently they only have real-valued versions. + + - Function: double erf (double X) + - Function: float erff (float X) + - Function: long double erfl (long double X) + `erf' returns the error function of X. The error function is + defined as + erf (x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt + + - Function: double erfc (double X) + - Function: float erfcf (float X) + - Function: long double erfcl (long double X) + `erfc' returns `1.0 - erf(X)', but computed in a fashion that + avoids round-off error when X is large. + + - Function: double lgamma (double X) + - Function: float lgammaf (float X) + - Function: long double lgammal (long double X) + `lgamma' returns the natural logarithm of the absolute value of + the gamma function of X. The gamma function is defined as + gamma (x) = integral from 0 to oo of t^(x-1) e^-t dt + + The sign of the gamma function is stored in the global variable + SIGNGAM, which is declared in `math.h'. It is `1' if the + intermediate result was positive or zero, or `-1' if it was + negative. + + To compute the real gamma function you can use the `tgamma' + function or you can compute the values as follows: + lgam = lgamma(x); + gam = signgam*exp(lgam); + + The gamma function has singularities at the non-positive integers. + `lgamma' will raise the zero divide exception if evaluated at a + singularity. + + - Function: double lgamma_r (double X, int *SIGNP) + - Function: float lgammaf_r (float X, int *SIGNP) + - Function: long double lgammal_r (long double X, int *SIGNP) + `lgamma_r' is just like `lgamma', but it stores the sign of the + intermediate result in the variable pointed to by SIGNP instead of + in the SIGNGAM global. This means it is reentrant. + + - Function: double gamma (double X) + - Function: float gammaf (float X) + - Function: long double gammal (long double X) + These functions exist for compatibility reasons. They are + equivalent to `lgamma' etc. It is better to use `lgamma' since + for one the name reflects better the actual computation, moreover + `lgamma' is standardized in ISO C99 while `gamma' is not. + + - Function: double tgamma (double X) + - Function: float tgammaf (float X) + - Function: long double tgammal (long double X) + `tgamma' applies the gamma function to X. The gamma function is + defined as + gamma (x) = integral from 0 to oo of t^(x-1) e^-t dt + + This function was introduced in ISO C99. + + - Function: double j0 (double X) + - Function: float j0f (float X) + - Function: long double j0l (long double X) + `j0' returns the Bessel function of the first kind of order 0 of + X. It may signal underflow if X is too large. + + - Function: double j1 (double X) + - Function: float j1f (float X) + - Function: long double j1l (long double X) + `j1' returns the Bessel function of the first kind of order 1 of + X. It may signal underflow if X is too large. + + - Function: double jn (int n, double X) + - Function: float jnf (int n, float X) + - Function: long double jnl (int n, long double X) + `jn' returns the Bessel function of the first kind of order N of + X. It may signal underflow if X is too large. + + - Function: double y0 (double X) + - Function: float y0f (float X) + - Function: long double y0l (long double X) + `y0' returns the Bessel function of the second kind of order 0 of + X. It may signal underflow if X is too large. If X is negative, + `y0' signals a domain error; if it is zero, `y0' signals overflow + and returns -oo. + + - Function: double y1 (double X) + - Function: float y1f (float X) + - Function: long double y1l (long double X) + `y1' returns the Bessel function of the second kind of order 1 of + X. It may signal underflow if X is too large. If X is negative, + `y1' signals a domain error; if it is zero, `y1' signals overflow + and returns -oo. + + - Function: double yn (int n, double X) + - Function: float ynf (int n, float X) + - Function: long double ynl (int n, long double X) + `yn' returns the Bessel function of the second kind of order N of + X. It may signal underflow if X is too large. If X is negative, + `yn' signals a domain error; if it is zero, `yn' signals overflow + and returns -oo. diff -durpN glibc-2.2.4/manual/libc.info-32 glibc-2.2.5/manual/libc.info-32 --- glibc-2.2.4/manual/libc.info-32 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-32 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1202 +33,833 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Pseudo-Random Numbers, Next: FP Function Optimizations, Prev: Errors in Math Functions, Up: Mathematics - -Pseudo-Random Numbers -===================== - - This section describes the GNU facilities for generating a series of -pseudo-random numbers. The numbers generated are not truly random; -typically, they form a sequence that repeats periodically, with a period -so large that you can ignore it for ordinary purposes. The random -number generator works by remembering a "seed" value which it uses to -compute the next random number and also to compute a new seed. - - Although the generated numbers look unpredictable within one run of a -program, the sequence of numbers is _exactly the same_ from one run to -the next. This is because the initial seed is always the same. This -is convenient when you are debugging a program, but it is unhelpful if -you want the program to behave unpredictably. If you want a different -pseudo-random series each time your program runs, you must specify a -different seed each time. For ordinary purposes, basing the seed on the -current time works well. - - You can obtain repeatable sequences of numbers on a particular -machine type by specifying the same initial seed value for the random -number generator. There is no standard meaning for a particular seed -value; the same seed, used in different C libraries or on different CPU -types, will give you different random numbers. - - The GNU library supports the standard ISO C random number functions -plus two other sets derived from BSD and SVID. The BSD and ISO C -functions provide identical, somewhat limited functionality. If only a -small number of random bits are required, we recommend you use the -ISO C interface, `rand' and `srand'. The SVID functions provide a more -flexible interface, which allows better random number generator -algorithms, provides more random bits (up to 48) per call, and can -provide random floating-point numbers. These functions are required by -the XPG standard and therefore will be present in all modern Unix -systems. - -* Menu: - -* ISO Random:: `rand' and friends. -* BSD Random:: `random' and friends. -* SVID Random:: `drand48' and friends. - - -File: libc.info, Node: ISO Random, Next: BSD Random, Up: Pseudo-Random Numbers - -ISO C Random Number Functions ------------------------------ - - This section describes the random number functions that are part of -the ISO C standard. - - To use these facilities, you should include the header file -`stdlib.h' in your program. - - - Macro: int RAND_MAX - The value of this macro is an integer constant representing the - largest value the `rand' function can return. In the GNU library, - it is `2147483647', which is the largest signed integer - representable in 32 bits. In other libraries, it may be as low as - `32767'. - - - Function: int rand (void) - The `rand' function returns the next pseudo-random number in the - series. The value ranges from `0' to `RAND_MAX'. - - - Function: void srand (unsigned int SEED) - This function establishes SEED as the seed for a new series of - pseudo-random numbers. If you call `rand' before a seed has been - established with `srand', it uses the value `1' as a default seed. - - To produce a different pseudo-random series each time your program - is run, do `srand (time (0))'. - - POSIX.1 extended the C standard functions to support reproducible -random numbers in multi-threaded programs. However, the extension is -badly designed and unsuitable for serious work. - - - Function: int rand_r (unsigned int *SEED) - This function returns a random number in the range 0 to `RAND_MAX' - just as `rand' does. However, all its state is stored in the SEED - argument. This means the RNG's state can only have as many bits - as the type `unsigned int' has. This is far too few to provide a - good RNG. - - If your program requires a reentrant RNG, we recommend you use the - reentrant GNU extensions to the SVID random number generator. The - POSIX.1 interface should only be used when the GNU extensions are - not available. - - -File: libc.info, Node: BSD Random, Next: SVID Random, Prev: ISO Random, Up: Pseudo-Random Numbers - -BSD Random Number Functions ---------------------------- - - This section describes a set of random number generation functions -that are derived from BSD. There is no advantage to using these -functions with the GNU C library; we support them for BSD compatibility -only. - - The prototypes for these functions are in `stdlib.h'. - - - Function: long int random (void) - This function returns the next pseudo-random number in the - sequence. The value returned ranges from `0' to `RAND_MAX'. - - *Note:* Temporarily this function was defined to return a - `int32_t' value to indicate that the return value always contains - 32 bits even if `long int' is wider. The standard demands it - differently. Users must always be aware of the 32-bit limitation, - though. - - - Function: void srandom (unsigned int SEED) - The `srandom' function sets the state of the random number - generator based on the integer SEED. If you supply a SEED value - of `1', this will cause `random' to reproduce the default set of - random numbers. - - To produce a different set of pseudo-random numbers each time your - program runs, do `srandom (time (0))'. - - - Function: void * initstate (unsigned int SEED, void *STATE, size_t - SIZE) - The `initstate' function is used to initialize the random number - generator state. The argument STATE is an array of SIZE bytes, - used to hold the state information. It is initialized based on - SEED. The size must be between 8 and 256 bytes, and should be a - power of two. The bigger the STATE array, the better. - - The return value is the previous value of the state information - array. You can use this value later as an argument to `setstate' - to restore that state. - - - Function: void * setstate (void *STATE) - The `setstate' function restores the random number state - information STATE. The argument must have been the result of a - previous call to INITSTATE or SETSTATE. - - The return value is the previous value of the state information - array. You can use this value later as an argument to `setstate' - to restore that state. - - If the function fails the return value is `NULL'. - - The four functions described so far in this section all work on a -state which is shared by all threads. The state is not directly -accessible to the user and can only be modified by these functions. -This makes it hard to deal with situations where each thread should -have its own pseudo-random number generator. - - The GNU C library contains four additional functions which contain -the state as an explicit parameter and therefore make it possible to -handle thread-local PRNGs. Beside this there are no difference. In -fact, the four functions already discussed are implemented internally -using the following interfaces. - - The `stdlib.h' header contains a definition of the following type: - - - Data Type: struct random_data - Objects of type `struct random_data' contain the information - necessary to represent the state of the PRNG. Although a complete - definition of the type is present the type should be treated as - opaque. - - The functions modifying the state follow exactly the already -described functions. - - - Function: int random_r (struct random_data *restrict BUF, int32_t - *restrict RESULT) - The `random_r' function behaves exactly like the `random' function - except that it uses and modifies the state in the object pointed - to by the first parameter instead of the global state. - - - Function: int srandom_r (unsigned int SEED, struct random_data *BUF) - The `srandom_r' function behaves exactly like the `srandom' - function except that it uses and modifies the state in the object - pointed to by the second parameter instead of the global state. - - - Function: int initstate_r (unsigned int SEED, char *restrict - STATEBUF, size_t STATELEN, struct random_data *restrict BUF) - The `initstate_r' function behaves exactly like the `initstate' - function except that it uses and modifies the state in the object - pointed to by the fourth parameter instead of the global state. - - - Function: int setstate_r (char *restrict STATEBUF, struct - random_data *restrict BUF) - The `setstate_r' function behaves exactly like the `setstate' - function except that it uses and modifies the state in the object - pointed to by the first parameter instead of the global state. - - -File: libc.info, Node: SVID Random, Prev: BSD Random, Up: Pseudo-Random Numbers - -SVID Random Number Function ---------------------------- - - The C library on SVID systems contains yet another kind of random -number generator functions. They use a state of 48 bits of data. The -user can choose among a collection of functions which return the random -bits in different forms. - - Generally there are two kinds of function. The first uses a state of -the random number generator which is shared among several functions and -by all threads of the process. The second requires the user to handle -the state. - - All functions have in common that they use the same congruential -formula with the same constants. The formula is - - Y = (a * X + c) mod m - -where X is the state of the generator at the beginning and Y the state -at the end. `a' and `c' are constants determining the way the -generator works. By default they are - - a = 0x5DEECE66D = 25214903917 - c = 0xb = 11 - -but they can also be changed by the user. `m' is of course 2^48 since -the state consists of a 48-bit array. - - The prototypes for these functions are in `stdlib.h'. - - - Function: double drand48 (void) - This function returns a `double' value in the range of `0.0' to - `1.0' (exclusive). The random bits are determined by the global - state of the random number generator in the C library. - - Since the `double' type according to IEEE 754 has a 52-bit - mantissa this means 4 bits are not initialized by the random number - generator. These are (of course) chosen to be the least - significant bits and they are initialized to `0'. - - - Function: double erand48 (unsigned short int XSUBI[3]) - This function returns a `double' value in the range of `0.0' to - `1.0' (exclusive), similarly to `drand48'. The argument is an - array describing the state of the random number generator. - - This function can be called subsequently since it updates the - array to guarantee random numbers. The array should have been - initialized before initial use to obtain reproducible results. - - - Function: long int lrand48 (void) - The `lrand48' function returns an integer value in the range of - `0' to `2^31' (exclusive). Even if the size of the `long int' - type can take more than 32 bits, no higher numbers are returned. - The random bits are determined by the global state of the random - number generator in the C library. - - - Function: long int nrand48 (unsigned short int XSUBI[3]) - This function is similar to the `lrand48' function in that it - returns a number in the range of `0' to `2^31' (exclusive) but the - state of the random number generator used to produce the random - bits is determined by the array provided as the parameter to the - function. - - The numbers in the array are updated afterwards so that subsequent - calls to this function yield different results (as is expected of - a random number generator). The array should have been - initialized before the first call to obtain reproducible results. - - - Function: long int mrand48 (void) - The `mrand48' function is similar to `lrand48'. The only - difference is that the numbers returned are in the range `-2^31' to - `2^31' (exclusive). - - - Function: long int jrand48 (unsigned short int XSUBI[3]) - The `jrand48' function is similar to `nrand48'. The only - difference is that the numbers returned are in the range `-2^31' to - `2^31' (exclusive). For the `xsubi' parameter the same - requirements are necessary. - - The internal state of the random number generator can be initialized -in several ways. The methods differ in the completeness of the -information provided. - - - Function: void srand48 (long int SEEDVAL) - The `srand48' function sets the most significant 32 bits of the - internal state of the random number generator to the least - significant 32 bits of the SEEDVAL parameter. The lower 16 bits - are initialized to the value `0x330E'. Even if the `long int' - type contains more than 32 bits only the lower 32 bits are used. - - Owing to this limitation, initialization of the state of this - function is not very useful. But it makes it easy to use a - construct like `srand48 (time (0))'. - - A side-effect of this function is that the values `a' and `c' from - the internal state, which are used in the congruential formula, - are reset to the default values given above. This is of - importance once the user has called the `lcong48' function (see - below). - - - Function: unsigned short int * seed48 (unsigned short int SEED16V[3]) - The `seed48' function initializes all 48 bits of the state of the - internal random number generator from the contents of the parameter - SEED16V. Here the lower 16 bits of the first element of SEE16V - initialize the least significant 16 bits of the internal state, - the lower 16 bits of `SEED16V[1]' initialize the mid-order 16 bits - of the state and the 16 lower bits of `SEED16V[2]' initialize the - most significant 16 bits of the state. - - Unlike `srand48' this function lets the user initialize all 48 bits - of the state. - - The value returned by `seed48' is a pointer to an array containing - the values of the internal state before the change. This might be - useful to restart the random number generator at a certain state. - Otherwise the value can simply be ignored. - - As for `srand48', the values `a' and `c' from the congruential - formula are reset to the default values. - - There is one more function to initialize the random number generator -which enables you to specify even more information by allowing you to -change the parameters in the congruential formula. - - - Function: void lcong48 (unsigned short int PARAM[7]) - The `lcong48' function allows the user to change the complete state - of the random number generator. Unlike `srand48' and `seed48', - this function also changes the constants in the congruential - formula. - - From the seven elements in the array PARAM the least significant - 16 bits of the entries `PARAM[0]' to `PARAM[2]' determine the - initial state, the least significant 16 bits of `PARAM[3]' to - `PARAM[5]' determine the 48 bit constant `a' and `PARAM[6]' - determines the 16-bit value `c'. - - All the above functions have in common that they use the global -parameters for the congruential formula. In multi-threaded programs it -might sometimes be useful to have different parameters in different -threads. For this reason all the above functions have a counterpart -which works on a description of the random number generator in the -user-supplied buffer instead of the global state. - - Please note that it is no problem if several threads use the global -state if all threads use the functions which take a pointer to an array -containing the state. The random numbers are computed following the -same loop but if the state in the array is different all threads will -obtain an individual random number generator. - - The user-supplied buffer must be of type `struct drand48_data'. -This type should be regarded as opaque and not manipulated directly. - - - Function: int drand48_r (struct drand48_data *BUFFER, double *RESULT) - This function is equivalent to the `drand48' function with the - difference that it does not modify the global random number - generator parameters but instead the parameters in the buffer - supplied through the pointer BUFFER. The random number is - returned in the variable pointed to by RESULT. - - The return value of the function indicates whether the call - succeeded. If the value is less than `0' an error occurred and - ERRNO is set to indicate the problem. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int erand48_r (unsigned short int XSUBI[3], struct - drand48_data *BUFFER, double *RESULT) - The `erand48_r' function works like `erand48', but in addition it - takes an argument BUFFER which describes the random number - generator. The state of the random number generator is taken from - the `xsubi' array, the parameters for the congruential formula - from the global random number generator data. The random number - is returned in the variable pointed to by RESULT. - - The return value is non-negative if the call succeeded. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int lrand48_r (struct drand48_data *BUFFER, double *RESULT) - This function is similar to `lrand48', but in addition it takes a - pointer to a buffer describing the state of the random number - generator just like `drand48'. - - If the return value of the function is non-negative the variable - pointed to by RESULT contains the result. Otherwise an error - occurred. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int nrand48_r (unsigned short int XSUBI[3], struct - drand48_data *BUFFER, long int *RESULT) - The `nrand48_r' function works like `nrand48' in that it produces - a random number in the range `0' to `2^31'. But instead of using - the global parameters for the congruential formula it uses the - information from the buffer pointed to by BUFFER. The state is - described by the values in XSUBI. - - If the return value is non-negative the variable pointed to by - RESULT contains the result. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int mrand48_r (struct drand48_data *BUFFER, double *RESULT) - This function is similar to `mrand48' but like the other reentrant - functions it uses the random number generator described by the - value in the buffer pointed to by BUFFER. - - If the return value is non-negative the variable pointed to by - RESULT contains the result. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int jrand48_r (unsigned short int XSUBI[3], struct - drand48_data *BUFFER, long int *RESULT) - The `jrand48_r' function is similar to `jrand48'. Like the other - reentrant functions of this function family it uses the - congruential formula parameters from the buffer pointed to by - BUFFER. - - If the return value is non-negative the variable pointed to by - RESULT contains the result. - - This function is a GNU extension and should not be used in portable - programs. - - Before any of the above functions are used the buffer of type -`struct drand48_data' should be initialized. The easiest way to do -this is to fill the whole buffer with null bytes, e.g. by - - memset (buffer, '\0', sizeof (struct drand48_data)); - -Using any of the reentrant functions of this family now will -automatically initialize the random number generator to the default -values for the state and the parameters of the congruential formula. - - The other possibility is to use any of the functions which explicitly -initialize the buffer. Though it might be obvious how to initialize the -buffer from looking at the parameter to the function, it is highly -recommended to use these functions since the result might not always be -what you expect. - - - Function: int srand48_r (long int SEEDVAL, struct drand48_data - *BUFFER) - The description of the random number generator represented by the - information in BUFFER is initialized similarly to what the function - `srand48' does. The state is initialized from the parameter - SEEDVAL and the parameters for the congruential formula are - initialized to their default values. - - If the return value is non-negative the function call succeeded. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int seed48_r (unsigned short int SEED16V[3], struct - drand48_data *BUFFER) - This function is similar to `srand48_r' but like `seed48' it - initializes all 48 bits of the state from the parameter SEED16V. - - If the return value is non-negative the function call succeeded. - It does not return a pointer to the previous state of the random - number generator like the `seed48' function does. If the user - wants to preserve the state for a later re-run s/he can copy the - whole buffer pointed to by BUFFER. - - This function is a GNU extension and should not be used in portable - programs. - - - Function: int lcong48_r (unsigned short int PARAM[7], struct - drand48_data *BUFFER) - This function initializes all aspects of the random number - generator described in BUFFER with the data in PARAM. Here it is - especially true that the function does more than just copying the - contents of PARAM and BUFFER. More work is required and therefore - it is important to use this function rather than initializing the - random number generator directly. - - If the return value is non-negative the function call succeeded. - - This function is a GNU extension and should not be used in portable - programs. - - -File: libc.info, Node: FP Function Optimizations, Prev: Pseudo-Random Numbers, Up: Mathematics - -Is Fast Code or Small Code preferred? -===================================== - - If an application uses many floating point functions it is often the -case that the cost of the function calls themselves is not negligible. -Modern processors can often execute the operations themselves very -fast, but the function call disrupts the instruction pipeline. - - For this reason the GNU C Library provides optimizations for many of -the frequently-used math functions. When GNU CC is used and the user -activates the optimizer, several new inline functions and macros are -defined. These new functions and macros have the same names as the -library functions and so are used instead of the latter. In the case of -inline functions the compiler will decide whether it is reasonable to -use them, and this decision is usually correct. - - This means that no calls to the library functions may be necessary, -and can increase the speed of generated code significantly. The -drawback is that code size will increase, and the increase is not -always negligible. - - There are two kind of inline functions: Those that give the same -result as the library functions and others that might not set `errno' -and might have a reduced precision and/or argument range in comparison -with the library functions. The latter inline functions are only -available if the flag `-ffast-math' is given to GNU CC. - - In cases where the inline functions and macros are not wanted the -symbol `__NO_MATH_INLINES' should be defined before any system header is -included. This will ensure that only library functions are used. Of -course, it can be determined for each file in the project whether -giving this option is preferable or not. - - Not all hardware implements the entire IEEE 754 standard, and even -if it does there may be a substantial performance penalty for using some -of its features. For example, enabling traps on some processors forces -the FPU to run un-pipelined, which can more than double calculation -time. - - -File: libc.info, Node: Arithmetic, Next: Date and Time, Prev: Mathematics, Up: Top - -Arithmetic Functions -******************** - - This chapter contains information about functions for doing basic -arithmetic operations, such as splitting a float into its integer and -fractional parts or retrieving the imaginary part of a complex value. -These functions are declared in the header files `math.h' and -`complex.h'. - -* Menu: - -* Integers:: Basic integer types and concepts -* Integer Division:: Integer division with guaranteed rounding. -* Floating Point Numbers:: Basic concepts. IEEE 754. -* Floating Point Classes:: The five kinds of floating-point number. -* Floating Point Errors:: When something goes wrong in a calculation. -* Rounding:: Controlling how results are rounded. -* Control Functions:: Saving and restoring the FPU's state. -* Arithmetic Functions:: Fundamental operations provided by the library. -* Complex Numbers:: The types. Writing complex constants. -* Operations on Complex:: Projection, conjugation, decomposition. -* Parsing of Numbers:: Converting strings to numbers. -* System V Number Conversion:: An archaic way to convert numbers to strings. - - -File: libc.info, Node: Integers, Next: Integer Division, Up: Arithmetic - -Integers -======== - - The C language defines several integer data types: integer, short -integer, long integer, and character, all in both signed and unsigned -varieties. The GNU C compiler extends the language to contain long -long integers as well. - - The C integer types were intended to allow code to be portable among -machines with different inherent data sizes (word sizes), so each type -may have different ranges on different machines. The problem with this -is that a program often needs to be written for a particular range of -integers, and sometimes must be written for a particular size of -storage, regardless of what machine the program runs on. - - To address this problem, the GNU C library contains C type -definitions you can use to declare integers that meet your exact needs. -Because the GNU C library header files are customized to a specific -machine, your program source code doesn't have to be. - - These `typedef's are in `stdint.h'. - - If you require that an integer be represented in exactly N bits, use -one of the following types, with the obvious mapping to bit size and -signedness: - - * int8_t - - * int16_t - - * int32_t - - * int64_t - - * uint8_t - - * uint16_t - - * uint32_t - - * uint64_t - - If your C compiler and target machine do not allow integers of a -certain size, the corresponding above type does not exist. - - If you don't need a specific storage size, but want the smallest data -structure with _at least_ N bits, use one of these: - - * int_least8_t - - * int_least16_t - - * int_least32_t - - * int_least64_t - - * uint_least8_t - - * uint_least16_t - - * uint_least32_t - - * uint_least64_t - - If you don't need a specific storage size, but want the data -structure that allows the fastest access while having at least N bits -(and among data structures with the same access speed, the smallest -one), use one of these: - - * int_fast8_t - - * int_fast16_t - - * int_fast32_t - - * int_fast64_t - - * uint_fast8_t - - * uint_fast16_t - - * uint_fast32_t - - * uint_fast64_t - - If you want an integer with the widest range possible on the -platform on which it is being used, use one of the following. If you -use these, you should write code that takes into account the variable -size and range of the integer. - - * intmax_t - - * uintmax_t - - The GNU C library also provides macros that tell you the maximum and -minimum possible values for each integer data type. The macro names -follow these examples: `INT32_MAX', `UINT8_MAX', `INT_FAST32_MIN', -`INT_LEAST64_MIN', `UINTMAX_MAX', `INTMAX_MAX', `INTMAX_MIN'. Note -that there are no macros for unsigned integer minima. These are always -zero. - - There are similar macros for use with C's built in integer types -which should come with your C compiler. These are described in *Note -Data Type Measurements::. - - Don't forget you can use the C `sizeof' function with any of these -data types to get the number of bytes of storage each uses. - - -File: libc.info, Node: Integer Division, Next: Floating Point Numbers, Prev: Integers, Up: Arithmetic - -Integer Division -================ - - This section describes functions for performing integer division. -These functions are redundant when GNU CC is used, because in GNU C the -`/' operator always rounds towards zero. But in other C -implementations, `/' may round differently with negative arguments. -`div' and `ldiv' are useful because they specify how to round the -quotient: towards zero. The remainder has the same sign as the -numerator. - - These functions are specified to return a result R such that the -value `R.quot*DENOMINATOR + R.rem' equals NUMERATOR. - - To use these facilities, you should include the header file -`stdlib.h' in your program. - - - Data Type: div_t - This is a structure type used to hold the result returned by the - `div' function. It has the following members: - - `int quot' - The quotient from the division. - - `int rem' - The remainder from the division. - - - Function: div_t div (int NUMERATOR, int DENOMINATOR) - This function `div' computes the quotient and remainder from the - division of NUMERATOR by DENOMINATOR, returning the result in a - structure of type `div_t'. - - If the result cannot be represented (as in a division by zero), the - behavior is undefined. - - Here is an example, albeit not a very useful one. - - div_t result; - result = div (20, -6); - - Now `result.quot' is `-3' and `result.rem' is `2'. - - - Data Type: ldiv_t - This is a structure type used to hold the result returned by the - `ldiv' function. It has the following members: - - `long int quot' - The quotient from the division. - - `long int rem' - The remainder from the division. - - (This is identical to `div_t' except that the components are of - type `long int' rather than `int'.) - - - Function: ldiv_t ldiv (long int NUMERATOR, long int DENOMINATOR) - The `ldiv' function is similar to `div', except that the arguments - are of type `long int' and the result is returned as a structure - of type `ldiv_t'. - - - Data Type: lldiv_t - This is a structure type used to hold the result returned by the - `lldiv' function. It has the following members: - - `long long int quot' - The quotient from the division. - - `long long int rem' - The remainder from the division. - - (This is identical to `div_t' except that the components are of - type `long long int' rather than `int'.) - - - Function: lldiv_t lldiv (long long int NUMERATOR, long long int - DENOMINATOR) - The `lldiv' function is like the `div' function, but the arguments - are of type `long long int' and the result is returned as a - structure of type `lldiv_t'. - - The `lldiv' function was added in ISO C99. - - - Data Type: imaxdiv_t - This is a structure type used to hold the result returned by the - `imaxdiv' function. It has the following members: - - `intmax_t quot' - The quotient from the division. - - `intmax_t rem' - The remainder from the division. - - (This is identical to `div_t' except that the components are of - type `intmax_t' rather than `int'.) - - See *Note Integers:: for a description of the `intmax_t' type. - - - - Function: imaxdiv_t imaxdiv (intmax_t NUMERATOR, intmax_t - DENOMINATOR) - The `imaxdiv' function is like the `div' function, but the - arguments are of type `intmax_t' and the result is returned as a - structure of type `imaxdiv_t'. - - See *Note Integers:: for a description of the `intmax_t' type. - - The `imaxdiv' function was added in ISO C99. - - -File: libc.info, Node: Floating Point Numbers, Next: Floating Point Classes, Prev: Integer Division, Up: Arithmetic - -Floating Point Numbers -====================== - - Most computer hardware has support for two different kinds of -numbers: integers (...-3, -2, -1, 0, 1, 2, 3...) and floating-point -numbers. Floating-point numbers have three parts: the "mantissa", the -"exponent", and the "sign bit". The real number represented by a -floating-point value is given by (s ? -1 : 1) * 2^e * M where s is the -sign bit, e the exponent, and M the mantissa. *Note Floating Point -Concepts::, for details. (It is possible to have a different "base" -for the exponent, but all modern hardware uses 2.) - - Floating-point numbers can represent a finite subset of the real -numbers. While this subset is large enough for most purposes, it is -important to remember that the only reals that can be represented -exactly are rational numbers that have a terminating binary expansion -shorter than the width of the mantissa. Even simple fractions such as -1/5 can only be approximated by floating point. - - Mathematical operations and functions frequently need to produce -values that are not representable. Often these values can be -approximated closely enough for practical purposes, but sometimes they -can't. Historically there was no way to tell when the results of a -calculation were inaccurate. Modern computers implement the IEEE 754 -standard for numerical computations, which defines a framework for -indicating to the program when the results of calculation are not -trustworthy. This framework consists of a set of "exceptions" that -indicate why a result could not be represented, and the special values -"infinity" and "not a number" (NaN). - - -File: libc.info, Node: Floating Point Classes, Next: Floating Point Errors, Prev: Floating Point Numbers, Up: Arithmetic - -Floating-Point Number Classification Functions -============================================== - - ISO C99 defines macros that let you determine what sort of -floating-point number a variable holds. - - - Macro: int fpclassify (_float-type_ X) - This is a generic macro which works on all floating-point types and - which returns a value of type `int'. The possible values are: - - `FP_NAN' - The floating-point number X is "Not a Number" (*note Infinity - and NaN::) - - `FP_INFINITE' - The value of X is either plus or minus infinity (*note - Infinity and NaN::) - - `FP_ZERO' - The value of X is zero. In floating-point formats like - IEEE 754, where zero can be signed, this value is also - returned if X is negative zero. - - `FP_SUBNORMAL' - Numbers whose absolute value is too small to be represented - in the normal format are represented in an alternate, - "denormalized" format (*note Floating Point Concepts::). - This format is less precise but can represent values closer - to zero. `fpclassify' returns this value for values of X in - this alternate format. - - `FP_NORMAL' - This value is returned for all other values of X. It - indicates that there is nothing special about the number. - - - `fpclassify' is most useful if more than one property of a number -must be tested. There are more specific macros which only test one -property at a time. Generally these macros execute faster than -`fpclassify', since there is special hardware support for them. You -should therefore use the specific macros whenever possible. - - - Macro: int isfinite (_float-type_ X) - This macro returns a nonzero value if X is finite: not plus or - minus infinity, and not NaN. It is equivalent to - - (fpclassify (x) != FP_NAN && fpclassify (x) != FP_INFINITE) - - `isfinite' is implemented as a macro which accepts any - floating-point type. - - - Macro: int isnormal (_float-type_ X) - This macro returns a nonzero value if X is finite and normalized. - It is equivalent to - - (fpclassify (x) == FP_NORMAL) - - - Macro: int isnan (_float-type_ X) - This macro returns a nonzero value if X is NaN. It is equivalent - to - - (fpclassify (x) == FP_NAN) - - Another set of floating-point classification functions was provided -by BSD. The GNU C library also supports these functions; however, we -recommend that you use the ISO C99 macros in new code. Those are -standard and will be available more widely. Also, since they are -macros, you do not have to worry about the type of their argument. - - - Function: int isinf (double X) - - Function: int isinff (float X) - - Function: int isinfl (long double X) - This function returns `-1' if X represents negative infinity, `1' - if X represents positive infinity, and `0' otherwise. - - - Function: int isnan (double X) - - Function: int isnanf (float X) - - Function: int isnanl (long double X) - This function returns a nonzero value if X is a "not a number" - value, and zero otherwise. - - *Note:* The `isnan' macro defined by ISO C99 overrides the BSD - function. This is normally not a problem, because the two - routines behave identically. However, if you really need to get - the BSD function for some reason, you can write - - (isnan) (x) - - - Function: int finite (double X) - - Function: int finitef (float X) - - Function: int finitel (long double X) - This function returns a nonzero value if X is finite or a "not a - number" value, and zero otherwise. - - *Portability Note:* The functions listed in this section are BSD -extensions. - - -File: libc.info, Node: Floating Point Errors, Next: Rounding, Prev: Floating Point Classes, Up: Arithmetic - -Errors in Floating-Point Calculations -===================================== - -* Menu: - -* FP Exceptions:: IEEE 754 math exceptions and how to detect them. -* Infinity and NaN:: Special values returned by calculations. -* Status bit operations:: Checking for exceptions after the fact. -* Math Error Reporting:: How the math functions report errors. - - -File: libc.info, Node: FP Exceptions, Next: Infinity and NaN, Up: Floating Point Errors - -FP Exceptions -------------- - - The IEEE 754 standard defines five "exceptions" that can occur -during a calculation. Each corresponds to a particular sort of error, -such as overflow. - - When exceptions occur (when exceptions are "raised", in the language -of the standard), one of two things can happen. By default the -exception is simply noted in the floating-point "status word", and the -program continues as if nothing had happened. The operation produces a -default value, which depends on the exception (see the table below). -Your program can check the status word to find out which exceptions -happened. - - Alternatively, you can enable "traps" for exceptions. In that case, -when an exception is raised, your program will receive the `SIGFPE' -signal. The default action for this signal is to terminate the -program. *Note Signal Handling::, for how you can change the effect of -the signal. - - In the System V math library, the user-defined function `matherr' is -called when certain exceptions occur inside math library functions. -However, the Unix98 standard deprecates this interface. We support it -for historical compatibility, but recommend that you do not use it in -new programs. - -The exceptions defined in IEEE 754 are: - -`Invalid Operation' - This exception is raised if the given operands are invalid for the - operation to be performed. Examples are (see IEEE 754, section 7): - 1. Addition or subtraction: oo - oo. (But oo + oo = oo). - - 2. Multiplication: 0 * oo. - - 3. Division: 0/0 or oo/oo. - - 4. Remainder: x REM y, where y is zero or x is infinite. - - 5. Square root if the operand is less then zero. More - generally, any mathematical function evaluated outside its - domain produces this exception. - - 6. Conversion of a floating-point number to an integer or decimal - string, when the number cannot be represented in the target - format (due to overflow, infinity, or NaN). - - 7. Conversion of an unrecognizable input string. - - 8. Comparison via predicates involving < or >, when one or other - of the operands is NaN. You can prevent this exception by - using the unordered comparison functions instead; see *Note - FP Comparison Functions::. - - If the exception does not trap, the result of the operation is NaN. - -`Division by Zero' - This exception is raised when a finite nonzero number is divided - by zero. If no trap occurs the result is either +oo or -oo, - depending on the signs of the operands. - -`Overflow' - This exception is raised whenever the result cannot be represented - as a finite value in the precision format of the destination. If - no trap occurs the result depends on the sign of the intermediate - result and the current rounding mode (IEEE 754, section 7.3): - 1. Round to nearest carries all overflows to oo with the sign of - the intermediate result. - - 2. Round toward 0 carries all overflows to the largest - representable finite number with the sign of the intermediate - result. - - 3. Round toward -oo carries positive overflows to the largest - representable finite number and negative overflows to -oo. - - 4. Round toward oo carries negative overflows to the most - negative representable finite number and positive overflows - to oo. - - Whenever the overflow exception is raised, the inexact exception - is also raised. - -`Underflow' - The underflow exception is raised when an intermediate result is - too small to be calculated accurately, or if the operation's - result rounded to the destination precision is too small to be - normalized. - - When no trap is installed for the underflow exception, underflow is - signaled (via the underflow flag) only when both tininess and loss - of accuracy have been detected. If no trap handler is installed - the operation continues with an imprecise small value, or zero if - the destination precision cannot hold the small exact result. - -`Inexact' - This exception is signalled if a rounded result is not exact (such - as when calculating the square root of two) or a result overflows - without an overflow trap. - - -File: libc.info, Node: Infinity and NaN, Next: Status bit operations, Prev: FP Exceptions, Up: Floating Point Errors - -Infinity and NaN ----------------- - - IEEE 754 floating point numbers can represent positive or negative -infinity, and "NaN" (not a number). These three values arise from -calculations whose result is undefined or cannot be represented -accurately. You can also deliberately set a floating-point variable to -any of them, which is sometimes useful. Some examples of calculations -that produce infinity or NaN: - - 1/0 = oo - log (0) = -oo - sqrt (-1) = NaN - - When a calculation produces any of these values, an exception also -occurs; see *Note FP Exceptions::. - - The basic operations and math functions all accept infinity and NaN -and produce sensible output. Infinities propagate through calculations -as one would expect: for example, 2 + oo = oo, 4/oo = 0, atan (oo) = -pi/2. NaN, on the other hand, infects any calculation that involves -it. Unless the calculation would produce the same result no matter -what real value replaced NaN, the result is NaN. - - In comparison operations, positive infinity is larger than all values -except itself and NaN, and negative infinity is smaller than all values -except itself and NaN. NaN is "unordered": it is not equal to, greater -than, or less than anything, _including itself_. `x == x' is false if -the value of `x' is NaN. You can use this to test whether a value is -NaN or not, but the recommended way to test for NaN is with the `isnan' -function (*note Floating Point Classes::). In addition, `<', `>', -`<=', and `>=' will raise an exception when applied to NaNs. - - `math.h' defines macros that allow you to explicitly set a variable -to infinity or NaN. - - - Macro: float INFINITY - An expression representing positive infinity. It is equal to the - value produced by mathematical operations like `1.0 / 0.0'. - `-INFINITY' represents negative infinity. - - You can test whether a floating-point value is infinite by - comparing it to this macro. However, this is not recommended; you - should use the `isfinite' macro instead. *Note Floating Point - Classes::. - - This macro was introduced in the ISO C99 standard. - - - Macro: float NAN - An expression representing a value which is "not a number". This - macro is a GNU extension, available only on machines that support - the "not a number" value--that is to say, on all machines that - support IEEE floating point. - - You can use `#ifdef NAN' to test whether the machine supports NaN. - (Of course, you must arrange for GNU extensions to be visible, - such as by defining `_GNU_SOURCE', and then you must include - `math.h'.) - - IEEE 754 also allows for another unusual value: negative zero. This -value is produced when you divide a positive number by negative -infinity, or when a negative result is smaller than the limits of -representation. Negative zero behaves identically to zero in all -calculations, unless you explicitly test the sign bit with `signbit' or -`copysign'. - - -File: libc.info, Node: Status bit operations, Next: Math Error Reporting, Prev: Infinity and NaN, Up: Floating Point Errors - -Examining the FPU status word ------------------------------ - - ISO C99 defines functions to query and manipulate the floating-point -status word. You can use these functions to check for untrapped -exceptions when it's convenient, rather than worrying about them in the -middle of a calculation. - - These constants represent the various IEEE 754 exceptions. Not all -FPUs report all the different exceptions. Each constant is defined if -and only if the FPU you are compiling for supports that exception, so -you can test for FPU support with `#ifdef'. They are defined in -`fenv.h'. - -`FE_INEXACT' - The inexact exception. - -`FE_DIVBYZERO' - The divide by zero exception. - -`FE_UNDERFLOW' - The underflow exception. - -`FE_OVERFLOW' - The overflow exception. - -`FE_INVALID' - The invalid exception. - - The macro `FE_ALL_EXCEPT' is the bitwise OR of all exception macros -which are supported by the FP implementation. - - These functions allow you to clear exception flags, test for -exceptions, and save and restore the set of exceptions flagged. - - - Function: int feclearexcept (int EXCEPTS) - This function clears all of the supported exception flags - indicated by EXCEPTS. - - The function returns zero in case the operation was successful, a - non-zero value otherwise. - - - Function: int feraiseexcept (int EXCEPTS) - This function raises the supported exceptions indicated by - EXCEPTS. If more than one exception bit in EXCEPTS is set the - order in which the exceptions are raised is undefined except that - overflow (`FE_OVERFLOW') or underflow (`FE_UNDERFLOW') are raised - before inexact (`FE_INEXACT'). Whether for overflow or underflow - the inexact exception is also raised is also implementation - dependent. - - The function returns zero in case the operation was successful, a - non-zero value otherwise. - - - Function: int fetestexcept (int EXCEPTS) - Test whether the exception flags indicated by the parameter EXCEPT - are currently set. If any of them are, a nonzero value is returned - which specifies which exceptions are set. Otherwise the result is - zero. +File: libc.info, Node: Errors in Math Functions, Next: Pseudo-Random Numbers, Prev: Special Functions, Up: Mathematics - To understand these functions, imagine that the status word is an -integer variable named STATUS. `feclearexcept' is then equivalent to -`status &= ~excepts' and `fetestexcept' is equivalent to `(status & -excepts)'. The actual implementation may be very different, of course. +Known Maximum Errors in Math Functions +====================================== - Exception flags are only cleared when the program explicitly -requests it, by calling `feclearexcept'. If you want to check for -exceptions from a set of calculations, you should clear all the flags -first. Here is a simple example of the way to use `fetestexcept': + This section lists the known errors of the functions in the math +library. Errors are measured in "units of the last place". This is a +measure for the relative error. For a number z with the representation +d.d...d*2^e (we assume IEEE floating-point numbers with base 2) the ULP +is represented by - { - double f; - int raised; - feclearexcept (FE_ALL_EXCEPT); - f = compute (); - raised = fetestexcept (FE_OVERFLOW | FE_INVALID); - if (raised & FE_OVERFLOW) { /* ... */ } - if (raised & FE_INVALID) { /* ... */ } - /* ... */ - } + |d.d...d - (z / 2^e)| / 2^(p - 1) - You cannot explicitly set bits in the status word. You can, however, -save the entire status word and restore it later. This is done with the -following functions: +where p is the number of bits in the mantissa of the floating-point +number representation. Ideally the error for all functions is always +less than 0.5ulps. Using rounding bits this is also possible and +normally implemented for the basic operations. To achieve the same for +the complex math functions requires a lot more work and this has not +yet been done. - - Function: int fegetexceptflag (fexcept_t *FLAGP, int EXCEPTS) - This function stores in the variable pointed to by FLAGP an - implementation-defined value representing the current setting of - the exception flags indicated by EXCEPTS. + Therefore many of the functions in the math library have errors. The +table lists the maximum error for each function which is exposed by one +of the existing tests in the test suite. The table tries to cover as +much as possible and list the actual maximum error (or at least a +ballpark figure) but this is often not achieved due to the large search +space. - The function returns zero in case the operation was successful, a - non-zero value otherwise. + The table lists the ULP values for different architectures. +Different architectures have different results since their hardware +support for floating-point operations varies and also the existing +hardware support is different. - - Function: int fesetexceptflag (const fexcept_t *FLAGP, int - EXCEPTS) This function restores the flags for the exceptions - indicated by EXCEPTS to the values stored in the variable pointed - to by FLAGP. +Function Alpha ARM Generic ix86 IA64 +acosf - - - - - +acos - - - - - +acosl - - - 1150 - +acoshf - - - - - +acosh - - - - - +acoshl - - - 1 - +asinf 2 2 - - - +asin 1 1 - 1 1 +asinl - - - 1 - +asinhf - - - - - +asinh - - - - - +asinhl - - - 656 14 +atanf - - - - - +atan - - - - - +atanl - - - 549 - +atanhf - - - - - +atanh 1 1 - 1 - +atanhl - - - 1605 - +atan2f 4 - - - - +atan2 - - - - - +atan2l - - - 549 - +cabsf 1 1 - 1 1 +cabs 1 1 - 1 1 +cabsl - - - 560 1 +cacosf 1 + i 1 1 + i 1 - 1 + i 2 1 + i 2 +cacos 1 + i 0 1 + i 0 - 1 + i 0 1 + i 0 +cacosl - - - 151 + i 329 1 + i 1 +cacoshf 7 + i 3 7 + i 3 - 4 + i 4 7 + i 0 +cacosh 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +cacoshl - - - 328 + i 151 7 + i 1 +cargf - - - - - +carg - - - - - +cargl - - - - - +casinf 2 + i 1 2 + i 1 - 2 + i 2 2 + i 2 +casin 3 + i 0 3 + i 0 - 3 + i 0 3 + i 0 +casinl - - - 603 + i 329 0 + i 1 +casinhf 1 + i 6 1 + i 6 - 1 + i 6 1 + i 6 +casinh 5 + i 3 5 + i 3 - 5 + i 3 5 + i 3 +casinhl - - - 892 + i 12 5 + i 5 +catanf 4 + i 1 4 + i 1 - 0 + i 1 0 + i 1 +catan 0 + i 1 0 + i 1 - 0 + i 1 0 + i 1 +catanl - - - 251 + i 474 1 + i 0 +catanhf 1 + i 6 1 + i 6 - 1 + i 0 - +catanh 4 + i 1 4 + i 1 - 2 + i 0 4 + i 0 +catanhl - - - 66 + i 447 1 + i 0 +cbrtf - - - - - +cbrt 1 1 - 1 1 +cbrtl - - - 716 - +ccosf 0 + i 1 0 + i 1 - 1 + i 1 1 + i 1 +ccos 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +ccosl - - - 5 + i 1901 0 + i 1 +ccoshf 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +ccosh 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +ccoshl - - - 1467 + i 1183 1 + i 1 +ceilf - - - - - +ceil - - - - - +ceill - - - - - +cexpf 1 + i 1 1 + i 1 - 1 + i 0 1 + i 1 +cexp 1 + i 0 1 + i 0 - - 1 + i 0 +cexpl - - - 940 + i 1067 2 + i 0 +cimagf - - - - - +cimag - - - - - +cimagl - - - - - +clogf 0 + i 3 0 + i 3 - - - +clog 0 + i 1 0 + i 1 - - - +clogl - - - 0 + i 1 - +clog10f 1 + i 5 1 + i 5 - 1 + i 1 1 + i 1 +clog10 1 + i 1 1 + i 1 - 2 + i 1 2 + i 1 +clog10l - - - 1403 + i 186 1 + i 2 +conjf - - - - - +conj - - - - - +conjl - - - - - +copysignf - - - - - +copysign - - - - - +copysignl - - - - - +cosf 1 1 - 1 1 +cos 2 2 - 2 2 +cosl - - - 529 0.5 +coshf - - - - - +cosh - - - - - +coshl - - - 309 2 +cpowf 4 + i 2 4 + i 2 - 4 + i 2.5333 5 + i 2.5333 +cpow 1 + i 1.1031 1 + i 1.1031 - 1 + i 1.104 1 + i 1.1031 +cpowl - - - 2 + i 9 1 + i 4 +cprojf - - - - - +cproj - - - - - +cprojl - - - - - +crealf - - - - - +creal - - - - - +creall - - - - - +csinf 0 + i 1 0 + i 1 - - - +csin - - - - - +csinl - - - 966 + i 168 0 + i 1 +csinhf 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +csinh 0 + i 1 0 + i 1 - 1 + i 1 1 + i 1 +csinhl - - - 413 + i 477 2 + i 2 +csqrtf 1 + i 1 1 + i 1 - - 1 + i 1 +csqrt 1 + i 0 1 + i 0 - 1 + i 0 1 + i 0 +csqrtl - - - 237 + i 128 - +ctanf 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +ctan 1 + i 1 1 + i 1 - 1 + i 1 1 + i 1 +ctanl - - - 690 + i 367 436 + i 1 +ctanhf 2 + i 1 2 + i 1 - 1 + i 1 1 + i 1 +ctanh 2 + i 2 2 + i 2 - 0 + i 1 0 + i 1 +ctanhl - - - 286 + i 3074 1 + i 24 +erff - - - - - +erf - - - - - +erfl - - - - - +erfcf 12 12 - 12 12 +erfc 24 24 - 24 24 +erfcl - - - 36 12 +expf - - - - - +exp - - - - - +expl - - - 754 - +exp10f 2 2 - - 2 +exp10 6 6 - 1 6 +exp10l - - - 1182 3 +exp2f - - - - - +exp2 - - - - - +exp2l - - - 462 - +expm1f 1 1 - - - +expm1 - - - - - +expm1l - - - 825 1 +fabsf - - - - - +fabs - - - - - +fabsl - - - - - +fdimf - - - - - +fdim - - - - - +fdiml - - - - - +floorf - - - - - +floor - - - - - +floorl - - - - - +fmaf - - - - - +fma - - - - - +fmal - - - - - +fmaxf - - - - - +fmax - - - - - +fmaxl - - - - - +fminf - - - - - +fmin - - - - - +fminl - - - - - +fmodf 1 1 - 1 1 +fmod 2 2 - 2 2 +fmodl - - - 4096 1 +frexpf - - - - - +frexp - - - - - +frexpl - - - - - +gammaf - - - - - +gamma - - - 1 - +gammal - - - 1 1 +hypotf 1 1 - 1 1 +hypot 1 1 - 1 1 +hypotl - - - 560 1 +ilogbf - - - - - +ilogb - - - - - +ilogbl - - - - - +j0f 2 2 - 1 1 +j0 2 2 - 2 2 +j0l - - - 1 2 +j1f 2 2 - 1 2 +j1 1 1 - 2 1 +j1l - - - 2 - +jnf 4 4 - 2 4 +jn 6 6 - 5 6 +jnl - - - 2 2 +lgammaf 2 2 - 2 2 +lgamma 1 1 - 1 1 +lgammal - - - 1 1 +lrintf - - - - - +lrint - - - - - +lrintl - - - - - +llrintf - - - - - +llrint - - - - - +llrintl - - - - - +logf 1 1 - 1 1 +log 1 1 - 1 1 +logl - - - 2341 1 +log10f 1 1 - 1 1 +log10 1 1 - 1 1 +log10l - - - 2033 1 +log1pf 1 1 - 1 1 +log1p 1 1 - 1 1 +log1pl - - - 585 1 +log2f 1 1 - 1 1 +log2 1 1 - 1 1 +log2l - - - 1688 - +logbf - - - - - +logb - - - - - +logbl - - - - - +lroundf - - - - - +lround - - - - - +lroundl - - - - - +llroundf - - - - - +llround - - - - - +llroundl - - - - - +modff - - - - - +modf - - - - - +modfl - - - - - +nearbyintf - - - - - +nearbyint - - - - - +nearbyintl - - - - - +nextafterf - - - - - +nextafter - - - - - +nextafterl - - - - - +nexttowardf - - - - - +nexttoward - - - - - +nexttowardl - - - - - +powf - - - - - +pow - - - - - +powl - - - 725 1 +remainderf - - - - - +remainder - - - - - +remainderl - - - - - +remquof - - - - - +remquo - - - - - +remquol - - - - - +rintf - - - - - +rint - - - - - +rintl - - - - - +roundf - - - - - +round - - - - - +roundl - - - - - +scalbf - - - - - +scalb - - - - - +scalbl - - - - - +scalbnf - - - - - +scalbn - - - - - +scalbnl - - - - - +scalblnf - - - - - +scalbln - - - - - +scalblnl - - - - - +sinf - - - - - +sin - - - - - +sinl - - - 627 1 +sincosf 1 1 - 1 1 +sincos 1 1 - 1 1 +sincosl - - - 627 1 +sinhf 1 1 - 1 1 +sinh 1 1 - - - +sinhl - - - 1029 1 +sqrtf - - - - - +sqrt - - - - - +sqrtl - - - 489 - +tanf - - - - - +tan 0.5 0.5 - 0.5 0.5 +tanl - - - 1401 1 +tanhf 1 1 - - 1 +tanh 1 1 - - 1 +tanhl - - - 521 1 +tgammaf 1 1 - 1 1 +tgamma 1 1 - 2 1 +tgammal - - - 2 1 +truncf - - - - - +trunc - - - - - +truncl - - - - - +y0f 1 1 - 1 1 +y0 2 2 - 3 2 +y0l - - - 2 2 +y1f 2 2 - 2 2 +y1 3 3 - 3 3 +y1l - - - 2 1 +ynf 2 2 - 3 2 +yn 3 3 - 6 3 +ynl - - - 7 7 - The function returns zero in case the operation was successful, a - non-zero value otherwise. +Function M68k MIPS PowerPC S/390 SH4 +acosf - - - - - +acos - - - - - +acosl 1 - - - - +acoshf - - - - - +acosh - - - - - +acoshl 1 - - - - +asinf - 2 2 2 2 +asin 1 1 1 1 1 +asinl 1 - - - - +asinhf - - - - - +asinh - - - - - +asinhl 14 - - - - +atanf - - - - - +atan - - - - - +atanl - - - - - +atanhf - - - - - +atanh 1 1 1 1 1 +atanhl - - - - - +atan2f - 4 4 4 4 +atan2 - - - - - +atan2l - - - - - +cabsf 1 1 1 1 1 +cabs - 1 1 1 1 +cabsl 1 - - - - +cacosf 1 + i 2 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +cacos 1 + i 0 1 + i 0 1 + i 0 1 + i 0 1 + i 0 +cacosl 1 + i 1 - - - - +cacoshf 7 + i 0 7 + i 3 7 + i 3 7 + i 3 7 + i 3 +cacosh 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +cacoshl 6 + i 2 - - - - +cargf - - - - - +carg - - - - - +cargl - - - - - +casinf 2 + i 2 2 + i 1 2 + i 1 2 + i 1 2 + i 1 +casin 3 + i 0 3 + i 0 3 + i 0 3 + i 0 3 + i 0 +casinl 0 + i 1 - - - - +casinhf 19 + i 2 1 + i 6 1 + i 6 1 + i 6 1 + i 6 +casinh 6 + i 13 5 + i 3 5 + i 3 5 + i 3 5 + i 3 +casinhl 5 + i 6 - - - - +catanf 0 + i 1 4 + i 1 4 + i 1 4 + i 1 4 + i 1 +catan 0 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 +catanl 1 + i 0 - - - - +catanhf - 1 + i 6 0 + i 6 1 + i 6 1 + i 6 +catanh - 4 + i 1 4 + i 1 4 + i 1 4 + i 1 +catanhl 1 + i 0 - - - - +cbrtf - - - - - +cbrt 1 1 1 1 1 +cbrtl 1 - - - - +ccosf 1 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 +ccos 0 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +ccosl 0 + i 1 - - - - +ccoshf 3 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +ccosh 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +ccoshl 1 + i 2 - - - - +ceilf - - - - - +ceil - - - - - +ceill - - - - - +cexpf 3 + i 2 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +cexp - 1 + i 0 1 + i 0 1 + i 0 1 + i 0 +cexpl 2 + i 0 - - - - +cimagf - - - - - +cimag - - - - - +cimagl - - - - - +clogf - 0 + i 3 0 + i 3 0 + i 3 0 + i 3 +clog - 0 + i 1 0 + i 1 0 + i 1 0 + i 1 +clogl - - - - - +clog10f 1 + i 1 1 + i 5 1 + i 5 1 + i 5 1 + i 5 +clog10 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +clog10l 1 + i 3 - - - - +conjf - - - - - +conj - - - - - +conjl - - - - - +copysignf - - - - - +copysign - - - - - +copysignl - - - - - +cosf 1 1 1 1 1 +cos 2 2 2 2 2 +cosl 1 - - - - +coshf - - - - - +cosh - - - - - +coshl 2 - - - - +cpowf 1 + i 6 4 + i 2 4 + i 2 4 + i 2 4 + i 2 +cpow 1 + i 2 1 + i 1.1031 1 + i 2 1 + i 1.1031 1 + i 1.1031 +cpowl 5 + i 2 - - - - +cprojf - - - - - +cproj - - - - - +cprojl - - - - - +crealf - - - - - +creal - - - - - +creall - - - - - +csinf 1 + i 1 0 + i 1 0 + i 1 0 + i 1 0 + i 1 +csin - - - - - +csinl - - - - - +csinhf 1 + i 1 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +csinh - 0 + i 1 0 + i 1 0 + i 1 0 + i 1 +csinhl 1 + i 2 - - - - +csqrtf 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +csqrt - 1 + i 0 1 + i 0 1 + i 0 1 + i 0 +csqrtl - - - - - +ctanf 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +ctan 1 + i 0 1 + i 1 1 + i 1 1 + i 1 1 + i 1 +ctanl 439 + i 2 - - - - +ctanhf 1 + i 0 2 + i 1 2 + i 1 2 + i 1 2 + i 1 +ctanh 0 + i 1 2 + i 2 2 + i 2 2 + i 2 2 + i 2 +ctanhl 2 + i 25 - - - - +erff - - - - - +erf - - - - - +erfl - - - - - +erfcf 11 12 12 12 12 +erfc 24 24 24 24 24 +erfcl 12 - - - - +expf - - - - - +exp - - - - - +expl - - - - - +exp10f - 2 2 2 2 +exp10 1 6 6 6 6 +exp10l 1 - - - - +exp2f - - - - - +exp2 - - - - - +exp2l - - - - - +expm1f - 1 1 1 1 +expm1 - - - - - +expm1l 1 - - - - +fabsf - - - - - +fabs - - - - - +fabsl - - - - - +fdimf - - - - - +fdim - - - - - +fdiml - - - - - +floorf - - - - - +floor - - - - - +floorl - - - - - +fmaf - - - - - +fma - - - - - +fmal - - - - - +fmaxf - - - - - +fmax - - - - - +fmaxl - - - - - +fminf - - - - - +fmin - - - - - +fminl - - - - - +fmodf 1 1 1 1 1 +fmod 2 2 2 2 2 +fmodl 1 - - - - +frexpf - - - - - +frexp - - - - - +frexpl - - - - - +gammaf - - - - - +gamma - - - - - +gammal 1 - - - - +hypotf 1 1 1 1 1 +hypot - 1 1 1 1 +hypotl 1 - - - - +ilogbf - - - - - +ilogb - - - - - +ilogbl - - - - - +j0f 1 2 1 2 2 +j0 1 2 2 2 2 +j0l 1 - - - - +j1f 2 2 2 2 2 +j1 - 1 1 1 1 +j1l 2 - - - - +jnf 11 4 4 4 4 +jn 4 6 6 6 6 +jnl 2 - - - - +lgammaf 2 2 2 2 2 +lgamma 1 1 1 1 1 +lgammal 1 - - - - +lrintf - - - - - +lrint - - - - - +lrintl - - - - - +llrintf - - - - - +llrint - - - - - +llrintl - - - - - +logf 1 1 1 1 1 +log 1 1 1 1 1 +logl 2 - - - - +log10f 1 1 1 1 1 +log10 1 1 1 1 1 +log10l 1 - - - - +log1pf 1 1 1 1 1 +log1p 1 1 1 1 1 +log1pl 2 - - - - +log2f 1 1 1 1 1 +log2 1 1 1 1 1 +log2l 1 - - - - +logbf - - - - - +logb - - - - - +logbl - - - - - +lroundf - - - - - +lround - - - - - +lroundl - - - - - +llroundf - - - - - +llround - - - - - +llroundl - - - - - +modff - - - - - +modf - - - - - +modfl - - - - - +nearbyintf - - - - - +nearbyint - - - - - +nearbyintl - - - - - +nextafterf - - - - - +nextafter - - - - - +nextafterl - - - - - +nexttowardf - - - - - +nexttoward - - - - - +nexttowardl - - - - - +powf - - - - - +pow - - - - - +powl 1 - - - - +remainderf - - - - - +remainder - - - - - +remainderl - - - - - +remquof - - - - - +remquo - - - - - +remquol - - - - - +rintf - - - - - +rint - - - - - +rintl - - - - - +roundf - - - - - +round - - - - - +roundl - - - - - +scalbf - - - - - +scalb - - - - - +scalbl - - - - - +scalbnf - - - - - +scalbn - - - - - +scalbnl - - - - - +scalblnf - - - - - +scalbln - - - - - +scalblnl - - - - - +sinf - - - - - +sin - - - - - +sinl 1 - - - - +sincosf 1 1 1 1 1 +sincos 1 1 1 1 1 +sincosl 1 - - - - +sinhf 1 1 1 1 1 +sinh - 1 1 1 1 +sinhl - - - - - +sqrtf - - - - - +sqrt - - - - - +sqrtl - - - - - +tanf - - - - - +tan 1 0.5 1 0.5 0.5 +tanl 1 - - - - +tanhf - 1 1 1 1 +tanh - 1 1 1 1 +tanhl - - - - - +tgammaf 1 1 1 1 1 +tgamma 1 1 1 1 1 +tgammal 1 - - - - +truncf - - - - - +trunc - - - - - +truncl - - - - - +y0f 2 1 1 1 1 +y0 2 2 2 2 2 +y0l 2 - - - - +y1f 2 2 2 2 2 +y1 1 3 3 3 3 +y1l 2 - - - - +ynf 2 2 2 2 2 +yn 6 3 3 3 3 +ynl 7 - - - - - Note that the value stored in `fexcept_t' bears no resemblance to -the bit mask returned by `fetestexcept'. The type may not even be an -integer. Do not attempt to modify an `fexcept_t' variable. +Function Sparc 32-bit Sparc 64-bit x86_64/fpu +acosf - - - +acos - - - +acosl - 1 - +acoshf - - - +acosh - - - +acoshl - - - +asinf 2 2 - +asin 1 1 1 +asinl - - 1 +asinhf - - - +asinh - - - +asinhl - - 15 +atanf - - - +atan - - - +atanl - 1 - +atanhf - - - +atanh 1 1 1 +atanhl - - 1 +atan2f 4.0000 4 4 +atan2 - - - +atan2l - 1 - +cabsf 1 1 1 +cabs 1 1 1 +cabsl - - 1 +cacosf 1 + i 1 1 + i 1 1 + i 1 +cacos 1 + i 0 1 + i 0 1 + i 0 +cacosl - 0 + i 3 1 + i 1 +cacoshf 7 + i 3 7 + i 3 7 + i 3 +cacosh 1 + i 1 1 + i 1 1 + i 1 +cacoshl - 5 + i 1 6 + i 1 +cargf - - - +carg - - - +cargl - - - +casinf 2 + i 1 2 + i 1 2 + i 1 +casin 3 + i 0 3 + i 0 3 + i 0 +casinl - 1 + i 3 0 + i 1 +casinhf 1 + i 6 1 + i 6 1 + i 6 +casinh 5 + i 3 5 + i 3 5 + i 3 +casinhl - 4 + i 2 5 + i 5 +catanf 4 + i 1 4 + i 1 4 + i 1 +catan 0 + i 1 0 + i 1 0 + i 1 +catanl - 0 + i 1 1 + i 0 +catanhf 1 + i 6 1 + i 6 1 + i 6 +catanh 4 + i 1 4 + i 1 4 + i 0 +catanhl - - 1 + i 0 +cbrtf - - - +cbrt 1 1 1 +cbrtl - - 948 +ccosf 0 + i 1 0 + i 1 0 + i 1 +ccos 1 + i 1 1 + i 1 1 + i 1 +ccosl - - 0 + i 1 +ccoshf 1 + i 1 1 + i 1 1 + i 1 +ccosh 1 + i 1 1 + i 1 1 + i 1 +ccoshl - - 1 + i 1 +ceilf - - - +ceil - - - +ceill - - - +cexpf 1 + i 1 1 + i 1 1 + i 1 +cexp 1 + i 0 1 + i 0 1 + i 0 +cexpl - 1 + i 1 2 + i 1 +cimagf - - - +cimag - - - +cimagl - - - +clogf 0 + i 3 0 + i 3 0 + i 3 +clog 0 + i 1 0 + i 1 - +clogl - - - +clog10f 1 + i 5 1 + i 5 1 + i 5 +clog10 1 + i 1 1 + i 1 1 + i 1 +clog10l - - 1 + i 3 +conjf - - - +conj - - - +conjl - - - +copysignf - - - +copysign - - - +copysignl - - - +cosf 1 1 1 +cos 2 2 2 +cosl - 1 0.5 +coshf - - - +cosh - - - +coshl - - 2 +cpowf 4 + i 2 4 + i 2 4 + i 2 +cpow 1 + i 1.1031 1 + i 1.1031 1 + i 1.1031 +cpowl - 3 + i 0.9006 1 + i 2 +cprojf - - - +cproj - - - +cprojl - - - +crealf - - - +creal - - - +creall - - - +csinf 0 + i 1 0 + i 1 0 + i 1 +csin - - - +csinl - - 0 + i 2 +csinhf 1 + i 1 1 + i 1 1 + i 1 +csinh 0 + i 1 0 + i 1 0 + i 1 +csinhl - - 2 + i 2 +csqrtf 1 + i 1 1 + i 1 1 + i 1 +csqrt 1 + i 0 1 + i 0 1 + i 0 +csqrtl - 1 + i 1 - +ctanf 1 + i 1 1 + i 1 1 + i 1 +ctan 1 + i 1 1 + i 1 1 + i 1 +ctanl - - 439 + i 2 +ctanhf 2 + i 1 2 + i 1 2 + i 1 +ctanh 2 + i 2 2 + i 2 2 + i 2 +ctanhl - - 5 + i 25 +erff - - - +erf - - - +erfl - - - +erfcf 12 12 12 +erfc 24 24 24 +erfcl - - 36 +expf - - - +exp - - - +expl - - - +exp10f 2 2 2 +exp10 6 6 6 +exp10l - 1 3 +exp2f - - - +exp2 - - - +exp2l - - - +expm1f 1 1 1 +expm1 - 1 1 +expm1l - - 1 +fabsf - - - +fabs - - - +fabsl - - - +fdimf - - - +fdim - - - +fdiml - - - +floorf - - - +floor - - - +floorl - - - +fmaf - - - +fma - - - +fmal - - - +fmaxf - - - +fmax - - - +fmaxl - - - +fminf - - - +fmin - - - +fminl - - - +fmodf 1 1 1 +fmod 2 2 2 +fmodl - 2 1 +frexpf - - - +frexp - - - +frexpl - - - +gammaf - - - +gamma - - - +gammal - - 1 +hypotf 1 1 1 +hypot 1 1 1 +hypotl - - 1 +ilogbf - - - +ilogb - - - +ilogbl - - - +j0f 2 2 2 +j0 2 2 2 +j0l - - - +j1f 2 2 2 +j1 1 1 1 +j1l - - 2 +jnf 4 4 4 +jn 6 6 6 +jnl - - 2 +lgammaf 2 2 2 +lgamma 1 1 1 +lgammal - - 1 +lrintf - - - +lrint - - - +lrintl - - - +llrintf - - - +llrint - - - +llrintl - - - +logf 1 1 1 +log 1 1 1 +logl - 1 1 +log10f 1 1 1 +log10 1 1 1 +log10l - - 1 +log1pf 1 1 1 +log1p 1 1 1 +log1pl - 1 1 +log2f 1 1 1 +log2 1 1 1 +log2l - - - +logbf - - - +logb - - - +logbl - - - +lroundf - - - +lround - - - +lroundl - - - +llroundf - - - +llround - - - +llroundl - - - +modff - - - +modf - - - +modfl - - - +nearbyintf - - - +nearbyint - - - +nearbyintl - - - +nextafterf - - - +nextafter - - - +nextafterl - - - +nexttowardf - - - +nexttoward - - - +nexttowardl - - - +powf - - - +pow - - - +powl - - - +remainderf - - - +remainder - - - +remainderl - - - +remquof - - - +remquo - - - +remquol - - - +rintf - - - +rint - - - +rintl - - - +roundf - - - +round - - - +roundl - - - +scalbf - - - +scalb - - - +scalbl - - - +scalbnf - - - +scalbn - - - +scalbnl - - - +scalblnf - - - +scalbln - - - +scalblnl - - - +sinf - - - +sin - - - +sinl - - 1 +sincosf 1 1 1 +sincos 1 1 1 +sincosl - 1 1 +sinhf 1 1 1 +sinh 1 1 1 +sinhl - - 1 +sqrtf - - - +sqrt - - - +sqrtl - 1 - +tanf - - - +tan 0.5 0.5 0.5 +tanl - 1 1 +tanhf 1 1 1 +tanh 1 1 1 +tanhl - - 1 +tgammaf 1 1 1 +tgamma 1 1 1 +tgammal - - 2 +truncf - - - +trunc - - - +truncl - - - +y0f 1 1 1 +y0 2 2 2 +y0l - - 2 +y1f 2 2 2 +y1 3 3 3 +y1l - - 2 +ynf 2 2 2 +yn 3 3 3 +ynl - - 7 diff -durpN glibc-2.2.4/manual/libc.info-33 glibc-2.2.5/manual/libc.info-33 --- glibc-2.2.4/manual/libc.info-33 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-33 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1088 +33,1202 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Math Error Reporting, Prev: Status bit operations, Up: Floating Point Errors +File: libc.info, Node: Pseudo-Random Numbers, Next: FP Function Optimizations, Prev: Errors in Math Functions, Up: Mathematics -Error Reporting by Mathematical Functions ------------------------------------------ +Pseudo-Random Numbers +===================== - Many of the math functions are defined only over a subset of the -real or complex numbers. Even if they are mathematically defined, -their result may be larger or smaller than the range representable by -their return type. These are known as "domain errors", "overflows", and -"underflows", respectively. Math functions do several things when one -of these errors occurs. In this manual we will refer to the complete -response as "signalling" a domain error, overflow, or underflow. + This section describes the GNU facilities for generating a series of +pseudo-random numbers. The numbers generated are not truly random; +typically, they form a sequence that repeats periodically, with a period +so large that you can ignore it for ordinary purposes. The random +number generator works by remembering a "seed" value which it uses to +compute the next random number and also to compute a new seed. - When a math function suffers a domain error, it raises the invalid -exception and returns NaN. It also sets ERRNO to `EDOM'; this is for -compatibility with old systems that do not support IEEE 754 exception -handling. Likewise, when overflow occurs, math functions raise the -overflow exception and return oo or -oo as appropriate. They also set -ERRNO to `ERANGE'. When underflow occurs, the underflow exception is -raised, and zero (appropriately signed) is returned. ERRNO may be set -to `ERANGE', but this is not guaranteed. + Although the generated numbers look unpredictable within one run of a +program, the sequence of numbers is _exactly the same_ from one run to +the next. This is because the initial seed is always the same. This +is convenient when you are debugging a program, but it is unhelpful if +you want the program to behave unpredictably. If you want a different +pseudo-random series each time your program runs, you must specify a +different seed each time. For ordinary purposes, basing the seed on the +current time works well. - Some of the math functions are defined mathematically to result in a -complex value over parts of their domains. The most familiar example of -this is taking the square root of a negative number. The complex math -functions, such as `csqrt', will return the appropriate complex value -in this case. The real-valued functions, such as `sqrt', will signal a -domain error. + You can obtain repeatable sequences of numbers on a particular +machine type by specifying the same initial seed value for the random +number generator. There is no standard meaning for a particular seed +value; the same seed, used in different C libraries or on different CPU +types, will give you different random numbers. - Some older hardware does not support infinities. On that hardware, -overflows instead return a particular very large number (usually the -largest representable number). `math.h' defines macros you can use to -test for overflow on both old and new hardware. + The GNU library supports the standard ISO C random number functions +plus two other sets derived from BSD and SVID. The BSD and ISO C +functions provide identical, somewhat limited functionality. If only a +small number of random bits are required, we recommend you use the +ISO C interface, `rand' and `srand'. The SVID functions provide a more +flexible interface, which allows better random number generator +algorithms, provides more random bits (up to 48) per call, and can +provide random floating-point numbers. These functions are required by +the XPG standard and therefore will be present in all modern Unix +systems. - - Macro: double HUGE_VAL - - Macro: float HUGE_VALF - - Macro: long double HUGE_VALL - An expression representing a particular very large number. On - machines that use IEEE 754 floating point format, `HUGE_VAL' is - infinity. On other machines, it's typically the largest positive - number that can be represented. +* Menu: - Mathematical functions return the appropriately typed version of - `HUGE_VAL' or `-HUGE_VAL' when the result is too large to be - represented. +* ISO Random:: `rand' and friends. +* BSD Random:: `random' and friends. +* SVID Random:: `drand48' and friends.  -File: libc.info, Node: Rounding, Next: Control Functions, Prev: Floating Point Errors, Up: Arithmetic +File: libc.info, Node: ISO Random, Next: BSD Random, Up: Pseudo-Random Numbers -Rounding Modes -============== +ISO C Random Number Functions +----------------------------- - Floating-point calculations are carried out internally with extra -precision, and then rounded to fit into the destination type. This -ensures that results are as precise as the input data. IEEE 754 -defines four possible rounding modes: + This section describes the random number functions that are part of +the ISO C standard. -Round to nearest. - This is the default mode. It should be used unless there is a - specific need for one of the others. In this mode results are - rounded to the nearest representable value. If the result is - midway between two representable values, the even representable is - chosen. "Even" here means the lowest-order bit is zero. This - rounding mode prevents statistical bias and guarantees numeric - stability: round-off errors in a lengthy calculation will remain - smaller than half of `FLT_EPSILON'. + To use these facilities, you should include the header file +`stdlib.h' in your program. -Round toward plus Infinity. - All results are rounded to the smallest representable value which - is greater than the result. + - Macro: int RAND_MAX + The value of this macro is an integer constant representing the + largest value the `rand' function can return. In the GNU library, + it is `2147483647', which is the largest signed integer + representable in 32 bits. In other libraries, it may be as low as + `32767'. -Round toward minus Infinity. - All results are rounded to the largest representable value which - is less than the result. + - Function: int rand (void) + The `rand' function returns the next pseudo-random number in the + series. The value ranges from `0' to `RAND_MAX'. -Round toward zero. - All results are rounded to the largest representable value whose - magnitude is less than that of the result. In other words, if the - result is negative it is rounded up; if it is positive, it is - rounded down. + - Function: void srand (unsigned int SEED) + This function establishes SEED as the seed for a new series of + pseudo-random numbers. If you call `rand' before a seed has been + established with `srand', it uses the value `1' as a default seed. -`fenv.h' defines constants which you can use to refer to the various -rounding modes. Each one will be defined if and only if the FPU -supports the corresponding rounding mode. + To produce a different pseudo-random series each time your program + is run, do `srand (time (0))'. -`FE_TONEAREST' - Round to nearest. + POSIX.1 extended the C standard functions to support reproducible +random numbers in multi-threaded programs. However, the extension is +badly designed and unsuitable for serious work. -`FE_UPWARD' - Round toward +oo. + - Function: int rand_r (unsigned int *SEED) + This function returns a random number in the range 0 to `RAND_MAX' + just as `rand' does. However, all its state is stored in the SEED + argument. This means the RNG's state can only have as many bits + as the type `unsigned int' has. This is far too few to provide a + good RNG. -`FE_DOWNWARD' - Round toward -oo. + If your program requires a reentrant RNG, we recommend you use the + reentrant GNU extensions to the SVID random number generator. The + POSIX.1 interface should only be used when the GNU extensions are + not available. -`FE_TOWARDZERO' - Round toward zero. + +File: libc.info, Node: BSD Random, Next: SVID Random, Prev: ISO Random, Up: Pseudo-Random Numbers - Underflow is an unusual case. Normally, IEEE 754 floating point -numbers are always normalized (*note Floating Point Concepts::). -Numbers smaller than 2^r (where r is the minimum exponent, -`FLT_MIN_RADIX-1' for FLOAT) cannot be represented as normalized -numbers. Rounding all such numbers to zero or 2^r would cause some -algorithms to fail at 0. Therefore, they are left in denormalized -form. That produces loss of precision, since some bits of the mantissa -are stolen to indicate the decimal point. +BSD Random Number Functions +--------------------------- - If a result is too small to be represented as a denormalized number, -it is rounded to zero. However, the sign of the result is preserved; if -the calculation was negative, the result is "negative zero". Negative -zero can also result from some operations on infinity, such as 4/-oo. -Negative zero behaves identically to zero except when the `copysign' or -`signbit' functions are used to check the sign bit directly. + This section describes a set of random number generation functions +that are derived from BSD. There is no advantage to using these +functions with the GNU C library; we support them for BSD compatibility +only. - At any time one of the above four rounding modes is selected. You -can find out which one with this function: + The prototypes for these functions are in `stdlib.h'. - - Function: int fegetround (void) - Returns the currently selected rounding mode, represented by one - of the values of the defined rounding mode macros. + - Function: long int random (void) + This function returns the next pseudo-random number in the + sequence. The value returned ranges from `0' to `RAND_MAX'. -To change the rounding mode, use this function: + *Note:* Temporarily this function was defined to return a + `int32_t' value to indicate that the return value always contains + 32 bits even if `long int' is wider. The standard demands it + differently. Users must always be aware of the 32-bit limitation, + though. - - Function: int fesetround (int ROUND) - Changes the currently selected rounding mode to ROUND. If ROUND - does not correspond to one of the supported rounding modes nothing - is changed. `fesetround' returns zero if it changed the rounding - mode, a nonzero value if the mode is not supported. + - Function: void srandom (unsigned int SEED) + The `srandom' function sets the state of the random number + generator based on the integer SEED. If you supply a SEED value + of `1', this will cause `random' to reproduce the default set of + random numbers. - You should avoid changing the rounding mode if possible. It can be -an expensive operation; also, some hardware requires you to compile your -program differently for it to work. The resulting code may run slower. -See your compiler documentation for details. + To produce a different set of pseudo-random numbers each time your + program runs, do `srandom (time (0))'. + + - Function: void * initstate (unsigned int SEED, void *STATE, size_t + SIZE) + The `initstate' function is used to initialize the random number + generator state. The argument STATE is an array of SIZE bytes, + used to hold the state information. It is initialized based on + SEED. The size must be between 8 and 256 bytes, and should be a + power of two. The bigger the STATE array, the better. + + The return value is the previous value of the state information + array. You can use this value later as an argument to `setstate' + to restore that state. + + - Function: void * setstate (void *STATE) + The `setstate' function restores the random number state + information STATE. The argument must have been the result of a + previous call to INITSTATE or SETSTATE. + + The return value is the previous value of the state information + array. You can use this value later as an argument to `setstate' + to restore that state. + + If the function fails the return value is `NULL'. + + The four functions described so far in this section all work on a +state which is shared by all threads. The state is not directly +accessible to the user and can only be modified by these functions. +This makes it hard to deal with situations where each thread should +have its own pseudo-random number generator. + + The GNU C library contains four additional functions which contain +the state as an explicit parameter and therefore make it possible to +handle thread-local PRNGs. Beside this there are no difference. In +fact, the four functions already discussed are implemented internally +using the following interfaces. + + The `stdlib.h' header contains a definition of the following type: + + - Data Type: struct random_data + Objects of type `struct random_data' contain the information + necessary to represent the state of the PRNG. Although a complete + definition of the type is present the type should be treated as + opaque. + + The functions modifying the state follow exactly the already +described functions. + + - Function: int random_r (struct random_data *restrict BUF, int32_t + *restrict RESULT) + The `random_r' function behaves exactly like the `random' function + except that it uses and modifies the state in the object pointed + to by the first parameter instead of the global state. + + - Function: int srandom_r (unsigned int SEED, struct random_data *BUF) + The `srandom_r' function behaves exactly like the `srandom' + function except that it uses and modifies the state in the object + pointed to by the second parameter instead of the global state. + + - Function: int initstate_r (unsigned int SEED, char *restrict + STATEBUF, size_t STATELEN, struct random_data *restrict BUF) + The `initstate_r' function behaves exactly like the `initstate' + function except that it uses and modifies the state in the object + pointed to by the fourth parameter instead of the global state. + + - Function: int setstate_r (char *restrict STATEBUF, struct + random_data *restrict BUF) + The `setstate_r' function behaves exactly like the `setstate' + function except that it uses and modifies the state in the object + pointed to by the first parameter instead of the global state.  -File: libc.info, Node: Control Functions, Next: Arithmetic Functions, Prev: Rounding, Up: Arithmetic +File: libc.info, Node: SVID Random, Prev: BSD Random, Up: Pseudo-Random Numbers -Floating-Point Control Functions -================================ +SVID Random Number Function +--------------------------- - IEEE 754 floating-point implementations allow the programmer to -decide whether traps will occur for each of the exceptions, by setting -bits in the "control word". In C, traps result in the program -receiving the `SIGFPE' signal; see *Note Signal Handling::. + The C library on SVID systems contains yet another kind of random +number generator functions. They use a state of 48 bits of data. The +user can choose among a collection of functions which return the random +bits in different forms. - *Note:* IEEE 754 says that trap handlers are given details of the -exceptional situation, and can set the result value. C signals do not -provide any mechanism to pass this information back and forth. -Trapping exceptions in C is therefore not very useful. + Generally there are two kinds of function. The first uses a state of +the random number generator which is shared among several functions and +by all threads of the process. The second requires the user to handle +the state. - It is sometimes necessary to save the state of the floating-point -unit while you perform some calculation. The library provides functions -which save and restore the exception flags, the set of exceptions that -generate traps, and the rounding mode. This information is known as the -"floating-point environment". + All functions have in common that they use the same congruential +formula with the same constants. The formula is - The functions to save and restore the floating-point environment all -use a variable of type `fenv_t' to store information. This type is -defined in `fenv.h'. Its size and contents are implementation-defined. -You should not attempt to manipulate a variable of this type directly. + Y = (a * X + c) mod m - To save the state of the FPU, use one of these functions: +where X is the state of the generator at the beginning and Y the state +at the end. `a' and `c' are constants determining the way the +generator works. By default they are - - Function: int fegetenv (fenv_t *ENVP) - Store the floating-point environment in the variable pointed to by - ENVP. + a = 0x5DEECE66D = 25214903917 + c = 0xb = 11 - The function returns zero in case the operation was successful, a - non-zero value otherwise. +but they can also be changed by the user. `m' is of course 2^48 since +the state consists of a 48-bit array. - - Function: int feholdexcept (fenv_t *ENVP) - Store the current floating-point environment in the object pointed - to by ENVP. Then clear all exception flags, and set the FPU to - trap no exceptions. Not all FPUs support trapping no exceptions; - if `feholdexcept' cannot set this mode, it returns nonzero value. - If it succeeds, it returns zero. + The prototypes for these functions are in `stdlib.h'. - The functions which restore the floating-point environment can take -these kinds of arguments: + - Function: double drand48 (void) + This function returns a `double' value in the range of `0.0' to + `1.0' (exclusive). The random bits are determined by the global + state of the random number generator in the C library. - * Pointers to `fenv_t' objects, which were initialized previously by - a call to `fegetenv' or `feholdexcept'. + Since the `double' type according to IEEE 754 has a 52-bit + mantissa this means 4 bits are not initialized by the random number + generator. These are (of course) chosen to be the least + significant bits and they are initialized to `0'. - * The special macro `FE_DFL_ENV' which represents the floating-point - environment as it was available at program start. + - Function: double erand48 (unsigned short int XSUBI[3]) + This function returns a `double' value in the range of `0.0' to + `1.0' (exclusive), similarly to `drand48'. The argument is an + array describing the state of the random number generator. - * Implementation defined macros with names starting with `FE_' and - having type `fenv_t *'. + This function can be called subsequently since it updates the + array to guarantee random numbers. The array should have been + initialized before initial use to obtain reproducible results. - If possible, the GNU C Library defines a macro `FE_NOMASK_ENV' - which represents an environment where every exception raised - causes a trap to occur. You can test for this macro using - `#ifdef'. It is only defined if `_GNU_SOURCE' is defined. + - Function: long int lrand48 (void) + The `lrand48' function returns an integer value in the range of + `0' to `2^31' (exclusive). Even if the size of the `long int' + type can take more than 32 bits, no higher numbers are returned. + The random bits are determined by the global state of the random + number generator in the C library. - Some platforms might define other predefined environments. + - Function: long int nrand48 (unsigned short int XSUBI[3]) + This function is similar to the `lrand48' function in that it + returns a number in the range of `0' to `2^31' (exclusive) but the + state of the random number generator used to produce the random + bits is determined by the array provided as the parameter to the + function. -To set the floating-point environment, you can use either of these -functions: + The numbers in the array are updated afterwards so that subsequent + calls to this function yield different results (as is expected of + a random number generator). The array should have been + initialized before the first call to obtain reproducible results. - - Function: int fesetenv (const fenv_t *ENVP) - Set the floating-point environment to that described by ENVP. + - Function: long int mrand48 (void) + The `mrand48' function is similar to `lrand48'. The only + difference is that the numbers returned are in the range `-2^31' to + `2^31' (exclusive). - The function returns zero in case the operation was successful, a - non-zero value otherwise. + - Function: long int jrand48 (unsigned short int XSUBI[3]) + The `jrand48' function is similar to `nrand48'. The only + difference is that the numbers returned are in the range `-2^31' to + `2^31' (exclusive). For the `xsubi' parameter the same + requirements are necessary. - - Function: int feupdateenv (const fenv_t *ENVP) - Like `fesetenv', this function sets the floating-point environment - to that described by ENVP. However, if any exceptions were - flagged in the status word before `feupdateenv' was called, they - remain flagged after the call. In other words, after `feupdateenv' - is called, the status word is the bitwise OR of the previous - status word and the one saved in ENVP. + The internal state of the random number generator can be initialized +in several ways. The methods differ in the completeness of the +information provided. - The function returns zero in case the operation was successful, a - non-zero value otherwise. + - Function: void srand48 (long int SEEDVAL) + The `srand48' function sets the most significant 32 bits of the + internal state of the random number generator to the least + significant 32 bits of the SEEDVAL parameter. The lower 16 bits + are initialized to the value `0x330E'. Even if the `long int' + type contains more than 32 bits only the lower 32 bits are used. -To control for individual exceptions if raising them causes a trap to -occur, you can use the following two functions. + Owing to this limitation, initialization of the state of this + function is not very useful. But it makes it easy to use a + construct like `srand48 (time (0))'. - *Portability Note:* These functions are all GNU extensions. + A side-effect of this function is that the values `a' and `c' from + the internal state, which are used in the congruential formula, + are reset to the default values given above. This is of + importance once the user has called the `lcong48' function (see + below). - - Function: int feenableexcept (int EXCEPTS) - This functions enables traps for each of the exceptions as - indicated by the parameter EXCEPT. The individual excepetions are - described in *Note Status bit operations::. Only the specified - exceptions are enabled, the status of the other exceptions is not - changed. + - Function: unsigned short int * seed48 (unsigned short int SEED16V[3]) + The `seed48' function initializes all 48 bits of the state of the + internal random number generator from the contents of the parameter + SEED16V. Here the lower 16 bits of the first element of SEE16V + initialize the least significant 16 bits of the internal state, + the lower 16 bits of `SEED16V[1]' initialize the mid-order 16 bits + of the state and the 16 lower bits of `SEED16V[2]' initialize the + most significant 16 bits of the state. - The function returns the previous enabled exceptions in case the - operation was successful, `-1' otherwise. + Unlike `srand48' this function lets the user initialize all 48 bits + of the state. - - Function: int fedisableexcept (int EXCEPTS) - This functions disables traps for each of the exceptions as - indicated by the parameter EXCEPT. The individual excepetions are - described in *Note Status bit operations::. Only the specified - exceptions are disabled, the status of the other exceptions is not - changed. + The value returned by `seed48' is a pointer to an array containing + the values of the internal state before the change. This might be + useful to restart the random number generator at a certain state. + Otherwise the value can simply be ignored. - The function returns the previous enabled exceptions in case the - operation was successful, `-1' otherwise. + As for `srand48', the values `a' and `c' from the congruential + formula are reset to the default values. - - Function: int fegetexcept (int EXCEPTS) - The function returns a bitmask of all currently enabled - exceptions. It returns `-1' in case of failure. + There is one more function to initialize the random number generator +which enables you to specify even more information by allowing you to +change the parameters in the congruential formula. - -File: libc.info, Node: Arithmetic Functions, Next: Complex Numbers, Prev: Control Functions, Up: Arithmetic + - Function: void lcong48 (unsigned short int PARAM[7]) + The `lcong48' function allows the user to change the complete state + of the random number generator. Unlike `srand48' and `seed48', + this function also changes the constants in the congruential + formula. -Arithmetic Functions -==================== + From the seven elements in the array PARAM the least significant + 16 bits of the entries `PARAM[0]' to `PARAM[2]' determine the + initial state, the least significant 16 bits of `PARAM[3]' to + `PARAM[5]' determine the 48 bit constant `a' and `PARAM[6]' + determines the 16-bit value `c'. - The C library provides functions to do basic operations on -floating-point numbers. These include absolute value, maximum and -minimum, normalization, bit twiddling, rounding, and a few others. + All the above functions have in common that they use the global +parameters for the congruential formula. In multi-threaded programs it +might sometimes be useful to have different parameters in different +threads. For this reason all the above functions have a counterpart +which works on a description of the random number generator in the +user-supplied buffer instead of the global state. -* Menu: + Please note that it is no problem if several threads use the global +state if all threads use the functions which take a pointer to an array +containing the state. The random numbers are computed following the +same loop but if the state in the array is different all threads will +obtain an individual random number generator. -* Absolute Value:: Absolute values of integers and floats. -* Normalization Functions:: Extracting exponents and putting them back. -* Rounding Functions:: Rounding floats to integers. -* Remainder Functions:: Remainders on division, precisely defined. -* FP Bit Twiddling:: Sign bit adjustment. Adding epsilon. -* FP Comparison Functions:: Comparisons without risk of exceptions. -* Misc FP Arithmetic:: Max, min, positive difference, multiply-add. + The user-supplied buffer must be of type `struct drand48_data'. +This type should be regarded as opaque and not manipulated directly. - -File: libc.info, Node: Absolute Value, Next: Normalization Functions, Up: Arithmetic Functions + - Function: int drand48_r (struct drand48_data *BUFFER, double *RESULT) + This function is equivalent to the `drand48' function with the + difference that it does not modify the global random number + generator parameters but instead the parameters in the buffer + supplied through the pointer BUFFER. The random number is + returned in the variable pointed to by RESULT. -Absolute Value --------------- + The return value of the function indicates whether the call + succeeded. If the value is less than `0' an error occurred and + ERRNO is set to indicate the problem. - These functions are provided for obtaining the "absolute value" (or -"magnitude") of a number. The absolute value of a real number X is X -if X is positive, -X if X is negative. For a complex number Z, whose -real part is X and whose imaginary part is Y, the absolute value is -`sqrt (X*X + Y*Y)'. + This function is a GNU extension and should not be used in portable + programs. - Prototypes for `abs', `labs' and `llabs' are in `stdlib.h'; -`imaxabs' is declared in `inttypes.h'; `fabs', `fabsf' and `fabsl' are -declared in `math.h'. `cabs', `cabsf' and `cabsl' are declared in -`complex.h'. + - Function: int erand48_r (unsigned short int XSUBI[3], struct + drand48_data *BUFFER, double *RESULT) + The `erand48_r' function works like `erand48', but in addition it + takes an argument BUFFER which describes the random number + generator. The state of the random number generator is taken from + the `xsubi' array, the parameters for the congruential formula + from the global random number generator data. The random number + is returned in the variable pointed to by RESULT. - - Function: int abs (int NUMBER) - - Function: long int labs (long int NUMBER) - - Function: long long int llabs (long long int NUMBER) - - Function: intmax_t imaxabs (intmax_t NUMBER) - These functions return the absolute value of NUMBER. + The return value is non-negative if the call succeeded. - Most computers use a two's complement integer representation, in - which the absolute value of `INT_MIN' (the smallest possible `int') - cannot be represented; thus, `abs (INT_MIN)' is not defined. + This function is a GNU extension and should not be used in portable + programs. - `llabs' and `imaxdiv' are new to ISO C99. + - Function: int lrand48_r (struct drand48_data *BUFFER, double *RESULT) + This function is similar to `lrand48', but in addition it takes a + pointer to a buffer describing the state of the random number + generator just like `drand48'. - See *Note Integers:: for a description of the `intmax_t' type. + If the return value of the function is non-negative the variable + pointed to by RESULT contains the result. Otherwise an error + occurred. + This function is a GNU extension and should not be used in portable + programs. - - Function: double fabs (double NUMBER) - - Function: float fabsf (float NUMBER) - - Function: long double fabsl (long double NUMBER) - This function returns the absolute value of the floating-point - number NUMBER. + - Function: int nrand48_r (unsigned short int XSUBI[3], struct + drand48_data *BUFFER, long int *RESULT) + The `nrand48_r' function works like `nrand48' in that it produces + a random number in the range `0' to `2^31'. But instead of using + the global parameters for the congruential formula it uses the + information from the buffer pointed to by BUFFER. The state is + described by the values in XSUBI. - - Function: double cabs (complex double Z) - - Function: float cabsf (complex float Z) - - Function: long double cabsl (complex long double Z) - These functions return the absolute value of the complex number Z - (*note Complex Numbers::). The absolute value of a complex number - is: + If the return value is non-negative the variable pointed to by + RESULT contains the result. - sqrt (creal (Z) * creal (Z) + cimag (Z) * cimag (Z)) + This function is a GNU extension and should not be used in portable + programs. - This function should always be used instead of the direct formula - because it takes special care to avoid losing precision. It may - also take advantage of hardware support for this operation. See - `hypot' in *Note Exponents and Logarithms::. + - Function: int mrand48_r (struct drand48_data *BUFFER, double *RESULT) + This function is similar to `mrand48' but like the other reentrant + functions it uses the random number generator described by the + value in the buffer pointed to by BUFFER. - -File: libc.info, Node: Normalization Functions, Next: Rounding Functions, Prev: Absolute Value, Up: Arithmetic Functions + If the return value is non-negative the variable pointed to by + RESULT contains the result. -Normalization Functions ------------------------ + This function is a GNU extension and should not be used in portable + programs. - The functions described in this section are primarily provided as a -way to efficiently perform certain low-level manipulations on floating -point numbers that are represented internally using a binary radix; see -*Note Floating Point Concepts::. These functions are required to have -equivalent behavior even if the representation does not use a radix of -2, but of course they are unlikely to be particularly efficient in -those cases. + - Function: int jrand48_r (unsigned short int XSUBI[3], struct + drand48_data *BUFFER, long int *RESULT) + The `jrand48_r' function is similar to `jrand48'. Like the other + reentrant functions of this function family it uses the + congruential formula parameters from the buffer pointed to by + BUFFER. - All these functions are declared in `math.h'. + If the return value is non-negative the variable pointed to by + RESULT contains the result. - - Function: double frexp (double VALUE, int *EXPONENT) - - Function: float frexpf (float VALUE, int *EXPONENT) - - Function: long double frexpl (long double VALUE, int *EXPONENT) - These functions are used to split the number VALUE into a - normalized fraction and an exponent. + This function is a GNU extension and should not be used in portable + programs. - If the argument VALUE is not zero, the return value is VALUE times - a power of two, and is always in the range 1/2 (inclusive) to 1 - (exclusive). The corresponding exponent is stored in `*EXPONENT'; - the return value multiplied by 2 raised to this exponent equals - the original number VALUE. + Before any of the above functions are used the buffer of type +`struct drand48_data' should be initialized. The easiest way to do +this is to fill the whole buffer with null bytes, e.g. by - For example, `frexp (12.8, &exponent)' returns `0.8' and stores - `4' in `exponent'. + memset (buffer, '\0', sizeof (struct drand48_data)); - If VALUE is zero, then the return value is zero and zero is stored - in `*EXPONENT'. +Using any of the reentrant functions of this family now will +automatically initialize the random number generator to the default +values for the state and the parameters of the congruential formula. - - Function: double ldexp (double VALUE, int EXPONENT) - - Function: float ldexpf (float VALUE, int EXPONENT) - - Function: long double ldexpl (long double VALUE, int EXPONENT) - These functions return the result of multiplying the floating-point - number VALUE by 2 raised to the power EXPONENT. (It can be used - to reassemble floating-point numbers that were taken apart by - `frexp'.) + The other possibility is to use any of the functions which explicitly +initialize the buffer. Though it might be obvious how to initialize the +buffer from looking at the parameter to the function, it is highly +recommended to use these functions since the result might not always be +what you expect. - For example, `ldexp (0.8, 4)' returns `12.8'. + - Function: int srand48_r (long int SEEDVAL, struct drand48_data + *BUFFER) + The description of the random number generator represented by the + information in BUFFER is initialized similarly to what the function + `srand48' does. The state is initialized from the parameter + SEEDVAL and the parameters for the congruential formula are + initialized to their default values. - The following functions, which come from BSD, provide facilities -equivalent to those of `ldexp' and `frexp'. See also the ISO C -function `logb' which originally also appeared in BSD. + If the return value is non-negative the function call succeeded. - - Function: double scalb (double VALUE, int EXPONENT) - - Function: float scalbf (float VALUE, int EXPONENT) - - Function: long double scalbl (long double VALUE, int EXPONENT) - The `scalb' function is the BSD name for `ldexp'. + This function is a GNU extension and should not be used in portable + programs. - - Function: long long int scalbn (double X, int n) - - Function: long long int scalbnf (float X, int n) - - Function: long long int scalbnl (long double X, int n) - `scalbn' is identical to `scalb', except that the exponent N is an - `int' instead of a floating-point number. + - Function: int seed48_r (unsigned short int SEED16V[3], struct + drand48_data *BUFFER) + This function is similar to `srand48_r' but like `seed48' it + initializes all 48 bits of the state from the parameter SEED16V. - - Function: long long int scalbln (double X, long int n) - - Function: long long int scalblnf (float X, long int n) - - Function: long long int scalblnl (long double X, long int n) - `scalbln' is identical to `scalb', except that the exponent N is a - `long int' instead of a floating-point number. + If the return value is non-negative the function call succeeded. + It does not return a pointer to the previous state of the random + number generator like the `seed48' function does. If the user + wants to preserve the state for a later re-run s/he can copy the + whole buffer pointed to by BUFFER. - - Function: long long int significand (double X) - - Function: long long int significandf (float X) - - Function: long long int significandl (long double X) - `significand' returns the mantissa of X scaled to the range [1, 2). - It is equivalent to `scalb (X, (double) -ilogb (X))'. + This function is a GNU extension and should not be used in portable + programs. - This function exists mainly for use in certain standardized tests - of IEEE 754 conformance. + - Function: int lcong48_r (unsigned short int PARAM[7], struct + drand48_data *BUFFER) + This function initializes all aspects of the random number + generator described in BUFFER with the data in PARAM. Here it is + especially true that the function does more than just copying the + contents of PARAM and BUFFER. More work is required and therefore + it is important to use this function rather than initializing the + random number generator directly. + + If the return value is non-negative the function call succeeded. + + This function is a GNU extension and should not be used in portable + programs.  -File: libc.info, Node: Rounding Functions, Next: Remainder Functions, Prev: Normalization Functions, Up: Arithmetic Functions +File: libc.info, Node: FP Function Optimizations, Prev: Pseudo-Random Numbers, Up: Mathematics -Rounding Functions ------------------- +Is Fast Code or Small Code preferred? +===================================== - The functions listed here perform operations such as rounding and -truncation of floating-point values. Some of these functions convert -floating point numbers to integer values. They are all declared in -`math.h'. + If an application uses many floating point functions it is often the +case that the cost of the function calls themselves is not negligible. +Modern processors can often execute the operations themselves very +fast, but the function call disrupts the instruction pipeline. - You can also convert floating-point numbers to integers simply by -casting them to `int'. This discards the fractional part, effectively -rounding towards zero. However, this only works if the result can -actually be represented as an `int'--for very large numbers, this is -impossible. The functions listed here return the result as a `double' -instead to get around this problem. + For this reason the GNU C Library provides optimizations for many of +the frequently-used math functions. When GNU CC is used and the user +activates the optimizer, several new inline functions and macros are +defined. These new functions and macros have the same names as the +library functions and so are used instead of the latter. In the case of +inline functions the compiler will decide whether it is reasonable to +use them, and this decision is usually correct. - - Function: double ceil (double X) - - Function: float ceilf (float X) - - Function: long double ceill (long double X) - These functions round X upwards to the nearest integer, returning - that value as a `double'. Thus, `ceil (1.5)' is `2.0'. + This means that no calls to the library functions may be necessary, +and can increase the speed of generated code significantly. The +drawback is that code size will increase, and the increase is not +always negligible. - - Function: double floor (double X) - - Function: float floorf (float X) - - Function: long double floorl (long double X) - These functions round X downwards to the nearest integer, - returning that value as a `double'. Thus, `floor (1.5)' is `1.0' - and `floor (-1.5)' is `-2.0'. + There are two kind of inline functions: Those that give the same +result as the library functions and others that might not set `errno' +and might have a reduced precision and/or argument range in comparison +with the library functions. The latter inline functions are only +available if the flag `-ffast-math' is given to GNU CC. - - Function: double trunc (double X) - - Function: float truncf (float X) - - Function: long double truncl (long double X) - The `trunc' functions round X towards zero to the nearest integer - (returned in floating-point format). Thus, `trunc (1.5)' is `1.0' - and `trunc (-1.5)' is `-1.0'. + In cases where the inline functions and macros are not wanted the +symbol `__NO_MATH_INLINES' should be defined before any system header is +included. This will ensure that only library functions are used. Of +course, it can be determined for each file in the project whether +giving this option is preferable or not. - - Function: double rint (double X) - - Function: float rintf (float X) - - Function: long double rintl (long double X) - These functions round X to an integer value according to the - current rounding mode. *Note Floating Point Parameters::, for - information about the various rounding modes. The default - rounding mode is to round to the nearest integer; some machines - support other modes, but round-to-nearest is always used unless - you explicitly select another. + Not all hardware implements the entire IEEE 754 standard, and even +if it does there may be a substantial performance penalty for using some +of its features. For example, enabling traps on some processors forces +the FPU to run un-pipelined, which can more than double calculation +time. - If X was not initially an integer, these functions raise the - inexact exception. + +File: libc.info, Node: Arithmetic, Next: Date and Time, Prev: Mathematics, Up: Top - - Function: double nearbyint (double X) - - Function: float nearbyintf (float X) - - Function: long double nearbyintl (long double X) - These functions return the same value as the `rint' functions, but - do not raise the inexact exception if X is not an integer. +Arithmetic Functions +******************** - - Function: double round (double X) - - Function: float roundf (float X) - - Function: long double roundl (long double X) - These functions are similar to `rint', but they round halfway - cases away from zero instead of to the nearest even integer. + This chapter contains information about functions for doing basic +arithmetic operations, such as splitting a float into its integer and +fractional parts or retrieving the imaginary part of a complex value. +These functions are declared in the header files `math.h' and +`complex.h'. - - Function: long int lrint (double X) - - Function: long int lrintf (float X) - - Function: long int lrintl (long double X) - These functions are just like `rint', but they return a `long int' - instead of a floating-point number. +* Menu: - - Function: long long int llrint (double X) - - Function: long long int llrintf (float X) - - Function: long long int llrintl (long double X) - These functions are just like `rint', but they return a `long long - int' instead of a floating-point number. +* Integers:: Basic integer types and concepts +* Integer Division:: Integer division with guaranteed rounding. +* Floating Point Numbers:: Basic concepts. IEEE 754. +* Floating Point Classes:: The five kinds of floating-point number. +* Floating Point Errors:: When something goes wrong in a calculation. +* Rounding:: Controlling how results are rounded. +* Control Functions:: Saving and restoring the FPU's state. +* Arithmetic Functions:: Fundamental operations provided by the library. +* Complex Numbers:: The types. Writing complex constants. +* Operations on Complex:: Projection, conjugation, decomposition. +* Parsing of Numbers:: Converting strings to numbers. +* System V Number Conversion:: An archaic way to convert numbers to strings. - - Function: long int lround (double X) - - Function: long int lroundf (float X) - - Function: long int lroundl (long double X) - These functions are just like `round', but they return a `long - int' instead of a floating-point number. + +File: libc.info, Node: Integers, Next: Integer Division, Up: Arithmetic - - Function: long long int llround (double X) - - Function: long long int llroundf (float X) - - Function: long long int llroundl (long double X) - These functions are just like `round', but they return a `long - long int' instead of a floating-point number. +Integers +======== - - Function: double modf (double VALUE, double *INTEGER-PART) - - Function: float modff (float VALUE, float *INTEGER-PART) - - Function: long double modfl (long double VALUE, long double - *INTEGER-PART) - These functions break the argument VALUE into an integer part and a - fractional part (between `-1' and `1', exclusive). Their sum - equals VALUE. Each of the parts has the same sign as VALUE, and - the integer part is always rounded toward zero. + The C language defines several integer data types: integer, short +integer, long integer, and character, all in both signed and unsigned +varieties. The GNU C compiler extends the language to contain long +long integers as well. - `modf' stores the integer part in `*INTEGER-PART', and returns the - fractional part. For example, `modf (2.5, &intpart)' returns - `0.5' and stores `2.0' into `intpart'. + The C integer types were intended to allow code to be portable among +machines with different inherent data sizes (word sizes), so each type +may have different ranges on different machines. The problem with this +is that a program often needs to be written for a particular range of +integers, and sometimes must be written for a particular size of +storage, regardless of what machine the program runs on. - -File: libc.info, Node: Remainder Functions, Next: FP Bit Twiddling, Prev: Rounding Functions, Up: Arithmetic Functions + To address this problem, the GNU C library contains C type +definitions you can use to declare integers that meet your exact needs. +Because the GNU C library header files are customized to a specific +machine, your program source code doesn't have to be. -Remainder Functions -------------------- + These `typedef's are in `stdint.h'. - The functions in this section compute the remainder on division of -two floating-point numbers. Each is a little different; pick the one -that suits your problem. + If you require that an integer be represented in exactly N bits, use +one of the following types, with the obvious mapping to bit size and +signedness: - - Function: double fmod (double NUMERATOR, double DENOMINATOR) - - Function: float fmodf (float NUMERATOR, float DENOMINATOR) - - Function: long double fmodl (long double NUMERATOR, long double - DENOMINATOR) - These functions compute the remainder from the division of - NUMERATOR by DENOMINATOR. Specifically, the return value is - `NUMERATOR - N * DENOMINATOR', where N is the quotient of - NUMERATOR divided by DENOMINATOR, rounded towards zero to an - integer. Thus, `fmod (6.5, 2.3)' returns `1.9', which is `6.5' - minus `4.6'. + * int8_t - The result has the same sign as the NUMERATOR and has magnitude - less than the magnitude of the DENOMINATOR. + * int16_t - If DENOMINATOR is zero, `fmod' signals a domain error. + * int32_t - - Function: double drem (double NUMERATOR, double DENOMINATOR) - - Function: float dremf (float NUMERATOR, float DENOMINATOR) - - Function: long double dreml (long double NUMERATOR, long double - DENOMINATOR) - These functions are like `fmod' except that they rounds the - internal quotient N to the nearest integer instead of towards zero - to an integer. For example, `drem (6.5, 2.3)' returns `-0.4', - which is `6.5' minus `6.9'. + * int64_t - The absolute value of the result is less than or equal to half the - absolute value of the DENOMINATOR. The difference between `fmod - (NUMERATOR, DENOMINATOR)' and `drem (NUMERATOR, DENOMINATOR)' is - always either DENOMINATOR, minus DENOMINATOR, or zero. + * uint8_t - If DENOMINATOR is zero, `drem' signals a domain error. + * uint16_t - - Function: double remainder (double NUMERATOR, double DENOMINATOR) - - Function: float remainderf (float NUMERATOR, float DENOMINATOR) - - Function: long double remainderl (long double NUMERATOR, long double - DENOMINATOR) - This function is another name for `drem'. + * uint32_t - -File: libc.info, Node: FP Bit Twiddling, Next: FP Comparison Functions, Prev: Remainder Functions, Up: Arithmetic Functions + * uint64_t -Setting and modifying single bits of FP values ----------------------------------------------- + If your C compiler and target machine do not allow integers of a +certain size, the corresponding above type does not exist. - There are some operations that are too complicated or expensive to -perform by hand on floating-point numbers. ISO C99 defines functions -to do these operations, which mostly involve changing single bits. + If you don't need a specific storage size, but want the smallest data +structure with _at least_ N bits, use one of these: - - Function: double copysign (double X, double Y) - - Function: float copysignf (float X, float Y) - - Function: long double copysignl (long double X, long double Y) - These functions return X but with the sign of Y. They work even - if X or Y are NaN or zero. Both of these can carry a sign - (although not all implementations support it) and this is one of - the few operations that can tell the difference. + * int_least8_t - `copysign' never raises an exception. + * int_least16_t - This function is defined in IEC 559 (and the appendix with - recommended functions in IEEE 754/IEEE 854). + * int_least32_t - - Function: int signbit (_float-type_ X) - `signbit' is a generic macro which can work on all floating-point - types. It returns a nonzero value if the value of X has its sign - bit set. + * int_least64_t - This is not the same as `x < 0.0', because IEEE 754 floating point - allows zero to be signed. The comparison `-0.0 < 0.0' is false, - but `signbit (-0.0)' will return a nonzero value. + * uint_least8_t - - Function: double nextafter (double X, double Y) - - Function: float nextafterf (float X, float Y) - - Function: long double nextafterl (long double X, long double Y) - The `nextafter' function returns the next representable neighbor of - X in the direction towards Y. The size of the step between X and - the result depends on the type of the result. If X = Y the - function simply returns Y. If either value is `NaN', `NaN' is - returned. Otherwise a value corresponding to the value of the - least significant bit in the mantissa is added or subtracted, - depending on the direction. `nextafter' will signal overflow or - underflow if the result goes outside of the range of normalized - numbers. + * uint_least16_t - This function is defined in IEC 559 (and the appendix with - recommended functions in IEEE 754/IEEE 854). + * uint_least32_t - - Function: double nexttoward (double X, long double Y) - - Function: float nexttowardf (float X, long double Y) - - Function: long double nexttowardl (long double X, long double Y) - These functions are identical to the corresponding versions of - `nextafter' except that their second argument is a `long double'. + * uint_least64_t - - Function: double nan (const char *TAGP) - - Function: float nanf (const char *TAGP) - - Function: long double nanl (const char *TAGP) - The `nan' function returns a representation of NaN, provided that - NaN is supported by the target platform. `nan - ("N-CHAR-SEQUENCE")' is equivalent to `strtod - ("NAN(N-CHAR-SEQUENCE)")'. + If you don't need a specific storage size, but want the data +structure that allows the fastest access while having at least N bits +(and among data structures with the same access speed, the smallest +one), use one of these: - The argument TAGP is used in an unspecified manner. On IEEE 754 - systems, there are many representations of NaN, and TAGP selects - one. On other systems it may do nothing. + * int_fast8_t + + * int_fast16_t + + * int_fast32_t + + * int_fast64_t + + * uint_fast8_t + + * uint_fast16_t + + * uint_fast32_t + + * uint_fast64_t + + If you want an integer with the widest range possible on the +platform on which it is being used, use one of the following. If you +use these, you should write code that takes into account the variable +size and range of the integer. + + * intmax_t + + * uintmax_t + + The GNU C library also provides macros that tell you the maximum and +minimum possible values for each integer data type. The macro names +follow these examples: `INT32_MAX', `UINT8_MAX', `INT_FAST32_MIN', +`INT_LEAST64_MIN', `UINTMAX_MAX', `INTMAX_MAX', `INTMAX_MIN'. Note +that there are no macros for unsigned integer minima. These are always +zero. + + There are similar macros for use with C's built in integer types +which should come with your C compiler. These are described in *Note +Data Type Measurements::. + + Don't forget you can use the C `sizeof' function with any of these +data types to get the number of bytes of storage each uses.  -File: libc.info, Node: FP Comparison Functions, Next: Misc FP Arithmetic, Prev: FP Bit Twiddling, Up: Arithmetic Functions +File: libc.info, Node: Integer Division, Next: Floating Point Numbers, Prev: Integers, Up: Arithmetic -Floating-Point Comparison Functions ------------------------------------ +Integer Division +================ - The standard C comparison operators provoke exceptions when one or -other of the operands is NaN. For example, + This section describes functions for performing integer division. +These functions are redundant when GNU CC is used, because in GNU C the +`/' operator always rounds towards zero. But in other C +implementations, `/' may round differently with negative arguments. +`div' and `ldiv' are useful because they specify how to round the +quotient: towards zero. The remainder has the same sign as the +numerator. - int v = a < 1.0; + These functions are specified to return a result R such that the +value `R.quot*DENOMINATOR + R.rem' equals NUMERATOR. -will raise an exception if A is NaN. (This does _not_ happen with `==' -and `!='; those merely return false and true, respectively, when NaN is -examined.) Frequently this exception is undesirable. ISO C99 -therefore defines comparison functions that do not raise exceptions -when NaN is examined. All of the functions are implemented as macros -which allow their arguments to be of any floating-point type. The -macros are guaranteed to evaluate their arguments only once. + To use these facilities, you should include the header file +`stdlib.h' in your program. - - Macro: int isgreater (_real-floating_ X, _real-floating_ Y) - This macro determines whether the argument X is greater than Y. - It is equivalent to `(X) > (Y)', but no exception is raised if X - or Y are NaN. + - Data Type: div_t + This is a structure type used to hold the result returned by the + `div' function. It has the following members: - - Macro: int isgreaterequal (_real-floating_ X, _real-floating_ Y) - This macro determines whether the argument X is greater than or - equal to Y. It is equivalent to `(X) >= (Y)', but no exception is - raised if X or Y are NaN. + `int quot' + The quotient from the division. - - Macro: int isless (_real-floating_ X, _real-floating_ Y) - This macro determines whether the argument X is less than Y. It - is equivalent to `(X) < (Y)', but no exception is raised if X or Y - are NaN. + `int rem' + The remainder from the division. - - Macro: int islessequal (_real-floating_ X, _real-floating_ Y) - This macro determines whether the argument X is less than or equal - to Y. It is equivalent to `(X) <= (Y)', but no exception is - raised if X or Y are NaN. + - Function: div_t div (int NUMERATOR, int DENOMINATOR) + This function `div' computes the quotient and remainder from the + division of NUMERATOR by DENOMINATOR, returning the result in a + structure of type `div_t'. - - Macro: int islessgreater (_real-floating_ X, _real-floating_ Y) - This macro determines whether the argument X is less or greater - than Y. It is equivalent to `(X) < (Y) || (X) > (Y)' (although it - only evaluates X and Y once), but no exception is raised if X or Y - are NaN. + If the result cannot be represented (as in a division by zero), the + behavior is undefined. - This macro is not equivalent to `X != Y', because that expression - is true if X or Y are NaN. + Here is an example, albeit not a very useful one. - - Macro: int isunordered (_real-floating_ X, _real-floating_ Y) - This macro determines whether its arguments are unordered. In - other words, it is true if X or Y are NaN, and false otherwise. + div_t result; + result = div (20, -6); - Not all machines provide hardware support for these operations. On -machines that don't, the macros can be very slow. Therefore, you should -not use these functions when NaN is not a concern. + Now `result.quot' is `-3' and `result.rem' is `2'. - *Note:* There are no macros `isequal' or `isunequal'. They are -unnecessary, because the `==' and `!=' operators do _not_ throw an -exception if one or both of the operands are NaN. + - Data Type: ldiv_t + This is a structure type used to hold the result returned by the + `ldiv' function. It has the following members: - -File: libc.info, Node: Misc FP Arithmetic, Prev: FP Comparison Functions, Up: Arithmetic Functions + `long int quot' + The quotient from the division. -Miscellaneous FP arithmetic functions -------------------------------------- + `long int rem' + The remainder from the division. - The functions in this section perform miscellaneous but common -operations that are awkward to express with C operators. On some -processors these functions can use special machine instructions to -perform these operations faster than the equivalent C code. + (This is identical to `div_t' except that the components are of + type `long int' rather than `int'.) - - Function: double fmin (double X, double Y) - - Function: float fminf (float X, float Y) - - Function: long double fminl (long double X, long double Y) - The `fmin' function returns the lesser of the two values X and Y. - It is similar to the expression - ((x) < (y) ? (x) : (y)) - except that X and Y are only evaluated once. + - Function: ldiv_t ldiv (long int NUMERATOR, long int DENOMINATOR) + The `ldiv' function is similar to `div', except that the arguments + are of type `long int' and the result is returned as a structure + of type `ldiv_t'. - If an argument is NaN, the other argument is returned. If both - arguments are NaN, NaN is returned. + - Data Type: lldiv_t + This is a structure type used to hold the result returned by the + `lldiv' function. It has the following members: - - Function: double fmax (double X, double Y) - - Function: float fmaxf (float X, float Y) - - Function: long double fmaxl (long double X, long double Y) - The `fmax' function returns the greater of the two values X and Y. + `long long int quot' + The quotient from the division. - If an argument is NaN, the other argument is returned. If both - arguments are NaN, NaN is returned. + `long long int rem' + The remainder from the division. - - Function: double fdim (double X, double Y) - - Function: float fdimf (float X, float Y) - - Function: long double fdiml (long double X, long double Y) - The `fdim' function returns the positive difference between X and - Y. The positive difference is X - Y if X is greater than Y, and 0 - otherwise. + (This is identical to `div_t' except that the components are of + type `long long int' rather than `int'.) - If X, Y, or both are NaN, NaN is returned. + - Function: lldiv_t lldiv (long long int NUMERATOR, long long int + DENOMINATOR) + The `lldiv' function is like the `div' function, but the arguments + are of type `long long int' and the result is returned as a + structure of type `lldiv_t'. - - Function: double fma (double X, double Y, double Z) - - Function: float fmaf (float X, float Y, float Z) - - Function: long double fmal (long double X, long double Y, long - double Z) - The `fma' function performs floating-point multiply-add. This is - the operation (X * Y) + Z, but the intermediate result is not - rounded to the destination type. This can sometimes improve the - precision of a calculation. + The `lldiv' function was added in ISO C99. - This function was introduced because some processors have a special - instruction to perform multiply-add. The C compiler cannot use it - directly, because the expression `x*y + z' is defined to round the - intermediate result. `fma' lets you choose when you want to round - only once. + - Data Type: imaxdiv_t + This is a structure type used to hold the result returned by the + `imaxdiv' function. It has the following members: - On processors which do not implement multiply-add in hardware, - `fma' can be very slow since it must avoid intermediate rounding. - `math.h' defines the symbols `FP_FAST_FMA', `FP_FAST_FMAF', and - `FP_FAST_FMAL' when the corresponding version of `fma' is no - slower than the expression `x*y + z'. In the GNU C library, this - always means the operation is implemented in hardware. + `intmax_t quot' + The quotient from the division. - -File: libc.info, Node: Complex Numbers, Next: Operations on Complex, Prev: Arithmetic Functions, Up: Arithmetic + `intmax_t rem' + The remainder from the division. -Complex Numbers -=============== + (This is identical to `div_t' except that the components are of + type `intmax_t' rather than `int'.) - ISO C99 introduces support for complex numbers in C. This is done -with a new type qualifier, `complex'. It is a keyword if and only if -`complex.h' has been included. There are three complex types, -corresponding to the three real types: `float complex', `double -complex', and `long double complex'. + See *Note Integers:: for a description of the `intmax_t' type. - To construct complex numbers you need a way to indicate the imaginary -part of a number. There is no standard notation for an imaginary -floating point constant. Instead, `complex.h' defines two macros that -can be used to create complex numbers. - - Macro: const float complex _Complex_I - This macro is a representation of the complex number "0+1i". - Multiplying a real floating-point value by `_Complex_I' gives a - complex number whose value is purely imaginary. You can use this - to construct complex constants: + - Function: imaxdiv_t imaxdiv (intmax_t NUMERATOR, intmax_t + DENOMINATOR) + The `imaxdiv' function is like the `div' function, but the + arguments are of type `intmax_t' and the result is returned as a + structure of type `imaxdiv_t'. - 3.0 + 4.0i = `3.0 + 4.0 * _Complex_I' + See *Note Integers:: for a description of the `intmax_t' type. - Note that `_Complex_I * _Complex_I' has the value `-1', but the - type of that value is `complex'. + The `imaxdiv' function was added in ISO C99. -`_Complex_I' is a bit of a mouthful. `complex.h' also defines a -shorter name for the same constant. + +File: libc.info, Node: Floating Point Numbers, Next: Floating Point Classes, Prev: Integer Division, Up: Arithmetic - - Macro: const float complex I - This macro has exactly the same value as `_Complex_I'. Most of the - time it is preferable. However, it causes problems if you want to - use the identifier `I' for something else. You can safely write +Floating Point Numbers +====================== - #include - #undef I + Most computer hardware has support for two different kinds of +numbers: integers (...-3, -2, -1, 0, 1, 2, 3...) and floating-point +numbers. Floating-point numbers have three parts: the "mantissa", the +"exponent", and the "sign bit". The real number represented by a +floating-point value is given by (s ? -1 : 1) * 2^e * M where s is the +sign bit, e the exponent, and M the mantissa. *Note Floating Point +Concepts::, for details. (It is possible to have a different "base" +for the exponent, but all modern hardware uses 2.) - if you need `I' for your own purposes. (In that case we recommend - you also define some other short name for `_Complex_I', such as - `J'.) + Floating-point numbers can represent a finite subset of the real +numbers. While this subset is large enough for most purposes, it is +important to remember that the only reals that can be represented +exactly are rational numbers that have a terminating binary expansion +shorter than the width of the mantissa. Even simple fractions such as +1/5 can only be approximated by floating point. + Mathematical operations and functions frequently need to produce +values that are not representable. Often these values can be +approximated closely enough for practical purposes, but sometimes they +can't. Historically there was no way to tell when the results of a +calculation were inaccurate. Modern computers implement the IEEE 754 +standard for numerical computations, which defines a framework for +indicating to the program when the results of calculation are not +trustworthy. This framework consists of a set of "exceptions" that +indicate why a result could not be represented, and the special values +"infinity" and "not a number" (NaN).  -File: libc.info, Node: Operations on Complex, Next: Parsing of Numbers, Prev: Complex Numbers, Up: Arithmetic +File: libc.info, Node: Floating Point Classes, Next: Floating Point Errors, Prev: Floating Point Numbers, Up: Arithmetic -Projections, Conjugates, and Decomposing of Complex Numbers -=========================================================== +Floating-Point Number Classification Functions +============================================== - ISO C99 also defines functions that perform basic operations on -complex numbers, such as decomposition and conjugation. The prototypes -for all these functions are in `complex.h'. All functions are -available in three variants, one for each of the three complex types. + ISO C99 defines macros that let you determine what sort of +floating-point number a variable holds. - - Function: double creal (complex double Z) - - Function: float crealf (complex float Z) - - Function: long double creall (complex long double Z) - These functions return the real part of the complex number Z. + - Macro: int fpclassify (_float-type_ X) + This is a generic macro which works on all floating-point types and + which returns a value of type `int'. The possible values are: - - Function: double cimag (complex double Z) - - Function: float cimagf (complex float Z) - - Function: long double cimagl (complex long double Z) - These functions return the imaginary part of the complex number Z. + `FP_NAN' + The floating-point number X is "Not a Number" (*note Infinity + and NaN::) - - Function: complex double conj (complex double Z) - - Function: complex float conjf (complex float Z) - - Function: complex long double conjl (complex long double Z) - These functions return the conjugate value of the complex number - Z. The conjugate of a complex number has the same real part and a - negated imaginary part. In other words, `conj(a + bi) = a + -bi'. + `FP_INFINITE' + The value of X is either plus or minus infinity (*note + Infinity and NaN::) - - Function: double carg (complex double Z) - - Function: float cargf (complex float Z) - - Function: long double cargl (complex long double Z) - These functions return the argument of the complex number Z. The - argument of a complex number is the angle in the complex plane - between the positive real axis and a line passing through zero and - the number. This angle is measured in the usual fashion and - ranges from 0 to 2pi. + `FP_ZERO' + The value of X is zero. In floating-point formats like + IEEE 754, where zero can be signed, this value is also + returned if X is negative zero. - `carg' has a branch cut along the positive real axis. + `FP_SUBNORMAL' + Numbers whose absolute value is too small to be represented + in the normal format are represented in an alternate, + "denormalized" format (*note Floating Point Concepts::). + This format is less precise but can represent values closer + to zero. `fpclassify' returns this value for values of X in + this alternate format. - - Function: complex double cproj (complex double Z) - - Function: complex float cprojf (complex float Z) - - Function: complex long double cprojl (complex long double Z) - These functions return the projection of the complex value Z onto - the Riemann sphere. Values with a infinite imaginary part are - projected to positive infinity on the real axis, even if the real - part is NaN. If the real part is infinite, the result is - equivalent to + `FP_NORMAL' + This value is returned for all other values of X. It + indicates that there is nothing special about the number. - INFINITY + I * copysign (0.0, cimag (z)) - -File: libc.info, Node: Parsing of Numbers, Next: System V Number Conversion, Prev: Operations on Complex, Up: Arithmetic + `fpclassify' is most useful if more than one property of a number +must be tested. There are more specific macros which only test one +property at a time. Generally these macros execute faster than +`fpclassify', since there is special hardware support for them. You +should therefore use the specific macros whenever possible. -Parsing of Numbers -================== + - Macro: int isfinite (_float-type_ X) + This macro returns a nonzero value if X is finite: not plus or + minus infinity, and not NaN. It is equivalent to - This section describes functions for "reading" integer and -floating-point numbers from a string. It may be more convenient in some -cases to use `sscanf' or one of the related functions; see *Note -Formatted Input::. But often you can make a program more robust by -finding the tokens in the string by hand, then converting the numbers -one by one. + (fpclassify (x) != FP_NAN && fpclassify (x) != FP_INFINITE) + + `isfinite' is implemented as a macro which accepts any + floating-point type. + + - Macro: int isnormal (_float-type_ X) + This macro returns a nonzero value if X is finite and normalized. + It is equivalent to + + (fpclassify (x) == FP_NORMAL) + + - Macro: int isnan (_float-type_ X) + This macro returns a nonzero value if X is NaN. It is equivalent + to + + (fpclassify (x) == FP_NAN) + + Another set of floating-point classification functions was provided +by BSD. The GNU C library also supports these functions; however, we +recommend that you use the ISO C99 macros in new code. Those are +standard and will be available more widely. Also, since they are +macros, you do not have to worry about the type of their argument. + + - Function: int isinf (double X) + - Function: int isinff (float X) + - Function: int isinfl (long double X) + This function returns `-1' if X represents negative infinity, `1' + if X represents positive infinity, and `0' otherwise. + + - Function: int isnan (double X) + - Function: int isnanf (float X) + - Function: int isnanl (long double X) + This function returns a nonzero value if X is a "not a number" + value, and zero otherwise. + + *Note:* The `isnan' macro defined by ISO C99 overrides the BSD + function. This is normally not a problem, because the two + routines behave identically. However, if you really need to get + the BSD function for some reason, you can write + + (isnan) (x) + + - Function: int finite (double X) + - Function: int finitef (float X) + - Function: int finitel (long double X) + This function returns a nonzero value if X is finite or a "not a + number" value, and zero otherwise. + + *Portability Note:* The functions listed in this section are BSD +extensions. + + +File: libc.info, Node: Floating Point Errors, Next: Rounding, Prev: Floating Point Classes, Up: Arithmetic + +Errors in Floating-Point Calculations +===================================== * Menu: -* Parsing of Integers:: Functions for conversion of integer values. -* Parsing of Floats:: Functions for conversion of floating-point - values. +* FP Exceptions:: IEEE 754 math exceptions and how to detect them. +* Infinity and NaN:: Special values returned by calculations. +* Status bit operations:: Checking for exceptions after the fact. +* Math Error Reporting:: How the math functions report errors.  -File: libc.info, Node: Parsing of Integers, Next: Parsing of Floats, Up: Parsing of Numbers +File: libc.info, Node: FP Exceptions, Next: Infinity and NaN, Up: Floating Point Errors -Parsing of Integers -------------------- +FP Exceptions +------------- - The `str' functions are declared in `stdlib.h' and those beginning -with `wcs' are declared in `wchar.h'. One might wonder about the use -of `restrict' in the prototypes of the functions in this section. It -is seemingly useless but the ISO C standard uses it (for the functions -defined there) so we have to do it as well. + The IEEE 754 standard defines five "exceptions" that can occur +during a calculation. Each corresponds to a particular sort of error, +such as overflow. - - Function: long int strtol (const char *restrict STRING, char - **restrict TAILPTR, int BASE) - The `strtol' ("string-to-long") function converts the initial part - of STRING to a signed integer, which is returned as a value of - type `long int'. + When exceptions occur (when exceptions are "raised", in the language +of the standard), one of two things can happen. By default the +exception is simply noted in the floating-point "status word", and the +program continues as if nothing had happened. The operation produces a +default value, which depends on the exception (see the table below). +Your program can check the status word to find out which exceptions +happened. - This function attempts to decompose STRING as follows: + Alternatively, you can enable "traps" for exceptions. In that case, +when an exception is raised, your program will receive the `SIGFPE' +signal. The default action for this signal is to terminate the +program. *Note Signal Handling::, for how you can change the effect of +the signal. - * A (possibly empty) sequence of whitespace characters. Which - characters are whitespace is determined by the `isspace' - function (*note Classification of Characters::). These are - discarded. + In the System V math library, the user-defined function `matherr' is +called when certain exceptions occur inside math library functions. +However, the Unix98 standard deprecates this interface. We support it +for historical compatibility, but recommend that you do not use it in +new programs. - * An optional plus or minus sign (`+' or `-'). +The exceptions defined in IEEE 754 are: - * A nonempty sequence of digits in the radix specified by BASE. +`Invalid Operation' + This exception is raised if the given operands are invalid for the + operation to be performed. Examples are (see IEEE 754, section 7): + 1. Addition or subtraction: oo - oo. (But oo + oo = oo). - If BASE is zero, decimal radix is assumed unless the series of - digits begins with `0' (specifying octal radix), or `0x' or - `0X' (specifying hexadecimal radix); in other words, the same - syntax used for integer constants in C. + 2. Multiplication: 0 * oo. - Otherwise BASE must have a value between `2' and `36'. If - BASE is `16', the digits may optionally be preceded by `0x' - or `0X'. If base has no legal value the value returned is - `0l' and the global variable `errno' is set to `EINVAL'. + 3. Division: 0/0 or oo/oo. - * Any remaining characters in the string. If TAILPTR is not a - null pointer, `strtol' stores a pointer to this tail in - `*TAILPTR'. + 4. Remainder: x REM y, where y is zero or x is infinite. - If the string is empty, contains only whitespace, or does not - contain an initial substring that has the expected syntax for an - integer in the specified BASE, no conversion is performed. In - this case, `strtol' returns a value of zero and the value stored in - `*TAILPTR' is the value of STRING. + 5. Square root if the operand is less then zero. More + generally, any mathematical function evaluated outside its + domain produces this exception. - In a locale other than the standard `"C"' locale, this function - may recognize additional implementation-dependent syntax. + 6. Conversion of a floating-point number to an integer or decimal + string, when the number cannot be represented in the target + format (due to overflow, infinity, or NaN). - If the string has valid syntax for an integer but the value is not - representable because of overflow, `strtol' returns either - `LONG_MAX' or `LONG_MIN' (*note Range of Type::), as appropriate - for the sign of the value. It also sets `errno' to `ERANGE' to - indicate there was overflow. + 7. Conversion of an unrecognizable input string. - You should not check for errors by examining the return value of - `strtol', because the string might be a valid representation of - `0l', `LONG_MAX', or `LONG_MIN'. Instead, check whether TAILPTR - points to what you expect after the number (e.g. `'\0'' if the - string should end after the number). You also need to clear ERRNO - before the call and check it afterward, in case there was overflow. + 8. Comparison via predicates involving < or >, when one or other + of the operands is NaN. You can prevent this exception by + using the unordered comparison functions instead; see *Note + FP Comparison Functions::. - There is an example at the end of this section. + If the exception does not trap, the result of the operation is NaN. - - Function: long int wcstol (const wchar_t *restrict STRING, wchar_t - **restrict TAILPTR, int BASE) - The `wcstol' function is equivalent to the `strtol' function in - nearly all aspects but handles wide character strings. +`Division by Zero' + This exception is raised when a finite nonzero number is divided + by zero. If no trap occurs the result is either +oo or -oo, + depending on the signs of the operands. - The `wcstol' function was introduced in Amendment 1 of ISO C90. +`Overflow' + This exception is raised whenever the result cannot be represented + as a finite value in the precision format of the destination. If + no trap occurs the result depends on the sign of the intermediate + result and the current rounding mode (IEEE 754, section 7.3): + 1. Round to nearest carries all overflows to oo with the sign of + the intermediate result. - - Function: unsigned long int strtoul (const char *retrict STRING, - char **restrict TAILPTR, int BASE) - The `strtoul' ("string-to-unsigned-long") function is like - `strtol' except it converts to an `unsigned long int' value. The - syntax is the same as described above for `strtol'. The value - returned on overflow is `ULONG_MAX' (*note Range of Type::). + 2. Round toward 0 carries all overflows to the largest + representable finite number with the sign of the intermediate + result. - If STRING depicts a negative number, `strtoul' acts the same as - STRTOL but casts the result to an unsigned integer. That means - for example that `strtoul' on `"-1"' returns `ULONG_MAX' and an - input more negative than `LONG_MIN' returns (`ULONG_MAX' + 1) / 2. + 3. Round toward -oo carries positive overflows to the largest + representable finite number and negative overflows to -oo. - `strtoul' sets ERRNO to `EINVAL' if BASE is out of range, or - `ERANGE' on overflow. + 4. Round toward oo carries negative overflows to the most + negative representable finite number and positive overflows + to oo. - - Function: unsigned long int wcstoul (const wchar_t *restrict STRING, - wchar_t **restrict TAILPTR, int BASE) - The `wcstoul' function is equivalent to the `strtoul' function in - nearly all aspects but handles wide character strings. + Whenever the overflow exception is raised, the inexact exception + is also raised. - The `wcstoul' function was introduced in Amendment 1 of ISO C90. +`Underflow' + The underflow exception is raised when an intermediate result is + too small to be calculated accurately, or if the operation's + result rounded to the destination precision is too small to be + normalized. - - Function: long long int strtoll (const char *restrict STRING, char - **restrict TAILPTR, int BASE) - The `strtoll' function is like `strtol' except that it returns a - `long long int' value, and accepts numbers with a correspondingly - larger range. + When no trap is installed for the underflow exception, underflow is + signaled (via the underflow flag) only when both tininess and loss + of accuracy have been detected. If no trap handler is installed + the operation continues with an imprecise small value, or zero if + the destination precision cannot hold the small exact result. - If the string has valid syntax for an integer but the value is not - representable because of overflow, `strtoll' returns either - `LONG_LONG_MAX' or `LONG_LONG_MIN' (*note Range of Type::), as - appropriate for the sign of the value. It also sets `errno' to - `ERANGE' to indicate there was overflow. +`Inexact' + This exception is signalled if a rounded result is not exact (such + as when calculating the square root of two) or a result overflows + without an overflow trap. - The `strtoll' function was introduced in ISO C99. + +File: libc.info, Node: Infinity and NaN, Next: Status bit operations, Prev: FP Exceptions, Up: Floating Point Errors - - Function: long long int wcstoll (const wchar_t *restrict STRING, - wchar_t **restrict TAILPTR, int BASE) - The `wcstoll' function is equivalent to the `strtoll' function in - nearly all aspects but handles wide character strings. +Infinity and NaN +---------------- - The `wcstoll' function was introduced in Amendment 1 of ISO C90. + IEEE 754 floating point numbers can represent positive or negative +infinity, and "NaN" (not a number). These three values arise from +calculations whose result is undefined or cannot be represented +accurately. You can also deliberately set a floating-point variable to +any of them, which is sometimes useful. Some examples of calculations +that produce infinity or NaN: - - Function: long long int strtoq (const char *restrict STRING, char - **restrict TAILPTR, int BASE) - `strtoq' ("string-to-quad-word") is the BSD name for `strtoll'. + 1/0 = oo + log (0) = -oo + sqrt (-1) = NaN - - Function: long long int wcstoq (const wchar_t *restrict STRING, - wchar_t **restrict TAILPTR, int BASE) - The `wcstoq' function is equivalent to the `strtoq' function in - nearly all aspects but handles wide character strings. + When a calculation produces any of these values, an exception also +occurs; see *Note FP Exceptions::. - The `wcstoq' function is a GNU extension. + The basic operations and math functions all accept infinity and NaN +and produce sensible output. Infinities propagate through calculations +as one would expect: for example, 2 + oo = oo, 4/oo = 0, atan (oo) = +pi/2. NaN, on the other hand, infects any calculation that involves +it. Unless the calculation would produce the same result no matter +what real value replaced NaN, the result is NaN. - - Function: unsigned long long int strtoull (const char *restrict - STRING, char **restrict TAILPTR, int BASE) - The `strtoull' function is related to `strtoll' the same way - `strtoul' is related to `strtol'. + In comparison operations, positive infinity is larger than all values +except itself and NaN, and negative infinity is smaller than all values +except itself and NaN. NaN is "unordered": it is not equal to, greater +than, or less than anything, _including itself_. `x == x' is false if +the value of `x' is NaN. You can use this to test whether a value is +NaN or not, but the recommended way to test for NaN is with the `isnan' +function (*note Floating Point Classes::). In addition, `<', `>', +`<=', and `>=' will raise an exception when applied to NaNs. - The `strtoull' function was introduced in ISO C99. + `math.h' defines macros that allow you to explicitly set a variable +to infinity or NaN. - - Function: unsigned long long int wcstoull (const wchar_t *restrict - STRING, wchar_t **restrict TAILPTR, int BASE) - The `wcstoull' function is equivalent to the `strtoull' function - in nearly all aspects but handles wide character strings. + - Macro: float INFINITY + An expression representing positive infinity. It is equal to the + value produced by mathematical operations like `1.0 / 0.0'. + `-INFINITY' represents negative infinity. - The `wcstoull' function was introduced in Amendment 1 of ISO C90. + You can test whether a floating-point value is infinite by + comparing it to this macro. However, this is not recommended; you + should use the `isfinite' macro instead. *Note Floating Point + Classes::. - - Function: unsigned long long int strtouq (const char *restrict - STRING, char **restrict TAILPTR, int BASE) - `strtouq' is the BSD name for `strtoull'. + This macro was introduced in the ISO C99 standard. - - Function: unsigned long long int wcstouq (const wchar_t *restrict - STRING, wchar_t **restrict TAILPTR, int BASE) - The `wcstouq' function is equivalent to the `strtouq' function in - nearly all aspects but handles wide character strings. + - Macro: float NAN + An expression representing a value which is "not a number". This + macro is a GNU extension, available only on machines that support + the "not a number" value--that is to say, on all machines that + support IEEE floating point. - The `wcstoq' function is a GNU extension. + You can use `#ifdef NAN' to test whether the machine supports NaN. + (Of course, you must arrange for GNU extensions to be visible, + such as by defining `_GNU_SOURCE', and then you must include + `math.h'.) - - Function: intmax_t strtoimax (const char *restrict STRING, char - **restrict TAILPTR, int BASE) - The `strtoimax' function is like `strtol' except that it returns a - `intmax_t' value, and accepts numbers of a corresponding range. + IEEE 754 also allows for another unusual value: negative zero. This +value is produced when you divide a positive number by negative +infinity, or when a negative result is smaller than the limits of +representation. Negative zero behaves identically to zero in all +calculations, unless you explicitly test the sign bit with `signbit' or +`copysign'. - If the string has valid syntax for an integer but the value is not - representable because of overflow, `strtoimax' returns either - `INTMAX_MAX' or `INTMAX_MIN' (*note Integers::), as appropriate - for the sign of the value. It also sets `errno' to `ERANGE' to - indicate there was overflow. + +File: libc.info, Node: Status bit operations, Next: Math Error Reporting, Prev: Infinity and NaN, Up: Floating Point Errors - See *Note Integers:: for a description of the `intmax_t' type. The - `strtoimax' function was introduced in ISO C99. +Examining the FPU status word +----------------------------- - - Function: intmax_t wcstoimax (const wchar_t *restrict STRING, - wchar_t **restrict TAILPTR, int BASE) - The `wcstoimax' function is equivalent to the `strtoimax' function - in nearly all aspects but handles wide character strings. + ISO C99 defines functions to query and manipulate the floating-point +status word. You can use these functions to check for untrapped +exceptions when it's convenient, rather than worrying about them in the +middle of a calculation. - The `wcstoimax' function was introduced in ISO C99. + These constants represent the various IEEE 754 exceptions. Not all +FPUs report all the different exceptions. Each constant is defined if +and only if the FPU you are compiling for supports that exception, so +you can test for FPU support with `#ifdef'. They are defined in +`fenv.h'. - - Function: uintmax_t strtoumax (const char *restrict STRING, char - **restrict TAILPTR, int BASE) - The `strtoumax' function is related to `strtoimax' the same way - that `strtoul' is related to `strtol'. +`FE_INEXACT' + The inexact exception. - See *Note Integers:: for a description of the `intmax_t' type. The - `strtoumax' function was introduced in ISO C99. +`FE_DIVBYZERO' + The divide by zero exception. - - Function: uintmax_t wcstoumax (const wchar_t *restrict STRING, - wchar_t **restrict TAILPTR, int BASE) - The `wcstoumax' function is equivalent to the `strtoumax' function - in nearly all aspects but handles wide character strings. +`FE_UNDERFLOW' + The underflow exception. - The `wcstoumax' function was introduced in ISO C99. +`FE_OVERFLOW' + The overflow exception. - - Function: long int atol (const char *STRING) - This function is similar to the `strtol' function with a BASE - argument of `10', except that it need not detect overflow errors. - The `atol' function is provided mostly for compatibility with - existing code; using `strtol' is more robust. +`FE_INVALID' + The invalid exception. - - Function: int atoi (const char *STRING) - This function is like `atol', except that it returns an `int'. - The `atoi' function is also considered obsolete; use `strtol' - instead. + The macro `FE_ALL_EXCEPT' is the bitwise OR of all exception macros +which are supported by the FP implementation. - - Function: long long int atoll (const char *STRING) - This function is similar to `atol', except it returns a `long long - int'. + These functions allow you to clear exception flags, test for +exceptions, and save and restore the set of exceptions flagged. - The `atoll' function was introduced in ISO C99. It too is - obsolete (despite having just been added); use `strtoll' instead. + - Function: int feclearexcept (int EXCEPTS) + This function clears all of the supported exception flags + indicated by EXCEPTS. - All the functions mentioned in this section so far do not handle -alternative representations of characters as described in the locale -data. Some locales specify thousands separator and the way they have to -be used which can help to make large numbers more readable. To read -such numbers one has to use the `scanf' functions with the `'' flag. + The function returns zero in case the operation was successful, a + non-zero value otherwise. - Here is a function which parses a string as a sequence of integers -and returns the sum of them: + - Function: int feraiseexcept (int EXCEPTS) + This function raises the supported exceptions indicated by + EXCEPTS. If more than one exception bit in EXCEPTS is set the + order in which the exceptions are raised is undefined except that + overflow (`FE_OVERFLOW') or underflow (`FE_UNDERFLOW') are raised + before inexact (`FE_INEXACT'). Whether for overflow or underflow + the inexact exception is also raised is also implementation + dependent. + + The function returns zero in case the operation was successful, a + non-zero value otherwise. + + - Function: int fetestexcept (int EXCEPTS) + Test whether the exception flags indicated by the parameter EXCEPT + are currently set. If any of them are, a nonzero value is returned + which specifies which exceptions are set. Otherwise the result is + zero. + + To understand these functions, imagine that the status word is an +integer variable named STATUS. `feclearexcept' is then equivalent to +`status &= ~excepts' and `fetestexcept' is equivalent to `(status & +excepts)'. The actual implementation may be very different, of course. + + Exception flags are only cleared when the program explicitly +requests it, by calling `feclearexcept'. If you want to check for +exceptions from a set of calculations, you should clear all the flags +first. Here is a simple example of the way to use `fetestexcept': - int - sum_ints_from_string (char *string) { - int sum = 0; - - while (1) { - char *tail; - int next; - - /* Skip whitespace by hand, to detect the end. */ - while (isspace (*string)) string++; - if (*string == 0) - break; - - /* There is more nonwhitespace, */ - /* so it ought to be another number. */ - errno = 0; - /* Parse it. */ - next = strtol (string, &tail, 0); - /* Add it in, if not overflow. */ - if (errno) - printf ("Overflow\n"); - else - sum += next; - /* Advance past it. */ - string = tail; - } - - return sum; + double f; + int raised; + feclearexcept (FE_ALL_EXCEPT); + f = compute (); + raised = fetestexcept (FE_OVERFLOW | FE_INVALID); + if (raised & FE_OVERFLOW) { /* ... */ } + if (raised & FE_INVALID) { /* ... */ } + /* ... */ } + + You cannot explicitly set bits in the status word. You can, however, +save the entire status word and restore it later. This is done with the +following functions: + + - Function: int fegetexceptflag (fexcept_t *FLAGP, int EXCEPTS) + This function stores in the variable pointed to by FLAGP an + implementation-defined value representing the current setting of + the exception flags indicated by EXCEPTS. + + The function returns zero in case the operation was successful, a + non-zero value otherwise. + + - Function: int fesetexceptflag (const fexcept_t *FLAGP, int + EXCEPTS) This function restores the flags for the exceptions + indicated by EXCEPTS to the values stored in the variable pointed + to by FLAGP. + + The function returns zero in case the operation was successful, a + non-zero value otherwise. + + Note that the value stored in `fexcept_t' bears no resemblance to +the bit mask returned by `fetestexcept'. The type may not even be an +integer. Do not attempt to modify an `fexcept_t' variable. diff -durpN glibc-2.2.4/manual/libc.info-34 glibc-2.2.5/manual/libc.info-34 --- glibc-2.2.4/manual/libc.info-34 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-34 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1136 +33,1088 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Parsing of Floats, Prev: Parsing of Integers, Up: Parsing of Numbers +File: libc.info, Node: Math Error Reporting, Prev: Status bit operations, Up: Floating Point Errors -Parsing of Floats ------------------ +Error Reporting by Mathematical Functions +----------------------------------------- - The `str' functions are declared in `stdlib.h' and those beginning -with `wcs' are declared in `wchar.h'. One might wonder about the use -of `restrict' in the prototypes of the functions in this section. It -is seemingly useless but the ISO C standard uses it (for the functions -defined there) so we have to do it as well. + Many of the math functions are defined only over a subset of the +real or complex numbers. Even if they are mathematically defined, +their result may be larger or smaller than the range representable by +their return type. These are known as "domain errors", "overflows", and +"underflows", respectively. Math functions do several things when one +of these errors occurs. In this manual we will refer to the complete +response as "signalling" a domain error, overflow, or underflow. - - Function: double strtod (const char *restrict STRING, char - **restrict TAILPTR) - The `strtod' ("string-to-double") function converts the initial - part of STRING to a floating-point number, which is returned as a - value of type `double'. + When a math function suffers a domain error, it raises the invalid +exception and returns NaN. It also sets ERRNO to `EDOM'; this is for +compatibility with old systems that do not support IEEE 754 exception +handling. Likewise, when overflow occurs, math functions raise the +overflow exception and return oo or -oo as appropriate. They also set +ERRNO to `ERANGE'. When underflow occurs, the underflow exception is +raised, and zero (appropriately signed) is returned. ERRNO may be set +to `ERANGE', but this is not guaranteed. - This function attempts to decompose STRING as follows: + Some of the math functions are defined mathematically to result in a +complex value over parts of their domains. The most familiar example of +this is taking the square root of a negative number. The complex math +functions, such as `csqrt', will return the appropriate complex value +in this case. The real-valued functions, such as `sqrt', will signal a +domain error. - * A (possibly empty) sequence of whitespace characters. Which - characters are whitespace is determined by the `isspace' - function (*note Classification of Characters::). These are - discarded. + Some older hardware does not support infinities. On that hardware, +overflows instead return a particular very large number (usually the +largest representable number). `math.h' defines macros you can use to +test for overflow on both old and new hardware. - * An optional plus or minus sign (`+' or `-'). + - Macro: double HUGE_VAL + - Macro: float HUGE_VALF + - Macro: long double HUGE_VALL + An expression representing a particular very large number. On + machines that use IEEE 754 floating point format, `HUGE_VAL' is + infinity. On other machines, it's typically the largest positive + number that can be represented. - * A floating point number in decimal or hexadecimal format. The - decimal format is: - - A nonempty sequence of digits optionally containing a - decimal-point character--normally `.', but it depends on - the locale (*note General Numeric::). + Mathematical functions return the appropriately typed version of + `HUGE_VAL' or `-HUGE_VAL' when the result is too large to be + represented. - - An optional exponent part, consisting of a character `e' - or `E', an optional sign, and a sequence of digits. + +File: libc.info, Node: Rounding, Next: Control Functions, Prev: Floating Point Errors, Up: Arithmetic +Rounding Modes +============== - The hexadecimal format is as follows: - - A 0x or 0X followed by a nonempty sequence of - hexadecimal digits optionally containing a decimal-point - character--normally `.', but it depends on the locale - (*note General Numeric::). + Floating-point calculations are carried out internally with extra +precision, and then rounded to fit into the destination type. This +ensures that results are as precise as the input data. IEEE 754 +defines four possible rounding modes: - - An optional binary-exponent part, consisting of a - character `p' or `P', an optional sign, and a sequence - of digits. +Round to nearest. + This is the default mode. It should be used unless there is a + specific need for one of the others. In this mode results are + rounded to the nearest representable value. If the result is + midway between two representable values, the even representable is + chosen. "Even" here means the lowest-order bit is zero. This + rounding mode prevents statistical bias and guarantees numeric + stability: round-off errors in a lengthy calculation will remain + smaller than half of `FLT_EPSILON'. +Round toward plus Infinity. + All results are rounded to the smallest representable value which + is greater than the result. - * Any remaining characters in the string. If TAILPTR is not a - null pointer, a pointer to this tail of the string is stored - in `*TAILPTR'. +Round toward minus Infinity. + All results are rounded to the largest representable value which + is less than the result. - If the string is empty, contains only whitespace, or does not - contain an initial substring that has the expected syntax for a - floating-point number, no conversion is performed. In this case, - `strtod' returns a value of zero and the value returned in - `*TAILPTR' is the value of STRING. +Round toward zero. + All results are rounded to the largest representable value whose + magnitude is less than that of the result. In other words, if the + result is negative it is rounded up; if it is positive, it is + rounded down. - In a locale other than the standard `"C"' or `"POSIX"' locales, - this function may recognize additional locale-dependent syntax. +`fenv.h' defines constants which you can use to refer to the various +rounding modes. Each one will be defined if and only if the FPU +supports the corresponding rounding mode. - If the string has valid syntax for a floating-point number but the - value is outside the range of a `double', `strtod' will signal - overflow or underflow as described in *Note Math Error Reporting::. +`FE_TONEAREST' + Round to nearest. - `strtod' recognizes four special input strings. The strings - `"inf"' and `"infinity"' are converted to oo, or to the largest - representable value if the floating-point format doesn't support - infinities. You can prepend a `"+"' or `"-"' to specify the sign. - Case is ignored when scanning these strings. +`FE_UPWARD' + Round toward +oo. - The strings `"nan"' and `"nan(CHARS...)"' are converted to NaN. - Again, case is ignored. If CHARS... are provided, they are used - in some unspecified fashion to select a particular representation - of NaN (there can be several). +`FE_DOWNWARD' + Round toward -oo. - Since zero is a valid result as well as the value returned on - error, you should check for errors in the same way as for - `strtol', by examining ERRNO and TAILPTR. +`FE_TOWARDZERO' + Round toward zero. - - Function: float strtof (const char *STRING, char **TAILPTR) - - Function: long double strtold (const char *STRING, char **TAILPTR) - These functions are analogous to `strtod', but return `float' and - `long double' values respectively. They report errors in the same - way as `strtod'. `strtof' can be substantially faster than - `strtod', but has less precision; conversely, `strtold' can be - much slower but has more precision (on systems where `long double' - is a separate type). + Underflow is an unusual case. Normally, IEEE 754 floating point +numbers are always normalized (*note Floating Point Concepts::). +Numbers smaller than 2^r (where r is the minimum exponent, +`FLT_MIN_RADIX-1' for FLOAT) cannot be represented as normalized +numbers. Rounding all such numbers to zero or 2^r would cause some +algorithms to fail at 0. Therefore, they are left in denormalized +form. That produces loss of precision, since some bits of the mantissa +are stolen to indicate the decimal point. - These functions have been GNU extensions and are new to ISO C99. + If a result is too small to be represented as a denormalized number, +it is rounded to zero. However, the sign of the result is preserved; if +the calculation was negative, the result is "negative zero". Negative +zero can also result from some operations on infinity, such as 4/-oo. +Negative zero behaves identically to zero except when the `copysign' or +`signbit' functions are used to check the sign bit directly. - - Function: double wcstod (const wchar_t *restrict STRING, wchar_t - **restrict TAILPTR) - - Function: float wcstof (const wchar_t *STRING, wchar_t **TAILPTR) - - Function: long double wcstold (const wchar_t *STRING, wchar_t - **TAILPTR) - The `wcstod', `wcstof', and `wcstol' functions are equivalent in - nearly all aspect to the `strtod', `strtof', and `strtold' - functions but it handles wide character string. + At any time one of the above four rounding modes is selected. You +can find out which one with this function: - The `wcstod' function was introduced in Amendment 1 of ISO C90. - The `wcstof' and `wcstold' functions were introduced in ISO C99. + - Function: int fegetround (void) + Returns the currently selected rounding mode, represented by one + of the values of the defined rounding mode macros. - - Function: double atof (const char *STRING) - This function is similar to the `strtod' function, except that it - need not detect overflow and underflow errors. The `atof' function - is provided mostly for compatibility with existing code; using - `strtod' is more robust. +To change the rounding mode, use this function: - The GNU C library also provides `_l' versions of these functions, -which take an additional argument, the locale to use in conversion. -*Note Parsing of Integers::. + - Function: int fesetround (int ROUND) + Changes the currently selected rounding mode to ROUND. If ROUND + does not correspond to one of the supported rounding modes nothing + is changed. `fesetround' returns zero if it changed the rounding + mode, a nonzero value if the mode is not supported. - -File: libc.info, Node: System V Number Conversion, Prev: Parsing of Numbers, Up: Arithmetic + You should avoid changing the rounding mode if possible. It can be +an expensive operation; also, some hardware requires you to compile your +program differently for it to work. The resulting code may run slower. +See your compiler documentation for details. -Old-fashioned System V number-to-string functions -================================================= + +File: libc.info, Node: Control Functions, Next: Arithmetic Functions, Prev: Rounding, Up: Arithmetic - The old System V C library provided three functions to convert -numbers to strings, with unusual and hard-to-use semantics. The GNU C -library also provides these functions and some natural extensions. +Floating-Point Control Functions +================================ - These functions are only available in glibc and on systems descended -from AT&T Unix. Therefore, unless these functions do precisely what you -need, it is better to use `sprintf', which is standard. + IEEE 754 floating-point implementations allow the programmer to +decide whether traps will occur for each of the exceptions, by setting +bits in the "control word". In C, traps result in the program +receiving the `SIGFPE' signal; see *Note Signal Handling::. - All these functions are defined in `stdlib.h'. + *Note:* IEEE 754 says that trap handlers are given details of the +exceptional situation, and can set the result value. C signals do not +provide any mechanism to pass this information back and forth. +Trapping exceptions in C is therefore not very useful. - - Function: char * ecvt (double VALUE, int NDIGIT, int *DECPT, int - *NEG) - The function `ecvt' converts the floating-point number VALUE to a - string with at most NDIGIT decimal digits. The returned string - contains no decimal point or sign. The first digit of the string - is non-zero (unless VALUE is actually zero) and the last digit is - rounded to nearest. `*DECPT' is set to the index in the string of - the first digit after the decimal point. `*NEG' is set to a - nonzero value if VALUE is negative, zero otherwise. + It is sometimes necessary to save the state of the floating-point +unit while you perform some calculation. The library provides functions +which save and restore the exception flags, the set of exceptions that +generate traps, and the rounding mode. This information is known as the +"floating-point environment". - If NDIGIT decimal digits would exceed the precision of a `double' - it is reduced to a system-specific value. + The functions to save and restore the floating-point environment all +use a variable of type `fenv_t' to store information. This type is +defined in `fenv.h'. Its size and contents are implementation-defined. +You should not attempt to manipulate a variable of this type directly. - The returned string is statically allocated and overwritten by - each call to `ecvt'. + To save the state of the FPU, use one of these functions: - If VALUE is zero, it is implementation defined whether `*DECPT' is - `0' or `1'. + - Function: int fegetenv (fenv_t *ENVP) + Store the floating-point environment in the variable pointed to by + ENVP. - For example: `ecvt (12.3, 5, &d, &n)' returns `"12300"' and sets D - to `2' and N to `0'. + The function returns zero in case the operation was successful, a + non-zero value otherwise. - - Function: char * fcvt (double VALUE, int NDIGIT, int *DECPT, int - *NEG) - The function `fcvt' is like `ecvt', but NDIGIT specifies the - number of digits after the decimal point. If NDIGIT is less than - zero, VALUE is rounded to the NDIGIT+1'th place to the left of the - decimal point. For example, if NDIGIT is `-1', VALUE will be - rounded to the nearest 10. If NDIGIT is negative and larger than - the number of digits to the left of the decimal point in VALUE, - VALUE will be rounded to one significant digit. + - Function: int feholdexcept (fenv_t *ENVP) + Store the current floating-point environment in the object pointed + to by ENVP. Then clear all exception flags, and set the FPU to + trap no exceptions. Not all FPUs support trapping no exceptions; + if `feholdexcept' cannot set this mode, it returns nonzero value. + If it succeeds, it returns zero. - If NDIGIT decimal digits would exceed the precision of a `double' - it is reduced to a system-specific value. + The functions which restore the floating-point environment can take +these kinds of arguments: - The returned string is statically allocated and overwritten by - each call to `fcvt'. + * Pointers to `fenv_t' objects, which were initialized previously by + a call to `fegetenv' or `feholdexcept'. - - Function: char * gcvt (double VALUE, int NDIGIT, char *BUF) - `gcvt' is functionally equivalent to `sprintf(buf, "%*g", ndigit, - value'. It is provided only for compatibility's sake. It returns - BUF. + * The special macro `FE_DFL_ENV' which represents the floating-point + environment as it was available at program start. - If NDIGIT decimal digits would exceed the precision of a `double' - it is reduced to a system-specific value. + * Implementation defined macros with names starting with `FE_' and + having type `fenv_t *'. - As extensions, the GNU C library provides versions of these three -functions that take `long double' arguments. + If possible, the GNU C Library defines a macro `FE_NOMASK_ENV' + which represents an environment where every exception raised + causes a trap to occur. You can test for this macro using + `#ifdef'. It is only defined if `_GNU_SOURCE' is defined. - - Function: char * qecvt (long double VALUE, int NDIGIT, int *DECPT, - int *NEG) - This function is equivalent to `ecvt' except that it takes a `long - double' for the first parameter and that NDIGIT is restricted by - the precision of a `long double'. + Some platforms might define other predefined environments. - - Function: char * qfcvt (long double VALUE, int NDIGIT, int *DECPT, - int *NEG) - This function is equivalent to `fcvt' except that it takes a `long - double' for the first parameter and that NDIGIT is restricted by - the precision of a `long double'. +To set the floating-point environment, you can use either of these +functions: - - Function: char * qgcvt (long double VALUE, int NDIGIT, char *BUF) - This function is equivalent to `gcvt' except that it takes a `long - double' for the first parameter and that NDIGIT is restricted by - the precision of a `long double'. + - Function: int fesetenv (const fenv_t *ENVP) + Set the floating-point environment to that described by ENVP. - The `ecvt' and `fcvt' functions, and their `long double' -equivalents, all return a string located in a static buffer which is -overwritten by the next call to the function. The GNU C library -provides another set of extended functions which write the converted -string into a user-supplied buffer. These have the conventional `_r' -suffix. + The function returns zero in case the operation was successful, a + non-zero value otherwise. - `gcvt_r' is not necessary, because `gcvt' already uses a -user-supplied buffer. + - Function: int feupdateenv (const fenv_t *ENVP) + Like `fesetenv', this function sets the floating-point environment + to that described by ENVP. However, if any exceptions were + flagged in the status word before `feupdateenv' was called, they + remain flagged after the call. In other words, after `feupdateenv' + is called, the status word is the bitwise OR of the previous + status word and the one saved in ENVP. - - Function: char * ecvt_r (double VALUE, int NDIGIT, int *DECPT, int - *NEG, char *BUF, size_t LEN) - The `ecvt_r' function is the same as `ecvt', except that it places - its result into the user-specified buffer pointed to by BUF, with - length LEN. + The function returns zero in case the operation was successful, a + non-zero value otherwise. - This function is a GNU extension. +To control for individual exceptions if raising them causes a trap to +occur, you can use the following two functions. - - Function: char * fcvt_r (double VALUE, int NDIGIT, int *DECPT, int - *NEG, char *BUF, size_t LEN) - The `fcvt_r' function is the same as `fcvt', except that it places - its result into the user-specified buffer pointed to by BUF, with - length LEN. + *Portability Note:* These functions are all GNU extensions. - This function is a GNU extension. + - Function: int feenableexcept (int EXCEPTS) + This functions enables traps for each of the exceptions as + indicated by the parameter EXCEPT. The individual excepetions are + described in *Note Status bit operations::. Only the specified + exceptions are enabled, the status of the other exceptions is not + changed. - - Function: char * qecvt_r (long double VALUE, int NDIGIT, int *DECPT, - int *NEG, char *BUF, size_t LEN) - The `qecvt_r' function is the same as `qecvt', except that it - places its result into the user-specified buffer pointed to by - BUF, with length LEN. + The function returns the previous enabled exceptions in case the + operation was successful, `-1' otherwise. - This function is a GNU extension. + - Function: int fedisableexcept (int EXCEPTS) + This functions disables traps for each of the exceptions as + indicated by the parameter EXCEPT. The individual excepetions are + described in *Note Status bit operations::. Only the specified + exceptions are disabled, the status of the other exceptions is not + changed. - - Function: char * qfcvt_r (long double VALUE, int NDIGIT, int *DECPT, - int *NEG, char *BUF, size_t LEN) - The `qfcvt_r' function is the same as `qfcvt', except that it - places its result into the user-specified buffer pointed to by - BUF, with length LEN. + The function returns the previous enabled exceptions in case the + operation was successful, `-1' otherwise. - This function is a GNU extension. + - Function: int fegetexcept (int EXCEPTS) + The function returns a bitmask of all currently enabled + exceptions. It returns `-1' in case of failure.  -File: libc.info, Node: Date and Time, Next: Resource Usage And Limitation, Prev: Arithmetic, Up: Top +File: libc.info, Node: Arithmetic Functions, Next: Complex Numbers, Prev: Control Functions, Up: Arithmetic -Date and Time -************* +Arithmetic Functions +==================== - This chapter describes functions for manipulating dates and times, -including functions for determining what time it is and conversion -between different time representations. + The C library provides functions to do basic operations on +floating-point numbers. These include absolute value, maximum and +minimum, normalization, bit twiddling, rounding, and a few others. * Menu: -* Time Basics:: Concepts and definitions. -* Elapsed Time:: Data types to represent elapsed times -* Processor And CPU Time:: Time a program has spent executing. -* Calendar Time:: Manipulation of ``real'' dates and times. -* Setting an Alarm:: Sending a signal after a specified time. -* Sleeping:: Waiting for a period of time. +* Absolute Value:: Absolute values of integers and floats. +* Normalization Functions:: Extracting exponents and putting them back. +* Rounding Functions:: Rounding floats to integers. +* Remainder Functions:: Remainders on division, precisely defined. +* FP Bit Twiddling:: Sign bit adjustment. Adding epsilon. +* FP Comparison Functions:: Comparisons without risk of exceptions. +* Misc FP Arithmetic:: Max, min, positive difference, multiply-add.  -File: libc.info, Node: Time Basics, Next: Elapsed Time, Up: Date and Time +File: libc.info, Node: Absolute Value, Next: Normalization Functions, Up: Arithmetic Functions -Time Basics -=========== +Absolute Value +-------------- - Discussing time in a technical manual can be difficult because the -word "time" in English refers to lots of different things. In this -manual, we use a rigorous terminology to avoid confusion, and the only -thing we use the simple word "time" for is to talk about the abstract -concept. + These functions are provided for obtaining the "absolute value" (or +"magnitude") of a number. The absolute value of a real number X is X +if X is positive, -X if X is negative. For a complex number Z, whose +real part is X and whose imaginary part is Y, the absolute value is +`sqrt (X*X + Y*Y)'. - A "calendar time" is a point in the time continuum, for example -November 4, 1990 at 18:02.5 UTC. Sometimes this is called "absolute -time". + Prototypes for `abs', `labs' and `llabs' are in `stdlib.h'; +`imaxabs' is declared in `inttypes.h'; `fabs', `fabsf' and `fabsl' are +declared in `math.h'. `cabs', `cabsf' and `cabsl' are declared in +`complex.h'. - We don't speak of a "date", because that is inherent in a calendar -time. + - Function: int abs (int NUMBER) + - Function: long int labs (long int NUMBER) + - Function: long long int llabs (long long int NUMBER) + - Function: intmax_t imaxabs (intmax_t NUMBER) + These functions return the absolute value of NUMBER. - An "interval" is a contiguous part of the time continuum between two -calendar times, for example the hour between 9:00 and 10:00 on July 4, -1980. + Most computers use a two's complement integer representation, in + which the absolute value of `INT_MIN' (the smallest possible `int') + cannot be represented; thus, `abs (INT_MIN)' is not defined. - An "elapsed time" is the length of an interval, for example, 35 -minutes. People sometimes sloppily use the word "interval" to refer to -the elapsed time of some interval. + `llabs' and `imaxdiv' are new to ISO C99. - An "amount of time" is a sum of elapsed times, which need not be of -any specific intervals. For example, the amount of time it takes to -read a book might be 9 hours, independently of when and in how many -sittings it is read. + See *Note Integers:: for a description of the `intmax_t' type. - A "period" is the elapsed time of an interval between two events, -especially when they are part of a sequence of regularly repeating -events. - "CPU time" is like calendar time, except that it is based on the -subset of the time continuum when a particular process is actively -using a CPU. CPU time is, therefore, relative to a process. + - Function: double fabs (double NUMBER) + - Function: float fabsf (float NUMBER) + - Function: long double fabsl (long double NUMBER) + This function returns the absolute value of the floating-point + number NUMBER. - "Processor time" is an amount of time that a CPU is in use. In -fact, it's a basic system resource, since there's a limit to how much -can exist in any given interval (that limit is the elapsed time of the -interval times the number of CPUs in the processor). People often call -this CPU time, but we reserve the latter term in this manual for the -definition above. + - Function: double cabs (complex double Z) + - Function: float cabsf (complex float Z) + - Function: long double cabsl (complex long double Z) + These functions return the absolute value of the complex number Z + (*note Complex Numbers::). The absolute value of a complex number + is: - -File: libc.info, Node: Elapsed Time, Next: Processor And CPU Time, Prev: Time Basics, Up: Date and Time + sqrt (creal (Z) * creal (Z) + cimag (Z) * cimag (Z)) -Elapsed Time -============ + This function should always be used instead of the direct formula + because it takes special care to avoid losing precision. It may + also take advantage of hardware support for this operation. See + `hypot' in *Note Exponents and Logarithms::. - One way to represent an elapsed time is with a simple arithmetic data -type, as with the following function to compute the elapsed time between -two calendar times. This function is declared in `time.h'. + +File: libc.info, Node: Normalization Functions, Next: Rounding Functions, Prev: Absolute Value, Up: Arithmetic Functions - - Function: double difftime (time_t TIME1, time_t TIME0) - The `difftime' function returns the number of seconds of elapsed - time between calendar time TIME1 and calendar time TIME0, as a - value of type `double'. The difference ignores leap seconds - unless leap second support is enabled. +Normalization Functions +----------------------- - In the GNU system, you can simply subtract `time_t' values. But on - other systems, the `time_t' data type might use some other encoding - where subtraction doesn't work directly. + The functions described in this section are primarily provided as a +way to efficiently perform certain low-level manipulations on floating +point numbers that are represented internally using a binary radix; see +*Note Floating Point Concepts::. These functions are required to have +equivalent behavior even if the representation does not use a radix of +2, but of course they are unlikely to be particularly efficient in +those cases. - The GNU C library provides two data types specifically for -representing an elapsed time. They are used by various GNU C library -functions, and you can use them for your own purposes too. They're -exactly the same except that one has a resolution in microseconds, and -the other, newer one, is in nanoseconds. + All these functions are declared in `math.h'. - - Data Type: struct timeval - The `struct timeval' structure represents an elapsed time. It is - declared in `sys/time.h' and has the following members: + - Function: double frexp (double VALUE, int *EXPONENT) + - Function: float frexpf (float VALUE, int *EXPONENT) + - Function: long double frexpl (long double VALUE, int *EXPONENT) + These functions are used to split the number VALUE into a + normalized fraction and an exponent. - `long int tv_sec' - This represents the number of whole seconds of elapsed time. + If the argument VALUE is not zero, the return value is VALUE times + a power of two, and is always in the range 1/2 (inclusive) to 1 + (exclusive). The corresponding exponent is stored in `*EXPONENT'; + the return value multiplied by 2 raised to this exponent equals + the original number VALUE. - `long int tv_usec' - This is the rest of the elapsed time (a fraction of a second), - represented as the number of microseconds. It is always less - than one million. + For example, `frexp (12.8, &exponent)' returns `0.8' and stores + `4' in `exponent'. + If VALUE is zero, then the return value is zero and zero is stored + in `*EXPONENT'. - - Data Type: struct timespec - The `struct timespec' structure represents an elapsed time. It is - declared in `time.h' and has the following members: + - Function: double ldexp (double VALUE, int EXPONENT) + - Function: float ldexpf (float VALUE, int EXPONENT) + - Function: long double ldexpl (long double VALUE, int EXPONENT) + These functions return the result of multiplying the floating-point + number VALUE by 2 raised to the power EXPONENT. (It can be used + to reassemble floating-point numbers that were taken apart by + `frexp'.) - `long int tv_sec' - This represents the number of whole seconds of elapsed time. + For example, `ldexp (0.8, 4)' returns `12.8'. - `long int tv_nsec' - This is the rest of the elapsed time (a fraction of a second), - represented as the number of nanoseconds. It is always less - than one billion. + The following functions, which come from BSD, provide facilities +equivalent to those of `ldexp' and `frexp'. See also the ISO C +function `logb' which originally also appeared in BSD. + - Function: double scalb (double VALUE, int EXPONENT) + - Function: float scalbf (float VALUE, int EXPONENT) + - Function: long double scalbl (long double VALUE, int EXPONENT) + The `scalb' function is the BSD name for `ldexp'. - It is often necessary to subtract two values of type -`struct timeval' or `struct timespec'. Here is the best way to do -this. It works even on some peculiar operating systems where the -`tv_sec' member has an unsigned type. + - Function: long long int scalbn (double X, int n) + - Function: long long int scalbnf (float X, int n) + - Function: long long int scalbnl (long double X, int n) + `scalbn' is identical to `scalb', except that the exponent N is an + `int' instead of a floating-point number. - /* Subtract the `struct timeval' values X and Y, - storing the result in RESULT. - Return 1 if the difference is negative, otherwise 0. */ - - int - timeval_subtract (result, x, y) - struct timeval *result, *x, *y; - { - /* Perform the carry for the later subtraction by updating Y. */ - if (x->tv_usec < y->tv_usec) { - int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; - y->tv_usec -= 1000000 * nsec; - y->tv_sec += nsec; - } - if (x->tv_usec - y->tv_usec > 1000000) { - int nsec = (x->tv_usec - y->tv_usec) / 1000000; - y->tv_usec += 1000000 * nsec; - y->tv_sec -= nsec; - } - - /* Compute the time remaining to wait. - `tv_usec' is certainly positive. */ - result->tv_sec = x->tv_sec - y->tv_sec; - result->tv_usec = x->tv_usec - y->tv_usec; - - /* Return 1 if result is negative. */ - return x->tv_sec < y->tv_sec; - } + - Function: long long int scalbln (double X, long int n) + - Function: long long int scalblnf (float X, long int n) + - Function: long long int scalblnl (long double X, long int n) + `scalbln' is identical to `scalb', except that the exponent N is a + `long int' instead of a floating-point number. - Common functions that use `struct timeval' are `gettimeofday' and -`settimeofday'. + - Function: long long int significand (double X) + - Function: long long int significandf (float X) + - Function: long long int significandl (long double X) + `significand' returns the mantissa of X scaled to the range [1, 2). + It is equivalent to `scalb (X, (double) -ilogb (X))'. - There are no GNU C library functions specifically oriented toward -dealing with elapsed times, but the calendar time, processor time, and -alarm and sleeping functions have a lot to do with them. + This function exists mainly for use in certain standardized tests + of IEEE 754 conformance.  -File: libc.info, Node: Processor And CPU Time, Next: Calendar Time, Prev: Elapsed Time, Up: Date and Time - -Processor And CPU Time -====================== - - If you're trying to optimize your program or measure its efficiency, -it's very useful to know how much processor time it uses. For that, -calendar time and elapsed times are useless because a process may spend -time waiting for I/O or for other processes to use the CPU. However, -you can get the information with the functions in this section. - - CPU time (*note Time Basics::) is represented by the data type -`clock_t', which is a number of "clock ticks". It gives the total -amount of time a process has actively used a CPU since some arbitrary -event. On the GNU system, that event is the creation of the process. -While arbitrary in general, the event is always the same event for any -particular process, so you can always measure how much time on the CPU -a particular computation takes by examinining the process' CPU time -before and after the computation. +File: libc.info, Node: Rounding Functions, Next: Remainder Functions, Prev: Normalization Functions, Up: Arithmetic Functions - In the GNU system, `clock_t' is equivalent to `long int' and -`CLOCKS_PER_SEC' is an integer value. But in other systems, both -`clock_t' and the macro `CLOCKS_PER_SEC' can be either integer or -floating-point types. Casting CPU time values to `double', as in the -example above, makes sure that operations such as arithmetic and -printing work properly and consistently no matter what the underlying -representation is. +Rounding Functions +------------------ - Note that the clock can wrap around. On a 32bit system with -`CLOCKS_PER_SEC' set to one million this function will return the same -value approximately every 72 minutes. + The functions listed here perform operations such as rounding and +truncation of floating-point values. Some of these functions convert +floating point numbers to integer values. They are all declared in +`math.h'. - For additional functions to examine a process' use of processor time, -and to control it, *Note Resource Usage And Limitation::. + You can also convert floating-point numbers to integers simply by +casting them to `int'. This discards the fractional part, effectively +rounding towards zero. However, this only works if the result can +actually be represented as an `int'--for very large numbers, this is +impossible. The functions listed here return the result as a `double' +instead to get around this problem. -* Menu: + - Function: double ceil (double X) + - Function: float ceilf (float X) + - Function: long double ceill (long double X) + These functions round X upwards to the nearest integer, returning + that value as a `double'. Thus, `ceil (1.5)' is `2.0'. -* CPU Time:: The `clock' function. -* Processor Time:: The `times' function. + - Function: double floor (double X) + - Function: float floorf (float X) + - Function: long double floorl (long double X) + These functions round X downwards to the nearest integer, + returning that value as a `double'. Thus, `floor (1.5)' is `1.0' + and `floor (-1.5)' is `-2.0'. - -File: libc.info, Node: CPU Time, Next: Processor Time, Up: Processor And CPU Time + - Function: double trunc (double X) + - Function: float truncf (float X) + - Function: long double truncl (long double X) + The `trunc' functions round X towards zero to the nearest integer + (returned in floating-point format). Thus, `trunc (1.5)' is `1.0' + and `trunc (-1.5)' is `-1.0'. -CPU Time Inquiry ----------------- + - Function: double rint (double X) + - Function: float rintf (float X) + - Function: long double rintl (long double X) + These functions round X to an integer value according to the + current rounding mode. *Note Floating Point Parameters::, for + information about the various rounding modes. The default + rounding mode is to round to the nearest integer; some machines + support other modes, but round-to-nearest is always used unless + you explicitly select another. - To get a process' CPU time, you can use the `clock' function. This -facility is declared in the header file `time.h'. + If X was not initially an integer, these functions raise the + inexact exception. - In typical usage, you call the `clock' function at the beginning and -end of the interval you want to time, subtract the values, and then -divide by `CLOCKS_PER_SEC' (the number of clock ticks per second) to -get processor time, like this: + - Function: double nearbyint (double X) + - Function: float nearbyintf (float X) + - Function: long double nearbyintl (long double X) + These functions return the same value as the `rint' functions, but + do not raise the inexact exception if X is not an integer. - #include - - clock_t start, end; - double cpu_time_used; - - start = clock(); - ... /* Do the work. */ - end = clock(); - cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC; + - Function: double round (double X) + - Function: float roundf (float X) + - Function: long double roundl (long double X) + These functions are similar to `rint', but they round halfway + cases away from zero instead of to the nearest even integer. - Do not use a single CPU time as an amount of time; it doesn't work -that way. Either do a subtraction as shown above or query processor -time directly. *Note Processor Time::. + - Function: long int lrint (double X) + - Function: long int lrintf (float X) + - Function: long int lrintl (long double X) + These functions are just like `rint', but they return a `long int' + instead of a floating-point number. - Different computers and operating systems vary wildly in how they -keep track of CPU time. It's common for the internal processor clock -to have a resolution somewhere between a hundredth and millionth of a -second. + - Function: long long int llrint (double X) + - Function: long long int llrintf (float X) + - Function: long long int llrintl (long double X) + These functions are just like `rint', but they return a `long long + int' instead of a floating-point number. - - Macro: int CLOCKS_PER_SEC - The value of this macro is the number of clock ticks per second - measured by the `clock' function. POSIX requires that this value - be one million independent of the actual resolution. + - Function: long int lround (double X) + - Function: long int lroundf (float X) + - Function: long int lroundl (long double X) + These functions are just like `round', but they return a `long + int' instead of a floating-point number. - - Macro: int CLK_TCK - This is an obsolete name for `CLOCKS_PER_SEC'. + - Function: long long int llround (double X) + - Function: long long int llroundf (float X) + - Function: long long int llroundl (long double X) + These functions are just like `round', but they return a `long + long int' instead of a floating-point number. - - Data Type: clock_t - This is the type of the value returned by the `clock' function. - Values of type `clock_t' are numbers of clock ticks. + - Function: double modf (double VALUE, double *INTEGER-PART) + - Function: float modff (float VALUE, float *INTEGER-PART) + - Function: long double modfl (long double VALUE, long double + *INTEGER-PART) + These functions break the argument VALUE into an integer part and a + fractional part (between `-1' and `1', exclusive). Their sum + equals VALUE. Each of the parts has the same sign as VALUE, and + the integer part is always rounded toward zero. - - Function: clock_t clock (void) - This function returns the calling process' current CPU time. If - the CPU time is not available or cannot be represented, `clock' - returns the value `(clock_t)(-1)'. + `modf' stores the integer part in `*INTEGER-PART', and returns the + fractional part. For example, `modf (2.5, &intpart)' returns + `0.5' and stores `2.0' into `intpart'.  -File: libc.info, Node: Processor Time, Prev: CPU Time, Up: Processor And CPU Time - -Processor Time Inquiry ----------------------- - - The `times' function returns information about a process' -consumption of processor time in a `struct tms' object, in addition to -the process' CPU time. *Note Time Basics::. You should include the -header file `sys/times.h' to use this facility. - - - Data Type: struct tms - The `tms' structure is used to return information about process - times. It contains at least the following members: - - `clock_t tms_utime' - This is the total processor time the calling process has used - in executing the instructions of its program. - - `clock_t tms_stime' - This is the processor time the system has used on behalf of - the calling process. - - `clock_t tms_cutime' - This is the sum of the `tms_utime' values and the `tms_cutime' - values of all terminated child processes of the calling - process, whose status has been reported to the parent process - by `wait' or `waitpid'; see *Note Process Completion::. In - other words, it represents the total processor time used in - executing the instructions of all the terminated child - processes of the calling process, excluding child processes - which have not yet been reported by `wait' or `waitpid'. - - `clock_t tms_cstime' - This is similar to `tms_cutime', but represents the total - processor time system has used on behalf of all the - terminated child processes of the calling process. - - All of the times are given in numbers of clock ticks. Unlike CPU - time, these are the actual amounts of time; not relative to any - event. *Note Creating a Process::. - - - Function: clock_t times (struct tms *BUFFER) - The `times' function stores the processor time information for the - calling process in BUFFER. - - The return value is the calling process' CPU time (the same value - you get from `clock()'. `times' returns `(clock_t)(-1)' to - indicate failure. - - *Portability Note:* The `clock' function described in *Note CPU -Time:: is specified by the ISO C standard. The `times' function is a -feature of POSIX.1. In the GNU system, the CPU time is defined to be -equivalent to the sum of the `tms_utime' and `tms_stime' fields -returned by `times'. +File: libc.info, Node: Remainder Functions, Next: FP Bit Twiddling, Prev: Rounding Functions, Up: Arithmetic Functions - -File: libc.info, Node: Calendar Time, Next: Setting an Alarm, Prev: Processor And CPU Time, Up: Date and Time +Remainder Functions +------------------- -Calendar Time -============= + The functions in this section compute the remainder on division of +two floating-point numbers. Each is a little different; pick the one +that suits your problem. - This section describes facilities for keeping track of calendar time. -*Note Time Basics::. + - Function: double fmod (double NUMERATOR, double DENOMINATOR) + - Function: float fmodf (float NUMERATOR, float DENOMINATOR) + - Function: long double fmodl (long double NUMERATOR, long double + DENOMINATOR) + These functions compute the remainder from the division of + NUMERATOR by DENOMINATOR. Specifically, the return value is + `NUMERATOR - N * DENOMINATOR', where N is the quotient of + NUMERATOR divided by DENOMINATOR, rounded towards zero to an + integer. Thus, `fmod (6.5, 2.3)' returns `1.9', which is `6.5' + minus `4.6'. - The GNU C library represents calendar time three ways: + The result has the same sign as the NUMERATOR and has magnitude + less than the magnitude of the DENOMINATOR. - * "Simple time" (the `time_t' data type) is a compact - representation, typically giving the number of seconds of elapsed - time since some implementation-specific base time. + If DENOMINATOR is zero, `fmod' signals a domain error. - * There is also a "high-resolution time" representation. Like simple - time, this represents a calendar time as an elapsed time since a - base time, but instead of measuring in whole seconds, it uses a - `struct timeval' data type, which includes fractions of a second. - Use this time representation instead of simple time when you need - greater precision. + - Function: double drem (double NUMERATOR, double DENOMINATOR) + - Function: float dremf (float NUMERATOR, float DENOMINATOR) + - Function: long double dreml (long double NUMERATOR, long double + DENOMINATOR) + These functions are like `fmod' except that they rounds the + internal quotient N to the nearest integer instead of towards zero + to an integer. For example, `drem (6.5, 2.3)' returns `-0.4', + which is `6.5' minus `6.9'. - * "Local time" or "broken-down time" (the `struct tm' data type) - represents a calendar time as a set of components specifying the - year, month, and so on in the Gregorian calendar, for a specific - time zone. This calendar time representation is usually used only - to communicate with people. + The absolute value of the result is less than or equal to half the + absolute value of the DENOMINATOR. The difference between `fmod + (NUMERATOR, DENOMINATOR)' and `drem (NUMERATOR, DENOMINATOR)' is + always either DENOMINATOR, minus DENOMINATOR, or zero. -* Menu: + If DENOMINATOR is zero, `drem' signals a domain error. -* Simple Calendar Time:: Facilities for manipulating calendar time. -* High-Resolution Calendar:: A time representation with greater precision. -* Broken-down Time:: Facilities for manipulating local time. -* High Accuracy Clock:: Maintaining a high accuracy system clock. -* Formatting Calendar Time:: Converting times to strings. -* Parsing Date and Time:: Convert textual time and date information back - into broken-down time values. -* TZ Variable:: How users specify the time zone. -* Time Zone Functions:: Functions to examine or specify the time zone. -* Time Functions Example:: An example program showing use of some of - the time functions. + - Function: double remainder (double NUMERATOR, double DENOMINATOR) + - Function: float remainderf (float NUMERATOR, float DENOMINATOR) + - Function: long double remainderl (long double NUMERATOR, long double + DENOMINATOR) + This function is another name for `drem'.  -File: libc.info, Node: Simple Calendar Time, Next: High-Resolution Calendar, Up: Calendar Time +File: libc.info, Node: FP Bit Twiddling, Next: FP Comparison Functions, Prev: Remainder Functions, Up: Arithmetic Functions -Simple Calendar Time --------------------- +Setting and modifying single bits of FP values +---------------------------------------------- - This section describes the `time_t' data type for representing -calendar time as simple time, and the functions which operate on simple -time objects. These facilities are declared in the header file -`time.h'. + There are some operations that are too complicated or expensive to +perform by hand on floating-point numbers. ISO C99 defines functions +to do these operations, which mostly involve changing single bits. - - Data Type: time_t - This is the data type used to represent simple time. Sometimes, - it also represents an elapsed time. When interpreted as a - calendar time value, it represents the number of seconds elapsed - since 00:00:00 on January 1, 1970, Coordinated Universal Time. - (This calendar time is sometimes referred to as the "epoch".) - POSIX requires that this count not include leap seconds, but on - some systems this count includes leap seconds if you set `TZ' to - certain values (*note TZ Variable::). + - Function: double copysign (double X, double Y) + - Function: float copysignf (float X, float Y) + - Function: long double copysignl (long double X, long double Y) + These functions return X but with the sign of Y. They work even + if X or Y are NaN or zero. Both of these can carry a sign + (although not all implementations support it) and this is one of + the few operations that can tell the difference. - Note that a simple time has no concept of local time zone. - Calendar Time T is the same instant in time regardless of where on - the globe the computer is. + `copysign' never raises an exception. - In the GNU C library, `time_t' is equivalent to `long int'. In - other systems, `time_t' might be either an integer or - floating-point type. + This function is defined in IEC 559 (and the appendix with + recommended functions in IEEE 754/IEEE 854). - The function `difftime' tells you the elapsed time between two -simple calendar times, which is not always as easy to compute as just -subtracting. *Note Elapsed Time::. + - Function: int signbit (_float-type_ X) + `signbit' is a generic macro which can work on all floating-point + types. It returns a nonzero value if the value of X has its sign + bit set. - - Function: time_t time (time_t *RESULT) - The `time' function returns the current calendar time as a value of - type `time_t'. If the argument RESULT is not a null pointer, the - calendar time value is also stored in `*RESULT'. If the current - calendar time is not available, the value `(time_t)(-1)' is - returned. + This is not the same as `x < 0.0', because IEEE 754 floating point + allows zero to be signed. The comparison `-0.0 < 0.0' is false, + but `signbit (-0.0)' will return a nonzero value. - - Function: int stime (time_t *NEWTIME) - `stime' sets the system clock, i.e. it tells the system that the - current calendar time is NEWTIME, where `newtime' is interpreted - as described in the above definition of `time_t'. + - Function: double nextafter (double X, double Y) + - Function: float nextafterf (float X, float Y) + - Function: long double nextafterl (long double X, long double Y) + The `nextafter' function returns the next representable neighbor of + X in the direction towards Y. The size of the step between X and + the result depends on the type of the result. If X = Y the + function simply returns Y. If either value is `NaN', `NaN' is + returned. Otherwise a value corresponding to the value of the + least significant bit in the mantissa is added or subtracted, + depending on the direction. `nextafter' will signal overflow or + underflow if the result goes outside of the range of normalized + numbers. - `settimeofday' is a newer function which sets the system clock to - better than one second precision. `settimeofday' is generally a - better choice than `stime'. *Note High-Resolution Calendar::. + This function is defined in IEC 559 (and the appendix with + recommended functions in IEEE 754/IEEE 854). - Only the superuser can set the system clock. + - Function: double nexttoward (double X, long double Y) + - Function: float nexttowardf (float X, long double Y) + - Function: long double nexttowardl (long double X, long double Y) + These functions are identical to the corresponding versions of + `nextafter' except that their second argument is a `long double'. - If the function succeeds, the return value is zero. Otherwise, it - is `-1' and `errno' is set accordingly: + - Function: double nan (const char *TAGP) + - Function: float nanf (const char *TAGP) + - Function: long double nanl (const char *TAGP) + The `nan' function returns a representation of NaN, provided that + NaN is supported by the target platform. `nan + ("N-CHAR-SEQUENCE")' is equivalent to `strtod + ("NAN(N-CHAR-SEQUENCE)")'. - `EPERM' - The process is not superuser. + The argument TAGP is used in an unspecified manner. On IEEE 754 + systems, there are many representations of NaN, and TAGP selects + one. On other systems it may do nothing.  -File: libc.info, Node: High-Resolution Calendar, Next: Broken-down Time, Prev: Simple Calendar Time, Up: Calendar Time - -High-Resolution Calendar ------------------------- - - The `time_t' data type used to represent simple times has a -resolution of only one second. Some applications need more precision. - - So, the GNU C library also contains functions which are capable of -representing calendar times to a higher resolution than one second. The -functions and the associated data types described in this section are -declared in `sys/time.h'. - - - Data Type: struct timezone - The `struct timezone' structure is used to hold minimal information - about the local time zone. It has the following members: - - `int tz_minuteswest' - This is the number of minutes west of UTC. +File: libc.info, Node: FP Comparison Functions, Next: Misc FP Arithmetic, Prev: FP Bit Twiddling, Up: Arithmetic Functions - `int tz_dsttime' - If nonzero, Daylight Saving Time applies during some part of - the year. +Floating-Point Comparison Functions +----------------------------------- - The `struct timezone' type is obsolete and should never be used. - Instead, use the facilities described in *Note Time Zone - Functions::. + The standard C comparison operators provoke exceptions when one or +other of the operands is NaN. For example, - - Function: int gettimeofday (struct timeval *TP, struct timezone *TZP) - The `gettimeofday' function returns the current calendar time as - the elapsed time since the epoch in the `struct timeval' structure - indicated by TP. (*note Elapsed Time:: for a description of - `struct timespec'). Information about the time zone is returned in - the structure pointed at TZP. If the TZP argument is a null - pointer, time zone information is ignored. + int v = a < 1.0; - The return value is `0' on success and `-1' on failure. The - following `errno' error condition is defined for this function: +will raise an exception if A is NaN. (This does _not_ happen with `==' +and `!='; those merely return false and true, respectively, when NaN is +examined.) Frequently this exception is undesirable. ISO C99 +therefore defines comparison functions that do not raise exceptions +when NaN is examined. All of the functions are implemented as macros +which allow their arguments to be of any floating-point type. The +macros are guaranteed to evaluate their arguments only once. - `ENOSYS' - The operating system does not support getting time zone - information, and TZP is not a null pointer. The GNU - operating system does not support using `struct timezone' to - represent time zone information; that is an obsolete feature - of 4.3 BSD. Instead, use the facilities described in *Note - Time Zone Functions::. + - Macro: int isgreater (_real-floating_ X, _real-floating_ Y) + This macro determines whether the argument X is greater than Y. + It is equivalent to `(X) > (Y)', but no exception is raised if X + or Y are NaN. - - Function: int settimeofday (const struct timeval *TP, const struct - timezone *TZP) - The `settimeofday' function sets the current calendar time in the - system clock according to the arguments. As for `gettimeofday', - the calendar time is represented as the elapsed time since the - epoch. As for `gettimeofday', time zone information is ignored if - TZP is a null pointer. + - Macro: int isgreaterequal (_real-floating_ X, _real-floating_ Y) + This macro determines whether the argument X is greater than or + equal to Y. It is equivalent to `(X) >= (Y)', but no exception is + raised if X or Y are NaN. - You must be a privileged user in order to use `settimeofday'. + - Macro: int isless (_real-floating_ X, _real-floating_ Y) + This macro determines whether the argument X is less than Y. It + is equivalent to `(X) < (Y)', but no exception is raised if X or Y + are NaN. - Some kernels automatically set the system clock from some source - such as a hardware clock when they start up. Others, including - Linux, place the system clock in an "invalid" state (in which - attempts to read the clock fail). A call of `stime' removes the - system clock from an invalid state, and system startup scripts - typically run a program that calls `stime'. + - Macro: int islessequal (_real-floating_ X, _real-floating_ Y) + This macro determines whether the argument X is less than or equal + to Y. It is equivalent to `(X) <= (Y)', but no exception is + raised if X or Y are NaN. - `settimeofday' causes a sudden jump forwards or backwards, which - can cause a variety of problems in a system. Use `adjtime' (below) - to make a smooth transition from one time to another by temporarily - speeding up or slowing down the clock. + - Macro: int islessgreater (_real-floating_ X, _real-floating_ Y) + This macro determines whether the argument X is less or greater + than Y. It is equivalent to `(X) < (Y) || (X) > (Y)' (although it + only evaluates X and Y once), but no exception is raised if X or Y + are NaN. - With a Linux kernel, `adjtimex' does the same thing and can also - make permanent changes to the speed of the system clock so it - doesn't need to be corrected as often. + This macro is not equivalent to `X != Y', because that expression + is true if X or Y are NaN. - The return value is `0' on success and `-1' on failure. The - following `errno' error conditions are defined for this function: + - Macro: int isunordered (_real-floating_ X, _real-floating_ Y) + This macro determines whether its arguments are unordered. In + other words, it is true if X or Y are NaN, and false otherwise. - `EPERM' - This process cannot set the clock because it is not - privileged. + Not all machines provide hardware support for these operations. On +machines that don't, the macros can be very slow. Therefore, you should +not use these functions when NaN is not a concern. - `ENOSYS' - The operating system does not support setting time zone - information, and TZP is not a null pointer. + *Note:* There are no macros `isequal' or `isunequal'. They are +unnecessary, because the `==' and `!=' operators do _not_ throw an +exception if one or both of the operands are NaN. - - Function: int adjtime (const struct timeval *DELTA, struct timeval - *OLDDELTA) - This function speeds up or slows down the system clock in order to - make a gradual adjustment. This ensures that the calendar time - reported by the system clock is always monotonically increasing, - which might not happen if you simply set the clock. + +File: libc.info, Node: Misc FP Arithmetic, Prev: FP Comparison Functions, Up: Arithmetic Functions - The DELTA argument specifies a relative adjustment to be made to - the clock time. If negative, the system clock is slowed down for a - while until it has lost this much elapsed time. If positive, the - system clock is speeded up for a while. +Miscellaneous FP arithmetic functions +------------------------------------- - If the OLDDELTA argument is not a null pointer, the `adjtime' - function returns information about any previous time adjustment - that has not yet completed. + The functions in this section perform miscellaneous but common +operations that are awkward to express with C operators. On some +processors these functions can use special machine instructions to +perform these operations faster than the equivalent C code. - This function is typically used to synchronize the clocks of - computers in a local network. You must be a privileged user to - use it. + - Function: double fmin (double X, double Y) + - Function: float fminf (float X, float Y) + - Function: long double fminl (long double X, long double Y) + The `fmin' function returns the lesser of the two values X and Y. + It is similar to the expression + ((x) < (y) ? (x) : (y)) + except that X and Y are only evaluated once. - With a Linux kernel, you can use the `adjtimex' function to - permanently change the clock speed. + If an argument is NaN, the other argument is returned. If both + arguments are NaN, NaN is returned. - The return value is `0' on success and `-1' on failure. The - following `errno' error condition is defined for this function: + - Function: double fmax (double X, double Y) + - Function: float fmaxf (float X, float Y) + - Function: long double fmaxl (long double X, long double Y) + The `fmax' function returns the greater of the two values X and Y. - `EPERM' - You do not have privilege to set the time. + If an argument is NaN, the other argument is returned. If both + arguments are NaN, NaN is returned. - *Portability Note:* The `gettimeofday', `settimeofday', and -`adjtime' functions are derived from BSD. + - Function: double fdim (double X, double Y) + - Function: float fdimf (float X, float Y) + - Function: long double fdiml (long double X, long double Y) + The `fdim' function returns the positive difference between X and + Y. The positive difference is X - Y if X is greater than Y, and 0 + otherwise. - Symbols for the following function are declared in `sys/timex.h'. + If X, Y, or both are NaN, NaN is returned. - - Function: int adjtimex (struct timex *TIMEX) - `adjtimex' is functionally identical to `ntp_adjtime'. *Note High - Accuracy Clock::. + - Function: double fma (double X, double Y, double Z) + - Function: float fmaf (float X, float Y, float Z) + - Function: long double fmal (long double X, long double Y, long + double Z) + The `fma' function performs floating-point multiply-add. This is + the operation (X * Y) + Z, but the intermediate result is not + rounded to the destination type. This can sometimes improve the + precision of a calculation. - This function is present only with a Linux kernel. + This function was introduced because some processors have a special + instruction to perform multiply-add. The C compiler cannot use it + directly, because the expression `x*y + z' is defined to round the + intermediate result. `fma' lets you choose when you want to round + only once. + On processors which do not implement multiply-add in hardware, + `fma' can be very slow since it must avoid intermediate rounding. + `math.h' defines the symbols `FP_FAST_FMA', `FP_FAST_FMAF', and + `FP_FAST_FMAL' when the corresponding version of `fma' is no + slower than the expression `x*y + z'. In the GNU C library, this + always means the operation is implemented in hardware.  -File: libc.info, Node: Broken-down Time, Next: High Accuracy Clock, Prev: High-Resolution Calendar, Up: Calendar Time +File: libc.info, Node: Complex Numbers, Next: Operations on Complex, Prev: Arithmetic Functions, Up: Arithmetic -Broken-down Time ----------------- +Complex Numbers +=============== - Calendar time is represented by the usual GNU C library functions as -an elapsed time since a fixed base calendar time. This is convenient -for computation, but has no relation to the way people normally think of -calendar time. By contrast, "broken-down time" is a binary -representation of calendar time separated into year, month, day, and so -on. Broken-down time values are not useful for calculations, but they -are useful for printing human readable time information. + ISO C99 introduces support for complex numbers in C. This is done +with a new type qualifier, `complex'. It is a keyword if and only if +`complex.h' has been included. There are three complex types, +corresponding to the three real types: `float complex', `double +complex', and `long double complex'. - A broken-down time value is always relative to a choice of time -zone, and it also indicates which time zone that is. + To construct complex numbers you need a way to indicate the imaginary +part of a number. There is no standard notation for an imaginary +floating point constant. Instead, `complex.h' defines two macros that +can be used to create complex numbers. - The symbols in this section are declared in the header file `time.h'. + - Macro: const float complex _Complex_I + This macro is a representation of the complex number "0+1i". + Multiplying a real floating-point value by `_Complex_I' gives a + complex number whose value is purely imaginary. You can use this + to construct complex constants: - - Data Type: struct tm - This is the data type used to represent a broken-down time. The - structure contains at least the following members, which can - appear in any order. + 3.0 + 4.0i = `3.0 + 4.0 * _Complex_I' - `int tm_sec' - This is the number of full seconds since the top of the - minute (normally in the range `0' through `59', but the - actual upper limit is `60', to allow for leap seconds if leap - second support is available). + Note that `_Complex_I * _Complex_I' has the value `-1', but the + type of that value is `complex'. - `int tm_min' - This is the number of full minutes since the top of the hour - (in the range `0' through `59'). +`_Complex_I' is a bit of a mouthful. `complex.h' also defines a +shorter name for the same constant. - `int tm_hour' - This is the number of full hours past midnight (in the range - `0' through `23'). + - Macro: const float complex I + This macro has exactly the same value as `_Complex_I'. Most of the + time it is preferable. However, it causes problems if you want to + use the identifier `I' for something else. You can safely write - `int tm_mday' - This is the ordinal day of the month (in the range `1' - through `31'). Watch out for this one! As the only ordinal - number in the structure, it is inconsistent with the rest of - the structure. + #include + #undef I - `int tm_mon' - This is the number of full calendar months since the - beginning of the year (in the range `0' through `11'). Watch - out for this one! People usually use ordinal numbers for - month-of-year (where January = 1). + if you need `I' for your own purposes. (In that case we recommend + you also define some other short name for `_Complex_I', such as + `J'.) - `int tm_year' - This is the number of full calendar years since 1900. - `int tm_wday' - This is the number of full days since Sunday (in the range - `0' through `6'). + +File: libc.info, Node: Operations on Complex, Next: Parsing of Numbers, Prev: Complex Numbers, Up: Arithmetic - `int tm_yday' - This is the number of full days since the beginning of the - year (in the range `0' through `365'). +Projections, Conjugates, and Decomposing of Complex Numbers +=========================================================== - `int tm_isdst' - This is a flag that indicates whether Daylight Saving Time is - (or was, or will be) in effect at the time described. The - value is positive if Daylight Saving Time is in effect, zero - if it is not, and negative if the information is not - available. + ISO C99 also defines functions that perform basic operations on +complex numbers, such as decomposition and conjugation. The prototypes +for all these functions are in `complex.h'. All functions are +available in three variants, one for each of the three complex types. - `long int tm_gmtoff' - This field describes the time zone that was used to compute - this broken-down time value, including any adjustment for - daylight saving; it is the number of seconds that you must - add to UTC to get local time. You can also think of this as - the number of seconds east of UTC. For example, for U.S. - Eastern Standard Time, the value is `-5*60*60'. The - `tm_gmtoff' field is derived from BSD and is a GNU library - extension; it is not visible in a strict ISO C environment. + - Function: double creal (complex double Z) + - Function: float crealf (complex float Z) + - Function: long double creall (complex long double Z) + These functions return the real part of the complex number Z. - `const char *tm_zone' - This field is the name for the time zone that was used to - compute this broken-down time value. Like `tm_gmtoff', this - field is a BSD and GNU extension, and is not visible in a - strict ISO C environment. + - Function: double cimag (complex double Z) + - Function: float cimagf (complex float Z) + - Function: long double cimagl (complex long double Z) + These functions return the imaginary part of the complex number Z. - - Function: struct tm * localtime (const time_t *TIME) - The `localtime' function converts the simple time pointed to by - TIME to broken-down time representation, expressed relative to the - user's specified time zone. + - Function: complex double conj (complex double Z) + - Function: complex float conjf (complex float Z) + - Function: complex long double conjl (complex long double Z) + These functions return the conjugate value of the complex number + Z. The conjugate of a complex number has the same real part and a + negated imaginary part. In other words, `conj(a + bi) = a + -bi'. - The return value is a pointer to a static broken-down time - structure, which might be overwritten by subsequent calls to - `ctime', `gmtime', or `localtime'. (But no other library function - overwrites the contents of this object.) + - Function: double carg (complex double Z) + - Function: float cargf (complex float Z) + - Function: long double cargl (complex long double Z) + These functions return the argument of the complex number Z. The + argument of a complex number is the angle in the complex plane + between the positive real axis and a line passing through zero and + the number. This angle is measured in the usual fashion and + ranges from 0 to 2pi. - The return value is the null pointer if TIME cannot be represented - as a broken-down time; typically this is because the year cannot - fit into an `int'. + `carg' has a branch cut along the positive real axis. - Calling `localtime' has one other effect: it sets the variable - `tzname' with information about the current time zone. *Note Time - Zone Functions::. + - Function: complex double cproj (complex double Z) + - Function: complex float cprojf (complex float Z) + - Function: complex long double cprojl (complex long double Z) + These functions return the projection of the complex value Z onto + the Riemann sphere. Values with a infinite imaginary part are + projected to positive infinity on the real axis, even if the real + part is NaN. If the real part is infinite, the result is + equivalent to - Using the `localtime' function is a big problem in multi-threaded -programs. The result is returned in a static buffer and this is used in -all threads. POSIX.1c introduced a variant of this function. + INFINITY + I * copysign (0.0, cimag (z)) - - Function: struct tm * localtime_r (const time_t *TIME, struct tm - *RESULTP) - The `localtime_r' function works just like the `localtime' - function. It takes a pointer to a variable containing a simple - time and converts it to the broken-down time format. + +File: libc.info, Node: Parsing of Numbers, Next: System V Number Conversion, Prev: Operations on Complex, Up: Arithmetic - But the result is not placed in a static buffer. Instead it is - placed in the object of type `struct tm' to which the parameter - RESULTP points. +Parsing of Numbers +================== - If the conversion is successful the function returns a pointer to - the object the result was written into, i.e., it returns RESULTP. + This section describes functions for "reading" integer and +floating-point numbers from a string. It may be more convenient in some +cases to use `sscanf' or one of the related functions; see *Note +Formatted Input::. But often you can make a program more robust by +finding the tokens in the string by hand, then converting the numbers +one by one. - - Function: struct tm * gmtime (const time_t *TIME) - This function is similar to `localtime', except that the - broken-down time is expressed as Coordinated Universal Time (UTC) - (formerly called Greenwich Mean Time (GMT)) rather than relative - to a local time zone. +* Menu: +* Parsing of Integers:: Functions for conversion of integer values. +* Parsing of Floats:: Functions for conversion of floating-point + values. - As for the `localtime' function we have the problem that the result -is placed in a static variable. POSIX.1c also provides a replacement -for `gmtime'. + +File: libc.info, Node: Parsing of Integers, Next: Parsing of Floats, Up: Parsing of Numbers - - Function: struct tm * gmtime_r (const time_t *TIME, struct tm - *RESULTP) - This function is similar to `localtime_r', except that it converts - just like `gmtime' the given time as Coordinated Universal Time. +Parsing of Integers +------------------- - If the conversion is successful the function returns a pointer to - the object the result was written into, i.e., it returns RESULTP. + The `str' functions are declared in `stdlib.h' and those beginning +with `wcs' are declared in `wchar.h'. One might wonder about the use +of `restrict' in the prototypes of the functions in this section. It +is seemingly useless but the ISO C standard uses it (for the functions +defined there) so we have to do it as well. - - Function: time_t mktime (struct tm *BROKENTIME) - The `mktime' function is used to convert a broken-down time - structure to a simple time representation. It also "normalizes" - the contents of the broken-down time structure, by filling in the - day of week and day of year based on the other date and time - components. + - Function: long int strtol (const char *restrict STRING, char + **restrict TAILPTR, int BASE) + The `strtol' ("string-to-long") function converts the initial part + of STRING to a signed integer, which is returned as a value of + type `long int'. - The `mktime' function ignores the specified contents of the - `tm_wday' and `tm_yday' members of the broken-down time structure. - It uses the values of the other components to determine the - calendar time; it's permissible for these components to have - unnormalized values outside their normal ranges. The last thing - that `mktime' does is adjust the components of the BROKENTIME - structure (including the `tm_wday' and `tm_yday'). + This function attempts to decompose STRING as follows: - If the specified broken-down time cannot be represented as a - simple time, `mktime' returns a value of `(time_t)(-1)' and does - not modify the contents of BROKENTIME. + * A (possibly empty) sequence of whitespace characters. Which + characters are whitespace is determined by the `isspace' + function (*note Classification of Characters::). These are + discarded. - Calling `mktime' also sets the variable `tzname' with information - about the current time zone. *Note Time Zone Functions::. + * An optional plus or minus sign (`+' or `-'). - - Function: time_t timelocal (struct tm *BROKENTIME) - `timelocal' is functionally identical to `mktime', but more - mnemonically named. Note that it is the inverse of the `localtime' - function. + * A nonempty sequence of digits in the radix specified by BASE. - *Portability note:* `mktime' is essentially universally - available. `timelocal' is rather rare. + If BASE is zero, decimal radix is assumed unless the series of + digits begins with `0' (specifying octal radix), or `0x' or + `0X' (specifying hexadecimal radix); in other words, the same + syntax used for integer constants in C. + Otherwise BASE must have a value between `2' and `36'. If + BASE is `16', the digits may optionally be preceded by `0x' + or `0X'. If base has no legal value the value returned is + `0l' and the global variable `errno' is set to `EINVAL'. - - Function: time_t timegm (struct tm *BROKENTIME) - `timegm' is functionally identical to `mktime' except it always - takes the input values to be Coordinated Universal Time (UTC) - regardless of any local time zone setting. + * Any remaining characters in the string. If TAILPTR is not a + null pointer, `strtol' stores a pointer to this tail in + `*TAILPTR'. - Note that `timegm' is the inverse of `gmtime'. + If the string is empty, contains only whitespace, or does not + contain an initial substring that has the expected syntax for an + integer in the specified BASE, no conversion is performed. In + this case, `strtol' returns a value of zero and the value stored in + `*TAILPTR' is the value of STRING. - *Portability note:* `mktime' is essentially universally - available. `timegm' is rather rare. For the most portable - conversion from a UTC broken-down time to a simple time, set the - `TZ' environment variable to UTC, call `mktime', then set `TZ' - back. + In a locale other than the standard `"C"' locale, this function + may recognize additional implementation-dependent syntax. + If the string has valid syntax for an integer but the value is not + representable because of overflow, `strtol' returns either + `LONG_MAX' or `LONG_MIN' (*note Range of Type::), as appropriate + for the sign of the value. It also sets `errno' to `ERANGE' to + indicate there was overflow. - -File: libc.info, Node: High Accuracy Clock, Next: Formatting Calendar Time, Prev: Broken-down Time, Up: Calendar Time + You should not check for errors by examining the return value of + `strtol', because the string might be a valid representation of + `0l', `LONG_MAX', or `LONG_MIN'. Instead, check whether TAILPTR + points to what you expect after the number (e.g. `'\0'' if the + string should end after the number). You also need to clear ERRNO + before the call and check it afterward, in case there was overflow. -High Accuracy Clock -------------------- + There is an example at the end of this section. - The `ntp_gettime' and `ntp_adjtime' functions provide an interface -to monitor and manipulate the system clock to maintain high accuracy -time. For example, you can fine tune the speed of the clock or -synchronize it with another time source. + - Function: long int wcstol (const wchar_t *restrict STRING, wchar_t + **restrict TAILPTR, int BASE) + The `wcstol' function is equivalent to the `strtol' function in + nearly all aspects but handles wide character strings. - A typical use of these functions is by a server implementing the -Network Time Protocol to synchronize the clocks of multiple systems and -high precision clocks. + The `wcstol' function was introduced in Amendment 1 of ISO C90. - These functions are declared in `sys/timex.h'. + - Function: unsigned long int strtoul (const char *retrict STRING, + char **restrict TAILPTR, int BASE) + The `strtoul' ("string-to-unsigned-long") function is like + `strtol' except it converts to an `unsigned long int' value. The + syntax is the same as described above for `strtol'. The value + returned on overflow is `ULONG_MAX' (*note Range of Type::). - - Data Type: struct ntptimeval - This structure is used for information about the system clock. It - contains the following members: - `struct timeval time' - This is the current calendar time, expressed as the elapsed - time since the epoch. The `struct timeval' data type is - described in *Note Elapsed Time::. + If STRING depicts a negative number, `strtoul' acts the same as + STRTOL but casts the result to an unsigned integer. That means + for example that `strtoul' on `"-1"' returns `ULONG_MAX' and an + input more negative than `LONG_MIN' returns (`ULONG_MAX' + 1) / 2. - `long int maxerror' - This is the maximum error, measured in microseconds. Unless - updated via `ntp_adjtime' periodically, this value will reach - some platform-specific maximum value. + `strtoul' sets ERRNO to `EINVAL' if BASE is out of range, or + `ERANGE' on overflow. - `long int esterror' - This is the estimated error, measured in microseconds. This - value can be set by `ntp_adjtime' to indicate the estimated - offset of the system clock from the true calendar time. + - Function: unsigned long int wcstoul (const wchar_t *restrict STRING, + wchar_t **restrict TAILPTR, int BASE) + The `wcstoul' function is equivalent to the `strtoul' function in + nearly all aspects but handles wide character strings. - - Function: int ntp_gettime (struct ntptimeval *TPTR) - The `ntp_gettime' function sets the structure pointed to by TPTR - to current values. The elements of the structure afterwards - contain the values the timer implementation in the kernel assumes. - They might or might not be correct. If they are not a - `ntp_adjtime' call is necessary. + The `wcstoul' function was introduced in Amendment 1 of ISO C90. - The return value is `0' on success and other values on failure. - The following `errno' error conditions are defined for this - function: + - Function: long long int strtoll (const char *restrict STRING, char + **restrict TAILPTR, int BASE) + The `strtoll' function is like `strtol' except that it returns a + `long long int' value, and accepts numbers with a correspondingly + larger range. - `TIME_ERROR' - The precision clock model is not properly set up at the - moment, thus the clock must be considered unsynchronized, and - the values should be treated with care. + If the string has valid syntax for an integer but the value is not + representable because of overflow, `strtoll' returns either + `LONG_LONG_MAX' or `LONG_LONG_MIN' (*note Range of Type::), as + appropriate for the sign of the value. It also sets `errno' to + `ERANGE' to indicate there was overflow. - - Data Type: struct timex - This structure is used to control and monitor the system clock. It - contains the following members: - `unsigned int modes' - This variable controls whether and which values are set. - Several symbolic constants have to be combined with _binary - or_ to specify the effective mode. These constants start - with `MOD_'. + The `strtoll' function was introduced in ISO C99. - `long int offset' - This value indicates the current offset of the system clock - from the true calendar time. The value is given in - microseconds. If bit `MOD_OFFSET' is set in `modes', the - offset (and possibly other dependent values) can be set. The - offset's absolute value must not exceed `MAXPHASE'. + - Function: long long int wcstoll (const wchar_t *restrict STRING, + wchar_t **restrict TAILPTR, int BASE) + The `wcstoll' function is equivalent to the `strtoll' function in + nearly all aspects but handles wide character strings. - `long int frequency' - This value indicates the difference in frequency between the - true calendar time and the system clock. The value is - expressed as scaled PPM (parts per million, 0.0001%). The - scaling is `1 << SHIFT_USEC'. The value can be set with bit - `MOD_FREQUENCY', but the absolute value must not exceed - `MAXFREQ'. + The `wcstoll' function was introduced in Amendment 1 of ISO C90. - `long int maxerror' - This is the maximum error, measured in microseconds. A new - value can be set using bit `MOD_MAXERROR'. Unless updated via - `ntp_adjtime' periodically, this value will increase steadily - and reach some platform-specific maximum value. + - Function: long long int strtoq (const char *restrict STRING, char + **restrict TAILPTR, int BASE) + `strtoq' ("string-to-quad-word") is the BSD name for `strtoll'. - `long int esterror' - This is the estimated error, measured in microseconds. This - value can be set using bit `MOD_ESTERROR'. + - Function: long long int wcstoq (const wchar_t *restrict STRING, + wchar_t **restrict TAILPTR, int BASE) + The `wcstoq' function is equivalent to the `strtoq' function in + nearly all aspects but handles wide character strings. - `int status' - This variable reflects the various states of the clock - machinery. There are symbolic constants for the significant - bits, starting with `STA_'. Some of these flags can be - updated using the `MOD_STATUS' bit. + The `wcstoq' function is a GNU extension. - `long int constant' - This value represents the bandwidth or stiffness of the PLL - (phase locked loop) implemented in the kernel. The value can - be changed using bit `MOD_TIMECONST'. + - Function: unsigned long long int strtoull (const char *restrict + STRING, char **restrict TAILPTR, int BASE) + The `strtoull' function is related to `strtoll' the same way + `strtoul' is related to `strtol'. - `long int precision' - This value represents the accuracy or the maximum error when - reading the system clock. The value is expressed in - microseconds. + The `strtoull' function was introduced in ISO C99. - `long int tolerance' - This value represents the maximum frequency error of the - system clock in scaled PPM. This value is used to increase - the `maxerror' every second. + - Function: unsigned long long int wcstoull (const wchar_t *restrict + STRING, wchar_t **restrict TAILPTR, int BASE) + The `wcstoull' function is equivalent to the `strtoull' function + in nearly all aspects but handles wide character strings. - `struct timeval time' - The current calendar time. + The `wcstoull' function was introduced in Amendment 1 of ISO C90. - `long int tick' - The elapsed time between clock ticks in microseconds. A - clock tick is a periodic timer interrupt on which the system - clock is based. + - Function: unsigned long long int strtouq (const char *restrict + STRING, char **restrict TAILPTR, int BASE) + `strtouq' is the BSD name for `strtoull'. - `long int ppsfreq' - This is the first of a few optional variables that are - present only if the system clock can use a PPS (pulse per - second) signal to discipline the system clock. The value is - expressed in scaled PPM and it denotes the difference in - frequency between the system clock and the PPS signal. + - Function: unsigned long long int wcstouq (const wchar_t *restrict + STRING, wchar_t **restrict TAILPTR, int BASE) + The `wcstouq' function is equivalent to the `strtouq' function in + nearly all aspects but handles wide character strings. - `long int jitter' - This value expresses a median filtered average of the PPS - signal's dispersion in microseconds. + The `wcstoq' function is a GNU extension. - `int shift' - This value is a binary exponent for the duration of the PPS - calibration interval, ranging from `PPS_SHIFT' to - `PPS_SHIFTMAX'. + - Function: intmax_t strtoimax (const char *restrict STRING, char + **restrict TAILPTR, int BASE) + The `strtoimax' function is like `strtol' except that it returns a + `intmax_t' value, and accepts numbers of a corresponding range. - `long int stabil' - This value represents the median filtered dispersion of the - PPS frequency in scaled PPM. + If the string has valid syntax for an integer but the value is not + representable because of overflow, `strtoimax' returns either + `INTMAX_MAX' or `INTMAX_MIN' (*note Integers::), as appropriate + for the sign of the value. It also sets `errno' to `ERANGE' to + indicate there was overflow. - `long int jitcnt' - This counter represents the number of pulses where the jitter - exceeded the allowed maximum `MAXTIME'. + See *Note Integers:: for a description of the `intmax_t' type. The + `strtoimax' function was introduced in ISO C99. - `long int calcnt' - This counter reflects the number of successful calibration - intervals. + - Function: intmax_t wcstoimax (const wchar_t *restrict STRING, + wchar_t **restrict TAILPTR, int BASE) + The `wcstoimax' function is equivalent to the `strtoimax' function + in nearly all aspects but handles wide character strings. - `long int errcnt' - This counter represents the number of calibration errors - (caused by large offsets or jitter). + The `wcstoimax' function was introduced in ISO C99. - `long int stbcnt' - This counter denotes the number of of calibrations where the - stability exceeded the threshold. + - Function: uintmax_t strtoumax (const char *restrict STRING, char + **restrict TAILPTR, int BASE) + The `strtoumax' function is related to `strtoimax' the same way + that `strtoul' is related to `strtol'. - - Function: int ntp_adjtime (struct timex *TPTR) - The `ntp_adjtime' function sets the structure specified by TPTR to - current values. + See *Note Integers:: for a description of the `intmax_t' type. The + `strtoumax' function was introduced in ISO C99. - In addition, `ntp_adjtime' updates some settings to match what you - pass to it in *TPTR. Use the `modes' element of *TPTR to select - what settings to update. You can set `offset', `freq', - `maxerror', `esterror', `status', `constant', and `tick'. + - Function: uintmax_t wcstoumax (const wchar_t *restrict STRING, + wchar_t **restrict TAILPTR, int BASE) + The `wcstoumax' function is equivalent to the `strtoumax' function + in nearly all aspects but handles wide character strings. - `modes' = zero means set nothing. + The `wcstoumax' function was introduced in ISO C99. - Only the superuser can update settings. + - Function: long int atol (const char *STRING) + This function is similar to the `strtol' function with a BASE + argument of `10', except that it need not detect overflow errors. + The `atol' function is provided mostly for compatibility with + existing code; using `strtol' is more robust. - The return value is `0' on success and other values on failure. - The following `errno' error conditions are defined for this - function: + - Function: int atoi (const char *STRING) + This function is like `atol', except that it returns an `int'. + The `atoi' function is also considered obsolete; use `strtol' + instead. - `TIME_ERROR' - The high accuracy clock model is not properly set up at the - moment, thus the clock must be considered unsynchronized, and - the values should be treated with care. Another reason could - be that the specified new values are not allowed. + - Function: long long int atoll (const char *STRING) + This function is similar to `atol', except it returns a `long long + int'. - `EPERM' - The process specified a settings update, but is not superuser. + The `atoll' function was introduced in ISO C99. It too is + obsolete (despite having just been added); use `strtoll' instead. - For more details see RFC1305 (Network Time Protocol, Version 3) and - related documents. + All the functions mentioned in this section so far do not handle +alternative representations of characters as described in the locale +data. Some locales specify thousands separator and the way they have to +be used which can help to make large numbers more readable. To read +such numbers one has to use the `scanf' functions with the `'' flag. - *Portability note:* Early versions of the GNU C library did not - have this function but did have the synonymous `adjtimex'. + Here is a function which parses a string as a sequence of integers +and returns the sum of them: + int + sum_ints_from_string (char *string) + { + int sum = 0; + + while (1) { + char *tail; + int next; + + /* Skip whitespace by hand, to detect the end. */ + while (isspace (*string)) string++; + if (*string == 0) + break; + + /* There is more nonwhitespace, */ + /* so it ought to be another number. */ + errno = 0; + /* Parse it. */ + next = strtol (string, &tail, 0); + /* Add it in, if not overflow. */ + if (errno) + printf ("Overflow\n"); + else + sum += next; + /* Advance past it. */ + string = tail; + } + + return sum; + } diff -durpN glibc-2.2.4/manual/libc.info-35 glibc-2.2.5/manual/libc.info-35 --- glibc-2.2.4/manual/libc.info-35 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-35 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1211 +33,1136 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Formatting Calendar Time, Next: Parsing Date and Time, Prev: High Accuracy Clock, Up: Calendar Time - -Formatting Calendar Time ------------------------- - - The functions described in this section format calendar time values -as strings. These functions are declared in the header file `time.h'. - - - Function: char * asctime (const struct tm *BROKENTIME) - The `asctime' function converts the broken-down time value that - BROKENTIME points to into a string in a standard format: - - "Tue May 21 13:46:22 1991\n" - - The abbreviations for the days of week are: `Sun', `Mon', `Tue', - `Wed', `Thu', `Fri', and `Sat'. - - The abbreviations for the months are: `Jan', `Feb', `Mar', `Apr', - `May', `Jun', `Jul', `Aug', `Sep', `Oct', `Nov', and `Dec'. - - The return value points to a statically allocated string, which - might be overwritten by subsequent calls to `asctime' or `ctime'. - (But no other library function overwrites the contents of this - string.) +File: libc.info, Node: Parsing of Floats, Prev: Parsing of Integers, Up: Parsing of Numbers - - Function: char * asctime_r (const struct tm *BROKENTIME, char - *BUFFER) - This function is similar to `asctime' but instead of placing the - result in a static buffer it writes the string in the buffer - pointed to by the parameter BUFFER. This buffer should have room - for at least 26 bytes, including the terminating null. +Parsing of Floats +----------------- - If no error occurred the function returns a pointer to the string - the result was written into, i.e., it returns BUFFER. Otherwise - return `NULL'. + The `str' functions are declared in `stdlib.h' and those beginning +with `wcs' are declared in `wchar.h'. One might wonder about the use +of `restrict' in the prototypes of the functions in this section. It +is seemingly useless but the ISO C standard uses it (for the functions +defined there) so we have to do it as well. - - Function: char * ctime (const time_t *TIME) - The `ctime' function is similar to `asctime', except that you - specify the calendar time argument as a `time_t' simple time value - rather than in broken-down local time format. It is equivalent to + - Function: double strtod (const char *restrict STRING, char + **restrict TAILPTR) + The `strtod' ("string-to-double") function converts the initial + part of STRING to a floating-point number, which is returned as a + value of type `double'. - asctime (localtime (TIME)) + This function attempts to decompose STRING as follows: - `ctime' sets the variable `tzname', because `localtime' does so. - *Note Time Zone Functions::. + * A (possibly empty) sequence of whitespace characters. Which + characters are whitespace is determined by the `isspace' + function (*note Classification of Characters::). These are + discarded. - - Function: char * ctime_r (const time_t *TIME, char *BUFFER) - This function is similar to `ctime', but places the result in the - string pointed to by BUFFER. It is equivalent to (written using - gcc extensions, *note Statement Exprs: (gcc)Statement Exprs.): + * An optional plus or minus sign (`+' or `-'). - ({ struct tm tm; asctime_r (localtime_r (time, &tm), buf); }) + * A floating point number in decimal or hexadecimal format. The + decimal format is: + - A nonempty sequence of digits optionally containing a + decimal-point character--normally `.', but it depends on + the locale (*note General Numeric::). - If no error occurred the function returns a pointer to the string - the result was written into, i.e., it returns BUFFER. Otherwise - return `NULL'. + - An optional exponent part, consisting of a character `e' + or `E', an optional sign, and a sequence of digits. - - Function: size_t strftime (char *S, size_t SIZE, const char - *TEMPLATE, const struct tm *BROKENTIME) - This function is similar to the `sprintf' function (*note - Formatted Input::), but the conversion specifications that can - appear in the format template TEMPLATE are specialized for - printing components of the date and time BROKENTIME according to - the locale currently specified for time conversion (*note - Locales::). - Ordinary characters appearing in the TEMPLATE are copied to the - output string S; this can include multibyte character sequences. - Conversion specifiers are introduced by a `%' character, followed - by an optional flag which can be one of the following. These flags - are all GNU extensions. The first three affect only the output of - numbers: + The hexadecimal format is as follows: + - A 0x or 0X followed by a nonempty sequence of + hexadecimal digits optionally containing a decimal-point + character--normally `.', but it depends on the locale + (*note General Numeric::). - `_' - The number is padded with spaces. + - An optional binary-exponent part, consisting of a + character `p' or `P', an optional sign, and a sequence + of digits. - `-' - The number is not padded at all. - `0' - The number is padded with zeros even if the format specifies - padding with spaces. + * Any remaining characters in the string. If TAILPTR is not a + null pointer, a pointer to this tail of the string is stored + in `*TAILPTR'. - `^' - The output uses uppercase characters, but only if this is - possible (*note Case Conversion::). + If the string is empty, contains only whitespace, or does not + contain an initial substring that has the expected syntax for a + floating-point number, no conversion is performed. In this case, + `strtod' returns a value of zero and the value returned in + `*TAILPTR' is the value of STRING. - The default action is to pad the number with zeros to keep it a - constant width. Numbers that do not have a range indicated below - are never padded, since there is no natural width for them. + In a locale other than the standard `"C"' or `"POSIX"' locales, + this function may recognize additional locale-dependent syntax. - Following the flag an optional specification of the width is - possible. This is specified in decimal notation. If the natural - size of the output is of the field has less than the specified - number of characters, the result is written right adjusted and - space padded to the given size. + If the string has valid syntax for a floating-point number but the + value is outside the range of a `double', `strtod' will signal + overflow or underflow as described in *Note Math Error Reporting::. - An optional modifier can follow the optional flag and width - specification. The modifiers, which are POSIX.2 extensions, are: + `strtod' recognizes four special input strings. The strings + `"inf"' and `"infinity"' are converted to oo, or to the largest + representable value if the floating-point format doesn't support + infinities. You can prepend a `"+"' or `"-"' to specify the sign. + Case is ignored when scanning these strings. - `E' - Use the locale's alternate representation for date and time. - This modifier applies to the `%c', `%C', `%x', `%X', `%y' and - `%Y' format specifiers. In a Japanese locale, for example, - `%Ex' might yield a date format based on the Japanese - Emperors' reigns. + The strings `"nan"' and `"nan(CHARS...)"' are converted to NaN. + Again, case is ignored. If CHARS... are provided, they are used + in some unspecified fashion to select a particular representation + of NaN (there can be several). - `O' - Use the locale's alternate numeric symbols for numbers. This - modifier applies only to numeric format specifiers. + Since zero is a valid result as well as the value returned on + error, you should check for errors in the same way as for + `strtol', by examining ERRNO and TAILPTR. - If the format supports the modifier but no alternate representation - is available, it is ignored. + - Function: float strtof (const char *STRING, char **TAILPTR) + - Function: long double strtold (const char *STRING, char **TAILPTR) + These functions are analogous to `strtod', but return `float' and + `long double' values respectively. They report errors in the same + way as `strtod'. `strtof' can be substantially faster than + `strtod', but has less precision; conversely, `strtold' can be + much slower but has more precision (on systems where `long double' + is a separate type). - The conversion specifier ends with a format specifier taken from - the following list. The whole `%' sequence is replaced in the - output string as follows: + These functions have been GNU extensions and are new to ISO C99. - `%a' - The abbreviated weekday name according to the current locale. + - Function: double wcstod (const wchar_t *restrict STRING, wchar_t + **restrict TAILPTR) + - Function: float wcstof (const wchar_t *STRING, wchar_t **TAILPTR) + - Function: long double wcstold (const wchar_t *STRING, wchar_t + **TAILPTR) + The `wcstod', `wcstof', and `wcstol' functions are equivalent in + nearly all aspect to the `strtod', `strtof', and `strtold' + functions but it handles wide character string. - `%A' - The full weekday name according to the current locale. + The `wcstod' function was introduced in Amendment 1 of ISO C90. + The `wcstof' and `wcstold' functions were introduced in ISO C99. - `%b' - The abbreviated month name according to the current locale. + - Function: double atof (const char *STRING) + This function is similar to the `strtod' function, except that it + need not detect overflow and underflow errors. The `atof' function + is provided mostly for compatibility with existing code; using + `strtod' is more robust. - `%B' - The full month name according to the current locale. + The GNU C library also provides `_l' versions of these functions, +which take an additional argument, the locale to use in conversion. +*Note Parsing of Integers::. - `%c' - The preferred calendar time representation for the current - locale. + +File: libc.info, Node: System V Number Conversion, Prev: Parsing of Numbers, Up: Arithmetic - `%C' - The century of the year. This is equivalent to the greatest - integer not greater than the year divided by 100. +Old-fashioned System V number-to-string functions +================================================= - This format is a POSIX.2 extension and also appears in - ISO C99. + The old System V C library provided three functions to convert +numbers to strings, with unusual and hard-to-use semantics. The GNU C +library also provides these functions and some natural extensions. - `%d' - The day of the month as a decimal number (range `01' through - `31'). + These functions are only available in glibc and on systems descended +from AT&T Unix. Therefore, unless these functions do precisely what you +need, it is better to use `sprintf', which is standard. - `%D' - The date using the format `%m/%d/%y'. + All these functions are defined in `stdlib.h'. - This format is a POSIX.2 extension and also appears in - ISO C99. + - Function: char * ecvt (double VALUE, int NDIGIT, int *DECPT, int + *NEG) + The function `ecvt' converts the floating-point number VALUE to a + string with at most NDIGIT decimal digits. The returned string + contains no decimal point or sign. The first digit of the string + is non-zero (unless VALUE is actually zero) and the last digit is + rounded to nearest. `*DECPT' is set to the index in the string of + the first digit after the decimal point. `*NEG' is set to a + nonzero value if VALUE is negative, zero otherwise. - `%e' - The day of the month like with `%d', but padded with blank - (range ` 1' through `31'). + If NDIGIT decimal digits would exceed the precision of a `double' + it is reduced to a system-specific value. - This format is a POSIX.2 extension and also appears in - ISO C99. + The returned string is statically allocated and overwritten by + each call to `ecvt'. - `%F' - The date using the format `%Y-%m-%d'. This is the form - specified in the ISO 8601 standard and is the preferred form - for all uses. + If VALUE is zero, it is implementation defined whether `*DECPT' is + `0' or `1'. - This format is a ISO C99 extension. + For example: `ecvt (12.3, 5, &d, &n)' returns `"12300"' and sets D + to `2' and N to `0'. - `%g' - The year corresponding to the ISO week number, but without - the century (range `00' through `99'). This has the same - format and value as `%y', except that if the ISO week number - (see `%V') belongs to the previous or next year, that year is - used instead. + - Function: char * fcvt (double VALUE, int NDIGIT, int *DECPT, int + *NEG) + The function `fcvt' is like `ecvt', but NDIGIT specifies the + number of digits after the decimal point. If NDIGIT is less than + zero, VALUE is rounded to the NDIGIT+1'th place to the left of the + decimal point. For example, if NDIGIT is `-1', VALUE will be + rounded to the nearest 10. If NDIGIT is negative and larger than + the number of digits to the left of the decimal point in VALUE, + VALUE will be rounded to one significant digit. - This format was introduced in ISO C99. + If NDIGIT decimal digits would exceed the precision of a `double' + it is reduced to a system-specific value. - `%G' - The year corresponding to the ISO week number. This has the - same format and value as `%Y', except that if the ISO week - number (see `%V') belongs to the previous or next year, that - year is used instead. + The returned string is statically allocated and overwritten by + each call to `fcvt'. - This format was introduced in ISO C99 but was previously - available as a GNU extension. + - Function: char * gcvt (double VALUE, int NDIGIT, char *BUF) + `gcvt' is functionally equivalent to `sprintf(buf, "%*g", ndigit, + value'. It is provided only for compatibility's sake. It returns + BUF. - `%h' - The abbreviated month name according to the current locale. - The action is the same as for `%b'. + If NDIGIT decimal digits would exceed the precision of a `double' + it is reduced to a system-specific value. - This format is a POSIX.2 extension and also appears in - ISO C99. + As extensions, the GNU C library provides versions of these three +functions that take `long double' arguments. - `%H' - The hour as a decimal number, using a 24-hour clock (range - `00' through `23'). + - Function: char * qecvt (long double VALUE, int NDIGIT, int *DECPT, + int *NEG) + This function is equivalent to `ecvt' except that it takes a `long + double' for the first parameter and that NDIGIT is restricted by + the precision of a `long double'. - `%I' - The hour as a decimal number, using a 12-hour clock (range - `01' through `12'). + - Function: char * qfcvt (long double VALUE, int NDIGIT, int *DECPT, + int *NEG) + This function is equivalent to `fcvt' except that it takes a `long + double' for the first parameter and that NDIGIT is restricted by + the precision of a `long double'. - `%j' - The day of the year as a decimal number (range `001' through - `366'). + - Function: char * qgcvt (long double VALUE, int NDIGIT, char *BUF) + This function is equivalent to `gcvt' except that it takes a `long + double' for the first parameter and that NDIGIT is restricted by + the precision of a `long double'. - `%k' - The hour as a decimal number, using a 24-hour clock like - `%H', but padded with blank (range ` 0' through `23'). + The `ecvt' and `fcvt' functions, and their `long double' +equivalents, all return a string located in a static buffer which is +overwritten by the next call to the function. The GNU C library +provides another set of extended functions which write the converted +string into a user-supplied buffer. These have the conventional `_r' +suffix. - This format is a GNU extension. + `gcvt_r' is not necessary, because `gcvt' already uses a +user-supplied buffer. - `%l' - The hour as a decimal number, using a 12-hour clock like - `%I', but padded with blank (range ` 1' through `12'). + - Function: char * ecvt_r (double VALUE, int NDIGIT, int *DECPT, int + *NEG, char *BUF, size_t LEN) + The `ecvt_r' function is the same as `ecvt', except that it places + its result into the user-specified buffer pointed to by BUF, with + length LEN. - This format is a GNU extension. + This function is a GNU extension. - `%m' - The month as a decimal number (range `01' through `12'). + - Function: char * fcvt_r (double VALUE, int NDIGIT, int *DECPT, int + *NEG, char *BUF, size_t LEN) + The `fcvt_r' function is the same as `fcvt', except that it places + its result into the user-specified buffer pointed to by BUF, with + length LEN. - `%M' - The minute as a decimal number (range `00' through `59'). + This function is a GNU extension. - `%n' - A single `\n' (newline) character. + - Function: char * qecvt_r (long double VALUE, int NDIGIT, int *DECPT, + int *NEG, char *BUF, size_t LEN) + The `qecvt_r' function is the same as `qecvt', except that it + places its result into the user-specified buffer pointed to by + BUF, with length LEN. - This format is a POSIX.2 extension and also appears in - ISO C99. + This function is a GNU extension. - `%p' - Either `AM' or `PM', according to the given time value; or the - corresponding strings for the current locale. Noon is - treated as `PM' and midnight as `AM'. + - Function: char * qfcvt_r (long double VALUE, int NDIGIT, int *DECPT, + int *NEG, char *BUF, size_t LEN) + The `qfcvt_r' function is the same as `qfcvt', except that it + places its result into the user-specified buffer pointed to by + BUF, with length LEN. - `%P' - Either `am' or `pm', according to the given time value; or the - corresponding strings for the current locale, printed in - lowercase characters. Noon is treated as `pm' and midnight - as `am'. + This function is a GNU extension. - This format was introduced in ISO C99 but was previously - available as a GNU extension. + +File: libc.info, Node: Date and Time, Next: Resource Usage And Limitation, Prev: Arithmetic, Up: Top - `%r' - The complete calendar time using the AM/PM format of the - current locale. +Date and Time +************* - This format is a POSIX.2 extension and also appears in - ISO C99. + This chapter describes functions for manipulating dates and times, +including functions for determining what time it is and conversion +between different time representations. - `%R' - The hour and minute in decimal numbers using the format - `%H:%M'. +* Menu: - This format was introduced in ISO C99 but was previously - available as a GNU extension. +* Time Basics:: Concepts and definitions. +* Elapsed Time:: Data types to represent elapsed times +* Processor And CPU Time:: Time a program has spent executing. +* Calendar Time:: Manipulation of ``real'' dates and times. +* Setting an Alarm:: Sending a signal after a specified time. +* Sleeping:: Waiting for a period of time. - `%s' - The number of seconds since the epoch, i.e., since 1970-01-01 - 00:00:00 UTC. Leap seconds are not counted unless leap - second support is available. + +File: libc.info, Node: Time Basics, Next: Elapsed Time, Up: Date and Time - This format is a GNU extension. +Time Basics +=========== - `%S' - The seconds as a decimal number (range `00' through `60'). + Discussing time in a technical manual can be difficult because the +word "time" in English refers to lots of different things. In this +manual, we use a rigorous terminology to avoid confusion, and the only +thing we use the simple word "time" for is to talk about the abstract +concept. - `%t' - A single `\t' (tabulator) character. + A "calendar time" is a point in the time continuum, for example +November 4, 1990 at 18:02.5 UTC. Sometimes this is called "absolute +time". - This format is a POSIX.2 extension and also appears in - ISO C99. + We don't speak of a "date", because that is inherent in a calendar +time. - `%T' - The time of day using decimal numbers using the format - `%H:%M:%S'. + An "interval" is a contiguous part of the time continuum between two +calendar times, for example the hour between 9:00 and 10:00 on July 4, +1980. - This format is a POSIX.2 extension. + An "elapsed time" is the length of an interval, for example, 35 +minutes. People sometimes sloppily use the word "interval" to refer to +the elapsed time of some interval. - `%u' - The day of the week as a decimal number (range `1' through - `7'), Monday being `1'. + An "amount of time" is a sum of elapsed times, which need not be of +any specific intervals. For example, the amount of time it takes to +read a book might be 9 hours, independently of when and in how many +sittings it is read. - This format is a POSIX.2 extension and also appears in - ISO C99. + A "period" is the elapsed time of an interval between two events, +especially when they are part of a sequence of regularly repeating +events. - `%U' - The week number of the current year as a decimal number - (range `00' through `53'), starting with the first Sunday as - the first day of the first week. Days preceding the first - Sunday in the year are considered to be in week `00'. + "CPU time" is like calendar time, except that it is based on the +subset of the time continuum when a particular process is actively +using a CPU. CPU time is, therefore, relative to a process. - `%V' - The ISO 8601:1988 week number as a decimal number (range `01' - through `53'). ISO weeks start with Monday and end with - Sunday. Week `01' of a year is the first week which has the - majority of its days in that year; this is equivalent to the - week containing the year's first Thursday, and it is also - equivalent to the week containing January 4. Week `01' of a - year can contain days from the previous year. The week - before week `01' of a year is the last week (`52' or `53') of - the previous year even if it contains days from the new year. + "Processor time" is an amount of time that a CPU is in use. In +fact, it's a basic system resource, since there's a limit to how much +can exist in any given interval (that limit is the elapsed time of the +interval times the number of CPUs in the processor). People often call +this CPU time, but we reserve the latter term in this manual for the +definition above. - This format is a POSIX.2 extension and also appears in - ISO C99. + +File: libc.info, Node: Elapsed Time, Next: Processor And CPU Time, Prev: Time Basics, Up: Date and Time - `%w' - The day of the week as a decimal number (range `0' through - `6'), Sunday being `0'. +Elapsed Time +============ - `%W' - The week number of the current year as a decimal number - (range `00' through `53'), starting with the first Monday as - the first day of the first week. All days preceding the - first Monday in the year are considered to be in week `00'. + One way to represent an elapsed time is with a simple arithmetic data +type, as with the following function to compute the elapsed time between +two calendar times. This function is declared in `time.h'. - `%x' - The preferred date representation for the current locale. + - Function: double difftime (time_t TIME1, time_t TIME0) + The `difftime' function returns the number of seconds of elapsed + time between calendar time TIME1 and calendar time TIME0, as a + value of type `double'. The difference ignores leap seconds + unless leap second support is enabled. - `%X' - The preferred time of day representation for the current - locale. + In the GNU system, you can simply subtract `time_t' values. But on + other systems, the `time_t' data type might use some other encoding + where subtraction doesn't work directly. - `%y' - The year without a century as a decimal number (range `00' - through `99'). This is equivalent to the year modulo 100. + The GNU C library provides two data types specifically for +representing an elapsed time. They are used by various GNU C library +functions, and you can use them for your own purposes too. They're +exactly the same except that one has a resolution in microseconds, and +the other, newer one, is in nanoseconds. - `%Y' - The year as a decimal number, using the Gregorian calendar. - Years before the year `1' are numbered `0', `-1', and so on. + - Data Type: struct timeval + The `struct timeval' structure represents an elapsed time. It is + declared in `sys/time.h' and has the following members: - `%z' - RFC 822/ISO 8601:1988 style numeric time zone (e.g., `-0600' - or `+0100'), or nothing if no time zone is determinable. + `long int tv_sec' + This represents the number of whole seconds of elapsed time. - This format was introduced in ISO C99 but was previously - available as a GNU extension. + `long int tv_usec' + This is the rest of the elapsed time (a fraction of a second), + represented as the number of microseconds. It is always less + than one million. - A full RFC 822 timestamp is generated by the format - `"%a, %d %b %Y %H:%M:%S %z"' (or the equivalent - `"%a, %d %b %Y %T %z"'). - `%Z' - The time zone abbreviation (empty if the time zone can't be - determined). + - Data Type: struct timespec + The `struct timespec' structure represents an elapsed time. It is + declared in `time.h' and has the following members: - `%%' - A literal `%' character. + `long int tv_sec' + This represents the number of whole seconds of elapsed time. - The SIZE parameter can be used to specify the maximum number of - characters to be stored in the array S, including the terminating - null character. If the formatted time requires more than SIZE - characters, `strftime' returns zero and the contents of the array - S are undefined. Otherwise the return value indicates the number - of characters placed in the array S, not including the terminating - null character. + `long int tv_nsec' + This is the rest of the elapsed time (a fraction of a second), + represented as the number of nanoseconds. It is always less + than one billion. - _Warning:_ This convention for the return value which is prescribed - in ISO C can lead to problems in some situations. For certain - format strings and certain locales the output really can be the - empty string and this cannot be discovered by testing the return - value only. E.g., in most locales the AM/PM time format is not - supported (most of the world uses the 24 hour time - representation). In such locales `"%p"' will return the empty - string, i.e., the return value is zero. To detect situations like - this something similar to the following code should be used: - buf[0] = '\1'; - len = strftime (buf, bufsize, format, tp); - if (len == 0 && buf[0] != '\0') - { - /* Something went wrong in the strftime call. */ - ... - } + It is often necessary to subtract two values of type +`struct timeval' or `struct timespec'. Here is the best way to do +this. It works even on some peculiar operating systems where the +`tv_sec' member has an unsigned type. - If S is a null pointer, `strftime' does not actually write - anything, but instead returns the number of characters it would - have written. + /* Subtract the `struct timeval' values X and Y, + storing the result in RESULT. + Return 1 if the difference is negative, otherwise 0. */ + + int + timeval_subtract (result, x, y) + struct timeval *result, *x, *y; + { + /* Perform the carry for the later subtraction by updating Y. */ + if (x->tv_usec < y->tv_usec) { + int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1; + y->tv_usec -= 1000000 * nsec; + y->tv_sec += nsec; + } + if (x->tv_usec - y->tv_usec > 1000000) { + int nsec = (x->tv_usec - y->tv_usec) / 1000000; + y->tv_usec += 1000000 * nsec; + y->tv_sec -= nsec; + } + + /* Compute the time remaining to wait. + `tv_usec' is certainly positive. */ + result->tv_sec = x->tv_sec - y->tv_sec; + result->tv_usec = x->tv_usec - y->tv_usec; + + /* Return 1 if result is negative. */ + return x->tv_sec < y->tv_sec; + } - According to POSIX.1 every call to `strftime' implies a call to - `tzset'. So the contents of the environment variable `TZ' is - examined before any output is produced. + Common functions that use `struct timeval' are `gettimeofday' and +`settimeofday'. - For an example of `strftime', see *Note Time Functions Example::. + There are no GNU C library functions specifically oriented toward +dealing with elapsed times, but the calendar time, processor time, and +alarm and sleeping functions have a lot to do with them. - - Function: size_t wcsftime (wchar_t *S, size_t SIZE, const wchar_t - *TEMPLATE, const struct tm *BROKENTIME) - The `wcsftime' function is equivalent to the `strftime' function - with the difference that it operates on wide character strings. - The buffer where the result is stored, pointed to by S, must be an - array of wide characters. The parameter SIZE which specifies the - size of the output buffer gives the number of wide character, not - the number of bytes. + +File: libc.info, Node: Processor And CPU Time, Next: Calendar Time, Prev: Elapsed Time, Up: Date and Time - Also the format string TEMPLATE is a wide character string. Since - all characters needed to specify the format string are in the basic - character set it is portably possible to write format strings in - the C source code using the `L"..."' notation. The parameter - BROKENTIME has the same meaning as in the `strftime' call. +Processor And CPU Time +====================== - The `wcsftime' function supports the same flags, modifiers, and - format specifiers as the `strftime' function. + If you're trying to optimize your program or measure its efficiency, +it's very useful to know how much processor time it uses. For that, +calendar time and elapsed times are useless because a process may spend +time waiting for I/O or for other processes to use the CPU. However, +you can get the information with the functions in this section. - The return value of `wcsftime' is the number of wide characters - stored in `s'. When more characters would have to be written than - can be placed in the buffer S the return value is zero, with the - same problems indicated in the `strftime' documentation. + CPU time (*note Time Basics::) is represented by the data type +`clock_t', which is a number of "clock ticks". It gives the total +amount of time a process has actively used a CPU since some arbitrary +event. On the GNU system, that event is the creation of the process. +While arbitrary in general, the event is always the same event for any +particular process, so you can always measure how much time on the CPU +a particular computation takes by examinining the process' CPU time +before and after the computation. - -File: libc.info, Node: Parsing Date and Time, Next: TZ Variable, Prev: Formatting Calendar Time, Up: Calendar Time + In the GNU system, `clock_t' is equivalent to `long int' and +`CLOCKS_PER_SEC' is an integer value. But in other systems, both +`clock_t' and the macro `CLOCKS_PER_SEC' can be either integer or +floating-point types. Casting CPU time values to `double', as in the +example above, makes sure that operations such as arithmetic and +printing work properly and consistently no matter what the underlying +representation is. -Convert textual time and date information back ----------------------------------------------- + Note that the clock can wrap around. On a 32bit system with +`CLOCKS_PER_SEC' set to one million this function will return the same +value approximately every 72 minutes. - The ISO C standard does not specify any functions which can convert -the output of the `strftime' function back into a binary format. This -led to a variety of more-or-less successful implementations with -different interfaces over the years. Then the Unix standard was -extended by the addition of two functions: `strptime' and `getdate'. -Both have strange interfaces but at least they are widely available. + For additional functions to examine a process' use of processor time, +and to control it, *Note Resource Usage And Limitation::. * Menu: -* Low-Level Time String Parsing:: Interpret string according to given format. -* General Time String Parsing:: User-friendly function to parse data and - time strings. +* CPU Time:: The `clock' function. +* Processor Time:: The `times' function.  -File: libc.info, Node: Low-Level Time String Parsing, Next: General Time String Parsing, Up: Parsing Date and Time - -Interpret string according to given format -.......................................... - - he first function is rather low-level. It is nevertheless frequently -used in software since it is better known. Its interface and -implementation are heavily influenced by the `getdate' function, which -is defined and implemented in terms of calls to `strptime'. - - - Function: char * strptime (const char *S, const char *FMT, struct tm - *TP) - The `strptime' function parses the input string S according to the - format string FMT and stores its results in the structure TP. - - The input string could be generated by a `strftime' call or - obtained any other way. It does not need to be in a - human-recognizable format; e.g. a date passed as `"02:1999:9"' is - acceptable, even though it is ambiguous without context. As long - as the format string FMT matches the input string the function - will succeed. - - The format string consists of the same components as the format - string of the `strftime' function. The only difference is that - the flags `_', `-', `0', and `^' are not allowed. Several of the - distinct formats of `strftime' do the same work in `strptime' - since differences like case of the input do not matter. For - reasons of symmetry all formats are supported, though. - - The modifiers `E' and `O' are also allowed everywhere the - `strftime' function allows them. - - The formats are: - - `%a' - `%A' - The weekday name according to the current locale, in - abbreviated form or the full name. - - `%b' - `%B' - `%h' - The month name according to the current locale, in - abbreviated form or the full name. - - `%c' - The date and time representation for the current locale. - - `%Ec' - Like `%c' but the locale's alternative date and time format - is used. - - `%C' - The century of the year. - - It makes sense to use this format only if the format string - also contains the `%y' format. - - `%EC' - The locale's representation of the period. - - Unlike `%C' it sometimes makes sense to use this format since - some cultures represent years relative to the beginning of - eras instead of using the Gregorian years. - - `%d' - - `%e' - The day of the month as a decimal number (range `1' through - `31'). Leading zeroes are permitted but not required. - - `%Od' - `%Oe' - Same as `%d' but using the locale's alternative numeric - symbols. - - Leading zeroes are permitted but not required. +File: libc.info, Node: CPU Time, Next: Processor Time, Up: Processor And CPU Time - `%D' - Equivalent to `%m/%d/%y'. +CPU Time Inquiry +---------------- - `%F' - Equivalent to `%Y-%m-%d', which is the ISO 8601 date format. + To get a process' CPU time, you can use the `clock' function. This +facility is declared in the header file `time.h'. - This is a GNU extension following an ISO C99 extension to - `strftime'. + In typical usage, you call the `clock' function at the beginning and +end of the interval you want to time, subtract the values, and then +divide by `CLOCKS_PER_SEC' (the number of clock ticks per second) to +get processor time, like this: - `%g' - The year corresponding to the ISO week number, but without - the century (range `00' through `99'). + #include + + clock_t start, end; + double cpu_time_used; + + start = clock(); + ... /* Do the work. */ + end = clock(); + cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC; - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + Do not use a single CPU time as an amount of time; it doesn't work +that way. Either do a subtraction as shown above or query processor +time directly. *Note Processor Time::. - This format is a GNU extension following a GNU extension of - `strftime'. + Different computers and operating systems vary wildly in how they +keep track of CPU time. It's common for the internal processor clock +to have a resolution somewhere between a hundredth and millionth of a +second. - `%G' - The year corresponding to the ISO week number. + - Macro: int CLOCKS_PER_SEC + The value of this macro is the number of clock ticks per second + measured by the `clock' function. POSIX requires that this value + be one million independent of the actual resolution. - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + - Macro: int CLK_TCK + This is an obsolete name for `CLOCKS_PER_SEC'. - This format is a GNU extension following a GNU extension of - `strftime'. + - Data Type: clock_t + This is the type of the value returned by the `clock' function. + Values of type `clock_t' are numbers of clock ticks. - `%H' - `%k' - The hour as a decimal number, using a 24-hour clock (range - `00' through `23'). + - Function: clock_t clock (void) + This function returns the calling process' current CPU time. If + the CPU time is not available or cannot be represented, `clock' + returns the value `(clock_t)(-1)'. - `%k' is a GNU extension following a GNU extension of - `strftime'. + +File: libc.info, Node: Processor Time, Prev: CPU Time, Up: Processor And CPU Time - `%OH' - Same as `%H' but using the locale's alternative numeric - symbols. +Processor Time Inquiry +---------------------- - `%I' - `%l' - The hour as a decimal number, using a 12-hour clock (range - `01' through `12'). + The `times' function returns information about a process' +consumption of processor time in a `struct tms' object, in addition to +the process' CPU time. *Note Time Basics::. You should include the +header file `sys/times.h' to use this facility. - `%l' is a GNU extension following a GNU extension of - `strftime'. + - Data Type: struct tms + The `tms' structure is used to return information about process + times. It contains at least the following members: - `%OI' - Same as `%I' but using the locale's alternative numeric - symbols. + `clock_t tms_utime' + This is the total processor time the calling process has used + in executing the instructions of its program. - `%j' - The day of the year as a decimal number (range `1' through - `366'). + `clock_t tms_stime' + This is the processor time the system has used on behalf of + the calling process. - Leading zeroes are permitted but not required. + `clock_t tms_cutime' + This is the sum of the `tms_utime' values and the `tms_cutime' + values of all terminated child processes of the calling + process, whose status has been reported to the parent process + by `wait' or `waitpid'; see *Note Process Completion::. In + other words, it represents the total processor time used in + executing the instructions of all the terminated child + processes of the calling process, excluding child processes + which have not yet been reported by `wait' or `waitpid'. - `%m' - The month as a decimal number (range `1' through `12'). + `clock_t tms_cstime' + This is similar to `tms_cutime', but represents the total + processor time system has used on behalf of all the + terminated child processes of the calling process. - Leading zeroes are permitted but not required. + All of the times are given in numbers of clock ticks. Unlike CPU + time, these are the actual amounts of time; not relative to any + event. *Note Creating a Process::. - `%Om' - Same as `%m' but using the locale's alternative numeric - symbols. + - Function: clock_t times (struct tms *BUFFER) + The `times' function stores the processor time information for the + calling process in BUFFER. - `%M' - The minute as a decimal number (range `0' through `59'). + The return value is the calling process' CPU time (the same value + you get from `clock()'. `times' returns `(clock_t)(-1)' to + indicate failure. - Leading zeroes are permitted but not required. + *Portability Note:* The `clock' function described in *Note CPU +Time:: is specified by the ISO C standard. The `times' function is a +feature of POSIX.1. In the GNU system, the CPU time is defined to be +equivalent to the sum of the `tms_utime' and `tms_stime' fields +returned by `times'. - `%OM' - Same as `%M' but using the locale's alternative numeric - symbols. + +File: libc.info, Node: Calendar Time, Next: Setting an Alarm, Prev: Processor And CPU Time, Up: Date and Time - `%n' - `%t' - Matches any white space. +Calendar Time +============= - `%p' + This section describes facilities for keeping track of calendar time. +*Note Time Basics::. - `%P' - The locale-dependent equivalent to `AM' or `PM'. + The GNU C library represents calendar time three ways: - This format is not useful unless `%I' or `%l' is also used. - Another complication is that the locale might not define - these values at all and therefore the conversion fails. + * "Simple time" (the `time_t' data type) is a compact + representation, typically giving the number of seconds of elapsed + time since some implementation-specific base time. - `%P' is a GNU extension following a GNU extension to - `strftime'. + * There is also a "high-resolution time" representation. Like simple + time, this represents a calendar time as an elapsed time since a + base time, but instead of measuring in whole seconds, it uses a + `struct timeval' data type, which includes fractions of a second. + Use this time representation instead of simple time when you need + greater precision. - `%r' - The complete time using the AM/PM format of the current - locale. + * "Local time" or "broken-down time" (the `struct tm' data type) + represents a calendar time as a set of components specifying the + year, month, and so on in the Gregorian calendar, for a specific + time zone. This calendar time representation is usually used only + to communicate with people. - A complication is that the locale might not define this - format at all and therefore the conversion fails. +* Menu: - `%R' - The hour and minute in decimal numbers using the format - `%H:%M'. +* Simple Calendar Time:: Facilities for manipulating calendar time. +* High-Resolution Calendar:: A time representation with greater precision. +* Broken-down Time:: Facilities for manipulating local time. +* High Accuracy Clock:: Maintaining a high accuracy system clock. +* Formatting Calendar Time:: Converting times to strings. +* Parsing Date and Time:: Convert textual time and date information back + into broken-down time values. +* TZ Variable:: How users specify the time zone. +* Time Zone Functions:: Functions to examine or specify the time zone. +* Time Functions Example:: An example program showing use of some of + the time functions. - `%R' is a GNU extension following a GNU extension to - `strftime'. + +File: libc.info, Node: Simple Calendar Time, Next: High-Resolution Calendar, Up: Calendar Time - `%s' - The number of seconds since the epoch, i.e., since 1970-01-01 - 00:00:00 UTC. Leap seconds are not counted unless leap - second support is available. +Simple Calendar Time +-------------------- - `%s' is a GNU extension following a GNU extension to - `strftime'. + This section describes the `time_t' data type for representing +calendar time as simple time, and the functions which operate on simple +time objects. These facilities are declared in the header file +`time.h'. - `%S' - The seconds as a decimal number (range `0' through `60'). + - Data Type: time_t + This is the data type used to represent simple time. Sometimes, + it also represents an elapsed time. When interpreted as a + calendar time value, it represents the number of seconds elapsed + since 00:00:00 on January 1, 1970, Coordinated Universal Time. + (This calendar time is sometimes referred to as the "epoch".) + POSIX requires that this count not include leap seconds, but on + some systems this count includes leap seconds if you set `TZ' to + certain values (*note TZ Variable::). - Leading zeroes are permitted but not required. + Note that a simple time has no concept of local time zone. + Calendar Time T is the same instant in time regardless of where on + the globe the computer is. - *Note:* The Unix specification says the upper bound on this - value is `61', a result of a decision to allow double leap - seconds. You will not see the value `61' because no minute - has more than one leap second, but the myth persists. + In the GNU C library, `time_t' is equivalent to `long int'. In + other systems, `time_t' might be either an integer or + floating-point type. - `%OS' - Same as `%S' but using the locale's alternative numeric - symbols. + The function `difftime' tells you the elapsed time between two +simple calendar times, which is not always as easy to compute as just +subtracting. *Note Elapsed Time::. - `%T' - Equivalent to the use of `%H:%M:%S' in this place. + - Function: time_t time (time_t *RESULT) + The `time' function returns the current calendar time as a value of + type `time_t'. If the argument RESULT is not a null pointer, the + calendar time value is also stored in `*RESULT'. If the current + calendar time is not available, the value `(time_t)(-1)' is + returned. - `%u' - The day of the week as a decimal number (range `1' through - `7'), Monday being `1'. + - Function: int stime (time_t *NEWTIME) + `stime' sets the system clock, i.e. it tells the system that the + current calendar time is NEWTIME, where `newtime' is interpreted + as described in the above definition of `time_t'. - Leading zeroes are permitted but not required. + `settimeofday' is a newer function which sets the system clock to + better than one second precision. `settimeofday' is generally a + better choice than `stime'. *Note High-Resolution Calendar::. - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + Only the superuser can set the system clock. - `%U' - The week number of the current year as a decimal number - (range `0' through `53'). + If the function succeeds, the return value is zero. Otherwise, it + is `-1' and `errno' is set accordingly: - Leading zeroes are permitted but not required. + `EPERM' + The process is not superuser. - `%OU' - Same as `%U' but using the locale's alternative numeric - symbols. + +File: libc.info, Node: High-Resolution Calendar, Next: Broken-down Time, Prev: Simple Calendar Time, Up: Calendar Time - `%V' - The ISO 8601:1988 week number as a decimal number (range `1' - through `53'). +High-Resolution Calendar +------------------------ - Leading zeroes are permitted but not required. + The `time_t' data type used to represent simple times has a +resolution of only one second. Some applications need more precision. - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + So, the GNU C library also contains functions which are capable of +representing calendar times to a higher resolution than one second. The +functions and the associated data types described in this section are +declared in `sys/time.h'. - `%w' - The day of the week as a decimal number (range `0' through - `6'), Sunday being `0'. + - Data Type: struct timezone + The `struct timezone' structure is used to hold minimal information + about the local time zone. It has the following members: - Leading zeroes are permitted but not required. + `int tz_minuteswest' + This is the number of minutes west of UTC. - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + `int tz_dsttime' + If nonzero, Daylight Saving Time applies during some part of + the year. - `%Ow' - Same as `%w' but using the locale's alternative numeric - symbols. + The `struct timezone' type is obsolete and should never be used. + Instead, use the facilities described in *Note Time Zone + Functions::. - `%W' - The week number of the current year as a decimal number - (range `0' through `53'). + - Function: int gettimeofday (struct timeval *TP, struct timezone *TZP) + The `gettimeofday' function returns the current calendar time as + the elapsed time since the epoch in the `struct timeval' structure + indicated by TP. (*note Elapsed Time:: for a description of + `struct timespec'). Information about the time zone is returned in + the structure pointed at TZP. If the TZP argument is a null + pointer, time zone information is ignored. - Leading zeroes are permitted but not required. + The return value is `0' on success and `-1' on failure. The + following `errno' error condition is defined for this function: - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + `ENOSYS' + The operating system does not support getting time zone + information, and TZP is not a null pointer. The GNU + operating system does not support using `struct timezone' to + represent time zone information; that is an obsolete feature + of 4.3 BSD. Instead, use the facilities described in *Note + Time Zone Functions::. - `%OW' - Same as `%W' but using the locale's alternative numeric - symbols. + - Function: int settimeofday (const struct timeval *TP, const struct + timezone *TZP) + The `settimeofday' function sets the current calendar time in the + system clock according to the arguments. As for `gettimeofday', + the calendar time is represented as the elapsed time since the + epoch. As for `gettimeofday', time zone information is ignored if + TZP is a null pointer. - `%x' - The date using the locale's date format. + You must be a privileged user in order to use `settimeofday'. - `%Ex' - Like `%x' but the locale's alternative data representation is - used. + Some kernels automatically set the system clock from some source + such as a hardware clock when they start up. Others, including + Linux, place the system clock in an "invalid" state (in which + attempts to read the clock fail). A call of `stime' removes the + system clock from an invalid state, and system startup scripts + typically run a program that calls `stime'. - `%X' - The time using the locale's time format. + `settimeofday' causes a sudden jump forwards or backwards, which + can cause a variety of problems in a system. Use `adjtime' (below) + to make a smooth transition from one time to another by temporarily + speeding up or slowing down the clock. - `%EX' - Like `%X' but the locale's alternative time representation is - used. + With a Linux kernel, `adjtimex' does the same thing and can also + make permanent changes to the speed of the system clock so it + doesn't need to be corrected as often. - `%y' - The year without a century as a decimal number (range `0' - through `99'). + The return value is `0' on success and `-1' on failure. The + following `errno' error conditions are defined for this function: - Leading zeroes are permitted but not required. + `EPERM' + This process cannot set the clock because it is not + privileged. - Note that it is questionable to use this format without the - `%C' format. The `strptime' function does regard input - values in the range 68 to 99 as the years 1969 to 1999 and - the values 0 to 68 as the years 2000 to 2068. But maybe this - heuristic fails for some input data. + `ENOSYS' + The operating system does not support setting time zone + information, and TZP is not a null pointer. - Therefore it is best to avoid `%y' completely and use `%Y' - instead. + - Function: int adjtime (const struct timeval *DELTA, struct timeval + *OLDDELTA) + This function speeds up or slows down the system clock in order to + make a gradual adjustment. This ensures that the calendar time + reported by the system clock is always monotonically increasing, + which might not happen if you simply set the clock. - `%Ey' - The offset from `%EC' in the locale's alternative - representation. + The DELTA argument specifies a relative adjustment to be made to + the clock time. If negative, the system clock is slowed down for a + while until it has lost this much elapsed time. If positive, the + system clock is speeded up for a while. - `%Oy' - The offset of the year (from `%C') using the locale's - alternative numeric symbols. + If the OLDDELTA argument is not a null pointer, the `adjtime' + function returns information about any previous time adjustment + that has not yet completed. - `%Y' - The year as a decimal number, using the Gregorian calendar. + This function is typically used to synchronize the clocks of + computers in a local network. You must be a privileged user to + use it. - `%EY' - The full alternative year representation. + With a Linux kernel, you can use the `adjtimex' function to + permanently change the clock speed. - `%z' - Equivalent to the use of `%a, %d %b %Y %H:%M:%S %z' in this - place. This is the full ISO 8601 date and time format. + The return value is `0' on success and `-1' on failure. The + following `errno' error condition is defined for this function: - `%Z' - The timezone name. + `EPERM' + You do not have privilege to set the time. - _Note:_ Currently, this is not fully implemented. The format - is recognized, input is consumed but no field in TM is set. + *Portability Note:* The `gettimeofday', `settimeofday', and +`adjtime' functions are derived from BSD. - `%%' - A literal `%' character. + Symbols for the following function are declared in `sys/timex.h'. - All other characters in the format string must have a matching - character in the input string. Exceptions are white spaces in the - input string which can match zero or more white space characters - in the format string. + - Function: int adjtimex (struct timex *TIMEX) + `adjtimex' is functionally identical to `ntp_adjtime'. *Note High + Accuracy Clock::. - The `strptime' function processes the input string from right to - left. Each of the three possible input elements (white space, - literal, or format) are handled one after the other. If the input - cannot be matched to the format string the function stops. The - remainder of the format and input strings are not processed. + This function is present only with a Linux kernel. - The function returns a pointer to the first character it was - unable to process. If the input string contains more characters - than required by the format string the return value points right - after the last consumed input character. If the whole input - string is consumed the return value points to the `NULL' byte at - the end of the string. If an error occurs, i.e. `strptime' fails - to match all of the format string, the function returns `NULL'. - The specification of the function in the XPG standard is rather -vague, leaving out a few important pieces of information. Most -importantly, it does not specify what happens to those elements of TM -which are not directly initialized by the different formats. The -implementations on different Unix systems vary here. + +File: libc.info, Node: Broken-down Time, Next: High Accuracy Clock, Prev: High-Resolution Calendar, Up: Calendar Time - The GNU libc implementation does not touch those fields which are not -directly initialized. Exceptions are the `tm_wday' and `tm_yday' -elements, which are recomputed if any of the year, month, or date -elements changed. This has two implications: +Broken-down Time +---------------- - * Before calling the `strptime' function for a new input string, you - should prepare the TM structure you pass. Normally this will mean - initializing all values are to zero. Alternatively, you can set - all fields to values like `INT_MAX', allowing you to determine - which elements were set by the function call. Zero does not work - here since it is a valid value for many of the fields. + Calendar time is represented by the usual GNU C library functions as +an elapsed time since a fixed base calendar time. This is convenient +for computation, but has no relation to the way people normally think of +calendar time. By contrast, "broken-down time" is a binary +representation of calendar time separated into year, month, day, and so +on. Broken-down time values are not useful for calculations, but they +are useful for printing human readable time information. - Careful initialization is necessary if you want to find out - whether a certain field in TM was initialized by the function call. + A broken-down time value is always relative to a choice of time +zone, and it also indicates which time zone that is. - * You can construct a `struct tm' value with several consecutive - `strptime' calls. A useful application of this is e.g. the parsing - of two separate strings, one containing date information and the - other time information. By parsing one after the other without - clearing the structure in-between, you can construct a complete - broken-down time. + The symbols in this section are declared in the header file `time.h'. - The following example shows a function which parses a string which is -contains the date information in either US style or ISO 8601 form: + - Data Type: struct tm + This is the data type used to represent a broken-down time. The + structure contains at least the following members, which can + appear in any order. - const char * - parse_date (const char *input, struct tm *tm) - { - const char *cp; - - /* First clear the result structure. */ - memset (tm, '\0', sizeof (*tm)); - - /* Try the ISO format first. */ - cp = strptime (input, "%F", tm); - if (cp == NULL) - { - /* Does not match. Try the US form. */ - cp = strptime (input, "%D", tm); - } - - return cp; - } + `int tm_sec' + This is the number of full seconds since the top of the + minute (normally in the range `0' through `59', but the + actual upper limit is `60', to allow for leap seconds if leap + second support is available). - -File: libc.info, Node: General Time String Parsing, Prev: Low-Level Time String Parsing, Up: Parsing Date and Time + `int tm_min' + This is the number of full minutes since the top of the hour + (in the range `0' through `59'). -A More User-friendly Way to Parse Times and Dates -................................................. + `int tm_hour' + This is the number of full hours past midnight (in the range + `0' through `23'). - The Unix standard defines another function for parsing date strings. -The interface is weird, but if the function happens to suit your -application it is just fine. It is problematic to use this function in -multi-threaded programs or libraries, since it returns a pointer to a -static variable, and uses a global variable and global state (an -environment variable). + `int tm_mday' + This is the ordinal day of the month (in the range `1' + through `31'). Watch out for this one! As the only ordinal + number in the structure, it is inconsistent with the rest of + the structure. - - Variable: getdate_err - This variable of type `int' contains the error code of the last - unsuccessful call to `getdate'. Defined values are: + `int tm_mon' + This is the number of full calendar months since the + beginning of the year (in the range `0' through `11'). Watch + out for this one! People usually use ordinal numbers for + month-of-year (where January = 1). - 1 - The environment variable `DATEMSK' is not defined or null. + `int tm_year' + This is the number of full calendar years since 1900. - 2 - The template file denoted by the `DATEMSK' environment - variable cannot be opened. + `int tm_wday' + This is the number of full days since Sunday (in the range + `0' through `6'). - 3 - Information about the template file cannot retrieved. + `int tm_yday' + This is the number of full days since the beginning of the + year (in the range `0' through `365'). - 4 - The template file is not a regular file. + `int tm_isdst' + This is a flag that indicates whether Daylight Saving Time is + (or was, or will be) in effect at the time described. The + value is positive if Daylight Saving Time is in effect, zero + if it is not, and negative if the information is not + available. - 5 - An I/O error occurred while reading the template file. + `long int tm_gmtoff' + This field describes the time zone that was used to compute + this broken-down time value, including any adjustment for + daylight saving; it is the number of seconds that you must + add to UTC to get local time. You can also think of this as + the number of seconds east of UTC. For example, for U.S. + Eastern Standard Time, the value is `-5*60*60'. The + `tm_gmtoff' field is derived from BSD and is a GNU library + extension; it is not visible in a strict ISO C environment. - 6 - Not enough memory available to execute the function. + `const char *tm_zone' + This field is the name for the time zone that was used to + compute this broken-down time value. Like `tm_gmtoff', this + field is a BSD and GNU extension, and is not visible in a + strict ISO C environment. - 7 - The template file contains no matching template. + - Function: struct tm * localtime (const time_t *TIME) + The `localtime' function converts the simple time pointed to by + TIME to broken-down time representation, expressed relative to the + user's specified time zone. - 8 - The input date is invalid, but would match a template - otherwise. This includes dates like February 31st, and dates - which cannot be represented in a `time_t' variable. + The return value is a pointer to a static broken-down time + structure, which might be overwritten by subsequent calls to + `ctime', `gmtime', or `localtime'. (But no other library function + overwrites the contents of this object.) - - Function: struct tm * getdate (const char *STRING) - The interface to `getdate' is the simplest possible for a function - to parse a string and return the value. STRING is the input - string and the result is returned in a statically-allocated - variable. + The return value is the null pointer if TIME cannot be represented + as a broken-down time; typically this is because the year cannot + fit into an `int'. - The details about how the string is processed are hidden from the - user. In fact, they can be outside the control of the program. - Which formats are recognized is controlled by the file named by - the environment variable `DATEMSK'. This file should contain - lines of valid format strings which could be passed to `strptime'. + Calling `localtime' has one other effect: it sets the variable + `tzname' with information about the current time zone. *Note Time + Zone Functions::. - The `getdate' function reads these format strings one after the - other and tries to match the input string. The first line which - completely matches the input string is used. + Using the `localtime' function is a big problem in multi-threaded +programs. The result is returned in a static buffer and this is used in +all threads. POSIX.1c introduced a variant of this function. - Elements not initialized through the format string retain the - values present at the time of the `getdate' function call. + - Function: struct tm * localtime_r (const time_t *TIME, struct tm + *RESULTP) + The `localtime_r' function works just like the `localtime' + function. It takes a pointer to a variable containing a simple + time and converts it to the broken-down time format. - The formats recognized by `getdate' are the same as for - `strptime'. See above for an explanation. There are only a few - extensions to the `strptime' behavior: + But the result is not placed in a static buffer. Instead it is + placed in the object of type `struct tm' to which the parameter + RESULTP points. - * If the `%Z' format is given the broken-down time is based on - the current time of the timezone matched, not of the current - timezone of the runtime environment. + If the conversion is successful the function returns a pointer to + the object the result was written into, i.e., it returns RESULTP. - _Note_: This is not implemented (currently). The problem is - that timezone names are not unique. If a fixed timezone is - assumed for a given string (say `EST' meaning US East Coast - time), then uses for countries other than the USA will fail. - So far we have found no good solution to this. + - Function: struct tm * gmtime (const time_t *TIME) + This function is similar to `localtime', except that the + broken-down time is expressed as Coordinated Universal Time (UTC) + (formerly called Greenwich Mean Time (GMT)) rather than relative + to a local time zone. - * If only the weekday is specified the selected day depends on - the current date. If the current weekday is greater or equal - to the `tm_wday' value the current week's day is chosen, - otherwise the day next week is chosen. - * A similar heuristic is used when only the month is given and - not the year. If the month is greater than or equal to the - current month, then the current year is used. Otherwise it - wraps to next year. The first day of the month is assumed if - one is not explicitly specified. + As for the `localtime' function we have the problem that the result +is placed in a static variable. POSIX.1c also provides a replacement +for `gmtime'. - * The current hour, minute, and second are used if the - appropriate value is not set through the format. + - Function: struct tm * gmtime_r (const time_t *TIME, struct tm + *RESULTP) + This function is similar to `localtime_r', except that it converts + just like `gmtime' the given time as Coordinated Universal Time. - * If no date is given tomorrow's date is used if the time is - smaller than the current time. Otherwise today's date is - taken. + If the conversion is successful the function returns a pointer to + the object the result was written into, i.e., it returns RESULTP. - It should be noted that the format in the template file need not - only contain format elements. The following is a list of possible - format strings (taken from the Unix standard): + - Function: time_t mktime (struct tm *BROKENTIME) + The `mktime' function is used to convert a broken-down time + structure to a simple time representation. It also "normalizes" + the contents of the broken-down time structure, by filling in the + day of week and day of year based on the other date and time + components. - %m - %A %B %d, %Y %H:%M:%S - %A - %B - %m/%d/%y %I %p - %d,%m,%Y %H:%M - at %A the %dst of %B in %Y - run job at %I %p,%B %dnd - %A den %d. %B %Y %H.%M Uhr + The `mktime' function ignores the specified contents of the + `tm_wday' and `tm_yday' members of the broken-down time structure. + It uses the values of the other components to determine the + calendar time; it's permissible for these components to have + unnormalized values outside their normal ranges. The last thing + that `mktime' does is adjust the components of the BROKENTIME + structure (including the `tm_wday' and `tm_yday'). - As you can see, the template list can contain very specific - strings like `run job at %I %p,%B %dnd'. Using the above list of - templates and assuming the current time is Mon Sep 22 12:19:47 EDT - 1986 we can obtain the following results for the given input. + If the specified broken-down time cannot be represented as a + simple time, `mktime' returns a value of `(time_t)(-1)' and does + not modify the contents of BROKENTIME. - Input Match Result - Mon %a Mon Sep 22 12:19:47 EDT 1986 - Sun %a Sun Sep 28 12:19:47 EDT 1986 - Fri %a Fri Sep 26 12:19:47 EDT 1986 - September %B Mon Sep 1 12:19:47 EDT 1986 - January %B Thu Jan 1 12:19:47 EST 1987 - December %B Mon Dec 1 12:19:47 EST 1986 - Sep Mon %b %a Mon Sep 1 12:19:47 EDT 1986 - Jan Fri %b %a Fri Jan 2 12:19:47 EST 1987 - Dec Mon %b %a Mon Dec 1 12:19:47 EST 1986 - Jan Wed 1989 %b %a %Y Wed Jan 4 12:19:47 EST 1989 - Fri 9 %a %H Fri Sep 26 09:00:00 EDT 1986 - Feb 10:30 %b %H:%S Sun Feb 1 10:00:30 EST 1987 - 10:30 %H:%M Tue Sep 23 10:30:00 EDT 1986 - 13:30 %H:%M Mon Sep 22 13:30:00 EDT 1986 + Calling `mktime' also sets the variable `tzname' with information + about the current time zone. *Note Time Zone Functions::. - The return value of the function is a pointer to a static variable - of type `struct tm', or a null pointer if an error occurred. The - result is only valid until the next `getdate' call, making this - function unusable in multi-threaded applications. + - Function: time_t timelocal (struct tm *BROKENTIME) + `timelocal' is functionally identical to `mktime', but more + mnemonically named. Note that it is the inverse of the `localtime' + function. - The `errno' variable is _not_ changed. Error conditions are - stored in the global variable `getdate_err'. See the description - above for a list of the possible error values. + *Portability note:* `mktime' is essentially universally + available. `timelocal' is rather rare. - _Warning:_ The `getdate' function should _never_ be used in - SUID-programs. The reason is obvious: using the `DATEMSK' - environment variable you can get the function to open any - arbitrary file and chances are high that with some bogus input - (such as a binary file) the program will crash. - - Function: int getdate_r (const char *STRING, struct tm *TP) - The `getdate_r' function is the reentrant counterpart of - `getdate'. It does not use the global variable `getdate_err' to - signal an error, but instead returns an error code. The same error - codes as described in the `getdate_err' documentation above are - used, with 0 meaning success. + - Function: time_t timegm (struct tm *BROKENTIME) + `timegm' is functionally identical to `mktime' except it always + takes the input values to be Coordinated Universal Time (UTC) + regardless of any local time zone setting. - Moreover, `getdate_r' stores the broken-down time in the variable - of type `struct tm' pointed to by the second argument, rather than - in a static variable. + Note that `timegm' is the inverse of `gmtime'. - This function is not defined in the Unix standard. Nevertheless - it is available on some other Unix systems as well. + *Portability note:* `mktime' is essentially universally + available. `timegm' is rather rare. For the most portable + conversion from a UTC broken-down time to a simple time, set the + `TZ' environment variable to UTC, call `mktime', then set `TZ' + back. - The warning against using `getdate' in SUID-programs applies to - `getdate_r' as well.  -File: libc.info, Node: TZ Variable, Next: Time Zone Functions, Prev: Parsing Date and Time, Up: Calendar Time - -Specifying the Time Zone with `TZ' ----------------------------------- - - In POSIX systems, a user can specify the time zone by means of the -`TZ' environment variable. For information about how to set -environment variables, see *Note Environment Variables::. The functions -for accessing the time zone are declared in `time.h'. - - You should not normally need to set `TZ'. If the system is -configured properly, the default time zone will be correct. You might -set `TZ' if you are using a computer over a network from a different -time zone, and would like times reported to you in the time zone local -to you, rather than what is local to the computer. - - In POSIX.1 systems the value of the `TZ' variable can be in one of -three formats. With the GNU C library, the most common format is the -last one, which can specify a selection from a large database of time -zone information for many regions of the world. The first two formats -are used to describe the time zone information directly, which is both -more cumbersome and less precise. But the POSIX.1 standard only -specifies the details of the first two formats, so it is good to be -familiar with them in case you come across a POSIX.1 system that doesn't -support a time zone information database. +File: libc.info, Node: High Accuracy Clock, Next: Formatting Calendar Time, Prev: Broken-down Time, Up: Calendar Time - The first format is used when there is no Daylight Saving Time (or -summer time) in the local time zone: +High Accuracy Clock +------------------- - STD OFFSET + The `ntp_gettime' and `ntp_adjtime' functions provide an interface +to monitor and manipulate the system clock to maintain high accuracy +time. For example, you can fine tune the speed of the clock or +synchronize it with another time source. - The STD string specifies the name of the time zone. It must be -three or more characters long and must not contain a leading colon, -embedded digits, commas, nor plus and minus signs. There is no space -character separating the time zone name from the OFFSET, so these -restrictions are necessary to parse the specification correctly. + A typical use of these functions is by a server implementing the +Network Time Protocol to synchronize the clocks of multiple systems and +high precision clocks. - The OFFSET specifies the time value you must add to the local time -to get a Coordinated Universal Time value. It has syntax like -[`+'|`-']HH[`:'MM[`:'SS]]. This is positive if the local time zone is -west of the Prime Meridian and negative if it is east. The hour must -be between `0' and `23', and the minute and seconds between `0' and -`59'. + These functions are declared in `sys/timex.h'. - For example, here is how we would specify Eastern Standard Time, but -without any Daylight Saving Time alternative: + - Data Type: struct ntptimeval + This structure is used for information about the system clock. It + contains the following members: + `struct timeval time' + This is the current calendar time, expressed as the elapsed + time since the epoch. The `struct timeval' data type is + described in *Note Elapsed Time::. - EST+5 + `long int maxerror' + This is the maximum error, measured in microseconds. Unless + updated via `ntp_adjtime' periodically, this value will reach + some platform-specific maximum value. - The second format is used when there is Daylight Saving Time: + `long int esterror' + This is the estimated error, measured in microseconds. This + value can be set by `ntp_adjtime' to indicate the estimated + offset of the system clock from the true calendar time. - STD OFFSET DST [OFFSET]`,'START[`/'TIME]`,'END[`/'TIME] + - Function: int ntp_gettime (struct ntptimeval *TPTR) + The `ntp_gettime' function sets the structure pointed to by TPTR + to current values. The elements of the structure afterwards + contain the values the timer implementation in the kernel assumes. + They might or might not be correct. If they are not a + `ntp_adjtime' call is necessary. - The initial STD and OFFSET specify the standard time zone, as -described above. The DST string and OFFSET specify the name and offset -for the corresponding Daylight Saving Time zone; if the OFFSET is -omitted, it defaults to one hour ahead of standard time. + The return value is `0' on success and other values on failure. + The following `errno' error conditions are defined for this + function: - The remainder of the specification describes when Daylight Saving -Time is in effect. The START field is when Daylight Saving Time goes -into effect and the END field is when the change is made back to -standard time. The following formats are recognized for these fields: + `TIME_ERROR' + The precision clock model is not properly set up at the + moment, thus the clock must be considered unsynchronized, and + the values should be treated with care. -`JN' - This specifies the Julian day, with N between `1' and `365'. - February 29 is never counted, even in leap years. + - Data Type: struct timex + This structure is used to control and monitor the system clock. It + contains the following members: + `unsigned int modes' + This variable controls whether and which values are set. + Several symbolic constants have to be combined with _binary + or_ to specify the effective mode. These constants start + with `MOD_'. -`N' - This specifies the Julian day, with N between `0' and `365'. - February 29 is counted in leap years. + `long int offset' + This value indicates the current offset of the system clock + from the true calendar time. The value is given in + microseconds. If bit `MOD_OFFSET' is set in `modes', the + offset (and possibly other dependent values) can be set. The + offset's absolute value must not exceed `MAXPHASE'. -`MM.W.D' - This specifies day D of week W of month M. The day D must be - between `0' (Sunday) and `6'. The week W must be between `1' and - `5'; week `1' is the first week in which day D occurs, and week - `5' specifies the _last_ D day in the month. The month M should be - between `1' and `12'. + `long int frequency' + This value indicates the difference in frequency between the + true calendar time and the system clock. The value is + expressed as scaled PPM (parts per million, 0.0001%). The + scaling is `1 << SHIFT_USEC'. The value can be set with bit + `MOD_FREQUENCY', but the absolute value must not exceed + `MAXFREQ'. - The TIME fields specify when, in the local time currently in effect, -the change to the other time occurs. If omitted, the default is -`02:00:00'. + `long int maxerror' + This is the maximum error, measured in microseconds. A new + value can be set using bit `MOD_MAXERROR'. Unless updated via + `ntp_adjtime' periodically, this value will increase steadily + and reach some platform-specific maximum value. - For example, here is how you would specify the Eastern time zone in -the United States, including the appropriate Daylight Saving Time and -its dates of applicability. The normal offset from UTC is 5 hours; -since this is west of the prime meridian, the sign is positive. Summer -time begins on the first Sunday in April at 2:00am, and ends on the -last Sunday in October at 2:00am. + `long int esterror' + This is the estimated error, measured in microseconds. This + value can be set using bit `MOD_ESTERROR'. - EST+5EDT,M4.1.0/2,M10.5.0/2 + `int status' + This variable reflects the various states of the clock + machinery. There are symbolic constants for the significant + bits, starting with `STA_'. Some of these flags can be + updated using the `MOD_STATUS' bit. - The schedule of Daylight Saving Time in any particular jurisdiction -has changed over the years. To be strictly correct, the conversion of -dates and times in the past should be based on the schedule that was in -effect then. However, this format has no facilities to let you specify -how the schedule has changed from year to year. The most you can do is -specify one particular schedule--usually the present day schedule--and -this is used to convert any date, no matter when. For precise time zone -specifications, it is best to use the time zone information database -(see below). + `long int constant' + This value represents the bandwidth or stiffness of the PLL + (phase locked loop) implemented in the kernel. The value can + be changed using bit `MOD_TIMECONST'. - The third format looks like this: + `long int precision' + This value represents the accuracy or the maximum error when + reading the system clock. The value is expressed in + microseconds. - :CHARACTERS + `long int tolerance' + This value represents the maximum frequency error of the + system clock in scaled PPM. This value is used to increase + the `maxerror' every second. - Each operating system interprets this format differently; in the GNU -C library, CHARACTERS is the name of a file which describes the time -zone. + `struct timeval time' + The current calendar time. - If the `TZ' environment variable does not have a value, the -operation chooses a time zone by default. In the GNU C library, the -default time zone is like the specification `TZ=:/etc/localtime' (or -`TZ=:/usr/local/etc/localtime', depending on how GNU C library was -configured; *note Installation::). Other C libraries use their own -rule for choosing the default time zone, so there is little we can say -about them. + `long int tick' + The elapsed time between clock ticks in microseconds. A + clock tick is a periodic timer interrupt on which the system + clock is based. - If CHARACTERS begins with a slash, it is an absolute file name; -otherwise the library looks for the file -`/share/lib/zoneinfo/CHARACTERS'. The `zoneinfo' directory contains -data files describing local time zones in many different parts of the -world. The names represent major cities, with subdirectories for -geographical areas; for example, `America/New_York', `Europe/London', -`Asia/Hong_Kong'. These data files are installed by the system -administrator, who also sets `/etc/localtime' to point to the data file -for the local time zone. The GNU C library comes with a large database -of time zone information for most regions of the world, which is -maintained by a community of volunteers and put in the public domain. + `long int ppsfreq' + This is the first of a few optional variables that are + present only if the system clock can use a PPS (pulse per + second) signal to discipline the system clock. The value is + expressed in scaled PPM and it denotes the difference in + frequency between the system clock and the PPS signal. - -File: libc.info, Node: Time Zone Functions, Next: Time Functions Example, Prev: TZ Variable, Up: Calendar Time + `long int jitter' + This value expresses a median filtered average of the PPS + signal's dispersion in microseconds. -Functions and Variables for Time Zones --------------------------------------- + `int shift' + This value is a binary exponent for the duration of the PPS + calibration interval, ranging from `PPS_SHIFT' to + `PPS_SHIFTMAX'. - - Variable: char * tzname [2] - The array `tzname' contains two strings, which are the standard - names of the pair of time zones (standard and Daylight Saving) - that the user has selected. `tzname[0]' is the name of the - standard time zone (for example, `"EST"'), and `tzname[1]' is the - name for the time zone when Daylight Saving Time is in use (for - example, `"EDT"'). These correspond to the STD and DST strings - (respectively) from the `TZ' environment variable. If Daylight - Saving Time is never used, `tzname[1]' is the empty string. + `long int stabil' + This value represents the median filtered dispersion of the + PPS frequency in scaled PPM. - The `tzname' array is initialized from the `TZ' environment - variable whenever `tzset', `ctime', `strftime', `mktime', or - `localtime' is called. If multiple abbreviations have been used - (e.g. `"EWT"' and `"EDT"' for U.S. Eastern War Time and Eastern - Daylight Time), the array contains the most recent abbreviation. + `long int jitcnt' + This counter represents the number of pulses where the jitter + exceeded the allowed maximum `MAXTIME'. - The `tzname' array is required for POSIX.1 compatibility, but in - GNU programs it is better to use the `tm_zone' member of the - broken-down time structure, since `tm_zone' reports the correct - abbreviation even when it is not the latest one. + `long int calcnt' + This counter reflects the number of successful calibration + intervals. - Though the strings are declared as `char *' the user must refrain - from modifying these strings. Modifying the strings will almost - certainly lead to trouble. + `long int errcnt' + This counter represents the number of calibration errors + (caused by large offsets or jitter). + `long int stbcnt' + This counter denotes the number of of calibrations where the + stability exceeded the threshold. - - Function: void tzset (void) - The `tzset' function initializes the `tzname' variable from the - value of the `TZ' environment variable. It is not usually - necessary for your program to call this function, because it is - called automatically when you use the other time conversion - functions that depend on the time zone. + - Function: int ntp_adjtime (struct timex *TPTR) + The `ntp_adjtime' function sets the structure specified by TPTR to + current values. - The following variables are defined for compatibility with System V -Unix. Like `tzname', these variables are set by calling `tzset' or the -other time conversion functions. + In addition, `ntp_adjtime' updates some settings to match what you + pass to it in *TPTR. Use the `modes' element of *TPTR to select + what settings to update. You can set `offset', `freq', + `maxerror', `esterror', `status', `constant', and `tick'. - - Variable: long int timezone - This contains the difference between UTC and the latest local - standard time, in seconds west of UTC. For example, in the U.S. - Eastern time zone, the value is `5*60*60'. Unlike the `tm_gmtoff' - member of the broken-down time structure, this value is not - adjusted for daylight saving, and its sign is reversed. In GNU - programs it is better to use `tm_gmtoff', since it contains the - correct offset even when it is not the latest one. + `modes' = zero means set nothing. - - Variable: int daylight - This variable has a nonzero value if Daylight Saving Time rules - apply. A nonzero value does not necessarily mean that Daylight - Saving Time is now in effect; it means only that Daylight Saving - Time is sometimes in effect. + Only the superuser can update settings. - -File: libc.info, Node: Time Functions Example, Prev: Time Zone Functions, Up: Calendar Time + The return value is `0' on success and other values on failure. + The following `errno' error conditions are defined for this + function: -Time Functions Example ----------------------- + `TIME_ERROR' + The high accuracy clock model is not properly set up at the + moment, thus the clock must be considered unsynchronized, and + the values should be treated with care. Another reason could + be that the specified new values are not allowed. - Here is an example program showing the use of some of the calendar -time functions. + `EPERM' + The process specified a settings update, but is not superuser. - #include - #include - - #define SIZE 256 - - int - main (void) - { - char buffer[SIZE]; - time_t curtime; - struct tm *loctime; - - /* Get the current time. */ - curtime = time (NULL); - - /* Convert it to local time representation. */ - loctime = localtime (&curtime); - - /* Print out the date and time in the standard format. */ - fputs (asctime (loctime), stdout); - - /* Print it out in a nice format. */ - strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime); - fputs (buffer, stdout); - strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); - fputs (buffer, stdout); - - return 0; - } + For more details see RFC1305 (Network Time Protocol, Version 3) and + related documents. - It produces output like this: + *Portability note:* Early versions of the GNU C library did not + have this function but did have the synonymous `adjtimex'. - Wed Jul 31 13:02:36 1991 - Today is Wednesday, July 31. - The time is 01:02 PM. diff -durpN glibc-2.2.4/manual/libc.info-36 glibc-2.2.5/manual/libc.info-36 --- glibc-2.2.4/manual/libc.info-36 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-36 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1192 +33,1215 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Setting an Alarm, Next: Sleeping, Prev: Calendar Time, Up: Date and Time +File: libc.info, Node: Formatting Calendar Time, Next: Parsing Date and Time, Prev: High Accuracy Clock, Up: Calendar Time -Setting an Alarm -================ +Formatting Calendar Time +------------------------ - The `alarm' and `setitimer' functions provide a mechanism for a -process to interrupt itself in the future. They do this by setting a -timer; when the timer expires, the process receives a signal. + The functions described in this section format calendar time values +as strings. These functions are declared in the header file `time.h'. - Each process has three independent interval timers available: + - Function: char * asctime (const struct tm *BROKENTIME) + The `asctime' function converts the broken-down time value that + BROKENTIME points to into a string in a standard format: - * A real-time timer that counts elapsed time. This timer sends a - `SIGALRM' signal to the process when it expires. + "Tue May 21 13:46:22 1991\n" - * A virtual timer that counts processor time used by the process. - This timer sends a `SIGVTALRM' signal to the process when it - expires. + The abbreviations for the days of week are: `Sun', `Mon', `Tue', + `Wed', `Thu', `Fri', and `Sat'. - * A profiling timer that counts both processor time used by the - process, and processor time spent in system calls on behalf of the - process. This timer sends a `SIGPROF' signal to the process when - it expires. + The abbreviations for the months are: `Jan', `Feb', `Mar', `Apr', + `May', `Jun', `Jul', `Aug', `Sep', `Oct', `Nov', and `Dec'. - This timer is useful for profiling in interpreters. The interval - timer mechanism does not have the fine granularity necessary for - profiling native code. + The return value points to a statically allocated string, which + might be overwritten by subsequent calls to `asctime' or `ctime'. + (But no other library function overwrites the contents of this + string.) - You can only have one timer of each kind set at any given time. If -you set a timer that has not yet expired, that timer is simply reset to -the new value. + - Function: char * asctime_r (const struct tm *BROKENTIME, char + *BUFFER) + This function is similar to `asctime' but instead of placing the + result in a static buffer it writes the string in the buffer + pointed to by the parameter BUFFER. This buffer should have room + for at least 26 bytes, including the terminating null. - You should establish a handler for the appropriate alarm signal using -`signal' or `sigaction' before issuing a call to `setitimer' or -`alarm'. Otherwise, an unusual chain of events could cause the timer -to expire before your program establishes the handler. In this case it -would be terminated, since termination is the default action for the -alarm signals. *Note Signal Handling::. + If no error occurred the function returns a pointer to the string + the result was written into, i.e., it returns BUFFER. Otherwise + return `NULL'. - The `setitimer' function is the primary means for setting an alarm. -This facility is declared in the header file `sys/time.h'. The `alarm' -function, declared in `unistd.h', provides a somewhat simpler interface -for setting the real-time timer. + - Function: char * ctime (const time_t *TIME) + The `ctime' function is similar to `asctime', except that you + specify the calendar time argument as a `time_t' simple time value + rather than in broken-down local time format. It is equivalent to - - Data Type: struct itimerval - This structure is used to specify when a timer should expire. It - contains the following members: - `struct timeval it_interval' - This is the period between successive timer interrupts. If - zero, the alarm will only be sent once. + asctime (localtime (TIME)) - `struct timeval it_value' - This is the period between now and the first timer interrupt. - If zero, the alarm is disabled. + `ctime' sets the variable `tzname', because `localtime' does so. + *Note Time Zone Functions::. - The `struct timeval' data type is described in *Note Elapsed - Time::. + - Function: char * ctime_r (const time_t *TIME, char *BUFFER) + This function is similar to `ctime', but places the result in the + string pointed to by BUFFER. It is equivalent to (written using + gcc extensions, *note Statement Exprs: (gcc)Statement Exprs.): - - Function: int setitimer (int WHICH, struct itimerval *NEW, struct - itimerval *OLD) - The `setitimer' function sets the timer specified by WHICH - according to NEW. The WHICH argument can have a value of - `ITIMER_REAL', `ITIMER_VIRTUAL', or `ITIMER_PROF'. + ({ struct tm tm; asctime_r (localtime_r (time, &tm), buf); }) - If OLD is not a null pointer, `setitimer' returns information - about any previous unexpired timer of the same kind in the - structure it points to. + If no error occurred the function returns a pointer to the string + the result was written into, i.e., it returns BUFFER. Otherwise + return `NULL'. - The return value is `0' on success and `-1' on failure. The - following `errno' error conditions are defined for this function: + - Function: size_t strftime (char *S, size_t SIZE, const char + *TEMPLATE, const struct tm *BROKENTIME) + This function is similar to the `sprintf' function (*note + Formatted Input::), but the conversion specifications that can + appear in the format template TEMPLATE are specialized for + printing components of the date and time BROKENTIME according to + the locale currently specified for time conversion (*note + Locales::). - `EINVAL' - The timer period is too large. + Ordinary characters appearing in the TEMPLATE are copied to the + output string S; this can include multibyte character sequences. + Conversion specifiers are introduced by a `%' character, followed + by an optional flag which can be one of the following. These flags + are all GNU extensions. The first three affect only the output of + numbers: - - Function: int getitimer (int WHICH, struct itimerval *OLD) - The `getitimer' function stores information about the timer - specified by WHICH in the structure pointed at by OLD. + `_' + The number is padded with spaces. - The return value and error conditions are the same as for - `setitimer'. + `-' + The number is not padded at all. -`ITIMER_REAL' - This constant can be used as the WHICH argument to the `setitimer' - and `getitimer' functions to specify the real-time timer. + `0' + The number is padded with zeros even if the format specifies + padding with spaces. -`ITIMER_VIRTUAL' - This constant can be used as the WHICH argument to the `setitimer' - and `getitimer' functions to specify the virtual timer. + `^' + The output uses uppercase characters, but only if this is + possible (*note Case Conversion::). -`ITIMER_PROF' - This constant can be used as the WHICH argument to the `setitimer' - and `getitimer' functions to specify the profiling timer. + The default action is to pad the number with zeros to keep it a + constant width. Numbers that do not have a range indicated below + are never padded, since there is no natural width for them. - - Function: unsigned int alarm (unsigned int SECONDS) - The `alarm' function sets the real-time timer to expire in SECONDS - seconds. If you want to cancel any existing alarm, you can do - this by calling `alarm' with a SECONDS argument of zero. + Following the flag an optional specification of the width is + possible. This is specified in decimal notation. If the natural + size of the output is of the field has less than the specified + number of characters, the result is written right adjusted and + space padded to the given size. - The return value indicates how many seconds remain before the - previous alarm would have been sent. If there is no previous - alarm, `alarm' returns zero. + An optional modifier can follow the optional flag and width + specification. The modifiers, which are POSIX.2 extensions, are: - The `alarm' function could be defined in terms of `setitimer' like -this: + `E' + Use the locale's alternate representation for date and time. + This modifier applies to the `%c', `%C', `%x', `%X', `%y' and + `%Y' format specifiers. In a Japanese locale, for example, + `%Ex' might yield a date format based on the Japanese + Emperors' reigns. - unsigned int - alarm (unsigned int seconds) - { - struct itimerval old, new; - new.it_interval.tv_usec = 0; - new.it_interval.tv_sec = 0; - new.it_value.tv_usec = 0; - new.it_value.tv_sec = (long int) seconds; - if (setitimer (ITIMER_REAL, &new, &old) < 0) - return 0; - else - return old.it_value.tv_sec; - } + `O' + Use the locale's alternate numeric symbols for numbers. This + modifier applies only to numeric format specifiers. - There is an example showing the use of the `alarm' function in *Note -Handler Returns::. + If the format supports the modifier but no alternate representation + is available, it is ignored. - If you simply want your process to wait for a given number of -seconds, you should use the `sleep' function. *Note Sleeping::. + The conversion specifier ends with a format specifier taken from + the following list. The whole `%' sequence is replaced in the + output string as follows: - You shouldn't count on the signal arriving precisely when the timer -expires. In a multiprocessing environment there is typically some -amount of delay involved. + `%a' + The abbreviated weekday name according to the current locale. - *Portability Note:* The `setitimer' and `getitimer' functions are -derived from BSD Unix, while the `alarm' function is specified by the -POSIX.1 standard. `setitimer' is more powerful than `alarm', but -`alarm' is more widely used. + `%A' + The full weekday name according to the current locale. - -File: libc.info, Node: Sleeping, Prev: Setting an Alarm, Up: Date and Time + `%b' + The abbreviated month name according to the current locale. -Sleeping -======== + `%B' + The full month name according to the current locale. - The function `sleep' gives a simple way to make the program wait for -a short interval. If your program doesn't use signals (except to -terminate), then you can expect `sleep' to wait reliably throughout the -specified interval. Otherwise, `sleep' can return sooner if a signal -arrives; if you want to wait for a given interval regardless of -signals, use `select' (*note Waiting for I/O::) and don't specify any -descriptors to wait for. + `%c' + The preferred calendar time representation for the current + locale. - - Function: unsigned int sleep (unsigned int SECONDS) - The `sleep' function waits for SECONDS or until a signal is - delivered, whichever happens first. + `%C' + The century of the year. This is equivalent to the greatest + integer not greater than the year divided by 100. - If `sleep' function returns because the requested interval is over, - it returns a value of zero. If it returns because of delivery of a - signal, its return value is the remaining time in the sleep - interval. + This format is a POSIX.2 extension and also appears in + ISO C99. - The `sleep' function is declared in `unistd.h'. + `%d' + The day of the month as a decimal number (range `01' through + `31'). - Resist the temptation to implement a sleep for a fixed amount of -time by using the return value of `sleep', when nonzero, to call -`sleep' again. This will work with a certain amount of accuracy as -long as signals arrive infrequently. But each signal can cause the -eventual wakeup time to be off by an additional second or so. Suppose a -few signals happen to arrive in rapid succession by bad luck--there is -no limit on how much this could shorten or lengthen the wait. + `%D' + The date using the format `%m/%d/%y'. - Instead, compute the calendar time at which the program should stop -waiting, and keep trying to wait until that calendar time. This won't -be off by more than a second. With just a little more work, you can use -`select' and make the waiting period quite accurate. (Of course, heavy -system load can cause additional unavoidable delays--unless the machine -is dedicated to one application, there is no way you can avoid this.) + This format is a POSIX.2 extension and also appears in + ISO C99. - On some systems, `sleep' can do strange things if your program uses -`SIGALRM' explicitly. Even if `SIGALRM' signals are being ignored or -blocked when `sleep' is called, `sleep' might return prematurely on -delivery of a `SIGALRM' signal. If you have established a handler for -`SIGALRM' signals and a `SIGALRM' signal is delivered while the process -is sleeping, the action taken might be just to cause `sleep' to return -instead of invoking your handler. And, if `sleep' is interrupted by -delivery of a signal whose handler requests an alarm or alters the -handling of `SIGALRM', this handler and `sleep' will interfere. + `%e' + The day of the month like with `%d', but padded with blank + (range ` 1' through `31'). - On the GNU system, it is safe to use `sleep' and `SIGALRM' in the -same program, because `sleep' does not work by means of `SIGALRM'. + This format is a POSIX.2 extension and also appears in + ISO C99. - - Function: int nanosleep (const struct timespec *REQUESTED_TIME, - struct timespec *REMAINING) - If resolution to seconds is not enough the `nanosleep' function can - be used. As the name suggests the sleep interval can be specified - in nanoseconds. The actual elapsed time of the sleep interval - might be longer since the system rounds the elapsed time you - request up to the next integer multiple of the actual resolution - the system can deliver. + `%F' + The date using the format `%Y-%m-%d'. This is the form + specified in the ISO 8601 standard and is the preferred form + for all uses. - *`requested_time' is the elapsed time of the interval you want to - sleep. + This format is a ISO C99 extension. - The function returns as *`remaining' the elapsed time left in the - interval for which you requested to sleep. If the interval - completed without getting interrupted by a signal, this is zero. + `%g' + The year corresponding to the ISO week number, but without + the century (range `00' through `99'). This has the same + format and value as `%y', except that if the ISO week number + (see `%V') belongs to the previous or next year, that year is + used instead. - `struct timespec' is described in *Note Elapsed Time::. + This format was introduced in ISO C99. - If the function returns because the interval is over the return - value is zero. If the function returns -1 the global variable - ERRNO is set to the following values: + `%G' + The year corresponding to the ISO week number. This has the + same format and value as `%Y', except that if the ISO week + number (see `%V') belongs to the previous or next year, that + year is used instead. - `EINTR' - The call was interrupted because a signal was delivered to - the thread. If the REMAINING parameter is not the null - pointer the structure pointed to by REMAINING is updated to - contain the remaining elapsed time. + This format was introduced in ISO C99 but was previously + available as a GNU extension. - `EINVAL' - The nanosecond value in the REQUESTED_TIME parameter contains - an illegal value. Either the value is negative or greater - than or equal to 1000 million. + `%h' + The abbreviated month name according to the current locale. + The action is the same as for `%b'. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `nanosleep' is called. If the thread gets canceled these - resources stay allocated until the program ends. To avoid this - calls to `nanosleep' should be protected using cancellation - handlers. + This format is a POSIX.2 extension and also appears in + ISO C99. - The `nanosleep' function is declared in `time.h'. + `%H' + The hour as a decimal number, using a 24-hour clock (range + `00' through `23'). - -File: libc.info, Node: Resource Usage And Limitation, Next: Non-Local Exits, Prev: Date and Time, Up: Top + `%I' + The hour as a decimal number, using a 12-hour clock (range + `01' through `12'). -Resource Usage And Limitation -***************************** + `%j' + The day of the year as a decimal number (range `001' through + `366'). - This chapter describes functions for examining how much of various -kinds of resources (CPU time, memory, etc.) a process has used and -getting and setting limits on future usage. + `%k' + The hour as a decimal number, using a 24-hour clock like + `%H', but padded with blank (range ` 0' through `23'). -* Menu: + This format is a GNU extension. -* Resource Usage:: Measuring various resources used. -* Limits on Resources:: Specifying limits on resource usage. -* Priority:: Reading or setting process run priority. -* Memory Resources:: Querying memory available resources. -* Processor Resources:: Learn about the processors available. + `%l' + The hour as a decimal number, using a 12-hour clock like + `%I', but padded with blank (range ` 1' through `12'). - -File: libc.info, Node: Resource Usage, Next: Limits on Resources, Up: Resource Usage And Limitation + This format is a GNU extension. -Resource Usage -============== + `%m' + The month as a decimal number (range `01' through `12'). - The function `getrusage' and the data type `struct rusage' are used -to examine the resource usage of a process. They are declared in -`sys/resource.h'. + `%M' + The minute as a decimal number (range `00' through `59'). - - Function: int getrusage (int PROCESSES, struct rusage *RUSAGE) - This function reports resource usage totals for processes - specified by PROCESSES, storing the information in `*RUSAGE'. + `%n' + A single `\n' (newline) character. - In most systems, PROCESSES has only two valid values: + This format is a POSIX.2 extension and also appears in + ISO C99. - `RUSAGE_SELF' - Just the current process. + `%p' + Either `AM' or `PM', according to the given time value; or the + corresponding strings for the current locale. Noon is + treated as `PM' and midnight as `AM'. - `RUSAGE_CHILDREN' - All child processes (direct and indirect) that have already - terminated. + `%P' + Either `am' or `pm', according to the given time value; or the + corresponding strings for the current locale, printed in + lowercase characters. Noon is treated as `pm' and midnight + as `am'. - In the GNU system, you can also inquire about a particular child - process by specifying its process ID. + This format was introduced in ISO C99 but was previously + available as a GNU extension. - The return value of `getrusage' is zero for success, and `-1' for - failure. + `%r' + The complete calendar time using the AM/PM format of the + current locale. - `EINVAL' - The argument PROCESSES is not valid. + This format is a POSIX.2 extension and also appears in + ISO C99. - One way of getting resource usage for a particular child process is -with the function `wait4', which returns totals for a child when it -terminates. *Note BSD Wait Functions::. + `%R' + The hour and minute in decimal numbers using the format + `%H:%M'. - - Data Type: struct rusage - This data type stores various resource usage statistics. It has - the following members, and possibly others: + This format was introduced in ISO C99 but was previously + available as a GNU extension. - `struct timeval ru_utime' - Time spent executing user instructions. + `%s' + The number of seconds since the epoch, i.e., since 1970-01-01 + 00:00:00 UTC. Leap seconds are not counted unless leap + second support is available. - `struct timeval ru_stime' - Time spent in operating system code on behalf of PROCESSES. + This format is a GNU extension. - `long int ru_maxrss' - The maximum resident set size used, in kilobytes. That is, - the maximum number of kilobytes of physical memory that - PROCESSES used simultaneously. + `%S' + The seconds as a decimal number (range `00' through `60'). - `long int ru_ixrss' - An integral value expressed in kilobytes times ticks of - execution, which indicates the amount of memory used by text - that was shared with other processes. + `%t' + A single `\t' (tabulator) character. - `long int ru_idrss' - An integral value expressed the same way, which is the amount - of unshared memory used for data. + This format is a POSIX.2 extension and also appears in + ISO C99. - `long int ru_isrss' - An integral value expressed the same way, which is the amount - of unshared memory used for stack space. + `%T' + The time of day using decimal numbers using the format + `%H:%M:%S'. - `long int ru_minflt' - The number of page faults which were serviced without - requiring any I/O. + This format is a POSIX.2 extension. - `long int ru_majflt' - The number of page faults which were serviced by doing I/O. + `%u' + The day of the week as a decimal number (range `1' through + `7'), Monday being `1'. - `long int ru_nswap' - The number of times PROCESSES was swapped entirely out of - main memory. + This format is a POSIX.2 extension and also appears in + ISO C99. - `long int ru_inblock' - The number of times the file system had to read from the disk - on behalf of PROCESSES. + `%U' + The week number of the current year as a decimal number + (range `00' through `53'), starting with the first Sunday as + the first day of the first week. Days preceding the first + Sunday in the year are considered to be in week `00'. - `long int ru_oublock' - The number of times the file system had to write to the disk - on behalf of PROCESSES. + `%V' + The ISO 8601:1988 week number as a decimal number (range `01' + through `53'). ISO weeks start with Monday and end with + Sunday. Week `01' of a year is the first week which has the + majority of its days in that year; this is equivalent to the + week containing the year's first Thursday, and it is also + equivalent to the week containing January 4. Week `01' of a + year can contain days from the previous year. The week + before week `01' of a year is the last week (`52' or `53') of + the previous year even if it contains days from the new year. - `long int ru_msgsnd' - Number of IPC messages sent. + This format is a POSIX.2 extension and also appears in + ISO C99. - `long int ru_msgrcv' - Number of IPC messages received. + `%w' + The day of the week as a decimal number (range `0' through + `6'), Sunday being `0'. - `long int ru_nsignals' - Number of signals received. + `%W' + The week number of the current year as a decimal number + (range `00' through `53'), starting with the first Monday as + the first day of the first week. All days preceding the + first Monday in the year are considered to be in week `00'. - `long int ru_nvcsw' - The number of times PROCESSES voluntarily invoked a context - switch (usually to wait for some service). + `%x' + The preferred date representation for the current locale. - `long int ru_nivcsw' - The number of times an involuntary context switch took place - (because a time slice expired, or another process of higher - priority was scheduled). + `%X' + The preferred time of day representation for the current + locale. - `vtimes' is a historical function that does some of what `getrusage' -does. `getrusage' is a better choice. + `%y' + The year without a century as a decimal number (range `00' + through `99'). This is equivalent to the year modulo 100. - `vtimes' and its `vtimes' data structure are declared in -`sys/vtimes.h'. + `%Y' + The year as a decimal number, using the Gregorian calendar. + Years before the year `1' are numbered `0', `-1', and so on. - - Function: int vtimes (struct vtimes CURRENT, struct vtimes CHILD) - `vtimes' reports resource usage totals for a process. + `%z' + RFC 822/ISO 8601:1988 style numeric time zone (e.g., `-0600' + or `+0100'), or nothing if no time zone is determinable. - If CURRENT is non-null, `vtimes' stores resource usage totals for - the invoking process alone in the structure to which it points. If - CHILD is non-null, `vtimes' stores resource usage totals for all - past children (which have terminated) of the invoking process in - the structure to which it points. + This format was introduced in ISO C99 but was previously + available as a GNU extension. - - Data Type: struct vtimes - This data type contains information about the resource usage - of a process. Each member corresponds to a member of the - `struct rusage' data type described above. + A full RFC 822 timestamp is generated by the format + `"%a, %d %b %Y %H:%M:%S %z"' (or the equivalent + `"%a, %d %b %Y %T %z"'). - `vm_utime' - User CPU time. Analogous to `ru_utime' in `struct - rusage' + `%Z' + The time zone abbreviation (empty if the time zone can't be + determined). - `vm_stime' - System CPU time. Analogous to `ru_stime' in `struct - rusage' + `%%' + A literal `%' character. - `vm_idsrss' - Data and stack memory. The sum of the values that would - be reported as `ru_idrss' and `ru_isrss' in `struct - rusage' + The SIZE parameter can be used to specify the maximum number of + characters to be stored in the array S, including the terminating + null character. If the formatted time requires more than SIZE + characters, `strftime' returns zero and the contents of the array + S are undefined. Otherwise the return value indicates the number + of characters placed in the array S, not including the terminating + null character. - `vm_ixrss' - Shared memory. Analogous to `ru_ixrss' in `struct - rusage' + _Warning:_ This convention for the return value which is prescribed + in ISO C can lead to problems in some situations. For certain + format strings and certain locales the output really can be the + empty string and this cannot be discovered by testing the return + value only. E.g., in most locales the AM/PM time format is not + supported (most of the world uses the 24 hour time + representation). In such locales `"%p"' will return the empty + string, i.e., the return value is zero. To detect situations like + this something similar to the following code should be used: - `vm_maxrss' - Maximent resident set size. Analogous to `ru_maxrss' in - `struct rusage' + buf[0] = '\1'; + len = strftime (buf, bufsize, format, tp); + if (len == 0 && buf[0] != '\0') + { + /* Something went wrong in the strftime call. */ + ... + } - `vm_majflt' - Major page faults. Analogous to `ru_majflt' in `struct - rusage' + If S is a null pointer, `strftime' does not actually write + anything, but instead returns the number of characters it would + have written. - `vm_minflt' - Minor page faults. Analogous to `ru_minflt' in `struct - rusage' + According to POSIX.1 every call to `strftime' implies a call to + `tzset'. So the contents of the environment variable `TZ' is + examined before any output is produced. - `vm_nswap' - Swap count. Analogous to `ru_nswap' in `struct rusage' + For an example of `strftime', see *Note Time Functions Example::. - `vm_inblk' - Disk reads. Analogous to `ru_inblk' in `struct rusage' + - Function: size_t wcsftime (wchar_t *S, size_t SIZE, const wchar_t + *TEMPLATE, const struct tm *BROKENTIME) + The `wcsftime' function is equivalent to the `strftime' function + with the difference that it operates on wide character strings. + The buffer where the result is stored, pointed to by S, must be an + array of wide characters. The parameter SIZE which specifies the + size of the output buffer gives the number of wide character, not + the number of bytes. - `vm_oublk' - Disk writes. Analogous to `ru_oublk' in `struct rusage' + Also the format string TEMPLATE is a wide character string. Since + all characters needed to specify the format string are in the basic + character set it is portably possible to write format strings in + the C source code using the `L"..."' notation. The parameter + BROKENTIME has the same meaning as in the `strftime' call. - The return value is zero if the function succeeds; `-1' otherwise. + The `wcsftime' function supports the same flags, modifiers, and + format specifiers as the `strftime' function. - An additional historical function for examining resource usage, -`vtimes', is supported but not documented here. It is declared in -`sys/vtimes.h'. + The return value of `wcsftime' is the number of wide characters + stored in `s'. When more characters would have to be written than + can be placed in the buffer S the return value is zero, with the + same problems indicated in the `strftime' documentation.  -File: libc.info, Node: Limits on Resources, Next: Priority, Prev: Resource Usage, Up: Resource Usage And Limitation - -Limiting Resource Usage -======================= +File: libc.info, Node: Parsing Date and Time, Next: TZ Variable, Prev: Formatting Calendar Time, Up: Calendar Time - You can specify limits for the resource usage of a process. When the -process tries to exceed a limit, it may get a signal, or the system call -by which it tried to do so may fail, depending on the resource. Each -process initially inherits its limit values from its parent, but it can -subsequently change them. +Convert textual time and date information back +---------------------------------------------- - There are two per-process limits associated with a resource: + The ISO C standard does not specify any functions which can convert +the output of the `strftime' function back into a binary format. This +led to a variety of more-or-less successful implementations with +different interfaces over the years. Then the Unix standard was +extended by the addition of two functions: `strptime' and `getdate'. +Both have strange interfaces but at least they are widely available. -"current limit" - The current limit is the value the system will not allow usage to - exceed. It is also called the "soft limit" because the process - being limited can generally raise the current limit at will. +* Menu: -"maximum limit" - The maximum limit is the maximum value to which a process is - allowed to set its current limit. It is also called the "hard - limit" because there is no way for a process to get around it. A - process may lower its own maximum limit, but only the superuser - may increase a maximum limit. +* Low-Level Time String Parsing:: Interpret string according to given format. +* General Time String Parsing:: User-friendly function to parse data and + time strings. - The symbols for use with `getrlimit', `setrlimit', `getrlimit64', -and `setrlimit64' are defined in `sys/resource.h'. + +File: libc.info, Node: Low-Level Time String Parsing, Next: General Time String Parsing, Up: Parsing Date and Time - - Function: int getrlimit (int RESOURCE, struct rlimit *RLP) - Read the current and maximum limits for the resource RESOURCE and - store them in `*RLP'. +Interpret string according to given format +.......................................... - The return value is `0' on success and `-1' on failure. The only - possible `errno' error condition is `EFAULT'. + he first function is rather low-level. It is nevertheless frequently +used in software since it is better known. Its interface and +implementation are heavily influenced by the `getdate' function, which +is defined and implemented in terms of calls to `strptime'. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is in fact `getrlimit64'. Thus, the - LFS interface transparently replaces the old interface. + - Function: char * strptime (const char *S, const char *FMT, struct tm + *TP) + The `strptime' function parses the input string S according to the + format string FMT and stores its results in the structure TP. - - Function: int getrlimit64 (int RESOURCE, struct rlimit64 *RLP) - This function is similar to `getrlimit' but its second parameter is - a pointer to a variable of type `struct rlimit64', which allows it - to read values which wouldn't fit in the member of a `struct - rlimit'. + The input string could be generated by a `strftime' call or + obtained any other way. It does not need to be in a + human-recognizable format; e.g. a date passed as `"02:1999:9"' is + acceptable, even though it is ambiguous without context. As long + as the format string FMT matches the input string the function + will succeed. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit machine, this function is available under the name - `getrlimit' and so transparently replaces the old interface. + The user has to make sure, though, that the input can be parsed in + a unambiguous way. The string `"1999112"' can be parsed using the + format `"%Y%m%d"' as 1999-1-12, 1999-11-2, or even 19991-1-2. It + is necessary to add appropriate separators to reliably get results. - - Function: int setrlimit (int RESOURCE, const struct rlimit *RLP) - Store the current and maximum limits for the resource RESOURCE in - `*RLP'. + The format string consists of the same components as the format + string of the `strftime' function. The only difference is that + the flags `_', `-', `0', and `^' are not allowed. Several of the + distinct formats of `strftime' do the same work in `strptime' + since differences like case of the input do not matter. For + reasons of symmetry all formats are supported, though. - The return value is `0' on success and `-1' on failure. The - following `errno' error condition is possible: + The modifiers `E' and `O' are also allowed everywhere the + `strftime' function allows them. - `EPERM' - * The process tried to raise a current limit beyond the - maximum limit. + The formats are: - * The process tried to raise a maximum limit, but is not - superuser. + `%a' + `%A' + The weekday name according to the current locale, in + abbreviated form or the full name. - When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit system this function is in fact `setrlimit64'. Thus, the - LFS interface transparently replaces the old interface. + `%b' + `%B' + `%h' + The month name according to the current locale, in + abbreviated form or the full name. - - Function: int setrlimit64 (int RESOURCE, const struct rlimit64 *RLP) - This function is similar to `setrlimit' but its second parameter is - a pointer to a variable of type `struct rlimit64' which allows it - to set values which wouldn't fit in the member of a `struct - rlimit'. + `%c' + The date and time representation for the current locale. - If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a - 32-bit machine this function is available under the name - `setrlimit' and so transparently replaces the old interface. + `%Ec' + Like `%c' but the locale's alternative date and time format + is used. - - Data Type: struct rlimit - This structure is used with `getrlimit' to receive limit values, - and with `setrlimit' to specify limit values for a particular - process and resource. It has two fields: + `%C' + The century of the year. - `rlim_t rlim_cur' - The current limit + It makes sense to use this format only if the format string + also contains the `%y' format. - `rlim_t rlim_max' - The maximum limit. + `%EC' + The locale's representation of the period. - For `getrlimit', the structure is an output; it receives the - current values. For `setrlimit', it specifies the new values. + Unlike `%C' it sometimes makes sense to use this format since + some cultures represent years relative to the beginning of + eras instead of using the Gregorian years. - For the LFS functions a similar type is defined in `sys/resource.h'. + `%d' - - Data Type: struct rlimit64 - This structure is analogous to the `rlimit' structure above, but - its components have wider ranges. It has two fields: + `%e' + The day of the month as a decimal number (range `1' through + `31'). Leading zeroes are permitted but not required. - `rlim64_t rlim_cur' - This is analogous to `rlimit.rlim_cur', but with a different - type. + `%Od' + `%Oe' + Same as `%d' but using the locale's alternative numeric + symbols. - `rlim64_t rlim_max' - This is analogous to `rlimit.rlim_max', but with a different - type. + Leading zeroes are permitted but not required. + `%D' + Equivalent to `%m/%d/%y'. - Here is a list of resources for which you can specify a limit. -Memory and file sizes are measured in bytes. + `%F' + Equivalent to `%Y-%m-%d', which is the ISO 8601 date format. -`RLIMIT_CPU' - The maximum amount of CPU time the process can use. If it runs for - longer than this, it gets a signal: `SIGXCPU'. The value is - measured in seconds. *Note Operation Error Signals::. + This is a GNU extension following an ISO C99 extension to + `strftime'. -`RLIMIT_FSIZE' - The maximum size of file the process can create. Trying to write a - larger file causes a signal: `SIGXFSZ'. *Note Operation Error - Signals::. + `%g' + The year corresponding to the ISO week number, but without + the century (range `00' through `99'). -`RLIMIT_DATA' - The maximum size of data memory for the process. If the process - tries to allocate data memory beyond this amount, the allocation - function fails. + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. -`RLIMIT_STACK' - The maximum stack size for the process. If the process tries to - extend its stack past this size, it gets a `SIGSEGV' signal. - *Note Program Error Signals::. + This format is a GNU extension following a GNU extension of + `strftime'. -`RLIMIT_CORE' - The maximum size core file that this process can create. If the - process terminates and would dump a core file larger than this, - then no core file is created. So setting this limit to zero - prevents core files from ever being created. + `%G' + The year corresponding to the ISO week number. -`RLIMIT_RSS' - The maximum amount of physical memory that this process should get. - This parameter is a guide for the system's scheduler and memory - allocator; the system may give the process more memory when there - is a surplus. + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. -`RLIMIT_MEMLOCK' - The maximum amount of memory that can be locked into physical - memory (so it will never be paged out). + This format is a GNU extension following a GNU extension of + `strftime'. -`RLIMIT_NPROC' - The maximum number of processes that can be created with the same - user ID. If you have reached the limit for your user ID, `fork' - will fail with `EAGAIN'. *Note Creating a Process::. + `%H' + `%k' + The hour as a decimal number, using a 24-hour clock (range + `00' through `23'). -`RLIMIT_NOFILE' -`RLIMIT_OFILE' - The maximum number of files that the process can open. If it - tries to open more files than this, its open attempt fails with - `errno' `EMFILE'. *Note Error Codes::. Not all systems support - this limit; GNU does, and 4.4 BSD does. + `%k' is a GNU extension following a GNU extension of + `strftime'. -`RLIMIT_AS' - The maximum size of total memory that this process should get. If - the process tries to allocate more memory beyond this amount with, - for example, `brk', `malloc', `mmap' or `sbrk', the allocation - function fails. + `%OH' + Same as `%H' but using the locale's alternative numeric + symbols. -`RLIM_NLIMITS' - The number of different resource limits. Any valid RESOURCE - operand must be less than `RLIM_NLIMITS'. + `%I' + `%l' + The hour as a decimal number, using a 12-hour clock (range + `01' through `12'). - - Constant: int RLIM_INFINITY - This constant stands for a value of "infinity" when supplied as - the limit value in `setrlimit'. + `%l' is a GNU extension following a GNU extension of + `strftime'. - The following are historical functions to do some of what the -functions above do. The functions above are better choices. + `%OI' + Same as `%I' but using the locale's alternative numeric + symbols. - `ulimit' and the command symbols are declared in `ulimit.h'. + `%j' + The day of the year as a decimal number (range `1' through + `366'). - - Function: int ulimit (int CMD, ...) - `ulimit' gets the current limit or sets the current and maximum - limit for a particular resource for the calling process according - to the command CMD.a + Leading zeroes are permitted but not required. - If you are getting a limit, the command argument is the only - argument. If you are setting a limit, there is a second argument: - `long int' LIMIT which is the value to which you are setting the - limit. + `%m' + The month as a decimal number (range `1' through `12'). - The CMD values and the operations they specify are: - `GETFSIZE' - Get the current limit on the size of a file, in units of 512 - bytes. + Leading zeroes are permitted but not required. - `SETFSIZE' - Set the current and maximum limit on the size of a file to - LIMIT * 512 bytes. + `%Om' + Same as `%m' but using the locale's alternative numeric + symbols. - There are also some other CMD values that may do things on some - systems, but they are not supported. + `%M' + The minute as a decimal number (range `0' through `59'). - Only the superuser may increase a maximum limit. + Leading zeroes are permitted but not required. - When you successfully get a limit, the return value of `ulimit' is - that limit, which is never negative. When you successfully set a - limit, the return value is zero. When the function fails, the - return value is `-1' and `errno' is set according to the reason: + `%OM' + Same as `%M' but using the locale's alternative numeric + symbols. - `EPERM' - A process tried to increase a maximum limit, but is not - superuser. + `%n' + `%t' + Matches any white space. + `%p' - `vlimit' and its resource symbols are declared in `sys/vlimit.h'. + `%P' + The locale-dependent equivalent to `AM' or `PM'. - - Function: int vlimit (int RESOURCE, int LIMIT) - `vlimit' sets the current limit for a resource for a process. + This format is not useful unless `%I' or `%l' is also used. + Another complication is that the locale might not define + these values at all and therefore the conversion fails. - RESOURCE identifies the resource: + `%P' is a GNU extension following a GNU extension to + `strftime'. - `LIM_CPU' - Maximum CPU time. Same as `RLIMIT_CPU' for `setrlimit'. + `%r' + The complete time using the AM/PM format of the current + locale. - `LIM_FSIZE' - Maximum file size. Same as `RLIMIT_FSIZE' for `setrlimit'. + A complication is that the locale might not define this + format at all and therefore the conversion fails. - `LIM_DATA' - Maximum data memory. Same as `RLIMIT_DATA' for `setrlimit'. + `%R' + The hour and minute in decimal numbers using the format + `%H:%M'. - `LIM_STACK' - Maximum stack size. Same as `RLIMIT_STACK' for `setrlimit'. + `%R' is a GNU extension following a GNU extension to + `strftime'. - `LIM_CORE' - Maximum core file size. Same as `RLIMIT_COR' for `setrlimit'. + `%s' + The number of seconds since the epoch, i.e., since 1970-01-01 + 00:00:00 UTC. Leap seconds are not counted unless leap + second support is available. - `LIM_MAXRSS' - Maximum physical memory. Same as `RLIMIT_RSS' for - `setrlimit'. + `%s' is a GNU extension following a GNU extension to + `strftime'. - The return value is zero for success, and `-1' with `errno' set - accordingly for failure: + `%S' + The seconds as a decimal number (range `0' through `60'). - `EPERM' - The process tried to set its current limit beyond its maximum - limit. + Leading zeroes are permitted but not required. + *Note:* The Unix specification says the upper bound on this + value is `61', a result of a decision to allow double leap + seconds. You will not see the value `61' because no minute + has more than one leap second, but the myth persists. - -File: libc.info, Node: Priority, Next: Memory Resources, Prev: Limits on Resources, Up: Resource Usage And Limitation + `%OS' + Same as `%S' but using the locale's alternative numeric + symbols. -Process CPU Priority And Scheduling -=================================== + `%T' + Equivalent to the use of `%H:%M:%S' in this place. - When multiple processes simultaneously require CPU time, the system's -scheduling policy and process CPU priorities determine which processes -get it. This section describes how that determination is made and GNU -C library functions to control it. + `%u' + The day of the week as a decimal number (range `1' through + `7'), Monday being `1'. - It is common to refer to CPU scheduling simply as scheduling and a -process' CPU priority simply as the process' priority, with the CPU -resource being implied. Bear in mind, though, that CPU time is not the -only resource a process uses or that processes contend for. In some -cases, it is not even particularly important. Giving a process a high -"priority" may have very little effect on how fast a process runs with -respect to other processes. The priorities discussed in this section -apply only to CPU time. + Leading zeroes are permitted but not required. - CPU scheduling is a complex issue and different systems do it in -wildly different ways. New ideas continually develop and find their -way into the intricacies of the various systems' scheduling algorithms. -This section discusses the general concepts, some specifics of systems -that commonly use the GNU C library, and some standards. + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. - For simplicity, we talk about CPU contention as if there is only one -CPU in the system. But all the same principles apply when a processor -has multiple CPUs, and knowing that the number of processes that can -run at any one time is equal to the number of CPUs, you can easily -extrapolate the information. + `%U' + The week number of the current year as a decimal number + (range `0' through `53'). - The functions described in this section are all defined by the -POSIX.1 and POSIX.1b standards (the `sched...' functions are POSIX.1b). -However, POSIX does not define any semantics for the values that these -functions get and set. In this chapter, the semantics are based on the -Linux kernel's implementation of the POSIX standard. As you will see, -the Linux implementation is quite the inverse of what the authors of the -POSIX syntax had in mind. + Leading zeroes are permitted but not required. -* Menu: + `%OU' + Same as `%U' but using the locale's alternative numeric + symbols. -* Absolute Priority:: The first tier of priority. Posix -* Realtime Scheduling:: Scheduling among the process nobility -* Basic Scheduling Functions:: Get/set scheduling policy, priority -* Traditional Scheduling:: Scheduling among the vulgar masses + `%V' + The ISO 8601:1988 week number as a decimal number (range `1' + through `53'). - -File: libc.info, Node: Absolute Priority, Next: Realtime Scheduling, Up: Priority + Leading zeroes are permitted but not required. -Absolute Priority ------------------ + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. - Every process has an absolute priority, and it is represented by a -number. The higher the number, the higher the absolute priority. + `%w' + The day of the week as a decimal number (range `0' through + `6'), Sunday being `0'. - On systems of the past, and most systems today, all processes have -absolute priority 0 and this section is irrelevant. In that case, -*Note Traditional Scheduling::. Absolute priorities were invented to -accommodate realtime systems, in which it is vital that certain -processes be able to respond to external events happening in real time, -which means they cannot wait around while some other process that _wants -to_, but doesn't _need to_ run occupies the CPU. + Leading zeroes are permitted but not required. - When two processes are in contention to use the CPU at any instant, -the one with the higher absolute priority always gets it. This is true -even if the process with the lower priority is already using the CPU -(i.e. the scheduling is preemptive). Of course, we're only talking -about processes that are running or "ready to run," which means they are -ready to execute instructions right now. When a process blocks to wait -for something like I/O, its absolute priority is irrelevant. + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. - *Note:* The term "runnable" is a synonym for "ready to run." + `%Ow' + Same as `%w' but using the locale's alternative numeric + symbols. - When two processes are running or ready to run and both have the same -absolute priority, it's more interesting. In that case, who gets the -CPU is determined by the scheduling policy. If the processes have -absolute priority 0, the traditional scheduling policy described in -*Note Traditional Scheduling:: applies. Otherwise, the policies -described in *Note Realtime Scheduling:: apply. + `%W' + The week number of the current year as a decimal number + (range `0' through `53'). - You normally give an absolute priority above 0 only to a process that -can be trusted not to hog the CPU. Such processes are designed to block -(or terminate) after relatively short CPU runs. + Leading zeroes are permitted but not required. - A process begins life with the same absolute priority as its parent -process. Functions described in *Note Basic Scheduling Functions:: can -change it. + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. - Only a privileged process can change a process' absolute priority to -something other than `0'. Only a privileged process or the target -process' owner can change its absolute priority at all. + `%OW' + Same as `%W' but using the locale's alternative numeric + symbols. - POSIX requires absolute priority values used with the realtime -scheduling policies to be consecutive with a range of at least 32. On -Linux, they are 1 through 99. The functions `sched_get_priority_max' -and `sched_set_priority_min' portably tell you what the range is on a -particular system. + `%x' + The date using the locale's date format. -Using Absolute Priority -....................... + `%Ex' + Like `%x' but the locale's alternative data representation is + used. - One thing you must keep in mind when designing real time -applications is that having higher absolute priority than any other -process doesn't guarantee the process can run continuously. Two things -that can wreck a good CPU run are interrupts and page faults. + `%X' + The time using the locale's time format. - Interrupt handlers live in that limbo between processes. The CPU is -executing instructions, but they aren't part of any process. An -interrupt will stop even the highest priority process. So you must -allow for slight delays and make sure that no device in the system has -an interrupt handler that could cause too long a delay between -instructions for your process. + `%EX' + Like `%X' but the locale's alternative time representation is + used. - Similarly, a page fault causes what looks like a straightforward -sequence of instructions to take a long time. The fact that other -processes get to run while the page faults in is of no consequence, -because as soon as the I/O is complete, the high priority process will -kick them out and run again, but the wait for the I/O itself could be a -problem. To neutralize this threat, use `mlock' or `mlockall'. + `%y' + The year without a century as a decimal number (range `0' + through `99'). - There are a few ramifications of the absoluteness of this priority -on a single-CPU system that you need to keep in mind when you choose to -set a priority and also when you're working on a program that runs with -high absolute priority. Consider a process that has higher absolute -priority than any other process in the system and due to a bug in its -program, it gets into an infinite loop. It will never cede the CPU. -You can't run a command to kill it because your command would need to -get the CPU in order to run. The errant program is in complete -control. It controls the vertical, it controls the horizontal. + Leading zeroes are permitted but not required. - There are two ways to avoid this: 1) keep a shell running somewhere -with a higher absolute priority. 2) keep a controlling terminal -attached to the high priority process group. All the priority in the -world won't stop an interrupt handler from running and delivering a -signal to the process if you hit Control-C. + Note that it is questionable to use this format without the + `%C' format. The `strptime' function does regard input + values in the range 68 to 99 as the years 1969 to 1999 and + the values 0 to 68 as the years 2000 to 2068. But maybe this + heuristic fails for some input data. - Some systems use absolute priority as a means of allocating a fixed -percentage of CPU time to a process. To do this, a super high priority -privileged process constantly monitors the process' CPU usage and raises -its absolute priority when the process isn't getting its entitled share -and lowers it when the process is exceeding it. + Therefore it is best to avoid `%y' completely and use `%Y' + instead. - *Note:* The absolute priority is sometimes called the "static -priority." We don't use that term in this manual because it misses the -most important feature of the absolute priority: its absoluteness. + `%Ey' + The offset from `%EC' in the locale's alternative + representation. - -File: libc.info, Node: Realtime Scheduling, Next: Basic Scheduling Functions, Prev: Absolute Priority, Up: Priority + `%Oy' + The offset of the year (from `%C') using the locale's + alternative numeric symbols. -Realtime Scheduling -------------------- + `%Y' + The year as a decimal number, using the Gregorian calendar. - Whenever two processes with the same absolute priority are ready to -run, the kernel has a decision to make, because only one can run at a -time. If the processes have absolute priority 0, the kernel makes this -decision as described in *Note Traditional Scheduling::. Otherwise, -the decision is as described in this section. + `%EY' + The full alternative year representation. - If two processes are ready to run but have different absolute -priorities, the decision is much simpler, and is described in *Note -Absolute Priority::. + `%z' + The offset from GMT in ISO 8601/RFC822 format. - Each process has a scheduling policy. For processes with absolute -priority other than zero, there are two available: + `%Z' + The timezone name. - 1. First Come First Served + _Note:_ Currently, this is not fully implemented. The format + is recognized, input is consumed but no field in TM is set. - 2. Round Robin + `%%' + A literal `%' character. - The most sensible case is where all the processes with a certain -absolute priority have the same scheduling policy. We'll discuss that -first. + All other characters in the format string must have a matching + character in the input string. Exceptions are white spaces in the + input string which can match zero or more white space characters + in the format string. - In Round Robin, processes share the CPU, each one running for a small -quantum of time ("time slice") and then yielding to another in a -circular fashion. Of course, only processes that are ready to run and -have the same absolute priority are in this circle. + The `strptime' function processes the input string from right to + left. Each of the three possible input elements (white space, + literal, or format) are handled one after the other. If the input + cannot be matched to the format string the function stops. The + remainder of the format and input strings are not processed. - In First Come First Served, the process that has been waiting the -longest to run gets the CPU, and it keeps it until it voluntarily -relinquishes the CPU, runs out of things to do (blocks), or gets -preempted by a higher priority process. + The function returns a pointer to the first character it was + unable to process. If the input string contains more characters + than required by the format string the return value points right + after the last consumed input character. If the whole input + string is consumed the return value points to the `NULL' byte at + the end of the string. If an error occurs, i.e. `strptime' fails + to match all of the format string, the function returns `NULL'. - First Come First Served, along with maximal absolute priority and -careful control of interrupts and page faults, is the one to use when a -process absolutely, positively has to run at full CPU speed or not at -all. + The specification of the function in the XPG standard is rather +vague, leaving out a few important pieces of information. Most +importantly, it does not specify what happens to those elements of TM +which are not directly initialized by the different formats. The +implementations on different Unix systems vary here. - Judicious use of `sched_yield' function invocations by processes -with First Come First Served scheduling policy forms a good compromise -between Round Robin and First Come First Served. + The GNU libc implementation does not touch those fields which are not +directly initialized. Exceptions are the `tm_wday' and `tm_yday' +elements, which are recomputed if any of the year, month, or date +elements changed. This has two implications: - To understand how scheduling works when processes of different -scheduling policies occupy the same absolute priority, you have to know -the nitty gritty details of how processes enter and exit the ready to -run list: + * Before calling the `strptime' function for a new input string, you + should prepare the TM structure you pass. Normally this will mean + initializing all values are to zero. Alternatively, you can set + all fields to values like `INT_MAX', allowing you to determine + which elements were set by the function call. Zero does not work + here since it is a valid value for many of the fields. - In both cases, the ready to run list is organized as a true queue, -where a process gets pushed onto the tail when it becomes ready to run -and is popped off the head when the scheduler decides to run it. Note -that ready to run and running are two mutually exclusive states. When -the scheduler runs a process, that process is no longer ready to run -and no longer in the ready to run list. When the process stops -running, it may go back to being ready to run again. + Careful initialization is necessary if you want to find out + whether a certain field in TM was initialized by the function call. - The only difference between a process that is assigned the Round -Robin scheduling policy and a process that is assigned First Come First -Serve is that in the former case, the process is automatically booted -off the CPU after a certain amount of time. When that happens, the -process goes back to being ready to run, which means it enters the -queue at the tail. The time quantum we're talking about is small. -Really small. This is not your father's timesharing. For example, -with the Linux kernel, the round robin time slice is a thousand times -shorter than its typical time slice for traditional scheduling. + * You can construct a `struct tm' value with several consecutive + `strptime' calls. A useful application of this is e.g. the parsing + of two separate strings, one containing date information and the + other time information. By parsing one after the other without + clearing the structure in-between, you can construct a complete + broken-down time. - A process begins life with the same scheduling policy as its parent -process. Functions described in *Note Basic Scheduling Functions:: can -change it. + The following example shows a function which parses a string which is +contains the date information in either US style or ISO 8601 form: - Only a privileged process can set the scheduling policy of a process -that has absolute priority higher than 0. + const char * + parse_date (const char *input, struct tm *tm) + { + const char *cp; + + /* First clear the result structure. */ + memset (tm, '\0', sizeof (*tm)); + + /* Try the ISO format first. */ + cp = strptime (input, "%F", tm); + if (cp == NULL) + { + /* Does not match. Try the US form. */ + cp = strptime (input, "%D", tm); + } + + return cp; + }  -File: libc.info, Node: Basic Scheduling Functions, Next: Traditional Scheduling, Prev: Realtime Scheduling, Up: Priority +File: libc.info, Node: General Time String Parsing, Prev: Low-Level Time String Parsing, Up: Parsing Date and Time -Basic Scheduling Functions --------------------------- +A More User-friendly Way to Parse Times and Dates +................................................. - This section describes functions in the GNU C library for setting the -absolute priority and scheduling policy of a process. + The Unix standard defines another function for parsing date strings. +The interface is weird, but if the function happens to suit your +application it is just fine. It is problematic to use this function in +multi-threaded programs or libraries, since it returns a pointer to a +static variable, and uses a global variable and global state (an +environment variable). - *Portability Note:* On systems that have the functions in this -section, the macro _POSIX_PRIORITY_SCHEDULING is defined in -`'. + - Variable: getdate_err + This variable of type `int' contains the error code of the last + unsuccessful call to `getdate'. Defined values are: - For the case that the scheduling policy is traditional scheduling, -more functions to fine tune the scheduling are in *Note Traditional -Scheduling::. + 1 + The environment variable `DATEMSK' is not defined or null. - Don't try to make too much out of the naming and structure of these -functions. They don't match the concepts described in this manual -because the functions are as defined by POSIX.1b, but the implementation -on systems that use the GNU C library is the inverse of what the POSIX -structure contemplates. The POSIX scheme assumes that the primary -scheduling parameter is the scheduling policy and that the priority -value, if any, is a parameter of the scheduling policy. In the -implementation, though, the priority value is king and the scheduling -policy, if anything, only fine tunes the effect of that priority. + 2 + The template file denoted by the `DATEMSK' environment + variable cannot be opened. - The symbols in this section are declared by including file `sched.h'. + 3 + Information about the template file cannot retrieved. - - Data Type: struct sched_param - This structure describes an absolute priority. - `int sched_priority' - absolute priority value + 4 + The template file is not a regular file. - - Function: int sched_setscheduler (pid_t PID, int POLICY, const - struct sched_param *PARAM) - This function sets both the absolute priority and the scheduling - policy for a process. + 5 + An I/O error occurred while reading the template file. - It assigns the absolute priority value given by PARAM and the - scheduling policy POLICY to the process with Process ID PID, or - the calling process if PID is zero. If POLICY is negative, - `sched_setscheduler' keeps the existing scheduling policy. + 6 + Not enough memory available to execute the function. - The following macros represent the valid values for POLICY: + 7 + The template file contains no matching template. - `SCHED_OTHER' - Traditional Scheduling + 8 + The input date is invalid, but would match a template + otherwise. This includes dates like February 31st, and dates + which cannot be represented in a `time_t' variable. - `SCHED_FIFO' - First In First Out + - Function: struct tm * getdate (const char *STRING) + The interface to `getdate' is the simplest possible for a function + to parse a string and return the value. STRING is the input + string and the result is returned in a statically-allocated + variable. - `SCHED_RR' - Round Robin + The details about how the string is processed are hidden from the + user. In fact, they can be outside the control of the program. + Which formats are recognized is controlled by the file named by + the environment variable `DATEMSK'. This file should contain + lines of valid format strings which could be passed to `strptime'. - On success, the return value is `0'. Otherwise, it is `-1' and - `ERRNO' is set accordingly. The `errno' values specific to this - function are: + The `getdate' function reads these format strings one after the + other and tries to match the input string. The first line which + completely matches the input string is used. - `EPERM' - * The calling process does not have `CAP_SYS_NICE' - permission and POLICY is not `SCHED_OTHER' (or it's - negative and the existing policy is not `SCHED_OTHER'. + Elements not initialized through the format string retain the + values present at the time of the `getdate' function call. - * The calling process does not have `CAP_SYS_NICE' - permission and its owner is not the target process' - owner. I.e. the effective uid of the calling process - is neither the effective nor the real uid of process PID. + The formats recognized by `getdate' are the same as for + `strptime'. See above for an explanation. There are only a few + extensions to the `strptime' behavior: - `ESRCH' - There is no process with pid PID and PID is not zero. + * If the `%Z' format is given the broken-down time is based on + the current time of the timezone matched, not of the current + timezone of the runtime environment. - `EINVAL' - * POLICY does not identify an existing scheduling policy. + _Note_: This is not implemented (currently). The problem is + that timezone names are not unique. If a fixed timezone is + assumed for a given string (say `EST' meaning US East Coast + time), then uses for countries other than the USA will fail. + So far we have found no good solution to this. - * The absolute priority value identified by *PARAM is - outside the valid range for the scheduling policy POLICY - (or the existing scheduling policy if POLICY is - negative) or PARAM is null. `sched_get_priority_max' - and `sched_get_priority_min' tell you what the valid - range is. + * If only the weekday is specified the selected day depends on + the current date. If the current weekday is greater or equal + to the `tm_wday' value the current week's day is chosen, + otherwise the day next week is chosen. - * PID is negative. + * A similar heuristic is used when only the month is given and + not the year. If the month is greater than or equal to the + current month, then the current year is used. Otherwise it + wraps to next year. The first day of the month is assumed if + one is not explicitly specified. + * The current hour, minute, and second are used if the + appropriate value is not set through the format. - - Function: int sched_getscheduler (pid_t PID) - This function returns the scheduling policy assigned to the - process with Process ID (pid) PID, or the calling process if PID - is zero. + * If no date is given tomorrow's date is used if the time is + smaller than the current time. Otherwise today's date is + taken. - The return value is the scheduling policy. See - `sched_setscheduler' for the possible values. + It should be noted that the format in the template file need not + only contain format elements. The following is a list of possible + format strings (taken from the Unix standard): - If the function fails, the return value is instead `-1' and - `errno' is set accordingly. + %m + %A %B %d, %Y %H:%M:%S + %A + %B + %m/%d/%y %I %p + %d,%m,%Y %H:%M + at %A the %dst of %B in %Y + run job at %I %p,%B %dnd + %A den %d. %B %Y %H.%M Uhr - The `errno' values specific to this function are: + As you can see, the template list can contain very specific + strings like `run job at %I %p,%B %dnd'. Using the above list of + templates and assuming the current time is Mon Sep 22 12:19:47 EDT + 1986 we can obtain the following results for the given input. - `ESRCH' - There is no process with pid PID and it is not zero. + Input Match Result + Mon %a Mon Sep 22 12:19:47 EDT 1986 + Sun %a Sun Sep 28 12:19:47 EDT 1986 + Fri %a Fri Sep 26 12:19:47 EDT 1986 + September %B Mon Sep 1 12:19:47 EDT 1986 + January %B Thu Jan 1 12:19:47 EST 1987 + December %B Mon Dec 1 12:19:47 EST 1986 + Sep Mon %b %a Mon Sep 1 12:19:47 EDT 1986 + Jan Fri %b %a Fri Jan 2 12:19:47 EST 1987 + Dec Mon %b %a Mon Dec 1 12:19:47 EST 1986 + Jan Wed 1989 %b %a %Y Wed Jan 4 12:19:47 EST 1989 + Fri 9 %a %H Fri Sep 26 09:00:00 EDT 1986 + Feb 10:30 %b %H:%S Sun Feb 1 10:00:30 EST 1987 + 10:30 %H:%M Tue Sep 23 10:30:00 EDT 1986 + 13:30 %H:%M Mon Sep 22 13:30:00 EDT 1986 - `EINVAL' - PID is negative. + The return value of the function is a pointer to a static variable + of type `struct tm', or a null pointer if an error occurred. The + result is only valid until the next `getdate' call, making this + function unusable in multi-threaded applications. - Note that this function is not an exact mate to - `sched_setscheduler' because while that function sets the - scheduling policy and the absolute priority, this function gets - only the scheduling policy. To get the absolute priority, use - `sched_getparam'. + The `errno' variable is _not_ changed. Error conditions are + stored in the global variable `getdate_err'. See the description + above for a list of the possible error values. + _Warning:_ The `getdate' function should _never_ be used in + SUID-programs. The reason is obvious: using the `DATEMSK' + environment variable you can get the function to open any + arbitrary file and chances are high that with some bogus input + (such as a binary file) the program will crash. - - Function: int sched_setparam (pid_t PID, const struct sched_param - *PARAM) - This function sets a process' absolute priority. + - Function: int getdate_r (const char *STRING, struct tm *TP) + The `getdate_r' function is the reentrant counterpart of + `getdate'. It does not use the global variable `getdate_err' to + signal an error, but instead returns an error code. The same error + codes as described in the `getdate_err' documentation above are + used, with 0 meaning success. - It is functionally identical to `sched_setscheduler' with POLICY = - `-1'. + Moreover, `getdate_r' stores the broken-down time in the variable + of type `struct tm' pointed to by the second argument, rather than + in a static variable. + This function is not defined in the Unix standard. Nevertheless + it is available on some other Unix systems as well. - - Function: int sched_getparam (pid_t PID, const struct sched_param - *PARAM) - This function returns a process' absolute priority. + The warning against using `getdate' in SUID-programs applies to + `getdate_r' as well. - PID is the Process ID (pid) of the process whose absolute priority - you want to know. + +File: libc.info, Node: TZ Variable, Next: Time Zone Functions, Prev: Parsing Date and Time, Up: Calendar Time - PARAM is a pointer to a structure in which the function stores the - absolute priority of the process. +Specifying the Time Zone with `TZ' +---------------------------------- - On success, the return value is `0'. Otherwise, it is `-1' and - `ERRNO' is set accordingly. The `errno' values specific to this - function are: + In POSIX systems, a user can specify the time zone by means of the +`TZ' environment variable. For information about how to set +environment variables, see *Note Environment Variables::. The functions +for accessing the time zone are declared in `time.h'. - `ESRCH' - There is no process with pid PID and it is not zero. + You should not normally need to set `TZ'. If the system is +configured properly, the default time zone will be correct. You might +set `TZ' if you are using a computer over a network from a different +time zone, and would like times reported to you in the time zone local +to you, rather than what is local to the computer. - `EINVAL' - PID is negative. + In POSIX.1 systems the value of the `TZ' variable can be in one of +three formats. With the GNU C library, the most common format is the +last one, which can specify a selection from a large database of time +zone information for many regions of the world. The first two formats +are used to describe the time zone information directly, which is both +more cumbersome and less precise. But the POSIX.1 standard only +specifies the details of the first two formats, so it is good to be +familiar with them in case you come across a POSIX.1 system that doesn't +support a time zone information database. + The first format is used when there is no Daylight Saving Time (or +summer time) in the local time zone: - - Function: int sched_get_priority_min (int *POLICY); - This function returns the lowest absolute priority value that is - allowable for a process with scheduling policy POLICY. + STD OFFSET - On Linux, it is 0 for SCHED_OTHER and 1 for everything else. + The STD string specifies the name of the time zone. It must be +three or more characters long and must not contain a leading colon, +embedded digits, commas, nor plus and minus signs. There is no space +character separating the time zone name from the OFFSET, so these +restrictions are necessary to parse the specification correctly. - On success, the return value is `0'. Otherwise, it is `-1' and - `ERRNO' is set accordingly. The `errno' values specific to this - function are: + The OFFSET specifies the time value you must add to the local time +to get a Coordinated Universal Time value. It has syntax like +[`+'|`-']HH[`:'MM[`:'SS]]. This is positive if the local time zone is +west of the Prime Meridian and negative if it is east. The hour must +be between `0' and `23', and the minute and seconds between `0' and +`59'. - `EINVAL' - POLICY does not identify an existing scheduling policy. + For example, here is how we would specify Eastern Standard Time, but +without any Daylight Saving Time alternative: + EST+5 - - Function: int sched_get_priority_max (int *POLICY); - This function returns the highest absolute priority value that is - allowable for a process that with scheduling policy POLICY. + The second format is used when there is Daylight Saving Time: - On Linux, it is 0 for SCHED_OTHER and 99 for everything else. + STD OFFSET DST [OFFSET]`,'START[`/'TIME]`,'END[`/'TIME] - On success, the return value is `0'. Otherwise, it is `-1' and - `ERRNO' is set accordingly. The `errno' values specific to this - function are: + The initial STD and OFFSET specify the standard time zone, as +described above. The DST string and OFFSET specify the name and offset +for the corresponding Daylight Saving Time zone; if the OFFSET is +omitted, it defaults to one hour ahead of standard time. - `EINVAL' - POLICY does not identify an existing scheduling policy. + The remainder of the specification describes when Daylight Saving +Time is in effect. The START field is when Daylight Saving Time goes +into effect and the END field is when the change is made back to +standard time. The following formats are recognized for these fields: +`JN' + This specifies the Julian day, with N between `1' and `365'. + February 29 is never counted, even in leap years. - - Function: int sched_rr_get_interval (pid_t PID, struct timespec - *INTERVAL) - This function returns the length of the quantum (time slice) used - with the Round Robin scheduling policy, if it is used, for the - process with Process ID PID. +`N' + This specifies the Julian day, with N between `0' and `365'. + February 29 is counted in leap years. - It returns the length of time as INTERVAL. +`MM.W.D' + This specifies day D of week W of month M. The day D must be + between `0' (Sunday) and `6'. The week W must be between `1' and + `5'; week `1' is the first week in which day D occurs, and week + `5' specifies the _last_ D day in the month. The month M should be + between `1' and `12'. - With a Linux kernel, the round robin time slice is always 150 - microseconds, and PID need not even be a real pid. + The TIME fields specify when, in the local time currently in effect, +the change to the other time occurs. If omitted, the default is +`02:00:00'. - The return value is `0' on success and in the pathological case - that it fails, the return value is `-1' and `errno' is set - accordingly. There is nothing specific that can go wrong with this - function, so there are no specific `errno' values. + For example, here is how you would specify the Eastern time zone in +the United States, including the appropriate Daylight Saving Time and +its dates of applicability. The normal offset from UTC is 5 hours; +since this is west of the prime meridian, the sign is positive. Summer +time begins on the first Sunday in April at 2:00am, and ends on the +last Sunday in October at 2:00am. + EST+5EDT,M4.1.0/2,M10.5.0/2 - - Function: int sched_yield (void) - This function voluntarily gives up the process' claim on the CPU. + The schedule of Daylight Saving Time in any particular jurisdiction +has changed over the years. To be strictly correct, the conversion of +dates and times in the past should be based on the schedule that was in +effect then. However, this format has no facilities to let you specify +how the schedule has changed from year to year. The most you can do is +specify one particular schedule--usually the present day schedule--and +this is used to convert any date, no matter when. For precise time zone +specifications, it is best to use the time zone information database +(see below). - Technically, `sched_yield' causes the calling process to be made - immediately ready to run (as opposed to running, which is what it - was before). This means that if it has absolute priority higher - than 0, it gets pushed onto the tail of the queue of processes - that share its absolute priority and are ready to run, and it will - run again when its turn next arrives. If its absolute priority is - 0, it is more complicated, but still has the effect of yielding - the CPU to other processes. + The third format looks like this: - If there are no other processes that share the calling process' - absolute priority, this function doesn't have any effect. + :CHARACTERS - To the extent that the containing program is oblivious to what - other processes in the system are doing and how fast it executes, - this function appears as a no-op. + Each operating system interprets this format differently; in the GNU +C library, CHARACTERS is the name of a file which describes the time +zone. - The return value is `0' on success and in the pathological case - that it fails, the return value is `-1' and `errno' is set - accordingly. There is nothing specific that can go wrong with this - function, so there are no specific `errno' values. + If the `TZ' environment variable does not have a value, the +operation chooses a time zone by default. In the GNU C library, the +default time zone is like the specification `TZ=:/etc/localtime' (or +`TZ=:/usr/local/etc/localtime', depending on how GNU C library was +configured; *note Installation::). Other C libraries use their own +rule for choosing the default time zone, so there is little we can say +about them. + If CHARACTERS begins with a slash, it is an absolute file name; +otherwise the library looks for the file +`/share/lib/zoneinfo/CHARACTERS'. The `zoneinfo' directory contains +data files describing local time zones in many different parts of the +world. The names represent major cities, with subdirectories for +geographical areas; for example, `America/New_York', `Europe/London', +`Asia/Hong_Kong'. These data files are installed by the system +administrator, who also sets `/etc/localtime' to point to the data file +for the local time zone. The GNU C library comes with a large database +of time zone information for most regions of the world, which is +maintained by a community of volunteers and put in the public domain.  -File: libc.info, Node: Traditional Scheduling, Prev: Basic Scheduling Functions, Up: Priority - -Traditional Scheduling ----------------------- - - This section is about the scheduling among processes whose absolute -priority is 0. When the system hands out the scraps of CPU time that -are left over after the processes with higher absolute priority have -taken all they want, the scheduling described herein determines who -among the great unwashed processes gets them. +File: libc.info, Node: Time Zone Functions, Next: Time Functions Example, Prev: TZ Variable, Up: Calendar Time -* Menu: +Functions and Variables for Time Zones +-------------------------------------- -* Traditional Scheduling Intro:: -* Traditional Scheduling Functions:: + - Variable: char * tzname [2] + The array `tzname' contains two strings, which are the standard + names of the pair of time zones (standard and Daylight Saving) + that the user has selected. `tzname[0]' is the name of the + standard time zone (for example, `"EST"'), and `tzname[1]' is the + name for the time zone when Daylight Saving Time is in use (for + example, `"EDT"'). These correspond to the STD and DST strings + (respectively) from the `TZ' environment variable. If Daylight + Saving Time is never used, `tzname[1]' is the empty string. - -File: libc.info, Node: Traditional Scheduling Intro, Next: Traditional Scheduling Functions, Up: Traditional Scheduling + The `tzname' array is initialized from the `TZ' environment + variable whenever `tzset', `ctime', `strftime', `mktime', or + `localtime' is called. If multiple abbreviations have been used + (e.g. `"EWT"' and `"EDT"' for U.S. Eastern War Time and Eastern + Daylight Time), the array contains the most recent abbreviation. -Introduction To Traditional Scheduling -...................................... + The `tzname' array is required for POSIX.1 compatibility, but in + GNU programs it is better to use the `tm_zone' member of the + broken-down time structure, since `tm_zone' reports the correct + abbreviation even when it is not the latest one. - Long before there was absolute priority (See *Note Absolute -Priority::), Unix systems were scheduling the CPU using this system. -When Posix came in like the Romans and imposed absolute priorities to -accommodate the needs of realtime processing, it left the indigenous -Absolute Priority Zero processes to govern themselves by their own -familiar scheduling policy. + Though the strings are declared as `char *' the user must refrain + from modifying these strings. Modifying the strings will almost + certainly lead to trouble. - Indeed, absolute priorities higher than zero are not available on -many systems today and are not typically used when they are, being -intended mainly for computers that do realtime processing. So this -section describes the only scheduling many programmers need to be -concerned about. - But just to be clear about the scope of this scheduling: Any time a -process with a absolute priority of 0 and a process with an absolute -priority higher than 0 are ready to run at the same time, the one with -absolute priority 0 does not run. If it's already running when the -higher priority ready-to-run process comes into existence, it stops -immediately. + - Function: void tzset (void) + The `tzset' function initializes the `tzname' variable from the + value of the `TZ' environment variable. It is not usually + necessary for your program to call this function, because it is + called automatically when you use the other time conversion + functions that depend on the time zone. - In addition to its absolute priority of zero, every process has -another priority, which we will refer to as "dynamic priority" because -it changes over time. The dynamic priority is meaningless for -processes with an absolute priority higher than zero. + The following variables are defined for compatibility with System V +Unix. Like `tzname', these variables are set by calling `tzset' or the +other time conversion functions. - The dynamic priority sometimes determines who gets the next turn on -the CPU. Sometimes it determines how long turns last. Sometimes it -determines whether a process can kick another off the CPU. + - Variable: long int timezone + This contains the difference between UTC and the latest local + standard time, in seconds west of UTC. For example, in the U.S. + Eastern time zone, the value is `5*60*60'. Unlike the `tm_gmtoff' + member of the broken-down time structure, this value is not + adjusted for daylight saving, and its sign is reversed. In GNU + programs it is better to use `tm_gmtoff', since it contains the + correct offset even when it is not the latest one. - In Linux, the value is a combination of these things, but mostly it -is just determines the length of the time slice. The higher a process' -dynamic priority, the longer a shot it gets on the CPU when it gets one. -If it doesn't use up its time slice before giving up the CPU to do -something like wait for I/O, it is favored for getting the CPU back when -it's ready for it, to finish out its time slice. Other than that, -selection of processes for new time slices is basically round robin. -But the scheduler does throw a bone to the low priority processes: A -process' dynamic priority rises every time it is snubbed in the -scheduling process. In Linux, even the fat kid gets to play. + - Variable: int daylight + This variable has a nonzero value if Daylight Saving Time rules + apply. A nonzero value does not necessarily mean that Daylight + Saving Time is now in effect; it means only that Daylight Saving + Time is sometimes in effect. - The fluctuation of a process' dynamic priority is regulated by -another value: The "nice" value. The nice value is an integer, usually -in the range -20 to 20, and represents an upper limit on a process' -dynamic priority. The higher the nice number, the lower that limit. + +File: libc.info, Node: Time Functions Example, Prev: Time Zone Functions, Up: Calendar Time - On a typical Linux system, for example, a process with a nice value -of 20 can get only 10 milliseconds on the CPU at a time, whereas a -process with a nice value of -20 can achieve a high enough priority to -get 400 milliseconds. +Time Functions Example +---------------------- - The idea of the nice value is deferential courtesy. In the -beginning, in the Unix garden of Eden, all processes shared equally in -the bounty of the computer system. But not all processes really need -the same share of CPU time, so the nice value gave a courteous process -the ability to refuse its equal share of CPU time that others might -prosper. Hence, the higher a process' nice value, the nicer the -process is. (Then a snake came along and offered some process a -negative nice value and the system became the crass resource allocation -system we know today). + Here is an example program showing the use of some of the calendar +time functions. - Dynamic priorities tend upward and downward with an objective of -smoothing out allocation of CPU time and giving quick response time to -infrequent requests. But they never exceed their nice limits, so on a -heavily loaded CPU, the nice value effectively determines how fast a -process runs. + #include + #include + + #define SIZE 256 + + int + main (void) + { + char buffer[SIZE]; + time_t curtime; + struct tm *loctime; + + /* Get the current time. */ + curtime = time (NULL); + + /* Convert it to local time representation. */ + loctime = localtime (&curtime); + + /* Print out the date and time in the standard format. */ + fputs (asctime (loctime), stdout); + + /* Print it out in a nice format. */ + strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime); + fputs (buffer, stdout); + strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime); + fputs (buffer, stdout); + + return 0; + } - In keeping with the socialistic heritage of Unix process priority, a -process begins life with the same nice value as its parent process and -can raise it at will. A process can also raise the nice value of any -other process owned by the same user (or effective user). But only a -privileged process can lower its nice value. A privileged process can -also raise or lower another process' nice value. + It produces output like this: - GNU C Library functions for getting and setting nice values are -described in *Note Traditional Scheduling Functions::. + Wed Jul 31 13:02:36 1991 + Today is Wednesday, July 31. + The time is 01:02 PM. diff -durpN glibc-2.2.4/manual/libc.info-37 glibc-2.2.5/manual/libc.info-37 --- glibc-2.2.4/manual/libc.info-37 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-37 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1073 +33,1192 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Traditional Scheduling Functions, Prev: Traditional Scheduling Intro, Up: Traditional Scheduling +File: libc.info, Node: Setting an Alarm, Next: Sleeping, Prev: Calendar Time, Up: Date and Time -Functions For Traditional Scheduling -.................................... +Setting an Alarm +================ - This section describes how you can read and set the nice value of a -process. All these symbols are declared in `sys/resource.h'. + The `alarm' and `setitimer' functions provide a mechanism for a +process to interrupt itself in the future. They do this by setting a +timer; when the timer expires, the process receives a signal. - The function and macro names are defined by POSIX, and refer to -"priority," but the functions actually have to do with nice values, as -the terms are used both in the manual and POSIX. + Each process has three independent interval timers available: - The range of valid nice values depends on the kernel, but typically -it runs from `-20' to `20'. A lower nice value corresponds to higher -priority for the process. These constants describe the range of -priority values: + * A real-time timer that counts elapsed time. This timer sends a + `SIGALRM' signal to the process when it expires. -`PRIO_MIN' - The lowest valid nice value. + * A virtual timer that counts processor time used by the process. + This timer sends a `SIGVTALRM' signal to the process when it + expires. -`PRIO_MAX' - The highest valid nice value. + * A profiling timer that counts both processor time used by the + process, and processor time spent in system calls on behalf of the + process. This timer sends a `SIGPROF' signal to the process when + it expires. - - Function: int getpriority (int CLASS, int ID) - Return the nice value of a set of processes; CLASS and ID specify - which ones (see below). If the processes specified do not all - have the same nice value, this returns the lowest value that any - of them has. + This timer is useful for profiling in interpreters. The interval + timer mechanism does not have the fine granularity necessary for + profiling native code. - On success, the return value is `0'. Otherwise, it is `-1' and - `ERRNO' is set accordingly. The `errno' values specific to this - function are: + You can only have one timer of each kind set at any given time. If +you set a timer that has not yet expired, that timer is simply reset to +the new value. - `ESRCH' - The combination of CLASS and ID does not match any existing - process. + You should establish a handler for the appropriate alarm signal using +`signal' or `sigaction' before issuing a call to `setitimer' or +`alarm'. Otherwise, an unusual chain of events could cause the timer +to expire before your program establishes the handler. In this case it +would be terminated, since termination is the default action for the +alarm signals. *Note Signal Handling::. - `EINVAL' - The value of CLASS is not valid. + The `setitimer' function is the primary means for setting an alarm. +This facility is declared in the header file `sys/time.h'. The `alarm' +function, declared in `unistd.h', provides a somewhat simpler interface +for setting the real-time timer. - If the return value is `-1', it could indicate failure, or it could - be the nice value. The only way to make certain is to set `errno = - 0' before calling `getpriority', then use `errno != 0' afterward - as the criterion for failure. + - Data Type: struct itimerval + This structure is used to specify when a timer should expire. It + contains the following members: + `struct timeval it_interval' + This is the period between successive timer interrupts. If + zero, the alarm will only be sent once. - - Function: int setpriority (int CLASS, int ID, int NICEVAL) - Set the nice value of a set of processes to NICEVAL; CLASS and ID - specify which ones (see below). + `struct timeval it_value' + This is the period between now and the first timer interrupt. + If zero, the alarm is disabled. - The return value is `0' on success, and `-1' on failure. The - following `errno' error condition are possible for this function: + The `struct timeval' data type is described in *Note Elapsed + Time::. - `ESRCH' - The combination of CLASS and ID does not match any existing - process. + - Function: int setitimer (int WHICH, struct itimerval *NEW, struct + itimerval *OLD) + The `setitimer' function sets the timer specified by WHICH + according to NEW. The WHICH argument can have a value of + `ITIMER_REAL', `ITIMER_VIRTUAL', or `ITIMER_PROF'. + + If OLD is not a null pointer, `setitimer' returns information + about any previous unexpired timer of the same kind in the + structure it points to. + + The return value is `0' on success and `-1' on failure. The + following `errno' error conditions are defined for this function: `EINVAL' - The value of CLASS is not valid. + The timer period is too large. - `EPERM' - The call would set the nice value of a process which is owned - by a different user than the calling process (i.e. the target - process' real or effective uid does not match the calling - process' effective uid) and the calling process does not have - `CAP_SYS_NICE' permission. + - Function: int getitimer (int WHICH, struct itimerval *OLD) + The `getitimer' function stores information about the timer + specified by WHICH in the structure pointed at by OLD. - `EACCES' - The call would lower the process' nice value and the process - does not have `CAP_SYS_NICE' permission. + The return value and error conditions are the same as for + `setitimer'. +`ITIMER_REAL' + This constant can be used as the WHICH argument to the `setitimer' + and `getitimer' functions to specify the real-time timer. - The arguments CLASS and ID together specify a set of processes in -which you are interested. These are the possible values of CLASS: +`ITIMER_VIRTUAL' + This constant can be used as the WHICH argument to the `setitimer' + and `getitimer' functions to specify the virtual timer. -`PRIO_PROCESS' - One particular process. The argument ID is a process ID (pid). +`ITIMER_PROF' + This constant can be used as the WHICH argument to the `setitimer' + and `getitimer' functions to specify the profiling timer. -`PRIO_PGRP' - All the processes in a particular process group. The argument ID - is a process group ID (pgid). + - Function: unsigned int alarm (unsigned int SECONDS) + The `alarm' function sets the real-time timer to expire in SECONDS + seconds. If you want to cancel any existing alarm, you can do + this by calling `alarm' with a SECONDS argument of zero. -`PRIO_USER' - All the processes owned by a particular user (i.e. whose real uid - indicates the user). The argument ID is a user ID (uid). + The return value indicates how many seconds remain before the + previous alarm would have been sent. If there is no previous + alarm, `alarm' returns zero. - If the argument ID is 0, it stands for the calling process, its -process group, or its owner (real uid), according to CLASS. + The `alarm' function could be defined in terms of `setitimer' like +this: - - Function: int nice (int INCREMENT) - Increment the nice value of the calling process by INCREMENT. The - return value is the new nice value on success, and `-1' on - failure. In the case of failure, `errno' will be set to the same - values as for `setpriority'. + unsigned int + alarm (unsigned int seconds) + { + struct itimerval old, new; + new.it_interval.tv_usec = 0; + new.it_interval.tv_sec = 0; + new.it_value.tv_usec = 0; + new.it_value.tv_sec = (long int) seconds; + if (setitimer (ITIMER_REAL, &new, &old) < 0) + return 0; + else + return old.it_value.tv_sec; + } - Here is an equivalent definition of `nice': + There is an example showing the use of the `alarm' function in *Note +Handler Returns::. - int - nice (int increment) - { - int result, old = getpriority (PRIO_PROCESS, 0); - result = setpriority (PRIO_PROCESS, 0, old + increment); - if (result != -1) - return old + increment; - else - return -1; - } + If you simply want your process to wait for a given number of +seconds, you should use the `sleep' function. *Note Sleeping::. + + You shouldn't count on the signal arriving precisely when the timer +expires. In a multiprocessing environment there is typically some +amount of delay involved. + + *Portability Note:* The `setitimer' and `getitimer' functions are +derived from BSD Unix, while the `alarm' function is specified by the +POSIX.1 standard. `setitimer' is more powerful than `alarm', but +`alarm' is more widely used.  -File: libc.info, Node: Memory Resources, Next: Processor Resources, Prev: Priority, Up: Resource Usage And Limitation +File: libc.info, Node: Sleeping, Prev: Setting an Alarm, Up: Date and Time -Querying memory available resources -=================================== +Sleeping +======== - The amount of memory available in the system and the way it is -organized determines oftentimes the way programs can and have to work. -For functions like `mmap' it is necessary to know about the size of -individual memory pages and knowing how much memory is available enables -a program to select appropriate sizes for, say, caches. Before we get -into these details a few words about memory subsystems in traditional -Unix systems will be given. + The function `sleep' gives a simple way to make the program wait for +a short interval. If your program doesn't use signals (except to +terminate), then you can expect `sleep' to wait reliably throughout the +specified interval. Otherwise, `sleep' can return sooner if a signal +arrives; if you want to wait for a given interval regardless of +signals, use `select' (*note Waiting for I/O::) and don't specify any +descriptors to wait for. -* Menu: + - Function: unsigned int sleep (unsigned int SECONDS) + The `sleep' function waits for SECONDS or until a signal is + delivered, whichever happens first. -* Memory Subsystem:: Overview about traditional Unix memory handling. -* Query Memory Parameters:: How to get information about the memory - subsystem? + If `sleep' function returns because the requested interval is over, + it returns a value of zero. If it returns because of delivery of a + signal, its return value is the remaining time in the sleep + interval. - -File: libc.info, Node: Memory Subsystem, Next: Query Memory Parameters, Up: Memory Resources + The `sleep' function is declared in `unistd.h'. -Overview about traditional Unix memory handling ------------------------------------------------ + Resist the temptation to implement a sleep for a fixed amount of +time by using the return value of `sleep', when nonzero, to call +`sleep' again. This will work with a certain amount of accuracy as +long as signals arrive infrequently. But each signal can cause the +eventual wakeup time to be off by an additional second or so. Suppose a +few signals happen to arrive in rapid succession by bad luck--there is +no limit on how much this could shorten or lengthen the wait. - Unix systems normally provide processes virtual address spaces. This -means that the addresses of the memory regions do not have to correspond -directly to the addresses of the actual physical memory which stores the -data. An extra level of indirection is introduced which translates -virtual addresses into physical addresses. This is normally done by the -hardware of the processor. + Instead, compute the calendar time at which the program should stop +waiting, and keep trying to wait until that calendar time. This won't +be off by more than a second. With just a little more work, you can use +`select' and make the waiting period quite accurate. (Of course, heavy +system load can cause additional unavoidable delays--unless the machine +is dedicated to one application, there is no way you can avoid this.) - Using a virtual address space has several advantage. The most -important is process isolation. The different processes running on the -system cannot interfere directly with each other. No process can write -into the address space of another process (except when shared memory is -used but then it is wanted and controlled). + On some systems, `sleep' can do strange things if your program uses +`SIGALRM' explicitly. Even if `SIGALRM' signals are being ignored or +blocked when `sleep' is called, `sleep' might return prematurely on +delivery of a `SIGALRM' signal. If you have established a handler for +`SIGALRM' signals and a `SIGALRM' signal is delivered while the process +is sleeping, the action taken might be just to cause `sleep' to return +instead of invoking your handler. And, if `sleep' is interrupted by +delivery of a signal whose handler requests an alarm or alters the +handling of `SIGALRM', this handler and `sleep' will interfere. - Another advantage of virtual memory is that the address space the -processes see can actually be larger than the physical memory available. -The physical memory can be extended by storage on an external media -where the content of currently unused memory regions is stored. The -address translation can then intercept accesses to these memory regions -and make memory content available again by loading the data back into -memory. This concept makes it necessary that programs which have to use -lots of memory know the difference between available virtual address -space and available physical memory. If the working set of virtual -memory of all the processes is larger than the available physical memory -the system will slow down dramatically due to constant swapping of -memory content from the memory to the storage media and back. This is -called "thrashing". + On the GNU system, it is safe to use `sleep' and `SIGALRM' in the +same program, because `sleep' does not work by means of `SIGALRM'. - A final aspect of virtual memory which is important and follows from -what is said in the last paragraph is the granularity of the virtual -address space handling. When we said that the virtual address handling -stores memory content externally it cannot do this on a byte-by-byte -basis. The administrative overhead does not allow this (leaving alone -the processor hardware). Instead several thousand bytes are handled -together and form a "page". The size of each page is always a power of -two byte. The smallest page size in use today is 4096, with 8192, -16384, and 65536 being other popular sizes. + - Function: int nanosleep (const struct timespec *REQUESTED_TIME, + struct timespec *REMAINING) + If resolution to seconds is not enough the `nanosleep' function can + be used. As the name suggests the sleep interval can be specified + in nanoseconds. The actual elapsed time of the sleep interval + might be longer since the system rounds the elapsed time you + request up to the next integer multiple of the actual resolution + the system can deliver. + + *`requested_time' is the elapsed time of the interval you want to + sleep. + + The function returns as *`remaining' the elapsed time left in the + interval for which you requested to sleep. If the interval + completed without getting interrupted by a signal, this is zero. + + `struct timespec' is described in *Note Elapsed Time::. + + If the function returns because the interval is over the return + value is zero. If the function returns -1 the global variable + ERRNO is set to the following values: + + `EINTR' + The call was interrupted because a signal was delivered to + the thread. If the REMAINING parameter is not the null + pointer the structure pointed to by REMAINING is updated to + contain the remaining elapsed time. + + `EINVAL' + The nanosecond value in the REQUESTED_TIME parameter contains + an illegal value. Either the value is negative or greater + than or equal to 1000 million. + + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `nanosleep' is called. If the thread gets canceled these + resources stay allocated until the program ends. To avoid this + calls to `nanosleep' should be protected using cancellation + handlers. + + The `nanosleep' function is declared in `time.h'.  -File: libc.info, Node: Query Memory Parameters, Prev: Memory Subsystem, Up: Memory Resources +File: libc.info, Node: Resource Usage And Limitation, Next: Non-Local Exits, Prev: Date and Time, Up: Top -How to get information about the memory subsystem? --------------------------------------------------- +Resource Usage And Limitation +***************************** - The page size of the virtual memory the process sees is essential to -know in several situations. Some programming interface (e.g., `mmap', -*note Memory-mapped I/O::) require the user to provide information -adjusted to the page size. In the case of `mmap' is it necessary to -provide a length argument which is a multiple of the page size. -Another place where the knowledge about the page size is useful is in -memory allocation. If one allocates pieces of memory in larger chunks -which are then subdivided by the application code it is useful to -adjust the size of the larger blocks to the page size. If the total -memory requirement for the block is close (but not larger) to a multiple -of the page size the kernel's memory handling can work more effectively -since it only has to allocate memory pages which are fully used. (To do -this optimization it is necessary to know a bit about the memory -allocator which will require a bit of memory itself for each block and -this overhead must not push the total size over the page size multiple. + This chapter describes functions for examining how much of various +kinds of resources (CPU time, memory, etc.) a process has used and +getting and setting limits on future usage. - The page size traditionally was a compile time constant. But recent -development of processors changed this. Processors now support -different page sizes and they can possibly even vary among different -processes on the same system. Therefore the system should be queried at -runtime about the current page size and no assumptions (except about it -being a power of two) should be made. +* Menu: - The correct interface to query about the page size is `sysconf' -(*note Sysconf Definition::) with the parameter `_SC_PAGESIZE'. There -is a much older interface available, too. +* Resource Usage:: Measuring various resources used. +* Limits on Resources:: Specifying limits on resource usage. +* Priority:: Reading or setting process run priority. +* Memory Resources:: Querying memory available resources. +* Processor Resources:: Learn about the processors available. - - Function: int getpagesize (void) - The `getpagesize' function returns the page size of the process. - This value is fixed for the runtime of the process but can vary in - different runs of the application. + +File: libc.info, Node: Resource Usage, Next: Limits on Resources, Up: Resource Usage And Limitation - The function is declared in `unistd.h'. +Resource Usage +============== - Widely available on System V derived systems is a method to get -information about the physical memory the system has. The call + The function `getrusage' and the data type `struct rusage' are used +to examine the resource usage of a process. They are declared in +`sys/resource.h'. - sysconf (_SC_PHYS_PAGES) + - Function: int getrusage (int PROCESSES, struct rusage *RUSAGE) + This function reports resource usage totals for processes + specified by PROCESSES, storing the information in `*RUSAGE'. -returns the total number of pages of physical the system has. This -does not mean all this memory is available. This information can be -found using + In most systems, PROCESSES has only two valid values: - sysconf (_SC_AVPHYS_PAGES) + `RUSAGE_SELF' + Just the current process. - These two values help to optimize applications. The value returned -for `_SC_AVPHYS_PAGES' is the amount of memory the application can use -without hindering any other process (given that no other process -increases its memory usage). The value returned for `_SC_PHYS_PAGES' -is more or less a hard limit for the working set. If all applications -together constantly use more than that amount of memory the system is -in trouble. + `RUSAGE_CHILDREN' + All child processes (direct and indirect) that have already + terminated. - The GNU C library provides in addition to these already described -way to get this information two functions. They are declared in the -file `sys/sysinfo.h'. Programmers should prefer to use the `sysconf' -method described above. + In the GNU system, you can also inquire about a particular child + process by specifying its process ID. - - Function: long int get_phys_pages (void) - The `get_phys_pages' function returns the total number of pages of - physical the system has. To get the amount of memory this number - has to be multiplied by the page size. + The return value of `getrusage' is zero for success, and `-1' for + failure. - This function is a GNU extension. + `EINVAL' + The argument PROCESSES is not valid. - - Function: long int get_avphys_pages (void) - The `get_phys_pages' function returns the number of available - pages of physical the system has. To get the amount of memory - this number has to be multiplied by the page size. + One way of getting resource usage for a particular child process is +with the function `wait4', which returns totals for a child when it +terminates. *Note BSD Wait Functions::. - This function is a GNU extension. + - Data Type: struct rusage + This data type stores various resource usage statistics. It has + the following members, and possibly others: - -File: libc.info, Node: Processor Resources, Prev: Memory Resources, Up: Resource Usage And Limitation + `struct timeval ru_utime' + Time spent executing user instructions. -Learn about the processors available -==================================== + `struct timeval ru_stime' + Time spent in operating system code on behalf of PROCESSES. - The use of threads or processes with shared memory allows an -application to take advantage of all the processing power a system can -provide. If the task can be parallelized the optimal way to write an -application is to have at any time as many processes running as there -are processors. To determine the number of processors available to the -system one can run + `long int ru_maxrss' + The maximum resident set size used, in kilobytes. That is, + the maximum number of kilobytes of physical memory that + PROCESSES used simultaneously. - sysconf (_SC_NPROCESSORS_CONF) + `long int ru_ixrss' + An integral value expressed in kilobytes times ticks of + execution, which indicates the amount of memory used by text + that was shared with other processes. -which returns the number of processors the operating system configured. -But it might be possible for the operating system to disable individual -processors and so the call + `long int ru_idrss' + An integral value expressed the same way, which is the amount + of unshared memory used for data. - sysconf (_SC_NPROCESSORS_ONLN) + `long int ru_isrss' + An integral value expressed the same way, which is the amount + of unshared memory used for stack space. -returns the number of processors which are currently inline (i.e., -available). + `long int ru_minflt' + The number of page faults which were serviced without + requiring any I/O. - For these two pieces of information the GNU C library also provides -functions to get the information directly. The functions are declared -in `sys/sysinfo.h'. + `long int ru_majflt' + The number of page faults which were serviced by doing I/O. - - Function: int get_nprocs_conf (void) - The `get_nprocs_conf' function returns the number of processors the - operating system configured. + `long int ru_nswap' + The number of times PROCESSES was swapped entirely out of + main memory. - This function is a GNU extension. + `long int ru_inblock' + The number of times the file system had to read from the disk + on behalf of PROCESSES. - - Function: int get_nprocs (void) - The `get_nprocs' function returns the number of available - processors. + `long int ru_oublock' + The number of times the file system had to write to the disk + on behalf of PROCESSES. - This function is a GNU extension. + `long int ru_msgsnd' + Number of IPC messages sent. - Before starting more threads it should be checked whether the -processors are not already overused. Unix systems calculate something -called the "load average". This is a number indicating how many -processes were running. This number is average over different periods -of times (normally 1, 5, and 15 minutes). + `long int ru_msgrcv' + Number of IPC messages received. - - Function: int getloadavg (double LOADAVG[], int NELEM) - This function gets the 1, 5 and 15 minute load averages of the - system. The values are placed in LOADAVG. `getloadavg' will place - at most NELEM elements into the array but never more than three - elements. The return value is the number of elements written to - LOADAVG, or -1 on error. + `long int ru_nsignals' + Number of signals received. - This function is declared in `stdlib.h'. + `long int ru_nvcsw' + The number of times PROCESSES voluntarily invoked a context + switch (usually to wait for some service). - -File: libc.info, Node: Non-Local Exits, Next: Signal Handling, Prev: Resource Usage And Limitation, Up: Top + `long int ru_nivcsw' + The number of times an involuntary context switch took place + (because a time slice expired, or another process of higher + priority was scheduled). -Non-Local Exits -*************** + `vtimes' is a historical function that does some of what `getrusage' +does. `getrusage' is a better choice. - Sometimes when your program detects an unusual situation inside a -deeply nested set of function calls, you would like to be able to -immediately return to an outer level of control. This section -describes how you can do such "non-local exits" using the `setjmp' and -`longjmp' functions. + `vtimes' and its `vtimes' data structure are declared in +`sys/vtimes.h'. -* Menu: + - Function: int vtimes (struct vtimes CURRENT, struct vtimes CHILD) + `vtimes' reports resource usage totals for a process. -* Intro: Non-Local Intro. When and how to use these facilities. -* Details: Non-Local Details. Functions for non-local exits. -* Non-Local Exits and Signals:: Portability issues. -* System V contexts:: Complete context control a la System V. + If CURRENT is non-null, `vtimes' stores resource usage totals for + the invoking process alone in the structure to which it points. If + CHILD is non-null, `vtimes' stores resource usage totals for all + past children (which have terminated) of the invoking process in + the structure to which it points. - -File: libc.info, Node: Non-Local Intro, Next: Non-Local Details, Up: Non-Local Exits + - Data Type: struct vtimes + This data type contains information about the resource usage + of a process. Each member corresponds to a member of the + `struct rusage' data type described above. -Introduction to Non-Local Exits -=============================== + `vm_utime' + User CPU time. Analogous to `ru_utime' in `struct + rusage' - As an example of a situation where a non-local exit can be useful, -suppose you have an interactive program that has a "main loop" that -prompts for and executes commands. Suppose the "read" command reads -input from a file, doing some lexical analysis and parsing of the input -while processing it. If a low-level input error is detected, it would -be useful to be able to return immediately to the "main loop" instead -of having to make each of the lexical analysis, parsing, and processing -phases all have to explicitly deal with error situations initially -detected by nested calls. + `vm_stime' + System CPU time. Analogous to `ru_stime' in `struct + rusage' - (On the other hand, if each of these phases has to do a substantial -amount of cleanup when it exits--such as closing files, deallocating -buffers or other data structures, and the like--then it can be more -appropriate to do a normal return and have each phase do its own -cleanup, because a non-local exit would bypass the intervening phases -and their associated cleanup code entirely. Alternatively, you could -use a non-local exit but do the cleanup explicitly either before or -after returning to the "main loop".) + `vm_idsrss' + Data and stack memory. The sum of the values that would + be reported as `ru_idrss' and `ru_isrss' in `struct + rusage' - In some ways, a non-local exit is similar to using the `return' -statement to return from a function. But while `return' abandons only -a single function call, transferring control back to the point at which -it was called, a non-local exit can potentially abandon many levels of -nested function calls. + `vm_ixrss' + Shared memory. Analogous to `ru_ixrss' in `struct + rusage' - You identify return points for non-local exits by calling the -function `setjmp'. This function saves information about the execution -environment in which the call to `setjmp' appears in an object of type -`jmp_buf'. Execution of the program continues normally after the call -to `setjmp', but if an exit is later made to this return point by -calling `longjmp' with the corresponding `jmp_buf' object, control is -transferred back to the point where `setjmp' was called. The return -value from `setjmp' is used to distinguish between an ordinary return -and a return made by a call to `longjmp', so calls to `setjmp' usually -appear in an `if' statement. + `vm_maxrss' + Maximent resident set size. Analogous to `ru_maxrss' in + `struct rusage' - Here is how the example program described above might be set up: + `vm_majflt' + Major page faults. Analogous to `ru_majflt' in `struct + rusage' - #include - #include - #include - - jmp_buf main_loop; - - void - abort_to_main_loop (int status) - { - longjmp (main_loop, status); - } - - int - main (void) - { - while (1) - if (setjmp (main_loop)) - puts ("Back at main loop...."); - else - do_command (); - } - - - void - do_command (void) - { - char buffer[128]; - if (fgets (buffer, 128, stdin) == NULL) - abort_to_main_loop (-1); - else - exit (EXIT_SUCCESS); - } + `vm_minflt' + Minor page faults. Analogous to `ru_minflt' in `struct + rusage' - The function `abort_to_main_loop' causes an immediate transfer of -control back to the main loop of the program, no matter where it is -called from. + `vm_nswap' + Swap count. Analogous to `ru_nswap' in `struct rusage' - The flow of control inside the `main' function may appear a little -mysterious at first, but it is actually a common idiom with `setjmp'. -A normal call to `setjmp' returns zero, so the "else" clause of the -conditional is executed. If `abort_to_main_loop' is called somewhere -within the execution of `do_command', then it actually appears as if -the _same_ call to `setjmp' in `main' were returning a second time with -a value of `-1'. + `vm_inblk' + Disk reads. Analogous to `ru_inblk' in `struct rusage' - So, the general pattern for using `setjmp' looks something like: + `vm_oublk' + Disk writes. Analogous to `ru_oublk' in `struct rusage' - if (setjmp (BUFFER)) - /* Code to clean up after premature return. */ - ... - else - /* Code to be executed normally after setting up the return point. */ - ... + The return value is zero if the function succeeds; `-1' otherwise. + + An additional historical function for examining resource usage, +`vtimes', is supported but not documented here. It is declared in +`sys/vtimes.h'.  -File: libc.info, Node: Non-Local Details, Next: Non-Local Exits and Signals, Prev: Non-Local Intro, Up: Non-Local Exits +File: libc.info, Node: Limits on Resources, Next: Priority, Prev: Resource Usage, Up: Resource Usage And Limitation -Details of Non-Local Exits -========================== +Limiting Resource Usage +======================= - Here are the details on the functions and data structures used for -performing non-local exits. These facilities are declared in -`setjmp.h'. + You can specify limits for the resource usage of a process. When the +process tries to exceed a limit, it may get a signal, or the system call +by which it tried to do so may fail, depending on the resource. Each +process initially inherits its limit values from its parent, but it can +subsequently change them. - - Data Type: jmp_buf - Objects of type `jmp_buf' hold the state information to be - restored by a non-local exit. The contents of a `jmp_buf' - identify a specific place to return to. + There are two per-process limits associated with a resource: - - Macro: int setjmp (jmp_buf STATE) - When called normally, `setjmp' stores information about the - execution state of the program in STATE and returns zero. If - `longjmp' is later used to perform a non-local exit to this STATE, - `setjmp' returns a nonzero value. +"current limit" + The current limit is the value the system will not allow usage to + exceed. It is also called the "soft limit" because the process + being limited can generally raise the current limit at will. - - Function: void longjmp (jmp_buf STATE, int VALUE) - This function restores current execution to the state saved in - STATE, and continues execution from the call to `setjmp' that - established that return point. Returning from `setjmp' by means of - `longjmp' returns the VALUE argument that was passed to `longjmp', - rather than `0'. (But if VALUE is given as `0', `setjmp' returns - `1'). +"maximum limit" + The maximum limit is the maximum value to which a process is + allowed to set its current limit. It is also called the "hard + limit" because there is no way for a process to get around it. A + process may lower its own maximum limit, but only the superuser + may increase a maximum limit. - There are a lot of obscure but important restrictions on the use of -`setjmp' and `longjmp'. Most of these restrictions are present because -non-local exits require a fair amount of magic on the part of the C -compiler and can interact with other parts of the language in strange -ways. + The symbols for use with `getrlimit', `setrlimit', `getrlimit64', +and `setrlimit64' are defined in `sys/resource.h'. - The `setjmp' function is actually a macro without an actual function -definition, so you shouldn't try to `#undef' it or take its address. -In addition, calls to `setjmp' are safe in only the following contexts: + - Function: int getrlimit (int RESOURCE, struct rlimit *RLP) + Read the current and maximum limits for the resource RESOURCE and + store them in `*RLP'. - * As the test expression of a selection or iteration statement (such - as `if', `switch', or `while'). + The return value is `0' on success and `-1' on failure. The only + possible `errno' error condition is `EFAULT'. - * As one operand of a equality or comparison operator that appears - as the test expression of a selection or iteration statement. The - other operand must be an integer constant expression. + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is in fact `getrlimit64'. Thus, the + LFS interface transparently replaces the old interface. - * As the operand of a unary `!' operator, that appears as the test - expression of a selection or iteration statement. + - Function: int getrlimit64 (int RESOURCE, struct rlimit64 *RLP) + This function is similar to `getrlimit' but its second parameter is + a pointer to a variable of type `struct rlimit64', which allows it + to read values which wouldn't fit in the member of a `struct + rlimit'. - * By itself as an expression statement. + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit machine, this function is available under the name + `getrlimit' and so transparently replaces the old interface. - Return points are valid only during the dynamic extent of the -function that called `setjmp' to establish them. If you `longjmp' to a -return point that was established in a function that has already -returned, unpredictable and disastrous things are likely to happen. + - Function: int setrlimit (int RESOURCE, const struct rlimit *RLP) + Store the current and maximum limits for the resource RESOURCE in + `*RLP'. - You should use a nonzero VALUE argument to `longjmp'. While -`longjmp' refuses to pass back a zero argument as the return value from -`setjmp', this is intended as a safety net against accidental misuse -and is not really good programming style. + The return value is `0' on success and `-1' on failure. The + following `errno' error condition is possible: - When you perform a non-local exit, accessible objects generally -retain whatever values they had at the time `longjmp' was called. The -exception is that the values of automatic variables local to the -function containing the `setjmp' call that have been changed since the -call to `setjmp' are indeterminate, unless you have declared them -`volatile'. + `EPERM' + * The process tried to raise a current limit beyond the + maximum limit. - -File: libc.info, Node: Non-Local Exits and Signals, Next: System V contexts, Prev: Non-Local Details, Up: Non-Local Exits + * The process tried to raise a maximum limit, but is not + superuser. -Non-Local Exits and Signals -=========================== + When the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit system this function is in fact `setrlimit64'. Thus, the + LFS interface transparently replaces the old interface. - In BSD Unix systems, `setjmp' and `longjmp' also save and restore -the set of blocked signals; see *Note Blocking Signals::. However, the -POSIX.1 standard requires `setjmp' and `longjmp' not to change the set -of blocked signals, and provides an additional pair of functions -(`sigsetjmp' and `siglongjmp') to get the BSD behavior. + - Function: int setrlimit64 (int RESOURCE, const struct rlimit64 *RLP) + This function is similar to `setrlimit' but its second parameter is + a pointer to a variable of type `struct rlimit64' which allows it + to set values which wouldn't fit in the member of a `struct + rlimit'. - The behavior of `setjmp' and `longjmp' in the GNU library is -controlled by feature test macros; see *Note Feature Test Macros::. The -default in the GNU system is the POSIX.1 behavior rather than the BSD -behavior. + If the sources are compiled with `_FILE_OFFSET_BITS == 64' on a + 32-bit machine this function is available under the name + `setrlimit' and so transparently replaces the old interface. - The facilities in this section are declared in the header file -`setjmp.h'. + - Data Type: struct rlimit + This structure is used with `getrlimit' to receive limit values, + and with `setrlimit' to specify limit values for a particular + process and resource. It has two fields: - - Data Type: sigjmp_buf - This is similar to `jmp_buf', except that it can also store state - information about the set of blocked signals. + `rlim_t rlim_cur' + The current limit - - Function: int sigsetjmp (sigjmp_buf STATE, int SAVESIGS) - This is similar to `setjmp'. If SAVESIGS is nonzero, the set of - blocked signals is saved in STATE and will be restored if a - `siglongjmp' is later performed with this STATE. + `rlim_t rlim_max' + The maximum limit. - - Function: void siglongjmp (sigjmp_buf STATE, int VALUE) - This is similar to `longjmp' except for the type of its STATE - argument. If the `sigsetjmp' call that set this STATE used a - nonzero SAVESIGS flag, `siglongjmp' also restores the set of - blocked signals. + For `getrlimit', the structure is an output; it receives the + current values. For `setrlimit', it specifies the new values. - -File: libc.info, Node: System V contexts, Prev: Non-Local Exits and Signals, Up: Non-Local Exits + For the LFS functions a similar type is defined in `sys/resource.h'. -Complete Context Control -======================== + - Data Type: struct rlimit64 + This structure is analogous to the `rlimit' structure above, but + its components have wider ranges. It has two fields: - The Unix standard one more set of function to control the execution -path and these functions are more powerful than those discussed in this -chapter so far. These function were part of the original System V API -and by this route were added to the Unix API. Beside on branded Unix -implementations these interfaces are not widely available. Not all -platforms and/or architectures the GNU C Library is available on provide -this interface. Use `configure' to detect the availability. + `rlim64_t rlim_cur' + This is analogous to `rlimit.rlim_cur', but with a different + type. - Similar to the `jmp_buf' and `sigjmp_buf' types used for the -variables to contain the state of the `longjmp' functions the -interfaces of interest here have an appropriate type as well. Objects -of this type are normally much larger since more information is -contained. The type is also used in a few more places as we will see. -The types and functions described in this section are all defined and -declared respectively in the `ucontext.h' header file. + `rlim64_t rlim_max' + This is analogous to `rlimit.rlim_max', but with a different + type. - - Data Type: ucontext_t - The `ucontext_t' type is defined as a structure with as least the - following elements: - `ucontext_t *uc_link' - This is a pointer to the next context structure which is used - if the context described in the current structure returns. + Here is a list of resources for which you can specify a limit. +Memory and file sizes are measured in bytes. - `sigset_t uc_sigmask' - Set of signals which are blocked when this context is used. +`RLIMIT_CPU' + The maximum amount of CPU time the process can use. If it runs for + longer than this, it gets a signal: `SIGXCPU'. The value is + measured in seconds. *Note Operation Error Signals::. - `stack_t uc_stack' - Stack used for this context. The value need not be (and - normally is not) the stack pointer. *Note Signal Stack::. +`RLIMIT_FSIZE' + The maximum size of file the process can create. Trying to write a + larger file causes a signal: `SIGXFSZ'. *Note Operation Error + Signals::. - `mcontext_t uc_mcontext' - This element contains the actual state of the process. The - `mcontext_t' type is also defined in this header but the - definition should be treated as opaque. Any use of knowledge - of the type makes applications less portable. +`RLIMIT_DATA' + The maximum size of data memory for the process. If the process + tries to allocate data memory beyond this amount, the allocation + function fails. +`RLIMIT_STACK' + The maximum stack size for the process. If the process tries to + extend its stack past this size, it gets a `SIGSEGV' signal. + *Note Program Error Signals::. - Objects of this type have to be created by the user. The -initialization and modification happens through one of the following -functions: +`RLIMIT_CORE' + The maximum size core file that this process can create. If the + process terminates and would dump a core file larger than this, + then no core file is created. So setting this limit to zero + prevents core files from ever being created. - - Function: int getcontext (ucontext_t *UCP) - The `getcontext' function initializes the variable pointed to by - UCP with the context of the calling thread. The context contains - the content of the registers, the signal mask, and the current - stack. Executing the contents would start at the point where the - `getcontext' call just returned. +`RLIMIT_RSS' + The maximum amount of physical memory that this process should get. + This parameter is a guide for the system's scheduler and memory + allocator; the system may give the process more memory when there + is a surplus. - The function returns `0' if successful. Otherwise it returns `-1' - and sets ERRNO accordingly. +`RLIMIT_MEMLOCK' + The maximum amount of memory that can be locked into physical + memory (so it will never be paged out). - The `getcontext' function is similar to `setjmp' but it does not -provide an indication of whether the function returns for the first -time or whether the initialized context was used and the execution is -resumed at just that point. If this is necessary the user has to take -determine this herself. This must be done carefully since the context -contains registers which might contain register variables. This is a -good situation to define variables with `volatile'. +`RLIMIT_NPROC' + The maximum number of processes that can be created with the same + user ID. If you have reached the limit for your user ID, `fork' + will fail with `EAGAIN'. *Note Creating a Process::. - Once the context variable is initialized it can be used as is or it -can be modified. The latter is normally done to implement co-routines -or similar constructs. The `makecontext' function is what has to be -used to do that. +`RLIMIT_NOFILE' +`RLIMIT_OFILE' + The maximum number of files that the process can open. If it + tries to open more files than this, its open attempt fails with + `errno' `EMFILE'. *Note Error Codes::. Not all systems support + this limit; GNU does, and 4.4 BSD does. - - Function: void makecontext (ucontext_t *UCP, void (*FUNC) (void), - int ARGC, ...) - The UCP parameter passed to the `makecontext' shall be initialized - by a call to `getcontext'. The context will be modified to in a - way so that if the context is resumed it will start by calling the - function `func' which gets ARGC integer arguments passed. The - integer arguments which are to be passed should follow the ARGC - parameter in the call to `makecontext'. +`RLIMIT_AS' + The maximum size of total memory that this process should get. If + the process tries to allocate more memory beyond this amount with, + for example, `brk', `malloc', `mmap' or `sbrk', the allocation + function fails. - Before the call to this function the `uc_stack' and `uc_link' - element of the UCP structure should be initialized. The - `uc_stack' element describes the stack which is used for this - context. No two contexts which are used at the same time should - use the same memory region for a stack. +`RLIM_NLIMITS' + The number of different resource limits. Any valid RESOURCE + operand must be less than `RLIM_NLIMITS'. - The `uc_link' element of the object pointed to by UCP should be a - pointer to the context to be executed when the function FUNC - returns or it should be a null pointer. See `setcontext' for more - information about the exact use. + - Constant: int RLIM_INFINITY + This constant stands for a value of "infinity" when supplied as + the limit value in `setrlimit'. - While allocating the memory for the stack one has to be careful. -Most modern processors keep track of whether a certain memory region is -allowed to contain code which is executed or not. Data segments and -heap memory is normally not tagged to allow this. The result is that -programs would fail. Examples for such code include the calling -sequences the GNU C compiler generates for calls to nested functions. -Safe ways to allocate stacks correctly include using memory on the -original threads stack or explicitly allocate memory tagged for -execution using (*note Memory-mapped I/O::). + The following are historical functions to do some of what the +functions above do. The functions above are better choices. - *Compatibility note*: The current Unix standard is very imprecise -about the way the stack is allocated. All implementations seem to agree -that the `uc_stack' element must be used but the values stored in the -elements of the `stack_t' value are unclear. The GNU C library and -most other Unix implementations require the `ss_sp' value of the -`uc_stack' element to point to the base of the memory region allocated -for the stack and the size of the memory region is stored in `ss_size'. -There are implements out there which require `ss_sp' to be set to the -value the stack pointer will have (which can depending on the direction -the stack grows be different). This difference makes the `makecontext' -function hard to use and it requires detection of the platform at -compile time. + `ulimit' and the command symbols are declared in `ulimit.h'. - - Function: int setcontext (const ucontext_t *UCP) - The `setcontext' function restores the context described by UCP. - The context is not modified and can be reused as often as wanted. + - Function: int ulimit (int CMD, ...) + `ulimit' gets the current limit or sets the current and maximum + limit for a particular resource for the calling process according + to the command CMD.a - If the context was created by `getcontext' execution resumes with - the registers filled with the same values and the same stack as if - the `getcontext' call just returned. + If you are getting a limit, the command argument is the only + argument. If you are setting a limit, there is a second argument: + `long int' LIMIT which is the value to which you are setting the + limit. - If the context was modified with a call to `makecontext' execution - continues with the function passed to `makecontext' which gets the - specified parameters passed. If this function returns execution is - resumed in the context which was referenced by the `uc_link' - element of the context structure passed to `makecontext' at the - time of the call. If `uc_link' was a null pointer the application - terminates in this case. + The CMD values and the operations they specify are: + `GETFSIZE' + Get the current limit on the size of a file, in units of 512 + bytes. - Since the context contains information about the stack no two - threads should use the same context at the same time. The result - in most cases would be disastrous. + `SETFSIZE' + Set the current and maximum limit on the size of a file to + LIMIT * 512 bytes. - The `setcontext' function does not return unless an error occurred - in which case it returns `-1'. + There are also some other CMD values that may do things on some + systems, but they are not supported. - The `setcontext' function simply replaces the current context with -the one described by the UCP parameter. This is often useful but there -are situations where the current context has to be preserved. + Only the superuser may increase a maximum limit. - - Function: int swapcontext (ucontext_t *restrict OUCP, const - ucontext_t *restrict UCP) - The `swapcontext' function is similar to `setcontext' but instead - of just replacing the current context the latter is first saved in - the object pointed to by OUCP as if this was a call to - `getcontext'. The saved context would resume after the call to - `swapcontext'. + When you successfully get a limit, the return value of `ulimit' is + that limit, which is never negative. When you successfully set a + limit, the return value is zero. When the function fails, the + return value is `-1' and `errno' is set according to the reason: - Once the current context is saved the context described in UCP is - installed and execution continues as described in this context. + `EPERM' + A process tried to increase a maximum limit, but is not + superuser. - If `swapcontext' succeeds the function does not return unless the - context OUCP is used without prior modification by `makecontext'. - The return value in this case is `0'. If the function fails it - returns `-1' and set ERRNO accordingly. -Example for SVID Context Handling -================================= + `vlimit' and its resource symbols are declared in `sys/vlimit.h'. - The easiest way to use the context handling functions is as a -replacement for `setjmp' and `longjmp'. The context contains on most -platforms more information which might lead to less surprises but this -also means using these functions is more expensive (beside being less -portable). + - Function: int vlimit (int RESOURCE, int LIMIT) + `vlimit' sets the current limit for a resource for a process. - int - random_search (int n, int (*fp) (int, ucontext_t *)) - { - volatile int cnt = 0; - ucontext_t uc; - - /* Safe current context. */ - if (getcontext (&uc) < 0) - return -1; - - /* If we have not tried N times try again. */ - if (cnt++ < n) - /* Call the function with a new random number - and the context. */ - if (fp (rand (), &uc) != 0) - /* We found what we were looking for. */ - return 1; - - /* Not found. */ - return 0; - } + RESOURCE identifies the resource: - Using contexts in such a way enables emulating exception handling. -The search functions passed in the FP parameter could be very large, -nested, and complex which would make it complicated (or at least would -require a lot of code) to leave the function with an error value which -has to be passed down to the caller. By using the context it is -possible to leave the search function in one step and allow restarting -the search which also has the nice side effect that it can be -significantly faster. + `LIM_CPU' + Maximum CPU time. Same as `RLIMIT_CPU' for `setrlimit'. - Something which is harder to implement with `setjmp' and `longjmp' -is to switch temporarily to a different execution path and then resume -where execution was stopped. + `LIM_FSIZE' + Maximum file size. Same as `RLIMIT_FSIZE' for `setrlimit'. - #include - #include - #include - #include - #include - - /* Set by the signal handler. */ - static volatile int expired; - - /* The contexts. */ - static ucontext_t uc[3]; - - /* We do only a certain number of switches. */ - static int switches; - - - /* This is the function doing the work. It is just a - skeleton, real code has to be filled in. */ - static void - f (int n) - { - int m = 0; - while (1) - { - /* This is where the work would be done. */ - if (++m % 100 == 0) - { - putchar ('.'); - fflush (stdout); - } - - /* Regularly the EXPIRE variable must be checked. */ - if (expired) - { - /* We do not want the program to run forever. */ - if (++switches == 20) - return; - - printf ("\nswitching from %d to %d\n", n, 3 - n); - expired = 0; - /* Switch to the other context, saving the current one. */ - swapcontext (&uc[n], &uc[3 - n]); - } - } - } - - /* This is the signal handler which simply set the variable. */ - void - handler (int signal) - { - expired = 1; - } - - - int - main (void) - { - struct sigaction sa; - struct itimerval it; - char st1[8192]; - char st2[8192]; - - /* Initialize the data structures for the interval timer. */ - sa.sa_flags = SA_RESTART; - sigfillset (&sa.sa_mask); - sa.sa_handler = handler; - it.it_interval.tv_sec = 0; - it.it_interval.tv_usec = 1; - it.it_value = it.it_interval; - - /* Install the timer and get the context we can manipulate. */ - if (sigaction (SIGPROF, &sa, NULL) < 0 - || setitimer (ITIMER_PROF, &it, NULL) < 0 - || getcontext (&uc[1]) == -1 - || getcontext (&uc[2]) == -1) - abort (); - - /* Create a context with a separate stack which causes the - function `f' to be call with the parameter `1'. - Note that the `uc_link' points to the main context - which will cause the program to terminate once the function - return. */ - uc[1].uc_link = &uc[0]; - uc[1].uc_stack.ss_sp = st1; - uc[1].uc_stack.ss_size = sizeof st1; - makecontext (&uc[1], (void (*) (void)) f, 1, 1); - - /* Similarly, but `2' is passed as the parameter to `f'. */ - uc[2].uc_link = &uc[0]; - uc[2].uc_stack.ss_sp = st2; - uc[2].uc_stack.ss_size = sizeof st2; - makecontext (&uc[2], (void (*) (void)) f, 1, 2); - - /* Start running. */ - swapcontext (&uc[0], &uc[1]); - putchar ('\n'); - - return 0; - } + `LIM_DATA' + Maximum data memory. Same as `RLIMIT_DATA' for `setrlimit'. + + `LIM_STACK' + Maximum stack size. Same as `RLIMIT_STACK' for `setrlimit'. + + `LIM_CORE' + Maximum core file size. Same as `RLIMIT_COR' for `setrlimit'. + + `LIM_MAXRSS' + Maximum physical memory. Same as `RLIMIT_RSS' for + `setrlimit'. + + The return value is zero for success, and `-1' with `errno' set + accordingly for failure: + + `EPERM' + The process tried to set its current limit beyond its maximum + limit. - This an example how the context functions can be used to implement -co-routines or cooperative multi-threading. All that has to be done is -to call every once in a while `swapcontext' to continue running a -different context. It is not allowed to do the context switching from -the signal handler directly since neither `setcontext' nor -`swapcontext' are functions which can be called from a signal handler. -But setting a variable in the signal handler and checking it in the -body of the functions which are executed. Since `swapcontext' is -saving the current context it is possible to have multiple different -scheduling points in the code. Execution will always resume where it -was left.  -File: libc.info, Node: Signal Handling, Next: Program Basics, Prev: Non-Local Exits, Up: Top +File: libc.info, Node: Priority, Next: Memory Resources, Prev: Limits on Resources, Up: Resource Usage And Limitation -Signal Handling -*************** +Process CPU Priority And Scheduling +=================================== - A "signal" is a software interrupt delivered to a process. The -operating system uses signals to report exceptional situations to an -executing program. Some signals report errors such as references to -invalid memory addresses; others report asynchronous events, such as -disconnection of a phone line. + When multiple processes simultaneously require CPU time, the system's +scheduling policy and process CPU priorities determine which processes +get it. This section describes how that determination is made and GNU +C library functions to control it. - The GNU C library defines a variety of signal types, each for a -particular kind of event. Some kinds of events make it inadvisable or -impossible for the program to proceed as usual, and the corresponding -signals normally abort the program. Other kinds of signals that report -harmless events are ignored by default. + It is common to refer to CPU scheduling simply as scheduling and a +process' CPU priority simply as the process' priority, with the CPU +resource being implied. Bear in mind, though, that CPU time is not the +only resource a process uses or that processes contend for. In some +cases, it is not even particularly important. Giving a process a high +"priority" may have very little effect on how fast a process runs with +respect to other processes. The priorities discussed in this section +apply only to CPU time. - If you anticipate an event that causes signals, you can define a -handler function and tell the operating system to run it when that -particular type of signal arrives. + CPU scheduling is a complex issue and different systems do it in +wildly different ways. New ideas continually develop and find their +way into the intricacies of the various systems' scheduling algorithms. +This section discusses the general concepts, some specifics of systems +that commonly use the GNU C library, and some standards. - Finally, one process can send a signal to another process; this -allows a parent process to abort a child, or two related processes to -communicate and synchronize. + For simplicity, we talk about CPU contention as if there is only one +CPU in the system. But all the same principles apply when a processor +has multiple CPUs, and knowing that the number of processes that can +run at any one time is equal to the number of CPUs, you can easily +extrapolate the information. + + The functions described in this section are all defined by the +POSIX.1 and POSIX.1b standards (the `sched...' functions are POSIX.1b). +However, POSIX does not define any semantics for the values that these +functions get and set. In this chapter, the semantics are based on the +Linux kernel's implementation of the POSIX standard. As you will see, +the Linux implementation is quite the inverse of what the authors of the +POSIX syntax had in mind. * Menu: -* Concepts of Signals:: Introduction to the signal facilities. -* Standard Signals:: Particular kinds of signals with - standard names and meanings. -* Signal Actions:: Specifying what happens when a - particular signal is delivered. -* Defining Handlers:: How to write a signal handler function. -* Interrupted Primitives:: Signal handlers affect use of `open', - `read', `write' and other functions. -* Generating Signals:: How to send a signal to a process. -* Blocking Signals:: Making the system hold signals temporarily. -* Waiting for a Signal:: Suspending your program until a signal - arrives. -* Signal Stack:: Using a Separate Signal Stack. -* BSD Signal Handling:: Additional functions for backward - compatibility with BSD. +* Absolute Priority:: The first tier of priority. Posix +* Realtime Scheduling:: Scheduling among the process nobility +* Basic Scheduling Functions:: Get/set scheduling policy, priority +* Traditional Scheduling:: Scheduling among the vulgar masses  -File: libc.info, Node: Concepts of Signals, Next: Standard Signals, Up: Signal Handling +File: libc.info, Node: Absolute Priority, Next: Realtime Scheduling, Up: Priority -Basic Concepts of Signals -========================= +Absolute Priority +----------------- - This section explains basic concepts of how signals are generated, -what happens after a signal is delivered, and how programs can handle -signals. + Every process has an absolute priority, and it is represented by a +number. The higher the number, the higher the absolute priority. -* Menu: + On systems of the past, and most systems today, all processes have +absolute priority 0 and this section is irrelevant. In that case, +*Note Traditional Scheduling::. Absolute priorities were invented to +accommodate realtime systems, in which it is vital that certain +processes be able to respond to external events happening in real time, +which means they cannot wait around while some other process that _wants +to_, but doesn't _need to_ run occupies the CPU. -* Kinds of Signals:: Some examples of what can cause a signal. -* Signal Generation:: Concepts of why and how signals occur. -* Delivery of Signal:: Concepts of what a signal does to the - process. + When two processes are in contention to use the CPU at any instant, +the one with the higher absolute priority always gets it. This is true +even if the process with the lower priority is already using the CPU +(i.e. the scheduling is preemptive). Of course, we're only talking +about processes that are running or "ready to run," which means they are +ready to execute instructions right now. When a process blocks to wait +for something like I/O, its absolute priority is irrelevant. - -File: libc.info, Node: Kinds of Signals, Next: Signal Generation, Up: Concepts of Signals + *Note:* The term "runnable" is a synonym for "ready to run." -Some Kinds of Signals ---------------------- + When two processes are running or ready to run and both have the same +absolute priority, it's more interesting. In that case, who gets the +CPU is determined by the scheduling policy. If the processes have +absolute priority 0, the traditional scheduling policy described in +*Note Traditional Scheduling:: applies. Otherwise, the policies +described in *Note Realtime Scheduling:: apply. - A signal reports the occurrence of an exceptional event. These are -some of the events that can cause (or "generate", or "raise") a signal: + You normally give an absolute priority above 0 only to a process that +can be trusted not to hog the CPU. Such processes are designed to block +(or terminate) after relatively short CPU runs. - * A program error such as dividing by zero or issuing an address - outside the valid range. + A process begins life with the same absolute priority as its parent +process. Functions described in *Note Basic Scheduling Functions:: can +change it. - * A user request to interrupt or terminate the program. Most - environments are set up to let a user suspend the program by - typing `C-z', or terminate it with `C-c'. Whatever key sequence - is used, the operating system sends the proper signal to interrupt - the process. + Only a privileged process can change a process' absolute priority to +something other than `0'. Only a privileged process or the target +process' owner can change its absolute priority at all. - * The termination of a child process. + POSIX requires absolute priority values used with the realtime +scheduling policies to be consecutive with a range of at least 32. On +Linux, they are 1 through 99. The functions `sched_get_priority_max' +and `sched_set_priority_min' portably tell you what the range is on a +particular system. - * Expiration of a timer or alarm. +Using Absolute Priority +....................... - * A call to `kill' or `raise' by the same process. + One thing you must keep in mind when designing real time +applications is that having higher absolute priority than any other +process doesn't guarantee the process can run continuously. Two things +that can wreck a good CPU run are interrupts and page faults. - * A call to `kill' from another process. Signals are a limited but - useful form of interprocess communication. + Interrupt handlers live in that limbo between processes. The CPU is +executing instructions, but they aren't part of any process. An +interrupt will stop even the highest priority process. So you must +allow for slight delays and make sure that no device in the system has +an interrupt handler that could cause too long a delay between +instructions for your process. - * An attempt to perform an I/O operation that cannot be done. - Examples are reading from a pipe that has no writer (*note Pipes - and FIFOs::), and reading or writing to a terminal in certain - situations (*note Job Control::). + Similarly, a page fault causes what looks like a straightforward +sequence of instructions to take a long time. The fact that other +processes get to run while the page faults in is of no consequence, +because as soon as the I/O is complete, the high priority process will +kick them out and run again, but the wait for the I/O itself could be a +problem. To neutralize this threat, use `mlock' or `mlockall'. - Each of these kinds of events (excepting explicit calls to `kill' -and `raise') generates its own particular kind of signal. The various -kinds of signals are listed and described in detail in *Note Standard -Signals::. + There are a few ramifications of the absoluteness of this priority +on a single-CPU system that you need to keep in mind when you choose to +set a priority and also when you're working on a program that runs with +high absolute priority. Consider a process that has higher absolute +priority than any other process in the system and due to a bug in its +program, it gets into an infinite loop. It will never cede the CPU. +You can't run a command to kill it because your command would need to +get the CPU in order to run. The errant program is in complete +control. It controls the vertical, it controls the horizontal. + + There are two ways to avoid this: 1) keep a shell running somewhere +with a higher absolute priority. 2) keep a controlling terminal +attached to the high priority process group. All the priority in the +world won't stop an interrupt handler from running and delivering a +signal to the process if you hit Control-C. + + Some systems use absolute priority as a means of allocating a fixed +percentage of CPU time to a process. To do this, a super high priority +privileged process constantly monitors the process' CPU usage and raises +its absolute priority when the process isn't getting its entitled share +and lowers it when the process is exceeding it. + + *Note:* The absolute priority is sometimes called the "static +priority." We don't use that term in this manual because it misses the +most important feature of the absolute priority: its absoluteness.  -File: libc.info, Node: Signal Generation, Next: Delivery of Signal, Prev: Kinds of Signals, Up: Concepts of Signals +File: libc.info, Node: Realtime Scheduling, Next: Basic Scheduling Functions, Prev: Absolute Priority, Up: Priority -Concepts of Signal Generation ------------------------------ +Realtime Scheduling +------------------- - In general, the events that generate signals fall into three major -categories: errors, external events, and explicit requests. + Whenever two processes with the same absolute priority are ready to +run, the kernel has a decision to make, because only one can run at a +time. If the processes have absolute priority 0, the kernel makes this +decision as described in *Note Traditional Scheduling::. Otherwise, +the decision is as described in this section. - An error means that a program has done something invalid and cannot -continue execution. But not all kinds of errors generate signals--in -fact, most do not. For example, opening a nonexistent file is an error, -but it does not raise a signal; instead, `open' returns `-1'. In -general, errors that are necessarily associated with certain library -functions are reported by returning a value that indicates an error. -The errors which raise signals are those which can happen anywhere in -the program, not just in library calls. These include division by zero -and invalid memory addresses. + If two processes are ready to run but have different absolute +priorities, the decision is much simpler, and is described in *Note +Absolute Priority::. - An external event generally has to do with I/O or other processes. -These include the arrival of input, the expiration of a timer, and the -termination of a child process. + Each process has a scheduling policy. For processes with absolute +priority other than zero, there are two available: - An explicit request means the use of a library function such as -`kill' whose purpose is specifically to generate a signal. + 1. First Come First Served - Signals may be generated "synchronously" or "asynchronously". A -synchronous signal pertains to a specific action in the program, and is -delivered (unless blocked) during that action. Most errors generate -signals synchronously, and so do explicit requests by a process to -generate a signal for that same process. On some machines, certain -kinds of hardware errors (usually floating-point exceptions) are not -reported completely synchronously, but may arrive a few instructions -later. + 2. Round Robin - Asynchronous signals are generated by events outside the control of -the process that receives them. These signals arrive at unpredictable -times during execution. External events generate signals -asynchronously, and so do explicit requests that apply to some other -process. + The most sensible case is where all the processes with a certain +absolute priority have the same scheduling policy. We'll discuss that +first. - A given type of signal is either typically synchronous or typically -asynchronous. For example, signals for errors are typically synchronous -because errors generate signals synchronously. But any type of signal -can be generated synchronously or asynchronously with an explicit -request. + In Round Robin, processes share the CPU, each one running for a small +quantum of time ("time slice") and then yielding to another in a +circular fashion. Of course, only processes that are ready to run and +have the same absolute priority are in this circle. + + In First Come First Served, the process that has been waiting the +longest to run gets the CPU, and it keeps it until it voluntarily +relinquishes the CPU, runs out of things to do (blocks), or gets +preempted by a higher priority process. + + First Come First Served, along with maximal absolute priority and +careful control of interrupts and page faults, is the one to use when a +process absolutely, positively has to run at full CPU speed or not at +all. + + Judicious use of `sched_yield' function invocations by processes +with First Come First Served scheduling policy forms a good compromise +between Round Robin and First Come First Served. + + To understand how scheduling works when processes of different +scheduling policies occupy the same absolute priority, you have to know +the nitty gritty details of how processes enter and exit the ready to +run list: + + In both cases, the ready to run list is organized as a true queue, +where a process gets pushed onto the tail when it becomes ready to run +and is popped off the head when the scheduler decides to run it. Note +that ready to run and running are two mutually exclusive states. When +the scheduler runs a process, that process is no longer ready to run +and no longer in the ready to run list. When the process stops +running, it may go back to being ready to run again. + + The only difference between a process that is assigned the Round +Robin scheduling policy and a process that is assigned First Come First +Serve is that in the former case, the process is automatically booted +off the CPU after a certain amount of time. When that happens, the +process goes back to being ready to run, which means it enters the +queue at the tail. The time quantum we're talking about is small. +Really small. This is not your father's timesharing. For example, +with the Linux kernel, the round robin time slice is a thousand times +shorter than its typical time slice for traditional scheduling. + + A process begins life with the same scheduling policy as its parent +process. Functions described in *Note Basic Scheduling Functions:: can +change it. + + Only a privileged process can set the scheduling policy of a process +that has absolute priority higher than 0.  -File: libc.info, Node: Delivery of Signal, Prev: Signal Generation, Up: Concepts of Signals +File: libc.info, Node: Basic Scheduling Functions, Next: Traditional Scheduling, Prev: Realtime Scheduling, Up: Priority -How Signals Are Delivered -------------------------- +Basic Scheduling Functions +-------------------------- - When a signal is generated, it becomes "pending". Normally it -remains pending for just a short period of time and then is "delivered" -to the process that was signaled. However, if that kind of signal is -currently "blocked", it may remain pending indefinitely--until signals -of that kind are "unblocked". Once unblocked, it will be delivered -immediately. *Note Blocking Signals::. + This section describes functions in the GNU C library for setting the +absolute priority and scheduling policy of a process. - When the signal is delivered, whether right away or after a long -delay, the "specified action" for that signal is taken. For certain -signals, such as `SIGKILL' and `SIGSTOP', the action is fixed, but for -most signals, the program has a choice: ignore the signal, specify a -"handler function", or accept the "default action" for that kind of -signal. The program specifies its choice using functions such as -`signal' or `sigaction' (*note Signal Actions::). We sometimes say -that a handler "catches" the signal. While the handler is running, -that particular signal is normally blocked. + *Portability Note:* On systems that have the functions in this +section, the macro _POSIX_PRIORITY_SCHEDULING is defined in +`'. - If the specified action for a kind of signal is to ignore it, then -any such signal which is generated is discarded immediately. This -happens even if the signal is also blocked at the time. A signal -discarded in this way will never be delivered, not even if the program -subsequently specifies a different action for that kind of signal and -then unblocks it. + For the case that the scheduling policy is traditional scheduling, +more functions to fine tune the scheduling are in *Note Traditional +Scheduling::. - If a signal arrives which the program has neither handled nor -ignored, its "default action" takes place. Each kind of signal has its -own default action, documented below (*note Standard Signals::). For -most kinds of signals, the default action is to terminate the process. -For certain kinds of signals that represent "harmless" events, the -default action is to do nothing. + Don't try to make too much out of the naming and structure of these +functions. They don't match the concepts described in this manual +because the functions are as defined by POSIX.1b, but the implementation +on systems that use the GNU C library is the inverse of what the POSIX +structure contemplates. The POSIX scheme assumes that the primary +scheduling parameter is the scheduling policy and that the priority +value, if any, is a parameter of the scheduling policy. In the +implementation, though, the priority value is king and the scheduling +policy, if anything, only fine tunes the effect of that priority. - When a signal terminates a process, its parent process can determine -the cause of termination by examining the termination status code -reported by the `wait' or `waitpid' functions. (This is discussed in -more detail in *Note Process Completion::.) The information it can get -includes the fact that termination was due to a signal and the kind of -signal involved. If a program you run from a shell is terminated by a -signal, the shell typically prints some kind of error message. + The symbols in this section are declared by including file `sched.h'. - The signals that normally represent program errors have a special -property: when one of these signals terminates the process, it also -writes a "core dump file" which records the state of the process at the -time of termination. You can examine the core dump with a debugger to -investigate what caused the error. + - Data Type: struct sched_param + This structure describes an absolute priority. + `int sched_priority' + absolute priority value - If you raise a "program error" signal by explicit request, and this -terminates the process, it makes a core dump file just as if the signal -had been due directly to an error. + - Function: int sched_setscheduler (pid_t PID, int POLICY, const + struct sched_param *PARAM) + This function sets both the absolute priority and the scheduling + policy for a process. - -File: libc.info, Node: Standard Signals, Next: Signal Actions, Prev: Concepts of Signals, Up: Signal Handling + It assigns the absolute priority value given by PARAM and the + scheduling policy POLICY to the process with Process ID PID, or + the calling process if PID is zero. If POLICY is negative, + `sched_setscheduler' keeps the existing scheduling policy. -Standard Signals -================ + The following macros represent the valid values for POLICY: - This section lists the names for various standard kinds of signals -and describes what kind of event they mean. Each signal name is a macro -which stands for a positive integer--the "signal number" for that kind -of signal. Your programs should never make assumptions about the -numeric code for a particular kind of signal, but rather refer to them -always by the names defined here. This is because the number for a -given kind of signal can vary from system to system, but the meanings of -the names are standardized and fairly uniform. + `SCHED_OTHER' + Traditional Scheduling - The signal names are defined in the header file `signal.h'. + `SCHED_FIFO' + First In First Out - - Macro: int NSIG - The value of this symbolic constant is the total number of signals - defined. Since the signal numbers are allocated consecutively, - `NSIG' is also one greater than the largest defined signal number. + `SCHED_RR' + Round Robin + + On success, the return value is `0'. Otherwise, it is `-1' and + `ERRNO' is set accordingly. The `errno' values specific to this + function are: + + `EPERM' + * The calling process does not have `CAP_SYS_NICE' + permission and POLICY is not `SCHED_OTHER' (or it's + negative and the existing policy is not `SCHED_OTHER'. + + * The calling process does not have `CAP_SYS_NICE' + permission and its owner is not the target process' + owner. I.e. the effective uid of the calling process + is neither the effective nor the real uid of process PID. + + `ESRCH' + There is no process with pid PID and PID is not zero. + + `EINVAL' + * POLICY does not identify an existing scheduling policy. + + * The absolute priority value identified by *PARAM is + outside the valid range for the scheduling policy POLICY + (or the existing scheduling policy if POLICY is + negative) or PARAM is null. `sched_get_priority_max' + and `sched_get_priority_min' tell you what the valid + range is. + + * PID is negative. + + + - Function: int sched_getscheduler (pid_t PID) + This function returns the scheduling policy assigned to the + process with Process ID (pid) PID, or the calling process if PID + is zero. + + The return value is the scheduling policy. See + `sched_setscheduler' for the possible values. + + If the function fails, the return value is instead `-1' and + `errno' is set accordingly. + + The `errno' values specific to this function are: + + `ESRCH' + There is no process with pid PID and it is not zero. + + `EINVAL' + PID is negative. + + Note that this function is not an exact mate to + `sched_setscheduler' because while that function sets the + scheduling policy and the absolute priority, this function gets + only the scheduling policy. To get the absolute priority, use + `sched_getparam'. + + + - Function: int sched_setparam (pid_t PID, const struct sched_param + *PARAM) + This function sets a process' absolute priority. + + It is functionally identical to `sched_setscheduler' with POLICY = + `-1'. + + + - Function: int sched_getparam (pid_t PID, const struct sched_param + *PARAM) + This function returns a process' absolute priority. + + PID is the Process ID (pid) of the process whose absolute priority + you want to know. + + PARAM is a pointer to a structure in which the function stores the + absolute priority of the process. + + On success, the return value is `0'. Otherwise, it is `-1' and + `ERRNO' is set accordingly. The `errno' values specific to this + function are: + + `ESRCH' + There is no process with pid PID and it is not zero. + + `EINVAL' + PID is negative. + + + - Function: int sched_get_priority_min (int *POLICY); + This function returns the lowest absolute priority value that is + allowable for a process with scheduling policy POLICY. + + On Linux, it is 0 for SCHED_OTHER and 1 for everything else. + + On success, the return value is `0'. Otherwise, it is `-1' and + `ERRNO' is set accordingly. The `errno' values specific to this + function are: + + `EINVAL' + POLICY does not identify an existing scheduling policy. + + + - Function: int sched_get_priority_max (int *POLICY); + This function returns the highest absolute priority value that is + allowable for a process that with scheduling policy POLICY. + + On Linux, it is 0 for SCHED_OTHER and 99 for everything else. + + On success, the return value is `0'. Otherwise, it is `-1' and + `ERRNO' is set accordingly. The `errno' values specific to this + function are: + + `EINVAL' + POLICY does not identify an existing scheduling policy. + + + - Function: int sched_rr_get_interval (pid_t PID, struct timespec + *INTERVAL) + This function returns the length of the quantum (time slice) used + with the Round Robin scheduling policy, if it is used, for the + process with Process ID PID. + + It returns the length of time as INTERVAL. + + With a Linux kernel, the round robin time slice is always 150 + microseconds, and PID need not even be a real pid. + + The return value is `0' on success and in the pathological case + that it fails, the return value is `-1' and `errno' is set + accordingly. There is nothing specific that can go wrong with this + function, so there are no specific `errno' values. + + + - Function: int sched_yield (void) + This function voluntarily gives up the process' claim on the CPU. + + Technically, `sched_yield' causes the calling process to be made + immediately ready to run (as opposed to running, which is what it + was before). This means that if it has absolute priority higher + than 0, it gets pushed onto the tail of the queue of processes + that share its absolute priority and are ready to run, and it will + run again when its turn next arrives. If its absolute priority is + 0, it is more complicated, but still has the effect of yielding + the CPU to other processes. + + If there are no other processes that share the calling process' + absolute priority, this function doesn't have any effect. + + To the extent that the containing program is oblivious to what + other processes in the system are doing and how fast it executes, + this function appears as a no-op. + + The return value is `0' on success and in the pathological case + that it fails, the return value is `-1' and `errno' is set + accordingly. There is nothing specific that can go wrong with this + function, so there are no specific `errno' values. + + + +File: libc.info, Node: Traditional Scheduling, Prev: Basic Scheduling Functions, Up: Priority + +Traditional Scheduling +---------------------- + + This section is about the scheduling among processes whose absolute +priority is 0. When the system hands out the scraps of CPU time that +are left over after the processes with higher absolute priority have +taken all they want, the scheduling described herein determines who +among the great unwashed processes gets them. * Menu: -* Program Error Signals:: Used to report serious program errors. -* Termination Signals:: Used to interrupt and/or terminate the - program. -* Alarm Signals:: Used to indicate expiration of timers. -* Asynchronous I/O Signals:: Used to indicate input is available. -* Job Control Signals:: Signals used to support job control. -* Operation Error Signals:: Used to report operational system errors. -* Miscellaneous Signals:: Miscellaneous Signals. -* Signal Messages:: Printing a message describing a signal. +* Traditional Scheduling Intro:: +* Traditional Scheduling Functions:: + + +File: libc.info, Node: Traditional Scheduling Intro, Next: Traditional Scheduling Functions, Up: Traditional Scheduling + +Introduction To Traditional Scheduling +...................................... + + Long before there was absolute priority (See *Note Absolute +Priority::), Unix systems were scheduling the CPU using this system. +When Posix came in like the Romans and imposed absolute priorities to +accommodate the needs of realtime processing, it left the indigenous +Absolute Priority Zero processes to govern themselves by their own +familiar scheduling policy. + + Indeed, absolute priorities higher than zero are not available on +many systems today and are not typically used when they are, being +intended mainly for computers that do realtime processing. So this +section describes the only scheduling many programmers need to be +concerned about. + + But just to be clear about the scope of this scheduling: Any time a +process with a absolute priority of 0 and a process with an absolute +priority higher than 0 are ready to run at the same time, the one with +absolute priority 0 does not run. If it's already running when the +higher priority ready-to-run process comes into existence, it stops +immediately. + + In addition to its absolute priority of zero, every process has +another priority, which we will refer to as "dynamic priority" because +it changes over time. The dynamic priority is meaningless for +processes with an absolute priority higher than zero. + + The dynamic priority sometimes determines who gets the next turn on +the CPU. Sometimes it determines how long turns last. Sometimes it +determines whether a process can kick another off the CPU. + + In Linux, the value is a combination of these things, but mostly it +is just determines the length of the time slice. The higher a process' +dynamic priority, the longer a shot it gets on the CPU when it gets one. +If it doesn't use up its time slice before giving up the CPU to do +something like wait for I/O, it is favored for getting the CPU back when +it's ready for it, to finish out its time slice. Other than that, +selection of processes for new time slices is basically round robin. +But the scheduler does throw a bone to the low priority processes: A +process' dynamic priority rises every time it is snubbed in the +scheduling process. In Linux, even the fat kid gets to play. + + The fluctuation of a process' dynamic priority is regulated by +another value: The "nice" value. The nice value is an integer, usually +in the range -20 to 20, and represents an upper limit on a process' +dynamic priority. The higher the nice number, the lower that limit. + + On a typical Linux system, for example, a process with a nice value +of 20 can get only 10 milliseconds on the CPU at a time, whereas a +process with a nice value of -20 can achieve a high enough priority to +get 400 milliseconds. + + The idea of the nice value is deferential courtesy. In the +beginning, in the Unix garden of Eden, all processes shared equally in +the bounty of the computer system. But not all processes really need +the same share of CPU time, so the nice value gave a courteous process +the ability to refuse its equal share of CPU time that others might +prosper. Hence, the higher a process' nice value, the nicer the +process is. (Then a snake came along and offered some process a +negative nice value and the system became the crass resource allocation +system we know today). + + Dynamic priorities tend upward and downward with an objective of +smoothing out allocation of CPU time and giving quick response time to +infrequent requests. But they never exceed their nice limits, so on a +heavily loaded CPU, the nice value effectively determines how fast a +process runs. + + In keeping with the socialistic heritage of Unix process priority, a +process begins life with the same nice value as its parent process and +can raise it at will. A process can also raise the nice value of any +other process owned by the same user (or effective user). But only a +privileged process can lower its nice value. A privileged process can +also raise or lower another process' nice value. + + GNU C Library functions for getting and setting nice values are +described in *Note Traditional Scheduling Functions::. diff -durpN glibc-2.2.4/manual/libc.info-38 glibc-2.2.5/manual/libc.info-38 --- glibc-2.2.4/manual/libc.info-38 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-38 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1180 +33,1073 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Program Error Signals, Next: Termination Signals, Up: Standard Signals - -Program Error Signals ---------------------- +File: libc.info, Node: Traditional Scheduling Functions, Prev: Traditional Scheduling Intro, Up: Traditional Scheduling - The following signals are generated when a serious program error is -detected by the operating system or the computer itself. In general, -all of these signals are indications that your program is seriously -broken in some way, and there's usually no way to continue the -computation which encountered the error. +Functions For Traditional Scheduling +.................................... - Some programs handle program error signals in order to tidy up before -terminating; for example, programs that turn off echoing of terminal -input should handle program error signals in order to turn echoing back -on. The handler should end by specifying the default action for the -signal that happened and then reraising it; this will cause the program -to terminate with that signal, as if it had not had a handler. (*Note -Termination in Handler::.) + This section describes how you can read and set the nice value of a +process. All these symbols are declared in `sys/resource.h'. - Termination is the sensible ultimate outcome from a program error in -most programs. However, programming systems such as Lisp that can load -compiled user programs might need to keep executing even if a user -program incurs an error. These programs have handlers which use -`longjmp' to return control to the command level. + The function and macro names are defined by POSIX, and refer to +"priority," but the functions actually have to do with nice values, as +the terms are used both in the manual and POSIX. - The default action for all of these signals is to cause the process -to terminate. If you block or ignore these signals or establish -handlers for them that return normally, your program will probably -break horribly when such signals happen, unless they are generated by -`raise' or `kill' instead of a real error. + The range of valid nice values depends on the kernel, but typically +it runs from `-20' to `20'. A lower nice value corresponds to higher +priority for the process. These constants describe the range of +priority values: - When one of these program error signals terminates a process, it also -writes a "core dump file" which records the state of the process at the -time of termination. The core dump file is named `core' and is written -in whichever directory is current in the process at the time. (On the -GNU system, you can specify the file name for core dumps with the -environment variable `COREFILE'.) The purpose of core dump files is so -that you can examine them with a debugger to investigate what caused -the error. +`PRIO_MIN' + The lowest valid nice value. - - Macro: int SIGFPE - The `SIGFPE' signal reports a fatal arithmetic error. Although the - name is derived from "floating-point exception", this signal - actually covers all arithmetic errors, including division by zero - and overflow. If a program stores integer data in a location - which is then used in a floating-point operation, this often - causes an "invalid operation" exception, because the processor - cannot recognize the data as a floating-point number. +`PRIO_MAX' + The highest valid nice value. - Actual floating-point exceptions are a complicated subject because - there are many types of exceptions with subtly different meanings, - and the `SIGFPE' signal doesn't distinguish between them. The - `IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std - 754-1985 and ANSI/IEEE Std 854-1987)' defines various - floating-point exceptions and requires conforming computer systems - to report their occurrences. However, this standard does not - specify how the exceptions are reported, or what kinds of handling - and control the operating system can offer to the programmer. + - Function: int getpriority (int CLASS, int ID) + Return the nice value of a set of processes; CLASS and ID specify + which ones (see below). If the processes specified do not all + have the same nice value, this returns the lowest value that any + of them has. - BSD systems provide the `SIGFPE' handler with an extra argument that -distinguishes various causes of the exception. In order to access this -argument, you must define the handler to accept two arguments, which -means you must cast it to a one-argument function type in order to -establish the handler. The GNU library does provide this extra -argument, but the value is meaningful only on operating systems that -provide the information (BSD systems and GNU systems). + On success, the return value is `0'. Otherwise, it is `-1' and + `ERRNO' is set accordingly. The `errno' values specific to this + function are: -`FPE_INTOVF_TRAP' - Integer overflow (impossible in a C program unless you enable - overflow trapping in a hardware-specific fashion). + `ESRCH' + The combination of CLASS and ID does not match any existing + process. -`FPE_INTDIV_TRAP' - Integer division by zero. + `EINVAL' + The value of CLASS is not valid. -`FPE_SUBRNG_TRAP' - Subscript-range (something that C programs never check for). + If the return value is `-1', it could indicate failure, or it could + be the nice value. The only way to make certain is to set `errno = + 0' before calling `getpriority', then use `errno != 0' afterward + as the criterion for failure. -`FPE_FLTOVF_TRAP' - Floating overflow trap. + - Function: int setpriority (int CLASS, int ID, int NICEVAL) + Set the nice value of a set of processes to NICEVAL; CLASS and ID + specify which ones (see below). -`FPE_FLTDIV_TRAP' - Floating/decimal division by zero. + The return value is `0' on success, and `-1' on failure. The + following `errno' error condition are possible for this function: -`FPE_FLTUND_TRAP' - Floating underflow trap. (Trapping on floating underflow is not - normally enabled.) + `ESRCH' + The combination of CLASS and ID does not match any existing + process. -`FPE_DECOVF_TRAP' - Decimal overflow trap. (Only a few machines have decimal - arithmetic and C never uses it.) + `EINVAL' + The value of CLASS is not valid. - - Macro: int SIGILL - The name of this signal is derived from "illegal instruction"; it - usually means your program is trying to execute garbage or a - privileged instruction. Since the C compiler generates only valid - instructions, `SIGILL' typically indicates that the executable - file is corrupted, or that you are trying to execute data. Some - common ways of getting into the latter situation are by passing an - invalid object where a pointer to a function was expected, or by - writing past the end of an automatic array (or similar problems - with pointers to automatic variables) and corrupting other data on - the stack such as the return address of a stack frame. + `EPERM' + The call would set the nice value of a process which is owned + by a different user than the calling process (i.e. the target + process' real or effective uid does not match the calling + process' effective uid) and the calling process does not have + `CAP_SYS_NICE' permission. - `SIGILL' can also be generated when the stack overflows, or when - the system has trouble running the handler for a signal. + `EACCES' + The call would lower the process' nice value and the process + does not have `CAP_SYS_NICE' permission. - - Macro: int SIGSEGV - This signal is generated when a program tries to read or write - outside the memory that is allocated for it, or to write memory - that can only be read. (Actually, the signals only occur when the - program goes far enough outside to be detected by the system's - memory protection mechanism.) The name is an abbreviation for - "segmentation violation". - Common ways of getting a `SIGSEGV' condition include dereferencing - a null or uninitialized pointer, or when you use a pointer to step - through an array, but fail to check for the end of the array. It - varies among systems whether dereferencing a null pointer generates - `SIGSEGV' or `SIGBUS'. + The arguments CLASS and ID together specify a set of processes in +which you are interested. These are the possible values of CLASS: - - Macro: int SIGBUS - This signal is generated when an invalid pointer is dereferenced. - Like `SIGSEGV', this signal is typically the result of - dereferencing an uninitialized pointer. The difference between - the two is that `SIGSEGV' indicates an invalid access to valid - memory, while `SIGBUS' indicates an access to an invalid address. - In particular, `SIGBUS' signals often result from dereferencing a - misaligned pointer, such as referring to a four-word integer at an - address not divisible by four. (Each kind of computer has its own - requirements for address alignment.) +`PRIO_PROCESS' + One particular process. The argument ID is a process ID (pid). - The name of this signal is an abbreviation for "bus error". +`PRIO_PGRP' + All the processes in a particular process group. The argument ID + is a process group ID (pgid). - - Macro: int SIGABRT - This signal indicates an error detected by the program itself and - reported by calling `abort'. *Note Aborting a Program::. +`PRIO_USER' + All the processes owned by a particular user (i.e. whose real uid + indicates the user). The argument ID is a user ID (uid). - - Macro: int SIGIOT - Generated by the PDP-11 "iot" instruction. On most machines, this - is just another name for `SIGABRT'. + If the argument ID is 0, it stands for the calling process, its +process group, or its owner (real uid), according to CLASS. - - Macro: int SIGTRAP - Generated by the machine's breakpoint instruction, and possibly - other trap instructions. This signal is used by debuggers. Your - program will probably only see `SIGTRAP' if it is somehow - executing bad instructions. + - Function: int nice (int INCREMENT) + Increment the nice value of the calling process by INCREMENT. The + return value is the new nice value on success, and `-1' on + failure. In the case of failure, `errno' will be set to the same + values as for `setpriority'. - - Macro: int SIGEMT - Emulator trap; this results from certain unimplemented instructions - which might be emulated in software, or the operating system's - failure to properly emulate them. + Here is an equivalent definition of `nice': - - Macro: int SIGSYS - Bad system call; that is to say, the instruction to trap to the - operating system was executed, but the code number for the system - call to perform was invalid. + int + nice (int increment) + { + int result, old = getpriority (PRIO_PROCESS, 0); + result = setpriority (PRIO_PROCESS, 0, old + increment); + if (result != -1) + return old + increment; + else + return -1; + }  -File: libc.info, Node: Termination Signals, Next: Alarm Signals, Prev: Program Error Signals, Up: Standard Signals - -Termination Signals -------------------- - - These signals are all used to tell a process to terminate, in one way -or another. They have different names because they're used for slightly -different purposes, and programs might want to handle them differently. - - The reason for handling these signals is usually so your program can -tidy up as appropriate before actually terminating. For example, you -might want to save state information, delete temporary files, or restore -the previous terminal modes. Such a handler should end by specifying -the default action for the signal that happened and then reraising it; -this will cause the program to terminate with that signal, as if it had -not had a handler. (*Note Termination in Handler::.) - - The (obvious) default action for all of these signals is to cause the -process to terminate. - - - Macro: int SIGTERM - The `SIGTERM' signal is a generic signal used to cause program - termination. Unlike `SIGKILL', this signal can be blocked, - handled, and ignored. It is the normal way to politely ask a - program to terminate. - - The shell command `kill' generates `SIGTERM' by default. - - - Macro: int SIGINT - The `SIGINT' ("program interrupt") signal is sent when the user - types the INTR character (normally `C-c'). *Note Special - Characters::, for information about terminal driver support for - `C-c'. - - - Macro: int SIGQUIT - The `SIGQUIT' signal is similar to `SIGINT', except that it's - controlled by a different key--the QUIT character, usually - `C-\'--and produces a core dump when it terminates the process, - just like a program error signal. You can think of this as a - program error condition "detected" by the user. - - *Note Program Error Signals::, for information about core dumps. - *Note Special Characters::, for information about terminal driver - support. - - Certain kinds of cleanups are best omitted in handling `SIGQUIT'. - For example, if the program creates temporary files, it should - handle the other termination requests by deleting the temporary - files. But it is better for `SIGQUIT' not to delete them, so that - the user can examine them in conjunction with the core dump. - - - Macro: int SIGKILL - The `SIGKILL' signal is used to cause immediate program - termination. It cannot be handled or ignored, and is therefore - always fatal. It is also not possible to block this signal. - - This signal is usually generated only by explicit request. Since - it cannot be handled, you should generate it only as a last - resort, after first trying a less drastic method such as `C-c' or - `SIGTERM'. If a process does not respond to any other termination - signals, sending it a `SIGKILL' signal will almost always cause it - to go away. +File: libc.info, Node: Memory Resources, Next: Processor Resources, Prev: Priority, Up: Resource Usage And Limitation - In fact, if `SIGKILL' fails to terminate a process, that by itself - constitutes an operating system bug which you should report. +Querying memory available resources +=================================== - The system will generate `SIGKILL' for a process itself under some - unusual conditions where the program cannot possibly continue to - run (even to run a signal handler). + The amount of memory available in the system and the way it is +organized determines oftentimes the way programs can and have to work. +For functions like `mmap' it is necessary to know about the size of +individual memory pages and knowing how much memory is available enables +a program to select appropriate sizes for, say, caches. Before we get +into these details a few words about memory subsystems in traditional +Unix systems will be given. - - Macro: int SIGHUP - The `SIGHUP' ("hang-up") signal is used to report that the user's - terminal is disconnected, perhaps because a network or telephone - connection was broken. For more information about this, see *Note - Control Modes::. +* Menu: - This signal is also used to report the termination of the - controlling process on a terminal to jobs associated with that - session; this termination effectively disconnects all processes in - the session from the controlling terminal. For more information, - see *Note Termination Internals::. +* Memory Subsystem:: Overview about traditional Unix memory handling. +* Query Memory Parameters:: How to get information about the memory + subsystem?  -File: libc.info, Node: Alarm Signals, Next: Asynchronous I/O Signals, Prev: Termination Signals, Up: Standard Signals - -Alarm Signals -------------- +File: libc.info, Node: Memory Subsystem, Next: Query Memory Parameters, Up: Memory Resources - These signals are used to indicate the expiration of timers. *Note -Setting an Alarm::, for information about functions that cause these -signals to be sent. +Overview about traditional Unix memory handling +----------------------------------------------- - The default behavior for these signals is to cause program -termination. This default is rarely useful, but no other default would -be useful; most of the ways of using these signals would require -handler functions in any case. + Unix systems normally provide processes virtual address spaces. This +means that the addresses of the memory regions do not have to correspond +directly to the addresses of the actual physical memory which stores the +data. An extra level of indirection is introduced which translates +virtual addresses into physical addresses. This is normally done by the +hardware of the processor. - - Macro: int SIGALRM - This signal typically indicates expiration of a timer that - measures real or clock time. It is used by the `alarm' function, - for example. + Using a virtual address space has several advantage. The most +important is process isolation. The different processes running on the +system cannot interfere directly with each other. No process can write +into the address space of another process (except when shared memory is +used but then it is wanted and controlled). - - Macro: int SIGVTALRM - This signal typically indicates expiration of a timer that - measures CPU time used by the current process. The name is an - abbreviation for "virtual time alarm". + Another advantage of virtual memory is that the address space the +processes see can actually be larger than the physical memory available. +The physical memory can be extended by storage on an external media +where the content of currently unused memory regions is stored. The +address translation can then intercept accesses to these memory regions +and make memory content available again by loading the data back into +memory. This concept makes it necessary that programs which have to use +lots of memory know the difference between available virtual address +space and available physical memory. If the working set of virtual +memory of all the processes is larger than the available physical memory +the system will slow down dramatically due to constant swapping of +memory content from the memory to the storage media and back. This is +called "thrashing". - - Macro: int SIGPROF - This signal typically indicates expiration of a timer that measures - both CPU time used by the current process, and CPU time expended on - behalf of the process by the system. Such a timer is used to - implement code profiling facilities, hence the name of this signal. + A final aspect of virtual memory which is important and follows from +what is said in the last paragraph is the granularity of the virtual +address space handling. When we said that the virtual address handling +stores memory content externally it cannot do this on a byte-by-byte +basis. The administrative overhead does not allow this (leaving alone +the processor hardware). Instead several thousand bytes are handled +together and form a "page". The size of each page is always a power of +two byte. The smallest page size in use today is 4096, with 8192, +16384, and 65536 being other popular sizes.  -File: libc.info, Node: Asynchronous I/O Signals, Next: Job Control Signals, Prev: Alarm Signals, Up: Standard Signals - -Asynchronous I/O Signals ------------------------- - - The signals listed in this section are used in conjunction with -asynchronous I/O facilities. You have to take explicit action by -calling `fcntl' to enable a particular file descriptor to generate -these signals (*note Interrupt Input::). The default action for these -signals is to ignore them. - - - Macro: int SIGIO - This signal is sent when a file descriptor is ready to perform - input or output. +File: libc.info, Node: Query Memory Parameters, Prev: Memory Subsystem, Up: Memory Resources - On most operating systems, terminals and sockets are the only - kinds of files that can generate `SIGIO'; other kinds, including - ordinary files, never generate `SIGIO' even if you ask them to. +How to get information about the memory subsystem? +-------------------------------------------------- - In the GNU system `SIGIO' will always be generated properly if you - successfully set asynchronous mode with `fcntl'. + The page size of the virtual memory the process sees is essential to +know in several situations. Some programming interface (e.g., `mmap', +*note Memory-mapped I/O::) require the user to provide information +adjusted to the page size. In the case of `mmap' is it necessary to +provide a length argument which is a multiple of the page size. +Another place where the knowledge about the page size is useful is in +memory allocation. If one allocates pieces of memory in larger chunks +which are then subdivided by the application code it is useful to +adjust the size of the larger blocks to the page size. If the total +memory requirement for the block is close (but not larger) to a multiple +of the page size the kernel's memory handling can work more effectively +since it only has to allocate memory pages which are fully used. (To do +this optimization it is necessary to know a bit about the memory +allocator which will require a bit of memory itself for each block and +this overhead must not push the total size over the page size multiple. - - Macro: int SIGURG - This signal is sent when "urgent" or out-of-band data arrives on a - socket. *Note Out-of-Band Data::. + The page size traditionally was a compile time constant. But recent +development of processors changed this. Processors now support +different page sizes and they can possibly even vary among different +processes on the same system. Therefore the system should be queried at +runtime about the current page size and no assumptions (except about it +being a power of two) should be made. - - Macro: int SIGPOLL - This is a System V signal name, more or less similar to `SIGIO'. - It is defined only for compatibility. + The correct interface to query about the page size is `sysconf' +(*note Sysconf Definition::) with the parameter `_SC_PAGESIZE'. There +is a much older interface available, too. - -File: libc.info, Node: Job Control Signals, Next: Operation Error Signals, Prev: Asynchronous I/O Signals, Up: Standard Signals + - Function: int getpagesize (void) + The `getpagesize' function returns the page size of the process. + This value is fixed for the runtime of the process but can vary in + different runs of the application. -Job Control Signals -------------------- + The function is declared in `unistd.h'. - These signals are used to support job control. If your system -doesn't support job control, then these macros are defined but the -signals themselves can't be raised or handled. + Widely available on System V derived systems is a method to get +information about the physical memory the system has. The call - You should generally leave these signals alone unless you really -understand how job control works. *Note Job Control::. + sysconf (_SC_PHYS_PAGES) - - Macro: int SIGCHLD - This signal is sent to a parent process whenever one of its child - processes terminates or stops. +returns the total number of pages of physical the system has. This +does not mean all this memory is available. This information can be +found using - The default action for this signal is to ignore it. If you - establish a handler for this signal while there are child - processes that have terminated but not reported their status via - `wait' or `waitpid' (*note Process Completion::), whether your new - handler applies to those processes or not depends on the - particular operating system. + sysconf (_SC_AVPHYS_PAGES) - - Macro: int SIGCLD - This is an obsolete name for `SIGCHLD'. + These two values help to optimize applications. The value returned +for `_SC_AVPHYS_PAGES' is the amount of memory the application can use +without hindering any other process (given that no other process +increases its memory usage). The value returned for `_SC_PHYS_PAGES' +is more or less a hard limit for the working set. If all applications +together constantly use more than that amount of memory the system is +in trouble. - - Macro: int SIGCONT - You can send a `SIGCONT' signal to a process to make it continue. - This signal is special--it always makes the process continue if it - is stopped, before the signal is delivered. The default behavior - is to do nothing else. You cannot block this signal. You can set - a handler, but `SIGCONT' always makes the process continue - regardless. + The GNU C library provides in addition to these already described +way to get this information two functions. They are declared in the +file `sys/sysinfo.h'. Programmers should prefer to use the `sysconf' +method described above. - Most programs have no reason to handle `SIGCONT'; they simply - resume execution without realizing they were ever stopped. You - can use a handler for `SIGCONT' to make a program do something - special when it is stopped and continued--for example, to reprint - a prompt when it is suspended while waiting for input. + - Function: long int get_phys_pages (void) + The `get_phys_pages' function returns the total number of pages of + physical the system has. To get the amount of memory this number + has to be multiplied by the page size. - - Macro: int SIGSTOP - The `SIGSTOP' signal stops the process. It cannot be handled, - ignored, or blocked. + This function is a GNU extension. - - Macro: int SIGTSTP - The `SIGTSTP' signal is an interactive stop signal. Unlike - `SIGSTOP', this signal can be handled and ignored. + - Function: long int get_avphys_pages (void) + The `get_phys_pages' function returns the number of available + pages of physical the system has. To get the amount of memory + this number has to be multiplied by the page size. - Your program should handle this signal if you have a special need - to leave files or system tables in a secure state when a process is - stopped. For example, programs that turn off echoing should handle - `SIGTSTP' so they can turn echoing back on before stopping. + This function is a GNU extension. - This signal is generated when the user types the SUSP character - (normally `C-z'). For more information about terminal driver - support, see *Note Special Characters::. + +File: libc.info, Node: Processor Resources, Prev: Memory Resources, Up: Resource Usage And Limitation - - Macro: int SIGTTIN - A process cannot read from the user's terminal while it is running - as a background job. When any process in a background job tries to - read from the terminal, all of the processes in the job are sent a - `SIGTTIN' signal. The default action for this signal is to stop - the process. For more information about how this interacts with - the terminal driver, see *Note Access to the Terminal::. +Learn about the processors available +==================================== - - Macro: int SIGTTOU - This is similar to `SIGTTIN', but is generated when a process in a - background job attempts to write to the terminal or set its modes. - Again, the default action is to stop the process. `SIGTTOU' is - only generated for an attempt to write to the terminal if the - `TOSTOP' output mode is set; *note Output Modes::. + The use of threads or processes with shared memory allows an +application to take advantage of all the processing power a system can +provide. If the task can be parallelized the optimal way to write an +application is to have at any time as many processes running as there +are processors. To determine the number of processors available to the +system one can run - While a process is stopped, no more signals can be delivered to it -until it is continued, except `SIGKILL' signals and (obviously) -`SIGCONT' signals. The signals are marked as pending, but not -delivered until the process is continued. The `SIGKILL' signal always -causes termination of the process and can't be blocked, handled or -ignored. You can ignore `SIGCONT', but it always causes the process to -be continued anyway if it is stopped. Sending a `SIGCONT' signal to a -process causes any pending stop signals for that process to be -discarded. Likewise, any pending `SIGCONT' signals for a process are -discarded when it receives a stop signal. + sysconf (_SC_NPROCESSORS_CONF) - When a process in an orphaned process group (*note Orphaned Process -Groups::) receives a `SIGTSTP', `SIGTTIN', or `SIGTTOU' signal and does -not handle it, the process does not stop. Stopping the process would -probably not be very useful, since there is no shell program that will -notice it stop and allow the user to continue it. What happens instead -depends on the operating system you are using. Some systems may do -nothing; others may deliver another signal instead, such as `SIGKILL' -or `SIGHUP'. In the GNU system, the process dies with `SIGKILL'; this -avoids the problem of many stopped, orphaned processes lying around the -system. +which returns the number of processors the operating system configured. +But it might be possible for the operating system to disable individual +processors and so the call - -File: libc.info, Node: Operation Error Signals, Next: Miscellaneous Signals, Prev: Job Control Signals, Up: Standard Signals + sysconf (_SC_NPROCESSORS_ONLN) -Operation Error Signals ------------------------ +returns the number of processors which are currently inline (i.e., +available). - These signals are used to report various errors generated by an -operation done by the program. They do not necessarily indicate a -programming error in the program, but an error that prevents an -operating system call from completing. The default action for all of -them is to cause the process to terminate. + For these two pieces of information the GNU C library also provides +functions to get the information directly. The functions are declared +in `sys/sysinfo.h'. - - Macro: int SIGPIPE - Broken pipe. If you use pipes or FIFOs, you have to design your - application so that one process opens the pipe for reading before - another starts writing. If the reading process never starts, or - terminates unexpectedly, writing to the pipe or FIFO raises a - `SIGPIPE' signal. If `SIGPIPE' is blocked, handled or ignored, - the offending call fails with `EPIPE' instead. + - Function: int get_nprocs_conf (void) + The `get_nprocs_conf' function returns the number of processors the + operating system configured. - Pipes and FIFO special files are discussed in more detail in *Note - Pipes and FIFOs::. + This function is a GNU extension. - Another cause of `SIGPIPE' is when you try to output to a socket - that isn't connected. *Note Sending Data::. + - Function: int get_nprocs (void) + The `get_nprocs' function returns the number of available + processors. - - Macro: int SIGLOST - Resource lost. This signal is generated when you have an advisory - lock on an NFS file, and the NFS server reboots and forgets about - your lock. + This function is a GNU extension. - In the GNU system, `SIGLOST' is generated when any server program - dies unexpectedly. It is usually fine to ignore the signal; - whatever call was made to the server that died just returns an - error. + Before starting more threads it should be checked whether the +processors are not already overused. Unix systems calculate something +called the "load average". This is a number indicating how many +processes were running. This number is average over different periods +of times (normally 1, 5, and 15 minutes). - - Macro: int SIGXCPU - CPU time limit exceeded. This signal is generated when the process - exceeds its soft resource limit on CPU time. *Note Limits on - Resources::. + - Function: int getloadavg (double LOADAVG[], int NELEM) + This function gets the 1, 5 and 15 minute load averages of the + system. The values are placed in LOADAVG. `getloadavg' will place + at most NELEM elements into the array but never more than three + elements. The return value is the number of elements written to + LOADAVG, or -1 on error. - - Macro: int SIGXFSZ - File size limit exceeded. This signal is generated when the - process attempts to extend a file so it exceeds the process's soft - resource limit on file size. *Note Limits on Resources::. + This function is declared in `stdlib.h'.  -File: libc.info, Node: Miscellaneous Signals, Next: Signal Messages, Prev: Operation Error Signals, Up: Standard Signals - -Miscellaneous Signals ---------------------- - - These signals are used for various other purposes. In general, they -will not affect your program unless it explicitly uses them for -something. - - - Macro: int SIGUSR1 - - Macro: int SIGUSR2 - The `SIGUSR1' and `SIGUSR2' signals are set aside for you to use - any way you want. They're useful for simple interprocess - communication, if you write a signal handler for them in the - program that receives the signal. +File: libc.info, Node: Non-Local Exits, Next: Signal Handling, Prev: Resource Usage And Limitation, Up: Top - There is an example showing the use of `SIGUSR1' and `SIGUSR2' in - *Note Signaling Another Process::. +Non-Local Exits +*************** - The default action is to terminate the process. + Sometimes when your program detects an unusual situation inside a +deeply nested set of function calls, you would like to be able to +immediately return to an outer level of control. This section +describes how you can do such "non-local exits" using the `setjmp' and +`longjmp' functions. - - Macro: int SIGWINCH - Window size change. This is generated on some systems (including - GNU) when the terminal driver's record of the number of rows and - columns on the screen is changed. The default action is to ignore - it. +* Menu: - If a program does full-screen display, it should handle `SIGWINCH'. - When the signal arrives, it should fetch the new screen size and - reformat its display accordingly. +* Intro: Non-Local Intro. When and how to use these facilities. +* Details: Non-Local Details. Functions for non-local exits. +* Non-Local Exits and Signals:: Portability issues. +* System V contexts:: Complete context control a la System V. - - Macro: int SIGINFO - Information request. In 4.4 BSD and the GNU system, this signal - is sent to all the processes in the foreground process group of - the controlling terminal when the user types the STATUS character - in canonical mode; *note Signal Characters::. + +File: libc.info, Node: Non-Local Intro, Next: Non-Local Details, Up: Non-Local Exits - If the process is the leader of the process group, the default - action is to print some status information about the system and - what the process is doing. Otherwise the default is to do nothing. +Introduction to Non-Local Exits +=============================== - -File: libc.info, Node: Signal Messages, Prev: Miscellaneous Signals, Up: Standard Signals + As an example of a situation where a non-local exit can be useful, +suppose you have an interactive program that has a "main loop" that +prompts for and executes commands. Suppose the "read" command reads +input from a file, doing some lexical analysis and parsing of the input +while processing it. If a low-level input error is detected, it would +be useful to be able to return immediately to the "main loop" instead +of having to make each of the lexical analysis, parsing, and processing +phases all have to explicitly deal with error situations initially +detected by nested calls. -Signal Messages ---------------- + (On the other hand, if each of these phases has to do a substantial +amount of cleanup when it exits--such as closing files, deallocating +buffers or other data structures, and the like--then it can be more +appropriate to do a normal return and have each phase do its own +cleanup, because a non-local exit would bypass the intervening phases +and their associated cleanup code entirely. Alternatively, you could +use a non-local exit but do the cleanup explicitly either before or +after returning to the "main loop".) - We mentioned above that the shell prints a message describing the -signal that terminated a child process. The clean way to print a -message describing a signal is to use the functions `strsignal' and -`psignal'. These functions use a signal number to specify which kind -of signal to describe. The signal number may come from the termination -status of a child process (*note Process Completion::) or it may come -from a signal handler in the same process. + In some ways, a non-local exit is similar to using the `return' +statement to return from a function. But while `return' abandons only +a single function call, transferring control back to the point at which +it was called, a non-local exit can potentially abandon many levels of +nested function calls. - - Function: char * strsignal (int SIGNUM) - This function returns a pointer to a statically-allocated string - containing a message describing the signal SIGNUM. You should not - modify the contents of this string; and, since it can be rewritten - on subsequent calls, you should save a copy of it if you need to - reference it later. + You identify return points for non-local exits by calling the +function `setjmp'. This function saves information about the execution +environment in which the call to `setjmp' appears in an object of type +`jmp_buf'. Execution of the program continues normally after the call +to `setjmp', but if an exit is later made to this return point by +calling `longjmp' with the corresponding `jmp_buf' object, control is +transferred back to the point where `setjmp' was called. The return +value from `setjmp' is used to distinguish between an ordinary return +and a return made by a call to `longjmp', so calls to `setjmp' usually +appear in an `if' statement. - This function is a GNU extension, declared in the header file - `string.h'. + Here is how the example program described above might be set up: - - Function: void psignal (int SIGNUM, const char *MESSAGE) - This function prints a message describing the signal SIGNUM to the - standard error output stream `stderr'; see *Note Standard - Streams::. + #include + #include + #include + + jmp_buf main_loop; + + void + abort_to_main_loop (int status) + { + longjmp (main_loop, status); + } + + int + main (void) + { + while (1) + if (setjmp (main_loop)) + puts ("Back at main loop...."); + else + do_command (); + } + + + void + do_command (void) + { + char buffer[128]; + if (fgets (buffer, 128, stdin) == NULL) + abort_to_main_loop (-1); + else + exit (EXIT_SUCCESS); + } - If you call `psignal' with a MESSAGE that is either a null pointer - or an empty string, `psignal' just prints the message - corresponding to SIGNUM, adding a trailing newline. + The function `abort_to_main_loop' causes an immediate transfer of +control back to the main loop of the program, no matter where it is +called from. - If you supply a non-null MESSAGE argument, then `psignal' prefixes - its output with this string. It adds a colon and a space - character to separate the MESSAGE from the string corresponding to - SIGNUM. + The flow of control inside the `main' function may appear a little +mysterious at first, but it is actually a common idiom with `setjmp'. +A normal call to `setjmp' returns zero, so the "else" clause of the +conditional is executed. If `abort_to_main_loop' is called somewhere +within the execution of `do_command', then it actually appears as if +the _same_ call to `setjmp' in `main' were returning a second time with +a value of `-1'. - This function is a BSD feature, declared in the header file - `signal.h'. + So, the general pattern for using `setjmp' looks something like: - There is also an array `sys_siglist' which contains the messages for -the various signal codes. This array exists on BSD systems, unlike -`strsignal'. + if (setjmp (BUFFER)) + /* Code to clean up after premature return. */ + ... + else + /* Code to be executed normally after setting up the return point. */ + ...  -File: libc.info, Node: Signal Actions, Next: Defining Handlers, Prev: Standard Signals, Up: Signal Handling +File: libc.info, Node: Non-Local Details, Next: Non-Local Exits and Signals, Prev: Non-Local Intro, Up: Non-Local Exits -Specifying Signal Actions -========================= +Details of Non-Local Exits +========================== - The simplest way to change the action for a signal is to use the -`signal' function. You can specify a built-in action (such as to -ignore the signal), or you can "establish a handler". + Here are the details on the functions and data structures used for +performing non-local exits. These facilities are declared in +`setjmp.h'. - The GNU library also implements the more versatile `sigaction' -facility. This section describes both facilities and gives suggestions -on which to use when. + - Data Type: jmp_buf + Objects of type `jmp_buf' hold the state information to be + restored by a non-local exit. The contents of a `jmp_buf' + identify a specific place to return to. -* Menu: + - Macro: int setjmp (jmp_buf STATE) + When called normally, `setjmp' stores information about the + execution state of the program in STATE and returns zero. If + `longjmp' is later used to perform a non-local exit to this STATE, + `setjmp' returns a nonzero value. -* Basic Signal Handling:: The simple `signal' function. -* Advanced Signal Handling:: The more powerful `sigaction' function. -* Signal and Sigaction:: How those two functions interact. -* Sigaction Function Example:: An example of using the sigaction function. -* Flags for Sigaction:: Specifying options for signal handling. -* Initial Signal Actions:: How programs inherit signal actions. + - Function: void longjmp (jmp_buf STATE, int VALUE) + This function restores current execution to the state saved in + STATE, and continues execution from the call to `setjmp' that + established that return point. Returning from `setjmp' by means of + `longjmp' returns the VALUE argument that was passed to `longjmp', + rather than `0'. (But if VALUE is given as `0', `setjmp' returns + `1'). - -File: libc.info, Node: Basic Signal Handling, Next: Advanced Signal Handling, Up: Signal Actions + There are a lot of obscure but important restrictions on the use of +`setjmp' and `longjmp'. Most of these restrictions are present because +non-local exits require a fair amount of magic on the part of the C +compiler and can interact with other parts of the language in strange +ways. -Basic Signal Handling ---------------------- + The `setjmp' function is actually a macro without an actual function +definition, so you shouldn't try to `#undef' it or take its address. +In addition, calls to `setjmp' are safe in only the following contexts: - The `signal' function provides a simple interface for establishing -an action for a particular signal. The function and associated macros -are declared in the header file `signal.h'. + * As the test expression of a selection or iteration statement (such + as `if', `switch', or `while'). - - Data Type: sighandler_t - This is the type of signal handler functions. Signal handlers - take one integer argument specifying the signal number, and have - return type `void'. So, you should define handler functions like - this: + * As one operand of a equality or comparison operator that appears + as the test expression of a selection or iteration statement. The + other operand must be an integer constant expression. - void HANDLER (int `signum') { ... } + * As the operand of a unary `!' operator, that appears as the test + expression of a selection or iteration statement. - The name `sighandler_t' for this data type is a GNU extension. + * By itself as an expression statement. - - Function: sighandler_t signal (int SIGNUM, sighandler_t ACTION) - The `signal' function establishes ACTION as the action for the - signal SIGNUM. + Return points are valid only during the dynamic extent of the +function that called `setjmp' to establish them. If you `longjmp' to a +return point that was established in a function that has already +returned, unpredictable and disastrous things are likely to happen. - The first argument, SIGNUM, identifies the signal whose behavior - you want to control, and should be a signal number. The proper - way to specify a signal number is with one of the symbolic signal - names (*note Standard Signals::)--don't use an explicit number, - because the numerical code for a given kind of signal may vary - from operating system to operating system. + You should use a nonzero VALUE argument to `longjmp'. While +`longjmp' refuses to pass back a zero argument as the return value from +`setjmp', this is intended as a safety net against accidental misuse +and is not really good programming style. - The second argument, ACTION, specifies the action to use for the - signal SIGNUM. This can be one of the following: + When you perform a non-local exit, accessible objects generally +retain whatever values they had at the time `longjmp' was called. The +exception is that the values of automatic variables local to the +function containing the `setjmp' call that have been changed since the +call to `setjmp' are indeterminate, unless you have declared them +`volatile'. - `SIG_DFL' - `SIG_DFL' specifies the default action for the particular - signal. The default actions for various kinds of signals are - stated in *Note Standard Signals::. + +File: libc.info, Node: Non-Local Exits and Signals, Next: System V contexts, Prev: Non-Local Details, Up: Non-Local Exits - `SIG_IGN' - `SIG_IGN' specifies that the signal should be ignored. +Non-Local Exits and Signals +=========================== - Your program generally should not ignore signals that - represent serious events or that are normally used to request - termination. You cannot ignore the `SIGKILL' or `SIGSTOP' - signals at all. You can ignore program error signals like - `SIGSEGV', but ignoring the error won't enable the program to - continue executing meaningfully. Ignoring user requests such - as `SIGINT', `SIGQUIT', and `SIGTSTP' is unfriendly. + In BSD Unix systems, `setjmp' and `longjmp' also save and restore +the set of blocked signals; see *Note Blocking Signals::. However, the +POSIX.1 standard requires `setjmp' and `longjmp' not to change the set +of blocked signals, and provides an additional pair of functions +(`sigsetjmp' and `siglongjmp') to get the BSD behavior. - When you do not wish signals to be delivered during a certain - part of the program, the thing to do is to block them, not - ignore them. *Note Blocking Signals::. + The behavior of `setjmp' and `longjmp' in the GNU library is +controlled by feature test macros; see *Note Feature Test Macros::. The +default in the GNU system is the POSIX.1 behavior rather than the BSD +behavior. - `HANDLER' - Supply the address of a handler function in your program, to - specify running this handler as the way to deliver the signal. + The facilities in this section are declared in the header file +`setjmp.h'. - For more information about defining signal handler functions, - see *Note Defining Handlers::. + - Data Type: sigjmp_buf + This is similar to `jmp_buf', except that it can also store state + information about the set of blocked signals. - If you set the action for a signal to `SIG_IGN', or if you set it - to `SIG_DFL' and the default action is to ignore that signal, then - any pending signals of that type are discarded (even if they are - blocked). Discarding the pending signals means that they will - never be delivered, not even if you subsequently specify another - action and unblock this kind of signal. + - Function: int sigsetjmp (sigjmp_buf STATE, int SAVESIGS) + This is similar to `setjmp'. If SAVESIGS is nonzero, the set of + blocked signals is saved in STATE and will be restored if a + `siglongjmp' is later performed with this STATE. - The `signal' function returns the action that was previously in - effect for the specified SIGNUM. You can save this value and - restore it later by calling `signal' again. + - Function: void siglongjmp (sigjmp_buf STATE, int VALUE) + This is similar to `longjmp' except for the type of its STATE + argument. If the `sigsetjmp' call that set this STATE used a + nonzero SAVESIGS flag, `siglongjmp' also restores the set of + blocked signals. - If `signal' can't honor the request, it returns `SIG_ERR' instead. - The following `errno' error conditions are defined for this - function: + +File: libc.info, Node: System V contexts, Prev: Non-Local Exits and Signals, Up: Non-Local Exits - `EINVAL' - You specified an invalid SIGNUM; or you tried to ignore or - provide a handler for `SIGKILL' or `SIGSTOP'. +Complete Context Control +======================== - *Compatibility Note:* A problem encountered when working with the -`signal' function is that it has different semantics on BSD and SVID -systems. The difference is that on SVID systems the signal handler is -deinstalled after signal delivery. On BSD systems the handler must be -explicitly deinstalled. In the GNU C Library we use the BSD version by -default. To use the SVID version you can either use the function -`sysv_signal' (see below) or use the `_XOPEN_SOURCE' feature select -macro (*note Feature Test Macros::). In general, use of these -functions should be avoided because of compatibility problems. It is -better to use `sigaction' if it is available since the results are much -more reliable. + The Unix standard one more set of function to control the execution +path and these functions are more powerful than those discussed in this +chapter so far. These function were part of the original System V API +and by this route were added to the Unix API. Beside on branded Unix +implementations these interfaces are not widely available. Not all +platforms and/or architectures the GNU C Library is available on provide +this interface. Use `configure' to detect the availability. - Here is a simple example of setting up a handler to delete temporary -files when certain fatal signals happen: + Similar to the `jmp_buf' and `sigjmp_buf' types used for the +variables to contain the state of the `longjmp' functions the +interfaces of interest here have an appropriate type as well. Objects +of this type are normally much larger since more information is +contained. The type is also used in a few more places as we will see. +The types and functions described in this section are all defined and +declared respectively in the `ucontext.h' header file. - #include - - void - termination_handler (int signum) - { - struct temp_file *p; - - for (p = temp_file_list; p; p = p->next) - unlink (p->name); - } - - int - main (void) - { - ... - if (signal (SIGINT, termination_handler) == SIG_IGN) - signal (SIGINT, SIG_IGN); - if (signal (SIGHUP, termination_handler) == SIG_IGN) - signal (SIGHUP, SIG_IGN); - if (signal (SIGTERM, termination_handler) == SIG_IGN) - signal (SIGTERM, SIG_IGN); - ... - } + - Data Type: ucontext_t + The `ucontext_t' type is defined as a structure with as least the + following elements: -Note that if a given signal was previously set to be ignored, this code -avoids altering that setting. This is because non-job-control shells -often ignore certain signals when starting children, and it is important -for the children to respect this. + `ucontext_t *uc_link' + This is a pointer to the next context structure which is used + if the context described in the current structure returns. - We do not handle `SIGQUIT' or the program error signals in this -example because these are designed to provide information for debugging -(a core dump), and the temporary files may give useful information. + `sigset_t uc_sigmask' + Set of signals which are blocked when this context is used. - - Function: sighandler_t sysv_signal (int SIGNUM, sighandler_t ACTION) - The `sysv_signal' implements the behavior of the standard `signal' - function as found on SVID systems. The difference to BSD systems - is that the handler is deinstalled after a delivery of a signal. + `stack_t uc_stack' + Stack used for this context. The value need not be (and + normally is not) the stack pointer. *Note Signal Stack::. - *Compatibility Note:* As said above for `signal', this function - should be avoided when possible. `sigaction' is the preferred - method. + `mcontext_t uc_mcontext' + This element contains the actual state of the process. The + `mcontext_t' type is also defined in this header but the + definition should be treated as opaque. Any use of knowledge + of the type makes applications less portable. - - Function: sighandler_t ssignal (int SIGNUM, sighandler_t ACTION) - The `ssignal' function does the same thing as `signal'; it is - provided only for compatibility with SVID. - - Macro: sighandler_t SIG_ERR - The value of this macro is used as the return value from `signal' - to indicate an error. + Objects of this type have to be created by the user. The +initialization and modification happens through one of the following +functions: - -File: libc.info, Node: Advanced Signal Handling, Next: Signal and Sigaction, Prev: Basic Signal Handling, Up: Signal Actions + - Function: int getcontext (ucontext_t *UCP) + The `getcontext' function initializes the variable pointed to by + UCP with the context of the calling thread. The context contains + the content of the registers, the signal mask, and the current + stack. Executing the contents would start at the point where the + `getcontext' call just returned. -Advanced Signal Handling ------------------------- + The function returns `0' if successful. Otherwise it returns `-1' + and sets ERRNO accordingly. - The `sigaction' function has the same basic effect as `signal': to -specify how a signal should be handled by the process. However, -`sigaction' offers more control, at the expense of more complexity. In -particular, `sigaction' allows you to specify additional flags to -control when the signal is generated and how the handler is invoked. + The `getcontext' function is similar to `setjmp' but it does not +provide an indication of whether the function returns for the first +time or whether the initialized context was used and the execution is +resumed at just that point. If this is necessary the user has to take +determine this herself. This must be done carefully since the context +contains registers which might contain register variables. This is a +good situation to define variables with `volatile'. - The `sigaction' function is declared in `signal.h'. + Once the context variable is initialized it can be used as is or it +can be modified. The latter is normally done to implement co-routines +or similar constructs. The `makecontext' function is what has to be +used to do that. - - Data Type: struct sigaction - Structures of type `struct sigaction' are used in the `sigaction' - function to specify all the information about how to handle a - particular signal. This structure contains at least the following - members: + - Function: void makecontext (ucontext_t *UCP, void (*FUNC) (void), + int ARGC, ...) + The UCP parameter passed to the `makecontext' shall be initialized + by a call to `getcontext'. The context will be modified to in a + way so that if the context is resumed it will start by calling the + function `func' which gets ARGC integer arguments passed. The + integer arguments which are to be passed should follow the ARGC + parameter in the call to `makecontext'. - `sighandler_t sa_handler' - This is used in the same way as the ACTION argument to the - `signal' function. The value can be `SIG_DFL', `SIG_IGN', or - a function pointer. *Note Basic Signal Handling::. + Before the call to this function the `uc_stack' and `uc_link' + element of the UCP structure should be initialized. The + `uc_stack' element describes the stack which is used for this + context. No two contexts which are used at the same time should + use the same memory region for a stack. - `sigset_t sa_mask' - This specifies a set of signals to be blocked while the - handler runs. Blocking is explained in *Note Blocking for - Handler::. Note that the signal that was delivered is - automatically blocked by default before its handler is - started; this is true regardless of the value in `sa_mask'. - If you want that signal not to be blocked within its handler, - you must write code in the handler to unblock it. + The `uc_link' element of the object pointed to by UCP should be a + pointer to the context to be executed when the function FUNC + returns or it should be a null pointer. See `setcontext' for more + information about the exact use. - `int sa_flags' - This specifies various flags which can affect the behavior of - the signal. These are described in more detail in *Note - Flags for Sigaction::. + While allocating the memory for the stack one has to be careful. +Most modern processors keep track of whether a certain memory region is +allowed to contain code which is executed or not. Data segments and +heap memory is normally not tagged to allow this. The result is that +programs would fail. Examples for such code include the calling +sequences the GNU C compiler generates for calls to nested functions. +Safe ways to allocate stacks correctly include using memory on the +original threads stack or explicitly allocate memory tagged for +execution using (*note Memory-mapped I/O::). - - Function: int sigaction (int SIGNUM, const struct sigaction - *restrict ACTION, struct sigaction *restrict OLD-ACTION) - The ACTION argument is used to set up a new action for the signal - SIGNUM, while the OLD-ACTION argument is used to return - information about the action previously associated with this - symbol. (In other words, OLD-ACTION has the same purpose as the - `signal' function's return value--you can check to see what the - old action in effect for the signal was, and restore it later if - you want.) + *Compatibility note*: The current Unix standard is very imprecise +about the way the stack is allocated. All implementations seem to agree +that the `uc_stack' element must be used but the values stored in the +elements of the `stack_t' value are unclear. The GNU C library and +most other Unix implementations require the `ss_sp' value of the +`uc_stack' element to point to the base of the memory region allocated +for the stack and the size of the memory region is stored in `ss_size'. +There are implements out there which require `ss_sp' to be set to the +value the stack pointer will have (which can depending on the direction +the stack grows be different). This difference makes the `makecontext' +function hard to use and it requires detection of the platform at +compile time. - Either ACTION or OLD-ACTION can be a null pointer. If OLD-ACTION - is a null pointer, this simply suppresses the return of - information about the old action. If ACTION is a null pointer, - the action associated with the signal SIGNUM is unchanged; this - allows you to inquire about how a signal is being handled without - changing that handling. + - Function: int setcontext (const ucontext_t *UCP) + The `setcontext' function restores the context described by UCP. + The context is not modified and can be reused as often as wanted. - The return value from `sigaction' is zero if it succeeds, and `-1' - on failure. The following `errno' error conditions are defined - for this function: + If the context was created by `getcontext' execution resumes with + the registers filled with the same values and the same stack as if + the `getcontext' call just returned. - `EINVAL' - The SIGNUM argument is not valid, or you are trying to trap - or ignore `SIGKILL' or `SIGSTOP'. + If the context was modified with a call to `makecontext' execution + continues with the function passed to `makecontext' which gets the + specified parameters passed. If this function returns execution is + resumed in the context which was referenced by the `uc_link' + element of the context structure passed to `makecontext' at the + time of the call. If `uc_link' was a null pointer the application + terminates in this case. - -File: libc.info, Node: Signal and Sigaction, Next: Sigaction Function Example, Prev: Advanced Signal Handling, Up: Signal Actions + Since the context contains information about the stack no two + threads should use the same context at the same time. The result + in most cases would be disastrous. -Interaction of `signal' and `sigaction' ---------------------------------------- + The `setcontext' function does not return unless an error occurred + in which case it returns `-1'. - It's possible to use both the `signal' and `sigaction' functions -within a single program, but you have to be careful because they can -interact in slightly strange ways. + The `setcontext' function simply replaces the current context with +the one described by the UCP parameter. This is often useful but there +are situations where the current context has to be preserved. - The `sigaction' function specifies more information than the -`signal' function, so the return value from `signal' cannot express the -full range of `sigaction' possibilities. Therefore, if you use -`signal' to save and later reestablish an action, it may not be able to -reestablish properly a handler that was established with `sigaction'. + - Function: int swapcontext (ucontext_t *restrict OUCP, const + ucontext_t *restrict UCP) + The `swapcontext' function is similar to `setcontext' but instead + of just replacing the current context the latter is first saved in + the object pointed to by OUCP as if this was a call to + `getcontext'. The saved context would resume after the call to + `swapcontext'. - To avoid having problems as a result, always use `sigaction' to save -and restore a handler if your program uses `sigaction' at all. Since -`sigaction' is more general, it can properly save and reestablish any -action, regardless of whether it was established originally with -`signal' or `sigaction'. + Once the current context is saved the context described in UCP is + installed and execution continues as described in this context. - On some systems if you establish an action with `signal' and then -examine it with `sigaction', the handler address that you get may not -be the same as what you specified with `signal'. It may not even be -suitable for use as an action argument with `signal'. But you can rely -on using it as an argument to `sigaction'. This problem never happens -on the GNU system. + If `swapcontext' succeeds the function does not return unless the + context OUCP is used without prior modification by `makecontext'. + The return value in this case is `0'. If the function fails it + returns `-1' and set ERRNO accordingly. - So, you're better off using one or the other of the mechanisms -consistently within a single program. +Example for SVID Context Handling +================================= - *Portability Note:* The basic `signal' function is a feature of -ISO C, while `sigaction' is part of the POSIX.1 standard. If you are -concerned about portability to non-POSIX systems, then you should use -the `signal' function instead. + The easiest way to use the context handling functions is as a +replacement for `setjmp' and `longjmp'. The context contains on most +platforms more information which might lead to less surprises but this +also means using these functions is more expensive (beside being less +portable). - -File: libc.info, Node: Sigaction Function Example, Next: Flags for Sigaction, Prev: Signal and Sigaction, Up: Signal Actions + int + random_search (int n, int (*fp) (int, ucontext_t *)) + { + volatile int cnt = 0; + ucontext_t uc; + + /* Safe current context. */ + if (getcontext (&uc) < 0) + return -1; + + /* If we have not tried N times try again. */ + if (cnt++ < n) + /* Call the function with a new random number + and the context. */ + if (fp (rand (), &uc) != 0) + /* We found what we were looking for. */ + return 1; + + /* Not found. */ + return 0; + } -`sigaction' Function Example ----------------------------- + Using contexts in such a way enables emulating exception handling. +The search functions passed in the FP parameter could be very large, +nested, and complex which would make it complicated (or at least would +require a lot of code) to leave the function with an error value which +has to be passed down to the caller. By using the context it is +possible to leave the search function in one step and allow restarting +the search which also has the nice side effect that it can be +significantly faster. - In *Note Basic Signal Handling::, we gave an example of establishing -a simple handler for termination signals using `signal'. Here is an -equivalent example using `sigaction': + Something which is harder to implement with `setjmp' and `longjmp' +is to switch temporarily to a different execution path and then resume +where execution was stopped. #include + #include + #include + #include + #include - void - termination_handler (int signum) + /* Set by the signal handler. */ + static volatile int expired; + + /* The contexts. */ + static ucontext_t uc[3]; + + /* We do only a certain number of switches. */ + static int switches; + + + /* This is the function doing the work. It is just a + skeleton, real code has to be filled in. */ + static void + f (int n) { - struct temp_file *p; + int m = 0; + while (1) + { + /* This is where the work would be done. */ + if (++m % 100 == 0) + { + putchar ('.'); + fflush (stdout); + } - for (p = temp_file_list; p; p = p->next) - unlink (p->name); + /* Regularly the EXPIRE variable must be checked. */ + if (expired) + { + /* We do not want the program to run forever. */ + if (++switches == 20) + return; + + printf ("\nswitching from %d to %d\n", n, 3 - n); + expired = 0; + /* Switch to the other context, saving the current one. */ + swapcontext (&uc[n], &uc[3 - n]); + } + } + } + + /* This is the signal handler which simply set the variable. */ + void + handler (int signal) + { + expired = 1; } + int main (void) { - ... - struct sigaction new_action, old_action; + struct sigaction sa; + struct itimerval it; + char st1[8192]; + char st2[8192]; - /* Set up the structure to specify the new action. */ - new_action.sa_handler = termination_handler; - sigemptyset (&new_action.sa_mask); - new_action.sa_flags = 0; + /* Initialize the data structures for the interval timer. */ + sa.sa_flags = SA_RESTART; + sigfillset (&sa.sa_mask); + sa.sa_handler = handler; + it.it_interval.tv_sec = 0; + it.it_interval.tv_usec = 1; + it.it_value = it.it_interval; - sigaction (SIGINT, NULL, &old_action); - if (old_action.sa_handler != SIG_IGN) - sigaction (SIGINT, &new_action, NULL); - sigaction (SIGHUP, NULL, &old_action); - if (old_action.sa_handler != SIG_IGN) - sigaction (SIGHUP, &new_action, NULL); - sigaction (SIGTERM, NULL, &old_action); - if (old_action.sa_handler != SIG_IGN) - sigaction (SIGTERM, &new_action, NULL); - ... + /* Install the timer and get the context we can manipulate. */ + if (sigaction (SIGPROF, &sa, NULL) < 0 + || setitimer (ITIMER_PROF, &it, NULL) < 0 + || getcontext (&uc[1]) == -1 + || getcontext (&uc[2]) == -1) + abort (); + + /* Create a context with a separate stack which causes the + function `f' to be call with the parameter `1'. + Note that the `uc_link' points to the main context + which will cause the program to terminate once the function + return. */ + uc[1].uc_link = &uc[0]; + uc[1].uc_stack.ss_sp = st1; + uc[1].uc_stack.ss_size = sizeof st1; + makecontext (&uc[1], (void (*) (void)) f, 1, 1); + + /* Similarly, but `2' is passed as the parameter to `f'. */ + uc[2].uc_link = &uc[0]; + uc[2].uc_stack.ss_sp = st2; + uc[2].uc_stack.ss_size = sizeof st2; + makecontext (&uc[2], (void (*) (void)) f, 1, 2); + + /* Start running. */ + swapcontext (&uc[0], &uc[1]); + putchar ('\n'); + + return 0; } - The program just loads the `new_action' structure with the desired -parameters and passes it in the `sigaction' call. The usage of -`sigemptyset' is described later; see *Note Blocking Signals::. - - As in the example using `signal', we avoid handling signals -previously set to be ignored. Here we can avoid altering the signal -handler even momentarily, by using the feature of `sigaction' that lets -us examine the current action without specifying a new one. - - Here is another example. It retrieves information about the current -action for `SIGINT' without changing that action. - - struct sigaction query_action; - - if (sigaction (SIGINT, NULL, &query_action) < 0) - /* `sigaction' returns -1 in case of error. */ - else if (query_action.sa_handler == SIG_DFL) - /* `SIGINT' is handled in the default, fatal manner. */ - else if (query_action.sa_handler == SIG_IGN) - /* `SIGINT' is ignored. */ - else - /* A programmer-defined signal handler is in effect. */ + This an example how the context functions can be used to implement +co-routines or cooperative multi-threading. All that has to be done is +to call every once in a while `swapcontext' to continue running a +different context. It is not allowed to do the context switching from +the signal handler directly since neither `setcontext' nor +`swapcontext' are functions which can be called from a signal handler. +But setting a variable in the signal handler and checking it in the +body of the functions which are executed. Since `swapcontext' is +saving the current context it is possible to have multiple different +scheduling points in the code. Execution will always resume where it +was left.  -File: libc.info, Node: Flags for Sigaction, Next: Initial Signal Actions, Prev: Sigaction Function Example, Up: Signal Actions +File: libc.info, Node: Signal Handling, Next: Program Basics, Prev: Non-Local Exits, Up: Top -Flags for `sigaction' ---------------------- +Signal Handling +*************** - The `sa_flags' member of the `sigaction' structure is a catch-all -for special features. Most of the time, `SA_RESTART' is a good value -to use for this field. + A "signal" is a software interrupt delivered to a process. The +operating system uses signals to report exceptional situations to an +executing program. Some signals report errors such as references to +invalid memory addresses; others report asynchronous events, such as +disconnection of a phone line. - The value of `sa_flags' is interpreted as a bit mask. Thus, you -should choose the flags you want to set, OR those flags together, and -store the result in the `sa_flags' member of your `sigaction' structure. + The GNU C library defines a variety of signal types, each for a +particular kind of event. Some kinds of events make it inadvisable or +impossible for the program to proceed as usual, and the corresponding +signals normally abort the program. Other kinds of signals that report +harmless events are ignored by default. - Each signal number has its own set of flags. Each call to -`sigaction' affects one particular signal number, and the flags that -you specify apply only to that particular signal. + If you anticipate an event that causes signals, you can define a +handler function and tell the operating system to run it when that +particular type of signal arrives. - In the GNU C library, establishing a handler with `signal' sets all -the flags to zero except for `SA_RESTART', whose value depends on the -settings you have made with `siginterrupt'. *Note Interrupted -Primitives::, to see what this is about. + Finally, one process can send a signal to another process; this +allows a parent process to abort a child, or two related processes to +communicate and synchronize. - These macros are defined in the header file `signal.h'. +* Menu: - - Macro: int SA_NOCLDSTOP - This flag is meaningful only for the `SIGCHLD' signal. When the - flag is set, the system delivers the signal for a terminated child - process but not for one that is stopped. By default, `SIGCHLD' is - delivered for both terminated children and stopped children. +* Concepts of Signals:: Introduction to the signal facilities. +* Standard Signals:: Particular kinds of signals with + standard names and meanings. +* Signal Actions:: Specifying what happens when a + particular signal is delivered. +* Defining Handlers:: How to write a signal handler function. +* Interrupted Primitives:: Signal handlers affect use of `open', + `read', `write' and other functions. +* Generating Signals:: How to send a signal to a process. +* Blocking Signals:: Making the system hold signals temporarily. +* Waiting for a Signal:: Suspending your program until a signal + arrives. +* Signal Stack:: Using a Separate Signal Stack. +* BSD Signal Handling:: Additional functions for backward + compatibility with BSD. - Setting this flag for a signal other than `SIGCHLD' has no effect. + +File: libc.info, Node: Concepts of Signals, Next: Standard Signals, Up: Signal Handling - - Macro: int SA_ONSTACK - If this flag is set for a particular signal number, the system - uses the signal stack when delivering that kind of signal. *Note - Signal Stack::. If a signal with this flag arrives and you have - not set a signal stack, the system terminates the program with - `SIGILL'. +Basic Concepts of Signals +========================= - - Macro: int SA_RESTART - This flag controls what happens when a signal is delivered during - certain primitives (such as `open', `read' or `write'), and the - signal handler returns normally. There are two alternatives: the - library function can resume, or it can return failure with error - code `EINTR'. + This section explains basic concepts of how signals are generated, +what happens after a signal is delivered, and how programs can handle +signals. - The choice is controlled by the `SA_RESTART' flag for the - particular kind of signal that was delivered. If the flag is set, - returning from a handler resumes the library function. If the - flag is clear, returning from a handler makes the function fail. - *Note Interrupted Primitives::. +* Menu: + +* Kinds of Signals:: Some examples of what can cause a signal. +* Signal Generation:: Concepts of why and how signals occur. +* Delivery of Signal:: Concepts of what a signal does to the + process.  -File: libc.info, Node: Initial Signal Actions, Prev: Flags for Sigaction, Up: Signal Actions +File: libc.info, Node: Kinds of Signals, Next: Signal Generation, Up: Concepts of Signals -Initial Signal Actions ----------------------- +Some Kinds of Signals +--------------------- - When a new process is created (*note Creating a Process::), it -inherits handling of signals from its parent process. However, when -you load a new process image using the `exec' function (*note Executing -a File::), any signals that you've defined your own handlers for revert -to their `SIG_DFL' handling. (If you think about it a little, this -makes sense; the handler functions from the old program are specific to -that program, and aren't even present in the address space of the new -program image.) Of course, the new program can establish its own -handlers. + A signal reports the occurrence of an exceptional event. These are +some of the events that can cause (or "generate", or "raise") a signal: - When a program is run by a shell, the shell normally sets the initial -actions for the child process to `SIG_DFL' or `SIG_IGN', as -appropriate. It's a good idea to check to make sure that the shell has -not set up an initial action of `SIG_IGN' before you establish your own -signal handlers. + * A program error such as dividing by zero or issuing an address + outside the valid range. - Here is an example of how to establish a handler for `SIGHUP', but -not if `SIGHUP' is currently ignored: + * A user request to interrupt or terminate the program. Most + environments are set up to let a user suspend the program by + typing `C-z', or terminate it with `C-c'. Whatever key sequence + is used, the operating system sends the proper signal to interrupt + the process. - ... - struct sigaction temp; - - sigaction (SIGHUP, NULL, &temp); - - if (temp.sa_handler != SIG_IGN) - { - temp.sa_handler = handle_sighup; - sigemptyset (&temp.sa_mask); - sigaction (SIGHUP, &temp, NULL); - } + * The termination of a child process. - -File: libc.info, Node: Defining Handlers, Next: Interrupted Primitives, Prev: Signal Actions, Up: Signal Handling + * Expiration of a timer or alarm. -Defining Signal Handlers -======================== + * A call to `kill' or `raise' by the same process. - This section describes how to write a signal handler function that -can be established with the `signal' or `sigaction' functions. + * A call to `kill' from another process. Signals are a limited but + useful form of interprocess communication. - A signal handler is just a function that you compile together with -the rest of the program. Instead of directly invoking the function, -you use `signal' or `sigaction' to tell the operating system to call it -when a signal arrives. This is known as "establishing" the handler. -*Note Signal Actions::. + * An attempt to perform an I/O operation that cannot be done. + Examples are reading from a pipe that has no writer (*note Pipes + and FIFOs::), and reading or writing to a terminal in certain + situations (*note Job Control::). - There are two basic strategies you can use in signal handler -functions: + Each of these kinds of events (excepting explicit calls to `kill' +and `raise') generates its own particular kind of signal. The various +kinds of signals are listed and described in detail in *Note Standard +Signals::. - * You can have the handler function note that the signal arrived by - tweaking some global data structures, and then return normally. + +File: libc.info, Node: Signal Generation, Next: Delivery of Signal, Prev: Kinds of Signals, Up: Concepts of Signals - * You can have the handler function terminate the program or transfer - control to a point where it can recover from the situation that - caused the signal. +Concepts of Signal Generation +----------------------------- - You need to take special care in writing handler functions because -they can be called asynchronously. That is, a handler might be called -at any point in the program, unpredictably. If two signals arrive -during a very short interval, one handler can run within another. This -section describes what your handler should do, and what you should -avoid. + In general, the events that generate signals fall into three major +categories: errors, external events, and explicit requests. -* Menu: + An error means that a program has done something invalid and cannot +continue execution. But not all kinds of errors generate signals--in +fact, most do not. For example, opening a nonexistent file is an error, +but it does not raise a signal; instead, `open' returns `-1'. In +general, errors that are necessarily associated with certain library +functions are reported by returning a value that indicates an error. +The errors which raise signals are those which can happen anywhere in +the program, not just in library calls. These include division by zero +and invalid memory addresses. -* Handler Returns:: Handlers that return normally, and what - this means. -* Termination in Handler:: How handler functions terminate a program. -* Longjmp in Handler:: Nonlocal transfer of control out of a - signal handler. -* Signals in Handler:: What happens when signals arrive while - the handler is already occupied. -* Merged Signals:: When a second signal arrives before the - first is handled. -* Nonreentrancy:: Do not call any functions unless you know they - are reentrant with respect to signals. -* Atomic Data Access:: A single handler can run in the middle of - reading or writing a single object. + An external event generally has to do with I/O or other processes. +These include the arrival of input, the expiration of a timer, and the +termination of a child process. - -File: libc.info, Node: Handler Returns, Next: Termination in Handler, Up: Defining Handlers + An explicit request means the use of a library function such as +`kill' whose purpose is specifically to generate a signal. -Signal Handlers that Return ---------------------------- + Signals may be generated "synchronously" or "asynchronously". A +synchronous signal pertains to a specific action in the program, and is +delivered (unless blocked) during that action. Most errors generate +signals synchronously, and so do explicit requests by a process to +generate a signal for that same process. On some machines, certain +kinds of hardware errors (usually floating-point exceptions) are not +reported completely synchronously, but may arrive a few instructions +later. - Handlers which return normally are usually used for signals such as -`SIGALRM' and the I/O and interprocess communication signals. But a -handler for `SIGINT' might also return normally after setting a flag -that tells the program to exit at a convenient time. + Asynchronous signals are generated by events outside the control of +the process that receives them. These signals arrive at unpredictable +times during execution. External events generate signals +asynchronously, and so do explicit requests that apply to some other +process. - It is not safe to return normally from the handler for a program -error signal, because the behavior of the program when the handler -function returns is not defined after a program error. *Note Program -Error Signals::. + A given type of signal is either typically synchronous or typically +asynchronous. For example, signals for errors are typically synchronous +because errors generate signals synchronously. But any type of signal +can be generated synchronously or asynchronously with an explicit +request. - Handlers that return normally must modify some global variable in -order to have any effect. Typically, the variable is one that is -examined periodically by the program during normal operation. Its data -type should be `sig_atomic_t' for reasons described in *Note Atomic -Data Access::. + +File: libc.info, Node: Delivery of Signal, Prev: Signal Generation, Up: Concepts of Signals - Here is a simple example of such a program. It executes the body of -the loop until it has noticed that a `SIGALRM' signal has arrived. -This technique is useful because it allows the iteration in progress -when the signal arrives to complete before the loop exits. +How Signals Are Delivered +------------------------- - #include - #include - #include - - /* This flag controls termination of the main loop. */ - volatile sig_atomic_t keep_going = 1; - - /* The signal handler just clears the flag and re-enables itself. */ - void - catch_alarm (int sig) - { - keep_going = 0; - signal (sig, catch_alarm); - } - - void - do_stuff (void) - { - puts ("Doing stuff while waiting for alarm...."); - } - - int - main (void) - { - /* Establish a handler for SIGALRM signals. */ - signal (SIGALRM, catch_alarm); - - /* Set an alarm to go off in a little while. */ - alarm (2); - - /* Check the flag once in a while to see when to quit. */ - while (keep_going) - do_stuff (); - - return EXIT_SUCCESS; - } + When a signal is generated, it becomes "pending". Normally it +remains pending for just a short period of time and then is "delivered" +to the process that was signaled. However, if that kind of signal is +currently "blocked", it may remain pending indefinitely--until signals +of that kind are "unblocked". Once unblocked, it will be delivered +immediately. *Note Blocking Signals::. - -File: libc.info, Node: Termination in Handler, Next: Longjmp in Handler, Prev: Handler Returns, Up: Defining Handlers + When the signal is delivered, whether right away or after a long +delay, the "specified action" for that signal is taken. For certain +signals, such as `SIGKILL' and `SIGSTOP', the action is fixed, but for +most signals, the program has a choice: ignore the signal, specify a +"handler function", or accept the "default action" for that kind of +signal. The program specifies its choice using functions such as +`signal' or `sigaction' (*note Signal Actions::). We sometimes say +that a handler "catches" the signal. While the handler is running, +that particular signal is normally blocked. -Handlers That Terminate the Process ------------------------------------ + If the specified action for a kind of signal is to ignore it, then +any such signal which is generated is discarded immediately. This +happens even if the signal is also blocked at the time. A signal +discarded in this way will never be delivered, not even if the program +subsequently specifies a different action for that kind of signal and +then unblocks it. - Handler functions that terminate the program are typically used to -cause orderly cleanup or recovery from program error signals and -interactive interrupts. + If a signal arrives which the program has neither handled nor +ignored, its "default action" takes place. Each kind of signal has its +own default action, documented below (*note Standard Signals::). For +most kinds of signals, the default action is to terminate the process. +For certain kinds of signals that represent "harmless" events, the +default action is to do nothing. - The cleanest way for a handler to terminate the process is to raise -the same signal that ran the handler in the first place. Here is how -to do this: + When a signal terminates a process, its parent process can determine +the cause of termination by examining the termination status code +reported by the `wait' or `waitpid' functions. (This is discussed in +more detail in *Note Process Completion::.) The information it can get +includes the fact that termination was due to a signal and the kind of +signal involved. If a program you run from a shell is terminated by a +signal, the shell typically prints some kind of error message. - volatile sig_atomic_t fatal_error_in_progress = 0; - - void - fatal_error_signal (int sig) - { - /* Since this handler is established for more than one kind of signal, - it might still get invoked recursively by delivery of some other kind - of signal. Use a static variable to keep track of that. */ - if (fatal_error_in_progress) - raise (sig); - fatal_error_in_progress = 1; - - /* Now do the clean up actions: - - reset terminal modes - - kill child processes - - remove lock files */ - ... - - /* Now reraise the signal. We reactivate the signal's - default handling, which is to terminate the process. - We could just call `exit' or `abort', - but reraising the signal sets the return status - from the process correctly. */ - signal (sig, SIG_DFL); - raise (sig); - } + The signals that normally represent program errors have a special +property: when one of these signals terminates the process, it also +writes a "core dump file" which records the state of the process at the +time of termination. You can examine the core dump with a debugger to +investigate what caused the error. - -File: libc.info, Node: Longjmp in Handler, Next: Signals in Handler, Prev: Termination in Handler, Up: Defining Handlers + If you raise a "program error" signal by explicit request, and this +terminates the process, it makes a core dump file just as if the signal +had been due directly to an error. -Nonlocal Control Transfer in Handlers -------------------------------------- + +File: libc.info, Node: Standard Signals, Next: Signal Actions, Prev: Concepts of Signals, Up: Signal Handling - You can do a nonlocal transfer of control out of a signal handler -using the `setjmp' and `longjmp' facilities (*note Non-Local Exits::). +Standard Signals +================ - When the handler does a nonlocal control transfer, the part of the -program that was running will not continue. If this part of the program -was in the middle of updating an important data structure, the data -structure will remain inconsistent. Since the program does not -terminate, the inconsistency is likely to be noticed later on. + This section lists the names for various standard kinds of signals +and describes what kind of event they mean. Each signal name is a macro +which stands for a positive integer--the "signal number" for that kind +of signal. Your programs should never make assumptions about the +numeric code for a particular kind of signal, but rather refer to them +always by the names defined here. This is because the number for a +given kind of signal can vary from system to system, but the meanings of +the names are standardized and fairly uniform. - There are two ways to avoid this problem. One is to block the signal -for the parts of the program that update important data structures. -Blocking the signal delays its delivery until it is unblocked, once the -critical updating is finished. *Note Blocking Signals::. + The signal names are defined in the header file `signal.h'. - The other way to re-initialize the crucial data structures in the -signal handler, or make their values consistent. + - Macro: int NSIG + The value of this symbolic constant is the total number of signals + defined. Since the signal numbers are allocated consecutively, + `NSIG' is also one greater than the largest defined signal number. - Here is a rather schematic example showing the reinitialization of -one global variable. +* Menu: - #include - #include - - jmp_buf return_to_top_level; - - volatile sig_atomic_t waiting_for_input; - - void - handle_sigint (int signum) - { - /* We may have been waiting for input when the signal arrived, - but we are no longer waiting once we transfer control. */ - waiting_for_input = 0; - longjmp (return_to_top_level, 1); - } - - int - main (void) - { - ... - signal (SIGINT, sigint_handler); - ... - while (1) { - prepare_for_command (); - if (setjmp (return_to_top_level) == 0) - read_and_execute_command (); - } - } - - /* Imagine this is a subroutine used by various commands. */ - char * - read_data () - { - if (input_from_terminal) { - waiting_for_input = 1; - ... - waiting_for_input = 0; - } else { - ... - } - } +* Program Error Signals:: Used to report serious program errors. +* Termination Signals:: Used to interrupt and/or terminate the + program. +* Alarm Signals:: Used to indicate expiration of timers. +* Asynchronous I/O Signals:: Used to indicate input is available. +* Job Control Signals:: Signals used to support job control. +* Operation Error Signals:: Used to report operational system errors. +* Miscellaneous Signals:: Miscellaneous Signals. +* Signal Messages:: Printing a message describing a signal. diff -durpN glibc-2.2.4/manual/libc.info-39 glibc-2.2.5/manual/libc.info-39 --- glibc-2.2.4/manual/libc.info-39 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-39 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1154 +33,1180 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Signals in Handler, Next: Merged Signals, Prev: Longjmp in Handler, Up: Defining Handlers +File: libc.info, Node: Program Error Signals, Next: Termination Signals, Up: Standard Signals -Signals Arriving While a Handler Runs -------------------------------------- +Program Error Signals +--------------------- - What happens if another signal arrives while your signal handler -function is running? + The following signals are generated when a serious program error is +detected by the operating system or the computer itself. In general, +all of these signals are indications that your program is seriously +broken in some way, and there's usually no way to continue the +computation which encountered the error. - When the handler for a particular signal is invoked, that signal is -automatically blocked until the handler returns. That means that if two -signals of the same kind arrive close together, the second one will be -held until the first has been handled. (The handler can explicitly -unblock the signal using `sigprocmask', if you want to allow more -signals of this type to arrive; see *Note Process Signal Mask::.) + Some programs handle program error signals in order to tidy up before +terminating; for example, programs that turn off echoing of terminal +input should handle program error signals in order to turn echoing back +on. The handler should end by specifying the default action for the +signal that happened and then reraising it; this will cause the program +to terminate with that signal, as if it had not had a handler. (*Note +Termination in Handler::.) - However, your handler can still be interrupted by delivery of another -kind of signal. To avoid this, you can use the `sa_mask' member of the -action structure passed to `sigaction' to explicitly specify which -signals should be blocked while the signal handler runs. These signals -are in addition to the signal for which the handler was invoked, and -any other signals that are normally blocked by the process. *Note -Blocking for Handler::. + Termination is the sensible ultimate outcome from a program error in +most programs. However, programming systems such as Lisp that can load +compiled user programs might need to keep executing even if a user +program incurs an error. These programs have handlers which use +`longjmp' to return control to the command level. - When the handler returns, the set of blocked signals is restored to -the value it had before the handler ran. So using `sigprocmask' inside -the handler only affects what signals can arrive during the execution of -the handler itself, not what signals can arrive once the handler -returns. + The default action for all of these signals is to cause the process +to terminate. If you block or ignore these signals or establish +handlers for them that return normally, your program will probably +break horribly when such signals happen, unless they are generated by +`raise' or `kill' instead of a real error. - *Portability Note:* Always use `sigaction' to establish a handler -for a signal that you expect to receive asynchronously, if you want -your program to work properly on System V Unix. On this system, the -handling of a signal whose handler was established with `signal' -automatically sets the signal's action back to `SIG_DFL', and the -handler must re-establish itself each time it runs. This practice, -while inconvenient, does work when signals cannot arrive in succession. -However, if another signal can arrive right away, it may arrive before -the handler can re-establish itself. Then the second signal would -receive the default handling, which could terminate the process. + When one of these program error signals terminates a process, it also +writes a "core dump file" which records the state of the process at the +time of termination. The core dump file is named `core' and is written +in whichever directory is current in the process at the time. (On the +GNU system, you can specify the file name for core dumps with the +environment variable `COREFILE'.) The purpose of core dump files is so +that you can examine them with a debugger to investigate what caused +the error. - -File: libc.info, Node: Merged Signals, Next: Nonreentrancy, Prev: Signals in Handler, Up: Defining Handlers + - Macro: int SIGFPE + The `SIGFPE' signal reports a fatal arithmetic error. Although the + name is derived from "floating-point exception", this signal + actually covers all arithmetic errors, including division by zero + and overflow. If a program stores integer data in a location + which is then used in a floating-point operation, this often + causes an "invalid operation" exception, because the processor + cannot recognize the data as a floating-point number. -Signals Close Together Merge into One -------------------------------------- + Actual floating-point exceptions are a complicated subject because + there are many types of exceptions with subtly different meanings, + and the `SIGFPE' signal doesn't distinguish between them. The + `IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std + 754-1985 and ANSI/IEEE Std 854-1987)' defines various + floating-point exceptions and requires conforming computer systems + to report their occurrences. However, this standard does not + specify how the exceptions are reported, or what kinds of handling + and control the operating system can offer to the programmer. - If multiple signals of the same type are delivered to your process -before your signal handler has a chance to be invoked at all, the -handler may only be invoked once, as if only a single signal had -arrived. In effect, the signals merge into one. This situation can -arise when the signal is blocked, or in a multiprocessing environment -where the system is busy running some other processes while the signals -are delivered. This means, for example, that you cannot reliably use a -signal handler to count signals. The only distinction you can reliably -make is whether at least one signal has arrived since a given time in -the past. + BSD systems provide the `SIGFPE' handler with an extra argument that +distinguishes various causes of the exception. In order to access this +argument, you must define the handler to accept two arguments, which +means you must cast it to a one-argument function type in order to +establish the handler. The GNU library does provide this extra +argument, but the value is meaningful only on operating systems that +provide the information (BSD systems and GNU systems). - Here is an example of a handler for `SIGCHLD' that compensates for -the fact that the number of signals received may not equal the number of -child processes that generate them. It assumes that the program keeps -track of all the child processes with a chain of structures as follows: +`FPE_INTOVF_TRAP' + Integer overflow (impossible in a C program unless you enable + overflow trapping in a hardware-specific fashion). - struct process - { - struct process *next; - /* The process ID of this child. */ - int pid; - /* The descriptor of the pipe or pseudo terminal - on which output comes from this child. */ - int input_descriptor; - /* Nonzero if this process has stopped or terminated. */ - sig_atomic_t have_status; - /* The status of this child; 0 if running, - otherwise a status value from `waitpid'. */ - int status; - }; - - struct process *process_list; +`FPE_INTDIV_TRAP' + Integer division by zero. - This example also uses a flag to indicate whether signals have -arrived since some time in the past--whenever the program last cleared -it to zero. +`FPE_SUBRNG_TRAP' + Subscript-range (something that C programs never check for). - /* Nonzero means some child's status has changed - so look at `process_list' for the details. */ - int process_status_change; +`FPE_FLTOVF_TRAP' + Floating overflow trap. - Here is the handler itself: +`FPE_FLTDIV_TRAP' + Floating/decimal division by zero. - void - sigchld_handler (int signo) - { - int old_errno = errno; - - while (1) { - register int pid; - int w; - struct process *p; - - /* Keep asking for a status until we get a definitive result. */ - do - { - errno = 0; - pid = waitpid (WAIT_ANY, &w, WNOHANG | WUNTRACED); - } - while (pid <= 0 && errno == EINTR); - - if (pid <= 0) { - /* A real failure means there are no more - stopped or terminated child processes, so return. */ - errno = old_errno; - return; - } - - /* Find the process that signaled us, and record its status. */ - - for (p = process_list; p; p = p->next) - if (p->pid == pid) { - p->status = w; - /* Indicate that the `status' field - has data to look at. We do this only after storing it. */ - p->have_status = 1; - - /* If process has terminated, stop waiting for its output. */ - if (WIFSIGNALED (w) || WIFEXITED (w)) - if (p->input_descriptor) - FD_CLR (p->input_descriptor, &input_wait_mask); - - /* The program should check this flag from time to time - to see if there is any news in `process_list'. */ - ++process_status_change; - } - - /* Loop around to handle all the processes - that have something to tell us. */ - } - } +`FPE_FLTUND_TRAP' + Floating underflow trap. (Trapping on floating underflow is not + normally enabled.) - Here is the proper way to check the flag `process_status_change': +`FPE_DECOVF_TRAP' + Decimal overflow trap. (Only a few machines have decimal + arithmetic and C never uses it.) - if (process_status_change) { - struct process *p; - process_status_change = 0; - for (p = process_list; p; p = p->next) - if (p->have_status) { - ... Examine `p->status' ... - } - } + - Macro: int SIGILL + The name of this signal is derived from "illegal instruction"; it + usually means your program is trying to execute garbage or a + privileged instruction. Since the C compiler generates only valid + instructions, `SIGILL' typically indicates that the executable + file is corrupted, or that you are trying to execute data. Some + common ways of getting into the latter situation are by passing an + invalid object where a pointer to a function was expected, or by + writing past the end of an automatic array (or similar problems + with pointers to automatic variables) and corrupting other data on + the stack such as the return address of a stack frame. -It is vital to clear the flag before examining the list; otherwise, if a -signal were delivered just before the clearing of the flag, and after -the appropriate element of the process list had been checked, the status -change would go unnoticed until the next signal arrived to set the flag -again. You could, of course, avoid this problem by blocking the signal -while scanning the list, but it is much more elegant to guarantee -correctness by doing things in the right order. + `SIGILL' can also be generated when the stack overflows, or when + the system has trouble running the handler for a signal. - The loop which checks process status avoids examining `p->status' -until it sees that status has been validly stored. This is to make sure -that the status cannot change in the middle of accessing it. Once -`p->have_status' is set, it means that the child process is stopped or -terminated, and in either case, it cannot stop or terminate again until -the program has taken notice. *Note Atomic Usage::, for more -information about coping with interruptions during accesses of a -variable. + - Macro: int SIGSEGV + This signal is generated when a program tries to read or write + outside the memory that is allocated for it, or to write memory + that can only be read. (Actually, the signals only occur when the + program goes far enough outside to be detected by the system's + memory protection mechanism.) The name is an abbreviation for + "segmentation violation". - Here is another way you can test whether the handler has run since -the last time you checked. This technique uses a counter which is never -changed outside the handler. Instead of clearing the count, the program -remembers the previous value and sees whether it has changed since the -previous check. The advantage of this method is that different parts of -the program can check independently, each part checking whether there -has been a signal since that part last checked. + Common ways of getting a `SIGSEGV' condition include dereferencing + a null or uninitialized pointer, or when you use a pointer to step + through an array, but fail to check for the end of the array. It + varies among systems whether dereferencing a null pointer generates + `SIGSEGV' or `SIGBUS'. - sig_atomic_t process_status_change; - - sig_atomic_t last_process_status_change; - - ... - { - sig_atomic_t prev = last_process_status_change; - last_process_status_change = process_status_change; - if (last_process_status_change != prev) { - struct process *p; - for (p = process_list; p; p = p->next) - if (p->have_status) { - ... Examine `p->status' ... - } - } - } + - Macro: int SIGBUS + This signal is generated when an invalid pointer is dereferenced. + Like `SIGSEGV', this signal is typically the result of + dereferencing an uninitialized pointer. The difference between + the two is that `SIGSEGV' indicates an invalid access to valid + memory, while `SIGBUS' indicates an access to an invalid address. + In particular, `SIGBUS' signals often result from dereferencing a + misaligned pointer, such as referring to a four-word integer at an + address not divisible by four. (Each kind of computer has its own + requirements for address alignment.) - -File: libc.info, Node: Nonreentrancy, Next: Atomic Data Access, Prev: Merged Signals, Up: Defining Handlers + The name of this signal is an abbreviation for "bus error". -Signal Handling and Nonreentrant Functions ------------------------------------------- + - Macro: int SIGABRT + This signal indicates an error detected by the program itself and + reported by calling `abort'. *Note Aborting a Program::. - Handler functions usually don't do very much. The best practice is -to write a handler that does nothing but set an external variable that -the program checks regularly, and leave all serious work to the program. -This is best because the handler can be called asynchronously, at -unpredictable times--perhaps in the middle of a primitive function, or -even between the beginning and the end of a C operator that requires -multiple instructions. The data structures being manipulated might -therefore be in an inconsistent state when the handler function is -invoked. Even copying one `int' variable into another can take two -instructions on most machines. + - Macro: int SIGIOT + Generated by the PDP-11 "iot" instruction. On most machines, this + is just another name for `SIGABRT'. - This means you have to be very careful about what you do in a signal -handler. + - Macro: int SIGTRAP + Generated by the machine's breakpoint instruction, and possibly + other trap instructions. This signal is used by debuggers. Your + program will probably only see `SIGTRAP' if it is somehow + executing bad instructions. - * If your handler needs to access any global variables from your - program, declare those variables `volatile'. This tells the - compiler that the value of the variable might change - asynchronously, and inhibits certain optimizations that would be - invalidated by such modifications. + - Macro: int SIGEMT + Emulator trap; this results from certain unimplemented instructions + which might be emulated in software, or the operating system's + failure to properly emulate them. - * If you call a function in the handler, make sure it is "reentrant" - with respect to signals, or else make sure that the signal cannot - interrupt a call to a related function. + - Macro: int SIGSYS + Bad system call; that is to say, the instruction to trap to the + operating system was executed, but the code number for the system + call to perform was invalid. - A function can be non-reentrant if it uses memory that is not on the -stack. + +File: libc.info, Node: Termination Signals, Next: Alarm Signals, Prev: Program Error Signals, Up: Standard Signals - * If a function uses a static variable or a global variable, or a - dynamically-allocated object that it finds for itself, then it is - non-reentrant and any two calls to the function can interfere. +Termination Signals +------------------- - For example, suppose that the signal handler uses `gethostbyname'. - This function returns its value in a static object, reusing the - same object each time. If the signal happens to arrive during a - call to `gethostbyname', or even after one (while the program is - still using the value), it will clobber the value that the program - asked for. + These signals are all used to tell a process to terminate, in one way +or another. They have different names because they're used for slightly +different purposes, and programs might want to handle them differently. - However, if the program does not use `gethostbyname' or any other - function that returns information in the same object, or if it - always blocks signals around each use, then you are safe. + The reason for handling these signals is usually so your program can +tidy up as appropriate before actually terminating. For example, you +might want to save state information, delete temporary files, or restore +the previous terminal modes. Such a handler should end by specifying +the default action for the signal that happened and then reraising it; +this will cause the program to terminate with that signal, as if it had +not had a handler. (*Note Termination in Handler::.) - There are a large number of library functions that return values - in a fixed object, always reusing the same object in this fashion, - and all of them cause the same problem. Function descriptions in - this manual always mention this behavior. + The (obvious) default action for all of these signals is to cause the +process to terminate. - * If a function uses and modifies an object that you supply, then it - is potentially non-reentrant; two calls can interfere if they use - the same object. + - Macro: int SIGTERM + The `SIGTERM' signal is a generic signal used to cause program + termination. Unlike `SIGKILL', this signal can be blocked, + handled, and ignored. It is the normal way to politely ask a + program to terminate. - This case arises when you do I/O using streams. Suppose that the - signal handler prints a message with `fprintf'. Suppose that the - program was in the middle of an `fprintf' call using the same - stream when the signal was delivered. Both the signal handler's - message and the program's data could be corrupted, because both - calls operate on the same data structure--the stream itself. + The shell command `kill' generates `SIGTERM' by default. - However, if you know that the stream that the handler uses cannot - possibly be used by the program at a time when signals can arrive, - then you are safe. It is no problem if the program uses some - other stream. + - Macro: int SIGINT + The `SIGINT' ("program interrupt") signal is sent when the user + types the INTR character (normally `C-c'). *Note Special + Characters::, for information about terminal driver support for + `C-c'. - * On most systems, `malloc' and `free' are not reentrant, because - they use a static data structure which records what memory blocks - are free. As a result, no library functions that allocate or free - memory are reentrant. This includes functions that allocate space - to store a result. + - Macro: int SIGQUIT + The `SIGQUIT' signal is similar to `SIGINT', except that it's + controlled by a different key--the QUIT character, usually + `C-\'--and produces a core dump when it terminates the process, + just like a program error signal. You can think of this as a + program error condition "detected" by the user. - The best way to avoid the need to allocate memory in a handler is - to allocate in advance space for signal handlers to use. + *Note Program Error Signals::, for information about core dumps. + *Note Special Characters::, for information about terminal driver + support. - The best way to avoid freeing memory in a handler is to flag or - record the objects to be freed, and have the program check from - time to time whether anything is waiting to be freed. But this - must be done with care, because placing an object on a chain is - not atomic, and if it is interrupted by another signal handler - that does the same thing, you could "lose" one of the objects. + Certain kinds of cleanups are best omitted in handling `SIGQUIT'. + For example, if the program creates temporary files, it should + handle the other termination requests by deleting the temporary + files. But it is better for `SIGQUIT' not to delete them, so that + the user can examine them in conjunction with the core dump. - * Any function that modifies `errno' is non-reentrant, but you can - correct for this: in the handler, save the original value of - `errno' and restore it before returning normally. This prevents - errors that occur within the signal handler from being confused - with errors from system calls at the point the program is - interrupted to run the handler. + - Macro: int SIGKILL + The `SIGKILL' signal is used to cause immediate program + termination. It cannot be handled or ignored, and is therefore + always fatal. It is also not possible to block this signal. - This technique is generally applicable; if you want to call in a - handler a function that modifies a particular object in memory, - you can make this safe by saving and restoring that object. + This signal is usually generated only by explicit request. Since + it cannot be handled, you should generate it only as a last + resort, after first trying a less drastic method such as `C-c' or + `SIGTERM'. If a process does not respond to any other termination + signals, sending it a `SIGKILL' signal will almost always cause it + to go away. - * Merely reading from a memory object is safe provided that you can - deal with any of the values that might appear in the object at a - time when the signal can be delivered. Keep in mind that - assignment to some data types requires more than one instruction, - which means that the handler could run "in the middle of" an - assignment to the variable if its type is not atomic. *Note - Atomic Data Access::. + In fact, if `SIGKILL' fails to terminate a process, that by itself + constitutes an operating system bug which you should report. - * Merely writing into a memory object is safe as long as a sudden - change in the value, at any time when the handler might run, will - not disturb anything. + The system will generate `SIGKILL' for a process itself under some + unusual conditions where the program cannot possibly continue to + run (even to run a signal handler). + + - Macro: int SIGHUP + The `SIGHUP' ("hang-up") signal is used to report that the user's + terminal is disconnected, perhaps because a network or telephone + connection was broken. For more information about this, see *Note + Control Modes::. + + This signal is also used to report the termination of the + controlling process on a terminal to jobs associated with that + session; this termination effectively disconnects all processes in + the session from the controlling terminal. For more information, + see *Note Termination Internals::.  -File: libc.info, Node: Atomic Data Access, Prev: Nonreentrancy, Up: Defining Handlers +File: libc.info, Node: Alarm Signals, Next: Asynchronous I/O Signals, Prev: Termination Signals, Up: Standard Signals -Atomic Data Access and Signal Handling --------------------------------------- +Alarm Signals +------------- - Whether the data in your application concerns atoms, or mere text, -you have to be careful about the fact that access to a single datum is -not necessarily "atomic". This means that it can take more than one -instruction to read or write a single object. In such cases, a signal -handler might be invoked in the middle of reading or writing the object. + These signals are used to indicate the expiration of timers. *Note +Setting an Alarm::, for information about functions that cause these +signals to be sent. - There are three ways you can cope with this problem. You can use -data types that are always accessed atomically; you can carefully -arrange that nothing untoward happens if an access is interrupted, or -you can block all signals around any access that had better not be -interrupted (*note Blocking Signals::). + The default behavior for these signals is to cause program +termination. This default is rarely useful, but no other default would +be useful; most of the ways of using these signals would require +handler functions in any case. -* Menu: + - Macro: int SIGALRM + This signal typically indicates expiration of a timer that + measures real or clock time. It is used by the `alarm' function, + for example. -* Non-atomic Example:: A program illustrating interrupted access. -* Types: Atomic Types. Data types that guarantee no interruption. -* Usage: Atomic Usage. Proving that interruption is harmless. + - Macro: int SIGVTALRM + This signal typically indicates expiration of a timer that + measures CPU time used by the current process. The name is an + abbreviation for "virtual time alarm". + + - Macro: int SIGPROF + This signal typically indicates expiration of a timer that measures + both CPU time used by the current process, and CPU time expended on + behalf of the process by the system. Such a timer is used to + implement code profiling facilities, hence the name of this signal.  -File: libc.info, Node: Non-atomic Example, Next: Atomic Types, Up: Atomic Data Access +File: libc.info, Node: Asynchronous I/O Signals, Next: Job Control Signals, Prev: Alarm Signals, Up: Standard Signals -Problems with Non-Atomic Access -............................... +Asynchronous I/O Signals +------------------------ - Here is an example which shows what can happen if a signal handler -runs in the middle of modifying a variable. (Interrupting the reading -of a variable can also lead to paradoxical results, but here we only -show writing.) + The signals listed in this section are used in conjunction with +asynchronous I/O facilities. You have to take explicit action by +calling `fcntl' to enable a particular file descriptor to generate +these signals (*note Interrupt Input::). The default action for these +signals is to ignore them. - #include - #include - - struct two_words { int a, b; } memory; - - void - handler(int signum) - { - printf ("%d,%d\n", memory.a, memory.b); - alarm (1); - } - - int - main (void) - { - static struct two_words zeros = { 0, 0 }, ones = { 1, 1 }; - signal (SIGALRM, handler); - memory = zeros; - alarm (1); - while (1) - { - memory = zeros; - memory = ones; - } - } + - Macro: int SIGIO + This signal is sent when a file descriptor is ready to perform + input or output. - This program fills `memory' with zeros, ones, zeros, ones, -alternating forever; meanwhile, once per second, the alarm signal -handler prints the current contents. (Calling `printf' in the handler -is safe in this program because it is certainly not being called outside -the handler when the signal happens.) + On most operating systems, terminals and sockets are the only + kinds of files that can generate `SIGIO'; other kinds, including + ordinary files, never generate `SIGIO' even if you ask them to. - Clearly, this program can print a pair of zeros or a pair of ones. -But that's not all it can do! On most machines, it takes several -instructions to store a new value in `memory', and the value is stored -one word at a time. If the signal is delivered in between these -instructions, the handler might find that `memory.a' is zero and -`memory.b' is one (or vice versa). + In the GNU system `SIGIO' will always be generated properly if you + successfully set asynchronous mode with `fcntl'. - On some machines it may be possible to store a new value in `memory' -with just one instruction that cannot be interrupted. On these -machines, the handler will always print two zeros or two ones. + - Macro: int SIGURG + This signal is sent when "urgent" or out-of-band data arrives on a + socket. *Note Out-of-Band Data::. + + - Macro: int SIGPOLL + This is a System V signal name, more or less similar to `SIGIO'. + It is defined only for compatibility.  -File: libc.info, Node: Atomic Types, Next: Atomic Usage, Prev: Non-atomic Example, Up: Atomic Data Access +File: libc.info, Node: Job Control Signals, Next: Operation Error Signals, Prev: Asynchronous I/O Signals, Up: Standard Signals -Atomic Types -............ +Job Control Signals +------------------- - To avoid uncertainty about interrupting access to a variable, you can -use a particular data type for which access is always atomic: -`sig_atomic_t'. Reading and writing this data type is guaranteed to -happen in a single instruction, so there's no way for a handler to run -"in the middle" of an access. + These signals are used to support job control. If your system +doesn't support job control, then these macros are defined but the +signals themselves can't be raised or handled. - The type `sig_atomic_t' is always an integer data type, but which -one it is, and how many bits it contains, may vary from machine to -machine. + You should generally leave these signals alone unless you really +understand how job control works. *Note Job Control::. - - Data Type: sig_atomic_t - This is an integer data type. Objects of this type are always - accessed atomically. + - Macro: int SIGCHLD + This signal is sent to a parent process whenever one of its child + processes terminates or stops. - In practice, you can assume that `int' and other integer types no -longer than `int' are atomic. You can also assume that pointer types -are atomic; that is very convenient. Both of these assumptions are -true on all of the machines that the GNU C library supports and on all -POSIX systems we know of. + The default action for this signal is to ignore it. If you + establish a handler for this signal while there are child + processes that have terminated but not reported their status via + `wait' or `waitpid' (*note Process Completion::), whether your new + handler applies to those processes or not depends on the + particular operating system. + + - Macro: int SIGCLD + This is an obsolete name for `SIGCHLD'. + + - Macro: int SIGCONT + You can send a `SIGCONT' signal to a process to make it continue. + This signal is special--it always makes the process continue if it + is stopped, before the signal is delivered. The default behavior + is to do nothing else. You cannot block this signal. You can set + a handler, but `SIGCONT' always makes the process continue + regardless. + + Most programs have no reason to handle `SIGCONT'; they simply + resume execution without realizing they were ever stopped. You + can use a handler for `SIGCONT' to make a program do something + special when it is stopped and continued--for example, to reprint + a prompt when it is suspended while waiting for input. + + - Macro: int SIGSTOP + The `SIGSTOP' signal stops the process. It cannot be handled, + ignored, or blocked. + + - Macro: int SIGTSTP + The `SIGTSTP' signal is an interactive stop signal. Unlike + `SIGSTOP', this signal can be handled and ignored. + + Your program should handle this signal if you have a special need + to leave files or system tables in a secure state when a process is + stopped. For example, programs that turn off echoing should handle + `SIGTSTP' so they can turn echoing back on before stopping. + + This signal is generated when the user types the SUSP character + (normally `C-z'). For more information about terminal driver + support, see *Note Special Characters::. + + - Macro: int SIGTTIN + A process cannot read from the user's terminal while it is running + as a background job. When any process in a background job tries to + read from the terminal, all of the processes in the job are sent a + `SIGTTIN' signal. The default action for this signal is to stop + the process. For more information about how this interacts with + the terminal driver, see *Note Access to the Terminal::. + + - Macro: int SIGTTOU + This is similar to `SIGTTIN', but is generated when a process in a + background job attempts to write to the terminal or set its modes. + Again, the default action is to stop the process. `SIGTTOU' is + only generated for an attempt to write to the terminal if the + `TOSTOP' output mode is set; *note Output Modes::. + + While a process is stopped, no more signals can be delivered to it +until it is continued, except `SIGKILL' signals and (obviously) +`SIGCONT' signals. The signals are marked as pending, but not +delivered until the process is continued. The `SIGKILL' signal always +causes termination of the process and can't be blocked, handled or +ignored. You can ignore `SIGCONT', but it always causes the process to +be continued anyway if it is stopped. Sending a `SIGCONT' signal to a +process causes any pending stop signals for that process to be +discarded. Likewise, any pending `SIGCONT' signals for a process are +discarded when it receives a stop signal. + + When a process in an orphaned process group (*note Orphaned Process +Groups::) receives a `SIGTSTP', `SIGTTIN', or `SIGTTOU' signal and does +not handle it, the process does not stop. Stopping the process would +probably not be very useful, since there is no shell program that will +notice it stop and allow the user to continue it. What happens instead +depends on the operating system you are using. Some systems may do +nothing; others may deliver another signal instead, such as `SIGKILL' +or `SIGHUP'. In the GNU system, the process dies with `SIGKILL'; this +avoids the problem of many stopped, orphaned processes lying around the +system.  -File: libc.info, Node: Atomic Usage, Prev: Atomic Types, Up: Atomic Data Access +File: libc.info, Node: Operation Error Signals, Next: Miscellaneous Signals, Prev: Job Control Signals, Up: Standard Signals -Atomic Usage Patterns -..................... +Operation Error Signals +----------------------- - Certain patterns of access avoid any problem even if an access is -interrupted. For example, a flag which is set by the handler, and -tested and cleared by the main program from time to time, is always safe -even if access actually requires two instructions. To show that this is -so, we must consider each access that could be interrupted, and show -that there is no problem if it is interrupted. + These signals are used to report various errors generated by an +operation done by the program. They do not necessarily indicate a +programming error in the program, but an error that prevents an +operating system call from completing. The default action for all of +them is to cause the process to terminate. - An interrupt in the middle of testing the flag is safe because -either it's recognized to be nonzero, in which case the precise value -doesn't matter, or it will be seen to be nonzero the next time it's -tested. + - Macro: int SIGPIPE + Broken pipe. If you use pipes or FIFOs, you have to design your + application so that one process opens the pipe for reading before + another starts writing. If the reading process never starts, or + terminates unexpectedly, writing to the pipe or FIFO raises a + `SIGPIPE' signal. If `SIGPIPE' is blocked, handled or ignored, + the offending call fails with `EPIPE' instead. - An interrupt in the middle of clearing the flag is no problem because -either the value ends up zero, which is what happens if a signal comes -in just before the flag is cleared, or the value ends up nonzero, and -subsequent events occur as if the signal had come in just after the flag -was cleared. As long as the code handles both of these cases properly, -it can also handle a signal in the middle of clearing the flag. (This -is an example of the sort of reasoning you need to do to figure out -whether non-atomic usage is safe.) + Pipes and FIFO special files are discussed in more detail in *Note + Pipes and FIFOs::. - Sometimes you can insure uninterrupted access to one object by -protecting its use with another object, perhaps one whose type -guarantees atomicity. *Note Merged Signals::, for an example. + Another cause of `SIGPIPE' is when you try to output to a socket + that isn't connected. *Note Sending Data::. + + - Macro: int SIGLOST + Resource lost. This signal is generated when you have an advisory + lock on an NFS file, and the NFS server reboots and forgets about + your lock. + + In the GNU system, `SIGLOST' is generated when any server program + dies unexpectedly. It is usually fine to ignore the signal; + whatever call was made to the server that died just returns an + error. + + - Macro: int SIGXCPU + CPU time limit exceeded. This signal is generated when the process + exceeds its soft resource limit on CPU time. *Note Limits on + Resources::. + + - Macro: int SIGXFSZ + File size limit exceeded. This signal is generated when the + process attempts to extend a file so it exceeds the process's soft + resource limit on file size. *Note Limits on Resources::.  -File: libc.info, Node: Interrupted Primitives, Next: Generating Signals, Prev: Defining Handlers, Up: Signal Handling +File: libc.info, Node: Miscellaneous Signals, Next: Signal Messages, Prev: Operation Error Signals, Up: Standard Signals -Primitives Interrupted by Signals -================================= +Miscellaneous Signals +--------------------- - A signal can arrive and be handled while an I/O primitive such as -`open' or `read' is waiting for an I/O device. If the signal handler -returns, the system faces the question: what should happen next? + These signals are used for various other purposes. In general, they +will not affect your program unless it explicitly uses them for +something. - POSIX specifies one approach: make the primitive fail right away. -The error code for this kind of failure is `EINTR'. This is flexible, -but usually inconvenient. Typically, POSIX applications that use signal -handlers must check for `EINTR' after each library function that can -return it, in order to try the call again. Often programmers forget to -check, which is a common source of error. + - Macro: int SIGUSR1 + - Macro: int SIGUSR2 + The `SIGUSR1' and `SIGUSR2' signals are set aside for you to use + any way you want. They're useful for simple interprocess + communication, if you write a signal handler for them in the + program that receives the signal. - The GNU library provides a convenient way to retry a call after a -temporary failure, with the macro `TEMP_FAILURE_RETRY': + There is an example showing the use of `SIGUSR1' and `SIGUSR2' in + *Note Signaling Another Process::. - - Macro: TEMP_FAILURE_RETRY (EXPRESSION) - This macro evaluates EXPRESSION once. If it fails and reports - error code `EINTR', `TEMP_FAILURE_RETRY' evaluates it again, and - over and over until the result is not a temporary failure. + The default action is to terminate the process. - The value returned by `TEMP_FAILURE_RETRY' is whatever value - EXPRESSION produced. + - Macro: int SIGWINCH + Window size change. This is generated on some systems (including + GNU) when the terminal driver's record of the number of rows and + columns on the screen is changed. The default action is to ignore + it. - BSD avoids `EINTR' entirely and provides a more convenient approach: -to restart the interrupted primitive, instead of making it fail. If -you choose this approach, you need not be concerned with `EINTR'. + If a program does full-screen display, it should handle `SIGWINCH'. + When the signal arrives, it should fetch the new screen size and + reformat its display accordingly. - You can choose either approach with the GNU library. If you use -`sigaction' to establish a signal handler, you can specify how that -handler should behave. If you specify the `SA_RESTART' flag, return -from that handler will resume a primitive; otherwise, return from that -handler will cause `EINTR'. *Note Flags for Sigaction::. + - Macro: int SIGINFO + Information request. In 4.4 BSD and the GNU system, this signal + is sent to all the processes in the foreground process group of + the controlling terminal when the user types the STATUS character + in canonical mode; *note Signal Characters::. - Another way to specify the choice is with the `siginterrupt' -function. *Note BSD Handler::. + If the process is the leader of the process group, the default + action is to print some status information about the system and + what the process is doing. Otherwise the default is to do nothing. - When you don't specify with `sigaction' or `siginterrupt' what a -particular handler should do, it uses a default choice. The default -choice in the GNU library depends on the feature test macros you have -defined. If you define `_BSD_SOURCE' or `_GNU_SOURCE' before calling -`signal', the default is to resume primitives; otherwise, the default -is to make them fail with `EINTR'. (The library contains alternate -versions of the `signal' function, and the feature test macros -determine which one you really call.) *Note Feature Test Macros::. + +File: libc.info, Node: Signal Messages, Prev: Miscellaneous Signals, Up: Standard Signals - The description of each primitive affected by this issue lists -`EINTR' among the error codes it can return. +Signal Messages +--------------- - There is one situation where resumption never happens no matter which -choice you make: when a data-transfer function such as `read' or -`write' is interrupted by a signal after transferring part of the data. -In this case, the function returns the number of bytes already -transferred, indicating partial success. + We mentioned above that the shell prints a message describing the +signal that terminated a child process. The clean way to print a +message describing a signal is to use the functions `strsignal' and +`psignal'. These functions use a signal number to specify which kind +of signal to describe. The signal number may come from the termination +status of a child process (*note Process Completion::) or it may come +from a signal handler in the same process. - This might at first appear to cause unreliable behavior on -record-oriented devices (including datagram sockets; *note Datagrams::), -where splitting one `read' or `write' into two would read or write two -records. Actually, there is no problem, because interruption after a -partial transfer cannot happen on such devices; they always transfer an -entire record in one burst, with no waiting once data transfer has -started. + - Function: char * strsignal (int SIGNUM) + This function returns a pointer to a statically-allocated string + containing a message describing the signal SIGNUM. You should not + modify the contents of this string; and, since it can be rewritten + on subsequent calls, you should save a copy of it if you need to + reference it later. + + This function is a GNU extension, declared in the header file + `string.h'. + + - Function: void psignal (int SIGNUM, const char *MESSAGE) + This function prints a message describing the signal SIGNUM to the + standard error output stream `stderr'; see *Note Standard + Streams::. + + If you call `psignal' with a MESSAGE that is either a null pointer + or an empty string, `psignal' just prints the message + corresponding to SIGNUM, adding a trailing newline. + + If you supply a non-null MESSAGE argument, then `psignal' prefixes + its output with this string. It adds a colon and a space + character to separate the MESSAGE from the string corresponding to + SIGNUM. + + This function is a BSD feature, declared in the header file + `signal.h'. + + There is also an array `sys_siglist' which contains the messages for +the various signal codes. This array exists on BSD systems, unlike +`strsignal'.  -File: libc.info, Node: Generating Signals, Next: Blocking Signals, Prev: Interrupted Primitives, Up: Signal Handling +File: libc.info, Node: Signal Actions, Next: Defining Handlers, Prev: Standard Signals, Up: Signal Handling -Generating Signals -================== +Specifying Signal Actions +========================= - Besides signals that are generated as a result of a hardware trap or -interrupt, your program can explicitly send signals to itself or to -another process. + The simplest way to change the action for a signal is to use the +`signal' function. You can specify a built-in action (such as to +ignore the signal), or you can "establish a handler". + + The GNU library also implements the more versatile `sigaction' +facility. This section describes both facilities and gives suggestions +on which to use when. * Menu: -* Signaling Yourself:: A process can send a signal to itself. -* Signaling Another Process:: Send a signal to another process. -* Permission for kill:: Permission for using `kill'. -* Kill Example:: Using `kill' for Communication. +* Basic Signal Handling:: The simple `signal' function. +* Advanced Signal Handling:: The more powerful `sigaction' function. +* Signal and Sigaction:: How those two functions interact. +* Sigaction Function Example:: An example of using the sigaction function. +* Flags for Sigaction:: Specifying options for signal handling. +* Initial Signal Actions:: How programs inherit signal actions.  -File: libc.info, Node: Signaling Yourself, Next: Signaling Another Process, Up: Generating Signals +File: libc.info, Node: Basic Signal Handling, Next: Advanced Signal Handling, Up: Signal Actions -Signaling Yourself ------------------- +Basic Signal Handling +--------------------- - A process can send itself a signal with the `raise' function. This -function is declared in `signal.h'. + The `signal' function provides a simple interface for establishing +an action for a particular signal. The function and associated macros +are declared in the header file `signal.h'. - - Function: int raise (int SIGNUM) - The `raise' function sends the signal SIGNUM to the calling - process. It returns zero if successful and a nonzero value if it - fails. About the only reason for failure would be if the value of - SIGNUM is invalid. + - Data Type: sighandler_t + This is the type of signal handler functions. Signal handlers + take one integer argument specifying the signal number, and have + return type `void'. So, you should define handler functions like + this: - - Function: int gsignal (int SIGNUM) - The `gsignal' function does the same thing as `raise'; it is - provided only for compatibility with SVID. + void HANDLER (int `signum') { ... } - One convenient use for `raise' is to reproduce the default behavior -of a signal that you have trapped. For instance, suppose a user of your -program types the SUSP character (usually `C-z'; *note Special -Characters::) to send it an interactive stop signal (`SIGTSTP'), and -you want to clean up some internal data buffers before stopping. You -might set this up like this: + The name `sighandler_t' for this data type is a GNU extension. + + - Function: sighandler_t signal (int SIGNUM, sighandler_t ACTION) + The `signal' function establishes ACTION as the action for the + signal SIGNUM. + + The first argument, SIGNUM, identifies the signal whose behavior + you want to control, and should be a signal number. The proper + way to specify a signal number is with one of the symbolic signal + names (*note Standard Signals::)--don't use an explicit number, + because the numerical code for a given kind of signal may vary + from operating system to operating system. + + The second argument, ACTION, specifies the action to use for the + signal SIGNUM. This can be one of the following: + + `SIG_DFL' + `SIG_DFL' specifies the default action for the particular + signal. The default actions for various kinds of signals are + stated in *Note Standard Signals::. + + `SIG_IGN' + `SIG_IGN' specifies that the signal should be ignored. + + Your program generally should not ignore signals that + represent serious events or that are normally used to request + termination. You cannot ignore the `SIGKILL' or `SIGSTOP' + signals at all. You can ignore program error signals like + `SIGSEGV', but ignoring the error won't enable the program to + continue executing meaningfully. Ignoring user requests such + as `SIGINT', `SIGQUIT', and `SIGTSTP' is unfriendly. + + When you do not wish signals to be delivered during a certain + part of the program, the thing to do is to block them, not + ignore them. *Note Blocking Signals::. + + `HANDLER' + Supply the address of a handler function in your program, to + specify running this handler as the way to deliver the signal. + + For more information about defining signal handler functions, + see *Note Defining Handlers::. + + If you set the action for a signal to `SIG_IGN', or if you set it + to `SIG_DFL' and the default action is to ignore that signal, then + any pending signals of that type are discarded (even if they are + blocked). Discarding the pending signals means that they will + never be delivered, not even if you subsequently specify another + action and unblock this kind of signal. + + The `signal' function returns the action that was previously in + effect for the specified SIGNUM. You can save this value and + restore it later by calling `signal' again. + + If `signal' can't honor the request, it returns `SIG_ERR' instead. + The following `errno' error conditions are defined for this + function: + + `EINVAL' + You specified an invalid SIGNUM; or you tried to ignore or + provide a handler for `SIGKILL' or `SIGSTOP'. + + *Compatibility Note:* A problem encountered when working with the +`signal' function is that it has different semantics on BSD and SVID +systems. The difference is that on SVID systems the signal handler is +deinstalled after signal delivery. On BSD systems the handler must be +explicitly deinstalled. In the GNU C Library we use the BSD version by +default. To use the SVID version you can either use the function +`sysv_signal' (see below) or use the `_XOPEN_SOURCE' feature select +macro (*note Feature Test Macros::). In general, use of these +functions should be avoided because of compatibility problems. It is +better to use `sigaction' if it is available since the results are much +more reliable. + + Here is a simple example of setting up a handler to delete temporary +files when certain fatal signals happen: #include - /* When a stop signal arrives, set the action back to the default - and then resend the signal after doing cleanup actions. */ - void - tstp_handler (int sig) + termination_handler (int signum) { - signal (SIGTSTP, SIG_DFL); - /* Do cleanup actions here. */ - ... - raise (SIGTSTP); - } - - /* When the process is continued again, restore the signal handler. */ + struct temp_file *p; - void - cont_handler (int sig) - { - signal (SIGCONT, cont_handler); - signal (SIGTSTP, tstp_handler); + for (p = temp_file_list; p; p = p->next) + unlink (p->name); } - /* Enable both handlers during program initialization. */ - int main (void) { - signal (SIGCONT, cont_handler); - signal (SIGTSTP, tstp_handler); + ... + if (signal (SIGINT, termination_handler) == SIG_IGN) + signal (SIGINT, SIG_IGN); + if (signal (SIGHUP, termination_handler) == SIG_IGN) + signal (SIGHUP, SIG_IGN); + if (signal (SIGTERM, termination_handler) == SIG_IGN) + signal (SIGTERM, SIG_IGN); ... } - *Portability note:* `raise' was invented by the ISO C committee. -Older systems may not support it, so using `kill' may be more portable. -*Note Signaling Another Process::. - - -File: libc.info, Node: Signaling Another Process, Next: Permission for kill, Prev: Signaling Yourself, Up: Generating Signals +Note that if a given signal was previously set to be ignored, this code +avoids altering that setting. This is because non-job-control shells +often ignore certain signals when starting children, and it is important +for the children to respect this. -Signaling Another Process -------------------------- + We do not handle `SIGQUIT' or the program error signals in this +example because these are designed to provide information for debugging +(a core dump), and the temporary files may give useful information. - The `kill' function can be used to send a signal to another process. -In spite of its name, it can be used for a lot of things other than -causing a process to terminate. Some examples of situations where you -might want to send signals between processes are: + - Function: sighandler_t sysv_signal (int SIGNUM, sighandler_t ACTION) + The `sysv_signal' implements the behavior of the standard `signal' + function as found on SVID systems. The difference to BSD systems + is that the handler is deinstalled after a delivery of a signal. - * A parent process starts a child to perform a task--perhaps having - the child running an infinite loop--and then terminates the child - when the task is no longer needed. + *Compatibility Note:* As said above for `signal', this function + should be avoided when possible. `sigaction' is the preferred + method. - * A process executes as part of a group, and needs to terminate or - notify the other processes in the group when an error or other - event occurs. + - Function: sighandler_t ssignal (int SIGNUM, sighandler_t ACTION) + The `ssignal' function does the same thing as `signal'; it is + provided only for compatibility with SVID. - * Two processes need to synchronize while working together. + - Macro: sighandler_t SIG_ERR + The value of this macro is used as the return value from `signal' + to indicate an error. - This section assumes that you know a little bit about how processes -work. For more information on this subject, see *Note Processes::. + +File: libc.info, Node: Advanced Signal Handling, Next: Signal and Sigaction, Prev: Basic Signal Handling, Up: Signal Actions - The `kill' function is declared in `signal.h'. +Advanced Signal Handling +------------------------ - - Function: int kill (pid_t PID, int SIGNUM) - The `kill' function sends the signal SIGNUM to the process or - process group specified by PID. Besides the signals listed in - *Note Standard Signals::, SIGNUM can also have a value of zero to - check the validity of the PID. + The `sigaction' function has the same basic effect as `signal': to +specify how a signal should be handled by the process. However, +`sigaction' offers more control, at the expense of more complexity. In +particular, `sigaction' allows you to specify additional flags to +control when the signal is generated and how the handler is invoked. - The PID specifies the process or process group to receive the - signal: + The `sigaction' function is declared in `signal.h'. - `PID > 0' - The process whose identifier is PID. + - Data Type: struct sigaction + Structures of type `struct sigaction' are used in the `sigaction' + function to specify all the information about how to handle a + particular signal. This structure contains at least the following + members: - `PID == 0' - All processes in the same process group as the sender. + `sighandler_t sa_handler' + This is used in the same way as the ACTION argument to the + `signal' function. The value can be `SIG_DFL', `SIG_IGN', or + a function pointer. *Note Basic Signal Handling::. - `PID < -1' - The process group whose identifier is -PID. + `sigset_t sa_mask' + This specifies a set of signals to be blocked while the + handler runs. Blocking is explained in *Note Blocking for + Handler::. Note that the signal that was delivered is + automatically blocked by default before its handler is + started; this is true regardless of the value in `sa_mask'. + If you want that signal not to be blocked within its handler, + you must write code in the handler to unblock it. - `PID == -1' - If the process is privileged, send the signal to all - processes except for some special system processes. - Otherwise, send the signal to all processes with the same - effective user ID. + `int sa_flags' + This specifies various flags which can affect the behavior of + the signal. These are described in more detail in *Note + Flags for Sigaction::. - A process can send a signal to itself with a call like - `kill (getpid(), SIGNUM)'. If `kill' is used by a process to send - a signal to itself, and the signal is not blocked, then `kill' - delivers at least one signal (which might be some other pending - unblocked signal instead of the signal SIGNUM) to that process - before it returns. + - Function: int sigaction (int SIGNUM, const struct sigaction + *restrict ACTION, struct sigaction *restrict OLD-ACTION) + The ACTION argument is used to set up a new action for the signal + SIGNUM, while the OLD-ACTION argument is used to return + information about the action previously associated with this + symbol. (In other words, OLD-ACTION has the same purpose as the + `signal' function's return value--you can check to see what the + old action in effect for the signal was, and restore it later if + you want.) - The return value from `kill' is zero if the signal can be sent - successfully. Otherwise, no signal is sent, and a value of `-1' is - returned. If PID specifies sending a signal to several processes, - `kill' succeeds if it can send the signal to at least one of them. - There's no way you can tell which of the processes got the signal - or whether all of them did. + Either ACTION or OLD-ACTION can be a null pointer. If OLD-ACTION + is a null pointer, this simply suppresses the return of + information about the old action. If ACTION is a null pointer, + the action associated with the signal SIGNUM is unchanged; this + allows you to inquire about how a signal is being handled without + changing that handling. - The following `errno' error conditions are defined for this - function: + The return value from `sigaction' is zero if it succeeds, and `-1' + on failure. The following `errno' error conditions are defined + for this function: `EINVAL' - The SIGNUM argument is an invalid or unsupported number. - - `EPERM' - You do not have the privilege to send a signal to the process - or any of the processes in the process group named by PID. - - `ESCRH' - The PID argument does not refer to an existing process or - group. + The SIGNUM argument is not valid, or you are trying to trap + or ignore `SIGKILL' or `SIGSTOP'. - - Function: int killpg (int PGID, int SIGNUM) - This is similar to `kill', but sends signal SIGNUM to the process - group PGID. This function is provided for compatibility with BSD; - using `kill' to do this is more portable. + +File: libc.info, Node: Signal and Sigaction, Next: Sigaction Function Example, Prev: Advanced Signal Handling, Up: Signal Actions - As a simple example of `kill', the call `kill (getpid (), SIG)' has -the same effect as `raise (SIG)'. +Interaction of `signal' and `sigaction' +--------------------------------------- - -File: libc.info, Node: Permission for kill, Next: Kill Example, Prev: Signaling Another Process, Up: Generating Signals + It's possible to use both the `signal' and `sigaction' functions +within a single program, but you have to be careful because they can +interact in slightly strange ways. -Permission for using `kill' ---------------------------- + The `sigaction' function specifies more information than the +`signal' function, so the return value from `signal' cannot express the +full range of `sigaction' possibilities. Therefore, if you use +`signal' to save and later reestablish an action, it may not be able to +reestablish properly a handler that was established with `sigaction'. - There are restrictions that prevent you from using `kill' to send -signals to any random process. These are intended to prevent antisocial -behavior such as arbitrarily killing off processes belonging to another -user. In typical use, `kill' is used to pass signals between parent, -child, and sibling processes, and in these situations you normally do -have permission to send signals. The only common exception is when you -run a setuid program in a child process; if the program changes its -real UID as well as its effective UID, you may not have permission to -send a signal. The `su' program does this. + To avoid having problems as a result, always use `sigaction' to save +and restore a handler if your program uses `sigaction' at all. Since +`sigaction' is more general, it can properly save and reestablish any +action, regardless of whether it was established originally with +`signal' or `sigaction'. - Whether a process has permission to send a signal to another process -is determined by the user IDs of the two processes. This concept is -discussed in detail in *Note Process Persona::. + On some systems if you establish an action with `signal' and then +examine it with `sigaction', the handler address that you get may not +be the same as what you specified with `signal'. It may not even be +suitable for use as an action argument with `signal'. But you can rely +on using it as an argument to `sigaction'. This problem never happens +on the GNU system. - Generally, for a process to be able to send a signal to another -process, either the sending process must belong to a privileged user -(like `root'), or the real or effective user ID of the sending process -must match the real or effective user ID of the receiving process. If -the receiving process has changed its effective user ID from the -set-user-ID mode bit on its process image file, then the owner of the -process image file is used in place of its current effective user ID. -In some implementations, a parent process might be able to send signals -to a child process even if the user ID's don't match, and other -implementations might enforce other restrictions. + So, you're better off using one or the other of the mechanisms +consistently within a single program. - The `SIGCONT' signal is a special case. It can be sent if the -sender is part of the same session as the receiver, regardless of user -IDs. + *Portability Note:* The basic `signal' function is a feature of +ISO C, while `sigaction' is part of the POSIX.1 standard. If you are +concerned about portability to non-POSIX systems, then you should use +the `signal' function instead.  -File: libc.info, Node: Kill Example, Prev: Permission for kill, Up: Generating Signals - -Using `kill' for Communication ------------------------------- +File: libc.info, Node: Sigaction Function Example, Next: Flags for Sigaction, Prev: Signal and Sigaction, Up: Signal Actions - Here is a longer example showing how signals can be used for -interprocess communication. This is what the `SIGUSR1' and `SIGUSR2' -signals are provided for. Since these signals are fatal by default, -the process that is supposed to receive them must trap them through -`signal' or `sigaction'. +`sigaction' Function Example +---------------------------- - In this example, a parent process forks a child process and then -waits for the child to complete its initialization. The child process -tells the parent when it is ready by sending it a `SIGUSR1' signal, -using the `kill' function. + In *Note Basic Signal Handling::, we gave an example of establishing +a simple handler for termination signals using `signal'. Here is an +equivalent example using `sigaction': #include - #include - #include - #include - - /* When a `SIGUSR1' signal arrives, set this variable. */ - volatile sig_atomic_t usr_interrupt = 0; void - synch_signal (int sig) - { - usr_interrupt = 1; - } - - /* The child process executes this function. */ - void - child_function (void) + termination_handler (int signum) { - /* Perform initialization. */ - printf ("I'm here!!! My pid is %d.\n", (int) getpid ()); - - /* Let parent know you're done. */ - kill (getppid (), SIGUSR1); + struct temp_file *p; - /* Continue with execution. */ - puts ("Bye, now...."); - exit (0); + for (p = temp_file_list; p; p = p->next) + unlink (p->name); } int main (void) { - struct sigaction usr_action; - sigset_t block_mask; - pid_t child_id; - - /* Establish the signal handler. */ - sigfillset (&block_mask); - usr_action.sa_handler = synch_signal; - usr_action.sa_mask = block_mask; - usr_action.sa_flags = 0; - sigaction (SIGUSR1, &usr_action, NULL); - - /* Create the child process. */ - child_id = fork (); - if (child_id == 0) - child_function (); /* Does not return. */ - - /* Busy wait for the child to send a signal. */ - while (!usr_interrupt) - ; + ... + struct sigaction new_action, old_action; - /* Now continue execution. */ - puts ("That's all, folks!"); + /* Set up the structure to specify the new action. */ + new_action.sa_handler = termination_handler; + sigemptyset (&new_action.sa_mask); + new_action.sa_flags = 0; - return 0; + sigaction (SIGINT, NULL, &old_action); + if (old_action.sa_handler != SIG_IGN) + sigaction (SIGINT, &new_action, NULL); + sigaction (SIGHUP, NULL, &old_action); + if (old_action.sa_handler != SIG_IGN) + sigaction (SIGHUP, &new_action, NULL); + sigaction (SIGTERM, NULL, &old_action); + if (old_action.sa_handler != SIG_IGN) + sigaction (SIGTERM, &new_action, NULL); + ... } - This example uses a busy wait, which is bad, because it wastes CPU -cycles that other programs could otherwise use. It is better to ask the -system to wait until the signal arrives. See the example in *Note -Waiting for a Signal::. - - -File: libc.info, Node: Blocking Signals, Next: Waiting for a Signal, Prev: Generating Signals, Up: Signal Handling - -Blocking Signals -================ - - Blocking a signal means telling the operating system to hold it and -deliver it later. Generally, a program does not block signals -indefinitely--it might as well ignore them by setting their actions to -`SIG_IGN'. But it is useful to block signals briefly, to prevent them -from interrupting sensitive operations. For instance: - - * You can use the `sigprocmask' function to block signals while you - modify global variables that are also modified by the handlers for - these signals. - - * You can set `sa_mask' in your `sigaction' call to block certain - signals while a particular signal handler runs. This way, the - signal handler can run without being interrupted itself by signals. - -* Menu: - -* Why Block:: The purpose of blocking signals. -* Signal Sets:: How to specify which signals to - block. -* Process Signal Mask:: Blocking delivery of signals to your - process during normal execution. -* Testing for Delivery:: Blocking to Test for Delivery of - a Signal. -* Blocking for Handler:: Blocking additional signals while a - handler is being run. -* Checking for Pending Signals:: Checking for Pending Signals -* Remembering a Signal:: How you can get almost the same - effect as blocking a signal, by - handling it and setting a flag - to be tested later. - - -File: libc.info, Node: Why Block, Next: Signal Sets, Up: Blocking Signals - -Why Blocking Signals is Useful ------------------------------- - - Temporary blocking of signals with `sigprocmask' gives you a way to -prevent interrupts during critical parts of your code. If signals -arrive in that part of the program, they are delivered later, after you -unblock them. - - One example where this is useful is for sharing data between a signal -handler and the rest of the program. If the type of the data is not -`sig_atomic_t' (*note Atomic Data Access::), then the signal handler -could run when the rest of the program has only half finished reading -or writing the data. This would lead to confusing consequences. + The program just loads the `new_action' structure with the desired +parameters and passes it in the `sigaction' call. The usage of +`sigemptyset' is described later; see *Note Blocking Signals::. - To make the program reliable, you can prevent the signal handler from -running while the rest of the program is examining or modifying that -data--by blocking the appropriate signal around the parts of the -program that touch the data. + As in the example using `signal', we avoid handling signals +previously set to be ignored. Here we can avoid altering the signal +handler even momentarily, by using the feature of `sigaction' that lets +us examine the current action without specifying a new one. - Blocking signals is also necessary when you want to perform a certain -action only if a signal has not arrived. Suppose that the handler for -the signal sets a flag of type `sig_atomic_t'; you would like to test -the flag and perform the action if the flag is not set. This is -unreliable. Suppose the signal is delivered immediately after you test -the flag, but before the consequent action: then the program will -perform the action even though the signal has arrived. + Here is another example. It retrieves information about the current +action for `SIGINT' without changing that action. - The only way to test reliably for whether a signal has yet arrived -is to test while the signal is blocked. + struct sigaction query_action; + + if (sigaction (SIGINT, NULL, &query_action) < 0) + /* `sigaction' returns -1 in case of error. */ + else if (query_action.sa_handler == SIG_DFL) + /* `SIGINT' is handled in the default, fatal manner. */ + else if (query_action.sa_handler == SIG_IGN) + /* `SIGINT' is ignored. */ + else + /* A programmer-defined signal handler is in effect. */  -File: libc.info, Node: Signal Sets, Next: Process Signal Mask, Prev: Why Block, Up: Blocking Signals +File: libc.info, Node: Flags for Sigaction, Next: Initial Signal Actions, Prev: Sigaction Function Example, Up: Signal Actions -Signal Sets ------------ +Flags for `sigaction' +--------------------- - All of the signal blocking functions use a data structure called a -"signal set" to specify what signals are affected. Thus, every -activity involves two stages: creating the signal set, and then passing -it as an argument to a library function. + The `sa_flags' member of the `sigaction' structure is a catch-all +for special features. Most of the time, `SA_RESTART' is a good value +to use for this field. - These facilities are declared in the header file `signal.h'. + The value of `sa_flags' is interpreted as a bit mask. Thus, you +should choose the flags you want to set, OR those flags together, and +store the result in the `sa_flags' member of your `sigaction' structure. - - Data Type: sigset_t - The `sigset_t' data type is used to represent a signal set. - Internally, it may be implemented as either an integer or structure - type. + Each signal number has its own set of flags. Each call to +`sigaction' affects one particular signal number, and the flags that +you specify apply only to that particular signal. - For portability, use only the functions described in this section - to initialize, change, and retrieve information from `sigset_t' - objects--don't try to manipulate them directly. + In the GNU C library, establishing a handler with `signal' sets all +the flags to zero except for `SA_RESTART', whose value depends on the +settings you have made with `siginterrupt'. *Note Interrupted +Primitives::, to see what this is about. - There are two ways to initialize a signal set. You can initially -specify it to be empty with `sigemptyset' and then add specified -signals individually. Or you can specify it to be full with -`sigfillset' and then delete specified signals individually. + These macros are defined in the header file `signal.h'. - You must always initialize the signal set with one of these two -functions before using it in any other way. Don't try to set all the -signals explicitly because the `sigset_t' object might include some -other information (like a version field) that needs to be initialized as -well. (In addition, it's not wise to put into your program an -assumption that the system has no signals aside from the ones you know -about.) + - Macro: int SA_NOCLDSTOP + This flag is meaningful only for the `SIGCHLD' signal. When the + flag is set, the system delivers the signal for a terminated child + process but not for one that is stopped. By default, `SIGCHLD' is + delivered for both terminated children and stopped children. - - Function: int sigemptyset (sigset_t *SET) - This function initializes the signal set SET to exclude all of the - defined signals. It always returns `0'. + Setting this flag for a signal other than `SIGCHLD' has no effect. - - Function: int sigfillset (sigset_t *SET) - This function initializes the signal set SET to include all of the - defined signals. Again, the return value is `0'. + - Macro: int SA_ONSTACK + If this flag is set for a particular signal number, the system + uses the signal stack when delivering that kind of signal. *Note + Signal Stack::. If a signal with this flag arrives and you have + not set a signal stack, the system terminates the program with + `SIGILL'. - - Function: int sigaddset (sigset_t *SET, int SIGNUM) - This function adds the signal SIGNUM to the signal set SET. All - `sigaddset' does is modify SET; it does not block or unblock any - signals. + - Macro: int SA_RESTART + This flag controls what happens when a signal is delivered during + certain primitives (such as `open', `read' or `write'), and the + signal handler returns normally. There are two alternatives: the + library function can resume, or it can return failure with error + code `EINTR'. - The return value is `0' on success and `-1' on failure. The - following `errno' error condition is defined for this function: + The choice is controlled by the `SA_RESTART' flag for the + particular kind of signal that was delivered. If the flag is set, + returning from a handler resumes the library function. If the + flag is clear, returning from a handler makes the function fail. + *Note Interrupted Primitives::. - `EINVAL' - The SIGNUM argument doesn't specify a valid signal. + +File: libc.info, Node: Initial Signal Actions, Prev: Flags for Sigaction, Up: Signal Actions - - Function: int sigdelset (sigset_t *SET, int SIGNUM) - This function removes the signal SIGNUM from the signal set SET. - All `sigdelset' does is modify SET; it does not block or unblock - any signals. The return value and error conditions are the same - as for `sigaddset'. +Initial Signal Actions +---------------------- - Finally, there is a function to test what signals are in a signal -set: + When a new process is created (*note Creating a Process::), it +inherits handling of signals from its parent process. However, when +you load a new process image using the `exec' function (*note Executing +a File::), any signals that you've defined your own handlers for revert +to their `SIG_DFL' handling. (If you think about it a little, this +makes sense; the handler functions from the old program are specific to +that program, and aren't even present in the address space of the new +program image.) Of course, the new program can establish its own +handlers. - - Function: int sigismember (const sigset_t *SET, int SIGNUM) - The `sigismember' function tests whether the signal SIGNUM is a - member of the signal set SET. It returns `1' if the signal is in - the set, `0' if not, and `-1' if there is an error. + When a program is run by a shell, the shell normally sets the initial +actions for the child process to `SIG_DFL' or `SIG_IGN', as +appropriate. It's a good idea to check to make sure that the shell has +not set up an initial action of `SIG_IGN' before you establish your own +signal handlers. - The following `errno' error condition is defined for this function: + Here is an example of how to establish a handler for `SIGHUP', but +not if `SIGHUP' is currently ignored: - `EINVAL' - The SIGNUM argument doesn't specify a valid signal. + ... + struct sigaction temp; + + sigaction (SIGHUP, NULL, &temp); + + if (temp.sa_handler != SIG_IGN) + { + temp.sa_handler = handle_sighup; + sigemptyset (&temp.sa_mask); + sigaction (SIGHUP, &temp, NULL); + }  -File: libc.info, Node: Process Signal Mask, Next: Testing for Delivery, Prev: Signal Sets, Up: Blocking Signals - -Process Signal Mask -------------------- +File: libc.info, Node: Defining Handlers, Next: Interrupted Primitives, Prev: Signal Actions, Up: Signal Handling - The collection of signals that are currently blocked is called the -"signal mask". Each process has its own signal mask. When you create -a new process (*note Creating a Process::), it inherits its parent's -mask. You can block or unblock signals with total flexibility by -modifying the signal mask. +Defining Signal Handlers +======================== - The prototype for the `sigprocmask' function is in `signal.h'. + This section describes how to write a signal handler function that +can be established with the `signal' or `sigaction' functions. - - Function: int sigprocmask (int HOW, const sigset_t *restrict SET, - sigset_t *restrict OLDSET) - The `sigprocmask' function is used to examine or change the calling - process's signal mask. The HOW argument determines how the signal - mask is changed, and must be one of the following values: + A signal handler is just a function that you compile together with +the rest of the program. Instead of directly invoking the function, +you use `signal' or `sigaction' to tell the operating system to call it +when a signal arrives. This is known as "establishing" the handler. +*Note Signal Actions::. - `SIG_BLOCK' - Block the signals in `set'--add them to the existing mask. In - other words, the new mask is the union of the existing mask - and SET. + There are two basic strategies you can use in signal handler +functions: - `SIG_UNBLOCK' - Unblock the signals in SET--remove them from the existing - mask. + * You can have the handler function note that the signal arrived by + tweaking some global data structures, and then return normally. - `SIG_SETMASK' - Use SET for the mask; ignore the previous value of the mask. + * You can have the handler function terminate the program or transfer + control to a point where it can recover from the situation that + caused the signal. - The last argument, OLDSET, is used to return information about the - old process signal mask. If you just want to change the mask - without looking at it, pass a null pointer as the OLDSET argument. - Similarly, if you want to know what's in the mask without changing - it, pass a null pointer for SET (in this case the HOW argument is - not significant). The OLDSET argument is often used to remember - the previous signal mask in order to restore it later. (Since the - signal mask is inherited over `fork' and `exec' calls, you can't - predict what its contents are when your program starts running.) + You need to take special care in writing handler functions because +they can be called asynchronously. That is, a handler might be called +at any point in the program, unpredictably. If two signals arrive +during a very short interval, one handler can run within another. This +section describes what your handler should do, and what you should +avoid. - If invoking `sigprocmask' causes any pending signals to be - unblocked, at least one of those signals is delivered to the - process before `sigprocmask' returns. The order in which pending - signals are delivered is not specified, but you can control the - order explicitly by making multiple `sigprocmask' calls to unblock - various signals one at a time. +* Menu: - The `sigprocmask' function returns `0' if successful, and `-1' to - indicate an error. The following `errno' error conditions are - defined for this function: +* Handler Returns:: Handlers that return normally, and what + this means. +* Termination in Handler:: How handler functions terminate a program. +* Longjmp in Handler:: Nonlocal transfer of control out of a + signal handler. +* Signals in Handler:: What happens when signals arrive while + the handler is already occupied. +* Merged Signals:: When a second signal arrives before the + first is handled. +* Nonreentrancy:: Do not call any functions unless you know they + are reentrant with respect to signals. +* Atomic Data Access:: A single handler can run in the middle of + reading or writing a single object. - `EINVAL' - The HOW argument is invalid. + +File: libc.info, Node: Handler Returns, Next: Termination in Handler, Up: Defining Handlers - You can't block the `SIGKILL' and `SIGSTOP' signals, but if the - signal set includes these, `sigprocmask' just ignores them instead - of returning an error status. +Signal Handlers that Return +--------------------------- - Remember, too, that blocking program error signals such as `SIGFPE' - leads to undesirable results for signals generated by an actual - program error (as opposed to signals sent with `raise' or `kill'). - This is because your program may be too broken to be able to - continue executing to a point where the signal is unblocked again. - *Note Program Error Signals::. + Handlers which return normally are usually used for signals such as +`SIGALRM' and the I/O and interprocess communication signals. But a +handler for `SIGINT' might also return normally after setting a flag +that tells the program to exit at a convenient time. - -File: libc.info, Node: Testing for Delivery, Next: Blocking for Handler, Prev: Process Signal Mask, Up: Blocking Signals + It is not safe to return normally from the handler for a program +error signal, because the behavior of the program when the handler +function returns is not defined after a program error. *Note Program +Error Signals::. -Blocking to Test for Delivery of a Signal ------------------------------------------ + Handlers that return normally must modify some global variable in +order to have any effect. Typically, the variable is one that is +examined periodically by the program during normal operation. Its data +type should be `sig_atomic_t' for reasons described in *Note Atomic +Data Access::. - Now for a simple example. Suppose you establish a handler for -`SIGALRM' signals that sets a flag whenever a signal arrives, and your -main program checks this flag from time to time and then resets it. -You can prevent additional `SIGALRM' signals from arriving in the -meantime by wrapping the critical part of the code with calls to -`sigprocmask', like this: + Here is a simple example of such a program. It executes the body of +the loop until it has noticed that a `SIGALRM' signal has arrived. +This technique is useful because it allows the iteration in progress +when the signal arrives to complete before the loop exits. - /* This variable is set by the SIGALRM signal handler. */ - volatile sig_atomic_t flag = 0; + #include + #include + #include + + /* This flag controls termination of the main loop. */ + volatile sig_atomic_t keep_going = 1; + + /* The signal handler just clears the flag and re-enables itself. */ + void + catch_alarm (int sig) + { + keep_going = 0; + signal (sig, catch_alarm); + } + + void + do_stuff (void) + { + puts ("Doing stuff while waiting for alarm...."); + } int main (void) { - sigset_t block_alarm; - - ... + /* Establish a handler for SIGALRM signals. */ + signal (SIGALRM, catch_alarm); - /* Initialize the signal mask. */ - sigemptyset (&block_alarm); - sigaddset (&block_alarm, SIGALRM); + /* Set an alarm to go off in a little while. */ + alarm (2); - while (1) - { - /* Check if a signal has arrived; if so, reset the flag. */ - sigprocmask (SIG_BLOCK, &block_alarm, NULL); - if (flag) - { - ACTIONS-IF-NOT-ARRIVED - flag = 0; - } - sigprocmask (SIG_UNBLOCK, &block_alarm, NULL); + /* Check the flag once in a while to see when to quit. */ + while (keep_going) + do_stuff (); - ... - } + return EXIT_SUCCESS; }  -File: libc.info, Node: Blocking for Handler, Next: Checking for Pending Signals, Prev: Testing for Delivery, Up: Blocking Signals - -Blocking Signals for a Handler ------------------------------- - - When a signal handler is invoked, you usually want it to be able to -finish without being interrupted by another signal. From the moment the -handler starts until the moment it finishes, you must block signals that -might confuse it or corrupt its data. - - When a handler function is invoked on a signal, that signal is -automatically blocked (in addition to any other signals that are already -in the process's signal mask) during the time the handler is running. -If you set up a handler for `SIGTSTP', for instance, then the arrival -of that signal forces further `SIGTSTP' signals to wait during the -execution of the handler. +File: libc.info, Node: Termination in Handler, Next: Longjmp in Handler, Prev: Handler Returns, Up: Defining Handlers - However, by default, other kinds of signals are not blocked; they can -arrive during handler execution. +Handlers That Terminate the Process +----------------------------------- - The reliable way to block other kinds of signals during the -execution of the handler is to use the `sa_mask' member of the -`sigaction' structure. + Handler functions that terminate the program are typically used to +cause orderly cleanup or recovery from program error signals and +interactive interrupts. - Here is an example: + The cleanest way for a handler to terminate the process is to raise +the same signal that ran the handler in the first place. Here is how +to do this: - #include - #include - - void catch_stop (); + volatile sig_atomic_t fatal_error_in_progress = 0; void - install_handler (void) + fatal_error_signal (int sig) { - struct sigaction setup_action; - sigset_t block_mask; + /* Since this handler is established for more than one kind of signal, + it might still get invoked recursively by delivery of some other kind + of signal. Use a static variable to keep track of that. */ + if (fatal_error_in_progress) + raise (sig); + fatal_error_in_progress = 1; - sigemptyset (&block_mask); - /* Block other terminal-generated signals while handler runs. */ - sigaddset (&block_mask, SIGINT); - sigaddset (&block_mask, SIGQUIT); - setup_action.sa_handler = catch_stop; - setup_action.sa_mask = block_mask; - setup_action.sa_flags = 0; - sigaction (SIGTSTP, &setup_action, NULL); + /* Now do the clean up actions: + - reset terminal modes + - kill child processes + - remove lock files */ + ... + + /* Now reraise the signal. We reactivate the signal's + default handling, which is to terminate the process. + We could just call `exit' or `abort', + but reraising the signal sets the return status + from the process correctly. */ + signal (sig, SIG_DFL); + raise (sig); } - This is more reliable than blocking the other signals explicitly in -the code for the handler. If you block signals explicitly in the -handler, you can't avoid at least a short interval at the beginning of -the handler where they are not yet blocked. - - You cannot remove signals from the process's current mask using this -mechanism. However, you can make calls to `sigprocmask' within your -handler to block or unblock signals as you wish. - - In any case, when the handler returns, the system restores the mask -that was in place before the handler was entered. If any signals that -become unblocked by this restoration are pending, the process will -receive those signals immediately, before returning to the code that was -interrupted. -  -File: libc.info, Node: Checking for Pending Signals, Next: Remembering a Signal, Prev: Blocking for Handler, Up: Blocking Signals +File: libc.info, Node: Longjmp in Handler, Next: Signals in Handler, Prev: Termination in Handler, Up: Defining Handlers -Checking for Pending Signals ----------------------------- +Nonlocal Control Transfer in Handlers +------------------------------------- - You can find out which signals are pending at any time by calling -`sigpending'. This function is declared in `signal.h'. + You can do a nonlocal transfer of control out of a signal handler +using the `setjmp' and `longjmp' facilities (*note Non-Local Exits::). - - Function: int sigpending (sigset_t *SET) - The `sigpending' function stores information about pending signals - in SET. If there is a pending signal that is blocked from - delivery, then that signal is a member of the returned set. (You - can test whether a particular signal is a member of this set using - `sigismember'; see *Note Signal Sets::.) + When the handler does a nonlocal control transfer, the part of the +program that was running will not continue. If this part of the program +was in the middle of updating an important data structure, the data +structure will remain inconsistent. Since the program does not +terminate, the inconsistency is likely to be noticed later on. - The return value is `0' if successful, and `-1' on failure. + There are two ways to avoid this problem. One is to block the signal +for the parts of the program that update important data structures. +Blocking the signal delays its delivery until it is unblocked, once the +critical updating is finished. *Note Blocking Signals::. - Testing whether a signal is pending is not often useful. Testing -when that signal is not blocked is almost certainly bad design. + The other way to re-initialize the crucial data structures in the +signal handler, or make their values consistent. - Here is an example. + Here is a rather schematic example showing the reinitialization of +one global variable. #include - #include + #include - sigset_t base_mask, waiting_mask; + jmp_buf return_to_top_level; - sigemptyset (&base_mask); - sigaddset (&base_mask, SIGINT); - sigaddset (&base_mask, SIGTSTP); + volatile sig_atomic_t waiting_for_input; - /* Block user interrupts while doing other processing. */ - sigprocmask (SIG_SETMASK, &base_mask, NULL); - ... + void + handle_sigint (int signum) + { + /* We may have been waiting for input when the signal arrived, + but we are no longer waiting once we transfer control. */ + waiting_for_input = 0; + longjmp (return_to_top_level, 1); + } - /* After a while, check to see whether any signals are pending. */ - sigpending (&waiting_mask); - if (sigismember (&waiting_mask, SIGINT)) { - /* User has tried to kill the process. */ + int + main (void) + { + ... + signal (SIGINT, sigint_handler); + ... + while (1) { + prepare_for_command (); + if (setjmp (return_to_top_level) == 0) + read_and_execute_command (); + } } - else if (sigismember (&waiting_mask, SIGTSTP)) { - /* User has tried to stop the process. */ + + /* Imagine this is a subroutine used by various commands. */ + char * + read_data () + { + if (input_from_terminal) { + waiting_for_input = 1; + ... + waiting_for_input = 0; + } else { + ... + } } - - Remember that if there is a particular signal pending for your -process, additional signals of that same type that arrive in the -meantime might be discarded. For example, if a `SIGINT' signal is -pending when another `SIGINT' signal arrives, your program will -probably only see one of them when you unblock this signal. - - *Portability Note:* The `sigpending' function is new in POSIX.1. -Older systems have no equivalent facility. diff -durpN glibc-2.2.4/manual/libc.info-4 glibc-2.2.5/manual/libc.info-4 --- glibc-2.2.4/manual/libc.info-4 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-4 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,6 +33,222 @@ software. Copies published by the Free funds for GNU development.  +File: libc.info, Node: Freeing after Malloc, Next: Changing Block Size, Prev: Malloc Examples, Up: Unconstrained Allocation + +Freeing Memory Allocated with `malloc' +...................................... + + When you no longer need a block that you got with `malloc', use the +function `free' to make the block available to be allocated again. The +prototype for this function is in `stdlib.h'. + + - Function: void free (void *PTR) + The `free' function deallocates the block of memory pointed at by + PTR. + + - Function: void cfree (void *PTR) + This function does the same thing as `free'. It's provided for + backward compatibility with SunOS; you should use `free' instead. + + Freeing a block alters the contents of the block. *Do not expect to +find any data (such as a pointer to the next block in a chain of +blocks) in the block after freeing it.* Copy whatever you need out of +the block before freeing it! Here is an example of the proper way to +free all the blocks in a chain, and the strings that they point to: + + struct chain + { + struct chain *next; + char *name; + } + + void + free_chain (struct chain *chain) + { + while (chain != 0) + { + struct chain *next = chain->next; + free (chain->name); + free (chain); + chain = next; + } + } + + Occasionally, `free' can actually return memory to the operating +system and make the process smaller. Usually, all it can do is allow a +later call to `malloc' to reuse the space. In the meantime, the space +remains in your program as part of a free-list used internally by +`malloc'. + + There is no point in freeing blocks at the end of a program, because +all of the program's space is given back to the system when the process +terminates. + + +File: libc.info, Node: Changing Block Size, Next: Allocating Cleared Space, Prev: Freeing after Malloc, Up: Unconstrained Allocation + +Changing the Size of a Block +............................ + + Often you do not know for certain how big a block you will +ultimately need at the time you must begin to use the block. For +example, the block might be a buffer that you use to hold a line being +read from a file; no matter how long you make the buffer initially, you +may encounter a line that is longer. + + You can make the block longer by calling `realloc'. This function +is declared in `stdlib.h'. + + - Function: void * realloc (void *PTR, size_t NEWSIZE) + The `realloc' function changes the size of the block whose address + is PTR to be NEWSIZE. + + Since the space after the end of the block may be in use, `realloc' + may find it necessary to copy the block to a new address where + more free space is available. The value of `realloc' is the new + address of the block. If the block needs to be moved, `realloc' + copies the old contents. + + If you pass a null pointer for PTR, `realloc' behaves just like + `malloc (NEWSIZE)'. This can be convenient, but beware that older + implementations (before ISO C) may not support this behavior, and + will probably crash when `realloc' is passed a null pointer. + + Like `malloc', `realloc' may return a null pointer if no memory +space is available to make the block bigger. When this happens, the +original block is untouched; it has not been modified or relocated. + + In most cases it makes no difference what happens to the original +block when `realloc' fails, because the application program cannot +continue when it is out of memory, and the only thing to do is to give +a fatal error message. Often it is convenient to write and use a +subroutine, conventionally called `xrealloc', that takes care of the +error message as `xmalloc' does for `malloc': + + void * + xrealloc (void *ptr, size_t size) + { + register void *value = realloc (ptr, size); + if (value == 0) + fatal ("Virtual memory exhausted"); + return value; + } + + You can also use `realloc' to make a block smaller. The reason you +would do this is to avoid tying up a lot of memory space when only a +little is needed. In several allocation implementations, making a +block smaller sometimes necessitates copying it, so it can fail if no +other space is available. + + If the new size you specify is the same as the old size, `realloc' +is guaranteed to change nothing and return the same address that you +gave. + + +File: libc.info, Node: Allocating Cleared Space, Next: Efficiency and Malloc, Prev: Changing Block Size, Up: Unconstrained Allocation + +Allocating Cleared Space +........................ + + The function `calloc' allocates memory and clears it to zero. It is +declared in `stdlib.h'. + + - Function: void * calloc (size_t COUNT, size_t ELTSIZE) + This function allocates a block long enough to contain a vector of + COUNT elements, each of size ELTSIZE. Its contents are cleared to + zero before `calloc' returns. + + You could define `calloc' as follows: + + void * + calloc (size_t count, size_t eltsize) + { + size_t size = count * eltsize; + void *value = malloc (size); + if (value != 0) + memset (value, 0, size); + return value; + } + + But in general, it is not guaranteed that `calloc' calls `malloc' +internally. Therefore, if an application provides its own +`malloc'/`realloc'/`free' outside the C library, it should always +define `calloc', too. + + +File: libc.info, Node: Efficiency and Malloc, Next: Aligned Memory Blocks, Prev: Allocating Cleared Space, Up: Unconstrained Allocation + +Efficiency Considerations for `malloc' +...................................... + + As opposed to other versions, the `malloc' in the GNU C Library does +not round up block sizes to powers of two, neither for large nor for +small sizes. Neighboring chunks can be coalesced on a `free' no matter +what their size is. This makes the implementation suitable for all +kinds of allocation patterns without generally incurring high memory +waste through fragmentation. + + Very large blocks (much larger than a page) are allocated with +`mmap' (anonymous or via `/dev/zero') by this implementation. This has +the great advantage that these chunks are returned to the system +immediately when they are freed. Therefore, it cannot happen that a +large chunk becomes "locked" in between smaller ones and even after +calling `free' wastes memory. The size threshold for `mmap' to be used +can be adjusted with `mallopt'. The use of `mmap' can also be disabled +completely. + + +File: libc.info, Node: Aligned Memory Blocks, Next: Malloc Tunable Parameters, Prev: Efficiency and Malloc, Up: Unconstrained Allocation + +Allocating Aligned Memory Blocks +................................ + + The address of a block returned by `malloc' or `realloc' in the GNU +system is always a multiple of eight (or sixteen on 64-bit systems). +If you need a block whose address is a multiple of a higher power of +two than that, use `memalign', `posix_memalign', or `valloc'. These +functions are declared in `stdlib.h'. + + With the GNU library, you can use `free' to free the blocks that +`memalign', `posix_memalign', and `valloc' return. That does not work +in BSD, however--BSD does not provide any way to free such blocks. + + - Function: void * memalign (size_t BOUNDARY, size_t SIZE) + The `memalign' function allocates a block of SIZE bytes whose + address is a multiple of BOUNDARY. The BOUNDARY must be a power + of two! The function `memalign' works by allocating a somewhat + larger block, and then returning an address within the block that + is on the specified boundary. + + - Function: int posix_memalign (void **MEMPTR, size_t ALIGNMENT, + size_t SIZE) + The `posix_memalign' function is similar to the `memalign' + function in that it returns a buffer of SIZE bytes aligned to a + multiple of ALIGNMENT. But it adds one requirement to the + parameter ALIGNMENT: the value must be a power of two multiple of + `sizeof (void *)'. + + If the function succeeds in allocation memory a pointer to the + allocated memory is returned in `*MEMPTR' and the return value is + zero. Otherwise the function returns an error value indicating + the problem. + + This function was introduced in POSIX 1003.1d. + + - Function: void * valloc (size_t SIZE) + Using `valloc' is like using `memalign' and passing the page size + as the value of the second argument. It is implemented like this: + + void * + valloc (size_t size) + { + return memalign (getpagesize (), size); + } + + *Note Query Memory Parameters:: for more information about the + memory subsystem. + + File: libc.info, Node: Malloc Tunable Parameters, Next: Heap Consistency Checking, Prev: Aligned Memory Blocks, Up: Unconstrained Allocation Malloc Tunable Parameters @@ -986,259 +1203,4 @@ precaution of avoiding side effects in t If you use the GNU C compiler, this precaution is not necessary, because various language extensions in GNU C permit defining the macros so as to compute each argument only once. - - -File: libc.info, Node: Growing Objects, Next: Extra Fast Growing, Prev: Obstack Functions, Up: Obstacks - -Growing Objects -............... - - Because memory in obstack chunks is used sequentially, it is -possible to build up an object step by step, adding one or more bytes -at a time to the end of the object. With this technique, you do not -need to know how much data you will put in the object until you come to -the end of it. We call this the technique of "growing objects". The -special functions for adding data to the growing object are described -in this section. - - You don't need to do anything special when you start to grow an -object. Using one of the functions to add data to the object -automatically starts it. However, it is necessary to say explicitly -when the object is finished. This is done with the function -`obstack_finish'. - - The actual address of the object thus built up is not known until the -object is finished. Until then, it always remains possible that you -will add so much data that the object must be copied into a new chunk. - - While the obstack is in use for a growing object, you cannot use it -for ordinary allocation of another object. If you try to do so, the -space already added to the growing object will become part of the other -object. - - - Function: void obstack_blank (struct obstack *OBSTACK-PTR, int SIZE) - The most basic function for adding to a growing object is - `obstack_blank', which adds space without initializing it. - - - Function: void obstack_grow (struct obstack *OBSTACK-PTR, void - *DATA, int SIZE) - To add a block of initialized space, use `obstack_grow', which is - the growing-object analogue of `obstack_copy'. It adds SIZE bytes - of data to the growing object, copying the contents from DATA. - - - Function: void obstack_grow0 (struct obstack *OBSTACK-PTR, void - *DATA, int SIZE) - This is the growing-object analogue of `obstack_copy0'. It adds - SIZE bytes copied from DATA, followed by an additional null - character. - - - Function: void obstack_1grow (struct obstack *OBSTACK-PTR, char C) - To add one character at a time, use the function `obstack_1grow'. - It adds a single byte containing C to the growing object. - - - Function: void obstack_ptr_grow (struct obstack *OBSTACK-PTR, void - *DATA) - Adding the value of a pointer one can use the function - `obstack_ptr_grow'. It adds `sizeof (void *)' bytes containing - the value of DATA. - - - Function: void obstack_int_grow (struct obstack *OBSTACK-PTR, int - DATA) - A single value of type `int' can be added by using the - `obstack_int_grow' function. It adds `sizeof (int)' bytes to the - growing object and initializes them with the value of DATA. - - - Function: void * obstack_finish (struct obstack *OBSTACK-PTR) - When you are finished growing the object, use the function - `obstack_finish' to close it off and return its final address. - - Once you have finished the object, the obstack is available for - ordinary allocation or for growing another object. - - This function can return a null pointer under the same conditions - as `obstack_alloc' (*note Allocation in an Obstack::). - - When you build an object by growing it, you will probably need to -know afterward how long it became. You need not keep track of this as -you grow the object, because you can find out the length from the -obstack just before finishing the object with the function -`obstack_object_size', declared as follows: - - - Function: int obstack_object_size (struct obstack *OBSTACK-PTR) - This function returns the current size of the growing object, in - bytes. Remember to call this function _before_ finishing the - object. After it is finished, `obstack_object_size' will return - zero. - - If you have started growing an object and wish to cancel it, you -should finish it and then free it, like this: - - obstack_free (obstack_ptr, obstack_finish (obstack_ptr)); - -This has no effect if no object was growing. - - You can use `obstack_blank' with a negative size argument to make -the current object smaller. Just don't try to shrink it beyond zero -length--there's no telling what will happen if you do that. - - -File: libc.info, Node: Extra Fast Growing, Next: Status of an Obstack, Prev: Growing Objects, Up: Obstacks - -Extra Fast Growing Objects -.......................... - - The usual functions for growing objects incur overhead for checking -whether there is room for the new growth in the current chunk. If you -are frequently constructing objects in small steps of growth, this -overhead can be significant. - - You can reduce the overhead by using special "fast growth" functions -that grow the object without checking. In order to have a robust -program, you must do the checking yourself. If you do this checking in -the simplest way each time you are about to add data to the object, you -have not saved anything, because that is what the ordinary growth -functions do. But if you can arrange to check less often, or check -more efficiently, then you make the program faster. - - The function `obstack_room' returns the amount of room available in -the current chunk. It is declared as follows: - - - Function: int obstack_room (struct obstack *OBSTACK-PTR) - This returns the number of bytes that can be added safely to the - current growing object (or to an object about to be started) in - obstack OBSTACK using the fast growth functions. - - While you know there is room, you can use these fast growth functions -for adding data to a growing object: - - - Function: void obstack_1grow_fast (struct obstack *OBSTACK-PTR, char - C) - The function `obstack_1grow_fast' adds one byte containing the - character C to the growing object in obstack OBSTACK-PTR. - - - Function: void obstack_ptr_grow_fast (struct obstack *OBSTACK-PTR, - void *DATA) - The function `obstack_ptr_grow_fast' adds `sizeof (void *)' bytes - containing the value of DATA to the growing object in obstack - OBSTACK-PTR. - - - Function: void obstack_int_grow_fast (struct obstack *OBSTACK-PTR, - int DATA) - The function `obstack_int_grow_fast' adds `sizeof (int)' bytes - containing the value of DATA to the growing object in obstack - OBSTACK-PTR. - - - Function: void obstack_blank_fast (struct obstack *OBSTACK-PTR, int - SIZE) - The function `obstack_blank_fast' adds SIZE bytes to the growing - object in obstack OBSTACK-PTR without initializing them. - - When you check for space using `obstack_room' and there is not -enough room for what you want to add, the fast growth functions are not -safe. In this case, simply use the corresponding ordinary growth -function instead. Very soon this will copy the object to a new chunk; -then there will be lots of room available again. - - So, each time you use an ordinary growth function, check afterward -for sufficient space using `obstack_room'. Once the object is copied -to a new chunk, there will be plenty of space again, so the program will -start using the fast growth functions again. - - Here is an example: - - void - add_string (struct obstack *obstack, const char *ptr, int len) - { - while (len > 0) - { - int room = obstack_room (obstack); - if (room == 0) - { - /* Not enough room. Add one character slowly, - which may copy to a new chunk and make room. */ - obstack_1grow (obstack, *ptr++); - len--; - } - else - { - if (room > len) - room = len; - /* Add fast as much as we have room for. */ - len -= room; - while (room-- > 0) - obstack_1grow_fast (obstack, *ptr++); - } - } - } - - -File: libc.info, Node: Status of an Obstack, Next: Obstacks Data Alignment, Prev: Extra Fast Growing, Up: Obstacks - -Status of an Obstack -.................... - - Here are functions that provide information on the current status of -allocation in an obstack. You can use them to learn about an object -while still growing it. - - - Function: void * obstack_base (struct obstack *OBSTACK-PTR) - This function returns the tentative address of the beginning of the - currently growing object in OBSTACK-PTR. If you finish the object - immediately, it will have that address. If you make it larger - first, it may outgrow the current chunk--then its address will - change! - - If no object is growing, this value says where the next object you - allocate will start (once again assuming it fits in the current - chunk). - - - Function: void * obstack_next_free (struct obstack *OBSTACK-PTR) - This function returns the address of the first free byte in the - current chunk of obstack OBSTACK-PTR. This is the end of the - currently growing object. If no object is growing, - `obstack_next_free' returns the same value as `obstack_base'. - - - Function: int obstack_object_size (struct obstack *OBSTACK-PTR) - This function returns the size in bytes of the currently growing - object. This is equivalent to - - obstack_next_free (OBSTACK-PTR) - obstack_base (OBSTACK-PTR) - - -File: libc.info, Node: Obstacks Data Alignment, Next: Obstack Chunks, Prev: Status of an Obstack, Up: Obstacks - -Alignment of Data in Obstacks -............................. - - Each obstack has an "alignment boundary"; each object allocated in -the obstack automatically starts on an address that is a multiple of the -specified boundary. By default, this boundary is 4 bytes. - - To access an obstack's alignment boundary, use the macro -`obstack_alignment_mask', whose function prototype looks like this: - - - Macro: int obstack_alignment_mask (struct obstack *OBSTACK-PTR) - The value is a bit mask; a bit that is 1 indicates that the - corresponding bit in the address of an object should be 0. The - mask value should be one less than a power of 2; the effect is - that all object addresses are multiples of that power of 2. The - default value of the mask is 3, so that addresses are multiples of - 4. A mask value of 0 means an object can start on any multiple of - 1 (that is, no alignment is required). - - The expansion of the macro `obstack_alignment_mask' is an lvalue, - so you can alter the mask by assignment. For example, this - statement: - - obstack_alignment_mask (obstack_ptr) = 0; - - has the effect of turning off alignment processing in the - specified obstack. - - Note that a change in alignment mask does not take effect until -_after_ the next time an object is allocated or finished in the -obstack. If you are not growing an object, you can make the new -alignment mask take effect immediately by calling `obstack_finish'. -This will finish a zero-length object and then do proper alignment for -the next object. diff -durpN glibc-2.2.4/manual/libc.info-40 glibc-2.2.5/manual/libc.info-40 --- glibc-2.2.4/manual/libc.info-40 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-40 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1220 +33,1154 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Remembering a Signal, Prev: Checking for Pending Signals, Up: Blocking Signals - -Remembering a Signal to Act On Later ------------------------------------- - - Instead of blocking a signal using the library facilities, you can -get almost the same results by making the handler set a flag to be -tested later, when you "unblock". Here is an example: - - /* If this flag is nonzero, don't handle the signal right away. */ - volatile sig_atomic_t signal_pending; - - /* This is nonzero if a signal arrived and was not handled. */ - volatile sig_atomic_t defer_signal; - - void - handler (int signum) - { - if (defer_signal) - signal_pending = signum; - else - ... /* "Really" handle the signal. */ - } - - ... - - void - update_mumble (int frob) - { - /* Prevent signals from having immediate effect. */ - defer_signal++; - /* Now update `mumble', without worrying about interruption. */ - mumble.a = 1; - mumble.b = hack (); - mumble.c = frob; - /* We have updated `mumble'. Handle any signal that came in. */ - defer_signal--; - if (defer_signal == 0 && signal_pending != 0) - raise (signal_pending); - } - - Note how the particular signal that arrives is stored in -`signal_pending'. That way, we can handle several types of -inconvenient signals with the same mechanism. - - We increment and decrement `defer_signal' so that nested critical -sections will work properly; thus, if `update_mumble' were called with -`signal_pending' already nonzero, signals would be deferred not only -within `update_mumble', but also within the caller. This is also why -we do not check `signal_pending' if `defer_signal' is still nonzero. - - The incrementing and decrementing of `defer_signal' each require more -than one instruction; it is possible for a signal to happen in the -middle. But that does not cause any problem. If the signal happens -early enough to see the value from before the increment or decrement, -that is equivalent to a signal which came before the beginning of the -increment or decrement, which is a case that works properly. - - It is absolutely vital to decrement `defer_signal' before testing -`signal_pending', because this avoids a subtle bug. If we did these -things in the other order, like this, - - if (defer_signal == 1 && signal_pending != 0) - raise (signal_pending); - defer_signal--; - -then a signal arriving in between the `if' statement and the decrement -would be effectively "lost" for an indefinite amount of time. The -handler would merely set `defer_signal', but the program having already -tested this variable, it would not test the variable again. - - Bugs like these are called "timing errors". They are especially bad -because they happen only rarely and are nearly impossible to reproduce. -You can't expect to find them with a debugger as you would find a -reproducible bug. So it is worth being especially careful to avoid -them. +File: libc.info, Node: Signals in Handler, Next: Merged Signals, Prev: Longjmp in Handler, Up: Defining Handlers - (You would not be tempted to write the code in this order, given the -use of `defer_signal' as a counter which must be tested along with -`signal_pending'. After all, testing for zero is cleaner than testing -for one. But if you did not use `defer_signal' as a counter, and gave -it values of zero and one only, then either order might seem equally -simple. This is a further advantage of using a counter for -`defer_signal': it will reduce the chance you will write the code in -the wrong order and create a subtle bug.) +Signals Arriving While a Handler Runs +------------------------------------- - -File: libc.info, Node: Waiting for a Signal, Next: Signal Stack, Prev: Blocking Signals, Up: Signal Handling + What happens if another signal arrives while your signal handler +function is running? -Waiting for a Signal -==================== + When the handler for a particular signal is invoked, that signal is +automatically blocked until the handler returns. That means that if two +signals of the same kind arrive close together, the second one will be +held until the first has been handled. (The handler can explicitly +unblock the signal using `sigprocmask', if you want to allow more +signals of this type to arrive; see *Note Process Signal Mask::.) - If your program is driven by external events, or uses signals for -synchronization, then when it has nothing to do it should probably wait -until a signal arrives. + However, your handler can still be interrupted by delivery of another +kind of signal. To avoid this, you can use the `sa_mask' member of the +action structure passed to `sigaction' to explicitly specify which +signals should be blocked while the signal handler runs. These signals +are in addition to the signal for which the handler was invoked, and +any other signals that are normally blocked by the process. *Note +Blocking for Handler::. -* Menu: + When the handler returns, the set of blocked signals is restored to +the value it had before the handler ran. So using `sigprocmask' inside +the handler only affects what signals can arrive during the execution of +the handler itself, not what signals can arrive once the handler +returns. -* Using Pause:: The simple way, using `pause'. -* Pause Problems:: Why the simple way is often not very good. -* Sigsuspend:: Reliably waiting for a specific signal. + *Portability Note:* Always use `sigaction' to establish a handler +for a signal that you expect to receive asynchronously, if you want +your program to work properly on System V Unix. On this system, the +handling of a signal whose handler was established with `signal' +automatically sets the signal's action back to `SIG_DFL', and the +handler must re-establish itself each time it runs. This practice, +while inconvenient, does work when signals cannot arrive in succession. +However, if another signal can arrive right away, it may arrive before +the handler can re-establish itself. Then the second signal would +receive the default handling, which could terminate the process.  -File: libc.info, Node: Using Pause, Next: Pause Problems, Up: Waiting for a Signal - -Using `pause' -------------- +File: libc.info, Node: Merged Signals, Next: Nonreentrancy, Prev: Signals in Handler, Up: Defining Handlers - The simple way to wait until a signal arrives is to call `pause'. -Please read about its disadvantages, in the following section, before -you use it. +Signals Close Together Merge into One +------------------------------------- - - Function: int pause () - The `pause' function suspends program execution until a signal - arrives whose action is either to execute a handler function, or to - terminate the process. + If multiple signals of the same type are delivered to your process +before your signal handler has a chance to be invoked at all, the +handler may only be invoked once, as if only a single signal had +arrived. In effect, the signals merge into one. This situation can +arise when the signal is blocked, or in a multiprocessing environment +where the system is busy running some other processes while the signals +are delivered. This means, for example, that you cannot reliably use a +signal handler to count signals. The only distinction you can reliably +make is whether at least one signal has arrived since a given time in +the past. - If the signal causes a handler function to be executed, then - `pause' returns. This is considered an unsuccessful return (since - "successful" behavior would be to suspend the program forever), so - the return value is `-1'. Even if you specify that other - primitives should resume when a system handler returns (*note - Interrupted Primitives::), this has no effect on `pause'; it - always fails when a signal is handled. + Here is an example of a handler for `SIGCHLD' that compensates for +the fact that the number of signals received may not equal the number of +child processes that generate them. It assumes that the program keeps +track of all the child processes with a chain of structures as follows: - The following `errno' error conditions are defined for this - function: + struct process + { + struct process *next; + /* The process ID of this child. */ + int pid; + /* The descriptor of the pipe or pseudo terminal + on which output comes from this child. */ + int input_descriptor; + /* Nonzero if this process has stopped or terminated. */ + sig_atomic_t have_status; + /* The status of this child; 0 if running, + otherwise a status value from `waitpid'. */ + int status; + }; + + struct process *process_list; - `EINTR' - The function was interrupted by delivery of a signal. + This example also uses a flag to indicate whether signals have +arrived since some time in the past--whenever the program last cleared +it to zero. - If the signal causes program termination, `pause' doesn't return - (obviously). + /* Nonzero means some child's status has changed + so look at `process_list' for the details. */ + int process_status_change; - This function is a cancellation point in multithreaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `pause' is called. If the thread gets cancelled these resources - stay allocated until the program ends. To avoid this calls to - `pause' should be protected using cancellation handlers. + Here is the handler itself: - The `pause' function is declared in `unistd.h'. + void + sigchld_handler (int signo) + { + int old_errno = errno; + + while (1) { + register int pid; + int w; + struct process *p; + + /* Keep asking for a status until we get a definitive result. */ + do + { + errno = 0; + pid = waitpid (WAIT_ANY, &w, WNOHANG | WUNTRACED); + } + while (pid <= 0 && errno == EINTR); + + if (pid <= 0) { + /* A real failure means there are no more + stopped or terminated child processes, so return. */ + errno = old_errno; + return; + } + + /* Find the process that signaled us, and record its status. */ + + for (p = process_list; p; p = p->next) + if (p->pid == pid) { + p->status = w; + /* Indicate that the `status' field + has data to look at. We do this only after storing it. */ + p->have_status = 1; + + /* If process has terminated, stop waiting for its output. */ + if (WIFSIGNALED (w) || WIFEXITED (w)) + if (p->input_descriptor) + FD_CLR (p->input_descriptor, &input_wait_mask); + + /* The program should check this flag from time to time + to see if there is any news in `process_list'. */ + ++process_status_change; + } + + /* Loop around to handle all the processes + that have something to tell us. */ + } + } - -File: libc.info, Node: Pause Problems, Next: Sigsuspend, Prev: Using Pause, Up: Waiting for a Signal + Here is the proper way to check the flag `process_status_change': -Problems with `pause' ---------------------- + if (process_status_change) { + struct process *p; + process_status_change = 0; + for (p = process_list; p; p = p->next) + if (p->have_status) { + ... Examine `p->status' ... + } + } - The simplicity of `pause' can conceal serious timing errors that can -make a program hang mysteriously. +It is vital to clear the flag before examining the list; otherwise, if a +signal were delivered just before the clearing of the flag, and after +the appropriate element of the process list had been checked, the status +change would go unnoticed until the next signal arrived to set the flag +again. You could, of course, avoid this problem by blocking the signal +while scanning the list, but it is much more elegant to guarantee +correctness by doing things in the right order. - It is safe to use `pause' if the real work of your program is done -by the signal handlers themselves, and the "main program" does nothing -but call `pause'. Each time a signal is delivered, the handler will do -the next batch of work that is to be done, and then return, so that the -main loop of the program can call `pause' again. + The loop which checks process status avoids examining `p->status' +until it sees that status has been validly stored. This is to make sure +that the status cannot change in the middle of accessing it. Once +`p->have_status' is set, it means that the child process is stopped or +terminated, and in either case, it cannot stop or terminate again until +the program has taken notice. *Note Atomic Usage::, for more +information about coping with interruptions during accesses of a +variable. - You can't safely use `pause' to wait until one more signal arrives, -and then resume real work. Even if you arrange for the signal handler -to cooperate by setting a flag, you still can't use `pause' reliably. -Here is an example of this problem: + Here is another way you can test whether the handler has run since +the last time you checked. This technique uses a counter which is never +changed outside the handler. Instead of clearing the count, the program +remembers the previous value and sees whether it has changed since the +previous check. The advantage of this method is that different parts of +the program can check independently, each part checking whether there +has been a signal since that part last checked. - /* `usr_interrupt' is set by the signal handler. */ - if (!usr_interrupt) - pause (); + sig_atomic_t process_status_change; - /* Do work once the signal arrives. */ - ... - -This has a bug: the signal could arrive after the variable -`usr_interrupt' is checked, but before the call to `pause'. If no -further signals arrive, the process would never wake up again. - - You can put an upper limit on the excess waiting by using `sleep' in -a loop, instead of using `pause'. (*Note Sleeping::, for more about -`sleep'.) Here is what this looks like: - - /* `usr_interrupt' is set by the signal handler. - while (!usr_interrupt) - sleep (1); + sig_atomic_t last_process_status_change; - /* Do work once the signal arrives. */ ... - - For some purposes, that is good enough. But with a little more -complexity, you can wait reliably until a particular signal handler is -run, using `sigsuspend'. *Note Sigsuspend::. + { + sig_atomic_t prev = last_process_status_change; + last_process_status_change = process_status_change; + if (last_process_status_change != prev) { + struct process *p; + for (p = process_list; p; p = p->next) + if (p->have_status) { + ... Examine `p->status' ... + } + } + }  -File: libc.info, Node: Sigsuspend, Prev: Pause Problems, Up: Waiting for a Signal - -Using `sigsuspend' ------------------- - - The clean and reliable way to wait for a signal to arrive is to -block it and then use `sigsuspend'. By using `sigsuspend' in a loop, -you can wait for certain kinds of signals, while letting other kinds of -signals be handled by their handlers. - - - Function: int sigsuspend (const sigset_t *SET) - This function replaces the process's signal mask with SET and then - suspends the process until a signal is delivered whose action is - either to terminate the process or invoke a signal handling - function. In other words, the program is effectively suspended - until one of the signals that is not a member of SET arrives. - - If the process is woken up by delivery of a signal that invokes a - handler function, and the handler function returns, then - `sigsuspend' also returns. - - The mask remains SET only as long as `sigsuspend' is waiting. The - function `sigsuspend' always restores the previous signal mask - when it returns. +File: libc.info, Node: Nonreentrancy, Next: Atomic Data Access, Prev: Merged Signals, Up: Defining Handlers - The return value and error conditions are the same as for `pause'. +Signal Handling and Nonreentrant Functions +------------------------------------------ - With `sigsuspend', you can replace the `pause' or `sleep' loop in -the previous section with something completely reliable: + Handler functions usually don't do very much. The best practice is +to write a handler that does nothing but set an external variable that +the program checks regularly, and leave all serious work to the program. +This is best because the handler can be called asynchronously, at +unpredictable times--perhaps in the middle of a primitive function, or +even between the beginning and the end of a C operator that requires +multiple instructions. The data structures being manipulated might +therefore be in an inconsistent state when the handler function is +invoked. Even copying one `int' variable into another can take two +instructions on most machines. - sigset_t mask, oldmask; - - ... - - /* Set up the mask of signals to temporarily block. */ - sigemptyset (&mask); - sigaddset (&mask, SIGUSR1); - - ... - - /* Wait for a signal to arrive. */ - sigprocmask (SIG_BLOCK, &mask, &oldmask); - while (!usr_interrupt) - sigsuspend (&oldmask); - sigprocmask (SIG_UNBLOCK, &mask, NULL); + This means you have to be very careful about what you do in a signal +handler. - This last piece of code is a little tricky. The key point to -remember here is that when `sigsuspend' returns, it resets the process's -signal mask to the original value, the value from before the call to -`sigsuspend'--in this case, the `SIGUSR1' signal is once again blocked. -The second call to `sigprocmask' is necessary to explicitly unblock -this signal. + * If your handler needs to access any global variables from your + program, declare those variables `volatile'. This tells the + compiler that the value of the variable might change + asynchronously, and inhibits certain optimizations that would be + invalidated by such modifications. - One other point: you may be wondering why the `while' loop is -necessary at all, since the program is apparently only waiting for one -`SIGUSR1' signal. The answer is that the mask passed to `sigsuspend' -permits the process to be woken up by the delivery of other kinds of -signals, as well--for example, job control signals. If the process is -woken up by a signal that doesn't set `usr_interrupt', it just suspends -itself again until the "right" kind of signal eventually arrives. + * If you call a function in the handler, make sure it is "reentrant" + with respect to signals, or else make sure that the signal cannot + interrupt a call to a related function. - This technique takes a few more lines of preparation, but that is -needed just once for each kind of wait criterion you want to use. The -code that actually waits is just four lines. + A function can be non-reentrant if it uses memory that is not on the +stack. - -File: libc.info, Node: Signal Stack, Next: BSD Signal Handling, Prev: Waiting for a Signal, Up: Signal Handling + * If a function uses a static variable or a global variable, or a + dynamically-allocated object that it finds for itself, then it is + non-reentrant and any two calls to the function can interfere. -Using a Separate Signal Stack -============================= + For example, suppose that the signal handler uses `gethostbyname'. + This function returns its value in a static object, reusing the + same object each time. If the signal happens to arrive during a + call to `gethostbyname', or even after one (while the program is + still using the value), it will clobber the value that the program + asked for. - A signal stack is a special area of memory to be used as the -execution stack during signal handlers. It should be fairly large, to -avoid any danger that it will overflow in turn; the macro `SIGSTKSZ' is -defined to a canonical size for signal stacks. You can use `malloc' to -allocate the space for the stack. Then call `sigaltstack' or -`sigstack' to tell the system to use that space for the signal stack. + However, if the program does not use `gethostbyname' or any other + function that returns information in the same object, or if it + always blocks signals around each use, then you are safe. - You don't need to write signal handlers differently in order to use a -signal stack. Switching from one stack to the other happens -automatically. (Some non-GNU debuggers on some machines may get -confused if you examine a stack trace while a handler that uses the -signal stack is running.) + There are a large number of library functions that return values + in a fixed object, always reusing the same object in this fashion, + and all of them cause the same problem. Function descriptions in + this manual always mention this behavior. - There are two interfaces for telling the system to use a separate -signal stack. `sigstack' is the older interface, which comes from 4.2 -BSD. `sigaltstack' is the newer interface, and comes from 4.4 BSD. -The `sigaltstack' interface has the advantage that it does not require -your program to know which direction the stack grows, which depends on -the specific machine and operating system. + * If a function uses and modifies an object that you supply, then it + is potentially non-reentrant; two calls can interfere if they use + the same object. - - Data Type: stack_t - This structure describes a signal stack. It contains the - following members: + This case arises when you do I/O using streams. Suppose that the + signal handler prints a message with `fprintf'. Suppose that the + program was in the middle of an `fprintf' call using the same + stream when the signal was delivered. Both the signal handler's + message and the program's data could be corrupted, because both + calls operate on the same data structure--the stream itself. - `void *ss_sp' - This points to the base of the signal stack. + However, if you know that the stream that the handler uses cannot + possibly be used by the program at a time when signals can arrive, + then you are safe. It is no problem if the program uses some + other stream. - `size_t ss_size' - This is the size (in bytes) of the signal stack which `ss_sp' - points to. You should set this to however much space you - allocated for the stack. + * On most systems, `malloc' and `free' are not reentrant, because + they use a static data structure which records what memory blocks + are free. As a result, no library functions that allocate or free + memory are reentrant. This includes functions that allocate space + to store a result. - There are two macros defined in `signal.h' that you should - use in calculating this size: + The best way to avoid the need to allocate memory in a handler is + to allocate in advance space for signal handlers to use. - `SIGSTKSZ' - This is the canonical size for a signal stack. It is - judged to be sufficient for normal uses. + The best way to avoid freeing memory in a handler is to flag or + record the objects to be freed, and have the program check from + time to time whether anything is waiting to be freed. But this + must be done with care, because placing an object on a chain is + not atomic, and if it is interrupted by another signal handler + that does the same thing, you could "lose" one of the objects. - `MINSIGSTKSZ' - This is the amount of signal stack space the operating - system needs just to implement signal delivery. The - size of a signal stack *must* be greater than this. + * Any function that modifies `errno' is non-reentrant, but you can + correct for this: in the handler, save the original value of + `errno' and restore it before returning normally. This prevents + errors that occur within the signal handler from being confused + with errors from system calls at the point the program is + interrupted to run the handler. - For most cases, just using `SIGSTKSZ' for `ss_size' is - sufficient. But if you know how much stack space your - program's signal handlers will need, you may want to use - a different size. In this case, you should allocate - `MINSIGSTKSZ' additional bytes for the signal stack and - increase `ss_size' accordingly. + This technique is generally applicable; if you want to call in a + handler a function that modifies a particular object in memory, + you can make this safe by saving and restoring that object. - `int ss_flags' - This field contains the bitwise OR of these flags: + * Merely reading from a memory object is safe provided that you can + deal with any of the values that might appear in the object at a + time when the signal can be delivered. Keep in mind that + assignment to some data types requires more than one instruction, + which means that the handler could run "in the middle of" an + assignment to the variable if its type is not atomic. *Note + Atomic Data Access::. - `SS_DISABLE' - This tells the system that it should not use the signal - stack. + * Merely writing into a memory object is safe as long as a sudden + change in the value, at any time when the handler might run, will + not disturb anything. - `SS_ONSTACK' - This is set by the system, and indicates that the signal - stack is currently in use. If this bit is not set, then - signals will be delivered on the normal user stack. + +File: libc.info, Node: Atomic Data Access, Prev: Nonreentrancy, Up: Defining Handlers - - Function: int sigaltstack (const stack_t *restrict STACK, stack_t - *restrict OLDSTACK) - The `sigaltstack' function specifies an alternate stack for use - during signal handling. When a signal is received by the process - and its action indicates that the signal stack is used, the system - arranges a switch to the currently installed signal stack while - the handler for that signal is executed. +Atomic Data Access and Signal Handling +-------------------------------------- - If OLDSTACK is not a null pointer, information about the currently - installed signal stack is returned in the location it points to. - If STACK is not a null pointer, then this is installed as the new - stack for use by signal handlers. + Whether the data in your application concerns atoms, or mere text, +you have to be careful about the fact that access to a single datum is +not necessarily "atomic". This means that it can take more than one +instruction to read or write a single object. In such cases, a signal +handler might be invoked in the middle of reading or writing the object. - The return value is `0' on success and `-1' on failure. If - `sigaltstack' fails, it sets `errno' to one of these values: + There are three ways you can cope with this problem. You can use +data types that are always accessed atomically; you can carefully +arrange that nothing untoward happens if an access is interrupted, or +you can block all signals around any access that had better not be +interrupted (*note Blocking Signals::). - `EINVAL' - You tried to disable a stack that was in fact currently in - use. +* Menu: - `ENOMEM' - The size of the alternate stack was too small. It must be - greater than `MINSIGSTKSZ'. +* Non-atomic Example:: A program illustrating interrupted access. +* Types: Atomic Types. Data types that guarantee no interruption. +* Usage: Atomic Usage. Proving that interruption is harmless. - Here is the older `sigstack' interface. You should use -`sigaltstack' instead on systems that have it. + +File: libc.info, Node: Non-atomic Example, Next: Atomic Types, Up: Atomic Data Access - - Data Type: struct sigstack - This structure describes a signal stack. It contains the - following members: +Problems with Non-Atomic Access +............................... - `void *ss_sp' - This is the stack pointer. If the stack grows downwards on - your machine, this should point to the top of the area you - allocated. If the stack grows upwards, it should point to - the bottom. + Here is an example which shows what can happen if a signal handler +runs in the middle of modifying a variable. (Interrupting the reading +of a variable can also lead to paradoxical results, but here we only +show writing.) - `int ss_onstack' - This field is true if the process is currently using this - stack. + #include + #include + + struct two_words { int a, b; } memory; + + void + handler(int signum) + { + printf ("%d,%d\n", memory.a, memory.b); + alarm (1); + } + + int + main (void) + { + static struct two_words zeros = { 0, 0 }, ones = { 1, 1 }; + signal (SIGALRM, handler); + memory = zeros; + alarm (1); + while (1) + { + memory = zeros; + memory = ones; + } + } - - Function: int sigstack (const struct sigstack *STACK, struct - sigstack *OLDSTACK) - The `sigstack' function specifies an alternate stack for use during - signal handling. When a signal is received by the process and its - action indicates that the signal stack is used, the system - arranges a switch to the currently installed signal stack while - the handler for that signal is executed. + This program fills `memory' with zeros, ones, zeros, ones, +alternating forever; meanwhile, once per second, the alarm signal +handler prints the current contents. (Calling `printf' in the handler +is safe in this program because it is certainly not being called outside +the handler when the signal happens.) - If OLDSTACK is not a null pointer, information about the currently - installed signal stack is returned in the location it points to. - If STACK is not a null pointer, then this is installed as the new - stack for use by signal handlers. + Clearly, this program can print a pair of zeros or a pair of ones. +But that's not all it can do! On most machines, it takes several +instructions to store a new value in `memory', and the value is stored +one word at a time. If the signal is delivered in between these +instructions, the handler might find that `memory.a' is zero and +`memory.b' is one (or vice versa). - The return value is `0' on success and `-1' on failure. + On some machines it may be possible to store a new value in `memory' +with just one instruction that cannot be interrupted. On these +machines, the handler will always print two zeros or two ones.  -File: libc.info, Node: BSD Signal Handling, Prev: Signal Stack, Up: Signal Handling - -BSD Signal Handling -=================== - - This section describes alternative signal handling functions derived -from BSD Unix. These facilities were an advance, in their time; today, -they are mostly obsolete, and supported mainly for compatibility with -BSD Unix. - - There are many similarities between the BSD and POSIX signal handling -facilities, because the POSIX facilities were inspired by the BSD -facilities. Besides having different names for all the functions to -avoid conflicts, the main differences between the two are: +File: libc.info, Node: Atomic Types, Next: Atomic Usage, Prev: Non-atomic Example, Up: Atomic Data Access - * BSD Unix represents signal masks as an `int' bit mask, rather than - as a `sigset_t' object. +Atomic Types +............ - * The BSD facilities use a different default for whether an - interrupted primitive should fail or resume. The POSIX facilities - make system calls fail unless you specify that they should resume. - With the BSD facility, the default is to make system calls resume - unless you say they should fail. *Note Interrupted Primitives::. + To avoid uncertainty about interrupting access to a variable, you can +use a particular data type for which access is always atomic: +`sig_atomic_t'. Reading and writing this data type is guaranteed to +happen in a single instruction, so there's no way for a handler to run +"in the middle" of an access. - The BSD facilities are declared in `signal.h'. + The type `sig_atomic_t' is always an integer data type, but which +one it is, and how many bits it contains, may vary from machine to +machine. -* Menu: + - Data Type: sig_atomic_t + This is an integer data type. Objects of this type are always + accessed atomically. -* BSD Handler:: BSD Function to Establish a Handler. -* Blocking in BSD:: BSD Functions for Blocking Signals. + In practice, you can assume that `int' and other integer types no +longer than `int' are atomic. You can also assume that pointer types +are atomic; that is very convenient. Both of these assumptions are +true on all of the machines that the GNU C library supports and on all +POSIX systems we know of.  -File: libc.info, Node: BSD Handler, Next: Blocking in BSD, Up: BSD Signal Handling +File: libc.info, Node: Atomic Usage, Prev: Atomic Types, Up: Atomic Data Access -BSD Function to Establish a Handler ------------------------------------ +Atomic Usage Patterns +..................... - - Data Type: struct sigvec - This data type is the BSD equivalent of `struct sigaction' (*note - Advanced Signal Handling::); it is used to specify signal actions - to the `sigvec' function. It contains the following members: + Certain patterns of access avoid any problem even if an access is +interrupted. For example, a flag which is set by the handler, and +tested and cleared by the main program from time to time, is always safe +even if access actually requires two instructions. To show that this is +so, we must consider each access that could be interrupted, and show +that there is no problem if it is interrupted. - `sighandler_t sv_handler' - This is the handler function. + An interrupt in the middle of testing the flag is safe because +either it's recognized to be nonzero, in which case the precise value +doesn't matter, or it will be seen to be nonzero the next time it's +tested. - `int sv_mask' - This is the mask of additional signals to be blocked while - the handler function is being called. + An interrupt in the middle of clearing the flag is no problem because +either the value ends up zero, which is what happens if a signal comes +in just before the flag is cleared, or the value ends up nonzero, and +subsequent events occur as if the signal had come in just after the flag +was cleared. As long as the code handles both of these cases properly, +it can also handle a signal in the middle of clearing the flag. (This +is an example of the sort of reasoning you need to do to figure out +whether non-atomic usage is safe.) - `int sv_flags' - This is a bit mask used to specify various flags which affect - the behavior of the signal. You can also refer to this field - as `sv_onstack'. + Sometimes you can insure uninterrupted access to one object by +protecting its use with another object, perhaps one whose type +guarantees atomicity. *Note Merged Signals::, for an example. - These symbolic constants can be used to provide values for the -`sv_flags' field of a `sigvec' structure. This field is a bit mask -value, so you bitwise-OR the flags of interest to you together. + +File: libc.info, Node: Interrupted Primitives, Next: Generating Signals, Prev: Defining Handlers, Up: Signal Handling - - Macro: int SV_ONSTACK - If this bit is set in the `sv_flags' field of a `sigvec' - structure, it means to use the signal stack when delivering the - signal. +Primitives Interrupted by Signals +================================= - - Macro: int SV_INTERRUPT - If this bit is set in the `sv_flags' field of a `sigvec' - structure, it means that system calls interrupted by this kind of - signal should not be restarted if the handler returns; instead, - the system calls should return with a `EINTR' error status. *Note - Interrupted Primitives::. + A signal can arrive and be handled while an I/O primitive such as +`open' or `read' is waiting for an I/O device. If the signal handler +returns, the system faces the question: what should happen next? - - Macro: int SV_RESETHAND - If this bit is set in the `sv_flags' field of a `sigvec' - structure, it means to reset the action for the signal back to - `SIG_DFL' when the signal is received. + POSIX specifies one approach: make the primitive fail right away. +The error code for this kind of failure is `EINTR'. This is flexible, +but usually inconvenient. Typically, POSIX applications that use signal +handlers must check for `EINTR' after each library function that can +return it, in order to try the call again. Often programmers forget to +check, which is a common source of error. - - Function: int sigvec (int SIGNUM, const struct sigvec *ACTION,struct - sigvec *OLD-ACTION) - This function is the equivalent of `sigaction' (*note Advanced - Signal Handling::); it installs the action ACTION for the signal - SIGNUM, returning information about the previous action in effect - for that signal in OLD-ACTION. + The GNU library provides a convenient way to retry a call after a +temporary failure, with the macro `TEMP_FAILURE_RETRY': - - Function: int siginterrupt (int SIGNUM, int FAILFLAG) - This function specifies which approach to use when certain - primitives are interrupted by handling signal SIGNUM. If FAILFLAG - is false, signal SIGNUM restarts primitives. If FAILFLAG is true, - handling SIGNUM causes these primitives to fail with error code - `EINTR'. *Note Interrupted Primitives::. + - Macro: TEMP_FAILURE_RETRY (EXPRESSION) + This macro evaluates EXPRESSION once. If it fails and reports + error code `EINTR', `TEMP_FAILURE_RETRY' evaluates it again, and + over and over until the result is not a temporary failure. - -File: libc.info, Node: Blocking in BSD, Prev: BSD Handler, Up: BSD Signal Handling + The value returned by `TEMP_FAILURE_RETRY' is whatever value + EXPRESSION produced. -BSD Functions for Blocking Signals ----------------------------------- + BSD avoids `EINTR' entirely and provides a more convenient approach: +to restart the interrupted primitive, instead of making it fail. If +you choose this approach, you need not be concerned with `EINTR'. - - Macro: int sigmask (int SIGNUM) - This macro returns a signal mask that has the bit for signal SIGNUM - set. You can bitwise-OR the results of several calls to `sigmask' - together to specify more than one signal. For example, + You can choose either approach with the GNU library. If you use +`sigaction' to establish a signal handler, you can specify how that +handler should behave. If you specify the `SA_RESTART' flag, return +from that handler will resume a primitive; otherwise, return from that +handler will cause `EINTR'. *Note Flags for Sigaction::. - (sigmask (SIGTSTP) | sigmask (SIGSTOP) - | sigmask (SIGTTIN) | sigmask (SIGTTOU)) + Another way to specify the choice is with the `siginterrupt' +function. *Note BSD Handler::. - specifies a mask that includes all the job-control stop signals. + When you don't specify with `sigaction' or `siginterrupt' what a +particular handler should do, it uses a default choice. The default +choice in the GNU library depends on the feature test macros you have +defined. If you define `_BSD_SOURCE' or `_GNU_SOURCE' before calling +`signal', the default is to resume primitives; otherwise, the default +is to make them fail with `EINTR'. (The library contains alternate +versions of the `signal' function, and the feature test macros +determine which one you really call.) *Note Feature Test Macros::. - - Function: int sigblock (int MASK) - This function is equivalent to `sigprocmask' (*note Process Signal - Mask::) with a HOW argument of `SIG_BLOCK': it adds the signals - specified by MASK to the calling process's set of blocked signals. - The return value is the previous set of blocked signals. + The description of each primitive affected by this issue lists +`EINTR' among the error codes it can return. - - Function: int sigsetmask (int MASK) - This function equivalent to `sigprocmask' (*note Process Signal - Mask::) with a HOW argument of `SIG_SETMASK': it sets the calling - process's signal mask to MASK. The return value is the previous - set of blocked signals. + There is one situation where resumption never happens no matter which +choice you make: when a data-transfer function such as `read' or +`write' is interrupted by a signal after transferring part of the data. +In this case, the function returns the number of bytes already +transferred, indicating partial success. - - Function: int sigpause (int MASK) - This function is the equivalent of `sigsuspend' (*note Waiting for - a Signal::): it sets the calling process's signal mask to MASK, - and waits for a signal to arrive. On return the previous set of - blocked signals is restored. + This might at first appear to cause unreliable behavior on +record-oriented devices (including datagram sockets; *note Datagrams::), +where splitting one `read' or `write' into two would read or write two +records. Actually, there is no problem, because interruption after a +partial transfer cannot happen on such devices; they always transfer an +entire record in one burst, with no waiting once data transfer has +started.  -File: libc.info, Node: Program Basics, Next: Processes, Prev: Signal Handling, Up: Top - -The Basic Program/System Interface -********************************** - - "Processes" are the primitive units for allocation of system -resources. Each process has its own address space and (usually) one -thread of control. A process executes a program; you can have multiple -processes executing the same program, but each process has its own copy -of the program within its own address space and executes it -independently of the other copies. Though it may have multiple threads -of control within the same program and a program may be composed of -multiple logically separate modules, a process always executes exactly -one program. - - Note that we are using a specific definition of "program" for the -purposes of this manual, which corresponds to a common definition in the -context of Unix system. In popular usage, "program" enjoys a much -broader definition; it can refer for example to a system's kernel, an -editor macro, a complex package of software, or a discrete section of -code executing within a process. +File: libc.info, Node: Generating Signals, Next: Blocking Signals, Prev: Interrupted Primitives, Up: Signal Handling - Writing the program is what this manual is all about. This chapter -explains the most basic interface between your program and the system -that runs, or calls, it. This includes passing of parameters (arguments -and environment) from the system, requesting basic services from the -system, and telling the system the program is done. +Generating Signals +================== - A program starts another program with the `exec' family of system -calls. This chapter looks at program startup from the execee's point -of view. To see the event from the execor's point of view, *Note -Executing a File::. + Besides signals that are generated as a result of a hardware trap or +interrupt, your program can explicitly send signals to itself or to +another process. * Menu: -* Program Arguments:: Parsing your program's command-line arguments. -* Environment Variables:: Less direct parameters affecting your program -* System Calls:: Requesting service from the system -* Program Termination:: Telling the system you're done; return status +* Signaling Yourself:: A process can send a signal to itself. +* Signaling Another Process:: Send a signal to another process. +* Permission for kill:: Permission for using `kill'. +* Kill Example:: Using `kill' for Communication.  -File: libc.info, Node: Program Arguments, Next: Environment Variables, Up: Program Basics +File: libc.info, Node: Signaling Yourself, Next: Signaling Another Process, Up: Generating Signals -Program Arguments -================= +Signaling Yourself +------------------ - The system starts a C program by calling the function `main'. It is -up to you to write a function named `main'--otherwise, you won't even -be able to link your program without errors. + A process can send itself a signal with the `raise' function. This +function is declared in `signal.h'. - In ISO C you can define `main' either to take no arguments, or to -take two arguments that represent the command line arguments to the -program, like this: + - Function: int raise (int SIGNUM) + The `raise' function sends the signal SIGNUM to the calling + process. It returns zero if successful and a nonzero value if it + fails. About the only reason for failure would be if the value of + SIGNUM is invalid. - int main (int ARGC, char *ARGV[]) + - Function: int gsignal (int SIGNUM) + The `gsignal' function does the same thing as `raise'; it is + provided only for compatibility with SVID. - The command line arguments are the whitespace-separated tokens given -in the shell command used to invoke the program; thus, in `cat foo -bar', the arguments are `foo' and `bar'. The only way a program can -look at its command line arguments is via the arguments of `main'. If -`main' doesn't take arguments, then you cannot get at the command line. + One convenient use for `raise' is to reproduce the default behavior +of a signal that you have trapped. For instance, suppose a user of your +program types the SUSP character (usually `C-z'; *note Special +Characters::) to send it an interactive stop signal (`SIGTSTP'), and +you want to clean up some internal data buffers before stopping. You +might set this up like this: - The value of the ARGC argument is the number of command line -arguments. The ARGV argument is a vector of C strings; its elements -are the individual command line argument strings. The file name of the -program being run is also included in the vector as the first element; -the value of ARGC counts this element. A null pointer always follows -the last element: `ARGV[ARGC]' is this null pointer. + #include + + /* When a stop signal arrives, set the action back to the default + and then resend the signal after doing cleanup actions. */ + + void + tstp_handler (int sig) + { + signal (SIGTSTP, SIG_DFL); + /* Do cleanup actions here. */ + ... + raise (SIGTSTP); + } + + /* When the process is continued again, restore the signal handler. */ + + void + cont_handler (int sig) + { + signal (SIGCONT, cont_handler); + signal (SIGTSTP, tstp_handler); + } + + /* Enable both handlers during program initialization. */ + + int + main (void) + { + signal (SIGCONT, cont_handler); + signal (SIGTSTP, tstp_handler); + ... + } - For the command `cat foo bar', ARGC is 3 and ARGV has three -elements, `"cat"', `"foo"' and `"bar"'. + *Portability note:* `raise' was invented by the ISO C committee. +Older systems may not support it, so using `kill' may be more portable. +*Note Signaling Another Process::. - In Unix systems you can define `main' a third way, using three -arguments: + +File: libc.info, Node: Signaling Another Process, Next: Permission for kill, Prev: Signaling Yourself, Up: Generating Signals - int main (int ARGC, char *ARGV[], char *ENVP[]) +Signaling Another Process +------------------------- - The first two arguments are just the same. The third argument ENVP -gives the program's environment; it is the same as the value of -`environ'. *Note Environment Variables::. POSIX.1 does not allow this -three-argument form, so to be portable it is best to write `main' to -take two arguments, and use the value of `environ'. + The `kill' function can be used to send a signal to another process. +In spite of its name, it can be used for a lot of things other than +causing a process to terminate. Some examples of situations where you +might want to send signals between processes are: -* Menu: + * A parent process starts a child to perform a task--perhaps having + the child running an infinite loop--and then terminates the child + when the task is no longer needed. -* Argument Syntax:: By convention, options start with a hyphen. -* Parsing Program Arguments:: Ways to parse program options and arguments. + * A process executes as part of a group, and needs to terminate or + notify the other processes in the group when an error or other + event occurs. - -File: libc.info, Node: Argument Syntax, Next: Parsing Program Arguments, Up: Program Arguments + * Two processes need to synchronize while working together. -Program Argument Syntax Conventions ------------------------------------ + This section assumes that you know a little bit about how processes +work. For more information on this subject, see *Note Processes::. - POSIX recommends these conventions for command line arguments. -`getopt' (*note Getopt::) and `argp_parse' (*note Argp::) make it easy -to implement them. + The `kill' function is declared in `signal.h'. - * Arguments are options if they begin with a hyphen delimiter (`-'). + - Function: int kill (pid_t PID, int SIGNUM) + The `kill' function sends the signal SIGNUM to the process or + process group specified by PID. Besides the signals listed in + *Note Standard Signals::, SIGNUM can also have a value of zero to + check the validity of the PID. - * Multiple options may follow a hyphen delimiter in a single token if - the options do not take arguments. Thus, `-abc' is equivalent to - `-a -b -c'. + The PID specifies the process or process group to receive the + signal: - * Option names are single alphanumeric characters (as for `isalnum'; - *note Classification of Characters::). + `PID > 0' + The process whose identifier is PID. - * Certain options require an argument. For example, the `-o' command - of the `ld' command requires an argument--an output file name. + `PID == 0' + All processes in the same process group as the sender. - * An option and its argument may or may not appear as separate - tokens. (In other words, the whitespace separating them is - optional.) Thus, `-o foo' and `-ofoo' are equivalent. + `PID < -1' + The process group whose identifier is -PID. - * Options typically precede other non-option arguments. + `PID == -1' + If the process is privileged, send the signal to all + processes except for some special system processes. + Otherwise, send the signal to all processes with the same + effective user ID. - The implementations of `getopt' and `argp_parse' in the GNU C - library normally make it appear as if all the option arguments were - specified before all the non-option arguments for the purposes of - parsing, even if the user of your program intermixed option and - non-option arguments. They do this by reordering the elements of - the ARGV array. This behavior is nonstandard; if you want to - suppress it, define the `_POSIX_OPTION_ORDER' environment variable. - *Note Standard Environment::. + A process can send a signal to itself with a call like + `kill (getpid(), SIGNUM)'. If `kill' is used by a process to send + a signal to itself, and the signal is not blocked, then `kill' + delivers at least one signal (which might be some other pending + unblocked signal instead of the signal SIGNUM) to that process + before it returns. - * The argument `--' terminates all options; any following arguments - are treated as non-option arguments, even if they begin with a - hyphen. + The return value from `kill' is zero if the signal can be sent + successfully. Otherwise, no signal is sent, and a value of `-1' is + returned. If PID specifies sending a signal to several processes, + `kill' succeeds if it can send the signal to at least one of them. + There's no way you can tell which of the processes got the signal + or whether all of them did. - * A token consisting of a single hyphen character is interpreted as - an ordinary non-option argument. By convention, it is used to - specify input from or output to the standard input and output - streams. + The following `errno' error conditions are defined for this + function: - * Options may be supplied in any order, or appear multiple times. - The interpretation is left up to the particular application - program. + `EINVAL' + The SIGNUM argument is an invalid or unsupported number. - GNU adds "long options" to these conventions. Long options consist -of `--' followed by a name made of alphanumeric characters and dashes. -Option names are typically one to three words long, with hyphens to -separate words. Users can abbreviate the option names as long as the -abbreviations are unique. + `EPERM' + You do not have the privilege to send a signal to the process + or any of the processes in the process group named by PID. - To specify an argument for a long option, write `--NAME=VALUE'. -This syntax enables a long option to accept an argument that is itself -optional. + `ESCRH' + The PID argument does not refer to an existing process or + group. - Eventually, the GNU system will provide completion for long option -names in the shell. + - Function: int killpg (int PGID, int SIGNUM) + This is similar to `kill', but sends signal SIGNUM to the process + group PGID. This function is provided for compatibility with BSD; + using `kill' to do this is more portable. + + As a simple example of `kill', the call `kill (getpid (), SIG)' has +the same effect as `raise (SIG)'.  -File: libc.info, Node: Parsing Program Arguments, Prev: Argument Syntax, Up: Program Arguments +File: libc.info, Node: Permission for kill, Next: Kill Example, Prev: Signaling Another Process, Up: Generating Signals -Parsing Program Arguments -------------------------- +Permission for using `kill' +--------------------------- - If the syntax for the command line arguments to your program is -simple enough, you can simply pick the arguments off from ARGV by hand. -But unless your program takes a fixed number of arguments, or all of the -arguments are interpreted in the same way (as file names, for example), -you are usually better off using `getopt' (*note Getopt::) or -`argp_parse' (*note Argp::) to do the parsing. + There are restrictions that prevent you from using `kill' to send +signals to any random process. These are intended to prevent antisocial +behavior such as arbitrarily killing off processes belonging to another +user. In typical use, `kill' is used to pass signals between parent, +child, and sibling processes, and in these situations you normally do +have permission to send signals. The only common exception is when you +run a setuid program in a child process; if the program changes its +real UID as well as its effective UID, you may not have permission to +send a signal. The `su' program does this. - `getopt' is more standard (the short-option only version of it is a -part of the POSIX standard), but using `argp_parse' is often easier, -both for very simple and very complex option structures, because it -does more of the dirty work for you. + Whether a process has permission to send a signal to another process +is determined by the user IDs of the two processes. This concept is +discussed in detail in *Note Process Persona::. -* Menu: + Generally, for a process to be able to send a signal to another +process, either the sending process must belong to a privileged user +(like `root'), or the real or effective user ID of the sending process +must match the real or effective user ID of the receiving process. If +the receiving process has changed its effective user ID from the +set-user-ID mode bit on its process image file, then the owner of the +process image file is used in place of its current effective user ID. +In some implementations, a parent process might be able to send signals +to a child process even if the user ID's don't match, and other +implementations might enforce other restrictions. -* Getopt:: Parsing program options using `getopt'. -* Argp:: Parsing program options using `argp_parse'. -* Suboptions:: Some programs need more detailed options. -* Suboptions Example:: This shows how it could be done for `mount'. + The `SIGCONT' signal is a special case. It can be sent if the +sender is part of the same session as the receiver, regardless of user +IDs.  -File: libc.info, Node: Getopt, Next: Argp, Up: Parsing Program Arguments - -Parsing program options using `getopt' -====================================== +File: libc.info, Node: Kill Example, Prev: Permission for kill, Up: Generating Signals - The `getopt' and `getopt_long' functions automate some of the chore -involved in parsing typical unix command line options. +Using `kill' for Communication +------------------------------ -* Menu: + Here is a longer example showing how signals can be used for +interprocess communication. This is what the `SIGUSR1' and `SIGUSR2' +signals are provided for. Since these signals are fatal by default, +the process that is supposed to receive them must trap them through +`signal' or `sigaction'. -* Using Getopt:: Using the `getopt' function. -* Example of Getopt:: An example of parsing options with `getopt'. -* Getopt Long Options:: GNU suggests utilities accept long-named - options; here is one way to do. -* Getopt Long Option Example:: An example of using `getopt_long'. + In this example, a parent process forks a child process and then +waits for the child to complete its initialization. The child process +tells the parent when it is ready by sending it a `SIGUSR1' signal, +using the `kill' function. - -File: libc.info, Node: Using Getopt, Next: Example of Getopt, Up: Getopt + #include + #include + #include + #include + + /* When a `SIGUSR1' signal arrives, set this variable. */ + volatile sig_atomic_t usr_interrupt = 0; + + void + synch_signal (int sig) + { + usr_interrupt = 1; + } + + /* The child process executes this function. */ + void + child_function (void) + { + /* Perform initialization. */ + printf ("I'm here!!! My pid is %d.\n", (int) getpid ()); + + /* Let parent know you're done. */ + kill (getppid (), SIGUSR1); + + /* Continue with execution. */ + puts ("Bye, now...."); + exit (0); + } + + int + main (void) + { + struct sigaction usr_action; + sigset_t block_mask; + pid_t child_id; + + /* Establish the signal handler. */ + sigfillset (&block_mask); + usr_action.sa_handler = synch_signal; + usr_action.sa_mask = block_mask; + usr_action.sa_flags = 0; + sigaction (SIGUSR1, &usr_action, NULL); + + /* Create the child process. */ + child_id = fork (); + if (child_id == 0) + child_function (); /* Does not return. */ + + /* Busy wait for the child to send a signal. */ + while (!usr_interrupt) + ; + + /* Now continue execution. */ + puts ("That's all, folks!"); + + return 0; + } -Using the `getopt' function ---------------------------- + This example uses a busy wait, which is bad, because it wastes CPU +cycles that other programs could otherwise use. It is better to ask the +system to wait until the signal arrives. See the example in *Note +Waiting for a Signal::. - Here are the details about how to call the `getopt' function. To -use this facility, your program must include the header file `unistd.h'. + +File: libc.info, Node: Blocking Signals, Next: Waiting for a Signal, Prev: Generating Signals, Up: Signal Handling - - Variable: int opterr - If the value of this variable is nonzero, then `getopt' prints an - error message to the standard error stream if it encounters an - unknown option character or an option with a missing required - argument. This is the default behavior. If you set this variable - to zero, `getopt' does not print any messages, but it still - returns the character `?' to indicate an error. +Blocking Signals +================ - - Variable: int optopt - When `getopt' encounters an unknown option character or an option - with a missing required argument, it stores that option character - in this variable. You can use this for providing your own - diagnostic messages. + Blocking a signal means telling the operating system to hold it and +deliver it later. Generally, a program does not block signals +indefinitely--it might as well ignore them by setting their actions to +`SIG_IGN'. But it is useful to block signals briefly, to prevent them +from interrupting sensitive operations. For instance: - - Variable: int optind - This variable is set by `getopt' to the index of the next element - of the ARGV array to be processed. Once `getopt' has found all of - the option arguments, you can use this variable to determine where - the remaining non-option arguments begin. The initial value of - this variable is `1'. + * You can use the `sigprocmask' function to block signals while you + modify global variables that are also modified by the handlers for + these signals. - - Variable: char * optarg - This variable is set by `getopt' to point at the value of the - option argument, for those options that accept arguments. + * You can set `sa_mask' in your `sigaction' call to block certain + signals while a particular signal handler runs. This way, the + signal handler can run without being interrupted itself by signals. - - Function: int getopt (int ARGC, char **ARGV, const char *OPTIONS) - The `getopt' function gets the next option argument from the - argument list specified by the ARGV and ARGC arguments. Normally - these values come directly from the arguments received by `main'. +* Menu: - The OPTIONS argument is a string that specifies the option - characters that are valid for this program. An option character - in this string can be followed by a colon (`:') to indicate that - it takes a required argument. If an option character is followed - by two colons (`::'), its argument is optional; this is a GNU - extension. +* Why Block:: The purpose of blocking signals. +* Signal Sets:: How to specify which signals to + block. +* Process Signal Mask:: Blocking delivery of signals to your + process during normal execution. +* Testing for Delivery:: Blocking to Test for Delivery of + a Signal. +* Blocking for Handler:: Blocking additional signals while a + handler is being run. +* Checking for Pending Signals:: Checking for Pending Signals +* Remembering a Signal:: How you can get almost the same + effect as blocking a signal, by + handling it and setting a flag + to be tested later. - `getopt' has three ways to deal with options that follow - non-options ARGV elements. The special argument `--' forces in - all cases the end of option scanning. + +File: libc.info, Node: Why Block, Next: Signal Sets, Up: Blocking Signals - * The default is to permute the contents of ARGV while scanning - it so that eventually all the non-options are at the end. - This allows options to be given in any order, even with - programs that were not written to expect this. +Why Blocking Signals is Useful +------------------------------ - * If the OPTIONS argument string begins with a hyphen (`-'), - this is treated specially. It permits arguments that are not - options to be returned as if they were associated with option - character `\1'. + Temporary blocking of signals with `sigprocmask' gives you a way to +prevent interrupts during critical parts of your code. If signals +arrive in that part of the program, they are delivered later, after you +unblock them. - * POSIX demands the following behavior: The first non-option - stops option processing. This mode is selected by either - setting the environment variable `POSIXLY_CORRECT' or - beginning the OPTIONS argument string with a plus sign (`+'). + One example where this is useful is for sharing data between a signal +handler and the rest of the program. If the type of the data is not +`sig_atomic_t' (*note Atomic Data Access::), then the signal handler +could run when the rest of the program has only half finished reading +or writing the data. This would lead to confusing consequences. - The `getopt' function returns the option character for the next - command line option. When no more option arguments are available, - it returns `-1'. There may still be more non-option arguments; you - must compare the external variable `optind' against the ARGC - parameter to check this. + To make the program reliable, you can prevent the signal handler from +running while the rest of the program is examining or modifying that +data--by blocking the appropriate signal around the parts of the +program that touch the data. - If the option has an argument, `getopt' returns the argument by - storing it in the variable OPTARG. You don't ordinarily need to - copy the `optarg' string, since it is a pointer into the original - ARGV array, not into a static area that might be overwritten. + Blocking signals is also necessary when you want to perform a certain +action only if a signal has not arrived. Suppose that the handler for +the signal sets a flag of type `sig_atomic_t'; you would like to test +the flag and perform the action if the flag is not set. This is +unreliable. Suppose the signal is delivered immediately after you test +the flag, but before the consequent action: then the program will +perform the action even though the signal has arrived. - If `getopt' finds an option character in ARGV that was not - included in OPTIONS, or a missing option argument, it returns `?' - and sets the external variable `optopt' to the actual option - character. If the first character of OPTIONS is a colon (`:'), - then `getopt' returns `:' instead of `?' to indicate a missing - option argument. In addition, if the external variable `opterr' - is nonzero (which is the default), `getopt' prints an error - message. + The only way to test reliably for whether a signal has yet arrived +is to test while the signal is blocked.  -File: libc.info, Node: Example of Getopt, Next: Getopt Long Options, Prev: Using Getopt, Up: Getopt +File: libc.info, Node: Signal Sets, Next: Process Signal Mask, Prev: Why Block, Up: Blocking Signals -Example of Parsing Arguments with `getopt' ------------------------------------------- +Signal Sets +----------- - Here is an example showing how `getopt' is typically used. The key -points to notice are: + All of the signal blocking functions use a data structure called a +"signal set" to specify what signals are affected. Thus, every +activity involves two stages: creating the signal set, and then passing +it as an argument to a library function. - * Normally, `getopt' is called in a loop. When `getopt' returns - `-1', indicating no more options are present, the loop terminates. + These facilities are declared in the header file `signal.h'. - * A `switch' statement is used to dispatch on the return value from - `getopt'. In typical use, each case just sets a variable that is - used later in the program. + - Data Type: sigset_t + The `sigset_t' data type is used to represent a signal set. + Internally, it may be implemented as either an integer or structure + type. - * A second loop is used to process the remaining non-option - arguments. + For portability, use only the functions described in this section + to initialize, change, and retrieve information from `sigset_t' + objects--don't try to manipulate them directly. - #include - #include - - int - main (int argc, char **argv) - { - int aflag = 0; - int bflag = 0; - char *cvalue = NULL; - int index; - int c; - - opterr = 0; - - while ((c = getopt (argc, argv, "abc:")) != -1) - switch (c) - { - case 'a': - aflag = 1; - break; - case 'b': - bflag = 1; - break; - case 'c': - cvalue = optarg; - break; - case '?': - if (isprint (optopt)) - fprintf (stderr, "Unknown option `-%c'.\n", optopt); - else - fprintf (stderr, - "Unknown option character `\\x%x'.\n", - optopt); - return 1; - default: - abort (); - } - - printf ("aflag = %d, bflag = %d, cvalue = %s\n", - aflag, bflag, cvalue); - - for (index = optind; index < argc; index++) - printf ("Non-option argument %s\n", argv[index]); - return 0; - } + There are two ways to initialize a signal set. You can initially +specify it to be empty with `sigemptyset' and then add specified +signals individually. Or you can specify it to be full with +`sigfillset' and then delete specified signals individually. - Here are some examples showing what this program prints with -different combinations of arguments: + You must always initialize the signal set with one of these two +functions before using it in any other way. Don't try to set all the +signals explicitly because the `sigset_t' object might include some +other information (like a version field) that needs to be initialized as +well. (In addition, it's not wise to put into your program an +assumption that the system has no signals aside from the ones you know +about.) - % testopt - aflag = 0, bflag = 0, cvalue = (null) - - % testopt -a -b - aflag = 1, bflag = 1, cvalue = (null) - - % testopt -ab - aflag = 1, bflag = 1, cvalue = (null) - - % testopt -c foo - aflag = 0, bflag = 0, cvalue = foo - - % testopt -cfoo - aflag = 0, bflag = 0, cvalue = foo - - % testopt arg1 - aflag = 0, bflag = 0, cvalue = (null) - Non-option argument arg1 - - % testopt -a arg1 - aflag = 1, bflag = 0, cvalue = (null) - Non-option argument arg1 - - % testopt -c foo arg1 - aflag = 0, bflag = 0, cvalue = foo - Non-option argument arg1 - - % testopt -a -- -b - aflag = 1, bflag = 0, cvalue = (null) - Non-option argument -b - - % testopt -a - - aflag = 1, bflag = 0, cvalue = (null) - Non-option argument - + - Function: int sigemptyset (sigset_t *SET) + This function initializes the signal set SET to exclude all of the + defined signals. It always returns `0'. - -File: libc.info, Node: Getopt Long Options, Next: Getopt Long Option Example, Prev: Example of Getopt, Up: Getopt + - Function: int sigfillset (sigset_t *SET) + This function initializes the signal set SET to include all of the + defined signals. Again, the return value is `0'. -Parsing Long Options with `getopt_long' ---------------------------------------- + - Function: int sigaddset (sigset_t *SET, int SIGNUM) + This function adds the signal SIGNUM to the signal set SET. All + `sigaddset' does is modify SET; it does not block or unblock any + signals. - To accept GNU-style long options as well as single-character options, -use `getopt_long' instead of `getopt'. This function is declared in -`getopt.h', not `unistd.h'. You should make every program accept long -options if it uses any options, for this takes little extra work and -helps beginners remember how to use the program. + The return value is `0' on success and `-1' on failure. The + following `errno' error condition is defined for this function: - - Data Type: struct option - This structure describes a single long option name for the sake of - `getopt_long'. The argument LONGOPTS must be an array of these - structures, one for each long option. Terminate the array with an - element containing all zeros. + `EINVAL' + The SIGNUM argument doesn't specify a valid signal. - The `struct option' structure has these fields: + - Function: int sigdelset (sigset_t *SET, int SIGNUM) + This function removes the signal SIGNUM from the signal set SET. + All `sigdelset' does is modify SET; it does not block or unblock + any signals. The return value and error conditions are the same + as for `sigaddset'. - `const char *name' - This field is the name of the option. It is a string. + Finally, there is a function to test what signals are in a signal +set: - `int has_arg' - This field says whether the option takes an argument. It is - an integer, and there are three legitimate values: - `no_argument', `required_argument' and `optional_argument'. + - Function: int sigismember (const sigset_t *SET, int SIGNUM) + The `sigismember' function tests whether the signal SIGNUM is a + member of the signal set SET. It returns `1' if the signal is in + the set, `0' if not, and `-1' if there is an error. - `int *flag' - `int val' - These fields control how to report or act on the option when - it occurs. + The following `errno' error condition is defined for this function: - If `flag' is a null pointer, then the `val' is a value which - identifies this option. Often these values are chosen to - uniquely identify particular long options. + `EINVAL' + The SIGNUM argument doesn't specify a valid signal. - If `flag' is not a null pointer, it should be the address of - an `int' variable which is the flag for this option. The - value in `val' is the value to store in the flag to indicate - that the option was seen. + +File: libc.info, Node: Process Signal Mask, Next: Testing for Delivery, Prev: Signal Sets, Up: Blocking Signals - - Function: int getopt_long (int ARGC, char *const *ARGV, const char - *SHORTOPTS, struct option *LONGOPTS, int *INDEXPTR) - Decode options from the vector ARGV (whose length is ARGC). The - argument SHORTOPTS describes the short options to accept, just as - it does in `getopt'. The argument LONGOPTS describes the long - options to accept (see above). +Process Signal Mask +------------------- - When `getopt_long' encounters a short option, it does the same - thing that `getopt' would do: it returns the character code for the - option, and stores the options argument (if it has one) in - `optarg'. + The collection of signals that are currently blocked is called the +"signal mask". Each process has its own signal mask. When you create +a new process (*note Creating a Process::), it inherits its parent's +mask. You can block or unblock signals with total flexibility by +modifying the signal mask. - When `getopt_long' encounters a long option, it takes actions based - on the `flag' and `val' fields of the definition of that option. + The prototype for the `sigprocmask' function is in `signal.h'. - If `flag' is a null pointer, then `getopt_long' returns the - contents of `val' to indicate which option it found. You should - arrange distinct values in the `val' field for options with - different meanings, so you can decode these values after - `getopt_long' returns. If the long option is equivalent to a short - option, you can use the short option's character code in `val'. + - Function: int sigprocmask (int HOW, const sigset_t *restrict SET, + sigset_t *restrict OLDSET) + The `sigprocmask' function is used to examine or change the calling + process's signal mask. The HOW argument determines how the signal + mask is changed, and must be one of the following values: - If `flag' is not a null pointer, that means this option should just - set a flag in the program. The flag is a variable of type `int' - that you define. Put the address of the flag in the `flag' field. - Put in the `val' field the value you would like this option to - store in the flag. In this case, `getopt_long' returns `0'. + `SIG_BLOCK' + Block the signals in `set'--add them to the existing mask. In + other words, the new mask is the union of the existing mask + and SET. - For any long option, `getopt_long' tells you the index in the array - LONGOPTS of the options definition, by storing it into - `*INDEXPTR'. You can get the name of the option with - `LONGOPTS[*INDEXPTR].name'. So you can distinguish among long - options either by the values in their `val' fields or by their - indices. You can also distinguish in this way among long options - that set flags. + `SIG_UNBLOCK' + Unblock the signals in SET--remove them from the existing + mask. - When a long option has an argument, `getopt_long' puts the argument - value in the variable `optarg' before returning. When the option - has no argument, the value in `optarg' is a null pointer. This is - how you can tell whether an optional argument was supplied. + `SIG_SETMASK' + Use SET for the mask; ignore the previous value of the mask. - When `getopt_long' has no more options to handle, it returns `-1', - and leaves in the variable `optind' the index in ARGV of the next - remaining argument. + The last argument, OLDSET, is used to return information about the + old process signal mask. If you just want to change the mask + without looking at it, pass a null pointer as the OLDSET argument. + Similarly, if you want to know what's in the mask without changing + it, pass a null pointer for SET (in this case the HOW argument is + not significant). The OLDSET argument is often used to remember + the previous signal mask in order to restore it later. (Since the + signal mask is inherited over `fork' and `exec' calls, you can't + predict what its contents are when your program starts running.) - Since long option names were used before before the `getopt_long' -options was invented there are program interfaces which require programs -to recognize options like `-option value' instead of `--option value'. -To enable these programs to use the GNU getopt functionality there is -one more function available. + If invoking `sigprocmask' causes any pending signals to be + unblocked, at least one of those signals is delivered to the + process before `sigprocmask' returns. The order in which pending + signals are delivered is not specified, but you can control the + order explicitly by making multiple `sigprocmask' calls to unblock + various signals one at a time. - - Function: int getopt_long_only (int ARGC, char *const *ARGV, const - char *SHORTOPTS, struct option *LONGOPTS, int *INDEXPTR) - The `getopt_long_only' function is equivalent to the `getopt_long' - function but it allows to specify the user of the application to - pass long options with only `-' instead of `--'. The `--' prefix - is still recognized but instead of looking through the short - options if a `-' is seen it is first tried whether this parameter - names a long option. If not, it is parsed as a short option. + The `sigprocmask' function returns `0' if successful, and `-1' to + indicate an error. The following `errno' error conditions are + defined for this function: - Assuming `getopt_long_only' is used starting an application with + `EINVAL' + The HOW argument is invalid. - app -foo + You can't block the `SIGKILL' and `SIGSTOP' signals, but if the + signal set includes these, `sigprocmask' just ignores them instead + of returning an error status. - the `getopt_long_only' will first look for a long option named - `foo'. If this is not found, the short options `f', `o', and - again `o' are recognized. + Remember, too, that blocking program error signals such as `SIGFPE' + leads to undesirable results for signals generated by an actual + program error (as opposed to signals sent with `raise' or `kill'). + This is because your program may be too broken to be able to + continue executing to a point where the signal is unblocked again. + *Note Program Error Signals::.  -File: libc.info, Node: Getopt Long Option Example, Prev: Getopt Long Options, Up: Getopt +File: libc.info, Node: Testing for Delivery, Next: Blocking for Handler, Prev: Process Signal Mask, Up: Blocking Signals -Example of Parsing Long Options with `getopt_long' --------------------------------------------------- +Blocking to Test for Delivery of a Signal +----------------------------------------- - #include - #include - #include - - /* Flag set by `--verbose'. */ - static int verbose_flag; + Now for a simple example. Suppose you establish a handler for +`SIGALRM' signals that sets a flag whenever a signal arrives, and your +main program checks this flag from time to time and then resets it. +You can prevent additional `SIGALRM' signals from arriving in the +meantime by wrapping the critical part of the code with calls to +`sigprocmask', like this: + + /* This variable is set by the SIGALRM signal handler. */ + volatile sig_atomic_t flag = 0; int - main (argc, argv) - int argc; - char **argv; + main (void) { - int c; - - while (1) - { - static struct option long_options[] = - { - /* These options set a flag. */ - {"verbose", no_argument, &verbose_flag, 1}, - {"brief", no_argument, &verbose_flag, 0}, - /* These options don't set a flag. - We distinguish them by their indices. */ - {"add", no_argument, 0, 'a'}, - {"append", no_argument, 0, 'b'}, - {"delete", required_argument, 0, 'd'}, - {"create", required_argument, 0, 'c'}, - {"file", required_argument, 0, 'f'}, - {0, 0, 0, 0} - }; - /* `getopt_long' stores the option index here. */ - int option_index = 0; + sigset_t block_alarm; - c = getopt_long (argc, argv, "abc:d:f:", - long_options, &option_index); + ... - /* Detect the end of the options. */ - if (c == -1) - break; + /* Initialize the signal mask. */ + sigemptyset (&block_alarm); + sigaddset (&block_alarm, SIGALRM); - switch (c) + while (1) + { + /* Check if a signal has arrived; if so, reset the flag. */ + sigprocmask (SIG_BLOCK, &block_alarm, NULL); + if (flag) { - case 0: - /* If this option set a flag, do nothing else now. */ - if (long_options[option_index].flag != 0) - break; - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case 'a': - puts ("option -a\n"); - break; - - case 'b': - puts ("option -b\n"); - break; - - case 'c': - printf ("option -c with value `%s'\n", optarg); - break; - - case 'd': - printf ("option -d with value `%s'\n", optarg); - break; - - case 'f': - printf ("option -f with value `%s'\n", optarg); - break; - - case '?': - /* `getopt_long' already printed an error message. */ - break; - - default: - abort (); + ACTIONS-IF-NOT-ARRIVED + flag = 0; } - } - - /* Instead of reporting `--verbose' - and `--brief' as they are encountered, - we report the final status resulting from them. */ - if (verbose_flag) - puts ("verbose flag is set"); + sigprocmask (SIG_UNBLOCK, &block_alarm, NULL); - /* Print any remaining command line arguments (not options). */ - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - putchar ('\n'); + ... } - - exit (0); }  -File: libc.info, Node: Argp, Next: Suboptions, Prev: Getopt, Up: Parsing Program Arguments - -Parsing Program Options with Argp -================================= - - "Argp" is an interface for parsing unix-style argument vectors. -*Note Program Arguments::. - - Argp provides features unavailable in the more commonly used -`getopt' interface. These features include automatically producing -output in response to the `--help' and `--version' options, as -described in the GNU coding standards. Using argp makes it less likely -that programmers will neglect to implement these additional options or -keep them up to date. - - Argp also provides the ability to merge several independently defined -option parsers into one, mediating conflicts between them and making the -result appear seamless. A library can export an argp option parser that -user programs might employ in conjunction with their own option parsers, -resulting in less work for the user programs. Some programs may use -only argument parsers exported by libraries, thereby achieving -consistent and efficient option-parsing for abstractions implemented by -the libraries. +File: libc.info, Node: Blocking for Handler, Next: Checking for Pending Signals, Prev: Testing for Delivery, Up: Blocking Signals - The header file `' should be included to use argp. +Blocking Signals for a Handler +------------------------------ -The `argp_parse' Function -------------------------- + When a signal handler is invoked, you usually want it to be able to +finish without being interrupted by another signal. From the moment the +handler starts until the moment it finishes, you must block signals that +might confuse it or corrupt its data. - The main interface to argp is the `argp_parse' function. In many -cases, calling `argp_parse' is the only argument-parsing code needed in -`main'. *Note Program Arguments::. + When a handler function is invoked on a signal, that signal is +automatically blocked (in addition to any other signals that are already +in the process's signal mask) during the time the handler is running. +If you set up a handler for `SIGTSTP', for instance, then the arrival +of that signal forces further `SIGTSTP' signals to wait during the +execution of the handler. - - Function: error_t argp_parse (const struct argp *ARGP, int ARGC, - char **ARGV, unsigned FLAGS, int *ARG_INDEX, void *INPUT) - The `argp_parse' function parses the arguments in ARGV, of length - ARGC, using the argp parser ARGP. *Note Argp Parsers::. + However, by default, other kinds of signals are not blocked; they can +arrive during handler execution. - A value of zero is the same as a `struct argp'containing all - zeros. FLAGS is a set of flag bits that modify the parsing - behavior. *Note Argp Flags::. INPUT is passed through to the argp - parser ARGP, and has meaning defined by ARGP. A typical usage is - to pass a pointer to a structure which is used for specifying - parameters to the parser and passing back the results. + The reliable way to block other kinds of signals during the +execution of the handler is to use the `sa_mask' member of the +`sigaction' structure. - Unless the `ARGP_NO_EXIT' or `ARGP_NO_HELP' flags are included in - FLAGS, calling `argp_parse' may result in the program exiting. - This behavior is true if an error is detected, or when an unknown - option is encountered. *Note Program Termination::. + Here is an example: - If ARG_INDEX is non-null, the index of the first unparsed option - in ARGV is returned as a value. + #include + #include + + void catch_stop (); + + void + install_handler (void) + { + struct sigaction setup_action; + sigset_t block_mask; + + sigemptyset (&block_mask); + /* Block other terminal-generated signals while handler runs. */ + sigaddset (&block_mask, SIGINT); + sigaddset (&block_mask, SIGQUIT); + setup_action.sa_handler = catch_stop; + setup_action.sa_mask = block_mask; + setup_action.sa_flags = 0; + sigaction (SIGTSTP, &setup_action, NULL); + } - The return value is zero for successful parsing, or an error code - (*note Error Codes::) if an error is detected. Different argp - parsers may return arbitrary error codes, but the standard error - codes are: `ENOMEM' if a memory allocation error occurred, or - `EINVAL' if an unknown option or option argument is encountered. + This is more reliable than blocking the other signals explicitly in +the code for the handler. If you block signals explicitly in the +handler, you can't avoid at least a short interval at the beginning of +the handler where they are not yet blocked. -* Menu: + You cannot remove signals from the process's current mask using this +mechanism. However, you can make calls to `sigprocmask' within your +handler to block or unblock signals as you wish. -* Globals: Argp Global Variables. Global argp parameters. -* Parsers: Argp Parsers. Defining parsers for use with `argp_parse'. -* Flags: Argp Flags. Flags that modify the behavior of `argp_parse'. -* Help: Argp Help. Printing help messages when not parsing. -* Examples: Argp Examples. Simple examples of programs using argp. -* Customization: Argp User Customization. - Users may control the `--help' output format. + In any case, when the handler returns, the system restores the mask +that was in place before the handler was entered. If any signals that +become unblocked by this restoration are pending, the process will +receive those signals immediately, before returning to the code that was +interrupted.  -File: libc.info, Node: Argp Global Variables, Next: Argp Parsers, Up: Argp - -Argp Global Variables ---------------------- +File: libc.info, Node: Checking for Pending Signals, Next: Remembering a Signal, Prev: Blocking for Handler, Up: Blocking Signals - These variables make it easy for user programs to implement the -`--version' option and provide a bug-reporting address in the `--help' -output. These are implemented in argp by default. +Checking for Pending Signals +---------------------------- - - Variable: const char * argp_program_version - If defined or set by the user program to a non-zero value, then a - `--version' option is added when parsing with `argp_parse', which - will print the `--version' string followed by a newline and exit. - The exception to this is if the `ARGP_NO_EXIT' flag is used. + You can find out which signals are pending at any time by calling +`sigpending'. This function is declared in `signal.h'. - - Variable: const char * argp_program_bug_address - If defined or set by the user program to a non-zero value, - `argp_program_bug_address' should point to a string that will be - printed at the end of the standard output for the `--help' option, - embedded in a sentence that says `Report bugs to ADDRESS.'. + - Function: int sigpending (sigset_t *SET) + The `sigpending' function stores information about pending signals + in SET. If there is a pending signal that is blocked from + delivery, then that signal is a member of the returned set. (You + can test whether a particular signal is a member of this set using + `sigismember'; see *Note Signal Sets::.) - - Variable: argp_program_version_hook - If defined or set by the user program to a non-zero value, a - `--version' option is added when parsing with `arg_parse', which - prints the program version and exits with a status of zero. This - is not the case if the `ARGP_NO_HELP' flag is used. If the - `ARGP_NO_EXIT' flag is set, the exit behavior of the program is - suppressed or modified, as when the argp parser is going to be - used by other programs. + The return value is `0' if successful, and `-1' on failure. - It should point to a function with this type of signature: + Testing whether a signal is pending is not often useful. Testing +when that signal is not blocked is almost certainly bad design. - void PRINT-VERSION (FILE *STREAM, struct argp_state *STATE) + Here is an example. - *Note Argp Parsing State::, for an explanation of STATE. + #include + #include + + sigset_t base_mask, waiting_mask; + + sigemptyset (&base_mask); + sigaddset (&base_mask, SIGINT); + sigaddset (&base_mask, SIGTSTP); + + /* Block user interrupts while doing other processing. */ + sigprocmask (SIG_SETMASK, &base_mask, NULL); + ... + + /* After a while, check to see whether any signals are pending. */ + sigpending (&waiting_mask); + if (sigismember (&waiting_mask, SIGINT)) { + /* User has tried to kill the process. */ + } + else if (sigismember (&waiting_mask, SIGTSTP)) { + /* User has tried to stop the process. */ + } - This variable takes precedence over `argp_program_version', and is - useful if a program has version information not easily expressed - in a simple string. + Remember that if there is a particular signal pending for your +process, additional signals of that same type that arrive in the +meantime might be discarded. For example, if a `SIGINT' signal is +pending when another `SIGINT' signal arrives, your program will +probably only see one of them when you unblock this signal. - - Variable: error_t argp_err_exit_status - This is the exit status used when argp exits due to a parsing - error. If not defined or set by the user program, this defaults - to: `EX_USAGE' from `'. + *Portability Note:* The `sigpending' function is new in POSIX.1. +Older systems have no equivalent facility. diff -durpN glibc-2.2.4/manual/libc.info-41 glibc-2.2.5/manual/libc.info-41 --- glibc-2.2.4/manual/libc.info-41 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-41 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1089 +33,1220 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Argp Parsers, Next: Argp Flags, Prev: Argp Global Variables, Up: Argp - -Specifying Argp Parsers ------------------------ - - The first argument to the `argp_parse' function is a pointer to a -`struct argp', which is known as an "argp parser": - - - Data Type: struct argp - This structure specifies how to parse a given set of options and - arguments, perhaps in conjunction with other argp parsers. It has - the following fields: +File: libc.info, Node: Remembering a Signal, Prev: Checking for Pending Signals, Up: Blocking Signals - `const struct argp_option *options' - A pointer to a vector of `argp_option' structures specifying - which options this argp parser understands; it may be zero if - there are no options at all. *Note Argp Option Vectors::. +Remembering a Signal to Act On Later +------------------------------------ - `argp_parser_t parser' - A pointer to a function that defines actions for this parser; - it is called for each option parsed, and at other - well-defined points in the parsing process. A value of zero - is the same as a pointer to a function that always returns - `ARGP_ERR_UNKNOWN'. *Note Argp Parser Functions::. + Instead of blocking a signal using the library facilities, you can +get almost the same results by making the handler set a flag to be +tested later, when you "unblock". Here is an example: - `const char *args_doc' - If non-zero, a string describing what non-option arguments - are called by this parser. This is only used to print the - `Usage:' message. If it contains newlines, the strings - separated by them are considered alternative usage patterns - and printed on separate lines. Lines after the first are - prefixed by ` or: ' instead of `Usage:'. + /* If this flag is nonzero, don't handle the signal right away. */ + volatile sig_atomic_t signal_pending; + + /* This is nonzero if a signal arrived and was not handled. */ + volatile sig_atomic_t defer_signal; + + void + handler (int signum) + { + if (defer_signal) + signal_pending = signum; + else + ... /* "Really" handle the signal. */ + } + + ... + + void + update_mumble (int frob) + { + /* Prevent signals from having immediate effect. */ + defer_signal++; + /* Now update `mumble', without worrying about interruption. */ + mumble.a = 1; + mumble.b = hack (); + mumble.c = frob; + /* We have updated `mumble'. Handle any signal that came in. */ + defer_signal--; + if (defer_signal == 0 && signal_pending != 0) + raise (signal_pending); + } - `const char *doc' - If non-zero, a string containing extra text to be printed - before and after the options in a long help message, with the - two sections separated by a vertical tab (`'\v'', `'\013'') - character. By convention, the documentation before the - options is just a short string explaining what the program - does. Documentation printed after the options describe - behavior in more detail. + Note how the particular signal that arrives is stored in +`signal_pending'. That way, we can handle several types of +inconvenient signals with the same mechanism. - `const struct argp_child *children' - A pointer to a vector of `argp_children' structures. This - pointer specifies which additional argp parsers should be - combined with this one. *Note Argp Children::. + We increment and decrement `defer_signal' so that nested critical +sections will work properly; thus, if `update_mumble' were called with +`signal_pending' already nonzero, signals would be deferred not only +within `update_mumble', but also within the caller. This is also why +we do not check `signal_pending' if `defer_signal' is still nonzero. - `char *(*help_filter)(int KEY, const char *TEXT, void *INPUT)' - If non-zero, a pointer to a function that filters the output - of help messages. *Note Argp Help Filtering::. + The incrementing and decrementing of `defer_signal' each require more +than one instruction; it is possible for a signal to happen in the +middle. But that does not cause any problem. If the signal happens +early enough to see the value from before the increment or decrement, +that is equivalent to a signal which came before the beginning of the +increment or decrement, which is a case that works properly. - `const char *argp_domain' - If non-zero, the strings used in the argp library are - translated using the domain described by this string. If - zero, the current default domain is used. + It is absolutely vital to decrement `defer_signal' before testing +`signal_pending', because this avoids a subtle bug. If we did these +things in the other order, like this, + if (defer_signal == 1 && signal_pending != 0) + raise (signal_pending); + defer_signal--; - Of the above group, `options', `parser', `args_doc', and the `doc' -fields are usually all that are needed. If an argp parser is defined -as an initialized C variable, only the fields used need be specified in -the initializer. The rest will default to zero due to the way C -structure initialization works. This design is exploited in most argp -structures; the most-used fields are grouped near the beginning, the -unused fields left unspecified. +then a signal arriving in between the `if' statement and the decrement +would be effectively "lost" for an indefinite amount of time. The +handler would merely set `defer_signal', but the program having already +tested this variable, it would not test the variable again. -* Menu: + Bugs like these are called "timing errors". They are especially bad +because they happen only rarely and are nearly impossible to reproduce. +You can't expect to find them with a debugger as you would find a +reproducible bug. So it is worth being especially careful to avoid +them. -* Options: Argp Option Vectors. Specifying options in an argp parser. -* Argp Parser Functions:: Defining actions for an argp parser. -* Children: Argp Children. Combining multiple argp parsers. -* Help Filtering: Argp Help Filtering. Customizing help output for an argp parser. + (You would not be tempted to write the code in this order, given the +use of `defer_signal' as a counter which must be tested along with +`signal_pending'. After all, testing for zero is cleaner than testing +for one. But if you did not use `defer_signal' as a counter, and gave +it values of zero and one only, then either order might seem equally +simple. This is a further advantage of using a counter for +`defer_signal': it will reduce the chance you will write the code in +the wrong order and create a subtle bug.)  -File: libc.info, Node: Argp Option Vectors, Next: Argp Parser Functions, Prev: Argp Parsers, Up: Argp Parsers - -Specifying Options in an Argp Parser ------------------------------------- +File: libc.info, Node: Waiting for a Signal, Next: Signal Stack, Prev: Blocking Signals, Up: Signal Handling - The `options' field in a `struct argp' points to a vector of `struct -argp_option' structures, each of which specifies an option that the -argp parser supports. Multiple entries may be used for a single option -provided it has multiple names. This should be terminated by an entry -with zero in all fields. Note that when using an initialized C array -for options, writing `{ 0 }' is enough to achieve this. +Waiting for a Signal +==================== - - Data Type: struct argp_option - This structure specifies a single option that an argp parser - understands, as well as how to parse and document that option. It - has the following fields: + If your program is driven by external events, or uses signals for +synchronization, then when it has nothing to do it should probably wait +until a signal arrives. - `const char *name' - The long name for this option, corresponding to the long - option `--NAME'; this field may be zero if this option _only_ - has a short name. To specify multiple names for an option, - additional entries may follow this one, with the - `OPTION_ALIAS' flag set. *Note Argp Option Flags::. +* Menu: - `int key' - The integer key provided by the current option to the option - parser. If KEY has a value that is a printable ASCII - character (i.e., `isascii (KEY)' is true), it _also_ - specifies a short option `-CHAR', where CHAR is the ASCII - character with the code KEY. +* Using Pause:: The simple way, using `pause'. +* Pause Problems:: Why the simple way is often not very good. +* Sigsuspend:: Reliably waiting for a specific signal. - `const char *arg' - If non-zero, this is the name of an argument associated with - this option, which must be provided (e.g., with the - `--NAME=VALUE' or `-CHAR VALUE' syntaxes), unless the - `OPTION_ARG_OPTIONAL' flag (*note Argp Option Flags::) is - set, in which case it _may_ be provided. + +File: libc.info, Node: Using Pause, Next: Pause Problems, Up: Waiting for a Signal - `int flags' - Flags associated with this option, some of which are referred - to above. *Note Argp Option Flags::. +Using `pause' +------------- - `const char *doc' - A documentation string for this option, for printing in help - messages. + The simple way to wait until a signal arrives is to call `pause'. +Please read about its disadvantages, in the following section, before +you use it. - If both the `name' and `key' fields are zero, this string - will be printed tabbed left from the normal option column, - making it useful as a group header. This will be the first - thing printed in its group. In this usage, it's conventional - to end the string with a `:' character. + - Function: int pause () + The `pause' function suspends program execution until a signal + arrives whose action is either to execute a handler function, or to + terminate the process. - `int group' - Group identity for this option. + If the signal causes a handler function to be executed, then + `pause' returns. This is considered an unsuccessful return (since + "successful" behavior would be to suspend the program forever), so + the return value is `-1'. Even if you specify that other + primitives should resume when a system handler returns (*note + Interrupted Primitives::), this has no effect on `pause'; it + always fails when a signal is handled. - In a long help message, options are sorted alphabetically - within each group, and the groups presented in the order 0, - 1, 2, ..., N, -M, ..., -2, -1. + The following `errno' error conditions are defined for this + function: - Every entry in an options array with this field 0 will - inherit the group number of the previous entry, or zero if - it's the first one. If it's a group header with `name' and - `key' fields both zero, the previous entry + 1 is the - default. Automagic options such as `--help' are put into - group -1. + `EINTR' + The function was interrupted by delivery of a signal. - Note that because of C structure initialization rules, this - field often need not be specified, because 0 is the correct - value. + If the signal causes program termination, `pause' doesn't return + (obviously). -* Menu: + This function is a cancellation point in multithreaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `pause' is called. If the thread gets cancelled these resources + stay allocated until the program ends. To avoid this calls to + `pause' should be protected using cancellation handlers. -* Flags: Argp Option Flags. Flags for options. + The `pause' function is declared in `unistd.h'.  -File: libc.info, Node: Argp Option Flags, Up: Argp Option Vectors +File: libc.info, Node: Pause Problems, Next: Sigsuspend, Prev: Using Pause, Up: Waiting for a Signal -Flags for Argp Options -...................... +Problems with `pause' +--------------------- - The following flags may be or'd together in the `flags' field of a -`struct argp_option'. These flags control various aspects of how that -option is parsed or displayed in help messages: + The simplicity of `pause' can conceal serious timing errors that can +make a program hang mysteriously. -`OPTION_ARG_OPTIONAL' - The argument associated with this option is optional. + It is safe to use `pause' if the real work of your program is done +by the signal handlers themselves, and the "main program" does nothing +but call `pause'. Each time a signal is delivered, the handler will do +the next batch of work that is to be done, and then return, so that the +main loop of the program can call `pause' again. -`OPTION_HIDDEN' - This option isn't displayed in any help messages. + You can't safely use `pause' to wait until one more signal arrives, +and then resume real work. Even if you arrange for the signal handler +to cooperate by setting a flag, you still can't use `pause' reliably. +Here is an example of this problem: -`OPTION_ALIAS' - This option is an alias for the closest previous non-alias option. - This means that it will be displayed in the same help entry, and - will inherit fields other than `name' and `key' from the option - being aliased. + /* `usr_interrupt' is set by the signal handler. */ + if (!usr_interrupt) + pause (); + + /* Do work once the signal arrives. */ + ... -`OPTION_DOC' - This option isn't actually an option and should be ignored by the - actual option parser. It is an arbitrary section of documentation - that should be displayed in much the same manner as the options. - This is known as a "documentation option". +This has a bug: the signal could arrive after the variable +`usr_interrupt' is checked, but before the call to `pause'. If no +further signals arrive, the process would never wake up again. - If this flag is set, then the option `name' field is displayed - unmodified (e.g., no `--' prefix is added) at the left-margin where - a _short_ option would normally be displayed, and this - documentation string is left in it's usual place. For purposes of - sorting, any leading whitespace and punctuation is ignored, unless - the first non-whitespace character is `-'. This entry is displayed - after all options, after `OPTION_DOC' entries with a leading `-', - in the same group. + You can put an upper limit on the excess waiting by using `sleep' in +a loop, instead of using `pause'. (*Note Sleeping::, for more about +`sleep'.) Here is what this looks like: -`OPTION_NO_USAGE' - This option shouldn't be included in `long' usage messages, but - should still be included in other help messages. This is intended - for options that are completely documented in an argp's `args_doc' - field. *Note Argp Parsers::. Including this option in the - generic usage list would be redundant, and should be avoided. + /* `usr_interrupt' is set by the signal handler. + while (!usr_interrupt) + sleep (1); + + /* Do work once the signal arrives. */ + ... - For instance, if `args_doc' is `"FOO BAR\n-x BLAH"', and the `-x' - option's purpose is to distinguish these two cases, `-x' should - probably be marked `OPTION_NO_USAGE'. + For some purposes, that is good enough. But with a little more +complexity, you can wait reliably until a particular signal handler is +run, using `sigsuspend'. *Note Sigsuspend::.  -File: libc.info, Node: Argp Parser Functions, Next: Argp Children, Prev: Argp Option Vectors, Up: Argp Parsers +File: libc.info, Node: Sigsuspend, Prev: Pause Problems, Up: Waiting for a Signal -Argp Parser Functions ---------------------- +Using `sigsuspend' +------------------ - The function pointed to by the `parser' field in a `struct argp' -(*note Argp Parsers::) defines what actions take place in response to -each option or argument parsed. It is also used as a hook, allowing a -parser to perform tasks at certain other points during parsing. + The clean and reliable way to wait for a signal to arrive is to +block it and then use `sigsuspend'. By using `sigsuspend' in a loop, +you can wait for certain kinds of signals, while letting other kinds of +signals be handled by their handlers. - Argp parser functions have the following type signature: + - Function: int sigsuspend (const sigset_t *SET) + This function replaces the process's signal mask with SET and then + suspends the process until a signal is delivered whose action is + either to terminate the process or invoke a signal handling + function. In other words, the program is effectively suspended + until one of the signals that is not a member of SET arrives. - error_t PARSER (int KEY, char *ARG, struct argp_state *STATE) + If the process is woken up by delivery of a signal that invokes a + handler function, and the handler function returns, then + `sigsuspend' also returns. -where the arguments are as follows: + The mask remains SET only as long as `sigsuspend' is waiting. The + function `sigsuspend' always restores the previous signal mask + when it returns. -KEY - For each option that is parsed, PARSER is called with a value of - KEY from that option's `key' field in the option vector. *Note - Argp Option Vectors::. PARSER is also called at other times with - special reserved keys, such as `ARGP_KEY_ARG' for non-option - arguments. *Note Argp Special Keys::. + The return value and error conditions are the same as for `pause'. -ARG - If KEY is an option, ARG is its given value. This defaults to - zero if no value is specified. Only options that have a non-zero - `arg' field can ever have a value. These must _always_ have a - value unless the `OPTION_ARG_OPTIONAL' flag is specified. If the - input being parsed specifies a value for an option that doesn't - allow one, an error results before PARSER ever gets called. + With `sigsuspend', you can replace the `pause' or `sleep' loop in +the previous section with something completely reliable: - If KEY is `ARGP_KEY_ARG', ARG is a non-option argument. Other - special keys always have a zero ARG. + sigset_t mask, oldmask; + + ... + + /* Set up the mask of signals to temporarily block. */ + sigemptyset (&mask); + sigaddset (&mask, SIGUSR1); + + ... + + /* Wait for a signal to arrive. */ + sigprocmask (SIG_BLOCK, &mask, &oldmask); + while (!usr_interrupt) + sigsuspend (&oldmask); + sigprocmask (SIG_UNBLOCK, &mask, NULL); -STATE - STATE points to a `struct argp_state', containing useful - information about the current parsing state for use by PARSER. - *Note Argp Parsing State::. + This last piece of code is a little tricky. The key point to +remember here is that when `sigsuspend' returns, it resets the process's +signal mask to the original value, the value from before the call to +`sigsuspend'--in this case, the `SIGUSR1' signal is once again blocked. +The second call to `sigprocmask' is necessary to explicitly unblock +this signal. - When PARSER is called, it should perform whatever action is -appropriate for KEY, and return `0' for success, `ARGP_ERR_UNKNOWN' if -the value of KEY is not handled by this parser function, or a unix -error code if a real error occurred. *Note Error Codes::. + One other point: you may be wondering why the `while' loop is +necessary at all, since the program is apparently only waiting for one +`SIGUSR1' signal. The answer is that the mask passed to `sigsuspend' +permits the process to be woken up by the delivery of other kinds of +signals, as well--for example, job control signals. If the process is +woken up by a signal that doesn't set `usr_interrupt', it just suspends +itself again until the "right" kind of signal eventually arrives. - - Macro: int ARGP_ERR_UNKNOWN - Argp parser functions should return `ARGP_ERR_UNKNOWN' for any KEY - value they do not recognize, or for non-option arguments (`KEY == - ARGP_KEY_ARG') that they are not equipped to handle. + This technique takes a few more lines of preparation, but that is +needed just once for each kind of wait criterion you want to use. The +code that actually waits is just four lines. - A typical parser function uses a switch statement on KEY: + +File: libc.info, Node: Signal Stack, Next: BSD Signal Handling, Prev: Waiting for a Signal, Up: Signal Handling - error_t - parse_opt (int key, char *arg, struct argp_state *state) - { - switch (key) - { - case OPTION_KEY: - ACTION - break; - ... - default: - return ARGP_ERR_UNKNOWN; - } - return 0; - } +Using a Separate Signal Stack +============================= -* Menu: + A signal stack is a special area of memory to be used as the +execution stack during signal handlers. It should be fairly large, to +avoid any danger that it will overflow in turn; the macro `SIGSTKSZ' is +defined to a canonical size for signal stacks. You can use `malloc' to +allocate the space for the stack. Then call `sigaltstack' or +`sigstack' to tell the system to use that space for the signal stack. -* Keys: Argp Special Keys. Special values for the KEY argument. -* State: Argp Parsing State. What the STATE argument refers to. -* Functions: Argp Helper Functions. Functions to help during argp parsing. + You don't need to write signal handlers differently in order to use a +signal stack. Switching from one stack to the other happens +automatically. (Some non-GNU debuggers on some machines may get +confused if you examine a stack trace while a handler that uses the +signal stack is running.) - -File: libc.info, Node: Argp Special Keys, Next: Argp Parsing State, Up: Argp Parser Functions + There are two interfaces for telling the system to use a separate +signal stack. `sigstack' is the older interface, which comes from 4.2 +BSD. `sigaltstack' is the newer interface, and comes from 4.4 BSD. +The `sigaltstack' interface has the advantage that it does not require +your program to know which direction the stack grows, which depends on +the specific machine and operating system. -Special Keys for Argp Parser Functions -...................................... + - Data Type: stack_t + This structure describes a signal stack. It contains the + following members: - In addition to key values corresponding to user options, the KEY -argument to argp parser functions may have a number of other special -values. In the following example ARG and STATE refer to parser -function arguments. *Note Argp Parser Functions::. + `void *ss_sp' + This points to the base of the signal stack. -`ARGP_KEY_ARG' - This is not an option at all, but rather a command line argument, - whose value is pointed to by ARG. + `size_t ss_size' + This is the size (in bytes) of the signal stack which `ss_sp' + points to. You should set this to however much space you + allocated for the stack. - When there are multiple parser functions in play due to argp - parsers being combined, it's impossible to know which one will - handle a specific argument. Each is called until one returns 0 or - an error other than `ARGP_ERR_UNKNOWN'; if an argument is not - handled, `argp_parse' immediately returns success, without parsing - any more arguments. + There are two macros defined in `signal.h' that you should + use in calculating this size: - Once a parser function returns success for this key, that fact is - recorded, and the `ARGP_KEY_NO_ARGS' case won't be used. - _However_, if while processing the argument a parser function - decrements the `next' field of its STATE argument, the option - won't be considered processed; this is to allow you to actually - modify the argument, perhaps into an option, and have it processed - again. + `SIGSTKSZ' + This is the canonical size for a signal stack. It is + judged to be sufficient for normal uses. -`ARGP_KEY_ARGS' - If a parser function returns `ARGP_ERR_UNKNOWN' for - `ARGP_KEY_ARG', it is immediately called again with the key - `ARGP_KEY_ARGS', which has a similar meaning, but is slightly more - convenient for consuming all remaining arguments. ARG is 0, and - the tail of the argument vector may be found at `STATE->argv + - STATE->next'. If success is returned for this key, and - `STATE->next' is unchanged, all remaining arguments are considered - to have been consumed. Otherwise, the amount by which - `STATE->next' has been adjusted indicates how many were used. - Here's an example that uses both, for different args: + `MINSIGSTKSZ' + This is the amount of signal stack space the operating + system needs just to implement signal delivery. The + size of a signal stack *must* be greater than this. - ... - case ARGP_KEY_ARG: - if (STATE->arg_num == 0) - /* First argument */ - first_arg = ARG; - else - /* Let the next case parse it. */ - return ARGP_KEY_UNKNOWN; - break; - case ARGP_KEY_ARGS: - remaining_args = STATE->argv + STATE->next; - num_remaining_args = STATE->argc - STATE->next; - break; + For most cases, just using `SIGSTKSZ' for `ss_size' is + sufficient. But if you know how much stack space your + program's signal handlers will need, you may want to use + a different size. In this case, you should allocate + `MINSIGSTKSZ' additional bytes for the signal stack and + increase `ss_size' accordingly. -`ARGP_KEY_END' - This indicates that there are no more command line arguments. - Parser functions are called in a different order, children first. - This allows each parser to clean up its state for the parent. + `int ss_flags' + This field contains the bitwise OR of these flags: -`ARGP_KEY_NO_ARGS' - Because it's common to do some special processing if there aren't - any non-option args, parser functions are called with this key if - they didn't successfully process any non-option arguments. This - is called just before `ARGP_KEY_END', where more general validity - checks on previously parsed arguments take place. + `SS_DISABLE' + This tells the system that it should not use the signal + stack. -`ARGP_KEY_INIT' - This is passed in before any parsing is done. Afterwards, the - values of each element of the `child_input' field of STATE, if - any, are copied to each child's state to be the initial value of - the `input' when _their_ parsers are called. + `SS_ONSTACK' + This is set by the system, and indicates that the signal + stack is currently in use. If this bit is not set, then + signals will be delivered on the normal user stack. -`ARGP_KEY_SUCCESS' - Passed in when parsing has successfully been completed, even if - arguments remain. + - Function: int sigaltstack (const stack_t *restrict STACK, stack_t + *restrict OLDSTACK) + The `sigaltstack' function specifies an alternate stack for use + during signal handling. When a signal is received by the process + and its action indicates that the signal stack is used, the system + arranges a switch to the currently installed signal stack while + the handler for that signal is executed. -`ARGP_KEY_ERROR' - Passed in if an error has occurred and parsing is terminated. In - this case a call with a key of `ARGP_KEY_SUCCESS' is never made. + If OLDSTACK is not a null pointer, information about the currently + installed signal stack is returned in the location it points to. + If STACK is not a null pointer, then this is installed as the new + stack for use by signal handlers. -`ARGP_KEY_FINI' - The final key ever seen by any parser, even after - `ARGP_KEY_SUCCESS' and `ARGP_KEY_ERROR'. Any resources allocated - by `ARGP_KEY_INIT' may be freed here. At times, certain resources - allocated are to be returned to the caller after a successful - parse. In that case, those particular resources can be freed in - the `ARGP_KEY_ERROR' case. + The return value is `0' on success and `-1' on failure. If + `sigaltstack' fails, it sets `errno' to one of these values: - In all cases, `ARGP_KEY_INIT' is the first key seen by parser -functions, and `ARGP_KEY_FINI' the last, unless an error was returned -by the parser for `ARGP_KEY_INIT'. Other keys can occur in one the -following orders. OPT refers to an arbitrary option key: + `EINVAL' + You tried to disable a stack that was in fact currently in + use. -OPT... `ARGP_KEY_NO_ARGS' `ARGP_KEY_END' `ARGP_KEY_SUCCESS' - The arguments being parsed did not contain any non-option - arguments. + `ENOMEM' + The size of the alternate stack was too small. It must be + greater than `MINSIGSTKSZ'. -( OPT | `ARGP_KEY_ARG' )... `ARGP_KEY_END' `ARGP_KEY_SUCCESS' - All non-option arguments were successfully handled by a parser - function. There may be multiple parser functions if multiple argp - parsers were combined. + Here is the older `sigstack' interface. You should use +`sigaltstack' instead on systems that have it. -( OPT | `ARGP_KEY_ARG' )... `ARGP_KEY_SUCCESS' - Some non-option argument went unrecognized. + - Data Type: struct sigstack + This structure describes a signal stack. It contains the + following members: - This occurs when every parser function returns `ARGP_KEY_UNKNOWN' - for an argument, in which case parsing stops at that argument if - ARG_INDEX is a null pointer. Otherwise an error occurs. + `void *ss_sp' + This is the stack pointer. If the stack grows downwards on + your machine, this should point to the top of the area you + allocated. If the stack grows upwards, it should point to + the bottom. - In all cases, if a non-null value for ARG_INDEX gets passed to -`argp_parse', the index of the first unparsed command-line argument is -passed back in that value. + `int ss_onstack' + This field is true if the process is currently using this + stack. - If an error occurs and is either detected by argp or because a parser -function returned an error value, each parser is called with -`ARGP_KEY_ERROR'. No further calls are made, except the final call -with `ARGP_KEY_FINI'. + - Function: int sigstack (const struct sigstack *STACK, struct + sigstack *OLDSTACK) + The `sigstack' function specifies an alternate stack for use during + signal handling. When a signal is received by the process and its + action indicates that the signal stack is used, the system + arranges a switch to the currently installed signal stack while + the handler for that signal is executed. - -File: libc.info, Node: Argp Helper Functions, Prev: Argp Parsing State, Up: Argp Parser Functions + If OLDSTACK is not a null pointer, information about the currently + installed signal stack is returned in the location it points to. + If STACK is not a null pointer, then this is installed as the new + stack for use by signal handlers. -Functions For Use in Argp Parsers -................................. + The return value is `0' on success and `-1' on failure. - Argp provides a number of functions available to the user of argp -(*note Argp Parser Functions::), mostly for producing error messages. -These take as their first argument the STATE argument to the parser -function. *Note Argp Parsing State::. + +File: libc.info, Node: BSD Signal Handling, Prev: Signal Stack, Up: Signal Handling - - Function: void argp_usage (const struct argp_state *STATE) - Outputs the standard usage message for the argp parser referred to - by STATE to `STATE->err_stream' and terminate the program with - `exit (argp_err_exit_status)'. *Note Argp Global Variables::. +BSD Signal Handling +=================== - - Function: void argp_error (const struct argp_state *STATE, const - char *FMT, ...) - Prints the printf format string FMT and following args, preceded - by the program name and `:', and followed by a `Try ... --help' - message, and terminates the program with an exit status of - `argp_err_exit_status'. *Note Argp Global Variables::. + This section describes alternative signal handling functions derived +from BSD Unix. These facilities were an advance, in their time; today, +they are mostly obsolete, and supported mainly for compatibility with +BSD Unix. - - Function: void argp_failure (const struct argp_state *STATE, int - STATUS, int ERRNUM, const char *FMT, ...) - Similar to the standard gnu error-reporting function `error', this - prints the program name and `:', the printf format string FMT, and - the appropriate following args. If it is non-zero, the standard - unix error text for ERRNUM is printed. If STATUS is non-zero, it - terminates the program with that value as its exit status. + There are many similarities between the BSD and POSIX signal handling +facilities, because the POSIX facilities were inspired by the BSD +facilities. Besides having different names for all the functions to +avoid conflicts, the main differences between the two are: - The difference between `argp_failure' and `argp_error' is that - `argp_error' is for _parsing errors_, whereas `argp_failure' is - for other problems that occur during parsing but don't reflect a - syntactic problem with the input, such as illegal values for - options, bad phase of the moon, etc. + * BSD Unix represents signal masks as an `int' bit mask, rather than + as a `sigset_t' object. - - Function: void argp_state_help (const struct argp_state *STATE, FILE - *STREAM, unsigned FLAGS) - Outputs a help message for the argp parser referred to by STATE, - to STREAM. The FLAGS argument determines what sort of help - message is produced. *Note Argp Help Flags::. + * The BSD facilities use a different default for whether an + interrupted primitive should fail or resume. The POSIX facilities + make system calls fail unless you specify that they should resume. + With the BSD facility, the default is to make system calls resume + unless you say they should fail. *Note Interrupted Primitives::. - Error output is sent to `STATE->err_stream', and the program name -printed is `STATE->name'. + The BSD facilities are declared in `signal.h'. - The output or program termination behavior of these functions may be -suppressed if the `ARGP_NO_EXIT' or `ARGP_NO_ERRS' flags are passed to -`argp_parse'. *Note Argp Flags::. +* Menu: - This behavior is useful if an argp parser is exported for use by -other programs (e.g., by a library), and may be used in a context where -it is not desirable to terminate the program in response to parsing -errors. In argp parsers intended for such general use, and for the -case where the program _doesn't_ terminate, calls to any of these -functions should be followed by code that returns the appropriate error -code: +* BSD Handler:: BSD Function to Establish a Handler. +* Blocking in BSD:: BSD Functions for Blocking Signals. - if (BAD ARGUMENT SYNTAX) - { - argp_usage (STATE); - return EINVAL; - } + +File: libc.info, Node: BSD Handler, Next: Blocking in BSD, Up: BSD Signal Handling -If a parser function will _only_ be used when `ARGP_NO_EXIT' is not -set, the return may be omitted. +BSD Function to Establish a Handler +----------------------------------- - -File: libc.info, Node: Argp Parsing State, Next: Argp Helper Functions, Prev: Argp Special Keys, Up: Argp Parser Functions + - Data Type: struct sigvec + This data type is the BSD equivalent of `struct sigaction' (*note + Advanced Signal Handling::); it is used to specify signal actions + to the `sigvec' function. It contains the following members: -Argp Parsing State -.................. + `sighandler_t sv_handler' + This is the handler function. - The third argument to argp parser functions (*note Argp Parser -Functions::) is a pointer to a `struct argp_state', which contains -information about the state of the option parsing. + `int sv_mask' + This is the mask of additional signals to be blocked while + the handler function is being called. - - Data Type: struct argp_state - This structure has the following fields, which may be modified as - noted: + `int sv_flags' + This is a bit mask used to specify various flags which affect + the behavior of the signal. You can also refer to this field + as `sv_onstack'. - `const struct argp *const root_argp' - The top level argp parser being parsed. Note that this is - often _not_ the same `struct argp' passed into `argp_parse' by - the invoking program. *Note Argp::. It is an internal argp - parser that contains options implemented by `argp_parse' - itself, such as `--help'. + These symbolic constants can be used to provide values for the +`sv_flags' field of a `sigvec' structure. This field is a bit mask +value, so you bitwise-OR the flags of interest to you together. - `int argc' - `char **argv' - The argument vector being parsed. This may be modified. + - Macro: int SV_ONSTACK + If this bit is set in the `sv_flags' field of a `sigvec' + structure, it means to use the signal stack when delivering the + signal. - `int next' - The index in `argv' of the next argument to be parsed. This - may be modified. + - Macro: int SV_INTERRUPT + If this bit is set in the `sv_flags' field of a `sigvec' + structure, it means that system calls interrupted by this kind of + signal should not be restarted if the handler returns; instead, + the system calls should return with a `EINTR' error status. *Note + Interrupted Primitives::. - One way to consume all remaining arguments in the input is to - set `STATE->next = STATE->argc', perhaps after recording the - value of the `next' field to find the consumed arguments. The - current option can be re-parsed immediately by decrementing - this field, then modifying `STATE->argv[STATE->next]' to - reflect the option that should be reexamined. + - Macro: int SV_RESETHAND + If this bit is set in the `sv_flags' field of a `sigvec' + structure, it means to reset the action for the signal back to + `SIG_DFL' when the signal is received. - `unsigned flags' - The flags supplied to `argp_parse'. These may be modified, - although some flags may only take effect when `argp_parse' is - first invoked. *Note Argp Flags::. + - Function: int sigvec (int SIGNUM, const struct sigvec *ACTION,struct + sigvec *OLD-ACTION) + This function is the equivalent of `sigaction' (*note Advanced + Signal Handling::); it installs the action ACTION for the signal + SIGNUM, returning information about the previous action in effect + for that signal in OLD-ACTION. - `unsigned arg_num' - While calling a parsing function with the KEY argument - `ARGP_KEY_ARG', this represents the number of the current arg, - starting at 0. It is incremented after each `ARGP_KEY_ARG' - call returns. At all other times, this is the number of - `ARGP_KEY_ARG' arguments that have been processed. + - Function: int siginterrupt (int SIGNUM, int FAILFLAG) + This function specifies which approach to use when certain + primitives are interrupted by handling signal SIGNUM. If FAILFLAG + is false, signal SIGNUM restarts primitives. If FAILFLAG is true, + handling SIGNUM causes these primitives to fail with error code + `EINTR'. *Note Interrupted Primitives::. - `int quoted' - If non-zero, the index in `argv' of the first argument - following a special `--' argument. This prevents anything - that follows from being interpreted as an option. It is only - set after argument parsing has proceeded past this point. + +File: libc.info, Node: Blocking in BSD, Prev: BSD Handler, Up: BSD Signal Handling - `void *input' - An arbitrary pointer passed in from the caller of - `argp_parse', in the INPUT argument. +BSD Functions for Blocking Signals +---------------------------------- - `void **child_inputs' - These are values that will be passed to child parsers. This - vector will be the same length as the number of children in - the current parser. Each child parser will be given the - value of `STATE->child_inputs[I]' as _its_ `STATE->input' - field, where I is the index of the child in the this parser's - `children' field. *Note Argp Children::. + - Macro: int sigmask (int SIGNUM) + This macro returns a signal mask that has the bit for signal SIGNUM + set. You can bitwise-OR the results of several calls to `sigmask' + together to specify more than one signal. For example, - `void *hook' - For the parser function's use. Initialized to 0, but - otherwise ignored by argp. + (sigmask (SIGTSTP) | sigmask (SIGSTOP) + | sigmask (SIGTTIN) | sigmask (SIGTTOU)) - `char *name' - The name used when printing messages. This is initialized to - `argv[0]', or `program_invocation_name' if `argv[0]' is - unavailable. + specifies a mask that includes all the job-control stop signals. - `FILE *err_stream' - `FILE *out_stream' - The stdio streams used when argp prints. Error messages are - printed to `err_stream', all other output, such as `--help' - output) to `out_stream'. These are initialized to `stderr' - and `stdout' respectively. *Note Standard Streams::. + - Function: int sigblock (int MASK) + This function is equivalent to `sigprocmask' (*note Process Signal + Mask::) with a HOW argument of `SIG_BLOCK': it adds the signals + specified by MASK to the calling process's set of blocked signals. + The return value is the previous set of blocked signals. - `void *pstate' - Private, for use by the argp implementation. + - Function: int sigsetmask (int MASK) + This function equivalent to `sigprocmask' (*note Process Signal + Mask::) with a HOW argument of `SIG_SETMASK': it sets the calling + process's signal mask to MASK. The return value is the previous + set of blocked signals. + + - Function: int sigpause (int MASK) + This function is the equivalent of `sigsuspend' (*note Waiting for + a Signal::): it sets the calling process's signal mask to MASK, + and waits for a signal to arrive. On return the previous set of + blocked signals is restored.  -File: libc.info, Node: Argp Children, Next: Argp Help Filtering, Prev: Argp Parser Functions, Up: Argp Parsers +File: libc.info, Node: Program Basics, Next: Processes, Prev: Signal Handling, Up: Top -Combining Multiple Argp Parsers -------------------------------- +The Basic Program/System Interface +********************************** - The `children' field in a `struct argp' enables other argp parsers -to be combined with the referencing one for the parsing of a single set -of arguments. This field should point to a vector of `struct -argp_child', which is terminated by an entry having a value of zero in -the `argp' field. + "Processes" are the primitive units for allocation of system +resources. Each process has its own address space and (usually) one +thread of control. A process executes a program; you can have multiple +processes executing the same program, but each process has its own copy +of the program within its own address space and executes it +independently of the other copies. Though it may have multiple threads +of control within the same program and a program may be composed of +multiple logically separate modules, a process always executes exactly +one program. - Where conflicts between combined parsers arise, as when two specify -an option with the same name, the parser conflicts are resolved in -favor of the parent argp parser(s), or the earlier of the argp parsers -in the list of children. + Note that we are using a specific definition of "program" for the +purposes of this manual, which corresponds to a common definition in the +context of Unix system. In popular usage, "program" enjoys a much +broader definition; it can refer for example to a system's kernel, an +editor macro, a complex package of software, or a discrete section of +code executing within a process. - - Data Type: struct argp_child - An entry in the list of subsidiary argp parsers pointed to by the - `children' field in a `struct argp'. The fields are as follows: + Writing the program is what this manual is all about. This chapter +explains the most basic interface between your program and the system +that runs, or calls, it. This includes passing of parameters (arguments +and environment) from the system, requesting basic services from the +system, and telling the system the program is done. - `const struct argp *argp' - The child argp parser, or zero to end of the list. + A program starts another program with the `exec' family of system +calls. This chapter looks at program startup from the execee's point +of view. To see the event from the execor's point of view, *Note +Executing a File::. - `int flags' - Flags for this child. +* Menu: - `const char *header' - If non-zero, this is an optional header to be printed within - help output before the child options. As a side-effect, a - non-zero value forces the child options to be grouped - together. To achieve this effect without actually printing a - header string, use a value of `""'. As with header strings - specified in an option entry, the conventional value of the - last character is `:'. *Note Argp Option Vectors::. +* Program Arguments:: Parsing your program's command-line arguments. +* Environment Variables:: Less direct parameters affecting your program +* System Calls:: Requesting service from the system +* Program Termination:: Telling the system you're done; return status - `int group' - This is where the child options are grouped relative to the - other `consolidated' options in the parent argp parser. The - values are the same as the `group' field in `struct - argp_option'. *Note Argp Option Vectors::. All - child-groupings follow parent options at a particular group - level. If both this field and `header' are zero, then the - child's options aren't grouped together, they are merged with - parent options at the parent option group level. + +File: libc.info, Node: Program Arguments, Next: Environment Variables, Up: Program Basics +Program Arguments +================= - -File: libc.info, Node: Argp Flags, Next: Argp Help, Prev: Argp Parsers, Up: Argp + The system starts a C program by calling the function `main'. It is +up to you to write a function named `main'--otherwise, you won't even +be able to link your program without errors. -Flags for `argp_parse' ----------------------- + In ISO C you can define `main' either to take no arguments, or to +take two arguments that represent the command line arguments to the +program, like this: - The default behavior of `argp_parse' is designed to be convenient -for the most common case of parsing program command line argument. To -modify these defaults, the following flags may be or'd together in the -FLAGS argument to `argp_parse': + int main (int ARGC, char *ARGV[]) -`ARGP_PARSE_ARGV0' - Don't ignore the first element of the ARGV argument to - `argp_parse'. Unless `ARGP_NO_ERRS' is set, the first element of - the argument vector is skipped for option parsing purposes, as it - corresponds to the program name in a command line. + The command line arguments are the whitespace-separated tokens given +in the shell command used to invoke the program; thus, in `cat foo +bar', the arguments are `foo' and `bar'. The only way a program can +look at its command line arguments is via the arguments of `main'. If +`main' doesn't take arguments, then you cannot get at the command line. -`ARGP_NO_ERRS' - Don't print error messages for unknown options to `stderr'; unless - this flag is set, `ARGP_PARSE_ARGV0' is ignored, as `argv[0]' is - used as the program name in the error messages. This flag implies - `ARGP_NO_EXIT'. This is based on the assumption that silent - exiting upon errors is bad behavior. + The value of the ARGC argument is the number of command line +arguments. The ARGV argument is a vector of C strings; its elements +are the individual command line argument strings. The file name of the +program being run is also included in the vector as the first element; +the value of ARGC counts this element. A null pointer always follows +the last element: `ARGV[ARGC]' is this null pointer. -`ARGP_NO_ARGS' - Don't parse any non-option args. Normally these are parsed by - calling the parse functions with a key of `ARGP_KEY_ARG', the - actual argument being the value. This flag needn't normally be - set, as the default behavior is to stop parsing as soon as an - argument fails to be parsed. *Note Argp Parser Functions::. + For the command `cat foo bar', ARGC is 3 and ARGV has three +elements, `"cat"', `"foo"' and `"bar"'. -`ARGP_IN_ORDER' - Parse options and arguments in the same order they occur on the - command line. Normally they're rearranged so that all options - come first. + In Unix systems you can define `main' a third way, using three +arguments: -`ARGP_NO_HELP' - Don't provide the standard long option `--help', which ordinarily - causes usage and option help information to be output to `stdout' - and `exit (0)'. + int main (int ARGC, char *ARGV[], char *ENVP[]) -`ARGP_NO_EXIT' - Don't exit on errors, although they may still result in error - messages. + The first two arguments are just the same. The third argument ENVP +gives the program's environment; it is the same as the value of +`environ'. *Note Environment Variables::. POSIX.1 does not allow this +three-argument form, so to be portable it is best to write `main' to +take two arguments, and use the value of `environ'. -`ARGP_LONG_ONLY' - Use the gnu getopt `long-only' rules for parsing arguments. This - allows long-options to be recognized with only a single `-' (i.e. - `-help'). This results in a less useful interface, and its use is - discouraged as it conflicts with the way most GNU programs work as - well as the GNU coding standards. +* Menu: -`ARGP_SILENT' - Turns off any message-printing/exiting options, specifically - `ARGP_NO_EXIT', `ARGP_NO_ERRS', and `ARGP_NO_HELP'. +* Argument Syntax:: By convention, options start with a hyphen. +* Parsing Program Arguments:: Ways to parse program options and arguments.  -File: libc.info, Node: Argp Help Filtering, Prev: Argp Children, Up: Argp Parsers - -Customizing Argp Help Output ----------------------------- +File: libc.info, Node: Argument Syntax, Next: Parsing Program Arguments, Up: Program Arguments - The `help_filter' field in a `struct argp' is a pointer to a -function that filters the text of help messages before displaying them. -They have a function signature like: +Program Argument Syntax Conventions +----------------------------------- - char *HELP-FILTER (int KEY, const char *TEXT, void *INPUT) + POSIX recommends these conventions for command line arguments. +`getopt' (*note Getopt::) and `argp_parse' (*note Argp::) make it easy +to implement them. -Where KEY is either a key from an option, in which case TEXT is that -option's help text. *Note Argp Option Vectors::. Alternately, one of -the special keys with names beginning with `ARGP_KEY_HELP_' might be -used, describing which other help text TEXT will contain. *Note Argp -Help Filter Keys::. + * Arguments are options if they begin with a hyphen delimiter (`-'). - The function should return either TEXT if it remains as-is, or a -replacement string allocated using `malloc'. This will be either be -freed by argp or zero, which prints nothing. The value of TEXT is -supplied _after_ any translation has been done, so if any of the -replacement text needs translation, it will be done by the filter -function. INPUT is either the input supplied to `argp_parse' or it is -zero, if `argp_help' was called directly by the user. + * Multiple options may follow a hyphen delimiter in a single token if + the options do not take arguments. Thus, `-abc' is equivalent to + `-a -b -c'. -* Menu: + * Option names are single alphanumeric characters (as for `isalnum'; + *note Classification of Characters::). -* Keys: Argp Help Filter Keys. Special KEY values for help filter functions. + * Certain options require an argument. For example, the `-o' command + of the `ld' command requires an argument--an output file name. - -File: libc.info, Node: Argp Help Filter Keys, Up: Argp Help Filtering + * An option and its argument may or may not appear as separate + tokens. (In other words, the whitespace separating them is + optional.) Thus, `-o foo' and `-ofoo' are equivalent. -Special Keys for Argp Help Filter Functions -........................................... + * Options typically precede other non-option arguments. - The following special values may be passed to an argp help filter -function as the first argument in addition to key values for user -options. They specify which help text the TEXT argument contains: + The implementations of `getopt' and `argp_parse' in the GNU C + library normally make it appear as if all the option arguments were + specified before all the non-option arguments for the purposes of + parsing, even if the user of your program intermixed option and + non-option arguments. They do this by reordering the elements of + the ARGV array. This behavior is nonstandard; if you want to + suppress it, define the `_POSIX_OPTION_ORDER' environment variable. + *Note Standard Environment::. -`ARGP_KEY_HELP_PRE_DOC' - The help text preceding options. + * The argument `--' terminates all options; any following arguments + are treated as non-option arguments, even if they begin with a + hyphen. -`ARGP_KEY_HELP_POST_DOC' - The help text following options. + * A token consisting of a single hyphen character is interpreted as + an ordinary non-option argument. By convention, it is used to + specify input from or output to the standard input and output + streams. -`ARGP_KEY_HELP_HEADER' - The option header string. + * Options may be supplied in any order, or appear multiple times. + The interpretation is left up to the particular application + program. -`ARGP_KEY_HELP_EXTRA' - This is used after all other documentation; TEXT is zero for this - key. + GNU adds "long options" to these conventions. Long options consist +of `--' followed by a name made of alphanumeric characters and dashes. +Option names are typically one to three words long, with hyphens to +separate words. Users can abbreviate the option names as long as the +abbreviations are unique. -`ARGP_KEY_HELP_DUP_ARGS_NOTE' - The explanatory note printed when duplicate option arguments have - been suppressed. + To specify an argument for a long option, write `--NAME=VALUE'. +This syntax enables a long option to accept an argument that is itself +optional. -`ARGP_KEY_HELP_ARGS_DOC' - The argument doc string; formally the `args_doc' field from the - argp parser. *Note Argp Parsers::. + Eventually, the GNU system will provide completion for long option +names in the shell.  -File: libc.info, Node: Argp Help, Next: Argp Examples, Prev: Argp Flags, Up: Argp - -The `argp_help' Function ------------------------- +File: libc.info, Node: Parsing Program Arguments, Prev: Argument Syntax, Up: Program Arguments - Normally programs using argp need not be written with particular -printing argument-usage-type help messages in mind as the standard -`--help' option is handled automatically by argp. Typical error cases -can be handled using `argp_usage' and `argp_error'. *Note Argp Helper -Functions::. However, if it's desirable to print a help message in -some context other than parsing the program options, argp offers the -`argp_help' interface. +Parsing Program Arguments +------------------------- - - Function: void argp_help (const struct argp *ARGP, FILE *STREAM, - unsigned FLAGS, char *NAME) - This outputs a help message for the argp parser ARGP to STREAM. - The type of messages printed will be determined by FLAGS. + If the syntax for the command line arguments to your program is +simple enough, you can simply pick the arguments off from ARGV by hand. +But unless your program takes a fixed number of arguments, or all of the +arguments are interpreted in the same way (as file names, for example), +you are usually better off using `getopt' (*note Getopt::) or +`argp_parse' (*note Argp::) to do the parsing. - Any options such as `--help' that are implemented automatically by - argp itself will _not_ be present in the help output; for this - reason it is best to use `argp_state_help' if calling from within - an argp parser function. *Note Argp Helper Functions::. + `getopt' is more standard (the short-option only version of it is a +part of the POSIX standard), but using `argp_parse' is often easier, +both for very simple and very complex option structures, because it +does more of the dirty work for you. * Menu: -* Flags: Argp Help Flags. Specifying what sort of help message to print. +* Getopt:: Parsing program options using `getopt'. +* Argp:: Parsing program options using `argp_parse'. +* Suboptions:: Some programs need more detailed options. +* Suboptions Example:: This shows how it could be done for `mount'.  -File: libc.info, Node: Argp Help Flags, Up: Argp Help +File: libc.info, Node: Getopt, Next: Argp, Up: Parsing Program Arguments -Flags for the `argp_help' Function ----------------------------------- +Parsing program options using `getopt' +====================================== - When calling `argp_help' (*note Argp Help::) or `argp_state_help' -(*note Argp Helper Functions::) the exact output is determined by the -FLAGS argument. This should consist of any of the following flags, -or'd together: + The `getopt' and `getopt_long' functions automate some of the chore +involved in parsing typical unix command line options. -`ARGP_HELP_USAGE' - A unix `Usage:' message that explicitly lists all options. +* Menu: -`ARGP_HELP_SHORT_USAGE' - A unix `Usage:' message that displays an appropriate placeholder to - indicate where the options go; useful for showing the non-option - argument syntax. +* Using Getopt:: Using the `getopt' function. +* Example of Getopt:: An example of parsing options with `getopt'. +* Getopt Long Options:: GNU suggests utilities accept long-named + options; here is one way to do. +* Getopt Long Option Example:: An example of using `getopt_long'. -`ARGP_HELP_SEE' - A `Try ... for more help' message; `...' contains the program name - and `--help'. + +File: libc.info, Node: Using Getopt, Next: Example of Getopt, Up: Getopt -`ARGP_HELP_LONG' - A verbose option help message that gives each option available - along with its documentation string. +Using the `getopt' function +--------------------------- -`ARGP_HELP_PRE_DOC' - The part of the argp parser doc string preceding the verbose - option help. + Here are the details about how to call the `getopt' function. To +use this facility, your program must include the header file `unistd.h'. -`ARGP_HELP_POST_DOC' - The part of the argp parser doc string that following the verbose - option help. + - Variable: int opterr + If the value of this variable is nonzero, then `getopt' prints an + error message to the standard error stream if it encounters an + unknown option character or an option with a missing required + argument. This is the default behavior. If you set this variable + to zero, `getopt' does not print any messages, but it still + returns the character `?' to indicate an error. -`ARGP_HELP_DOC' - `(ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)' + - Variable: int optopt + When `getopt' encounters an unknown option character or an option + with a missing required argument, it stores that option character + in this variable. You can use this for providing your own + diagnostic messages. -`ARGP_HELP_BUG_ADDR' - A message that prints where to report bugs for this program, if the - `argp_program_bug_address' variable contains this information. + - Variable: int optind + This variable is set by `getopt' to the index of the next element + of the ARGV array to be processed. Once `getopt' has found all of + the option arguments, you can use this variable to determine where + the remaining non-option arguments begin. The initial value of + this variable is `1'. -`ARGP_HELP_LONG_ONLY' - This will modify any output to reflect the `ARGP_LONG_ONLY' mode. + - Variable: char * optarg + This variable is set by `getopt' to point at the value of the + option argument, for those options that accept arguments. - The following flags are only understood when used with -`argp_state_help'. They control whether the function returns after -printing its output, or terminates the program: + - Function: int getopt (int ARGC, char **ARGV, const char *OPTIONS) + The `getopt' function gets the next option argument from the + argument list specified by the ARGV and ARGC arguments. Normally + these values come directly from the arguments received by `main'. -`ARGP_HELP_EXIT_ERR' - This will terminate the program with `exit (argp_err_exit_status)'. + The OPTIONS argument is a string that specifies the option + characters that are valid for this program. An option character + in this string can be followed by a colon (`:') to indicate that + it takes a required argument. If an option character is followed + by two colons (`::'), its argument is optional; this is a GNU + extension. -`ARGP_HELP_EXIT_OK' - This will terminate the program with `exit (0)'. + `getopt' has three ways to deal with options that follow + non-options ARGV elements. The special argument `--' forces in + all cases the end of option scanning. - The following flags are combinations of the basic flags for printing -standard messages: + * The default is to permute the contents of ARGV while scanning + it so that eventually all the non-options are at the end. + This allows options to be given in any order, even with + programs that were not written to expect this. -`ARGP_HELP_STD_ERR' - Assuming that an error message for a parsing error has printed, - this prints a message on how to get help, and terminates the - program with an error. + * If the OPTIONS argument string begins with a hyphen (`-'), + this is treated specially. It permits arguments that are not + options to be returned as if they were associated with option + character `\1'. -`ARGP_HELP_STD_USAGE' - This prints a standard usage message and terminates the program - with an error. This is used when no other specific error messages - are appropriate or available. + * POSIX demands the following behavior: The first non-option + stops option processing. This mode is selected by either + setting the environment variable `POSIXLY_CORRECT' or + beginning the OPTIONS argument string with a plus sign (`+'). -`ARGP_HELP_STD_HELP' - This prints the standard response for a `--help' option, and - terminates the program successfully. + The `getopt' function returns the option character for the next + command line option. When no more option arguments are available, + it returns `-1'. There may still be more non-option arguments; you + must compare the external variable `optind' against the ARGC + parameter to check this. - -File: libc.info, Node: Argp Examples, Next: Argp User Customization, Prev: Argp Help, Up: Argp + If the option has an argument, `getopt' returns the argument by + storing it in the variable OPTARG. You don't ordinarily need to + copy the `optarg' string, since it is a pointer into the original + ARGV array, not into a static area that might be overwritten. -Argp Examples -------------- + If `getopt' finds an option character in ARGV that was not + included in OPTIONS, or a missing option argument, it returns `?' + and sets the external variable `optopt' to the actual option + character. If the first character of OPTIONS is a colon (`:'), + then `getopt' returns `:' instead of `?' to indicate a missing + option argument. In addition, if the external variable `opterr' + is nonzero (which is the default), `getopt' prints an error + message. - These example programs demonstrate the basic usage of argp. + +File: libc.info, Node: Example of Getopt, Next: Getopt Long Options, Prev: Using Getopt, Up: Getopt -* Menu: +Example of Parsing Arguments with `getopt' +------------------------------------------ -* 1: Argp Example 1. A minimal program using argp. -* 2: Argp Example 2. A program using only default options. -* 3: Argp Example 3. A simple program with user options. -* 4: Argp Example 4. Combining multiple argp parsers. + Here is an example showing how `getopt' is typically used. The key +points to notice are: - -File: libc.info, Node: Argp Example 1, Next: Argp Example 2, Up: Argp Examples + * Normally, `getopt' is called in a loop. When `getopt' returns + `-1', indicating no more options are present, the loop terminates. -A Minimal Program Using Argp -............................ + * A `switch' statement is used to dispatch on the return value from + `getopt'. In typical use, each case just sets a variable that is + used later in the program. - This is perhaps the smallest program possible that uses argp. It -won't do much except give an error messages and exit when there are any -arguments, and prints a rather pointless message for `--help'. + * A second loop is used to process the remaining non-option + arguments. - /* Argp example #1 - a minimal program using argp */ + #include + #include - /* This is (probably) the smallest possible program that - uses argp. It won't do much except give an error - messages and exit when there are any arguments, and print - a (rather pointless) messages for -help. */ + int + main (int argc, char **argv) + { + int aflag = 0; + int bflag = 0; + char *cvalue = NULL; + int index; + int c; - #include + opterr = 0; - int main (int argc, char **argv) - { - argp_parse (0, argc, argv, 0, 0, 0); - exit (0); + while ((c = getopt (argc, argv, "abc:")) != -1) + switch (c) + { + case 'a': + aflag = 1; + break; + case 'b': + bflag = 1; + break; + case 'c': + cvalue = optarg; + break; + case '?': + if (isprint (optopt)) + fprintf (stderr, "Unknown option `-%c'.\n", optopt); + else + fprintf (stderr, + "Unknown option character `\\x%x'.\n", + optopt); + return 1; + default: + abort (); + } + + printf ("aflag = %d, bflag = %d, cvalue = %s\n", + aflag, bflag, cvalue); + + for (index = optind; index < argc; index++) + printf ("Non-option argument %s\n", argv[index]); + return 0; } - -File: libc.info, Node: Argp Example 2, Next: Argp Example 3, Prev: Argp Example 1, Up: Argp Examples - -A Program Using Argp with Only Default Options -.............................................. - - This program doesn't use any options or arguments, it uses argp to be -compliant with the GNU standard command line format. - - In addition to giving no arguments and implementing a `--help' -option, this example has a `--version' option, which will put the given -documentation string and bug address in the `--help' output, as per GNU -standards. - - The variable `argp' contains the argument parser specification. -Adding fields to this structure is the way most parameters are passed -to `argp_parse'. The first three fields are normally used, but they -are not in this small program. There are also two global variables -that argp can use defined here, `argp_program_version' and -`argp_program_bug_address'. They are considered global variables -because they will almost always be constant for a given program, even -if they use different argument parsers for various tasks. + Here are some examples showing what this program prints with +different combinations of arguments: - /* Argp example #2 - a pretty minimal program using argp */ + % testopt + aflag = 0, bflag = 0, cvalue = (null) - /* This program doesn't use any options or arguments, but uses - argp to be compliant with the GNU standard command line - format. + % testopt -a -b + aflag = 1, bflag = 1, cvalue = (null) - In addition to making sure no arguments are given, and - implementing a -help option, this example will have a - -version option, and will put the given documentation string - and bug address in the -help output, as per GNU standards. + % testopt -ab + aflag = 1, bflag = 1, cvalue = (null) - The variable ARGP contains the argument parser specification; - adding fields to this structure is the way most parameters are - passed to argp_parse (the first three fields are usually used, - but not in this small program). There are also two global - variables that argp knows about defined here, - ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are - global variables becuase they will almost always be constant - for a given program, even if it uses different argument - parsers for various tasks). */ + % testopt -c foo + aflag = 0, bflag = 0, cvalue = foo - #include + % testopt -cfoo + aflag = 0, bflag = 0, cvalue = foo - const char *argp_program_version = - "argp-ex2 1.0"; - const char *argp_program_bug_address = - ""; + % testopt arg1 + aflag = 0, bflag = 0, cvalue = (null) + Non-option argument arg1 - /* Program documentation. */ - static char doc[] = - "Argp example #2 -- a pretty minimal program using argp"; + % testopt -a arg1 + aflag = 1, bflag = 0, cvalue = (null) + Non-option argument arg1 - /* Our argument parser. The `options', `parser', and - `args_doc' fields are zero because we have neither options or - arguments; `doc' and `argp_program_bug_address' will be - used in the output for `--help', and the `--version' - option will print out `argp_program_version'. */ - static struct argp argp = { 0, 0, 0, doc }; + % testopt -c foo arg1 + aflag = 0, bflag = 0, cvalue = foo + Non-option argument arg1 - int main (int argc, char **argv) - { - argp_parse (&argp, argc, argv, 0, 0, 0); - exit (0); - } + % testopt -a -- -b + aflag = 1, bflag = 0, cvalue = (null) + Non-option argument -b + + % testopt -a - + aflag = 1, bflag = 0, cvalue = (null) + Non-option argument -  -File: libc.info, Node: Argp Example 3, Next: Argp Example 4, Prev: Argp Example 2, Up: Argp Examples +File: libc.info, Node: Getopt Long Options, Next: Getopt Long Option Example, Prev: Example of Getopt, Up: Getopt -A Program Using Argp with User Options -...................................... +Parsing Long Options with `getopt_long' +--------------------------------------- - This program uses the same features as example 2, adding user options -and arguments. + To accept GNU-style long options as well as single-character options, +use `getopt_long' instead of `getopt'. This function is declared in +`getopt.h', not `unistd.h'. You should make every program accept long +options if it uses any options, for this takes little extra work and +helps beginners remember how to use the program. - We now use the first four fields in `argp' (*note Argp Parsers::) -and specify `parse_opt' as the parser function. *Note Argp Parser -Functions::. + - Data Type: struct option + This structure describes a single long option name for the sake of + `getopt_long'. The argument LONGOPTS must be an array of these + structures, one for each long option. Terminate the array with an + element containing all zeros. - Note that in this example, `main' uses a structure to communicate -with the `parse_opt' function, a pointer to which it passes in the -`input' argument to `argp_parse'. *Note Argp::. It is retrieved by -`parse_opt' through the `input' field in its `state' argument. *Note -Argp Parsing State::. Of course, it's also possible to use global -variables instead, but using a structure like this is somewhat more -flexible and clean. + The `struct option' structure has these fields: - /* Argp example #3 - a program with options and arguments using argp */ - - /* This program uses the same features as example 2, and uses options and - arguments. - - We now use the first four fields in ARGP, so here's a description of them: - OPTIONS - A pointer to a vector of struct argp_option (see below) - PARSER - A function to parse a single option, called by argp - ARGS_DOC - A string describing how the non-option arguments should look - DOC - A descriptive string about this program; if it contains a - vertical tab character (\v), the part after it will be - printed *following* the options - - The function PARSER takes the following arguments: - KEY - An integer specifying which option this is (taken - from the KEY field in each struct argp_option), or - a special key specifying something else; the only - special keys we use here are ARGP_KEY_ARG, meaning - a non-option argument, and ARGP_KEY_END, meaning - that all arguments have been parsed - ARG - For an option KEY, the string value of its - argument, or NULL if it has none - STATE- A pointer to a struct argp_state, containing - various useful information about the parsing state; used here - are the INPUT field, which reflects the INPUT argument to - argp_parse, and the ARG_NUM field, which is the number of the - current non-option argument being parsed - It should return either 0, meaning success, ARGP_ERR_UNKNOWN, meaning the - given KEY wasn't recognized, or an errno value indicating some other - error. - - Note that in this example, main uses a structure to communicate with the - parse_opt function, a pointer to which it passes in the INPUT argument to - argp_parse. Of course, it's also possible to use global variables - instead, but this is somewhat more flexible. - - The OPTIONS field contains a pointer to a vector of struct argp_option's; - that structure has the following fields (if you assign your option - structures using array initialization like this example, unspecified - fields will be defaulted to 0, and need not be specified): - NAME - The name of this option's long option (may be zero) - KEY - The KEY to pass to the PARSER function when parsing this option, - *and* the name of this option's short option, if it is a - printable ascii character - ARG - The name of this option's argument, if any - FLAGS - Flags describing this option; some of them are: - OPTION_ARG_OPTIONAL - The argument to this option is optional - OPTION_ALIAS - This option is an alias for the - previous option - OPTION_HIDDEN - Don't show this option in -help output - DOC - A documentation string for this option, shown in -help output - - An options vector should be terminated by an option with all fields zero. */ + `const char *name' + This field is the name of the option. It is a string. + + `int has_arg' + This field says whether the option takes an argument. It is + an integer, and there are three legitimate values: + `no_argument', `required_argument' and `optional_argument'. + + `int *flag' + `int val' + These fields control how to report or act on the option when + it occurs. + + If `flag' is a null pointer, then the `val' is a value which + identifies this option. Often these values are chosen to + uniquely identify particular long options. + + If `flag' is not a null pointer, it should be the address of + an `int' variable which is the flag for this option. The + value in `val' is the value to store in the flag to indicate + that the option was seen. + + - Function: int getopt_long (int ARGC, char *const *ARGV, const char + *SHORTOPTS, const struct option *LONGOPTS, int *INDEXPTR) + Decode options from the vector ARGV (whose length is ARGC). The + argument SHORTOPTS describes the short options to accept, just as + it does in `getopt'. The argument LONGOPTS describes the long + options to accept (see above). + + When `getopt_long' encounters a short option, it does the same + thing that `getopt' would do: it returns the character code for the + option, and stores the options argument (if it has one) in + `optarg'. + + When `getopt_long' encounters a long option, it takes actions based + on the `flag' and `val' fields of the definition of that option. + + If `flag' is a null pointer, then `getopt_long' returns the + contents of `val' to indicate which option it found. You should + arrange distinct values in the `val' field for options with + different meanings, so you can decode these values after + `getopt_long' returns. If the long option is equivalent to a short + option, you can use the short option's character code in `val'. + + If `flag' is not a null pointer, that means this option should just + set a flag in the program. The flag is a variable of type `int' + that you define. Put the address of the flag in the `flag' field. + Put in the `val' field the value you would like this option to + store in the flag. In this case, `getopt_long' returns `0'. + + For any long option, `getopt_long' tells you the index in the array + LONGOPTS of the options definition, by storing it into + `*INDEXPTR'. You can get the name of the option with + `LONGOPTS[*INDEXPTR].name'. So you can distinguish among long + options either by the values in their `val' fields or by their + indices. You can also distinguish in this way among long options + that set flags. + + When a long option has an argument, `getopt_long' puts the argument + value in the variable `optarg' before returning. When the option + has no argument, the value in `optarg' is a null pointer. This is + how you can tell whether an optional argument was supplied. + + When `getopt_long' has no more options to handle, it returns `-1', + and leaves in the variable `optind' the index in ARGV of the next + remaining argument. + + Since long option names were used before before the `getopt_long' +options was invented there are program interfaces which require programs +to recognize options like `-option value' instead of `--option value'. +To enable these programs to use the GNU getopt functionality there is +one more function available. + + - Function: int getopt_long_only (int ARGC, char *const *ARGV, const + char *SHORTOPTS, const struct option *LONGOPTS, int *INDEXPTR) + The `getopt_long_only' function is equivalent to the `getopt_long' + function but it allows to specify the user of the application to + pass long options with only `-' instead of `--'. The `--' prefix + is still recognized but instead of looking through the short + options if a `-' is seen it is first tried whether this parameter + names a long option. If not, it is parsed as a short option. + + Assuming `getopt_long_only' is used starting an application with + + app -foo + + the `getopt_long_only' will first look for a long option named + `foo'. If this is not found, the short options `f', `o', and + again `o' are recognized. + + +File: libc.info, Node: Getopt Long Option Example, Prev: Getopt Long Options, Up: Getopt + +Example of Parsing Long Options with `getopt_long' +-------------------------------------------------- + + #include + #include + #include - #include + /* Flag set by `--verbose'. */ + static int verbose_flag; - const char *argp_program_version = - "argp-ex3 1.0"; - const char *argp_program_bug_address = - ""; + int + main (argc, argv) + int argc; + char **argv; + { + int c; - /* Program documentation. */ - static char doc[] = - "Argp example #3 -- a program with options and arguments using argp"; + while (1) + { + static struct option long_options[] = + { + /* These options set a flag. */ + {"verbose", no_argument, &verbose_flag, 1}, + {"brief", no_argument, &verbose_flag, 0}, + /* These options don't set a flag. + We distinguish them by their indices. */ + {"add", no_argument, 0, 'a'}, + {"append", no_argument, 0, 'b'}, + {"delete", required_argument, 0, 'd'}, + {"create", required_argument, 0, 'c'}, + {"file", required_argument, 0, 'f'}, + {0, 0, 0, 0} + }; + /* `getopt_long' stores the option index here. */ + int option_index = 0; - /* A description of the arguments we accept. */ - static char args_doc[] = "ARG1 ARG2"; + c = getopt_long (argc, argv, "abc:d:f:", + long_options, &option_index); - /* The options we understand. */ - static struct argp_option options[] = { - {"verbose", 'v', 0, 0, "Produce verbose output" }, - {"quiet", 'q', 0, 0, "Don't produce any output" }, - {"silent", 's', 0, OPTION_ALIAS }, - {"output", 'o', "FILE", 0, - "Output to FILE instead of standard output" }, - { 0 } - }; + /* Detect the end of the options. */ + if (c == -1) + break; - /* Used by `main' to communicate with `parse_opt'. */ - struct arguments - { - char *args[2]; /* ARG1 & ARG2 */ - int silent, verbose; - char *output_file; - }; + switch (c) + { + case 0: + /* If this option set a flag, do nothing else now. */ + if (long_options[option_index].flag != 0) + break; + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; - /* Parse a single option. */ - static error_t - parse_opt (int key, char *arg, struct argp_state *state) - { - /* Get the INPUT argument from `argp_parse', which we - know is a pointer to our arguments structure. */ - struct arguments *arguments = state->input; + case 'a': + puts ("option -a\n"); + break; - switch (key) - { - case 'q': case 's': - arguments->silent = 1; - break; - case 'v': - arguments->verbose = 1; - break; - case 'o': - arguments->output_file = arg; - break; + case 'b': + puts ("option -b\n"); + break; - case ARGP_KEY_ARG: - if (state->arg_num >= 2) - /* Too many arguments. */ - argp_usage (state); + case 'c': + printf ("option -c with value `%s'\n", optarg); + break; - arguments->args[state->arg_num] = arg; + case 'd': + printf ("option -d with value `%s'\n", optarg); + break; - break; + case 'f': + printf ("option -f with value `%s'\n", optarg); + break; - case ARGP_KEY_END: - if (state->arg_num < 2) - /* Not enough arguments. */ - argp_usage (state); - break; + case '?': + /* `getopt_long' already printed an error message. */ + break; - default: - return ARGP_ERR_UNKNOWN; + default: + abort (); + } } - return 0; - } - - /* Our argp parser. */ - static struct argp argp = { options, parse_opt, args_doc, doc }; - - int main (int argc, char **argv) - { - struct arguments arguments; - - /* Default values. */ - arguments.silent = 0; - arguments.verbose = 0; - arguments.output_file = "-"; - /* Parse our arguments; every option seen by `parse_opt' will - be reflected in `arguments'. */ - argp_parse (&argp, argc, argv, 0, 0, &arguments); + /* Instead of reporting `--verbose' + and `--brief' as they are encountered, + we report the final status resulting from them. */ + if (verbose_flag) + puts ("verbose flag is set"); - printf ("ARG1 = %s\nARG2 = %s\nOUTPUT_FILE = %s\n" - "VERBOSE = %s\nSILENT = %s\n", - arguments.args[0], arguments.args[1], - arguments.output_file, - arguments.verbose ? "yes" : "no", - arguments.silent ? "yes" : "no"); + /* Print any remaining command line arguments (not options). */ + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + putchar ('\n'); + } exit (0); } + + +File: libc.info, Node: Argp, Next: Suboptions, Prev: Getopt, Up: Parsing Program Arguments + +Parsing Program Options with Argp +================================= + + "Argp" is an interface for parsing unix-style argument vectors. +*Note Program Arguments::. + + Argp provides features unavailable in the more commonly used +`getopt' interface. These features include automatically producing +output in response to the `--help' and `--version' options, as +described in the GNU coding standards. Using argp makes it less likely +that programmers will neglect to implement these additional options or +keep them up to date. + + Argp also provides the ability to merge several independently defined +option parsers into one, mediating conflicts between them and making the +result appear seamless. A library can export an argp option parser that +user programs might employ in conjunction with their own option parsers, +resulting in less work for the user programs. Some programs may use +only argument parsers exported by libraries, thereby achieving +consistent and efficient option-parsing for abstractions implemented by +the libraries. + + The header file `' should be included to use argp. + +The `argp_parse' Function +------------------------- + + The main interface to argp is the `argp_parse' function. In many +cases, calling `argp_parse' is the only argument-parsing code needed in +`main'. *Note Program Arguments::. + + - Function: error_t argp_parse (const struct argp *ARGP, int ARGC, + char **ARGV, unsigned FLAGS, int *ARG_INDEX, void *INPUT) + The `argp_parse' function parses the arguments in ARGV, of length + ARGC, using the argp parser ARGP. *Note Argp Parsers::. + + A value of zero is the same as a `struct argp'containing all + zeros. FLAGS is a set of flag bits that modify the parsing + behavior. *Note Argp Flags::. INPUT is passed through to the argp + parser ARGP, and has meaning defined by ARGP. A typical usage is + to pass a pointer to a structure which is used for specifying + parameters to the parser and passing back the results. + + Unless the `ARGP_NO_EXIT' or `ARGP_NO_HELP' flags are included in + FLAGS, calling `argp_parse' may result in the program exiting. + This behavior is true if an error is detected, or when an unknown + option is encountered. *Note Program Termination::. + + If ARG_INDEX is non-null, the index of the first unparsed option + in ARGV is returned as a value. + + The return value is zero for successful parsing, or an error code + (*note Error Codes::) if an error is detected. Different argp + parsers may return arbitrary error codes, but the standard error + codes are: `ENOMEM' if a memory allocation error occurred, or + `EINVAL' if an unknown option or option argument is encountered. + +* Menu: + +* Globals: Argp Global Variables. Global argp parameters. +* Parsers: Argp Parsers. Defining parsers for use with `argp_parse'. +* Flags: Argp Flags. Flags that modify the behavior of `argp_parse'. +* Help: Argp Help. Printing help messages when not parsing. +* Examples: Argp Examples. Simple examples of programs using argp. +* Customization: Argp User Customization. + Users may control the `--help' output format. + + +File: libc.info, Node: Argp Global Variables, Next: Argp Parsers, Up: Argp + +Argp Global Variables +--------------------- + + These variables make it easy for user programs to implement the +`--version' option and provide a bug-reporting address in the `--help' +output. These are implemented in argp by default. + + - Variable: const char * argp_program_version + If defined or set by the user program to a non-zero value, then a + `--version' option is added when parsing with `argp_parse', which + will print the `--version' string followed by a newline and exit. + The exception to this is if the `ARGP_NO_EXIT' flag is used. + + - Variable: const char * argp_program_bug_address + If defined or set by the user program to a non-zero value, + `argp_program_bug_address' should point to a string that will be + printed at the end of the standard output for the `--help' option, + embedded in a sentence that says `Report bugs to ADDRESS.'. + + - Variable: argp_program_version_hook + If defined or set by the user program to a non-zero value, a + `--version' option is added when parsing with `arg_parse', which + prints the program version and exits with a status of zero. This + is not the case if the `ARGP_NO_HELP' flag is used. If the + `ARGP_NO_EXIT' flag is set, the exit behavior of the program is + suppressed or modified, as when the argp parser is going to be + used by other programs. + + It should point to a function with this type of signature: + + void PRINT-VERSION (FILE *STREAM, struct argp_state *STATE) + + *Note Argp Parsing State::, for an explanation of STATE. + + This variable takes precedence over `argp_program_version', and is + useful if a program has version information not easily expressed + in a simple string. + + - Variable: error_t argp_err_exit_status + This is the exit status used when argp exits due to a parsing + error. If not defined or set by the user program, this defaults + to: `EX_USAGE' from `'. diff -durpN glibc-2.2.4/manual/libc.info-42 glibc-2.2.5/manual/libc.info-42 --- glibc-2.2.4/manual/libc.info-42 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-42 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1224 +33,1089 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Argp Example 4, Prev: Argp Example 3, Up: Argp Examples - -A Program Using Multiple Combined Argp Parsers -.............................................. - - This program uses the same features as example 3, but has more -options, and presents more structure in the `--help' output. It also -illustrates how you can `steal' the remainder of the input arguments -past a certain point for programs that accept a list of items. It also -illustrates the KEY value `ARGP_KEY_NO_ARGS', which is only given if no -non-option arguments were supplied to the program. *Note Argp Special -Keys::. - - For structuring help output, two features are used: _headers_ and a -two part option string. The _headers_ are entries in the options -vector. *Note Argp Option Vectors::. The first four fields are zero. -The two part documentation string are in the variable `doc', which -allows documentation both before and after the options. *Note Argp -Parsers::, the two parts of `doc' are separated by a vertical-tab -character (`'\v'', or `'\013''). By convention, the documentation -before the options is a short string stating what the program does, and -after any options it is longer, describing the behavior in more detail. -All documentation strings are automatically filled for output, -although newlines may be included to force a line break at a particular -point. In addition, documentation strings are passed to the `gettext' -function, for possible translation into the current locale. - - /* Argp example #4 - a program with somewhat more complicated options */ - - /* This program uses the same features as example 3, but has more - options, and somewhat more structure in the -help output. It - also shows how you can `steal' the remainder of the input - arguments past a certain point, for programs that accept a - list of items. It also shows the special argp KEY value - ARGP_KEY_NO_ARGS, which is only given if no non-option - arguments were supplied to the program. - - For structuring the help output, two features are used, - *headers* which are entries in the options vector with the - first four fields being zero, and a two part documentation - string (in the variable DOC), which allows documentation both - before and after the options; the two parts of DOC are - separated by a vertical-tab character ('\v', or '\013'). By - convention, the documentation before the options is just a - short string saying what the program does, and that afterwards - is longer, describing the behavior in more detail. All - documentation strings are automatically filled for output, - although newlines may be included to force a line break at a - particular point. All documentation strings are also passed to - the `gettext' function, for possible translation into the - current locale. */ - - #include - #include - #include - - const char *argp_program_version = - "argp-ex4 1.0"; - const char *argp_program_bug_address = - ""; - - /* Program documentation. */ - static char doc[] = - "Argp example #4 -- a program with somewhat more complicated\ - options\ - \vThis part of the documentation comes *after* the options;\ - note that the text is automatically filled, but it's possible\ - to force a line-break, e.g.\n<-- here."; - - /* A description of the arguments we accept. */ - static char args_doc[] = "ARG1 [STRING...]"; - - /* Keys for options without short-options. */ - #define OPT_ABORT 1 /* -abort */ - - /* The options we understand. */ - static struct argp_option options[] = { - {"verbose", 'v', 0, 0, "Produce verbose output" }, - {"quiet", 'q', 0, 0, "Don't produce any output" }, - {"silent", 's', 0, OPTION_ALIAS }, - {"output", 'o', "FILE", 0, - "Output to FILE instead of standard output" }, - - {0,0,0,0, "The following options should be grouped together:" }, - {"repeat", 'r', "COUNT", OPTION_ARG_OPTIONAL, - "Repeat the output COUNT (default 10) times"}, - {"abort", OPT_ABORT, 0, 0, "Abort before showing any output"}, - - { 0 } - }; - - /* Used by `main' to communicate with `parse_opt'. */ - struct arguments - { - char *arg1; /* ARG1 */ - char **strings; /* [STRING...] */ - int silent, verbose, abort; /* `-s', `-v', `--abort' */ - char *output_file; /* FILE arg to `--output' */ - int repeat_count; /* COUNT arg to `--repeat' */ - }; - - /* Parse a single option. */ - static error_t - parse_opt (int key, char *arg, struct argp_state *state) - { - /* Get the `input' argument from `argp_parse', which we - know is a pointer to our arguments structure. */ - struct arguments *arguments = state->input; - - switch (key) - { - case 'q': case 's': - arguments->silent = 1; - break; - case 'v': - arguments->verbose = 1; - break; - case 'o': - arguments->output_file = arg; - break; - case 'r': - arguments->repeat_count = arg ? atoi (arg) : 10; - break; - case OPT_ABORT: - arguments->abort = 1; - break; - - case ARGP_KEY_NO_ARGS: - argp_usage (state); - - case ARGP_KEY_ARG: - /* Here we know that `state->arg_num == 0', since we - force argument parsing to end before any more arguments can - get here. */ - arguments->arg1 = arg; - - /* Now we consume all the rest of the arguments. - `state->next' is the index in `state->argv' of the - next argument to be parsed, which is the first STRING - we're interested in, so we can just use - `&state->argv[state->next]' as the value for - arguments->strings. - - _In addition_, by setting `state->next' to the end - of the arguments, we can force argp to stop parsing here and - return. */ - arguments->strings = &state->argv[state->next]; - state->next = state->argc; - - break; - - default: - return ARGP_ERR_UNKNOWN; - } - return 0; - } - - /* Our argp parser. */ - static struct argp argp = { options, parse_opt, args_doc, doc }; - - int main (int argc, char **argv) - { - int i, j; - struct arguments arguments; - - /* Default values. */ - arguments.silent = 0; - arguments.verbose = 0; - arguments.output_file = "-"; - arguments.repeat_count = 1; - arguments.abort = 0; - - /* Parse our arguments; every option seen by `parse_opt' will be - reflected in `arguments'. */ - argp_parse (&argp, argc, argv, 0, 0, &arguments); - - if (arguments.abort) - error (10, 0, "ABORTED"); - - for (i = 0; i < arguments.repeat_count; i++) - { - printf ("ARG1 = %s\n", arguments.arg1); - printf ("STRINGS = "); - for (j = 0; arguments.strings[j]; j++) - printf (j == 0 ? "%s" : ", %s", arguments.strings[j]); - printf ("\n"); - printf ("OUTPUT_FILE = %s\nVERBOSE = %s\nSILENT = %s\n", - arguments.output_file, - arguments.verbose ? "yes" : "no", - arguments.silent ? "yes" : "no"); - } - - exit (0); - } - - -File: libc.info, Node: Argp User Customization, Prev: Argp Examples, Up: Argp +File: libc.info, Node: Argp Parsers, Next: Argp Flags, Prev: Argp Global Variables, Up: Argp -Argp User Customization +Specifying Argp Parsers ----------------------- - The formatting of argp `--help' output may be controlled to some -extent by a program's users, by setting the `ARGP_HELP_FMT' environment -variable to a comma-separated list of tokens. Whitespace is ignored: - -`dup-args' -`no-dup-args' - These turn "duplicate-argument-mode" on or off. In duplicate - argument mode, if an option that accepts an argument has multiple - names, the argument is shown for each name. Otherwise, it is only - shown for the first long option. A note is subsequently printed - so the user knows that it applies to other names as well. The - default is `no-dup-args', which is less consistent, but prettier. - -`dup-args-note' - -`no-dup-args-note' - These will enable or disable the note informing the user of - suppressed option argument duplication. The default is - `dup-args-note'. - -`short-opt-col=N' - This prints the first short option in column N. The default is 2. + The first argument to the `argp_parse' function is a pointer to a +`struct argp', which is known as an "argp parser": -`long-opt-col=N' - This prints the first long option in column N. The default is 6. + - Data Type: struct argp + This structure specifies how to parse a given set of options and + arguments, perhaps in conjunction with other argp parsers. It has + the following fields: -`doc-opt-col=N' - This prints `documentation options' (*note Argp Option Flags::) in - column N. The default is 2. + `const struct argp_option *options' + A pointer to a vector of `argp_option' structures specifying + which options this argp parser understands; it may be zero if + there are no options at all. *Note Argp Option Vectors::. -`opt-doc-col=N' - This prints the documentation for options starting in column N. - The default is 29. + `argp_parser_t parser' + A pointer to a function that defines actions for this parser; + it is called for each option parsed, and at other + well-defined points in the parsing process. A value of zero + is the same as a pointer to a function that always returns + `ARGP_ERR_UNKNOWN'. *Note Argp Parser Functions::. -`header-col=N' - This will indent the group headers that document groups of options - to column N. The default is 1. + `const char *args_doc' + If non-zero, a string describing what non-option arguments + are called by this parser. This is only used to print the + `Usage:' message. If it contains newlines, the strings + separated by them are considered alternative usage patterns + and printed on separate lines. Lines after the first are + prefixed by ` or: ' instead of `Usage:'. -`usage-indent=N' - This will indent continuation lines in `Usage:' messages to column - N. The default is 12. + `const char *doc' + If non-zero, a string containing extra text to be printed + before and after the options in a long help message, with the + two sections separated by a vertical tab (`'\v'', `'\013'') + character. By convention, the documentation before the + options is just a short string explaining what the program + does. Documentation printed after the options describe + behavior in more detail. -`rmargin=N' - This will word wrap help output at or before column N. The default - is 79. + `const struct argp_child *children' + A pointer to a vector of `argp_children' structures. This + pointer specifies which additional argp parsers should be + combined with this one. *Note Argp Children::. - -File: libc.info, Node: Suboptions, Next: Suboptions Example, Prev: Argp, Up: Parsing Program Arguments + `char *(*help_filter)(int KEY, const char *TEXT, void *INPUT)' + If non-zero, a pointer to a function that filters the output + of help messages. *Note Argp Help Filtering::. -Parsing of Suboptions -..................... + `const char *argp_domain' + If non-zero, the strings used in the argp library are + translated using the domain described by this string. If + zero, the current default domain is used. - Having a single level of options is sometimes not enough. There -might be too many options which have to be available or a set of -options is closely related. - For this case some programs use suboptions. One of the most -prominent programs is certainly `mount'(8). The `-o' option take one -argument which itself is a comma separated list of options. To ease the -programming of code like this the function `getsubopt' is available. + Of the above group, `options', `parser', `args_doc', and the `doc' +fields are usually all that are needed. If an argp parser is defined +as an initialized C variable, only the fields used need be specified in +the initializer. The rest will default to zero due to the way C +structure initialization works. This design is exploited in most argp +structures; the most-used fields are grouped near the beginning, the +unused fields left unspecified. - - Function: int getsubopt (char **OPTIONP, const char* const *TOKENS, - char **VALUEP) - The OPTIONP parameter must be a pointer to a variable containing - the address of the string to process. When the function returns - the reference is updated to point to the next suboption or to the - terminating `\0' character if there is no more suboption available. +* Menu: - The TOKENS parameter references an array of strings containing the - known suboptions. All strings must be `\0' terminated and to mark - the end a null pointer must be stored. When `getsubopt' finds a - possible legal suboption it compares it with all strings available - in the TOKENS array and returns the index in the string as the - indicator. +* Options: Argp Option Vectors. Specifying options in an argp parser. +* Argp Parser Functions:: Defining actions for an argp parser. +* Children: Argp Children. Combining multiple argp parsers. +* Help Filtering: Argp Help Filtering. Customizing help output for an argp parser. - In case the suboption has an associated value introduced by a `=' - character, a pointer to the value is returned in VALUEP. The - string is `\0' terminated. If no argument is available VALUEP is - set to the null pointer. By doing this the caller can check - whether a necessary value is given or whether no unexpected value - is present. + +File: libc.info, Node: Argp Option Vectors, Next: Argp Parser Functions, Prev: Argp Parsers, Up: Argp Parsers - In case the next suboption in the string is not mentioned in the - TOKENS array the starting address of the suboption including a - possible value is returned in VALUEP and the return value of the - function is `-1'. +Specifying Options in an Argp Parser +------------------------------------ - -File: libc.info, Node: Suboptions Example, Prev: Suboptions, Up: Parsing Program Arguments + The `options' field in a `struct argp' points to a vector of `struct +argp_option' structures, each of which specifies an option that the +argp parser supports. Multiple entries may be used for a single option +provided it has multiple names. This should be terminated by an entry +with zero in all fields. Note that when using an initialized C array +for options, writing `{ 0 }' is enough to achieve this. -Parsing of Suboptions Example ------------------------------ + - Data Type: struct argp_option + This structure specifies a single option that an argp parser + understands, as well as how to parse and document that option. It + has the following fields: - The code which might appear in the `mount'(8) program is a perfect -example of the use of `getsubopt': + `const char *name' + The long name for this option, corresponding to the long + option `--NAME'; this field may be zero if this option _only_ + has a short name. To specify multiple names for an option, + additional entries may follow this one, with the + `OPTION_ALIAS' flag set. *Note Argp Option Flags::. - #include - #include - #include - - int do_all; - const char *type; - int read_size; - int write_size; - int read_only; - - enum - { - RO_OPTION = 0, - RW_OPTION, - READ_SIZE_OPTION, - WRITE_SIZE_OPTION, - THE_END - }; - - const char *mount_opts[] = - { - [RO_OPTION] = "ro", - [RW_OPTION] = "rw", - [READ_SIZE_OPTION] = "rsize", - [WRITE_SIZE_OPTION] = "wsize", - [THE_END] = NULL - }; - - int - main (int argc, char *argv[]) - { - char *subopts, *value; - int opt; - - while ((opt = getopt (argc, argv, "at:o:")) != -1) - switch (opt) - { - case 'a': - do_all = 1; - break; - case 't': - type = optarg; - break; - case 'o': - subopts = optarg; - while (*subopts != '\0') - switch (getsubopt (&subopts, mount_opts, &value)) - { - case RO_OPTION: - read_only = 1; - break; - case RW_OPTION: - read_only = 0; - break; - case READ_SIZE_OPTION: - if (value == NULL) - abort (); - read_size = atoi (value); - break; - case WRITE_SIZE_OPTION: - if (value == NULL) - abort (); - write_size = atoi (value); - break; - default: - /* Unknown suboption. */ - printf ("Unknown suboption `%s'\n", value); - break; - } - break; - default: - abort (); - } - - /* Do the real work. */ - - return 0; - } + `int key' + The integer key provided by the current option to the option + parser. If KEY has a value that is a printable ASCII + character (i.e., `isascii (KEY)' is true), it _also_ + specifies a short option `-CHAR', where CHAR is the ASCII + character with the code KEY. - -File: libc.info, Node: Environment Variables, Next: System Calls, Prev: Program Arguments, Up: Program Basics + `const char *arg' + If non-zero, this is the name of an argument associated with + this option, which must be provided (e.g., with the + `--NAME=VALUE' or `-CHAR VALUE' syntaxes), unless the + `OPTION_ARG_OPTIONAL' flag (*note Argp Option Flags::) is + set, in which case it _may_ be provided. -Environment Variables -===================== + `int flags' + Flags associated with this option, some of which are referred + to above. *Note Argp Option Flags::. - When a program is executed, it receives information about the -context in which it was invoked in two ways. The first mechanism uses -the ARGV and ARGC arguments to its `main' function, and is discussed in -*Note Program Arguments::. The second mechanism uses "environment -variables" and is discussed in this section. + `const char *doc' + A documentation string for this option, for printing in help + messages. - The ARGV mechanism is typically used to pass command-line arguments -specific to the particular program being invoked. The environment, on -the other hand, keeps track of information that is shared by many -programs, changes infrequently, and that is less frequently used. + If both the `name' and `key' fields are zero, this string + will be printed tabbed left from the normal option column, + making it useful as a group header. This will be the first + thing printed in its group. In this usage, it's conventional + to end the string with a `:' character. - The environment variables discussed in this section are the same -environment variables that you set using assignments and the `export' -command in the shell. Programs executed from the shell inherit all of -the environment variables from the shell. + `int group' + Group identity for this option. - Standard environment variables are used for information about the -user's home directory, terminal type, current locale, and so on; you -can define additional variables for other purposes. The set of all -environment variables that have values is collectively known as the -"environment". + In a long help message, options are sorted alphabetically + within each group, and the groups presented in the order 0, + 1, 2, ..., N, -M, ..., -2, -1. - Names of environment variables are case-sensitive and must not -contain the character `='. System-defined environment variables are -invariably uppercase. + Every entry in an options array with this field 0 will + inherit the group number of the previous entry, or zero if + it's the first one. If it's a group header with `name' and + `key' fields both zero, the previous entry + 1 is the + default. Automagic options such as `--help' are put into + group -1. - The values of environment variables can be anything that can be -represented as a string. A value must not contain an embedded null -character, since this is assumed to terminate the string. + Note that because of C structure initialization rules, this + field often need not be specified, because 0 is the correct + value. * Menu: -* Environment Access:: How to get and set the values of - environment variables. -* Standard Environment:: These environment variables have - standard interpretations. +* Flags: Argp Option Flags. Flags for options.  -File: libc.info, Node: Environment Access, Next: Standard Environment, Up: Environment Variables +File: libc.info, Node: Argp Option Flags, Up: Argp Option Vectors -Environment Access ------------------- +Flags for Argp Options +...................... - The value of an environment variable can be accessed with the -`getenv' function. This is declared in the header file `stdlib.h'. -All of the following functions can be safely used in multi-threaded -programs. It is made sure that concurrent modifications to the -environment do not lead to errors. + The following flags may be or'd together in the `flags' field of a +`struct argp_option'. These flags control various aspects of how that +option is parsed or displayed in help messages: - - Function: char * getenv (const char *NAME) - This function returns a string that is the value of the environment - variable NAME. You must not modify this string. In some non-Unix - systems not using the GNU library, it might be overwritten by - subsequent calls to `getenv' (but not by any other library - function). If the environment variable NAME is not defined, the - value is a null pointer. +`OPTION_ARG_OPTIONAL' + The argument associated with this option is optional. - - Function: int putenv (char *STRING) - The `putenv' function adds or removes definitions from the - environment. If the STRING is of the form `NAME=VALUE', the - definition is added to the environment. Otherwise, the STRING is - interpreted as the name of an environment variable, and any - definition for this variable in the environment is removed. +`OPTION_HIDDEN' + This option isn't displayed in any help messages. - The difference to the `setenv' function is that the exact string - given as the parameter STRING is put into the environment. If the - user should change the string after the `putenv' call this will - reflect in automatically in the environment. This also requires - that STRING is no automatic variable which scope is left before the - variable is removed from the environment. The same applies of - course to dynamically allocated variables which are freed later. +`OPTION_ALIAS' + This option is an alias for the closest previous non-alias option. + This means that it will be displayed in the same help entry, and + will inherit fields other than `name' and `key' from the option + being aliased. - This function is part of the extended Unix interface. Since it - was also available in old SVID libraries you should define either - _XOPEN_SOURCE or _SVID_SOURCE before including any header. +`OPTION_DOC' + This option isn't actually an option and should be ignored by the + actual option parser. It is an arbitrary section of documentation + that should be displayed in much the same manner as the options. + This is known as a "documentation option". - - Function: int setenv (const char *NAME, const char *VALUE, int - REPLACE) - The `setenv' function can be used to add a new definition to the - environment. The entry with the name NAME is replaced by the - value `NAME=VALUE'. Please note that this is also true if VALUE - is the empty string. To do this a new string is created and the - strings NAME and VALUE are copied. A null pointer for the VALUE - parameter is illegal. If the environment already contains an - entry with key NAME the REPLACE parameter controls the action. If - replace is zero, nothing happens. Otherwise the old entry is - replaced by the new one. + If this flag is set, then the option `name' field is displayed + unmodified (e.g., no `--' prefix is added) at the left-margin where + a _short_ option would normally be displayed, and this + documentation string is left in it's usual place. For purposes of + sorting, any leading whitespace and punctuation is ignored, unless + the first non-whitespace character is `-'. This entry is displayed + after all options, after `OPTION_DOC' entries with a leading `-', + in the same group. - Please note that you cannot remove an entry completely using this - function. +`OPTION_NO_USAGE' + This option shouldn't be included in `long' usage messages, but + should still be included in other help messages. This is intended + for options that are completely documented in an argp's `args_doc' + field. *Note Argp Parsers::. Including this option in the + generic usage list would be redundant, and should be avoided. - This function was originally part of the BSD library but is now - part of the Unix standard. + For instance, if `args_doc' is `"FOO BAR\n-x BLAH"', and the `-x' + option's purpose is to distinguish these two cases, `-x' should + probably be marked `OPTION_NO_USAGE'. - - Function: int unsetenv (const char *NAME) - Using this function one can remove an entry completely from the - environment. If the environment contains an entry with the key - NAME this whole entry is removed. A call to this function is - equivalent to a call to `putenv' when the VALUE part of the string - is empty. + +File: libc.info, Node: Argp Parser Functions, Next: Argp Children, Prev: Argp Option Vectors, Up: Argp Parsers - The function return `-1' if NAME is a null pointer, points to an - empty string, or points to a string containing a `=' character. - It returns `0' if the call succeeded. +Argp Parser Functions +--------------------- - This function was originally part of the BSD library but is now - part of the Unix standard. The BSD version had no return value, - though. + The function pointed to by the `parser' field in a `struct argp' +(*note Argp Parsers::) defines what actions take place in response to +each option or argument parsed. It is also used as a hook, allowing a +parser to perform tasks at certain other points during parsing. - There is one more function to modify the whole environment. This -function is said to be used in the POSIX.9 (POSIX bindings for Fortran -77) and so one should expect it did made it into POSIX.1. But this -never happened. But we still provide this function as a GNU extension -to enable writing standard compliant Fortran environments. + Argp parser functions have the following type signature: - - Function: int clearenv (void) - The `clearenv' function removes all entries from the environment. - Using `putenv' and `setenv' new entries can be added again later. + error_t PARSER (int KEY, char *ARG, struct argp_state *STATE) - If the function is successful it returns `0'. Otherwise the return - value is nonzero. +where the arguments are as follows: - You can deal directly with the underlying representation of -environment objects to add more variables to the environment (for -example, to communicate with another program you are about to execute; -*note Executing a File::). +KEY + For each option that is parsed, PARSER is called with a value of + KEY from that option's `key' field in the option vector. *Note + Argp Option Vectors::. PARSER is also called at other times with + special reserved keys, such as `ARGP_KEY_ARG' for non-option + arguments. *Note Argp Special Keys::. - - Variable: char ** environ - The environment is represented as an array of strings. Each - string is of the format `NAME=VALUE'. The order in which strings - appear in the environment is not significant, but the same NAME - must not appear more than once. The last element of the array is - a null pointer. +ARG + If KEY is an option, ARG is its given value. This defaults to + zero if no value is specified. Only options that have a non-zero + `arg' field can ever have a value. These must _always_ have a + value unless the `OPTION_ARG_OPTIONAL' flag is specified. If the + input being parsed specifies a value for an option that doesn't + allow one, an error results before PARSER ever gets called. - This variable is declared in the header file `unistd.h'. + If KEY is `ARGP_KEY_ARG', ARG is a non-option argument. Other + special keys always have a zero ARG. - If you just want to get the value of an environment variable, use - `getenv'. +STATE + STATE points to a `struct argp_state', containing useful + information about the current parsing state for use by PARSER. + *Note Argp Parsing State::. - Unix systems, and the GNU system, pass the initial value of -`environ' as the third argument to `main'. *Note Program Arguments::. + When PARSER is called, it should perform whatever action is +appropriate for KEY, and return `0' for success, `ARGP_ERR_UNKNOWN' if +the value of KEY is not handled by this parser function, or a unix +error code if a real error occurred. *Note Error Codes::. - -File: libc.info, Node: Standard Environment, Prev: Environment Access, Up: Environment Variables + - Macro: int ARGP_ERR_UNKNOWN + Argp parser functions should return `ARGP_ERR_UNKNOWN' for any KEY + value they do not recognize, or for non-option arguments (`KEY == + ARGP_KEY_ARG') that they are not equipped to handle. -Standard Environment Variables ------------------------------- + A typical parser function uses a switch statement on KEY: - These environment variables have standard meanings. This doesn't -mean that they are always present in the environment; but if these -variables _are_ present, they have these meanings. You shouldn't try -to use these environment variable names for some other purpose. + error_t + parse_opt (int key, char *arg, struct argp_state *state) + { + switch (key) + { + case OPTION_KEY: + ACTION + break; + ... + default: + return ARGP_ERR_UNKNOWN; + } + return 0; + } -`HOME' - This is a string representing the user's "home directory", or - initial default working directory. +* Menu: - The user can set `HOME' to any value. If you need to make sure to - obtain the proper home directory for a particular user, you should - not use `HOME'; instead, look up the user's name in the user - database (*note User Database::). +* Keys: Argp Special Keys. Special values for the KEY argument. +* State: Argp Parsing State. What the STATE argument refers to. +* Functions: Argp Helper Functions. Functions to help during argp parsing. - For most purposes, it is better to use `HOME', precisely because - this lets the user specify the value. + +File: libc.info, Node: Argp Special Keys, Next: Argp Parsing State, Up: Argp Parser Functions -`LOGNAME' - This is the name that the user used to log in. Since the value in - the environment can be tweaked arbitrarily, this is not a reliable - way to identify the user who is running a program; a function like - `getlogin' (*note Who Logged In::) is better for that purpose. +Special Keys for Argp Parser Functions +...................................... - For most purposes, it is better to use `LOGNAME', precisely because - this lets the user specify the value. + In addition to key values corresponding to user options, the KEY +argument to argp parser functions may have a number of other special +values. In the following example ARG and STATE refer to parser +function arguments. *Note Argp Parser Functions::. -`PATH' - A "path" is a sequence of directory names which is used for - searching for a file. The variable `PATH' holds a path used for - searching for programs to be run. +`ARGP_KEY_ARG' + This is not an option at all, but rather a command line argument, + whose value is pointed to by ARG. - The `execlp' and `execvp' functions (*note Executing a File::) use - this environment variable, as do many shells and other utilities - which are implemented in terms of those functions. + When there are multiple parser functions in play due to argp + parsers being combined, it's impossible to know which one will + handle a specific argument. Each is called until one returns 0 or + an error other than `ARGP_ERR_UNKNOWN'; if an argument is not + handled, `argp_parse' immediately returns success, without parsing + any more arguments. - The syntax of a path is a sequence of directory names separated by - colons. An empty string instead of a directory name stands for the - current directory (*note Working Directory::). + Once a parser function returns success for this key, that fact is + recorded, and the `ARGP_KEY_NO_ARGS' case won't be used. + _However_, if while processing the argument a parser function + decrements the `next' field of its STATE argument, the option + won't be considered processed; this is to allow you to actually + modify the argument, perhaps into an option, and have it processed + again. - A typical value for this environment variable might be a string - like: +`ARGP_KEY_ARGS' + If a parser function returns `ARGP_ERR_UNKNOWN' for + `ARGP_KEY_ARG', it is immediately called again with the key + `ARGP_KEY_ARGS', which has a similar meaning, but is slightly more + convenient for consuming all remaining arguments. ARG is 0, and + the tail of the argument vector may be found at `STATE->argv + + STATE->next'. If success is returned for this key, and + `STATE->next' is unchanged, all remaining arguments are considered + to have been consumed. Otherwise, the amount by which + `STATE->next' has been adjusted indicates how many were used. + Here's an example that uses both, for different args: - :/bin:/etc:/usr/bin:/usr/new/X11:/usr/new:/usr/local/bin + ... + case ARGP_KEY_ARG: + if (STATE->arg_num == 0) + /* First argument */ + first_arg = ARG; + else + /* Let the next case parse it. */ + return ARGP_KEY_UNKNOWN; + break; + case ARGP_KEY_ARGS: + remaining_args = STATE->argv + STATE->next; + num_remaining_args = STATE->argc - STATE->next; + break; - This means that if the user tries to execute a program named `foo', - the system will look for files named `foo', `/bin/foo', - `/etc/foo', and so on. The first of these files that exists is - the one that is executed. +`ARGP_KEY_END' + This indicates that there are no more command line arguments. + Parser functions are called in a different order, children first. + This allows each parser to clean up its state for the parent. -`TERM' - This specifies the kind of terminal that is receiving program - output. Some programs can make use of this information to take - advantage of special escape sequences or terminal modes supported - by particular kinds of terminals. Many programs which use the - termcap library (*note Find: (termcap)Finding a Terminal - Description.) use the `TERM' environment variable, for example. +`ARGP_KEY_NO_ARGS' + Because it's common to do some special processing if there aren't + any non-option args, parser functions are called with this key if + they didn't successfully process any non-option arguments. This + is called just before `ARGP_KEY_END', where more general validity + checks on previously parsed arguments take place. -`TZ' - This specifies the time zone. *Note TZ Variable::, for - information about the format of this string and how it is used. +`ARGP_KEY_INIT' + This is passed in before any parsing is done. Afterwards, the + values of each element of the `child_input' field of STATE, if + any, are copied to each child's state to be the initial value of + the `input' when _their_ parsers are called. -`LANG' - This specifies the default locale to use for attribute categories - where neither `LC_ALL' nor the specific environment variable for - that category is set. *Note Locales::, for more information about - locales. +`ARGP_KEY_SUCCESS' + Passed in when parsing has successfully been completed, even if + arguments remain. -`LC_ALL' - If this environment variable is set it overrides the selection for - all the locales done using the other `LC_*' environment variables. - The value of the other `LC_*' environment variables is simply - ignored in this case. +`ARGP_KEY_ERROR' + Passed in if an error has occurred and parsing is terminated. In + this case a call with a key of `ARGP_KEY_SUCCESS' is never made. -`LC_COLLATE' - This specifies what locale to use for string sorting. +`ARGP_KEY_FINI' + The final key ever seen by any parser, even after + `ARGP_KEY_SUCCESS' and `ARGP_KEY_ERROR'. Any resources allocated + by `ARGP_KEY_INIT' may be freed here. At times, certain resources + allocated are to be returned to the caller after a successful + parse. In that case, those particular resources can be freed in + the `ARGP_KEY_ERROR' case. -`LC_CTYPE' - This specifies what locale to use for character sets and character - classification. + In all cases, `ARGP_KEY_INIT' is the first key seen by parser +functions, and `ARGP_KEY_FINI' the last, unless an error was returned +by the parser for `ARGP_KEY_INIT'. Other keys can occur in one the +following orders. OPT refers to an arbitrary option key: -`LC_MESSAGES' - This specifies what locale to use for printing messages and to - parse responses. +OPT... `ARGP_KEY_NO_ARGS' `ARGP_KEY_END' `ARGP_KEY_SUCCESS' + The arguments being parsed did not contain any non-option + arguments. -`LC_MONETARY' - This specifies what locale to use for formatting monetary values. +( OPT | `ARGP_KEY_ARG' )... `ARGP_KEY_END' `ARGP_KEY_SUCCESS' + All non-option arguments were successfully handled by a parser + function. There may be multiple parser functions if multiple argp + parsers were combined. -`LC_NUMERIC' - This specifies what locale to use for formatting numbers. +( OPT | `ARGP_KEY_ARG' )... `ARGP_KEY_SUCCESS' + Some non-option argument went unrecognized. -`LC_TIME' - This specifies what locale to use for formatting date/time values. + This occurs when every parser function returns `ARGP_KEY_UNKNOWN' + for an argument, in which case parsing stops at that argument if + ARG_INDEX is a null pointer. Otherwise an error occurs. -`NLSPATH' - This specifies the directories in which the `catopen' function - looks for message translation catalogs. + In all cases, if a non-null value for ARG_INDEX gets passed to +`argp_parse', the index of the first unparsed command-line argument is +passed back in that value. -`_POSIX_OPTION_ORDER' - If this environment variable is defined, it suppresses the usual - reordering of command line arguments by `getopt' and `argp_parse'. - *Note Argument Syntax::. + If an error occurs and is either detected by argp or because a parser +function returned an error value, each parser is called with +`ARGP_KEY_ERROR'. No further calls are made, except the final call +with `ARGP_KEY_FINI'.  -File: libc.info, Node: System Calls, Next: Program Termination, Prev: Environment Variables, Up: Program Basics - -System Calls -============ - - A system call is a request for service that a program makes of the -kernel. The service is generally something that only the kernel has -the privilege to do, such as doing I/O. Programmers don't normally -need to be concerned with system calls because there are functions in -the GNU C library to do virtually everything that system calls do. -These functions work by making system calls themselves. For example, -there is a system call that changes the permissions of a file, but you -don't need to know about it because you can just use the GNU C -library's `chmod' function. - - System calls are sometimes called kernel calls. - - However, there are times when you want to make a system call -explicitly, and for that, the GNU C library provides the `syscall' -function. `syscall' is harder to use and less portable than functions -like `chmod', but easier and more portable than coding the system call -in assembler instructions. - - `syscall' is most useful when you are working with a system call -which is special to your system or is newer than the GNU C library you -are using. `syscall' is implemented in an entirely generic way; the -function does not know anything about what a particular system call -does or even if it is valid. - - The description of `syscall' in this section assumes a certain -protocol for system calls on the various platforms on which the GNU C -library runs. That protocol is not defined by any strong authority, but -we won't describe it here either because anyone who is coding `syscall' -probably won't accept anything less than kernel and C library source -code as a specification of the interface between them anyway. - - `syscall' is declared in `unistd.h'. +File: libc.info, Node: Argp Helper Functions, Prev: Argp Parsing State, Up: Argp Parser Functions - - Function: long int syscall (long int SYSNO, ...) - `syscall' performs a generic system call. +Functions For Use in Argp Parsers +................................. - SYSNO is the system call number. Each kind of system call is - identified by a number. Macros for all the possible system call - numbers are defined in `sys/syscall.h' + Argp provides a number of functions available to the user of argp +(*note Argp Parser Functions::), mostly for producing error messages. +These take as their first argument the STATE argument to the parser +function. *Note Argp Parsing State::. - The remaining arguments are the arguments for the system call, in - order, and their meanings depend on the kind of system call. Each - kind of system call has a definite number of arguments, from zero - to five. If you code more arguments than the system call takes, - the extra ones to the right are ignored. + - Function: void argp_usage (const struct argp_state *STATE) + Outputs the standard usage message for the argp parser referred to + by STATE to `STATE->err_stream' and terminate the program with + `exit (argp_err_exit_status)'. *Note Argp Global Variables::. - The return value is the return value from the system call, unless - the system call failed. In that case, `syscall' returns `-1' and - sets `errno' to an error code that the system call returned. Note - that system calls do not return `-1' when they succeed. + - Function: void argp_error (const struct argp_state *STATE, const + char *FMT, ...) + Prints the printf format string FMT and following args, preceded + by the program name and `:', and followed by a `Try ... --help' + message, and terminates the program with an exit status of + `argp_err_exit_status'. *Note Argp Global Variables::. - If you specify an invalid SYSNO, `syscall' returns `-1' with - `errno' = `ENOSYS'. + - Function: void argp_failure (const struct argp_state *STATE, int + STATUS, int ERRNUM, const char *FMT, ...) + Similar to the standard gnu error-reporting function `error', this + prints the program name and `:', the printf format string FMT, and + the appropriate following args. If it is non-zero, the standard + unix error text for ERRNUM is printed. If STATUS is non-zero, it + terminates the program with that value as its exit status. - Example: + The difference between `argp_failure' and `argp_error' is that + `argp_error' is for _parsing errors_, whereas `argp_failure' is + for other problems that occur during parsing but don't reflect a + syntactic problem with the input, such as illegal values for + options, bad phase of the moon, etc. + - Function: void argp_state_help (const struct argp_state *STATE, FILE + *STREAM, unsigned FLAGS) + Outputs a help message for the argp parser referred to by STATE, + to STREAM. The FLAGS argument determines what sort of help + message is produced. *Note Argp Help Flags::. - #include - #include - #include - - ... - - int rc; - - rc = syscall(SYS_chmod, "/etc/passwd", 0444); - - if (rc == -1) - fprintf(stderr, "chmod failed, errno = %d\n", errno); + Error output is sent to `STATE->err_stream', and the program name +printed is `STATE->name'. - This, if all the compatibility stars are aligned, is equivalent to - the following preferable code: + The output or program termination behavior of these functions may be +suppressed if the `ARGP_NO_EXIT' or `ARGP_NO_ERRS' flags are passed to +`argp_parse'. *Note Argp Flags::. + This behavior is useful if an argp parser is exported for use by +other programs (e.g., by a library), and may be used in a context where +it is not desirable to terminate the program in response to parsing +errors. In argp parsers intended for such general use, and for the +case where the program _doesn't_ terminate, calls to any of these +functions should be followed by code that returns the appropriate error +code: - #include - #include - #include - - ... - - int rc; - - rc = chmod("/etc/passwd", 0444); - if (rc == -1) - fprintf(stderr, "chmod failed, errno = %d\n", errno); + if (BAD ARGUMENT SYNTAX) + { + argp_usage (STATE); + return EINVAL; + } +If a parser function will _only_ be used when `ARGP_NO_EXIT' is not +set, the return may be omitted.  -File: libc.info, Node: Program Termination, Prev: System Calls, Up: Program Basics - -Program Termination -=================== - - The usual way for a program to terminate is simply for its `main' -function to return. The "exit status value" returned from the `main' -function is used to report information back to the process's parent -process or shell. - - A program can also terminate normally by calling the `exit' function. +File: libc.info, Node: Argp Parsing State, Next: Argp Helper Functions, Prev: Argp Special Keys, Up: Argp Parser Functions - In addition, programs can be terminated by signals; this is -discussed in more detail in *Note Signal Handling::. The `abort' -function causes a signal that kills the program. +Argp Parsing State +.................. -* Menu: + The third argument to argp parser functions (*note Argp Parser +Functions::) is a pointer to a `struct argp_state', which contains +information about the state of the option parsing. -* Normal Termination:: If a program calls `exit', a - process terminates normally. -* Exit Status:: The `exit status' provides information - about why the process terminated. -* Cleanups on Exit:: A process can run its own cleanup - functions upon normal termination. -* Aborting a Program:: The `abort' function causes - abnormal program termination. -* Termination Internals:: What happens when a process terminates. + - Data Type: struct argp_state + This structure has the following fields, which may be modified as + noted: - -File: libc.info, Node: Normal Termination, Next: Exit Status, Up: Program Termination + `const struct argp *const root_argp' + The top level argp parser being parsed. Note that this is + often _not_ the same `struct argp' passed into `argp_parse' by + the invoking program. *Note Argp::. It is an internal argp + parser that contains options implemented by `argp_parse' + itself, such as `--help'. -Normal Termination ------------------- + `int argc' + `char **argv' + The argument vector being parsed. This may be modified. - A process terminates normally when its program signals it is done by -calling `exit'. Returning from `main' is equivalent to calling `exit', -and the value that `main' returns is used as the argument to `exit'. + `int next' + The index in `argv' of the next argument to be parsed. This + may be modified. - - Function: void exit (int STATUS) - The `exit' function tells the system that the program is done, - which causes it to terminate the process. + One way to consume all remaining arguments in the input is to + set `STATE->next = STATE->argc', perhaps after recording the + value of the `next' field to find the consumed arguments. The + current option can be re-parsed immediately by decrementing + this field, then modifying `STATE->argv[STATE->next]' to + reflect the option that should be reexamined. - STATUS is the program's exit status, which becomes part of the - process' termination status. This function does not return. + `unsigned flags' + The flags supplied to `argp_parse'. These may be modified, + although some flags may only take effect when `argp_parse' is + first invoked. *Note Argp Flags::. - Normal termination causes the following actions: + `unsigned arg_num' + While calling a parsing function with the KEY argument + `ARGP_KEY_ARG', this represents the number of the current arg, + starting at 0. It is incremented after each `ARGP_KEY_ARG' + call returns. At all other times, this is the number of + `ARGP_KEY_ARG' arguments that have been processed. - 1. Functions that were registered with the `atexit' or `on_exit' - functions are called in the reverse order of their registration. - This mechanism allows your application to specify its own - "cleanup" actions to be performed at program termination. - Typically, this is used to do things like saving program state - information in a file, or unlocking locks in shared data bases. + `int quoted' + If non-zero, the index in `argv' of the first argument + following a special `--' argument. This prevents anything + that follows from being interpreted as an option. It is only + set after argument parsing has proceeded past this point. - 2. All open streams are closed, writing out any buffered output data. - See *Note Closing Streams::. In addition, temporary files opened - with the `tmpfile' function are removed; see *Note Temporary - Files::. + `void *input' + An arbitrary pointer passed in from the caller of + `argp_parse', in the INPUT argument. - 3. `_exit' is called, terminating the program. *Note Termination - Internals::. + `void **child_inputs' + These are values that will be passed to child parsers. This + vector will be the same length as the number of children in + the current parser. Each child parser will be given the + value of `STATE->child_inputs[I]' as _its_ `STATE->input' + field, where I is the index of the child in the this parser's + `children' field. *Note Argp Children::. - -File: libc.info, Node: Exit Status, Next: Cleanups on Exit, Prev: Normal Termination, Up: Program Termination + `void *hook' + For the parser function's use. Initialized to 0, but + otherwise ignored by argp. -Exit Status ------------ + `char *name' + The name used when printing messages. This is initialized to + `argv[0]', or `program_invocation_name' if `argv[0]' is + unavailable. - When a program exits, it can return to the parent process a small -amount of information about the cause of termination, using the "exit -status". This is a value between 0 and 255 that the exiting process -passes as an argument to `exit'. + `FILE *err_stream' + `FILE *out_stream' + The stdio streams used when argp prints. Error messages are + printed to `err_stream', all other output, such as `--help' + output) to `out_stream'. These are initialized to `stderr' + and `stdout' respectively. *Note Standard Streams::. - Normally you should use the exit status to report very broad -information about success or failure. You can't provide a lot of -detail about the reasons for the failure, and most parent processes -would not want much detail anyway. + `void *pstate' + Private, for use by the argp implementation. - There are conventions for what sorts of status values certain -programs should return. The most common convention is simply 0 for -success and 1 for failure. Programs that perform comparison use a -different convention: they use status 1 to indicate a mismatch, and -status 2 to indicate an inability to compare. Your program should -follow an existing convention if an existing convention makes sense for -it. + +File: libc.info, Node: Argp Children, Next: Argp Help Filtering, Prev: Argp Parser Functions, Up: Argp Parsers - A general convention reserves status values 128 and up for special -purposes. In particular, the value 128 is used to indicate failure to -execute another program in a subprocess. This convention is not -universally obeyed, but it is a good idea to follow it in your programs. +Combining Multiple Argp Parsers +------------------------------- - *Warning:* Don't try to use the number of errors as the exit status. -This is actually not very useful; a parent process would generally not -care how many errors occurred. Worse than that, it does not work, -because the status value is truncated to eight bits. Thus, if the -program tried to report 256 errors, the parent would receive a report -of 0 errors--that is, success. + The `children' field in a `struct argp' enables other argp parsers +to be combined with the referencing one for the parsing of a single set +of arguments. This field should point to a vector of `struct +argp_child', which is terminated by an entry having a value of zero in +the `argp' field. - For the same reason, it does not work to use the value of `errno' as -the exit status--these can exceed 255. + Where conflicts between combined parsers arise, as when two specify +an option with the same name, the parser conflicts are resolved in +favor of the parent argp parser(s), or the earlier of the argp parsers +in the list of children. - *Portability note:* Some non-POSIX systems use different conventions -for exit status values. For greater portability, you can use the -macros `EXIT_SUCCESS' and `EXIT_FAILURE' for the conventional status -value for success and failure, respectively. They are declared in the -file `stdlib.h'. + - Data Type: struct argp_child + An entry in the list of subsidiary argp parsers pointed to by the + `children' field in a `struct argp'. The fields are as follows: - - Macro: int EXIT_SUCCESS - This macro can be used with the `exit' function to indicate - successful program completion. + `const struct argp *argp' + The child argp parser, or zero to end of the list. - On POSIX systems, the value of this macro is `0'. On other - systems, the value might be some other (possibly non-constant) - integer expression. + `int flags' + Flags for this child. - - Macro: int EXIT_FAILURE - This macro can be used with the `exit' function to indicate - unsuccessful program completion in a general sense. + `const char *header' + If non-zero, this is an optional header to be printed within + help output before the child options. As a side-effect, a + non-zero value forces the child options to be grouped + together. To achieve this effect without actually printing a + header string, use a value of `""'. As with header strings + specified in an option entry, the conventional value of the + last character is `:'. *Note Argp Option Vectors::. - On POSIX systems, the value of this macro is `1'. On other - systems, the value might be some other (possibly non-constant) - integer expression. Other nonzero status values also indicate - failures. Certain programs use different nonzero status values to - indicate particular kinds of "non-success". For example, `diff' - uses status value `1' to mean that the files are different, and - `2' or more to mean that there was difficulty in opening the files. + `int group' + This is where the child options are grouped relative to the + other `consolidated' options in the parent argp parser. The + values are the same as the `group' field in `struct + argp_option'. *Note Argp Option Vectors::. All + child-groupings follow parent options at a particular group + level. If both this field and `header' are zero, then the + child's options aren't grouped together, they are merged with + parent options at the parent option group level. - Don't confuse a program's exit status with a process' termination -status. There are lots of ways a process can terminate besides having -it's program finish. In the event that the process termination _is_ -caused by program termination (i.e. `exit'), though, the program's exit -status becomes part of the process' termination status.  -File: libc.info, Node: Cleanups on Exit, Next: Aborting a Program, Prev: Exit Status, Up: Program Termination - -Cleanups on Exit ----------------- +File: libc.info, Node: Argp Flags, Next: Argp Help, Prev: Argp Parsers, Up: Argp - Your program can arrange to run its own cleanup functions if normal -termination happens. If you are writing a library for use in various -application programs, then it is unreliable to insist that all -applications call the library's cleanup functions explicitly before -exiting. It is much more robust to make the cleanup invisible to the -application, by setting up a cleanup function in the library itself -using `atexit' or `on_exit'. +Flags for `argp_parse' +---------------------- - - Function: int atexit (void (*FUNCTION) (void)) - The `atexit' function registers the function FUNCTION to be called - at normal program termination. The FUNCTION is called with no - arguments. + The default behavior of `argp_parse' is designed to be convenient +for the most common case of parsing program command line argument. To +modify these defaults, the following flags may be or'd together in the +FLAGS argument to `argp_parse': - The return value from `atexit' is zero on success and nonzero if - the function cannot be registered. +`ARGP_PARSE_ARGV0' + Don't ignore the first element of the ARGV argument to + `argp_parse'. Unless `ARGP_NO_ERRS' is set, the first element of + the argument vector is skipped for option parsing purposes, as it + corresponds to the program name in a command line. - - Function: int on_exit (void (*FUNCTION)(int STATUS, void *ARG), void - *ARG) - This function is a somewhat more powerful variant of `atexit'. It - accepts two arguments, a function FUNCTION and an arbitrary - pointer ARG. At normal program termination, the FUNCTION is - called with two arguments: the STATUS value passed to `exit', and - the ARG. +`ARGP_NO_ERRS' + Don't print error messages for unknown options to `stderr'; unless + this flag is set, `ARGP_PARSE_ARGV0' is ignored, as `argv[0]' is + used as the program name in the error messages. This flag implies + `ARGP_NO_EXIT'. This is based on the assumption that silent + exiting upon errors is bad behavior. - This function is included in the GNU C library only for - compatibility for SunOS, and may not be supported by other - implementations. +`ARGP_NO_ARGS' + Don't parse any non-option args. Normally these are parsed by + calling the parse functions with a key of `ARGP_KEY_ARG', the + actual argument being the value. This flag needn't normally be + set, as the default behavior is to stop parsing as soon as an + argument fails to be parsed. *Note Argp Parser Functions::. - Here's a trivial program that illustrates the use of `exit' and -`atexit': +`ARGP_IN_ORDER' + Parse options and arguments in the same order they occur on the + command line. Normally they're rearranged so that all options + come first. - #include - #include - - void - bye (void) - { - puts ("Goodbye, cruel world...."); - } - - int - main (void) - { - atexit (bye); - exit (EXIT_SUCCESS); - } +`ARGP_NO_HELP' + Don't provide the standard long option `--help', which ordinarily + causes usage and option help information to be output to `stdout' + and `exit (0)'. -When this program is executed, it just prints the message and exits. +`ARGP_NO_EXIT' + Don't exit on errors, although they may still result in error + messages. - -File: libc.info, Node: Aborting a Program, Next: Termination Internals, Prev: Cleanups on Exit, Up: Program Termination +`ARGP_LONG_ONLY' + Use the gnu getopt `long-only' rules for parsing arguments. This + allows long-options to be recognized with only a single `-' (i.e. + `-help'). This results in a less useful interface, and its use is + discouraged as it conflicts with the way most GNU programs work as + well as the GNU coding standards. -Aborting a Program ------------------- +`ARGP_SILENT' + Turns off any message-printing/exiting options, specifically + `ARGP_NO_EXIT', `ARGP_NO_ERRS', and `ARGP_NO_HELP'. - You can abort your program using the `abort' function. The prototype -for this function is in `stdlib.h'. + +File: libc.info, Node: Argp Help Filtering, Prev: Argp Children, Up: Argp Parsers - - Function: void abort (void) - The `abort' function causes abnormal program termination. This - does not execute cleanup functions registered with `atexit' or - `on_exit'. +Customizing Argp Help Output +---------------------------- - This function actually terminates the process by raising a - `SIGABRT' signal, and your program can include a handler to - intercept this signal; see *Note Signal Handling::. + The `help_filter' field in a `struct argp' is a pointer to a +function that filters the text of help messages before displaying them. +They have a function signature like: - *Future Change Warning:* Proposed Federal censorship regulations may -prohibit us from giving you information about the possibility of -calling this function. We would be required to say that this is not an -acceptable way of terminating a program. + char *HELP-FILTER (int KEY, const char *TEXT, void *INPUT) - -File: libc.info, Node: Termination Internals, Prev: Aborting a Program, Up: Program Termination +Where KEY is either a key from an option, in which case TEXT is that +option's help text. *Note Argp Option Vectors::. Alternately, one of +the special keys with names beginning with `ARGP_KEY_HELP_' might be +used, describing which other help text TEXT will contain. *Note Argp +Help Filter Keys::. -Termination Internals ---------------------- + The function should return either TEXT if it remains as-is, or a +replacement string allocated using `malloc'. This will be either be +freed by argp or zero, which prints nothing. The value of TEXT is +supplied _after_ any translation has been done, so if any of the +replacement text needs translation, it will be done by the filter +function. INPUT is either the input supplied to `argp_parse' or it is +zero, if `argp_help' was called directly by the user. - The `_exit' function is the primitive used for process termination -by `exit'. It is declared in the header file `unistd.h'. +* Menu: - - Function: void _exit (int STATUS) - The `_exit' function is the primitive for causing a process to - terminate with status STATUS. Calling this function does not - execute cleanup functions registered with `atexit' or `on_exit'. +* Keys: Argp Help Filter Keys. Special KEY values for help filter functions. - - Function: void _Exit (int STATUS) - The `_Exit' function is the ISO C equivalent to `_exit'. The - ISO C committee members were not sure whether the definitions of - `_exit' and `_Exit' were compatible so they have not used the - POSIX name. + +File: libc.info, Node: Argp Help Filter Keys, Up: Argp Help Filtering - This function was introduced in ISO C99 and is declared in - `stdlib.h'. +Special Keys for Argp Help Filter Functions +........................................... - When a process terminates for any reason--either because the program -terminates, or as a result of a signal--the following things happen: + The following special values may be passed to an argp help filter +function as the first argument in addition to key values for user +options. They specify which help text the TEXT argument contains: - * All open file descriptors in the process are closed. *Note - Low-Level I/O::. Note that streams are not flushed automatically - when the process terminates; see *Note I/O on Streams::. +`ARGP_KEY_HELP_PRE_DOC' + The help text preceding options. - * A process exit status is saved to be reported back to the parent - process via `wait' or `waitpid'; see *Note Process Completion::. - If the program exited, this status includes as its low-order 8 - bits the program exit status. +`ARGP_KEY_HELP_POST_DOC' + The help text following options. - * Any child processes of the process being terminated are assigned a - new parent process. (On most systems, including GNU, this is the - `init' process, with process ID 1.) +`ARGP_KEY_HELP_HEADER' + The option header string. - * A `SIGCHLD' signal is sent to the parent process. +`ARGP_KEY_HELP_EXTRA' + This is used after all other documentation; TEXT is zero for this + key. - * If the process is a session leader that has a controlling - terminal, then a `SIGHUP' signal is sent to each process in the - foreground job, and the controlling terminal is disassociated from - that session. *Note Job Control::. +`ARGP_KEY_HELP_DUP_ARGS_NOTE' + The explanatory note printed when duplicate option arguments have + been suppressed. - * If termination of a process causes a process group to become - orphaned, and any member of that process group is stopped, then a - `SIGHUP' signal and a `SIGCONT' signal are sent to each process in - the group. *Note Job Control::. +`ARGP_KEY_HELP_ARGS_DOC' + The argument doc string; formally the `args_doc' field from the + argp parser. *Note Argp Parsers::.  -File: libc.info, Node: Processes, Next: Job Control, Prev: Program Basics, Up: Top - -Processes -********* +File: libc.info, Node: Argp Help, Next: Argp Examples, Prev: Argp Flags, Up: Argp - "Processes" are the primitive units for allocation of system -resources. Each process has its own address space and (usually) one -thread of control. A process executes a program; you can have multiple -processes executing the same program, but each process has its own copy -of the program within its own address space and executes it -independently of the other copies. +The `argp_help' Function +------------------------ - Processes are organized hierarchically. Each process has a "parent -process" which explicitly arranged to create it. The processes created -by a given parent are called its "child processes". A child inherits -many of its attributes from the parent process. + Normally programs using argp need not be written with particular +printing argument-usage-type help messages in mind as the standard +`--help' option is handled automatically by argp. Typical error cases +can be handled using `argp_usage' and `argp_error'. *Note Argp Helper +Functions::. However, if it's desirable to print a help message in +some context other than parsing the program options, argp offers the +`argp_help' interface. - This chapter describes how a program can create, terminate, and -control child processes. Actually, there are three distinct operations -involved: creating a new child process, causing the new process to -execute a program, and coordinating the completion of the child process -with the original program. + - Function: void argp_help (const struct argp *ARGP, FILE *STREAM, + unsigned FLAGS, char *NAME) + This outputs a help message for the argp parser ARGP to STREAM. + The type of messages printed will be determined by FLAGS. - The `system' function provides a simple, portable mechanism for -running another program; it does all three steps automatically. If you -need more control over the details of how this is done, you can use the -primitive functions to do each step individually instead. + Any options such as `--help' that are implemented automatically by + argp itself will _not_ be present in the help output; for this + reason it is best to use `argp_state_help' if calling from within + an argp parser function. *Note Argp Helper Functions::. * Menu: -* Running a Command:: The easy way to run another program. -* Process Creation Concepts:: An overview of the hard way to do it. -* Process Identification:: How to get the process ID of a process. -* Creating a Process:: How to fork a child process. -* Executing a File:: How to make a process execute another program. -* Process Completion:: How to tell when a child process has completed. -* Process Completion Status:: How to interpret the status value - returned from a child process. -* BSD Wait Functions:: More functions, for backward compatibility. -* Process Creation Example:: A complete example program. +* Flags: Argp Help Flags. Specifying what sort of help message to print.  -File: libc.info, Node: Running a Command, Next: Process Creation Concepts, Up: Processes - -Running a Command -================= - - The easy way to run another program is to use the `system' function. -This function does all the work of running a subprogram, but it -doesn't give you much control over the details: you have to wait until -the subprogram terminates before you can do anything else. - - - Function: int system (const char *COMMAND) - This function executes COMMAND as a shell command. In the GNU C - library, it always uses the default shell `sh' to run the command. - In particular, it searches the directories in `PATH' to find - programs to execute. The return value is `-1' if it wasn't - possible to create the shell process, and otherwise is the status - of the shell process. *Note Process Completion::, for details on - how this status code can be interpreted. - - If the COMMAND argument is a null pointer, a return value of zero - indicates that no command processor is available. +File: libc.info, Node: Argp Help Flags, Up: Argp Help - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `system' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `system' should be protected using cancellation handlers. +Flags for the `argp_help' Function +---------------------------------- - The `system' function is declared in the header file `stdlib.h'. + When calling `argp_help' (*note Argp Help::) or `argp_state_help' +(*note Argp Helper Functions::) the exact output is determined by the +FLAGS argument. This should consist of any of the following flags, +or'd together: - *Portability Note:* Some C implementations may not have any notion -of a command processor that can execute other programs. You can -determine whether a command processor exists by executing -`system (NULL)'; if the return value is nonzero, a command processor is -available. +`ARGP_HELP_USAGE' + A unix `Usage:' message that explicitly lists all options. - The `popen' and `pclose' functions (*note Pipe to a Subprocess::) -are closely related to the `system' function. They allow the parent -process to communicate with the standard input and output channels of -the command being executed. +`ARGP_HELP_SHORT_USAGE' + A unix `Usage:' message that displays an appropriate placeholder to + indicate where the options go; useful for showing the non-option + argument syntax. - -File: libc.info, Node: Process Creation Concepts, Next: Process Identification, Prev: Running a Command, Up: Processes +`ARGP_HELP_SEE' + A `Try ... for more help' message; `...' contains the program name + and `--help'. -Process Creation Concepts -========================= +`ARGP_HELP_LONG' + A verbose option help message that gives each option available + along with its documentation string. - This section gives an overview of processes and of the steps -involved in creating a process and making it run another program. +`ARGP_HELP_PRE_DOC' + The part of the argp parser doc string preceding the verbose + option help. - Each process is named by a "process ID" number. A unique process ID -is allocated to each process when it is created. The "lifetime" of a -process ends when its termination is reported to its parent process; at -that time, all of the process resources, including its process ID, are -freed. +`ARGP_HELP_POST_DOC' + The part of the argp parser doc string that following the verbose + option help. - Processes are created with the `fork' system call (so the operation -of creating a new process is sometimes called "forking" a process). -The "child process" created by `fork' is a copy of the original "parent -process", except that it has its own process ID. +`ARGP_HELP_DOC' + `(ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)' - After forking a child process, both the parent and child processes -continue to execute normally. If you want your program to wait for a -child process to finish executing before continuing, you must do this -explicitly after the fork operation, by calling `wait' or `waitpid' -(*note Process Completion::). These functions give you limited -information about why the child terminated--for example, its exit -status code. +`ARGP_HELP_BUG_ADDR' + A message that prints where to report bugs for this program, if the + `argp_program_bug_address' variable contains this information. - A newly forked child process continues to execute the same program as -its parent process, at the point where the `fork' call returns. You -can use the return value from `fork' to tell whether the program is -running in the parent process or the child. +`ARGP_HELP_LONG_ONLY' + This will modify any output to reflect the `ARGP_LONG_ONLY' mode. - Having several processes run the same program is only occasionally -useful. But the child can execute another program using one of the -`exec' functions; see *Note Executing a File::. The program that the -process is executing is called its "process image". Starting execution -of a new program causes the process to forget all about its previous -process image; when the new program exits, the process exits too, -instead of returning to the previous process image. + The following flags are only understood when used with +`argp_state_help'. They control whether the function returns after +printing its output, or terminates the program: - -File: libc.info, Node: Process Identification, Next: Creating a Process, Prev: Process Creation Concepts, Up: Processes +`ARGP_HELP_EXIT_ERR' + This will terminate the program with `exit (argp_err_exit_status)'. -Process Identification -====================== +`ARGP_HELP_EXIT_OK' + This will terminate the program with `exit (0)'. - The `pid_t' data type represents process IDs. You can get the -process ID of a process by calling `getpid'. The function `getppid' -returns the process ID of the parent of the current process (this is -also known as the "parent process ID"). Your program should include -the header files `unistd.h' and `sys/types.h' to use these functions. + The following flags are combinations of the basic flags for printing +standard messages: - - Data Type: pid_t - The `pid_t' data type is a signed integer type which is capable of - representing a process ID. In the GNU library, this is an `int'. +`ARGP_HELP_STD_ERR' + Assuming that an error message for a parsing error has printed, + this prints a message on how to get help, and terminates the + program with an error. - - Function: pid_t getpid (void) - The `getpid' function returns the process ID of the current - process. +`ARGP_HELP_STD_USAGE' + This prints a standard usage message and terminates the program + with an error. This is used when no other specific error messages + are appropriate or available. - - Function: pid_t getppid (void) - The `getppid' function returns the process ID of the parent of the - current process. +`ARGP_HELP_STD_HELP' + This prints the standard response for a `--help' option, and + terminates the program successfully.  -File: libc.info, Node: Creating a Process, Next: Executing a File, Prev: Process Identification, Up: Processes +File: libc.info, Node: Argp Examples, Next: Argp User Customization, Prev: Argp Help, Up: Argp -Creating a Process -================== +Argp Examples +------------- - The `fork' function is the primitive for creating a process. It is -declared in the header file `unistd.h'. + These example programs demonstrate the basic usage of argp. - - Function: pid_t fork (void) - The `fork' function creates a new process. +* Menu: - If the operation is successful, there are then both parent and - child processes and both see `fork' return, but with different - values: it returns a value of `0' in the child process and returns - the child's process ID in the parent process. +* 1: Argp Example 1. A minimal program using argp. +* 2: Argp Example 2. A program using only default options. +* 3: Argp Example 3. A simple program with user options. +* 4: Argp Example 4. Combining multiple argp parsers. - If process creation failed, `fork' returns a value of `-1' in the - parent process. The following `errno' error conditions are - defined for `fork': + +File: libc.info, Node: Argp Example 1, Next: Argp Example 2, Up: Argp Examples - `EAGAIN' - There aren't enough system resources to create another - process, or the user already has too many processes running. - This means exceeding the `RLIMIT_NPROC' resource limit, which - can usually be increased; *note Limits on Resources::. +A Minimal Program Using Argp +............................ - `ENOMEM' - The process requires more space than the system can supply. + This is perhaps the smallest program possible that uses argp. It +won't do much except give an error messages and exit when there are any +arguments, and prints a rather pointless message for `--help'. - The specific attributes of the child process that differ from the -parent process are: + /* Argp example #1 - a minimal program using argp */ + + /* This is (probably) the smallest possible program that + uses argp. It won't do much except give an error + messages and exit when there are any arguments, and print + a (rather pointless) messages for -help. */ + + #include + + int main (int argc, char **argv) + { + argp_parse (0, argc, argv, 0, 0, 0); + exit (0); + } - * The child process has its own unique process ID. + +File: libc.info, Node: Argp Example 2, Next: Argp Example 3, Prev: Argp Example 1, Up: Argp Examples - * The parent process ID of the child process is the process ID of its - parent process. +A Program Using Argp with Only Default Options +.............................................. - * The child process gets its own copies of the parent process's open - file descriptors. Subsequently changing attributes of the file - descriptors in the parent process won't affect the file - descriptors in the child, and vice versa. *Note Control - Operations::. However, the file position associated with each - descriptor is shared by both processes; *note File Position::. + This program doesn't use any options or arguments, it uses argp to be +compliant with the GNU standard command line format. - * The elapsed processor times for the child process are set to zero; - see *Note Processor Time::. + In addition to giving no arguments and implementing a `--help' +option, this example has a `--version' option, which will put the given +documentation string and bug address in the `--help' output, as per GNU +standards. - * The child doesn't inherit file locks set by the parent process. - *Note Control Operations::. + The variable `argp' contains the argument parser specification. +Adding fields to this structure is the way most parameters are passed +to `argp_parse'. The first three fields are normally used, but they +are not in this small program. There are also two global variables +that argp can use defined here, `argp_program_version' and +`argp_program_bug_address'. They are considered global variables +because they will almost always be constant for a given program, even +if they use different argument parsers for various tasks. - * The child doesn't inherit alarms set by the parent process. *Note - Setting an Alarm::. + /* Argp example #2 - a pretty minimal program using argp */ + + /* This program doesn't use any options or arguments, but uses + argp to be compliant with the GNU standard command line + format. + + In addition to making sure no arguments are given, and + implementing a -help option, this example will have a + -version option, and will put the given documentation string + and bug address in the -help output, as per GNU standards. + + The variable ARGP contains the argument parser specification; + adding fields to this structure is the way most parameters are + passed to argp_parse (the first three fields are usually used, + but not in this small program). There are also two global + variables that argp knows about defined here, + ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are + global variables because they will almost always be constant + for a given program, even if it uses different argument + parsers for various tasks). */ + + #include + + const char *argp_program_version = + "argp-ex2 1.0"; + const char *argp_program_bug_address = + ""; + + /* Program documentation. */ + static char doc[] = + "Argp example #2 -- a pretty minimal program using argp"; + + /* Our argument parser. The `options', `parser', and + `args_doc' fields are zero because we have neither options or + arguments; `doc' and `argp_program_bug_address' will be + used in the output for `--help', and the `--version' + option will print out `argp_program_version'. */ + static struct argp argp = { 0, 0, 0, doc }; + + int main (int argc, char **argv) + { + argp_parse (&argp, argc, argv, 0, 0, 0); + exit (0); + } - * The set of pending signals (*note Delivery of Signal::) for the - child process is cleared. (The child process inherits its mask of - blocked signals and signal actions from the parent process.) + +File: libc.info, Node: Argp Example 3, Next: Argp Example 4, Prev: Argp Example 2, Up: Argp Examples - - Function: pid_t vfork (void) - The `vfork' function is similar to `fork' but on some systems it - is more efficient; however, there are restrictions you must follow - to use it safely. +A Program Using Argp with User Options +...................................... - While `fork' makes a complete copy of the calling process's address - space and allows both the parent and child to execute - independently, `vfork' does not make this copy. Instead, the - child process created with `vfork' shares its parent's address - space until it calls `_exit' or one of the `exec' functions. In - the meantime, the parent process suspends execution. + This program uses the same features as example 2, adding user options +and arguments. - You must be very careful not to allow the child process created - with `vfork' to modify any global data or even local variables - shared with the parent. Furthermore, the child process cannot - return from (or do a long jump out of) the function that called - `vfork'! This would leave the parent process's control - information very confused. If in doubt, use `fork' instead. + We now use the first four fields in `argp' (*note Argp Parsers::) +and specify `parse_opt' as the parser function. *Note Argp Parser +Functions::. - Some operating systems don't really implement `vfork'. The GNU C - library permits you to use `vfork' on all systems, but actually - executes `fork' if `vfork' isn't available. If you follow the - proper precautions for using `vfork', your program will still work - even if the system uses `fork' instead. + Note that in this example, `main' uses a structure to communicate +with the `parse_opt' function, a pointer to which it passes in the +`input' argument to `argp_parse'. *Note Argp::. It is retrieved by +`parse_opt' through the `input' field in its `state' argument. *Note +Argp Parsing State::. Of course, it's also possible to use global +variables instead, but using a structure like this is somewhat more +flexible and clean. + + /* Argp example #3 - a program with options and arguments using argp */ + + /* This program uses the same features as example 2, and uses options and + arguments. + + We now use the first four fields in ARGP, so here's a description of them: + OPTIONS - A pointer to a vector of struct argp_option (see below) + PARSER - A function to parse a single option, called by argp + ARGS_DOC - A string describing how the non-option arguments should look + DOC - A descriptive string about this program; if it contains a + vertical tab character (\v), the part after it will be + printed *following* the options + + The function PARSER takes the following arguments: + KEY - An integer specifying which option this is (taken + from the KEY field in each struct argp_option), or + a special key specifying something else; the only + special keys we use here are ARGP_KEY_ARG, meaning + a non-option argument, and ARGP_KEY_END, meaning + that all arguments have been parsed + ARG - For an option KEY, the string value of its + argument, or NULL if it has none + STATE- A pointer to a struct argp_state, containing + various useful information about the parsing state; used here + are the INPUT field, which reflects the INPUT argument to + argp_parse, and the ARG_NUM field, which is the number of the + current non-option argument being parsed + It should return either 0, meaning success, ARGP_ERR_UNKNOWN, meaning the + given KEY wasn't recognized, or an errno value indicating some other + error. + + Note that in this example, main uses a structure to communicate with the + parse_opt function, a pointer to which it passes in the INPUT argument to + argp_parse. Of course, it's also possible to use global variables + instead, but this is somewhat more flexible. + + The OPTIONS field contains a pointer to a vector of struct argp_option's; + that structure has the following fields (if you assign your option + structures using array initialization like this example, unspecified + fields will be defaulted to 0, and need not be specified): + NAME - The name of this option's long option (may be zero) + KEY - The KEY to pass to the PARSER function when parsing this option, + *and* the name of this option's short option, if it is a + printable ascii character + ARG - The name of this option's argument, if any + FLAGS - Flags describing this option; some of them are: + OPTION_ARG_OPTIONAL - The argument to this option is optional + OPTION_ALIAS - This option is an alias for the + previous option + OPTION_HIDDEN - Don't show this option in -help output + DOC - A documentation string for this option, shown in -help output + + An options vector should be terminated by an option with all fields zero. */ + + #include + + const char *argp_program_version = + "argp-ex3 1.0"; + const char *argp_program_bug_address = + ""; + + /* Program documentation. */ + static char doc[] = + "Argp example #3 -- a program with options and arguments using argp"; + + /* A description of the arguments we accept. */ + static char args_doc[] = "ARG1 ARG2"; + + /* The options we understand. */ + static struct argp_option options[] = { + {"verbose", 'v', 0, 0, "Produce verbose output" }, + {"quiet", 'q', 0, 0, "Don't produce any output" }, + {"silent", 's', 0, OPTION_ALIAS }, + {"output", 'o', "FILE", 0, + "Output to FILE instead of standard output" }, + { 0 } + }; + + /* Used by `main' to communicate with `parse_opt'. */ + struct arguments + { + char *args[2]; /* ARG1 & ARG2 */ + int silent, verbose; + char *output_file; + }; + + /* Parse a single option. */ + static error_t + parse_opt (int key, char *arg, struct argp_state *state) + { + /* Get the INPUT argument from `argp_parse', which we + know is a pointer to our arguments structure. */ + struct arguments *arguments = state->input; + + switch (key) + { + case 'q': case 's': + arguments->silent = 1; + break; + case 'v': + arguments->verbose = 1; + break; + case 'o': + arguments->output_file = arg; + break; + + case ARGP_KEY_ARG: + if (state->arg_num >= 2) + /* Too many arguments. */ + argp_usage (state); + + arguments->args[state->arg_num] = arg; + + break; + + case ARGP_KEY_END: + if (state->arg_num < 2) + /* Not enough arguments. */ + argp_usage (state); + break; + + default: + return ARGP_ERR_UNKNOWN; + } + return 0; + } + + /* Our argp parser. */ + static struct argp argp = { options, parse_opt, args_doc, doc }; + + int main (int argc, char **argv) + { + struct arguments arguments; + + /* Default values. */ + arguments.silent = 0; + arguments.verbose = 0; + arguments.output_file = "-"; + + /* Parse our arguments; every option seen by `parse_opt' will + be reflected in `arguments'. */ + argp_parse (&argp, argc, argv, 0, 0, &arguments); + + printf ("ARG1 = %s\nARG2 = %s\nOUTPUT_FILE = %s\n" + "VERBOSE = %s\nSILENT = %s\n", + arguments.args[0], arguments.args[1], + arguments.output_file, + arguments.verbose ? "yes" : "no", + arguments.silent ? "yes" : "no"); + + exit (0); + } diff -durpN glibc-2.2.4/manual/libc.info-43 glibc-2.2.5/manual/libc.info-43 --- glibc-2.2.4/manual/libc.info-43 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-43 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1143 +33,1224 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Executing a File, Next: Process Completion, Prev: Creating a Process, Up: Processes +File: libc.info, Node: Argp Example 4, Prev: Argp Example 3, Up: Argp Examples -Executing a File -================ +A Program Using Multiple Combined Argp Parsers +.............................................. - This section describes the `exec' family of functions, for executing -a file as a process image. You can use these functions to make a child -process execute a new program after it has been forked. + This program uses the same features as example 3, but has more +options, and presents more structure in the `--help' output. It also +illustrates how you can `steal' the remainder of the input arguments +past a certain point for programs that accept a list of items. It also +illustrates the KEY value `ARGP_KEY_NO_ARGS', which is only given if no +non-option arguments were supplied to the program. *Note Argp Special +Keys::. - To see the effects of `exec' from the point of view of the called -program, *Note Program Basics::. + For structuring help output, two features are used: _headers_ and a +two part option string. The _headers_ are entries in the options +vector. *Note Argp Option Vectors::. The first four fields are zero. +The two part documentation string are in the variable `doc', which +allows documentation both before and after the options. *Note Argp +Parsers::, the two parts of `doc' are separated by a vertical-tab +character (`'\v'', or `'\013''). By convention, the documentation +before the options is a short string stating what the program does, and +after any options it is longer, describing the behavior in more detail. +All documentation strings are automatically filled for output, +although newlines may be included to force a line break at a particular +point. In addition, documentation strings are passed to the `gettext' +function, for possible translation into the current locale. - The functions in this family differ in how you specify the arguments, -but otherwise they all do the same thing. They are declared in the -header file `unistd.h'. + /* Argp example #4 - a program with somewhat more complicated options */ + + /* This program uses the same features as example 3, but has more + options, and somewhat more structure in the -help output. It + also shows how you can `steal' the remainder of the input + arguments past a certain point, for programs that accept a + list of items. It also shows the special argp KEY value + ARGP_KEY_NO_ARGS, which is only given if no non-option + arguments were supplied to the program. + + For structuring the help output, two features are used, + *headers* which are entries in the options vector with the + first four fields being zero, and a two part documentation + string (in the variable DOC), which allows documentation both + before and after the options; the two parts of DOC are + separated by a vertical-tab character ('\v', or '\013'). By + convention, the documentation before the options is just a + short string saying what the program does, and that afterwards + is longer, describing the behavior in more detail. All + documentation strings are automatically filled for output, + although newlines may be included to force a line break at a + particular point. All documentation strings are also passed to + the `gettext' function, for possible translation into the + current locale. */ + + #include + #include + #include + + const char *argp_program_version = + "argp-ex4 1.0"; + const char *argp_program_bug_address = + ""; + + /* Program documentation. */ + static char doc[] = + "Argp example #4 -- a program with somewhat more complicated\ + options\ + \vThis part of the documentation comes *after* the options;\ + note that the text is automatically filled, but it's possible\ + to force a line-break, e.g.\n<-- here."; + + /* A description of the arguments we accept. */ + static char args_doc[] = "ARG1 [STRING...]"; + + /* Keys for options without short-options. */ + #define OPT_ABORT 1 /* -abort */ + + /* The options we understand. */ + static struct argp_option options[] = { + {"verbose", 'v', 0, 0, "Produce verbose output" }, + {"quiet", 'q', 0, 0, "Don't produce any output" }, + {"silent", 's', 0, OPTION_ALIAS }, + {"output", 'o', "FILE", 0, + "Output to FILE instead of standard output" }, + + {0,0,0,0, "The following options should be grouped together:" }, + {"repeat", 'r', "COUNT", OPTION_ARG_OPTIONAL, + "Repeat the output COUNT (default 10) times"}, + {"abort", OPT_ABORT, 0, 0, "Abort before showing any output"}, + + { 0 } + }; + + /* Used by `main' to communicate with `parse_opt'. */ + struct arguments + { + char *arg1; /* ARG1 */ + char **strings; /* [STRING...] */ + int silent, verbose, abort; /* `-s', `-v', `--abort' */ + char *output_file; /* FILE arg to `--output' */ + int repeat_count; /* COUNT arg to `--repeat' */ + }; + + /* Parse a single option. */ + static error_t + parse_opt (int key, char *arg, struct argp_state *state) + { + /* Get the `input' argument from `argp_parse', which we + know is a pointer to our arguments structure. */ + struct arguments *arguments = state->input; + + switch (key) + { + case 'q': case 's': + arguments->silent = 1; + break; + case 'v': + arguments->verbose = 1; + break; + case 'o': + arguments->output_file = arg; + break; + case 'r': + arguments->repeat_count = arg ? atoi (arg) : 10; + break; + case OPT_ABORT: + arguments->abort = 1; + break; + + case ARGP_KEY_NO_ARGS: + argp_usage (state); + + case ARGP_KEY_ARG: + /* Here we know that `state->arg_num == 0', since we + force argument parsing to end before any more arguments can + get here. */ + arguments->arg1 = arg; + + /* Now we consume all the rest of the arguments. + `state->next' is the index in `state->argv' of the + next argument to be parsed, which is the first STRING + we're interested in, so we can just use + `&state->argv[state->next]' as the value for + arguments->strings. + + _In addition_, by setting `state->next' to the end + of the arguments, we can force argp to stop parsing here and + return. */ + arguments->strings = &state->argv[state->next]; + state->next = state->argc; + + break; + + default: + return ARGP_ERR_UNKNOWN; + } + return 0; + } + + /* Our argp parser. */ + static struct argp argp = { options, parse_opt, args_doc, doc }; + + int main (int argc, char **argv) + { + int i, j; + struct arguments arguments; + + /* Default values. */ + arguments.silent = 0; + arguments.verbose = 0; + arguments.output_file = "-"; + arguments.repeat_count = 1; + arguments.abort = 0; + + /* Parse our arguments; every option seen by `parse_opt' will be + reflected in `arguments'. */ + argp_parse (&argp, argc, argv, 0, 0, &arguments); + + if (arguments.abort) + error (10, 0, "ABORTED"); + + for (i = 0; i < arguments.repeat_count; i++) + { + printf ("ARG1 = %s\n", arguments.arg1); + printf ("STRINGS = "); + for (j = 0; arguments.strings[j]; j++) + printf (j == 0 ? "%s" : ", %s", arguments.strings[j]); + printf ("\n"); + printf ("OUTPUT_FILE = %s\nVERBOSE = %s\nSILENT = %s\n", + arguments.output_file, + arguments.verbose ? "yes" : "no", + arguments.silent ? "yes" : "no"); + } + + exit (0); + } - - Function: int execv (const char *FILENAME, char *const ARGV[]) - The `execv' function executes the file named by FILENAME as a new - process image. + +File: libc.info, Node: Argp User Customization, Prev: Argp Examples, Up: Argp - The ARGV argument is an array of null-terminated strings that is - used to provide a value for the `argv' argument to the `main' - function of the program to be executed. The last element of this - array must be a null pointer. By convention, the first element of - this array is the file name of the program sans directory names. - *Note Program Arguments::, for full details on how programs can - access these arguments. +Argp User Customization +----------------------- - The environment for the new process image is taken from the - `environ' variable of the current process image; see *Note - Environment Variables::, for information about environments. + The formatting of argp `--help' output may be controlled to some +extent by a program's users, by setting the `ARGP_HELP_FMT' environment +variable to a comma-separated list of tokens. Whitespace is ignored: - - Function: int execl (const char *FILENAME, const char *ARG0, ...) - This is similar to `execv', but the ARGV strings are specified - individually instead of as an array. A null pointer must be - passed as the last such argument. +`dup-args' +`no-dup-args' + These turn "duplicate-argument-mode" on or off. In duplicate + argument mode, if an option that accepts an argument has multiple + names, the argument is shown for each name. Otherwise, it is only + shown for the first long option. A note is subsequently printed + so the user knows that it applies to other names as well. The + default is `no-dup-args', which is less consistent, but prettier. - - Function: int execve (const char *FILENAME, char *const ARGV[], char - *const ENV[]) - This is similar to `execv', but permits you to specify the - environment for the new program explicitly as the ENV argument. - This should be an array of strings in the same format as for the - `environ' variable; see *Note Environment Access::. +`dup-args-note' - - Function: int execle (const char *FILENAME, const char *ARG0, char - *const ENV[], ...) - This is similar to `execl', but permits you to specify the - environment for the new program explicitly. The environment - argument is passed following the null pointer that marks the last - ARGV argument, and should be an array of strings in the same - format as for the `environ' variable. +`no-dup-args-note' + These will enable or disable the note informing the user of + suppressed option argument duplication. The default is + `dup-args-note'. - - Function: int execvp (const char *FILENAME, char *const ARGV[]) - The `execvp' function is similar to `execv', except that it - searches the directories listed in the `PATH' environment variable - (*note Standard Environment::) to find the full file name of a - file from FILENAME if FILENAME does not contain a slash. +`short-opt-col=N' + This prints the first short option in column N. The default is 2. - This function is useful for executing system utility programs, - because it looks for them in the places that the user has chosen. - Shells use it to run the commands that users type. +`long-opt-col=N' + This prints the first long option in column N. The default is 6. - - Function: int execlp (const char *FILENAME, const char *ARG0, ...) - This function is like `execl', except that it performs the same - file name searching as the `execvp' function. +`doc-opt-col=N' + This prints `documentation options' (*note Argp Option Flags::) in + column N. The default is 2. - The size of the argument list and environment list taken together -must not be greater than `ARG_MAX' bytes. *Note General Limits::. In -the GNU system, the size (which compares against `ARG_MAX') includes, -for each string, the number of characters in the string, plus the size -of a `char *', plus one, rounded up to a multiple of the size of a -`char *'. Other systems may have somewhat different rules for counting. +`opt-doc-col=N' + This prints the documentation for options starting in column N. + The default is 29. - These functions normally don't return, since execution of a new -program causes the currently executing program to go away completely. -A value of `-1' is returned in the event of a failure. In addition to -the usual file name errors (*note File Name Errors::), the following -`errno' error conditions are defined for these functions: +`header-col=N' + This will indent the group headers that document groups of options + to column N. The default is 1. -`E2BIG' - The combined size of the new program's argument list and - environment list is larger than `ARG_MAX' bytes. The GNU system - has no specific limit on the argument list size, so this error - code cannot result, but you may get `ENOMEM' instead if the - arguments are too big for available memory. +`usage-indent=N' + This will indent continuation lines in `Usage:' messages to column + N. The default is 12. -`ENOEXEC' - The specified file can't be executed because it isn't in the right - format. +`rmargin=N' + This will word wrap help output at or before column N. The default + is 79. -`ENOMEM' - Executing the specified file requires more storage than is - available. + +File: libc.info, Node: Suboptions, Next: Suboptions Example, Prev: Argp, Up: Parsing Program Arguments - If execution of the new file succeeds, it updates the access time -field of the file as if the file had been read. *Note File Times::, -for more details about access times of files. +Parsing of Suboptions +..................... - The point at which the file is closed again is not specified, but is -at some point before the process exits or before another process image -is executed. + Having a single level of options is sometimes not enough. There +might be too many options which have to be available or a set of +options is closely related. - Executing a new process image completely changes the contents of -memory, copying only the argument and environment strings to new -locations. But many other attributes of the process are unchanged: + For this case some programs use suboptions. One of the most +prominent programs is certainly `mount'(8). The `-o' option take one +argument which itself is a comma separated list of options. To ease the +programming of code like this the function `getsubopt' is available. - * The process ID and the parent process ID. *Note Process Creation - Concepts::. + - Function: int getsubopt (char **OPTIONP, const char* const *TOKENS, + char **VALUEP) + The OPTIONP parameter must be a pointer to a variable containing + the address of the string to process. When the function returns + the reference is updated to point to the next suboption or to the + terminating `\0' character if there is no more suboption available. - * Session and process group membership. *Note Concepts of Job - Control::. + The TOKENS parameter references an array of strings containing the + known suboptions. All strings must be `\0' terminated and to mark + the end a null pointer must be stored. When `getsubopt' finds a + possible legal suboption it compares it with all strings available + in the TOKENS array and returns the index in the string as the + indicator. - * Real user ID and group ID, and supplementary group IDs. *Note - Process Persona::. + In case the suboption has an associated value introduced by a `=' + character, a pointer to the value is returned in VALUEP. The + string is `\0' terminated. If no argument is available VALUEP is + set to the null pointer. By doing this the caller can check + whether a necessary value is given or whether no unexpected value + is present. - * Pending alarms. *Note Setting an Alarm::. + In case the next suboption in the string is not mentioned in the + TOKENS array the starting address of the suboption including a + possible value is returned in VALUEP and the return value of the + function is `-1'. - * Current working directory and root directory. *Note Working - Directory::. In the GNU system, the root directory is not copied - when executing a setuid program; instead the system default root - directory is used for the new program. + +File: libc.info, Node: Suboptions Example, Prev: Suboptions, Up: Parsing Program Arguments - * File mode creation mask. *Note Setting Permissions::. +Parsing of Suboptions Example +----------------------------- - * Process signal mask; see *Note Process Signal Mask::. + The code which might appear in the `mount'(8) program is a perfect +example of the use of `getsubopt': - * Pending signals; see *Note Blocking Signals::. + #include + #include + #include + + int do_all; + const char *type; + int read_size; + int write_size; + int read_only; + + enum + { + RO_OPTION = 0, + RW_OPTION, + READ_SIZE_OPTION, + WRITE_SIZE_OPTION, + THE_END + }; + + const char *mount_opts[] = + { + [RO_OPTION] = "ro", + [RW_OPTION] = "rw", + [READ_SIZE_OPTION] = "rsize", + [WRITE_SIZE_OPTION] = "wsize", + [THE_END] = NULL + }; + + int + main (int argc, char *argv[]) + { + char *subopts, *value; + int opt; + + while ((opt = getopt (argc, argv, "at:o:")) != -1) + switch (opt) + { + case 'a': + do_all = 1; + break; + case 't': + type = optarg; + break; + case 'o': + subopts = optarg; + while (*subopts != '\0') + switch (getsubopt (&subopts, mount_opts, &value)) + { + case RO_OPTION: + read_only = 1; + break; + case RW_OPTION: + read_only = 0; + break; + case READ_SIZE_OPTION: + if (value == NULL) + abort (); + read_size = atoi (value); + break; + case WRITE_SIZE_OPTION: + if (value == NULL) + abort (); + write_size = atoi (value); + break; + default: + /* Unknown suboption. */ + printf ("Unknown suboption `%s'\n", value); + break; + } + break; + default: + abort (); + } + + /* Do the real work. */ + + return 0; + } - * Elapsed processor time associated with the process; see *Note - Processor Time::. + +File: libc.info, Node: Environment Variables, Next: System Calls, Prev: Program Arguments, Up: Program Basics - If the set-user-ID and set-group-ID mode bits of the process image -file are set, this affects the effective user ID and effective group ID -(respectively) of the process. These concepts are discussed in detail -in *Note Process Persona::. +Environment Variables +===================== - Signals that are set to be ignored in the existing process image are -also set to be ignored in the new process image. All other signals are -set to the default action in the new process image. For more -information about signals, see *Note Signal Handling::. + When a program is executed, it receives information about the +context in which it was invoked in two ways. The first mechanism uses +the ARGV and ARGC arguments to its `main' function, and is discussed in +*Note Program Arguments::. The second mechanism uses "environment +variables" and is discussed in this section. - File descriptors open in the existing process image remain open in -the new process image, unless they have the `FD_CLOEXEC' -(close-on-exec) flag set. The files that remain open inherit all -attributes of the open file description from the existing process image, -including file locks. File descriptors are discussed in *Note -Low-Level I/O::. + The ARGV mechanism is typically used to pass command-line arguments +specific to the particular program being invoked. The environment, on +the other hand, keeps track of information that is shared by many +programs, changes infrequently, and that is less frequently used. - Streams, by contrast, cannot survive through `exec' functions, -because they are located in the memory of the process itself. The new -process image has no streams except those it creates afresh. Each of -the streams in the pre-`exec' process image has a descriptor inside it, -and these descriptors do survive through `exec' (provided that they do -not have `FD_CLOEXEC' set). The new process image can reconnect these -to new streams using `fdopen' (*note Descriptors and Streams::). + The environment variables discussed in this section are the same +environment variables that you set using assignments and the `export' +command in the shell. Programs executed from the shell inherit all of +the environment variables from the shell. + + Standard environment variables are used for information about the +user's home directory, terminal type, current locale, and so on; you +can define additional variables for other purposes. The set of all +environment variables that have values is collectively known as the +"environment". + + Names of environment variables are case-sensitive and must not +contain the character `='. System-defined environment variables are +invariably uppercase. + + The values of environment variables can be anything that can be +represented as a string. A value must not contain an embedded null +character, since this is assumed to terminate the string. + +* Menu: + +* Environment Access:: How to get and set the values of + environment variables. +* Standard Environment:: These environment variables have + standard interpretations.  -File: libc.info, Node: Process Completion, Next: Process Completion Status, Prev: Executing a File, Up: Processes +File: libc.info, Node: Environment Access, Next: Standard Environment, Up: Environment Variables -Process Completion -================== +Environment Access +------------------ - The functions described in this section are used to wait for a child -process to terminate or stop, and determine its status. These functions -are declared in the header file `sys/wait.h'. + The value of an environment variable can be accessed with the +`getenv' function. This is declared in the header file `stdlib.h'. +All of the following functions can be safely used in multi-threaded +programs. It is made sure that concurrent modifications to the +environment do not lead to errors. - - Function: pid_t waitpid (pid_t PID, int *STATUS-PTR, int OPTIONS) - The `waitpid' function is used to request status information from a - child process whose process ID is PID. Normally, the calling - process is suspended until the child process makes status - information available by terminating. + - Function: char * getenv (const char *NAME) + This function returns a string that is the value of the environment + variable NAME. You must not modify this string. In some non-Unix + systems not using the GNU library, it might be overwritten by + subsequent calls to `getenv' (but not by any other library + function). If the environment variable NAME is not defined, the + value is a null pointer. - Other values for the PID argument have special interpretations. A - value of `-1' or `WAIT_ANY' requests status information for any - child process; a value of `0' or `WAIT_MYPGRP' requests - information for any child process in the same process group as the - calling process; and any other negative value - PGID requests - information for any child process whose process group ID is PGID. + - Function: int putenv (char *STRING) + The `putenv' function adds or removes definitions from the + environment. If the STRING is of the form `NAME=VALUE', the + definition is added to the environment. Otherwise, the STRING is + interpreted as the name of an environment variable, and any + definition for this variable in the environment is removed. - If status information for a child process is available - immediately, this function returns immediately without waiting. - If more than one eligible child process has status information - available, one of them is chosen randomly, and its status is - returned immediately. To get the status from the other eligible - child processes, you need to call `waitpid' again. + The difference to the `setenv' function is that the exact string + given as the parameter STRING is put into the environment. If the + user should change the string after the `putenv' call this will + reflect in automatically in the environment. This also requires + that STRING is no automatic variable which scope is left before the + variable is removed from the environment. The same applies of + course to dynamically allocated variables which are freed later. - The OPTIONS argument is a bit mask. Its value should be the - bitwise OR (that is, the `|' operator) of zero or more of the - `WNOHANG' and `WUNTRACED' flags. You can use the `WNOHANG' flag - to indicate that the parent process shouldn't wait; and the - `WUNTRACED' flag to request status information from stopped - processes as well as processes that have terminated. + This function is part of the extended Unix interface. Since it + was also available in old SVID libraries you should define either + _XOPEN_SOURCE or _SVID_SOURCE before including any header. - The status information from the child process is stored in the - object that STATUS-PTR points to, unless STATUS-PTR is a null - pointer. + - Function: int setenv (const char *NAME, const char *VALUE, int + REPLACE) + The `setenv' function can be used to add a new definition to the + environment. The entry with the name NAME is replaced by the + value `NAME=VALUE'. Please note that this is also true if VALUE + is the empty string. To do this a new string is created and the + strings NAME and VALUE are copied. A null pointer for the VALUE + parameter is illegal. If the environment already contains an + entry with key NAME the REPLACE parameter controls the action. If + replace is zero, nothing happens. Otherwise the old entry is + replaced by the new one. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `waitpid' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `waitpid' should be protected using cancellation handlers. + Please note that you cannot remove an entry completely using this + function. - The return value is normally the process ID of the child process - whose status is reported. If there are child processes but none - of them is waiting to be noticed, `waitpid' will block until one - is. However, if the `WNOHANG' option was specified, `waitpid' - will return zero instead of blocking. + This function was originally part of the BSD library but is now + part of the Unix standard. - If a specific PID to wait for was given to `waitpid', it will - ignore all other children (if any). Therefore if there are - children waiting to be noticed but the child whose PID was - specified is not one of them, `waitpid' will block or return zero - as described above. + - Function: int unsetenv (const char *NAME) + Using this function one can remove an entry completely from the + environment. If the environment contains an entry with the key + NAME this whole entry is removed. A call to this function is + equivalent to a call to `putenv' when the VALUE part of the string + is empty. - A value of `-1' is returned in case of error. The following - `errno' error conditions are defined for this function: + The function return `-1' if NAME is a null pointer, points to an + empty string, or points to a string containing a `=' character. + It returns `0' if the call succeeded. - `EINTR' - The function was interrupted by delivery of a signal to the - calling process. *Note Interrupted Primitives::. + This function was originally part of the BSD library but is now + part of the Unix standard. The BSD version had no return value, + though. - `ECHILD' - There are no child processes to wait for, or the specified PID - is not a child of the calling process. + There is one more function to modify the whole environment. This +function is said to be used in the POSIX.9 (POSIX bindings for Fortran +77) and so one should expect it did made it into POSIX.1. But this +never happened. But we still provide this function as a GNU extension +to enable writing standard compliant Fortran environments. - `EINVAL' - An invalid value was provided for the OPTIONS argument. + - Function: int clearenv (void) + The `clearenv' function removes all entries from the environment. + Using `putenv' and `setenv' new entries can be added again later. - These symbolic constants are defined as values for the PID argument -to the `waitpid' function. + If the function is successful it returns `0'. Otherwise the return + value is nonzero. -`WAIT_ANY' - This constant macro (whose value is `-1') specifies that `waitpid' - should return status information about any child process. + You can deal directly with the underlying representation of +environment objects to add more variables to the environment (for +example, to communicate with another program you are about to execute; +*note Executing a File::). -`WAIT_MYPGRP' - This constant (with value `0') specifies that `waitpid' should - return status information about any child process in the same - process group as the calling process. + - Variable: char ** environ + The environment is represented as an array of strings. Each + string is of the format `NAME=VALUE'. The order in which strings + appear in the environment is not significant, but the same NAME + must not appear more than once. The last element of the array is + a null pointer. - These symbolic constants are defined as flags for the OPTIONS -argument to the `waitpid' function. You can bitwise-OR the flags -together to obtain a value to use as the argument. + This variable is declared in the header file `unistd.h'. -`WNOHANG' - This flag specifies that `waitpid' should return immediately - instead of waiting, if there is no child process ready to be - noticed. + If you just want to get the value of an environment variable, use + `getenv'. -`WUNTRACED' - This flag specifies that `waitpid' should report the status of any - child processes that have been stopped as well as those that have - terminated. + Unix systems, and the GNU system, pass the initial value of +`environ' as the third argument to `main'. *Note Program Arguments::. - - Function: pid_t wait (int *STATUS-PTR) - This is a simplified version of `waitpid', and is used to wait - until any one child process terminates. The call: + +File: libc.info, Node: Standard Environment, Prev: Environment Access, Up: Environment Variables - wait (&status) +Standard Environment Variables +------------------------------ - is exactly equivalent to: + These environment variables have standard meanings. This doesn't +mean that they are always present in the environment; but if these +variables _are_ present, they have these meanings. You shouldn't try +to use these environment variable names for some other purpose. - waitpid (-1, &status, 0) +`HOME' + This is a string representing the user's "home directory", or + initial default working directory. - This function is a cancellation point in multi-threaded programs. - This is a problem if the thread allocates some resources (like - memory, file descriptors, semaphores or whatever) at the time - `wait' is called. If the thread gets canceled these resources - stay allocated until the program ends. To avoid this calls to - `wait' should be protected using cancellation handlers. + The user can set `HOME' to any value. If you need to make sure to + obtain the proper home directory for a particular user, you should + not use `HOME'; instead, look up the user's name in the user + database (*note User Database::). - - Function: pid_t wait4 (pid_t PID, int *STATUS-PTR, int OPTIONS, - struct rusage *USAGE) - If USAGE is a null pointer, `wait4' is equivalent to `waitpid - (PID, STATUS-PTR, OPTIONS)'. + For most purposes, it is better to use `HOME', precisely because + this lets the user specify the value. - If USAGE is not null, `wait4' stores usage figures for the child - process in `*RUSAGE' (but only if the child has terminated, not if - it has stopped). *Note Resource Usage::. +`LOGNAME' + This is the name that the user used to log in. Since the value in + the environment can be tweaked arbitrarily, this is not a reliable + way to identify the user who is running a program; a function like + `getlogin' (*note Who Logged In::) is better for that purpose. - This function is a BSD extension. + For most purposes, it is better to use `LOGNAME', precisely because + this lets the user specify the value. - Here's an example of how to use `waitpid' to get the status from all -child processes that have terminated, without ever waiting. This -function is designed to be a handler for `SIGCHLD', the signal that -indicates that at least one child process has terminated. +`PATH' + A "path" is a sequence of directory names which is used for + searching for a file. The variable `PATH' holds a path used for + searching for programs to be run. - void - sigchld_handler (int signum) - { - int pid, status, serrno; - serrno = errno; - while (1) - { - pid = waitpid (WAIT_ANY, &status, WNOHANG); - if (pid < 0) - { - perror ("waitpid"); - break; - } - if (pid == 0) - break; - notice_termination (pid, status); - } - errno = serrno; - } + The `execlp' and `execvp' functions (*note Executing a File::) use + this environment variable, as do many shells and other utilities + which are implemented in terms of those functions. - -File: libc.info, Node: Process Completion Status, Next: BSD Wait Functions, Prev: Process Completion, Up: Processes + The syntax of a path is a sequence of directory names separated by + colons. An empty string instead of a directory name stands for the + current directory (*note Working Directory::). -Process Completion Status -========================= + A typical value for this environment variable might be a string + like: - If the exit status value (*note Program Termination::) of the child -process is zero, then the status value reported by `waitpid' or `wait' -is also zero. You can test for other kinds of information encoded in -the returned status value using the following macros. These macros are -defined in the header file `sys/wait.h'. + :/bin:/etc:/usr/bin:/usr/new/X11:/usr/new:/usr/local/bin - - Macro: int WIFEXITED (int STATUS) - This macro returns a nonzero value if the child process terminated - normally with `exit' or `_exit'. + This means that if the user tries to execute a program named `foo', + the system will look for files named `foo', `/bin/foo', + `/etc/foo', and so on. The first of these files that exists is + the one that is executed. - - Macro: int WEXITSTATUS (int STATUS) - If `WIFEXITED' is true of STATUS, this macro returns the low-order - 8 bits of the exit status value from the child process. *Note - Exit Status::. +`TERM' + This specifies the kind of terminal that is receiving program + output. Some programs can make use of this information to take + advantage of special escape sequences or terminal modes supported + by particular kinds of terminals. Many programs which use the + termcap library (*note Find: (termcap)Finding a Terminal + Description.) use the `TERM' environment variable, for example. - - Macro: int WIFSIGNALED (int STATUS) - This macro returns a nonzero value if the child process terminated - because it received a signal that was not handled. *Note Signal - Handling::. +`TZ' + This specifies the time zone. *Note TZ Variable::, for + information about the format of this string and how it is used. - - Macro: int WTERMSIG (int STATUS) - If `WIFSIGNALED' is true of STATUS, this macro returns the signal - number of the signal that terminated the child process. +`LANG' + This specifies the default locale to use for attribute categories + where neither `LC_ALL' nor the specific environment variable for + that category is set. *Note Locales::, for more information about + locales. - - Macro: int WCOREDUMP (int STATUS) - This macro returns a nonzero value if the child process terminated - and produced a core dump. +`LC_ALL' + If this environment variable is set it overrides the selection for + all the locales done using the other `LC_*' environment variables. + The value of the other `LC_*' environment variables is simply + ignored in this case. - - Macro: int WIFSTOPPED (int STATUS) - This macro returns a nonzero value if the child process is stopped. +`LC_COLLATE' + This specifies what locale to use for string sorting. - - Macro: int WSTOPSIG (int STATUS) - If `WIFSTOPPED' is true of STATUS, this macro returns the signal - number of the signal that caused the child process to stop. +`LC_CTYPE' + This specifies what locale to use for character sets and character + classification. - -File: libc.info, Node: BSD Wait Functions, Next: Process Creation Example, Prev: Process Completion Status, Up: Processes +`LC_MESSAGES' + This specifies what locale to use for printing messages and to + parse responses. -BSD Process Wait Functions -========================== +`LC_MONETARY' + This specifies what locale to use for formatting monetary values. - The GNU library also provides these related facilities for -compatibility with BSD Unix. BSD uses the `union wait' data type to -represent status values rather than an `int'. The two representations -are actually interchangeable; they describe the same bit patterns. The -GNU C Library defines macros such as `WEXITSTATUS' so that they will -work on either kind of object, and the `wait' function is defined to -accept either type of pointer as its STATUS-PTR argument. +`LC_NUMERIC' + This specifies what locale to use for formatting numbers. - These functions are declared in `sys/wait.h'. +`LC_TIME' + This specifies what locale to use for formatting date/time values. - - Data Type: union wait - This data type represents program termination status values. It - has the following members: +`NLSPATH' + This specifies the directories in which the `catopen' function + looks for message translation catalogs. - `int w_termsig' - The value of this member is the same as that of the - `WTERMSIG' macro. +`_POSIX_OPTION_ORDER' + If this environment variable is defined, it suppresses the usual + reordering of command line arguments by `getopt' and `argp_parse'. + *Note Argument Syntax::. - `int w_coredump' - The value of this member is the same as that of the - `WCOREDUMP' macro. + +File: libc.info, Node: System Calls, Next: Program Termination, Prev: Environment Variables, Up: Program Basics - `int w_retcode' - The value of this member is the same as that of the - `WEXITSTATUS' macro. +System Calls +============ - `int w_stopsig' - The value of this member is the same as that of the - `WSTOPSIG' macro. + A system call is a request for service that a program makes of the +kernel. The service is generally something that only the kernel has +the privilege to do, such as doing I/O. Programmers don't normally +need to be concerned with system calls because there are functions in +the GNU C library to do virtually everything that system calls do. +These functions work by making system calls themselves. For example, +there is a system call that changes the permissions of a file, but you +don't need to know about it because you can just use the GNU C +library's `chmod' function. - Instead of accessing these members directly, you should use the - equivalent macros. + System calls are sometimes called kernel calls. - The `wait3' function is the predecessor to `wait4', which is more -flexible. `wait3' is now obsolete. + However, there are times when you want to make a system call +explicitly, and for that, the GNU C library provides the `syscall' +function. `syscall' is harder to use and less portable than functions +like `chmod', but easier and more portable than coding the system call +in assembler instructions. - - Function: pid_t wait3 (union wait *STATUS-PTR, int OPTIONS, struct - rusage *USAGE) - If USAGE is a null pointer, `wait3' is equivalent to `waitpid (-1, - STATUS-PTR, OPTIONS)'. + `syscall' is most useful when you are working with a system call +which is special to your system or is newer than the GNU C library you +are using. `syscall' is implemented in an entirely generic way; the +function does not know anything about what a particular system call +does or even if it is valid. - If USAGE is not null, `wait3' stores usage figures for the child - process in `*RUSAGE' (but only if the child has terminated, not if - it has stopped). *Note Resource Usage::. + The description of `syscall' in this section assumes a certain +protocol for system calls on the various platforms on which the GNU C +library runs. That protocol is not defined by any strong authority, but +we won't describe it here either because anyone who is coding `syscall' +probably won't accept anything less than kernel and C library source +code as a specification of the interface between them anyway. - -File: libc.info, Node: Process Creation Example, Prev: BSD Wait Functions, Up: Processes + `syscall' is declared in `unistd.h'. -Process Creation Example -======================== + - Function: long int syscall (long int SYSNO, ...) + `syscall' performs a generic system call. - Here is an example program showing how you might write a function -similar to the built-in `system'. It executes its COMMAND argument -using the equivalent of `sh -c COMMAND'. + SYSNO is the system call number. Each kind of system call is + identified by a number. Macros for all the possible system call + numbers are defined in `sys/syscall.h' - #include - #include - #include - #include - #include - - /* Execute the command using this shell program. */ - #define SHELL "/bin/sh" - - int - my_system (const char *command) - { - int status; - pid_t pid; - - pid = fork (); - if (pid == 0) - { - /* This is the child process. Execute the shell command. */ - execl (SHELL, SHELL, "-c", command, NULL); - _exit (EXIT_FAILURE); - } - else if (pid < 0) - /* The fork failed. Report failure. */ - status = -1; - else - /* This is the parent process. Wait for the child to complete. */ - if (waitpid (pid, &status, 0) != pid) - status = -1; - return status; - } + The remaining arguments are the arguments for the system call, in + order, and their meanings depend on the kind of system call. Each + kind of system call has a definite number of arguments, from zero + to five. If you code more arguments than the system call takes, + the extra ones to the right are ignored. - There are a couple of things you should pay attention to in this -example. + The return value is the return value from the system call, unless + the system call failed. In that case, `syscall' returns `-1' and + sets `errno' to an error code that the system call returned. Note + that system calls do not return `-1' when they succeed. - Remember that the first `argv' argument supplied to the program -represents the name of the program being executed. That is why, in the -call to `execl', `SHELL' is supplied once to name the program to -execute and a second time to supply a value for `argv[0]'. + If you specify an invalid SYSNO, `syscall' returns `-1' with + `errno' = `ENOSYS'. - The `execl' call in the child process doesn't return if it is -successful. If it fails, you must do something to make the child -process terminate. Just returning a bad status code with `return' -would leave two processes running the original program. Instead, the -right behavior is for the child process to report failure to its parent -process. + Example: + + + #include + #include + #include + + ... + + int rc; + + rc = syscall(SYS_chmod, "/etc/passwd", 0444); + + if (rc == -1) + fprintf(stderr, "chmod failed, errno = %d\n", errno); + + This, if all the compatibility stars are aligned, is equivalent to + the following preferable code: + + + #include + #include + #include + + ... + + int rc; + + rc = chmod("/etc/passwd", 0444); + if (rc == -1) + fprintf(stderr, "chmod failed, errno = %d\n", errno); - Call `_exit' to accomplish this. The reason for using `_exit' -instead of `exit' is to avoid flushing fully buffered streams such as -`stdout'. The buffers of these streams probably contain data that was -copied from the parent process by the `fork', data that will be output -eventually by the parent process. Calling `exit' in the child would -output the data twice. *Note Termination Internals::.  -File: libc.info, Node: Job Control, Next: Name Service Switch, Prev: Processes, Up: Top +File: libc.info, Node: Program Termination, Prev: System Calls, Up: Program Basics -Job Control -*********** +Program Termination +=================== - "Job control" refers to the protocol for allowing a user to move -between multiple "process groups" (or "jobs") within a single "login -session". The job control facilities are set up so that appropriate -behavior for most programs happens automatically and they need not do -anything special about job control. So you can probably ignore the -material in this chapter unless you are writing a shell or login -program. + The usual way for a program to terminate is simply for its `main' +function to return. The "exit status value" returned from the `main' +function is used to report information back to the process's parent +process or shell. - You need to be familiar with concepts relating to process creation -(*note Process Creation Concepts::) and signal handling (*note Signal -Handling::) in order to understand this material presented in this -chapter. + A program can also terminate normally by calling the `exit' function. + + In addition, programs can be terminated by signals; this is +discussed in more detail in *Note Signal Handling::. The `abort' +function causes a signal that kills the program. * Menu: -* Concepts of Job Control:: Jobs can be controlled by a shell. -* Job Control is Optional:: Not all POSIX systems support job control. -* Controlling Terminal:: How a process gets its controlling terminal. -* Access to the Terminal:: How processes share the controlling terminal. -* Orphaned Process Groups:: Jobs left after the user logs out. -* Implementing a Shell:: What a shell must do to implement job control. -* Functions for Job Control:: Functions to control process groups. +* Normal Termination:: If a program calls `exit', a + process terminates normally. +* Exit Status:: The `exit status' provides information + about why the process terminated. +* Cleanups on Exit:: A process can run its own cleanup + functions upon normal termination. +* Aborting a Program:: The `abort' function causes + abnormal program termination. +* Termination Internals:: What happens when a process terminates.  -File: libc.info, Node: Concepts of Job Control, Next: Job Control is Optional, Up: Job Control +File: libc.info, Node: Normal Termination, Next: Exit Status, Up: Program Termination -Concepts of Job Control -======================= +Normal Termination +------------------ - The fundamental purpose of an interactive shell is to read commands -from the user's terminal and create processes to execute the programs -specified by those commands. It can do this using the `fork' (*note -Creating a Process::) and `exec' (*note Executing a File::) functions. + A process terminates normally when its program signals it is done by +calling `exit'. Returning from `main' is equivalent to calling `exit', +and the value that `main' returns is used as the argument to `exit'. - A single command may run just one process--but often one command uses -several processes. If you use the `|' operator in a shell command, you -explicitly request several programs in their own processes. But even -if you run just one program, it can use multiple processes internally. -For example, a single compilation command such as `cc -c foo.c' -typically uses four processes (though normally only two at any given -time). If you run `make', its job is to run other programs in separate -processes. + - Function: void exit (int STATUS) + The `exit' function tells the system that the program is done, + which causes it to terminate the process. - The processes belonging to a single command are called a "process -group" or "job". This is so that you can operate on all of them at -once. For example, typing `C-c' sends the signal `SIGINT' to terminate -all the processes in the foreground process group. + STATUS is the program's exit status, which becomes part of the + process' termination status. This function does not return. - A "session" is a larger group of processes. Normally all the -processes that stem from a single login belong to the same session. + Normal termination causes the following actions: - Every process belongs to a process group. When a process is -created, it becomes a member of the same process group and session as -its parent process. You can put it in another process group using the -`setpgid' function, provided the process group belongs to the same -session. + 1. Functions that were registered with the `atexit' or `on_exit' + functions are called in the reverse order of their registration. + This mechanism allows your application to specify its own + "cleanup" actions to be performed at program termination. + Typically, this is used to do things like saving program state + information in a file, or unlocking locks in shared data bases. - The only way to put a process in a different session is to make it -the initial process of a new session, or a "session leader", using the -`setsid' function. This also puts the session leader into a new -process group, and you can't move it out of that process group again. + 2. All open streams are closed, writing out any buffered output data. + See *Note Closing Streams::. In addition, temporary files opened + with the `tmpfile' function are removed; see *Note Temporary + Files::. - Usually, new sessions are created by the system login program, and -the session leader is the process running the user's login shell. + 3. `_exit' is called, terminating the program. *Note Termination + Internals::. - A shell that supports job control must arrange to control which job -can use the terminal at any time. Otherwise there might be multiple -jobs trying to read from the terminal at once, and confusion about which -process should receive the input typed by the user. To prevent this, -the shell must cooperate with the terminal driver using the protocol -described in this chapter. + +File: libc.info, Node: Exit Status, Next: Cleanups on Exit, Prev: Normal Termination, Up: Program Termination - The shell can give unlimited access to the controlling terminal to -only one process group at a time. This is called the "foreground job" -on that controlling terminal. Other process groups managed by the shell -that are executing without such access to the terminal are called -"background jobs". +Exit Status +----------- - If a background job needs to read from its controlling terminal, it -is "stopped" by the terminal driver; if the `TOSTOP' mode is set, -likewise for writing. The user can stop a foreground job by typing the -SUSP character (*note Special Characters::) and a program can stop any -job by sending it a `SIGSTOP' signal. It's the responsibility of the -shell to notice when jobs stop, to notify the user about them, and to -provide mechanisms for allowing the user to interactively continue -stopped jobs and switch jobs between foreground and background. + When a program exits, it can return to the parent process a small +amount of information about the cause of termination, using the "exit +status". This is a value between 0 and 255 that the exiting process +passes as an argument to `exit'. - *Note Access to the Terminal::, for more information about I/O to the -controlling terminal, + Normally you should use the exit status to report very broad +information about success or failure. You can't provide a lot of +detail about the reasons for the failure, and most parent processes +would not want much detail anyway. + + There are conventions for what sorts of status values certain +programs should return. The most common convention is simply 0 for +success and 1 for failure. Programs that perform comparison use a +different convention: they use status 1 to indicate a mismatch, and +status 2 to indicate an inability to compare. Your program should +follow an existing convention if an existing convention makes sense for +it. + + A general convention reserves status values 128 and up for special +purposes. In particular, the value 128 is used to indicate failure to +execute another program in a subprocess. This convention is not +universally obeyed, but it is a good idea to follow it in your programs. + + *Warning:* Don't try to use the number of errors as the exit status. +This is actually not very useful; a parent process would generally not +care how many errors occurred. Worse than that, it does not work, +because the status value is truncated to eight bits. Thus, if the +program tried to report 256 errors, the parent would receive a report +of 0 errors--that is, success. + + For the same reason, it does not work to use the value of `errno' as +the exit status--these can exceed 255. + + *Portability note:* Some non-POSIX systems use different conventions +for exit status values. For greater portability, you can use the +macros `EXIT_SUCCESS' and `EXIT_FAILURE' for the conventional status +value for success and failure, respectively. They are declared in the +file `stdlib.h'. + + - Macro: int EXIT_SUCCESS + This macro can be used with the `exit' function to indicate + successful program completion. + + On POSIX systems, the value of this macro is `0'. On other + systems, the value might be some other (possibly non-constant) + integer expression. + + - Macro: int EXIT_FAILURE + This macro can be used with the `exit' function to indicate + unsuccessful program completion in a general sense. + + On POSIX systems, the value of this macro is `1'. On other + systems, the value might be some other (possibly non-constant) + integer expression. Other nonzero status values also indicate + failures. Certain programs use different nonzero status values to + indicate particular kinds of "non-success". For example, `diff' + uses status value `1' to mean that the files are different, and + `2' or more to mean that there was difficulty in opening the files. + + Don't confuse a program's exit status with a process' termination +status. There are lots of ways a process can terminate besides having +it's program finish. In the event that the process termination _is_ +caused by program termination (i.e. `exit'), though, the program's exit +status becomes part of the process' termination status.  -File: libc.info, Node: Job Control is Optional, Next: Controlling Terminal, Prev: Concepts of Job Control, Up: Job Control +File: libc.info, Node: Cleanups on Exit, Next: Aborting a Program, Prev: Exit Status, Up: Program Termination -Job Control is Optional -======================= +Cleanups on Exit +---------------- - Not all operating systems support job control. The GNU system does -support job control, but if you are using the GNU library on some other -system, that system may not support job control itself. + Your program can arrange to run its own cleanup functions if normal +termination happens. If you are writing a library for use in various +application programs, then it is unreliable to insist that all +applications call the library's cleanup functions explicitly before +exiting. It is much more robust to make the cleanup invisible to the +application, by setting up a cleanup function in the library itself +using `atexit' or `on_exit'. - You can use the `_POSIX_JOB_CONTROL' macro to test at compile-time -whether the system supports job control. *Note System Options::. + - Function: int atexit (void (*FUNCTION) (void)) + The `atexit' function registers the function FUNCTION to be called + at normal program termination. The FUNCTION is called with no + arguments. - If job control is not supported, then there can be only one process -group per session, which behaves as if it were always in the foreground. -The functions for creating additional process groups simply fail with -the error code `ENOSYS'. + The return value from `atexit' is zero on success and nonzero if + the function cannot be registered. - The macros naming the various job control signals (*note Job Control -Signals::) are defined even if job control is not supported. However, -the system never generates these signals, and attempts to send a job -control signal or examine or specify their actions report errors or do -nothing. + - Function: int on_exit (void (*FUNCTION)(int STATUS, void *ARG), void + *ARG) + This function is a somewhat more powerful variant of `atexit'. It + accepts two arguments, a function FUNCTION and an arbitrary + pointer ARG. At normal program termination, the FUNCTION is + called with two arguments: the STATUS value passed to `exit', and + the ARG. + + This function is included in the GNU C library only for + compatibility for SunOS, and may not be supported by other + implementations. + + Here's a trivial program that illustrates the use of `exit' and +`atexit': + + #include + #include + + void + bye (void) + { + puts ("Goodbye, cruel world...."); + } + + int + main (void) + { + atexit (bye); + exit (EXIT_SUCCESS); + } + +When this program is executed, it just prints the message and exits.  -File: libc.info, Node: Controlling Terminal, Next: Access to the Terminal, Prev: Job Control is Optional, Up: Job Control +File: libc.info, Node: Aborting a Program, Next: Termination Internals, Prev: Cleanups on Exit, Up: Program Termination -Controlling Terminal of a Process -================================= +Aborting a Program +------------------ - One of the attributes of a process is its controlling terminal. -Child processes created with `fork' inherit the controlling terminal -from their parent process. In this way, all the processes in a session -inherit the controlling terminal from the session leader. A session -leader that has control of a terminal is called the "controlling -process" of that terminal. + You can abort your program using the `abort' function. The prototype +for this function is in `stdlib.h'. - You generally do not need to worry about the exact mechanism used to -allocate a controlling terminal to a session, since it is done for you -by the system when you log in. + - Function: void abort (void) + The `abort' function causes abnormal program termination. This + does not execute cleanup functions registered with `atexit' or + `on_exit'. - An individual process disconnects from its controlling terminal when -it calls `setsid' to become the leader of a new session. *Note Process -Group Functions::. + This function actually terminates the process by raising a + `SIGABRT' signal, and your program can include a handler to + intercept this signal; see *Note Signal Handling::. + + *Future Change Warning:* Proposed Federal censorship regulations may +prohibit us from giving you information about the possibility of +calling this function. We would be required to say that this is not an +acceptable way of terminating a program.  -File: libc.info, Node: Access to the Terminal, Next: Orphaned Process Groups, Prev: Controlling Terminal, Up: Job Control +File: libc.info, Node: Termination Internals, Prev: Aborting a Program, Up: Program Termination -Access to the Controlling Terminal -================================== +Termination Internals +--------------------- - Processes in the foreground job of a controlling terminal have -unrestricted access to that terminal; background processes do not. This -section describes in more detail what happens when a process in a -background job tries to access its controlling terminal. + The `_exit' function is the primitive used for process termination +by `exit'. It is declared in the header file `unistd.h'. - When a process in a background job tries to read from its controlling -terminal, the process group is usually sent a `SIGTTIN' signal. This -normally causes all of the processes in that group to stop (unless they -handle the signal and don't stop themselves). However, if the reading -process is ignoring or blocking this signal, then `read' fails with an -`EIO' error instead. + - Function: void _exit (int STATUS) + The `_exit' function is the primitive for causing a process to + terminate with status STATUS. Calling this function does not + execute cleanup functions registered with `atexit' or `on_exit'. - Similarly, when a process in a background job tries to write to its -controlling terminal, the default behavior is to send a `SIGTTOU' -signal to the process group. However, the behavior is modified by the -`TOSTOP' bit of the local modes flags (*note Local Modes::). If this -bit is not set (which is the default), then writing to the controlling -terminal is always permitted without sending a signal. Writing is also -permitted if the `SIGTTOU' signal is being ignored or blocked by the -writing process. + - Function: void _Exit (int STATUS) + The `_Exit' function is the ISO C equivalent to `_exit'. The + ISO C committee members were not sure whether the definitions of + `_exit' and `_Exit' were compatible so they have not used the + POSIX name. - Most other terminal operations that a program can do are treated as -reading or as writing. (The description of each operation should say -which.) + This function was introduced in ISO C99 and is declared in + `stdlib.h'. - For more information about the primitive `read' and `write' -functions, see *Note I/O Primitives::. + When a process terminates for any reason--either because the program +terminates, or as a result of a signal--the following things happen: - -File: libc.info, Node: Orphaned Process Groups, Next: Implementing a Shell, Prev: Access to the Terminal, Up: Job Control + * All open file descriptors in the process are closed. *Note + Low-Level I/O::. Note that streams are not flushed automatically + when the process terminates; see *Note I/O on Streams::. -Orphaned Process Groups -======================= + * A process exit status is saved to be reported back to the parent + process via `wait' or `waitpid'; see *Note Process Completion::. + If the program exited, this status includes as its low-order 8 + bits the program exit status. - When a controlling process terminates, its terminal becomes free and -a new session can be established on it. (In fact, another user could -log in on the terminal.) This could cause a problem if any processes -from the old session are still trying to use that terminal. + * Any child processes of the process being terminated are assigned a + new parent process. (On most systems, including GNU, this is the + `init' process, with process ID 1.) - To prevent problems, process groups that continue running even after -the session leader has terminated are marked as "orphaned process -groups". + * A `SIGCHLD' signal is sent to the parent process. - When a process group becomes an orphan, its processes are sent a -`SIGHUP' signal. Ordinarily, this causes the processes to terminate. -However, if a program ignores this signal or establishes a handler for -it (*note Signal Handling::), it can continue running as in the orphan -process group even after its controlling process terminates; but it -still cannot access the terminal any more. + * If the process is a session leader that has a controlling + terminal, then a `SIGHUP' signal is sent to each process in the + foreground job, and the controlling terminal is disassociated from + that session. *Note Job Control::. + + * If termination of a process causes a process group to become + orphaned, and any member of that process group is stopped, then a + `SIGHUP' signal and a `SIGCONT' signal are sent to each process in + the group. *Note Job Control::.  -File: libc.info, Node: Implementing a Shell, Next: Functions for Job Control, Prev: Orphaned Process Groups, Up: Job Control +File: libc.info, Node: Processes, Next: Job Control, Prev: Program Basics, Up: Top -Implementing a Job Control Shell -================================ +Processes +********* - This section describes what a shell must do to implement job -control, by presenting an extensive sample program to illustrate the -concepts involved. + "Processes" are the primitive units for allocation of system +resources. Each process has its own address space and (usually) one +thread of control. A process executes a program; you can have multiple +processes executing the same program, but each process has its own copy +of the program within its own address space and executes it +independently of the other copies. + + Processes are organized hierarchically. Each process has a "parent +process" which explicitly arranged to create it. The processes created +by a given parent are called its "child processes". A child inherits +many of its attributes from the parent process. + + This chapter describes how a program can create, terminate, and +control child processes. Actually, there are three distinct operations +involved: creating a new child process, causing the new process to +execute a program, and coordinating the completion of the child process +with the original program. + + The `system' function provides a simple, portable mechanism for +running another program; it does all three steps automatically. If you +need more control over the details of how this is done, you can use the +primitive functions to do each step individually instead. * Menu: -* Data Structures:: Introduction to the sample shell. -* Initializing the Shell:: What the shell must do to take - responsibility for job control. -* Launching Jobs:: Creating jobs to execute commands. -* Foreground and Background:: Putting a job in foreground of background. -* Stopped and Terminated Jobs:: Reporting job status. -* Continuing Stopped Jobs:: How to continue a stopped job in - the foreground or background. -* Missing Pieces:: Other parts of the shell. +* Running a Command:: The easy way to run another program. +* Process Creation Concepts:: An overview of the hard way to do it. +* Process Identification:: How to get the process ID of a process. +* Creating a Process:: How to fork a child process. +* Executing a File:: How to make a process execute another program. +* Process Completion:: How to tell when a child process has completed. +* Process Completion Status:: How to interpret the status value + returned from a child process. +* BSD Wait Functions:: More functions, for backward compatibility. +* Process Creation Example:: A complete example program.  -File: libc.info, Node: Data Structures, Next: Initializing the Shell, Up: Implementing a Shell +File: libc.info, Node: Running a Command, Next: Process Creation Concepts, Up: Processes -Data Structures for the Shell ------------------------------ +Running a Command +================= - All of the program examples included in this chapter are part of a -simple shell program. This section presents data structures and -utility functions which are used throughout the example. + The easy way to run another program is to use the `system' function. +This function does all the work of running a subprogram, but it +doesn't give you much control over the details: you have to wait until +the subprogram terminates before you can do anything else. - The sample shell deals mainly with two data structures. The `job' -type contains information about a job, which is a set of subprocesses -linked together with pipes. The `process' type holds information about -a single subprocess. Here are the relevant data structure declarations: + - Function: int system (const char *COMMAND) + This function executes COMMAND as a shell command. In the GNU C + library, it always uses the default shell `sh' to run the command. + In particular, it searches the directories in `PATH' to find + programs to execute. The return value is `-1' if it wasn't + possible to create the shell process, and otherwise is the status + of the shell process. *Note Process Completion::, for details on + how this status code can be interpreted. - /* A process is a single process. */ - typedef struct process - { - struct process *next; /* next process in pipeline */ - char **argv; /* for exec */ - pid_t pid; /* process ID */ - char completed; /* true if process has completed */ - char stopped; /* true if process has stopped */ - int status; /* reported status value */ - } process; - - /* A job is a pipeline of processes. */ - typedef struct job - { - struct job *next; /* next active job */ - char *command; /* command line, used for messages */ - process *first_process; /* list of processes in this job */ - pid_t pgid; /* process group ID */ - char notified; /* true if user told about stopped job */ - struct termios tmodes; /* saved terminal modes */ - int stdin, stdout, stderr; /* standard i/o channels */ - } job; - - /* The active jobs are linked into a list. This is its head. */ - job *first_job = NULL; + If the COMMAND argument is a null pointer, a return value of zero + indicates that no command processor is available. - Here are some utility functions that are used for operating on `job' -objects. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `system' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `system' should be protected using cancellation handlers. - /* Find the active job with the indicated PGID. */ - job * - find_job (pid_t pgid) - { - job *j; - - for (j = first_job; j; j = j->next) - if (j->pgid == pgid) - return j; - return NULL; - } - - /* Return true if all processes in the job have stopped or completed. */ - int - job_is_stopped (job *j) - { - process *p; - - for (p = j->first_process; p; p = p->next) - if (!p->completed && !p->stopped) - return 0; - return 1; - } - - /* Return true if all processes in the job have completed. */ - int - job_is_completed (job *j) - { - process *p; - - for (p = j->first_process; p; p = p->next) - if (!p->completed) - return 0; - return 1; - } + The `system' function is declared in the header file `stdlib.h'. - -File: libc.info, Node: Initializing the Shell, Next: Launching Jobs, Prev: Data Structures, Up: Implementing a Shell + *Portability Note:* Some C implementations may not have any notion +of a command processor that can execute other programs. You can +determine whether a command processor exists by executing +`system (NULL)'; if the return value is nonzero, a command processor is +available. -Initializing the Shell ----------------------- + The `popen' and `pclose' functions (*note Pipe to a Subprocess::) +are closely related to the `system' function. They allow the parent +process to communicate with the standard input and output channels of +the command being executed. - When a shell program that normally performs job control is started, -it has to be careful in case it has been invoked from another shell -that is already doing its own job control. + +File: libc.info, Node: Process Creation Concepts, Next: Process Identification, Prev: Running a Command, Up: Processes - A subshell that runs interactively has to ensure that it has been -placed in the foreground by its parent shell before it can enable job -control itself. It does this by getting its initial process group ID -with the `getpgrp' function, and comparing it to the process group ID -of the current foreground job associated with its controlling terminal -(which can be retrieved using the `tcgetpgrp' function). +Process Creation Concepts +========================= - If the subshell is not running as a foreground job, it must stop -itself by sending a `SIGTTIN' signal to its own process group. It may -not arbitrarily put itself into the foreground; it must wait for the -user to tell the parent shell to do this. If the subshell is continued -again, it should repeat the check and stop itself again if it is still -not in the foreground. + This section gives an overview of processes and of the steps +involved in creating a process and making it run another program. - Once the subshell has been placed into the foreground by its parent -shell, it can enable its own job control. It does this by calling -`setpgid' to put itself into its own process group, and then calling -`tcsetpgrp' to place this process group into the foreground. + Each process is named by a "process ID" number. A unique process ID +is allocated to each process when it is created. The "lifetime" of a +process ends when its termination is reported to its parent process; at +that time, all of the process resources, including its process ID, are +freed. - When a shell enables job control, it should set itself to ignore all -the job control stop signals so that it doesn't accidentally stop -itself. You can do this by setting the action for all the stop signals -to `SIG_IGN'. + Processes are created with the `fork' system call (so the operation +of creating a new process is sometimes called "forking" a process). +The "child process" created by `fork' is a copy of the original "parent +process", except that it has its own process ID. - A subshell that runs non-interactively cannot and should not support -job control. It must leave all processes it creates in the same process -group as the shell itself; this allows the non-interactive shell and its -child processes to be treated as a single job by the parent shell. This -is easy to do--just don't use any of the job control primitives--but -you must remember to make the shell do it. + After forking a child process, both the parent and child processes +continue to execute normally. If you want your program to wait for a +child process to finish executing before continuing, you must do this +explicitly after the fork operation, by calling `wait' or `waitpid' +(*note Process Completion::). These functions give you limited +information about why the child terminated--for example, its exit +status code. - Here is the initialization code for the sample shell that shows how -to do all of this. + A newly forked child process continues to execute the same program as +its parent process, at the point where the `fork' call returns. You +can use the return value from `fork' to tell whether the program is +running in the parent process or the child. - /* Keep track of attributes of the shell. */ - - #include - #include - #include - - pid_t shell_pgid; - struct termios shell_tmodes; - int shell_terminal; - int shell_is_interactive; - - - /* Make sure the shell is running interactively as the foreground job - before proceeding. */ - - void - init_shell () - { - - /* See if we are running interactively. */ - shell_terminal = STDIN_FILENO; - shell_is_interactive = isatty (shell_terminal); - - if (shell_is_interactive) - { - /* Loop until we are in the foreground. */ - while (tcgetpgrp (shell_terminal) != (shell_pgid = getpgrp ())) - kill (- shell_pgid, SIGTTIN); - - /* Ignore interactive and job-control signals. */ - signal (SIGINT, SIG_IGN); - signal (SIGQUIT, SIG_IGN); - signal (SIGTSTP, SIG_IGN); - signal (SIGTTIN, SIG_IGN); - signal (SIGTTOU, SIG_IGN); - signal (SIGCHLD, SIG_IGN); - - /* Put ourselves in our own process group. */ - shell_pgid = getpid (); - if (setpgid (shell_pgid, shell_pgid) < 0) - { - perror ("Couldn't put the shell in its own process group"); - exit (1); - } - - /* Grab control of the terminal. */ - tcsetpgrp (shell_terminal, shell_pgid); - - /* Save default terminal attributes for shell. */ - tcgetattr (shell_terminal, &shell_tmodes); - } - } + Having several processes run the same program is only occasionally +useful. But the child can execute another program using one of the +`exec' functions; see *Note Executing a File::. The program that the +process is executing is called its "process image". Starting execution +of a new program causes the process to forget all about its previous +process image; when the new program exits, the process exits too, +instead of returning to the previous process image.  -File: libc.info, Node: Launching Jobs, Next: Foreground and Background, Prev: Initializing the Shell, Up: Implementing a Shell - -Launching Jobs --------------- - - Once the shell has taken responsibility for performing job control on -its controlling terminal, it can launch jobs in response to commands -typed by the user. +File: libc.info, Node: Process Identification, Next: Creating a Process, Prev: Process Creation Concepts, Up: Processes - To create the processes in a process group, you use the same `fork' -and `exec' functions described in *Note Process Creation Concepts::. -Since there are multiple child processes involved, though, things are a -little more complicated and you must be careful to do things in the -right order. Otherwise, nasty race conditions can result. +Process Identification +====================== - You have two choices for how to structure the tree of parent-child -relationships among the processes. You can either make all the -processes in the process group be children of the shell process, or you -can make one process in group be the ancestor of all the other processes -in that group. The sample shell program presented in this chapter uses -the first approach because it makes bookkeeping somewhat simpler. + The `pid_t' data type represents process IDs. You can get the +process ID of a process by calling `getpid'. The function `getppid' +returns the process ID of the parent of the current process (this is +also known as the "parent process ID"). Your program should include +the header files `unistd.h' and `sys/types.h' to use these functions. - As each process is forked, it should put itself in the new process -group by calling `setpgid'; see *Note Process Group Functions::. The -first process in the new group becomes its "process group leader", and -its process ID becomes the "process group ID" for the group. + - Data Type: pid_t + The `pid_t' data type is a signed integer type which is capable of + representing a process ID. In the GNU library, this is an `int'. - The shell should also call `setpgid' to put each of its child -processes into the new process group. This is because there is a -potential timing problem: each child process must be put in the process -group before it begins executing a new program, and the shell depends on -having all the child processes in the group before it continues -executing. If both the child processes and the shell call `setpgid', -this ensures that the right things happen no matter which process gets -to it first. + - Function: pid_t getpid (void) + The `getpid' function returns the process ID of the current + process. - If the job is being launched as a foreground job, the new process -group also needs to be put into the foreground on the controlling -terminal using `tcsetpgrp'. Again, this should be done by the shell as -well as by each of its child processes, to avoid race conditions. + - Function: pid_t getppid (void) + The `getppid' function returns the process ID of the parent of the + current process. - The next thing each child process should do is to reset its signal -actions. + +File: libc.info, Node: Creating a Process, Next: Executing a File, Prev: Process Identification, Up: Processes - During initialization, the shell process set itself to ignore job -control signals; see *Note Initializing the Shell::. As a result, any -child processes it creates also ignore these signals by inheritance. -This is definitely undesirable, so each child process should explicitly -set the actions for these signals back to `SIG_DFL' just after it is -forked. +Creating a Process +================== - Since shells follow this convention, applications can assume that -they inherit the correct handling of these signals from the parent -process. But every application has a responsibility not to mess up the -handling of stop signals. Applications that disable the normal -interpretation of the SUSP character should provide some other -mechanism for the user to stop the job. When the user invokes this -mechanism, the program should send a `SIGTSTP' signal to the process -group of the process, not just to the process itself. *Note Signaling -Another Process::. + The `fork' function is the primitive for creating a process. It is +declared in the header file `unistd.h'. - Finally, each child process should call `exec' in the normal way. -This is also the point at which redirection of the standard input and -output channels should be handled. *Note Duplicating Descriptors::, -for an explanation of how to do this. + - Function: pid_t fork (void) + The `fork' function creates a new process. - Here is the function from the sample shell program that is -responsible for launching a program. The function is executed by each -child process immediately after it has been forked by the shell, and -never returns. + If the operation is successful, there are then both parent and + child processes and both see `fork' return, but with different + values: it returns a value of `0' in the child process and returns + the child's process ID in the parent process. - void - launch_process (process *p, pid_t pgid, - int infile, int outfile, int errfile, - int foreground) - { - pid_t pid; - - if (shell_is_interactive) - { - /* Put the process into the process group and give the process group - the terminal, if appropriate. - This has to be done both by the shell and in the individual - child processes because of potential race conditions. */ - pid = getpid (); - if (pgid == 0) pgid = pid; - setpgid (pid, pgid); - if (foreground) - tcsetpgrp (shell_terminal, pgid); - - /* Set the handling for job control signals back to the default. */ - signal (SIGINT, SIG_DFL); - signal (SIGQUIT, SIG_DFL); - signal (SIGTSTP, SIG_DFL); - signal (SIGTTIN, SIG_DFL); - signal (SIGTTOU, SIG_DFL); - signal (SIGCHLD, SIG_DFL); - } - - /* Set the standard input/output channels of the new process. */ - if (infile != STDIN_FILENO) - { - dup2 (infile, STDIN_FILENO); - close (infile); - } - if (outfile != STDOUT_FILENO) - { - dup2 (outfile, STDOUT_FILENO); - close (outfile); - } - if (errfile != STDERR_FILENO) - { - dup2 (errfile, STDERR_FILENO); - close (errfile); - } - - /* Exec the new process. Make sure we exit. */ - execvp (p->argv[0], p->argv); - perror ("execvp"); - exit (1); - } + If process creation failed, `fork' returns a value of `-1' in the + parent process. The following `errno' error conditions are + defined for `fork': - If the shell is not running interactively, this function does not do -anything with process groups or signals. Remember that a shell not -performing job control must keep all of its subprocesses in the same -process group as the shell itself. + `EAGAIN' + There aren't enough system resources to create another + process, or the user already has too many processes running. + This means exceeding the `RLIMIT_NPROC' resource limit, which + can usually be increased; *note Limits on Resources::. - Next, here is the function that actually launches a complete job. -After creating the child processes, this function calls some other -functions to put the newly created job into the foreground or -background; these are discussed in *Note Foreground and Background::. + `ENOMEM' + The process requires more space than the system can supply. - void - launch_job (job *j, int foreground) - { - process *p; - pid_t pid; - int mypipe[2], infile, outfile; - - infile = j->stdin; - for (p = j->first_process; p; p = p->next) - { - /* Set up pipes, if necessary. */ - if (p->next) - { - if (pipe (mypipe) < 0) - { - perror ("pipe"); - exit (1); - } - outfile = mypipe[1]; - } - else - outfile = j->stdout; - - /* Fork the child processes. */ - pid = fork (); - if (pid == 0) - /* This is the child process. */ - launch_process (p, j->pgid, infile, - outfile, j->stderr, foreground); - else if (pid < 0) - { - /* The fork failed. */ - perror ("fork"); - exit (1); - } - else - { - /* This is the parent process. */ - p->pid = pid; - if (shell_is_interactive) - { - if (!j->pgid) - j->pgid = pid; - setpgid (pid, j->pgid); - } - } - - /* Clean up after pipes. */ - if (infile != j->stdin) - close (infile); - if (outfile != j->stdout) - close (outfile); - infile = mypipe[0]; - } - - format_job_info (j, "launched"); - - if (!shell_is_interactive) - wait_for_job (j); - else if (foreground) - put_job_in_foreground (j, 0); - else - put_job_in_background (j, 0); - } + The specific attributes of the child process that differ from the +parent process are: - -File: libc.info, Node: Foreground and Background, Next: Stopped and Terminated Jobs, Prev: Launching Jobs, Up: Implementing a Shell + * The child process has its own unique process ID. -Foreground and Background -------------------------- + * The parent process ID of the child process is the process ID of its + parent process. - Now let's consider what actions must be taken by the shell when it -launches a job into the foreground, and how this differs from what must -be done when a background job is launched. + * The child process gets its own copies of the parent process's open + file descriptors. Subsequently changing attributes of the file + descriptors in the parent process won't affect the file + descriptors in the child, and vice versa. *Note Control + Operations::. However, the file position associated with each + descriptor is shared by both processes; *note File Position::. - When a foreground job is launched, the shell must first give it -access to the controlling terminal by calling `tcsetpgrp'. Then, the -shell should wait for processes in that process group to terminate or -stop. This is discussed in more detail in *Note Stopped and Terminated -Jobs::. + * The elapsed processor times for the child process are set to zero; + see *Note Processor Time::. - When all of the processes in the group have either completed or -stopped, the shell should regain control of the terminal for its own -process group by calling `tcsetpgrp' again. Since stop signals caused -by I/O from a background process or a SUSP character typed by the user -are sent to the process group, normally all the processes in the job -stop together. + * The child doesn't inherit file locks set by the parent process. + *Note Control Operations::. - The foreground job may have left the terminal in a strange state, so -the shell should restore its own saved terminal modes before -continuing. In case the job is merely stopped, the shell should first -save the current terminal modes so that it can restore them later if -the job is continued. The functions for dealing with terminal modes are -`tcgetattr' and `tcsetattr'; these are described in *Note Terminal -Modes::. + * The child doesn't inherit alarms set by the parent process. *Note + Setting an Alarm::. - Here is the sample shell's function for doing all of this. + * The set of pending signals (*note Delivery of Signal::) for the + child process is cleared. (The child process inherits its mask of + blocked signals and signal actions from the parent process.) - /* Put job J in the foreground. If CONT is nonzero, - restore the saved terminal modes and send the process group a - `SIGCONT' signal to wake it up before we block. */ - - void - put_job_in_foreground (job *j, int cont) - { - /* Put the job into the foreground. */ - tcsetpgrp (shell_terminal, j->pgid); - - /* Send the job a continue signal, if necessary. */ - if (cont) - { - tcsetattr (shell_terminal, TCSADRAIN, &j->tmodes); - if (kill (- j->pgid, SIGCONT) < 0) - perror ("kill (SIGCONT)"); - } - - /* Wait for it to report. */ - wait_for_job (j); - - /* Put the shell back in the foreground. */ - tcsetpgrp (shell_terminal, shell_pgid); - - /* Restore the shell's terminal modes. */ - tcgetattr (shell_terminal, &j->tmodes); - tcsetattr (shell_terminal, TCSADRAIN, &shell_tmodes); - } + - Function: pid_t vfork (void) + The `vfork' function is similar to `fork' but on some systems it + is more efficient; however, there are restrictions you must follow + to use it safely. - If the process group is launched as a background job, the shell -should remain in the foreground itself and continue to read commands -from the terminal. + While `fork' makes a complete copy of the calling process's address + space and allows both the parent and child to execute + independently, `vfork' does not make this copy. Instead, the + child process created with `vfork' shares its parent's address + space until it calls `_exit' or one of the `exec' functions. In + the meantime, the parent process suspends execution. - In the sample shell, there is not much that needs to be done to put -a job into the background. Here is the function it uses: + You must be very careful not to allow the child process created + with `vfork' to modify any global data or even local variables + shared with the parent. Furthermore, the child process cannot + return from (or do a long jump out of) the function that called + `vfork'! This would leave the parent process's control + information very confused. If in doubt, use `fork' instead. - /* Put a job in the background. If the cont argument is true, send - the process group a `SIGCONT' signal to wake it up. */ - - void - put_job_in_background (job *j, int cont) - { - /* Send the job a continue signal, if necessary. */ - if (cont) - if (kill (-j->pgid, SIGCONT) < 0) - perror ("kill (SIGCONT)"); - } + Some operating systems don't really implement `vfork'. The GNU C + library permits you to use `vfork' on all systems, but actually + executes `fork' if `vfork' isn't available. If you follow the + proper precautions for using `vfork', your program will still work + even if the system uses `fork' instead. diff -durpN glibc-2.2.4/manual/libc.info-44 glibc-2.2.5/manual/libc.info-44 --- glibc-2.2.4/manual/libc.info-44 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-44 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1213 +33,1143 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Stopped and Terminated Jobs, Next: Continuing Stopped Jobs, Prev: Foreground and Background, Up: Implementing a Shell - -Stopped and Terminated Jobs ---------------------------- - - When a foreground process is launched, the shell must block until -all of the processes in that job have either terminated or stopped. It -can do this by calling the `waitpid' function; see *Note Process -Completion::. Use the `WUNTRACED' option so that status is reported -for processes that stop as well as processes that terminate. +File: libc.info, Node: Executing a File, Next: Process Completion, Prev: Creating a Process, Up: Processes - The shell must also check on the status of background jobs so that it -can report terminated and stopped jobs to the user; this can be done by -calling `waitpid' with the `WNOHANG' option. A good place to put a -such a check for terminated and stopped jobs is just before prompting -for a new command. +Executing a File +================ - The shell can also receive asynchronous notification that there is -status information available for a child process by establishing a -handler for `SIGCHLD' signals. *Note Signal Handling::. + This section describes the `exec' family of functions, for executing +a file as a process image. You can use these functions to make a child +process execute a new program after it has been forked. - In the sample shell program, the `SIGCHLD' signal is normally -ignored. This is to avoid reentrancy problems involving the global data -structures the shell manipulates. But at specific times when the shell -is not using these data structures--such as when it is waiting for -input on the terminal--it makes sense to enable a handler for -`SIGCHLD'. The same function that is used to do the synchronous status -checks (`do_job_notification', in this case) can also be called from -within this handler. + To see the effects of `exec' from the point of view of the called +program, *Note Program Basics::. - Here are the parts of the sample shell program that deal with -checking the status of jobs and reporting the information to the user. + The functions in this family differ in how you specify the arguments, +but otherwise they all do the same thing. They are declared in the +header file `unistd.h'. - /* Store the status of the process PID that was returned by waitpid. - Return 0 if all went well, nonzero otherwise. */ - - int - mark_process_status (pid_t pid, int status) - { - job *j; - process *p; - - if (pid > 0) - { - /* Update the record for the process. */ - for (j = first_job; j; j = j->next) - for (p = j->first_process; p; p = p->next) - if (p->pid == pid) - { - p->status = status; - if (WIFSTOPPED (status)) - p->stopped = 1; - else - { - p->completed = 1; - if (WIFSIGNALED (status)) - fprintf (stderr, "%d: Terminated by signal %d.\n", - (int) pid, WTERMSIG (p->status)); - } - return 0; - } - fprintf (stderr, "No child process %d.\n", pid); - return -1; - } - else if (pid == 0 || errno == ECHILD) - /* No processes ready to report. */ - return -1; - else { - /* Other weird errors. */ - perror ("waitpid"); - return -1; - } - } - - /* Check for processes that have status information available, - without blocking. */ - - void - update_status (void) - { - int status; - pid_t pid; - - do - pid = waitpid (WAIT_ANY, &status, WUNTRACED|WNOHANG); - while (!mark_process_status (pid, status)); - } - - /* Check for processes that have status information available, - blocking until all processes in the given job have reported. */ - - void - wait_for_job (job *j) - { - int status; - pid_t pid; - - do - pid = waitpid (WAIT_ANY, &status, WUNTRACED); - while (!mark_process_status (pid, status) - && !job_is_stopped (j) - && !job_is_completed (j)); - } - - /* Format information about job status for the user to look at. */ - - void - format_job_info (job *j, const char *status) - { - fprintf (stderr, "%ld (%s): %s\n", (long)j->pgid, status, j->command); - } - - /* Notify the user about stopped or terminated jobs. - Delete terminated jobs from the active job list. */ - - void - do_job_notification (void) - { - job *j, *jlast, *jnext; - process *p; - - /* Update status information for child processes. */ - update_status (); - - jlast = NULL; - for (j = first_job; j; j = jnext) - { - jnext = j->next; - - /* If all processes have completed, tell the user the job has - completed and delete it from the list of active jobs. */ - if (job_is_completed (j)) { - format_job_info (j, "completed"); - if (jlast) - jlast->next = jnext; - else - first_job = jnext; - free_job (j); - } - - /* Notify the user about stopped jobs, - marking them so that we won't do this more than once. */ - else if (job_is_stopped (j) && !j->notified) { - format_job_info (j, "stopped"); - j->notified = 1; - jlast = j; - } - - /* Don't say anything about jobs that are still running. */ - else - jlast = j; - } - } + - Function: int execv (const char *FILENAME, char *const ARGV[]) + The `execv' function executes the file named by FILENAME as a new + process image. - -File: libc.info, Node: Continuing Stopped Jobs, Next: Missing Pieces, Prev: Stopped and Terminated Jobs, Up: Implementing a Shell + The ARGV argument is an array of null-terminated strings that is + used to provide a value for the `argv' argument to the `main' + function of the program to be executed. The last element of this + array must be a null pointer. By convention, the first element of + this array is the file name of the program sans directory names. + *Note Program Arguments::, for full details on how programs can + access these arguments. -Continuing Stopped Jobs ------------------------ + The environment for the new process image is taken from the + `environ' variable of the current process image; see *Note + Environment Variables::, for information about environments. - The shell can continue a stopped job by sending a `SIGCONT' signal -to its process group. If the job is being continued in the foreground, -the shell should first invoke `tcsetpgrp' to give the job access to the -terminal, and restore the saved terminal settings. After continuing a -job in the foreground, the shell should wait for the job to stop or -complete, as if the job had just been launched in the foreground. + - Function: int execl (const char *FILENAME, const char *ARG0, ...) + This is similar to `execv', but the ARGV strings are specified + individually instead of as an array. A null pointer must be + passed as the last such argument. - The sample shell program handles both newly created and continued -jobs with the same pair of functions, `put_job_in_foreground' and -`put_job_in_background'. The definitions of these functions were given -in *Note Foreground and Background::. When continuing a stopped job, a -nonzero value is passed as the CONT argument to ensure that the -`SIGCONT' signal is sent and the terminal modes reset, as appropriate. + - Function: int execve (const char *FILENAME, char *const ARGV[], char + *const ENV[]) + This is similar to `execv', but permits you to specify the + environment for the new program explicitly as the ENV argument. + This should be an array of strings in the same format as for the + `environ' variable; see *Note Environment Access::. - This leaves only a function for updating the shell's internal -bookkeeping about the job being continued: + - Function: int execle (const char *FILENAME, const char *ARG0, char + *const ENV[], ...) + This is similar to `execl', but permits you to specify the + environment for the new program explicitly. The environment + argument is passed following the null pointer that marks the last + ARGV argument, and should be an array of strings in the same + format as for the `environ' variable. - /* Mark a stopped job J as being running again. */ - - void - mark_job_as_running (job *j) - { - Process *p; - - for (p = j->first_process; p; p = p->next) - p->stopped = 0; - j->notified = 0; - } - - /* Continue the job J. */ - - void - continue_job (job *j, int foreground) - { - mark_job_as_running (j); - if (foreground) - put_job_in_foreground (j, 1); - else - put_job_in_background (j, 1); - } + - Function: int execvp (const char *FILENAME, char *const ARGV[]) + The `execvp' function is similar to `execv', except that it + searches the directories listed in the `PATH' environment variable + (*note Standard Environment::) to find the full file name of a + file from FILENAME if FILENAME does not contain a slash. - -File: libc.info, Node: Missing Pieces, Prev: Continuing Stopped Jobs, Up: Implementing a Shell + This function is useful for executing system utility programs, + because it looks for them in the places that the user has chosen. + Shells use it to run the commands that users type. -The Missing Pieces ------------------- + - Function: int execlp (const char *FILENAME, const char *ARG0, ...) + This function is like `execl', except that it performs the same + file name searching as the `execvp' function. - The code extracts for the sample shell included in this chapter are -only a part of the entire shell program. In particular, nothing at all -has been said about how `job' and `program' data structures are -allocated and initialized. + The size of the argument list and environment list taken together +must not be greater than `ARG_MAX' bytes. *Note General Limits::. In +the GNU system, the size (which compares against `ARG_MAX') includes, +for each string, the number of characters in the string, plus the size +of a `char *', plus one, rounded up to a multiple of the size of a +`char *'. Other systems may have somewhat different rules for counting. - Most real shells provide a complex user interface that has support -for a command language; variables; abbreviations, substitutions, and -pattern matching on file names; and the like. All of this is far too -complicated to explain here! Instead, we have concentrated on showing -how to implement the core process creation and job control functions -that can be called from such a shell. + These functions normally don't return, since execution of a new +program causes the currently executing program to go away completely. +A value of `-1' is returned in the event of a failure. In addition to +the usual file name errors (*note File Name Errors::), the following +`errno' error conditions are defined for these functions: - Here is a table summarizing the major entry points we have presented: +`E2BIG' + The combined size of the new program's argument list and + environment list is larger than `ARG_MAX' bytes. The GNU system + has no specific limit on the argument list size, so this error + code cannot result, but you may get `ENOMEM' instead if the + arguments are too big for available memory. -`void init_shell (void)' - Initialize the shell's internal state. *Note Initializing the - Shell::. +`ENOEXEC' + The specified file can't be executed because it isn't in the right + format. -`void launch_job (job *J, int FOREGROUND)' - Launch the job J as either a foreground or background job. *Note - Launching Jobs::. +`ENOMEM' + Executing the specified file requires more storage than is + available. -`void do_job_notification (void)' - Check for and report any jobs that have terminated or stopped. - Can be called synchronously or within a handler for `SIGCHLD' - signals. *Note Stopped and Terminated Jobs::. + If execution of the new file succeeds, it updates the access time +field of the file as if the file had been read. *Note File Times::, +for more details about access times of files. -`void continue_job (job *J, int FOREGROUND)' - Continue the job J. *Note Continuing Stopped Jobs::. + The point at which the file is closed again is not specified, but is +at some point before the process exits or before another process image +is executed. - Of course, a real shell would also want to provide other functions -for managing jobs. For example, it would be useful to have commands to -list all active jobs or to send a signal (such as `SIGKILL') to a job. + Executing a new process image completely changes the contents of +memory, copying only the argument and environment strings to new +locations. But many other attributes of the process are unchanged: - -File: libc.info, Node: Functions for Job Control, Prev: Implementing a Shell, Up: Job Control + * The process ID and the parent process ID. *Note Process Creation + Concepts::. -Functions for Job Control -========================= + * Session and process group membership. *Note Concepts of Job + Control::. - This section contains detailed descriptions of the functions relating -to job control. + * Real user ID and group ID, and supplementary group IDs. *Note + Process Persona::. -* Menu: + * Pending alarms. *Note Setting an Alarm::. -* Identifying the Terminal:: Determining the controlling terminal's name. -* Process Group Functions:: Functions for manipulating process groups. -* Terminal Access Functions:: Functions for controlling terminal access. + * Current working directory and root directory. *Note Working + Directory::. In the GNU system, the root directory is not copied + when executing a setuid program; instead the system default root + directory is used for the new program. - -File: libc.info, Node: Identifying the Terminal, Next: Process Group Functions, Up: Functions for Job Control + * File mode creation mask. *Note Setting Permissions::. -Identifying the Controlling Terminal ------------------------------------- + * Process signal mask; see *Note Process Signal Mask::. - You can use the `ctermid' function to get a file name that you can -use to open the controlling terminal. In the GNU library, it returns -the same string all the time: `"/dev/tty"'. That is a special "magic" -file name that refers to the controlling terminal of the current -process (if it has one). To find the name of the specific terminal -device, use `ttyname'; *note Is It a Terminal::. + * Pending signals; see *Note Blocking Signals::. - The function `ctermid' is declared in the header file `stdio.h'. + * Elapsed processor time associated with the process; see *Note + Processor Time::. - - Function: char * ctermid (char *STRING) - The `ctermid' function returns a string containing the file name of - the controlling terminal for the current process. If STRING is - not a null pointer, it should be an array that can hold at least - `L_ctermid' characters; the string is returned in this array. - Otherwise, a pointer to a string in a static area is returned, - which might get overwritten on subsequent calls to this function. + If the set-user-ID and set-group-ID mode bits of the process image +file are set, this affects the effective user ID and effective group ID +(respectively) of the process. These concepts are discussed in detail +in *Note Process Persona::. - An empty string is returned if the file name cannot be determined - for any reason. Even if a file name is returned, access to the - file it represents is not guaranteed. + Signals that are set to be ignored in the existing process image are +also set to be ignored in the new process image. All other signals are +set to the default action in the new process image. For more +information about signals, see *Note Signal Handling::. - - Macro: int L_ctermid - The value of this macro is an integer constant expression that - represents the size of a string large enough to hold the file name - returned by `ctermid'. + File descriptors open in the existing process image remain open in +the new process image, unless they have the `FD_CLOEXEC' +(close-on-exec) flag set. The files that remain open inherit all +attributes of the open file description from the existing process image, +including file locks. File descriptors are discussed in *Note +Low-Level I/O::. - See also the `isatty' and `ttyname' functions, in *Note Is It a -Terminal::. + Streams, by contrast, cannot survive through `exec' functions, +because they are located in the memory of the process itself. The new +process image has no streams except those it creates afresh. Each of +the streams in the pre-`exec' process image has a descriptor inside it, +and these descriptors do survive through `exec' (provided that they do +not have `FD_CLOEXEC' set). The new process image can reconnect these +to new streams using `fdopen' (*note Descriptors and Streams::).  -File: libc.info, Node: Process Group Functions, Next: Terminal Access Functions, Prev: Identifying the Terminal, Up: Functions for Job Control - -Process Group Functions ------------------------ - - Here are descriptions of the functions for manipulating process -groups. Your program should include the header files `sys/types.h' and -`unistd.h' to use these functions. - - - Function: pid_t setsid (void) - The `setsid' function creates a new session. The calling process - becomes the session leader, and is put in a new process group whose - process group ID is the same as the process ID of that process. - There are initially no other processes in the new process group, - and no other process groups in the new session. - - This function also makes the calling process have no controlling - terminal. - - The `setsid' function returns the new process group ID of the - calling process if successful. A return value of `-1' indicates an - error. The following `errno' error conditions are defined for this - function: - - `EPERM' - The calling process is already a process group leader, or - there is already another process group around that has the - same process group ID. - - - Function: pid_t getsid (pid_t PID) - The `getsid' function returns the process group ID of the session - leader of the specified process. If a PID is `0', the process - group ID of the session leader of the current process is returned. +File: libc.info, Node: Process Completion, Next: Process Completion Status, Prev: Executing a File, Up: Processes - In case of error `-1' is returned and `errno' is set. The - following `errno' error conditions are defined for this function: +Process Completion +================== - `ESRCH' - There is no process with the given process ID PID. + The functions described in this section are used to wait for a child +process to terminate or stop, and determine its status. These functions +are declared in the header file `sys/wait.h'. - `EPERM' - The calling process and the process specified by PID are in - different sessions, and the implementation doesn't allow to - access the process group ID of the session leader of the - process with ID PID from the calling process. + - Function: pid_t waitpid (pid_t PID, int *STATUS-PTR, int OPTIONS) + The `waitpid' function is used to request status information from a + child process whose process ID is PID. Normally, the calling + process is suspended until the child process makes status + information available by terminating. - The `getpgrp' function has two definitions: one derived from BSD -Unix, and one from the POSIX.1 standard. The feature test macros you -have selected (*note Feature Test Macros::) determine which definition -you get. Specifically, you get the BSD version if you define -`_BSD_SOURCE'; otherwise, you get the POSIX version if you define -`_POSIX_SOURCE' or `_GNU_SOURCE'. Programs written for old BSD systems -will not include `unistd.h', which defines `getpgrp' specially under -`_BSD_SOURCE'. You must link such programs with the `-lbsd-compat' -option to get the BSD definition. + Other values for the PID argument have special interpretations. A + value of `-1' or `WAIT_ANY' requests status information for any + child process; a value of `0' or `WAIT_MYPGRP' requests + information for any child process in the same process group as the + calling process; and any other negative value - PGID requests + information for any child process whose process group ID is PGID. - - POSIX.1 Function: pid_t getpgrp (void) - The POSIX.1 definition of `getpgrp' returns the process group ID of - the calling process. + If status information for a child process is available + immediately, this function returns immediately without waiting. + If more than one eligible child process has status information + available, one of them is chosen randomly, and its status is + returned immediately. To get the status from the other eligible + child processes, you need to call `waitpid' again. - - BSD Function: pid_t getpgrp (pid_t PID) - The BSD definition of `getpgrp' returns the process group ID of the - process PID. You can supply a value of `0' for the PID argument - to get information about the calling process. + The OPTIONS argument is a bit mask. Its value should be the + bitwise OR (that is, the `|' operator) of zero or more of the + `WNOHANG' and `WUNTRACED' flags. You can use the `WNOHANG' flag + to indicate that the parent process shouldn't wait; and the + `WUNTRACED' flag to request status information from stopped + processes as well as processes that have terminated. - - System V Function: int getpgid (pid_t PID) - `getpgid' is the same as the BSD function `getpgrp'. It returns - the process group ID of the process PID. You can supply a value - of `0' for the PID argument to get information about the calling - process. + The status information from the child process is stored in the + object that STATUS-PTR points to, unless STATUS-PTR is a null + pointer. - In case of error `-1' is returned and `errno' is set. The - following `errno' error conditions are defined for this function: + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `waitpid' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `waitpid' should be protected using cancellation handlers. - `ESRCH' - There is no process with the given process ID PID. The - calling process and the process specified by PID are in - different sessions, and the implementation doesn't allow to - access the process group ID of the process with ID PID from - the calling process. + The return value is normally the process ID of the child process + whose status is reported. If there are child processes but none + of them is waiting to be noticed, `waitpid' will block until one + is. However, if the `WNOHANG' option was specified, `waitpid' + will return zero instead of blocking. - - Function: int setpgid (pid_t PID, pid_t PGID) - The `setpgid' function puts the process PID into the process group - PGID. As a special case, either PID or PGID can be zero to - indicate the process ID of the calling process. + If a specific PID to wait for was given to `waitpid', it will + ignore all other children (if any). Therefore if there are + children waiting to be noticed but the child whose PID was + specified is not one of them, `waitpid' will block or return zero + as described above. - This function fails on a system that does not support job control. - *Note Job Control is Optional::, for more information. + A value of `-1' is returned in case of error. The following + `errno' error conditions are defined for this function: - If the operation is successful, `setpgid' returns zero. Otherwise - it returns `-1'. The following `errno' error conditions are - defined for this function: + `EINTR' + The function was interrupted by delivery of a signal to the + calling process. *Note Interrupted Primitives::. - `EACCES' - The child process named by PID has executed an `exec' - function since it was forked. + `ECHILD' + There are no child processes to wait for, or the specified PID + is not a child of the calling process. `EINVAL' - The value of the PGID is not valid. - - `ENOSYS' - The system doesn't support job control. - - `EPERM' - The process indicated by the PID argument is a session leader, - or is not in the same session as the calling process, or the - value of the PGID argument doesn't match a process group ID - in the same session as the calling process. - - `ESRCH' - The process indicated by the PID argument is not the calling - process or a child of the calling process. - - - Function: int setpgrp (pid_t PID, pid_t PGID) - This is the BSD Unix name for `setpgid'. Both functions do exactly - the same thing. - - -File: libc.info, Node: Terminal Access Functions, Prev: Process Group Functions, Up: Functions for Job Control - -Functions for Controlling Terminal Access ------------------------------------------ - - These are the functions for reading or setting the foreground -process group of a terminal. You should include the header files -`sys/types.h' and `unistd.h' in your application to use these functions. - - Although these functions take a file descriptor argument to specify -the terminal device, the foreground job is associated with the terminal -file itself and not a particular open file descriptor. + An invalid value was provided for the OPTIONS argument. - - Function: pid_t tcgetpgrp (int FILEDES) - This function returns the process group ID of the foreground - process group associated with the terminal open on descriptor - FILEDES. + These symbolic constants are defined as values for the PID argument +to the `waitpid' function. - If there is no foreground process group, the return value is a - number greater than `1' that does not match the process group ID - of any existing process group. This can happen if all of the - processes in the job that was formerly the foreground job have - terminated, and no other job has yet been moved into the - foreground. +`WAIT_ANY' + This constant macro (whose value is `-1') specifies that `waitpid' + should return status information about any child process. - In case of an error, a value of `-1' is returned. The following - `errno' error conditions are defined for this function: +`WAIT_MYPGRP' + This constant (with value `0') specifies that `waitpid' should + return status information about any child process in the same + process group as the calling process. - `EBADF' - The FILEDES argument is not a valid file descriptor. + These symbolic constants are defined as flags for the OPTIONS +argument to the `waitpid' function. You can bitwise-OR the flags +together to obtain a value to use as the argument. - `ENOSYS' - The system doesn't support job control. +`WNOHANG' + This flag specifies that `waitpid' should return immediately + instead of waiting, if there is no child process ready to be + noticed. - `ENOTTY' - The terminal file associated with the FILEDES argument isn't - the controlling terminal of the calling process. +`WUNTRACED' + This flag specifies that `waitpid' should report the status of any + child processes that have been stopped as well as those that have + terminated. - - Function: int tcsetpgrp (int FILEDES, pid_t PGID) - This function is used to set a terminal's foreground process group - ID. The argument FILEDES is a descriptor which specifies the - terminal; PGID specifies the process group. The calling process - must be a member of the same session as PGID and must have the same - controlling terminal. + - Function: pid_t wait (int *STATUS-PTR) + This is a simplified version of `waitpid', and is used to wait + until any one child process terminates. The call: - For terminal access purposes, this function is treated as output. - If it is called from a background process on its controlling - terminal, normally all processes in the process group are sent a - `SIGTTOU' signal. The exception is if the calling process itself - is ignoring or blocking `SIGTTOU' signals, in which case the - operation is performed and no signal is sent. + wait (&status) - If successful, `tcsetpgrp' returns `0'. A return value of `-1' - indicates an error. The following `errno' error conditions are - defined for this function: + is exactly equivalent to: - `EBADF' - The FILEDES argument is not a valid file descriptor. + waitpid (-1, &status, 0) - `EINVAL' - The PGID argument is not valid. + This function is a cancellation point in multi-threaded programs. + This is a problem if the thread allocates some resources (like + memory, file descriptors, semaphores or whatever) at the time + `wait' is called. If the thread gets canceled these resources + stay allocated until the program ends. To avoid this calls to + `wait' should be protected using cancellation handlers. - `ENOSYS' - The system doesn't support job control. + - Function: pid_t wait4 (pid_t PID, int *STATUS-PTR, int OPTIONS, + struct rusage *USAGE) + If USAGE is a null pointer, `wait4' is equivalent to `waitpid + (PID, STATUS-PTR, OPTIONS)'. - `ENOTTY' - The FILEDES isn't the controlling terminal of the calling - process. + If USAGE is not null, `wait4' stores usage figures for the child + process in `*RUSAGE' (but only if the child has terminated, not if + it has stopped). *Note Resource Usage::. - `EPERM' - The PGID isn't a process group in the same session as the - calling process. + This function is a BSD extension. - - Function: pid_t tcgetsid (int FILDES) - This function is used to obtain the process group ID of the session - for which the terminal specified by FILDES is the controlling - terminal. If the call is successful the group ID is returned. - Otherwise the return value is `(pid_t) -1' and the global variable - ERRNO is set to the following value: - `EBADF' - The FILEDES argument is not a valid file descriptor. + Here's an example of how to use `waitpid' to get the status from all +child processes that have terminated, without ever waiting. This +function is designed to be a handler for `SIGCHLD', the signal that +indicates that at least one child process has terminated. - `ENOTTY' - The calling process does not have a controlling terminal, or - the file is not the controlling terminal. + void + sigchld_handler (int signum) + { + int pid, status, serrno; + serrno = errno; + while (1) + { + pid = waitpid (WAIT_ANY, &status, WNOHANG); + if (pid < 0) + { + perror ("waitpid"); + break; + } + if (pid == 0) + break; + notice_termination (pid, status); + } + errno = serrno; + }  -File: libc.info, Node: Name Service Switch, Next: Users and Groups, Prev: Job Control, Up: Top - -System Databases and Name Service Switch -**************************************** - - Various functions in the C Library need to be configured to work -correctly in the local environment. Traditionally, this was done by -using files (e.g., `/etc/passwd'), but other nameservices (like the -Network Information Service (NIS) and the Domain Name Service (DNS)) -became popular, and were hacked into the C library, usually with a fixed -search order (*note frobnicate: (jargon)frobnicate.). - - The GNU C Library contains a cleaner solution of this problem. It is -designed after a method used by Sun Microsystems in the C library of -Solaris 2. GNU C Library follows their name and calls this scheme -"Name Service Switch" (NSS). - - Though the interface might be similar to Sun's version there is no -common code. We never saw any source code of Sun's implementation and -so the internal interface is incompatible. This also manifests in the -file names we use as we will see later. +File: libc.info, Node: Process Completion Status, Next: BSD Wait Functions, Prev: Process Completion, Up: Processes -* Menu: +Process Completion Status +========================= -* NSS Basics:: What is this NSS good for. -* NSS Configuration File:: Configuring NSS. -* NSS Module Internals:: How does it work internally. -* Extending NSS:: What to do to add services or databases. + If the exit status value (*note Program Termination::) of the child +process is zero, then the status value reported by `waitpid' or `wait' +is also zero. You can test for other kinds of information encoded in +the returned status value using the following macros. These macros are +defined in the header file `sys/wait.h'. - -File: libc.info, Node: NSS Basics, Next: NSS Configuration File, Prev: Name Service Switch, Up: Name Service Switch + - Macro: int WIFEXITED (int STATUS) + This macro returns a nonzero value if the child process terminated + normally with `exit' or `_exit'. -NSS Basics -========== + - Macro: int WEXITSTATUS (int STATUS) + If `WIFEXITED' is true of STATUS, this macro returns the low-order + 8 bits of the exit status value from the child process. *Note + Exit Status::. - The basic idea is to put the implementation of the different services -offered to access the databases in separate modules. This has some -advantages: + - Macro: int WIFSIGNALED (int STATUS) + This macro returns a nonzero value if the child process terminated + because it received a signal that was not handled. *Note Signal + Handling::. - 1. Contributors can add new services without adding them to GNU C - Library. + - Macro: int WTERMSIG (int STATUS) + If `WIFSIGNALED' is true of STATUS, this macro returns the signal + number of the signal that terminated the child process. - 2. The modules can be updated separately. + - Macro: int WCOREDUMP (int STATUS) + This macro returns a nonzero value if the child process terminated + and produced a core dump. - 3. The C library image is smaller. + - Macro: int WIFSTOPPED (int STATUS) + This macro returns a nonzero value if the child process is stopped. - To fulfill the first goal above the ABI of the modules will be -described below. For getting the implementation of a new service right -it is important to understand how the functions in the modules get -called. They are in no way designed to be used by the programmer -directly. Instead the programmer should only use the documented and -standardized functions to access the databases. + - Macro: int WSTOPSIG (int STATUS) + If `WIFSTOPPED' is true of STATUS, this macro returns the signal + number of the signal that caused the child process to stop. -The databases available in the NSS are + +File: libc.info, Node: BSD Wait Functions, Next: Process Creation Example, Prev: Process Completion Status, Up: Processes -`aliases' - Mail aliases +BSD Process Wait Functions +========================== -`ethers' - Ethernet numbers, + The GNU library also provides these related facilities for +compatibility with BSD Unix. BSD uses the `union wait' data type to +represent status values rather than an `int'. The two representations +are actually interchangeable; they describe the same bit patterns. The +GNU C Library defines macros such as `WEXITSTATUS' so that they will +work on either kind of object, and the `wait' function is defined to +accept either type of pointer as its STATUS-PTR argument. -`group' - Groups of users, *note Group Database::. + These functions are declared in `sys/wait.h'. -`hosts' - Host names and numbers, *note Host Names::. + - Data Type: union wait + This data type represents program termination status values. It + has the following members: -`netgroup' - Network wide list of host and users, *note Netgroup Database::. + `int w_termsig' + The value of this member is the same as that of the + `WTERMSIG' macro. -`networks' - Network names and numbers, *note Networks Database::. + `int w_coredump' + The value of this member is the same as that of the + `WCOREDUMP' macro. -`protocols' - Network protocols, *note Protocols Database::. + `int w_retcode' + The value of this member is the same as that of the + `WEXITSTATUS' macro. -`passwd' - User passwords, *note User Database::. + `int w_stopsig' + The value of this member is the same as that of the + `WSTOPSIG' macro. -`rpc' - Remote procedure call names and numbers, + Instead of accessing these members directly, you should use the + equivalent macros. -`services' - Network services, *note Services Database::. + The `wait3' function is the predecessor to `wait4', which is more +flexible. `wait3' is now obsolete. -`shadow' - Shadow user passwords, + - Function: pid_t wait3 (union wait *STATUS-PTR, int OPTIONS, struct + rusage *USAGE) + If USAGE is a null pointer, `wait3' is equivalent to `waitpid (-1, + STATUS-PTR, OPTIONS)'. -There will be some more added later (`automount', `bootparams', -`netmasks', and `publickey'). + If USAGE is not null, `wait3' stores usage figures for the child + process in `*RUSAGE' (but only if the child has terminated, not if + it has stopped). *Note Resource Usage::.  -File: libc.info, Node: NSS Configuration File, Next: NSS Module Internals, Prev: NSS Basics, Up: Name Service Switch +File: libc.info, Node: Process Creation Example, Prev: BSD Wait Functions, Up: Processes -The NSS Configuration File -========================== +Process Creation Example +======================== - Somehow the NSS code must be told about the wishes of the user. For -this reason there is the file `/etc/nsswitch.conf'. For each database -this file contain a specification how the lookup process should work. -The file could look like this: + Here is an example program showing how you might write a function +similar to the built-in `system'. It executes its COMMAND argument +using the equivalent of `sh -c COMMAND'. - # /etc/nsswitch.conf - # - # Name Service Switch configuration file. - # + #include + #include + #include + #include + #include - passwd: db files nis - shadow: files - group: db files nis + /* Execute the command using this shell program. */ + #define SHELL "/bin/sh" - hosts: files nisplus nis dns - networks: nisplus [NOTFOUND=return] files + int + my_system (const char *command) + { + int status; + pid_t pid; - ethers: nisplus [NOTFOUND=return] db files - protocols: nisplus [NOTFOUND=return] db files - rpc: nisplus [NOTFOUND=return] db files - services: nisplus [NOTFOUND=return] db files - - The first column is the database as you can guess from the table -above. The rest of the line specifies how the lookup process works. -Please note that you specify the way it works for each database -individually. This cannot be done with the old way of a monolithic -implementation. - - The configuration specification for each database can contain two -different items: - - * the service specification like `files', `db', or `nis'. - - * the reaction on lookup result like `[NOTFOUND=return]'. - -* Menu: - -* Services in the NSS configuration:: Service names in the NSS configuration. -* Actions in the NSS configuration:: React appropriately to the lookup result. -* Notes on NSS Configuration File:: Things to take care about while - configuring NSS. - - -File: libc.info, Node: Services in the NSS configuration, Next: Actions in the NSS configuration, Prev: NSS Configuration File, Up: NSS Configuration File + pid = fork (); + if (pid == 0) + { + /* This is the child process. Execute the shell command. */ + execl (SHELL, SHELL, "-c", command, NULL); + _exit (EXIT_FAILURE); + } + else if (pid < 0) + /* The fork failed. Report failure. */ + status = -1; + else + /* This is the parent process. Wait for the child to complete. */ + if (waitpid (pid, &status, 0) != pid) + status = -1; + return status; + } -Services in the NSS configuration File --------------------------------------- + There are a couple of things you should pay attention to in this +example. - The above example file mentions four different services: `files', -`db', `nis', and `nisplus'. This does not mean these services are -available on all sites and it does also not mean these are all the -services which will ever be available. + Remember that the first `argv' argument supplied to the program +represents the name of the program being executed. That is why, in the +call to `execl', `SHELL' is supplied once to name the program to +execute and a second time to supply a value for `argv[0]'. - In fact, these names are simply strings which the NSS code uses to -find the implicitly addressed functions. The internal interface will be -described later. Visible to the user are the modules which implement an -individual service. + The `execl' call in the child process doesn't return if it is +successful. If it fails, you must do something to make the child +process terminate. Just returning a bad status code with `return' +would leave two processes running the original program. Instead, the +right behavior is for the child process to report failure to its parent +process. - Assume the service NAME shall be used for a lookup. The code for -this service is implemented in a module called `libnss_NAME'. On a -system supporting shared libraries this is in fact a shared library -with the name (for example) `libnss_NAME.so.2'. The number at the end -is the currently used version of the interface which will not change -frequently. Normally the user should not have to be cognizant of these -files since they should be placed in a directory where they are found -automatically. Only the names of all available services are important. + Call `_exit' to accomplish this. The reason for using `_exit' +instead of `exit' is to avoid flushing fully buffered streams such as +`stdout'. The buffers of these streams probably contain data that was +copied from the parent process by the `fork', data that will be output +eventually by the parent process. Calling `exit' in the child would +output the data twice. *Note Termination Internals::.  -File: libc.info, Node: Actions in the NSS configuration, Next: Notes on NSS Configuration File, Prev: Services in the NSS configuration, Up: NSS Configuration File - -Actions in the NSS configuration --------------------------------- +File: libc.info, Node: Job Control, Next: Name Service Switch, Prev: Processes, Up: Top - The second item in the specification gives the user much finer -control on the lookup process. Action items are placed between two -service names and are written within brackets. The general form is +Job Control +*********** - `[' ( `!'? STATUS `=' ACTION )+ `]' + "Job control" refers to the protocol for allowing a user to move +between multiple "process groups" (or "jobs") within a single "login +session". The job control facilities are set up so that appropriate +behavior for most programs happens automatically and they need not do +anything special about job control. So you can probably ignore the +material in this chapter unless you are writing a shell or login +program. -where + You need to be familiar with concepts relating to process creation +(*note Process Creation Concepts::) and signal handling (*note Signal +Handling::) in order to understand this material presented in this +chapter. - STATUS => success | notfound | unavail | tryagain - ACTION => return | continue +* Menu: - The case of the keywords is insignificant. The STATUS values are -the results of a call to a lookup function of a specific service. They -mean +* Concepts of Job Control:: Jobs can be controlled by a shell. +* Job Control is Optional:: Not all POSIX systems support job control. +* Controlling Terminal:: How a process gets its controlling terminal. +* Access to the Terminal:: How processes share the controlling terminal. +* Orphaned Process Groups:: Jobs left after the user logs out. +* Implementing a Shell:: What a shell must do to implement job control. +* Functions for Job Control:: Functions to control process groups. -`success' - No error occurred and the wanted entry is returned. The default - action for this is `return'. + +File: libc.info, Node: Concepts of Job Control, Next: Job Control is Optional, Up: Job Control -`notfound' - The lookup process works ok but the needed value was not found. - The default action is `continue'. +Concepts of Job Control +======================= -`unavail' - The service is permanently unavailable. This can either mean the - needed file is not available, or, for DNS, the server is not - available or does not allow queries. The default action is - `continue'. + The fundamental purpose of an interactive shell is to read commands +from the user's terminal and create processes to execute the programs +specified by those commands. It can do this using the `fork' (*note +Creating a Process::) and `exec' (*note Executing a File::) functions. -`tryagain' - The service is temporarily unavailable. This could mean a file is - locked or a server currently cannot accept more connections. The - default action is `continue'. + A single command may run just one process--but often one command uses +several processes. If you use the `|' operator in a shell command, you +explicitly request several programs in their own processes. But even +if you run just one program, it can use multiple processes internally. +For example, a single compilation command such as `cc -c foo.c' +typically uses four processes (though normally only two at any given +time). If you run `make', its job is to run other programs in separate +processes. -If we have a line like + The processes belonging to a single command are called a "process +group" or "job". This is so that you can operate on all of them at +once. For example, typing `C-c' sends the signal `SIGINT' to terminate +all the processes in the foreground process group. - ethers: nisplus [NOTFOUND=return] db files + A "session" is a larger group of processes. Normally all the +processes that stem from a single login belong to the same session. -this is equivalent to + Every process belongs to a process group. When a process is +created, it becomes a member of the same process group and session as +its parent process. You can put it in another process group using the +`setpgid' function, provided the process group belongs to the same +session. - ethers: nisplus [SUCCESS=return NOTFOUND=return UNAVAIL=continue - TRYAGAIN=continue] - db [SUCCESS=return NOTFOUND=continue UNAVAIL=continue - TRYAGAIN=continue] - files + The only way to put a process in a different session is to make it +the initial process of a new session, or a "session leader", using the +`setsid' function. This also puts the session leader into a new +process group, and you can't move it out of that process group again. -(except that it would have to be written on one line). The default -value for the actions are normally what you want, and only need to be -changed in exceptional cases. + Usually, new sessions are created by the system login program, and +the session leader is the process running the user's login shell. - If the optional `!' is placed before the STATUS this means the -following action is used for all statuses but STATUS itself. I.e., `!' -is negation as in the C language (and others). + A shell that supports job control must arrange to control which job +can use the terminal at any time. Otherwise there might be multiple +jobs trying to read from the terminal at once, and confusion about which +process should receive the input typed by the user. To prevent this, +the shell must cooperate with the terminal driver using the protocol +described in this chapter. - Before we explain the exception which makes this action item -necessary one more remark: obviously it makes no sense to add another -action item after the `files' service. Since there is no other service -following the action _always_ is `return'. + The shell can give unlimited access to the controlling terminal to +only one process group at a time. This is called the "foreground job" +on that controlling terminal. Other process groups managed by the shell +that are executing without such access to the terminal are called +"background jobs". - Now, why is this `[NOTFOUND=return]' action useful? To understand -this we should know that the `nisplus' service is often complete; i.e., -if an entry is not available in the NIS+ tables it is not available -anywhere else. This is what is expressed by this action item: it is -useless to examine further services since they will not give us a -result. + If a background job needs to read from its controlling terminal, it +is "stopped" by the terminal driver; if the `TOSTOP' mode is set, +likewise for writing. The user can stop a foreground job by typing the +SUSP character (*note Special Characters::) and a program can stop any +job by sending it a `SIGSTOP' signal. It's the responsibility of the +shell to notice when jobs stop, to notify the user about them, and to +provide mechanisms for allowing the user to interactively continue +stopped jobs and switch jobs between foreground and background. - The situation would be different if the NIS+ service is not available -because the machine is booting. In this case the return value of the -lookup function is not `notfound' but instead `unavail'. And as you -can see in the complete form above: in this situation the `db' and -`files' services are used. Neat, isn't it? The system administrator -need not pay special care for the time the system is not completely -ready to work (while booting or shutdown or network problems). + *Note Access to the Terminal::, for more information about I/O to the +controlling terminal,  -File: libc.info, Node: Notes on NSS Configuration File, Prev: Actions in the NSS configuration, Up: NSS Configuration File - -Notes on the NSS Configuration File ------------------------------------ - - Finally a few more hints. The NSS implementation is not completely -helpless if `/etc/nsswitch.conf' does not exist. For all supported -databases there is a default value so it should normally be possible to -get the system running even if the file is corrupted or missing. +File: libc.info, Node: Job Control is Optional, Next: Controlling Terminal, Prev: Concepts of Job Control, Up: Job Control - For the `hosts' and `networks' databases the default value is `dns -[!UNAVAIL=return] files'. I.e., the system is prepared for the DNS -service not to be available but if it is available the answer it -returns is definitive. +Job Control is Optional +======================= - The `passwd', `group', and `shadow' databases are traditionally -handled in a special way. The appropriate files in the `/etc' -directory are read but if an entry with a name starting with a `+' -character is found NIS is used. This kind of lookup remains possible -by using the special lookup service `compat' and the default value for -the three databases above is `compat [NOTFOUND=return] files'. + Not all operating systems support job control. The GNU system does +support job control, but if you are using the GNU library on some other +system, that system may not support job control itself. - For all other databases the default value is `nis [NOTFOUND=return] -files'. This solution give the best chance to be correct since NIS and -file based lookup is used. + You can use the `_POSIX_JOB_CONTROL' macro to test at compile-time +whether the system supports job control. *Note System Options::. - A second point is that the user should try to optimize the lookup -process. The different service have different response times. A -simple file look up on a local file could be fast, but if the file is -long and the needed entry is near the end of the file this may take -quite some time. In this case it might be better to use the `db' -service which allows fast local access to large data sets. + If job control is not supported, then there can be only one process +group per session, which behaves as if it were always in the foreground. +The functions for creating additional process groups simply fail with +the error code `ENOSYS'. - Often the situation is that some global information like NIS must be -used. So it is unavoidable to use service entries like `nis' etc. But -one should avoid slow services like this if possible. + The macros naming the various job control signals (*note Job Control +Signals::) are defined even if job control is not supported. However, +the system never generates these signals, and attempts to send a job +control signal or examine or specify their actions report errors or do +nothing.  -File: libc.info, Node: NSS Module Internals, Next: Extending NSS, Prev: NSS Configuration File, Up: Name Service Switch +File: libc.info, Node: Controlling Terminal, Next: Access to the Terminal, Prev: Job Control is Optional, Up: Job Control -NSS Module Internals -==================== +Controlling Terminal of a Process +================================= - Now it is time to describe what the modules look like. The functions -contained in a module are identified by their names. I.e., there is no -jump table or the like. How this is done is of no interest here; those -interested in this topic should read about Dynamic Linking. + One of the attributes of a process is its controlling terminal. +Child processes created with `fork' inherit the controlling terminal +from their parent process. In this way, all the processes in a session +inherit the controlling terminal from the session leader. A session +leader that has control of a terminal is called the "controlling +process" of that terminal. -* Menu: + You generally do not need to worry about the exact mechanism used to +allocate a controlling terminal to a session, since it is done for you +by the system when you log in. -* NSS Module Names:: Construction of the interface function of - the NSS modules. -* NSS Modules Interface:: Programming interface in the NSS module - functions. + An individual process disconnects from its controlling terminal when +it calls `setsid' to become the leader of a new session. *Note Process +Group Functions::.  -File: libc.info, Node: NSS Module Names, Next: NSS Modules Interface, Prev: NSS Module Internals, Up: NSS Module Internals - -The Naming Scheme of the NSS Modules ------------------------------------- - -The name of each function consist of various parts: - - _nss_SERVICE_FUNCTION - - SERVICE of course corresponds to the name of the module this -function is found in.(1) The FUNCTION part is derived from the -interface function in the C library itself. If the user calls the -function `gethostbyname' and the service used is `files' the function - - _nss_files_gethostbyname_r - -in the module - - libnss_files.so.2 - -is used. You see, what is explained above in not the whole truth. In -fact the NSS modules only contain reentrant versions of the lookup -functions. I.e., if the user would call the `gethostbyname_r' function -this also would end in the above function. For all user interface -functions the C library maps this call to a call to the reentrant -function. For reentrant functions this is trivial since the interface -is (nearly) the same. For the non-reentrant version The library keeps -internal buffers which are used to replace the user supplied buffer. +File: libc.info, Node: Access to the Terminal, Next: Orphaned Process Groups, Prev: Controlling Terminal, Up: Job Control - I.e., the reentrant functions _can_ have counterparts. No service -module is forced to have functions for all databases and all kinds to -access them. If a function is not available it is simply treated as if -the function would return `unavail' (*note Actions in the NSS -configuration::). +Access to the Controlling Terminal +================================== - The file name `libnss_files.so.2' would be on a Solaris 2 system -`nss_files.so.2'. This is the difference mentioned above. Sun's NSS -modules are usable as modules which get indirectly loaded only. + Processes in the foreground job of a controlling terminal have +unrestricted access to that terminal; background processes do not. This +section describes in more detail what happens when a process in a +background job tries to access its controlling terminal. - The NSS modules in the GNU C Library are prepared to be used as -normal libraries themselves. This is _not_ true at the moment, though. -However, the organization of the name space in the modules does not -make it impossible like it is for Solaris. Now you can see why the -modules are still libraries.(2) + When a process in a background job tries to read from its controlling +terminal, the process group is usually sent a `SIGTTIN' signal. This +normally causes all of the processes in that group to stop (unless they +handle the signal and don't stop themselves). However, if the reading +process is ignoring or blocking this signal, then `read' fails with an +`EIO' error instead. - ---------- Footnotes ---------- + Similarly, when a process in a background job tries to write to its +controlling terminal, the default behavior is to send a `SIGTTOU' +signal to the process group. However, the behavior is modified by the +`TOSTOP' bit of the local modes flags (*note Local Modes::). If this +bit is not set (which is the default), then writing to the controlling +terminal is always permitted without sending a signal. Writing is also +permitted if the `SIGTTOU' signal is being ignored or blocked by the +writing process. - (1) Now you might ask why this information is duplicated. The -answer is that we want to make it possible to link directly with these -shared objects. + Most other terminal operations that a program can do are treated as +reading or as writing. (The description of each operation should say +which.) - (2) There is a second explanation: we were too lazy to change the -Makefiles to allow the generation of shared objects not starting with -`lib' but don't tell this to anybody. + For more information about the primitive `read' and `write' +functions, see *Note I/O Primitives::.  -File: libc.info, Node: NSS Modules Interface, Prev: NSS Module Names, Up: NSS Module Internals - -The Interface of the Function in NSS Modules --------------------------------------------- - - Now we know about the functions contained in the modules. It is now -time to describe the types. When we mentioned the reentrant versions of -the functions above, this means there are some additional arguments -(compared with the standard, non-reentrant version). The prototypes for -the non-reentrant and reentrant versions of our function above are: - - struct hostent *gethostbyname (const char *name) - - int gethostbyname_r (const char *name, struct hostent *result_buf, - char *buf, size_t buflen, struct hostent **result, - int *h_errnop) - -The actual prototype of the function in the NSS modules in this case is - - enum nss_status _nss_files_gethostbyname_r (const char *name, - struct hostent *result_buf, - char *buf, size_t buflen, - int *errnop, int *h_errnop) - - I.e., the interface function is in fact the reentrant function with -the change of the return value and the omission of the RESULT -parameter. While the user-level function returns a pointer to the -result the reentrant function return an `enum nss_status' value: - -`NSS_STATUS_TRYAGAIN' - numeric value `-2' - -`NSS_STATUS_UNAVAIL' - numeric value `-1' - -`NSS_STATUS_NOTFOUND' - numeric value `0' - -`NSS_STATUS_SUCCESS' - numeric value `1' - -Now you see where the action items of the `/etc/nsswitch.conf' file are -used. - - If you study the source code you will find there is a fifth value: -`NSS_STATUS_RETURN'. This is an internal use only value, used by a few -functions in places where none of the above value can be used. If -necessary the source code should be examined to learn about the details. - - In case the interface function has to return an error it is important -that the correct error code is stored in `*ERRNOP'. Some return status -value have only one associated error code, others have more. - -`NSS_STATUS_TRYAGAIN' `EAGAIN' One of the functions used ran - temporarily out of resources or a - service is currently not available. - `ERANGE' The provided buffer is not large - enough. The function should be - called again with a larger buffer. -`NSS_STATUS_UNAVAIL' `ENOENT' A necessary input file cannot be - found. -`NSS_STATUS_NOTFOUND' `ENOENT' The requested entry is not - available. - - These are proposed values. There can be other error codes and the -described error codes can have different meaning. *With one -exception:* when returning `NSS_STATUS_TRYAGAIN' the error code -`ERANGE' _must_ mean that the user provided buffer is too small. -Everything is non-critical. - - The above function has something special which is missing for almost -all the other module functions. There is an argument H_ERRNOP. This -points to a variable which will be filled with the error code in case -the execution of the function fails for some reason. The reentrant -function cannot use the global variable H_ERRNO; `gethostbyname' calls -`gethostbyname_r' with the last argument set to `&h_errno'. - - The `getXXXbyYYY' functions are the most important functions in the -NSS modules. But there are others which implement the other ways to -access system databases (say for the password database, there are -`setpwent', `getpwent', and `endpwent'). These will be described in -more detail later. Here we give a general way to determine the -signature of the module function: - - * the return value is `int'; - - * the name is as explained in *note NSS Module Names::; - - * the first arguments are identical to the arguments of the - non-reentrant function; - - * the next three arguments are: - - `STRUCT_TYPE *result_buf' - pointer to buffer where the result is stored. `STRUCT_TYPE' - is normally a struct which corresponds to the database. +File: libc.info, Node: Orphaned Process Groups, Next: Implementing a Shell, Prev: Access to the Terminal, Up: Job Control - `char *buffer' - pointer to a buffer where the function can store additional - data for the result etc. +Orphaned Process Groups +======================= - `size_t buflen' - length of the buffer pointed to by BUFFER. + When a controlling process terminates, its terminal becomes free and +a new session can be established on it. (In fact, another user could +log in on the terminal.) This could cause a problem if any processes +from the old session are still trying to use that terminal. - * possibly a last argument H_ERRNOP, for the host name and network - name lookup functions. + To prevent problems, process groups that continue running even after +the session leader has terminated are marked as "orphaned process +groups". -This table is correct for all functions but the `set...ent' and -`end...ent' functions. + When a process group becomes an orphan, its processes are sent a +`SIGHUP' signal. Ordinarily, this causes the processes to terminate. +However, if a program ignores this signal or establishes a handler for +it (*note Signal Handling::), it can continue running as in the orphan +process group even after its controlling process terminates; but it +still cannot access the terminal any more.  -File: libc.info, Node: Extending NSS, Prev: NSS Module Internals, Up: Name Service Switch - -Extending NSS -============= +File: libc.info, Node: Implementing a Shell, Next: Functions for Job Control, Prev: Orphaned Process Groups, Up: Job Control - One of the advantages of NSS mentioned above is that it can be -extended quite easily. There are two ways in which the extension can -happen: adding another database or adding another service. The former -is normally done only by the C library developers. It is here only -important to remember that adding another database is independent from -adding another service because a service need not support all databases -or lookup functions. +Implementing a Job Control Shell +================================ - A designer/implementor of a new service is therefore free to choose -the databases s/he is interested in and leave the rest for later (or -completely aside). + This section describes what a shell must do to implement job +control, by presenting an extensive sample program to illustrate the +concepts involved. * Menu: -* Adding another Service to NSS:: What is to do to add a new service. -* NSS Module Function Internals:: Guidelines for writing new NSS - service functions. +* Data Structures:: Introduction to the sample shell. +* Initializing the Shell:: What the shell must do to take + responsibility for job control. +* Launching Jobs:: Creating jobs to execute commands. +* Foreground and Background:: Putting a job in foreground of background. +* Stopped and Terminated Jobs:: Reporting job status. +* Continuing Stopped Jobs:: How to continue a stopped job in + the foreground or background. +* Missing Pieces:: Other parts of the shell.  -File: libc.info, Node: Adding another Service to NSS, Next: NSS Module Function Internals, Prev: Extending NSS, Up: Extending NSS +File: libc.info, Node: Data Structures, Next: Initializing the Shell, Up: Implementing a Shell -Adding another Service to NSS +Data Structures for the Shell ----------------------------- - The sources for a new service need not (and should not) be part of -the GNU C Library itself. The developer retains complete control over -the sources and its development. The links between the C library and -the new service module consists solely of the interface functions. - - Each module is designed following a specific interface specification. -For now the version is 2 (the interface in version 1 was not adequate) -and this manifests in the version number of the shared library object of -the NSS modules: they have the extension `.2'. If the interface -changes again in an incompatible way, this number will be increased. -Modules using the old interface will still be usable. - - Developers of a new service will have to make sure that their module -is created using the correct interface number. This means the file -itself must have the correct name and on ELF systems the "soname" -(Shared Object Name) must also have this number. Building a module -from a bunch of object files on an ELF system using GNU CC could be -done like this: + All of the program examples included in this chapter are part of a +simple shell program. This section presents data structures and +utility functions which are used throughout the example. - gcc -shared -o libnss_NAME.so.2 -Wl,-soname,libnss_NAME.so.2 OBJECTS + The sample shell deals mainly with two data structures. The `job' +type contains information about a job, which is a set of subprocesses +linked together with pipes. The `process' type holds information about +a single subprocess. Here are the relevant data structure declarations: -*Note Options for Linking: (gcc)Link Options, to learn more about this -command line. + /* A process is a single process. */ + typedef struct process + { + struct process *next; /* next process in pipeline */ + char **argv; /* for exec */ + pid_t pid; /* process ID */ + char completed; /* true if process has completed */ + char stopped; /* true if process has stopped */ + int status; /* reported status value */ + } process; + + /* A job is a pipeline of processes. */ + typedef struct job + { + struct job *next; /* next active job */ + char *command; /* command line, used for messages */ + process *first_process; /* list of processes in this job */ + pid_t pgid; /* process group ID */ + char notified; /* true if user told about stopped job */ + struct termios tmodes; /* saved terminal modes */ + int stdin, stdout, stderr; /* standard i/o channels */ + } job; + + /* The active jobs are linked into a list. This is its head. */ + job *first_job = NULL; - To use the new module the library must be able to find it. This can -be achieved by using options for the dynamic linker so that it will -search the directory where the binary is placed. For an ELF system -this could be done by adding the wanted directory to the value of -`LD_LIBRARY_PATH'. + Here are some utility functions that are used for operating on `job' +objects. - But this is not always possible since some programs (those which run -under IDs which do not belong to the user) ignore this variable. -Therefore the stable version of the module should be placed into a -directory which is searched by the dynamic linker. Normally this should -be the directory `$prefix/lib', where `$prefix' corresponds to the -value given to configure using the `--prefix' option. But be careful: -this should only be done if it is clear the module does not cause any -harm. System administrators should be careful. + /* Find the active job with the indicated PGID. */ + job * + find_job (pid_t pgid) + { + job *j; + + for (j = first_job; j; j = j->next) + if (j->pgid == pgid) + return j; + return NULL; + } + + /* Return true if all processes in the job have stopped or completed. */ + int + job_is_stopped (job *j) + { + process *p; + + for (p = j->first_process; p; p = p->next) + if (!p->completed && !p->stopped) + return 0; + return 1; + } + + /* Return true if all processes in the job have completed. */ + int + job_is_completed (job *j) + { + process *p; + + for (p = j->first_process; p; p = p->next) + if (!p->completed) + return 0; + return 1; + }  -File: libc.info, Node: NSS Module Function Internals, Prev: Adding another Service to NSS, Up: Extending NSS +File: libc.info, Node: Initializing the Shell, Next: Launching Jobs, Prev: Data Structures, Up: Implementing a Shell -Internals of the NSS Module Functions -------------------------------------- +Initializing the Shell +---------------------- - Until now we only provided the syntactic interface for the functions -in the NSS module. In fact there is not much more we can say since the -implementation obviously is different for each function. But a few -general rules must be followed by all functions. + When a shell program that normally performs job control is started, +it has to be careful in case it has been invoked from another shell +that is already doing its own job control. - In fact there are four kinds of different functions which may appear -in the interface. All derive from the traditional ones for system -databases. DB in the following table is normally an abbreviation for -the database (e.g., it is `pw' for the password database). + A subshell that runs interactively has to ensure that it has been +placed in the foreground by its parent shell before it can enable job +control itself. It does this by getting its initial process group ID +with the `getpgrp' function, and comparing it to the process group ID +of the current foreground job associated with its controlling terminal +(which can be retrieved using the `tcgetpgrp' function). -`enum nss_status _nss_DATABASE_setDBent (void)' - This function prepares the service for following operations. For a - simple file based lookup this means files could be opened, for - other services this function simply is a noop. + If the subshell is not running as a foreground job, it must stop +itself by sending a `SIGTTIN' signal to its own process group. It may +not arbitrarily put itself into the foreground; it must wait for the +user to tell the parent shell to do this. If the subshell is continued +again, it should repeat the check and stop itself again if it is still +not in the foreground. - One special case for this function is that it takes an additional - argument for some DATABASEs (i.e., the interface is `int setDBent - (int)'). *Note Host Names::, which describes the `sethostent' - function. + Once the subshell has been placed into the foreground by its parent +shell, it can enable its own job control. It does this by calling +`setpgid' to put itself into its own process group, and then calling +`tcsetpgrp' to place this process group into the foreground. - The return value should be NSS_STATUS_SUCCESS or according to the - table above in case of an error (*note NSS Modules Interface::). + When a shell enables job control, it should set itself to ignore all +the job control stop signals so that it doesn't accidentally stop +itself. You can do this by setting the action for all the stop signals +to `SIG_IGN'. -`enum nss_status _nss_DATABASE_endDBent (void)' - This function simply closes all files which are still open or - removes buffer caches. If there are no files or buffers to remove - this is again a simple noop. + A subshell that runs non-interactively cannot and should not support +job control. It must leave all processes it creates in the same process +group as the shell itself; this allows the non-interactive shell and its +child processes to be treated as a single job by the parent shell. This +is easy to do--just don't use any of the job control primitives--but +you must remember to make the shell do it. - There normally is no return value different to NSS_STATUS_SUCCESS. + Here is the initialization code for the sample shell that shows how +to do all of this. -`enum nss_status _nss_DATABASE_getDBent_r (STRUCTURE *result, char *buffer, size_t buflen, int *errnop)' - Since this function will be called several times in a row to - retrieve one entry after the other it must keep some kind of - state. But this also means the functions are not really - reentrant. They are reentrant only in that simultaneous calls to - this function will not try to write the retrieved data in the same - place (as it would be the case for the non-reentrant functions); - instead, it writes to the structure pointed to by the RESULT - parameter. But the calls share a common state and in the case of - a file access this means they return neighboring entries in the - file. + /* Keep track of attributes of the shell. */ + + #include + #include + #include + + pid_t shell_pgid; + struct termios shell_tmodes; + int shell_terminal; + int shell_is_interactive; + + + /* Make sure the shell is running interactively as the foreground job + before proceeding. */ + + void + init_shell () + { + + /* See if we are running interactively. */ + shell_terminal = STDIN_FILENO; + shell_is_interactive = isatty (shell_terminal); + + if (shell_is_interactive) + { + /* Loop until we are in the foreground. */ + while (tcgetpgrp (shell_terminal) != (shell_pgid = getpgrp ())) + kill (- shell_pgid, SIGTTIN); + + /* Ignore interactive and job-control signals. */ + signal (SIGINT, SIG_IGN); + signal (SIGQUIT, SIG_IGN); + signal (SIGTSTP, SIG_IGN); + signal (SIGTTIN, SIG_IGN); + signal (SIGTTOU, SIG_IGN); + signal (SIGCHLD, SIG_IGN); + + /* Put ourselves in our own process group. */ + shell_pgid = getpid (); + if (setpgid (shell_pgid, shell_pgid) < 0) + { + perror ("Couldn't put the shell in its own process group"); + exit (1); + } + + /* Grab control of the terminal. */ + tcsetpgrp (shell_terminal, shell_pgid); + + /* Save default terminal attributes for shell. */ + tcgetattr (shell_terminal, &shell_tmodes); + } + } - The buffer of length BUFLEN pointed to by BUFFER can be used for - storing some additional data for the result. It is _not_ - guaranteed that the same buffer will be passed for the next call - of this function. Therefore one must not misuse this buffer to - save some state information from one call to another. + +File: libc.info, Node: Launching Jobs, Next: Foreground and Background, Prev: Initializing the Shell, Up: Implementing a Shell - Before the function returns the implementation should store the - value of the local ERRNO variable in the variable pointed to be - ERRNOP. This is important to guarantee the module working in - statically linked programs. +Launching Jobs +-------------- - As explained above this function could also have an additional last - argument. This depends on the database used; it happens only for - `host' and `networks'. + Once the shell has taken responsibility for performing job control on +its controlling terminal, it can launch jobs in response to commands +typed by the user. - The function shall return `NSS_STATUS_SUCCESS' as long as there are - more entries. When the last entry was read it should return - `NSS_STATUS_NOTFOUND'. When the buffer given as an argument is too - small for the data to be returned `NSS_STATUS_TRYAGAIN' should be - returned. When the service was not formerly initialized by a call - to `_nss_DATABASE_setDBent' all return value allowed for this - function can also be returned here. + To create the processes in a process group, you use the same `fork' +and `exec' functions described in *Note Process Creation Concepts::. +Since there are multiple child processes involved, though, things are a +little more complicated and you must be careful to do things in the +right order. Otherwise, nasty race conditions can result. -`enum nss_status _nss_DATABASE_getDBbyXX_r (PARAMS, STRUCTURE *result, char *buffer, size_t buflen, int *errnop)' - This function shall return the entry from the database which is - addressed by the PARAMS. The type and number of these arguments - vary. It must be individually determined by looking to the - user-level interface functions. All arguments given to the - non-reentrant version are here described by PARAMS. + You have two choices for how to structure the tree of parent-child +relationships among the processes. You can either make all the +processes in the process group be children of the shell process, or you +can make one process in group be the ancestor of all the other processes +in that group. The sample shell program presented in this chapter uses +the first approach because it makes bookkeeping somewhat simpler. - The result must be stored in the structure pointed to by RESULT. - If there is additional data to return (say strings, where the - RESULT structure only contains pointers) the function must use the - BUFFER or length BUFLEN. There must not be any references to - non-constant global data. + As each process is forked, it should put itself in the new process +group by calling `setpgid'; see *Note Process Group Functions::. The +first process in the new group becomes its "process group leader", and +its process ID becomes the "process group ID" for the group. - The implementation of this function should honor the STAYOPEN flag - set by the `setDBent' function whenever this makes sense. + The shell should also call `setpgid' to put each of its child +processes into the new process group. This is because there is a +potential timing problem: each child process must be put in the process +group before it begins executing a new program, and the shell depends on +having all the child processes in the group before it continues +executing. If both the child processes and the shell call `setpgid', +this ensures that the right things happen no matter which process gets +to it first. - Before the function returns the implementation should store the - value of the local ERRNO variable in the variable pointed to be - ERRNOP. This is important to guarantee the module working in - statically linked programs. + If the job is being launched as a foreground job, the new process +group also needs to be put into the foreground on the controlling +terminal using `tcsetpgrp'. Again, this should be done by the shell as +well as by each of its child processes, to avoid race conditions. - Again, this function takes an additional last argument for the - `host' and `networks' database. + The next thing each child process should do is to reset its signal +actions. - The return value should as always follow the rules given above - (*note NSS Modules Interface::). + During initialization, the shell process set itself to ignore job +control signals; see *Note Initializing the Shell::. As a result, any +child processes it creates also ignore these signals by inheritance. +This is definitely undesirable, so each child process should explicitly +set the actions for these signals back to `SIG_DFL' just after it is +forked. - -File: libc.info, Node: Users and Groups, Next: System Management, Prev: Name Service Switch, Up: Top + Since shells follow this convention, applications can assume that +they inherit the correct handling of these signals from the parent +process. But every application has a responsibility not to mess up the +handling of stop signals. Applications that disable the normal +interpretation of the SUSP character should provide some other +mechanism for the user to stop the job. When the user invokes this +mechanism, the program should send a `SIGTSTP' signal to the process +group of the process, not just to the process itself. *Note Signaling +Another Process::. -Users and Groups -**************** + Finally, each child process should call `exec' in the normal way. +This is also the point at which redirection of the standard input and +output channels should be handled. *Note Duplicating Descriptors::, +for an explanation of how to do this. - Every user who can log in on the system is identified by a unique -number called the "user ID". Each process has an effective user ID -which says which user's access permissions it has. + Here is the function from the sample shell program that is +responsible for launching a program. The function is executed by each +child process immediately after it has been forked by the shell, and +never returns. - Users are classified into "groups" for access control purposes. Each -process has one or more "group ID values" which say which groups the -process can use for access to files. + void + launch_process (process *p, pid_t pgid, + int infile, int outfile, int errfile, + int foreground) + { + pid_t pid; + + if (shell_is_interactive) + { + /* Put the process into the process group and give the process group + the terminal, if appropriate. + This has to be done both by the shell and in the individual + child processes because of potential race conditions. */ + pid = getpid (); + if (pgid == 0) pgid = pid; + setpgid (pid, pgid); + if (foreground) + tcsetpgrp (shell_terminal, pgid); + + /* Set the handling for job control signals back to the default. */ + signal (SIGINT, SIG_DFL); + signal (SIGQUIT, SIG_DFL); + signal (SIGTSTP, SIG_DFL); + signal (SIGTTIN, SIG_DFL); + signal (SIGTTOU, SIG_DFL); + signal (SIGCHLD, SIG_DFL); + } + + /* Set the standard input/output channels of the new process. */ + if (infile != STDIN_FILENO) + { + dup2 (infile, STDIN_FILENO); + close (infile); + } + if (outfile != STDOUT_FILENO) + { + dup2 (outfile, STDOUT_FILENO); + close (outfile); + } + if (errfile != STDERR_FILENO) + { + dup2 (errfile, STDERR_FILENO); + close (errfile); + } + + /* Exec the new process. Make sure we exit. */ + execvp (p->argv[0], p->argv); + perror ("execvp"); + exit (1); + } - The effective user and group IDs of a process collectively form its -"persona". This determines which files the process can access. -Normally, a process inherits its persona from the parent process, but -under special circumstances a process can change its persona and thus -change its access permissions. + If the shell is not running interactively, this function does not do +anything with process groups or signals. Remember that a shell not +performing job control must keep all of its subprocesses in the same +process group as the shell itself. - Each file in the system also has a user ID and a group ID. Access -control works by comparing the user and group IDs of the file with those -of the running process. + Next, here is the function that actually launches a complete job. +After creating the child processes, this function calls some other +functions to put the newly created job into the foreground or +background; these are discussed in *Note Foreground and Background::. - The system keeps a database of all the registered users, and another -database of all the defined groups. There are library functions you -can use to examine these databases. + void + launch_job (job *j, int foreground) + { + process *p; + pid_t pid; + int mypipe[2], infile, outfile; + + infile = j->stdin; + for (p = j->first_process; p; p = p->next) + { + /* Set up pipes, if necessary. */ + if (p->next) + { + if (pipe (mypipe) < 0) + { + perror ("pipe"); + exit (1); + } + outfile = mypipe[1]; + } + else + outfile = j->stdout; + + /* Fork the child processes. */ + pid = fork (); + if (pid == 0) + /* This is the child process. */ + launch_process (p, j->pgid, infile, + outfile, j->stderr, foreground); + else if (pid < 0) + { + /* The fork failed. */ + perror ("fork"); + exit (1); + } + else + { + /* This is the parent process. */ + p->pid = pid; + if (shell_is_interactive) + { + if (!j->pgid) + j->pgid = pid; + setpgid (pid, j->pgid); + } + } + + /* Clean up after pipes. */ + if (infile != j->stdin) + close (infile); + if (outfile != j->stdout) + close (outfile); + infile = mypipe[0]; + } + + format_job_info (j, "launched"); + + if (!shell_is_interactive) + wait_for_job (j); + else if (foreground) + put_job_in_foreground (j, 0); + else + put_job_in_background (j, 0); + } -* Menu: + +File: libc.info, Node: Foreground and Background, Next: Stopped and Terminated Jobs, Prev: Launching Jobs, Up: Implementing a Shell -* User and Group IDs:: Each user has a unique numeric ID; - likewise for groups. -* Process Persona:: The user IDs and group IDs of a process. -* Why Change Persona:: Why a program might need to change - its user and/or group IDs. -* How Change Persona:: Changing the user and group IDs. -* Reading Persona:: How to examine the user and group IDs. +Foreground and Background +------------------------- -* Setting User ID:: Functions for setting the user ID. -* Setting Groups:: Functions for setting the group IDs. + Now let's consider what actions must be taken by the shell when it +launches a job into the foreground, and how this differs from what must +be done when a background job is launched. -* Enable/Disable Setuid:: Turning setuid access on and off. -* Setuid Program Example:: The pertinent parts of one sample program. -* Tips for Setuid:: How to avoid granting unlimited access. + When a foreground job is launched, the shell must first give it +access to the controlling terminal by calling `tcsetpgrp'. Then, the +shell should wait for processes in that process group to terminate or +stop. This is discussed in more detail in *Note Stopped and Terminated +Jobs::. -* Who Logged In:: Getting the name of the user who logged in, - or of the real user ID of the current process. + When all of the processes in the group have either completed or +stopped, the shell should regain control of the terminal for its own +process group by calling `tcsetpgrp' again. Since stop signals caused +by I/O from a background process or a SUSP character typed by the user +are sent to the process group, normally all the processes in the job +stop together. -* User Accounting Database:: Keeping information about users and various - actions in databases. + The foreground job may have left the terminal in a strange state, so +the shell should restore its own saved terminal modes before +continuing. In case the job is merely stopped, the shell should first +save the current terminal modes so that it can restore them later if +the job is continued. The functions for dealing with terminal modes are +`tcgetattr' and `tcsetattr'; these are described in *Note Terminal +Modes::. -* User Database:: Functions and data structures for - accessing the user database. -* Group Database:: Functions and data structures for - accessing the group database. -* Database Example:: Example program showing the use of database - inquiry functions. -* Netgroup Database:: Functions for accessing the netgroup database. + Here is the sample shell's function for doing all of this. - -File: libc.info, Node: User and Group IDs, Next: Process Persona, Up: Users and Groups + /* Put job J in the foreground. If CONT is nonzero, + restore the saved terminal modes and send the process group a + `SIGCONT' signal to wake it up before we block. */ + + void + put_job_in_foreground (job *j, int cont) + { + /* Put the job into the foreground. */ + tcsetpgrp (shell_terminal, j->pgid); + + /* Send the job a continue signal, if necessary. */ + if (cont) + { + tcsetattr (shell_terminal, TCSADRAIN, &j->tmodes); + if (kill (- j->pgid, SIGCONT) < 0) + perror ("kill (SIGCONT)"); + } + + /* Wait for it to report. */ + wait_for_job (j); + + /* Put the shell back in the foreground. */ + tcsetpgrp (shell_terminal, shell_pgid); + + /* Restore the shell's terminal modes. */ + tcgetattr (shell_terminal, &j->tmodes); + tcsetattr (shell_terminal, TCSADRAIN, &shell_tmodes); + } -User and Group IDs -================== + If the process group is launched as a background job, the shell +should remain in the foreground itself and continue to read commands +from the terminal. - Each user account on a computer system is identified by a "user -name" (or "login name") and "user ID". Normally, each user name has a -unique user ID, but it is possible for several login names to have the -same user ID. The user names and corresponding user IDs are stored in -a data base which you can access as described in *Note User Database::. + In the sample shell, there is not much that needs to be done to put +a job into the background. Here is the function it uses: - Users are classified in "groups". Each user name belongs to one -"default group" and may also belong to any number of "supplementary -groups". Users who are members of the same group can share resources -(such as files) that are not accessible to users who are not a member -of that group. Each group has a "group name" and "group ID". *Note -Group Database::, for how to find information about a group ID or group -name. + /* Put a job in the background. If the cont argument is true, send + the process group a `SIGCONT' signal to wake it up. */ + + void + put_job_in_background (job *j, int cont) + { + /* Send the job a continue signal, if necessary. */ + if (cont) + if (kill (-j->pgid, SIGCONT) < 0) + perror ("kill (SIGCONT)"); + } diff -durpN glibc-2.2.4/manual/libc.info-45 glibc-2.2.5/manual/libc.info-45 --- glibc-2.2.4/manual/libc.info-45 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-45 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1206 +33,1213 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Process Persona, Next: Why Change Persona, Prev: User and Group IDs, Up: Users and Groups - -The Persona of a Process -======================== +File: libc.info, Node: Stopped and Terminated Jobs, Next: Continuing Stopped Jobs, Prev: Foreground and Background, Up: Implementing a Shell - At any time, each process has an "effective user ID", a "effective -group ID", and a set of "supplementary group IDs". These IDs determine -the privileges of the process. They are collectively called the -"persona" of the process, because they determine "who it is" for -purposes of access control. +Stopped and Terminated Jobs +--------------------------- - Your login shell starts out with a persona which consists of your -user ID, your default group ID, and your supplementary group IDs (if -you are in more than one group). In normal circumstances, all your -other processes inherit these values. + When a foreground process is launched, the shell must block until +all of the processes in that job have either terminated or stopped. It +can do this by calling the `waitpid' function; see *Note Process +Completion::. Use the `WUNTRACED' option so that status is reported +for processes that stop as well as processes that terminate. - A process also has a "real user ID" which identifies the user who -created the process, and a "real group ID" which identifies that user's -default group. These values do not play a role in access control, so -we do not consider them part of the persona. But they are also -important. + The shell must also check on the status of background jobs so that it +can report terminated and stopped jobs to the user; this can be done by +calling `waitpid' with the `WNOHANG' option. A good place to put a +such a check for terminated and stopped jobs is just before prompting +for a new command. - Both the real and effective user ID can be changed during the -lifetime of a process. *Note Why Change Persona::. + The shell can also receive asynchronous notification that there is +status information available for a child process by establishing a +handler for `SIGCHLD' signals. *Note Signal Handling::. - For details on how a process's effective user ID and group IDs affect -its permission to access files, see *Note Access Permission::. + In the sample shell program, the `SIGCHLD' signal is normally +ignored. This is to avoid reentrancy problems involving the global data +structures the shell manipulates. But at specific times when the shell +is not using these data structures--such as when it is waiting for +input on the terminal--it makes sense to enable a handler for +`SIGCHLD'. The same function that is used to do the synchronous status +checks (`do_job_notification', in this case) can also be called from +within this handler. - The effective user ID of a process also controls permissions for -sending signals using the `kill' function. *Note Signaling Another -Process::. + Here are the parts of the sample shell program that deal with +checking the status of jobs and reporting the information to the user. - Finally, there are many operations which can only be performed by a -process whose effective user ID is zero. A process with this user ID is -a "privileged process". Commonly the user name `root' is associated -with user ID 0, but there may be other user names with this ID. + /* Store the status of the process PID that was returned by waitpid. + Return 0 if all went well, nonzero otherwise. */ + + int + mark_process_status (pid_t pid, int status) + { + job *j; + process *p; + + if (pid > 0) + { + /* Update the record for the process. */ + for (j = first_job; j; j = j->next) + for (p = j->first_process; p; p = p->next) + if (p->pid == pid) + { + p->status = status; + if (WIFSTOPPED (status)) + p->stopped = 1; + else + { + p->completed = 1; + if (WIFSIGNALED (status)) + fprintf (stderr, "%d: Terminated by signal %d.\n", + (int) pid, WTERMSIG (p->status)); + } + return 0; + } + fprintf (stderr, "No child process %d.\n", pid); + return -1; + } + else if (pid == 0 || errno == ECHILD) + /* No processes ready to report. */ + return -1; + else { + /* Other weird errors. */ + perror ("waitpid"); + return -1; + } + } + + /* Check for processes that have status information available, + without blocking. */ + + void + update_status (void) + { + int status; + pid_t pid; + + do + pid = waitpid (WAIT_ANY, &status, WUNTRACED|WNOHANG); + while (!mark_process_status (pid, status)); + } + + /* Check for processes that have status information available, + blocking until all processes in the given job have reported. */ + + void + wait_for_job (job *j) + { + int status; + pid_t pid; + + do + pid = waitpid (WAIT_ANY, &status, WUNTRACED); + while (!mark_process_status (pid, status) + && !job_is_stopped (j) + && !job_is_completed (j)); + } + + /* Format information about job status for the user to look at. */ + + void + format_job_info (job *j, const char *status) + { + fprintf (stderr, "%ld (%s): %s\n", (long)j->pgid, status, j->command); + } + + /* Notify the user about stopped or terminated jobs. + Delete terminated jobs from the active job list. */ + + void + do_job_notification (void) + { + job *j, *jlast, *jnext; + process *p; + + /* Update status information for child processes. */ + update_status (); + + jlast = NULL; + for (j = first_job; j; j = jnext) + { + jnext = j->next; + + /* If all processes have completed, tell the user the job has + completed and delete it from the list of active jobs. */ + if (job_is_completed (j)) { + format_job_info (j, "completed"); + if (jlast) + jlast->next = jnext; + else + first_job = jnext; + free_job (j); + } + + /* Notify the user about stopped jobs, + marking them so that we won't do this more than once. */ + else if (job_is_stopped (j) && !j->notified) { + format_job_info (j, "stopped"); + j->notified = 1; + jlast = j; + } + + /* Don't say anything about jobs that are still running. */ + else + jlast = j; + } + }  -File: libc.info, Node: Why Change Persona, Next: How Change Persona, Prev: Process Persona, Up: Users and Groups +File: libc.info, Node: Continuing Stopped Jobs, Next: Missing Pieces, Prev: Stopped and Terminated Jobs, Up: Implementing a Shell -Why Change the Persona of a Process? -==================================== +Continuing Stopped Jobs +----------------------- - The most obvious situation where it is necessary for a process to -change its user and/or group IDs is the `login' program. When `login' -starts running, its user ID is `root'. Its job is to start a shell -whose user and group IDs are those of the user who is logging in. (To -accomplish this fully, `login' must set the real user and group IDs as -well as its persona. But this is a special case.) + The shell can continue a stopped job by sending a `SIGCONT' signal +to its process group. If the job is being continued in the foreground, +the shell should first invoke `tcsetpgrp' to give the job access to the +terminal, and restore the saved terminal settings. After continuing a +job in the foreground, the shell should wait for the job to stop or +complete, as if the job had just been launched in the foreground. - The more common case of changing persona is when an ordinary user -program needs access to a resource that wouldn't ordinarily be -accessible to the user actually running it. + The sample shell program handles both newly created and continued +jobs with the same pair of functions, `put_job_in_foreground' and +`put_job_in_background'. The definitions of these functions were given +in *Note Foreground and Background::. When continuing a stopped job, a +nonzero value is passed as the CONT argument to ensure that the +`SIGCONT' signal is sent and the terminal modes reset, as appropriate. - For example, you may have a file that is controlled by your program -but that shouldn't be read or modified directly by other users, either -because it implements some kind of locking protocol, or because you want -to preserve the integrity or privacy of the information it contains. -This kind of restricted access can be implemented by having the program -change its effective user or group ID to match that of the resource. + This leaves only a function for updating the shell's internal +bookkeeping about the job being continued: - Thus, imagine a game program that saves scores in a file. The game -program itself needs to be able to update this file no matter who is -running it, but if users can write the file without going through the -game, they can give themselves any scores they like. Some people -consider this undesirable, or even reprehensible. It can be prevented -by creating a new user ID and login name (say, `games') to own the -scores file, and make the file writable only by this user. Then, when -the game program wants to update this file, it can change its effective -user ID to be that for `games'. In effect, the program must adopt the -persona of `games' so it can write the scores file. + /* Mark a stopped job J as being running again. */ + + void + mark_job_as_running (job *j) + { + Process *p; + + for (p = j->first_process; p; p = p->next) + p->stopped = 0; + j->notified = 0; + } + + /* Continue the job J. */ + + void + continue_job (job *j, int foreground) + { + mark_job_as_running (j); + if (foreground) + put_job_in_foreground (j, 1); + else + put_job_in_background (j, 1); + }  -File: libc.info, Node: How Change Persona, Next: Reading Persona, Prev: Why Change Persona, Up: Users and Groups +File: libc.info, Node: Missing Pieces, Prev: Continuing Stopped Jobs, Up: Implementing a Shell -How an Application Can Change Persona -===================================== +The Missing Pieces +------------------ - The ability to change the persona of a process can be a source of -unintentional privacy violations, or even intentional abuse. Because of -the potential for problems, changing persona is restricted to special -circumstances. + The code extracts for the sample shell included in this chapter are +only a part of the entire shell program. In particular, nothing at all +has been said about how `job' and `program' data structures are +allocated and initialized. - You can't arbitrarily set your user ID or group ID to anything you -want; only privileged processes can do that. Instead, the normal way -for a program to change its persona is that it has been set up in -advance to change to a particular user or group. This is the function -of the setuid and setgid bits of a file's access mode. *Note -Permission Bits::. + Most real shells provide a complex user interface that has support +for a command language; variables; abbreviations, substitutions, and +pattern matching on file names; and the like. All of this is far too +complicated to explain here! Instead, we have concentrated on showing +how to implement the core process creation and job control functions +that can be called from such a shell. - When the setuid bit of an executable file is on, executing that file -gives the process a third user ID: the "file user ID". This ID is set -to the owner ID of the file. The system then changes the effective -user ID to the file user ID. The real user ID remains as it was. -Likewise, if the setgid bit is on, the process is given a "file group -ID" equal to the group ID of the file, and its effective group ID is -changed to the file group ID. + Here is a table summarizing the major entry points we have presented: - If a process has a file ID (user or group), then it can at any time -change its effective ID to its real ID and back to its file ID. -Programs use this feature to relinquish their special privileges except -when they actually need them. This makes it less likely that they can -be tricked into doing something inappropriate with their privileges. +`void init_shell (void)' + Initialize the shell's internal state. *Note Initializing the + Shell::. - *Portability Note:* Older systems do not have file IDs. To -determine if a system has this feature, you can test the compiler -define `_POSIX_SAVED_IDS'. (In the POSIX standard, file IDs are known -as saved IDs.) +`void launch_job (job *J, int FOREGROUND)' + Launch the job J as either a foreground or background job. *Note + Launching Jobs::. - *Note File Attributes::, for a more general discussion of file modes -and accessibility. +`void do_job_notification (void)' + Check for and report any jobs that have terminated or stopped. + Can be called synchronously or within a handler for `SIGCHLD' + signals. *Note Stopped and Terminated Jobs::. + +`void continue_job (job *J, int FOREGROUND)' + Continue the job J. *Note Continuing Stopped Jobs::. + + Of course, a real shell would also want to provide other functions +for managing jobs. For example, it would be useful to have commands to +list all active jobs or to send a signal (such as `SIGKILL') to a job.  -File: libc.info, Node: Reading Persona, Next: Setting User ID, Prev: How Change Persona, Up: Users and Groups +File: libc.info, Node: Functions for Job Control, Prev: Implementing a Shell, Up: Job Control -Reading the Persona of a Process -================================ +Functions for Job Control +========================= - Here are detailed descriptions of the functions for reading the user -and group IDs of a process, both real and effective. To use these -facilities, you must include the header files `sys/types.h' and -`unistd.h'. + This section contains detailed descriptions of the functions relating +to job control. - - Data Type: uid_t - This is an integer data type used to represent user IDs. In the - GNU library, this is an alias for `unsigned int'. +* Menu: - - Data Type: gid_t - This is an integer data type used to represent group IDs. In the - GNU library, this is an alias for `unsigned int'. +* Identifying the Terminal:: Determining the controlling terminal's name. +* Process Group Functions:: Functions for manipulating process groups. +* Terminal Access Functions:: Functions for controlling terminal access. - - Function: uid_t getuid (void) - The `getuid' function returns the real user ID of the process. + +File: libc.info, Node: Identifying the Terminal, Next: Process Group Functions, Up: Functions for Job Control - - Function: gid_t getgid (void) - The `getgid' function returns the real group ID of the process. +Identifying the Controlling Terminal +------------------------------------ - - Function: uid_t geteuid (void) - The `geteuid' function returns the effective user ID of the - process. + You can use the `ctermid' function to get a file name that you can +use to open the controlling terminal. In the GNU library, it returns +the same string all the time: `"/dev/tty"'. That is a special "magic" +file name that refers to the controlling terminal of the current +process (if it has one). To find the name of the specific terminal +device, use `ttyname'; *note Is It a Terminal::. - - Function: gid_t getegid (void) - The `getegid' function returns the effective group ID of the - process. + The function `ctermid' is declared in the header file `stdio.h'. - - Function: int getgroups (int COUNT, gid_t *GROUPS) - The `getgroups' function is used to inquire about the supplementary - group IDs of the process. Up to COUNT of these group IDs are - stored in the array GROUPS; the return value from the function is - the number of group IDs actually stored. If COUNT is smaller than - the total number of supplementary group IDs, then `getgroups' - returns a value of `-1' and `errno' is set to `EINVAL'. + - Function: char * ctermid (char *STRING) + The `ctermid' function returns a string containing the file name of + the controlling terminal for the current process. If STRING is + not a null pointer, it should be an array that can hold at least + `L_ctermid' characters; the string is returned in this array. + Otherwise, a pointer to a string in a static area is returned, + which might get overwritten on subsequent calls to this function. - If COUNT is zero, then `getgroups' just returns the total number - of supplementary group IDs. On systems that do not support - supplementary groups, this will always be zero. + An empty string is returned if the file name cannot be determined + for any reason. Even if a file name is returned, access to the + file it represents is not guaranteed. - Here's how to use `getgroups' to read all the supplementary group - IDs: + - Macro: int L_ctermid + The value of this macro is an integer constant expression that + represents the size of a string large enough to hold the file name + returned by `ctermid'. - gid_t * - read_all_groups (void) - { - int ngroups = getgroups (0, NULL); - gid_t *groups - = (gid_t *) xmalloc (ngroups * sizeof (gid_t)); - int val = getgroups (ngroups, groups); - if (val < 0) - { - free (groups); - return NULL; - } - return groups; - } + See also the `isatty' and `ttyname' functions, in *Note Is It a +Terminal::.  -File: libc.info, Node: Setting User ID, Next: Setting Groups, Prev: Reading Persona, Up: Users and Groups +File: libc.info, Node: Process Group Functions, Next: Terminal Access Functions, Prev: Identifying the Terminal, Up: Functions for Job Control -Setting the User ID -=================== +Process Group Functions +----------------------- - This section describes the functions for altering the user ID (real -and/or effective) of a process. To use these facilities, you must -include the header files `sys/types.h' and `unistd.h'. + Here are descriptions of the functions for manipulating process +groups. Your program should include the header files `sys/types.h' and +`unistd.h' to use these functions. - - Function: int seteuid (uid_t NEWEUID) - This function sets the effective user ID of a process to NEWUID, - provided that the process is allowed to change its effective user - ID. A privileged process (effective user ID zero) can change its - effective user ID to any legal value. An unprivileged process - with a file user ID can change its effective user ID to its real - user ID or to its file user ID. Otherwise, a process may not - change its effective user ID at all. + - Function: pid_t setsid (void) + The `setsid' function creates a new session. The calling process + becomes the session leader, and is put in a new process group whose + process group ID is the same as the process ID of that process. + There are initially no other processes in the new process group, + and no other process groups in the new session. - The `seteuid' function returns a value of `0' to indicate - successful completion, and a value of `-1' to indicate an error. - The following `errno' error conditions are defined for this - function: + This function also makes the calling process have no controlling + terminal. - `EINVAL' - The value of the NEWUID argument is invalid. + The `setsid' function returns the new process group ID of the + calling process if successful. A return value of `-1' indicates an + error. The following `errno' error conditions are defined for this + function: `EPERM' - The process may not change to the specified ID. - - Older systems (those without the `_POSIX_SAVED_IDS' feature) do not - have this function. - - - Function: int setuid (uid_t NEWUID) - If the calling process is privileged, this function sets both the - real and effective user ID of the process to NEWUID. It also - deletes the file user ID of the process, if any. NEWUID may be any - legal value. (Once this has been done, there is no way to recover - the old effective user ID.) - - If the process is not privileged, and the system supports the - `_POSIX_SAVED_IDS' feature, then this function behaves like - `seteuid'. - - The return values and error conditions are the same as for - `seteuid'. - - - Function: int setreuid (uid_t RUID, uid_t EUID) - This function sets the real user ID of the process to RUID and the - effective user ID to EUID. If RUID is `-1', it means not to - change the real user ID; likewise if EUID is `-1', it means not to - change the effective user ID. + The calling process is already a process group leader, or + there is already another process group around that has the + same process group ID. - The `setreuid' function exists for compatibility with 4.3 BSD Unix, - which does not support file IDs. You can use this function to - swap the effective and real user IDs of the process. (Privileged - processes are not limited to this particular usage.) If file IDs - are supported, you should use that feature instead of this - function. *Note Enable/Disable Setuid::. + - Function: pid_t getsid (pid_t PID) + The `getsid' function returns the process group ID of the session + leader of the specified process. If a PID is `0', the process + group ID of the session leader of the current process is returned. - The return value is `0' on success and `-1' on failure. The + In case of error `-1' is returned and `errno' is set. The following `errno' error conditions are defined for this function: + `ESRCH' + There is no process with the given process ID PID. + `EPERM' - The process does not have the appropriate privileges; you do - not have permission to change to the specified ID. + The calling process and the process specified by PID are in + different sessions, and the implementation doesn't allow to + access the process group ID of the session leader of the + process with ID PID from the calling process. - -File: libc.info, Node: Setting Groups, Next: Enable/Disable Setuid, Prev: Setting User ID, Up: Users and Groups + The `getpgrp' function has two definitions: one derived from BSD +Unix, and one from the POSIX.1 standard. The feature test macros you +have selected (*note Feature Test Macros::) determine which definition +you get. Specifically, you get the BSD version if you define +`_BSD_SOURCE'; otherwise, you get the POSIX version if you define +`_POSIX_SOURCE' or `_GNU_SOURCE'. Programs written for old BSD systems +will not include `unistd.h', which defines `getpgrp' specially under +`_BSD_SOURCE'. You must link such programs with the `-lbsd-compat' +option to get the BSD definition. -Setting the Group IDs -===================== + - POSIX.1 Function: pid_t getpgrp (void) + The POSIX.1 definition of `getpgrp' returns the process group ID of + the calling process. - This section describes the functions for altering the group IDs (real -and effective) of a process. To use these facilities, you must include -the header files `sys/types.h' and `unistd.h'. + - BSD Function: pid_t getpgrp (pid_t PID) + The BSD definition of `getpgrp' returns the process group ID of the + process PID. You can supply a value of `0' for the PID argument + to get information about the calling process. - - Function: int setegid (gid_t NEWGID) - This function sets the effective group ID of the process to - NEWGID, provided that the process is allowed to change its group - ID. Just as with `seteuid', if the process is privileged it may - change its effective group ID to any value; if it isn't, but it - has a file group ID, then it may change to its real group ID or - file group ID; otherwise it may not change its effective group ID. + - System V Function: int getpgid (pid_t PID) + `getpgid' is the same as the BSD function `getpgrp'. It returns + the process group ID of the process PID. You can supply a value + of `0' for the PID argument to get information about the calling + process. - Note that a process is only privileged if its effective _user_ ID - is zero. The effective group ID only affects access permissions. + In case of error `-1' is returned and `errno' is set. The + following `errno' error conditions are defined for this function: - The return values and error conditions for `setegid' are the same - as those for `seteuid'. + `ESRCH' + There is no process with the given process ID PID. The + calling process and the process specified by PID are in + different sessions, and the implementation doesn't allow to + access the process group ID of the process with ID PID from + the calling process. - This function is only present if `_POSIX_SAVED_IDS' is defined. + - Function: int setpgid (pid_t PID, pid_t PGID) + The `setpgid' function puts the process PID into the process group + PGID. As a special case, either PID or PGID can be zero to + indicate the process ID of the calling process. - - Function: int setgid (gid_t NEWGID) - This function sets both the real and effective group ID of the - process to NEWGID, provided that the process is privileged. It - also deletes the file group ID, if any. + This function fails on a system that does not support job control. + *Note Job Control is Optional::, for more information. - If the process is not privileged, then `setgid' behaves like - `setegid'. + If the operation is successful, `setpgid' returns zero. Otherwise + it returns `-1'. The following `errno' error conditions are + defined for this function: - The return values and error conditions for `setgid' are the same - as those for `seteuid'. + `EACCES' + The child process named by PID has executed an `exec' + function since it was forked. - - Function: int setregid (gid_t RGID, gid_t EGID) - This function sets the real group ID of the process to RGID and - the effective group ID to EGID. If RGID is `-1', it means not to - change the real group ID; likewise if EGID is `-1', it means not - to change the effective group ID. + `EINVAL' + The value of the PGID is not valid. - The `setregid' function is provided for compatibility with 4.3 BSD - Unix, which does not support file IDs. You can use this function - to swap the effective and real group IDs of the process. - (Privileged processes are not limited to this usage.) If file IDs - are supported, you should use that feature instead of using this - function. *Note Enable/Disable Setuid::. + `ENOSYS' + The system doesn't support job control. - The return values and error conditions for `setregid' are the same - as those for `setreuid'. + `EPERM' + The process indicated by the PID argument is a session leader, + or is not in the same session as the calling process, or the + value of the PGID argument doesn't match a process group ID + in the same session as the calling process. - `setuid' and `setgid' behave differently depending on whether the -effective user ID at the time is zero. If it is not zero, they behave -like `seteuid' and `setegid'. If it is, they change both effective and -real IDs and delete the file ID. To avoid confusion, we recommend you -always use `seteuid' and `setegid' except when you know the effective -user ID is zero and your intent is to change the persona permanently. -This case is rare--most of the programs that need it, such as `login' -and `su', have already been written. + `ESRCH' + The process indicated by the PID argument is not the calling + process or a child of the calling process. - Note that if your program is setuid to some user other than `root', -there is no way to drop privileges permanently. + - Function: int setpgrp (pid_t PID, pid_t PGID) + This is the BSD Unix name for `setpgid'. Both functions do exactly + the same thing. - The system also lets privileged processes change their supplementary -group IDs. To use `setgroups' or `initgroups', your programs should -include the header file `grp.h'. + +File: libc.info, Node: Terminal Access Functions, Prev: Process Group Functions, Up: Functions for Job Control - - Function: int setgroups (size_t COUNT, gid_t *GROUPS) - This function sets the process's supplementary group IDs. It can - only be called from privileged processes. The COUNT argument - specifies the number of group IDs in the array GROUPS. +Functions for Controlling Terminal Access +----------------------------------------- - This function returns `0' if successful and `-1' on error. The - following `errno' error conditions are defined for this function: + These are the functions for reading or setting the foreground +process group of a terminal. You should include the header files +`sys/types.h' and `unistd.h' in your application to use these functions. - `EPERM' - The calling process is not privileged. + Although these functions take a file descriptor argument to specify +the terminal device, the foreground job is associated with the terminal +file itself and not a particular open file descriptor. - - Function: int initgroups (const char *USER, gid_t GROUP) - The `initgroups' function sets the process's supplementary group - IDs to be the normal default for the user name USER. The group - GROUP is automatically included. + - Function: pid_t tcgetpgrp (int FILEDES) + This function returns the process group ID of the foreground + process group associated with the terminal open on descriptor + FILEDES. - This function works by scanning the group database for all the - groups USER belongs to. It then calls `setgroups' with the list it - has constructed. + If there is no foreground process group, the return value is a + number greater than `1' that does not match the process group ID + of any existing process group. This can happen if all of the + processes in the job that was formerly the foreground job have + terminated, and no other job has yet been moved into the + foreground. - The return values and error conditions are the same as for - `setgroups'. + In case of an error, a value of `-1' is returned. The following + `errno' error conditions are defined for this function: - If you are interested in the groups a particular user belongs to, -but do not want to change the process's supplementary group IDs, you -can use `getgrouplist'. To use `getgrouplist', your programs should -include the header file `grp.h'. + `EBADF' + The FILEDES argument is not a valid file descriptor. - - Function: int getgrouplist (const char *USER, gid_t GROUP, gid_t - *GROUPS, int *NGROUPS) - The `getgrouplist' function scans the group database for all the - groups USER belongs to. Up to *NGROUPS group IDs corresponding to - these groups are stored in the array GROUPS; the return value from - the function is the number of group IDs actually stored. If - *NGROUPS is smaller than the total number of groups found, then - `getgrouplist' returns a value of `-1' and stores the actual - number of groups in *NGROUPS. The group GROUP is automatically - included in the list of groups returned by `getgrouplist'. + `ENOSYS' + The system doesn't support job control. - Here's how to use `getgrouplist' to read all supplementary groups - for USER: + `ENOTTY' + The terminal file associated with the FILEDES argument isn't + the controlling terminal of the calling process. - gid_t * - supplementary_groups (char *user) - { - int ngroups = 16; - gid_t *groups - = (gid_t *) xmalloc (ngroups * sizeof (gid_t)); - struct passwd *pw = getpwnam (user); - - if (pw == NULL) - return NULL; - - if (getgrouplist (pw->pw_name, pw->pw_gid, groups, &ngroups) < 0) - { - groups = xrealloc (ngroups * sizeof (gid_t)); - getgrouplist (pw->pw_name, pw->pw_gid, groups, &ngroups); - } - return groups; - } + - Function: int tcsetpgrp (int FILEDES, pid_t PGID) + This function is used to set a terminal's foreground process group + ID. The argument FILEDES is a descriptor which specifies the + terminal; PGID specifies the process group. The calling process + must be a member of the same session as PGID and must have the same + controlling terminal. - -File: libc.info, Node: Enable/Disable Setuid, Next: Setuid Program Example, Prev: Setting Groups, Up: Users and Groups + For terminal access purposes, this function is treated as output. + If it is called from a background process on its controlling + terminal, normally all processes in the process group are sent a + `SIGTTOU' signal. The exception is if the calling process itself + is ignoring or blocking `SIGTTOU' signals, in which case the + operation is performed and no signal is sent. -Enabling and Disabling Setuid Access -==================================== + If successful, `tcsetpgrp' returns `0'. A return value of `-1' + indicates an error. The following `errno' error conditions are + defined for this function: - A typical setuid program does not need its special access all of the -time. It's a good idea to turn off this access when it isn't needed, -so it can't possibly give unintended access. + `EBADF' + The FILEDES argument is not a valid file descriptor. - If the system supports the `_POSIX_SAVED_IDS' feature, you can -accomplish this with `seteuid'. When the game program starts, its real -user ID is `jdoe', its effective user ID is `games', and its saved user -ID is also `games'. The program should record both user ID values once -at the beginning, like this: + `EINVAL' + The PGID argument is not valid. - user_user_id = getuid (); - game_user_id = geteuid (); + `ENOSYS' + The system doesn't support job control. - Then it can turn off game file access with + `ENOTTY' + The FILEDES isn't the controlling terminal of the calling + process. - seteuid (user_user_id); + `EPERM' + The PGID isn't a process group in the same session as the + calling process. -and turn it on with + - Function: pid_t tcgetsid (int FILDES) + This function is used to obtain the process group ID of the session + for which the terminal specified by FILDES is the controlling + terminal. If the call is successful the group ID is returned. + Otherwise the return value is `(pid_t) -1' and the global variable + ERRNO is set to the following value: + `EBADF' + The FILEDES argument is not a valid file descriptor. - seteuid (game_user_id); + `ENOTTY' + The calling process does not have a controlling terminal, or + the file is not the controlling terminal. -Throughout this process, the real user ID remains `jdoe' and the file -user ID remains `games', so the program can always set its effective -user ID to either one. + +File: libc.info, Node: Name Service Switch, Next: Users and Groups, Prev: Job Control, Up: Top - On other systems that don't support file user IDs, you can turn -setuid access on and off by using `setreuid' to swap the real and -effective user IDs of the process, as follows: +System Databases and Name Service Switch +**************************************** - setreuid (geteuid (), getuid ()); + Various functions in the C Library need to be configured to work +correctly in the local environment. Traditionally, this was done by +using files (e.g., `/etc/passwd'), but other nameservices (like the +Network Information Service (NIS) and the Domain Name Service (DNS)) +became popular, and were hacked into the C library, usually with a fixed +search order (*note frobnicate: (jargon)frobnicate.). -This special case is always allowed--it cannot fail. + The GNU C Library contains a cleaner solution of this problem. It is +designed after a method used by Sun Microsystems in the C library of +Solaris 2. GNU C Library follows their name and calls this scheme +"Name Service Switch" (NSS). - Why does this have the effect of toggling the setuid access? -Suppose a game program has just started, and its real user ID is `jdoe' -while its effective user ID is `games'. In this state, the game can -write the scores file. If it swaps the two uids, the real becomes -`games' and the effective becomes `jdoe'; now the program has only -`jdoe' access. Another swap brings `games' back to the effective user -ID and restores access to the scores file. + Though the interface might be similar to Sun's version there is no +common code. We never saw any source code of Sun's implementation and +so the internal interface is incompatible. This also manifests in the +file names we use as we will see later. - In order to handle both kinds of systems, test for the saved user ID -feature with a preprocessor conditional, like this: +* Menu: - #ifdef _POSIX_SAVED_IDS - setuid (user_user_id); - #else - setreuid (geteuid (), getuid ()); - #endif +* NSS Basics:: What is this NSS good for. +* NSS Configuration File:: Configuring NSS. +* NSS Module Internals:: How does it work internally. +* Extending NSS:: What to do to add services or databases.  -File: libc.info, Node: Setuid Program Example, Next: Tips for Setuid, Prev: Enable/Disable Setuid, Up: Users and Groups - -Setuid Program Example -====================== - - Here's an example showing how to set up a program that changes its -effective user ID. - - This is part of a game program called `caber-toss' that manipulates -a file `scores' that should be writable only by the game program -itself. The program assumes that its executable file will be installed -with the setuid bit set and owned by the same user as the `scores' -file. Typically, a system administrator will set up an account like -`games' for this purpose. +File: libc.info, Node: NSS Basics, Next: NSS Configuration File, Prev: Name Service Switch, Up: Name Service Switch - The executable file is given mode `4755', so that doing an `ls -l' -on it produces output like: +NSS Basics +========== - -rwsr-xr-x 1 games 184422 Jul 30 15:17 caber-toss + The basic idea is to put the implementation of the different services +offered to access the databases in separate modules. This has some +advantages: -The setuid bit shows up in the file modes as the `s'. + 1. Contributors can add new services without adding them to GNU C + Library. - The scores file is given mode `644', and doing an `ls -l' on it -shows: + 2. The modules can be updated separately. - -rw-r--r-- 1 games 0 Jul 31 15:33 scores + 3. The C library image is smaller. - Here are the parts of the program that show how to set up the changed -user ID. This program is conditionalized so that it makes use of the -file IDs feature if it is supported, and otherwise uses `setreuid' to -swap the effective and real user IDs. + To fulfill the first goal above the ABI of the modules will be +described below. For getting the implementation of a new service right +it is important to understand how the functions in the modules get +called. They are in no way designed to be used by the programmer +directly. Instead the programmer should only use the documented and +standardized functions to access the databases. - #include - #include - #include - #include - - - /* Remember the effective and real UIDs. */ - - static uid_t euid, ruid; - - - /* Restore the effective UID to its original value. */ - - void - do_setuid (void) - { - int status; - - #ifdef _POSIX_SAVED_IDS - status = seteuid (euid); - #else - status = setreuid (ruid, euid); - #endif - if (status < 0) { - fprintf (stderr, "Couldn't set uid.\n"); - exit (status); - } - } - - - /* Set the effective UID to the real UID. */ - - void - undo_setuid (void) - { - int status; - - #ifdef _POSIX_SAVED_IDS - status = seteuid (ruid); - #else - status = setreuid (euid, ruid); - #endif - if (status < 0) { - fprintf (stderr, "Couldn't set uid.\n"); - exit (status); - } - } - - /* Main program. */ - - int - main (void) - { - /* Remember the real and effective user IDs. */ - ruid = getuid (); - euid = geteuid (); - undo_setuid (); - - /* Do the game and record the score. */ - ... - } +The databases available in the NSS are - Notice how the first thing the `main' function does is to set the -effective user ID back to the real user ID. This is so that any other -file accesses that are performed while the user is playing the game use -the real user ID for determining permissions. Only when the program -needs to open the scores file does it switch back to the file user ID, -like this: +`aliases' + Mail aliases - /* Record the score. */ - - int - record_score (int score) - { - FILE *stream; - char *myname; - - /* Open the scores file. */ - do_setuid (); - stream = fopen (SCORES_FILE, "a"); - undo_setuid (); - - /* Write the score to the file. */ - if (stream) - { - myname = cuserid (NULL); - if (score < 0) - fprintf (stream, "%10s: Couldn't lift the caber.\n", myname); - else - fprintf (stream, "%10s: %d feet.\n", myname, score); - fclose (stream); - return 0; - } - else - return -1; - } +`ethers' + Ethernet numbers, - -File: libc.info, Node: Tips for Setuid, Next: Who Logged In, Prev: Setuid Program Example, Up: Users and Groups +`group' + Groups of users, *note Group Database::. -Tips for Writing Setuid Programs -================================ +`hosts' + Host names and numbers, *note Host Names::. - It is easy for setuid programs to give the user access that isn't -intended--in fact, if you want to avoid this, you need to be careful. -Here are some guidelines for preventing unintended access and -minimizing its consequences when it does occur: +`netgroup' + Network wide list of host and users, *note Netgroup Database::. - * Don't have `setuid' programs with privileged user IDs such as - `root' unless it is absolutely necessary. If the resource is - specific to your particular program, it's better to define a new, - nonprivileged user ID or group ID just to manage that resource. - It's better if you can write your program to use a special group - than a special user. +`networks' + Network names and numbers, *note Networks Database::. - * Be cautious about using the `exec' functions in combination with - changing the effective user ID. Don't let users of your program - execute arbitrary programs under a changed user ID. Executing a - shell is especially bad news. Less obviously, the `execlp' and - `execvp' functions are a potential risk (since the program they - execute depends on the user's `PATH' environment variable). +`protocols' + Network protocols, *note Protocols Database::. - If you must `exec' another program under a changed ID, specify an - absolute file name (*note File Name Resolution::) for the - executable, and make sure that the protections on that executable - and _all_ containing directories are such that ordinary users - cannot replace it with some other program. +`passwd' + User passwords, *note User Database::. - You should also check the arguments passed to the program to make - sure they do not have unexpected effects. Likewise, you should - examine the environment variables. Decide which arguments and - variables are safe, and reject all others. +`rpc' + Remote procedure call names and numbers, - You should never use `system' in a privileged program, because it - invokes a shell. +`services' + Network services, *note Services Database::. - * Only use the user ID controlling the resource in the part of the - program that actually uses that resource. When you're finished - with it, restore the effective user ID back to the actual user's - user ID. *Note Enable/Disable Setuid::. +`shadow' + Shadow user passwords, - * If the `setuid' part of your program needs to access other files - besides the controlled resource, it should verify that the real - user would ordinarily have permission to access those files. You - can use the `access' function (*note Access Permission::) to check - this; it uses the real user and group IDs, rather than the - effective IDs. +There will be some more added later (`automount', `bootparams', +`netmasks', and `publickey').  -File: libc.info, Node: Who Logged In, Next: User Accounting Database, Prev: Tips for Setuid, Up: Users and Groups +File: libc.info, Node: NSS Configuration File, Next: NSS Module Internals, Prev: NSS Basics, Up: Name Service Switch -Identifying Who Logged In -========================= +The NSS Configuration File +========================== - You can use the functions listed in this section to determine the -login name of the user who is running a process, and the name of the -user who logged in the current session. See also the function `getuid' -and friends (*note Reading Persona::). How this information is -collected by the system and how to control/add/remove information from -the background storage is described in *Note User Accounting Database::. + Somehow the NSS code must be told about the wishes of the user. For +this reason there is the file `/etc/nsswitch.conf'. For each database +this file contain a specification how the lookup process should work. +The file could look like this: - The `getlogin' function is declared in `unistd.h', while `cuserid' -and `L_cuserid' are declared in `stdio.h'. + # /etc/nsswitch.conf + # + # Name Service Switch configuration file. + # + + passwd: db files nis + shadow: files + group: db files nis + + hosts: files nisplus nis dns + networks: nisplus [NOTFOUND=return] files + + ethers: nisplus [NOTFOUND=return] db files + protocols: nisplus [NOTFOUND=return] db files + rpc: nisplus [NOTFOUND=return] db files + services: nisplus [NOTFOUND=return] db files - - Function: char * getlogin (void) - The `getlogin' function returns a pointer to a string containing - the name of the user logged in on the controlling terminal of the - process, or a null pointer if this information cannot be - determined. The string is statically allocated and might be - overwritten on subsequent calls to this function or to `cuserid'. + The first column is the database as you can guess from the table +above. The rest of the line specifies how the lookup process works. +Please note that you specify the way it works for each database +individually. This cannot be done with the old way of a monolithic +implementation. - - Function: char * cuserid (char *STRING) - The `cuserid' function returns a pointer to a string containing a - user name associated with the effective ID of the process. If - STRING is not a null pointer, it should be an array that can hold - at least `L_cuserid' characters; the string is returned in this - array. Otherwise, a pointer to a string in a static area is - returned. This string is statically allocated and might be - overwritten on subsequent calls to this function or to `getlogin'. + The configuration specification for each database can contain two +different items: - The use of this function is deprecated since it is marked to be - withdrawn in XPG4.2 and has already been removed from newer - revisions of POSIX.1. + * the service specification like `files', `db', or `nis'. - - Macro: int L_cuserid - An integer constant that indicates how long an array you might - need to store a user name. + * the reaction on lookup result like `[NOTFOUND=return]'. - These functions let your program identify positively the user who is -running or the user who logged in this session. (These can differ when -setuid programs are involved; see *Note Process Persona::.) The user -cannot do anything to fool these functions. +* Menu: - For most purposes, it is more useful to use the environment variable -`LOGNAME' to find out who the user is. This is more flexible precisely -because the user can set `LOGNAME' arbitrarily. *Note Standard -Environment::. +* Services in the NSS configuration:: Service names in the NSS configuration. +* Actions in the NSS configuration:: React appropriately to the lookup result. +* Notes on NSS Configuration File:: Things to take care about while + configuring NSS.  -File: libc.info, Node: User Accounting Database, Next: User Database, Prev: Who Logged In, Up: Users and Groups - -The User Accounting Database -============================ +File: libc.info, Node: Services in the NSS configuration, Next: Actions in the NSS configuration, Prev: NSS Configuration File, Up: NSS Configuration File - Most Unix-like operating systems keep track of logged in users by -maintaining a user accounting database. This user accounting database -stores for each terminal, who has logged on, at what time, the process -ID of the user's login shell, etc., etc., but also stores information -about the run level of the system, the time of the last system reboot, -and possibly more. +Services in the NSS configuration File +-------------------------------------- - The user accounting database typically lives in `/etc/utmp', -`/var/adm/utmp' or `/var/run/utmp'. However, these files should -*never* be accessed directly. For reading information from and writing -information to the user accounting database, the functions described in -this section should be used. + The above example file mentions four different services: `files', +`db', `nis', and `nisplus'. This does not mean these services are +available on all sites and it does also not mean these are all the +services which will ever be available. -* Menu: + In fact, these names are simply strings which the NSS code uses to +find the implicitly addressed functions. The internal interface will be +described later. Visible to the user are the modules which implement an +individual service. -* Manipulating the Database:: Scanning and modifying the user - accounting database. -* XPG Functions:: A standardized way for doing the same thing. -* Logging In and Out:: Functions from BSD that modify the user - accounting database. + Assume the service NAME shall be used for a lookup. The code for +this service is implemented in a module called `libnss_NAME'. On a +system supporting shared libraries this is in fact a shared library +with the name (for example) `libnss_NAME.so.2'. The number at the end +is the currently used version of the interface which will not change +frequently. Normally the user should not have to be cognizant of these +files since they should be placed in a directory where they are found +automatically. Only the names of all available services are important.  -File: libc.info, Node: Manipulating the Database, Next: XPG Functions, Up: User Accounting Database +File: libc.info, Node: Actions in the NSS configuration, Next: Notes on NSS Configuration File, Prev: Services in the NSS configuration, Up: NSS Configuration File -Manipulating the User Accounting Database ------------------------------------------ +Actions in the NSS configuration +-------------------------------- - These functions and the corresponding data structures are declared in -the header file `utmp.h'. + The second item in the specification gives the user much finer +control on the lookup process. Action items are placed between two +service names and are written within brackets. The general form is - - Data Type: struct exit_status - The `exit_status' data structure is used to hold information about - the exit status of processes marked as `DEAD_PROCESS' in the user - accounting database. + `[' ( `!'? STATUS `=' ACTION )+ `]' - `short int e_termination' - The exit status of the process. +where - `short int e_exit' - The exit status of the process. + STATUS => success | notfound | unavail | tryagain + ACTION => return | continue - - Data Type: struct utmp - The `utmp' data structure is used to hold information about entries - in the user accounting database. On the GNU system it has the - following members: + The case of the keywords is insignificant. The STATUS values are +the results of a call to a lookup function of a specific service. They +mean - `short int ut_type' - Specifies the type of login; one of `EMPTY', `RUN_LVL', - `BOOT_TIME', `OLD_TIME', `NEW_TIME', `INIT_PROCESS', - `LOGIN_PROCESS', `USER_PROCESS', `DEAD_PROCESS' or - `ACCOUNTING'. +`success' + No error occurred and the wanted entry is returned. The default + action for this is `return'. - `pid_t ut_pid' - The process ID number of the login process. +`notfound' + The lookup process works ok but the needed value was not found. + The default action is `continue'. - `char ut_line[]' - The device name of the tty (without `/dev/'). +`unavail' + The service is permanently unavailable. This can either mean the + needed file is not available, or, for DNS, the server is not + available or does not allow queries. The default action is + `continue'. - `char ut_id[]' - The inittab ID of the process. +`tryagain' + The service is temporarily unavailable. This could mean a file is + locked or a server currently cannot accept more connections. The + default action is `continue'. - `char ut_user[]' - The user's login name. +If we have a line like - `char ut_host[]' - The name of the host from which the user logged in. + ethers: nisplus [NOTFOUND=return] db files - `struct exit_status ut_exit' - The exit status of a process marked as `DEAD_PROCESS'. +this is equivalent to - `long ut_session' - The Session ID, used for windowing. + ethers: nisplus [SUCCESS=return NOTFOUND=return UNAVAIL=continue + TRYAGAIN=continue] + db [SUCCESS=return NOTFOUND=continue UNAVAIL=continue + TRYAGAIN=continue] + files - `struct timeval ut_tv' - Time the entry was made. For entries of type `OLD_TIME' this - is the time when the system clock changed, and for entries of - type `NEW_TIME' this is the time the system clock was set to. +(except that it would have to be written on one line). The default +value for the actions are normally what you want, and only need to be +changed in exceptional cases. - `int32_t ut_addr_v6[4]' - The Internet address of a remote host. + If the optional `!' is placed before the STATUS this means the +following action is used for all statuses but STATUS itself. I.e., `!' +is negation as in the C language (and others). - The `ut_type', `ut_pid', `ut_id', `ut_tv', and `ut_host' fields are -not available on all systems. Portable applications therefore should -be prepared for these situations. To help doing this the `utmp.h' -header provides macros `_HAVE_UT_TYPE', `_HAVE_UT_PID', `_HAVE_UT_ID', -`_HAVE_UT_TV', and `_HAVE_UT_HOST' if the respective field is -available. The programmer can handle the situations by using `#ifdef' -in the program code. + Before we explain the exception which makes this action item +necessary one more remark: obviously it makes no sense to add another +action item after the `files' service. Since there is no other service +following the action _always_ is `return'. - The following macros are defined for use as values for the `ut_type' -member of the `utmp' structure. The values are integer constants. + Now, why is this `[NOTFOUND=return]' action useful? To understand +this we should know that the `nisplus' service is often complete; i.e., +if an entry is not available in the NIS+ tables it is not available +anywhere else. This is what is expressed by this action item: it is +useless to examine further services since they will not give us a +result. -`EMPTY' - This macro is used to indicate that the entry contains no valid - user accounting information. + The situation would be different if the NIS+ service is not available +because the machine is booting. In this case the return value of the +lookup function is not `notfound' but instead `unavail'. And as you +can see in the complete form above: in this situation the `db' and +`files' services are used. Neat, isn't it? The system administrator +need not pay special care for the time the system is not completely +ready to work (while booting or shutdown or network problems). -`RUN_LVL' - This macro is used to identify the systems runlevel. + +File: libc.info, Node: Notes on NSS Configuration File, Prev: Actions in the NSS configuration, Up: NSS Configuration File -`BOOT_TIME' - This macro is used to identify the time of system boot. +Notes on the NSS Configuration File +----------------------------------- -`OLD_TIME' - This macro is used to identify the time when the system clock - changed. + Finally a few more hints. The NSS implementation is not completely +helpless if `/etc/nsswitch.conf' does not exist. For all supported +databases there is a default value so it should normally be possible to +get the system running even if the file is corrupted or missing. -`NEW_TIME' - This macro is used to identify the time after the system changed. + For the `hosts' and `networks' databases the default value is `dns +[!UNAVAIL=return] files'. I.e., the system is prepared for the DNS +service not to be available but if it is available the answer it +returns is definitive. -`INIT_PROCESS' - This macro is used to identify a process spawned by the init - process. + The `passwd', `group', and `shadow' databases are traditionally +handled in a special way. The appropriate files in the `/etc' +directory are read but if an entry with a name starting with a `+' +character is found NIS is used. This kind of lookup remains possible +by using the special lookup service `compat' and the default value for +the three databases above is `compat [NOTFOUND=return] files'. -`LOGIN_PROCESS' - This macro is used to identify the session leader of a logged in - user. + For all other databases the default value is `nis [NOTFOUND=return] +files'. This solution give the best chance to be correct since NIS and +file based lookup is used. -`USER_PROCESS' - This macro is used to identify a user process. + A second point is that the user should try to optimize the lookup +process. The different service have different response times. A +simple file look up on a local file could be fast, but if the file is +long and the needed entry is near the end of the file this may take +quite some time. In this case it might be better to use the `db' +service which allows fast local access to large data sets. -`DEAD_PROCESS' - This macro is used to identify a terminated process. + Often the situation is that some global information like NIS must be +used. So it is unavoidable to use service entries like `nis' etc. But +one should avoid slow services like this if possible. -`ACCOUNTING' - ??? + +File: libc.info, Node: NSS Module Internals, Next: Extending NSS, Prev: NSS Configuration File, Up: Name Service Switch - The size of the `ut_line', `ut_id', `ut_user' and `ut_host' arrays -can be found using the `sizeof' operator. +NSS Module Internals +==================== - Many older systems have, instead of an `ut_tv' member, an `ut_time' -member, usually of type `time_t', for representing the time associated -with the entry. Therefore, for backwards compatibility only, `utmp.h' -defines `ut_time' as an alias for `ut_tv.tv_sec'. + Now it is time to describe what the modules look like. The functions +contained in a module are identified by their names. I.e., there is no +jump table or the like. How this is done is of no interest here; those +interested in this topic should read about Dynamic Linking. - - Function: void setutent (void) - This function opens the user accounting database to begin scanning - it. You can then call `getutent', `getutid' or `getutline' to - read entries and `pututline' to write entries. +* Menu: - If the database is already open, it resets the input to the - beginning of the database. +* NSS Module Names:: Construction of the interface function of + the NSS modules. +* NSS Modules Interface:: Programming interface in the NSS module + functions. - - Function: struct utmp * getutent (void) - The `getutent' function reads the next entry from the user - accounting database. It returns a pointer to the entry, which is - statically allocated and may be overwritten by subsequent calls to - `getutent'. You must copy the contents of the structure if you - wish to save the information or you can use the `getutent_r' - function which stores the data in a user-provided buffer. + +File: libc.info, Node: NSS Module Names, Next: NSS Modules Interface, Prev: NSS Module Internals, Up: NSS Module Internals - A null pointer is returned in case no further entry is available. +The Naming Scheme of the NSS Modules +------------------------------------ - - Function: void endutent (void) - This function closes the user accounting database. +The name of each function consist of various parts: - - Function: struct utmp * getutid (const struct utmp *ID) - This function searches forward from the current point in the - database for an entry that matches ID. If the `ut_type' member of - the ID structure is one of `RUN_LVL', `BOOT_TIME', `OLD_TIME' or - `NEW_TIME' the entries match if the `ut_type' members are - identical. If the `ut_type' member of the ID structure is - `INIT_PROCESS', `LOGIN_PROCESS', `USER_PROCESS' or `DEAD_PROCESS', - the entries match if the `ut_type' member of the entry read from - the database is one of these four, and the `ut_id' members match. - However if the `ut_id' member of either the ID structure or the - entry read from the database is empty it checks if the `ut_line' - members match instead. If a matching entry is found, `getutid' - returns a pointer to the entry, which is statically allocated, and - may be overwritten by a subsequent call to `getutent', `getutid' - or `getutline'. You must copy the contents of the structure if - you wish to save the information. + _nss_SERVICE_FUNCTION - A null pointer is returned in case the end of the database is - reached without a match. + SERVICE of course corresponds to the name of the module this +function is found in.(1) The FUNCTION part is derived from the +interface function in the C library itself. If the user calls the +function `gethostbyname' and the service used is `files' the function - The `getutid' function may cache the last read entry. Therefore, - if you are using `getutid' to search for multiple occurrences, it - is necessary to zero out the static data after each call. - Otherwise `getutid' could just return a pointer to the same entry - over and over again. + _nss_files_gethostbyname_r - - Function: struct utmp * getutline (const struct utmp *LINE) - This function searches forward from the current point in the - database until it finds an entry whose `ut_type' value is - `LOGIN_PROCESS' or `USER_PROCESS', and whose `ut_line' member - matches the `ut_line' member of the LINE structure. If it finds - such an entry, it returns a pointer to the entry which is - statically allocated, and may be overwritten by a subsequent call - to `getutent', `getutid' or `getutline'. You must copy the - contents of the structure if you wish to save the information. +in the module - A null pointer is returned in case the end of the database is - reached without a match. + libnss_files.so.2 - The `getutline' function may cache the last read entry. Therefore - if you are using `getutline' to search for multiple occurrences, it - is necessary to zero out the static data after each call. - Otherwise `getutline' could just return a pointer to the same - entry over and over again. +is used. You see, what is explained above in not the whole truth. In +fact the NSS modules only contain reentrant versions of the lookup +functions. I.e., if the user would call the `gethostbyname_r' function +this also would end in the above function. For all user interface +functions the C library maps this call to a call to the reentrant +function. For reentrant functions this is trivial since the interface +is (nearly) the same. For the non-reentrant version The library keeps +internal buffers which are used to replace the user supplied buffer. - - Function: struct utmp * pututline (const struct utmp *UTMP) - The `pututline' function inserts the entry `*UTMP' at the - appropriate place in the user accounting database. If it finds - that it is not already at the correct place in the database, it - uses `getutid' to search for the position to insert the entry, - however this will not modify the static structure returned by - `getutent', `getutid' and `getutline'. If this search fails, the - entry is appended to the database. + I.e., the reentrant functions _can_ have counterparts. No service +module is forced to have functions for all databases and all kinds to +access them. If a function is not available it is simply treated as if +the function would return `unavail' (*note Actions in the NSS +configuration::). - The `pututline' function returns a pointer to a copy of the entry - inserted in the user accounting database, or a null pointer if the - entry could not be added. The following `errno' error conditions - are defined for this function: + The file name `libnss_files.so.2' would be on a Solaris 2 system +`nss_files.so.2'. This is the difference mentioned above. Sun's NSS +modules are usable as modules which get indirectly loaded only. - `EPERM' - The process does not have the appropriate privileges; you - cannot modify the user accounting database. + The NSS modules in the GNU C Library are prepared to be used as +normal libraries themselves. This is _not_ true at the moment, though. +However, the organization of the name space in the modules does not +make it impossible like it is for Solaris. Now you can see why the +modules are still libraries.(2) - All the `get*' functions mentioned before store the information they -return in a static buffer. This can be a problem in multi-threaded -programs since the data returned for the request is overwritten by the -return value data in another thread. Therefore the GNU C Library -provides as extensions three more functions which return the data in a -user-provided buffer. + ---------- Footnotes ---------- - - Function: int getutent_r (struct utmp *BUFFER, struct utmp **RESULT) - The `getutent_r' is equivalent to the `getutent' function. It - returns the next entry from the database. But instead of storing - the information in a static buffer it stores it in the buffer - pointed to by the parameter BUFFER. + (1) Now you might ask why this information is duplicated. The +answer is that we want to make it possible to link directly with these +shared objects. - If the call was successful, the function returns `0' and the - pointer variable pointed to by the parameter RESULT contains a - pointer to the buffer which contains the result (this is most - probably the same value as BUFFER). If something went wrong - during the execution of `getutent_r' the function returns `-1'. + (2) There is a second explanation: we were too lazy to change the +Makefiles to allow the generation of shared objects not starting with +`lib' but don't tell this to anybody. - This function is a GNU extension. + +File: libc.info, Node: NSS Modules Interface, Prev: NSS Module Names, Up: NSS Module Internals - - Function: int getutid_r (const struct utmp *ID, struct utmp *BUFFER, - struct utmp **RESULT) - This function retrieves just like `getutid' the next entry matching - the information stored in ID. But the result is stored in the - buffer pointed to by the parameter BUFFER. +The Interface of the Function in NSS Modules +-------------------------------------------- - If successful the function returns `0' and the pointer variable - pointed to by the parameter RESULT contains a pointer to the - buffer with the result (probably the same as RESULT. If not - successful the function return `-1'. + Now we know about the functions contained in the modules. It is now +time to describe the types. When we mentioned the reentrant versions of +the functions above, this means there are some additional arguments +(compared with the standard, non-reentrant version). The prototypes for +the non-reentrant and reentrant versions of our function above are: - This function is a GNU extension. + struct hostent *gethostbyname (const char *name) + + int gethostbyname_r (const char *name, struct hostent *result_buf, + char *buf, size_t buflen, struct hostent **result, + int *h_errnop) - - Function: int getutline_r (const struct utmp *LINE, struct utmp - *BUFFER, struct utmp **RESULT) - This function retrieves just like `getutline' the next entry - matching the information stored in LINE. But the result is stored - in the buffer pointed to by the parameter BUFFER. +The actual prototype of the function in the NSS modules in this case is - If successful the function returns `0' and the pointer variable - pointed to by the parameter RESULT contains a pointer to the - buffer with the result (probably the same as RESULT. If not - successful the function return `-1'. + enum nss_status _nss_files_gethostbyname_r (const char *name, + struct hostent *result_buf, + char *buf, size_t buflen, + int *errnop, int *h_errnop) - This function is a GNU extension. + I.e., the interface function is in fact the reentrant function with +the change of the return value and the omission of the RESULT +parameter. While the user-level function returns a pointer to the +result the reentrant function return an `enum nss_status' value: - In addition to the user accounting database, most systems keep a -number of similar databases. For example most systems keep a log file -with all previous logins (usually in `/etc/wtmp' or `/var/log/wtmp'). +`NSS_STATUS_TRYAGAIN' + numeric value `-2' - For specifying which database to examine, the following function -should be used. +`NSS_STATUS_UNAVAIL' + numeric value `-1' - - Function: int utmpname (const char *FILE) - The `utmpname' function changes the name of the database to be - examined to FILE, and closes any previously opened database. By - default `getutent', `getutid', `getutline' and `pututline' read - from and write to the user accounting database. +`NSS_STATUS_NOTFOUND' + numeric value `0' - The following macros are defined for use as the FILE argument: +`NSS_STATUS_SUCCESS' + numeric value `1' - - Macro: char * _PATH_UTMP - This macro is used to specify the user accounting database. +Now you see where the action items of the `/etc/nsswitch.conf' file are +used. - - Macro: char * _PATH_WTMP - This macro is used to specify the user accounting log file. + If you study the source code you will find there is a fifth value: +`NSS_STATUS_RETURN'. This is an internal use only value, used by a few +functions in places where none of the above value can be used. If +necessary the source code should be examined to learn about the details. - The `utmpname' function returns a value of `0' if the new name was - successfully stored, and a value of `-1' to indicate an error. - Note that `utmpname' does not try to open the database, and that - therefore the return value does not say anything about whether the - database can be successfully opened. + In case the interface function has to return an error it is important +that the correct error code is stored in `*ERRNOP'. Some return status +value have only one associated error code, others have more. - Specially for maintaining log-like databases the GNU C Library -provides the following function: +`NSS_STATUS_TRYAGAIN' `EAGAIN' One of the functions used ran + temporarily out of resources or a + service is currently not available. + `ERANGE' The provided buffer is not large + enough. The function should be + called again with a larger buffer. +`NSS_STATUS_UNAVAIL' `ENOENT' A necessary input file cannot be + found. +`NSS_STATUS_NOTFOUND' `ENOENT' The requested entry is not + available. - - Function: void updwtmp (const char *WTMP_FILE, const struct utmp - *UTMP) - The `updwtmp' function appends the entry *UTMP to the database - specified by WTMP_FILE. For possible values for the WTMP_FILE - argument see the `utmpname' function. + These are proposed values. There can be other error codes and the +described error codes can have different meaning. *With one +exception:* when returning `NSS_STATUS_TRYAGAIN' the error code +`ERANGE' _must_ mean that the user provided buffer is too small. +Everything is non-critical. - *Portability Note:* Although many operating systems provide a subset -of these functions, they are not standardized. There are often subtle -differences in the return types, and there are considerable differences -between the various definitions of `struct utmp'. When programming for -the GNU system, it is probably best to stick with the functions -described in this section. If however, you want your program to be -portable, consider using the XPG functions described in *Note XPG -Functions::, or take a look at the BSD compatible functions in *Note -Logging In and Out::. + The above function has something special which is missing for almost +all the other module functions. There is an argument H_ERRNOP. This +points to a variable which will be filled with the error code in case +the execution of the function fails for some reason. The reentrant +function cannot use the global variable H_ERRNO; `gethostbyname' calls +`gethostbyname_r' with the last argument set to `&h_errno'. - -File: libc.info, Node: XPG Functions, Next: Logging In and Out, Prev: Manipulating the Database, Up: User Accounting Database + The `getXXXbyYYY' functions are the most important functions in the +NSS modules. But there are others which implement the other ways to +access system databases (say for the password database, there are +`setpwent', `getpwent', and `endpwent'). These will be described in +more detail later. Here we give a general way to determine the +signature of the module function: -XPG User Accounting Database Functions --------------------------------------- + * the return value is `int'; - These functions, described in the X/Open Portability Guide, are -declared in the header file `utmpx.h'. + * the name is as explained in *note NSS Module Names::; - - Data Type: struct utmpx - The `utmpx' data structure contains at least the following members: + * the first arguments are identical to the arguments of the + non-reentrant function; - `short int ut_type' - Specifies the type of login; one of `EMPTY', `RUN_LVL', - `BOOT_TIME', `OLD_TIME', `NEW_TIME', `INIT_PROCESS', - `LOGIN_PROCESS', `USER_PROCESS' or `DEAD_PROCESS'. + * the next three arguments are: - `pid_t ut_pid' - The process ID number of the login process. + `STRUCT_TYPE *result_buf' + pointer to buffer where the result is stored. `STRUCT_TYPE' + is normally a struct which corresponds to the database. - `char ut_line[]' - The device name of the tty (without `/dev/'). + `char *buffer' + pointer to a buffer where the function can store additional + data for the result etc. - `char ut_id[]' - The inittab ID of the process. + `size_t buflen' + length of the buffer pointed to by BUFFER. - `char ut_user[]' - The user's login name. + * possibly a last argument H_ERRNOP, for the host name and network + name lookup functions. - `struct timeval ut_tv' - Time the entry was made. For entries of type `OLD_TIME' this - is the time when the system clock changed, and for entries of - type `NEW_TIME' this is the time the system clock was set to. - On the GNU system, `struct utmpx' is identical to `struct utmp' - except for the fact that including `utmpx.h' does not make visible - the declaration of `struct exit_status'. +This table is correct for all functions but the `set...ent' and +`end...ent' functions. - The following macros are defined for use as values for the `ut_type' -member of the `utmpx' structure. The values are integer constants and -are, on the GNU system, identical to the definitions in `utmp.h'. + +File: libc.info, Node: Extending NSS, Prev: NSS Module Internals, Up: Name Service Switch -`EMPTY' - This macro is used to indicate that the entry contains no valid - user accounting information. +Extending NSS +============= -`RUN_LVL' - This macro is used to identify the systems runlevel. + One of the advantages of NSS mentioned above is that it can be +extended quite easily. There are two ways in which the extension can +happen: adding another database or adding another service. The former +is normally done only by the C library developers. It is here only +important to remember that adding another database is independent from +adding another service because a service need not support all databases +or lookup functions. -`BOOT_TIME' - This macro is used to identify the time of system boot. + A designer/implementor of a new service is therefore free to choose +the databases s/he is interested in and leave the rest for later (or +completely aside). -`OLD_TIME' - This macro is used to identify the time when the system clock - changed. +* Menu: -`NEW_TIME' - This macro is used to identify the time after the system changed. +* Adding another Service to NSS:: What is to do to add a new service. +* NSS Module Function Internals:: Guidelines for writing new NSS + service functions. -`INIT_PROCESS' - This macro is used to identify a process spawned by the init - process. + +File: libc.info, Node: Adding another Service to NSS, Next: NSS Module Function Internals, Prev: Extending NSS, Up: Extending NSS -`LOGIN_PROCESS' - This macro is used to identify the session leader of a logged in - user. +Adding another Service to NSS +----------------------------- -`USER_PROCESS' - This macro is used to identify a user process. + The sources for a new service need not (and should not) be part of +the GNU C Library itself. The developer retains complete control over +the sources and its development. The links between the C library and +the new service module consists solely of the interface functions. -`DEAD_PROCESS' - This macro is used to identify a terminated process. + Each module is designed following a specific interface specification. +For now the version is 2 (the interface in version 1 was not adequate) +and this manifests in the version number of the shared library object of +the NSS modules: they have the extension `.2'. If the interface +changes again in an incompatible way, this number will be increased. +Modules using the old interface will still be usable. - The size of the `ut_line', `ut_id' and `ut_user' arrays can be found -using the `sizeof' operator. + Developers of a new service will have to make sure that their module +is created using the correct interface number. This means the file +itself must have the correct name and on ELF systems the "soname" +(Shared Object Name) must also have this number. Building a module +from a bunch of object files on an ELF system using GNU CC could be +done like this: - - Function: void setutxent (void) - This function is similar to `setutent'. On the GNU system it is - simply an alias for `setutent'. + gcc -shared -o libnss_NAME.so.2 -Wl,-soname,libnss_NAME.so.2 OBJECTS - - Function: struct utmpx * getutxent (void) - The `getutxent' function is similar to `getutent', but returns a - pointer to a `struct utmpx' instead of `struct utmp'. On the GNU - system it simply is an alias for `getutent'. +*Note Options for Linking: (gcc)Link Options, to learn more about this +command line. - - Function: void endutxent (void) - This function is similar to `endutent'. On the GNU system it is - simply an alias for `endutent'. + To use the new module the library must be able to find it. This can +be achieved by using options for the dynamic linker so that it will +search the directory where the binary is placed. For an ELF system +this could be done by adding the wanted directory to the value of +`LD_LIBRARY_PATH'. - - Function: struct utmpx * getutxid (const struct utmpx *ID) - This function is similar to `getutid', but uses `struct utmpx' - instead of `struct utmp'. On the GNU system it is simply an alias - for `getutid'. + But this is not always possible since some programs (those which run +under IDs which do not belong to the user) ignore this variable. +Therefore the stable version of the module should be placed into a +directory which is searched by the dynamic linker. Normally this should +be the directory `$prefix/lib', where `$prefix' corresponds to the +value given to configure using the `--prefix' option. But be careful: +this should only be done if it is clear the module does not cause any +harm. System administrators should be careful. - - Function: struct utmpx * getutxline (const struct utmpx *LINE) - This function is similar to `getutid', but uses `struct utmpx' - instead of `struct utmp'. On the GNU system it is simply an alias - for `getutline'. + +File: libc.info, Node: NSS Module Function Internals, Prev: Adding another Service to NSS, Up: Extending NSS - - Function: struct utmpx * pututxline (const struct utmpx *UTMP) - The `pututxline' function is functionally identical to - `pututline', but uses `struct utmpx' instead of `struct utmp'. On - the GNU system, `pututxline' is simply an alias for `pututline'. +Internals of the NSS Module Functions +------------------------------------- - - Function: int utmpxname (const char *FILE) - The `utmpxname' function is functionally identical to `utmpname'. - On the GNU system, `utmpxname' is simply an alias for `utmpname'. + Until now we only provided the syntactic interface for the functions +in the NSS module. In fact there is not much more we can say since the +implementation obviously is different for each function. But a few +general rules must be followed by all functions. - You can translate between a traditional `struct utmp' and an XPG -`struct utmpx' with the following functions. On the GNU system, these -functions are merely copies, since the two structures are identical. + In fact there are four kinds of different functions which may appear +in the interface. All derive from the traditional ones for system +databases. DB in the following table is normally an abbreviation for +the database (e.g., it is `pw' for the password database). - - Function: int getutmp (const struct utmpx *utmpx, struct utmp *utmp) - `getutmp' copies the information, insofar as the structures are - compatible, from UTMPX to UTMP. +`enum nss_status _nss_DATABASE_setDBent (void)' + This function prepares the service for following operations. For a + simple file based lookup this means files could be opened, for + other services this function simply is a noop. - - Function: int getutmpx (const struct utmp *utmp, struct utmpx *utmpx) - `getutmpx' copies the information, insofar as the structures are - compatible, from UTMP to UTMPX. + One special case for this function is that it takes an additional + argument for some DATABASEs (i.e., the interface is `int setDBent + (int)'). *Note Host Names::, which describes the `sethostent' + function. - -File: libc.info, Node: Logging In and Out, Prev: XPG Functions, Up: User Accounting Database + The return value should be NSS_STATUS_SUCCESS or according to the + table above in case of an error (*note NSS Modules Interface::). -Logging In and Out ------------------- +`enum nss_status _nss_DATABASE_endDBent (void)' + This function simply closes all files which are still open or + removes buffer caches. If there are no files or buffers to remove + this is again a simple noop. - These functions, derived from BSD, are available in the separate -`libutil' library, and declared in `utmp.h'. + There normally is no return value different to NSS_STATUS_SUCCESS. - Note that the `ut_user' member of `struct utmp' is called `ut_name' -in BSD. Therefore, `ut_name' is defined as an alias for `ut_user' in -`utmp.h'. +`enum nss_status _nss_DATABASE_getDBent_r (STRUCTURE *result, char *buffer, size_t buflen, int *errnop)' + Since this function will be called several times in a row to + retrieve one entry after the other it must keep some kind of + state. But this also means the functions are not really + reentrant. They are reentrant only in that simultaneous calls to + this function will not try to write the retrieved data in the same + place (as it would be the case for the non-reentrant functions); + instead, it writes to the structure pointed to by the RESULT + parameter. But the calls share a common state and in the case of + a file access this means they return neighboring entries in the + file. - - Function: int login_tty (int FILEDES) - This function makes FILEDES the controlling terminal of the - current process, redirects standard input, standard output and - standard error output to this terminal, and closes FILEDES. + The buffer of length BUFLEN pointed to by BUFFER can be used for + storing some additional data for the result. It is _not_ + guaranteed that the same buffer will be passed for the next call + of this function. Therefore one must not misuse this buffer to + save some state information from one call to another. - This function returns `0' on successful completion, and `-1' on - error. + Before the function returns the implementation should store the + value of the local ERRNO variable in the variable pointed to be + ERRNOP. This is important to guarantee the module working in + statically linked programs. - - Function: void login (const struct utmp *ENTRY) - The `login' functions inserts an entry into the user accounting - database. The `ut_line' member is set to the name of the terminal - on standard input. If standard input is not a terminal `login' - uses standard output or standard error output to determine the - name of the terminal. If `struct utmp' has a `ut_type' member, - `login' sets it to `USER_PROCESS', and if there is an `ut_pid' - member, it will be set to the process ID of the current process. - The remaining entries are copied from ENTRY. + As explained above this function could also have an additional last + argument. This depends on the database used; it happens only for + `host' and `networks'. - A copy of the entry is written to the user accounting log file. + The function shall return `NSS_STATUS_SUCCESS' as long as there are + more entries. When the last entry was read it should return + `NSS_STATUS_NOTFOUND'. When the buffer given as an argument is too + small for the data to be returned `NSS_STATUS_TRYAGAIN' should be + returned. When the service was not formerly initialized by a call + to `_nss_DATABASE_setDBent' all return value allowed for this + function can also be returned here. - - Function: int logout (const char *UT_LINE) - This function modifies the user accounting database to indicate - that the user on UT_LINE has logged out. +`enum nss_status _nss_DATABASE_getDBbyXX_r (PARAMS, STRUCTURE *result, char *buffer, size_t buflen, int *errnop)' + This function shall return the entry from the database which is + addressed by the PARAMS. The type and number of these arguments + vary. It must be individually determined by looking to the + user-level interface functions. All arguments given to the + non-reentrant version are here described by PARAMS. - The `logout' function returns `1' if the entry was successfully - written to the database, or `0' on error. + The result must be stored in the structure pointed to by RESULT. + If there is additional data to return (say strings, where the + RESULT structure only contains pointers) the function must use the + BUFFER or length BUFLEN. There must not be any references to + non-constant global data. - - Function: void logwtmp (const char *UT_LINE, const char *UT_NAME, - const char *UT_HOST) - The `logwtmp' function appends an entry to the user accounting log - file, for the current time and the information provided in the - UT_LINE, UT_NAME and UT_HOST arguments. + The implementation of this function should honor the STAYOPEN flag + set by the `setDBent' function whenever this makes sense. - *Portability Note:* The BSD `struct utmp' only has the `ut_line', -`ut_name', `ut_host' and `ut_time' members. Older systems do not even -have the `ut_host' member. + Before the function returns the implementation should store the + value of the local ERRNO variable in the variable pointed to be + ERRNOP. This is important to guarantee the module working in + statically linked programs. + + Again, this function takes an additional last argument for the + `host' and `networks' database. + + The return value should as always follow the rules given above + (*note NSS Modules Interface::).  -File: libc.info, Node: User Database, Next: Group Database, Prev: User Accounting Database, Up: Users and Groups +File: libc.info, Node: Users and Groups, Next: System Management, Prev: Name Service Switch, Up: Top -User Database -============= +Users and Groups +**************** - This section describes how to search and scan the database of -registered users. The database itself is kept in the file -`/etc/passwd' on most systems, but on some systems a special network -server gives access to it. + Every user who can log in on the system is identified by a unique +number called the "user ID". Each process has an effective user ID +which says which user's access permissions it has. -* Menu: + Users are classified into "groups" for access control purposes. Each +process has one or more "group ID values" which say which groups the +process can use for access to files. -* User Data Structure:: What each user record contains. -* Lookup User:: How to look for a particular user. -* Scanning All Users:: Scanning the list of all users, one by one. -* Writing a User Entry:: How a program can rewrite a user's record. + The effective user and group IDs of a process collectively form its +"persona". This determines which files the process can access. +Normally, a process inherits its persona from the parent process, but +under special circumstances a process can change its persona and thus +change its access permissions. - -File: libc.info, Node: User Data Structure, Next: Lookup User, Up: User Database + Each file in the system also has a user ID and a group ID. Access +control works by comparing the user and group IDs of the file with those +of the running process. -The Data Structure that Describes a User ----------------------------------------- + The system keeps a database of all the registered users, and another +database of all the defined groups. There are library functions you +can use to examine these databases. - The functions and data structures for accessing the system user -database are declared in the header file `pwd.h'. +* Menu: - - Data Type: struct passwd - The `passwd' data structure is used to hold information about - entries in the system user data base. It has at least the - following members: +* User and Group IDs:: Each user has a unique numeric ID; + likewise for groups. +* Process Persona:: The user IDs and group IDs of a process. +* Why Change Persona:: Why a program might need to change + its user and/or group IDs. +* How Change Persona:: Changing the user and group IDs. +* Reading Persona:: How to examine the user and group IDs. - `char *pw_name' - The user's login name. +* Setting User ID:: Functions for setting the user ID. +* Setting Groups:: Functions for setting the group IDs. - `char *pw_passwd.' - The encrypted password string. +* Enable/Disable Setuid:: Turning setuid access on and off. +* Setuid Program Example:: The pertinent parts of one sample program. +* Tips for Setuid:: How to avoid granting unlimited access. - `uid_t pw_uid' - The user ID number. +* Who Logged In:: Getting the name of the user who logged in, + or of the real user ID of the current process. - `gid_t pw_gid' - The user's default group ID number. +* User Accounting Database:: Keeping information about users and various + actions in databases. - `char *pw_gecos' - A string typically containing the user's real name, and - possibly other information such as a phone number. +* User Database:: Functions and data structures for + accessing the user database. +* Group Database:: Functions and data structures for + accessing the group database. +* Database Example:: Example program showing the use of database + inquiry functions. +* Netgroup Database:: Functions for accessing the netgroup database. - `char *pw_dir' - The user's home directory, or initial working directory. - This might be a null pointer, in which case the - interpretation is system-dependent. + +File: libc.info, Node: User and Group IDs, Next: Process Persona, Up: Users and Groups - `char *pw_shell' - The user's default shell, or the initial program run when the - user logs in. This might be a null pointer, indicating that - the system default should be used. +User and Group IDs +================== + + Each user account on a computer system is identified by a "user +name" (or "login name") and "user ID". Normally, each user name has a +unique user ID, but it is possible for several login names to have the +same user ID. The user names and corresponding user IDs are stored in +a data base which you can access as described in *Note User Database::. + + Users are classified in "groups". Each user name belongs to one +"default group" and may also belong to any number of "supplementary +groups". Users who are members of the same group can share resources +(such as files) that are not accessible to users who are not a member +of that group. Each group has a "group name" and "group ID". *Note +Group Database::, for how to find information about a group ID or group +name. diff -durpN glibc-2.2.4/manual/libc.info-46 glibc-2.2.5/manual/libc.info-46 --- glibc-2.2.4/manual/libc.info-46 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-46 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1000 +33,1206 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Lookup User, Next: Scanning All Users, Prev: User Data Structure, Up: User Database +File: libc.info, Node: Process Persona, Next: Why Change Persona, Prev: User and Group IDs, Up: Users and Groups -Looking Up One User -------------------- +The Persona of a Process +======================== - You can search the system user database for information about a -specific user using `getpwuid' or `getpwnam'. These functions are -declared in `pwd.h'. + At any time, each process has an "effective user ID", a "effective +group ID", and a set of "supplementary group IDs". These IDs determine +the privileges of the process. They are collectively called the +"persona" of the process, because they determine "who it is" for +purposes of access control. - - Function: struct passwd * getpwuid (uid_t UID) - This function returns a pointer to a statically-allocated structure - containing information about the user whose user ID is UID. This - structure may be overwritten on subsequent calls to `getpwuid'. + Your login shell starts out with a persona which consists of your +user ID, your default group ID, and your supplementary group IDs (if +you are in more than one group). In normal circumstances, all your +other processes inherit these values. - A null pointer value indicates there is no user in the data base - with user ID UID. + A process also has a "real user ID" which identifies the user who +created the process, and a "real group ID" which identifies that user's +default group. These values do not play a role in access control, so +we do not consider them part of the persona. But they are also +important. - - Function: int getpwuid_r (uid_t UID, struct passwd *RESULT_BUF, char - *BUFFER, size_t BUFLEN, struct passwd **RESULT) - This function is similar to `getpwuid' in that it returns - information about the user whose user ID is UID. However, it - fills the user supplied structure pointed to by RESULT_BUF with - the information instead of using a static buffer. The first - BUFLEN bytes of the additional buffer pointed to by BUFFER are - used to contain additional information, normally strings which are - pointed to by the elements of the result structure. + Both the real and effective user ID can be changed during the +lifetime of a process. *Note Why Change Persona::. - If a user with ID UID is found, the pointer returned in RESULT - points to the record which contains the wanted data (i.e., RESULT - contains the value RESULT_BUF). If no user is found or if an - error occurred, the pointer returned in RESULT is a null pointer. - The function returns zero or an error code. If the buffer BUFFER - is too small to contain all the needed information, the error code - `ERANGE' is returned and ERRNO is set to `ERANGE'. + For details on how a process's effective user ID and group IDs affect +its permission to access files, see *Note Access Permission::. - - Function: struct passwd * getpwnam (const char *NAME) - This function returns a pointer to a statically-allocated structure - containing information about the user whose user name is NAME. - This structure may be overwritten on subsequent calls to - `getpwnam'. + The effective user ID of a process also controls permissions for +sending signals using the `kill' function. *Note Signaling Another +Process::. - A null pointer return indicates there is no user named NAME. + Finally, there are many operations which can only be performed by a +process whose effective user ID is zero. A process with this user ID is +a "privileged process". Commonly the user name `root' is associated +with user ID 0, but there may be other user names with this ID. - - Function: int getpwnam_r (const char *NAME, struct passwd - *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd - **RESULT) - This function is similar to `getpwnam' in that is returns - information about the user whose user name is NAME. However, like - `getpwuid_r', it fills the user supplied buffers in RESULT_BUF and - BUFFER with the information instead of using a static buffer. + +File: libc.info, Node: Why Change Persona, Next: How Change Persona, Prev: Process Persona, Up: Users and Groups - The return values are the same as for `getpwuid_r'. +Why Change the Persona of a Process? +==================================== + + The most obvious situation where it is necessary for a process to +change its user and/or group IDs is the `login' program. When `login' +starts running, its user ID is `root'. Its job is to start a shell +whose user and group IDs are those of the user who is logging in. (To +accomplish this fully, `login' must set the real user and group IDs as +well as its persona. But this is a special case.) + + The more common case of changing persona is when an ordinary user +program needs access to a resource that wouldn't ordinarily be +accessible to the user actually running it. + + For example, you may have a file that is controlled by your program +but that shouldn't be read or modified directly by other users, either +because it implements some kind of locking protocol, or because you want +to preserve the integrity or privacy of the information it contains. +This kind of restricted access can be implemented by having the program +change its effective user or group ID to match that of the resource. + + Thus, imagine a game program that saves scores in a file. The game +program itself needs to be able to update this file no matter who is +running it, but if users can write the file without going through the +game, they can give themselves any scores they like. Some people +consider this undesirable, or even reprehensible. It can be prevented +by creating a new user ID and login name (say, `games') to own the +scores file, and make the file writable only by this user. Then, when +the game program wants to update this file, it can change its effective +user ID to be that for `games'. In effect, the program must adopt the +persona of `games' so it can write the scores file.  -File: libc.info, Node: Scanning All Users, Next: Writing a User Entry, Prev: Lookup User, Up: User Database +File: libc.info, Node: How Change Persona, Next: Reading Persona, Prev: Why Change Persona, Up: Users and Groups -Scanning the List of All Users ------------------------------- +How an Application Can Change Persona +===================================== - This section explains how a program can read the list of all users in -the system, one user at a time. The functions described here are -declared in `pwd.h'. + The ability to change the persona of a process can be a source of +unintentional privacy violations, or even intentional abuse. Because of +the potential for problems, changing persona is restricted to special +circumstances. - You can use the `fgetpwent' function to read user entries from a -particular file. + You can't arbitrarily set your user ID or group ID to anything you +want; only privileged processes can do that. Instead, the normal way +for a program to change its persona is that it has been set up in +advance to change to a particular user or group. This is the function +of the setuid and setgid bits of a file's access mode. *Note +Permission Bits::. - - Function: struct passwd * fgetpwent (FILE *STREAM) - This function reads the next user entry from STREAM and returns a - pointer to the entry. The structure is statically allocated and is - rewritten on subsequent calls to `fgetpwent'. You must copy the - contents of the structure if you wish to save the information. + When the setuid bit of an executable file is on, executing that file +gives the process a third user ID: the "file user ID". This ID is set +to the owner ID of the file. The system then changes the effective +user ID to the file user ID. The real user ID remains as it was. +Likewise, if the setgid bit is on, the process is given a "file group +ID" equal to the group ID of the file, and its effective group ID is +changed to the file group ID. - The stream must correspond to a file in the same format as the - standard password database file. + If a process has a file ID (user or group), then it can at any time +change its effective ID to its real ID and back to its file ID. +Programs use this feature to relinquish their special privileges except +when they actually need them. This makes it less likely that they can +be tricked into doing something inappropriate with their privileges. - - Function: int fgetpwent_r (FILE *STREAM, struct passwd *RESULT_BUF, - char *BUFFER, size_t BUFLEN, struct passwd **RESULT) - This function is similar to `fgetpwent' in that it reads the next - user entry from STREAM. But the result is returned in the - structure pointed to by RESULT_BUF. The first BUFLEN bytes of the - additional buffer pointed to by BUFFER are used to contain - additional information, normally strings which are pointed to by - the elements of the result structure. + *Portability Note:* Older systems do not have file IDs. To +determine if a system has this feature, you can test the compiler +define `_POSIX_SAVED_IDS'. (In the POSIX standard, file IDs are known +as saved IDs.) - The stream must correspond to a file in the same format as the - standard password database file. + *Note File Attributes::, for a more general discussion of file modes +and accessibility. - If the function returns zero RESULT points to the structure with - the wanted data (normally this is in RESULT_BUF). If errors - occurred the return value is nonzero and RESULT contains a null - pointer. + +File: libc.info, Node: Reading Persona, Next: Setting User ID, Prev: How Change Persona, Up: Users and Groups - The way to scan all the entries in the user database is with -`setpwent', `getpwent', and `endpwent'. +Reading the Persona of a Process +================================ - - Function: void setpwent (void) - This function initializes a stream which `getpwent' and - `getpwent_r' use to read the user database. + Here are detailed descriptions of the functions for reading the user +and group IDs of a process, both real and effective. To use these +facilities, you must include the header files `sys/types.h' and +`unistd.h'. - - Function: struct passwd * getpwent (void) - The `getpwent' function reads the next entry from the stream - initialized by `setpwent'. It returns a pointer to the entry. The - structure is statically allocated and is rewritten on subsequent - calls to `getpwent'. You must copy the contents of the structure - if you wish to save the information. + - Data Type: uid_t + This is an integer data type used to represent user IDs. In the + GNU library, this is an alias for `unsigned int'. - A null pointer is returned when no more entries are available. + - Data Type: gid_t + This is an integer data type used to represent group IDs. In the + GNU library, this is an alias for `unsigned int'. - - Function: int getpwent_r (struct passwd *RESULT_BUF, char *BUFFER, - int BUFLEN, struct passwd **RESULT) - This function is similar to `getpwent' in that it returns the next - entry from the stream initialized by `setpwent'. Like - `fgetpwent_r', it uses the user-supplied buffers in RESULT_BUF and - BUFFER to return the information requested. + - Function: uid_t getuid (void) + The `getuid' function returns the real user ID of the process. - The return values are the same as for `fgetpwent_r'. + - Function: gid_t getgid (void) + The `getgid' function returns the real group ID of the process. + + - Function: uid_t geteuid (void) + The `geteuid' function returns the effective user ID of the + process. + - Function: gid_t getegid (void) + The `getegid' function returns the effective group ID of the + process. - - Function: void endpwent (void) - This function closes the internal stream used by `getpwent' or - `getpwent_r'. + - Function: int getgroups (int COUNT, gid_t *GROUPS) + The `getgroups' function is used to inquire about the supplementary + group IDs of the process. Up to COUNT of these group IDs are + stored in the array GROUPS; the return value from the function is + the number of group IDs actually stored. If COUNT is smaller than + the total number of supplementary group IDs, then `getgroups' + returns a value of `-1' and `errno' is set to `EINVAL'. + + If COUNT is zero, then `getgroups' just returns the total number + of supplementary group IDs. On systems that do not support + supplementary groups, this will always be zero. + + Here's how to use `getgroups' to read all the supplementary group + IDs: + + gid_t * + read_all_groups (void) + { + int ngroups = getgroups (0, NULL); + gid_t *groups + = (gid_t *) xmalloc (ngroups * sizeof (gid_t)); + int val = getgroups (ngroups, groups); + if (val < 0) + { + free (groups); + return NULL; + } + return groups; + }  -File: libc.info, Node: Writing a User Entry, Prev: Scanning All Users, Up: User Database +File: libc.info, Node: Setting User ID, Next: Setting Groups, Prev: Reading Persona, Up: Users and Groups -Writing a User Entry --------------------- +Setting the User ID +=================== - - Function: int putpwent (const struct passwd *P, FILE *STREAM) - This function writes the user entry `*P' to the stream STREAM, in - the format used for the standard user database file. The return - value is zero on success and nonzero on failure. + This section describes the functions for altering the user ID (real +and/or effective) of a process. To use these facilities, you must +include the header files `sys/types.h' and `unistd.h'. - This function exists for compatibility with SVID. We recommend - that you avoid using it, because it makes sense only on the - assumption that the `struct passwd' structure has no members - except the standard ones; on a system which merges the traditional - Unix data base with other extended information about users, adding - an entry using this function would inevitably leave out much of - the important information. + - Function: int seteuid (uid_t NEWEUID) + This function sets the effective user ID of a process to NEWUID, + provided that the process is allowed to change its effective user + ID. A privileged process (effective user ID zero) can change its + effective user ID to any legal value. An unprivileged process + with a file user ID can change its effective user ID to its real + user ID or to its file user ID. Otherwise, a process may not + change its effective user ID at all. - The function `putpwent' is declared in `pwd.h'. + The `seteuid' function returns a value of `0' to indicate + successful completion, and a value of `-1' to indicate an error. + The following `errno' error conditions are defined for this + function: - -File: libc.info, Node: Group Database, Next: Database Example, Prev: User Database, Up: Users and Groups + `EINVAL' + The value of the NEWUID argument is invalid. -Group Database -============== + `EPERM' + The process may not change to the specified ID. - This section describes how to search and scan the database of -registered groups. The database itself is kept in the file -`/etc/group' on most systems, but on some systems a special network -service provides access to it. + Older systems (those without the `_POSIX_SAVED_IDS' feature) do not + have this function. -* Menu: + - Function: int setuid (uid_t NEWUID) + If the calling process is privileged, this function sets both the + real and effective user ID of the process to NEWUID. It also + deletes the file user ID of the process, if any. NEWUID may be any + legal value. (Once this has been done, there is no way to recover + the old effective user ID.) -* Group Data Structure:: What each group record contains. -* Lookup Group:: How to look for a particular group. -* Scanning All Groups:: Scanning the list of all groups. + If the process is not privileged, and the system supports the + `_POSIX_SAVED_IDS' feature, then this function behaves like + `seteuid'. + + The return values and error conditions are the same as for + `seteuid'. + + - Function: int setreuid (uid_t RUID, uid_t EUID) + This function sets the real user ID of the process to RUID and the + effective user ID to EUID. If RUID is `-1', it means not to + change the real user ID; likewise if EUID is `-1', it means not to + change the effective user ID. + + The `setreuid' function exists for compatibility with 4.3 BSD Unix, + which does not support file IDs. You can use this function to + swap the effective and real user IDs of the process. (Privileged + processes are not limited to this particular usage.) If file IDs + are supported, you should use that feature instead of this + function. *Note Enable/Disable Setuid::. + + The return value is `0' on success and `-1' on failure. The + following `errno' error conditions are defined for this function: + + `EPERM' + The process does not have the appropriate privileges; you do + not have permission to change to the specified ID.  -File: libc.info, Node: Group Data Structure, Next: Lookup Group, Up: Group Database +File: libc.info, Node: Setting Groups, Next: Enable/Disable Setuid, Prev: Setting User ID, Up: Users and Groups -The Data Structure for a Group ------------------------------- +Setting the Group IDs +===================== - The functions and data structures for accessing the system group -database are declared in the header file `grp.h'. + This section describes the functions for altering the group IDs (real +and effective) of a process. To use these facilities, you must include +the header files `sys/types.h' and `unistd.h'. - - Data Type: struct group - The `group' structure is used to hold information about an entry in - the system group database. It has at least the following members: + - Function: int setegid (gid_t NEWGID) + This function sets the effective group ID of the process to + NEWGID, provided that the process is allowed to change its group + ID. Just as with `seteuid', if the process is privileged it may + change its effective group ID to any value; if it isn't, but it + has a file group ID, then it may change to its real group ID or + file group ID; otherwise it may not change its effective group ID. - `char *gr_name' - The name of the group. + Note that a process is only privileged if its effective _user_ ID + is zero. The effective group ID only affects access permissions. - `gid_t gr_gid' - The group ID of the group. + The return values and error conditions for `setegid' are the same + as those for `seteuid'. - `char **gr_mem' - A vector of pointers to the names of users in the group. - Each user name is a null-terminated string, and the vector - itself is terminated by a null pointer. + This function is only present if `_POSIX_SAVED_IDS' is defined. - -File: libc.info, Node: Lookup Group, Next: Scanning All Groups, Prev: Group Data Structure, Up: Group Database + - Function: int setgid (gid_t NEWGID) + This function sets both the real and effective group ID of the + process to NEWGID, provided that the process is privileged. It + also deletes the file group ID, if any. -Looking Up One Group --------------------- + If the process is not privileged, then `setgid' behaves like + `setegid'. - You can search the group database for information about a specific -group using `getgrgid' or `getgrnam'. These functions are declared in -`grp.h'. + The return values and error conditions for `setgid' are the same + as those for `seteuid'. - - Function: struct group * getgrgid (gid_t GID) - This function returns a pointer to a statically-allocated structure - containing information about the group whose group ID is GID. - This structure may be overwritten by subsequent calls to - `getgrgid'. + - Function: int setregid (gid_t RGID, gid_t EGID) + This function sets the real group ID of the process to RGID and + the effective group ID to EGID. If RGID is `-1', it means not to + change the real group ID; likewise if EGID is `-1', it means not + to change the effective group ID. - A null pointer indicates there is no group with ID GID. + The `setregid' function is provided for compatibility with 4.3 BSD + Unix, which does not support file IDs. You can use this function + to swap the effective and real group IDs of the process. + (Privileged processes are not limited to this usage.) If file IDs + are supported, you should use that feature instead of using this + function. *Note Enable/Disable Setuid::. - - Function: int getgrgid_r (gid_t GID, struct group *RESULT_BUF, char - *BUFFER, size_t BUFLEN, struct group **RESULT) - This function is similar to `getgrgid' in that it returns - information about the group whose group ID is GID. However, it - fills the user supplied structure pointed to by RESULT_BUF with - the information instead of using a static buffer. The first - BUFLEN bytes of the additional buffer pointed to by BUFFER are - used to contain additional information, normally strings which are - pointed to by the elements of the result structure. + The return values and error conditions for `setregid' are the same + as those for `setreuid'. - If a group with ID GID is found, the pointer returned in RESULT - points to the record which contains the wanted data (i.e., RESULT - contains the value RESULT_BUF). If no group is found or if an - error occurred, the pointer returned in RESULT is a null pointer. - The function returns zero or an error code. If the buffer BUFFER - is too small to contain all the needed information, the error code - `ERANGE' is returned and ERRNO is set to `ERANGE'. + `setuid' and `setgid' behave differently depending on whether the +effective user ID at the time is zero. If it is not zero, they behave +like `seteuid' and `setegid'. If it is, they change both effective and +real IDs and delete the file ID. To avoid confusion, we recommend you +always use `seteuid' and `setegid' except when you know the effective +user ID is zero and your intent is to change the persona permanently. +This case is rare--most of the programs that need it, such as `login' +and `su', have already been written. - - Function: struct group * getgrnam (const char *NAME) - This function returns a pointer to a statically-allocated structure - containing information about the group whose group name is NAME. - This structure may be overwritten by subsequent calls to - `getgrnam'. + Note that if your program is setuid to some user other than `root', +there is no way to drop privileges permanently. - A null pointer indicates there is no group named NAME. + The system also lets privileged processes change their supplementary +group IDs. To use `setgroups' or `initgroups', your programs should +include the header file `grp.h'. - - Function: int getgrnam_r (const char *NAME, struct group - *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group - **RESULT) - This function is similar to `getgrnam' in that is returns - information about the group whose group name is NAME. Like - `getgrgid_r', it uses the user supplied buffers in RESULT_BUF and - BUFFER, not a static buffer. + - Function: int setgroups (size_t COUNT, gid_t *GROUPS) + This function sets the process's supplementary group IDs. It can + only be called from privileged processes. The COUNT argument + specifies the number of group IDs in the array GROUPS. - The return values are the same as for `getgrgid_r' `ERANGE'. + This function returns `0' if successful and `-1' on error. The + following `errno' error conditions are defined for this function: + + `EPERM' + The calling process is not privileged. + + - Function: int initgroups (const char *USER, gid_t GROUP) + The `initgroups' function sets the process's supplementary group + IDs to be the normal default for the user name USER. The group + GROUP is automatically included. + + This function works by scanning the group database for all the + groups USER belongs to. It then calls `setgroups' with the list it + has constructed. + + The return values and error conditions are the same as for + `setgroups'. + + If you are interested in the groups a particular user belongs to, +but do not want to change the process's supplementary group IDs, you +can use `getgrouplist'. To use `getgrouplist', your programs should +include the header file `grp.h'. + + - Function: int getgrouplist (const char *USER, gid_t GROUP, gid_t + *GROUPS, int *NGROUPS) + The `getgrouplist' function scans the group database for all the + groups USER belongs to. Up to *NGROUPS group IDs corresponding to + these groups are stored in the array GROUPS; the return value from + the function is the number of group IDs actually stored. If + *NGROUPS is smaller than the total number of groups found, then + `getgrouplist' returns a value of `-1' and stores the actual + number of groups in *NGROUPS. The group GROUP is automatically + included in the list of groups returned by `getgrouplist'. + + Here's how to use `getgrouplist' to read all supplementary groups + for USER: + + gid_t * + supplementary_groups (char *user) + { + int ngroups = 16; + gid_t *groups + = (gid_t *) xmalloc (ngroups * sizeof (gid_t)); + struct passwd *pw = getpwnam (user); + + if (pw == NULL) + return NULL; + + if (getgrouplist (pw->pw_name, pw->pw_gid, groups, &ngroups) < 0) + { + groups = xrealloc (ngroups * sizeof (gid_t)); + getgrouplist (pw->pw_name, pw->pw_gid, groups, &ngroups); + } + return groups; + }  -File: libc.info, Node: Scanning All Groups, Prev: Lookup Group, Up: Group Database +File: libc.info, Node: Enable/Disable Setuid, Next: Setuid Program Example, Prev: Setting Groups, Up: Users and Groups -Scanning the List of All Groups -------------------------------- +Enabling and Disabling Setuid Access +==================================== - This section explains how a program can read the list of all groups -in the system, one group at a time. The functions described here are -declared in `grp.h'. + A typical setuid program does not need its special access all of the +time. It's a good idea to turn off this access when it isn't needed, +so it can't possibly give unintended access. - You can use the `fgetgrent' function to read group entries from a -particular file. + If the system supports the `_POSIX_SAVED_IDS' feature, you can +accomplish this with `seteuid'. When the game program starts, its real +user ID is `jdoe', its effective user ID is `games', and its saved user +ID is also `games'. The program should record both user ID values once +at the beginning, like this: - - Function: struct group * fgetgrent (FILE *STREAM) - The `fgetgrent' function reads the next entry from STREAM. It - returns a pointer to the entry. The structure is statically - allocated and is overwritten on subsequent calls to `fgetgrent'. - You must copy the contents of the structure if you wish to save the - information. + user_user_id = getuid (); + game_user_id = geteuid (); - The stream must correspond to a file in the same format as the - standard group database file. + Then it can turn off game file access with - - Function: int fgetgrent_r (FILE *STREAM, struct group *RESULT_BUF, - char *BUFFER, size_t BUFLEN, struct group **RESULT) - This function is similar to `fgetgrent' in that it reads the next - user entry from STREAM. But the result is returned in the - structure pointed to by RESULT_BUF. The first BUFLEN bytes of the - additional buffer pointed to by BUFFER are used to contain - additional information, normally strings which are pointed to by - the elements of the result structure. + seteuid (user_user_id); - This stream must correspond to a file in the same format as the - standard group database file. +and turn it on with - If the function returns zero RESULT points to the structure with - the wanted data (normally this is in RESULT_BUF). If errors - occurred the return value is non-zero and RESULT contains a null - pointer. + seteuid (game_user_id); - The way to scan all the entries in the group database is with -`setgrent', `getgrent', and `endgrent'. +Throughout this process, the real user ID remains `jdoe' and the file +user ID remains `games', so the program can always set its effective +user ID to either one. - - Function: void setgrent (void) - This function initializes a stream for reading from the group data - base. You use this stream by calling `getgrent' or `getgrent_r'. + On other systems that don't support file user IDs, you can turn +setuid access on and off by using `setreuid' to swap the real and +effective user IDs of the process, as follows: - - Function: struct group * getgrent (void) - The `getgrent' function reads the next entry from the stream - initialized by `setgrent'. It returns a pointer to the entry. The - structure is statically allocated and is overwritten on subsequent - calls to `getgrent'. You must copy the contents of the structure - if you wish to save the information. + setreuid (geteuid (), getuid ()); - - Function: int getgrent_r (struct group *RESULT_BUF, char *BUFFER, - size_t BUFLEN, struct group **RESULT) - This function is similar to `getgrent' in that it returns the next - entry from the stream initialized by `setgrent'. Like - `fgetgrent_r', it places the result in user-supplied buffers - pointed to RESULT_BUF and BUFFER. +This special case is always allowed--it cannot fail. - If the function returns zero RESULT contains a pointer to the data - (normally equal to RESULT_BUF). If errors occurred the return - value is non-zero and RESULT contains a null pointer. + Why does this have the effect of toggling the setuid access? +Suppose a game program has just started, and its real user ID is `jdoe' +while its effective user ID is `games'. In this state, the game can +write the scores file. If it swaps the two uids, the real becomes +`games' and the effective becomes `jdoe'; now the program has only +`jdoe' access. Another swap brings `games' back to the effective user +ID and restores access to the scores file. - - Function: void endgrent (void) - This function closes the internal stream used by `getgrent' or - `getgrent_r'. + In order to handle both kinds of systems, test for the saved user ID +feature with a preprocessor conditional, like this: + + #ifdef _POSIX_SAVED_IDS + setuid (user_user_id); + #else + setreuid (geteuid (), getuid ()); + #endif  -File: libc.info, Node: Database Example, Next: Netgroup Database, Prev: Group Database, Up: Users and Groups +File: libc.info, Node: Setuid Program Example, Next: Tips for Setuid, Prev: Enable/Disable Setuid, Up: Users and Groups -User and Group Database Example -=============================== +Setuid Program Example +====================== - Here is an example program showing the use of the system database -inquiry functions. The program prints some information about the user -running the program. + Here's an example showing how to set up a program that changes its +effective user ID. - #include - #include + This is part of a game program called `caber-toss' that manipulates +a file `scores' that should be writable only by the game program +itself. The program assumes that its executable file will be installed +with the setuid bit set and owned by the same user as the `scores' +file. Typically, a system administrator will set up an account like +`games' for this purpose. + + The executable file is given mode `4755', so that doing an `ls -l' +on it produces output like: + + -rwsr-xr-x 1 games 184422 Jul 30 15:17 caber-toss + +The setuid bit shows up in the file modes as the `s'. + + The scores file is given mode `644', and doing an `ls -l' on it +shows: + + -rw-r--r-- 1 games 0 Jul 31 15:33 scores + + Here are the parts of the program that show how to set up the changed +user ID. This program is conditionalized so that it makes use of the +file IDs feature if it is supported, and otherwise uses `setreuid' to +swap the effective and real user IDs. + + #include #include #include #include - int - main (void) + + /* Remember the effective and real UIDs. */ + + static uid_t euid, ruid; + + + /* Restore the effective UID to its original value. */ + + void + do_setuid (void) { - uid_t me; - struct passwd *my_passwd; - struct group *my_group; - char **members; + int status; - /* Get information about the user ID. */ - me = getuid (); - my_passwd = getpwuid (me); - if (!my_passwd) - { - printf ("Couldn't find out about user %d.\n", (int) me); - exit (EXIT_FAILURE); + #ifdef _POSIX_SAVED_IDS + status = seteuid (euid); + #else + status = setreuid (ruid, euid); + #endif + if (status < 0) { + fprintf (stderr, "Couldn't set uid.\n"); + exit (status); } + } - /* Print the information. */ - printf ("I am %s.\n", my_passwd->pw_gecos); - printf ("My login name is %s.\n", my_passwd->pw_name); - printf ("My uid is %d.\n", (int) (my_passwd->pw_uid)); - printf ("My home directory is %s.\n", my_passwd->pw_dir); - printf ("My default shell is %s.\n", my_passwd->pw_shell); - /* Get information about the default group ID. */ - my_group = getgrgid (my_passwd->pw_gid); - if (!my_group) - { - printf ("Couldn't find out about group %d.\n", - (int) my_passwd->pw_gid); - exit (EXIT_FAILURE); - } + /* Set the effective UID to the real UID. */ - /* Print the information. */ - printf ("My default group is %s (%d).\n", - my_group->gr_name, (int) (my_passwd->pw_gid)); - printf ("The members of this group are:\n"); - members = my_group->gr_mem; - while (*members) - { - printf (" %s\n", *(members)); - members++; + void + undo_setuid (void) + { + int status; + + #ifdef _POSIX_SAVED_IDS + status = seteuid (ruid); + #else + status = setreuid (euid, ruid); + #endif + if (status < 0) { + fprintf (stderr, "Couldn't set uid.\n"); + exit (status); } + } - return EXIT_SUCCESS; + /* Main program. */ + + int + main (void) + { + /* Remember the real and effective user IDs. */ + ruid = getuid (); + euid = geteuid (); + undo_setuid (); + + /* Do the game and record the score. */ + ... } - Here is some output from this program: + Notice how the first thing the `main' function does is to set the +effective user ID back to the real user ID. This is so that any other +file accesses that are performed while the user is playing the game use +the real user ID for determining permissions. Only when the program +needs to open the scores file does it switch back to the file user ID, +like this: - I am Throckmorton Snurd. - My login name is snurd. - My uid is 31093. - My home directory is /home/fsg/snurd. - My default shell is /bin/sh. - My default group is guest (12). - The members of this group are: - friedman - tami + /* Record the score. */ + + int + record_score (int score) + { + FILE *stream; + char *myname; + + /* Open the scores file. */ + do_setuid (); + stream = fopen (SCORES_FILE, "a"); + undo_setuid (); + + /* Write the score to the file. */ + if (stream) + { + myname = cuserid (NULL); + if (score < 0) + fprintf (stream, "%10s: Couldn't lift the caber.\n", myname); + else + fprintf (stream, "%10s: %d feet.\n", myname, score); + fclose (stream); + return 0; + } + else + return -1; + }  -File: libc.info, Node: Netgroup Database, Prev: Database Example, Up: Users and Groups - -Netgroup Database -================= +File: libc.info, Node: Tips for Setuid, Next: Who Logged In, Prev: Setuid Program Example, Up: Users and Groups -* Menu: +Tips for Writing Setuid Programs +================================ -* Netgroup Data:: Data in the Netgroup database and where - it comes from. -* Lookup Netgroup:: How to look for a particular netgroup. -* Netgroup Membership:: How to test for netgroup membership. + It is easy for setuid programs to give the user access that isn't +intended--in fact, if you want to avoid this, you need to be careful. +Here are some guidelines for preventing unintended access and +minimizing its consequences when it does occur: - -File: libc.info, Node: Netgroup Data, Next: Lookup Netgroup, Up: Netgroup Database + * Don't have `setuid' programs with privileged user IDs such as + `root' unless it is absolutely necessary. If the resource is + specific to your particular program, it's better to define a new, + nonprivileged user ID or group ID just to manage that resource. + It's better if you can write your program to use a special group + than a special user. -Netgroup Data -------------- + * Be cautious about using the `exec' functions in combination with + changing the effective user ID. Don't let users of your program + execute arbitrary programs under a changed user ID. Executing a + shell is especially bad news. Less obviously, the `execlp' and + `execvp' functions are a potential risk (since the program they + execute depends on the user's `PATH' environment variable). - Sometimes it is useful to group users according to other criteria -(*note Group Database::). E.g., it is useful to associate a certain -group of users with a certain machine. On the other hand grouping of -host names is not supported so far. + If you must `exec' another program under a changed ID, specify an + absolute file name (*note File Name Resolution::) for the + executable, and make sure that the protections on that executable + and _all_ containing directories are such that ordinary users + cannot replace it with some other program. - In Sun Microsystems SunOS appeared a new kind of database, the -netgroup database. It allows grouping hosts, users, and domains -freely, giving them individual names. To be more concrete, a netgroup -is a list of triples consisting of a host name, a user name, and a -domain name where any of the entries can be a wildcard entry matching -all inputs. A last possibility is that names of other netgroups can -also be given in the list specifying a netgroup. So one can construct -arbitrary hierarchies without loops. + You should also check the arguments passed to the program to make + sure they do not have unexpected effects. Likewise, you should + examine the environment variables. Decide which arguments and + variables are safe, and reject all others. - Sun's implementation allows netgroups only for the `nis' or -`nisplus' service, *note Services in the NSS configuration::. The -implementation in the GNU C library has no such restriction. An entry -in either of the input services must have the following form: + You should never use `system' in a privileged program, because it + invokes a shell. - GROUPNAME ( GROUPNAME | `('HOSTNAME`,'USERNAME`,'`domainname'`)' )+ + * Only use the user ID controlling the resource in the part of the + program that actually uses that resource. When you're finished + with it, restore the effective user ID back to the actual user's + user ID. *Note Enable/Disable Setuid::. - Any of the fields in the triple can be empty which means anything -matches. While describing the functions we will see that the opposite -case is useful as well. I.e., there may be entries which will not -match any input. For entries like this, a name consisting of the single -character `-' shall be used. + * If the `setuid' part of your program needs to access other files + besides the controlled resource, it should verify that the real + user would ordinarily have permission to access those files. You + can use the `access' function (*note Access Permission::) to check + this; it uses the real user and group IDs, rather than the + effective IDs.  -File: libc.info, Node: Lookup Netgroup, Next: Netgroup Membership, Prev: Netgroup Data, Up: Netgroup Database +File: libc.info, Node: Who Logged In, Next: User Accounting Database, Prev: Tips for Setuid, Up: Users and Groups -Looking up one Netgroup ------------------------ +Identifying Who Logged In +========================= - The lookup functions for netgroups are a bit different to all other -system database handling functions. Since a single netgroup can contain -many entries a two-step process is needed. First a single netgroup is -selected and then one can iterate over all entries in this netgroup. -These functions are declared in `netdb.h'. + You can use the functions listed in this section to determine the +login name of the user who is running a process, and the name of the +user who logged in the current session. See also the function `getuid' +and friends (*note Reading Persona::). How this information is +collected by the system and how to control/add/remove information from +the background storage is described in *Note User Accounting Database::. - - Function: int setnetgrent (const char *NETGROUP) - A call to this function initializes the internal state of the - library to allow following calls of the `getnetgrent' to iterate - over all entries in the netgroup with name NETGROUP. + The `getlogin' function is declared in `unistd.h', while `cuserid' +and `L_cuserid' are declared in `stdio.h'. - When the call is successful (i.e., when a netgroup with this name - exists) the return value is `1'. When the return value is `0' no - netgroup of this name is known or some other error occurred. + - Function: char * getlogin (void) + The `getlogin' function returns a pointer to a string containing + the name of the user logged in on the controlling terminal of the + process, or a null pointer if this information cannot be + determined. The string is statically allocated and might be + overwritten on subsequent calls to this function or to `cuserid'. - It is important to remember that there is only one single state for -iterating the netgroups. Even if the programmer uses the -`getnetgrent_r' function the result is not really reentrant since -always only one single netgroup at a time can be processed. If the -program needs to process more than one netgroup simultaneously she must -protect this by using external locking. This problem was introduced in -the original netgroups implementation in SunOS and since we must stay -compatible it is not possible to change this. + - Function: char * cuserid (char *STRING) + The `cuserid' function returns a pointer to a string containing a + user name associated with the effective ID of the process. If + STRING is not a null pointer, it should be an array that can hold + at least `L_cuserid' characters; the string is returned in this + array. Otherwise, a pointer to a string in a static area is + returned. This string is statically allocated and might be + overwritten on subsequent calls to this function or to `getlogin'. - Some other functions also use the netgroups state. Currently these -are the `innetgr' function and parts of the implementation of the -`compat' service part of the NSS implementation. + The use of this function is deprecated since it is marked to be + withdrawn in XPG4.2 and has already been removed from newer + revisions of POSIX.1. - - Function: int getnetgrent (char **HOSTP, char **USERP, char - **DOMAINP) - This function returns the next unprocessed entry of the currently - selected netgroup. The string pointers, in which addresses are - passed in the arguments HOSTP, USERP, and DOMAINP, will contain - after a successful call pointers to appropriate strings. If the - string in the next entry is empty the pointer has the value `NULL'. - The returned string pointers are only valid if none of the netgroup - related functions are called. + - Macro: int L_cuserid + An integer constant that indicates how long an array you might + need to store a user name. - The return value is `1' if the next entry was successfully read. A - value of `0' means no further entries exist or internal errors - occurred. + These functions let your program identify positively the user who is +running or the user who logged in this session. (These can differ when +setuid programs are involved; see *Note Process Persona::.) The user +cannot do anything to fool these functions. - - Function: int getnetgrent_r (char **HOSTP, char **USERP, char - **DOMAINP, char *BUFFER, int BUFLEN) - This function is similar to `getnetgrent' with only one exception: - the strings the three string pointers HOSTP, USERP, and DOMAINP - point to, are placed in the buffer of BUFLEN bytes starting at - BUFFER. This means the returned values are valid even after other - netgroup related functions are called. + For most purposes, it is more useful to use the environment variable +`LOGNAME' to find out who the user is. This is more flexible precisely +because the user can set `LOGNAME' arbitrarily. *Note Standard +Environment::. - The return value is `1' if the next entry was successfully read and - the buffer contains enough room to place the strings in it. `0' is - returned in case no more entries are found, the buffer is too - small, or internal errors occurred. + +File: libc.info, Node: User Accounting Database, Next: User Database, Prev: Who Logged In, Up: Users and Groups - This function is a GNU extension. The original implementation in - the SunOS libc does not provide this function. +The User Accounting Database +============================ - - Function: void endnetgrent (void) - This function frees all buffers which were allocated to process - the last selected netgroup. As a result all string pointers - returned by calls to `getnetgrent' are invalid afterwards. + Most Unix-like operating systems keep track of logged in users by +maintaining a user accounting database. This user accounting database +stores for each terminal, who has logged on, at what time, the process +ID of the user's login shell, etc., etc., but also stores information +about the run level of the system, the time of the last system reboot, +and possibly more. + + The user accounting database typically lives in `/etc/utmp', +`/var/adm/utmp' or `/var/run/utmp'. However, these files should +*never* be accessed directly. For reading information from and writing +information to the user accounting database, the functions described in +this section should be used. + +* Menu: + +* Manipulating the Database:: Scanning and modifying the user + accounting database. +* XPG Functions:: A standardized way for doing the same thing. +* Logging In and Out:: Functions from BSD that modify the user + accounting database.  -File: libc.info, Node: Netgroup Membership, Prev: Lookup Netgroup, Up: Netgroup Database +File: libc.info, Node: Manipulating the Database, Next: XPG Functions, Up: User Accounting Database -Testing for Netgroup Membership -------------------------------- +Manipulating the User Accounting Database +----------------------------------------- - It is often not necessary to scan the whole netgroup since often the -only interesting question is whether a given entry is part of the -selected netgroup. + These functions and the corresponding data structures are declared in +the header file `utmp.h'. - - Function: int innetgr (const char *NETGROUP, const char *HOST, const - char *USER, const char *DOMAIN) - This function tests whether the triple specified by the parameters - HOSTP, USERP, and DOMAINP is part of the netgroup NETGROUP. Using - this function has the advantage that + - Data Type: struct exit_status + The `exit_status' data structure is used to hold information about + the exit status of processes marked as `DEAD_PROCESS' in the user + accounting database. - 1. no other netgroup function can use the global netgroup state - since internal locking is used and + `short int e_termination' + The exit status of the process. - 2. the function is implemented more efficiently than successive - calls to the other `set'/`get'/`endnetgrent' functions. + `short int e_exit' + The exit status of the process. - Any of the pointers HOSTP, USERP, and DOMAINP can be `NULL' which - means any value is accepted in this position. This is also true - for the name `-' which should not match any other string otherwise. + - Data Type: struct utmp + The `utmp' data structure is used to hold information about entries + in the user accounting database. On the GNU system it has the + following members: - The return value is `1' if an entry matching the given triple is - found in the netgroup. The return value is `0' if the netgroup - itself is not found, the netgroup does not contain the triple or - internal errors occurred. + `short int ut_type' + Specifies the type of login; one of `EMPTY', `RUN_LVL', + `BOOT_TIME', `OLD_TIME', `NEW_TIME', `INIT_PROCESS', + `LOGIN_PROCESS', `USER_PROCESS', `DEAD_PROCESS' or + `ACCOUNTING'. - -File: libc.info, Node: System Management, Next: System Configuration, Prev: Users and Groups, Up: Top + `pid_t ut_pid' + The process ID number of the login process. -System Management -***************** + `char ut_line[]' + The device name of the tty (without `/dev/'). - This chapter describes facilities for controlling the system that -underlies a process (including the operating system and hardware) and -for getting information about it. Anyone can generally use the -informational facilities, but usually only a properly privileged process -can make changes. + `char ut_id[]' + The inittab ID of the process. -* Menu: + `char ut_user[]' + The user's login name. -* Host Identification:: Determining the name of the machine. -* Platform Type:: Determining operating system and basic - machine type -* Filesystem Handling:: Controlling/querying mounts -* System Parameters:: Getting and setting various system parameters + `char ut_host[]' + The name of the host from which the user logged in. - To get information on parameters of the system that are built into -the system, such as the maximum length of a filename, *Note System -Configuration::. + `struct exit_status ut_exit' + The exit status of a process marked as `DEAD_PROCESS'. - -File: libc.info, Node: Host Identification, Next: Platform Type, Up: System Management + `long ut_session' + The Session ID, used for windowing. -Host Identification -=================== + `struct timeval ut_tv' + Time the entry was made. For entries of type `OLD_TIME' this + is the time when the system clock changed, and for entries of + type `NEW_TIME' this is the time the system clock was set to. - This section explains how to identify the particular system on which -your program is running. First, let's review the various ways computer -systems are named, which is a little complicated because of the history -of the development of the Internet. + `int32_t ut_addr_v6[4]' + The Internet address of a remote host. - Every Unix system (also known as a host) has a host name, whether -it's connected to a network or not. In its simplest form, as used -before computer networks were an issue, it's just a word like `chicken'. + The `ut_type', `ut_pid', `ut_id', `ut_tv', and `ut_host' fields are +not available on all systems. Portable applications therefore should +be prepared for these situations. To help doing this the `utmp.h' +header provides macros `_HAVE_UT_TYPE', `_HAVE_UT_PID', `_HAVE_UT_ID', +`_HAVE_UT_TV', and `_HAVE_UT_HOST' if the respective field is +available. The programmer can handle the situations by using `#ifdef' +in the program code. - But any system attached to the Internet or any network like it -conforms to a more rigorous naming convention as part of the Domain -Name System (DNS). In DNS, every host name is composed of two parts: + The following macros are defined for use as values for the `ut_type' +member of the `utmp' structure. The values are integer constants. - 1. hostname +`EMPTY' + This macro is used to indicate that the entry contains no valid + user accounting information. - 2. domain name +`RUN_LVL' + This macro is used to identify the systems runlevel. - You will note that "hostname" looks a lot like "host name", but is -not the same thing, and that people often incorrectly refer to entire -host names as "domain names." +`BOOT_TIME' + This macro is used to identify the time of system boot. - In DNS, the full host name is properly called the FQDN (Fully -Qualified Domain Name) and consists of the hostname, then a period, -then the domain name. The domain name itself usually has multiple -components separated by periods. So for example, a system's hostname -may be `chicken' and its domain name might be `ai.mit.edu', so its FQDN -(which is its host name) is `chicken.ai.mit.edu'. +`OLD_TIME' + This macro is used to identify the time when the system clock + changed. - Adding to the confusion, though, is that DNS is not the only name -space in which a computer needs to be known. Another name space is the -NIS (aka YP) name space. For NIS purposes, there is another domain -name, which is called the NIS domain name or the YP domain name. It -need not have anything to do with the DNS domain name. +`NEW_TIME' + This macro is used to identify the time after the system changed. - Confusing things even more is the fact that in DNS, it is possible -for multiple FQDNs to refer to the same system. However, there is -always exactly one of them that is the true host name, and it is called -the canonical FQDN. +`INIT_PROCESS' + This macro is used to identify a process spawned by the init + process. - In some contexts, the host name is called a "node name." +`LOGIN_PROCESS' + This macro is used to identify the session leader of a logged in + user. - For more information on DNS host naming, *Note Host Names::. +`USER_PROCESS' + This macro is used to identify a user process. - Prototypes for these functions appear in `unistd.h'. +`DEAD_PROCESS' + This macro is used to identify a terminated process. - The programs `hostname', `hostid', and `domainname' work by calling -these functions. +`ACCOUNTING' + ??? - - Function: int gethostname (char *NAME, size_t SIZE) - This function returns the host name of the system on which it is - called, in the array NAME. The SIZE argument specifies the size of - this array, in bytes. Note that this is _not_ the DNS hostname. - If the system participates in DNS, this is the FQDN (see above). + The size of the `ut_line', `ut_id', `ut_user' and `ut_host' arrays +can be found using the `sizeof' operator. - The return value is `0' on success and `-1' on failure. In the - GNU C library, `gethostname' fails if SIZE is not large enough; - then you can try again with a larger array. The following `errno' - error condition is defined for this function: + Many older systems have, instead of an `ut_tv' member, an `ut_time' +member, usually of type `time_t', for representing the time associated +with the entry. Therefore, for backwards compatibility only, `utmp.h' +defines `ut_time' as an alias for `ut_tv.tv_sec'. - `ENAMETOOLONG' - The SIZE argument is less than the size of the host name plus - one. + - Function: void setutent (void) + This function opens the user accounting database to begin scanning + it. You can then call `getutent', `getutid' or `getutline' to + read entries and `pututline' to write entries. - On some systems, there is a symbol for the maximum possible host - name length: `MAXHOSTNAMELEN'. It is defined in `sys/param.h'. - But you can't count on this to exist, so it is cleaner to handle - failure and try again. + If the database is already open, it resets the input to the + beginning of the database. - `gethostname' stores the beginning of the host name in NAME even - if the host name won't entirely fit. For some purposes, a - truncated host name is good enough. If it is, you can ignore the - error code. + - Function: struct utmp * getutent (void) + The `getutent' function reads the next entry from the user + accounting database. It returns a pointer to the entry, which is + statically allocated and may be overwritten by subsequent calls to + `getutent'. You must copy the contents of the structure if you + wish to save the information or you can use the `getutent_r' + function which stores the data in a user-provided buffer. - - Function: int sethostname (const char *NAME, size_t LENGTH) - The `sethostname' function sets the host name of the system that - calls it to NAME, a string with length LENGTH. Only privileged - processes are permitted to do this. + A null pointer is returned in case no further entry is available. - Usually `sethostname' gets called just once, at system boot time. - Often, the program that calls it sets it to the value it finds in - the file `/etc/hostname'. + - Function: void endutent (void) + This function closes the user accounting database. - Be sure to set the host name to the full host name, not just the - DNS hostname (see above). + - Function: struct utmp * getutid (const struct utmp *ID) + This function searches forward from the current point in the + database for an entry that matches ID. If the `ut_type' member of + the ID structure is one of `RUN_LVL', `BOOT_TIME', `OLD_TIME' or + `NEW_TIME' the entries match if the `ut_type' members are + identical. If the `ut_type' member of the ID structure is + `INIT_PROCESS', `LOGIN_PROCESS', `USER_PROCESS' or `DEAD_PROCESS', + the entries match if the `ut_type' member of the entry read from + the database is one of these four, and the `ut_id' members match. + However if the `ut_id' member of either the ID structure or the + entry read from the database is empty it checks if the `ut_line' + members match instead. If a matching entry is found, `getutid' + returns a pointer to the entry, which is statically allocated, and + may be overwritten by a subsequent call to `getutent', `getutid' + or `getutline'. You must copy the contents of the structure if + you wish to save the information. - The return value is `0' on success and `-1' on failure. The - following `errno' error condition is defined for this function: + A null pointer is returned in case the end of the database is + reached without a match. - `EPERM' - This process cannot set the host name because it is not - privileged. + The `getutid' function may cache the last read entry. Therefore, + if you are using `getutid' to search for multiple occurrences, it + is necessary to zero out the static data after each call. + Otherwise `getutid' could just return a pointer to the same entry + over and over again. - - Function: int getdomainnname (char *NAME, size_t LENGTH) - `getdomainname' returns the NIS (aka YP) domain name of the system - on which it is called. Note that this is not the more popular DNS - domain name. Get that with `gethostname'. + - Function: struct utmp * getutline (const struct utmp *LINE) + This function searches forward from the current point in the + database until it finds an entry whose `ut_type' value is + `LOGIN_PROCESS' or `USER_PROCESS', and whose `ut_line' member + matches the `ut_line' member of the LINE structure. If it finds + such an entry, it returns a pointer to the entry which is + statically allocated, and may be overwritten by a subsequent call + to `getutent', `getutid' or `getutline'. You must copy the + contents of the structure if you wish to save the information. - The specifics of this function are analogous to `gethostname', - above. + A null pointer is returned in case the end of the database is + reached without a match. + The `getutline' function may cache the last read entry. Therefore + if you are using `getutline' to search for multiple occurrences, it + is necessary to zero out the static data after each call. + Otherwise `getutline' could just return a pointer to the same + entry over and over again. - - Function: int setdomainname (const char *NAME, size_t LENGTH) - `getdomainname' sets the NIS (aka YP) domain name of the system on - which it is called. Note that this is not the more popular DNS - domain name. Set that with `sethostname'. + - Function: struct utmp * pututline (const struct utmp *UTMP) + The `pututline' function inserts the entry `*UTMP' at the + appropriate place in the user accounting database. If it finds + that it is not already at the correct place in the database, it + uses `getutid' to search for the position to insert the entry, + however this will not modify the static structure returned by + `getutent', `getutid' and `getutline'. If this search fails, the + entry is appended to the database. - The specifics of this function are analogous to `sethostname', - above. + The `pututline' function returns a pointer to a copy of the entry + inserted in the user accounting database, or a null pointer if the + entry could not be added. The following `errno' error conditions + are defined for this function: + `EPERM' + The process does not have the appropriate privileges; you + cannot modify the user accounting database. - - Function: long int gethostid (void) - This function returns the "host ID" of the machine the program is - running on. By convention, this is usually the primary Internet - IP address of that machine, converted to a `long int'. However, - on some systems it is a meaningless but unique number which is - hard-coded for each machine. + All the `get*' functions mentioned before store the information they +return in a static buffer. This can be a problem in multi-threaded +programs since the data returned for the request is overwritten by the +return value data in another thread. Therefore the GNU C Library +provides as extensions three more functions which return the data in a +user-provided buffer. - This is not widely used. It arose in BSD 4.2, but was dropped in - BSD 4.4. It is not required by POSIX. + - Function: int getutent_r (struct utmp *BUFFER, struct utmp **RESULT) + The `getutent_r' is equivalent to the `getutent' function. It + returns the next entry from the database. But instead of storing + the information in a static buffer it stores it in the buffer + pointed to by the parameter BUFFER. - The proper way to query the IP address is to use `gethostbyname' - on the results of `gethostname'. For more information on IP - addresses, *Note Host Addresses::. + If the call was successful, the function returns `0' and the + pointer variable pointed to by the parameter RESULT contains a + pointer to the buffer which contains the result (this is most + probably the same value as BUFFER). If something went wrong + during the execution of `getutent_r' the function returns `-1'. - - Function: int sethostid (long int ID) - The `sethostid' function sets the "host ID" of the host machine to - ID. Only privileged processes are permitted to do this. Usually - it happens just once, at system boot time. + This function is a GNU extension. - The proper way to establish the primary IP address of a system is - to configure the IP address resolver to associate that IP address - with the system's host name as returned by `gethostname'. For - example, put a record for the system in `/etc/hosts'. + - Function: int getutid_r (const struct utmp *ID, struct utmp *BUFFER, + struct utmp **RESULT) + This function retrieves just like `getutid' the next entry matching + the information stored in ID. But the result is stored in the + buffer pointed to by the parameter BUFFER. - See `gethostid' above for more information on host ids. + If successful the function returns `0' and the pointer variable + pointed to by the parameter RESULT contains a pointer to the + buffer with the result (probably the same as RESULT. If not + successful the function return `-1'. - The return value is `0' on success and `-1' on failure. The - following `errno' error conditions are defined for this function: + This function is a GNU extension. - `EPERM' - This process cannot set the host name because it is not - privileged. + - Function: int getutline_r (const struct utmp *LINE, struct utmp + *BUFFER, struct utmp **RESULT) + This function retrieves just like `getutline' the next entry + matching the information stored in LINE. But the result is stored + in the buffer pointed to by the parameter BUFFER. - `ENOSYS' - The operating system does not support setting the host ID. - On some systems, the host ID is a meaningless but unique - number hard-coded for each machine. + If successful the function returns `0' and the pointer variable + pointed to by the parameter RESULT contains a pointer to the + buffer with the result (probably the same as RESULT. If not + successful the function return `-1'. - -File: libc.info, Node: Platform Type, Next: Filesystem Handling, Prev: Host Identification, Up: System Management + This function is a GNU extension. -Platform Type Identification -============================ + In addition to the user accounting database, most systems keep a +number of similar databases. For example most systems keep a log file +with all previous logins (usually in `/etc/wtmp' or `/var/log/wtmp'). - You can use the `uname' function to find out some information about -the type of computer your program is running on. This function and the -associated data type are declared in the header file `sys/utsname.h'. + For specifying which database to examine, the following function +should be used. - As a bonus, `uname' also gives some information identifying the -particular system your program is running on. This is the same -information which you can get with functions targetted to this purpose -described in *Note Host Identification::. + - Function: int utmpname (const char *FILE) + The `utmpname' function changes the name of the database to be + examined to FILE, and closes any previously opened database. By + default `getutent', `getutid', `getutline' and `pututline' read + from and write to the user accounting database. - - Data Type: struct utsname - The `utsname' structure is used to hold information returned by - the `uname' function. It has the following members: + The following macros are defined for use as the FILE argument: - `char sysname[]' - This is the name of the operating system in use. + - Macro: char * _PATH_UTMP + This macro is used to specify the user accounting database. - `char release[]' - This is the current release level of the operating system - implementation. + - Macro: char * _PATH_WTMP + This macro is used to specify the user accounting log file. - `char version[]' - This is the current version level within the release of the - operating system. + The `utmpname' function returns a value of `0' if the new name was + successfully stored, and a value of `-1' to indicate an error. + Note that `utmpname' does not try to open the database, and that + therefore the return value does not say anything about whether the + database can be successfully opened. - `char machine[]' - This is a description of the type of hardware that is in use. + Specially for maintaining log-like databases the GNU C Library +provides the following function: - Some systems provide a mechanism to interrogate the kernel - directly for this information. On systems without such a - mechanism, the GNU C library fills in this field based on the - configuration name that was specified when building and - installing the library. + - Function: void updwtmp (const char *WTMP_FILE, const struct utmp + *UTMP) + The `updwtmp' function appends the entry *UTMP to the database + specified by WTMP_FILE. For possible values for the WTMP_FILE + argument see the `utmpname' function. - GNU uses a three-part name to describe a system - configuration; the three parts are CPU, MANUFACTURER and - SYSTEM-TYPE, and they are separated with dashes. Any - possible combination of three names is potentially - meaningful, but most such combinations are meaningless in - practice and even the meaningful ones are not necessarily - supported by any particular GNU program. + *Portability Note:* Although many operating systems provide a subset +of these functions, they are not standardized. There are often subtle +differences in the return types, and there are considerable differences +between the various definitions of `struct utmp'. When programming for +the GNU system, it is probably best to stick with the functions +described in this section. If however, you want your program to be +portable, consider using the XPG functions described in *Note XPG +Functions::, or take a look at the BSD compatible functions in *Note +Logging In and Out::. - Since the value in `machine' is supposed to describe just the - hardware, it consists of the first two parts of the - configuration name: `CPU-MANUFACTURER'. For example, it - might be one of these: + +File: libc.info, Node: XPG Functions, Next: Logging In and Out, Prev: Manipulating the Database, Up: User Accounting Database - `"sparc-sun"', `"i386-ANYTHING"', `"m68k-hp"', - `"m68k-sony"', `"m68k-sun"', `"mips-dec"' +XPG User Accounting Database Functions +-------------------------------------- - `char nodename[]' - This is the host name of this particular computer. In the - GNU C library, the value is the same as that returned by - `gethostname'; see *Note Host Identification::. + These functions, described in the X/Open Portability Guide, are +declared in the header file `utmpx.h'. - gethostname() is implemented with a call to uname(). + - Data Type: struct utmpx + The `utmpx' data structure contains at least the following members: - `char domainname[]' - This is the NIS or YP domain name. It is the same value - returned by `getdomainname'; see *Note Host Identification::. - This element is a relatively recent invention and use of it - is not as portable as use of the rest of the structure. + `short int ut_type' + Specifies the type of login; one of `EMPTY', `RUN_LVL', + `BOOT_TIME', `OLD_TIME', `NEW_TIME', `INIT_PROCESS', + `LOGIN_PROCESS', `USER_PROCESS' or `DEAD_PROCESS'. + `pid_t ut_pid' + The process ID number of the login process. - - Function: int uname (struct utsname *INFO) - The `uname' function fills in the structure pointed to by INFO - with information about the operating system and host machine. A - non-negative value indicates that the data was successfully stored. + `char ut_line[]' + The device name of the tty (without `/dev/'). - `-1' as the value indicates an error. The only error possible is - `EFAULT', which we normally don't mention as it is always a - possibility. + `char ut_id[]' + The inittab ID of the process. - -File: libc.info, Node: Filesystem Handling, Next: System Parameters, Prev: Platform Type, Up: System Management + `char ut_user[]' + The user's login name. -Controlling and Querying Mounts -=============================== + `struct timeval ut_tv' + Time the entry was made. For entries of type `OLD_TIME' this + is the time when the system clock changed, and for entries of + type `NEW_TIME' this is the time the system clock was set to. + On the GNU system, `struct utmpx' is identical to `struct utmp' + except for the fact that including `utmpx.h' does not make visible + the declaration of `struct exit_status'. - All files are in filesystems, and before you can access any file, its -filesystem must be mounted. Because of Unix's concept of _Everything -is a file_, mounting of filesystems is central to doing almost -anything. This section explains how to find out what filesystems are -currently mounted and what filesystems are available for mounting, and -how to change what is mounted. + The following macros are defined for use as values for the `ut_type' +member of the `utmpx' structure. The values are integer constants and +are, on the GNU system, identical to the definitions in `utmp.h'. - The classic filesystem is the contents of a disk drive. The concept -is considerably more abstract, though, and lots of things other than -disk drives can be mounted. +`EMPTY' + This macro is used to indicate that the entry contains no valid + user accounting information. - Some block devices don't correspond to traditional devices like disk -drives. For example, a loop device is a block device whose driver uses -a regular file in another filesystem as its medium. So if that regular -file contains appropriate data for a filesystem, you can by mounting the -loop device essentially mount a regular file. +`RUN_LVL' + This macro is used to identify the systems runlevel. - Some filesystems aren't based on a device of any kind. The "proc" -filesystem, for example, contains files whose data is made up by the -filesystem driver on the fly whenever you ask for it. And when you -write to it, the data you write causes changes in the system. No data -gets stored. +`BOOT_TIME' + This macro is used to identify the time of system boot. -* Menu: +`OLD_TIME' + This macro is used to identify the time when the system clock + changed. -* Mount Information:: What is or could be mounted? -* Mount-Unmount-Remount:: Controlling what is mounted and how +`NEW_TIME' + This macro is used to identify the time after the system changed. - -File: libc.info, Node: Mount Information, Next: Mount-Unmount-Remount, Up: Filesystem Handling +`INIT_PROCESS' + This macro is used to identify a process spawned by the init + process. -Mount Information ------------------ +`LOGIN_PROCESS' + This macro is used to identify the session leader of a logged in + user. - For some programs it is desirable and necessary to access information -about whether a certain filesystem is mounted and, if it is, where, or -simply to get lists of all the available filesystems. The GNU libc -provides some functions to retrieve this information portably. +`USER_PROCESS' + This macro is used to identify a user process. - Traditionally Unix systems have a file named `/etc/fstab' which -describes all possibly mounted filesystems. The `mount' program uses -this file to mount at startup time of the system all the necessary -filesystems. The information about all the filesystems actually mounted -is normally kept in a file named `/etc/mtab'. Both files share the -same syntax and it is crucial that this syntax is followed all the -time. Therefore it is best to never directly write the files. The -functions described in this section can do this and they also provide -the functionality to convert the external textual representation to the -internal representation. +`DEAD_PROCESS' + This macro is used to identify a terminated process. - Note that the `fstab' and `mtab' files are maintained on a system by -_convention_. It is possible for the files not to exist or not to be -consistent with what is really mounted or available to mount, if the -system's administration policy allows it. But programs that mount and -unmount filesystems typically maintain and use these files as described -herein. + The size of the `ut_line', `ut_id' and `ut_user' arrays can be found +using the `sizeof' operator. - The filenames given above should never be used directly. The -portable way to handle these file is to use the macros `_PATH_FSTAB', -defined in `fstab.h' and `_PATH_MNTTAB', defined in `mntent.h', -respectively. There are also two alternate macro names `FSTAB' and -`_PATH_MOUNTED' defined but both names are deprecated and kept only for -backward compatibility. The two former names should always be used. + - Function: void setutxent (void) + This function is similar to `setutent'. On the GNU system it is + simply an alias for `setutent'. -* Menu: + - Function: struct utmpx * getutxent (void) + The `getutxent' function is similar to `getutent', but returns a + pointer to a `struct utmpx' instead of `struct utmp'. On the GNU + system it simply is an alias for `getutent'. -* fstab:: The `fstab' file -* mtab:: The `mtab' file -* Other Mount Information:: Other (non-libc) sources of mount information + - Function: void endutxent (void) + This function is similar to `endutent'. On the GNU system it is + simply an alias for `endutent'. - -File: libc.info, Node: fstab, Next: mtab, Up: Mount Information + - Function: struct utmpx * getutxid (const struct utmpx *ID) + This function is similar to `getutid', but uses `struct utmpx' + instead of `struct utmp'. On the GNU system it is simply an alias + for `getutid'. -The `fstab' file -................ + - Function: struct utmpx * getutxline (const struct utmpx *LINE) + This function is similar to `getutid', but uses `struct utmpx' + instead of `struct utmp'. On the GNU system it is simply an alias + for `getutline'. - The internal representation for entries of the file is -`struct fstab', defined in `fstab.h'. + - Function: struct utmpx * pututxline (const struct utmpx *UTMP) + The `pututxline' function is functionally identical to + `pututline', but uses `struct utmpx' instead of `struct utmp'. On + the GNU system, `pututxline' is simply an alias for `pututline'. - - Data Type: struct fstab - This structure is used with the `getfsent', `getfsspec', and - `getfsfile' functions. + - Function: int utmpxname (const char *FILE) + The `utmpxname' function is functionally identical to `utmpname'. + On the GNU system, `utmpxname' is simply an alias for `utmpname'. - `char *fs_spec' - This element describes the device from which the filesystem - is mounted. Normally this is the name of a special device, - such as a hard disk partition, but it could also be a more or - less generic string. For "NFS" it would be a hostname and - directory name combination. + You can translate between a traditional `struct utmp' and an XPG +`struct utmpx' with the following functions. On the GNU system, these +functions are merely copies, since the two structures are identical. - Even though the element is not declared `const' it shouldn't - be modified. The missing `const' has historic reasons, since - this function predates ISO C. The same is true for the other - string elements of this structure. + - Function: int getutmp (const struct utmpx *utmpx, struct utmp *utmp) + `getutmp' copies the information, insofar as the structures are + compatible, from UTMPX to UTMP. - `char *fs_file' - This describes the mount point on the local system. I.e., - accessing any file in this filesystem has implicitly or - explicitly this string as a prefix. + - Function: int getutmpx (const struct utmp *utmp, struct utmpx *utmpx) + `getutmpx' copies the information, insofar as the structures are + compatible, from UTMP to UTMPX. - `char *fs_vfstype' - This is the type of the filesystem. Depending on what the - underlying kernel understands it can be any string. + +File: libc.info, Node: Logging In and Out, Prev: XPG Functions, Up: User Accounting Database - `char *fs_mntops' - This is a string containing options passed to the kernel with - the `mount' call. Again, this can be almost anything. There - can be more than one option, separated from the others by a - comma. Each option consists of a name and an optional value - part, introduced by an `=' character. +Logging In and Out +------------------ - If the value of this element must be processed it should - ideally be done using the `getsubopt' function; see *Note - Suboptions::. + These functions, derived from BSD, are available in the separate +`libutil' library, and declared in `utmp.h'. - `const char *fs_type' - This name is poorly chosen. This element points to a string - (possibly in the `fs_mntops' string) which describes the - modes with which the filesystem is mounted. `fstab' defines - five macros to describe the possible values: + Note that the `ut_user' member of `struct utmp' is called `ut_name' +in BSD. Therefore, `ut_name' is defined as an alias for `ut_user' in +`utmp.h'. - `FSTAB_RW' - The filesystems gets mounted with read and write enabled. + - Function: int login_tty (int FILEDES) + This function makes FILEDES the controlling terminal of the + current process, redirects standard input, standard output and + standard error output to this terminal, and closes FILEDES. - `FSTAB_RQ' - The filesystems gets mounted with read and write - enabled. Write access is restricted by quotas. + This function returns `0' on successful completion, and `-1' on + error. - `FSTAB_RO' - The filesystem gets mounted read-only. + - Function: void login (const struct utmp *ENTRY) + The `login' functions inserts an entry into the user accounting + database. The `ut_line' member is set to the name of the terminal + on standard input. If standard input is not a terminal `login' + uses standard output or standard error output to determine the + name of the terminal. If `struct utmp' has a `ut_type' member, + `login' sets it to `USER_PROCESS', and if there is an `ut_pid' + member, it will be set to the process ID of the current process. + The remaining entries are copied from ENTRY. - `FSTAB_SW' - This is not a real filesystem, it is a swap device. + A copy of the entry is written to the user accounting log file. - `FSTAB_XX' - This entry from the `fstab' file is totally ignored. + - Function: int logout (const char *UT_LINE) + This function modifies the user accounting database to indicate + that the user on UT_LINE has logged out. - Testing for equality with these value must happen using - `strcmp' since these are all strings. Comparing the pointer - will probably always fail. + The `logout' function returns `1' if the entry was successfully + written to the database, or `0' on error. - `int fs_freq' - This element describes the dump frequency in days. + - Function: void logwtmp (const char *UT_LINE, const char *UT_NAME, + const char *UT_HOST) + The `logwtmp' function appends an entry to the user accounting log + file, for the current time and the information provided in the + UT_LINE, UT_NAME and UT_HOST arguments. - `int fs_passno' - This element describes the pass number on parallel dumps. It - is closely related to the `dump' utility used on Unix systems. + *Portability Note:* The BSD `struct utmp' only has the `ut_line', +`ut_name', `ut_host' and `ut_time' members. Older systems do not even +have the `ut_host' member. - To read the entire content of the of the `fstab' file the GNU libc -contains a set of three functions which are designed in the usual way. + +File: libc.info, Node: User Database, Next: Group Database, Prev: User Accounting Database, Up: Users and Groups - - Function: int setfsent (void) - This function makes sure that the internal read pointer for the - `fstab' file is at the beginning of the file. This is done by - either opening the file or resetting the read pointer. +User Database +============= - Since the file handle is internal to the libc this function is not - thread-safe. + This section describes how to search and scan the database of +registered users. The database itself is kept in the file +`/etc/passwd' on most systems, but on some systems a special network +server gives access to it. - This function returns a non-zero value if the operation was - successful and the `getfs*' functions can be used to read the - entries of the file. +* Menu: - - Function: void endfsent (void) - This function makes sure that all resources acquired by a prior - call to `setfsent' (explicitly or implicitly by calling - `getfsent') are freed. +* User Data Structure:: What each user record contains. +* Lookup User:: How to look for a particular user. +* Scanning All Users:: Scanning the list of all users, one by one. +* Writing a User Entry:: How a program can rewrite a user's record. - - Function: struct fstab * getfsent (void) - This function returns the next entry of the `fstab' file. If this - is the first call to any of the functions handling `fstab' since - program start or the last call of `endfsent', the file will be - opened. + +File: libc.info, Node: User Data Structure, Next: Lookup User, Up: User Database - The function returns a pointer to a variable of type `struct - fstab'. This variable is shared by all threads and therefore this - function is not thread-safe. If an error occurred `getfsent' - returns a `NULL' pointer. +The Data Structure that Describes a User +---------------------------------------- - - Function: struct fstab * getfsspec (const char *NAME) - This function returns the next entry of the `fstab' file which has - a string equal to NAME pointed to by the `fs_spec' element. Since - there is normally exactly one entry for each special device it - makes no sense to call this function more than once for the same - argument. If this is the first call to any of the functions - handling `fstab' since program start or the last call of - `endfsent', the file will be opened. + The functions and data structures for accessing the system user +database are declared in the header file `pwd.h'. - The function returns a pointer to a variable of type `struct - fstab'. This variable is shared by all threads and therefore this - function is not thread-safe. If an error occurred `getfsent' - returns a `NULL' pointer. + - Data Type: struct passwd + The `passwd' data structure is used to hold information about + entries in the system user data base. It has at least the + following members: - - Function: struct fstab * getfsfile (const char *NAME) - This function returns the next entry of the `fstab' file which has - a string equal to NAME pointed to by the `fs_file' element. Since - there is normally exactly one entry for each mount point it makes - no sense to call this function more than once for the same - argument. If this is the first call to any of the functions - handling `fstab' since program start or the last call of - `endfsent', the file will be opened. + `char *pw_name' + The user's login name. - The function returns a pointer to a variable of type `struct - fstab'. This variable is shared by all threads and therefore this - function is not thread-safe. If an error occurred `getfsent' - returns a `NULL' pointer. + `char *pw_passwd.' + The encrypted password string. + + `uid_t pw_uid' + The user ID number. + + `gid_t pw_gid' + The user's default group ID number. + + `char *pw_gecos' + A string typically containing the user's real name, and + possibly other information such as a phone number. + + `char *pw_dir' + The user's home directory, or initial working directory. + This might be a null pointer, in which case the + interpretation is system-dependent. + + `char *pw_shell' + The user's default shell, or the initial program run when the + user logs in. This might be a null pointer, indicating that + the system default should be used. diff -durpN glibc-2.2.4/manual/libc.info-47 glibc-2.2.5/manual/libc.info-47 --- glibc-2.2.4/manual/libc.info-47 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-47 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1321 +33,1000 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: mtab, Next: Other Mount Information, Prev: fstab, Up: Mount Information - -The `mtab' file -............... - - The following functions and data structure access the `mtab' file. - - - Data Type: struct mntent - This structure is used with the `getmntent', `getmntent_t', - `addmntent', and `hasmntopt' functions. - - `char *mnt_fsname' - This element contains a pointer to a string describing the - name of the special device from which the filesystem is - mounted. It corresponds to the `fs_spec' element in `struct - fstab'. - - `char *mnt_dir' - This element points to a string describing the mount point of - the filesystem. It corresponds to the `fs_file' element in - `struct fstab'. - - `char *mnt_type' - `mnt_type' describes the filesystem type and is therefore - equivalent to `fs_vfstype' in `struct fstab'. `mntent.h' - defines a few symbolic names for some of the values this - string can have. But since the kernel can support arbitrary - filesystems it does not make much sense to give them symbolic - names. If one knows the symbol name one also knows the - filesystem name. Nevertheless here follows the list of the - symbols provided in `mntent.h'. - - `MNTTYPE_IGNORE' - This symbol expands to `"ignore"'. The value is - sometime used in `fstab' files to make sure entries are - not used without removing them. - - `MNTTYPE_NFS' - Expands to `"nfs"'. Using this macro sometimes could - make sense since it names the default NFS - implementation, in case both version 2 and 3 are - supported. - - `MNTTYPE_SWAP' - This symbol expands to `"swap"'. It names the special - `fstab' entry which names one of the possibly multiple - swap partitions. - - `char *mnt_opts' - The element contains a string describing the options used - while mounting the filesystem. As for the equivalent element - `fs_mntops' of `struct fstab' it is best to use the function - `getsubopt' (*note Suboptions::) to access the parts of this - string. - - The `mntent.h' file defines a number of macros with string - values which correspond to some of the options understood by - the kernel. There might be many more options which are - possible so it doesn't make much sense to rely on these - macros but to be consistent here is the list: - - `MNTOPT_DEFAULTS' - Expands to `"defaults"'. This option should be used - alone since it indicates all values for the customizable - values are chosen to be the default. - - `MNTOPT_RO' - Expands to `"ro"'. See the `FSTAB_RO' value, it means - the filesystem is mounted read-only. - - `MNTOPT_RW' - Expand to `"rw"'. See the `FSTAB_RW' value, it means the - filesystem is mounted with read and write permissions. - - `MNTOPT_SUID' - Expands to `"suid"'. This means that the SUID bit - (*note How Change Persona::) is respected when a program - from the filesystem is started. - - `MNTOPT_NOSUID' - Expands to `"nosuid"'. This is the opposite of - `MNTOPT_SUID', the SUID bit for all files from the - filesystem is ignored. - - `MNTOPT_NOAUTO' - Expands to `"noauto"'. At startup time the `mount' - program will ignore this entry if it is started with the - `-a' option to mount all filesystems mentioned in the - `fstab' file. - - As for the `FSTAB_*' entries introduced above it is important - to use `strcmp' to check for equality. - - `mnt_freq' - This elements corresponds to `fs_freq' and also specifies the - frequency in days in which dumps are made. - - `mnt_passno' - This element is equivalent to `fs_passno' with the same - meaning which is uninteresting for all programs beside `dump'. - - For accessing the `mtab' file there is again a set of three -functions to access all entries in a row. Unlike the functions to -handle `fstab' these functions do not access a fixed file and there is -even a thread safe variant of the get function. Beside this the GNU -libc contains functions to alter the file and test for specific options. - - - Function: FILE * setmntent (const char *FILE, const char *MODE) - The `setmntent' function prepares the file named FILE which must - be in the format of a `fstab' and `mtab' file for the upcoming - processing through the other functions of the family. The MODE - parameter can be chosen in the way the OPENTYPE parameter for - `fopen' (*note Opening Streams::) can be chosen. If the file is - opened for writing the file is also allowed to be empty. - - If the file was successfully opened `setmntent' returns a file - descriptor for future use. Otherwise the return value is `NULL' - and `errno' is set accordingly. - - - Function: int endmntent (FILE *STREAM) - This function takes for the STREAM parameter a file handle which - previously was returned from the `setmntent' call. `endmntent' - closes the stream and frees all resources. - - The return value is 1 unless an error occurred in which case it is - 0. - - - Function: struct mntent * getmntent (FILE *STREAM) - The `getmntent' function takes as the parameter a file handle - previously returned by successful call to `setmntent'. It returns - a pointer to a static variable of type `struct mntent' which is - filled with the information from the next entry from the file - currently read. - - The file format used prescribes the use of spaces or tab - characters to separate the fields. This makes it harder to use - name containing one of these characters (e.g., mount points using - spaces). Therefore these characters are encoded in the files and - the `getmntent' function takes care of the decoding while reading - the entries back in. `'\040'' is used to encode a space - character, `'\012'' to encode a tab character and `'\\'' to encode - a backslash. - - If there was an error or the end of the file is reached the return - value is `NULL'. - - This function is not thread-safe since all calls to this function - return a pointer to the same static variable. `getmntent_r' - should be used in situations where multiple threads access the - file. - - - Function: struct mntent * getmntent_r (FILE *STREAM, struct mentent - *RESULT, char *BUFFER, int BUFSIZE) - The `getmntent_r' function is the reentrant variant of - `getmntent'. It also returns the next entry from the file and - returns a pointer. The actual variable the values are stored in - is not static, though. Instead the function stores the values in - the variable pointed to by the RESULT parameter. Additional - information (e.g., the strings pointed to by the elements of the - result) are kept in the buffer of size BUFSIZE pointed to by - BUFFER. - - Escaped characters (space, tab, backslash) are converted back in - the same way as it happens for `getmentent'. - - The function returns a `NULL' pointer in error cases. Errors - could be: - * error while reading the file, - - * end of file reached, +File: libc.info, Node: Lookup User, Next: Scanning All Users, Prev: User Data Structure, Up: User Database - * BUFSIZE is too small for reading a complete new entry. +Looking Up One User +------------------- - - Function: int addmntent (FILE *STREAM, const struct mntent *MNT) - The `addmntent' function allows adding a new entry to the file - previously opened with `setmntent'. The new entries are always - appended. I.e., even if the position of the file descriptor is - not at the end of the file this function does not overwrite an - existing entry following the current position. + You can search the system user database for information about a +specific user using `getpwuid' or `getpwnam'. These functions are +declared in `pwd.h'. - The implication of this is that to remove an entry from a file one - has to create a new file while leaving out the entry to be removed - and after closing the file remove the old one and rename the new - file to the chosen name. + - Function: struct passwd * getpwuid (uid_t UID) + This function returns a pointer to a statically-allocated structure + containing information about the user whose user ID is UID. This + structure may be overwritten on subsequent calls to `getpwuid'. - This function takes care of spaces and tab characters in the names - to be written to the file. It converts them and the backslash - character into the format describe in the `getmntent' description - above. + A null pointer value indicates there is no user in the data base + with user ID UID. - This function returns 0 in case the operation was successful. - Otherwise the return value is 1 and `errno' is set appropriately. + - Function: int getpwuid_r (uid_t UID, struct passwd *RESULT_BUF, char + *BUFFER, size_t BUFLEN, struct passwd **RESULT) + This function is similar to `getpwuid' in that it returns + information about the user whose user ID is UID. However, it + fills the user supplied structure pointed to by RESULT_BUF with + the information instead of using a static buffer. The first + BUFLEN bytes of the additional buffer pointed to by BUFFER are + used to contain additional information, normally strings which are + pointed to by the elements of the result structure. - - Function: char * hasmntopt (const struct mntent *MNT, const char - *OPT) - This function can be used to check whether the string pointed to - by the `mnt_opts' element of the variable pointed to by MNT - contains the option OPT. If this is true a pointer to the - beginning of the option in the `mnt_opts' element is returned. If - no such option exists the function returns `NULL'. + If a user with ID UID is found, the pointer returned in RESULT + points to the record which contains the wanted data (i.e., RESULT + contains the value RESULT_BUF). If no user is found or if an + error occurred, the pointer returned in RESULT is a null pointer. + The function returns zero or an error code. If the buffer BUFFER + is too small to contain all the needed information, the error code + `ERANGE' is returned and ERRNO is set to `ERANGE'. - This function is useful to test whether a specific option is - present but when all options have to be processed one is better - off with using the `getsubopt' function to iterate over all - options in the string. + - Function: struct passwd * getpwnam (const char *NAME) + This function returns a pointer to a statically-allocated structure + containing information about the user whose user name is NAME. + This structure may be overwritten on subsequent calls to + `getpwnam'. - -File: libc.info, Node: Other Mount Information, Prev: mtab, Up: Mount Information + A null pointer return indicates there is no user named NAME. -Other (Non-libc) Sources of Mount Information -............................................. + - Function: int getpwnam_r (const char *NAME, struct passwd + *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd + **RESULT) + This function is similar to `getpwnam' in that is returns + information about the user whose user name is NAME. However, like + `getpwuid_r', it fills the user supplied buffers in RESULT_BUF and + BUFFER with the information instead of using a static buffer. - On a system with a Linux kernel and the `proc' filesystem, you can -get information on currently mounted filesystems from the file `mounts' -in the `proc' filesystem. Its format is similar to that of the `mtab' -file, but represents what is truly mounted without relying on -facilities outside the kernel to keep `mtab' up to date. + The return values are the same as for `getpwuid_r'.  -File: libc.info, Node: Mount-Unmount-Remount, Prev: Mount Information, Up: Filesystem Handling - -Mount, Unmount, Remount ------------------------ - - This section describes the functions for mounting, unmounting, and -remounting filesystems. - - Only the superuser can mount, unmount, or remount a filesystem. - - These functions do not access the `fstab' and `mtab' files. You -should maintain and use these separately. *Note Mount Information::. - - The symbols in this section are declared in `sys/mount.h'. - - - Function: int mount (const char *SPECIAL_FILE, const char *DIR, - const char *FSTYPE, unsigned long int OPTIONS, const void - *DATA) - `mount' mounts or remounts a filesystem. The two operations are - quite different and are merged rather unnaturally into this one - function. The `MS_REMOUNT' option, explained below, determines - whether `mount' mounts or remounts. - - For a mount, the filesystem on the block device represented by the - device special file named SPECIAL_FILE gets mounted over the mount - point DIR. This means that the directory DIR (along with any - files in it) is no longer visible; in its place (and still with - the name DIR) is the root directory of the filesystem on the - device. - - As an exception, if the filesystem type (see below) is one which - is not based on a device (e.g. "proc"), `mount' instantiates a - filesystem and mounts it over DIR and ignores SPECIAL_FILE. - - For a remount, DIR specifies the mount point where the filesystem - to be remounted is (and remains) mounted and SPECIAL_FILE is - ignored. Remounting a filesystem means changing the options that - control operations on the filesystem while it is mounted. It does - not mean unmounting and mounting again. - - For a mount, you must identify the type of the filesystem as - FSTYPE. This type tells the kernel how to access the filesystem - and can be thought of as the name of a filesystem driver. The - acceptable values are system dependent. On a system with a Linux - kernel and the `proc' filesystem, the list of possible values is - in the file `filesystems' in the `proc' filesystem (e.g. type `cat - /proc/filesystems' to see the list). With a Linux kernel, the - types of filesystems that `mount' can mount, and their type names, - depends on what filesystem drivers are configured into the kernel - or loaded as loadable kernel modules. An example of a common - value for FSTYPE is `ext2'. - - For a remount, `mount' ignores FSTYPE. - - OPTIONS specifies a variety of options that apply until the - filesystem is unmounted or remounted. The precise meaning of an - option depends on the filesystem and with some filesystems, an - option may have no effect at all. Furthermore, for some - filesystems, some of these options (but never `MS_RDONLY') can be - overridden for individual file accesses via `ioctl'. - - OPTIONS is a bit string with bit fields defined using the - following mask and masked value macros: - - `MS_MGC_MASK' - This multibit field contains a magic number. If it does not - have the value `MS_MGC_VAL', `mount' assumes all the - following bits are zero and the DATA argument is a null - string, regardless of their actual values. - - `MS_REMOUNT' - This bit on means to remount the filesystem. Off means to - mount it. - - `MS_RDONLY' - This bit on specifies that no writing to the filesystem shall - be allowed while it is mounted. This cannot be overridden by - `ioctl'. This option is available on nearly all filesystems. - - `S_IMMUTABLE' - This bit on specifies that no writing to the files in the - filesystem shall be allowed while it is mounted. This can be - overridden for a particular file access by a properly - privileged call to `ioctl'. This option is a relatively new - invention and is not available on many filesystems. - - `S_APPEND' - This bit on specifies that the only file writing that shall - be allowed while the filesystem is mounted is appending. - Some filesystems allow this to be overridden for a particular - process by a properly privileged call to `ioctl'. This is a - relatively new invention and is not available on many - filesystems. - - `MS_NOSUID' - This bit on specifies that Setuid and Setgid permissions on - files in the filesystem shall be ignored while it is mounted. - - `MS_NOEXEC' - This bit on specifies that no files in the filesystem shall - be executed while the filesystem is mounted. - - `MS_NODEV' - This bit on specifies that no device special files in the - filesystem shall be accessible while the filesystem is - mounted. - - `MS_SYNCHRONOUS' - This bit on specifies that all writes to the filesystem while - it is mounted shall be synchronous; i.e. data shall be synced - before each write completes rather than held in the buffer - cache. - - `MS_MANDLOCK' - This bit on specifies that mandatory locks on files shall be - permitted while the filesystem is mounted. - - `MS_NOATIME' - This bit on specifies that access times of files shall not be - updated when the files are accessed while the filesystem is - mounted. - - `MS_NODIRATIME' - This bit on specifies that access times of directories shall - not be updated when the directories are accessed while the - filesystem in mounted. - - Any bits not covered by the above masks should be set off; - otherwise, results are undefined. - - The meaning of DATA depends on the filesystem type and is - controlled entirely by the filesystem driver in the kernel. - - Example: +File: libc.info, Node: Scanning All Users, Next: Writing a User Entry, Prev: Lookup User, Up: User Database - #include - - mount("/dev/hdb", "/cdrom", MS_MGC_VAL | MS_RDONLY | MS_NOSUID, ""); - - mount("/dev/hda2", "/mnt", MS_MGC_VAL | MS_REMOUNT, ""); +Scanning the List of All Users +------------------------------ - Appropriate arguments for `mount' are conventionally recorded in - the `fstab' table. *Note Mount Information::. + This section explains how a program can read the list of all users in +the system, one user at a time. The functions described here are +declared in `pwd.h'. - The return value is zero if the mount or remount is successful. - Otherwise, it is `-1' and `errno' is set appropriately. The - values of `errno' are filesystem dependent, but here is a general - list: + You can use the `fgetpwent' function to read user entries from a +particular file. - `EPERM' - The process is not superuser. + - Function: struct passwd * fgetpwent (FILE *STREAM) + This function reads the next user entry from STREAM and returns a + pointer to the entry. The structure is statically allocated and is + rewritten on subsequent calls to `fgetpwent'. You must copy the + contents of the structure if you wish to save the information. - `ENODEV' - The file system type FSTYPE is not known to the kernel. + The stream must correspond to a file in the same format as the + standard password database file. - `ENOTBLK' - The file DEV is not a block device special file. + - Function: int fgetpwent_r (FILE *STREAM, struct passwd *RESULT_BUF, + char *BUFFER, size_t BUFLEN, struct passwd **RESULT) + This function is similar to `fgetpwent' in that it reads the next + user entry from STREAM. But the result is returned in the + structure pointed to by RESULT_BUF. The first BUFLEN bytes of the + additional buffer pointed to by BUFFER are used to contain + additional information, normally strings which are pointed to by + the elements of the result structure. - `EBUSY' - * The device is already mounted. + The stream must correspond to a file in the same format as the + standard password database file. - * The mount point is busy. (E.g. it is some process' - working directory or has a filesystem mounted on it - already). + If the function returns zero RESULT points to the structure with + the wanted data (normally this is in RESULT_BUF). If errors + occurred the return value is nonzero and RESULT contains a null + pointer. - * The request is to remount read-only, but there are files - open for write. + The way to scan all the entries in the user database is with +`setpwent', `getpwent', and `endpwent'. - `EINVAL' - * A remount was attempted, but there is no filesystem - mounted over the specified mount point. + - Function: void setpwent (void) + This function initializes a stream which `getpwent' and + `getpwent_r' use to read the user database. - * The supposed filesystem has an invalid superblock. + - Function: struct passwd * getpwent (void) + The `getpwent' function reads the next entry from the stream + initialized by `setpwent'. It returns a pointer to the entry. The + structure is statically allocated and is rewritten on subsequent + calls to `getpwent'. You must copy the contents of the structure + if you wish to save the information. + A null pointer is returned when no more entries are available. - `EACCES' - * The filesystem is inherently read-only (possibly due to - a switch on the device) and the process attempted to - mount it read/write (by setting the `MS_RDONLY' bit off). + - Function: int getpwent_r (struct passwd *RESULT_BUF, char *BUFFER, + int BUFLEN, struct passwd **RESULT) + This function is similar to `getpwent' in that it returns the next + entry from the stream initialized by `setpwent'. Like + `fgetpwent_r', it uses the user-supplied buffers in RESULT_BUF and + BUFFER to return the information requested. - * SPECIAL_FILE or DIR is not accessible due to file - permissions. + The return values are the same as for `fgetpwent_r'. - * SPECIAL_FILE is not accessible because it is in a - filesystem that is mounted with the `MS_NODEV' option. + - Function: void endpwent (void) + This function closes the internal stream used by `getpwent' or + `getpwent_r'. - `EM_FILE' - The table of dummy devices is full. `mount' needs to create a - dummy device (aka "unnamed" device) if the filesystem being - mounted is not one that uses a device. + +File: libc.info, Node: Writing a User Entry, Prev: Scanning All Users, Up: User Database +Writing a User Entry +-------------------- - - Function: int umount2 (const char *FILE, int FLAGS) - `umount2' unmounts a filesystem. + - Function: int putpwent (const struct passwd *P, FILE *STREAM) + This function writes the user entry `*P' to the stream STREAM, in + the format used for the standard user database file. The return + value is zero on success and nonzero on failure. - You can identify the filesystem to unmount either by the device - special file that contains the filesystem or by the mount point. - The effect is the same. Specify either as the string FILE. + This function exists for compatibility with SVID. We recommend + that you avoid using it, because it makes sense only on the + assumption that the `struct passwd' structure has no members + except the standard ones; on a system which merges the traditional + Unix data base with other extended information about users, adding + an entry using this function would inevitably leave out much of + the important information. - FLAGS contains the one-bit field identified by the following mask - macro: + The function `putpwent' is declared in `pwd.h'. - `MNT_FORCE' - This bit on means to force the unmounting even if the - filesystem is busy, by making it unbusy first. If the bit is - off and the filesystem is busy, `umount2' fails with `errno' - = `EBUSY'. Depending on the filesystem, this may override - all, some, or no busy conditions. + +File: libc.info, Node: Group Database, Next: Database Example, Prev: User Database, Up: Users and Groups - All other bits in FLAGS should be set to zero; otherwise, the - result is undefined. +Group Database +============== - Example: + This section describes how to search and scan the database of +registered groups. The database itself is kept in the file +`/etc/group' on most systems, but on some systems a special network +service provides access to it. - #include - - umount2("/mnt", MNT_FORCE); - - umount2("/dev/hdd1", 0); +* Menu: - After the filesystem is unmounted, the directory that was the - mount point is visible, as are any files in it. +* Group Data Structure:: What each group record contains. +* Lookup Group:: How to look for a particular group. +* Scanning All Groups:: Scanning the list of all groups. - As part of unmounting, `umount2' syncs the filesystem. + +File: libc.info, Node: Group Data Structure, Next: Lookup Group, Up: Group Database - If the unmounting is successful, the return value is zero. - Otherwise, it is `-1' and `errno' is set accordingly: +The Data Structure for a Group +------------------------------ - `EPERM' - The process is not superuser. + The functions and data structures for accessing the system group +database are declared in the header file `grp.h'. - `EBUSY' - The filesystem cannot be unmounted because it is busy. E.g. - it contains a directory that is some process's working - directory or a file that some process has open. With some - filesystems in some cases, you can avoid this failure with - the `MNT_FORCE' option. + - Data Type: struct group + The `group' structure is used to hold information about an entry in + the system group database. It has at least the following members: - `EINVAL' - FILE validly refers to a file, but that file is neither a - mount point nor a device special file of a currently mounted - filesystem. + `char *gr_name' + The name of the group. - This function is not available on all systems. + `gid_t gr_gid' + The group ID of the group. - - Function: int umount (const char *FILE) - `umount' does the same thing as `umount2' with FLAGS set to - zeroes. It is more widely available than `umount2' but since it - lacks the possibility to forcefully unmount a filesystem is - deprecated when `umount2' is also available. + `char **gr_mem' + A vector of pointers to the names of users in the group. + Each user name is a null-terminated string, and the vector + itself is terminated by a null pointer.  -File: libc.info, Node: System Parameters, Prev: Filesystem Handling, Up: System Management - -System Parameters -================= - - This section describes the `sysctl' function, which gets and sets a -variety of system parameters. - - The symbols used in this section are declared in the file `sysctl.h'. +File: libc.info, Node: Lookup Group, Next: Scanning All Groups, Prev: Group Data Structure, Up: Group Database - - Function: int sysctl (int *NAMES, int NLEN, void *OLDVAL, - size_t *OLDLENP, void *NEWVAL, size_t NEWLEN) +Looking Up One Group +-------------------- - `sysctl' gets or sets a specified system parameter. There are so - many of these parameters that it is not practical to list them all - here, but here are some examples: + You can search the group database for information about a specific +group using `getgrgid' or `getgrnam'. These functions are declared in +`grp.h'. - * network domain name + - Function: struct group * getgrgid (gid_t GID) + This function returns a pointer to a statically-allocated structure + containing information about the group whose group ID is GID. + This structure may be overwritten by subsequent calls to + `getgrgid'. - * paging parameters + A null pointer indicates there is no group with ID GID. - * network Address Resolution Protocol timeout time + - Function: int getgrgid_r (gid_t GID, struct group *RESULT_BUF, char + *BUFFER, size_t BUFLEN, struct group **RESULT) + This function is similar to `getgrgid' in that it returns + information about the group whose group ID is GID. However, it + fills the user supplied structure pointed to by RESULT_BUF with + the information instead of using a static buffer. The first + BUFLEN bytes of the additional buffer pointed to by BUFFER are + used to contain additional information, normally strings which are + pointed to by the elements of the result structure. - * maximum number of files that may be open + If a group with ID GID is found, the pointer returned in RESULT + points to the record which contains the wanted data (i.e., RESULT + contains the value RESULT_BUF). If no group is found or if an + error occurred, the pointer returned in RESULT is a null pointer. + The function returns zero or an error code. If the buffer BUFFER + is too small to contain all the needed information, the error code + `ERANGE' is returned and ERRNO is set to `ERANGE'. - * root filesystem device + - Function: struct group * getgrnam (const char *NAME) + This function returns a pointer to a statically-allocated structure + containing information about the group whose group name is NAME. + This structure may be overwritten by subsequent calls to + `getgrnam'. - * when kernel was built + A null pointer indicates there is no group named NAME. - The set of available parameters depends on the kernel - configuration and can change while the system is running, - particularly when you load and unload loadable kernel modules. + - Function: int getgrnam_r (const char *NAME, struct group + *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group + **RESULT) + This function is similar to `getgrnam' in that is returns + information about the group whose group name is NAME. Like + `getgrgid_r', it uses the user supplied buffers in RESULT_BUF and + BUFFER, not a static buffer. - The system parameters with which `syslog' is concerned are arranged - in a hierarchical structure like a hierarchical filesystem. To - identify a particular parameter, you specify a path through the - structure in a way analogous to specifying the pathname of a file. - Each component of the path is specified by an integer and each of - these integers has a macro defined for it by `sysctl.h'. NAMES is - the path, in the form of an array of integers. Each component of - the path is one element of the array, in order. NLEN is the - number of components in the path. + The return values are the same as for `getgrgid_r' `ERANGE'. - For example, the first component of the path for all the paging - parameters is the value `CTL_VM'. For the free page thresholds, - the second component of the path is `VM_FREEPG'. So to get the - free page threshold values, make NAMES an array containing the two - elements `CTL_VM' and `VM_FREEPG' and make NLEN = 2. + +File: libc.info, Node: Scanning All Groups, Prev: Lookup Group, Up: Group Database - The format of the value of a parameter depends on the parameter. - Sometimes it is an integer; sometimes it is an ASCII string; - sometimes it is an elaborate structure. In the case of the free - page thresholds used in the example above, the parameter value is - a structure containing several integers. +Scanning the List of All Groups +------------------------------- - In any case, you identify a place to return the parameter's value - with OLDVAL and specify the amount of storage available at that - location as *OLDLENP. *OLDLENP does double duty because it is - also the output location that contains the actual length of the - returned value. + This section explains how a program can read the list of all groups +in the system, one group at a time. The functions described here are +declared in `grp.h'. - If you don't want the parameter value returned, specify a null - pointer for OLDVAL. + You can use the `fgetgrent' function to read group entries from a +particular file. - To set the parameter, specify the address and length of the new - value as NEWVAL and NEWLEN. If you don't want to set the - parameter, specify a null pointer as NEWVAL. + - Function: struct group * fgetgrent (FILE *STREAM) + The `fgetgrent' function reads the next entry from STREAM. It + returns a pointer to the entry. The structure is statically + allocated and is overwritten on subsequent calls to `fgetgrent'. + You must copy the contents of the structure if you wish to save the + information. - If you get and set a parameter in the same `sysctl' call, the value - returned is the value of the parameter before it was set. + The stream must correspond to a file in the same format as the + standard group database file. - Each system parameter has a set of permissions similar to the - permissions for a file (including the permissions on directories - in its path) that determine whether you may get or set it. For - the purposes of these permissions, every parameter is considered - to be owned by the superuser and Group 0 so processes with that - effective uid or gid may have more access to system parameters. - Unlike with files, the superuser does not invariably have full - permission to all system parameters, because some of them are - designed not to be changed ever. + - Function: int fgetgrent_r (FILE *STREAM, struct group *RESULT_BUF, + char *BUFFER, size_t BUFLEN, struct group **RESULT) + This function is similar to `fgetgrent' in that it reads the next + user entry from STREAM. But the result is returned in the + structure pointed to by RESULT_BUF. The first BUFLEN bytes of the + additional buffer pointed to by BUFFER are used to contain + additional information, normally strings which are pointed to by + the elements of the result structure. - `sysctl' returns a zero return value if it succeeds. Otherwise, it - returns `-1' and sets `errno' appropriately. Besides the failures - that apply to all system calls, the following are the `errno' - codes for all possible failures: + This stream must correspond to a file in the same format as the + standard group database file. - `EPERM' - The process is not permitted to access one of the components - of the path of the system parameter or is not permitted to - access the system parameter itself in the way (read or write) - that it requested. + If the function returns zero RESULT points to the structure with + the wanted data (normally this is in RESULT_BUF). If errors + occurred the return value is non-zero and RESULT contains a null + pointer. - `ENOTDIR' - There is no system parameter corresponding to NAME. + The way to scan all the entries in the group database is with +`setgrent', `getgrent', and `endgrent'. - `EFAULT' - OLDVAL is not null, which means the process wanted to read - the parameter, but *OLDLENP is zero, so there is no place to - return it. + - Function: void setgrent (void) + This function initializes a stream for reading from the group data + base. You use this stream by calling `getgrent' or `getgrent_r'. - `EINVAL' - * The process attempted to set a system parameter to a - value that is not valid for that parameter. + - Function: struct group * getgrent (void) + The `getgrent' function reads the next entry from the stream + initialized by `setgrent'. It returns a pointer to the entry. The + structure is statically allocated and is overwritten on subsequent + calls to `getgrent'. You must copy the contents of the structure + if you wish to save the information. - * The space provided for the return of the system - parameter is not the right size for that parameter. + - Function: int getgrent_r (struct group *RESULT_BUF, char *BUFFER, + size_t BUFLEN, struct group **RESULT) + This function is similar to `getgrent' in that it returns the next + entry from the stream initialized by `setgrent'. Like + `fgetgrent_r', it places the result in user-supplied buffers + pointed to RESULT_BUF and BUFFER. - `ENOMEM' - This value may be returned instead of the more correct - `EINVAL' in some cases where the space provided for the - return of the system parameter is too small. + If the function returns zero RESULT contains a pointer to the data + (normally equal to RESULT_BUF). If errors occurred the return + value is non-zero and RESULT contains a null pointer. + - Function: void endgrent (void) + This function closes the internal stream used by `getgrent' or + `getgrent_r'. - If you have a Linux kernel with the `proc' filesystem, you can get -and set most of the same parameters by reading and writing to files in -the `sys' directory of the `proc' filesystem. In the `sys' directory, -the directory structure represents the hierarchical structure of the -parameters. E.g. you can display the free page thresholds with - cat /proc/sys/vm/freepages + +File: libc.info, Node: Database Example, Next: Netgroup Database, Prev: Group Database, Up: Users and Groups - Some more traditional and more widely available, though less general, -GNU C library functions for getting and setting some of the same system -parameters are: +User and Group Database Example +=============================== - * `getdomainname', `setdomainname' + Here is an example program showing the use of the system database +inquiry functions. The program prints some information about the user +running the program. - * `gethostname', `sethostname' (*Note Host Identification::.) + #include + #include + #include + #include + #include + + int + main (void) + { + uid_t me; + struct passwd *my_passwd; + struct group *my_group; + char **members; + + /* Get information about the user ID. */ + me = getuid (); + my_passwd = getpwuid (me); + if (!my_passwd) + { + printf ("Couldn't find out about user %d.\n", (int) me); + exit (EXIT_FAILURE); + } + + /* Print the information. */ + printf ("I am %s.\n", my_passwd->pw_gecos); + printf ("My login name is %s.\n", my_passwd->pw_name); + printf ("My uid is %d.\n", (int) (my_passwd->pw_uid)); + printf ("My home directory is %s.\n", my_passwd->pw_dir); + printf ("My default shell is %s.\n", my_passwd->pw_shell); + + /* Get information about the default group ID. */ + my_group = getgrgid (my_passwd->pw_gid); + if (!my_group) + { + printf ("Couldn't find out about group %d.\n", + (int) my_passwd->pw_gid); + exit (EXIT_FAILURE); + } + + /* Print the information. */ + printf ("My default group is %s (%d).\n", + my_group->gr_name, (int) (my_passwd->pw_gid)); + printf ("The members of this group are:\n"); + members = my_group->gr_mem; + while (*members) + { + printf (" %s\n", *(members)); + members++; + } + + return EXIT_SUCCESS; + } - * `uname' (*Note Platform Type::.) + Here is some output from this program: - * `bdflush' + I am Throckmorton Snurd. + My login name is snurd. + My uid is 31093. + My home directory is /home/fsg/snurd. + My default shell is /bin/sh. + My default group is guest (12). + The members of this group are: + friedman + tami  -File: libc.info, Node: System Configuration, Next: Cryptographic Functions, Prev: System Management, Up: Top - -System Configuration Parameters -******************************* +File: libc.info, Node: Netgroup Database, Prev: Database Example, Up: Users and Groups - The functions and macros listed in this chapter give information -about configuration parameters of the operating system--for example, -capacity limits, presence of optional POSIX features, and the default -path for executable files (*note String Parameters::). +Netgroup Database +================= * Menu: -* General Limits:: Constants and functions that describe - various process-related limits that have - one uniform value for any given machine. -* System Options:: Optional POSIX features. -* Version Supported:: Version numbers of POSIX.1 and POSIX.2. -* Sysconf:: Getting specific configuration values - of general limits and system options. -* Minimums:: Minimum values for general limits. - -* Limits for Files:: Size limitations that pertain to individual files. - These can vary between file systems - or even from file to file. -* Options for Files:: Optional features that some files may support. -* File Minimums:: Minimum values for file limits. -* Pathconf:: Getting the limit values for a particular file. - -* Utility Limits:: Capacity limits of some POSIX.2 utility programs. -* Utility Minimums:: Minimum allowable values of those limits. - -* String Parameters:: Getting the default search path. +* Netgroup Data:: Data in the Netgroup database and where + it comes from. +* Lookup Netgroup:: How to look for a particular netgroup. +* Netgroup Membership:: How to test for netgroup membership.  -File: libc.info, Node: General Limits, Next: System Options, Up: System Configuration - -General Capacity Limits -======================= - - The POSIX.1 and POSIX.2 standards specify a number of parameters that -describe capacity limitations of the system. These limits can be fixed -constants for a given operating system, or they can vary from machine to -machine. For example, some limit values may be configurable by the -system administrator, either at run time or by rebuilding the kernel, -and this should not require recompiling application programs. - - Each of the following limit parameters has a macro that is defined in -`limits.h' only if the system has a fixed, uniform limit for the -parameter in question. If the system allows different file systems or -files to have different limits, then the macro is undefined; use -`sysconf' to find out the limit that applies at a particular time on a -particular machine. *Note Sysconf::. - - Each of these parameters also has another macro, with a name starting -with `_POSIX', which gives the lowest value that the limit is allowed -to have on _any_ POSIX system. *Note Minimums::. - - - Macro: int ARG_MAX - If defined, the unvarying maximum combined length of the ARGV and - ENVIRON arguments that can be passed to the `exec' functions. - - - Macro: int CHILD_MAX - If defined, the unvarying maximum number of processes that can - exist with the same real user ID at any one time. In BSD and GNU, - this is controlled by the `RLIMIT_NPROC' resource limit; *note - Limits on Resources::. - - - Macro: int OPEN_MAX - If defined, the unvarying maximum number of files that a single - process can have open simultaneously. In BSD and GNU, this is - controlled by the `RLIMIT_NOFILE' resource limit; *note Limits on - Resources::. - - - Macro: int STREAM_MAX - If defined, the unvarying maximum number of streams that a single - process can have open simultaneously. *Note Opening Streams::. - - - Macro: int TZNAME_MAX - If defined, the unvarying maximum length of a time zone name. - *Note Time Zone Functions::. - - These limit macros are always defined in `limits.h'. - - - Macro: int NGROUPS_MAX - The maximum number of supplementary group IDs that one process can - have. +File: libc.info, Node: Netgroup Data, Next: Lookup Netgroup, Up: Netgroup Database - The value of this macro is actually a lower bound for the maximum. - That is, you can count on being able to have that many - supplementary group IDs, but a particular machine might let you - have even more. You can use `sysconf' to see whether a particular - machine will let you have more (*note Sysconf::). +Netgroup Data +------------- - - Macro: int SSIZE_MAX - The largest value that can fit in an object of type `ssize_t'. - Effectively, this is the limit on the number of bytes that can be - read or written in a single operation. + Sometimes it is useful to group users according to other criteria +(*note Group Database::). E.g., it is useful to associate a certain +group of users with a certain machine. On the other hand grouping of +host names is not supported so far. - This macro is defined in all POSIX systems because this limit is - never configurable. + In Sun Microsystems SunOS appeared a new kind of database, the +netgroup database. It allows grouping hosts, users, and domains +freely, giving them individual names. To be more concrete, a netgroup +is a list of triples consisting of a host name, a user name, and a +domain name where any of the entries can be a wildcard entry matching +all inputs. A last possibility is that names of other netgroups can +also be given in the list specifying a netgroup. So one can construct +arbitrary hierarchies without loops. - - Macro: int RE_DUP_MAX - The largest number of repetitions you are guaranteed is allowed in - the construct `\{MIN,MAX\}' in a regular expression. + Sun's implementation allows netgroups only for the `nis' or +`nisplus' service, *note Services in the NSS configuration::. The +implementation in the GNU C library has no such restriction. An entry +in either of the input services must have the following form: - The value of this macro is actually a lower bound for the maximum. - That is, you can count on being able to have that many - repetitions, but a particular machine might let you have even - more. You can use `sysconf' to see whether a particular machine - will let you have more (*note Sysconf::). And even the value that - `sysconf' tells you is just a lower bound--larger values might - work. + GROUPNAME ( GROUPNAME | `('HOSTNAME`,'USERNAME`,'`domainname'`)' )+ - This macro is defined in all POSIX.2 systems, because POSIX.2 says - it should always be defined even if there is no specific imposed - limit. + Any of the fields in the triple can be empty which means anything +matches. While describing the functions we will see that the opposite +case is useful as well. I.e., there may be entries which will not +match any input. For entries like this, a name consisting of the single +character `-' shall be used.  -File: libc.info, Node: System Options, Next: Version Supported, Prev: General Limits, Up: System Configuration +File: libc.info, Node: Lookup Netgroup, Next: Netgroup Membership, Prev: Netgroup Data, Up: Netgroup Database -Overall System Options -====================== +Looking up one Netgroup +----------------------- - POSIX defines certain system-specific options that not all POSIX -systems support. Since these options are provided in the kernel, not -in the library, simply using the GNU C library does not guarantee any -of these features is supported; it depends on the system you are using. + The lookup functions for netgroups are a bit different to all other +system database handling functions. Since a single netgroup can contain +many entries a two-step process is needed. First a single netgroup is +selected and then one can iterate over all entries in this netgroup. +These functions are declared in `netdb.h'. - You can test for the availability of a given option using the macros -in this section, together with the function `sysconf'. The macros are -defined only if you include `unistd.h'. + - Function: int setnetgrent (const char *NETGROUP) + A call to this function initializes the internal state of the + library to allow following calls of the `getnetgrent' to iterate + over all entries in the netgroup with name NETGROUP. - For the following macros, if the macro is defined in `unistd.h', -then the option is supported. Otherwise, the option may or may not be -supported; use `sysconf' to find out. *Note Sysconf::. + When the call is successful (i.e., when a netgroup with this name + exists) the return value is `1'. When the return value is `0' no + netgroup of this name is known or some other error occurred. - - Macro: int _POSIX_JOB_CONTROL - If this symbol is defined, it indicates that the system supports - job control. Otherwise, the implementation behaves as if all - processes within a session belong to a single process group. - *Note Job Control::. + It is important to remember that there is only one single state for +iterating the netgroups. Even if the programmer uses the +`getnetgrent_r' function the result is not really reentrant since +always only one single netgroup at a time can be processed. If the +program needs to process more than one netgroup simultaneously she must +protect this by using external locking. This problem was introduced in +the original netgroups implementation in SunOS and since we must stay +compatible it is not possible to change this. - - Macro: int _POSIX_SAVED_IDS - If this symbol is defined, it indicates that the system remembers - the effective user and group IDs of a process before it executes an - executable file with the set-user-ID or set-group-ID bits set, and - that explicitly changing the effective user or group IDs back to - these values is permitted. If this option is not defined, then if - a nonprivileged process changes its effective user or group ID to - the real user or group ID of the process, it can't change it back - again. *Note Enable/Disable Setuid::. + Some other functions also use the netgroups state. Currently these +are the `innetgr' function and parts of the implementation of the +`compat' service part of the NSS implementation. - For the following macros, if the macro is defined in `unistd.h', -then its value indicates whether the option is supported. A value of -`-1' means no, and any other value means yes. If the macro is not -defined, then the option may or may not be supported; use `sysconf' to -find out. *Note Sysconf::. + - Function: int getnetgrent (char **HOSTP, char **USERP, char + **DOMAINP) + This function returns the next unprocessed entry of the currently + selected netgroup. The string pointers, in which addresses are + passed in the arguments HOSTP, USERP, and DOMAINP, will contain + after a successful call pointers to appropriate strings. If the + string in the next entry is empty the pointer has the value `NULL'. + The returned string pointers are only valid if none of the netgroup + related functions are called. - - Macro: int _POSIX2_C_DEV - If this symbol is defined, it indicates that the system has the - POSIX.2 C compiler command, `c89'. The GNU C library always - defines this as `1', on the assumption that you would not have - installed it if you didn't have a C compiler. + The return value is `1' if the next entry was successfully read. A + value of `0' means no further entries exist or internal errors + occurred. - - Macro: int _POSIX2_FORT_DEV - If this symbol is defined, it indicates that the system has the - POSIX.2 Fortran compiler command, `fort77'. The GNU C library - never defines this, because we don't know what the system has. + - Function: int getnetgrent_r (char **HOSTP, char **USERP, char + **DOMAINP, char *BUFFER, int BUFLEN) + This function is similar to `getnetgrent' with only one exception: + the strings the three string pointers HOSTP, USERP, and DOMAINP + point to, are placed in the buffer of BUFLEN bytes starting at + BUFFER. This means the returned values are valid even after other + netgroup related functions are called. - - Macro: int _POSIX2_FORT_RUN - If this symbol is defined, it indicates that the system has the - POSIX.2 `asa' command to interpret Fortran carriage control. The - GNU C library never defines this, because we don't know what the - system has. + The return value is `1' if the next entry was successfully read and + the buffer contains enough room to place the strings in it. `0' is + returned in case no more entries are found, the buffer is too + small, or internal errors occurred. - - Macro: int _POSIX2_LOCALEDEF - If this symbol is defined, it indicates that the system has the - POSIX.2 `localedef' command. The GNU C library never defines - this, because we don't know what the system has. + This function is a GNU extension. The original implementation in + the SunOS libc does not provide this function. - - Macro: int _POSIX2_SW_DEV - If this symbol is defined, it indicates that the system has the - POSIX.2 commands `ar', `make', and `strip'. The GNU C library - always defines this as `1', on the assumption that you had to have - `ar' and `make' to install the library, and it's unlikely that - `strip' would be absent when those are present. + - Function: void endnetgrent (void) + This function frees all buffers which were allocated to process + the last selected netgroup. As a result all string pointers + returned by calls to `getnetgrent' are invalid afterwards.  -File: libc.info, Node: Version Supported, Next: Sysconf, Prev: System Options, Up: System Configuration - -Which Version of POSIX is Supported -=================================== +File: libc.info, Node: Netgroup Membership, Prev: Lookup Netgroup, Up: Netgroup Database - - Macro: long int _POSIX_VERSION - This constant represents the version of the POSIX.1 standard to - which the implementation conforms. For an implementation - conforming to the 1995 POSIX.1 standard, the value is the integer - `199506L'. +Testing for Netgroup Membership +------------------------------- - `_POSIX_VERSION' is always defined (in `unistd.h') in any POSIX - system. + It is often not necessary to scan the whole netgroup since often the +only interesting question is whether a given entry is part of the +selected netgroup. - *Usage Note:* Don't try to test whether the system supports POSIX - by including `unistd.h' and then checking whether `_POSIX_VERSION' - is defined. On a non-POSIX system, this will probably fail - because there is no `unistd.h'. We do not know of _any_ way you - can reliably test at compilation time whether your target system - supports POSIX or whether `unistd.h' exists. + - Function: int innetgr (const char *NETGROUP, const char *HOST, const + char *USER, const char *DOMAIN) + This function tests whether the triple specified by the parameters + HOSTP, USERP, and DOMAINP is part of the netgroup NETGROUP. Using + this function has the advantage that - The GNU C compiler predefines the symbol `__POSIX__' if the target - system is a POSIX system. Provided you do not use any other - compilers on POSIX systems, testing `defined (__POSIX__)' will - reliably detect such systems. + 1. no other netgroup function can use the global netgroup state + since internal locking is used and - - Macro: long int _POSIX2_C_VERSION - This constant represents the version of the POSIX.2 standard which - the library and system kernel support. We don't know what value - this will be for the first version of the POSIX.2 standard, - because the value is based on the year and month in which the - standard is officially adopted. + 2. the function is implemented more efficiently than successive + calls to the other `set'/`get'/`endnetgrent' functions. - The value of this symbol says nothing about the utilities - installed on the system. + Any of the pointers HOSTP, USERP, and DOMAINP can be `NULL' which + means any value is accepted in this position. This is also true + for the name `-' which should not match any other string otherwise. - *Usage Note:* You can use this macro to tell whether a POSIX.1 - system library supports POSIX.2 as well. Any POSIX.1 system - contains `unistd.h', so include that file and then test `defined - (_POSIX2_C_VERSION)'. + The return value is `1' if an entry matching the given triple is + found in the netgroup. The return value is `0' if the netgroup + itself is not found, the netgroup does not contain the triple or + internal errors occurred.  -File: libc.info, Node: Sysconf, Next: Minimums, Prev: Version Supported, Up: System Configuration +File: libc.info, Node: System Management, Next: System Configuration, Prev: Users and Groups, Up: Top -Using `sysconf' -=============== +System Management +***************** - When your system has configurable system limits, you can use the -`sysconf' function to find out the value that applies to any particular -machine. The function and the associated PARAMETER constants are -declared in the header file `unistd.h'. + This chapter describes facilities for controlling the system that +underlies a process (including the operating system and hardware) and +for getting information about it. Anyone can generally use the +informational facilities, but usually only a properly privileged process +can make changes. * Menu: -* Sysconf Definition:: Detailed specifications of `sysconf'. -* Constants for Sysconf:: The list of parameters `sysconf' can read. -* Examples of Sysconf:: How to use `sysconf' and the parameter - macros properly together. - - -File: libc.info, Node: Sysconf Definition, Next: Constants for Sysconf, Up: Sysconf - -Definition of `sysconf' ------------------------ - - - Function: long int sysconf (int PARAMETER) - This function is used to inquire about runtime system parameters. - The PARAMETER argument should be one of the `_SC_' symbols listed - below. - - The normal return value from `sysconf' is the value you requested. - A value of `-1' is returned both if the implementation does not - impose a limit, and in case of an error. - - The following `errno' error conditions are defined for this - function: +* Host Identification:: Determining the name of the machine. +* Platform Type:: Determining operating system and basic + machine type +* Filesystem Handling:: Controlling/querying mounts +* System Parameters:: Getting and setting various system parameters - `EINVAL' - The value of the PARAMETER is invalid. + To get information on parameters of the system that are built into +the system, such as the maximum length of a filename, *Note System +Configuration::.  -File: libc.info, Node: Constants for Sysconf, Next: Examples of Sysconf, Prev: Sysconf Definition, Up: Sysconf - -Constants for `sysconf' Parameters ----------------------------------- - - Here are the symbolic constants for use as the PARAMETER argument to -`sysconf'. The values are all integer constants (more specifically, -enumeration type values). - -`_SC_ARG_MAX' - Inquire about the parameter corresponding to `ARG_MAX'. - -`_SC_CHILD_MAX' - Inquire about the parameter corresponding to `CHILD_MAX'. - -`_SC_OPEN_MAX' - Inquire about the parameter corresponding to `OPEN_MAX'. - -`_SC_STREAM_MAX' - Inquire about the parameter corresponding to `STREAM_MAX'. - -`_SC_TZNAME_MAX' - Inquire about the parameter corresponding to `TZNAME_MAX'. - -`_SC_NGROUPS_MAX' - Inquire about the parameter corresponding to `NGROUPS_MAX'. - -`_SC_JOB_CONTROL' - Inquire about the parameter corresponding to `_POSIX_JOB_CONTROL'. - -`_SC_SAVED_IDS' - Inquire about the parameter corresponding to `_POSIX_SAVED_IDS'. - -`_SC_VERSION' - Inquire about the parameter corresponding to `_POSIX_VERSION'. - -`_SC_CLK_TCK' - Inquire about the parameter corresponding to `CLOCKS_PER_SEC'; - *note CPU Time::. - -`_SC_CHARCLASS_NAME_MAX' - Inquire about the parameter corresponding to maximal length - allowed for a character class name in an extended locale - specification. These extensions are not yet standardized and so - this option is not standardized as well. - -`_SC_REALTIME_SIGNALS' - Inquire about the parameter corresponding to - `_POSIX_REALTIME_SIGNALS'. - -`_SC_PRIORITY_SCHEDULING' - Inquire about the parameter corresponding to - `_POSIX_PRIORITY_SCHEDULING'. - -`_SC_TIMERS' - Inquire about the parameter corresponding to `_POSIX_TIMERS'. - -`_SC_ASYNCHRONOUS_IO' - Inquire about the parameter corresponding to - `_POSIX_ASYNCHRONOUS_IO'. - -`_SC_PRIORITIZED_IO' - Inquire about the parameter corresponding to - `_POSIX_PRIORITIZED_IO'. - -`_SC_SYNCHRONIZED_IO' - Inquire about the parameter corresponding to - `_POSIX_SYNCHRONIZED_IO'. - -`_SC_FSYNC' - Inquire about the parameter corresponding to `_POSIX_FSYNC'. +File: libc.info, Node: Host Identification, Next: Platform Type, Up: System Management -`_SC_MAPPED_FILES' - Inquire about the parameter corresponding to `_POSIX_MAPPED_FILES'. +Host Identification +=================== -`_SC_MEMLOCK' - Inquire about the parameter corresponding to `_POSIX_MEMLOCK'. + This section explains how to identify the particular system on which +your program is running. First, let's review the various ways computer +systems are named, which is a little complicated because of the history +of the development of the Internet. -`_SC_MEMLOCK_RANGE' - Inquire about the parameter corresponding to - `_POSIX_MEMLOCK_RANGE'. + Every Unix system (also known as a host) has a host name, whether +it's connected to a network or not. In its simplest form, as used +before computer networks were an issue, it's just a word like `chicken'. -`_SC_MEMORY_PROTECTION' - Inquire about the parameter corresponding to - `_POSIX_MEMORY_PROTECTION'. + But any system attached to the Internet or any network like it +conforms to a more rigorous naming convention as part of the Domain +Name System (DNS). In DNS, every host name is composed of two parts: -`_SC_MESSAGE_PASSING' - Inquire about the parameter corresponding to - `_POSIX_MESSAGE_PASSING'. + 1. hostname -`_SC_SEMAPHORES' - Inquire about the parameter corresponding to `_POSIX_SEMAPHORES'. + 2. domain name -`_SC_SHARED_MEMORY_OBJECTS' - Inquire about the parameter corresponding to - `_POSIX_SHARED_MEMORY_OBJECTS'. + You will note that "hostname" looks a lot like "host name", but is +not the same thing, and that people often incorrectly refer to entire +host names as "domain names." -`_SC_AIO_LISTIO_MAX' - Inquire about the parameter corresponding to - `_POSIX_AIO_LISTIO_MAX'. + In DNS, the full host name is properly called the FQDN (Fully +Qualified Domain Name) and consists of the hostname, then a period, +then the domain name. The domain name itself usually has multiple +components separated by periods. So for example, a system's hostname +may be `chicken' and its domain name might be `ai.mit.edu', so its FQDN +(which is its host name) is `chicken.ai.mit.edu'. -`_SC_AIO_MAX' - Inquire about the parameter corresponding to `_POSIX_AIO_MAX'. + Adding to the confusion, though, is that DNS is not the only name +space in which a computer needs to be known. Another name space is the +NIS (aka YP) name space. For NIS purposes, there is another domain +name, which is called the NIS domain name or the YP domain name. It +need not have anything to do with the DNS domain name. -`_SC_AIO_PRIO_DELTA_MAX' - Inquire the value by which a process can decrease its asynchronous - I/O priority level from its own scheduling priority. This - corresponds to the run-time invariant value `AIO_PRIO_DELTA_MAX'. + Confusing things even more is the fact that in DNS, it is possible +for multiple FQDNs to refer to the same system. However, there is +always exactly one of them that is the true host name, and it is called +the canonical FQDN. -`_SC_DELAYTIMER_MAX' - Inquire about the parameter corresponding to - `_POSIX_DELAYTIMER_MAX'. + In some contexts, the host name is called a "node name." -`_SC_MQ_OPEN_MAX' - Inquire about the parameter corresponding to `_POSIX_MQ_OPEN_MAX'. + For more information on DNS host naming, *Note Host Names::. -`_SC_MQ_PRIO_MAX' - Inquire about the parameter corresponding to `_POSIX_MQ_PRIO_MAX'. + Prototypes for these functions appear in `unistd.h'. -`_SC_RTSIG_MAX' - Inquire about the parameter corresponding to `_POSIX_RTSIG_MAX'. + The programs `hostname', `hostid', and `domainname' work by calling +these functions. -`_SC_SEM_NSEMS_MAX' - Inquire about the parameter corresponding to - `_POSIX_SEM_NSEMS_MAX'. + - Function: int gethostname (char *NAME, size_t SIZE) + This function returns the host name of the system on which it is + called, in the array NAME. The SIZE argument specifies the size of + this array, in bytes. Note that this is _not_ the DNS hostname. + If the system participates in DNS, this is the FQDN (see above). -`_SC_SEM_VALUE_MAX' - Inquire about the parameter corresponding to - `_POSIX_SEM_VALUE_MAX'. + The return value is `0' on success and `-1' on failure. In the + GNU C library, `gethostname' fails if SIZE is not large enough; + then you can try again with a larger array. The following `errno' + error condition is defined for this function: -`_SC_SIGQUEUE_MAX' - Inquire about the parameter corresponding to `_POSIX_SIGQUEUE_MAX'. + `ENAMETOOLONG' + The SIZE argument is less than the size of the host name plus + one. -`_SC_TIMER_MAX' - Inquire about the parameter corresponding to `_POSIX_TIMER_MAX'. + On some systems, there is a symbol for the maximum possible host + name length: `MAXHOSTNAMELEN'. It is defined in `sys/param.h'. + But you can't count on this to exist, so it is cleaner to handle + failure and try again. -`_SC_PII' - Inquire about the parameter corresponding to `_POSIX_PII'. + `gethostname' stores the beginning of the host name in NAME even + if the host name won't entirely fit. For some purposes, a + truncated host name is good enough. If it is, you can ignore the + error code. -`_SC_PII_XTI' - Inquire about the parameter corresponding to `_POSIX_PII_XTI'. + - Function: int sethostname (const char *NAME, size_t LENGTH) + The `sethostname' function sets the host name of the system that + calls it to NAME, a string with length LENGTH. Only privileged + processes are permitted to do this. -`_SC_PII_SOCKET' - Inquire about the parameter corresponding to `_POSIX_PII_SOCKET'. + Usually `sethostname' gets called just once, at system boot time. + Often, the program that calls it sets it to the value it finds in + the file `/etc/hostname'. -`_SC_PII_INTERNET' - Inquire about the parameter corresponding to `_POSIX_PII_INTERNET'. + Be sure to set the host name to the full host name, not just the + DNS hostname (see above). -`_SC_PII_OSI' - Inquire about the parameter corresponding to `_POSIX_PII_OSI'. + The return value is `0' on success and `-1' on failure. The + following `errno' error condition is defined for this function: -`_SC_SELECT' - Inquire about the parameter corresponding to `_POSIX_SELECT'. + `EPERM' + This process cannot set the host name because it is not + privileged. -`_SC_UIO_MAXIOV' - Inquire about the parameter corresponding to `_POSIX_UIO_MAXIOV'. + - Function: int getdomainnname (char *NAME, size_t LENGTH) + `getdomainname' returns the NIS (aka YP) domain name of the system + on which it is called. Note that this is not the more popular DNS + domain name. Get that with `gethostname'. -`_SC_PII_INTERNET_STREAM' - Inquire about the parameter corresponding to - `_POSIX_PII_INTERNET_STREAM'. + The specifics of this function are analogous to `gethostname', + above. -`_SC_PII_INTERNET_DGRAM' - Inquire about the parameter corresponding to - `_POSIX_PII_INTERNET_DGRAM'. -`_SC_PII_OSI_COTS' - Inquire about the parameter corresponding to `_POSIX_PII_OSI_COTS'. + - Function: int setdomainname (const char *NAME, size_t LENGTH) + `getdomainname' sets the NIS (aka YP) domain name of the system on + which it is called. Note that this is not the more popular DNS + domain name. Set that with `sethostname'. -`_SC_PII_OSI_CLTS' - Inquire about the parameter corresponding to `_POSIX_PII_OSI_CLTS'. + The specifics of this function are analogous to `sethostname', + above. -`_SC_PII_OSI_M' - Inquire about the parameter corresponding to `_POSIX_PII_OSI_M'. -`_SC_T_IOV_MAX' - Inquire the value of the value associated with the `T_IOV_MAX' - variable. + - Function: long int gethostid (void) + This function returns the "host ID" of the machine the program is + running on. By convention, this is usually the primary Internet + IP address of that machine, converted to a `long int'. However, + on some systems it is a meaningless but unique number which is + hard-coded for each machine. -`_SC_THREADS' - Inquire about the parameter corresponding to `_POSIX_THREADS'. + This is not widely used. It arose in BSD 4.2, but was dropped in + BSD 4.4. It is not required by POSIX. -`_SC_THREAD_SAFE_FUNCTIONS' - Inquire about the parameter corresponding to - `_POSIX_THREAD_SAFE_FUNCTIONS'. + The proper way to query the IP address is to use `gethostbyname' + on the results of `gethostname'. For more information on IP + addresses, *Note Host Addresses::. -`_SC_GETGR_R_SIZE_MAX' - Inquire about the parameter corresponding to - `_POSIX_GETGR_R_SIZE_MAX'. + - Function: int sethostid (long int ID) + The `sethostid' function sets the "host ID" of the host machine to + ID. Only privileged processes are permitted to do this. Usually + it happens just once, at system boot time. -`_SC_GETPW_R_SIZE_MAX' - Inquire about the parameter corresponding to - `_POSIX_GETPW_R_SIZE_MAX'. + The proper way to establish the primary IP address of a system is + to configure the IP address resolver to associate that IP address + with the system's host name as returned by `gethostname'. For + example, put a record for the system in `/etc/hosts'. -`_SC_LOGIN_NAME_MAX' - Inquire about the parameter corresponding to - `_POSIX_LOGIN_NAME_MAX'. + See `gethostid' above for more information on host ids. -`_SC_TTY_NAME_MAX' - Inquire about the parameter corresponding to `_POSIX_TTY_NAME_MAX'. + The return value is `0' on success and `-1' on failure. The + following `errno' error conditions are defined for this function: -`_SC_THREAD_DESTRUCTOR_ITERATIONS' - Inquire about the parameter corresponding to - `_POSIX_THREAD_DESTRUCTOR_ITERATIONS'. + `EPERM' + This process cannot set the host name because it is not + privileged. -`_SC_THREAD_KEYS_MAX' - Inquire about the parameter corresponding to - `_POSIX_THREAD_KEYS_MAX'. + `ENOSYS' + The operating system does not support setting the host ID. + On some systems, the host ID is a meaningless but unique + number hard-coded for each machine. -`_SC_THREAD_STACK_MIN' - Inquire about the parameter corresponding to - `_POSIX_THREAD_STACK_MIN'. + +File: libc.info, Node: Platform Type, Next: Filesystem Handling, Prev: Host Identification, Up: System Management -`_SC_THREAD_THREADS_MAX' - Inquire about the parameter corresponding to - `_POSIX_THREAD_THREADS_MAX'. +Platform Type Identification +============================ -`_SC_THREAD_ATTR_STACKADDR' - Inquire about the parameter corresponding to - a `_POSIX_THREAD_ATTR_STACKADDR'. + You can use the `uname' function to find out some information about +the type of computer your program is running on. This function and the +associated data type are declared in the header file `sys/utsname.h'. -`_SC_THREAD_ATTR_STACKSIZE' - Inquire about the parameter corresponding to - `_POSIX_THREAD_ATTR_STACKSIZE'. + As a bonus, `uname' also gives some information identifying the +particular system your program is running on. This is the same +information which you can get with functions targetted to this purpose +described in *Note Host Identification::. -`_SC_THREAD_PRIORITY_SCHEDULING' - Inquire about the parameter corresponding to - `_POSIX_THREAD_PRIORITY_SCHEDULING'. + - Data Type: struct utsname + The `utsname' structure is used to hold information returned by + the `uname' function. It has the following members: -`_SC_THREAD_PRIO_INHERIT' - Inquire about the parameter corresponding to - `_POSIX_THREAD_PRIO_INHERIT'. + `char sysname[]' + This is the name of the operating system in use. -`_SC_THREAD_PRIO_PROTECT' - Inquire about the parameter corresponding to - `_POSIX_THREAD_PRIO_PROTECT'. + `char release[]' + This is the current release level of the operating system + implementation. -`_SC_THREAD_PROCESS_SHARED' - Inquire about the parameter corresponding to - `_POSIX_THREAD_PROCESS_SHARED'. + `char version[]' + This is the current version level within the release of the + operating system. -`_SC_2_C_DEV' - Inquire about whether the system has the POSIX.2 C compiler - command, `c89'. + `char machine[]' + This is a description of the type of hardware that is in use. -`_SC_2_FORT_DEV' - Inquire about whether the system has the POSIX.2 Fortran compiler - command, `fort77'. + Some systems provide a mechanism to interrogate the kernel + directly for this information. On systems without such a + mechanism, the GNU C library fills in this field based on the + configuration name that was specified when building and + installing the library. -`_SC_2_FORT_RUN' - Inquire about whether the system has the POSIX.2 `asa' command to - interpret Fortran carriage control. + GNU uses a three-part name to describe a system + configuration; the three parts are CPU, MANUFACTURER and + SYSTEM-TYPE, and they are separated with dashes. Any + possible combination of three names is potentially + meaningful, but most such combinations are meaningless in + practice and even the meaningful ones are not necessarily + supported by any particular GNU program. -`_SC_2_LOCALEDEF' - Inquire about whether the system has the POSIX.2 `localedef' - command. + Since the value in `machine' is supposed to describe just the + hardware, it consists of the first two parts of the + configuration name: `CPU-MANUFACTURER'. For example, it + might be one of these: -`_SC_2_SW_DEV' - Inquire about whether the system has the POSIX.2 commands `ar', - `make', and `strip'. + `"sparc-sun"', `"i386-ANYTHING"', `"m68k-hp"', + `"m68k-sony"', `"m68k-sun"', `"mips-dec"' -`_SC_BC_BASE_MAX' - Inquire about the maximum value of `obase' in the `bc' utility. + `char nodename[]' + This is the host name of this particular computer. In the + GNU C library, the value is the same as that returned by + `gethostname'; see *Note Host Identification::. -`_SC_BC_DIM_MAX' - Inquire about the maximum size of an array in the `bc' utility. + gethostname() is implemented with a call to uname(). -`_SC_BC_SCALE_MAX' - Inquire about the maximum value of `scale' in the `bc' utility. + `char domainname[]' + This is the NIS or YP domain name. It is the same value + returned by `getdomainname'; see *Note Host Identification::. + This element is a relatively recent invention and use of it + is not as portable as use of the rest of the structure. -`_SC_BC_STRING_MAX' - Inquire about the maximum size of a string constant in the `bc' - utility. -`_SC_COLL_WEIGHTS_MAX' - Inquire about the maximum number of weights that can necessarily - be used in defining the collating sequence for a locale. + - Function: int uname (struct utsname *INFO) + The `uname' function fills in the structure pointed to by INFO + with information about the operating system and host machine. A + non-negative value indicates that the data was successfully stored. -`_SC_EXPR_NEST_MAX' - Inquire about the maximum number of expressions nested within - parentheses when using the `expr' utility. + `-1' as the value indicates an error. The only error possible is + `EFAULT', which we normally don't mention as it is always a + possibility. -`_SC_LINE_MAX' - Inquire about the maximum size of a text line that the POSIX.2 text - utilities can handle. + +File: libc.info, Node: Filesystem Handling, Next: System Parameters, Prev: Platform Type, Up: System Management -`_SC_EQUIV_CLASS_MAX' - Inquire about the maximum number of weights that can be assigned - to an entry of the `LC_COLLATE' category `order' keyword in a - locale definition. The GNU C library does not presently support - locale definitions. +Controlling and Querying Mounts +=============================== -`_SC_VERSION' - Inquire about the version number of POSIX.1 that the library and - kernel support. + All files are in filesystems, and before you can access any file, its +filesystem must be mounted. Because of Unix's concept of _Everything +is a file_, mounting of filesystems is central to doing almost +anything. This section explains how to find out what filesystems are +currently mounted and what filesystems are available for mounting, and +how to change what is mounted. -`_SC_2_VERSION' - Inquire about the version number of POSIX.2 that the system - utilities support. + The classic filesystem is the contents of a disk drive. The concept +is considerably more abstract, though, and lots of things other than +disk drives can be mounted. -`_SC_PAGESIZE' - Inquire about the virtual memory page size of the machine. - `getpagesize' returns the same value (*note Query Memory - Parameters::). + Some block devices don't correspond to traditional devices like disk +drives. For example, a loop device is a block device whose driver uses +a regular file in another filesystem as its medium. So if that regular +file contains appropriate data for a filesystem, you can by mounting the +loop device essentially mount a regular file. -`_SC_NPROCESSORS_CONF' - Inquire about the number of configured processors. + Some filesystems aren't based on a device of any kind. The "proc" +filesystem, for example, contains files whose data is made up by the +filesystem driver on the fly whenever you ask for it. And when you +write to it, the data you write causes changes in the system. No data +gets stored. -`_SC_NPROCESSORS_ONLN' - Inquire about the number of processors online. +* Menu: -`_SC_PHYS_PAGES' - Inquire about the number of physical pages in the system. +* Mount Information:: What is or could be mounted? +* Mount-Unmount-Remount:: Controlling what is mounted and how -`_SC_AVPHYS_PAGES' - Inquire about the number of available physical pages in the system. + +File: libc.info, Node: Mount Information, Next: Mount-Unmount-Remount, Up: Filesystem Handling -`_SC_ATEXIT_MAX' - Inquire about the number of functions which can be registered as - termination functions for `atexit'; *note Cleanups on Exit::. +Mount Information +----------------- -`_SC_XOPEN_VERSION' - Inquire about the parameter corresponding to `_XOPEN_VERSION'. + For some programs it is desirable and necessary to access information +about whether a certain filesystem is mounted and, if it is, where, or +simply to get lists of all the available filesystems. The GNU libc +provides some functions to retrieve this information portably. -`_SC_XOPEN_XCU_VERSION' - Inquire about the parameter corresponding to `_XOPEN_XCU_VERSION'. + Traditionally Unix systems have a file named `/etc/fstab' which +describes all possibly mounted filesystems. The `mount' program uses +this file to mount at startup time of the system all the necessary +filesystems. The information about all the filesystems actually mounted +is normally kept in a file named `/etc/mtab'. Both files share the +same syntax and it is crucial that this syntax is followed all the +time. Therefore it is best to never directly write the files. The +functions described in this section can do this and they also provide +the functionality to convert the external textual representation to the +internal representation. -`_SC_XOPEN_UNIX' - Inquire about the parameter corresponding to `_XOPEN_UNIX'. + Note that the `fstab' and `mtab' files are maintained on a system by +_convention_. It is possible for the files not to exist or not to be +consistent with what is really mounted or available to mount, if the +system's administration policy allows it. But programs that mount and +unmount filesystems typically maintain and use these files as described +herein. -`_SC_XOPEN_REALTIME' - Inquire about the parameter corresponding to `_XOPEN_REALTIME'. + The filenames given above should never be used directly. The +portable way to handle these file is to use the macros `_PATH_FSTAB', +defined in `fstab.h' and `_PATH_MNTTAB', defined in `mntent.h', +respectively. There are also two alternate macro names `FSTAB' and +`_PATH_MOUNTED' defined but both names are deprecated and kept only for +backward compatibility. The two former names should always be used. -`_SC_XOPEN_REALTIME_THREADS' - Inquire about the parameter corresponding to - `_XOPEN_REALTIME_THREADS'. +* Menu: -`_SC_XOPEN_LEGACY' - Inquire about the parameter corresponding to `_XOPEN_LEGACY'. +* fstab:: The `fstab' file +* mtab:: The `mtab' file +* Other Mount Information:: Other (non-libc) sources of mount information -`_SC_XOPEN_CRYPT' - Inquire about the parameter corresponding to `_XOPEN_CRYPT'. + +File: libc.info, Node: fstab, Next: mtab, Up: Mount Information -`_SC_XOPEN_ENH_I18N' - Inquire about the parameter corresponding to `_XOPEN_ENH_I18N'. +The `fstab' file +................ -`_SC_XOPEN_SHM' - Inquire about the parameter corresponding to `_XOPEN_SHM'. + The internal representation for entries of the file is +`struct fstab', defined in `fstab.h'. -`_SC_XOPEN_XPG2' - Inquire about the parameter corresponding to `_XOPEN_XPG2'. + - Data Type: struct fstab + This structure is used with the `getfsent', `getfsspec', and + `getfsfile' functions. -`_SC_XOPEN_XPG3' - Inquire about the parameter corresponding to `_XOPEN_XPG3'. + `char *fs_spec' + This element describes the device from which the filesystem + is mounted. Normally this is the name of a special device, + such as a hard disk partition, but it could also be a more or + less generic string. For "NFS" it would be a hostname and + directory name combination. -`_SC_XOPEN_XPG4' - Inquire about the parameter corresponding to `_XOPEN_XPG4'. + Even though the element is not declared `const' it shouldn't + be modified. The missing `const' has historic reasons, since + this function predates ISO C. The same is true for the other + string elements of this structure. -`_SC_CHAR_BIT' - Inquire about the number of bits in a variable of type `char'. + `char *fs_file' + This describes the mount point on the local system. I.e., + accessing any file in this filesystem has implicitly or + explicitly this string as a prefix. -`_SC_CHAR_MAX' - Inquire about the maximum value which can be stored in a variable - of type `char'. + `char *fs_vfstype' + This is the type of the filesystem. Depending on what the + underlying kernel understands it can be any string. -`_SC_CHAR_MIN' - Inquire about the minimum value which can be stored in a variable - of type `char'. + `char *fs_mntops' + This is a string containing options passed to the kernel with + the `mount' call. Again, this can be almost anything. There + can be more than one option, separated from the others by a + comma. Each option consists of a name and an optional value + part, introduced by an `=' character. -`_SC_INT_MAX' - Inquire about the maximum value which can be stored in a variable - of type `int'. + If the value of this element must be processed it should + ideally be done using the `getsubopt' function; see *Note + Suboptions::. -`_SC_INT_MIN' - Inquire about the minimum value which can be stored in a variable - of type `int'. + `const char *fs_type' + This name is poorly chosen. This element points to a string + (possibly in the `fs_mntops' string) which describes the + modes with which the filesystem is mounted. `fstab' defines + five macros to describe the possible values: -`_SC_LONG_BIT' - Inquire about the number of bits in a variable of type `long int'. + `FSTAB_RW' + The filesystems gets mounted with read and write enabled. -`_SC_WORD_BIT' - Inquire about the number of bits in a variable of a register word. + `FSTAB_RQ' + The filesystems gets mounted with read and write + enabled. Write access is restricted by quotas. -`_SC_MB_LEN_MAX' - Inquire the maximum length of a multi-byte representation of a wide - character value. + `FSTAB_RO' + The filesystem gets mounted read-only. -`_SC_NZERO' - Inquire about the value used to internally represent the zero - priority level for the process execution. + `FSTAB_SW' + This is not a real filesystem, it is a swap device. -`SC_SSIZE_MAX' - Inquire about the maximum value which can be stored in a variable - of type `ssize_t'. + `FSTAB_XX' + This entry from the `fstab' file is totally ignored. -`_SC_SCHAR_MAX' - Inquire about the maximum value which can be stored in a variable - of type `signed char'. + Testing for equality with these value must happen using + `strcmp' since these are all strings. Comparing the pointer + will probably always fail. -`_SC_SCHAR_MIN' - Inquire about the minimum value which can be stored in a variable - of type `signed char'. + `int fs_freq' + This element describes the dump frequency in days. -`_SC_SHRT_MAX' - Inquire about the maximum value which can be stored in a variable - of type `short int'. + `int fs_passno' + This element describes the pass number on parallel dumps. It + is closely related to the `dump' utility used on Unix systems. -`_SC_SHRT_MIN' - Inquire about the minimum value which can be stored in a variable - of type `short int'. + To read the entire content of the of the `fstab' file the GNU libc +contains a set of three functions which are designed in the usual way. -`_SC_UCHAR_MAX' - Inquire about the maximum value which can be stored in a variable - of type `unsigned char'. + - Function: int setfsent (void) + This function makes sure that the internal read pointer for the + `fstab' file is at the beginning of the file. This is done by + either opening the file or resetting the read pointer. -`_SC_UINT_MAX' - Inquire about the maximum value which can be stored in a variable - of type `unsigned int'. + Since the file handle is internal to the libc this function is not + thread-safe. -`_SC_ULONG_MAX' - Inquire about the maximum value which can be stored in a variable - of type `unsigned long int'. + This function returns a non-zero value if the operation was + successful and the `getfs*' functions can be used to read the + entries of the file. -`_SC_USHRT_MAX' - Inquire about the maximum value which can be stored in a variable - of type `unsigned short int'. + - Function: void endfsent (void) + This function makes sure that all resources acquired by a prior + call to `setfsent' (explicitly or implicitly by calling + `getfsent') are freed. -`_SC_NL_ARGMAX' - Inquire about the parameter corresponding to `NL_ARGMAX'. + - Function: struct fstab * getfsent (void) + This function returns the next entry of the `fstab' file. If this + is the first call to any of the functions handling `fstab' since + program start or the last call of `endfsent', the file will be + opened. -`_SC_NL_LANGMAX' - Inquire about the parameter corresponding to `NL_LANGMAX'. + The function returns a pointer to a variable of type `struct + fstab'. This variable is shared by all threads and therefore this + function is not thread-safe. If an error occurred `getfsent' + returns a `NULL' pointer. -`_SC_NL_MSGMAX' - Inquire about the parameter corresponding to `NL_MSGMAX'. + - Function: struct fstab * getfsspec (const char *NAME) + This function returns the next entry of the `fstab' file which has + a string equal to NAME pointed to by the `fs_spec' element. Since + there is normally exactly one entry for each special device it + makes no sense to call this function more than once for the same + argument. If this is the first call to any of the functions + handling `fstab' since program start or the last call of + `endfsent', the file will be opened. -`_SC_NL_NMAX' - Inquire about the parameter corresponding to `NL_NMAX'. + The function returns a pointer to a variable of type `struct + fstab'. This variable is shared by all threads and therefore this + function is not thread-safe. If an error occurred `getfsent' + returns a `NULL' pointer. -`_SC_NL_SETMAX' - Inquire about the parameter corresponding to `NL_SETMAX'. + - Function: struct fstab * getfsfile (const char *NAME) + This function returns the next entry of the `fstab' file which has + a string equal to NAME pointed to by the `fs_file' element. Since + there is normally exactly one entry for each mount point it makes + no sense to call this function more than once for the same + argument. If this is the first call to any of the functions + handling `fstab' since program start or the last call of + `endfsent', the file will be opened. -`_SC_NL_TEXTMAX' - Inquire about the parameter corresponding to `NL_TEXTMAX'. + The function returns a pointer to a variable of type `struct + fstab'. This variable is shared by all threads and therefore this + function is not thread-safe. If an error occurred `getfsent' + returns a `NULL' pointer. diff -durpN glibc-2.2.4/manual/libc.info-48 glibc-2.2.5/manual/libc.info-48 --- glibc-2.2.4/manual/libc.info-48 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-48 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,517 +33,872 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Examples of Sysconf, Prev: Constants for Sysconf, Up: Sysconf +File: libc.info, Node: mtab, Next: Other Mount Information, Prev: fstab, Up: Mount Information -Examples of `sysconf' ---------------------- +The `mtab' file +............... - We recommend that you first test for a macro definition for the -parameter you are interested in, and call `sysconf' only if the macro -is not defined. For example, here is how to test whether job control -is supported: + The following functions and data structure access the `mtab' file. - int - have_job_control (void) - { - #ifdef _POSIX_JOB_CONTROL - return 1; - #else - int value = sysconf (_SC_JOB_CONTROL); - if (value < 0) - /* If the system is that badly wedged, - there's no use trying to go on. */ - fatal (strerror (errno)); - return value; - #endif - } + - Data Type: struct mntent + This structure is used with the `getmntent', `getmntent_t', + `addmntent', and `hasmntopt' functions. - Here is how to get the value of a numeric limit: + `char *mnt_fsname' + This element contains a pointer to a string describing the + name of the special device from which the filesystem is + mounted. It corresponds to the `fs_spec' element in `struct + fstab'. - int - get_child_max () - { - #ifdef CHILD_MAX - return CHILD_MAX; - #else - int value = sysconf (_SC_CHILD_MAX); - if (value < 0) - fatal (strerror (errno)); - return value; - #endif - } + `char *mnt_dir' + This element points to a string describing the mount point of + the filesystem. It corresponds to the `fs_file' element in + `struct fstab'. - -File: libc.info, Node: Minimums, Next: Limits for Files, Prev: Sysconf, Up: System Configuration + `char *mnt_type' + `mnt_type' describes the filesystem type and is therefore + equivalent to `fs_vfstype' in `struct fstab'. `mntent.h' + defines a few symbolic names for some of the values this + string can have. But since the kernel can support arbitrary + filesystems it does not make much sense to give them symbolic + names. If one knows the symbol name one also knows the + filesystem name. Nevertheless here follows the list of the + symbols provided in `mntent.h'. -Minimum Values for General Capacity Limits -========================================== + `MNTTYPE_IGNORE' + This symbol expands to `"ignore"'. The value is + sometime used in `fstab' files to make sure entries are + not used without removing them. - Here are the names for the POSIX minimum upper bounds for the system -limit parameters. The significance of these values is that you can -safely push to these limits without checking whether the particular -system you are using can go that far. + `MNTTYPE_NFS' + Expands to `"nfs"'. Using this macro sometimes could + make sense since it names the default NFS + implementation, in case both version 2 and 3 are + supported. -`_POSIX_AIO_LISTIO_MAX' - The most restrictive limit permitted by POSIX for the maximum - number of I/O operations that can be specified in a list I/O call. - The value of this constant is `2'; thus you can add up to two new - entries of the list of outstanding operations. + `MNTTYPE_SWAP' + This symbol expands to `"swap"'. It names the special + `fstab' entry which names one of the possibly multiple + swap partitions. -`_POSIX_AIO_MAX' - The most restrictive limit permitted by POSIX for the maximum - number of outstanding asynchronous I/O operations. The value of - this constant is `1'. So you cannot expect that you can issue - more than one operation and immediately continue with the normal - work, receiving the notifications asynchronously. + `char *mnt_opts' + The element contains a string describing the options used + while mounting the filesystem. As for the equivalent element + `fs_mntops' of `struct fstab' it is best to use the function + `getsubopt' (*note Suboptions::) to access the parts of this + string. -`_POSIX_ARG_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum combined length of the ARGV and ENVIRON - arguments that can be passed to the `exec' functions. Its value - is `4096'. + The `mntent.h' file defines a number of macros with string + values which correspond to some of the options understood by + the kernel. There might be many more options which are + possible so it doesn't make much sense to rely on these + macros but to be consistent here is the list: -`_POSIX_CHILD_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum number of simultaneous processes per real - user ID. Its value is `6'. + `MNTOPT_DEFAULTS' + Expands to `"defaults"'. This option should be used + alone since it indicates all values for the customizable + values are chosen to be the default. -`_POSIX_NGROUPS_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum number of supplementary group IDs per - process. Its value is `0'. + `MNTOPT_RO' + Expands to `"ro"'. See the `FSTAB_RO' value, it means + the filesystem is mounted read-only. -`_POSIX_OPEN_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum number of files that a single process can - have open simultaneously. Its value is `16'. + `MNTOPT_RW' + Expand to `"rw"'. See the `FSTAB_RW' value, it means the + filesystem is mounted with read and write permissions. -`_POSIX_SSIZE_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum value that can be stored in an object of type - `ssize_t'. Its value is `32767'. + `MNTOPT_SUID' + Expands to `"suid"'. This means that the SUID bit + (*note How Change Persona::) is respected when a program + from the filesystem is started. -`_POSIX_STREAM_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum number of streams that a single process can - have open simultaneously. Its value is `8'. + `MNTOPT_NOSUID' + Expands to `"nosuid"'. This is the opposite of + `MNTOPT_SUID', the SUID bit for all files from the + filesystem is ignored. -`_POSIX_TZNAME_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the maximum length of a time zone name. Its value is - `3'. + `MNTOPT_NOAUTO' + Expands to `"noauto"'. At startup time the `mount' + program will ignore this entry if it is started with the + `-a' option to mount all filesystems mentioned in the + `fstab' file. -`_POSIX2_RE_DUP_MAX' - The value of this macro is the most restrictive limit permitted by - POSIX for the numbers used in the `\{MIN,MAX\}' construct in a - regular expression. Its value is `255'. + As for the `FSTAB_*' entries introduced above it is important + to use `strcmp' to check for equality. - -File: libc.info, Node: Limits for Files, Next: Options for Files, Prev: Minimums, Up: System Configuration + `mnt_freq' + This elements corresponds to `fs_freq' and also specifies the + frequency in days in which dumps are made. -Limits on File System Capacity -============================== + `mnt_passno' + This element is equivalent to `fs_passno' with the same + meaning which is uninteresting for all programs beside `dump'. - The POSIX.1 standard specifies a number of parameters that describe -the limitations of the file system. It's possible for the system to -have a fixed, uniform limit for a parameter, but this isn't the usual -case. On most systems, it's possible for different file systems (and, -for some parameters, even different files) to have different maximum -limits. For example, this is very likely if you use NFS to mount some -of the file systems from other machines. + For accessing the `mtab' file there is again a set of three +functions to access all entries in a row. Unlike the functions to +handle `fstab' these functions do not access a fixed file and there is +even a thread safe variant of the get function. Beside this the GNU +libc contains functions to alter the file and test for specific options. - Each of the following macros is defined in `limits.h' only if the -system has a fixed, uniform limit for the parameter in question. If the -system allows different file systems or files to have different limits, -then the macro is undefined; use `pathconf' or `fpathconf' to find out -the limit that applies to a particular file. *Note Pathconf::. + - Function: FILE * setmntent (const char *FILE, const char *MODE) + The `setmntent' function prepares the file named FILE which must + be in the format of a `fstab' and `mtab' file for the upcoming + processing through the other functions of the family. The MODE + parameter can be chosen in the way the OPENTYPE parameter for + `fopen' (*note Opening Streams::) can be chosen. If the file is + opened for writing the file is also allowed to be empty. - Each parameter also has another macro, with a name starting with -`_POSIX', which gives the lowest value that the limit is allowed to -have on _any_ POSIX system. *Note File Minimums::. + If the file was successfully opened `setmntent' returns a file + descriptor for future use. Otherwise the return value is `NULL' + and `errno' is set accordingly. - - Macro: int LINK_MAX - The uniform system limit (if any) for the number of names for a - given file. *Note Hard Links::. + - Function: int endmntent (FILE *STREAM) + This function takes for the STREAM parameter a file handle which + previously was returned from the `setmntent' call. `endmntent' + closes the stream and frees all resources. - - Macro: int MAX_CANON - The uniform system limit (if any) for the amount of text in a line - of input when input editing is enabled. *Note Canonical or Not::. + The return value is 1 unless an error occurred in which case it is + 0. - - Macro: int MAX_INPUT - The uniform system limit (if any) for the total number of - characters typed ahead as input. *Note I/O Queues::. + - Function: struct mntent * getmntent (FILE *STREAM) + The `getmntent' function takes as the parameter a file handle + previously returned by successful call to `setmntent'. It returns + a pointer to a static variable of type `struct mntent' which is + filled with the information from the next entry from the file + currently read. - - Macro: int NAME_MAX - The uniform system limit (if any) for the length of a file name - component. + The file format used prescribes the use of spaces or tab + characters to separate the fields. This makes it harder to use + name containing one of these characters (e.g., mount points using + spaces). Therefore these characters are encoded in the files and + the `getmntent' function takes care of the decoding while reading + the entries back in. `'\040'' is used to encode a space + character, `'\012'' to encode a tab character and `'\\'' to encode + a backslash. - - Macro: int PATH_MAX - The uniform system limit (if any) for the length of an entire file - name (that is, the argument given to system calls such as `open'). + If there was an error or the end of the file is reached the return + value is `NULL'. - - Macro: int PIPE_BUF - The uniform system limit (if any) for the number of bytes that can - be written atomically to a pipe. If multiple processes are - writing to the same pipe simultaneously, output from different - processes might be interleaved in chunks of this size. *Note - Pipes and FIFOs::. + This function is not thread-safe since all calls to this function + return a pointer to the same static variable. `getmntent_r' + should be used in situations where multiple threads access the + file. - These are alternative macro names for some of the same information. + - Function: struct mntent * getmntent_r (FILE *STREAM, struct mentent + *RESULT, char *BUFFER, int BUFSIZE) + The `getmntent_r' function is the reentrant variant of + `getmntent'. It also returns the next entry from the file and + returns a pointer. The actual variable the values are stored in + is not static, though. Instead the function stores the values in + the variable pointed to by the RESULT parameter. Additional + information (e.g., the strings pointed to by the elements of the + result) are kept in the buffer of size BUFSIZE pointed to by + BUFFER. - - Macro: int MAXNAMLEN - This is the BSD name for `NAME_MAX'. It is defined in `dirent.h'. + Escaped characters (space, tab, backslash) are converted back in + the same way as it happens for `getmentent'. - - Macro: int FILENAME_MAX - The value of this macro is an integer constant expression that - represents the maximum length of a file name string. It is - defined in `stdio.h'. + The function returns a `NULL' pointer in error cases. Errors + could be: + * error while reading the file, - Unlike `PATH_MAX', this macro is defined even if there is no actual - limit imposed. In such a case, its value is typically a very large - number. *This is always the case on the GNU system.* + * end of file reached, - *Usage Note:* Don't use `FILENAME_MAX' as the size of an array in - which to store a file name! You can't possibly make an array that - big! Use dynamic allocation (*note Memory Allocation::) instead. + * BUFSIZE is too small for reading a complete new entry. - -File: libc.info, Node: Options for Files, Next: File Minimums, Prev: Limits for Files, Up: System Configuration + - Function: int addmntent (FILE *STREAM, const struct mntent *MNT) + The `addmntent' function allows adding a new entry to the file + previously opened with `setmntent'. The new entries are always + appended. I.e., even if the position of the file descriptor is + not at the end of the file this function does not overwrite an + existing entry following the current position. -Optional Features in File Support -================================= + The implication of this is that to remove an entry from a file one + has to create a new file while leaving out the entry to be removed + and after closing the file remove the old one and rename the new + file to the chosen name. - POSIX defines certain system-specific options in the system calls for -operating on files. Some systems support these options and others do -not. Since these options are provided in the kernel, not in the -library, simply using the GNU C library does not guarantee that any of -these features is supported; it depends on the system you are using. -They can also vary between file systems on a single machine. + This function takes care of spaces and tab characters in the names + to be written to the file. It converts them and the backslash + character into the format describe in the `getmntent' description + above. - This section describes the macros you can test to determine whether a -particular option is supported on your machine. If a given macro is -defined in `unistd.h', then its value says whether the corresponding -feature is supported. (A value of `-1' indicates no; any other value -indicates yes.) If the macro is undefined, it means particular files -may or may not support the feature. + This function returns 0 in case the operation was successful. + Otherwise the return value is 1 and `errno' is set appropriately. - Since all the machines that support the GNU C library also support -NFS, one can never make a general statement about whether all file -systems support the `_POSIX_CHOWN_RESTRICTED' and `_POSIX_NO_TRUNC' -features. So these names are never defined as macros in the GNU C -library. + - Function: char * hasmntopt (const struct mntent *MNT, const char + *OPT) + This function can be used to check whether the string pointed to + by the `mnt_opts' element of the variable pointed to by MNT + contains the option OPT. If this is true a pointer to the + beginning of the option in the `mnt_opts' element is returned. If + no such option exists the function returns `NULL'. - - Macro: int _POSIX_CHOWN_RESTRICTED - If this option is in effect, the `chown' function is restricted so - that the only changes permitted to nonprivileged processes is to - change the group owner of a file to either be the effective group - ID of the process, or one of its supplementary group IDs. *Note - File Owner::. + This function is useful to test whether a specific option is + present but when all options have to be processed one is better + off with using the `getsubopt' function to iterate over all + options in the string. - - Macro: int _POSIX_NO_TRUNC - If this option is in effect, file name components longer than - `NAME_MAX' generate an `ENAMETOOLONG' error. Otherwise, file name - components that are too long are silently truncated. + +File: libc.info, Node: Other Mount Information, Prev: mtab, Up: Mount Information - - Macro: unsigned char _POSIX_VDISABLE - This option is only meaningful for files that are terminal devices. - If it is enabled, then handling for special control characters can - be disabled individually. *Note Special Characters::. +Other (Non-libc) Sources of Mount Information +............................................. - If one of these macros is undefined, that means that the option -might be in effect for some files and not for others. To inquire about -a particular file, call `pathconf' or `fpathconf'. *Note Pathconf::. + On a system with a Linux kernel and the `proc' filesystem, you can +get information on currently mounted filesystems from the file `mounts' +in the `proc' filesystem. Its format is similar to that of the `mtab' +file, but represents what is truly mounted without relying on +facilities outside the kernel to keep `mtab' up to date.  -File: libc.info, Node: File Minimums, Next: Pathconf, Prev: Options for Files, Up: System Configuration +File: libc.info, Node: Mount-Unmount-Remount, Prev: Mount Information, Up: Filesystem Handling -Minimum Values for File System Limits -===================================== +Mount, Unmount, Remount +----------------------- - Here are the names for the POSIX minimum upper bounds for some of the -above parameters. The significance of these values is that you can -safely push to these limits without checking whether the particular -system you are using can go that far. In most cases GNU systems do not -have these strict limitations. The actual limit should be requested if -necessary. + This section describes the functions for mounting, unmounting, and +remounting filesystems. -`_POSIX_LINK_MAX' - The most restrictive limit permitted by POSIX for the maximum - value of a file's link count. The value of this constant is `8'; - thus, you can always make up to eight names for a file without - running into a system limit. + Only the superuser can mount, unmount, or remount a filesystem. -`_POSIX_MAX_CANON' - The most restrictive limit permitted by POSIX for the maximum - number of bytes in a canonical input line from a terminal device. - The value of this constant is `255'. + These functions do not access the `fstab' and `mtab' files. You +should maintain and use these separately. *Note Mount Information::. -`_POSIX_MAX_INPUT' - The most restrictive limit permitted by POSIX for the maximum - number of bytes in a terminal device input queue (or typeahead - buffer). *Note Input Modes::. The value of this constant is - `255'. + The symbols in this section are declared in `sys/mount.h'. -`_POSIX_NAME_MAX' - The most restrictive limit permitted by POSIX for the maximum - number of bytes in a file name component. The value of this - constant is `14'. + - Function: int mount (const char *SPECIAL_FILE, const char *DIR, + const char *FSTYPE, unsigned long int OPTIONS, const void + *DATA) + `mount' mounts or remounts a filesystem. The two operations are + quite different and are merged rather unnaturally into this one + function. The `MS_REMOUNT' option, explained below, determines + whether `mount' mounts or remounts. -`_POSIX_PATH_MAX' - The most restrictive limit permitted by POSIX for the maximum - number of bytes in a file name. The value of this constant is - `256'. + For a mount, the filesystem on the block device represented by the + device special file named SPECIAL_FILE gets mounted over the mount + point DIR. This means that the directory DIR (along with any + files in it) is no longer visible; in its place (and still with + the name DIR) is the root directory of the filesystem on the + device. -`_POSIX_PIPE_BUF' - The most restrictive limit permitted by POSIX for the maximum - number of bytes that can be written atomically to a pipe. The - value of this constant is `512'. + As an exception, if the filesystem type (see below) is one which + is not based on a device (e.g. "proc"), `mount' instantiates a + filesystem and mounts it over DIR and ignores SPECIAL_FILE. -`SYMLINK_MAX' - Maximum number of bytes in a symbolic link. + For a remount, DIR specifies the mount point where the filesystem + to be remounted is (and remains) mounted and SPECIAL_FILE is + ignored. Remounting a filesystem means changing the options that + control operations on the filesystem while it is mounted. It does + not mean unmounting and mounting again. -`POSIX_REC_INCR_XFER_SIZE' - Recommended increment for file transfer sizes between the - `POSIX_REC_MIN_XFER_SIZE' and `POSIX_REC_MAX_XFER_SIZE' values. + For a mount, you must identify the type of the filesystem as + FSTYPE. This type tells the kernel how to access the filesystem + and can be thought of as the name of a filesystem driver. The + acceptable values are system dependent. On a system with a Linux + kernel and the `proc' filesystem, the list of possible values is + in the file `filesystems' in the `proc' filesystem (e.g. type `cat + /proc/filesystems' to see the list). With a Linux kernel, the + types of filesystems that `mount' can mount, and their type names, + depends on what filesystem drivers are configured into the kernel + or loaded as loadable kernel modules. An example of a common + value for FSTYPE is `ext2'. -`POSIX_REC_MAX_XFER_SIZE' - Maximum recommended file transfer size. + For a remount, `mount' ignores FSTYPE. -`POSIX_REC_MIN_XFER_SIZE' - Minimum recommended file transfer size. + OPTIONS specifies a variety of options that apply until the + filesystem is unmounted or remounted. The precise meaning of an + option depends on the filesystem and with some filesystems, an + option may have no effect at all. Furthermore, for some + filesystems, some of these options (but never `MS_RDONLY') can be + overridden for individual file accesses via `ioctl'. -`POSIX_REC_XFER_ALIGN' - Recommended file transfer buffer alignment. + OPTIONS is a bit string with bit fields defined using the + following mask and masked value macros: - -File: libc.info, Node: Pathconf, Next: Utility Limits, Prev: File Minimums, Up: System Configuration + `MS_MGC_MASK' + This multibit field contains a magic number. If it does not + have the value `MS_MGC_VAL', `mount' assumes all the + following bits are zero and the DATA argument is a null + string, regardless of their actual values. -Using `pathconf' -================ + `MS_REMOUNT' + This bit on means to remount the filesystem. Off means to + mount it. - When your machine allows different files to have different values -for a file system parameter, you can use the functions in this section -to find out the value that applies to any particular file. + `MS_RDONLY' + This bit on specifies that no writing to the filesystem shall + be allowed while it is mounted. This cannot be overridden by + `ioctl'. This option is available on nearly all filesystems. - These functions and the associated constants for the PARAMETER -argument are declared in the header file `unistd.h'. + `S_IMMUTABLE' + This bit on specifies that no writing to the files in the + filesystem shall be allowed while it is mounted. This can be + overridden for a particular file access by a properly + privileged call to `ioctl'. This option is a relatively new + invention and is not available on many filesystems. - - Function: long int pathconf (const char *FILENAME, int PARAMETER) - This function is used to inquire about the limits that apply to - the file named FILENAME. + `S_APPEND' + This bit on specifies that the only file writing that shall + be allowed while the filesystem is mounted is appending. + Some filesystems allow this to be overridden for a particular + process by a properly privileged call to `ioctl'. This is a + relatively new invention and is not available on many + filesystems. - The PARAMETER argument should be one of the `_PC_' constants - listed below. + `MS_NOSUID' + This bit on specifies that Setuid and Setgid permissions on + files in the filesystem shall be ignored while it is mounted. - The normal return value from `pathconf' is the value you requested. - A value of `-1' is returned both if the implementation does not - impose a limit, and in case of an error. In the former case, - `errno' is not set, while in the latter case, `errno' is set to - indicate the cause of the problem. So the only way to use this - function robustly is to store `0' into `errno' just before calling - it. + `MS_NOEXEC' + This bit on specifies that no files in the filesystem shall + be executed while the filesystem is mounted. - Besides the usual file name errors (*note File Name Errors::), the - following error condition is defined for this function: + `MS_NODEV' + This bit on specifies that no device special files in the + filesystem shall be accessible while the filesystem is + mounted. + + `MS_SYNCHRONOUS' + This bit on specifies that all writes to the filesystem while + it is mounted shall be synchronous; i.e. data shall be synced + before each write completes rather than held in the buffer + cache. + + `MS_MANDLOCK' + This bit on specifies that mandatory locks on files shall be + permitted while the filesystem is mounted. + + `MS_NOATIME' + This bit on specifies that access times of files shall not be + updated when the files are accessed while the filesystem is + mounted. + + `MS_NODIRATIME' + This bit on specifies that access times of directories shall + not be updated when the directories are accessed while the + filesystem in mounted. + + Any bits not covered by the above masks should be set off; + otherwise, results are undefined. + + The meaning of DATA depends on the filesystem type and is + controlled entirely by the filesystem driver in the kernel. + + Example: + + #include + + mount("/dev/hdb", "/cdrom", MS_MGC_VAL | MS_RDONLY | MS_NOSUID, ""); + + mount("/dev/hda2", "/mnt", MS_MGC_VAL | MS_REMOUNT, ""); + + Appropriate arguments for `mount' are conventionally recorded in + the `fstab' table. *Note Mount Information::. + + The return value is zero if the mount or remount is successful. + Otherwise, it is `-1' and `errno' is set appropriately. The + values of `errno' are filesystem dependent, but here is a general + list: + + `EPERM' + The process is not superuser. + + `ENODEV' + The file system type FSTYPE is not known to the kernel. + + `ENOTBLK' + The file DEV is not a block device special file. + + `EBUSY' + * The device is already mounted. + + * The mount point is busy. (E.g. it is some process' + working directory or has a filesystem mounted on it + already). + + * The request is to remount read-only, but there are files + open for write. `EINVAL' - The value of PARAMETER is invalid, or the implementation - doesn't support the PARAMETER for the specific file. + * A remount was attempted, but there is no filesystem + mounted over the specified mount point. - - Function: long int fpathconf (int FILEDES, int PARAMETER) - This is just like `pathconf' except that an open file descriptor - is used to specify the file for which information is requested, - instead of a file name. + * The supposed filesystem has an invalid superblock. - The following `errno' error conditions are defined for this - function: - `EBADF' - The FILEDES argument is not a valid file descriptor. + `EACCES' + * The filesystem is inherently read-only (possibly due to + a switch on the device) and the process attempted to + mount it read/write (by setting the `MS_RDONLY' bit off). + + * SPECIAL_FILE or DIR is not accessible due to file + permissions. + + * SPECIAL_FILE is not accessible because it is in a + filesystem that is mounted with the `MS_NODEV' option. + + + `EM_FILE' + The table of dummy devices is full. `mount' needs to create a + dummy device (aka "unnamed" device) if the filesystem being + mounted is not one that uses a device. + + + - Function: int umount2 (const char *FILE, int FLAGS) + `umount2' unmounts a filesystem. + + You can identify the filesystem to unmount either by the device + special file that contains the filesystem or by the mount point. + The effect is the same. Specify either as the string FILE. + + FLAGS contains the one-bit field identified by the following mask + macro: + + `MNT_FORCE' + This bit on means to force the unmounting even if the + filesystem is busy, by making it unbusy first. If the bit is + off and the filesystem is busy, `umount2' fails with `errno' + = `EBUSY'. Depending on the filesystem, this may override + all, some, or no busy conditions. + + All other bits in FLAGS should be set to zero; otherwise, the + result is undefined. + + Example: + + #include + + umount2("/mnt", MNT_FORCE); + + umount2("/dev/hdd1", 0); + + After the filesystem is unmounted, the directory that was the + mount point is visible, as are any files in it. + + As part of unmounting, `umount2' syncs the filesystem. + + If the unmounting is successful, the return value is zero. + Otherwise, it is `-1' and `errno' is set accordingly: + + `EPERM' + The process is not superuser. + + `EBUSY' + The filesystem cannot be unmounted because it is busy. E.g. + it contains a directory that is some process's working + directory or a file that some process has open. With some + filesystems in some cases, you can avoid this failure with + the `MNT_FORCE' option. `EINVAL' - The value of PARAMETER is invalid, or the implementation - doesn't support the PARAMETER for the specific file. + FILE validly refers to a file, but that file is neither a + mount point nor a device special file of a currently mounted + filesystem. - Here are the symbolic constants that you can use as the PARAMETER -argument to `pathconf' and `fpathconf'. The values are all integer -constants. + This function is not available on all systems. -`_PC_LINK_MAX' - Inquire about the value of `LINK_MAX'. + - Function: int umount (const char *FILE) + `umount' does the same thing as `umount2' with FLAGS set to + zeroes. It is more widely available than `umount2' but since it + lacks the possibility to forcefully unmount a filesystem is + deprecated when `umount2' is also available. -`_PC_MAX_CANON' - Inquire about the value of `MAX_CANON'. + +File: libc.info, Node: System Parameters, Prev: Filesystem Handling, Up: System Management -`_PC_MAX_INPUT' - Inquire about the value of `MAX_INPUT'. +System Parameters +================= -`_PC_NAME_MAX' - Inquire about the value of `NAME_MAX'. + This section describes the `sysctl' function, which gets and sets a +variety of system parameters. -`_PC_PATH_MAX' - Inquire about the value of `PATH_MAX'. + The symbols used in this section are declared in the file `sysctl.h'. -`_PC_PIPE_BUF' - Inquire about the value of `PIPE_BUF'. + - Function: int sysctl (int *NAMES, int NLEN, void *OLDVAL, + size_t *OLDLENP, void *NEWVAL, size_t NEWLEN) -`_PC_CHOWN_RESTRICTED' - Inquire about the value of `_POSIX_CHOWN_RESTRICTED'. + `sysctl' gets or sets a specified system parameter. There are so + many of these parameters that it is not practical to list them all + here, but here are some examples: -`_PC_NO_TRUNC' - Inquire about the value of `_POSIX_NO_TRUNC'. + * network domain name -`_PC_VDISABLE' - Inquire about the value of `_POSIX_VDISABLE'. + * paging parameters -`_PC_SYNC_IO' - Inquire about the value of `_POSIX_SYNC_IO'. + * network Address Resolution Protocol timeout time -`_PC_ASYNC_IO' - Inquire about the value of `_POSIX_ASYNC_IO'. + * maximum number of files that may be open -`_PC_PRIO_IO' - Inquire about the value of `_POSIX_PRIO_IO'. + * root filesystem device -`_PC_SOCK_MAXBUF' - Inquire about the value of `_POSIX_PIPE_BUF'. + * when kernel was built -`_PC_FILESIZEBITS' - Inquire about the availability of large files on the filesystem. + The set of available parameters depends on the kernel + configuration and can change while the system is running, + particularly when you load and unload loadable kernel modules. -`_PC_REC_INCR_XFER_SIZE' - Inquire about the value of `POSIX_REC_INCR_XFER_SIZE'. + The system parameters with which `syslog' is concerned are arranged + in a hierarchical structure like a hierarchical filesystem. To + identify a particular parameter, you specify a path through the + structure in a way analogous to specifying the pathname of a file. + Each component of the path is specified by an integer and each of + these integers has a macro defined for it by `sysctl.h'. NAMES is + the path, in the form of an array of integers. Each component of + the path is one element of the array, in order. NLEN is the + number of components in the path. -`_PC_REC_MAX_XFER_SIZE' - Inquire about the value of `POSIX_REC_MAX_XFER_SIZE'. + For example, the first component of the path for all the paging + parameters is the value `CTL_VM'. For the free page thresholds, + the second component of the path is `VM_FREEPG'. So to get the + free page threshold values, make NAMES an array containing the two + elements `CTL_VM' and `VM_FREEPG' and make NLEN = 2. -`_PC_REC_MIN_XFER_SIZE' - Inquire about the value of `POSIX_REC_MIN_XFER_SIZE'. + The format of the value of a parameter depends on the parameter. + Sometimes it is an integer; sometimes it is an ASCII string; + sometimes it is an elaborate structure. In the case of the free + page thresholds used in the example above, the parameter value is + a structure containing several integers. -`_PC_REC_XFER_ALIGN' - Inquire about the value of `POSIX_REC_XFER_ALIGN'. + In any case, you identify a place to return the parameter's value + with OLDVAL and specify the amount of storage available at that + location as *OLDLENP. *OLDLENP does double duty because it is + also the output location that contains the actual length of the + returned value. + + If you don't want the parameter value returned, specify a null + pointer for OLDVAL. + + To set the parameter, specify the address and length of the new + value as NEWVAL and NEWLEN. If you don't want to set the + parameter, specify a null pointer as NEWVAL. + + If you get and set a parameter in the same `sysctl' call, the value + returned is the value of the parameter before it was set. + + Each system parameter has a set of permissions similar to the + permissions for a file (including the permissions on directories + in its path) that determine whether you may get or set it. For + the purposes of these permissions, every parameter is considered + to be owned by the superuser and Group 0 so processes with that + effective uid or gid may have more access to system parameters. + Unlike with files, the superuser does not invariably have full + permission to all system parameters, because some of them are + designed not to be changed ever. + + `sysctl' returns a zero return value if it succeeds. Otherwise, it + returns `-1' and sets `errno' appropriately. Besides the failures + that apply to all system calls, the following are the `errno' + codes for all possible failures: + + `EPERM' + The process is not permitted to access one of the components + of the path of the system parameter or is not permitted to + access the system parameter itself in the way (read or write) + that it requested. + + `ENOTDIR' + There is no system parameter corresponding to NAME. + + `EFAULT' + OLDVAL is not null, which means the process wanted to read + the parameter, but *OLDLENP is zero, so there is no place to + return it. + + `EINVAL' + * The process attempted to set a system parameter to a + value that is not valid for that parameter. + + * The space provided for the return of the system + parameter is not the right size for that parameter. + + `ENOMEM' + This value may be returned instead of the more correct + `EINVAL' in some cases where the space provided for the + return of the system parameter is too small. + + + If you have a Linux kernel with the `proc' filesystem, you can get +and set most of the same parameters by reading and writing to files in +the `sys' directory of the `proc' filesystem. In the `sys' directory, +the directory structure represents the hierarchical structure of the +parameters. E.g. you can display the free page thresholds with + cat /proc/sys/vm/freepages + + Some more traditional and more widely available, though less general, +GNU C library functions for getting and setting some of the same system +parameters are: + + * `getdomainname', `setdomainname' + + * `gethostname', `sethostname' (*Note Host Identification::.) + + * `uname' (*Note Platform Type::.) + + * `bdflush'  -File: libc.info, Node: Utility Limits, Next: Utility Minimums, Prev: Pathconf, Up: System Configuration +File: libc.info, Node: System Configuration, Next: Cryptographic Functions, Prev: System Management, Up: Top -Utility Program Capacity Limits -=============================== +System Configuration Parameters +******************************* - The POSIX.2 standard specifies certain system limits that you can -access through `sysconf' that apply to utility behavior rather than the -behavior of the library or the operating system. + The functions and macros listed in this chapter give information +about configuration parameters of the operating system--for example, +capacity limits, presence of optional POSIX features, and the default +path for executable files (*note String Parameters::). - The GNU C library defines macros for these limits, and `sysconf' -returns values for them if you ask; but these values convey no -meaningful information. They are simply the smallest values that -POSIX.2 permits. +* Menu: - - Macro: int BC_BASE_MAX - The largest value of `obase' that the `bc' utility is guaranteed - to support. +* General Limits:: Constants and functions that describe + various process-related limits that have + one uniform value for any given machine. +* System Options:: Optional POSIX features. +* Version Supported:: Version numbers of POSIX.1 and POSIX.2. +* Sysconf:: Getting specific configuration values + of general limits and system options. +* Minimums:: Minimum values for general limits. - - Macro: int BC_DIM_MAX - The largest number of elements in one array that the `bc' utility - is guaranteed to support. +* Limits for Files:: Size limitations that pertain to individual files. + These can vary between file systems + or even from file to file. +* Options for Files:: Optional features that some files may support. +* File Minimums:: Minimum values for file limits. +* Pathconf:: Getting the limit values for a particular file. - - Macro: int BC_SCALE_MAX - The largest value of `scale' that the `bc' utility is guaranteed - to support. +* Utility Limits:: Capacity limits of some POSIX.2 utility programs. +* Utility Minimums:: Minimum allowable values of those limits. - - Macro: int BC_STRING_MAX - The largest number of characters in one string constant that the - `bc' utility is guaranteed to support. +* String Parameters:: Getting the default search path. - - Macro: int COLL_WEIGHTS_MAX - The largest number of weights that can necessarily be used in - defining the collating sequence for a locale. + +File: libc.info, Node: General Limits, Next: System Options, Up: System Configuration - - Macro: int EXPR_NEST_MAX - The maximum number of expressions that can be nested within - parenthesis by the `expr' utility. +General Capacity Limits +======================= - - Macro: int LINE_MAX - The largest text line that the text-oriented POSIX.2 utilities can - support. (If you are using the GNU versions of these utilities, - then there is no actual limit except that imposed by the available - virtual memory, but there is no way that the library can tell you - this.) + The POSIX.1 and POSIX.2 standards specify a number of parameters that +describe capacity limitations of the system. These limits can be fixed +constants for a given operating system, or they can vary from machine to +machine. For example, some limit values may be configurable by the +system administrator, either at run time or by rebuilding the kernel, +and this should not require recompiling application programs. - - Macro: int EQUIV_CLASS_MAX - The maximum number of weights that can be assigned to an entry of - the `LC_COLLATE' category `order' keyword in a locale definition. - The GNU C library does not presently support locale definitions. + Each of the following limit parameters has a macro that is defined in +`limits.h' only if the system has a fixed, uniform limit for the +parameter in question. If the system allows different file systems or +files to have different limits, then the macro is undefined; use +`sysconf' to find out the limit that applies at a particular time on a +particular machine. *Note Sysconf::. + + Each of these parameters also has another macro, with a name starting +with `_POSIX', which gives the lowest value that the limit is allowed +to have on _any_ POSIX system. *Note Minimums::. + + - Macro: int ARG_MAX + If defined, the unvarying maximum combined length of the ARGV and + ENVIRON arguments that can be passed to the `exec' functions. + + - Macro: int CHILD_MAX + If defined, the unvarying maximum number of processes that can + exist with the same real user ID at any one time. In BSD and GNU, + this is controlled by the `RLIMIT_NPROC' resource limit; *note + Limits on Resources::. + + - Macro: int OPEN_MAX + If defined, the unvarying maximum number of files that a single + process can have open simultaneously. In BSD and GNU, this is + controlled by the `RLIMIT_NOFILE' resource limit; *note Limits on + Resources::. + + - Macro: int STREAM_MAX + If defined, the unvarying maximum number of streams that a single + process can have open simultaneously. *Note Opening Streams::. + + - Macro: int TZNAME_MAX + If defined, the unvarying maximum length of a time zone name. + *Note Time Zone Functions::. + + These limit macros are always defined in `limits.h'. + + - Macro: int NGROUPS_MAX + The maximum number of supplementary group IDs that one process can + have. + + The value of this macro is actually a lower bound for the maximum. + That is, you can count on being able to have that many + supplementary group IDs, but a particular machine might let you + have even more. You can use `sysconf' to see whether a particular + machine will let you have more (*note Sysconf::). + + - Macro: int SSIZE_MAX + The largest value that can fit in an object of type `ssize_t'. + Effectively, this is the limit on the number of bytes that can be + read or written in a single operation. + + This macro is defined in all POSIX systems because this limit is + never configurable. + + - Macro: int RE_DUP_MAX + The largest number of repetitions you are guaranteed is allowed in + the construct `\{MIN,MAX\}' in a regular expression. + + The value of this macro is actually a lower bound for the maximum. + That is, you can count on being able to have that many + repetitions, but a particular machine might let you have even + more. You can use `sysconf' to see whether a particular machine + will let you have more (*note Sysconf::). And even the value that + `sysconf' tells you is just a lower bound--larger values might + work. + + This macro is defined in all POSIX.2 systems, because POSIX.2 says + it should always be defined even if there is no specific imposed + limit.  -File: libc.info, Node: Utility Minimums, Next: String Parameters, Prev: Utility Limits, Up: System Configuration +File: libc.info, Node: System Options, Next: Version Supported, Prev: General Limits, Up: System Configuration -Minimum Values for Utility Limits -================================= +Overall System Options +====================== -`_POSIX2_BC_BASE_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - value of `obase' in the `bc' utility. Its value is `99'. + POSIX defines certain system-specific options that not all POSIX +systems support. Since these options are provided in the kernel, not +in the library, simply using the GNU C library does not guarantee any +of these features is supported; it depends on the system you are using. -`_POSIX2_BC_DIM_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - size of an array in the `bc' utility. Its value is `2048'. + You can test for the availability of a given option using the macros +in this section, together with the function `sysconf'. The macros are +defined only if you include `unistd.h'. -`_POSIX2_BC_SCALE_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - value of `scale' in the `bc' utility. Its value is `99'. + For the following macros, if the macro is defined in `unistd.h', +then the option is supported. Otherwise, the option may or may not be +supported; use `sysconf' to find out. *Note Sysconf::. -`_POSIX2_BC_STRING_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - size of a string constant in the `bc' utility. Its value is - `1000'. + - Macro: int _POSIX_JOB_CONTROL + If this symbol is defined, it indicates that the system supports + job control. Otherwise, the implementation behaves as if all + processes within a session belong to a single process group. + *Note Job Control::. -`_POSIX2_COLL_WEIGHTS_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - number of weights that can necessarily be used in defining the - collating sequence for a locale. Its value is `2'. + - Macro: int _POSIX_SAVED_IDS + If this symbol is defined, it indicates that the system remembers + the effective user and group IDs of a process before it executes an + executable file with the set-user-ID or set-group-ID bits set, and + that explicitly changing the effective user or group IDs back to + these values is permitted. If this option is not defined, then if + a nonprivileged process changes its effective user or group ID to + the real user or group ID of the process, it can't change it back + again. *Note Enable/Disable Setuid::. -`_POSIX2_EXPR_NEST_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - number of expressions nested within parenthesis when using the - `expr' utility. Its value is `32'. + For the following macros, if the macro is defined in `unistd.h', +then its value indicates whether the option is supported. A value of +`-1' means no, and any other value means yes. If the macro is not +defined, then the option may or may not be supported; use `sysconf' to +find out. *Note Sysconf::. -`_POSIX2_LINE_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - size of a text line that the text utilities can handle. Its value - is `2048'. + - Macro: int _POSIX2_C_DEV + If this symbol is defined, it indicates that the system has the + POSIX.2 C compiler command, `c89'. The GNU C library always + defines this as `1', on the assumption that you would not have + installed it if you didn't have a C compiler. -`_POSIX2_EQUIV_CLASS_MAX' - The most restrictive limit permitted by POSIX.2 for the maximum - number of weights that can be assigned to an entry of the - `LC_COLLATE' category `order' keyword in a locale definition. Its - value is `2'. The GNU C library does not presently support locale - definitions. + - Macro: int _POSIX2_FORT_DEV + If this symbol is defined, it indicates that the system has the + POSIX.2 Fortran compiler command, `fort77'. The GNU C library + never defines this, because we don't know what the system has. + + - Macro: int _POSIX2_FORT_RUN + If this symbol is defined, it indicates that the system has the + POSIX.2 `asa' command to interpret Fortran carriage control. The + GNU C library never defines this, because we don't know what the + system has. + + - Macro: int _POSIX2_LOCALEDEF + If this symbol is defined, it indicates that the system has the + POSIX.2 `localedef' command. The GNU C library never defines + this, because we don't know what the system has. + + - Macro: int _POSIX2_SW_DEV + If this symbol is defined, it indicates that the system has the + POSIX.2 commands `ar', `make', and `strip'. The GNU C library + always defines this as `1', on the assumption that you had to have + `ar' and `make' to install the library, and it's unlikely that + `strip' would be absent when those are present.  -File: libc.info, Node: String Parameters, Prev: Utility Minimums, Up: System Configuration +File: libc.info, Node: Version Supported, Next: Sysconf, Prev: System Options, Up: System Configuration -String-Valued Parameters -======================== +Which Version of POSIX is Supported +=================================== - POSIX.2 defines a way to get string-valued parameters from the -operating system with the function `confstr': + - Macro: long int _POSIX_VERSION + This constant represents the version of the POSIX.1 standard to + which the implementation conforms. For an implementation + conforming to the 1995 POSIX.1 standard, the value is the integer + `199506L'. - - Function: size_t confstr (int PARAMETER, char *BUF, size_t LEN) - This function reads the value of a string-valued system parameter, - storing the string into LEN bytes of memory space starting at BUF. - The PARAMETER argument should be one of the `_CS_' symbols listed - below. + `_POSIX_VERSION' is always defined (in `unistd.h') in any POSIX + system. - The normal return value from `confstr' is the length of the string - value that you asked for. If you supply a null pointer for BUF, - then `confstr' does not try to store the string; it just returns - its length. A value of `0' indicates an error. + *Usage Note:* Don't try to test whether the system supports POSIX + by including `unistd.h' and then checking whether `_POSIX_VERSION' + is defined. On a non-POSIX system, this will probably fail + because there is no `unistd.h'. We do not know of _any_ way you + can reliably test at compilation time whether your target system + supports POSIX or whether `unistd.h' exists. - If the string you asked for is too long for the buffer (that is, - longer than `LEN - 1'), then `confstr' stores just that much - (leaving room for the terminating null character). You can tell - that this has happened because `confstr' returns a value greater - than or equal to LEN. + The GNU C compiler predefines the symbol `__POSIX__' if the target + system is a POSIX system. Provided you do not use any other + compilers on POSIX systems, testing `defined (__POSIX__)' will + reliably detect such systems. + + - Macro: long int _POSIX2_C_VERSION + This constant represents the version of the POSIX.2 standard which + the library and system kernel support. We don't know what value + this will be for the first version of the POSIX.2 standard, + because the value is based on the year and month in which the + standard is officially adopted. + + The value of this symbol says nothing about the utilities + installed on the system. + + *Usage Note:* You can use this macro to tell whether a POSIX.1 + system library supports POSIX.2 as well. Any POSIX.1 system + contains `unistd.h', so include that file and then test `defined + (_POSIX2_C_VERSION)'. + + +File: libc.info, Node: Sysconf, Next: Minimums, Prev: Version Supported, Up: System Configuration + +Using `sysconf' +=============== + + When your system has configurable system limits, you can use the +`sysconf' function to find out the value that applies to any particular +machine. The function and the associated PARAMETER constants are +declared in the header file `unistd.h'. + +* Menu: + +* Sysconf Definition:: Detailed specifications of `sysconf'. +* Constants for Sysconf:: The list of parameters `sysconf' can read. +* Examples of Sysconf:: How to use `sysconf' and the parameter + macros properly together. + + +File: libc.info, Node: Sysconf Definition, Next: Constants for Sysconf, Up: Sysconf + +Definition of `sysconf' +----------------------- + + - Function: long int sysconf (int PARAMETER) + This function is used to inquire about runtime system parameters. + The PARAMETER argument should be one of the `_SC_' symbols listed + below. + + The normal return value from `sysconf' is the value you requested. + A value of `-1' is returned both if the implementation does not + impose a limit, and in case of an error. The following `errno' error conditions are defined for this function: @@ -550,666 +906,448 @@ operating system with the function `conf `EINVAL' The value of the PARAMETER is invalid. - Currently there is just one parameter you can read with `confstr': + +File: libc.info, Node: Constants for Sysconf, Next: Examples of Sysconf, Prev: Sysconf Definition, Up: Sysconf -`_CS_PATH' - This parameter's value is the recommended default path for - searching for executable files. This is the path that a user has - by default just after logging in. +Constants for `sysconf' Parameters +---------------------------------- -`_CS_LFS_CFLAGS' - The returned string specifies which additional flags must be given - to the C compiler if a source is compiled using the - `_LARGEFILE_SOURCE' feature select macro; *note Feature Test - Macros::. + Here are the symbolic constants for use as the PARAMETER argument to +`sysconf'. The values are all integer constants (more specifically, +enumeration type values). -`_CS_LFS_LDFLAGS' - The returned string specifies which additional flags must be given - to the linker if a source is compiled using the - `_LARGEFILE_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_ARG_MAX' + Inquire about the parameter corresponding to `ARG_MAX'. -`_CS_LFS_LIBS' - The returned string specifies which additional libraries must be - linked to the application if a source is compiled using the - `_LARGEFILE_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_CHILD_MAX' + Inquire about the parameter corresponding to `CHILD_MAX'. -`_CS_LFS_LINTFLAGS' - The returned string specifies which additional flags must be given - to the lint tool if a source is compiled using the - `_LARGEFILE_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_OPEN_MAX' + Inquire about the parameter corresponding to `OPEN_MAX'. -`_CS_LFS64_CFLAGS' - The returned string specifies which additional flags must be given - to the C compiler if a source is compiled using the - `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_STREAM_MAX' + Inquire about the parameter corresponding to `STREAM_MAX'. -`_CS_LFS64_LDFLAGS' - The returned string specifies which additional flags must be given - to the linker if a source is compiled using the - `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_TZNAME_MAX' + Inquire about the parameter corresponding to `TZNAME_MAX'. -`_CS_LFS64_LIBS' - The returned string specifies which additional libraries must be - linked to the application if a source is compiled using the - `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_NGROUPS_MAX' + Inquire about the parameter corresponding to `NGROUPS_MAX'. -`_CS_LFS64_LINTFLAGS' - The returned string specifies which additional flags must be given - to the lint tool if a source is compiled using the - `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test - Macros::. +`_SC_JOB_CONTROL' + Inquire about the parameter corresponding to `_POSIX_JOB_CONTROL'. - The way to use `confstr' without any arbitrary limit on string size -is to call it twice: first call it to get the length, allocate the -buffer accordingly, and then call `confstr' again to fill the buffer, -like this: +`_SC_SAVED_IDS' + Inquire about the parameter corresponding to `_POSIX_SAVED_IDS'. - char * - get_default_path (void) - { - size_t len = confstr (_CS_PATH, NULL, 0); - char *buffer = (char *) xmalloc (len); - - if (confstr (_CS_PATH, buf, len + 1) == 0) - { - free (buffer); - return NULL; - } - - return buffer; - } +`_SC_VERSION' + Inquire about the parameter corresponding to `_POSIX_VERSION'. - -File: libc.info, Node: Cryptographic Functions, Next: Debugging Support, Prev: System Configuration, Up: Top +`_SC_CLK_TCK' + Inquire about the parameter corresponding to `CLOCKS_PER_SEC'; + *note CPU Time::. -DES Encryption and Password Handling -************************************ +`_SC_CHARCLASS_NAME_MAX' + Inquire about the parameter corresponding to maximal length + allowed for a character class name in an extended locale + specification. These extensions are not yet standardized and so + this option is not standardized as well. - On many systems, it is unnecessary to have any kind of user -authentication; for instance, a workstation which is not connected to a -network probably does not need any user authentication, because to use -the machine an intruder must have physical access. +`_SC_REALTIME_SIGNALS' + Inquire about the parameter corresponding to + `_POSIX_REALTIME_SIGNALS'. - Sometimes, however, it is necessary to be sure that a user is -authorized to use some service a machine provides--for instance, to log -in as a particular user id (*note Users and Groups::). One traditional -way of doing this is for each user to choose a secret "password"; then, -the system can ask someone claiming to be a user what the user's -password is, and if the person gives the correct password then the -system can grant the appropriate privileges. +`_SC_PRIORITY_SCHEDULING' + Inquire about the parameter corresponding to + `_POSIX_PRIORITY_SCHEDULING'. - If all the passwords are just stored in a file somewhere, then this -file has to be very carefully protected. To avoid this, passwords are -run through a "one-way function", a function which makes it difficult to -work out what its input was by looking at its output, before storing in -the file. +`_SC_TIMERS' + Inquire about the parameter corresponding to `_POSIX_TIMERS'. - The GNU C library already provides a one-way function based on MD5 -and for compatibility with Unix systems the standard one-way function -based on the Data Encryption Standard. +`_SC_ASYNCHRONOUS_IO' + Inquire about the parameter corresponding to + `_POSIX_ASYNCHRONOUS_IO'. - It also provides support for Secure RPC, and some library functions -that can be used to perform normal DES encryption. +`_SC_PRIORITIZED_IO' + Inquire about the parameter corresponding to + `_POSIX_PRIORITIZED_IO'. -* Menu: +`_SC_SYNCHRONIZED_IO' + Inquire about the parameter corresponding to + `_POSIX_SYNCHRONIZED_IO'. -* Legal Problems:: This software can get you locked up, or worse. -* getpass:: Prompting the user for a password. -* crypt:: A one-way function for UNIX passwords. -* DES Encryption:: Routines for DES encryption. +`_SC_FSYNC' + Inquire about the parameter corresponding to `_POSIX_FSYNC'. - -File: libc.info, Node: Legal Problems, Next: getpass, Up: Cryptographic Functions +`_SC_MAPPED_FILES' + Inquire about the parameter corresponding to `_POSIX_MAPPED_FILES'. -Legal Problems -============== +`_SC_MEMLOCK' + Inquire about the parameter corresponding to `_POSIX_MEMLOCK'. - Because of the continuously changing state of the law, it's not -possible to provide a definitive survey of the laws affecting -cryptography. Instead, this section warns you of some of the known -trouble spots; this may help you when you try to find out what the laws -of your country are. +`_SC_MEMLOCK_RANGE' + Inquire about the parameter corresponding to + `_POSIX_MEMLOCK_RANGE'. - Some countries require that you have a licence to use, possess, or -import cryptography. These countries are believed to include -Byelorussia, Burma, India, Indonesia, Israel, Kazakhstan, Pakistan, -Russia, and Saudi Arabia. +`_SC_MEMORY_PROTECTION' + Inquire about the parameter corresponding to + `_POSIX_MEMORY_PROTECTION'. - Some countries restrict the transmission of encrypted messages by -radio; some telecommunications carriers restrict the transmission of -encrypted messages over their network. +`_SC_MESSAGE_PASSING' + Inquire about the parameter corresponding to + `_POSIX_MESSAGE_PASSING'. - Many countries have some form of export control for encryption -software. The Wassenaar Arrangement is a multilateral agreement -between 33 countries (Argentina, Australia, Austria, Belgium, Bulgaria, -Canada, the Czech Republic, Denmark, Finland, France, Germany, Greece, -Hungary, Ireland, Italy, Japan, Luxembourg, the Netherlands, New -Zealand, Norway, Poland, Portugal, the Republic of Korea, Romania, the -Russian Federation, the Slovak Republic, Spain, Sweden, Switzerland, -Turkey, Ukraine, the United Kingdom and the United States) which -restricts some kinds of encryption exports. Different countries apply -the arrangement in different ways; some do not allow the exception for -certain kinds of "public domain" software (which would include this -library), some only restrict the export of software in tangible form, -and others impose significant additional restrictions. +`_SC_SEMAPHORES' + Inquire about the parameter corresponding to `_POSIX_SEMAPHORES'. - The United States has additional rules. This software would -generally be exportable under 15 CFR 740.13(e), which permits exports of -"encryption source code" which is "publicly available" and which is -"not subject to an express agreement for the payment of a licensing fee -or royalty for commercial production or sale of any product developed -with the source code" to most countries. +`_SC_SHARED_MEMORY_OBJECTS' + Inquire about the parameter corresponding to + `_POSIX_SHARED_MEMORY_OBJECTS'. - The rules in this area are continuously changing. If you know of any -information in this manual that is out-of-date, please report it using -the `glibcbug' script. *Note Reporting Bugs::. +`_SC_AIO_LISTIO_MAX' + Inquire about the parameter corresponding to + `_POSIX_AIO_LISTIO_MAX'. - -File: libc.info, Node: getpass, Next: crypt, Prev: Legal Problems, Up: Cryptographic Functions +`_SC_AIO_MAX' + Inquire about the parameter corresponding to `_POSIX_AIO_MAX'. -Reading Passwords -================= +`_SC_AIO_PRIO_DELTA_MAX' + Inquire the value by which a process can decrease its asynchronous + I/O priority level from its own scheduling priority. This + corresponds to the run-time invariant value `AIO_PRIO_DELTA_MAX'. - When reading in a password, it is desirable to avoid displaying it on -the screen, to help keep it secret. The following function handles this -in a convenient way. +`_SC_DELAYTIMER_MAX' + Inquire about the parameter corresponding to + `_POSIX_DELAYTIMER_MAX'. - - Function: char * getpass (const char *PROMPT) - `getpass' outputs PROMPT, then reads a string in from the terminal - without echoing it. It tries to connect to the real terminal, - `/dev/tty', if possible, to encourage users not to put plaintext - passwords in files; otherwise, it uses `stdin' and `stderr'. - `getpass' also disables the INTR, QUIT, and SUSP characters on the - terminal using the `ISIG' terminal attribute (*note Local Modes::). - The terminal is flushed before and after `getpass', so that - characters of a mistyped password are not accidentally visible. +`_SC_MQ_OPEN_MAX' + Inquire about the parameter corresponding to `_POSIX_MQ_OPEN_MAX'. - In other C libraries, `getpass' may only return the first - `PASS_MAX' bytes of a password. The GNU C library has no limit, so - `PASS_MAX' is undefined. +`_SC_MQ_PRIO_MAX' + Inquire about the parameter corresponding to `_POSIX_MQ_PRIO_MAX'. - The prototype for this function is in `unistd.h'. `PASS_MAX' - would be defined in `limits.h'. +`_SC_RTSIG_MAX' + Inquire about the parameter corresponding to `_POSIX_RTSIG_MAX'. - This precise set of operations may not suit all possible situations. -In this case, it is recommended that users write their own `getpass' -substitute. For instance, a very simple substitute is as follows: +`_SC_SEM_NSEMS_MAX' + Inquire about the parameter corresponding to + `_POSIX_SEM_NSEMS_MAX'. - #include - #include - - ssize_t - my_getpass (char **lineptr, size_t *n, FILE *stream) - { - struct termios old, new; - int nread; - - /* Turn echoing off and fail if we can't. */ - if (tcgetattr (fileno (stream), &old) != 0) - return -1; - new = old; - new.c_lflag &= ~ECHO; - if (tcsetattr (fileno (stream), TCSAFLUSH, &new) != 0) - return -1; - - /* Read the password. */ - nread = getline (lineptr, n, stream); - - /* Restore terminal. */ - (void) tcsetattr (fileno (stream), TCSAFLUSH, &old); - - return nread; - } +`_SC_SEM_VALUE_MAX' + Inquire about the parameter corresponding to + `_POSIX_SEM_VALUE_MAX'. - The substitute takes the same parameters as `getline' (*note Line -Input::); the user must print any prompt desired. +`_SC_SIGQUEUE_MAX' + Inquire about the parameter corresponding to `_POSIX_SIGQUEUE_MAX'. - -File: libc.info, Node: crypt, Next: DES Encryption, Prev: getpass, Up: Cryptographic Functions +`_SC_TIMER_MAX' + Inquire about the parameter corresponding to `_POSIX_TIMER_MAX'. -Encrypting Passwords -==================== +`_SC_PII' + Inquire about the parameter corresponding to `_POSIX_PII'. - - Function: char * crypt (const char *KEY, const char *SALT) - The `crypt' function takes a password, KEY, as a string, and a - SALT character array which is described below, and returns a - printable ASCII string which starts with another salt. It is - believed that, given the output of the function, the best way to - find a KEY that will produce that output is to guess values of KEY - until the original value of KEY is found. +`_SC_PII_XTI' + Inquire about the parameter corresponding to `_POSIX_PII_XTI'. - The SALT parameter does two things. Firstly, it selects which - algorithm is used, the MD5-based one or the DES-based one. - Secondly, it makes life harder for someone trying to guess - passwords against a file containing many passwords; without a - SALT, an intruder can make a guess, run `crypt' on it once, and - compare the result with all the passwords. With a SALT, the - intruder must run `crypt' once for each different salt. +`_SC_PII_SOCKET' + Inquire about the parameter corresponding to `_POSIX_PII_SOCKET'. - For the MD5-based algorithm, the SALT should consist of the string - `$1$', followed by up to 8 characters, terminated by either - another `$' or the end of the string. The result of `crypt' will - be the SALT, followed by a `$' if the salt didn't end with one, - followed by 22 characters from the alphabet `./0-9A-Za-z', up to - 34 characters total. Every character in the KEY is significant. +`_SC_PII_INTERNET' + Inquire about the parameter corresponding to `_POSIX_PII_INTERNET'. - For the DES-based algorithm, the SALT should consist of two - characters from the alphabet `./0-9A-Za-z', and the result of - `crypt' will be those two characters followed by 11 more from the - same alphabet, 13 in total. Only the first 8 characters in the - KEY are significant. +`_SC_PII_OSI' + Inquire about the parameter corresponding to `_POSIX_PII_OSI'. - The MD5-based algorithm has no limit on the useful length of the - password used, and is slightly more secure. It is therefore - preferred over the DES-based algorithm. +`_SC_SELECT' + Inquire about the parameter corresponding to `_POSIX_SELECT'. - When the user enters their password for the first time, the SALT - should be set to a new string which is reasonably random. To - verify a password against the result of a previous call to - `crypt', pass the result of the previous call as the SALT. +`_SC_UIO_MAXIOV' + Inquire about the parameter corresponding to `_POSIX_UIO_MAXIOV'. - The following short program is an example of how to use `crypt' the -first time a password is entered. Note that the SALT generation is -just barely acceptable; in particular, it is not unique between -machines, and in many applications it would not be acceptable to let an -attacker know what time the user's password was last set. +`_SC_PII_INTERNET_STREAM' + Inquire about the parameter corresponding to + `_POSIX_PII_INTERNET_STREAM'. - #include - #include - #include - #include - - int - main(void) - { - unsigned long seed[2]; - char salt[] = "$1$........"; - const char *const seedchars = - "./0123456789ABCDEFGHIJKLMNOPQRST" - "UVWXYZabcdefghijklmnopqrstuvwxyz"; - char *password; - int i; - - /* Generate a (not very) random seed. - You should do it better than this... */ - seed[0] = time(NULL); - seed[1] = getpid() ^ (seed[0] >> 14 & 0x30000); - - /* Turn it into printable characters from `seedchars'. */ - for (i = 0; i < 8; i++) - salt[3+i] = seedchars[(seed[i/5] >> (i%5)*6) & 0x3f]; - - /* Read in the user's password and encrypt it. */ - password = crypt(getpass("Password:"), salt); - - /* Print the results. */ - puts(password); - return 0; - } +`_SC_PII_INTERNET_DGRAM' + Inquire about the parameter corresponding to + `_POSIX_PII_INTERNET_DGRAM'. - The next program shows how to verify a password. It prompts the user -for a password and prints "Access granted." if the user types `GNU libc -manual'. +`_SC_PII_OSI_COTS' + Inquire about the parameter corresponding to `_POSIX_PII_OSI_COTS'. - #include - #include - #include - #include - - int - main(void) - { - /* Hashed form of "GNU libc manual". */ - const char *const pass = "$1$/iSaq7rB$EoUw5jJPPvAPECNaaWzMK/"; - - char *result; - int ok; - - /* Read in the user's password and encrypt it, - passing the expected password in as the salt. */ - result = crypt(getpass("Password:"), pass); - - /* Test the result. */ - ok = strcmp (result, pass) == 0; - - puts(ok ? "Access granted." : "Access denied."); - return ok ? 0 : 1; - } +`_SC_PII_OSI_CLTS' + Inquire about the parameter corresponding to `_POSIX_PII_OSI_CLTS'. - - Function: char * crypt_r (const char *KEY, const char *SALT, struct - crypt_data * DATA) - The `crypt_r' function does the same thing as `crypt', but takes - an extra parameter which includes space for its result (among - other things), so it can be reentrant. `data->initialized' must be - cleared to zero before the first time `crypt_r' is called. +`_SC_PII_OSI_M' + Inquire about the parameter corresponding to `_POSIX_PII_OSI_M'. - The `crypt_r' function is a GNU extension. +`_SC_T_IOV_MAX' + Inquire the value of the value associated with the `T_IOV_MAX' + variable. - The `crypt' and `crypt_r' functions are prototyped in the header -`crypt.h'. +`_SC_THREADS' + Inquire about the parameter corresponding to `_POSIX_THREADS'. - -File: libc.info, Node: DES Encryption, Prev: crypt, Up: Cryptographic Functions +`_SC_THREAD_SAFE_FUNCTIONS' + Inquire about the parameter corresponding to + `_POSIX_THREAD_SAFE_FUNCTIONS'. -DES Encryption -============== +`_SC_GETGR_R_SIZE_MAX' + Inquire about the parameter corresponding to + `_POSIX_GETGR_R_SIZE_MAX'. - The Data Encryption Standard is described in the US Government -Federal Information Processing Standards (FIPS) 46-3 published by the -National Institute of Standards and Technology. The DES has been very -thoroughly analyzed since it was developed in the late 1970s, and no new -significant flaws have been found. +`_SC_GETPW_R_SIZE_MAX' + Inquire about the parameter corresponding to + `_POSIX_GETPW_R_SIZE_MAX'. - However, the DES uses only a 56-bit key (plus 8 parity bits), and a -machine has been built in 1998 which can search through all possible -keys in about 6 days, which cost about US$200000; faster searches would -be possible with more money. This makes simple DES insecure for most -purposes, and NIST no longer permits new US government systems to use -simple DES. +`_SC_LOGIN_NAME_MAX' + Inquire about the parameter corresponding to + `_POSIX_LOGIN_NAME_MAX'. - For serious encryption functionality, it is recommended that one of -the many free encryption libraries be used instead of these routines. +`_SC_TTY_NAME_MAX' + Inquire about the parameter corresponding to `_POSIX_TTY_NAME_MAX'. - The DES is a reversible operation which takes a 64-bit block and a -64-bit key, and produces another 64-bit block. Usually the bits are -numbered so that the most-significant bit, the first bit, of each block -is numbered 1. +`_SC_THREAD_DESTRUCTOR_ITERATIONS' + Inquire about the parameter corresponding to + `_POSIX_THREAD_DESTRUCTOR_ITERATIONS'. - Under that numbering, every 8th bit of the key (the 8th, 16th, and so -on) is not used by the encryption algorithm itself. But the key must -have odd parity; that is, out of bits 1 through 8, and 9 through 16, and -so on, there must be an odd number of `1' bits, and this completely -specifies the unused bits. +`_SC_THREAD_KEYS_MAX' + Inquire about the parameter corresponding to + `_POSIX_THREAD_KEYS_MAX'. - - Function: void setkey (const char *KEY) - The `setkey' function sets an internal data structure to be an - expanded form of KEY. KEY is specified as an array of 64 bits - each stored in a `char', the first bit is `key[0]' and the 64th - bit is `key[63]'. The KEY should have the correct parity. +`_SC_THREAD_STACK_MIN' + Inquire about the parameter corresponding to + `_POSIX_THREAD_STACK_MIN'. - - Function: void encrypt (char *BLOCK, int EDFLAG) - The `encrypt' function encrypts BLOCK if EDFLAG is 0, otherwise it - decrypts BLOCK, using a key previously set by `setkey'. The - result is placed in BLOCK. +`_SC_THREAD_THREADS_MAX' + Inquire about the parameter corresponding to + `_POSIX_THREAD_THREADS_MAX'. - Like `setkey', BLOCK is specified as an array of 64 bits each - stored in a `char', but there are no parity bits in BLOCK. +`_SC_THREAD_ATTR_STACKADDR' + Inquire about the parameter corresponding to + a `_POSIX_THREAD_ATTR_STACKADDR'. - - Function: void setkey_r (const char *KEY, struct crypt_data * DATA) - - Function: void encrypt_r (char *BLOCK, int EDFLAG, struct crypt_data - * DATA) - These are reentrant versions of `setkey' and `encrypt'. The only - difference is the extra parameter, which stores the expanded - version of KEY. Before calling `setkey_r' the first time, - `data->initialized' must be cleared to zero. +`_SC_THREAD_ATTR_STACKSIZE' + Inquire about the parameter corresponding to + `_POSIX_THREAD_ATTR_STACKSIZE'. - The `setkey_r' and `encrypt_r' functions are GNU extensions. -`setkey', `encrypt', `setkey_r', and `encrypt_r' are defined in -`crypt.h'. +`_SC_THREAD_PRIORITY_SCHEDULING' + Inquire about the parameter corresponding to + `_POSIX_THREAD_PRIORITY_SCHEDULING'. - - Function: int ecb_crypt (char *KEY, char *BLOCKS, unsigned LEN, - unsigned MODE) - The function `ecb_crypt' encrypts or decrypts one or more blocks - using DES. Each block is encrypted independently. +`_SC_THREAD_PRIO_INHERIT' + Inquire about the parameter corresponding to + `_POSIX_THREAD_PRIO_INHERIT'. - The BLOCKS and the KEY are stored packed in 8-bit bytes, so that - the first bit of the key is the most-significant bit of `key[0]' - and the 63rd bit of the key is stored as the least-significant bit - of `key[7]'. The KEY should have the correct parity. +`_SC_THREAD_PRIO_PROTECT' + Inquire about the parameter corresponding to + `_POSIX_THREAD_PRIO_PROTECT'. - LEN is the number of bytes in BLOCKS. It should be a multiple of - 8 (so that there is a whole number of blocks to encrypt). LEN is - limited to a maximum of `DES_MAXDATA' bytes. +`_SC_THREAD_PROCESS_SHARED' + Inquire about the parameter corresponding to + `_POSIX_THREAD_PROCESS_SHARED'. - The result of the encryption replaces the input in BLOCKS. +`_SC_2_C_DEV' + Inquire about whether the system has the POSIX.2 C compiler + command, `c89'. - The MODE parameter is the bitwise OR of two of the following: +`_SC_2_FORT_DEV' + Inquire about whether the system has the POSIX.2 Fortran compiler + command, `fort77'. - `DES_ENCRYPT' - This constant, used in the MODE parameter, specifies that - BLOCKS is to be encrypted. +`_SC_2_FORT_RUN' + Inquire about whether the system has the POSIX.2 `asa' command to + interpret Fortran carriage control. - `DES_DECRYPT' - This constant, used in the MODE parameter, specifies that - BLOCKS is to be decrypted. +`_SC_2_LOCALEDEF' + Inquire about whether the system has the POSIX.2 `localedef' + command. - `DES_HW' - This constant, used in the MODE parameter, asks to use a - hardware device. If no hardware device is available, - encryption happens anyway, but in software. +`_SC_2_SW_DEV' + Inquire about whether the system has the POSIX.2 commands `ar', + `make', and `strip'. - `DES_SW' - This constant, used in the MODE parameter, specifies that no - hardware device is to be used. +`_SC_BC_BASE_MAX' + Inquire about the maximum value of `obase' in the `bc' utility. - The result of the function will be one of these values: +`_SC_BC_DIM_MAX' + Inquire about the maximum size of an array in the `bc' utility. - `DESERR_NONE' - The encryption succeeded. +`_SC_BC_SCALE_MAX' + Inquire about the maximum value of `scale' in the `bc' utility. - `DESERR_NOHWDEVICE' - The encryption succeeded, but there was no hardware device - available. +`_SC_BC_STRING_MAX' + Inquire about the maximum size of a string constant in the `bc' + utility. - `DESERR_HWERROR' - The encryption failed because of a hardware problem. +`_SC_COLL_WEIGHTS_MAX' + Inquire about the maximum number of weights that can necessarily + be used in defining the collating sequence for a locale. - `DESERR_BADPARAM' - The encryption failed because of a bad parameter, for - instance LEN is not a multiple of 8 or LEN is larger than - `DES_MAXDATA'. +`_SC_EXPR_NEST_MAX' + Inquire about the maximum number of expressions nested within + parentheses when using the `expr' utility. - - Function: int DES_FAILED (int ERR) - This macro returns 1 if ERR is a `success' result code from - `ecb_crypt' or `cbc_crypt', and 0 otherwise. +`_SC_LINE_MAX' + Inquire about the maximum size of a text line that the POSIX.2 text + utilities can handle. - - Function: int cbc_crypt (char *KEY, char *BLOCKS, unsigned LEN, - unsigned MODE, char *IVEC) - The function `cbc_crypt' encrypts or decrypts one or more blocks - using DES in Cipher Block Chaining mode. +`_SC_EQUIV_CLASS_MAX' + Inquire about the maximum number of weights that can be assigned + to an entry of the `LC_COLLATE' category `order' keyword in a + locale definition. The GNU C library does not presently support + locale definitions. - For encryption in CBC mode, each block is exclusive-ored with IVEC - before being encrypted, then IVEC is replaced with the result of - the encryption, then the next block is processed. Decryption is - the reverse of this process. +`_SC_VERSION' + Inquire about the version number of POSIX.1 that the library and + kernel support. - This has the advantage that blocks which are the same before being - encrypted are very unlikely to be the same after being encrypted, - making it much harder to detect patterns in the data. +`_SC_2_VERSION' + Inquire about the version number of POSIX.2 that the system + utilities support. - Usually, IVEC is set to 8 random bytes before encryption starts. - Then the 8 random bytes are transmitted along with the encrypted - data (without themselves being encrypted), and passed back in as - IVEC for decryption. Another possibility is to set IVEC to 8 - zeroes initially, and have the first the block encrypted consist - of 8 random bytes. +`_SC_PAGESIZE' + Inquire about the virtual memory page size of the machine. + `getpagesize' returns the same value (*note Query Memory + Parameters::). - Otherwise, all the parameters are similar to those for `ecb_crypt'. +`_SC_NPROCESSORS_CONF' + Inquire about the number of configured processors. - - Function: void des_setparity (char *KEY) - The function `des_setparity' changes the 64-bit KEY, stored packed - in 8-bit bytes, to have odd parity by altering the low bits of - each byte. +`_SC_NPROCESSORS_ONLN' + Inquire about the number of processors online. - The `ecb_crypt', `cbc_crypt', and `des_setparity' functions and -their accompanying macros are all defined in the header -`rpc/des_crypt.h'. +`_SC_PHYS_PAGES' + Inquire about the number of physical pages in the system. - -File: libc.info, Node: Debugging Support, Next: POSIX Threads, Prev: Cryptographic Functions, Up: Top +`_SC_AVPHYS_PAGES' + Inquire about the number of available physical pages in the system. -Debugging support -***************** +`_SC_ATEXIT_MAX' + Inquire about the number of functions which can be registered as + termination functions for `atexit'; *note Cleanups on Exit::. - Applications are usually debugged using dedicated debugger programs. -But sometimes this is not possible and, in any case, it is useful to -provide the developer with as much information as possible at the time -the problems are experienced. For this reason a few functions are -provided which a program can use to help the developer more easily -locate the problem. +`_SC_XOPEN_VERSION' + Inquire about the parameter corresponding to `_XOPEN_VERSION'. -* Menu: +`_SC_XOPEN_XCU_VERSION' + Inquire about the parameter corresponding to `_XOPEN_XCU_VERSION'. -* Backtraces:: Obtaining and printing a back trace of the - current stack. +`_SC_XOPEN_UNIX' + Inquire about the parameter corresponding to `_XOPEN_UNIX'. - -File: libc.info, Node: Backtraces, Up: Debugging Support +`_SC_XOPEN_REALTIME' + Inquire about the parameter corresponding to `_XOPEN_REALTIME'. -Backtraces -========== +`_SC_XOPEN_REALTIME_THREADS' + Inquire about the parameter corresponding to + `_XOPEN_REALTIME_THREADS'. - A "backtrace" is a list of the function calls that are currently -active in a thread. The usual way to inspect a backtrace of a program -is to use an external debugger such as gdb. However, sometimes it is -useful to obtain a backtrace programatically from within a program, -e.g., for the purposes of logging or diagnostics. +`_SC_XOPEN_LEGACY' + Inquire about the parameter corresponding to `_XOPEN_LEGACY'. - The header file `execinfo.h' declares three functions that obtain -and manipulate backtraces of the current thread. +`_SC_XOPEN_CRYPT' + Inquire about the parameter corresponding to `_XOPEN_CRYPT'. - - Function: int backtrace (void **BUFFER, int SIZE) - The `backtrace' function obtains a backtrace for the current - thread, as a list of pointers, and places the information into - BUFFER. The argument SIZE should be the number of `void *' - elements that will fit into BUFFER. The return value is the - actual number of entries of BUFFER that are obtained, and is at - most SIZE. +`_SC_XOPEN_ENH_I18N' + Inquire about the parameter corresponding to `_XOPEN_ENH_I18N'. - The pointers placed in BUFFER are actually return addresses - obtained by inspecting the stack, one return address per stack - frame. +`_SC_XOPEN_SHM' + Inquire about the parameter corresponding to `_XOPEN_SHM'. - Note that certain compiler optimizations may interfere with - obtaining a valid backtrace. Function inlining causes the inlined - function to not have a stack frame; tail call optimization - replaces one stack frame with another; frame pointer elimination - will stop `backtrace' from interpreting the stack contents - correctly. +`_SC_XOPEN_XPG2' + Inquire about the parameter corresponding to `_XOPEN_XPG2'. - - Function: char ** backtrace_symbols (void *const *BUFFER, int SIZE) - The `backtrace_symbols' function translates the information - obtained from the `backtrace' function into an array of strings. - The argument BUFFER should be a pointer to an array of addresses - obtained via the `backtrace' function, and SIZE is the number of - entries in that array (the return value of `backtrace'). +`_SC_XOPEN_XPG3' + Inquire about the parameter corresponding to `_XOPEN_XPG3'. - The return value is a pointer to an array of strings, which has - SIZE entries just like the array BUFFER. Each string contains a - printable representation of the corresponding element of BUFFER. - It includes the function name (if this can be determined), an - offset into the function, and the actual return address (in - hexadecimal). +`_SC_XOPEN_XPG4' + Inquire about the parameter corresponding to `_XOPEN_XPG4'. - Currently, the function name and offset only be obtained on - systems that use the ELF binary format for programs and libraries. - On other systems, only the hexadecimal return address will be - present. Also, you may need to pass additional flags to the - linker to make the function names available to the program. (For - example, on systems using GNU ld, you must pass (`-rdynamic'.) +`_SC_CHAR_BIT' + Inquire about the number of bits in a variable of type `char'. - The return value of `backtrace_symbols' is a pointer obtained via - the `malloc' function, and it is the responsibility of the caller - to `free' that pointer. Note that only the return value need be - freed, not the individual strings. +`_SC_CHAR_MAX' + Inquire about the maximum value which can be stored in a variable + of type `char'. - The return value is `NULL' if sufficient memory for the strings - cannot be obtained. +`_SC_CHAR_MIN' + Inquire about the minimum value which can be stored in a variable + of type `char'. - - Function: void backtrace_symbols_fd (void *const *BUFFER, int SIZE, - int FD) - The `backtrace_symbols_fd' function performs the same translation - as the function `backtrace_symbols' function. Instead of returning - the strings to the caller, it writes the strings to the file - descriptor FD, one per line. It does not use the `malloc' - function, and can therefore be used in situations where that - function might fail. +`_SC_INT_MAX' + Inquire about the maximum value which can be stored in a variable + of type `int'. - The following program illustrates the use of these functions. Note -that the array to contain the return addresses returned by `backtrace' -is allocated on the stack. Therefore code like this can be used in -situations where the memory handling via `malloc' does not work anymore -(in which case the `backtrace_symbols' has to be replaced by a -`backtrace_symbols_fd' call as well). The number of return addresses -is normally not very large. Even complicated programs rather seldom -have a nesting level of more than, say, 50 and with 200 possible -entries probably all programs should be covered. +`_SC_INT_MIN' + Inquire about the minimum value which can be stored in a variable + of type `int'. - #include - #include - #include - - /* Obtain a backtrace and print it to `stdout'. */ - void - print_trace (void) - { - void *array[10]; - size_t size; - char **strings; - size_t i; - - size = backtrace (array, 10); - strings = backtrace_symbols (array, size); - - printf ("Obtained %zd stack frames.\n", size); - - for (i = 0; i < size; i++) - printf ("%s\n", strings[i]); - - free (strings); - } - - /* A dummy function to make the backtrace more interesting. */ - void - dummy_function (void) - { - print_trace (); - } - - int - main (void) - { - dummy_function (); - return 0; - } +`_SC_LONG_BIT' + Inquire about the number of bits in a variable of type `long int'. - -File: libc.info, Node: POSIX Threads, Next: Language Features, Prev: Debugging Support, Up: Top +`_SC_WORD_BIT' + Inquire about the number of bits in a variable of a register word. -POSIX Threads -************* +`_SC_MB_LEN_MAX' + Inquire the maximum length of a multi-byte representation of a wide + character value. - This chapter describes the pthreads (POSIX threads) library. This -library provides support functions for multithreaded programs: thread -primitives, synchronization objects, and so forth. It also implements -POSIX 1003.1b semaphores (not to be confused with System V semaphores). +`_SC_NZERO' + Inquire about the value used to internally represent the zero + priority level for the process execution. - The threads operations (`pthread_*') do not use ERRNO. Instead they -return an error code directly. The semaphore operations do use ERRNO. +`SC_SSIZE_MAX' + Inquire about the maximum value which can be stored in a variable + of type `ssize_t'. -* Menu: +`_SC_SCHAR_MAX' + Inquire about the maximum value which can be stored in a variable + of type `signed char'. -* Basic Thread Operations:: Creating, terminating, and waiting for threads. -* Thread Attributes:: Tuning thread scheduling. -* Cancellation:: Stopping a thread before it's done. -* Cleanup Handlers:: Deallocating resources when a thread is - canceled. -* Mutexes:: One way to synchronize threads. -* Condition Variables:: Another way. -* POSIX Semaphores:: And a third way. -* Thread-Specific Data:: Variables with different values in - different threads. -* Threads and Signal Handling:: Why you should avoid mixing the two, and - how to do it if you must. -* Threads and Fork:: Interactions between threads and the - `fork' function. -* Streams and Fork:: Interactions between stdio streams and - `fork'. -* Miscellaneous Thread Functions:: A grab bag of utility routines. +`_SC_SCHAR_MIN' + Inquire about the minimum value which can be stored in a variable + of type `signed char'. + +`_SC_SHRT_MAX' + Inquire about the maximum value which can be stored in a variable + of type `short int'. + +`_SC_SHRT_MIN' + Inquire about the minimum value which can be stored in a variable + of type `short int'. + +`_SC_UCHAR_MAX' + Inquire about the maximum value which can be stored in a variable + of type `unsigned char'. + +`_SC_UINT_MAX' + Inquire about the maximum value which can be stored in a variable + of type `unsigned int'. + +`_SC_ULONG_MAX' + Inquire about the maximum value which can be stored in a variable + of type `unsigned long int'. + +`_SC_USHRT_MAX' + Inquire about the maximum value which can be stored in a variable + of type `unsigned short int'. + +`_SC_NL_ARGMAX' + Inquire about the parameter corresponding to `NL_ARGMAX'. + +`_SC_NL_LANGMAX' + Inquire about the parameter corresponding to `NL_LANGMAX'. + +`_SC_NL_MSGMAX' + Inquire about the parameter corresponding to `NL_MSGMAX'. + +`_SC_NL_NMAX' + Inquire about the parameter corresponding to `NL_NMAX'. + +`_SC_NL_SETMAX' + Inquire about the parameter corresponding to `NL_SETMAX'. + +`_SC_NL_TEXTMAX' + Inquire about the parameter corresponding to `NL_TEXTMAX'. diff -durpN glibc-2.2.4/manual/libc.info-49 glibc-2.2.5/manual/libc.info-49 --- glibc-2.2.4/manual/libc.info-49 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-49 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1118 +33,1184 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Basic Thread Operations, Next: Thread Attributes, Up: POSIX Threads - -Basic Thread Operations -======================= +File: libc.info, Node: Examples of Sysconf, Prev: Constants for Sysconf, Up: Sysconf - These functions are the thread equivalents of `fork', `exit', and -`wait'. +Examples of `sysconf' +--------------------- - - Function: int pthread_create (pthread_t * THREAD, pthread_attr_t * - ATTR, void * (*START_ROUTINE)(void *), void * ARG) - `pthread_create' creates a new thread of control that executes - concurrently with the calling thread. The new thread calls the - function START_ROUTINE, passing it ARG as first argument. The new - thread terminates either explicitly, by calling `pthread_exit', or - implicitly, by returning from the START_ROUTINE function. The - latter case is equivalent to calling `pthread_exit' with the result - returned by START_ROUTINE as exit code. + We recommend that you first test for a macro definition for the +parameter you are interested in, and call `sysconf' only if the macro +is not defined. For example, here is how to test whether job control +is supported: - The ATTR argument specifies thread attributes to be applied to the - new thread. *Note Thread Attributes::, for details. The ATTR - argument can also be `NULL', in which case default attributes are - used: the created thread is joinable (not detached) and has an - ordinary (not realtime) scheduling policy. + int + have_job_control (void) + { + #ifdef _POSIX_JOB_CONTROL + return 1; + #else + int value = sysconf (_SC_JOB_CONTROL); + if (value < 0) + /* If the system is that badly wedged, + there's no use trying to go on. */ + fatal (strerror (errno)); + return value; + #endif + } - On success, the identifier of the newly created thread is stored - in the location pointed by the THREAD argument, and a 0 is - returned. On error, a non-zero error code is returned. + Here is how to get the value of a numeric limit: - This function may return the following errors: - `EAGAIN' - Not enough system resources to create a process for the new - thread, or more than `PTHREAD_THREADS_MAX' threads are - already active. + int + get_child_max () + { + #ifdef CHILD_MAX + return CHILD_MAX; + #else + int value = sysconf (_SC_CHILD_MAX); + if (value < 0) + fatal (strerror (errno)); + return value; + #endif + } - - Function: void pthread_exit (void *RETVAL) - `pthread_exit' terminates the execution of the calling thread. All - cleanup handlers (*note Cleanup Handlers::) that have been set for - the calling thread with `pthread_cleanup_push' are executed in - reverse order (the most recently pushed handler is executed - first). Finalization functions for thread-specific data are then - called for all keys that have non-`NULL' values associated with - them in the calling thread (*note Thread-Specific Data::). - Finally, execution of the calling thread is stopped. + +File: libc.info, Node: Minimums, Next: Limits for Files, Prev: Sysconf, Up: System Configuration - The RETVAL argument is the return value of the thread. It can be - retrieved from another thread using `pthread_join'. +Minimum Values for General Capacity Limits +========================================== - The `pthread_exit' function never returns. + Here are the names for the POSIX minimum upper bounds for the system +limit parameters. The significance of these values is that you can +safely push to these limits without checking whether the particular +system you are using can go that far. - - Function: int pthread_cancel (pthread_t THREAD) - `pthread_cancel' sends a cancellation request to the thread denoted - by the THREAD argument. If there is no such thread, - `pthread_cancel' fails and returns `ESRCH'. Otherwise it returns - 0. *Note Cancellation::, for details. +`_POSIX_AIO_LISTIO_MAX' + The most restrictive limit permitted by POSIX for the maximum + number of I/O operations that can be specified in a list I/O call. + The value of this constant is `2'; thus you can add up to two new + entries of the list of outstanding operations. - - Function: int pthread_join (pthread_t TH, void **thread_RETURN) - `pthread_join' suspends the execution of the calling thread until - the thread identified by TH terminates, either by calling - `pthread_exit' or by being canceled. +`_POSIX_AIO_MAX' + The most restrictive limit permitted by POSIX for the maximum + number of outstanding asynchronous I/O operations. The value of + this constant is `1'. So you cannot expect that you can issue + more than one operation and immediately continue with the normal + work, receiving the notifications asynchronously. - If THREAD_RETURN is not `NULL', the return value of TH is stored - in the location pointed to by THREAD_RETURN. The return value of - TH is either the argument it gave to `pthread_exit', or - `PTHREAD_CANCELED' if TH was canceled. +`_POSIX_ARG_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum combined length of the ARGV and ENVIRON + arguments that can be passed to the `exec' functions. Its value + is `4096'. - The joined thread `th' must be in the joinable state: it must not - have been detached using `pthread_detach' or the - `PTHREAD_CREATE_DETACHED' attribute to `pthread_create'. +`_POSIX_CHILD_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum number of simultaneous processes per real + user ID. Its value is `6'. - When a joinable thread terminates, its memory resources (thread - descriptor and stack) are not deallocated until another thread - performs `pthread_join' on it. Therefore, `pthread_join' must be - called once for each joinable thread created to avoid memory leaks. +`_POSIX_NGROUPS_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum number of supplementary group IDs per + process. Its value is `0'. - At most one thread can wait for the termination of a given thread. - Calling `pthread_join' on a thread TH on which another thread is - already waiting for termination returns an error. +`_POSIX_OPEN_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum number of files that a single process can + have open simultaneously. Its value is `16'. - `pthread_join' is a cancellation point. If a thread is canceled - while suspended in `pthread_join', the thread execution resumes - immediately and the cancellation is executed without waiting for - the TH thread to terminate. If cancellation occurs during - `pthread_join', the TH thread remains not joined. +`_POSIX_SSIZE_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum value that can be stored in an object of type + `ssize_t'. Its value is `32767'. - On success, the return value of TH is stored in the location - pointed to by THREAD_RETURN, and 0 is returned. On error, one of - the following values is returned: - `ESRCH' - No thread could be found corresponding to that specified by - TH. +`_POSIX_STREAM_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum number of streams that a single process can + have open simultaneously. Its value is `8'. - `EINVAL' - The TH thread has been detached, or another thread is already - waiting on termination of TH. +`_POSIX_TZNAME_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the maximum length of a time zone name. Its value is + `3'. - `EDEADLK' - The TH argument refers to the calling thread. +`_POSIX2_RE_DUP_MAX' + The value of this macro is the most restrictive limit permitted by + POSIX for the numbers used in the `\{MIN,MAX\}' construct in a + regular expression. Its value is `255'.  -File: libc.info, Node: Thread Attributes, Next: Cancellation, Prev: Basic Thread Operations, Up: POSIX Threads +File: libc.info, Node: Limits for Files, Next: Options for Files, Prev: Minimums, Up: System Configuration -Thread Attributes -================= +Limits on File System Capacity +============================== - Threads have a number of attributes that may be set at creation time. -This is done by filling a thread attribute object ATTR of type -`pthread_attr_t', then passing it as second argument to -`pthread_create'. Passing `NULL' is equivalent to passing a thread -attribute object with all attributes set to their default values. + The POSIX.1 standard specifies a number of parameters that describe +the limitations of the file system. It's possible for the system to +have a fixed, uniform limit for a parameter, but this isn't the usual +case. On most systems, it's possible for different file systems (and, +for some parameters, even different files) to have different maximum +limits. For example, this is very likely if you use NFS to mount some +of the file systems from other machines. - Attribute objects are consulted only when creating a new thread. The -same attribute object can be used for creating several threads. -Modifying an attribute object after a call to `pthread_create' does not -change the attributes of the thread previously created. + Each of the following macros is defined in `limits.h' only if the +system has a fixed, uniform limit for the parameter in question. If the +system allows different file systems or files to have different limits, +then the macro is undefined; use `pathconf' or `fpathconf' to find out +the limit that applies to a particular file. *Note Pathconf::. - - Function: int pthread_attr_init (pthread_attr_t *ATTR) - `pthread_attr_init' initializes the thread attribute object ATTR - and fills it with default values for the attributes. (The default - values are listed below for each attribute.) + Each parameter also has another macro, with a name starting with +`_POSIX', which gives the lowest value that the limit is allowed to +have on _any_ POSIX system. *Note File Minimums::. - Each attribute ATTRNAME (see below for a list of all attributes) - can be individually set using the function - `pthread_attr_setATTRNAME' and retrieved using the function - `pthread_attr_getATTRNAME'. + - Macro: int LINK_MAX + The uniform system limit (if any) for the number of names for a + given file. *Note Hard Links::. - - Function: int pthread_attr_destroy (pthread_attr_t *ATTR) - `pthread_attr_destroy' destroys the attribute object pointed to by - ATTR releasing any resources associated with it. ATTR is left in - an undefined state, and you must not use it again in a call to any - pthreads function until it has been reinitialized. + - Macro: int MAX_CANON + The uniform system limit (if any) for the amount of text in a line + of input when input editing is enabled. *Note Canonical or Not::. - - Function: int pthread_attr_setattr (pthread_attr_t *OBJ, int VALUE) - Set attribute ATTR to VALUE in the attribute object pointed to by - OBJ. See below for a list of possible attributes and the values - they can take. + - Macro: int MAX_INPUT + The uniform system limit (if any) for the total number of + characters typed ahead as input. *Note I/O Queues::. - On success, these functions return 0. If VALUE is not meaningful - for the ATTR being modified, they will return the error code - `EINVAL'. Some of the functions have other failure modes; see - below. + - Macro: int NAME_MAX + The uniform system limit (if any) for the length of a file name + component. - - Function: int pthread_attr_getattr (const pthread_attr_t *OBJ, int - *VALUE) - Store the current setting of ATTR in OBJ into the variable pointed - to by VALUE. + - Macro: int PATH_MAX + The uniform system limit (if any) for the length of an entire file + name (that is, the argument given to system calls such as `open'). - These functions always return 0. + - Macro: int PIPE_BUF + The uniform system limit (if any) for the number of bytes that can + be written atomically to a pipe. If multiple processes are + writing to the same pipe simultaneously, output from different + processes might be interleaved in chunks of this size. *Note + Pipes and FIFOs::. - The following thread attributes are supported: -`detachstate' - Choose whether the thread is created in the joinable state (value - `PTHREAD_CREATE_JOINABLE') or in the detached state - (`PTHREAD_CREATE_DETACHED'). The default is - `PTHREAD_CREATE_JOINABLE'. + These are alternative macro names for some of the same information. - In the joinable state, another thread can synchronize on the thread - termination and recover its termination code using `pthread_join', - but some of the thread resources are kept allocated after the - thread terminates, and reclaimed only when another thread performs - `pthread_join' on that thread. + - Macro: int MAXNAMLEN + This is the BSD name for `NAME_MAX'. It is defined in `dirent.h'. - In the detached state, the thread resources are immediately freed - when it terminates, but `pthread_join' cannot be used to - synchronize on the thread termination. + - Macro: int FILENAME_MAX + The value of this macro is an integer constant expression that + represents the maximum length of a file name string. It is + defined in `stdio.h'. - A thread created in the joinable state can later be put in the - detached thread using `pthread_detach'. + Unlike `PATH_MAX', this macro is defined even if there is no actual + limit imposed. In such a case, its value is typically a very large + number. *This is always the case on the GNU system.* -`schedpolicy' - Select the scheduling policy for the thread: one of `SCHED_OTHER' - (regular, non-realtime scheduling), `SCHED_RR' (realtime, - round-robin) or `SCHED_FIFO' (realtime, first-in first-out). The - default is `SCHED_OTHER'. + *Usage Note:* Don't use `FILENAME_MAX' as the size of an array in + which to store a file name! You can't possibly make an array that + big! Use dynamic allocation (*note Memory Allocation::) instead. - The realtime scheduling policies `SCHED_RR' and `SCHED_FIFO' are - available only to processes with superuser privileges. - `pthread_attr_setschedparam' will fail and return `ENOTSUP' if you - try to set a realtime policy when you are unprivileged. + +File: libc.info, Node: Options for Files, Next: File Minimums, Prev: Limits for Files, Up: System Configuration - The scheduling policy of a thread can be changed after creation - with `pthread_setschedparam'. +Optional Features in File Support +================================= -`schedparam' - Change the scheduling parameter (the scheduling priority) for the - thread. The default is 0. + POSIX defines certain system-specific options in the system calls for +operating on files. Some systems support these options and others do +not. Since these options are provided in the kernel, not in the +library, simply using the GNU C library does not guarantee that any of +these features is supported; it depends on the system you are using. +They can also vary between file systems on a single machine. - This attribute is not significant if the scheduling policy is - `SCHED_OTHER'; it only matters for the realtime policies - `SCHED_RR' and `SCHED_FIFO'. + This section describes the macros you can test to determine whether a +particular option is supported on your machine. If a given macro is +defined in `unistd.h', then its value says whether the corresponding +feature is supported. (A value of `-1' indicates no; any other value +indicates yes.) If the macro is undefined, it means particular files +may or may not support the feature. - The scheduling priority of a thread can be changed after creation - with `pthread_setschedparam'. + Since all the machines that support the GNU C library also support +NFS, one can never make a general statement about whether all file +systems support the `_POSIX_CHOWN_RESTRICTED' and `_POSIX_NO_TRUNC' +features. So these names are never defined as macros in the GNU C +library. -`inheritsched' - Choose whether the scheduling policy and scheduling parameter for - the newly created thread are determined by the values of the - SCHEDPOLICY and SCHEDPARAM attributes (value - `PTHREAD_EXPLICIT_SCHED') or are inherited from the parent thread - (value `PTHREAD_INHERIT_SCHED'). The default is - `PTHREAD_EXPLICIT_SCHED'. + - Macro: int _POSIX_CHOWN_RESTRICTED + If this option is in effect, the `chown' function is restricted so + that the only changes permitted to nonprivileged processes is to + change the group owner of a file to either be the effective group + ID of the process, or one of its supplementary group IDs. *Note + File Owner::. -`scope' - Choose the scheduling contention scope for the created thread. The - default is `PTHREAD_SCOPE_SYSTEM', meaning that the threads contend - for CPU time with all processes running on the machine. In - particular, thread priorities are interpreted relative to the - priorities of all other processes on the machine. The other - possibility, `PTHREAD_SCOPE_PROCESS', means that scheduling - contention occurs only between the threads of the running process: - thread priorities are interpreted relative to the priorities of - the other threads of the process, regardless of the priorities of - other processes. + - Macro: int _POSIX_NO_TRUNC + If this option is in effect, file name components longer than + `NAME_MAX' generate an `ENAMETOOLONG' error. Otherwise, file name + components that are too long are silently truncated. - `PTHREAD_SCOPE_PROCESS' is not supported in LinuxThreads. If you - try to set the scope to this value, `pthread_attr_setscope' will - fail and return `ENOTSUP'. + - Macro: unsigned char _POSIX_VDISABLE + This option is only meaningful for files that are terminal devices. + If it is enabled, then handling for special control characters can + be disabled individually. *Note Special Characters::. -`stackaddr' - Provide an address for an application managed stack. The size of - the stack must be at least `PTHREAD_STACK_MIN'. + If one of these macros is undefined, that means that the option +might be in effect for some files and not for others. To inquire about +a particular file, call `pathconf' or `fpathconf'. *Note Pathconf::. -`stacksize' - Change the size of the stack created for the thread. The value - defines the minimum stack size, in bytes. + +File: libc.info, Node: File Minimums, Next: Pathconf, Prev: Options for Files, Up: System Configuration - If the value exceeds the system's maximum stack size, or is smaller - than `PTHREAD_STACK_MIN', `pthread_attr_setstacksize' will fail - and return `EINVAL'. +Minimum Values for File System Limits +===================================== -`stack' - Provide both the address and size of an application managed stack - to use for the new thread. The base of the memory area is - STACKADDR with the size of the memory area, STACKSIZE, measured in - bytes. + Here are the names for the POSIX minimum upper bounds for some of the +above parameters. The significance of these values is that you can +safely push to these limits without checking whether the particular +system you are using can go that far. In most cases GNU systems do not +have these strict limitations. The actual limit should be requested if +necessary. - If the value of STACKSIZE is less than `PTHREAD_STACK_MIN', or - greater than the system's maximum stack size, or if the value of - STACKADDR lacks the proper alignment, `pthread_attr_setstack' will - fail and return `EINVAL'. +`_POSIX_LINK_MAX' + The most restrictive limit permitted by POSIX for the maximum + value of a file's link count. The value of this constant is `8'; + thus, you can always make up to eight names for a file without + running into a system limit. -`guardsize' - Change the minimum size in bytes of the guard area for the thread's - stack. The default size is a single page. If this value is set, - it will be rounded up to the nearest page size. If the value is - set to 0, a guard area will not be created for this thread. The - space allocated for the guard area is used to catch stack - overflow. Therefore, when allocating large structures on the - stack, a larger guard area may be required to catch a stack - overflow. +`_POSIX_MAX_CANON' + The most restrictive limit permitted by POSIX for the maximum + number of bytes in a canonical input line from a terminal device. + The value of this constant is `255'. - If the caller is managing their own stacks (if the `stackaddr' - attribute has been set), then the `guardsize' attribute is ignored. +`_POSIX_MAX_INPUT' + The most restrictive limit permitted by POSIX for the maximum + number of bytes in a terminal device input queue (or typeahead + buffer). *Note Input Modes::. The value of this constant is + `255'. - If the value exceeds the `stacksize', `pthread_atrr_setguardsize' - will fail and return `EINVAL'. +`_POSIX_NAME_MAX' + The most restrictive limit permitted by POSIX for the maximum + number of bytes in a file name component. The value of this + constant is `14'. - -File: libc.info, Node: Cancellation, Next: Cleanup Handlers, Prev: Thread Attributes, Up: POSIX Threads +`_POSIX_PATH_MAX' + The most restrictive limit permitted by POSIX for the maximum + number of bytes in a file name. The value of this constant is + `256'. -Cancellation -============ +`_POSIX_PIPE_BUF' + The most restrictive limit permitted by POSIX for the maximum + number of bytes that can be written atomically to a pipe. The + value of this constant is `512'. - Cancellation is the mechanism by which a thread can terminate the -execution of another thread. More precisely, a thread can send a -cancellation request to another thread. Depending on its settings, the -target thread can then either ignore the request, honor it immediately, -or defer it till it reaches a cancellation point. When threads are -first created by `pthread_create', they always defer cancellation -requests. +`SYMLINK_MAX' + Maximum number of bytes in a symbolic link. - When a thread eventually honors a cancellation request, it behaves -as if `pthread_exit(PTHREAD_CANCELED)' was called. All cleanup handlers -are executed in reverse order, finalization functions for -thread-specific data are called, and finally the thread stops executing. -If the canceled thread was joinable, the return value -`PTHREAD_CANCELED' is provided to whichever thread calls PTHREAD_JOIN -on it. See `pthread_exit' for more information. +`POSIX_REC_INCR_XFER_SIZE' + Recommended increment for file transfer sizes between the + `POSIX_REC_MIN_XFER_SIZE' and `POSIX_REC_MAX_XFER_SIZE' values. - Cancellation points are the points where the thread checks for -pending cancellation requests and performs them. The POSIX threads -functions `pthread_join', `pthread_cond_wait', -`pthread_cond_timedwait', `pthread_testcancel', `sem_wait', and -`sigwait' are cancellation points. In addition, these system calls are -cancellation points: +`POSIX_REC_MAX_XFER_SIZE' + Maximum recommended file transfer size. -accept open sendmsg -close pause sendto -connect read system -fcntl recv tcdrain -fsync recvfrom wait -lseek recvmsg waitpid -msync send write -nanosleep +`POSIX_REC_MIN_XFER_SIZE' + Minimum recommended file transfer size. -All library functions that call these functions (such as `printf') are -also cancellation points. +`POSIX_REC_XFER_ALIGN' + Recommended file transfer buffer alignment. - - Function: int pthread_setcancelstate (int STATE, int *OLDSTATE) - `pthread_setcancelstate' changes the cancellation state for the - calling thread - that is, whether cancellation requests are - ignored or not. The STATE argument is the new cancellation state: - either `PTHREAD_CANCEL_ENABLE' to enable cancellation, or - `PTHREAD_CANCEL_DISABLE' to disable cancellation (cancellation - requests are ignored). + +File: libc.info, Node: Pathconf, Next: Utility Limits, Prev: File Minimums, Up: System Configuration - If OLDSTATE is not `NULL', the previous cancellation state is - stored in the location pointed to by OLDSTATE, and can thus be - restored later by another call to `pthread_setcancelstate'. +Using `pathconf' +================ - If the STATE argument is not `PTHREAD_CANCEL_ENABLE' or - `PTHREAD_CANCEL_DISABLE', `pthread_setcancelstate' fails and - returns `EINVAL'. Otherwise it returns 0. + When your machine allows different files to have different values +for a file system parameter, you can use the functions in this section +to find out the value that applies to any particular file. - - Function: int pthread_setcanceltype (int TYPE, int *OLDTYPE) - `pthread_setcanceltype' changes the type of responses to - cancellation requests for the calling thread: asynchronous - (immediate) or deferred. The TYPE argument is the new - cancellation type: either `PTHREAD_CANCEL_ASYNCHRONOUS' to cancel - the calling thread as soon as the cancellation request is - received, or `PTHREAD_CANCEL_DEFERRED' to keep the cancellation - request pending until the next cancellation point. If OLDTYPE is - not `NULL', the previous cancellation state is stored in the - location pointed to by OLDTYPE, and can thus be restored later by - another call to `pthread_setcanceltype'. + These functions and the associated constants for the PARAMETER +argument are declared in the header file `unistd.h'. - If the TYPE argument is not `PTHREAD_CANCEL_DEFERRED' or - `PTHREAD_CANCEL_ASYNCHRONOUS', `pthread_setcanceltype' fails and - returns `EINVAL'. Otherwise it returns 0. + - Function: long int pathconf (const char *FILENAME, int PARAMETER) + This function is used to inquire about the limits that apply to + the file named FILENAME. - - Function: void pthread_testcancel (VOID) - `pthread_testcancel' does nothing except testing for pending - cancellation and executing it. Its purpose is to introduce explicit - checks for cancellation in long sequences of code that do not call - cancellation point functions otherwise. + The PARAMETER argument should be one of the `_PC_' constants + listed below. - -File: libc.info, Node: Cleanup Handlers, Next: Mutexes, Prev: Cancellation, Up: POSIX Threads + The normal return value from `pathconf' is the value you requested. + A value of `-1' is returned both if the implementation does not + impose a limit, and in case of an error. In the former case, + `errno' is not set, while in the latter case, `errno' is set to + indicate the cause of the problem. So the only way to use this + function robustly is to store `0' into `errno' just before calling + it. -Cleanup Handlers -================ + Besides the usual file name errors (*note File Name Errors::), the + following error condition is defined for this function: - Cleanup handlers are functions that get called when a thread -terminates, either by calling `pthread_exit' or because of -cancellation. Cleanup handlers are installed and removed following a -stack-like discipline. + `EINVAL' + The value of PARAMETER is invalid, or the implementation + doesn't support the PARAMETER for the specific file. - The purpose of cleanup handlers is to free the resources that a -thread may hold at the time it terminates. In particular, if a thread -exits or is canceled while it owns a locked mutex, the mutex will -remain locked forever and prevent other threads from executing -normally. The best way to avoid this is, just before locking the mutex, -to install a cleanup handler whose effect is to unlock the mutex. -Cleanup handlers can be used similarly to free blocks allocated with -`malloc' or close file descriptors on thread termination. + - Function: long int fpathconf (int FILEDES, int PARAMETER) + This is just like `pathconf' except that an open file descriptor + is used to specify the file for which information is requested, + instead of a file name. - Here is how to lock a mutex MUT in such a way that it will be -unlocked if the thread is canceled while MUT is locked: + The following `errno' error conditions are defined for this + function: - pthread_cleanup_push(pthread_mutex_unlock, (void *) &mut); - pthread_mutex_lock(&mut); - /* do some work */ - pthread_mutex_unlock(&mut); - pthread_cleanup_pop(0); + `EBADF' + The FILEDES argument is not a valid file descriptor. - Equivalently, the last two lines can be replaced by + `EINVAL' + The value of PARAMETER is invalid, or the implementation + doesn't support the PARAMETER for the specific file. - pthread_cleanup_pop(1); + Here are the symbolic constants that you can use as the PARAMETER +argument to `pathconf' and `fpathconf'. The values are all integer +constants. - Notice that the code above is safe only in deferred cancellation mode -(see `pthread_setcanceltype'). In asynchronous cancellation mode, a -cancellation can occur between `pthread_cleanup_push' and -`pthread_mutex_lock', or between `pthread_mutex_unlock' and -`pthread_cleanup_pop', resulting in both cases in the thread trying to -unlock a mutex not locked by the current thread. This is the main -reason why asynchronous cancellation is difficult to use. +`_PC_LINK_MAX' + Inquire about the value of `LINK_MAX'. - If the code above must also work in asynchronous cancellation mode, -then it must switch to deferred mode for locking and unlocking the -mutex: +`_PC_MAX_CANON' + Inquire about the value of `MAX_CANON'. - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); - pthread_cleanup_push(pthread_mutex_unlock, (void *) &mut); - pthread_mutex_lock(&mut); - /* do some work */ - pthread_cleanup_pop(1); - pthread_setcanceltype(oldtype, NULL); +`_PC_MAX_INPUT' + Inquire about the value of `MAX_INPUT'. - The code above can be rewritten in a more compact and efficient way, -using the non-portable functions `pthread_cleanup_push_defer_np' and -`pthread_cleanup_pop_restore_np': +`_PC_NAME_MAX' + Inquire about the value of `NAME_MAX'. - pthread_cleanup_push_defer_np(pthread_mutex_unlock, (void *) &mut); - pthread_mutex_lock(&mut); - /* do some work */ - pthread_cleanup_pop_restore_np(1); +`_PC_PATH_MAX' + Inquire about the value of `PATH_MAX'. - - Function: void pthread_cleanup_push (void (*ROUTINE) (void *), void - *ARG) - `pthread_cleanup_push' installs the ROUTINE function with argument - ARG as a cleanup handler. From this point on to the matching - `pthread_cleanup_pop', the function ROUTINE will be called with - arguments ARG when the thread terminates, either through - `pthread_exit' or by cancellation. If several cleanup handlers are - active at that point, they are called in LIFO order: the most - recently installed handler is called first. +`_PC_PIPE_BUF' + Inquire about the value of `PIPE_BUF'. - - Function: void pthread_cleanup_pop (int EXECUTE) - `pthread_cleanup_pop' removes the most recently installed cleanup - handler. If the EXECUTE argument is not 0, it also executes the - handler, by calling the ROUTINE function with arguments ARG. If - the EXECUTE argument is 0, the handler is only removed but not - executed. +`_PC_CHOWN_RESTRICTED' + Inquire about the value of `_POSIX_CHOWN_RESTRICTED'. - Matching pairs of `pthread_cleanup_push' and `pthread_cleanup_pop' -must occur in the same function, at the same level of block nesting. -Actually, `pthread_cleanup_push' and `pthread_cleanup_pop' are macros, -and the expansion of `pthread_cleanup_push' introduces an open brace -`{' with the matching closing brace `}' being introduced by the -expansion of the matching `pthread_cleanup_pop'. +`_PC_NO_TRUNC' + Inquire about the value of `_POSIX_NO_TRUNC'. - - Function: void pthread_cleanup_push_defer_np (void (*ROUTINE) (void - *), void *ARG) - `pthread_cleanup_push_defer_np' is a non-portable extension that - combines `pthread_cleanup_push' and `pthread_setcanceltype'. It - pushes a cleanup handler just as `pthread_cleanup_push' does, but - also saves the current cancellation type and sets it to deferred - cancellation. This ensures that the cleanup mechanism is effective - even if the thread was initially in asynchronous cancellation mode. +`_PC_VDISABLE' + Inquire about the value of `_POSIX_VDISABLE'. - - Function: void pthread_cleanup_pop_restore_np (int EXECUTE) - `pthread_cleanup_pop_restore_np' pops a cleanup handler introduced - by `pthread_cleanup_push_defer_np', and restores the cancellation - type to its value at the time `pthread_cleanup_push_defer_np' was - called. +`_PC_SYNC_IO' + Inquire about the value of `_POSIX_SYNC_IO'. - `pthread_cleanup_push_defer_np' and `pthread_cleanup_pop_restore_np' -must occur in matching pairs, at the same level of block nesting. +`_PC_ASYNC_IO' + Inquire about the value of `_POSIX_ASYNC_IO'. - The sequence +`_PC_PRIO_IO' + Inquire about the value of `_POSIX_PRIO_IO'. - pthread_cleanup_push_defer_np(routine, arg); - ... - pthread_cleanup_pop_defer_np(execute); +`_PC_SOCK_MAXBUF' + Inquire about the value of `_POSIX_PIPE_BUF'. -is functionally equivalent to (but more compact and efficient than) +`_PC_FILESIZEBITS' + Inquire about the availability of large files on the filesystem. - { - int oldtype; - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); - pthread_cleanup_push(routine, arg); - ... - pthread_cleanup_pop(execute); - pthread_setcanceltype(oldtype, NULL); - } +`_PC_REC_INCR_XFER_SIZE' + Inquire about the value of `POSIX_REC_INCR_XFER_SIZE'. + +`_PC_REC_MAX_XFER_SIZE' + Inquire about the value of `POSIX_REC_MAX_XFER_SIZE'. + +`_PC_REC_MIN_XFER_SIZE' + Inquire about the value of `POSIX_REC_MIN_XFER_SIZE'. + +`_PC_REC_XFER_ALIGN' + Inquire about the value of `POSIX_REC_XFER_ALIGN'.  -File: libc.info, Node: Mutexes, Next: Condition Variables, Prev: Cleanup Handlers, Up: POSIX Threads +File: libc.info, Node: Utility Limits, Next: Utility Minimums, Prev: Pathconf, Up: System Configuration -Mutexes -======= +Utility Program Capacity Limits +=============================== - A mutex is a MUTual EXclusion device, and is useful for protecting -shared data structures from concurrent modifications, and implementing -critical sections and monitors. + The POSIX.2 standard specifies certain system limits that you can +access through `sysconf' that apply to utility behavior rather than the +behavior of the library or the operating system. - A mutex has two possible states: unlocked (not owned by any thread), -and locked (owned by one thread). A mutex can never be owned by two -different threads simultaneously. A thread attempting to lock a mutex -that is already locked by another thread is suspended until the owning -thread unlocks the mutex first. + The GNU C library defines macros for these limits, and `sysconf' +returns values for them if you ask; but these values convey no +meaningful information. They are simply the smallest values that +POSIX.2 permits. - None of the mutex functions is a cancellation point, not even -`pthread_mutex_lock', in spite of the fact that it can suspend a thread -for arbitrary durations. This way, the status of mutexes at -cancellation points is predictable, allowing cancellation handlers to -unlock precisely those mutexes that need to be unlocked before the -thread stops executing. Consequently, threads using deferred -cancellation should never hold a mutex for extended periods of time. + - Macro: int BC_BASE_MAX + The largest value of `obase' that the `bc' utility is guaranteed + to support. - It is not safe to call mutex functions from a signal handler. In -particular, calling `pthread_mutex_lock' or `pthread_mutex_unlock' from -a signal handler may deadlock the calling thread. + - Macro: int BC_DIM_MAX + The largest number of elements in one array that the `bc' utility + is guaranteed to support. - - Function: int pthread_mutex_init (pthread_mutex_t *MUTEX, const - pthread_mutexattr_t *MUTEXATTR) - `pthread_mutex_init' initializes the mutex object pointed to by - MUTEX according to the mutex attributes specified in MUTEXATTR. - If MUTEXATTR is `NULL', default attributes are used instead. + - Macro: int BC_SCALE_MAX + The largest value of `scale' that the `bc' utility is guaranteed + to support. - The LinuxThreads implementation supports only one mutex attribute, - the MUTEX TYPE, which is either "fast", "recursive", or "error - checking". The type of a mutex determines whether it can be locked - again by a thread that already owns it. The default type is - "fast". + - Macro: int BC_STRING_MAX + The largest number of characters in one string constant that the + `bc' utility is guaranteed to support. - Variables of type `pthread_mutex_t' can also be initialized - statically, using the constants `PTHREAD_MUTEX_INITIALIZER' (for - timed mutexes), `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' (for - recursive mutexes), `PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP' (for - fast mutexes(, and `PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' (for - error checking mutexes). + - Macro: int COLL_WEIGHTS_MAX + The largest number of weights that can necessarily be used in + defining the collating sequence for a locale. - `pthread_mutex_init' always returns 0. + - Macro: int EXPR_NEST_MAX + The maximum number of expressions that can be nested within + parenthesis by the `expr' utility. - - Function: int pthread_mutex_lock (pthread_mutex_t *mutex)) - `pthread_mutex_lock' locks the given mutex. If the mutex is - currently unlocked, it becomes locked and owned by the calling - thread, and `pthread_mutex_lock' returns immediately. If the mutex - is already locked by another thread, `pthread_mutex_lock' suspends - the calling thread until the mutex is unlocked. + - Macro: int LINE_MAX + The largest text line that the text-oriented POSIX.2 utilities can + support. (If you are using the GNU versions of these utilities, + then there is no actual limit except that imposed by the available + virtual memory, but there is no way that the library can tell you + this.) - If the mutex is already locked by the calling thread, the behavior - of `pthread_mutex_lock' depends on the type of the mutex. If the - mutex is of the "fast" type, the calling thread is suspended. It - will remain suspended forever, because no other thread can unlock - the mutex. If the mutex is of the "error checking" type, - `pthread_mutex_lock' returns immediately with the error code - `EDEADLK'. If the mutex is of the "recursive" type, - `pthread_mutex_lock' succeeds and returns immediately, recording - the number of times the calling thread has locked the mutex. An - equal number of `pthread_mutex_unlock' operations must be - performed before the mutex returns to the unlocked state. + - Macro: int EQUIV_CLASS_MAX + The maximum number of weights that can be assigned to an entry of + the `LC_COLLATE' category `order' keyword in a locale definition. + The GNU C library does not presently support locale definitions. - - Function: int pthread_mutex_trylock (pthread_mutex_t *MUTEX) - `pthread_mutex_trylock' behaves identically to - `pthread_mutex_lock', except that it does not block the calling - thread if the mutex is already locked by another thread (or by the - calling thread in the case of a "fast" mutex). Instead, - `pthread_mutex_trylock' returns immediately with the error code - `EBUSY'. + +File: libc.info, Node: Utility Minimums, Next: String Parameters, Prev: Utility Limits, Up: System Configuration - - Function: int pthread_mutex_timedlock (pthread_mutex_t *MUTEX, const - struct timespec *ABSTIME) - The `pthread_mutex_timedlock' is similar to the - `pthread_mutex_lock' function but instead of blocking for in - indefinite time if the mutex is locked by another thread, it - returns when the time specified in ABSTIME is reached. +Minimum Values for Utility Limits +================================= - This function can only be used on standard ("timed") and "error - checking" mutexes. It behaves just like `pthread_mutex_lock' for - all other types. +`_POSIX2_BC_BASE_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + value of `obase' in the `bc' utility. Its value is `99'. - If the mutex is successfully locked, the function returns zero. - If the time specified in ABSTIME is reached without the mutex - being locked, `ETIMEDOUT' is returned. +`_POSIX2_BC_DIM_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + size of an array in the `bc' utility. Its value is `2048'. - This function was introduced in the POSIX.1d revision of the POSIX - standard. +`_POSIX2_BC_SCALE_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + value of `scale' in the `bc' utility. Its value is `99'. - - Function: int pthread_mutex_unlock (pthread_mutex_t *MUTEX) - `pthread_mutex_unlock' unlocks the given mutex. The mutex is - assumed to be locked and owned by the calling thread on entrance to - `pthread_mutex_unlock'. If the mutex is of the "fast" type, - `pthread_mutex_unlock' always returns it to the unlocked state. If - it is of the "recursive" type, it decrements the locking count of - the mutex (number of `pthread_mutex_lock' operations performed on - it by the calling thread), and only when this count reaches zero - is the mutex actually unlocked. +`_POSIX2_BC_STRING_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + size of a string constant in the `bc' utility. Its value is + `1000'. - On "error checking" mutexes, `pthread_mutex_unlock' actually - checks at run-time that the mutex is locked on entrance, and that - it was locked by the same thread that is now calling - `pthread_mutex_unlock'. If these conditions are not met, - `pthread_mutex_unlock' returns `EPERM', and the mutex remains - unchanged. "Fast" and "recursive" mutexes perform no such checks, - thus allowing a locked mutex to be unlocked by a thread other than - its owner. This is non-portable behavior and must not be relied - upon. +`_POSIX2_COLL_WEIGHTS_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + number of weights that can necessarily be used in defining the + collating sequence for a locale. Its value is `2'. - - Function: int pthread_mutex_destroy (pthread_mutex_t *MUTEX) - `pthread_mutex_destroy' destroys a mutex object, freeing the - resources it might hold. The mutex must be unlocked on entrance. - In the LinuxThreads implementation, no resources are associated - with mutex objects, thus `pthread_mutex_destroy' actually does - nothing except checking that the mutex is unlocked. +`_POSIX2_EXPR_NEST_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + number of expressions nested within parenthesis when using the + `expr' utility. Its value is `32'. - If the mutex is locked by some thread, `pthread_mutex_destroy' - returns `EBUSY'. Otherwise it returns 0. +`_POSIX2_LINE_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + size of a text line that the text utilities can handle. Its value + is `2048'. - If any of the above functions (except `pthread_mutex_init') is -applied to an uninitialized mutex, they will simply return `EINVAL' and -do nothing. +`_POSIX2_EQUIV_CLASS_MAX' + The most restrictive limit permitted by POSIX.2 for the maximum + number of weights that can be assigned to an entry of the + `LC_COLLATE' category `order' keyword in a locale definition. Its + value is `2'. The GNU C library does not presently support locale + definitions. - A shared global variable X can be protected by a mutex as follows: + +File: libc.info, Node: String Parameters, Prev: Utility Minimums, Up: System Configuration - int x; - pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +String-Valued Parameters +======================== - All accesses and modifications to X should be bracketed by calls to -`pthread_mutex_lock' and `pthread_mutex_unlock' as follows: + POSIX.2 defines a way to get string-valued parameters from the +operating system with the function `confstr': - pthread_mutex_lock(&mut); - /* operate on x */ - pthread_mutex_unlock(&mut); + - Function: size_t confstr (int PARAMETER, char *BUF, size_t LEN) + This function reads the value of a string-valued system parameter, + storing the string into LEN bytes of memory space starting at BUF. + The PARAMETER argument should be one of the `_CS_' symbols listed + below. - Mutex attributes can be specified at mutex creation time, by passing -a mutex attribute object as second argument to `pthread_mutex_init'. -Passing `NULL' is equivalent to passing a mutex attribute object with -all attributes set to their default values. + The normal return value from `confstr' is the length of the string + value that you asked for. If you supply a null pointer for BUF, + then `confstr' does not try to store the string; it just returns + its length. A value of `0' indicates an error. - - Function: int pthread_mutexattr_init (pthread_mutexattr_t *ATTR) - `pthread_mutexattr_init' initializes the mutex attribute object - ATTR and fills it with default values for the attributes. + If the string you asked for is too long for the buffer (that is, + longer than `LEN - 1'), then `confstr' stores just that much + (leaving room for the terminating null character). You can tell + that this has happened because `confstr' returns a value greater + than or equal to LEN. - This function always returns 0. + The following `errno' error conditions are defined for this + function: - - Function: int pthread_mutexattr_destroy (pthread_mutexattr_t *ATTR) - `pthread_mutexattr_destroy' destroys a mutex attribute object, - which must not be reused until it is reinitialized. - `pthread_mutexattr_destroy' does nothing in the LinuxThreads - implementation. + `EINVAL' + The value of the PARAMETER is invalid. - This function always returns 0. + Currently there is just one parameter you can read with `confstr': - LinuxThreads supports only one mutex attribute: the mutex type, -which is either `PTHREAD_MUTEX_ADAPTIVE_NP' for "fast" mutexes, -`PTHREAD_MUTEX_RECURSIVE_NP' for "recursive" mutexes, -`PTHREAD_MUTEX_TIMED_NP' for "timed" mutexes, or -`PTHREAD_MUTEX_ERRORCHECK_NP' for "error checking" mutexes. As the -`NP' suffix indicates, this is a non-portable extension to the POSIX -standard and should not be employed in portable programs. +`_CS_PATH' + This parameter's value is the recommended default path for + searching for executable files. This is the path that a user has + by default just after logging in. - The mutex type determines what happens if a thread attempts to lock a -mutex it already owns with `pthread_mutex_lock'. If the mutex is of the -"fast" type, `pthread_mutex_lock' simply suspends the calling thread -forever. If the mutex is of the "error checking" type, -`pthread_mutex_lock' returns immediately with the error code `EDEADLK'. -If the mutex is of the "recursive" type, the call to -`pthread_mutex_lock' returns immediately with a success return code. -The number of times the thread owning the mutex has locked it is -recorded in the mutex. The owning thread must call -`pthread_mutex_unlock' the same number of times before the mutex -returns to the unlocked state. +`_CS_LFS_CFLAGS' + The returned string specifies which additional flags must be given + to the C compiler if a source is compiled using the + `_LARGEFILE_SOURCE' feature select macro; *note Feature Test + Macros::. - The default mutex type is "timed", that is, `PTHREAD_MUTEX_TIMED_NP'. +`_CS_LFS_LDFLAGS' + The returned string specifies which additional flags must be given + to the linker if a source is compiled using the + `_LARGEFILE_SOURCE' feature select macro; *note Feature Test + Macros::. - - Function: int pthread_mutexattr_settype (pthread_mutexattr_t *ATTR, - int TYPE) - `pthread_mutexattr_settype' sets the mutex type attribute in ATTR - to the value specified by TYPE. +`_CS_LFS_LIBS' + The returned string specifies which additional libraries must be + linked to the application if a source is compiled using the + `_LARGEFILE_SOURCE' feature select macro; *note Feature Test + Macros::. - If TYPE is not `PTHREAD_MUTEX_ADAPTIVE_NP', - `PTHREAD_MUTEX_RECURSIVE_NP', `PTHREAD_MUTEX_TIMED_NP', or - `PTHREAD_MUTEX_ERRORCHECK_NP', this function will return `EINVAL' - and leave ATTR unchanged. +`_CS_LFS_LINTFLAGS' + The returned string specifies which additional flags must be given + to the lint tool if a source is compiled using the + `_LARGEFILE_SOURCE' feature select macro; *note Feature Test + Macros::. - The standard Unix98 identifiers `PTHREAD_MUTEX_DEFAULT', - `PTHREAD_MUTEX_NORMAL', `PTHREAD_MUTEX_RECURSIVE', and - `PTHREAD_MUTEX_ERRORCHECK' are also permitted. +`_CS_LFS64_CFLAGS' + The returned string specifies which additional flags must be given + to the C compiler if a source is compiled using the + `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test + Macros::. +`_CS_LFS64_LDFLAGS' + The returned string specifies which additional flags must be given + to the linker if a source is compiled using the + `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test + Macros::. - - Function: int pthread_mutexattr_gettype (const pthread_mutexattr_t - *ATTR, int *TYPE) - `pthread_mutexattr_gettype' retrieves the current value of the - mutex type attribute in ATTR and stores it in the location pointed - to by TYPE. +`_CS_LFS64_LIBS' + The returned string specifies which additional libraries must be + linked to the application if a source is compiled using the + `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test + Macros::. - This function always returns 0. +`_CS_LFS64_LINTFLAGS' + The returned string specifies which additional flags must be given + to the lint tool if a source is compiled using the + `_LARGEFILE64_SOURCE' feature select macro; *note Feature Test + Macros::. + + The way to use `confstr' without any arbitrary limit on string size +is to call it twice: first call it to get the length, allocate the +buffer accordingly, and then call `confstr' again to fill the buffer, +like this: + + char * + get_default_path (void) + { + size_t len = confstr (_CS_PATH, NULL, 0); + char *buffer = (char *) xmalloc (len); + + if (confstr (_CS_PATH, buf, len + 1) == 0) + { + free (buffer); + return NULL; + } + + return buffer; + }  -File: libc.info, Node: Condition Variables, Next: POSIX Semaphores, Prev: Mutexes, Up: POSIX Threads +File: libc.info, Node: Cryptographic Functions, Next: Debugging Support, Prev: System Configuration, Up: Top -Condition Variables -=================== +DES Encryption and Password Handling +************************************ - A condition (short for "condition variable") is a synchronization -device that allows threads to suspend execution until some predicate on -shared data is satisfied. The basic operations on conditions are: signal -the condition (when the predicate becomes true), and wait for the -condition, suspending the thread execution until another thread signals -the condition. + On many systems, it is unnecessary to have any kind of user +authentication; for instance, a workstation which is not connected to a +network probably does not need any user authentication, because to use +the machine an intruder must have physical access. - A condition variable must always be associated with a mutex, to avoid -the race condition where a thread prepares to wait on a condition -variable and another thread signals the condition just before the first -thread actually waits on it. + Sometimes, however, it is necessary to be sure that a user is +authorized to use some service a machine provides--for instance, to log +in as a particular user id (*note Users and Groups::). One traditional +way of doing this is for each user to choose a secret "password"; then, +the system can ask someone claiming to be a user what the user's +password is, and if the person gives the correct password then the +system can grant the appropriate privileges. - - Function: int pthread_cond_init (pthread_cond_t *COND, - pthread_condattr_t *cond_ATTR) - `pthread_cond_init' initializes the condition variable COND, using - the condition attributes specified in COND_ATTR, or default - attributes if COND_ATTR is `NULL'. The LinuxThreads implementation - supports no attributes for conditions, hence the COND_ATTR - parameter is actually ignored. + If all the passwords are just stored in a file somewhere, then this +file has to be very carefully protected. To avoid this, passwords are +run through a "one-way function", a function which makes it difficult to +work out what its input was by looking at its output, before storing in +the file. - Variables of type `pthread_cond_t' can also be initialized - statically, using the constant `PTHREAD_COND_INITIALIZER'. + The GNU C library already provides a one-way function based on MD5 +and for compatibility with Unix systems the standard one-way function +based on the Data Encryption Standard. - This function always returns 0. + It also provides support for Secure RPC, and some library functions +that can be used to perform normal DES encryption. - - Function: int pthread_cond_signal (pthread_cond_t *COND) - `pthread_cond_signal' restarts one of the threads that are waiting - on the condition variable COND. If no threads are waiting on COND, - nothing happens. If several threads are waiting on COND, exactly - one is restarted, but it is not specified which. +* Menu: - This function always returns 0. +* Legal Problems:: This software can get you locked up, or worse. +* getpass:: Prompting the user for a password. +* crypt:: A one-way function for UNIX passwords. +* DES Encryption:: Routines for DES encryption. - - Function: int pthread_cond_broadcast (pthread_cond_t *COND) - `pthread_cond_broadcast' restarts all the threads that are waiting - on the condition variable COND. Nothing happens if no threads are - waiting on COND. + +File: libc.info, Node: Legal Problems, Next: getpass, Up: Cryptographic Functions - This function always returns 0. +Legal Problems +============== - - Function: int pthread_cond_wait (pthread_cond_t *COND, - pthread_mutex_t *MUTEX) - `pthread_cond_wait' atomically unlocks the MUTEX (as per - `pthread_unlock_mutex') and waits for the condition variable COND - to be signaled. The thread execution is suspended and does not - consume any CPU time until the condition variable is signaled. The - MUTEX must be locked by the calling thread on entrance to - `pthread_cond_wait'. Before returning to the calling thread, - `pthread_cond_wait' re-acquires MUTEX (as per - `pthread_lock_mutex'). + Because of the continuously changing state of the law, it's not +possible to provide a definitive survey of the laws affecting +cryptography. Instead, this section warns you of some of the known +trouble spots; this may help you when you try to find out what the laws +of your country are. - Unlocking the mutex and suspending on the condition variable is - done atomically. Thus, if all threads always acquire the mutex - before signaling the condition, this guarantees that the condition - cannot be signaled (and thus ignored) between the time a thread - locks the mutex and the time it waits on the condition variable. + Some countries require that you have a licence to use, possess, or +import cryptography. These countries are believed to include +Byelorussia, Burma, India, Indonesia, Israel, Kazakhstan, Pakistan, +Russia, and Saudi Arabia. - This function always returns 0. + Some countries restrict the transmission of encrypted messages by +radio; some telecommunications carriers restrict the transmission of +encrypted messages over their network. - - Function: int pthread_cond_timedwait (pthread_cond_t *COND, - pthread_mutex_t *MUTEX, const struct timespec *ABSTIME) - `pthread_cond_timedwait' atomically unlocks MUTEX and waits on - COND, as `pthread_cond_wait' does, but it also bounds the duration - of the wait. If COND has not been signaled before time ABSTIME, - the mutex MUTEX is re-acquired and `pthread_cond_timedwait' - returns the error code `ETIMEDOUT'. The wait can also be - interrupted by a signal; in that case `pthread_cond_timedwait' - returns `EINTR'. + Many countries have some form of export control for encryption +software. The Wassenaar Arrangement is a multilateral agreement +between 33 countries (Argentina, Australia, Austria, Belgium, Bulgaria, +Canada, the Czech Republic, Denmark, Finland, France, Germany, Greece, +Hungary, Ireland, Italy, Japan, Luxembourg, the Netherlands, New +Zealand, Norway, Poland, Portugal, the Republic of Korea, Romania, the +Russian Federation, the Slovak Republic, Spain, Sweden, Switzerland, +Turkey, Ukraine, the United Kingdom and the United States) which +restricts some kinds of encryption exports. Different countries apply +the arrangement in different ways; some do not allow the exception for +certain kinds of "public domain" software (which would include this +library), some only restrict the export of software in tangible form, +and others impose significant additional restrictions. - The ABSTIME parameter specifies an absolute time, with the same - origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds - to 00:00:00 GMT, January 1, 1970. + The United States has additional rules. This software would +generally be exportable under 15 CFR 740.13(e), which permits exports of +"encryption source code" which is "publicly available" and which is +"not subject to an express agreement for the payment of a licensing fee +or royalty for commercial production or sale of any product developed +with the source code" to most countries. - - Function: int pthread_cond_destroy (pthread_cond_t *COND) - `pthread_cond_destroy' destroys the condition variable COND, - freeing the resources it might hold. If any threads are waiting - on the condition variable, `pthread_cond_destroy' leaves COND - untouched and returns `EBUSY'. Otherwise it returns 0, and COND - must not be used again until it is reinitialized. + The rules in this area are continuously changing. If you know of any +information in this manual that is out-of-date, please report it using +the `glibcbug' script. *Note Reporting Bugs::. - In the LinuxThreads implementation, no resources are associated - with condition variables, so `pthread_cond_destroy' actually does - nothing. + +File: libc.info, Node: getpass, Next: crypt, Prev: Legal Problems, Up: Cryptographic Functions - `pthread_cond_wait' and `pthread_cond_timedwait' are cancellation -points. If a thread is canceled while suspended in one of these -functions, the thread immediately resumes execution, relocks the mutex -specified by MUTEX, and finally executes the cancellation. -Consequently, cleanup handlers are assured that MUTEX is locked when -they are called. +Reading Passwords +================= - It is not safe to call the condition variable functions from a signal -handler. In particular, calling `pthread_cond_signal' or -`pthread_cond_broadcast' from a signal handler may deadlock the calling -thread. + When reading in a password, it is desirable to avoid displaying it on +the screen, to help keep it secret. The following function handles this +in a convenient way. - Consider two shared variables X and Y, protected by the mutex MUT, -and a condition variable COND that is to be signaled whenever X becomes -greater than Y. + - Function: char * getpass (const char *PROMPT) + `getpass' outputs PROMPT, then reads a string in from the terminal + without echoing it. It tries to connect to the real terminal, + `/dev/tty', if possible, to encourage users not to put plaintext + passwords in files; otherwise, it uses `stdin' and `stderr'. + `getpass' also disables the INTR, QUIT, and SUSP characters on the + terminal using the `ISIG' terminal attribute (*note Local Modes::). + The terminal is flushed before and after `getpass', so that + characters of a mistyped password are not accidentally visible. - int x,y; - pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + In other C libraries, `getpass' may only return the first + `PASS_MAX' bytes of a password. The GNU C library has no limit, so + `PASS_MAX' is undefined. - Waiting until X is greater than Y is performed as follows: + The prototype for this function is in `unistd.h'. `PASS_MAX' + would be defined in `limits.h'. - pthread_mutex_lock(&mut); - while (x <= y) { - pthread_cond_wait(&cond, &mut); + This precise set of operations may not suit all possible situations. +In this case, it is recommended that users write their own `getpass' +substitute. For instance, a very simple substitute is as follows: + + #include + #include + + ssize_t + my_getpass (char **lineptr, size_t *n, FILE *stream) + { + struct termios old, new; + int nread; + + /* Turn echoing off and fail if we can't. */ + if (tcgetattr (fileno (stream), &old) != 0) + return -1; + new = old; + new.c_lflag &= ~ECHO; + if (tcsetattr (fileno (stream), TCSAFLUSH, &new) != 0) + return -1; + + /* Read the password. */ + nread = getline (lineptr, n, stream); + + /* Restore terminal. */ + (void) tcsetattr (fileno (stream), TCSAFLUSH, &old); + + return nread; } - /* operate on x and y */ - pthread_mutex_unlock(&mut); - Modifications on X and Y that may cause X to become greater than Y -should signal the condition if needed: + The substitute takes the same parameters as `getline' (*note Line +Input::); the user must print any prompt desired. - pthread_mutex_lock(&mut); - /* modify x and y */ - if (x > y) pthread_cond_broadcast(&cond); - pthread_mutex_unlock(&mut); + +File: libc.info, Node: crypt, Next: DES Encryption, Prev: getpass, Up: Cryptographic Functions - If it can be proved that at most one waiting thread needs to be waken -up (for instance, if there are only two threads communicating through X -and Y), `pthread_cond_signal' can be used as a slightly more efficient -alternative to `pthread_cond_broadcast'. In doubt, use -`pthread_cond_broadcast'. +Encrypting Passwords +==================== - To wait for X to becomes greater than Y with a timeout of 5 seconds, -do: + - Function: char * crypt (const char *KEY, const char *SALT) + The `crypt' function takes a password, KEY, as a string, and a + SALT character array which is described below, and returns a + printable ASCII string which starts with another salt. It is + believed that, given the output of the function, the best way to + find a KEY that will produce that output is to guess values of KEY + until the original value of KEY is found. - struct timeval now; - struct timespec timeout; - int retcode; + The SALT parameter does two things. Firstly, it selects which + algorithm is used, the MD5-based one or the DES-based one. + Secondly, it makes life harder for someone trying to guess + passwords against a file containing many passwords; without a + SALT, an intruder can make a guess, run `crypt' on it once, and + compare the result with all the passwords. With a SALT, the + intruder must run `crypt' once for each different salt. + + For the MD5-based algorithm, the SALT should consist of the string + `$1$', followed by up to 8 characters, terminated by either + another `$' or the end of the string. The result of `crypt' will + be the SALT, followed by a `$' if the salt didn't end with one, + followed by 22 characters from the alphabet `./0-9A-Za-z', up to + 34 characters total. Every character in the KEY is significant. + + For the DES-based algorithm, the SALT should consist of two + characters from the alphabet `./0-9A-Za-z', and the result of + `crypt' will be those two characters followed by 11 more from the + same alphabet, 13 in total. Only the first 8 characters in the + KEY are significant. + + The MD5-based algorithm has no limit on the useful length of the + password used, and is slightly more secure. It is therefore + preferred over the DES-based algorithm. + + When the user enters their password for the first time, the SALT + should be set to a new string which is reasonably random. To + verify a password against the result of a previous call to + `crypt', pass the result of the previous call as the SALT. + + The following short program is an example of how to use `crypt' the +first time a password is entered. Note that the SALT generation is +just barely acceptable; in particular, it is not unique between +machines, and in many applications it would not be acceptable to let an +attacker know what time the user's password was last set. + + #include + #include + #include + #include - pthread_mutex_lock(&mut); - gettimeofday(&now); - timeout.tv_sec = now.tv_sec + 5; - timeout.tv_nsec = now.tv_usec * 1000; - retcode = 0; - while (x <= y && retcode != ETIMEDOUT) { - retcode = pthread_cond_timedwait(&cond, &mut, &timeout); - } - if (retcode == ETIMEDOUT) { - /* timeout occurred */ - } else { - /* operate on x and y */ + int + main(void) + { + unsigned long seed[2]; + char salt[] = "$1$........"; + const char *const seedchars = + "./0123456789ABCDEFGHIJKLMNOPQRST" + "UVWXYZabcdefghijklmnopqrstuvwxyz"; + char *password; + int i; + + /* Generate a (not very) random seed. + You should do it better than this... */ + seed[0] = time(NULL); + seed[1] = getpid() ^ (seed[0] >> 14 & 0x30000); + + /* Turn it into printable characters from `seedchars'. */ + for (i = 0; i < 8; i++) + salt[3+i] = seedchars[(seed[i/5] >> (i%5)*6) & 0x3f]; + + /* Read in the user's password and encrypt it. */ + password = crypt(getpass("Password:"), salt); + + /* Print the results. */ + puts(password); + return 0; } - pthread_mutex_unlock(&mut); - Condition attributes can be specified at condition creation time, by -passing a condition attribute object as second argument to -`pthread_cond_init'. Passing `NULL' is equivalent to passing a -condition attribute object with all attributes set to their default -values. + The next program shows how to verify a password. It prompts the user +for a password and prints "Access granted." if the user types `GNU libc +manual'. - The LinuxThreads implementation supports no attributes for -conditions. The functions on condition attributes are included only for -compliance with the POSIX standard. + #include + #include + #include + #include + + int + main(void) + { + /* Hashed form of "GNU libc manual". */ + const char *const pass = "$1$/iSaq7rB$EoUw5jJPPvAPECNaaWzMK/"; + + char *result; + int ok; + + /* Read in the user's password and encrypt it, + passing the expected password in as the salt. */ + result = crypt(getpass("Password:"), pass); + + /* Test the result. */ + ok = strcmp (result, pass) == 0; + + puts(ok ? "Access granted." : "Access denied."); + return ok ? 0 : 1; + } - - Function: int pthread_condattr_init (pthread_condattr_t *ATTR) - - Function: int pthread_condattr_destroy (pthread_condattr_t *ATTR) - `pthread_condattr_init' initializes the condition attribute object - ATTR and fills it with default values for the attributes. - `pthread_condattr_destroy' destroys the condition attribute object - ATTR. + - Function: char * crypt_r (const char *KEY, const char *SALT, struct + crypt_data * DATA) + The `crypt_r' function does the same thing as `crypt', but takes + an extra parameter which includes space for its result (among + other things), so it can be reentrant. `data->initialized' must be + cleared to zero before the first time `crypt_r' is called. - Both functions do nothing in the LinuxThreads implementation. + The `crypt_r' function is a GNU extension. - `pthread_condattr_init' and `pthread_condattr_destroy' always - return 0. + The `crypt' and `crypt_r' functions are prototyped in the header +`crypt.h'.  -File: libc.info, Node: POSIX Semaphores, Next: Thread-Specific Data, Prev: Condition Variables, Up: POSIX Threads +File: libc.info, Node: DES Encryption, Prev: crypt, Up: Cryptographic Functions -POSIX Semaphores -================ +DES Encryption +============== - Semaphores are counters for resources shared between threads. The -basic operations on semaphores are: increment the counter atomically, -and wait until the counter is non-null and decrement it atomically. + The Data Encryption Standard is described in the US Government +Federal Information Processing Standards (FIPS) 46-3 published by the +National Institute of Standards and Technology. The DES has been very +thoroughly analyzed since it was developed in the late 1970s, and no new +significant flaws have been found. - Semaphores have a maximum value past which they cannot be -incremented. The macro `SEM_VALUE_MAX' is defined to be this maximum -value. In the GNU C library, `SEM_VALUE_MAX' is equal to `INT_MAX' -(*note Range of Type::), but it may be much smaller on other systems. + However, the DES uses only a 56-bit key (plus 8 parity bits), and a +machine has been built in 1998 which can search through all possible +keys in about 6 days, which cost about US$200000; faster searches would +be possible with more money. This makes simple DES insecure for most +purposes, and NIST no longer permits new US government systems to use +simple DES. - The pthreads library implements POSIX 1003.1b semaphores. These -should not be confused with System V semaphores (`ipc', `semctl' and -`semop'). + For serious encryption functionality, it is recommended that one of +the many free encryption libraries be used instead of these routines. - All the semaphore functions and macros are defined in `semaphore.h'. + The DES is a reversible operation which takes a 64-bit block and a +64-bit key, and produces another 64-bit block. Usually the bits are +numbered so that the most-significant bit, the first bit, of each block +is numbered 1. - - Function: int sem_init (sem_t *SEM, int PSHARED, unsigned int VALUE) - `sem_init' initializes the semaphore object pointed to by SEM. The - count associated with the semaphore is set initially to VALUE. The - PSHARED argument indicates whether the semaphore is local to the - current process (PSHARED is zero) or is to be shared between - several processes (PSHARED is not zero). + Under that numbering, every 8th bit of the key (the 8th, 16th, and so +on) is not used by the encryption algorithm itself. But the key must +have odd parity; that is, out of bits 1 through 8, and 9 through 16, and +so on, there must be an odd number of `1' bits, and this completely +specifies the unused bits. - On success `sem_init' returns 0. On failure it returns -1 and sets - ERRNO to one of the following values: + - Function: void setkey (const char *KEY) + The `setkey' function sets an internal data structure to be an + expanded form of KEY. KEY is specified as an array of 64 bits + each stored in a `char', the first bit is `key[0]' and the 64th + bit is `key[63]'. The KEY should have the correct parity. - `EINVAL' - VALUE exceeds the maximal counter value `SEM_VALUE_MAX' + - Function: void encrypt (char *BLOCK, int EDFLAG) + The `encrypt' function encrypts BLOCK if EDFLAG is 0, otherwise it + decrypts BLOCK, using a key previously set by `setkey'. The + result is placed in BLOCK. - `ENOSYS' - PSHARED is not zero. LinuxThreads currently does not support - process-shared semaphores. (This will eventually change.) + Like `setkey', BLOCK is specified as an array of 64 bits each + stored in a `char', but there are no parity bits in BLOCK. - - Function: int sem_destroy (sem_t * SEM) - `sem_destroy' destroys a semaphore object, freeing the resources it - might hold. If any threads are waiting on the semaphore when - `sem_destroy' is called, it fails and sets ERRNO to `EBUSY'. + - Function: void setkey_r (const char *KEY, struct crypt_data * DATA) + - Function: void encrypt_r (char *BLOCK, int EDFLAG, struct crypt_data + * DATA) + These are reentrant versions of `setkey' and `encrypt'. The only + difference is the extra parameter, which stores the expanded + version of KEY. Before calling `setkey_r' the first time, + `data->initialized' must be cleared to zero. - In the LinuxThreads implementation, no resources are associated - with semaphore objects, thus `sem_destroy' actually does nothing - except checking that no thread is waiting on the semaphore. This - will change when process-shared semaphores are implemented. + The `setkey_r' and `encrypt_r' functions are GNU extensions. +`setkey', `encrypt', `setkey_r', and `encrypt_r' are defined in +`crypt.h'. - - Function: int sem_wait (sem_t * SEM) - `sem_wait' suspends the calling thread until the semaphore pointed - to by SEM has non-zero count. It then atomically decreases the - semaphore count. + - Function: int ecb_crypt (char *KEY, char *BLOCKS, unsigned LEN, + unsigned MODE) + The function `ecb_crypt' encrypts or decrypts one or more blocks + using DES. Each block is encrypted independently. - `sem_wait' is a cancellation point. It always returns 0. + The BLOCKS and the KEY are stored packed in 8-bit bytes, so that + the first bit of the key is the most-significant bit of `key[0]' + and the 63rd bit of the key is stored as the least-significant bit + of `key[7]'. The KEY should have the correct parity. - - Function: int sem_trywait (sem_t * SEM) - `sem_trywait' is a non-blocking variant of `sem_wait'. If the - semaphore pointed to by SEM has non-zero count, the count is - atomically decreased and `sem_trywait' immediately returns 0. If - the semaphore count is zero, `sem_trywait' immediately returns -1 - and sets errno to `EAGAIN'. + LEN is the number of bytes in BLOCKS. It should be a multiple of + 8 (so that there is a whole number of blocks to encrypt). LEN is + limited to a maximum of `DES_MAXDATA' bytes. - - Function: int sem_post (sem_t * SEM) - `sem_post' atomically increases the count of the semaphore pointed - to by SEM. This function never blocks. + The result of the encryption replaces the input in BLOCKS. - On processors supporting atomic compare-and-swap (Intel 486, - Pentium and later, Alpha, PowerPC, MIPS II, Motorola 68k, - Ultrasparc), the `sem_post' function is can safely be called from - signal handlers. This is the only thread synchronization function - provided by POSIX threads that is async-signal safe. On the Intel - 386 and earlier Sparc chips, the current LinuxThreads - implementation of `sem_post' is not async-signal safe, because the - hardware does not support the required atomic operations. + The MODE parameter is the bitwise OR of two of the following: - `sem_post' always succeeds and returns 0, unless the semaphore - count would exceed `SEM_VALUE_MAX' after being incremented. In - that case `sem_post' returns -1 and sets ERRNO to `EINVAL'. The - semaphore count is left unchanged. + `DES_ENCRYPT' + This constant, used in the MODE parameter, specifies that + BLOCKS is to be encrypted. - - Function: int sem_getvalue (sem_t * SEM, int * SVAL) - `sem_getvalue' stores in the location pointed to by SVAL the - current count of the semaphore SEM. It always returns 0. + `DES_DECRYPT' + This constant, used in the MODE parameter, specifies that + BLOCKS is to be decrypted. + + `DES_HW' + This constant, used in the MODE parameter, asks to use a + hardware device. If no hardware device is available, + encryption happens anyway, but in software. + + `DES_SW' + This constant, used in the MODE parameter, specifies that no + hardware device is to be used. + + The result of the function will be one of these values: + + `DESERR_NONE' + The encryption succeeded. + + `DESERR_NOHWDEVICE' + The encryption succeeded, but there was no hardware device + available. + + `DESERR_HWERROR' + The encryption failed because of a hardware problem. + + `DESERR_BADPARAM' + The encryption failed because of a bad parameter, for + instance LEN is not a multiple of 8 or LEN is larger than + `DES_MAXDATA'. + + - Function: int DES_FAILED (int ERR) + This macro returns 1 if ERR is a `success' result code from + `ecb_crypt' or `cbc_crypt', and 0 otherwise. + + - Function: int cbc_crypt (char *KEY, char *BLOCKS, unsigned LEN, + unsigned MODE, char *IVEC) + The function `cbc_crypt' encrypts or decrypts one or more blocks + using DES in Cipher Block Chaining mode. + + For encryption in CBC mode, each block is exclusive-ored with IVEC + before being encrypted, then IVEC is replaced with the result of + the encryption, then the next block is processed. Decryption is + the reverse of this process. + + This has the advantage that blocks which are the same before being + encrypted are very unlikely to be the same after being encrypted, + making it much harder to detect patterns in the data. + + Usually, IVEC is set to 8 random bytes before encryption starts. + Then the 8 random bytes are transmitted along with the encrypted + data (without themselves being encrypted), and passed back in as + IVEC for decryption. Another possibility is to set IVEC to 8 + zeroes initially, and have the first the block encrypted consist + of 8 random bytes. + + Otherwise, all the parameters are similar to those for `ecb_crypt'. + + - Function: void des_setparity (char *KEY) + The function `des_setparity' changes the 64-bit KEY, stored packed + in 8-bit bytes, to have odd parity by altering the low bits of + each byte. + + The `ecb_crypt', `cbc_crypt', and `des_setparity' functions and +their accompanying macros are all defined in the header +`rpc/des_crypt.h'.  -File: libc.info, Node: Thread-Specific Data, Next: Threads and Signal Handling, Prev: POSIX Semaphores, Up: POSIX Threads +File: libc.info, Node: Debugging Support, Next: POSIX Threads, Prev: Cryptographic Functions, Up: Top -Thread-Specific Data -==================== +Debugging support +***************** - Programs often need global or static variables that have different -values in different threads. Since threads share one memory space, this -cannot be achieved with regular variables. Thread-specific data is the -POSIX threads answer to this need. + Applications are usually debugged using dedicated debugger programs. +But sometimes this is not possible and, in any case, it is useful to +provide the developer with as much information as possible at the time +the problems are experienced. For this reason a few functions are +provided which a program can use to help the developer more easily +locate the problem. - Each thread possesses a private memory block, the thread-specific -data area, or TSD area for short. This area is indexed by TSD keys. The -TSD area associates values of type `void *' to TSD keys. TSD keys are -common to all threads, but the value associated with a given TSD key can -be different in each thread. +* Menu: - For concreteness, the TSD areas can be viewed as arrays of `void *' -pointers, TSD keys as integer indices into these arrays, and the value -of a TSD key as the value of the corresponding array element in the -calling thread. +* Backtraces:: Obtaining and printing a back trace of the + current stack. - When a thread is created, its TSD area initially associates `NULL' -with all keys. + +File: libc.info, Node: Backtraces, Up: Debugging Support - - Function: int pthread_key_create (pthread_key_t *KEY, void - (*destr_function) (void *)) - `pthread_key_create' allocates a new TSD key. The key is stored in - the location pointed to by KEY. There is a limit of - `PTHREAD_KEYS_MAX' on the number of keys allocated at a given - time. The value initially associated with the returned key is - `NULL' in all currently executing threads. +Backtraces +========== - The DESTR_FUNCTION argument, if not `NULL', specifies a destructor - function associated with the key. When a thread terminates via - `pthread_exit' or by cancellation, DESTR_FUNCTION is called on the - value associated with the key in that thread. The DESTR_FUNCTION - is not called if a key is deleted with `pthread_key_delete' or a - value is changed with `pthread_setspecific'. The order in which - destructor functions are called at thread termination time is - unspecified. + A "backtrace" is a list of the function calls that are currently +active in a thread. The usual way to inspect a backtrace of a program +is to use an external debugger such as gdb. However, sometimes it is +useful to obtain a backtrace programatically from within a program, +e.g., for the purposes of logging or diagnostics. - Before the destructor function is called, the `NULL' value is - associated with the key in the current thread. A destructor - function might, however, re-associate non-`NULL' values to that - key or some other key. To deal with this, if after all the - destructors have been called for all non-`NULL' values, there are - still some non-`NULL' values with associated destructors, then the - process is repeated. The LinuxThreads implementation stops the - process after `PTHREAD_DESTRUCTOR_ITERATIONS' iterations, even if - some non-`NULL' values with associated descriptors remain. Other - implementations may loop indefinitely. + The header file `execinfo.h' declares three functions that obtain +and manipulate backtraces of the current thread. - `pthread_key_create' returns 0 unless `PTHREAD_KEYS_MAX' keys have - already been allocated, in which case it fails and returns - `EAGAIN'. + - Function: int backtrace (void **BUFFER, int SIZE) + The `backtrace' function obtains a backtrace for the current + thread, as a list of pointers, and places the information into + BUFFER. The argument SIZE should be the number of `void *' + elements that will fit into BUFFER. The return value is the + actual number of entries of BUFFER that are obtained, and is at + most SIZE. - - Function: int pthread_key_delete (pthread_key_t KEY) - `pthread_key_delete' deallocates a TSD key. It does not check - whether non-`NULL' values are associated with that key in the - currently executing threads, nor call the destructor function - associated with the key. + The pointers placed in BUFFER are actually return addresses + obtained by inspecting the stack, one return address per stack + frame. - If there is no such key KEY, it returns `EINVAL'. Otherwise it - returns 0. + Note that certain compiler optimizations may interfere with + obtaining a valid backtrace. Function inlining causes the inlined + function to not have a stack frame; tail call optimization + replaces one stack frame with another; frame pointer elimination + will stop `backtrace' from interpreting the stack contents + correctly. - - Function: int pthread_setspecific (pthread_key_t KEY, const void - *POINTER) - `pthread_setspecific' changes the value associated with KEY in the - calling thread, storing the given POINTER instead. + - Function: char ** backtrace_symbols (void *const *BUFFER, int SIZE) + The `backtrace_symbols' function translates the information + obtained from the `backtrace' function into an array of strings. + The argument BUFFER should be a pointer to an array of addresses + obtained via the `backtrace' function, and SIZE is the number of + entries in that array (the return value of `backtrace'). - If there is no such key KEY, it returns `EINVAL'. Otherwise it - returns 0. + The return value is a pointer to an array of strings, which has + SIZE entries just like the array BUFFER. Each string contains a + printable representation of the corresponding element of BUFFER. + It includes the function name (if this can be determined), an + offset into the function, and the actual return address (in + hexadecimal). - - Function: void * pthread_getspecific (pthread_key_t KEY) - `pthread_getspecific' returns the value currently associated with - KEY in the calling thread. + Currently, the function name and offset only be obtained on + systems that use the ELF binary format for programs and libraries. + On other systems, only the hexadecimal return address will be + present. Also, you may need to pass additional flags to the + linker to make the function names available to the program. (For + example, on systems using GNU ld, you must pass (`-rdynamic'.) - If there is no such key KEY, it returns `NULL'. + The return value of `backtrace_symbols' is a pointer obtained via + the `malloc' function, and it is the responsibility of the caller + to `free' that pointer. Note that only the return value need be + freed, not the individual strings. - The following code fragment allocates a thread-specific array of 100 -characters, with automatic reclaimation at thread exit: + The return value is `NULL' if sufficient memory for the strings + cannot be obtained. - /* Key for the thread-specific buffer */ - static pthread_key_t buffer_key; - - /* Once-only initialisation of the key */ - static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT; + - Function: void backtrace_symbols_fd (void *const *BUFFER, int SIZE, + int FD) + The `backtrace_symbols_fd' function performs the same translation + as the function `backtrace_symbols' function. Instead of returning + the strings to the caller, it writes the strings to the file + descriptor FD, one per line. It does not use the `malloc' + function, and can therefore be used in situations where that + function might fail. + + The following program illustrates the use of these functions. Note +that the array to contain the return addresses returned by `backtrace' +is allocated on the stack. Therefore code like this can be used in +situations where the memory handling via `malloc' does not work anymore +(in which case the `backtrace_symbols' has to be replaced by a +`backtrace_symbols_fd' call as well). The number of return addresses +is normally not very large. Even complicated programs rather seldom +have a nesting level of more than, say, 50 and with 200 possible +entries probably all programs should be covered. + + #include + #include + #include - /* Allocate the thread-specific buffer */ - void buffer_alloc(void) + /* Obtain a backtrace and print it to `stdout'. */ + void + print_trace (void) { - pthread_once(&buffer_key_once, buffer_key_alloc); - pthread_setspecific(buffer_key, malloc(100)); - } + void *array[10]; + size_t size; + char **strings; + size_t i; - /* Return the thread-specific buffer */ - char * get_buffer(void) - { - return (char *) pthread_getspecific(buffer_key); + size = backtrace (array, 10); + strings = backtrace_symbols (array, size); + + printf ("Obtained %zd stack frames.\n", size); + + for (i = 0; i < size; i++) + printf ("%s\n", strings[i]); + + free (strings); } - /* Allocate the key */ - static void buffer_key_alloc() + /* A dummy function to make the backtrace more interesting. */ + void + dummy_function (void) { - pthread_key_create(&buffer_key, buffer_destroy); + print_trace (); } - /* Free the thread-specific buffer */ - static void buffer_destroy(void * buf) + int + main (void) { - free(buf); + dummy_function (); + return 0; }  -File: libc.info, Node: Threads and Signal Handling, Next: Threads and Fork, Prev: Thread-Specific Data, Up: POSIX Threads - -Threads and Signal Handling -=========================== - - - Function: int pthread_sigmask (int HOW, const sigset_t *NEWMASK, - sigset_t *OLDMASK) - `pthread_sigmask' changes the signal mask for the calling thread as - described by the HOW and NEWMASK arguments. If OLDMASK is not - `NULL', the previous signal mask is stored in the location pointed - to by OLDMASK. - - The meaning of the HOW and NEWMASK arguments is the same as for - `sigprocmask'. If HOW is `SIG_SETMASK', the signal mask is set to - NEWMASK. If HOW is `SIG_BLOCK', the signals specified to NEWMASK - are added to the current signal mask. If HOW is `SIG_UNBLOCK', - the signals specified to NEWMASK are removed from the current - signal mask. - - Recall that signal masks are set on a per-thread basis, but signal - actions and signal handlers, as set with `sigaction', are shared - between all threads. - - The `pthread_sigmask' function returns 0 on success, and one of the - following error codes on error: - `EINVAL' - HOW is not one of `SIG_SETMASK', `SIG_BLOCK', or `SIG_UNBLOCK' - - `EFAULT' - NEWMASK or OLDMASK point to invalid addresses - - - Function: int pthread_kill (pthread_t THREAD, int SIGNO) - `pthread_kill' sends signal number SIGNO to the thread THREAD. - The signal is delivered and handled as described in *Note Signal - Handling::. - - `pthread_kill' returns 0 on success, one of the following error - codes on error: - `EINVAL' - SIGNO is not a valid signal number - - `ESRCH' - The thread THREAD does not exist (e.g. it has already - terminated) - - - Function: int sigwait (const sigset_t *SET, int *SIG) - `sigwait' suspends the calling thread until one of the signals in - SET is delivered to the calling thread. It then stores the number - of the signal received in the location pointed to by SIG and - returns. The signals in SET must be blocked and not ignored on - entrance to `sigwait'. If the delivered signal has a signal handler - function attached, that function is _not_ called. +File: libc.info, Node: POSIX Threads, Next: Language Features, Prev: Debugging Support, Up: Top - `sigwait' is a cancellation point. It always returns 0. +POSIX Threads +************* - For `sigwait' to work reliably, the signals being waited for must be -blocked in all threads, not only in the calling thread, since otherwise -the POSIX semantics for signal delivery do not guarantee that it's the -thread doing the `sigwait' that will receive the signal. The best way -to achieve this is block those signals before any threads are created, -and never unblock them in the program other than by calling `sigwait'. + This chapter describes the pthreads (POSIX threads) library. This +library provides support functions for multithreaded programs: thread +primitives, synchronization objects, and so forth. It also implements +POSIX 1003.1b semaphores (not to be confused with System V semaphores). - Signal handling in LinuxThreads departs significantly from the POSIX -standard. According to the standard, "asynchronous" (external) signals -are addressed to the whole process (the collection of all threads), -which then delivers them to one particular thread. The thread that -actually receives the signal is any thread that does not currently block -the signal. + The threads operations (`pthread_*') do not use ERRNO. Instead they +return an error code directly. The semaphore operations do use ERRNO. - In LinuxThreads, each thread is actually a kernel process with its -own PID, so external signals are always directed to one particular -thread. If, for instance, another thread is blocked in `sigwait' on -that signal, it will not be restarted. +* Menu: - The LinuxThreads implementation of `sigwait' installs dummy signal -handlers for the signals in SET for the duration of the wait. Since -signal handlers are shared between all threads, other threads must not -attach their own signal handlers to these signals, or alternatively -they should all block these signals (which is recommended anyway). +* Basic Thread Operations:: Creating, terminating, and waiting for threads. +* Thread Attributes:: Tuning thread scheduling. +* Cancellation:: Stopping a thread before it's done. +* Cleanup Handlers:: Deallocating resources when a thread is + canceled. +* Mutexes:: One way to synchronize threads. +* Condition Variables:: Another way. +* POSIX Semaphores:: And a third way. +* Thread-Specific Data:: Variables with different values in + different threads. +* Threads and Signal Handling:: Why you should avoid mixing the two, and + how to do it if you must. +* Threads and Fork:: Interactions between threads and the + `fork' function. +* Streams and Fork:: Interactions between stdio streams and + `fork'. +* Miscellaneous Thread Functions:: A grab bag of utility routines. diff -durpN glibc-2.2.4/manual/libc.info-5 glibc-2.2.5/manual/libc.info-5 --- glibc-2.2.4/manual/libc.info-5 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-5 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,6 +33,261 @@ software. Copies published by the Free funds for GNU development.  +File: libc.info, Node: Growing Objects, Next: Extra Fast Growing, Prev: Obstack Functions, Up: Obstacks + +Growing Objects +............... + + Because memory in obstack chunks is used sequentially, it is +possible to build up an object step by step, adding one or more bytes +at a time to the end of the object. With this technique, you do not +need to know how much data you will put in the object until you come to +the end of it. We call this the technique of "growing objects". The +special functions for adding data to the growing object are described +in this section. + + You don't need to do anything special when you start to grow an +object. Using one of the functions to add data to the object +automatically starts it. However, it is necessary to say explicitly +when the object is finished. This is done with the function +`obstack_finish'. + + The actual address of the object thus built up is not known until the +object is finished. Until then, it always remains possible that you +will add so much data that the object must be copied into a new chunk. + + While the obstack is in use for a growing object, you cannot use it +for ordinary allocation of another object. If you try to do so, the +space already added to the growing object will become part of the other +object. + + - Function: void obstack_blank (struct obstack *OBSTACK-PTR, int SIZE) + The most basic function for adding to a growing object is + `obstack_blank', which adds space without initializing it. + + - Function: void obstack_grow (struct obstack *OBSTACK-PTR, void + *DATA, int SIZE) + To add a block of initialized space, use `obstack_grow', which is + the growing-object analogue of `obstack_copy'. It adds SIZE bytes + of data to the growing object, copying the contents from DATA. + + - Function: void obstack_grow0 (struct obstack *OBSTACK-PTR, void + *DATA, int SIZE) + This is the growing-object analogue of `obstack_copy0'. It adds + SIZE bytes copied from DATA, followed by an additional null + character. + + - Function: void obstack_1grow (struct obstack *OBSTACK-PTR, char C) + To add one character at a time, use the function `obstack_1grow'. + It adds a single byte containing C to the growing object. + + - Function: void obstack_ptr_grow (struct obstack *OBSTACK-PTR, void + *DATA) + Adding the value of a pointer one can use the function + `obstack_ptr_grow'. It adds `sizeof (void *)' bytes containing + the value of DATA. + + - Function: void obstack_int_grow (struct obstack *OBSTACK-PTR, int + DATA) + A single value of type `int' can be added by using the + `obstack_int_grow' function. It adds `sizeof (int)' bytes to the + growing object and initializes them with the value of DATA. + + - Function: void * obstack_finish (struct obstack *OBSTACK-PTR) + When you are finished growing the object, use the function + `obstack_finish' to close it off and return its final address. + + Once you have finished the object, the obstack is available for + ordinary allocation or for growing another object. + + This function can return a null pointer under the same conditions + as `obstack_alloc' (*note Allocation in an Obstack::). + + When you build an object by growing it, you will probably need to +know afterward how long it became. You need not keep track of this as +you grow the object, because you can find out the length from the +obstack just before finishing the object with the function +`obstack_object_size', declared as follows: + + - Function: int obstack_object_size (struct obstack *OBSTACK-PTR) + This function returns the current size of the growing object, in + bytes. Remember to call this function _before_ finishing the + object. After it is finished, `obstack_object_size' will return + zero. + + If you have started growing an object and wish to cancel it, you +should finish it and then free it, like this: + + obstack_free (obstack_ptr, obstack_finish (obstack_ptr)); + +This has no effect if no object was growing. + + You can use `obstack_blank' with a negative size argument to make +the current object smaller. Just don't try to shrink it beyond zero +length--there's no telling what will happen if you do that. + + +File: libc.info, Node: Extra Fast Growing, Next: Status of an Obstack, Prev: Growing Objects, Up: Obstacks + +Extra Fast Growing Objects +.......................... + + The usual functions for growing objects incur overhead for checking +whether there is room for the new growth in the current chunk. If you +are frequently constructing objects in small steps of growth, this +overhead can be significant. + + You can reduce the overhead by using special "fast growth" functions +that grow the object without checking. In order to have a robust +program, you must do the checking yourself. If you do this checking in +the simplest way each time you are about to add data to the object, you +have not saved anything, because that is what the ordinary growth +functions do. But if you can arrange to check less often, or check +more efficiently, then you make the program faster. + + The function `obstack_room' returns the amount of room available in +the current chunk. It is declared as follows: + + - Function: int obstack_room (struct obstack *OBSTACK-PTR) + This returns the number of bytes that can be added safely to the + current growing object (or to an object about to be started) in + obstack OBSTACK using the fast growth functions. + + While you know there is room, you can use these fast growth functions +for adding data to a growing object: + + - Function: void obstack_1grow_fast (struct obstack *OBSTACK-PTR, char + C) + The function `obstack_1grow_fast' adds one byte containing the + character C to the growing object in obstack OBSTACK-PTR. + + - Function: void obstack_ptr_grow_fast (struct obstack *OBSTACK-PTR, + void *DATA) + The function `obstack_ptr_grow_fast' adds `sizeof (void *)' bytes + containing the value of DATA to the growing object in obstack + OBSTACK-PTR. + + - Function: void obstack_int_grow_fast (struct obstack *OBSTACK-PTR, + int DATA) + The function `obstack_int_grow_fast' adds `sizeof (int)' bytes + containing the value of DATA to the growing object in obstack + OBSTACK-PTR. + + - Function: void obstack_blank_fast (struct obstack *OBSTACK-PTR, int + SIZE) + The function `obstack_blank_fast' adds SIZE bytes to the growing + object in obstack OBSTACK-PTR without initializing them. + + When you check for space using `obstack_room' and there is not +enough room for what you want to add, the fast growth functions are not +safe. In this case, simply use the corresponding ordinary growth +function instead. Very soon this will copy the object to a new chunk; +then there will be lots of room available again. + + So, each time you use an ordinary growth function, check afterward +for sufficient space using `obstack_room'. Once the object is copied +to a new chunk, there will be plenty of space again, so the program will +start using the fast growth functions again. + + Here is an example: + + void + add_string (struct obstack *obstack, const char *ptr, int len) + { + while (len > 0) + { + int room = obstack_room (obstack); + if (room == 0) + { + /* Not enough room. Add one character slowly, + which may copy to a new chunk and make room. */ + obstack_1grow (obstack, *ptr++); + len--; + } + else + { + if (room > len) + room = len; + /* Add fast as much as we have room for. */ + len -= room; + while (room-- > 0) + obstack_1grow_fast (obstack, *ptr++); + } + } + } + + +File: libc.info, Node: Status of an Obstack, Next: Obstacks Data Alignment, Prev: Extra Fast Growing, Up: Obstacks + +Status of an Obstack +.................... + + Here are functions that provide information on the current status of +allocation in an obstack. You can use them to learn about an object +while still growing it. + + - Function: void * obstack_base (struct obstack *OBSTACK-PTR) + This function returns the tentative address of the beginning of the + currently growing object in OBSTACK-PTR. If you finish the object + immediately, it will have that address. If you make it larger + first, it may outgrow the current chunk--then its address will + change! + + If no object is growing, this value says where the next object you + allocate will start (once again assuming it fits in the current + chunk). + + - Function: void * obstack_next_free (struct obstack *OBSTACK-PTR) + This function returns the address of the first free byte in the + current chunk of obstack OBSTACK-PTR. This is the end of the + currently growing object. If no object is growing, + `obstack_next_free' returns the same value as `obstack_base'. + + - Function: int obstack_object_size (struct obstack *OBSTACK-PTR) + This function returns the size in bytes of the currently growing + object. This is equivalent to + + obstack_next_free (OBSTACK-PTR) - obstack_base (OBSTACK-PTR) + + +File: libc.info, Node: Obstacks Data Alignment, Next: Obstack Chunks, Prev: Status of an Obstack, Up: Obstacks + +Alignment of Data in Obstacks +............................. + + Each obstack has an "alignment boundary"; each object allocated in +the obstack automatically starts on an address that is a multiple of the +specified boundary. By default, this boundary is 4 bytes. + + To access an obstack's alignment boundary, use the macro +`obstack_alignment_mask', whose function prototype looks like this: + + - Macro: int obstack_alignment_mask (struct obstack *OBSTACK-PTR) + The value is a bit mask; a bit that is 1 indicates that the + corresponding bit in the address of an object should be 0. The + mask value should be one less than a power of 2; the effect is + that all object addresses are multiples of that power of 2. The + default value of the mask is 3, so that addresses are multiples of + 4. A mask value of 0 means an object can start on any multiple of + 1 (that is, no alignment is required). + + The expansion of the macro `obstack_alignment_mask' is an lvalue, + so you can alter the mask by assignment. For example, this + statement: + + obstack_alignment_mask (obstack_ptr) = 0; + + has the effect of turning off alignment processing in the + specified obstack. + + Note that a change in alignment mask does not take effect until +_after_ the next time an object is allocated or finished in the +obstack. If you are not growing an object, you can make the new +alignment mask take effect immediately by calling `obstack_finish'. +This will finish a zero-length object and then do proper alignment for +the next object. + + File: libc.info, Node: Obstack Chunks, Next: Summary of Obstacks, Prev: Obstacks Data Alignment, Up: Obstacks Obstack Chunks @@ -822,402 +1078,4 @@ write `islower(c) ? toupper(c) : c' rath - Function: int _toupper (int C) This is identical to `toupper', and is provided for compatibility with the SVID. - - -File: libc.info, Node: Classification of Wide Characters, Next: Using Wide Char Classes, Prev: Case Conversion, Up: Character Handling - -Character class determination for wide characters -================================================= - - Amendment 1 to ISO C90 defines functions to classify wide -characters. Although the original ISO C90 standard already defined the -type `wchar_t', no functions operating on them were defined. - - The general design of the classification functions for wide -characters is more general. It allows extensions to the set of -available classifications, beyond those which are always available. -The POSIX standard specifies how extensions can be made, and this is -already implemented in the GNU C library implementation of the -`localedef' program. - - The character class functions are normally implemented with bitsets, -with a bitset per character. For a given character, the appropriate -bitset is read from a table and a test is performed as to whether a -certain bit is set. Which bit is tested for is determined by the class. - - For the wide character classification functions this is made visible. -There is a type classification type defined, a function to retrieve this -value for a given class, and a function to test whether a given -character is in this class, using the classification value. On top of -this the normal character classification functions as used for `char' -objects can be defined. - - - Data type: wctype_t - The `wctype_t' can hold a value which represents a character class. - The only defined way to generate such a value is by using the - `wctype' function. - - This type is defined in `wctype.h'. - - - Function: wctype_t wctype (const char *PROPERTY) - The `wctype' returns a value representing a class of wide - characters which is identified by the string PROPERTY. Beside - some standard properties each locale can define its own ones. In - case no property with the given name is known for the current - locale selected for the `LC_CTYPE' category, the function returns - zero. - - The properties known in every locale are: - - `"alnum"' `"alpha"' `"cntrl"' `"digit"' - `"graph"' `"lower"' `"print"' `"punct"' - `"space"' `"upper"' `"xdigit"' - - This function is declared in `wctype.h'. - - To test the membership of a character to one of the non-standard -classes the ISO C standard defines a completely new function. - - - Function: int iswctype (wint_t WC, wctype_t DESC) - This function returns a nonzero value if WC is in the character - class specified by DESC. DESC must previously be returned by a - successful call to `wctype'. - - This function is declared in `wctype.h'. - - To make it easier to use the commonly-used classification functions, -they are defined in the C library. There is no need to use `wctype' if -the property string is one of the known character classes. In some -situations it is desirable to construct the property strings, and then -it is important that `wctype' can also handle the standard classes. - - - Function: int iswalnum (wint_t WC) - This function returns a nonzero value if WC is an alphanumeric - character (a letter or number); in other words, if either - `iswalpha' or `iswdigit' is true of a character, then `iswalnum' - is also true. - - This function can be implemented using - - iswctype (wc, wctype ("alnum")) - - It is declared in `wctype.h'. - - - Function: int iswalpha (wint_t WC) - Returns true if WC is an alphabetic character (a letter). If - `iswlower' or `iswupper' is true of a character, then `iswalpha' - is also true. - - In some locales, there may be additional characters for which - `iswalpha' is true--letters which are neither upper case nor lower - case. But in the standard `"C"' locale, there are no such - additional characters. - - This function can be implemented using - - iswctype (wc, wctype ("alpha")) - - It is declared in `wctype.h'. - - - Function: int iswcntrl (wint_t WC) - Returns true if WC is a control character (that is, a character - that is not a printing character). - - This function can be implemented using - - iswctype (wc, wctype ("cntrl")) - - It is declared in `wctype.h'. - - - Function: int iswdigit (wint_t WC) - Returns true if WC is a digit (e.g., `0' through `9'). Please - note that this function does not only return a nonzero value for - _decimal_ digits, but for all kinds of digits. A consequence is - that code like the following will *not* work unconditionally for - wide characters: - - n = 0; - while (iswdigit (*wc)) - { - n *= 10; - n += *wc++ - L'0'; - } - - This function can be implemented using - - iswctype (wc, wctype ("digit")) - - It is declared in `wctype.h'. - - - Function: int iswgraph (wint_t WC) - Returns true if WC is a graphic character; that is, a character - that has a glyph associated with it. The whitespace characters - are not considered graphic. - - This function can be implemented using - - iswctype (wc, wctype ("graph")) - - It is declared in `wctype.h'. - - - Function: int iswlower (wint_t WC) - Returns true if WC is a lower-case letter. The letter need not be - from the Latin alphabet, any alphabet representable is valid. - - This function can be implemented using - - iswctype (wc, wctype ("lower")) - - It is declared in `wctype.h'. - - - Function: int iswprint (wint_t WC) - Returns true if WC is a printing character. Printing characters - include all the graphic characters, plus the space (` ') character. - - This function can be implemented using - - iswctype (wc, wctype ("print")) - - It is declared in `wctype.h'. - - - Function: int iswpunct (wint_t WC) - Returns true if WC is a punctuation character. This means any - printing character that is not alphanumeric or a space character. - - This function can be implemented using - - iswctype (wc, wctype ("punct")) - - It is declared in `wctype.h'. - - - Function: int iswspace (wint_t WC) - Returns true if WC is a "whitespace" character. In the standard - `"C"' locale, `iswspace' returns true for only the standard - whitespace characters: - - `L' '' - space - - `L'\f'' - formfeed - - `L'\n'' - newline - - `L'\r'' - carriage return - - `L'\t'' - horizontal tab - - `L'\v'' - vertical tab - - This function can be implemented using - - iswctype (wc, wctype ("space")) - - It is declared in `wctype.h'. - - - Function: int iswupper (wint_t WC) - Returns true if WC is an upper-case letter. The letter need not be - from the Latin alphabet, any alphabet representable is valid. - - This function can be implemented using - - iswctype (wc, wctype ("upper")) - - It is declared in `wctype.h'. - - - Function: int iswxdigit (wint_t WC) - Returns true if WC is a hexadecimal digit. Hexadecimal digits - include the normal decimal digits `0' through `9' and the letters - `A' through `F' and `a' through `f'. - - This function can be implemented using - - iswctype (wc, wctype ("xdigit")) - - It is declared in `wctype.h'. - - The GNU C library also provides a function which is not defined in -the ISO C standard but which is available as a version for single byte -characters as well. - - - Function: int iswblank (wint_t WC) - Returns true if WC is a blank character; that is, a space or a tab. - This function is a GNU extension. It is declared in `wchar.h'. - - -File: libc.info, Node: Using Wide Char Classes, Next: Wide Character Case Conversion, Prev: Classification of Wide Characters, Up: Character Handling - -Notes on using the wide character classes -========================================= - - The first note is probably not astonishing but still occasionally a -cause of problems. The `iswXXX' functions can be implemented using -macros and in fact, the GNU C library does this. They are still -available as real functions but when the `wctype.h' header is included -the macros will be used. This is the same as the `char' type versions -of these functions. - - The second note covers something new. It can be best illustrated by -a (real-world) example. The first piece of code is an excerpt from the -original code. It is truncated a bit but the intention should be clear. - - int - is_in_class (int c, const char *class) - { - if (strcmp (class, "alnum") == 0) - return isalnum (c); - if (strcmp (class, "alpha") == 0) - return isalpha (c); - if (strcmp (class, "cntrl") == 0) - return iscntrl (c); - ... - return 0; - } - - Now, with the `wctype' and `iswctype' you can avoid the `if' -cascades, but rewriting the code as follows is wrong: - - int - is_in_class (int c, const char *class) - { - wctype_t desc = wctype (class); - return desc ? iswctype ((wint_t) c, desc) : 0; - } - - The problem is that it is not guaranteed that the wide character -representation of a single-byte character can be found using casting. -In fact, usually this fails miserably. The correct solution to this -problem is to write the code as follows: - - int - is_in_class (int c, const char *class) - { - wctype_t desc = wctype (class); - return desc ? iswctype (btowc (c), desc) : 0; - } - - *Note Converting a Character::, for more information on `btowc'. -Note that this change probably does not improve the performance of the -program a lot since the `wctype' function still has to make the string -comparisons. It gets really interesting if the `is_in_class' function -is called more than once for the same class name. In this case the -variable DESC could be computed once and reused for all the calls. -Therefore the above form of the function is probably not the final one. - - -File: libc.info, Node: Wide Character Case Conversion, Prev: Using Wide Char Classes, Up: Character Handling - -Mapping of wide characters. -=========================== - - The classification functions are also generalized by the ISO C -standard. Instead of just allowing the two standard mappings, a locale -can contain others. Again, the `localedef' program already supports -generating such locale data files. - - - Data Type: wctrans_t - This data type is defined as a scalar type which can hold a value - representing the locale-dependent character mapping. There is no - way to construct such a value apart from using the return value of - the `wctrans' function. - - This type is defined in `wctype.h'. - - - Function: wctrans_t wctrans (const char *PROPERTY) - The `wctrans' function has to be used to find out whether a named - mapping is defined in the current locale selected for the - `LC_CTYPE' category. If the returned value is non-zero, you can - use it afterwards in calls to `towctrans'. If the return value is - zero no such mapping is known in the current locale. - - Beside locale-specific mappings there are two mappings which are - guaranteed to be available in every locale: - - `"tolower"' `"toupper"' - - These functions are declared in `wctype.h'. - - - Function: wint_t towctrans (wint_t WC, wctrans_t DESC) - `towctrans' maps the input character WC according to the rules of - the mapping for which DESC is a descriptor, and returns the value - it finds. DESC must be obtained by a successful call to `wctrans'. - - This function is declared in `wctype.h'. - - For the generally available mappings, the ISO C standard defines -convenient shortcuts so that it is not necessary to call `wctrans' for -them. - - - Function: wint_t towlower (wint_t WC) - If WC is an upper-case letter, `towlower' returns the corresponding - lower-case letter. If WC is not an upper-case letter, WC is - returned unchanged. - - `towlower' can be implemented using - - towctrans (wc, wctrans ("tolower")) - - This function is declared in `wctype.h'. - - - Function: wint_t towupper (wint_t WC) - If WC is a lower-case letter, `towupper' returns the corresponding - upper-case letter. Otherwise WC is returned unchanged. - - `towupper' can be implemented using - - towctrans (wc, wctrans ("toupper")) - - This function is declared in `wctype.h'. - - The same warnings given in the last section for the use of the wide -character classification functions apply here. It is not possible to -simply cast a `char' type value to a `wint_t' and use it as an argument -to `towctrans' calls. - - -File: libc.info, Node: String and Array Utilities, Next: Character Set Handling, Prev: Character Handling, Up: Top - -String and Array Utilities -************************** - - Operations on strings (or arrays of characters) are an important -part of many programs. The GNU C library provides an extensive set of -string utility functions, including functions for copying, -concatenating, comparing, and searching strings. Many of these -functions can also operate on arbitrary regions of storage; for -example, the `memcpy' function can be used to copy the contents of any -kind of array. - - It's fairly common for beginning C programmers to "reinvent the -wheel" by duplicating this functionality in their own code, but it pays -to become familiar with the library functions and to make use of them, -since this offers benefits in maintenance, efficiency, and portability. - - For instance, you could easily compare one string to another in two -lines of C code, but if you use the built-in `strcmp' function, you're -less likely to make a mistake. And, since these library functions are -typically highly optimized, your program may run faster too. - -* Menu: - -* Representation of Strings:: Introduction to basic concepts. -* String/Array Conventions:: Whether to use a string function or an - arbitrary array function. -* String Length:: Determining the length of a string. -* Copying and Concatenation:: Functions to copy the contents of strings - and arrays. -* String/Array Comparison:: Functions for byte-wise and character-wise - comparison. -* Collation Functions:: Functions for collating strings. -* Search Functions:: Searching for a specific element or substring. -* Finding Tokens in a String:: Splitting a string into tokens by looking - for delimiters. -* strfry:: Function for flash-cooking a string. -* Trivial Encryption:: Obscuring data. -* Encode Binary Data:: Encoding and Decoding of Binary Data. -* Argz and Envz Vectors:: Null-separated string vectors. diff -durpN glibc-2.2.4/manual/libc.info-50 glibc-2.2.5/manual/libc.info-50 --- glibc-2.2.4/manual/libc.info-50 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-50 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1083 +33,1118 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Threads and Fork, Next: Streams and Fork, Prev: Threads and Signal Handling, Up: POSIX Threads - -Threads and Fork -================ - - It's not intuitively obvious what should happen when a -multi-threaded POSIX process calls `fork'. Not only are the semantics -tricky, but you may need to write code that does the right thing at -fork time even if that code doesn't use the `fork' function. Moreover, -you need to be aware of interaction between `fork' and some library -features like `pthread_once' and stdio streams. - - When `fork' is called by one of the threads of a process, it creates -a new process which is copy of the calling process. Effectively, in -addition to copying certain system objects, the function takes a -snapshot of the memory areas of the parent process, and creates -identical areas in the child. To make matters more complicated, with -threads it's possible for two or more threads to concurrently call fork -to create two or more child processes. - - The child process has a copy of the address space of the parent, but -it does not inherit any of its threads. Execution of the child process -is carried out by a new thread which returns from `fork' function with -a return value of zero; it is the only thread in the child process. -Because threads are not inherited across fork, issues arise. At the -time of the call to `fork', threads in the parent process other than -the one calling `fork' may have been executing critical regions of -code. As a result, the child process may get a copy of objects that -are not in a well-defined state. This potential problem affects all -components of the program. +File: libc.info, Node: Basic Thread Operations, Next: Thread Attributes, Up: POSIX Threads - Any program component which will continue being used in a child -process must correctly handle its state during `fork'. For this -purpose, the POSIX interface provides the special function -`pthread_atfork' for installing pointers to handler functions which are -called from within `fork'. +Basic Thread Operations +======================= - - Function: int pthread_atfork (void (*PREPARE)(void), void - (*PARENT)(void), void (*CHILD)(void)) - `pthread_atfork' registers handler functions to be called just - before and just after a new process is created with `fork'. The - PREPARE handler will be called from the parent process, just - before the new process is created. The PARENT handler will be - called from the parent process, just before `fork' returns. The - CHILD handler will be called from the child process, just before - `fork' returns. + These functions are the thread equivalents of `fork', `exit', and +`wait'. - `pthread_atfork' returns 0 on success and a non-zero error code on - error. + - Function: int pthread_create (pthread_t * THREAD, pthread_attr_t * + ATTR, void * (*START_ROUTINE)(void *), void * ARG) + `pthread_create' creates a new thread of control that executes + concurrently with the calling thread. The new thread calls the + function START_ROUTINE, passing it ARG as first argument. The new + thread terminates either explicitly, by calling `pthread_exit', or + implicitly, by returning from the START_ROUTINE function. The + latter case is equivalent to calling `pthread_exit' with the result + returned by START_ROUTINE as exit code. - One or more of the three handlers PREPARE, PARENT and CHILD can be - given as `NULL', meaning that no handler needs to be called at the - corresponding point. + The ATTR argument specifies thread attributes to be applied to the + new thread. *Note Thread Attributes::, for details. The ATTR + argument can also be `NULL', in which case default attributes are + used: the created thread is joinable (not detached) and has an + ordinary (not realtime) scheduling policy. - `pthread_atfork' can be called several times to install several - sets of handlers. At `fork' time, the PREPARE handlers are called - in LIFO order (last added with `pthread_atfork', first called - before `fork'), while the PARENT and CHILD handlers are called in - FIFO order (first added, first called). + On success, the identifier of the newly created thread is stored + in the location pointed by the THREAD argument, and a 0 is + returned. On error, a non-zero error code is returned. - If there is insufficient memory available to register the handlers, - `pthread_atfork' fails and returns `ENOMEM'. Otherwise it returns - 0. + This function may return the following errors: + `EAGAIN' + Not enough system resources to create a process for the new + thread, or more than `PTHREAD_THREADS_MAX' threads are + already active. - The functions `fork' and `pthread_atfork' must not be regarded as - reentrant from the context of the handlers. That is to say, if a - `pthread_atfork' handler invoked from within `fork' calls - `pthread_atfork' or `fork', the behavior is undefined. + - Function: void pthread_exit (void *RETVAL) + `pthread_exit' terminates the execution of the calling thread. All + cleanup handlers (*note Cleanup Handlers::) that have been set for + the calling thread with `pthread_cleanup_push' are executed in + reverse order (the most recently pushed handler is executed + first). Finalization functions for thread-specific data are then + called for all keys that have non-`NULL' values associated with + them in the calling thread (*note Thread-Specific Data::). + Finally, execution of the calling thread is stopped. - Registering a triplet of handlers is an atomic operation with - respect to fork. If new handlers are registered at about the same - time as a fork occurs, either all three handlers will be called, - or none of them will be called. + The RETVAL argument is the return value of the thread. It can be + retrieved from another thread using `pthread_join'. - The handlers are inherited by the child process, and there is no - way to remove them, short of using `exec' to load a new pocess - image. + The `pthread_exit' function never returns. + - Function: int pthread_cancel (pthread_t THREAD) + `pthread_cancel' sends a cancellation request to the thread denoted + by the THREAD argument. If there is no such thread, + `pthread_cancel' fails and returns `ESRCH'. Otherwise it returns + 0. *Note Cancellation::, for details. - To understand the purpose of `pthread_atfork', recall that `fork' -duplicates the whole memory space, including mutexes in their current -locking state, but only the calling thread: other threads are not -running in the child process. Thus, if a mutex is locked by a thread -other than the thread calling `fork', that mutex will remain locked -forever in the child process, possibly blocking the execution of the -child process. Or if some shared data, such as a linked list, was in the -middle of being updated by a thread in the parent process, the child -will get a copy of the incompletely updated data which it cannot use. + - Function: int pthread_join (pthread_t TH, void **thread_RETURN) + `pthread_join' suspends the execution of the calling thread until + the thread identified by TH terminates, either by calling + `pthread_exit' or by being canceled. - To avoid this, install handlers with `pthread_atfork' as follows: -have the PREPARE handler lock the mutexes (in locking order), and the -PARENT handler unlock the mutexes. The CHILD handler should reset the -mutexes using `pthread_mutex_init', as well as any other -synchronization objects such as condition variables. + If THREAD_RETURN is not `NULL', the return value of TH is stored + in the location pointed to by THREAD_RETURN. The return value of + TH is either the argument it gave to `pthread_exit', or + `PTHREAD_CANCELED' if TH was canceled. - Locking the global mutexes before the fork ensures that all other -threads are locked out of the critical regions of code protected by -those mutexes. Thus when `fork' takes a snapshot of the parent's -address space, that snapshot will copy valid, stable data. Resetting -the synchronization objects in the child process will ensure they are -properly cleansed of any artifacts from the threading subsystem of the -parent process. For example, a mutex may inherit a wait queue of -threads waiting for the lock; this wait queue makes no sense in the -child process. Initializing the mutex takes care of this. + The joined thread `th' must be in the joinable state: it must not + have been detached using `pthread_detach' or the + `PTHREAD_CREATE_DETACHED' attribute to `pthread_create'. - -File: libc.info, Node: Streams and Fork, Next: Miscellaneous Thread Functions, Prev: Threads and Fork, Up: POSIX Threads + When a joinable thread terminates, its memory resources (thread + descriptor and stack) are not deallocated until another thread + performs `pthread_join' on it. Therefore, `pthread_join' must be + called once for each joinable thread created to avoid memory leaks. -Streams and Fork -================ + At most one thread can wait for the termination of a given thread. + Calling `pthread_join' on a thread TH on which another thread is + already waiting for termination returns an error. - The GNU standard I/O library has an internal mutex which guards the -internal linked list of all standard C FILE objects. This mutex is -properly taken care of during `fork' so that the child receives an -intact copy of the list. This allows the `fopen' function, and related -stream-creating functions, to work correctly in the child process, -since these functions need to insert into the list. + `pthread_join' is a cancellation point. If a thread is canceled + while suspended in `pthread_join', the thread execution resumes + immediately and the cancellation is executed without waiting for + the TH thread to terminate. If cancellation occurs during + `pthread_join', the TH thread remains not joined. - However, the individual stream locks are not completely taken care -of. Thus unless the multithreaded application takes special -precautions in its use of `fork', the child process might not be able -to safely use the streams that it inherited from the parent. In -general, for any given open stream in the parent that is to be used by -the child process, the application must ensure that that stream is not -in use by another thread when `fork' is called. Otherwise an -inconsistent copy of the stream object be produced. An easy way to -ensure this is to use `flockfile' to lock the stream prior to calling -`fork' and then unlock it with `funlockfile' inside the parent process, -provided that the parent's threads properly honor these locks. Nothing -special needs to be done in the child process, since the library -internally resets all stream locks. + On success, the return value of TH is stored in the location + pointed to by THREAD_RETURN, and 0 is returned. On error, one of + the following values is returned: + `ESRCH' + No thread could be found corresponding to that specified by + TH. - Note that the stream locks are not shared between the parent and -child. For example, even if you ensure that, say, the stream `stdout' -is properly treated and can be safely used in the child, the stream -locks do not provide an exclusion mechanism between the parent and -child. If both processes write to `stdout', strangely interleaved -output may result regardless of the explicit use of `flockfile' or -implicit locks. + `EINVAL' + The TH thread has been detached, or another thread is already + waiting on termination of TH. - Also note that these provisions are a GNU extension; other systems -might not provide any way for streams to be used in the child of a -multithreaded process. POSIX requires that such a child process -confines itself to calling only asynchronous safe functions, which -excludes much of the library, including standard I/O. + `EDEADLK' + The TH argument refers to the calling thread.  -File: libc.info, Node: Miscellaneous Thread Functions, Prev: Streams and Fork, Up: POSIX Threads - -Miscellaneous Thread Functions -============================== - - - Function: pthread_t pthread_self (VOID) - `pthread_self' returns the thread identifier for the calling - thread. - - - Function: int pthread_equal (pthread_t thread1, pthread_t thread2) - `pthread_equal' determines if two thread identifiers refer to the - same thread. +File: libc.info, Node: Thread Attributes, Next: Cancellation, Prev: Basic Thread Operations, Up: POSIX Threads - A non-zero value is returned if THREAD1 and THREAD2 refer to the - same thread. Otherwise, 0 is returned. +Thread Attributes +================= - - Function: int pthread_detach (pthread_t TH) - `pthread_detach' puts the thread TH in the detached state. This - guarantees that the memory resources consumed by TH will be freed - immediately when TH terminates. However, this prevents other - threads from synchronizing on the termination of TH using - `pthread_join'. + Threads have a number of attributes that may be set at creation time. +This is done by filling a thread attribute object ATTR of type +`pthread_attr_t', then passing it as second argument to +`pthread_create'. Passing `NULL' is equivalent to passing a thread +attribute object with all attributes set to their default values. - A thread can be created initially in the detached state, using the - `detachstate' attribute to `pthread_create'. In contrast, - `pthread_detach' applies to threads created in the joinable state, - and which need to be put in the detached state later. + Attribute objects are consulted only when creating a new thread. The +same attribute object can be used for creating several threads. +Modifying an attribute object after a call to `pthread_create' does not +change the attributes of the thread previously created. - After `pthread_detach' completes, subsequent attempts to perform - `pthread_join' on TH will fail. If another thread is already - joining the thread TH at the time `pthread_detach' is called, - `pthread_detach' does nothing and leaves TH in the joinable state. + - Function: int pthread_attr_init (pthread_attr_t *ATTR) + `pthread_attr_init' initializes the thread attribute object ATTR + and fills it with default values for the attributes. (The default + values are listed below for each attribute.) - On success, 0 is returned. On error, one of the following codes is - returned: - `ESRCH' - No thread could be found corresponding to that specified by TH + Each attribute ATTRNAME (see below for a list of all attributes) + can be individually set using the function + `pthread_attr_setATTRNAME' and retrieved using the function + `pthread_attr_getATTRNAME'. - `EINVAL' - The thread TH is already in the detached state + - Function: int pthread_attr_destroy (pthread_attr_t *ATTR) + `pthread_attr_destroy' destroys the attribute object pointed to by + ATTR releasing any resources associated with it. ATTR is left in + an undefined state, and you must not use it again in a call to any + pthreads function until it has been reinitialized. - - Function: void pthread_kill_other_threads_np (VOID) - `pthread_kill_other_threads_np' is a non-portable LinuxThreads - extension. It causes all threads in the program to terminate - immediately, except the calling thread which proceeds normally. It - is intended to be called just before a thread calls one of the - `exec' functions, e.g. `execve'. + - Function: int pthread_attr_setattr (pthread_attr_t *OBJ, int VALUE) + Set attribute ATTR to VALUE in the attribute object pointed to by + OBJ. See below for a list of possible attributes and the values + they can take. - Termination of the other threads is not performed through - `pthread_cancel' and completely bypasses the cancellation - mechanism. Hence, the current settings for cancellation state and - cancellation type are ignored, and the cleanup handlers are not - executed in the terminated threads. + On success, these functions return 0. If VALUE is not meaningful + for the ATTR being modified, they will return the error code + `EINVAL'. Some of the functions have other failure modes; see + below. - According to POSIX 1003.1c, a successful `exec*' in one of the - threads should automatically terminate all other threads in the - program. This behavior is not yet implemented in LinuxThreads. - Calling `pthread_kill_other_threads_np' before `exec*' achieves - much of the same behavior, except that if `exec*' ultimately - fails, then all other threads are already killed. + - Function: int pthread_attr_getattr (const pthread_attr_t *OBJ, int + *VALUE) + Store the current setting of ATTR in OBJ into the variable pointed + to by VALUE. - - Function: int pthread_once (pthread_once_t *once_CONTROL, void - (*INIT_ROUTINE) (void)) - The purpose of `pthread_once' is to ensure that a piece of - initialization code is executed at most once. The ONCE_CONTROL - argument points to a static or extern variable statically - initialized to `PTHREAD_ONCE_INIT'. + These functions always return 0. - The first time `pthread_once' is called with a given ONCE_CONTROL - argument, it calls INIT_ROUTINE with no argument and changes the - value of the ONCE_CONTROL variable to record that initialization - has been performed. Subsequent calls to `pthread_once' with the - same `once_control' argument do nothing. + The following thread attributes are supported: +`detachstate' + Choose whether the thread is created in the joinable state (value + `PTHREAD_CREATE_JOINABLE') or in the detached state + (`PTHREAD_CREATE_DETACHED'). The default is + `PTHREAD_CREATE_JOINABLE'. - If a thread is cancelled while executing INIT_ROUTINE the state of - the ONCE_CONTROL variable is reset so that a future call to - `pthread_once' will call the routine again. + In the joinable state, another thread can synchronize on the thread + termination and recover its termination code using `pthread_join', + but some of the thread resources are kept allocated after the + thread terminates, and reclaimed only when another thread performs + `pthread_join' on that thread. - If the process forks while one or more threads are executing - `pthread_once' initialization routines, the states of their - respective ONCE_CONTROL variables will appear to be reset in the - child process so that if the child calls `pthread_once', the - routines will be executed. + In the detached state, the thread resources are immediately freed + when it terminates, but `pthread_join' cannot be used to + synchronize on the thread termination. - `pthread_once' always returns 0. + A thread created in the joinable state can later be put in the + detached thread using `pthread_detach'. - - Function: int pthread_setschedparam (pthread_t target_THREAD, int - POLICY, const struct sched_param *PARAM) - `pthread_setschedparam' sets the scheduling parameters for the - thread TARGET_THREAD as indicated by POLICY and PARAM. POLICY can - be either `SCHED_OTHER' (regular, non-realtime scheduling), - `SCHED_RR' (realtime, round-robin) or `SCHED_FIFO' (realtime, - first-in first-out). PARAM specifies the scheduling priority for - the two realtime policies. See `sched_setpolicy' for more - information on scheduling policies. +`schedpolicy' + Select the scheduling policy for the thread: one of `SCHED_OTHER' + (regular, non-realtime scheduling), `SCHED_RR' (realtime, + round-robin) or `SCHED_FIFO' (realtime, first-in first-out). The + default is `SCHED_OTHER'. The realtime scheduling policies `SCHED_RR' and `SCHED_FIFO' are available only to processes with superuser privileges. + `pthread_attr_setschedparam' will fail and return `ENOTSUP' if you + try to set a realtime policy when you are unprivileged. - On success, `pthread_setschedparam' returns 0. On error it returns - one of the following codes: - `EINVAL' - POLICY is not one of `SCHED_OTHER', `SCHED_RR', `SCHED_FIFO', - or the priority value specified by PARAM is not valid for the - specified policy + The scheduling policy of a thread can be changed after creation + with `pthread_setschedparam'. - `EPERM' - Realtime scheduling was requested but the calling process - does not have sufficient privileges. +`schedparam' + Change the scheduling parameter (the scheduling priority) for the + thread. The default is 0. - `ESRCH' - The TARGET_THREAD is invalid or has already terminated + This attribute is not significant if the scheduling policy is + `SCHED_OTHER'; it only matters for the realtime policies + `SCHED_RR' and `SCHED_FIFO'. - `EFAULT' - PARAM points outside the process memory space + The scheduling priority of a thread can be changed after creation + with `pthread_setschedparam'. - - Function: int pthread_getschedparam (pthread_t target_THREAD, int - *POLICY, struct sched_param *PARAM) - `pthread_getschedparam' retrieves the scheduling policy and - scheduling parameters for the thread TARGET_THREAD and stores them - in the locations pointed to by POLICY and PARAM, respectively. +`inheritsched' + Choose whether the scheduling policy and scheduling parameter for + the newly created thread are determined by the values of the + SCHEDPOLICY and SCHEDPARAM attributes (value + `PTHREAD_EXPLICIT_SCHED') or are inherited from the parent thread + (value `PTHREAD_INHERIT_SCHED'). The default is + `PTHREAD_EXPLICIT_SCHED'. - `pthread_getschedparam' returns 0 on success, or one of the - following error codes on failure: - `ESRCH' - The TARGET_THREAD is invalid or has already terminated. +`scope' + Choose the scheduling contention scope for the created thread. The + default is `PTHREAD_SCOPE_SYSTEM', meaning that the threads contend + for CPU time with all processes running on the machine. In + particular, thread priorities are interpreted relative to the + priorities of all other processes on the machine. The other + possibility, `PTHREAD_SCOPE_PROCESS', means that scheduling + contention occurs only between the threads of the running process: + thread priorities are interpreted relative to the priorities of + the other threads of the process, regardless of the priorities of + other processes. - `EFAULT' - POLICY or PARAM point outside the process memory space. + `PTHREAD_SCOPE_PROCESS' is not supported in LinuxThreads. If you + try to set the scope to this value, `pthread_attr_setscope' will + fail and return `ENOTSUP'. +`stackaddr' + Provide an address for an application managed stack. The size of + the stack must be at least `PTHREAD_STACK_MIN'. - - Function: int pthread_setconcurrency (int LEVEL) - `pthread_setconcurrency' is unused in LinuxThreads due to the lack - of a mapping of user threads to kernel threads. It exists for - source compatibility. It does store the value LEVEL so that it - can be returned by a subsequent call to `pthread_getconcurrency'. - It takes no other action however. +`stacksize' + Change the size of the stack created for the thread. The value + defines the minimum stack size, in bytes. - - Function: int pthread_getconcurrency () - `pthread_getconcurrency' is unused in LinuxThreads due to the lack - of a mapping of user threads to kernel threads. It exists for - source compatibility. However, it will return the value that was - set by the last call to `pthread_setconcurrency'. + If the value exceeds the system's maximum stack size, or is smaller + than `PTHREAD_STACK_MIN', `pthread_attr_setstacksize' will fail + and return `EINVAL'. - -File: libc.info, Node: Language Features, Next: Library Summary, Prev: POSIX Threads, Up: Top +`stack' + Provide both the address and size of an application managed stack + to use for the new thread. The base of the memory area is + STACKADDR with the size of the memory area, STACKSIZE, measured in + bytes. -C Language Facilities in the Library -************************************ + If the value of STACKSIZE is less than `PTHREAD_STACK_MIN', or + greater than the system's maximum stack size, or if the value of + STACKADDR lacks the proper alignment, `pthread_attr_setstack' will + fail and return `EINVAL'. - Some of the facilities implemented by the C library really should be -thought of as parts of the C language itself. These facilities ought to -be documented in the C Language Manual, not in the library manual; but -since we don't have the language manual yet, and documentation for these -features has been written, we are publishing it here. +`guardsize' + Change the minimum size in bytes of the guard area for the thread's + stack. The default size is a single page. If this value is set, + it will be rounded up to the nearest page size. If the value is + set to 0, a guard area will not be created for this thread. The + space allocated for the guard area is used to catch stack + overflow. Therefore, when allocating large structures on the + stack, a larger guard area may be required to catch a stack + overflow. -* Menu: + If the caller is managing their own stacks (if the `stackaddr' + attribute has been set), then the `guardsize' attribute is ignored. -* Consistency Checking:: Using `assert' to abort if - something ``impossible'' happens. -* Variadic Functions:: Defining functions with varying numbers - of args. -* Null Pointer Constant:: The macro `NULL'. -* Important Data Types:: Data types for object sizes. -* Data Type Measurements:: Parameters of data type representations. + If the value exceeds the `stacksize', `pthread_atrr_setguardsize' + will fail and return `EINVAL'.  -File: libc.info, Node: Consistency Checking, Next: Variadic Functions, Up: Language Features - -Explicitly Checking Internal Consistency -======================================== +File: libc.info, Node: Cancellation, Next: Cleanup Handlers, Prev: Thread Attributes, Up: POSIX Threads - When you're writing a program, it's often a good idea to put in -checks at strategic places for "impossible" errors or violations of -basic assumptions. These kinds of checks are helpful in debugging -problems with the interfaces between different parts of the program, -for example. +Cancellation +============ - The `assert' macro, defined in the header file `assert.h', provides -a convenient way to abort the program while printing a message about -where in the program the error was detected. + Cancellation is the mechanism by which a thread can terminate the +execution of another thread. More precisely, a thread can send a +cancellation request to another thread. Depending on its settings, the +target thread can then either ignore the request, honor it immediately, +or defer it till it reaches a cancellation point. When threads are +first created by `pthread_create', they always defer cancellation +requests. - Once you think your program is debugged, you can disable the error -checks performed by the `assert' macro by recompiling with the macro -`NDEBUG' defined. This means you don't actually have to change the -program source code to disable these checks. + When a thread eventually honors a cancellation request, it behaves +as if `pthread_exit(PTHREAD_CANCELED)' was called. All cleanup handlers +are executed in reverse order, finalization functions for +thread-specific data are called, and finally the thread stops executing. +If the canceled thread was joinable, the return value +`PTHREAD_CANCELED' is provided to whichever thread calls PTHREAD_JOIN +on it. See `pthread_exit' for more information. - But disabling these consistency checks is undesirable unless they -make the program significantly slower. All else being equal, more error -checking is good no matter who is running the program. A wise user -would rather have a program crash, visibly, than have it return nonsense -without indicating anything might be wrong. + Cancellation points are the points where the thread checks for +pending cancellation requests and performs them. The POSIX threads +functions `pthread_join', `pthread_cond_wait', +`pthread_cond_timedwait', `pthread_testcancel', `sem_wait', and +`sigwait' are cancellation points. In addition, these system calls are +cancellation points: - - Macro: void assert (int EXPRESSION) - Verify the programmer's belief that EXPRESSION is nonzero at this - point in the program. +accept open sendmsg +close pause sendto +connect read system +fcntl recv tcdrain +fsync recvfrom wait +lseek recvmsg waitpid +msync send write +nanosleep - If `NDEBUG' is not defined, `assert' tests the value of - EXPRESSION. If it is false (zero), `assert' aborts the program - (*note Aborting a Program::) after printing a message of the form: +All library functions that call these functions (such as `printf') are +also cancellation points. - `FILE':LINENUM: FUNCTION: Assertion `EXPRESSION' failed. + - Function: int pthread_setcancelstate (int STATE, int *OLDSTATE) + `pthread_setcancelstate' changes the cancellation state for the + calling thread - that is, whether cancellation requests are + ignored or not. The STATE argument is the new cancellation state: + either `PTHREAD_CANCEL_ENABLE' to enable cancellation, or + `PTHREAD_CANCEL_DISABLE' to disable cancellation (cancellation + requests are ignored). - on the standard error stream `stderr' (*note Standard Streams::). - The filename and line number are taken from the C preprocessor - macros `__FILE__' and `__LINE__' and specify where the call to - `assert' was made. When using the GNU C compiler, the name of the - function which calls `assert' is taken from the built-in variable - `__PRETTY_FUNCTION__'; with older compilers, the function name and - following colon are omitted. + If OLDSTATE is not `NULL', the previous cancellation state is + stored in the location pointed to by OLDSTATE, and can thus be + restored later by another call to `pthread_setcancelstate'. - If the preprocessor macro `NDEBUG' is defined before `assert.h' is - included, the `assert' macro is defined to do absolutely nothing. + If the STATE argument is not `PTHREAD_CANCEL_ENABLE' or + `PTHREAD_CANCEL_DISABLE', `pthread_setcancelstate' fails and + returns `EINVAL'. Otherwise it returns 0. - *Warning:* Even the argument expression EXPRESSION is not - evaluated if `NDEBUG' is in effect. So never use `assert' with - arguments that involve side effects. For example, `assert (++i > - 0);' is a bad idea, because `i' will not be incremented if - `NDEBUG' is defined. + - Function: int pthread_setcanceltype (int TYPE, int *OLDTYPE) + `pthread_setcanceltype' changes the type of responses to + cancellation requests for the calling thread: asynchronous + (immediate) or deferred. The TYPE argument is the new + cancellation type: either `PTHREAD_CANCEL_ASYNCHRONOUS' to cancel + the calling thread as soon as the cancellation request is + received, or `PTHREAD_CANCEL_DEFERRED' to keep the cancellation + request pending until the next cancellation point. If OLDTYPE is + not `NULL', the previous cancellation state is stored in the + location pointed to by OLDTYPE, and can thus be restored later by + another call to `pthread_setcanceltype'. - Sometimes the "impossible" condition you want to check for is an -error return from an operating system function. Then it is useful to -display not only where the program crashes, but also what error was -returned. The `assert_perror' macro makes this easy. + If the TYPE argument is not `PTHREAD_CANCEL_DEFERRED' or + `PTHREAD_CANCEL_ASYNCHRONOUS', `pthread_setcanceltype' fails and + returns `EINVAL'. Otherwise it returns 0. - - Macro: void assert_perror (int ERRNUM) - Similar to `assert', but verifies that ERRNUM is zero. + - Function: void pthread_testcancel (VOID) + `pthread_testcancel' does nothing except testing for pending + cancellation and executing it. Its purpose is to introduce explicit + checks for cancellation in long sequences of code that do not call + cancellation point functions otherwise. - If `NDEBUG' is defined, `assert_perror' tests the value of ERRNUM. - If it is nonzero, `assert_perror' aborts the program after - printing a message of the form: + +File: libc.info, Node: Cleanup Handlers, Next: Mutexes, Prev: Cancellation, Up: POSIX Threads - `FILE':LINENUM: FUNCTION: ERROR TEXT +Cleanup Handlers +================ - on the standard error stream. The file name, line number, and - function name are as for `assert'. The error text is the result of - `strerror (ERRNUM)'. *Note Error Messages::. + Cleanup handlers are functions that get called when a thread +terminates, either by calling `pthread_exit' or because of +cancellation. Cleanup handlers are installed and removed following a +stack-like discipline. - Like `assert', if `NDEBUG' is defined before `assert.h' is - included, the `assert_perror' macro does absolutely nothing. It - does not evaluate the argument, so ERRNUM should not have any side - effects. It is best for ERRNUM to be just a simple variable - reference; often it will be `errno'. + The purpose of cleanup handlers is to free the resources that a +thread may hold at the time it terminates. In particular, if a thread +exits or is canceled while it owns a locked mutex, the mutex will +remain locked forever and prevent other threads from executing +normally. The best way to avoid this is, just before locking the mutex, +to install a cleanup handler whose effect is to unlock the mutex. +Cleanup handlers can be used similarly to free blocks allocated with +`malloc' or close file descriptors on thread termination. - This macro is a GNU extension. + Here is how to lock a mutex MUT in such a way that it will be +unlocked if the thread is canceled while MUT is locked: - *Usage note:* The `assert' facility is designed for detecting -_internal inconsistency_; it is not suitable for reporting invalid -input or improper usage by the _user_ of the program. + pthread_cleanup_push(pthread_mutex_unlock, (void *) &mut); + pthread_mutex_lock(&mut); + /* do some work */ + pthread_mutex_unlock(&mut); + pthread_cleanup_pop(0); - The information in the diagnostic messages printed by the `assert' -and `assert_perror' macro is intended to help you, the programmer, -track down the cause of a bug, but is not really useful for telling a -user of your program why his or her input was invalid or why a command -could not be carried out. What's more, your program should not abort -when given invalid input, as `assert' would do--it should exit with -nonzero status (*note Exit Status::) after printing its error messages, -or perhaps read another command or move on to the next input file. + Equivalently, the last two lines can be replaced by - *Note Error Messages::, for information on printing error messages -for problems that _do not_ represent bugs in the program. + pthread_cleanup_pop(1); - -File: libc.info, Node: Variadic Functions, Next: Null Pointer Constant, Prev: Consistency Checking, Up: Language Features + Notice that the code above is safe only in deferred cancellation mode +(see `pthread_setcanceltype'). In asynchronous cancellation mode, a +cancellation can occur between `pthread_cleanup_push' and +`pthread_mutex_lock', or between `pthread_mutex_unlock' and +`pthread_cleanup_pop', resulting in both cases in the thread trying to +unlock a mutex not locked by the current thread. This is the main +reason why asynchronous cancellation is difficult to use. -Variadic Functions -================== + If the code above must also work in asynchronous cancellation mode, +then it must switch to deferred mode for locking and unlocking the +mutex: - ISO C defines a syntax for declaring a function to take a variable -number or type of arguments. (Such functions are referred to as -"varargs functions" or "variadic functions".) However, the language -itself provides no mechanism for such functions to access their -non-required arguments; instead, you use the variable arguments macros -defined in `stdarg.h'. + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); + pthread_cleanup_push(pthread_mutex_unlock, (void *) &mut); + pthread_mutex_lock(&mut); + /* do some work */ + pthread_cleanup_pop(1); + pthread_setcanceltype(oldtype, NULL); - This section describes how to declare variadic functions, how to -write them, and how to call them properly. + The code above can be rewritten in a more compact and efficient way, +using the non-portable functions `pthread_cleanup_push_defer_np' and +`pthread_cleanup_pop_restore_np': - *Compatibility Note:* Many older C dialects provide a similar, but -incompatible, mechanism for defining functions with variable numbers of -arguments, using `varargs.h'. + pthread_cleanup_push_defer_np(pthread_mutex_unlock, (void *) &mut); + pthread_mutex_lock(&mut); + /* do some work */ + pthread_cleanup_pop_restore_np(1); -* Menu: + - Function: void pthread_cleanup_push (void (*ROUTINE) (void *), void + *ARG) + `pthread_cleanup_push' installs the ROUTINE function with argument + ARG as a cleanup handler. From this point on to the matching + `pthread_cleanup_pop', the function ROUTINE will be called with + arguments ARG when the thread terminates, either through + `pthread_exit' or by cancellation. If several cleanup handlers are + active at that point, they are called in LIFO order: the most + recently installed handler is called first. -* Why Variadic:: Reasons for making functions take - variable arguments. -* How Variadic:: How to define and call variadic functions. -* Variadic Example:: A complete example. + - Function: void pthread_cleanup_pop (int EXECUTE) + `pthread_cleanup_pop' removes the most recently installed cleanup + handler. If the EXECUTE argument is not 0, it also executes the + handler, by calling the ROUTINE function with arguments ARG. If + the EXECUTE argument is 0, the handler is only removed but not + executed. - -File: libc.info, Node: Why Variadic, Next: How Variadic, Up: Variadic Functions + Matching pairs of `pthread_cleanup_push' and `pthread_cleanup_pop' +must occur in the same function, at the same level of block nesting. +Actually, `pthread_cleanup_push' and `pthread_cleanup_pop' are macros, +and the expansion of `pthread_cleanup_push' introduces an open brace +`{' with the matching closing brace `}' being introduced by the +expansion of the matching `pthread_cleanup_pop'. -Why Variadic Functions are Used -------------------------------- + - Function: void pthread_cleanup_push_defer_np (void (*ROUTINE) (void + *), void *ARG) + `pthread_cleanup_push_defer_np' is a non-portable extension that + combines `pthread_cleanup_push' and `pthread_setcanceltype'. It + pushes a cleanup handler just as `pthread_cleanup_push' does, but + also saves the current cancellation type and sets it to deferred + cancellation. This ensures that the cleanup mechanism is effective + even if the thread was initially in asynchronous cancellation mode. - Ordinary C functions take a fixed number of arguments. When you -define a function, you specify the data type for each argument. Every -call to the function should supply the expected number of arguments, -with types that can be converted to the specified ones. Thus, if the -function `foo' is declared with `int foo (int, char *);' then you must -call it with two arguments, a number (any kind will do) and a string -pointer. + - Function: void pthread_cleanup_pop_restore_np (int EXECUTE) + `pthread_cleanup_pop_restore_np' pops a cleanup handler introduced + by `pthread_cleanup_push_defer_np', and restores the cancellation + type to its value at the time `pthread_cleanup_push_defer_np' was + called. - But some functions perform operations that can meaningfully accept an -unlimited number of arguments. + `pthread_cleanup_push_defer_np' and `pthread_cleanup_pop_restore_np' +must occur in matching pairs, at the same level of block nesting. - In some cases a function can handle any number of values by -operating on all of them as a block. For example, consider a function -that allocates a one-dimensional array with `malloc' to hold a -specified set of values. This operation makes sense for any number of -values, as long as the length of the array corresponds to that number. -Without facilities for variable arguments, you would have to define a -separate function for each possible array size. + The sequence - The library function `printf' (*note Formatted Output::) is an -example of another class of function where variable arguments are -useful. This function prints its arguments (which can vary in type as -well as number) under the control of a format template string. + pthread_cleanup_push_defer_np(routine, arg); + ... + pthread_cleanup_pop_defer_np(execute); - These are good reasons to define a "variadic" function which can -handle as many arguments as the caller chooses to pass. +is functionally equivalent to (but more compact and efficient than) - Some functions such as `open' take a fixed set of arguments, but -occasionally ignore the last few. Strict adherence to ISO C requires -these functions to be defined as variadic; in practice, however, the GNU -C compiler and most other C compilers let you define such a function to -take a fixed set of arguments--the most it can ever use--and then only -_declare_ the function as variadic (or not declare its arguments at -all!). + { + int oldtype; + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); + pthread_cleanup_push(routine, arg); + ... + pthread_cleanup_pop(execute); + pthread_setcanceltype(oldtype, NULL); + }  -File: libc.info, Node: How Variadic, Next: Variadic Example, Prev: Why Variadic, Up: Variadic Functions - -How Variadic Functions are Defined and Used -------------------------------------------- - - Defining and using a variadic function involves three steps: +File: libc.info, Node: Mutexes, Next: Condition Variables, Prev: Cleanup Handlers, Up: POSIX Threads - * _Define_ the function as variadic, using an ellipsis (`...') in - the argument list, and using special macros to access the variable - arguments. *Note Receiving Arguments::. +Mutexes +======= - * _Declare_ the function as variadic, using a prototype with an - ellipsis (`...'), in all the files which call it. *Note Variadic - Prototypes::. + A mutex is a MUTual EXclusion device, and is useful for protecting +shared data structures from concurrent modifications, and implementing +critical sections and monitors. - * _Call_ the function by writing the fixed arguments followed by the - additional variable arguments. *Note Calling Variadics::. + A mutex has two possible states: unlocked (not owned by any thread), +and locked (owned by one thread). A mutex can never be owned by two +different threads simultaneously. A thread attempting to lock a mutex +that is already locked by another thread is suspended until the owning +thread unlocks the mutex first. -* Menu: + None of the mutex functions is a cancellation point, not even +`pthread_mutex_lock', in spite of the fact that it can suspend a thread +for arbitrary durations. This way, the status of mutexes at +cancellation points is predictable, allowing cancellation handlers to +unlock precisely those mutexes that need to be unlocked before the +thread stops executing. Consequently, threads using deferred +cancellation should never hold a mutex for extended periods of time. -* Variadic Prototypes:: How to make a prototype for a function - with variable arguments. -* Receiving Arguments:: Steps you must follow to access the - optional argument values. -* How Many Arguments:: How to decide whether there are more arguments. -* Calling Variadics:: Things you need to know about calling - variable arguments functions. -* Argument Macros:: Detailed specification of the macros - for accessing variable arguments. -* Old Varargs:: The pre-ISO way of defining variadic functions. + It is not safe to call mutex functions from a signal handler. In +particular, calling `pthread_mutex_lock' or `pthread_mutex_unlock' from +a signal handler may deadlock the calling thread. - -File: libc.info, Node: Variadic Prototypes, Next: Receiving Arguments, Up: How Variadic + - Function: int pthread_mutex_init (pthread_mutex_t *MUTEX, const + pthread_mutexattr_t *MUTEXATTR) + `pthread_mutex_init' initializes the mutex object pointed to by + MUTEX according to the mutex attributes specified in MUTEXATTR. + If MUTEXATTR is `NULL', default attributes are used instead. -Syntax for Variable Arguments -............................. + The LinuxThreads implementation supports only one mutex attribute, + the MUTEX TYPE, which is either "fast", "recursive", or "error + checking". The type of a mutex determines whether it can be locked + again by a thread that already owns it. The default type is + "fast". - A function that accepts a variable number of arguments must be -declared with a prototype that says so. You write the fixed arguments -as usual, and then tack on `...' to indicate the possibility of -additional arguments. The syntax of ISO C requires at least one fixed -argument before the `...'. For example, + Variables of type `pthread_mutex_t' can also be initialized + statically, using the constants `PTHREAD_MUTEX_INITIALIZER' (for + timed mutexes), `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' (for + recursive mutexes), `PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP' (for + fast mutexes(, and `PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP' (for + error checking mutexes). - int - func (const char *a, int b, ...) - { - ... - } + `pthread_mutex_init' always returns 0. -defines a function `func' which returns an `int' and takes two required -arguments, a `const char *' and an `int'. These are followed by any -number of anonymous arguments. + - Function: int pthread_mutex_lock (pthread_mutex_t *mutex)) + `pthread_mutex_lock' locks the given mutex. If the mutex is + currently unlocked, it becomes locked and owned by the calling + thread, and `pthread_mutex_lock' returns immediately. If the mutex + is already locked by another thread, `pthread_mutex_lock' suspends + the calling thread until the mutex is unlocked. - *Portability note:* For some C compilers, the last required argument -must not be declared `register' in the function definition. -Furthermore, this argument's type must be "self-promoting": that is, -the default promotions must not change its type. This rules out array -and function types, as well as `float', `char' (whether signed or not) -and `short int' (whether signed or not). This is actually an ISO C -requirement. + If the mutex is already locked by the calling thread, the behavior + of `pthread_mutex_lock' depends on the type of the mutex. If the + mutex is of the "fast" type, the calling thread is suspended. It + will remain suspended forever, because no other thread can unlock + the mutex. If the mutex is of the "error checking" type, + `pthread_mutex_lock' returns immediately with the error code + `EDEADLK'. If the mutex is of the "recursive" type, + `pthread_mutex_lock' succeeds and returns immediately, recording + the number of times the calling thread has locked the mutex. An + equal number of `pthread_mutex_unlock' operations must be + performed before the mutex returns to the unlocked state. - -File: libc.info, Node: Receiving Arguments, Next: How Many Arguments, Prev: Variadic Prototypes, Up: How Variadic + - Function: int pthread_mutex_trylock (pthread_mutex_t *MUTEX) + `pthread_mutex_trylock' behaves identically to + `pthread_mutex_lock', except that it does not block the calling + thread if the mutex is already locked by another thread (or by the + calling thread in the case of a "fast" mutex). Instead, + `pthread_mutex_trylock' returns immediately with the error code + `EBUSY'. -Receiving the Argument Values -............................. + - Function: int pthread_mutex_timedlock (pthread_mutex_t *MUTEX, const + struct timespec *ABSTIME) + The `pthread_mutex_timedlock' is similar to the + `pthread_mutex_lock' function but instead of blocking for in + indefinite time if the mutex is locked by another thread, it + returns when the time specified in ABSTIME is reached. - Ordinary fixed arguments have individual names, and you can use these -names to access their values. But optional arguments have no -names--nothing but `...'. How can you access them? + This function can only be used on standard ("timed") and "error + checking" mutexes. It behaves just like `pthread_mutex_lock' for + all other types. - The only way to access them is sequentially, in the order they were -written, and you must use special macros from `stdarg.h' in the -following three step process: + If the mutex is successfully locked, the function returns zero. + If the time specified in ABSTIME is reached without the mutex + being locked, `ETIMEDOUT' is returned. - 1. You initialize an argument pointer variable of type `va_list' using - `va_start'. The argument pointer when initialized points to the - first optional argument. + This function was introduced in the POSIX.1d revision of the POSIX + standard. - 2. You access the optional arguments by successive calls to `va_arg'. - The first call to `va_arg' gives you the first optional argument, - the next call gives you the second, and so on. + - Function: int pthread_mutex_unlock (pthread_mutex_t *MUTEX) + `pthread_mutex_unlock' unlocks the given mutex. The mutex is + assumed to be locked and owned by the calling thread on entrance to + `pthread_mutex_unlock'. If the mutex is of the "fast" type, + `pthread_mutex_unlock' always returns it to the unlocked state. If + it is of the "recursive" type, it decrements the locking count of + the mutex (number of `pthread_mutex_lock' operations performed on + it by the calling thread), and only when this count reaches zero + is the mutex actually unlocked. - You can stop at any time if you wish to ignore any remaining - optional arguments. It is perfectly all right for a function to - access fewer arguments than were supplied in the call, but you - will get garbage values if you try to access too many arguments. + On "error checking" mutexes, `pthread_mutex_unlock' actually + checks at run-time that the mutex is locked on entrance, and that + it was locked by the same thread that is now calling + `pthread_mutex_unlock'. If these conditions are not met, + `pthread_mutex_unlock' returns `EPERM', and the mutex remains + unchanged. "Fast" and "recursive" mutexes perform no such checks, + thus allowing a locked mutex to be unlocked by a thread other than + its owner. This is non-portable behavior and must not be relied + upon. - 3. You indicate that you are finished with the argument pointer - variable by calling `va_end'. + - Function: int pthread_mutex_destroy (pthread_mutex_t *MUTEX) + `pthread_mutex_destroy' destroys a mutex object, freeing the + resources it might hold. The mutex must be unlocked on entrance. + In the LinuxThreads implementation, no resources are associated + with mutex objects, thus `pthread_mutex_destroy' actually does + nothing except checking that the mutex is unlocked. - (In practice, with most C compilers, calling `va_end' does nothing. - This is always true in the GNU C compiler. But you might as well - call `va_end' just in case your program is someday compiled with a - peculiar compiler.) + If the mutex is locked by some thread, `pthread_mutex_destroy' + returns `EBUSY'. Otherwise it returns 0. - *Note Argument Macros::, for the full definitions of `va_start', -`va_arg' and `va_end'. + If any of the above functions (except `pthread_mutex_init') is +applied to an uninitialized mutex, they will simply return `EINVAL' and +do nothing. - Steps 1 and 3 must be performed in the function that accepts the -optional arguments. However, you can pass the `va_list' variable as an -argument to another function and perform all or part of step 2 there. + A shared global variable X can be protected by a mutex as follows: - You can perform the entire sequence of three steps multiple times -within a single function invocation. If you want to ignore the optional -arguments, you can do these steps zero times. + int x; + pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; - You can have more than one argument pointer variable if you like. -You can initialize each variable with `va_start' when you wish, and -then you can fetch arguments with each argument pointer as you wish. -Each argument pointer variable will sequence through the same set of -argument values, but at its own pace. + All accesses and modifications to X should be bracketed by calls to +`pthread_mutex_lock' and `pthread_mutex_unlock' as follows: - *Portability note:* With some compilers, once you pass an argument -pointer value to a subroutine, you must not keep using the same -argument pointer value after that subroutine returns. For full -portability, you should just pass it to `va_end'. This is actually an -ISO C requirement, but most ANSI C compilers work happily regardless. + pthread_mutex_lock(&mut); + /* operate on x */ + pthread_mutex_unlock(&mut); - -File: libc.info, Node: How Many Arguments, Next: Calling Variadics, Prev: Receiving Arguments, Up: How Variadic + Mutex attributes can be specified at mutex creation time, by passing +a mutex attribute object as second argument to `pthread_mutex_init'. +Passing `NULL' is equivalent to passing a mutex attribute object with +all attributes set to their default values. -How Many Arguments Were Supplied -................................ + - Function: int pthread_mutexattr_init (pthread_mutexattr_t *ATTR) + `pthread_mutexattr_init' initializes the mutex attribute object + ATTR and fills it with default values for the attributes. - There is no general way for a function to determine the number and -type of the optional arguments it was called with. So whoever designs -the function typically designs a convention for the caller to specify -the number and type of arguments. It is up to you to define an -appropriate calling convention for each variadic function, and write -all calls accordingly. + This function always returns 0. - One kind of calling convention is to pass the number of optional -arguments as one of the fixed arguments. This convention works provided -all of the optional arguments are of the same type. + - Function: int pthread_mutexattr_destroy (pthread_mutexattr_t *ATTR) + `pthread_mutexattr_destroy' destroys a mutex attribute object, + which must not be reused until it is reinitialized. + `pthread_mutexattr_destroy' does nothing in the LinuxThreads + implementation. - A similar alternative is to have one of the required arguments be a -bit mask, with a bit for each possible purpose for which an optional -argument might be supplied. You would test the bits in a predefined -sequence; if the bit is set, fetch the value of the next argument, -otherwise use a default value. + This function always returns 0. - A required argument can be used as a pattern to specify both the -number and types of the optional arguments. The format string argument -to `printf' is one example of this (*note Formatted Output Functions::). + LinuxThreads supports only one mutex attribute: the mutex type, +which is either `PTHREAD_MUTEX_ADAPTIVE_NP' for "fast" mutexes, +`PTHREAD_MUTEX_RECURSIVE_NP' for "recursive" mutexes, +`PTHREAD_MUTEX_TIMED_NP' for "timed" mutexes, or +`PTHREAD_MUTEX_ERRORCHECK_NP' for "error checking" mutexes. As the +`NP' suffix indicates, this is a non-portable extension to the POSIX +standard and should not be employed in portable programs. - Another possibility is to pass an "end marker" value as the last -optional argument. For example, for a function that manipulates an -arbitrary number of pointer arguments, a null pointer might indicate the -end of the argument list. (This assumes that a null pointer isn't -otherwise meaningful to the function.) The `execl' function works in -just this way; see *Note Executing a File::. + The mutex type determines what happens if a thread attempts to lock a +mutex it already owns with `pthread_mutex_lock'. If the mutex is of the +"fast" type, `pthread_mutex_lock' simply suspends the calling thread +forever. If the mutex is of the "error checking" type, +`pthread_mutex_lock' returns immediately with the error code `EDEADLK'. +If the mutex is of the "recursive" type, the call to +`pthread_mutex_lock' returns immediately with a success return code. +The number of times the thread owning the mutex has locked it is +recorded in the mutex. The owning thread must call +`pthread_mutex_unlock' the same number of times before the mutex +returns to the unlocked state. - -File: libc.info, Node: Calling Variadics, Next: Argument Macros, Prev: How Many Arguments, Up: How Variadic + The default mutex type is "timed", that is, `PTHREAD_MUTEX_TIMED_NP'. -Calling Variadic Functions -.......................... + - Function: int pthread_mutexattr_settype (pthread_mutexattr_t *ATTR, + int TYPE) + `pthread_mutexattr_settype' sets the mutex type attribute in ATTR + to the value specified by TYPE. - You don't have to do anything special to call a variadic function. -Just put the arguments (required arguments, followed by optional ones) -inside parentheses, separated by commas, as usual. But you must declare -the function with a prototype and know how the argument values are -converted. + If TYPE is not `PTHREAD_MUTEX_ADAPTIVE_NP', + `PTHREAD_MUTEX_RECURSIVE_NP', `PTHREAD_MUTEX_TIMED_NP', or + `PTHREAD_MUTEX_ERRORCHECK_NP', this function will return `EINVAL' + and leave ATTR unchanged. - In principle, functions that are _defined_ to be variadic must also -be _declared_ to be variadic using a function prototype whenever you -call them. (*Note Variadic Prototypes::, for how.) This is because -some C compilers use a different calling convention to pass the same set -of argument values to a function depending on whether that function -takes variable arguments or fixed arguments. + The standard Unix98 identifiers `PTHREAD_MUTEX_DEFAULT', + `PTHREAD_MUTEX_NORMAL', `PTHREAD_MUTEX_RECURSIVE', and + `PTHREAD_MUTEX_ERRORCHECK' are also permitted. - In practice, the GNU C compiler always passes a given set of argument -types in the same way regardless of whether they are optional or -required. So, as long as the argument types are self-promoting, you can -safely omit declaring them. Usually it is a good idea to declare the -argument types for variadic functions, and indeed for all functions. -But there are a few functions which it is extremely convenient not to -have to declare as variadic--for example, `open' and `printf'. - Since the prototype doesn't specify types for optional arguments, in -a call to a variadic function the "default argument promotions" are -performed on the optional argument values. This means the objects of -type `char' or `short int' (whether signed or not) are promoted to -either `int' or `unsigned int', as appropriate; and that objects of -type `float' are promoted to type `double'. So, if the caller passes a -`char' as an optional argument, it is promoted to an `int', and the -function can access it with `va_arg (AP, int)'. + - Function: int pthread_mutexattr_gettype (const pthread_mutexattr_t + *ATTR, int *TYPE) + `pthread_mutexattr_gettype' retrieves the current value of the + mutex type attribute in ATTR and stores it in the location pointed + to by TYPE. - Conversion of the required arguments is controlled by the function -prototype in the usual way: the argument expression is converted to the -declared argument type as if it were being assigned to a variable of -that type. + This function always returns 0.  -File: libc.info, Node: Argument Macros, Next: Old Varargs, Prev: Calling Variadics, Up: How Variadic +File: libc.info, Node: Condition Variables, Next: POSIX Semaphores, Prev: Mutexes, Up: POSIX Threads -Argument Access Macros -...................... +Condition Variables +=================== - Here are descriptions of the macros used to retrieve variable -arguments. These macros are defined in the header file `stdarg.h'. + A condition (short for "condition variable") is a synchronization +device that allows threads to suspend execution until some predicate on +shared data is satisfied. The basic operations on conditions are: signal +the condition (when the predicate becomes true), and wait for the +condition, suspending the thread execution until another thread signals +the condition. - - Data Type: va_list - The type `va_list' is used for argument pointer variables. + A condition variable must always be associated with a mutex, to avoid +the race condition where a thread prepares to wait on a condition +variable and another thread signals the condition just before the first +thread actually waits on it. - - Macro: void va_start (va_list AP, LAST-REQUIRED) - This macro initializes the argument pointer variable AP to point - to the first of the optional arguments of the current function; - LAST-REQUIRED must be the last required argument to the function. + - Function: int pthread_cond_init (pthread_cond_t *COND, + pthread_condattr_t *cond_ATTR) + `pthread_cond_init' initializes the condition variable COND, using + the condition attributes specified in COND_ATTR, or default + attributes if COND_ATTR is `NULL'. The LinuxThreads implementation + supports no attributes for conditions, hence the COND_ATTR + parameter is actually ignored. - *Note Old Varargs::, for an alternate definition of `va_start' - found in the header file `varargs.h'. + Variables of type `pthread_cond_t' can also be initialized + statically, using the constant `PTHREAD_COND_INITIALIZER'. - - Macro: TYPE va_arg (va_list AP, TYPE) - The `va_arg' macro returns the value of the next optional argument, - and modifies the value of AP to point to the subsequent argument. - Thus, successive uses of `va_arg' return successive optional - arguments. + This function always returns 0. - The type of the value returned by `va_arg' is TYPE as specified in - the call. TYPE must be a self-promoting type (not `char' or - `short int' or `float') that matches the type of the actual - argument. + - Function: int pthread_cond_signal (pthread_cond_t *COND) + `pthread_cond_signal' restarts one of the threads that are waiting + on the condition variable COND. If no threads are waiting on COND, + nothing happens. If several threads are waiting on COND, exactly + one is restarted, but it is not specified which. - - Macro: void va_end (va_list AP) - This ends the use of AP. After a `va_end' call, further `va_arg' - calls with the same AP may not work. You should invoke `va_end' - before returning from the function in which `va_start' was invoked - with the same AP argument. + This function always returns 0. - In the GNU C library, `va_end' does nothing, and you need not ever - use it except for reasons of portability. + - Function: int pthread_cond_broadcast (pthread_cond_t *COND) + `pthread_cond_broadcast' restarts all the threads that are waiting + on the condition variable COND. Nothing happens if no threads are + waiting on COND. + This function always returns 0. - Sometimes it is necessary to parse the list of parameters more than -once or one wants to remember a certain position in the parameter list. -To do this, one will have to make a copy of the current value of the -argument. But `va_list' is an opaque type and one cannot necessarily -assign the value of one variable of type `va_list' to another variable -of the same type. + - Function: int pthread_cond_wait (pthread_cond_t *COND, + pthread_mutex_t *MUTEX) + `pthread_cond_wait' atomically unlocks the MUTEX (as per + `pthread_unlock_mutex') and waits for the condition variable COND + to be signaled. The thread execution is suspended and does not + consume any CPU time until the condition variable is signaled. The + MUTEX must be locked by the calling thread on entrance to + `pthread_cond_wait'. Before returning to the calling thread, + `pthread_cond_wait' re-acquires MUTEX (as per + `pthread_lock_mutex'). - - Macro: void __va_copy (va_list DEST, va_list SRC) - The `__va_copy' macro allows copying of objects of type `va_list' - even if this is not an integral type. The argument pointer in - DEST is initialized to point to the same argument as the pointer - in SRC. + Unlocking the mutex and suspending on the condition variable is + done atomically. Thus, if all threads always acquire the mutex + before signaling the condition, this guarantees that the condition + cannot be signaled (and thus ignored) between the time a thread + locks the mutex and the time it waits on the condition variable. - This macro is a GNU extension but it will hopefully also be - available in the next update of the ISO C standard. + This function always returns 0. - If you want to use `__va_copy' you should always be prepared for the -possibility that this macro will not be available. On architectures -where a simple assignment is invalid, hopefully `__va_copy' _will_ be -available, so one should always write something like this: + - Function: int pthread_cond_timedwait (pthread_cond_t *COND, + pthread_mutex_t *MUTEX, const struct timespec *ABSTIME) + `pthread_cond_timedwait' atomically unlocks MUTEX and waits on + COND, as `pthread_cond_wait' does, but it also bounds the duration + of the wait. If COND has not been signaled before time ABSTIME, + the mutex MUTEX is re-acquired and `pthread_cond_timedwait' + returns the error code `ETIMEDOUT'. The wait can also be + interrupted by a signal; in that case `pthread_cond_timedwait' + returns `EINTR'. - { - va_list ap, save; - ... - #ifdef __va_copy - __va_copy (save, ap); - #else - save = ap; - #endif - ... - } + The ABSTIME parameter specifies an absolute time, with the same + origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds + to 00:00:00 GMT, January 1, 1970. - -File: libc.info, Node: Variadic Example, Prev: How Variadic, Up: Variadic Functions + - Function: int pthread_cond_destroy (pthread_cond_t *COND) + `pthread_cond_destroy' destroys the condition variable COND, + freeing the resources it might hold. If any threads are waiting + on the condition variable, `pthread_cond_destroy' leaves COND + untouched and returns `EBUSY'. Otherwise it returns 0, and COND + must not be used again until it is reinitialized. -Example of a Variadic Function ------------------------------- + In the LinuxThreads implementation, no resources are associated + with condition variables, so `pthread_cond_destroy' actually does + nothing. - Here is a complete sample function that accepts a variable number of -arguments. The first argument to the function is the count of remaining -arguments, which are added up and the result returned. While trivial, -this function is sufficient to illustrate how to use the variable -arguments facility. + `pthread_cond_wait' and `pthread_cond_timedwait' are cancellation +points. If a thread is canceled while suspended in one of these +functions, the thread immediately resumes execution, relocks the mutex +specified by MUTEX, and finally executes the cancellation. +Consequently, cleanup handlers are assured that MUTEX is locked when +they are called. - #include - #include - - int - add_em_up (int count,...) - { - va_list ap; - int i, sum; - - va_start (ap, count); /* Initialize the argument list. */ - - sum = 0; - for (i = 0; i < count; i++) - sum += va_arg (ap, int); /* Get the next argument value. */ - - va_end (ap); /* Clean up. */ - return sum; - } - - int - main (void) - { - /* This call prints 16. */ - printf ("%d\n", add_em_up (3, 5, 5, 6)); - - /* This call prints 55. */ - printf ("%d\n", add_em_up (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)); - - return 0; - } + It is not safe to call the condition variable functions from a signal +handler. In particular, calling `pthread_cond_signal' or +`pthread_cond_broadcast' from a signal handler may deadlock the calling +thread. - -File: libc.info, Node: Old Varargs, Prev: Argument Macros, Up: How Variadic + Consider two shared variables X and Y, protected by the mutex MUT, +and a condition variable COND that is to be signaled whenever X becomes +greater than Y. -Old-Style Variadic Functions -............................ + int x,y; + pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - Before ISO C, programmers used a slightly different facility for -writing variadic functions. The GNU C compiler still supports it; -currently, it is more portable than the ISO C facility, since support -for ISO C is still not universal. The header file which defines the -old-fashioned variadic facility is called `varargs.h'. + Waiting until X is greater than Y is performed as follows: - Using `varargs.h' is almost the same as using `stdarg.h'. There is -no difference in how you call a variadic function; see *Note Calling -Variadics::. The only difference is in how you define them. First of -all, you must use old-style non-prototype syntax, like this: + pthread_mutex_lock(&mut); + while (x <= y) { + pthread_cond_wait(&cond, &mut); + } + /* operate on x and y */ + pthread_mutex_unlock(&mut); - tree - build (va_alist) - va_dcl - { + Modifications on X and Y that may cause X to become greater than Y +should signal the condition if needed: - Secondly, you must give `va_start' only one argument, like this: + pthread_mutex_lock(&mut); + /* modify x and y */ + if (x > y) pthread_cond_broadcast(&cond); + pthread_mutex_unlock(&mut); - va_list p; - va_start (p); + If it can be proved that at most one waiting thread needs to be waken +up (for instance, if there are only two threads communicating through X +and Y), `pthread_cond_signal' can be used as a slightly more efficient +alternative to `pthread_cond_broadcast'. In doubt, use +`pthread_cond_broadcast'. - These are the special macros used for defining old-style variadic -functions: + To wait for X to becomes greater than Y with a timeout of 5 seconds, +do: - - Macro: va_alist - This macro stands for the argument name list required in a variadic - function. + struct timeval now; + struct timespec timeout; + int retcode; + + pthread_mutex_lock(&mut); + gettimeofday(&now); + timeout.tv_sec = now.tv_sec + 5; + timeout.tv_nsec = now.tv_usec * 1000; + retcode = 0; + while (x <= y && retcode != ETIMEDOUT) { + retcode = pthread_cond_timedwait(&cond, &mut, &timeout); + } + if (retcode == ETIMEDOUT) { + /* timeout occurred */ + } else { + /* operate on x and y */ + } + pthread_mutex_unlock(&mut); - - Macro: va_dcl - This macro declares the implicit argument or arguments for a - variadic function. + Condition attributes can be specified at condition creation time, by +passing a condition attribute object as second argument to +`pthread_cond_init'. Passing `NULL' is equivalent to passing a +condition attribute object with all attributes set to their default +values. - - Macro: void va_start (va_list AP) - This macro, as defined in `varargs.h', initializes the argument - pointer variable AP to point to the first argument of the current - function. + The LinuxThreads implementation supports no attributes for +conditions. The functions on condition attributes are included only for +compliance with the POSIX standard. - The other argument macros, `va_arg' and `va_end', are the same in -`varargs.h' as in `stdarg.h'; see *Note Argument Macros::, for details. + - Function: int pthread_condattr_init (pthread_condattr_t *ATTR) + - Function: int pthread_condattr_destroy (pthread_condattr_t *ATTR) + `pthread_condattr_init' initializes the condition attribute object + ATTR and fills it with default values for the attributes. + `pthread_condattr_destroy' destroys the condition attribute object + ATTR. - It does not work to include both `varargs.h' and `stdarg.h' in the -same compilation; they define `va_start' in conflicting ways. + Both functions do nothing in the LinuxThreads implementation. - -File: libc.info, Node: Null Pointer Constant, Next: Important Data Types, Prev: Variadic Functions, Up: Language Features + `pthread_condattr_init' and `pthread_condattr_destroy' always + return 0. -Null Pointer Constant -===================== + +File: libc.info, Node: POSIX Semaphores, Next: Thread-Specific Data, Prev: Condition Variables, Up: POSIX Threads - The null pointer constant is guaranteed not to point to any real -object. You can assign it to any pointer variable since it has type -`void *'. The preferred way to write a null pointer constant is with -`NULL'. +POSIX Semaphores +================ - - Macro: void * NULL - This is a null pointer constant. + Semaphores are counters for resources shared between threads. The +basic operations on semaphores are: increment the counter atomically, +and wait until the counter is non-null and decrement it atomically. - You can also use `0' or `(void *)0' as a null pointer constant, but -using `NULL' is cleaner because it makes the purpose of the constant -more evident. + Semaphores have a maximum value past which they cannot be +incremented. The macro `SEM_VALUE_MAX' is defined to be this maximum +value. In the GNU C library, `SEM_VALUE_MAX' is equal to `INT_MAX' +(*note Range of Type::), but it may be much smaller on other systems. - If you use the null pointer constant as a function argument, then for -complete portability you should make sure that the function has a -prototype declaration. Otherwise, if the target machine has two -different pointer representations, the compiler won't know which -representation to use for that argument. You can avoid the problem by -explicitly casting the constant to the proper pointer type, but we -recommend instead adding a prototype for the function you are calling. + The pthreads library implements POSIX 1003.1b semaphores. These +should not be confused with System V semaphores (`ipc', `semctl' and +`semop'). - -File: libc.info, Node: Important Data Types, Next: Data Type Measurements, Prev: Null Pointer Constant, Up: Language Features + All the semaphore functions and macros are defined in `semaphore.h'. -Important Data Types -==================== + - Function: int sem_init (sem_t *SEM, int PSHARED, unsigned int VALUE) + `sem_init' initializes the semaphore object pointed to by SEM. The + count associated with the semaphore is set initially to VALUE. The + PSHARED argument indicates whether the semaphore is local to the + current process (PSHARED is zero) or is to be shared between + several processes (PSHARED is not zero). - The result of subtracting two pointers in C is always an integer, -but the precise data type varies from C compiler to C compiler. -Likewise, the data type of the result of `sizeof' also varies between -compilers. ISO defines standard aliases for these two types, so you -can refer to them in a portable fashion. They are defined in the -header file `stddef.h'. + On success `sem_init' returns 0. On failure it returns -1 and sets + ERRNO to one of the following values: - - Data Type: ptrdiff_t - This is the signed integer type of the result of subtracting two - pointers. For example, with the declaration `char *p1, *p2;', the - expression `p2 - p1' is of type `ptrdiff_t'. This will probably - be one of the standard signed integer types (`short int', `int' or - `long int'), but might be a nonstandard type that exists only for - this purpose. + `EINVAL' + VALUE exceeds the maximal counter value `SEM_VALUE_MAX' - - Data Type: size_t - This is an unsigned integer type used to represent the sizes of - objects. The result of the `sizeof' operator is of this type, and - functions such as `malloc' (*note Unconstrained Allocation::) and - `memcpy' (*note Copying and Concatenation::) accept arguments of - this type to specify object sizes. + `ENOSYS' + PSHARED is not zero. LinuxThreads currently does not support + process-shared semaphores. (This will eventually change.) - *Usage Note:* `size_t' is the preferred way to declare any - arguments or variables that hold the size of an object. + - Function: int sem_destroy (sem_t * SEM) + `sem_destroy' destroys a semaphore object, freeing the resources it + might hold. If any threads are waiting on the semaphore when + `sem_destroy' is called, it fails and sets ERRNO to `EBUSY'. - In the GNU system `size_t' is equivalent to either `unsigned int' or -`unsigned long int'. These types have identical properties on the GNU -system and, for most purposes, you can use them interchangeably. -However, they are distinct as data types, which makes a difference in -certain contexts. + In the LinuxThreads implementation, no resources are associated + with semaphore objects, thus `sem_destroy' actually does nothing + except checking that no thread is waiting on the semaphore. This + will change when process-shared semaphores are implemented. - For example, when you specify the type of a function argument in a -function prototype, it makes a difference which one you use. If the -system header files declare `malloc' with an argument of type `size_t' -and you declare `malloc' with an argument of type `unsigned int', you -will get a compilation error if `size_t' happens to be `unsigned long -int' on your system. To avoid any possibility of error, when a -function argument or value is supposed to have type `size_t', never -declare its type in any other way. + - Function: int sem_wait (sem_t * SEM) + `sem_wait' suspends the calling thread until the semaphore pointed + to by SEM has non-zero count. It then atomically decreases the + semaphore count. - *Compatibility Note:* Implementations of C before the advent of -ISO C generally used `unsigned int' for representing object sizes and -`int' for pointer subtraction results. They did not necessarily define -either `size_t' or `ptrdiff_t'. Unix systems did define `size_t', in -`sys/types.h', but the definition was usually a signed type. + `sem_wait' is a cancellation point. It always returns 0. - -File: libc.info, Node: Data Type Measurements, Prev: Important Data Types, Up: Language Features + - Function: int sem_trywait (sem_t * SEM) + `sem_trywait' is a non-blocking variant of `sem_wait'. If the + semaphore pointed to by SEM has non-zero count, the count is + atomically decreased and `sem_trywait' immediately returns 0. If + the semaphore count is zero, `sem_trywait' immediately returns -1 + and sets errno to `EAGAIN'. -Data Type Measurements -====================== + - Function: int sem_post (sem_t * SEM) + `sem_post' atomically increases the count of the semaphore pointed + to by SEM. This function never blocks. - Most of the time, if you choose the proper C data type for each -object in your program, you need not be concerned with just how it is -represented or how many bits it uses. When you do need such -information, the C language itself does not provide a way to get it. -The header files `limits.h' and `float.h' contain macros which give you -this information in full detail. + On processors supporting atomic compare-and-swap (Intel 486, + Pentium and later, Alpha, PowerPC, MIPS II, Motorola 68k, + Ultrasparc), the `sem_post' function is can safely be called from + signal handlers. This is the only thread synchronization function + provided by POSIX threads that is async-signal safe. On the Intel + 386 and earlier Sparc chips, the current LinuxThreads + implementation of `sem_post' is not async-signal safe, because the + hardware does not support the required atomic operations. -* Menu: + `sem_post' always succeeds and returns 0, unless the semaphore + count would exceed `SEM_VALUE_MAX' after being incremented. In + that case `sem_post' returns -1 and sets ERRNO to `EINVAL'. The + semaphore count is left unchanged. -* Width of Type:: How many bits does an integer type hold? -* Range of Type:: What are the largest and smallest values - that an integer type can hold? -* Floating Type Macros:: Parameters that measure the floating point types. -* Structure Measurement:: Getting measurements on structure types. + - Function: int sem_getvalue (sem_t * SEM, int * SVAL) + `sem_getvalue' stores in the location pointed to by SVAL the + current count of the semaphore SEM. It always returns 0.  -File: libc.info, Node: Width of Type, Next: Range of Type, Up: Data Type Measurements - -Computing the Width of an Integer Data Type -------------------------------------------- +File: libc.info, Node: Thread-Specific Data, Next: Threads and Signal Handling, Prev: POSIX Semaphores, Up: POSIX Threads - The most common reason that a program needs to know how many bits -are in an integer type is for using an array of `long int' as a bit -vector. You can access the bit at index N with +Thread-Specific Data +==================== - vector[N / LONGBITS] & (1 << (N % LONGBITS)) + Programs often need global or static variables that have different +values in different threads. Since threads share one memory space, this +cannot be achieved with regular variables. Thread-specific data is the +POSIX threads answer to this need. -provided you define `LONGBITS' as the number of bits in a `long int'. + Each thread possesses a private memory block, the thread-specific +data area, or TSD area for short. This area is indexed by TSD keys. The +TSD area associates values of type `void *' to TSD keys. TSD keys are +common to all threads, but the value associated with a given TSD key can +be different in each thread. - There is no operator in the C language that can give you the number -of bits in an integer data type. But you can compute it from the macro -`CHAR_BIT', defined in the header file `limits.h'. + For concreteness, the TSD areas can be viewed as arrays of `void *' +pointers, TSD keys as integer indices into these arrays, and the value +of a TSD key as the value of the corresponding array element in the +calling thread. -`CHAR_BIT' - This is the number of bits in a `char'--eight, on most systems. - The value has type `int'. + When a thread is created, its TSD area initially associates `NULL' +with all keys. - You can compute the number of bits in any data type TYPE like this: + - Function: int pthread_key_create (pthread_key_t *KEY, void + (*destr_function) (void *)) + `pthread_key_create' allocates a new TSD key. The key is stored in + the location pointed to by KEY. There is a limit of + `PTHREAD_KEYS_MAX' on the number of keys allocated at a given + time. The value initially associated with the returned key is + `NULL' in all currently executing threads. - sizeof (TYPE) * CHAR_BIT + The DESTR_FUNCTION argument, if not `NULL', specifies a destructor + function associated with the key. When a thread terminates via + `pthread_exit' or by cancellation, DESTR_FUNCTION is called on the + value associated with the key in that thread. The DESTR_FUNCTION + is not called if a key is deleted with `pthread_key_delete' or a + value is changed with `pthread_setspecific'. The order in which + destructor functions are called at thread termination time is + unspecified. - -File: libc.info, Node: Range of Type, Next: Floating Type Macros, Prev: Width of Type, Up: Data Type Measurements + Before the destructor function is called, the `NULL' value is + associated with the key in the current thread. A destructor + function might, however, re-associate non-`NULL' values to that + key or some other key. To deal with this, if after all the + destructors have been called for all non-`NULL' values, there are + still some non-`NULL' values with associated destructors, then the + process is repeated. The LinuxThreads implementation stops the + process after `PTHREAD_DESTRUCTOR_ITERATIONS' iterations, even if + some non-`NULL' values with associated descriptors remain. Other + implementations may loop indefinitely. -Range of an Integer Type ------------------------- + `pthread_key_create' returns 0 unless `PTHREAD_KEYS_MAX' keys have + already been allocated, in which case it fails and returns + `EAGAIN'. - Suppose you need to store an integer value which can range from zero -to one million. Which is the smallest type you can use? There is no -general rule; it depends on the C compiler and target machine. You can -use the `MIN' and `MAX' macros in `limits.h' to determine which type -will work. + - Function: int pthread_key_delete (pthread_key_t KEY) + `pthread_key_delete' deallocates a TSD key. It does not check + whether non-`NULL' values are associated with that key in the + currently executing threads, nor call the destructor function + associated with the key. - Each signed integer type has a pair of macros which give the smallest -and largest values that it can hold. Each unsigned integer type has one -such macro, for the maximum value; the minimum value is, of course, -zero. + If there is no such key KEY, it returns `EINVAL'. Otherwise it + returns 0. - The values of these macros are all integer constant expressions. The -`MAX' and `MIN' macros for `char' and `short int' types have values of -type `int'. The `MAX' and `MIN' macros for the other types have values -of the same type described by the macro--thus, `ULONG_MAX' has type -`unsigned long int'. + - Function: int pthread_setspecific (pthread_key_t KEY, const void + *POINTER) + `pthread_setspecific' changes the value associated with KEY in the + calling thread, storing the given POINTER instead. -`SCHAR_MIN' - This is the minimum value that can be represented by a - `signed char'. + If there is no such key KEY, it returns `EINVAL'. Otherwise it + returns 0. -`SCHAR_MAX' -`UCHAR_MAX' - These are the maximum values that can be represented by a - `signed char' and `unsigned char', respectively. + - Function: void * pthread_getspecific (pthread_key_t KEY) + `pthread_getspecific' returns the value currently associated with + KEY in the calling thread. -`CHAR_MIN' - This is the minimum value that can be represented by a `char'. - It's equal to `SCHAR_MIN' if `char' is signed, or zero otherwise. + If there is no such key KEY, it returns `NULL'. -`CHAR_MAX' - This is the maximum value that can be represented by a `char'. - It's equal to `SCHAR_MAX' if `char' is signed, or `UCHAR_MAX' - otherwise. + The following code fragment allocates a thread-specific array of 100 +characters, with automatic reclaimation at thread exit: -`SHRT_MIN' - This is the minimum value that can be represented by a - `signed short int'. On most machines that the GNU C library runs - on, `short' integers are 16-bit quantities. + /* Key for the thread-specific buffer */ + static pthread_key_t buffer_key; + + /* Once-only initialisation of the key */ + static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT; + + /* Allocate the thread-specific buffer */ + void buffer_alloc(void) + { + pthread_once(&buffer_key_once, buffer_key_alloc); + pthread_setspecific(buffer_key, malloc(100)); + } + + /* Return the thread-specific buffer */ + char * get_buffer(void) + { + return (char *) pthread_getspecific(buffer_key); + } + + /* Allocate the key */ + static void buffer_key_alloc() + { + pthread_key_create(&buffer_key, buffer_destroy); + } + + /* Free the thread-specific buffer */ + static void buffer_destroy(void * buf) + { + free(buf); + } -`SHRT_MAX' -`USHRT_MAX' - These are the maximum values that can be represented by a - `signed short int' and `unsigned short int', respectively. + +File: libc.info, Node: Threads and Signal Handling, Next: Threads and Fork, Prev: Thread-Specific Data, Up: POSIX Threads -`INT_MIN' - This is the minimum value that can be represented by a - `signed int'. On most machines that the GNU C system runs on, an - `int' is a 32-bit quantity. +Threads and Signal Handling +=========================== -`INT_MAX' -`UINT_MAX' - These are the maximum values that can be represented by, - respectively, the type `signed int' and the type `unsigned int'. + - Function: int pthread_sigmask (int HOW, const sigset_t *NEWMASK, + sigset_t *OLDMASK) + `pthread_sigmask' changes the signal mask for the calling thread as + described by the HOW and NEWMASK arguments. If OLDMASK is not + `NULL', the previous signal mask is stored in the location pointed + to by OLDMASK. -`LONG_MIN' - This is the minimum value that can be represented by a - `signed long int'. On most machines that the GNU C system runs - on, `long' integers are 32-bit quantities, the same size as `int'. + The meaning of the HOW and NEWMASK arguments is the same as for + `sigprocmask'. If HOW is `SIG_SETMASK', the signal mask is set to + NEWMASK. If HOW is `SIG_BLOCK', the signals specified to NEWMASK + are added to the current signal mask. If HOW is `SIG_UNBLOCK', + the signals specified to NEWMASK are removed from the current + signal mask. -`LONG_MAX' -`ULONG_MAX' - These are the maximum values that can be represented by a - `signed long int' and `unsigned long int', respectively. + Recall that signal masks are set on a per-thread basis, but signal + actions and signal handlers, as set with `sigaction', are shared + between all threads. -`LONG_LONG_MIN' - This is the minimum value that can be represented by a - `signed long long int'. On most machines that the GNU C system - runs on, `long long' integers are 64-bit quantities. + The `pthread_sigmask' function returns 0 on success, and one of the + following error codes on error: + `EINVAL' + HOW is not one of `SIG_SETMASK', `SIG_BLOCK', or `SIG_UNBLOCK' -`LONG_LONG_MAX' -`ULONG_LONG_MAX' - These are the maximum values that can be represented by a `signed - long long int' and `unsigned long long int', respectively. + `EFAULT' + NEWMASK or OLDMASK point to invalid addresses -`WCHAR_MAX' - This is the maximum value that can be represented by a `wchar_t'. - *Note Extended Char Intro::. + - Function: int pthread_kill (pthread_t THREAD, int SIGNO) + `pthread_kill' sends signal number SIGNO to the thread THREAD. + The signal is delivered and handled as described in *Note Signal + Handling::. - The header file `limits.h' also defines some additional constants -that parameterize various operating system and file system limits. -These constants are described in *Note System Configuration::. + `pthread_kill' returns 0 on success, one of the following error + codes on error: + `EINVAL' + SIGNO is not a valid signal number - -File: libc.info, Node: Floating Type Macros, Next: Structure Measurement, Prev: Range of Type, Up: Data Type Measurements + `ESRCH' + The thread THREAD does not exist (e.g. it has already + terminated) -Floating Type Macros --------------------- + - Function: int sigwait (const sigset_t *SET, int *SIG) + `sigwait' suspends the calling thread until one of the signals in + SET is delivered to the calling thread. It then stores the number + of the signal received in the location pointed to by SIG and + returns. The signals in SET must be blocked and not ignored on + entrance to `sigwait'. If the delivered signal has a signal handler + function attached, that function is _not_ called. - The specific representation of floating point numbers varies from -machine to machine. Because floating point numbers are represented -internally as approximate quantities, algorithms for manipulating -floating point data often need to take account of the precise details of -the machine's floating point representation. + `sigwait' is a cancellation point. It always returns 0. - Some of the functions in the C library itself need this information; -for example, the algorithms for printing and reading floating point -numbers (*note I/O on Streams::) and for calculating trigonometric and -irrational functions (*note Mathematics::) use it to avoid round-off -error and loss of accuracy. User programs that implement numerical -analysis techniques also often need this information in order to -minimize or compute error bounds. + For `sigwait' to work reliably, the signals being waited for must be +blocked in all threads, not only in the calling thread, since otherwise +the POSIX semantics for signal delivery do not guarantee that it's the +thread doing the `sigwait' that will receive the signal. The best way +to achieve this is block those signals before any threads are created, +and never unblock them in the program other than by calling `sigwait'. - The header file `float.h' describes the format used by your machine. + Signal handling in LinuxThreads departs significantly from the POSIX +standard. According to the standard, "asynchronous" (external) signals +are addressed to the whole process (the collection of all threads), +which then delivers them to one particular thread. The thread that +actually receives the signal is any thread that does not currently block +the signal. -* Menu: + In LinuxThreads, each thread is actually a kernel process with its +own PID, so external signals are always directed to one particular +thread. If, for instance, another thread is blocked in `sigwait' on +that signal, it will not be restarted. -* Floating Point Concepts:: Definitions of terminology. -* Floating Point Parameters:: Details of specific macros. -* IEEE Floating Point:: The measurements for one common - representation. + The LinuxThreads implementation of `sigwait' installs dummy signal +handlers for the signals in SET for the duration of the wait. Since +signal handlers are shared between all threads, other threads must not +attach their own signal handlers to these signals, or alternatively +they should all block these signals (which is recommended anyway). diff -durpN glibc-2.2.4/manual/libc.info-51 glibc-2.2.5/manual/libc.info-51 --- glibc-2.2.4/manual/libc.info-51 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-51 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,324 +33,1083 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Floating Point Concepts, Next: Floating Point Parameters, Up: Floating Type Macros +File: libc.info, Node: Threads and Fork, Next: Streams and Fork, Prev: Threads and Signal Handling, Up: POSIX Threads -Floating Point Representation Concepts -...................................... +Threads and Fork +================ - This section introduces the terminology for describing floating point -representations. + It's not intuitively obvious what should happen when a +multi-threaded POSIX process calls `fork'. Not only are the semantics +tricky, but you may need to write code that does the right thing at +fork time even if that code doesn't use the `fork' function. Moreover, +you need to be aware of interaction between `fork' and some library +features like `pthread_once' and stdio streams. - You are probably already familiar with most of these concepts in -terms of scientific or exponential notation for floating point numbers. -For example, the number `123456.0' could be expressed in exponential -notation as `1.23456e+05', a shorthand notation indicating that the -mantissa `1.23456' is multiplied by the base `10' raised to power `5'. + When `fork' is called by one of the threads of a process, it creates +a new process which is copy of the calling process. Effectively, in +addition to copying certain system objects, the function takes a +snapshot of the memory areas of the parent process, and creates +identical areas in the child. To make matters more complicated, with +threads it's possible for two or more threads to concurrently call fork +to create two or more child processes. - More formally, the internal representation of a floating point number -can be characterized in terms of the following parameters: + The child process has a copy of the address space of the parent, but +it does not inherit any of its threads. Execution of the child process +is carried out by a new thread which returns from `fork' function with +a return value of zero; it is the only thread in the child process. +Because threads are not inherited across fork, issues arise. At the +time of the call to `fork', threads in the parent process other than +the one calling `fork' may have been executing critical regions of +code. As a result, the child process may get a copy of objects that +are not in a well-defined state. This potential problem affects all +components of the program. - * The "sign" is either `-1' or `1'. + Any program component which will continue being used in a child +process must correctly handle its state during `fork'. For this +purpose, the POSIX interface provides the special function +`pthread_atfork' for installing pointers to handler functions which are +called from within `fork'. - * The "base" or "radix" for exponentiation, an integer greater than - `1'. This is a constant for a particular representation. + - Function: int pthread_atfork (void (*PREPARE)(void), void + (*PARENT)(void), void (*CHILD)(void)) + `pthread_atfork' registers handler functions to be called just + before and just after a new process is created with `fork'. The + PREPARE handler will be called from the parent process, just + before the new process is created. The PARENT handler will be + called from the parent process, just before `fork' returns. The + CHILD handler will be called from the child process, just before + `fork' returns. - * The "exponent" to which the base is raised. The upper and lower - bounds of the exponent value are constants for a particular - representation. + `pthread_atfork' returns 0 on success and a non-zero error code on + error. - Sometimes, in the actual bits representing the floating point - number, the exponent is "biased" by adding a constant to it, to - make it always be represented as an unsigned quantity. This is - only important if you have some reason to pick apart the bit - fields making up the floating point number by hand, which is - something for which the GNU library provides no support. So this - is ignored in the discussion that follows. + One or more of the three handlers PREPARE, PARENT and CHILD can be + given as `NULL', meaning that no handler needs to be called at the + corresponding point. - * The "mantissa" or "significand" is an unsigned integer which is a - part of each floating point number. + `pthread_atfork' can be called several times to install several + sets of handlers. At `fork' time, the PREPARE handlers are called + in LIFO order (last added with `pthread_atfork', first called + before `fork'), while the PARENT and CHILD handlers are called in + FIFO order (first added, first called). - * The "precision" of the mantissa. If the base of the representation - is B, then the precision is the number of base-B digits in the - mantissa. This is a constant for a particular representation. + If there is insufficient memory available to register the handlers, + `pthread_atfork' fails and returns `ENOMEM'. Otherwise it returns + 0. - Many floating point representations have an implicit "hidden bit" - in the mantissa. This is a bit which is present virtually in the - mantissa, but not stored in memory because its value is always 1 - in a normalized number. The precision figure (see above) includes - any hidden bits. + The functions `fork' and `pthread_atfork' must not be regarded as + reentrant from the context of the handlers. That is to say, if a + `pthread_atfork' handler invoked from within `fork' calls + `pthread_atfork' or `fork', the behavior is undefined. - Again, the GNU library provides no facilities for dealing with such - low-level aspects of the representation. + Registering a triplet of handlers is an atomic operation with + respect to fork. If new handlers are registered at about the same + time as a fork occurs, either all three handlers will be called, + or none of them will be called. - The mantissa of a floating point number represents an implicit -fraction whose denominator is the base raised to the power of the -precision. Since the largest representable mantissa is one less than -this denominator, the value of the fraction is always strictly less -than `1'. The mathematical value of a floating point number is then -the product of this fraction, the sign, and the base raised to the -exponent. + The handlers are inherited by the child process, and there is no + way to remove them, short of using `exec' to load a new pocess + image. - We say that the floating point number is "normalized" if the -fraction is at least `1/B', where B is the base. In other words, the -mantissa would be too large to fit if it were multiplied by the base. -Non-normalized numbers are sometimes called "denormal"; they contain -less precision than the representation normally can hold. - If the number is not normalized, then you can subtract `1' from the -exponent while multiplying the mantissa by the base, and get another -floating point number with the same value. "Normalization" consists of -doing this repeatedly until the number is normalized. Two distinct -normalized floating point numbers cannot be equal in value. + To understand the purpose of `pthread_atfork', recall that `fork' +duplicates the whole memory space, including mutexes in their current +locking state, but only the calling thread: other threads are not +running in the child process. Thus, if a mutex is locked by a thread +other than the thread calling `fork', that mutex will remain locked +forever in the child process, possibly blocking the execution of the +child process. Or if some shared data, such as a linked list, was in the +middle of being updated by a thread in the parent process, the child +will get a copy of the incompletely updated data which it cannot use. - (There is an exception to this rule: if the mantissa is zero, it is -considered normalized. Another exception happens on certain machines -where the exponent is as small as the representation can hold. Then it -is impossible to subtract `1' from the exponent, so a number may be -normalized even if its fraction is less than `1/B'.) + To avoid this, install handlers with `pthread_atfork' as follows: +have the PREPARE handler lock the mutexes (in locking order), and the +PARENT handler unlock the mutexes. The CHILD handler should reset the +mutexes using `pthread_mutex_init', as well as any other +synchronization objects such as condition variables. + + Locking the global mutexes before the fork ensures that all other +threads are locked out of the critical regions of code protected by +those mutexes. Thus when `fork' takes a snapshot of the parent's +address space, that snapshot will copy valid, stable data. Resetting +the synchronization objects in the child process will ensure they are +properly cleansed of any artifacts from the threading subsystem of the +parent process. For example, a mutex may inherit a wait queue of +threads waiting for the lock; this wait queue makes no sense in the +child process. Initializing the mutex takes care of this.  -File: libc.info, Node: Floating Point Parameters, Next: IEEE Floating Point, Prev: Floating Point Concepts, Up: Floating Type Macros +File: libc.info, Node: Streams and Fork, Next: Miscellaneous Thread Functions, Prev: Threads and Fork, Up: POSIX Threads -Floating Point Parameters -......................... +Streams and Fork +================ - These macro definitions can be accessed by including the header file -`float.h' in your program. + The GNU standard I/O library has an internal mutex which guards the +internal linked list of all standard C FILE objects. This mutex is +properly taken care of during `fork' so that the child receives an +intact copy of the list. This allows the `fopen' function, and related +stream-creating functions, to work correctly in the child process, +since these functions need to insert into the list. - Macro names starting with `FLT_' refer to the `float' type, while -names beginning with `DBL_' refer to the `double' type and names -beginning with `LDBL_' refer to the `long double' type. (If GCC does -not support `long double' as a distinct data type on a target machine -then the values for the `LDBL_' constants are equal to the -corresponding constants for the `double' type.) + However, the individual stream locks are not completely taken care +of. Thus unless the multithreaded application takes special +precautions in its use of `fork', the child process might not be able +to safely use the streams that it inherited from the parent. In +general, for any given open stream in the parent that is to be used by +the child process, the application must ensure that that stream is not +in use by another thread when `fork' is called. Otherwise an +inconsistent copy of the stream object be produced. An easy way to +ensure this is to use `flockfile' to lock the stream prior to calling +`fork' and then unlock it with `funlockfile' inside the parent process, +provided that the parent's threads properly honor these locks. Nothing +special needs to be done in the child process, since the library +internally resets all stream locks. - Of these macros, only `FLT_RADIX' is guaranteed to be a constant -expression. The other macros listed here cannot be reliably used in -places that require constant expressions, such as `#if' preprocessing -directives or in the dimensions of static arrays. + Note that the stream locks are not shared between the parent and +child. For example, even if you ensure that, say, the stream `stdout' +is properly treated and can be safely used in the child, the stream +locks do not provide an exclusion mechanism between the parent and +child. If both processes write to `stdout', strangely interleaved +output may result regardless of the explicit use of `flockfile' or +implicit locks. - Although the ISO C standard specifies minimum and maximum values for -most of these parameters, the GNU C implementation uses whatever values -describe the floating point representation of the target machine. So in -principle GNU C actually satisfies the ISO C requirements only if the -target machine is suitable. In practice, all the machines currently -supported are suitable. + Also note that these provisions are a GNU extension; other systems +might not provide any way for streams to be used in the child of a +multithreaded process. POSIX requires that such a child process +confines itself to calling only asynchronous safe functions, which +excludes much of the library, including standard I/O. -`FLT_ROUNDS' - This value characterizes the rounding mode for floating point - addition. The following values indicate standard rounding modes: + +File: libc.info, Node: Miscellaneous Thread Functions, Prev: Streams and Fork, Up: POSIX Threads - `-1' - The mode is indeterminable. +Miscellaneous Thread Functions +============================== - `0' - Rounding is towards zero. + - Function: pthread_t pthread_self (VOID) + `pthread_self' returns the thread identifier for the calling + thread. - `1' - Rounding is to the nearest number. + - Function: int pthread_equal (pthread_t thread1, pthread_t thread2) + `pthread_equal' determines if two thread identifiers refer to the + same thread. - `2' - Rounding is towards positive infinity. + A non-zero value is returned if THREAD1 and THREAD2 refer to the + same thread. Otherwise, 0 is returned. - `3' - Rounding is towards negative infinity. + - Function: int pthread_detach (pthread_t TH) + `pthread_detach' puts the thread TH in the detached state. This + guarantees that the memory resources consumed by TH will be freed + immediately when TH terminates. However, this prevents other + threads from synchronizing on the termination of TH using + `pthread_join'. - Any other value represents a machine-dependent nonstandard rounding - mode. + A thread can be created initially in the detached state, using the + `detachstate' attribute to `pthread_create'. In contrast, + `pthread_detach' applies to threads created in the joinable state, + and which need to be put in the detached state later. - On most machines, the value is `1', in accordance with the IEEE - standard for floating point. + After `pthread_detach' completes, subsequent attempts to perform + `pthread_join' on TH will fail. If another thread is already + joining the thread TH at the time `pthread_detach' is called, + `pthread_detach' does nothing and leaves TH in the joinable state. - Here is a table showing how certain values round for each possible - value of `FLT_ROUNDS', if the other aspects of the representation - match the IEEE single-precision standard. + On success, 0 is returned. On error, one of the following codes is + returned: + `ESRCH' + No thread could be found corresponding to that specified by TH - 0 1 2 3 - 1.00000003 1.0 1.0 1.00000012 1.0 - 1.00000007 1.0 1.00000012 1.00000012 1.0 - -1.00000003 -1.0 -1.0 -1.0 -1.00000012 - -1.00000007 -1.0 -1.00000012 -1.0 -1.00000012 + `EINVAL' + The thread TH is already in the detached state -`FLT_RADIX' - This is the value of the base, or radix, of the exponent - representation. This is guaranteed to be a constant expression, - unlike the other macros described in this section. The value is 2 - on all machines we know of except the IBM 360 and derivatives. + - Function: void pthread_kill_other_threads_np (VOID) + `pthread_kill_other_threads_np' is a non-portable LinuxThreads + extension. It causes all threads in the program to terminate + immediately, except the calling thread which proceeds normally. It + is intended to be called just before a thread calls one of the + `exec' functions, e.g. `execve'. -`FLT_MANT_DIG' - This is the number of base-`FLT_RADIX' digits in the floating point - mantissa for the `float' data type. The following expression - yields `1.0' (even though mathematically it should not) due to the - limited number of mantissa digits: + Termination of the other threads is not performed through + `pthread_cancel' and completely bypasses the cancellation + mechanism. Hence, the current settings for cancellation state and + cancellation type are ignored, and the cleanup handlers are not + executed in the terminated threads. - float radix = FLT_RADIX; - - 1.0f + 1.0f / radix / radix / ... / radix + According to POSIX 1003.1c, a successful `exec*' in one of the + threads should automatically terminate all other threads in the + program. This behavior is not yet implemented in LinuxThreads. + Calling `pthread_kill_other_threads_np' before `exec*' achieves + much of the same behavior, except that if `exec*' ultimately + fails, then all other threads are already killed. - where `radix' appears `FLT_MANT_DIG' times. + - Function: int pthread_once (pthread_once_t *once_CONTROL, void + (*INIT_ROUTINE) (void)) + The purpose of `pthread_once' is to ensure that a piece of + initialization code is executed at most once. The ONCE_CONTROL + argument points to a static or extern variable statically + initialized to `PTHREAD_ONCE_INIT'. -`DBL_MANT_DIG' -`LDBL_MANT_DIG' - This is the number of base-`FLT_RADIX' digits in the floating point - mantissa for the data types `double' and `long double', - respectively. + The first time `pthread_once' is called with a given ONCE_CONTROL + argument, it calls INIT_ROUTINE with no argument and changes the + value of the ONCE_CONTROL variable to record that initialization + has been performed. Subsequent calls to `pthread_once' with the + same `once_control' argument do nothing. -`FLT_DIG' - This is the number of decimal digits of precision for the `float' - data type. Technically, if P and B are the precision and base - (respectively) for the representation, then the decimal precision - Q is the maximum number of decimal digits such that any floating - point number with Q base 10 digits can be rounded to a floating - point number with P base B digits and back again, without change - to the Q decimal digits. + If a thread is cancelled while executing INIT_ROUTINE the state of + the ONCE_CONTROL variable is reset so that a future call to + `pthread_once' will call the routine again. - The value of this macro is supposed to be at least `6', to satisfy - ISO C. + If the process forks while one or more threads are executing + `pthread_once' initialization routines, the states of their + respective ONCE_CONTROL variables will appear to be reset in the + child process so that if the child calls `pthread_once', the + routines will be executed. -`DBL_DIG' -`LDBL_DIG' - These are similar to `FLT_DIG', but for the data types `double' - and `long double', respectively. The values of these macros are - supposed to be at least `10'. + `pthread_once' always returns 0. -`FLT_MIN_EXP' - This is the smallest possible exponent value for type `float'. - More precisely, is the minimum negative integer such that the value - `FLT_RADIX' raised to this power minus 1 can be represented as a - normalized floating point number of type `float'. + - Function: int pthread_setschedparam (pthread_t target_THREAD, int + POLICY, const struct sched_param *PARAM) + `pthread_setschedparam' sets the scheduling parameters for the + thread TARGET_THREAD as indicated by POLICY and PARAM. POLICY can + be either `SCHED_OTHER' (regular, non-realtime scheduling), + `SCHED_RR' (realtime, round-robin) or `SCHED_FIFO' (realtime, + first-in first-out). PARAM specifies the scheduling priority for + the two realtime policies. See `sched_setpolicy' for more + information on scheduling policies. -`DBL_MIN_EXP' -`LDBL_MIN_EXP' - These are similar to `FLT_MIN_EXP', but for the data types - `double' and `long double', respectively. + The realtime scheduling policies `SCHED_RR' and `SCHED_FIFO' are + available only to processes with superuser privileges. -`FLT_MIN_10_EXP' - This is the minimum negative integer such that `10' raised to this - power minus 1 can be represented as a normalized floating point - number of type `float'. This is supposed to be `-37' or even less. + On success, `pthread_setschedparam' returns 0. On error it returns + one of the following codes: + `EINVAL' + POLICY is not one of `SCHED_OTHER', `SCHED_RR', `SCHED_FIFO', + or the priority value specified by PARAM is not valid for the + specified policy -`DBL_MIN_10_EXP' -`LDBL_MIN_10_EXP' - These are similar to `FLT_MIN_10_EXP', but for the data types - `double' and `long double', respectively. + `EPERM' + Realtime scheduling was requested but the calling process + does not have sufficient privileges. -`FLT_MAX_EXP' - This is the largest possible exponent value for type `float'. More - precisely, this is the maximum positive integer such that value - `FLT_RADIX' raised to this power minus 1 can be represented as a - floating point number of type `float'. + `ESRCH' + The TARGET_THREAD is invalid or has already terminated -`DBL_MAX_EXP' -`LDBL_MAX_EXP' - These are similar to `FLT_MAX_EXP', but for the data types - `double' and `long double', respectively. + `EFAULT' + PARAM points outside the process memory space -`FLT_MAX_10_EXP' - This is the maximum positive integer such that `10' raised to this - power minus 1 can be represented as a normalized floating point - number of type `float'. This is supposed to be at least `37'. + - Function: int pthread_getschedparam (pthread_t target_THREAD, int + *POLICY, struct sched_param *PARAM) + `pthread_getschedparam' retrieves the scheduling policy and + scheduling parameters for the thread TARGET_THREAD and stores them + in the locations pointed to by POLICY and PARAM, respectively. -`DBL_MAX_10_EXP' -`LDBL_MAX_10_EXP' - These are similar to `FLT_MAX_10_EXP', but for the data types - `double' and `long double', respectively. + `pthread_getschedparam' returns 0 on success, or one of the + following error codes on failure: + `ESRCH' + The TARGET_THREAD is invalid or has already terminated. -`FLT_MAX' - The value of this macro is the maximum number representable in type - `float'. It is supposed to be at least `1E+37'. The value has - type `float'. + `EFAULT' + POLICY or PARAM point outside the process memory space. - The smallest representable number is `- FLT_MAX'. -`DBL_MAX' -`LDBL_MAX' - These are similar to `FLT_MAX', but for the data types `double' - and `long double', respectively. The type of the macro's value is - the same as the type it describes. + - Function: int pthread_setconcurrency (int LEVEL) + `pthread_setconcurrency' is unused in LinuxThreads due to the lack + of a mapping of user threads to kernel threads. It exists for + source compatibility. It does store the value LEVEL so that it + can be returned by a subsequent call to `pthread_getconcurrency'. + It takes no other action however. -`FLT_MIN' - The value of this macro is the minimum normalized positive floating - point number that is representable in type `float'. It is supposed - to be no more than `1E-37'. + - Function: int pthread_getconcurrency () + `pthread_getconcurrency' is unused in LinuxThreads due to the lack + of a mapping of user threads to kernel threads. It exists for + source compatibility. However, it will return the value that was + set by the last call to `pthread_setconcurrency'. -`DBL_MIN' -`LDBL_MIN' - These are similar to `FLT_MIN', but for the data types `double' - and `long double', respectively. The type of the macro's value is - the same as the type it describes. + +File: libc.info, Node: Language Features, Next: Library Summary, Prev: POSIX Threads, Up: Top -`FLT_EPSILON' - This is the maximum positive floating point number of type `float' - such that `1.0 + FLT_EPSILON != 1.0' is true. It's supposed to be - no greater than `1E-5'. +C Language Facilities in the Library +************************************ -`DBL_EPSILON' -`LDBL_EPSILON' - These are similar to `FLT_EPSILON', but for the data types - `double' and `long double', respectively. The type of the macro's - value is the same as the type it describes. The values are not - supposed to be greater than `1E-9'. + Some of the facilities implemented by the C library really should be +thought of as parts of the C language itself. These facilities ought to +be documented in the C Language Manual, not in the library manual; but +since we don't have the language manual yet, and documentation for these +features has been written, we are publishing it here. + +* Menu: + +* Consistency Checking:: Using `assert' to abort if + something ``impossible'' happens. +* Variadic Functions:: Defining functions with varying numbers + of args. +* Null Pointer Constant:: The macro `NULL'. +* Important Data Types:: Data types for object sizes. +* Data Type Measurements:: Parameters of data type representations.  -File: libc.info, Node: IEEE Floating Point, Prev: Floating Point Parameters, Up: Floating Type Macros +File: libc.info, Node: Consistency Checking, Next: Variadic Functions, Up: Language Features -IEEE Floating Point -................... +Explicitly Checking Internal Consistency +======================================== - Here is an example showing how the floating type measurements come -out for the most common floating point representation, specified by the -`IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE Std -754-1985)'. Nearly all computers designed since the 1980s use this -format. + When you're writing a program, it's often a good idea to put in +checks at strategic places for "impossible" errors or violations of +basic assumptions. These kinds of checks are helpful in debugging +problems with the interfaces between different parts of the program, +for example. - The IEEE single-precision float representation uses a base of 2. -There is a sign bit, a mantissa with 23 bits plus one hidden bit (so -the total precision is 24 base-2 digits), and an 8-bit exponent that -can represent values in the range -125 to 128, inclusive. + The `assert' macro, defined in the header file `assert.h', provides +a convenient way to abort the program while printing a message about +where in the program the error was detected. - So, for an implementation that uses this representation for the -`float' data type, appropriate values for the corresponding parameters -are: + Once you think your program is debugged, you can disable the error +checks performed by the `assert' macro by recompiling with the macro +`NDEBUG' defined. This means you don't actually have to change the +program source code to disable these checks. - FLT_RADIX 2 - FLT_MANT_DIG 24 - FLT_DIG 6 - FLT_MIN_EXP -125 - FLT_MIN_10_EXP -37 - FLT_MAX_EXP 128 - FLT_MAX_10_EXP +38 - FLT_MIN 1.17549435E-38F - FLT_MAX 3.40282347E+38F - FLT_EPSILON 1.19209290E-07F + But disabling these consistency checks is undesirable unless they +make the program significantly slower. All else being equal, more error +checking is good no matter who is running the program. A wise user +would rather have a program crash, visibly, than have it return nonsense +without indicating anything might be wrong. - Here are the values for the `double' data type: + - Macro: void assert (int EXPRESSION) + Verify the programmer's belief that EXPRESSION is nonzero at this + point in the program. - DBL_MANT_DIG 53 - DBL_DIG 15 - DBL_MIN_EXP -1021 - DBL_MIN_10_EXP -307 - DBL_MAX_EXP 1024 - DBL_MAX_10_EXP 308 - DBL_MAX 1.7976931348623157E+308 - DBL_MIN 2.2250738585072014E-308 - DBL_EPSILON 2.2204460492503131E-016 + If `NDEBUG' is not defined, `assert' tests the value of + EXPRESSION. If it is false (zero), `assert' aborts the program + (*note Aborting a Program::) after printing a message of the form: + + `FILE':LINENUM: FUNCTION: Assertion `EXPRESSION' failed. + + on the standard error stream `stderr' (*note Standard Streams::). + The filename and line number are taken from the C preprocessor + macros `__FILE__' and `__LINE__' and specify where the call to + `assert' was made. When using the GNU C compiler, the name of the + function which calls `assert' is taken from the built-in variable + `__PRETTY_FUNCTION__'; with older compilers, the function name and + following colon are omitted. + + If the preprocessor macro `NDEBUG' is defined before `assert.h' is + included, the `assert' macro is defined to do absolutely nothing. + + *Warning:* Even the argument expression EXPRESSION is not + evaluated if `NDEBUG' is in effect. So never use `assert' with + arguments that involve side effects. For example, `assert (++i > + 0);' is a bad idea, because `i' will not be incremented if + `NDEBUG' is defined. + + Sometimes the "impossible" condition you want to check for is an +error return from an operating system function. Then it is useful to +display not only where the program crashes, but also what error was +returned. The `assert_perror' macro makes this easy. + + - Macro: void assert_perror (int ERRNUM) + Similar to `assert', but verifies that ERRNUM is zero. + + If `NDEBUG' is defined, `assert_perror' tests the value of ERRNUM. + If it is nonzero, `assert_perror' aborts the program after + printing a message of the form: + + `FILE':LINENUM: FUNCTION: ERROR TEXT + + on the standard error stream. The file name, line number, and + function name are as for `assert'. The error text is the result of + `strerror (ERRNUM)'. *Note Error Messages::. + + Like `assert', if `NDEBUG' is defined before `assert.h' is + included, the `assert_perror' macro does absolutely nothing. It + does not evaluate the argument, so ERRNUM should not have any side + effects. It is best for ERRNUM to be just a simple variable + reference; often it will be `errno'. + + This macro is a GNU extension. + + *Usage note:* The `assert' facility is designed for detecting +_internal inconsistency_; it is not suitable for reporting invalid +input or improper usage by the _user_ of the program. + + The information in the diagnostic messages printed by the `assert' +and `assert_perror' macro is intended to help you, the programmer, +track down the cause of a bug, but is not really useful for telling a +user of your program why his or her input was invalid or why a command +could not be carried out. What's more, your program should not abort +when given invalid input, as `assert' would do--it should exit with +nonzero status (*note Exit Status::) after printing its error messages, +or perhaps read another command or move on to the next input file. + + *Note Error Messages::, for information on printing error messages +for problems that _do not_ represent bugs in the program.  -File: libc.info, Node: Structure Measurement, Prev: Floating Type Macros, Up: Data Type Measurements +File: libc.info, Node: Variadic Functions, Next: Null Pointer Constant, Prev: Consistency Checking, Up: Language Features -Structure Field Offset Measurement ----------------------------------- +Variadic Functions +================== - You can use `offsetof' to measure the location within a structure -type of a particular structure member. + ISO C defines a syntax for declaring a function to take a variable +number or type of arguments. (Such functions are referred to as +"varargs functions" or "variadic functions".) However, the language +itself provides no mechanism for such functions to access their +non-required arguments; instead, you use the variable arguments macros +defined in `stdarg.h'. - - Macro: size_t offsetof (TYPE, MEMBER) - This expands to a integer constant expression that is the offset - of the structure member named MEMBER in a the structure type TYPE. - For example, `offsetof (struct s, elem)' is the offset, in bytes, - of the member `elem' in a `struct s'. + This section describes how to declare variadic functions, how to +write them, and how to call them properly. - This macro won't work if MEMBER is a bit field; you get an error - from the C compiler in that case. + *Compatibility Note:* Many older C dialects provide a similar, but +incompatible, mechanism for defining functions with variable numbers of +arguments, using `varargs.h'. + +* Menu: + +* Why Variadic:: Reasons for making functions take + variable arguments. +* How Variadic:: How to define and call variadic functions. +* Variadic Example:: A complete example. + + +File: libc.info, Node: Why Variadic, Next: How Variadic, Up: Variadic Functions + +Why Variadic Functions are Used +------------------------------- + + Ordinary C functions take a fixed number of arguments. When you +define a function, you specify the data type for each argument. Every +call to the function should supply the expected number of arguments, +with types that can be converted to the specified ones. Thus, if the +function `foo' is declared with `int foo (int, char *);' then you must +call it with two arguments, a number (any kind will do) and a string +pointer. + + But some functions perform operations that can meaningfully accept an +unlimited number of arguments. + + In some cases a function can handle any number of values by +operating on all of them as a block. For example, consider a function +that allocates a one-dimensional array with `malloc' to hold a +specified set of values. This operation makes sense for any number of +values, as long as the length of the array corresponds to that number. +Without facilities for variable arguments, you would have to define a +separate function for each possible array size. + + The library function `printf' (*note Formatted Output::) is an +example of another class of function where variable arguments are +useful. This function prints its arguments (which can vary in type as +well as number) under the control of a format template string. + + These are good reasons to define a "variadic" function which can +handle as many arguments as the caller chooses to pass. + + Some functions such as `open' take a fixed set of arguments, but +occasionally ignore the last few. Strict adherence to ISO C requires +these functions to be defined as variadic; in practice, however, the GNU +C compiler and most other C compilers let you define such a function to +take a fixed set of arguments--the most it can ever use--and then only +_declare_ the function as variadic (or not declare its arguments at +all!). + + +File: libc.info, Node: How Variadic, Next: Variadic Example, Prev: Why Variadic, Up: Variadic Functions + +How Variadic Functions are Defined and Used +------------------------------------------- + + Defining and using a variadic function involves three steps: + + * _Define_ the function as variadic, using an ellipsis (`...') in + the argument list, and using special macros to access the variable + arguments. *Note Receiving Arguments::. + + * _Declare_ the function as variadic, using a prototype with an + ellipsis (`...'), in all the files which call it. *Note Variadic + Prototypes::. + + * _Call_ the function by writing the fixed arguments followed by the + additional variable arguments. *Note Calling Variadics::. + +* Menu: + +* Variadic Prototypes:: How to make a prototype for a function + with variable arguments. +* Receiving Arguments:: Steps you must follow to access the + optional argument values. +* How Many Arguments:: How to decide whether there are more arguments. +* Calling Variadics:: Things you need to know about calling + variable arguments functions. +* Argument Macros:: Detailed specification of the macros + for accessing variable arguments. +* Old Varargs:: The pre-ISO way of defining variadic functions. + + +File: libc.info, Node: Variadic Prototypes, Next: Receiving Arguments, Up: How Variadic + +Syntax for Variable Arguments +............................. + + A function that accepts a variable number of arguments must be +declared with a prototype that says so. You write the fixed arguments +as usual, and then tack on `...' to indicate the possibility of +additional arguments. The syntax of ISO C requires at least one fixed +argument before the `...'. For example, + + int + func (const char *a, int b, ...) + { + ... + } + +defines a function `func' which returns an `int' and takes two required +arguments, a `const char *' and an `int'. These are followed by any +number of anonymous arguments. + + *Portability note:* For some C compilers, the last required argument +must not be declared `register' in the function definition. +Furthermore, this argument's type must be "self-promoting": that is, +the default promotions must not change its type. This rules out array +and function types, as well as `float', `char' (whether signed or not) +and `short int' (whether signed or not). This is actually an ISO C +requirement. + + +File: libc.info, Node: Receiving Arguments, Next: How Many Arguments, Prev: Variadic Prototypes, Up: How Variadic + +Receiving the Argument Values +............................. + + Ordinary fixed arguments have individual names, and you can use these +names to access their values. But optional arguments have no +names--nothing but `...'. How can you access them? + + The only way to access them is sequentially, in the order they were +written, and you must use special macros from `stdarg.h' in the +following three step process: + + 1. You initialize an argument pointer variable of type `va_list' using + `va_start'. The argument pointer when initialized points to the + first optional argument. + + 2. You access the optional arguments by successive calls to `va_arg'. + The first call to `va_arg' gives you the first optional argument, + the next call gives you the second, and so on. + + You can stop at any time if you wish to ignore any remaining + optional arguments. It is perfectly all right for a function to + access fewer arguments than were supplied in the call, but you + will get garbage values if you try to access too many arguments. + + 3. You indicate that you are finished with the argument pointer + variable by calling `va_end'. + + (In practice, with most C compilers, calling `va_end' does nothing. + This is always true in the GNU C compiler. But you might as well + call `va_end' just in case your program is someday compiled with a + peculiar compiler.) + + *Note Argument Macros::, for the full definitions of `va_start', +`va_arg' and `va_end'. + + Steps 1 and 3 must be performed in the function that accepts the +optional arguments. However, you can pass the `va_list' variable as an +argument to another function and perform all or part of step 2 there. + + You can perform the entire sequence of three steps multiple times +within a single function invocation. If you want to ignore the optional +arguments, you can do these steps zero times. + + You can have more than one argument pointer variable if you like. +You can initialize each variable with `va_start' when you wish, and +then you can fetch arguments with each argument pointer as you wish. +Each argument pointer variable will sequence through the same set of +argument values, but at its own pace. + + *Portability note:* With some compilers, once you pass an argument +pointer value to a subroutine, you must not keep using the same +argument pointer value after that subroutine returns. For full +portability, you should just pass it to `va_end'. This is actually an +ISO C requirement, but most ANSI C compilers work happily regardless. + + +File: libc.info, Node: How Many Arguments, Next: Calling Variadics, Prev: Receiving Arguments, Up: How Variadic + +How Many Arguments Were Supplied +................................ + + There is no general way for a function to determine the number and +type of the optional arguments it was called with. So whoever designs +the function typically designs a convention for the caller to specify +the number and type of arguments. It is up to you to define an +appropriate calling convention for each variadic function, and write +all calls accordingly. + + One kind of calling convention is to pass the number of optional +arguments as one of the fixed arguments. This convention works provided +all of the optional arguments are of the same type. + + A similar alternative is to have one of the required arguments be a +bit mask, with a bit for each possible purpose for which an optional +argument might be supplied. You would test the bits in a predefined +sequence; if the bit is set, fetch the value of the next argument, +otherwise use a default value. + + A required argument can be used as a pattern to specify both the +number and types of the optional arguments. The format string argument +to `printf' is one example of this (*note Formatted Output Functions::). + + Another possibility is to pass an "end marker" value as the last +optional argument. For example, for a function that manipulates an +arbitrary number of pointer arguments, a null pointer might indicate the +end of the argument list. (This assumes that a null pointer isn't +otherwise meaningful to the function.) The `execl' function works in +just this way; see *Note Executing a File::. + + +File: libc.info, Node: Calling Variadics, Next: Argument Macros, Prev: How Many Arguments, Up: How Variadic + +Calling Variadic Functions +.......................... + + You don't have to do anything special to call a variadic function. +Just put the arguments (required arguments, followed by optional ones) +inside parentheses, separated by commas, as usual. But you must declare +the function with a prototype and know how the argument values are +converted. + + In principle, functions that are _defined_ to be variadic must also +be _declared_ to be variadic using a function prototype whenever you +call them. (*Note Variadic Prototypes::, for how.) This is because +some C compilers use a different calling convention to pass the same set +of argument values to a function depending on whether that function +takes variable arguments or fixed arguments. + + In practice, the GNU C compiler always passes a given set of argument +types in the same way regardless of whether they are optional or +required. So, as long as the argument types are self-promoting, you can +safely omit declaring them. Usually it is a good idea to declare the +argument types for variadic functions, and indeed for all functions. +But there are a few functions which it is extremely convenient not to +have to declare as variadic--for example, `open' and `printf'. + + Since the prototype doesn't specify types for optional arguments, in +a call to a variadic function the "default argument promotions" are +performed on the optional argument values. This means the objects of +type `char' or `short int' (whether signed or not) are promoted to +either `int' or `unsigned int', as appropriate; and that objects of +type `float' are promoted to type `double'. So, if the caller passes a +`char' as an optional argument, it is promoted to an `int', and the +function can access it with `va_arg (AP, int)'. + + Conversion of the required arguments is controlled by the function +prototype in the usual way: the argument expression is converted to the +declared argument type as if it were being assigned to a variable of +that type. + + +File: libc.info, Node: Argument Macros, Next: Old Varargs, Prev: Calling Variadics, Up: How Variadic + +Argument Access Macros +...................... + + Here are descriptions of the macros used to retrieve variable +arguments. These macros are defined in the header file `stdarg.h'. + + - Data Type: va_list + The type `va_list' is used for argument pointer variables. + + - Macro: void va_start (va_list AP, LAST-REQUIRED) + This macro initializes the argument pointer variable AP to point + to the first of the optional arguments of the current function; + LAST-REQUIRED must be the last required argument to the function. + + *Note Old Varargs::, for an alternate definition of `va_start' + found in the header file `varargs.h'. + + - Macro: TYPE va_arg (va_list AP, TYPE) + The `va_arg' macro returns the value of the next optional argument, + and modifies the value of AP to point to the subsequent argument. + Thus, successive uses of `va_arg' return successive optional + arguments. + + The type of the value returned by `va_arg' is TYPE as specified in + the call. TYPE must be a self-promoting type (not `char' or + `short int' or `float') that matches the type of the actual + argument. + + - Macro: void va_end (va_list AP) + This ends the use of AP. After a `va_end' call, further `va_arg' + calls with the same AP may not work. You should invoke `va_end' + before returning from the function in which `va_start' was invoked + with the same AP argument. + + In the GNU C library, `va_end' does nothing, and you need not ever + use it except for reasons of portability. + + + Sometimes it is necessary to parse the list of parameters more than +once or one wants to remember a certain position in the parameter list. +To do this, one will have to make a copy of the current value of the +argument. But `va_list' is an opaque type and one cannot necessarily +assign the value of one variable of type `va_list' to another variable +of the same type. + + - Macro: void __va_copy (va_list DEST, va_list SRC) + The `__va_copy' macro allows copying of objects of type `va_list' + even if this is not an integral type. The argument pointer in + DEST is initialized to point to the same argument as the pointer + in SRC. + + This macro is a GNU extension but it will hopefully also be + available in the next update of the ISO C standard. + + If you want to use `__va_copy' you should always be prepared for the +possibility that this macro will not be available. On architectures +where a simple assignment is invalid, hopefully `__va_copy' _will_ be +available, so one should always write something like this: + + { + va_list ap, save; + ... + #ifdef __va_copy + __va_copy (save, ap); + #else + save = ap; + #endif + ... + } + + +File: libc.info, Node: Variadic Example, Prev: How Variadic, Up: Variadic Functions + +Example of a Variadic Function +------------------------------ + + Here is a complete sample function that accepts a variable number of +arguments. The first argument to the function is the count of remaining +arguments, which are added up and the result returned. While trivial, +this function is sufficient to illustrate how to use the variable +arguments facility. + + #include + #include + + int + add_em_up (int count,...) + { + va_list ap; + int i, sum; + + va_start (ap, count); /* Initialize the argument list. */ + + sum = 0; + for (i = 0; i < count; i++) + sum += va_arg (ap, int); /* Get the next argument value. */ + + va_end (ap); /* Clean up. */ + return sum; + } + + int + main (void) + { + /* This call prints 16. */ + printf ("%d\n", add_em_up (3, 5, 5, 6)); + + /* This call prints 55. */ + printf ("%d\n", add_em_up (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)); + + return 0; + } + + +File: libc.info, Node: Old Varargs, Prev: Argument Macros, Up: How Variadic + +Old-Style Variadic Functions +............................ + + Before ISO C, programmers used a slightly different facility for +writing variadic functions. The GNU C compiler still supports it; +currently, it is more portable than the ISO C facility, since support +for ISO C is still not universal. The header file which defines the +old-fashioned variadic facility is called `varargs.h'. + + Using `varargs.h' is almost the same as using `stdarg.h'. There is +no difference in how you call a variadic function; see *Note Calling +Variadics::. The only difference is in how you define them. First of +all, you must use old-style non-prototype syntax, like this: + + tree + build (va_alist) + va_dcl + { + + Secondly, you must give `va_start' only one argument, like this: + + va_list p; + va_start (p); + + These are the special macros used for defining old-style variadic +functions: + + - Macro: va_alist + This macro stands for the argument name list required in a variadic + function. + + - Macro: va_dcl + This macro declares the implicit argument or arguments for a + variadic function. + + - Macro: void va_start (va_list AP) + This macro, as defined in `varargs.h', initializes the argument + pointer variable AP to point to the first argument of the current + function. + + The other argument macros, `va_arg' and `va_end', are the same in +`varargs.h' as in `stdarg.h'; see *Note Argument Macros::, for details. + + It does not work to include both `varargs.h' and `stdarg.h' in the +same compilation; they define `va_start' in conflicting ways. + + +File: libc.info, Node: Null Pointer Constant, Next: Important Data Types, Prev: Variadic Functions, Up: Language Features + +Null Pointer Constant +===================== + + The null pointer constant is guaranteed not to point to any real +object. You can assign it to any pointer variable since it has type +`void *'. The preferred way to write a null pointer constant is with +`NULL'. + + - Macro: void * NULL + This is a null pointer constant. + + You can also use `0' or `(void *)0' as a null pointer constant, but +using `NULL' is cleaner because it makes the purpose of the constant +more evident. + + If you use the null pointer constant as a function argument, then for +complete portability you should make sure that the function has a +prototype declaration. Otherwise, if the target machine has two +different pointer representations, the compiler won't know which +representation to use for that argument. You can avoid the problem by +explicitly casting the constant to the proper pointer type, but we +recommend instead adding a prototype for the function you are calling. + + +File: libc.info, Node: Important Data Types, Next: Data Type Measurements, Prev: Null Pointer Constant, Up: Language Features + +Important Data Types +==================== + + The result of subtracting two pointers in C is always an integer, +but the precise data type varies from C compiler to C compiler. +Likewise, the data type of the result of `sizeof' also varies between +compilers. ISO defines standard aliases for these two types, so you +can refer to them in a portable fashion. They are defined in the +header file `stddef.h'. + + - Data Type: ptrdiff_t + This is the signed integer type of the result of subtracting two + pointers. For example, with the declaration `char *p1, *p2;', the + expression `p2 - p1' is of type `ptrdiff_t'. This will probably + be one of the standard signed integer types (`short int', `int' or + `long int'), but might be a nonstandard type that exists only for + this purpose. + + - Data Type: size_t + This is an unsigned integer type used to represent the sizes of + objects. The result of the `sizeof' operator is of this type, and + functions such as `malloc' (*note Unconstrained Allocation::) and + `memcpy' (*note Copying and Concatenation::) accept arguments of + this type to specify object sizes. + + *Usage Note:* `size_t' is the preferred way to declare any + arguments or variables that hold the size of an object. + + In the GNU system `size_t' is equivalent to either `unsigned int' or +`unsigned long int'. These types have identical properties on the GNU +system and, for most purposes, you can use them interchangeably. +However, they are distinct as data types, which makes a difference in +certain contexts. + + For example, when you specify the type of a function argument in a +function prototype, it makes a difference which one you use. If the +system header files declare `malloc' with an argument of type `size_t' +and you declare `malloc' with an argument of type `unsigned int', you +will get a compilation error if `size_t' happens to be `unsigned long +int' on your system. To avoid any possibility of error, when a +function argument or value is supposed to have type `size_t', never +declare its type in any other way. + + *Compatibility Note:* Implementations of C before the advent of +ISO C generally used `unsigned int' for representing object sizes and +`int' for pointer subtraction results. They did not necessarily define +either `size_t' or `ptrdiff_t'. Unix systems did define `size_t', in +`sys/types.h', but the definition was usually a signed type. + + +File: libc.info, Node: Data Type Measurements, Prev: Important Data Types, Up: Language Features + +Data Type Measurements +====================== + + Most of the time, if you choose the proper C data type for each +object in your program, you need not be concerned with just how it is +represented or how many bits it uses. When you do need such +information, the C language itself does not provide a way to get it. +The header files `limits.h' and `float.h' contain macros which give you +this information in full detail. + +* Menu: + +* Width of Type:: How many bits does an integer type hold? +* Range of Type:: What are the largest and smallest values + that an integer type can hold? +* Floating Type Macros:: Parameters that measure the floating point types. +* Structure Measurement:: Getting measurements on structure types. + + +File: libc.info, Node: Width of Type, Next: Range of Type, Up: Data Type Measurements + +Computing the Width of an Integer Data Type +------------------------------------------- + + The most common reason that a program needs to know how many bits +are in an integer type is for using an array of `long int' as a bit +vector. You can access the bit at index N with + + vector[N / LONGBITS] & (1 << (N % LONGBITS)) + +provided you define `LONGBITS' as the number of bits in a `long int'. + + There is no operator in the C language that can give you the number +of bits in an integer data type. But you can compute it from the macro +`CHAR_BIT', defined in the header file `limits.h'. + +`CHAR_BIT' + This is the number of bits in a `char'--eight, on most systems. + The value has type `int'. + + You can compute the number of bits in any data type TYPE like this: + + sizeof (TYPE) * CHAR_BIT + + +File: libc.info, Node: Range of Type, Next: Floating Type Macros, Prev: Width of Type, Up: Data Type Measurements + +Range of an Integer Type +------------------------ + + Suppose you need to store an integer value which can range from zero +to one million. Which is the smallest type you can use? There is no +general rule; it depends on the C compiler and target machine. You can +use the `MIN' and `MAX' macros in `limits.h' to determine which type +will work. + + Each signed integer type has a pair of macros which give the smallest +and largest values that it can hold. Each unsigned integer type has one +such macro, for the maximum value; the minimum value is, of course, +zero. + + The values of these macros are all integer constant expressions. The +`MAX' and `MIN' macros for `char' and `short int' types have values of +type `int'. The `MAX' and `MIN' macros for the other types have values +of the same type described by the macro--thus, `ULONG_MAX' has type +`unsigned long int'. + +`SCHAR_MIN' + This is the minimum value that can be represented by a + `signed char'. + +`SCHAR_MAX' +`UCHAR_MAX' + These are the maximum values that can be represented by a + `signed char' and `unsigned char', respectively. + +`CHAR_MIN' + This is the minimum value that can be represented by a `char'. + It's equal to `SCHAR_MIN' if `char' is signed, or zero otherwise. + +`CHAR_MAX' + This is the maximum value that can be represented by a `char'. + It's equal to `SCHAR_MAX' if `char' is signed, or `UCHAR_MAX' + otherwise. + +`SHRT_MIN' + This is the minimum value that can be represented by a + `signed short int'. On most machines that the GNU C library runs + on, `short' integers are 16-bit quantities. + +`SHRT_MAX' +`USHRT_MAX' + These are the maximum values that can be represented by a + `signed short int' and `unsigned short int', respectively. + +`INT_MIN' + This is the minimum value that can be represented by a + `signed int'. On most machines that the GNU C system runs on, an + `int' is a 32-bit quantity. + +`INT_MAX' +`UINT_MAX' + These are the maximum values that can be represented by, + respectively, the type `signed int' and the type `unsigned int'. + +`LONG_MIN' + This is the minimum value that can be represented by a + `signed long int'. On most machines that the GNU C system runs + on, `long' integers are 32-bit quantities, the same size as `int'. + +`LONG_MAX' +`ULONG_MAX' + These are the maximum values that can be represented by a + `signed long int' and `unsigned long int', respectively. + +`LONG_LONG_MIN' + This is the minimum value that can be represented by a + `signed long long int'. On most machines that the GNU C system + runs on, `long long' integers are 64-bit quantities. + +`LONG_LONG_MAX' +`ULONG_LONG_MAX' + These are the maximum values that can be represented by a `signed + long long int' and `unsigned long long int', respectively. + +`WCHAR_MAX' + This is the maximum value that can be represented by a `wchar_t'. + *Note Extended Char Intro::. + + The header file `limits.h' also defines some additional constants +that parameterize various operating system and file system limits. +These constants are described in *Note System Configuration::. + + +File: libc.info, Node: Floating Type Macros, Next: Structure Measurement, Prev: Range of Type, Up: Data Type Measurements + +Floating Type Macros +-------------------- + + The specific representation of floating point numbers varies from +machine to machine. Because floating point numbers are represented +internally as approximate quantities, algorithms for manipulating +floating point data often need to take account of the precise details of +the machine's floating point representation. + + Some of the functions in the C library itself need this information; +for example, the algorithms for printing and reading floating point +numbers (*note I/O on Streams::) and for calculating trigonometric and +irrational functions (*note Mathematics::) use it to avoid round-off +error and loss of accuracy. User programs that implement numerical +analysis techniques also often need this information in order to +minimize or compute error bounds. + + The header file `float.h' describes the format used by your machine. + +* Menu: + +* Floating Point Concepts:: Definitions of terminology. +* Floating Point Parameters:: Details of specific macros. +* IEEE Floating Point:: The measurements for one common + representation. diff -durpN glibc-2.2.4/manual/libc.info-52 glibc-2.2.5/manual/libc.info-52 --- glibc-2.2.4/manual/libc.info-52 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-52 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,6971 +33,324 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Library Summary, Next: Installation, Prev: Language Features, Up: Top - -Summary of Library Facilities -***************************** - - This appendix is a complete list of the facilities declared within -the header files supplied with the GNU C library. Each entry also -lists the standard or other source from which each facility is derived, -and tells you where in the manual you can find more information about -how to use it. - -`long int a64l (const char *STRING)' - `stdlib.h' (XPG): *Note Encode Binary Data::. - -`void abort (void)' - `stdlib.h' (ISO): *Note Aborting a Program::. - -`int abs (int NUMBER)' - `stdlib.h' (ISO): *Note Absolute Value::. - -`int accept (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH_PTR)' - `sys/socket.h' (BSD): *Note Accepting Connections::. - -`int access (const char *FILENAME, int HOW)' - `unistd.h' (POSIX.1): *Note Testing File Access::. - -`ACCOUNTING' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`double acos (double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`float acosf (float X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`double acosh (double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`float acoshf (float X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double acoshl (long double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double acosl (long double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`int addmntent (FILE *STREAM, const struct mntent *MNT)' - `mntent.h' (BSD): *Note mtab::. - -`int adjtime (const struct timeval *DELTA, struct timeval *OLDDELTA)' - `sys/time.h' (BSD): *Note High-Resolution Calendar::. - -`int adjtimex (struct timex *TIMEX)' - `sys/timex.h' (GNU): *Note High-Resolution Calendar::. - -`AF_FILE' - `sys/socket.h' (GNU): *Note Address Formats::. - -`AF_INET' - `sys/socket.h' (BSD): *Note Address Formats::. - -`AF_INET6' - `sys/socket.h' (IPv6 Basic API): *Note Address Formats::. - -`AF_LOCAL' - `sys/socket.h' (POSIX): *Note Address Formats::. - -`AF_UNIX' - `sys/socket.h' (BSD, Unix98): *Note Address Formats::. - -`AF_UNSPEC' - `sys/socket.h' (BSD): *Note Address Formats::. - -`int aio_cancel (int FILDES, struct aiocb *AIOCBP)' - `aio.h' (POSIX.1b): *Note Cancel AIO Operations::. - -`int aio_cancel64 (int FILDES, struct aiocb64 *AIOCBP)' - `aio.h' (Unix98): *Note Cancel AIO Operations::. - -`int aio_error (const struct aiocb *AIOCBP)' - `aio.h' (POSIX.1b): *Note Status of AIO Operations::. - -`int aio_error64 (const struct aiocb64 *AIOCBP)' - `aio.h' (Unix98): *Note Status of AIO Operations::. - -`int aio_fsync (int OP, struct aiocb *AIOCBP)' - `aio.h' (POSIX.1b): *Note Synchronizing AIO Operations::. - -`int aio_fsync64 (int OP, struct aiocb64 *AIOCBP)' - `aio.h' (Unix98): *Note Synchronizing AIO Operations::. - -`void aio_init (const struct aioinit *INIT)' - `aio.h' (GNU): *Note Configuration of AIO::. - -`int aio_read (struct aiocb *AIOCBP)' - `aio.h' (POSIX.1b): *Note Asynchronous Reads/Writes::. - -`int aio_read64 (struct aiocb *AIOCBP)' - `aio.h' (Unix98): *Note Asynchronous Reads/Writes::. - -`ssize_t aio_return (const struct aiocb *AIOCBP)' - `aio.h' (POSIX.1b): *Note Status of AIO Operations::. - -`int aio_return64 (const struct aiocb64 *AIOCBP)' - `aio.h' (Unix98): *Note Status of AIO Operations::. - -`int aio_suspend (const struct aiocb *const LIST[], int NENT, const struct timespec *TIMEOUT)' - `aio.h' (POSIX.1b): *Note Synchronizing AIO Operations::. - -`int aio_suspend64 (const struct aiocb64 *const LIST[], int NENT, const struct timespec *TIMEOUT)' - `aio.h' (Unix98): *Note Synchronizing AIO Operations::. - -`int aio_write (struct aiocb *AIOCBP)' - `aio.h' (POSIX.1b): *Note Asynchronous Reads/Writes::. - -`int aio_write64 (struct aiocb *AIOCBP)' - `aio.h' (Unix98): *Note Asynchronous Reads/Writes::. - -`unsigned int alarm (unsigned int SECONDS)' - `unistd.h' (POSIX.1): *Note Setting an Alarm::. - -`void * alloca (size_t SIZE);' - `stdlib.h' (GNU, BSD): *Note Variable Size Automatic::. - -`int alphasort (const void *A, const void *B)' - `dirent.h' (BSD/SVID): *Note Scanning Directory Content::. - -`int alphasort64 (const void *A, const void *B)' - `dirent.h' (GNU): *Note Scanning Directory Content::. - -`tcflag_t ALTWERASE' - `termios.h' (BSD): *Note Local Modes::. - -`int ARG_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`error_t argp_err_exit_status' - `argp.h' (GNU): *Note Argp Global Variables::. - -`void argp_error (const struct argp_state *STATE, const char *FMT, ...)' - `argp.h' (GNU): *Note Argp Helper Functions::. - -`int ARGP_ERR_UNKNOWN' - `argp.h' (GNU): *Note Argp Parser Functions::. - -`void argp_failure (const struct argp_state *STATE, int STATUS, int ERRNUM, const char *FMT, ...)' - `argp.h' (GNU): *Note Argp Helper Functions::. - -`void argp_help (const struct argp *ARGP, FILE *STREAM, unsigned FLAGS, char *NAME)' - `argp.h' (GNU): *Note Argp Help::. - -`ARGP_IN_ORDER' - `argp.h' (GNU): *Note Argp Flags::. - -`ARGP_KEY_ARG' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_ARGS' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_END' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_ERROR' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_FINI' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_HELP_ARGS_DOC' - `argp.h' (GNU): *Note Argp Help Filter Keys::. - -`ARGP_KEY_HELP_DUP_ARGS_NOTE' - `argp.h' (GNU): *Note Argp Help Filter Keys::. - -`ARGP_KEY_HELP_EXTRA' - `argp.h' (GNU): *Note Argp Help Filter Keys::. - -`ARGP_KEY_HELP_HEADER' - `argp.h' (GNU): *Note Argp Help Filter Keys::. - -`ARGP_KEY_HELP_POST_DOC' - `argp.h' (GNU): *Note Argp Help Filter Keys::. - -`ARGP_KEY_HELP_PRE_DOC' - `argp.h' (GNU): *Note Argp Help Filter Keys::. - -`ARGP_KEY_INIT' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_NO_ARGS' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_KEY_SUCCESS' - `argp.h' (GNU): *Note Argp Special Keys::. - -`ARGP_LONG_ONLY' - `argp.h' (GNU): *Note Argp Flags::. - -`ARGP_NO_ARGS' - `argp.h' (GNU): *Note Argp Flags::. - -`ARGP_NO_ERRS' - `argp.h' (GNU): *Note Argp Flags::. - -`ARGP_NO_EXIT' - `argp.h' (GNU): *Note Argp Flags::. - -`ARGP_NO_HELP' - `argp.h' (GNU): *Note Argp Flags::. - -`error_t argp_parse (const struct argp *ARGP, int ARGC, char **ARGV, unsigned FLAGS, int *ARG_INDEX, void *INPUT)' - `argp.h' (GNU): *Note Suboptions: Argp. - -`ARGP_PARSE_ARGV0' - `argp.h' (GNU): *Note Argp Flags::. - -`const char * argp_program_bug_address' - `argp.h' (GNU): *Note Argp Global Variables::. - -`const char * argp_program_version' - `argp.h' (GNU): *Note Argp Global Variables::. - -`argp_program_version_hook' - `argp.h' (GNU): *Note Argp Global Variables::. - -`ARGP_SILENT' - `argp.h' (GNU): *Note Argp Flags::. - -`void argp_state_help (const struct argp_state *STATE, FILE *STREAM, unsigned FLAGS)' - `argp.h' (GNU): *Note Argp Helper Functions::. - -`void argp_usage (const struct argp_state *STATE)' - `argp.h' (GNU): *Note Argp Helper Functions::. - -`error_t argz_add (char **ARGZ, size_t *ARGZ_LEN, const char *STR)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_add_sep (char **ARGZ, size_t *ARGZ_LEN, const char *STR, int DELIM)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_append (char **ARGZ, size_t *ARGZ_LEN, const char *BUF, size_t BUF_LEN)' - `argz.h' (GNU): *Note Argz Functions::. - -`size_t argz_count (const char *ARGZ, size_t ARG_LEN)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_create (char *const ARGV[], char **ARGZ, size_t *ARGZ_LEN)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_create_sep (const char *STRING, int SEP, char **ARGZ, size_t *ARGZ_LEN)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_delete (char **ARGZ, size_t *ARGZ_LEN, char *ENTRY)' - `argz.h' (GNU): *Note Argz Functions::. - -`void argz_extract (char *ARGZ, size_t ARGZ_LEN, char **ARGV)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_insert (char **ARGZ, size_t *ARGZ_LEN, char *BEFORE, const char *ENTRY)' - `argz.h' (GNU): *Note Argz Functions::. - -`char * argz_next (char *ARGZ, size_t ARGZ_LEN, const char *ENTRY)' - `argz.h' (GNU): *Note Argz Functions::. - -`error_t argz_replace (char **ARGZ, size_t *ARGZ_LEN, const char *STR, const char *WITH, unsigned *REPLACE_COUNT)' - `argz.h' (GNU): *Note Argz Functions::. - -`void argz_stringify (char *ARGZ, size_t LEN, int SEP)' - `argz.h' (GNU): *Note Argz Functions::. - -`char * asctime (const struct tm *BROKENTIME)' - `time.h' (ISO): *Note Formatting Calendar Time::. - -`char * asctime_r (const struct tm *BROKENTIME, char *BUFFER)' - `time.h' (POSIX.1c): *Note Formatting Calendar Time::. - -`double asin (double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`float asinf (float X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`double asinh (double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`float asinhf (float X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double asinhl (long double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double asinl (long double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`int asprintf (char **PTR, const char *TEMPLATE, ...)' - `stdio.h' (GNU): *Note Dynamic Output::. - -`void assert (int EXPRESSION)' - `assert.h' (ISO): *Note Consistency Checking::. - -`void assert_perror (int ERRNUM)' - `assert.h' (GNU): *Note Consistency Checking::. - -`double atan (double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`double atan2 (double Y, double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`float atan2f (float Y, float X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`long double atan2l (long double Y, long double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`float atanf (float X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`double atanh (double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`float atanhf (float X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double atanhl (long double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double atanl (long double X)' - `math.h' (ISO): *Note Inverse Trig Functions::. - -`int atexit (void (*FUNCTION) (void))' - `stdlib.h' (ISO): *Note Cleanups on Exit::. - -`double atof (const char *STRING)' - `stdlib.h' (ISO): *Note Parsing of Floats::. - -`int atoi (const char *STRING)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`long int atol (const char *STRING)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`long long int atoll (const char *STRING)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`B0' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B110' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B115200' - `termios.h' (GNU): *Note Line Speed::. - -`B1200' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B134' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B150' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B1800' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B19200' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B200' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B230400' - `termios.h' (GNU): *Note Line Speed::. - -`B2400' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B300' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B38400' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B460800' - `termios.h' (GNU): *Note Line Speed::. - -`B4800' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B50' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B57600' - `termios.h' (GNU): *Note Line Speed::. - -`B600' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B75' - `termios.h' (POSIX.1): *Note Line Speed::. - -`B9600' - `termios.h' (POSIX.1): *Note Line Speed::. - -`int backtrace (void **BUFFER, int SIZE)' - `execinfo.h' (GNU): *Note Backtraces::. - -`char ** backtrace_symbols (void *const *BUFFER, int SIZE)' - `execinfo.h' (GNU): *Note Backtraces::. - -`void backtrace_symbols_fd (void *const *BUFFER, int SIZE, int FD)' - `execinfo.h' (GNU): *Note Backtraces::. - -`char * basename (char *PATH)' - `libgen.h' (XPG): *Note Finding Tokens in a String::. - -`char * basename (const char *FILENAME)' - `string.h' (GNU): *Note Finding Tokens in a String::. - -`int BC_BASE_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`int BC_DIM_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`int bcmp (const void *A1, const void *A2, size_t SIZE)' - `string.h' (BSD): *Note String/Array Comparison::. - -`void bcopy (const void *FROM, void *TO, size_t SIZE)' - `string.h' (BSD): *Note Copying and Concatenation::. - -`int BC_SCALE_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`int BC_STRING_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`int bind (int SOCKET, struct sockaddr *ADDR, socklen_t LENGTH)' - `sys/socket.h' (BSD): *Note Setting Address::. - -`char * bindtextdomain (const char *DOMAINNAME, const char *DIRNAME)' - `libintl.h' (GNU): *Note Locating gettext catalog::. - -`char * bind_textdomain_codeset (const char *DOMAINNAME, const char *CODESET)' - `libintl.h' (GNU): *Note Charset conversion in gettext::. - -`blkcnt64_t' - `sys/types.h' (Unix98): *Note Attribute Meanings::. - -`blkcnt_t' - `sys/types.h' (Unix98): *Note Attribute Meanings::. - -`BOOT_TIME' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`BOOT_TIME' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int brk (void *ADDR)' - `unistd.h' (BSD): *Note Resizing the Data Segment::. - -`tcflag_t BRKINT' - `termios.h' (POSIX.1): *Note Input Modes::. - -`_BSD_SOURCE' - (GNU): *Note Feature Test Macros::. - -`void * bsearch (const void *KEY, const void *ARRAY, size_t COUNT, size_t SIZE, comparison_fn_t COMPARE)' - `stdlib.h' (ISO): *Note Array Search Function::. - -`wint_t btowc (int C)' - `wchar.h' (ISO): *Note Converting a Character::. - -`int BUFSIZ' - `stdio.h' (ISO): *Note Controlling Buffering::. - -`void bzero (void *BLOCK, size_t SIZE)' - `string.h' (BSD): *Note Copying and Concatenation::. - -`double cabs (complex double Z)' - `complex.h' (ISO): *Note Absolute Value::. - -`float cabsf (complex float Z)' - `complex.h' (ISO): *Note Absolute Value::. - -`long double cabsl (complex long double Z)' - `complex.h' (ISO): *Note Absolute Value::. - -`complex double cacos (complex double Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex float cacosf (complex float Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex double cacosh (complex double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex float cacoshf (complex float Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double cacoshl (complex long double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double cacosl (complex long double Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`void * calloc (size_t COUNT, size_t ELTSIZE)' - `malloc.h', `stdlib.h' (ISO): *Note Allocating Cleared Space::. - -`char * canonicalize_file_name (const char *NAME)' - `stdlib.h' (GNU): *Note Symbolic Links::. - -`double carg (complex double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`float cargf (complex float Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`long double cargl (complex long double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`complex double casin (complex double Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex float casinf (complex float Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex double casinh (complex double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex float casinhf (complex float Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double casinhl (complex long double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double casinl (complex long double Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex double catan (complex double Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex float catanf (complex float Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`complex double catanh (complex double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex float catanhf (complex float Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double catanhl (complex long double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double catanl (complex long double Z)' - `complex.h' (ISO): *Note Inverse Trig Functions::. - -`nl_catd catopen (const char *CAT_NAME, int FLAG)' - `nl_types.h' (X/Open): *Note The catgets Functions::. - -`int cbc_crypt (char *KEY, char *BLOCKS, unsigned LEN, unsigned MODE, char *IVEC)' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`double cbrt (double X)' - `math.h' (BSD): *Note Exponents and Logarithms::. - -`float cbrtf (float X)' - `math.h' (BSD): *Note Exponents and Logarithms::. - -`long double cbrtl (long double X)' - `math.h' (BSD): *Note Exponents and Logarithms::. - -`complex double ccos (complex double Z)' - `complex.h' (ISO): *Note Trig Functions::. - -`complex float ccosf (complex float Z)' - `complex.h' (ISO): *Note Trig Functions::. - -`complex double ccosh (complex double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex float ccoshf (complex float Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double ccoshl (complex long double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. - -`complex long double ccosl (complex long double Z)' - `complex.h' (ISO): *Note Trig Functions::. - -`cc_t' - `termios.h' (POSIX.1): *Note Mode Data Types::. - -`tcflag_t CCTS_OFLOW' - `termios.h' (BSD): *Note Control Modes::. - -`double ceil (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`float ceilf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long double ceill (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`complex double cexp (complex double Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex float cexpf (complex float Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex long double cexpl (complex long double Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`speed_t cfgetispeed (const struct termios *TERMIOS-P)' - `termios.h' (POSIX.1): *Note Line Speed::. - -`speed_t cfgetospeed (const struct termios *TERMIOS-P)' - `termios.h' (POSIX.1): *Note Line Speed::. - -`int cfmakeraw (struct termios *TERMIOS-P)' - `termios.h' (BSD): *Note Noncanonical Input::. - -`void cfree (void *PTR)' - `stdlib.h' (Sun): *Note Freeing after Malloc::. - -`int cfsetispeed (struct termios *TERMIOS-P, speed_t SPEED)' - `termios.h' (POSIX.1): *Note Line Speed::. - -`int cfsetospeed (struct termios *TERMIOS-P, speed_t SPEED)' - `termios.h' (POSIX.1): *Note Line Speed::. - -`int cfsetspeed (struct termios *TERMIOS-P, speed_t SPEED)' - `termios.h' (BSD): *Note Line Speed::. - -`CHAR_BIT' - `limits.h' (ISO): *Note Width of Type::. - -`CHAR_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`CHAR_MIN' - `limits.h' (ISO): *Note Range of Type::. - -`int chdir (const char *FILENAME)' - `unistd.h' (POSIX.1): *Note Working Directory::. - -`int CHILD_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`int chmod (const char *FILENAME, mode_t MODE)' - `sys/stat.h' (POSIX.1): *Note Setting Permissions::. - -`int chown (const char *FILENAME, uid_t OWNER, gid_t GROUP)' - `unistd.h' (POSIX.1): *Note File Owner::. - -`tcflag_t CIGNORE' - `termios.h' (BSD): *Note Control Modes::. - -`double cimag (complex double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`float cimagf (complex float Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`long double cimagl (complex long double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`int clearenv (void)' - `stdlib.h' (GNU): *Note Environment Access::. - -`void clearerr (FILE *STREAM)' - `stdio.h' (ISO): *Note Error Recovery::. - -`void clearerr_unlocked (FILE *STREAM)' - `stdio.h' (GNU): *Note Error Recovery::. - -`int CLK_TCK' - `time.h' (POSIX.1): *Note CPU Time::. - -`tcflag_t CLOCAL' - `termios.h' (POSIX.1): *Note Control Modes::. - -`clock_t clock (void)' - `time.h' (ISO): *Note CPU Time::. - -`int CLOCKS_PER_SEC' - `time.h' (ISO): *Note CPU Time::. - -`clock_t' - `time.h' (ISO): *Note CPU Time::. - -`complex double clog (complex double Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex double clog10 (complex double Z)' - `complex.h' (GNU): *Note Exponents and Logarithms::. - -`complex float clog10f (complex float Z)' - `complex.h' (GNU): *Note Exponents and Logarithms::. - -`complex long double clog10l (complex long double Z)' - `complex.h' (GNU): *Note Exponents and Logarithms::. - -`complex float clogf (complex float Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex long double clogl (complex long double Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`int close (int FILEDES)' - `unistd.h' (POSIX.1): *Note Opening and Closing Files::. - -`int closedir (DIR *DIRSTREAM)' - `dirent.h' (POSIX.1): *Note Reading/Closing Directory::. - -`void closelog (void)' - `syslog.h' (BSD): *Note closelog::. - -`int COLL_WEIGHTS_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`size_t confstr (int PARAMETER, char *BUF, size_t LEN)' - `unistd.h' (POSIX.2): *Note String Parameters::. - -`complex double conj (complex double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`complex float conjf (complex float Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`complex long double conjl (complex long double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`int connect (int SOCKET, struct sockaddr *ADDR, socklen_t LENGTH)' - `sys/socket.h' (BSD): *Note Connecting::. - -`cookie_close_function' - `stdio.h' (GNU): *Note Hook Functions::. - -`cookie_io_functions_t' - `stdio.h' (GNU): *Note Streams and Cookies::. - -`cookie_read_function' - `stdio.h' (GNU): *Note Hook Functions::. - -`cookie_seek_function' - `stdio.h' (GNU): *Note Hook Functions::. - -`cookie_write_function' - `stdio.h' (GNU): *Note Hook Functions::. - -`double copysign (double X, double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`float copysignf (float X, float Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`long double copysignl (long double X, long double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`double cos (double X)' - `math.h' (ISO): *Note Trig Functions::. - -`float cosf (float X)' - `math.h' (ISO): *Note Trig Functions::. - -`double cosh (double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`float coshf (float X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double coshl (long double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double cosl (long double X)' - `math.h' (ISO): *Note Trig Functions::. - -`complex double cpow (complex double BASE, complex double POWER)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex float cpowf (complex float BASE, complex float POWER)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex long double cpowl (complex long double BASE, complex long double POWER)' - `complex.h' (ISO): *Note Exponents and Logarithms::. - -`complex double cproj (complex double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`complex float cprojf (complex float Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`complex long double cprojl (complex long double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`tcflag_t CREAD' - `termios.h' (POSIX.1): *Note Control Modes::. - -`double creal (complex double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`float crealf (complex float Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`long double creall (complex long double Z)' - `complex.h' (ISO): *Note Operations on Complex::. - -`int creat (const char *FILENAME, mode_t MODE)' - `fcntl.h' (POSIX.1): *Note Opening and Closing Files::. - -`int creat64 (const char *FILENAME, mode_t MODE)' - `fcntl.h' (Unix98): *Note Opening and Closing Files::. - -`tcflag_t CRTS_IFLOW' - `termios.h' (BSD): *Note Control Modes::. - -`char * crypt (const char *KEY, const char *SALT)' - `crypt.h' (BSD, SVID): *Note crypt::. - -`char * crypt_r (const char *KEY, const char *SALT, struct crypt_data * DATA)' - `crypt.h' (GNU): *Note crypt::. - -`tcflag_t CS5' - `termios.h' (POSIX.1): *Note Control Modes::. +File: libc.info, Node: Floating Point Concepts, Next: Floating Point Parameters, Up: Floating Type Macros -`tcflag_t CS6' - `termios.h' (POSIX.1): *Note Control Modes::. +Floating Point Representation Concepts +...................................... -`tcflag_t CS7' - `termios.h' (POSIX.1): *Note Control Modes::. + This section introduces the terminology for describing floating point +representations. -`tcflag_t CS8' - `termios.h' (POSIX.1): *Note Control Modes::. + You are probably already familiar with most of these concepts in +terms of scientific or exponential notation for floating point numbers. +For example, the number `123456.0' could be expressed in exponential +notation as `1.23456e+05', a shorthand notation indicating that the +mantissa `1.23456' is multiplied by the base `10' raised to power `5'. -`complex double csin (complex double Z)' - `complex.h' (ISO): *Note Trig Functions::. + More formally, the internal representation of a floating point number +can be characterized in terms of the following parameters: -`complex float csinf (complex float Z)' - `complex.h' (ISO): *Note Trig Functions::. + * The "sign" is either `-1' or `1'. -`complex double csinh (complex double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. + * The "base" or "radix" for exponentiation, an integer greater than + `1'. This is a constant for a particular representation. -`complex float csinhf (complex float Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. + * The "exponent" to which the base is raised. The upper and lower + bounds of the exponent value are constants for a particular + representation. -`complex long double csinhl (complex long double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. + Sometimes, in the actual bits representing the floating point + number, the exponent is "biased" by adding a constant to it, to + make it always be represented as an unsigned quantity. This is + only important if you have some reason to pick apart the bit + fields making up the floating point number by hand, which is + something for which the GNU library provides no support. So this + is ignored in the discussion that follows. -`complex long double csinl (complex long double Z)' - `complex.h' (ISO): *Note Trig Functions::. + * The "mantissa" or "significand" is an unsigned integer which is a + part of each floating point number. -`tcflag_t CSIZE' - `termios.h' (POSIX.1): *Note Control Modes::. + * The "precision" of the mantissa. If the base of the representation + is B, then the precision is the number of base-B digits in the + mantissa. This is a constant for a particular representation. -`_CS_LFS64_CFLAGS' - `unistd.h' (Unix98): *Note String Parameters::. + Many floating point representations have an implicit "hidden bit" + in the mantissa. This is a bit which is present virtually in the + mantissa, but not stored in memory because its value is always 1 + in a normalized number. The precision figure (see above) includes + any hidden bits. -`_CS_LFS64_LDFLAGS' - `unistd.h' (Unix98): *Note String Parameters::. + Again, the GNU library provides no facilities for dealing with such + low-level aspects of the representation. -`_CS_LFS64_LIBS' - `unistd.h' (Unix98): *Note String Parameters::. + The mantissa of a floating point number represents an implicit +fraction whose denominator is the base raised to the power of the +precision. Since the largest representable mantissa is one less than +this denominator, the value of the fraction is always strictly less +than `1'. The mathematical value of a floating point number is then +the product of this fraction, the sign, and the base raised to the +exponent. -`_CS_LFS64_LINTFLAGS' - `unistd.h' (Unix98): *Note String Parameters::. + We say that the floating point number is "normalized" if the +fraction is at least `1/B', where B is the base. In other words, the +mantissa would be too large to fit if it were multiplied by the base. +Non-normalized numbers are sometimes called "denormal"; they contain +less precision than the representation normally can hold. -`_CS_LFS_CFLAGS' - `unistd.h' (Unix98): *Note String Parameters::. + If the number is not normalized, then you can subtract `1' from the +exponent while multiplying the mantissa by the base, and get another +floating point number with the same value. "Normalization" consists of +doing this repeatedly until the number is normalized. Two distinct +normalized floating point numbers cannot be equal in value. -`_CS_LFS_LDFLAGS' - `unistd.h' (Unix98): *Note String Parameters::. + (There is an exception to this rule: if the mantissa is zero, it is +considered normalized. Another exception happens on certain machines +where the exponent is as small as the representation can hold. Then it +is impossible to subtract `1' from the exponent, so a number may be +normalized even if its fraction is less than `1/B'.) -`_CS_LFS_LIBS' - `unistd.h' (Unix98): *Note String Parameters::. + +File: libc.info, Node: Floating Point Parameters, Next: IEEE Floating Point, Prev: Floating Point Concepts, Up: Floating Type Macros -`_CS_LFS_LINTFLAGS' - `unistd.h' (Unix98): *Note String Parameters::. +Floating Point Parameters +......................... -`_CS_PATH' - `unistd.h' (POSIX.2): *Note String Parameters::. + These macro definitions can be accessed by including the header file +`float.h' in your program. -`complex double csqrt (complex double Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. + Macro names starting with `FLT_' refer to the `float' type, while +names beginning with `DBL_' refer to the `double' type and names +beginning with `LDBL_' refer to the `long double' type. (If GCC does +not support `long double' as a distinct data type on a target machine +then the values for the `LDBL_' constants are equal to the +corresponding constants for the `double' type.) -`complex float csqrtf (complex float Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. + Of these macros, only `FLT_RADIX' is guaranteed to be a constant +expression. The other macros listed here cannot be reliably used in +places that require constant expressions, such as `#if' preprocessing +directives or in the dimensions of static arrays. -`complex long double csqrtl (complex long double Z)' - `complex.h' (ISO): *Note Exponents and Logarithms::. + Although the ISO C standard specifies minimum and maximum values for +most of these parameters, the GNU C implementation uses whatever values +describe the floating point representation of the target machine. So in +principle GNU C actually satisfies the ISO C requirements only if the +target machine is suitable. In practice, all the machines currently +supported are suitable. -`tcflag_t CSTOPB' - `termios.h' (POSIX.1): *Note Control Modes::. +`FLT_ROUNDS' + This value characterizes the rounding mode for floating point + addition. The following values indicate standard rounding modes: -`complex double ctan (complex double Z)' - `complex.h' (ISO): *Note Trig Functions::. + `-1' + The mode is indeterminable. -`complex float ctanf (complex float Z)' - `complex.h' (ISO): *Note Trig Functions::. + `0' + Rounding is towards zero. -`complex double ctanh (complex double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. + `1' + Rounding is to the nearest number. -`complex float ctanhf (complex float Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. + `2' + Rounding is towards positive infinity. -`complex long double ctanhl (complex long double Z)' - `complex.h' (ISO): *Note Hyperbolic Functions::. + `3' + Rounding is towards negative infinity. -`complex long double ctanl (complex long double Z)' - `complex.h' (ISO): *Note Trig Functions::. + Any other value represents a machine-dependent nonstandard rounding + mode. -`char * ctermid (char *STRING)' - `stdio.h' (POSIX.1): *Note Identifying the Terminal::. + On most machines, the value is `1', in accordance with the IEEE + standard for floating point. -`char * ctime (const time_t *TIME)' - `time.h' (ISO): *Note Formatting Calendar Time::. + Here is a table showing how certain values round for each possible + value of `FLT_ROUNDS', if the other aspects of the representation + match the IEEE single-precision standard. -`char * ctime_r (const time_t *TIME, char *BUFFER)' - `time.h' (POSIX.1c): *Note Formatting Calendar Time::. + 0 1 2 3 + 1.00000003 1.0 1.0 1.00000012 1.0 + 1.00000007 1.0 1.00000012 1.00000012 1.0 + -1.00000003 -1.0 -1.0 -1.0 -1.00000012 + -1.00000007 -1.0 -1.00000012 -1.0 -1.00000012 -`char * cuserid (char *STRING)' - `stdio.h' (POSIX.1): *Note Who Logged In::. +`FLT_RADIX' + This is the value of the base, or radix, of the exponent + representation. This is guaranteed to be a constant expression, + unlike the other macros described in this section. The value is 2 + on all machines we know of except the IBM 360 and derivatives. -`int daylight' - `time.h' (SVID): *Note Time Zone Functions::. +`FLT_MANT_DIG' + This is the number of base-`FLT_RADIX' digits in the floating point + mantissa for the `float' data type. The following expression + yields `1.0' (even though mathematically it should not) due to the + limited number of mantissa digits: -`DBL_DIG' - `float.h' (ISO): *Note Floating Point Parameters::. + float radix = FLT_RADIX; + + 1.0f + 1.0f / radix / radix / ... / radix -`DBL_EPSILON' - `float.h' (ISO): *Note Floating Point Parameters::. + where `radix' appears `FLT_MANT_DIG' times. `DBL_MANT_DIG' - `float.h' (ISO): *Note Floating Point Parameters::. - -`DBL_MAX' - `float.h' (ISO): *Note Floating Point Parameters::. +`LDBL_MANT_DIG' + This is the number of base-`FLT_RADIX' digits in the floating point + mantissa for the data types `double' and `long double', + respectively. -`DBL_MAX_10_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. +`FLT_DIG' + This is the number of decimal digits of precision for the `float' + data type. Technically, if P and B are the precision and base + (respectively) for the representation, then the decimal precision + Q is the maximum number of decimal digits such that any floating + point number with Q base 10 digits can be rounded to a floating + point number with P base B digits and back again, without change + to the Q decimal digits. -`DBL_MAX_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. + The value of this macro is supposed to be at least `6', to satisfy + ISO C. -`DBL_MIN' - `float.h' (ISO): *Note Floating Point Parameters::. +`DBL_DIG' +`LDBL_DIG' + These are similar to `FLT_DIG', but for the data types `double' + and `long double', respectively. The values of these macros are + supposed to be at least `10'. -`DBL_MIN_10_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. +`FLT_MIN_EXP' + This is the smallest possible exponent value for type `float'. + More precisely, is the minimum negative integer such that the value + `FLT_RADIX' raised to this power minus 1 can be represented as a + normalized floating point number of type `float'. `DBL_MIN_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. - -`char * dcgettext (const char *DOMAINNAME, const char *MSGID, int CATEGORY)' - `libintl.h' (GNU): *Note Translation with gettext::. - -`char * dcngettext (const char *DOMAIN, const char *MSGID1, const char *MSGID2, unsigned long int N, int CATEGORY)' - `libintl.h' (GNU): *Note Advanced gettext functions::. - -`DEAD_PROCESS' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`DEAD_PROCESS' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`DES_DECRYPT' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DES_ENCRYPT' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DESERR_BADPARAM' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DESERR_HWERROR' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DESERR_NOHWDEVICE' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DESERR_NONE' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`int DES_FAILED (int ERR)' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DES_HW' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`void des_setparity (char *KEY)' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`DES_SW' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`dev_t' - `sys/types.h' (POSIX.1): *Note Attribute Meanings::. - -`char * dgettext (const char *DOMAINNAME, const char *MSGID)' - `libintl.h' (GNU): *Note Translation with gettext::. - -`double difftime (time_t TIME1, time_t TIME0)' - `time.h' (ISO): *Note Elapsed Time::. - -`DIR' - `dirent.h' (POSIX.1): *Note Opening a Directory::. - -`int dirfd (DIR *DIRSTREAM)' - `dirent.h' (GNU): *Note Opening a Directory::. - -`char * dirname (char *PATH)' - `libgen.h' (XPG): *Note Finding Tokens in a String::. - -`div_t div (int NUMERATOR, int DENOMINATOR)' - `stdlib.h' (ISO): *Note Integer Division::. - -`div_t' - `stdlib.h' (ISO): *Note Integer Division::. - -`char * dngettext (const char *DOMAIN, const char *MSGID1, const char *MSGID2, unsigned long int N)' - `libintl.h' (GNU): *Note Advanced gettext functions::. - -`double drand48 (void)' - `stdlib.h' (SVID): *Note SVID Random::. - -`int drand48_r (struct drand48_data *BUFFER, double *RESULT)' - `stdlib.h' (GNU): *Note SVID Random::. - -`double drem (double NUMERATOR, double DENOMINATOR)' - `math.h' (BSD): *Note Remainder Functions::. - -`float dremf (float NUMERATOR, float DENOMINATOR)' - `math.h' (BSD): *Note Remainder Functions::. - -`long double dreml (long double NUMERATOR, long double DENOMINATOR)' - `math.h' (BSD): *Note Remainder Functions::. - -`mode_t DTTOIF (int DTYPE)' - `dirent.h' (BSD): *Note Directory Entries::. - -`int dup (int OLD)' - `unistd.h' (POSIX.1): *Note Duplicating Descriptors::. - -`int dup2 (int OLD, int NEW)' - `unistd.h' (POSIX.1): *Note Duplicating Descriptors::. - -`int E2BIG' - `errno.h' (POSIX.1: Argument list too long): *Note Error Codes::. - -`int EACCES' - `errno.h' (POSIX.1: Permission denied): *Note Error Codes::. - -`int EADDRINUSE' - `errno.h' (BSD: Address already in use): *Note Error Codes::. - -`int EADDRNOTAVAIL' - `errno.h' (BSD: Cannot assign requested address): *Note Error - Codes::. - -`int EADV' - `errno.h' (Linux???: Advertise error): *Note Error Codes::. - -`int EAFNOSUPPORT' - `errno.h' (BSD: Address family not supported by protocol): *Note - Error Codes::. - -`int EAGAIN' - `errno.h' (POSIX.1: Resource temporarily unavailable): *Note - Error Codes::. - -`int EALREADY' - `errno.h' (BSD: Operation already in progress): *Note Error - Codes::. - -`int EAUTH' - `errno.h' (BSD: Authentication error): *Note Error Codes::. - -`int EBACKGROUND' - `errno.h' (GNU: Inappropriate operation for background process): - *Note Error Codes::. - -`int EBADE' - `errno.h' (Linux???: Invalid exchange): *Note Error Codes::. - -`int EBADF' - `errno.h' (POSIX.1: Bad file descriptor): *Note Error Codes::. - -`int EBADFD' - `errno.h' (Linux???: File descriptor in bad state): *Note Error - Codes::. - -`int EBADMSG' - `errno.h' (XOPEN: Bad message): *Note Error Codes::. - -`int EBADR' - `errno.h' (Linux???: Invalid request descriptor): *Note Error - Codes::. - -`int EBADRPC' - `errno.h' (BSD: RPC struct is bad): *Note Error Codes::. - -`int EBADRQC' - `errno.h' (Linux???: Invalid request code): *Note Error Codes::. - -`int EBADSLT' - `errno.h' (Linux???: Invalid slot): *Note Error Codes::. - -`int EBFONT' - `errno.h' (Linux???: Bad font file format): *Note Error Codes::. - -`int EBUSY' - `errno.h' (POSIX.1: Device or resource busy): *Note Error Codes::. - -`int ecb_crypt (char *KEY, char *BLOCKS, unsigned LEN, unsigned MODE)' - `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. - -`int ECHILD' - `errno.h' (POSIX.1: No child processes): *Note Error Codes::. - -`tcflag_t ECHO' - `termios.h' (POSIX.1): *Note Local Modes::. - -`tcflag_t ECHOCTL' - `termios.h' (BSD): *Note Local Modes::. - -`tcflag_t ECHOE' - `termios.h' (POSIX.1): *Note Local Modes::. - -`tcflag_t ECHOK' - `termios.h' (POSIX.1): *Note Local Modes::. - -`tcflag_t ECHOKE' - `termios.h' (BSD): *Note Local Modes::. - -`tcflag_t ECHONL' - `termios.h' (POSIX.1): *Note Local Modes::. - -`tcflag_t ECHOPRT' - `termios.h' (BSD): *Note Local Modes::. - -`int ECHRNG' - `errno.h' (Linux???: Channel number out of range): *Note Error - Codes::. - -`int ECOMM' - `errno.h' (Linux???: Communication error on send): *Note Error - Codes::. - -`int ECONNABORTED' - `errno.h' (BSD: Software caused connection abort): *Note Error - Codes::. - -`int ECONNREFUSED' - `errno.h' (BSD: Connection refused): *Note Error Codes::. - -`int ECONNRESET' - `errno.h' (BSD: Connection reset by peer): *Note Error Codes::. - -`char * ecvt (double VALUE, int NDIGIT, int *DECPT, int *NEG)' - `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. - -`char * ecvt_r (double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' - `stdlib.h' (GNU): *Note System V Number Conversion::. - -`int ED' - `errno.h' (GNU: ?): *Note Error Codes::. - -`int EDEADLK' - `errno.h' (POSIX.1: Resource deadlock avoided): *Note Error - Codes::. - -`int EDEADLOCK' - `errno.h' (Linux???: File locking deadlock error): *Note Error - Codes::. - -`int EDESTADDRREQ' - `errno.h' (BSD: Destination address required): *Note Error - Codes::. - -`int EDIED' - `errno.h' (GNU: Translator died): *Note Error Codes::. - -`int EDOM' - `errno.h' (ISO: Numerical argument out of domain): *Note Error - Codes::. - -`int EDOTDOT' - `errno.h' (Linux???: RFS specific error): *Note Error Codes::. - -`int EDQUOT' - `errno.h' (BSD: Disk quota exceeded): *Note Error Codes::. - -`int EEXIST' - `errno.h' (POSIX.1: File exists): *Note Error Codes::. - -`int EFAULT' - `errno.h' (POSIX.1: Bad address): *Note Error Codes::. - -`int EFBIG' - `errno.h' (POSIX.1: File too large): *Note Error Codes::. - -`int EFTYPE' - `errno.h' (BSD: Inappropriate file type or format): *Note Error - Codes::. - -`int EGRATUITOUS' - `errno.h' (GNU: Gratuitous error): *Note Error Codes::. - -`int EGREGIOUS' - `errno.h' (GNU: You really blew it this time): *Note Error - Codes::. - -`int EHOSTDOWN' - `errno.h' (BSD: Host is down): *Note Error Codes::. - -`int EHOSTUNREACH' - `errno.h' (BSD: No route to host): *Note Error Codes::. - -`int EIDRM' - `errno.h' (XOPEN: Identifier removed): *Note Error Codes::. - -`int EIEIO' - `errno.h' (GNU: Computer bought the farm): *Note Error Codes::. - -`int EILSEQ' - `errno.h' (ISO: Invalid or incomplete multibyte or wide - character): *Note Error Codes::. - -`int EINPROGRESS' - `errno.h' (BSD: Operation now in progress): *Note Error Codes::. - -`int EINTR' - `errno.h' (POSIX.1: Interrupted system call): *Note Error Codes::. - -`int EINVAL' - `errno.h' (POSIX.1: Invalid argument): *Note Error Codes::. - -`int EIO' - `errno.h' (POSIX.1: Input/output error): *Note Error Codes::. - -`int EISCONN' - `errno.h' (BSD: Transport endpoint is already connected): *Note - Error Codes::. - -`int EISDIR' - `errno.h' (POSIX.1: Is a directory): *Note Error Codes::. - -`int EISNAM' - `errno.h' (Linux???: Is a named type file): *Note Error Codes::. - -`int EL2HLT' - `errno.h' (Obsolete: Level 2 halted): *Note Error Codes::. - -`int EL2NSYNC' - `errno.h' (Obsolete: Level 2 not synchronized): *Note Error - Codes::. - -`int EL3HLT' - `errno.h' (Obsolete: Level 3 halted): *Note Error Codes::. - -`int EL3RST' - `errno.h' (Obsolete: Level 3 reset): *Note Error Codes::. - -`int ELIBACC' - `errno.h' (Linux???: Can not access a needed shared library): - *Note Error Codes::. - -`int ELIBBAD' - `errno.h' (Linux???: Accessing a corrupted shared library): *Note - Error Codes::. - -`int ELIBEXEC' - `errno.h' (Linux???: Cannot exec a shared library directly): - *Note Error Codes::. - -`int ELIBMAX' - `errno.h' (Linux???: Attempting to link in too many shared - libraries): *Note Error Codes::. - -`int ELIBSCN' - `errno.h' (Linux???: .lib section in a.out corrupted): *Note - Error Codes::. - -`int ELNRNG' - `errno.h' (Linux???: Link number out of range): *Note Error - Codes::. - -`int ELOOP' - `errno.h' (BSD: Too many levels of symbolic links): *Note Error - Codes::. - -`int EMEDIUMTYPE' - `errno.h' (Linux???: Wrong medium type): *Note Error Codes::. - -`int EMFILE' - `errno.h' (POSIX.1: Too many open files): *Note Error Codes::. - -`int EMLINK' - `errno.h' (POSIX.1: Too many links): *Note Error Codes::. - -`EMPTY' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`EMPTY' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int EMSGSIZE' - `errno.h' (BSD: Message too long): *Note Error Codes::. - -`int EMULTIHOP' - `errno.h' (XOPEN: Multihop attempted): *Note Error Codes::. - -`int ENAMETOOLONG' - `errno.h' (POSIX.1: File name too long): *Note Error Codes::. - -`int ENAVAIL' - `errno.h' (Linux???: No XENIX semaphores available): *Note Error - Codes::. - -`void encrypt (char *BLOCK, int EDFLAG)' - `crypt.h' (BSD, SVID): *Note DES Encryption::. - -`void encrypt_r (char *BLOCK, int EDFLAG, struct crypt_data * DATA)' - `crypt.h' (GNU): *Note DES Encryption::. - -`void endfsent (void)' - `fstab.h' (BSD): *Note fstab::. - -`void endgrent (void)' - `grp.h' (SVID, BSD): *Note Scanning All Groups::. - -`void endhostent (void)' - `netdb.h' (BSD): *Note Host Names::. - -`int endmntent (FILE *STREAM)' - `mntent.h' (BSD): *Note mtab::. - -`void endnetent (void)' - `netdb.h' (BSD): *Note Networks Database::. - -`void endnetgrent (void)' - `netdb.h' (BSD): *Note Lookup Netgroup::. - -`void endprotoent (void)' - `netdb.h' (BSD): *Note Protocols Database::. - -`void endpwent (void)' - `pwd.h' (SVID, BSD): *Note Scanning All Users::. - -`void endservent (void)' - `netdb.h' (BSD): *Note Services Database::. - -`void endutent (void)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`void endutxent (void)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int ENEEDAUTH' - `errno.h' (BSD: Need authenticator): *Note Error Codes::. - -`int ENETDOWN' - `errno.h' (BSD: Network is down): *Note Error Codes::. - -`int ENETRESET' - `errno.h' (BSD: Network dropped connection on reset): *Note Error - Codes::. - -`int ENETUNREACH' - `errno.h' (BSD: Network is unreachable): *Note Error Codes::. - -`int ENFILE' - `errno.h' (POSIX.1: Too many open files in system): *Note Error - Codes::. - -`int ENOANO' - `errno.h' (Linux???: No anode): *Note Error Codes::. - -`int ENOBUFS' - `errno.h' (BSD: No buffer space available): *Note Error Codes::. - -`int ENOCSI' - `errno.h' (Linux???: No CSI structure available): *Note Error - Codes::. - -`int ENODATA' - `errno.h' (XOPEN: No data available): *Note Error Codes::. - -`int ENODEV' - `errno.h' (POSIX.1: No such device): *Note Error Codes::. - -`int ENOENT' - `errno.h' (POSIX.1: No such file or directory): *Note Error - Codes::. - -`int ENOEXEC' - `errno.h' (POSIX.1: Exec format error): *Note Error Codes::. - -`int ENOLCK' - `errno.h' (POSIX.1: No locks available): *Note Error Codes::. - -`int ENOLINK' - `errno.h' (XOPEN: Link has been severed): *Note Error Codes::. - -`int ENOMEDIUM' - `errno.h' (Linux???: No medium found): *Note Error Codes::. - -`int ENOMEM' - `errno.h' (POSIX.1: Cannot allocate memory): *Note Error Codes::. - -`int ENOMSG' - `errno.h' (XOPEN: No message of desired type): *Note Error - Codes::. - -`int ENONET' - `errno.h' (Linux???: Machine is not on the network): *Note Error - Codes::. - -`int ENOPKG' - `errno.h' (Linux???: Package not installed): *Note Error Codes::. - -`int ENOPROTOOPT' - `errno.h' (BSD: Protocol not available): *Note Error Codes::. - -`int ENOSPC' - `errno.h' (POSIX.1: No space left on device): *Note Error Codes::. - -`int ENOSR' - `errno.h' (XOPEN: Out of streams resources): *Note Error Codes::. - -`int ENOSTR' - `errno.h' (XOPEN: Device not a stream): *Note Error Codes::. - -`int ENOSYS' - `errno.h' (POSIX.1: Function not implemented): *Note Error - Codes::. - -`int ENOTBLK' - `errno.h' (BSD: Block device required): *Note Error Codes::. - -`int ENOTCONN' - `errno.h' (BSD: Transport endpoint is not connected): *Note Error - Codes::. - -`int ENOTDIR' - `errno.h' (POSIX.1: Not a directory): *Note Error Codes::. - -`int ENOTEMPTY' - `errno.h' (POSIX.1: Directory not empty): *Note Error Codes::. - -`int ENOTNAM' - `errno.h' (Linux???: Not a XENIX named type file): *Note Error - Codes::. - -`int ENOTSOCK' - `errno.h' (BSD: Socket operation on non-socket): *Note Error - Codes::. - -`int ENOTSUP' - `errno.h' (POSIX.1: Not supported): *Note Error Codes::. - -`int ENOTTY' - `errno.h' (POSIX.1: Inappropriate ioctl for device): *Note Error - Codes::. - -`int ENOTUNIQ' - `errno.h' (Linux???: Name not unique on network): *Note Error - Codes::. - -`char ** environ' - `unistd.h' (POSIX.1): *Note Environment Access::. - -`error_t envz_add (char **ENVZ, size_t *ENVZ_LEN, const char *NAME, const char *VALUE)' - `envz.h' (GNU): *Note Envz Functions::. - -`char * envz_entry (const char *ENVZ, size_t ENVZ_LEN, const char *NAME)' - `envz.h' (GNU): *Note Envz Functions::. - -`char * envz_get (const char *ENVZ, size_t ENVZ_LEN, const char *NAME)' - `envz.h' (GNU): *Note Envz Functions::. - -`error_t envz_merge (char **ENVZ, size_t *ENVZ_LEN, const char *ENVZ2, size_t ENVZ2_LEN, int OVERRIDE)' - `envz.h' (GNU): *Note Envz Functions::. - -`void envz_strip (char **ENVZ, size_t *ENVZ_LEN)' - `envz.h' (GNU): *Note Envz Functions::. - -`int ENXIO' - `errno.h' (POSIX.1: No such device or address): *Note Error - Codes::. - -`int EOF' - `stdio.h' (ISO): *Note EOF and Errors::. - -`int EOPNOTSUPP' - `errno.h' (BSD: Operation not supported): *Note Error Codes::. - -`int EOVERFLOW' - `errno.h' (XOPEN: Value too large for defined data type): *Note - Error Codes::. - -`int EPERM' - `errno.h' (POSIX.1: Operation not permitted): *Note Error Codes::. - -`int EPFNOSUPPORT' - `errno.h' (BSD: Protocol family not supported): *Note Error - Codes::. - -`int EPIPE' - `errno.h' (POSIX.1: Broken pipe): *Note Error Codes::. - -`int EPROCLIM' - `errno.h' (BSD: Too many processes): *Note Error Codes::. - -`int EPROCUNAVAIL' - `errno.h' (BSD: RPC bad procedure for program): *Note Error - Codes::. - -`int EPROGMISMATCH' - `errno.h' (BSD: RPC program version wrong): *Note Error Codes::. - -`int EPROGUNAVAIL' - `errno.h' (BSD: RPC program not available): *Note Error Codes::. - -`int EPROTO' - `errno.h' (XOPEN: Protocol error): *Note Error Codes::. - -`int EPROTONOSUPPORT' - `errno.h' (BSD: Protocol not supported): *Note Error Codes::. - -`int EPROTOTYPE' - `errno.h' (BSD: Protocol wrong type for socket): *Note Error - Codes::. - -`int EQUIV_CLASS_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`double erand48 (unsigned short int XSUBI[3])' - `stdlib.h' (SVID): *Note SVID Random::. - -`int erand48_r (unsigned short int XSUBI[3], struct drand48_data *BUFFER, double *RESULT)' - `stdlib.h' (GNU): *Note SVID Random::. - -`int ERANGE' - `errno.h' (ISO: Numerical result out of range): *Note Error - Codes::. - -`int EREMCHG' - `errno.h' (Linux???: Remote address changed): *Note Error Codes::. - -`int EREMOTE' - `errno.h' (BSD: Object is remote): *Note Error Codes::. - -`int EREMOTEIO' - `errno.h' (Linux???: Remote I/O error): *Note Error Codes::. - -`int ERESTART' - `errno.h' (Linux???: Interrupted system call should be restarted): - *Note Error Codes::. - -`double erf (double X)' - `math.h' (SVID): *Note Special Functions::. - -`double erfc (double X)' - `math.h' (SVID): *Note Special Functions::. - -`float erfcf (float X)' - `math.h' (SVID): *Note Special Functions::. - -`long double erfcl (long double X)' - `math.h' (SVID): *Note Special Functions::. - -`float erff (float X)' - `math.h' (SVID): *Note Special Functions::. - -`long double erfl (long double X)' - `math.h' (SVID): *Note Special Functions::. - -`int EROFS' - `errno.h' (POSIX.1: Read-only file system): *Note Error Codes::. - -`int ERPCMISMATCH' - `errno.h' (BSD: RPC version wrong): *Note Error Codes::. - -`volatile int errno' - `errno.h' (ISO): *Note Checking for Errors::. - -`int ESHUTDOWN' - `errno.h' (BSD: Cannot send after transport endpoint shutdown): - *Note Error Codes::. - -`int ESOCKTNOSUPPORT' - `errno.h' (BSD: Socket type not supported): *Note Error Codes::. - -`int ESPIPE' - `errno.h' (POSIX.1: Illegal seek): *Note Error Codes::. - -`int ESRCH' - `errno.h' (POSIX.1: No such process): *Note Error Codes::. - -`int ESRMNT' - `errno.h' (Linux???: Srmount error): *Note Error Codes::. - -`int ESTALE' - `errno.h' (BSD: Stale NFS file handle): *Note Error Codes::. - -`int ESTRPIPE' - `errno.h' (Linux???: Streams pipe error): *Note Error Codes::. - -`int ETIME' - `errno.h' (XOPEN: Timer expired): *Note Error Codes::. - -`int ETIMEDOUT' - `errno.h' (BSD: Connection timed out): *Note Error Codes::. - -`int ETOOMANYREFS' - `errno.h' (BSD: Too many references: cannot splice): *Note Error - Codes::. - -`int ETXTBSY' - `errno.h' (BSD: Text file busy): *Note Error Codes::. - -`int EUCLEAN' - `errno.h' (Linux???: Structure needs cleaning): *Note Error - Codes::. - -`int EUNATCH' - `errno.h' (Linux???: Protocol driver not attached): *Note Error - Codes::. - -`int EUSERS' - `errno.h' (BSD: Too many users): *Note Error Codes::. - -`int EWOULDBLOCK' - `errno.h' (BSD: Operation would block): *Note Error Codes::. - -`int EXDEV' - `errno.h' (POSIX.1: Invalid cross-device link): *Note Error - Codes::. - -`int execl (const char *FILENAME, const char *ARG0, ...)' - `unistd.h' (POSIX.1): *Note Executing a File::. - -`int execle (const char *FILENAME, const char *ARG0, char *const ENV[], ...)' - `unistd.h' (POSIX.1): *Note Executing a File::. - -`int execlp (const char *FILENAME, const char *ARG0, ...)' - `unistd.h' (POSIX.1): *Note Executing a File::. - -`int execv (const char *FILENAME, char *const ARGV[])' - `unistd.h' (POSIX.1): *Note Executing a File::. - -`int execve (const char *FILENAME, char *const ARGV[], char *const ENV[])' - `unistd.h' (POSIX.1): *Note Executing a File::. - -`int execvp (const char *FILENAME, char *const ARGV[])' - `unistd.h' (POSIX.1): *Note Executing a File::. - -`int EXFULL' - `errno.h' (Linux???: Exchange full): *Note Error Codes::. - -`void _Exit (int STATUS)' - `stdlib.h' (ISO): *Note Termination Internals::. - -`void _exit (int STATUS)' - `unistd.h' (POSIX.1): *Note Termination Internals::. - -`void exit (int STATUS)' - `stdlib.h' (ISO): *Note Normal Termination::. - -`int EXIT_FAILURE' - `stdlib.h' (ISO): *Note Exit Status::. - -`int EXIT_SUCCESS' - `stdlib.h' (ISO): *Note Exit Status::. - -`double exp (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double exp10 (double X)' - `math.h' (GNU): *Note Exponents and Logarithms::. - -`float exp10f (float X)' - `math.h' (GNU): *Note Exponents and Logarithms::. - -`long double exp10l (long double X)' - `math.h' (GNU): *Note Exponents and Logarithms::. - -`double exp2 (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float exp2f (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double exp2l (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float expf (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double expl (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double expm1 (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float expm1f (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double expm1l (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`int EXPR_NEST_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`double fabs (double NUMBER)' - `math.h' (ISO): *Note Absolute Value::. - -`float fabsf (float NUMBER)' - `math.h' (ISO): *Note Absolute Value::. - -`long double fabsl (long double NUMBER)' - `math.h' (ISO): *Note Absolute Value::. - -`size_t __fbufsize (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Controlling Buffering::. - -`int fchdir (int FILEDES)' - `unistd.h' (XPG): *Note Working Directory::. - -`int fchmod (int FILEDES, int MODE)' - `sys/stat.h' (BSD): *Note Setting Permissions::. - -`int fchown (int FILEDES, int OWNER, int GROUP)' - `unistd.h' (BSD): *Note File Owner::. - -`int fclean (FILE *STREAM)' - `stdio.h' (GNU): *Note Cleaning Streams::. - -`int fclose (FILE *STREAM)' - `stdio.h' (ISO): *Note Closing Streams::. - -`int fcloseall (void)' - `stdio.h' (GNU): *Note Closing Streams::. - -`int fcntl (int FILEDES, int COMMAND, ...)' - `fcntl.h' (POSIX.1): *Note Control Operations::. - -`char * fcvt (double VALUE, int NDIGIT, int *DECPT, int *NEG)' - `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. - -`char * fcvt_r (double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' - `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. - -`int fdatasync (int FILDES)' - `unistd.h' (POSIX): *Note Synchronizing I/O::. - -`int FD_CLOEXEC' - `fcntl.h' (POSIX.1): *Note Descriptor Flags::. - -`void FD_CLR (int FILEDES, fd_set *SET)' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`double fdim (double X, double Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`float fdimf (float X, float Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`long double fdiml (long double X, long double Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`int FD_ISSET (int FILEDES, fd_set *SET)' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`FILE * fdopen (int FILEDES, const char *OPENTYPE)' - `stdio.h' (POSIX.1): *Note Descriptors and Streams::. - -`void FD_SET (int FILEDES, fd_set *SET)' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`fd_set' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`int FD_SETSIZE' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`int F_DUPFD' - `fcntl.h' (POSIX.1): *Note Duplicating Descriptors::. - -`void FD_ZERO (fd_set *SET)' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`int feclearexcept (int EXCEPTS)' - `fenv.h' (ISO): *Note Status bit operations::. - -`int fedisableexcept (int EXCEPTS)' - `fenv.h' (GNU): *Note Control Functions::. - -`FE_DIVBYZERO' - `fenv.h' (ISO): *Note Status bit operations::. - -`FE_DOWNWARD' - `fenv.h' (ISO): *Note Rounding::. - -`int feenableexcept (int EXCEPTS)' - `fenv.h' (GNU): *Note Control Functions::. - -`int fegetenv (fenv_t *ENVP)' - `fenv.h' (ISO): *Note Control Functions::. - -`int fegetexcept (int EXCEPTS)' - `fenv.h' (GNU): *Note Control Functions::. - -`int fegetexceptflag (fexcept_t *FLAGP, int EXCEPTS)' - `fenv.h' (ISO): *Note Status bit operations::. - -`int fegetround (void)' - `fenv.h' (ISO): *Note Rounding::. - -`int feholdexcept (fenv_t *ENVP)' - `fenv.h' (ISO): *Note Control Functions::. - -`FE_INEXACT' - `fenv.h' (ISO): *Note Status bit operations::. - -`FE_INVALID' - `fenv.h' (ISO): *Note Status bit operations::. - -`int feof (FILE *STREAM)' - `stdio.h' (ISO): *Note EOF and Errors::. - -`int feof_unlocked (FILE *STREAM)' - `stdio.h' (GNU): *Note EOF and Errors::. - -`FE_OVERFLOW' - `fenv.h' (ISO): *Note Status bit operations::. - -`int feraiseexcept (int EXCEPTS)' - `fenv.h' (ISO): *Note Status bit operations::. - -`int ferror (FILE *STREAM)' - `stdio.h' (ISO): *Note EOF and Errors::. - -`int ferror_unlocked (FILE *STREAM)' - `stdio.h' (GNU): *Note EOF and Errors::. - -`int fesetenv (const fenv_t *ENVP)' - `fenv.h' (ISO): *Note Control Functions::. - -`int fesetexceptflag (const fexcept_t *FLAGP, int' - `fenv.h' (ISO): *Note Status bit operations::. - -`int fesetround (int ROUND)' - `fenv.h' (ISO): *Note Rounding::. - -`int fetestexcept (int EXCEPTS)' - `fenv.h' (ISO): *Note Status bit operations::. - -`FE_TONEAREST' - `fenv.h' (ISO): *Note Rounding::. - -`FE_TOWARDZERO' - `fenv.h' (ISO): *Note Rounding::. - -`FE_UNDERFLOW' - `fenv.h' (ISO): *Note Status bit operations::. - -`int feupdateenv (const fenv_t *ENVP)' - `fenv.h' (ISO): *Note Control Functions::. - -`FE_UPWARD' - `fenv.h' (ISO): *Note Rounding::. - -`int fflush (FILE *STREAM)' - `stdio.h' (ISO): *Note Flushing Buffers::. - -`int fflush_unlocked (FILE *STREAM)' - `stdio.h' (POSIX): *Note Flushing Buffers::. - -`int fgetc (FILE *STREAM)' - `stdio.h' (ISO): *Note Character Input::. - -`int fgetc_unlocked (FILE *STREAM)' - `stdio.h' (POSIX): *Note Character Input::. - -`int F_GETFD' - `fcntl.h' (POSIX.1): *Note Descriptor Flags::. - -`int F_GETFL' - `fcntl.h' (POSIX.1): *Note Getting File Status Flags::. - -`struct group * fgetgrent (FILE *STREAM)' - `grp.h' (SVID): *Note Scanning All Groups::. - -`int fgetgrent_r (FILE *STREAM, struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' - `grp.h' (GNU): *Note Scanning All Groups::. - -`int F_GETLK' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`int F_GETOWN' - `fcntl.h' (BSD): *Note Interrupt Input::. - -`int fgetpos (FILE *STREAM, fpos_t *POSITION)' - `stdio.h' (ISO): *Note Portable Positioning::. - -`int fgetpos64 (FILE *STREAM, fpos64_t *POSITION)' - `stdio.h' (Unix98): *Note Portable Positioning::. - -`struct passwd * fgetpwent (FILE *STREAM)' - `pwd.h' (SVID): *Note Scanning All Users::. - -`int fgetpwent_r (FILE *STREAM, struct passwd *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd **RESULT)' - `pwd.h' (GNU): *Note Scanning All Users::. - -`char * fgets (char *S, int COUNT, FILE *STREAM)' - `stdio.h' (ISO): *Note Line Input::. - -`char * fgets_unlocked (char *S, int COUNT, FILE *STREAM)' - `stdio.h' (GNU): *Note Line Input::. - -`wint_t fgetwc (FILE *STREAM)' - `wchar.h' (ISO): *Note Character Input::. - -`wint_t fgetwc_unlocked (FILE *STREAM)' - `wchar.h' (GNU): *Note Character Input::. - -`wchar_t * fgetws (wchar_t *WS, int COUNT, FILE *STREAM)' - `wchar.h' (ISO): *Note Line Input::. - -`wchar_t * fgetws_unlocked (wchar_t *WS, int COUNT, FILE *STREAM)' - `wchar.h' (GNU): *Note Line Input::. - -`FILE' - `stdio.h' (ISO): *Note Streams::. - -`int FILENAME_MAX' - `stdio.h' (ISO): *Note Limits for Files::. - -`int fileno (FILE *STREAM)' - `stdio.h' (POSIX.1): *Note Descriptors and Streams::. - -`int fileno_unlocked (FILE *STREAM)' - `stdio.h' (GNU): *Note Descriptors and Streams::. - -`int finite (double X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int finitef (float X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int finitel (long double X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int __flbf (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Controlling Buffering::. - -`void flockfile (FILE *STREAM)' - `stdio.h' (POSIX): *Note Streams and Threads::. +`LDBL_MIN_EXP' + These are similar to `FLT_MIN_EXP', but for the data types + `double' and `long double', respectively. -`double floor (double X)' - `math.h' (ISO): *Note Rounding Functions::. +`FLT_MIN_10_EXP' + This is the minimum negative integer such that `10' raised to this + power minus 1 can be represented as a normalized floating point + number of type `float'. This is supposed to be `-37' or even less. -`float floorf (float X)' - `math.h' (ISO): *Note Rounding Functions::. +`DBL_MIN_10_EXP' +`LDBL_MIN_10_EXP' + These are similar to `FLT_MIN_10_EXP', but for the data types + `double' and `long double', respectively. -`long double floorl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. +`FLT_MAX_EXP' + This is the largest possible exponent value for type `float'. More + precisely, this is the maximum positive integer such that value + `FLT_RADIX' raised to this power minus 1 can be represented as a + floating point number of type `float'. -`FLT_DIG' - `float.h' (ISO): *Note Floating Point Parameters::. +`DBL_MAX_EXP' +`LDBL_MAX_EXP' + These are similar to `FLT_MAX_EXP', but for the data types + `double' and `long double', respectively. -`FLT_EPSILON' - `float.h' (ISO): *Note Floating Point Parameters::. +`FLT_MAX_10_EXP' + This is the maximum positive integer such that `10' raised to this + power minus 1 can be represented as a normalized floating point + number of type `float'. This is supposed to be at least `37'. -`FLT_MANT_DIG' - `float.h' (ISO): *Note Floating Point Parameters::. +`DBL_MAX_10_EXP' +`LDBL_MAX_10_EXP' + These are similar to `FLT_MAX_10_EXP', but for the data types + `double' and `long double', respectively. `FLT_MAX' - `float.h' (ISO): *Note Floating Point Parameters::. + The value of this macro is the maximum number representable in type + `float'. It is supposed to be at least `1E+37'. The value has + type `float'. -`FLT_MAX_10_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. + The smallest representable number is `- FLT_MAX'. -`FLT_MAX_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. +`DBL_MAX' +`LDBL_MAX' + These are similar to `FLT_MAX', but for the data types `double' + and `long double', respectively. The type of the macro's value is + the same as the type it describes. `FLT_MIN' - `float.h' (ISO): *Note Floating Point Parameters::. - -`FLT_MIN_10_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. - -`FLT_MIN_EXP' - `float.h' (ISO): *Note Floating Point Parameters::. - -`FLT_RADIX' - `float.h' (ISO): *Note Floating Point Parameters::. - -`FLT_ROUNDS' - `float.h' (ISO): *Note Floating Point Parameters::. - -`void _flushlbf (void)' - `stdio_ext.h' (GNU): *Note Flushing Buffers::. - -`tcflag_t FLUSHO' - `termios.h' (BSD): *Note Local Modes::. - -`double fma (double X, double Y, double Z)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`float fmaf (float X, float Y, float Z)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`long double fmal (long double X, long double Y, long double Z)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`double fmax (double X, double Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`float fmaxf (float X, float Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`long double fmaxl (long double X, long double Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`FILE * fmemopen (void *BUF, size_t SIZE, const char *OPENTYPE)' - `stdio.h' (GNU): *Note String Streams::. - -`double fmin (double X, double Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`float fminf (float X, float Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`long double fminl (long double X, long double Y)' - `math.h' (ISO): *Note Misc FP Arithmetic::. - -`double fmod (double NUMERATOR, double DENOMINATOR)' - `math.h' (ISO): *Note Remainder Functions::. - -`float fmodf (float NUMERATOR, float DENOMINATOR)' - `math.h' (ISO): *Note Remainder Functions::. - -`long double fmodl (long double NUMERATOR, long double DENOMINATOR)' - `math.h' (ISO): *Note Remainder Functions::. - -`int fmtmsg (long int CLASSIFICATION, const char *LABEL, int SEVERITY, const char *TEXT, const char *ACTION, const char *TAG)' - `fmtmsg.h' (XPG): *Note Printing Formatted Messages::. - -`int fnmatch (const char *PATTERN, const char *STRING, int FLAGS)' - `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. - -`FNM_CASEFOLD' - `fnmatch.h' (GNU): *Note Wildcard Matching::. - -`FNM_EXTMATCH' - `fnmatch.h' (GNU): *Note Wildcard Matching::. - -`FNM_FILE_NAME' - `fnmatch.h' (GNU): *Note Wildcard Matching::. - -`FNM_LEADING_DIR' - `fnmatch.h' (GNU): *Note Wildcard Matching::. - -`FNM_NOESCAPE' - `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. - -`FNM_PATHNAME' - `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. - -`FNM_PERIOD' - `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. - -`int F_OK' - `unistd.h' (POSIX.1): *Note Testing File Access::. - -`FILE * fopen (const char *FILENAME, const char *OPENTYPE)' - `stdio.h' (ISO): *Note Opening Streams::. - -`FILE * fopen64 (const char *FILENAME, const char *OPENTYPE)' - `stdio.h' (Unix98): *Note Opening Streams::. - -`FILE * fopencookie (void *COOKIE, const char *OPENTYPE, cookie_io_functions_t IO-FUNCTIONS)' - `stdio.h' (GNU): *Note Streams and Cookies::. - -`int FOPEN_MAX' - `stdio.h' (ISO): *Note Opening Streams::. - -`pid_t fork (void)' - `unistd.h' (POSIX.1): *Note Creating a Process::. - -`int forkpty (int *AMASTER, char *NAME, struct termios *TERMP, struct winsize *WINP)' - `pty.h' (BSD): *Note Pseudo-Terminal Pairs::. - -`long int fpathconf (int FILEDES, int PARAMETER)' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`int fpclassify (_float-type_ X)' - `math.h' (ISO): *Note Floating Point Classes::. - -`FPE_DECOVF_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_FLTDIV_FAULT' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_FLTDIV_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_FLTOVF_FAULT' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_FLTOVF_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_FLTUND_FAULT' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_FLTUND_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_INTDIV_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`FPE_INTOVF_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`size_t __fpending (FILE *STREAM) The `__fpending'' - `stdio_ext.h' (GNU): *Note Controlling Buffering::. - -`FPE_SUBRNG_TRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`int FP_ILOGB0' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`int FP_ILOGBNAN' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`fpos64_t' - `stdio.h' (Unix98): *Note Portable Positioning::. - -`fpos_t' - `stdio.h' (ISO): *Note Portable Positioning::. - -`int fprintf (FILE *STREAM, const char *TEMPLATE, ...)' - `stdio.h' (ISO): *Note Formatted Output Functions::. - -`void __fpurge (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Flushing Buffers::. - -`int fputc (int C, FILE *STREAM)' - `stdio.h' (ISO): *Note Simple Output::. - -`int fputc_unlocked (int C, FILE *STREAM)' - `stdio.h' (POSIX): *Note Simple Output::. - -`int fputs (const char *S, FILE *STREAM)' - `stdio.h' (ISO): *Note Simple Output::. - -`int fputs_unlocked (const char *S, FILE *STREAM)' - `stdio.h' (GNU): *Note Simple Output::. - -`wint_t fputwc (wchar_t WC, FILE *STREAM)' - `wchar.h' (ISO): *Note Simple Output::. - -`wint_t fputwc_unlocked (wint_t WC, FILE *STREAM)' - `wchar.h' (POSIX): *Note Simple Output::. - -`int fputws (const wchar_t *WS, FILE *STREAM)' - `wchar.h' (ISO): *Note Simple Output::. - -`int fputws_unlocked (const wchar_t *WS, FILE *STREAM)' - `wchar.h' (GNU): *Note Simple Output::. - -`F_RDLCK' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`size_t fread (void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' - `stdio.h' (ISO): *Note Block Input/Output::. - -`int __freadable (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Opening Streams::. - -`int __freading (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Opening Streams::. - -`size_t fread_unlocked (void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' - `stdio.h' (GNU): *Note Block Input/Output::. - -`void free (void *PTR)' - `malloc.h', `stdlib.h' (ISO): *Note Freeing after Malloc::. - -`__free_hook' - `malloc.h' (GNU): *Note Hooks for Malloc::. - -`FILE * freopen (const char *FILENAME, const char *OPENTYPE, FILE *STREAM)' - `stdio.h' (ISO): *Note Opening Streams::. - -`FILE * freopen64 (const char *FILENAME, const char *OPENTYPE, FILE *STREAM)' - `stdio.h' (Unix98): *Note Opening Streams::. - -`double frexp (double VALUE, int *EXPONENT)' - `math.h' (ISO): *Note Normalization Functions::. - -`float frexpf (float VALUE, int *EXPONENT)' - `math.h' (ISO): *Note Normalization Functions::. - -`long double frexpl (long double VALUE, int *EXPONENT)' - `math.h' (ISO): *Note Normalization Functions::. - -`int fscanf (FILE *STREAM, const char *TEMPLATE, ...)' - `stdio.h' (ISO): *Note Formatted Input Functions::. - -`int fseek (FILE *STREAM, long int OFFSET, int WHENCE)' - `stdio.h' (ISO): *Note File Positioning::. - -`int fseeko (FILE *STREAM, off_t OFFSET, int WHENCE)' - `stdio.h' (Unix98): *Note File Positioning::. - -`int fseeko64 (FILE *STREAM, off64_t OFFSET, int WHENCE)' - `stdio.h' (Unix98): *Note File Positioning::. - -`int F_SETFD' - `fcntl.h' (POSIX.1): *Note Descriptor Flags::. - -`int F_SETFL' - `fcntl.h' (POSIX.1): *Note Getting File Status Flags::. - -`int F_SETLK' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`int F_SETLKW' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`int __fsetlocking (FILE *STREAM, int TYPE)' - `stdio_ext.h' (GNU): *Note Streams and Threads::. - -`int F_SETOWN' - `fcntl.h' (BSD): *Note Interrupt Input::. - -`int fsetpos (FILE *STREAM, const fpos_t *POSITION)' - `stdio.h' (ISO): *Note Portable Positioning::. - -`int fsetpos64 (FILE *STREAM, const fpos64_t *POSITION)' - `stdio.h' (Unix98): *Note Portable Positioning::. - -`int fstat (int FILEDES, struct stat *BUF)' - `sys/stat.h' (POSIX.1): *Note Reading Attributes::. - -`int fstat64 (int FILEDES, struct stat64 *BUF)' - `sys/stat.h' (Unix98): *Note Reading Attributes::. - -`int fsync (int FILDES)' - `unistd.h' (POSIX): *Note Synchronizing I/O::. - -`long int ftell (FILE *STREAM)' - `stdio.h' (ISO): *Note File Positioning::. - -`off_t ftello (FILE *STREAM)' - `stdio.h' (Unix98): *Note File Positioning::. - -`off64_t ftello64 (FILE *STREAM)' - `stdio.h' (Unix98): *Note File Positioning::. - -`int ftruncate (int FD, off_t LENGTH)' - `unistd.h' (POSIX): *Note File Size::. - -`int ftruncate64 (int ID, off64_t LENGTH)' - `unistd.h' (Unix98): *Note File Size::. - -`int ftrylockfile (FILE *STREAM)' - `stdio.h' (POSIX): *Note Streams and Threads::. - -`int ftw (const char *FILENAME, __ftw_func_t FUNC, int DESCRIPTORS)' - `ftw.h' (SVID): *Note Working with Directory Trees::. - -`int ftw64 (const char *FILENAME, __ftw64_func_t FUNC, int DESCRIPTORS)' - `ftw.h' (Unix98): *Note Working with Directory Trees::. - -`__ftw64_func_t' - `ftw.h' (GNU): *Note Working with Directory Trees::. - -`__ftw_func_t' - `ftw.h' (GNU): *Note Working with Directory Trees::. - -`F_UNLCK' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`void funlockfile (FILE *STREAM)' - `stdio.h' (POSIX): *Note Streams and Threads::. - -`int fwide (FILE *STREAM, int MODE)' - `wchar.h' (ISO): *Note Streams and I18N::. - -`int fwprintf (FILE *STREAM, const wchar_t *TEMPLATE, ...)' - `wchar.h' (ISO): *Note Formatted Output Functions::. - -`int __fwritable (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Opening Streams::. - -`size_t fwrite (const void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' - `stdio.h' (ISO): *Note Block Input/Output::. - -`size_t fwrite_unlocked (const void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' - `stdio.h' (GNU): *Note Block Input/Output::. - -`int __fwriting (FILE *STREAM)' - `stdio_ext.h' (GNU): *Note Opening Streams::. - -`F_WRLCK' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`int fwscanf (FILE *STREAM, const wchar_t *TEMPLATE, ...)' - `wchar.h' (ISO): *Note Formatted Input Functions::. - -`double gamma (double X)' - `math.h' (SVID): *Note Special Functions::. - -`float gammaf (float X)' - `math.h' (SVID): *Note Special Functions::. - -`long double gammal (long double X)' - `math.h' (SVID): *Note Special Functions::. - -`void (*__gconv_end_fct) (struct gconv_step *)' - `gconv.h' (GNU): *Note glibc iconv Implementation::. - -`int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, const char **, const char *, size_t *, int)' - `gconv.h' (GNU): *Note glibc iconv Implementation::. - -`int (*__gconv_init_fct) (struct __gconv_step *)' - `gconv.h' (GNU): *Note glibc iconv Implementation::. - -`char * gcvt (double VALUE, int NDIGIT, char *BUF)' - `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. - -`long int get_avphys_pages (void)' - `sys/sysinfo.h' (GNU): *Note Query Memory Parameters::. - -`int getc (FILE *STREAM)' - `stdio.h' (ISO): *Note Character Input::. - -`int getchar (void)' - `stdio.h' (ISO): *Note Character Input::. - -`int getchar_unlocked (void)' - `stdio.h' (POSIX): *Note Character Input::. - -`int getcontext (ucontext_t *UCP)' - `ucontext.h' (SVID): *Note System V contexts::. - -`int getc_unlocked (FILE *STREAM)' - `stdio.h' (POSIX): *Note Character Input::. - -`char * get_current_dir_name (void)' - `unistd.h' (GNU): *Note Working Directory::. - -`char * getcwd (char *BUFFER, size_t SIZE)' - `unistd.h' (POSIX.1): *Note Working Directory::. - -`struct tm * getdate (const char *STRING)' - `time.h' (Unix98): *Note General Time String Parsing::. - -`getdate_err' - `time.h' (Unix98): *Note General Time String Parsing::. - -`int getdate_r (const char *STRING, struct tm *TP)' - `time.h' (GNU): *Note General Time String Parsing::. - -`ssize_t getdelim (char **LINEPTR, size_t *N, int DELIMITER, FILE *STREAM)' - `stdio.h' (GNU): *Note Line Input::. - -`int getdomainnname (char *NAME, size_t LENGTH)' - `unistd.h' (???): *Note Host Identification::. - -`gid_t getegid (void)' - `unistd.h' (POSIX.1): *Note Reading Persona::. - -`char * getenv (const char *NAME)' - `stdlib.h' (ISO): *Note Environment Access::. - -`uid_t geteuid (void)' - `unistd.h' (POSIX.1): *Note Reading Persona::. - -`struct fstab * getfsent (void)' - `fstab.h' (BSD): *Note fstab::. - -`struct fstab * getfsfile (const char *NAME)' - `fstab.h' (BSD): *Note fstab::. - -`struct fstab * getfsspec (const char *NAME)' - `fstab.h' (BSD): *Note fstab::. - -`gid_t getgid (void)' - `unistd.h' (POSIX.1): *Note Reading Persona::. - -`struct group * getgrent (void)' - `grp.h' (SVID, BSD): *Note Scanning All Groups::. - -`int getgrent_r (struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' - `grp.h' (GNU): *Note Scanning All Groups::. - -`struct group * getgrgid (gid_t GID)' - `grp.h' (POSIX.1): *Note Lookup Group::. - -`int getgrgid_r (gid_t GID, struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' - `grp.h' (POSIX.1c): *Note Lookup Group::. - -`struct group * getgrnam (const char *NAME)' - `grp.h' (SVID, BSD): *Note Lookup Group::. - -`int getgrnam_r (const char *NAME, struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' - `grp.h' (POSIX.1c): *Note Lookup Group::. - -`int getgrouplist (const char *USER, gid_t GROUP, gid_t *GROUPS, int *NGROUPS)' - `grp.h' (BSD): *Note Setting Groups::. - -`int getgroups (int COUNT, gid_t *GROUPS)' - `unistd.h' (POSIX.1): *Note Reading Persona::. - -`struct hostent * gethostbyaddr (const char *ADDR, size_t LENGTH, int FORMAT)' - `netdb.h' (BSD): *Note Host Names::. - -`int gethostbyaddr_r (const char *ADDR, size_t LENGTH, int FORMAT, struct hostent *restrict RESULT_BUF, char *restrict BUF, size_t BUFLEN, struct hostent **restrict RESULT, int *restrict H_ERRNOP)' - `netdb.h' (GNU): *Note Host Names::. - -`struct hostent * gethostbyname (const char *NAME)' - `netdb.h' (BSD): *Note Host Names::. - -`struct hostent * gethostbyname2 (const char *NAME, int AF)' - `netdb.h' (IPv6 Basic API): *Note Host Names::. - -`int gethostbyname2_r (const char *NAME, int AF, struct hostent *restrict RESULT_BUF, char *restrict BUF, size_t BUFLEN, struct hostent **restrict RESULT, int *restrict H_ERRNOP)' - `netdb.h' (GNU): *Note Host Names::. - -`int gethostbyname_r (const char *restrict NAME, struct hostent *restrict RESULT_BUF, char *restrict BUF, size_t BUFLEN, struct hostent **restrict RESULT, int *restrict H_ERRNOP)' - `netdb.h' (GNU): *Note Host Names::. - -`struct hostent * gethostent (void)' - `netdb.h' (BSD): *Note Host Names::. - -`long int gethostid (void)' - `unistd.h' (BSD): *Note Host Identification::. - -`int gethostname (char *NAME, size_t SIZE)' - `unistd.h' (BSD): *Note Host Identification::. - -`int getitimer (int WHICH, struct itimerval *OLD)' - `sys/time.h' (BSD): *Note Setting an Alarm::. - -`ssize_t getline (char **LINEPTR, size_t *N, FILE *STREAM)' - `stdio.h' (GNU): *Note Line Input::. - -`int getloadavg (double LOADAVG[], int NELEM)' - `stdlib.h' (BSD): *Note Processor Resources::. - -`char * getlogin (void)' - `unistd.h' (POSIX.1): *Note Who Logged In::. - -`struct mntent * getmntent (FILE *STREAM)' - `mntent.h' (BSD): *Note mtab::. - -`struct mntent * getmntent_r (FILE *STREAM, struct mentent *RESULT, char *BUFFER, int BUFSIZE)' - `mntent.h' (BSD): *Note mtab::. - -`struct netent * getnetbyaddr (unsigned long int NET, int TYPE)' - `netdb.h' (BSD): *Note Networks Database::. - -`struct netent * getnetbyname (const char *NAME)' - `netdb.h' (BSD): *Note Networks Database::. - -`struct netent * getnetent (void)' - `netdb.h' (BSD): *Note Networks Database::. - -`int getnetgrent (char **HOSTP, char **USERP, char **DOMAINP)' - `netdb.h' (BSD): *Note Lookup Netgroup::. - -`int getnetgrent_r (char **HOSTP, char **USERP, char **DOMAINP, char *BUFFER, int BUFLEN)' - `netdb.h' (GNU): *Note Lookup Netgroup::. - -`int get_nprocs (void)' - `sys/sysinfo.h' (GNU): *Note Processor Resources::. - -`int get_nprocs_conf (void)' - `sys/sysinfo.h' (GNU): *Note Processor Resources::. - -`int getopt (int ARGC, char **ARGV, const char *OPTIONS)' - `unistd.h' (POSIX.2): *Note Using Getopt::. - -`int getopt_long (int ARGC, char *const *ARGV, const char *SHORTOPTS, struct option *LONGOPTS, int *INDEXPTR)' - `getopt.h' (GNU): *Note Getopt Long Options::. - -`int getopt_long_only (int ARGC, char *const *ARGV, const char *SHORTOPTS, struct option *LONGOPTS, int *INDEXPTR)' - `getopt.h' (GNU): *Note Getopt Long Options::. - -`int getpagesize (void)' - `unistd.h' (BSD): *Note Query Memory Parameters::. - -`char * getpass (const char *PROMPT)' - `unistd.h' (BSD): *Note getpass::. - -`int getpeername (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH-PTR)' - `sys/socket.h' (BSD): *Note Who is Connected::. - -`int getpgid (pid_t PID)' - `unistd.h' (SVID): *Note Process Group Functions::. - -`pid_t getpgrp (pid_t PID)' - `unistd.h' (BSD): *Note Process Group Functions::. - -`pid_t getpgrp (void)' - `unistd.h' (POSIX.1): *Note Process Group Functions::. - -`long int get_phys_pages (void)' - `sys/sysinfo.h' (GNU): *Note Query Memory Parameters::. - -`pid_t getpid (void)' - `unistd.h' (POSIX.1): *Note Process Identification::. - -`pid_t getppid (void)' - `unistd.h' (POSIX.1): *Note Process Identification::. - -`int getpriority (int CLASS, int ID)' - `sys/resource.h' (BSD,POSIX): *Note Traditional Scheduling - Functions::. - -`struct protoent * getprotobyname (const char *NAME)' - `netdb.h' (BSD): *Note Protocols Database::. - -`struct protoent * getprotobynumber (int PROTOCOL)' - `netdb.h' (BSD): *Note Protocols Database::. - -`struct protoent * getprotoent (void)' - `netdb.h' (BSD): *Note Protocols Database::. - -`int getpt (void)' - `stdlib.h' (GNU): *Note Allocation::. - -`struct passwd * getpwent (void)' - `pwd.h' (POSIX.1): *Note Scanning All Users::. - -`int getpwent_r (struct passwd *RESULT_BUF, char *BUFFER, int BUFLEN, struct passwd **RESULT)' - `pwd.h' (GNU): *Note Scanning All Users::. - -`struct passwd * getpwnam (const char *NAME)' - `pwd.h' (POSIX.1): *Note Lookup User::. - -`int getpwnam_r (const char *NAME, struct passwd *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd **RESULT)' - `pwd.h' (POSIX.1c): *Note Lookup User::. - -`struct passwd * getpwuid (uid_t UID)' - `pwd.h' (POSIX.1): *Note Lookup User::. - -`int getpwuid_r (uid_t UID, struct passwd *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd **RESULT)' - `pwd.h' (POSIX.1c): *Note Lookup User::. - -`int getrlimit (int RESOURCE, struct rlimit *RLP)' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`int getrlimit64 (int RESOURCE, struct rlimit64 *RLP)' - `sys/resource.h' (Unix98): *Note Limits on Resources::. - -`int getrusage (int PROCESSES, struct rusage *RUSAGE)' - `sys/resource.h' (BSD): *Note Resource Usage::. - -`char * gets (char *S)' - `stdio.h' (ISO): *Note Line Input::. - -`struct servent * getservbyname (const char *NAME, const char *PROTO)' - `netdb.h' (BSD): *Note Services Database::. - -`struct servent * getservbyport (int PORT, const char *PROTO)' - `netdb.h' (BSD): *Note Services Database::. - -`struct servent * getservent (void)' - `netdb.h' (BSD): *Note Services Database::. - -`pid_t getsid (pid_t PID)' - `unistd.h' (SVID): *Note Process Group Functions::. - -`int getsockname (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH-PTR)' - `sys/socket.h' (BSD): *Note Reading Address::. - -`int getsockopt (int SOCKET, int LEVEL, int OPTNAME, void *OPTVAL, socklen_t *OPTLEN-PTR)' - `sys/socket.h' (BSD): *Note Socket Option Functions::. - -`int getsubopt (char **OPTIONP, const char* const *TOKENS, char **VALUEP)' - `stdlib.h' (stdlib.h): *Note Suboptions Example: Suboptions. - -`char * gettext (const char *MSGID)' - `libintl.h' (GNU): *Note Translation with gettext::. - -`int gettimeofday (struct timeval *TP, struct timezone *TZP)' - `sys/time.h' (BSD): *Note High-Resolution Calendar::. - -`uid_t getuid (void)' - `unistd.h' (POSIX.1): *Note Reading Persona::. - -`mode_t getumask (void)' - `sys/stat.h' (GNU): *Note Setting Permissions::. - -`struct utmp * getutent (void)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`int getutent_r (struct utmp *BUFFER, struct utmp **RESULT)' - `utmp.h' (GNU): *Note Manipulating the Database::. - -`struct utmp * getutid (const struct utmp *ID)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`int getutid_r (const struct utmp *ID, struct utmp *BUFFER, struct utmp **RESULT)' - `utmp.h' (GNU): *Note Manipulating the Database::. - -`struct utmp * getutline (const struct utmp *LINE)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`int getutline_r (const struct utmp *LINE, struct utmp *BUFFER, struct utmp **RESULT)' - `utmp.h' (GNU): *Note Manipulating the Database::. - -`int getutmp (const struct utmpx *utmpx, struct utmp *utmp)' - `utmp.h' (GNU): *Note XPG Functions::. - -`int getutmpx (const struct utmp *utmp, struct utmpx *utmpx)' - `utmp.h' (GNU): *Note XPG Functions::. - -`struct utmpx * getutxent (void)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`struct utmpx * getutxid (const struct utmpx *ID)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`struct utmpx * getutxline (const struct utmpx *LINE)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int getw (FILE *STREAM)' - `stdio.h' (SVID): *Note Character Input::. - -`wint_t getwc (FILE *STREAM)' - `wchar.h' (ISO): *Note Character Input::. - -`wint_t getwchar (void)' - `wchar.h' (ISO): *Note Character Input::. - -`wint_t getwchar_unlocked (void)' - `wchar.h' (GNU): *Note Character Input::. - -`wint_t getwc_unlocked (FILE *STREAM)' - `wchar.h' (GNU): *Note Character Input::. - -`char * getwd (char *BUFFER)' - `unistd.h' (BSD): *Note Working Directory::. - -`gid_t' - `sys/types.h' (POSIX.1): *Note Reading Persona::. - -`int glob (const char *PATTERN, int FLAGS, int (*ERRFUNC) (const char *FILENAME, int ERROR-CODE), glob_t *VECTOR-PTR)' - `glob.h' (POSIX.2): *Note Calling Glob::. - -`int glob64 (const char *PATTERN, int FLAGS, int (*ERRFUNC) (const char *FILENAME, int ERROR-CODE), glob64_t *VECTOR-PTR)' - `glob.h' (GNU): *Note Calling Glob::. - -`glob64_t' - `glob.h' (GNU): *Note Calling Glob::. - -`GLOB_ABORTED' - `glob.h' (POSIX.2): *Note Calling Glob::. - -`GLOB_ALTDIRFUNC' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_APPEND' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`GLOB_BRACE' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_DOOFFS' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`GLOB_ERR' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`void globfree (glob_t *PGLOB)' - `glob.h' (POSIX.2): *Note More Flags for Globbing::. - -`void globfree64 (glob64_t *PGLOB)' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_MAGCHAR' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_MARK' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`GLOB_NOCHECK' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`GLOB_NOESCAPE' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`GLOB_NOMAGIC' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_NOMATCH' - `glob.h' (POSIX.2): *Note Calling Glob::. - -`GLOB_NOSORT' - `glob.h' (POSIX.2): *Note Flags for Globbing::. - -`GLOB_NOSPACE' - `glob.h' (POSIX.2): *Note Calling Glob::. - -`GLOB_ONLYDIR' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_PERIOD' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`glob_t' - `glob.h' (POSIX.2): *Note Calling Glob::. - -`GLOB_TILDE' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`GLOB_TILDE_CHECK' - `glob.h' (GNU): *Note More Flags for Globbing::. - -`struct tm * gmtime (const time_t *TIME)' - `time.h' (ISO): *Note Broken-down Time::. - -`struct tm * gmtime_r (const time_t *TIME, struct tm *RESULTP)' - `time.h' (POSIX.1c): *Note Broken-down Time::. - -`_GNU_SOURCE' - (GNU): *Note Feature Test Macros::. - -`int grantpt (int FILEDES)' - `stdlib.h' (SVID, XPG4.2): *Note Allocation::. - -`int gsignal (int SIGNUM)' - `signal.h' (SVID): *Note Signaling Yourself::. - -`int gtty (int FILEDES, struct sgttyb *ATTRIBUTES)' - `sgtty.h' (BSD): *Note BSD Terminal Modes::. - -`char * hasmntopt (const struct mntent *MNT, const char *OPT)' - `mntent.h' (BSD): *Note mtab::. - -`int hcreate (size_t NEL)' - `search.h' (SVID): *Note Hash Search Function::. - -`int hcreate_r (size_t NEL, struct hsearch_data *HTAB)' - `search.h' (GNU): *Note Hash Search Function::. - -`void hdestroy (void)' - `search.h' (SVID): *Note Hash Search Function::. - -`void hdestroy_r (struct hsearch_data *HTAB)' - `search.h' (GNU): *Note Hash Search Function::. - -`HOST_NOT_FOUND' - `netdb.h' (BSD): *Note Host Names::. - -`ENTRY * hsearch (ENTRY ITEM, ACTION ACTION)' - `search.h' (SVID): *Note Hash Search Function::. - -`int hsearch_r (ENTRY ITEM, ACTION ACTION, ENTRY **RETVAL, struct hsearch_data *HTAB)' - `search.h' (GNU): *Note Hash Search Function::. - -`uint32_t htonl (uint32_t HOSTLONG)' - `netinet/in.h' (BSD): *Note Byte Order::. - -`uint16_t htons (uint16_t HOSTSHORT)' - `netinet/in.h' (BSD): *Note Byte Order::. - -`double HUGE_VAL' - `math.h' (ISO): *Note Math Error Reporting::. - -`float HUGE_VALF' - `math.h' (ISO): *Note Math Error Reporting::. - -`long double HUGE_VALL' - `math.h' (ISO): *Note Math Error Reporting::. - -`tcflag_t HUPCL' - `termios.h' (POSIX.1): *Note Control Modes::. - -`double hypot (double X, double Y)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float hypotf (float X, float Y)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double hypotl (long double X, long double Y)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`tcflag_t ICANON' - `termios.h' (POSIX.1): *Note Local Modes::. - -`size_t iconv (iconv_t CD, char **INBUF, size_t *INBYTESLEFT, char **OUTBUF, size_t *OUTBYTESLEFT)' - `iconv.h' (XPG2): *Note Generic Conversion Interface::. - -`int iconv_close (iconv_t CD)' - `iconv.h' (XPG2): *Note Generic Conversion Interface::. - -`iconv_t iconv_open (const char *TOCODE, const char *FROMCODE)' - `iconv.h' (XPG2): *Note Generic Conversion Interface::. - -`iconv_t' - `iconv.h' (XPG2): *Note Generic Conversion Interface::. - -`tcflag_t ICRNL' - `termios.h' (POSIX.1): *Note Input Modes::. - -`tcflag_t IEXTEN' - `termios.h' (POSIX.1): *Note Local Modes::. - -`void if_freenameindex (struct if_nameindex *ptr)' - `net/if.h' (IPv6 basic API): *Note Interface Naming::. - -`char * if_indextoname (unsigned int ifindex, char *ifname)' - `net/if.h' (IPv6 basic API): *Note Interface Naming::. - -`struct if_nameindex * if_nameindex (void)' - `net/if.h' (IPv6 basic API): *Note Interface Naming::. - -`unsigned int if_nametoindex (const char *ifname)' - `net/if.h' (IPv6 basic API): *Note Interface Naming::. - -`size_t IFNAMSIZ' - `net/if.h' (net/if.h): *Note Interface Naming::. - -`int IFTODT (mode_t MODE)' - `dirent.h' (BSD): *Note Directory Entries::. - -`tcflag_t IGNBRK' - `termios.h' (POSIX.1): *Note Input Modes::. - -`tcflag_t IGNCR' - `termios.h' (POSIX.1): *Note Input Modes::. - -`tcflag_t IGNPAR' - `termios.h' (POSIX.1): *Note Input Modes::. - -`int ilogb (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`int ilogbf (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`int ilogbl (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`intmax_t imaxabs (intmax_t NUMBER)' - `inttypes.h' (ISO): *Note Absolute Value::. - -`tcflag_t IMAXBEL' - `termios.h' (BSD): *Note Input Modes::. - -`imaxdiv_t imaxdiv (intmax_t NUMERATOR, intmax_t DENOMINATOR)' - `inttypes.h' (ISO): *Note Integer Division::. - -`imaxdiv_t' - `inttypes.h' (ISO): *Note Integer Division::. - -`struct in6_addr in6addr_any' - `netinet/in.h' (IPv6 basic API): *Note Host Address Data Type::. - -`struct in6_addr in6addr_loopback' - `netinet/in.h' (IPv6 basic API): *Note Host Address Data Type::. - -`uint32_t INADDR_ANY' - `netinet/in.h' (BSD): *Note Host Address Data Type::. - -`uint32_t INADDR_BROADCAST' - `netinet/in.h' (BSD): *Note Host Address Data Type::. - -`uint32_t INADDR_LOOPBACK' - `netinet/in.h' (BSD): *Note Host Address Data Type::. - -`uint32_t INADDR_NONE' - `netinet/in.h' (BSD): *Note Host Address Data Type::. - -`char * index (const char *STRING, int C)' - `string.h' (BSD): *Note Search Functions::. - -`uint32_t inet_addr (const char *NAME)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`int inet_aton (const char *NAME, struct in_addr *ADDR)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`uint32_t inet_lnaof (struct in_addr ADDR)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`struct in_addr inet_makeaddr (uint32_t NET, uint32_t LOCAL)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`uint32_t inet_netof (struct in_addr ADDR)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`uint32_t inet_network (const char *NAME)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`char * inet_ntoa (struct in_addr ADDR)' - `arpa/inet.h' (BSD): *Note Host Address Functions::. - -`const char * inet_ntop (int AF, const void *CP, char *BUF, size_t LEN)' - `arpa/inet.h' (IPv6 basic API): *Note Host Address Functions::. - -`int inet_pton (int AF, const char *CP, void *BUF)' - `arpa/inet.h' (IPv6 basic API): *Note Host Address Functions::. - -`float INFINITY' - `math.h' (ISO): *Note Infinity and NaN::. - -`int initgroups (const char *USER, gid_t GROUP)' - `grp.h' (BSD): *Note Setting Groups::. - -`INIT_PROCESS' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`INIT_PROCESS' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`void * initstate (unsigned int SEED, void *STATE, size_t SIZE)' - `stdlib.h' (BSD): *Note BSD Random::. - -`int initstate_r (unsigned int SEED, char *restrict STATEBUF, size_t STATELEN, struct random_data *restrict BUF)' - `stdlib.h' (GNU): *Note BSD Random::. - -`tcflag_t INLCR' - `termios.h' (POSIX.1): *Note Input Modes::. - -`int innetgr (const char *NETGROUP, const char *HOST, const char *USER, const char *DOMAIN)' - `netdb.h' (BSD): *Note Netgroup Membership::. - -`ino64_t' - `sys/types.h' (Unix98): *Note Attribute Meanings::. - -`ino_t' - `sys/types.h' (POSIX.1): *Note Attribute Meanings::. - -`tcflag_t INPCK' - `termios.h' (POSIX.1): *Note Input Modes::. - -`INT_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`INT_MIN' - `limits.h' (ISO): *Note Range of Type::. - -`int ioctl (int FILEDES, int COMMAND, ...)' - `sys/ioctl.h' (BSD): *Note IOCTLs::. - -`int _IOFBF' - `stdio.h' (ISO): *Note Controlling Buffering::. - -`int _IOLBF' - `stdio.h' (ISO): *Note Controlling Buffering::. - -`int _IONBF' - `stdio.h' (ISO): *Note Controlling Buffering::. - -`int IPPORT_RESERVED' - `netinet/in.h' (BSD): *Note Ports::. - -`int IPPORT_USERRESERVED' - `netinet/in.h' (BSD): *Note Ports::. - -`int isalnum (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isalpha (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isascii (int C)' - `ctype.h' (SVID, BSD): *Note Classification of Characters::. - -`int isatty (int FILEDES)' - `unistd.h' (POSIX.1): *Note Is It a Terminal::. - -`int isblank (int C)' - `ctype.h' (GNU): *Note Classification of Characters::. - -`int iscntrl (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isdigit (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isfinite (_float-type_ X)' - `math.h' (ISO): *Note Floating Point Classes::. - -`int isgraph (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isgreater (_real-floating_ X, _real-floating_ Y)' - `math.h' (ISO): *Note FP Comparison Functions::. - -`int isgreaterequal (_real-floating_ X, _real-floating_ Y)' - `math.h' (ISO): *Note FP Comparison Functions::. - -`tcflag_t ISIG' - `termios.h' (POSIX.1): *Note Local Modes::. - -`int isinf (double X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int isinff (float X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int isinfl (long double X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int isless (_real-floating_ X, _real-floating_ Y)' - `math.h' (ISO): *Note FP Comparison Functions::. - -`int islessequal (_real-floating_ X, _real-floating_ Y)' - `math.h' (ISO): *Note FP Comparison Functions::. - -`int islessgreater (_real-floating_ X, _real-floating_ Y)' - `math.h' (ISO): *Note FP Comparison Functions::. - -`int islower (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isnan (_float-type_ X)' - `math.h' (ISO): *Note Floating Point Classes::. - -`int isnan (double X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int isnanf (float X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int isnanl (long double X)' - `math.h' (BSD): *Note Floating Point Classes::. - -`int isnormal (_float-type_ X)' - `math.h' (ISO): *Note Floating Point Classes::. - -`_ISOC99_SOURCE' - (GNU): *Note Feature Test Macros::. - -`int isprint (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int ispunct (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int isspace (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`tcflag_t ISTRIP' - `termios.h' (POSIX.1): *Note Input Modes::. - -`int isunordered (_real-floating_ X, _real-floating_ Y)' - `math.h' (ISO): *Note FP Comparison Functions::. - -`int isupper (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`int iswalnum (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswalpha (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswblank (wint_t WC)' - `wctype.h' (GNU): *Note Classification of Wide Characters::. - -`int iswcntrl (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswctype (wint_t WC, wctype_t DESC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswdigit (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswgraph (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswlower (wint_t WC)' - `ctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswprint (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswpunct (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswspace (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswupper (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int iswxdigit (wint_t WC)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int isxdigit (int C)' - `ctype.h' (ISO): *Note Classification of Characters::. - -`ITIMER_PROF' - `sys/time.h' (BSD): *Note Setting an Alarm::. - -`ITIMER_REAL' - `sys/time.h' (BSD): *Note Setting an Alarm::. - -`ITIMER_VIRTUAL' - `sys/time.h' (BSD): *Note Setting an Alarm::. - -`tcflag_t IXANY' - `termios.h' (BSD): *Note Input Modes::. - -`tcflag_t IXOFF' - `termios.h' (POSIX.1): *Note Input Modes::. - -`tcflag_t IXON' - `termios.h' (POSIX.1): *Note Input Modes::. - -`double j0 (double X)' - `math.h' (SVID): *Note Special Functions::. - -`float j0f (float X)' - `math.h' (SVID): *Note Special Functions::. - -`long double j0l (long double X)' - `math.h' (SVID): *Note Special Functions::. - -`double j1 (double X)' - `math.h' (SVID): *Note Special Functions::. - -`float j1f (float X)' - `math.h' (SVID): *Note Special Functions::. - -`long double j1l (long double X)' - `math.h' (SVID): *Note Special Functions::. - -`jmp_buf' - `setjmp.h' (ISO): *Note Non-Local Details::. - -`double jn (int n, double X)' - `math.h' (SVID): *Note Special Functions::. - -`float jnf (int n, float X)' - `math.h' (SVID): *Note Special Functions::. - -`long double jnl (int n, long double X)' - `math.h' (SVID): *Note Special Functions::. - -`long int jrand48 (unsigned short int XSUBI[3])' - `stdlib.h' (SVID): *Note SVID Random::. - -`int jrand48_r (unsigned short int XSUBI[3], struct drand48_data *BUFFER, long int *RESULT)' - `stdlib.h' (GNU): *Note SVID Random::. - -`int kill (pid_t PID, int SIGNUM)' - `signal.h' (POSIX.1): *Note Signaling Another Process::. - -`int killpg (int PGID, int SIGNUM)' - `signal.h' (BSD): *Note Signaling Another Process::. - -`char * l64a (long int N)' - `stdlib.h' (XPG): *Note Encode Binary Data::. - -`long int labs (long int NUMBER)' - `stdlib.h' (ISO): *Note Absolute Value::. - -`LANG' - `locale.h' (ISO): *Note Locale Categories::. - -`LC_ALL' - `locale.h' (ISO): *Note Locale Categories::. - -`LC_COLLATE' - `locale.h' (ISO): *Note Locale Categories::. - -`LC_CTYPE' - `locale.h' (ISO): *Note Locale Categories::. - -`LC_MESSAGES' - `locale.h' (XOPEN): *Note Locale Categories::. - -`LC_MONETARY' - `locale.h' (ISO): *Note Locale Categories::. - -`LC_NUMERIC' - `locale.h' (ISO): *Note Locale Categories::. - -`void lcong48 (unsigned short int PARAM[7])' - `stdlib.h' (SVID): *Note SVID Random::. - -`int lcong48_r (unsigned short int PARAM[7], struct drand48_data *BUFFER)' - `stdlib.h' (GNU): *Note SVID Random::. - -`int L_ctermid' - `stdio.h' (POSIX.1): *Note Identifying the Terminal::. - -`LC_TIME' - `locale.h' (ISO): *Note Locale Categories::. - -`int L_cuserid' - `stdio.h' (POSIX.1): *Note Who Logged In::. - -`double ldexp (double VALUE, int EXPONENT)' - `math.h' (ISO): *Note Normalization Functions::. - -`float ldexpf (float VALUE, int EXPONENT)' - `math.h' (ISO): *Note Normalization Functions::. - -`long double ldexpl (long double VALUE, int EXPONENT)' - `math.h' (ISO): *Note Normalization Functions::. - -`ldiv_t ldiv (long int NUMERATOR, long int DENOMINATOR)' - `stdlib.h' (ISO): *Note Integer Division::. - -`ldiv_t' - `stdlib.h' (ISO): *Note Integer Division::. - -`void * lfind (const void *KEY, void *BASE, size_t *NMEMB, size_t SIZE, comparison_fn_t COMPAR)' - `search.h' (SVID): *Note Array Search Function::. - -`double lgamma (double X)' - `math.h' (SVID): *Note Special Functions::. - -`float lgammaf (float X)' - `math.h' (SVID): *Note Special Functions::. - -`float lgammaf_r (float X, int *SIGNP)' - `math.h' (XPG): *Note Special Functions::. - -`long double lgammal (long double X)' - `math.h' (SVID): *Note Special Functions::. - -`long double lgammal_r (long double X, int *SIGNP)' - `math.h' (XPG): *Note Special Functions::. - -`double lgamma_r (double X, int *SIGNP)' - `math.h' (XPG): *Note Special Functions::. - -`L_INCR' - `sys/file.h' (BSD): *Note File Positioning::. - -`int LINE_MAX' - `limits.h' (POSIX.2): *Note Utility Limits::. - -`int link (const char *OLDNAME, const char *NEWNAME)' - `unistd.h' (POSIX.1): *Note Hard Links::. - -`int LINK_MAX' - `limits.h' (POSIX.1): *Note Limits for Files::. - -`int lio_listio (int MODE, struct aiocb *const LIST[], int NENT, struct sigevent *SIG)' - `aio.h' (POSIX.1b): *Note Asynchronous Reads/Writes::. - -`int lio_listio64 (int MODE, struct aiocb *const LIST, int NENT, struct sigevent *SIG)' - `aio.h' (Unix98): *Note Asynchronous Reads/Writes::. - -`int listen (int SOCKET, unsigned int N)' - `sys/socket.h' (BSD): *Note Listening::. - -`long long int llabs (long long int NUMBER)' - `stdlib.h' (ISO): *Note Absolute Value::. - -`lldiv_t lldiv (long long int NUMERATOR, long long int DENOMINATOR)' - `stdlib.h' (ISO): *Note Integer Division::. - -`lldiv_t' - `stdlib.h' (ISO): *Note Integer Division::. - -`long long int llrint (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long long int llrintf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long long int llrintl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long long int llround (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long long int llroundf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long long int llroundl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`struct lconv * localeconv (void)' - `locale.h' (ISO): *Note The Lame Way to Locale Data::. - -`struct tm * localtime (const time_t *TIME)' - `time.h' (ISO): *Note Broken-down Time::. - -`struct tm * localtime_r (const time_t *TIME, struct tm *RESULTP)' - `time.h' (POSIX.1c): *Note Broken-down Time::. - -`double log (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double log10 (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float log10f (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double log10l (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double log1p (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float log1pf (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double log1pl (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double log2 (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float log2f (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double log2l (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double logb (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float logbf (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double logbl (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float logf (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`void login (const struct utmp *ENTRY)' - `utmp.h' (BSD): *Note Logging In and Out::. - -`LOGIN_PROCESS' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`LOGIN_PROCESS' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int login_tty (int FILEDES)' - `utmp.h' (BSD): *Note Logging In and Out::. - -`long double logl (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`int logout (const char *UT_LINE)' - `utmp.h' (BSD): *Note Logging In and Out::. - -`void logwtmp (const char *UT_LINE, const char *UT_NAME, const char *UT_HOST)' - `utmp.h' (BSD): *Note Logging In and Out::. - -`void longjmp (jmp_buf STATE, int VALUE)' - `setjmp.h' (ISO): *Note Non-Local Details::. - -`LONG_LONG_MAX' - `limits.h' (GNU): *Note Range of Type::. - -`LONG_LONG_MIN' - `limits.h' (GNU): *Note Range of Type::. - -`LONG_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`LONG_MIN' - `limits.h' (ISO): *Note Range of Type::. - -`long int lrand48 (void)' - `stdlib.h' (SVID): *Note SVID Random::. - -`int lrand48_r (struct drand48_data *BUFFER, double *RESULT)' - `stdlib.h' (GNU): *Note SVID Random::. - -`long int lrint (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long int lrintf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long int lrintl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long int lround (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long int lroundf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long int lroundl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`void * lsearch (const void *KEY, void *BASE, size_t *NMEMB, size_t SIZE, comparison_fn_t COMPAR)' - `search.h' (SVID): *Note Array Search Function::. - -`off_t lseek (int FILEDES, off_t OFFSET, int WHENCE)' - `unistd.h' (POSIX.1): *Note File Position Primitive::. - -`off64_t lseek64 (int FILEDES, off64_t OFFSET, int WHENCE)' - `unistd.h' (Unix98): *Note File Position Primitive::. - -`L_SET' - `sys/file.h' (BSD): *Note File Positioning::. - -`int lstat (const char *FILENAME, struct stat *BUF)' - `sys/stat.h' (BSD): *Note Reading Attributes::. - -`int lstat64 (const char *FILENAME, struct stat64 *BUF)' - `sys/stat.h' (Unix98): *Note Reading Attributes::. - -`int L_tmpnam' - `stdio.h' (ISO): *Note Temporary Files::. - -`L_XTND' - `sys/file.h' (BSD): *Note File Positioning::. - -`int madvise (void *ADDR, size_t LENGTH, int ADVICE)' - `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. - -`void makecontext (ucontext_t *UCP, void (*FUNC) (void), int ARGC, ...)' - `ucontext.h' (SVID): *Note System V contexts::. - -`struct mallinfo mallinfo (void)' - `malloc.h' (SVID): *Note Statistics of Malloc::. - -`void * malloc (size_t SIZE)' - `malloc.h', `stdlib.h' (ISO): *Note Basic Allocation::. - -`__malloc_hook' - `malloc.h' (GNU): *Note Hooks for Malloc::. - -`__malloc_initialize_hook' - `malloc.h' (GNU): *Note Hooks for Malloc::. - -`int MAX_CANON' - `limits.h' (POSIX.1): *Note Limits for Files::. - -`int MAX_INPUT' - `limits.h' (POSIX.1): *Note Limits for Files::. - -`int MAXNAMLEN' - `dirent.h' (BSD): *Note Limits for Files::. - -`int MAXSYMLINKS' - `sys/param.h' (BSD): *Note Symbolic Links::. - -`int MB_CUR_MAX' - `stdlib.h' (ISO): *Note Selecting the Conversion::. - -`int mblen (const char *STRING, size_t SIZE)' - `stdlib.h' (ISO): *Note Non-reentrant Character Conversion::. - -`int MB_LEN_MAX' - `limits.h' (ISO): *Note Selecting the Conversion::. - -`size_t mbrlen (const char *restrict S, size_t N, mbstate_t *PS)' - `wchar.h' (ISO): *Note Converting a Character::. - -`size_t mbrtowc (wchar_t *restrict PWC, const char *restrict S, size_t N, mbstate_t *restrict PS)' - `wchar.h' (ISO): *Note Converting a Character::. - -`int mbsinit (const mbstate_t *PS)' - `wchar.h' (ISO): *Note Keeping the state::. - -`size_t mbsnrtowcs (wchar_t *restrict DST, const char **restrict SRC, size_t NMC, size_t LEN, mbstate_t *restrict PS)' - `wchar.h' (GNU): *Note Converting Strings::. - -`size_t mbsrtowcs (wchar_t *restrict DST, const char **restrict SRC, size_t LEN, mbstate_t *restrict PS)' - `wchar.h' (ISO): *Note Converting Strings::. - -`mbstate_t' - `wchar.h' (ISO): *Note Keeping the state::. - -`size_t mbstowcs (wchar_t *WSTRING, const char *STRING, size_t SIZE)' - `stdlib.h' (ISO): *Note Non-reentrant String Conversion::. - -`int mbtowc (wchar_t *restrict RESULT, const char *restrict STRING, size_t SIZE)' - `stdlib.h' (ISO): *Note Non-reentrant Character Conversion::. - -`int mcheck (void (*ABORTFN) (enum mcheck_status STATUS))' - `mcheck.h' (GNU): *Note Heap Consistency Checking::. - -`tcflag_t MDMBUF' - `termios.h' (BSD): *Note Control Modes::. - -`void * memalign (size_t BOUNDARY, size_t SIZE)' - `malloc.h', `stdlib.h' (BSD): *Note Aligned Memory Blocks::. - -`__memalign_hook' - `malloc.h' (GNU): *Note Hooks for Malloc::. - -`void * memccpy (void *restrict TO, const void *restrict FROM, int C, size_t SIZE)' - `string.h' (SVID): *Note Copying and Concatenation::. - -`void * memchr (const void *BLOCK, int C, size_t SIZE)' - `string.h' (ISO): *Note Search Functions::. - -`int memcmp (const void *A1, const void *A2, size_t SIZE)' - `string.h' (ISO): *Note String/Array Comparison::. - -`void * memcpy (void *restrict TO, const void *restrict FROM, size_t SIZE)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`void * memfrob (void *MEM, size_t LENGTH)' - `string.h' (GNU): *Note Trivial Encryption::. - -`void * memmem (const void *HAYSTACK, size_t HAYSTACK-LEN, - const void *NEEDLE, size_t NEEDLE-LEN)' - `string.h' (GNU): *Note Search Functions::. - -`void * memmove (void *TO, const void *FROM, size_t SIZE)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`void * mempcpy (void *restrict TO, const void *restrict FROM, size_t SIZE)' - `string.h' (GNU): *Note Copying and Concatenation::. - -`void * memrchr (const void *BLOCK, int C, size_t SIZE)' - `string.h' (GNU): *Note Search Functions::. - -`void * memset (void *BLOCK, int C, size_t SIZE)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`int mkdir (const char *FILENAME, mode_t MODE)' - `sys/stat.h' (POSIX.1): *Note Creating Directories::. - -`char * mkdtemp (char *TEMPLATE)' - `stdlib.h' (BSD): *Note Temporary Files::. - -`int mkfifo (const char *FILENAME, mode_t MODE)' - `sys/stat.h' (POSIX.1): *Note FIFO Special Files::. - -`int mknod (const char *FILENAME, int MODE, int DEV)' - `sys/stat.h' (BSD): *Note Making Special Files::. - -`int mkstemp (char *TEMPLATE)' - `stdlib.h' (BSD): *Note Temporary Files::. - -`char * mktemp (char *TEMPLATE)' - `stdlib.h' (Unix): *Note Temporary Files::. - -`time_t mktime (struct tm *BROKENTIME)' - `time.h' (ISO): *Note Broken-down Time::. - -`int mlock (const void *ADDR, size_t LEN)' - `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. - -`int mlockall (int FLAGS)' - `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. - -`void * mmap (void *ADDRESS, size_t LENGTH,int PROTECT, int FLAGS, int FILEDES, off_t OFFSET)' - `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. - -`void * mmap64 (void *ADDRESS, size_t LENGTH,int PROTECT, int FLAGS, int FILEDES, off64_t OFFSET)' - `sys/mman.h' (LFS): *Note Memory-mapped I/O::. - -`mode_t' - `sys/types.h' (POSIX.1): *Note Attribute Meanings::. - -`double modf (double VALUE, double *INTEGER-PART)' - `math.h' (ISO): *Note Rounding Functions::. - -`float modff (float VALUE, float *INTEGER-PART)' - `math.h' (ISO): *Note Rounding Functions::. - -`long double modfl (long double VALUE, long double *INTEGER-PART)' - `math.h' (ISO): *Note Rounding Functions::. - -`int mount (const char *SPECIAL_FILE, const char *DIR, const char *FSTYPE, unsigned long int OPTIONS, const void *DATA)' - `sys/mount.h' (SVID, BSD): *Note Mount-Unmount-Remount::. - -`long int mrand48 (void)' - `stdlib.h' (SVID): *Note SVID Random::. - -`int mrand48_r (struct drand48_data *BUFFER, double *RESULT)' - `stdlib.h' (GNU): *Note SVID Random::. - -`void * mremap (void *ADDRESS, size_t LENGTH, size_t NEW_LENGTH, int FLAG)' - `sys/mman.h' (GNU): *Note Memory-mapped I/O::. - -`int MSG_DONTROUTE' - `sys/socket.h' (BSD): *Note Socket Data Options::. - -`int MSG_OOB' - `sys/socket.h' (BSD): *Note Socket Data Options::. - -`int MSG_PEEK' - `sys/socket.h' (BSD): *Note Socket Data Options::. - -`int msync (void *ADDRESS, size_t LENGTH, int FLAGS)' - `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. - -`void mtrace (void)' - `mcheck.h' (GNU): *Note Tracing malloc::. - -`int munlock (const void *ADDR, size_t LEN)' - `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. - -`int munlockall (void)' - `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. - -`int munmap (void *ADDR, size_t LENGTH)' - `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. - -`void muntrace (void)' - `mcheck.h' (GNU): *Note Tracing malloc::. - -`int NAME_MAX' - `limits.h' (POSIX.1): *Note Limits for Files::. - -`float NAN' - `math.h' (GNU): *Note Infinity and NaN::. - -`double nan (const char *TAGP)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`float nanf (const char *TAGP)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`long double nanl (const char *TAGP)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`int nanosleep (const struct timespec *REQUESTED_TIME, struct timespec *REMAINING)' - `time.h' (POSIX.1): *Note Sleeping::. - -`int NCCS' - `termios.h' (POSIX.1): *Note Mode Data Types::. - -`double nearbyint (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`float nearbyintf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long double nearbyintl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`NEW_TIME' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`NEW_TIME' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`double nextafter (double X, double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`float nextafterf (float X, float Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`long double nextafterl (long double X, long double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`double nexttoward (double X, long double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`float nexttowardf (float X, long double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`long double nexttowardl (long double X, long double Y)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`int nftw (const char *FILENAME, __nftw_func_t FUNC, int DESCRIPTORS, int FLAG)' - `ftw.h' (XPG4.2): *Note Working with Directory Trees::. - -`int nftw64 (const char *FILENAME, __nftw64_func_t FUNC, int DESCRIPTORS, int FLAG)' - `ftw.h' (Unix98): *Note Working with Directory Trees::. - -`__nftw64_func_t' - `ftw.h' (GNU): *Note Working with Directory Trees::. - -`__nftw_func_t' - `ftw.h' (GNU): *Note Working with Directory Trees::. - -`char * ngettext (const char *MSGID1, const char *MSGID2, unsigned long int N)' - `libintl.h' (GNU): *Note Advanced gettext functions::. - -`int NGROUPS_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`int nice (int INCREMENT)' - `unistd.h' (BSD): *Note Traditional Scheduling Functions::. - -`nlink_t' - `sys/types.h' (POSIX.1): *Note Attribute Meanings::. - -`char * nl_langinfo (nl_item ITEM)' - `langinfo.h' (XOPEN): *Note The Elegant and Fast Way::. - -`NO_ADDRESS' - `netdb.h' (BSD): *Note Host Names::. - -`tcflag_t NOFLSH' - `termios.h' (POSIX.1): *Note Local Modes::. - -`tcflag_t NOKERNINFO' - `termios.h' (BSD): *Note Local Modes::. - -`NO_RECOVERY' - `netdb.h' (BSD): *Note Host Names::. - -`long int nrand48 (unsigned short int XSUBI[3])' - `stdlib.h' (SVID): *Note SVID Random::. - -`int nrand48_r (unsigned short int XSUBI[3], struct drand48_data *BUFFER, long int *RESULT)' - `stdlib.h' (GNU): *Note SVID Random::. - -`int NSIG' - `signal.h' (BSD): *Note Standard Signals::. - -`uint32_t ntohl (uint32_t NETLONG)' - `netinet/in.h' (BSD): *Note Byte Order::. - -`uint16_t ntohs (uint16_t NETSHORT)' - `netinet/in.h' (BSD): *Note Byte Order::. - -`int ntp_adjtime (struct timex *TPTR)' - `sys/timex.h' (GNU): *Note High Accuracy Clock::. - -`int ntp_gettime (struct ntptimeval *TPTR)' - `sys/timex.h' (GNU): *Note High Accuracy Clock::. - -`void * NULL' - `stddef.h' (ISO): *Note Null Pointer Constant::. - -`int O_ACCMODE' - `fcntl.h' (POSIX.1): *Note Access Modes::. - -`int O_APPEND' - `fcntl.h' (POSIX.1): *Note Operating Modes::. - -`int O_ASYNC' - `fcntl.h' (BSD): *Note Operating Modes::. - -`void obstack_1grow (struct obstack *OBSTACK-PTR, char C)' - `obstack.h' (GNU): *Note Growing Objects::. - -`void obstack_1grow_fast (struct obstack *OBSTACK-PTR, char C)' - `obstack.h' (GNU): *Note Extra Fast Growing::. - -`int obstack_alignment_mask (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Obstacks Data Alignment::. - -`void * obstack_alloc (struct obstack *OBSTACK-PTR, int SIZE)' - `obstack.h' (GNU): *Note Allocation in an Obstack::. - -`obstack_alloc_failed_handler' - `obstack.h' (GNU): *Note Preparing for Obstacks::. - -`void * obstack_base (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Status of an Obstack::. - -`void obstack_blank (struct obstack *OBSTACK-PTR, int SIZE)' - `obstack.h' (GNU): *Note Growing Objects::. - -`void obstack_blank_fast (struct obstack *OBSTACK-PTR, int SIZE)' - `obstack.h' (GNU): *Note Extra Fast Growing::. - -`int obstack_chunk_size (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Obstack Chunks::. - -`void * obstack_copy (struct obstack *OBSTACK-PTR, void *ADDRESS, int SIZE)' - `obstack.h' (GNU): *Note Allocation in an Obstack::. - -`void * obstack_copy0 (struct obstack *OBSTACK-PTR, void *ADDRESS, int SIZE)' - `obstack.h' (GNU): *Note Allocation in an Obstack::. - -`void * obstack_finish (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Growing Objects::. - -`void obstack_free (struct obstack *OBSTACK-PTR, void *OBJECT)' - `obstack.h' (GNU): *Note Freeing Obstack Objects::. - -`void obstack_grow (struct obstack *OBSTACK-PTR, void *DATA, int SIZE)' - `obstack.h' (GNU): *Note Growing Objects::. - -`void obstack_grow0 (struct obstack *OBSTACK-PTR, void *DATA, int SIZE)' - `obstack.h' (GNU): *Note Growing Objects::. - -`int obstack_init (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Preparing for Obstacks::. - -`void obstack_int_grow (struct obstack *OBSTACK-PTR, int DATA)' - `obstack.h' (GNU): *Note Growing Objects::. - -`void obstack_int_grow_fast (struct obstack *OBSTACK-PTR, int DATA)' - `obstack.h' (GNU): *Note Extra Fast Growing::. - -`void * obstack_next_free (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Status of an Obstack::. - -`int obstack_object_size (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Growing Objects::. - -`int obstack_object_size (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Status of an Obstack::. - -`int obstack_printf (struct obstack *OBSTACK, const char *TEMPLATE, ...)' - `stdio.h' (GNU): *Note Dynamic Output::. - -`void obstack_ptr_grow (struct obstack *OBSTACK-PTR, void *DATA)' - `obstack.h' (GNU): *Note Growing Objects::. - -`void obstack_ptr_grow_fast (struct obstack *OBSTACK-PTR, void *DATA)' - `obstack.h' (GNU): *Note Extra Fast Growing::. - -`int obstack_room (struct obstack *OBSTACK-PTR)' - `obstack.h' (GNU): *Note Extra Fast Growing::. - -`int obstack_vprintf (struct obstack *OBSTACK, const char *TEMPLATE, va_list AP)' - `stdio.h' (GNU): *Note Variable Arguments Output::. - -`int O_CREAT' - `fcntl.h' (POSIX.1): *Note Open-time Flags::. - -`int O_EXCL' - `fcntl.h' (POSIX.1): *Note Open-time Flags::. - -`int O_EXEC' - `fcntl.h' (GNU): *Note Access Modes::. - -`int O_EXLOCK' - `fcntl.h' (BSD): *Note Open-time Flags::. - -`off64_t' - `sys/types.h' (Unix98): *Note File Position Primitive::. - -`size_t offsetof (TYPE, MEMBER)' - `stddef.h' (ISO): *Note Structure Measurement::. - -`off_t' - `sys/types.h' (POSIX.1): *Note File Position Primitive::. - -`int O_FSYNC' - `fcntl.h' (BSD): *Note Operating Modes::. - -`int O_IGNORE_CTTY' - `fcntl.h' (GNU): *Note Open-time Flags::. - -`OLD_TIME' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`OLD_TIME' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int O_NDELAY' - `fcntl.h' (BSD): *Note Operating Modes::. - -`int on_exit (void (*FUNCTION)(int STATUS, void *ARG), void *ARG)' - `stdlib.h' (SunOS): *Note Cleanups on Exit::. - -`tcflag_t ONLCR' - `termios.h' (BSD): *Note Output Modes::. - -`int O_NOATIME' - `fcntl.h' (GNU): *Note Operating Modes::. - -`int O_NOCTTY' - `fcntl.h' (POSIX.1): *Note Open-time Flags::. - -`tcflag_t ONOEOT' - `termios.h' (BSD): *Note Output Modes::. - -`int O_NOLINK' - `fcntl.h' (GNU): *Note Open-time Flags::. - -`int O_NONBLOCK' - `fcntl.h' (POSIX.1): *Note Open-time Flags::. - -`int O_NONBLOCK' - `fcntl.h' (POSIX.1): *Note Operating Modes::. - -`int O_NOTRANS' - `fcntl.h' (GNU): *Note Open-time Flags::. - -`int open (const char *FILENAME, int FLAGS[, mode_t MODE])' - `fcntl.h' (POSIX.1): *Note Opening and Closing Files::. - -`int open64 (const char *FILENAME, int FLAGS[, mode_t MODE])' - `fcntl.h' (Unix98): *Note Opening and Closing Files::. - -`DIR * opendir (const char *DIRNAME)' - `dirent.h' (POSIX.1): *Note Opening a Directory::. - -`void openlog (char *IDENT, int OPTION,' - `syslog.h' (BSD): *Note openlog::. - -`int OPEN_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`FILE * open_memstream (char **PTR, size_t *SIZELOC)' - `stdio.h' (GNU): *Note String Streams::. - -`FILE * open_obstack_stream (struct obstack *OBSTACK)' - `stdio.h' (GNU): *Note Obstack Streams::. - -`int openpty (int *AMASTER, int *ASLAVE, char *NAME, struct termios *TERMP, struct winsize *WINP)' - `pty.h' (BSD): *Note Pseudo-Terminal Pairs::. - -`tcflag_t OPOST' - `termios.h' (POSIX.1): *Note Output Modes::. - -`char * optarg' - `unistd.h' (POSIX.2): *Note Using Getopt::. - -`int opterr' - `unistd.h' (POSIX.2): *Note Using Getopt::. - -`int optind' - `unistd.h' (POSIX.2): *Note Using Getopt::. - -`OPTION_ALIAS' - `argp.h' (GNU): *Note Argp Option Flags::. - -`OPTION_ARG_OPTIONAL' - `argp.h' (GNU): *Note Argp Option Flags::. - -`OPTION_DOC' - `argp.h' (GNU): *Note Argp Option Flags::. - -`OPTION_HIDDEN' - `argp.h' (GNU): *Note Argp Option Flags::. - -`OPTION_NO_USAGE' - `argp.h' (GNU): *Note Argp Option Flags::. - -`int optopt' - `unistd.h' (POSIX.2): *Note Using Getopt::. - -`int O_RDONLY' - `fcntl.h' (POSIX.1): *Note Access Modes::. - -`int O_RDWR' - `fcntl.h' (POSIX.1): *Note Access Modes::. - -`int O_READ' - `fcntl.h' (GNU): *Note Access Modes::. - -`int O_SHLOCK' - `fcntl.h' (BSD): *Note Open-time Flags::. - -`int O_SYNC' - `fcntl.h' (BSD): *Note Operating Modes::. - -`int O_TRUNC' - `fcntl.h' (POSIX.1): *Note Open-time Flags::. - -`int O_WRITE' - `fcntl.h' (GNU): *Note Access Modes::. - -`int O_WRONLY' - `fcntl.h' (POSIX.1): *Note Access Modes::. - -`tcflag_t OXTABS' - `termios.h' (BSD): *Note Output Modes::. - -`PA_CHAR' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_DOUBLE' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_FLAG_LONG' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_FLAG_LONG_DOUBLE' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_FLAG_LONG_LONG' - `printf.h' (GNU): *Note Parsing a Template String::. - -`int PA_FLAG_MASK' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_FLAG_PTR' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_FLAG_SHORT' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_FLOAT' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_INT' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_LAST' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_POINTER' - `printf.h' (GNU): *Note Parsing a Template String::. - -`tcflag_t PARENB' - `termios.h' (POSIX.1): *Note Control Modes::. - -`tcflag_t PARMRK' - `termios.h' (POSIX.1): *Note Input Modes::. - -`tcflag_t PARODD' - `termios.h' (POSIX.1): *Note Control Modes::. - -`size_t parse_printf_format (const char *TEMPLATE, size_t N, int *ARGTYPES)' - `printf.h' (GNU): *Note Parsing a Template String::. - -`PA_STRING' - `printf.h' (GNU): *Note Parsing a Template String::. - -`long int pathconf (const char *FILENAME, int PARAMETER)' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`int PATH_MAX' - `limits.h' (POSIX.1): *Note Limits for Files::. - -`int pause ()' - `unistd.h' (POSIX.1): *Note Using Pause::. - -`_PC_ASYNC_IO' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_CHOWN_RESTRICTED' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_FILESIZEBITS' - `unistd.h' (LFS): *Note Pathconf::. - -`_PC_LINK_MAX' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`int pclose (FILE *STREAM)' - `stdio.h' (POSIX.2, SVID, BSD): *Note Pipe to a Subprocess::. - -`_PC_MAX_CANON' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_MAX_INPUT' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_NAME_MAX' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_NO_TRUNC' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_PATH_MAX' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_PIPE_BUF' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_PRIO_IO' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_REC_INCR_XFER_SIZE' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_REC_MAX_XFER_SIZE' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_REC_MIN_XFER_SIZE' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_REC_XFER_ALIGN' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_SOCK_MAXBUF' - `unistd.h' (POSIX.1g): *Note Pathconf::. - -`_PC_SYNC_IO' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`_PC_VDISABLE' - `unistd.h' (POSIX.1): *Note Pathconf::. - -`tcflag_t PENDIN' - `termios.h' (BSD): *Note Local Modes::. - -`void perror (const char *MESSAGE)' - `stdio.h' (ISO): *Note Error Messages::. - -`int PF_FILE' - `sys/socket.h' (GNU): *Note Local Namespace Details::. - -`int PF_INET' - `sys/socket.h' (BSD): *Note Internet Namespace::. - -`int PF_INET6' - `sys/socket.h' (X/Open): *Note Internet Namespace::. - -`int PF_LOCAL' - `sys/socket.h' (POSIX): *Note Local Namespace Details::. - -`int PF_UNIX' - `sys/socket.h' (BSD): *Note Local Namespace Details::. - -`pid_t' - `sys/types.h' (POSIX.1): *Note Process Identification::. - -`int pipe (int FILEDES[2])' - `unistd.h' (POSIX.1): *Note Creating a Pipe::. - -`int PIPE_BUF' - `limits.h' (POSIX.1): *Note Limits for Files::. - -`FILE * popen (const char *COMMAND, const char *MODE)' - `stdio.h' (POSIX.2, SVID, BSD): *Note Pipe to a Subprocess::. - -`_POSIX2_BC_BASE_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`_POSIX2_BC_DIM_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`_POSIX2_BC_SCALE_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`_POSIX2_BC_STRING_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`int _POSIX2_C_DEV' - `unistd.h' (POSIX.2): *Note System Options::. - -`_POSIX2_COLL_WEIGHTS_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`long int _POSIX2_C_VERSION' - `unistd.h' (POSIX.2): *Note Version Supported::. - -`_POSIX2_EQUIV_CLASS_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`_POSIX2_EXPR_NEST_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`int _POSIX2_FORT_DEV' - `unistd.h' (POSIX.2): *Note System Options::. - -`int _POSIX2_FORT_RUN' - `unistd.h' (POSIX.2): *Note System Options::. - -`_POSIX2_LINE_MAX' - `limits.h' (POSIX.2): *Note Utility Minimums::. - -`int _POSIX2_LOCALEDEF' - `unistd.h' (POSIX.2): *Note System Options::. - -`_POSIX2_RE_DUP_MAX' - `limits.h' (POSIX.2): *Note Minimums::. - -`int _POSIX2_SW_DEV' - `unistd.h' (POSIX.2): *Note System Options::. - -`_POSIX_AIO_LISTIO_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`_POSIX_AIO_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`_POSIX_ARG_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`_POSIX_CHILD_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`int _POSIX_CHOWN_RESTRICTED' - `unistd.h' (POSIX.1): *Note Options for Files::. - -`_POSIX_C_SOURCE' - (POSIX.2): *Note Feature Test Macros::. - -`int _POSIX_JOB_CONTROL' - `unistd.h' (POSIX.1): *Note System Options::. - -`_POSIX_LINK_MAX' - `limits.h' (POSIX.1): *Note File Minimums::. - -`_POSIX_MAX_CANON' - `limits.h' (POSIX.1): *Note File Minimums::. - -`_POSIX_MAX_INPUT' - `limits.h' (POSIX.1): *Note File Minimums::. - -`int posix_memalign (void **MEMPTR, size_t ALIGNMENT, size_t SIZE)' - `stdlib.h' (POSIX): *Note Aligned Memory Blocks::. - -`_POSIX_NAME_MAX' - `limits.h' (POSIX.1): *Note File Minimums::. - -`_POSIX_NGROUPS_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`int _POSIX_NO_TRUNC' - `unistd.h' (POSIX.1): *Note Options for Files::. - -`_POSIX_OPEN_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`_POSIX_PATH_MAX' - `limits.h' (POSIX.1): *Note File Minimums::. - -`_POSIX_PIPE_BUF' - `limits.h' (POSIX.1): *Note File Minimums::. - -`POSIX_REC_INCR_XFER_SIZE' - `limits.h' (POSIX.1): *Note File Minimums::. - -`POSIX_REC_MAX_XFER_SIZE' - `limits.h' (POSIX.1): *Note File Minimums::. - -`POSIX_REC_MIN_XFER_SIZE' - `limits.h' (POSIX.1): *Note File Minimums::. - -`POSIX_REC_XFER_ALIGN' - `limits.h' (POSIX.1): *Note File Minimums::. - -`int _POSIX_SAVED_IDS' - `unistd.h' (POSIX.1): *Note System Options::. - -`_POSIX_SOURCE' - (POSIX.1): *Note Feature Test Macros::. - -`_POSIX_SSIZE_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`_POSIX_STREAM_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`_POSIX_TZNAME_MAX' - `limits.h' (POSIX.1): *Note Minimums::. - -`unsigned char _POSIX_VDISABLE' - `unistd.h' (POSIX.1): *Note Options for Files::. - -`long int _POSIX_VERSION' - `unistd.h' (POSIX.1): *Note Version Supported::. - -`double pow (double BASE, double POWER)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`double pow10 (double X)' - `math.h' (GNU): *Note Exponents and Logarithms::. - -`float pow10f (float X)' - `math.h' (GNU): *Note Exponents and Logarithms::. - -`long double pow10l (long double X)' - `math.h' (GNU): *Note Exponents and Logarithms::. - -`float powf (float BASE, float POWER)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double powl (long double BASE, long double POWER)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`ssize_t pread (int FILEDES, void *BUFFER, size_t SIZE, off_t OFFSET)' - `unistd.h' (Unix98): *Note I/O Primitives::. - -`ssize_t pread64 (int FILEDES, void *BUFFER, size_t SIZE, off64_t OFFSET)' - `unistd.h' (Unix98): *Note I/O Primitives::. - -`int printf (const char *TEMPLATE, ...)' - `stdio.h' (ISO): *Note Formatted Output Functions::. - -`printf_arginfo_function' - `printf.h' (GNU): *Note Defining the Output Handler::. - -`printf_function' - `printf.h' (GNU): *Note Defining the Output Handler::. - -`int printf_size (FILE *FP, const struct printf_info *INFO, const void *const *ARGS)' - `printf.h' (GNU): *Note Predefined Printf Handlers::. - -`int printf_size_info (const struct printf_info *INFO, size_t N, int *ARGTYPES)' - `printf.h' (GNU): *Note Predefined Printf Handlers::. - -`PRIO_MAX' - `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. - -`PRIO_MIN' - `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. - -`PRIO_PGRP' - `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. - -`PRIO_PROCESS' - `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. - -`PRIO_USER' - `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. - -`char * program_invocation_name' - `errno.h' (GNU): *Note Error Messages::. - -`char * program_invocation_short_name' - `errno.h' (GNU): *Note Error Messages::. - -`void psignal (int SIGNUM, const char *MESSAGE)' - `signal.h' (BSD): *Note Signal Messages::. - -`int pthread_atfork (void (*PREPARE)(void), void (*PARENT)(void), void (*CHILD)(void))' - `pthread.h' (POSIX): *Note Threads and Fork::. - -`int pthread_attr_destroy (pthread_attr_t *ATTR)' - `pthread.h' (POSIX): *Note Thread Attributes::. - -`int pthread_attr_getattr (const pthread_attr_t *OBJ, int *VALUE)' - `pthread.h' (POSIX): *Note Thread Attributes::. - -`int pthread_attr_init (pthread_attr_t *ATTR)' - `pthread.h' (POSIX): *Note Thread Attributes::. - -`int pthread_attr_setattr (pthread_attr_t *OBJ, int VALUE)' - `pthread.h' (POSIX): *Note Thread Attributes::. - -`int pthread_cancel (pthread_t THREAD)' - `pthread.h' (POSIX): *Note Basic Thread Operations::. - -`void pthread_cleanup_pop (int EXECUTE)' - `pthread.h' (POSIX): *Note Cleanup Handlers::. - -`void pthread_cleanup_pop_restore_np (int EXECUTE)' - `pthread.h' (GNU): *Note Cleanup Handlers::. - -`void pthread_cleanup_push (void (*ROUTINE) (void *), void *ARG)' - `pthread.h' (POSIX): *Note Cleanup Handlers::. - -`void pthread_cleanup_push_defer_np (void (*ROUTINE) (void *), void *ARG)' - `pthread.h' (GNU): *Note Cleanup Handlers::. - -`int pthread_condattr_init (pthread_condattr_t *ATTR)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_cond_broadcast (pthread_cond_t *COND)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_cond_destroy (pthread_cond_t *COND)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_cond_init (pthread_cond_t *COND, pthread_condattr_t *cond_ATTR)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_cond_signal (pthread_cond_t *COND)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_cond_timedwait (pthread_cond_t *COND, pthread_mutex_t *MUTEX, const struct timespec *ABSTIME)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_cond_wait (pthread_cond_t *COND, pthread_mutex_t *MUTEX)' - `pthread.h' (POSIX): *Note Condition Variables::. - -`int pthread_create (pthread_t * THREAD, pthread_attr_t * ATTR, void * (*START_ROUTINE)(void *), void * ARG)' - `pthread.h' (POSIX): *Note Basic Thread Operations::. - -`int pthread_detach (pthread_t TH)' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`int pthread_equal (pthread_t thread1, pthread_t thread2)' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`void pthread_exit (void *RETVAL)' - `pthread.h' (POSIX): *Note Basic Thread Operations::. - -`int pthread_getconcurrency ()' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`int pthread_getschedparam (pthread_t target_THREAD, int *POLICY, struct sched_param *PARAM)' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`void * pthread_getspecific (pthread_key_t KEY)' - `pthread.h' (POSIX): *Note Thread-Specific Data::. - -`int pthread_join (pthread_t TH, void **thread_RETURN)' - `pthread.h' (POSIX): *Note Basic Thread Operations::. - -`int pthread_key_create (pthread_key_t *KEY, void (*destr_function) (void *))' - `pthread.h' (POSIX): *Note Thread-Specific Data::. - -`int pthread_key_delete (pthread_key_t KEY)' - `pthread.h' (POSIX): *Note Thread-Specific Data::. - -`int pthread_kill (pthread_t THREAD, int SIGNO)' - `pthread.h' (POSIX): *Note Threads and Signal Handling::. - -`void pthread_kill_other_threads_np (VOID)' - `pthread.h' (GNU): *Note Miscellaneous Thread Functions::. - -`int pthread_mutexattr_destroy (pthread_mutexattr_t *ATTR)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutexattr_gettype (const pthread_mutexattr_t *ATTR, int *TYPE)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutexattr_init (pthread_mutexattr_t *ATTR)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutexattr_settype (pthread_mutexattr_t *ATTR, int TYPE)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutex_destroy (pthread_mutex_t *MUTEX)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutex_init (pthread_mutex_t *MUTEX, const pthread_mutexattr_t *MUTEXATTR)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutex_lock (pthread_mutex_t *mutex))' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutex_timedlock (pthread_mutex_t *MUTEX, const struct timespec *ABSTIME)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutex_trylock (pthread_mutex_t *MUTEX)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_mutex_unlock (pthread_mutex_t *MUTEX)' - `pthread.h' (POSIX): *Note Mutexes::. - -`int pthread_once (pthread_once_t *once_CONTROL, void (*INIT_ROUTINE) (void))' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`pthread_t pthread_self (VOID)' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`int pthread_setcancelstate (int STATE, int *OLDSTATE)' - `pthread.h' (POSIX): *Note Cancellation::. - -`int pthread_setcanceltype (int TYPE, int *OLDTYPE)' - `pthread.h' (POSIX): *Note Cancellation::. - -`int pthread_setconcurrency (int LEVEL)' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`int pthread_setschedparam (pthread_t target_THREAD, int POLICY, const struct sched_param *PARAM)' - `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. - -`int pthread_setspecific (pthread_key_t KEY, const void *POINTER)' - `pthread.h' (POSIX): *Note Thread-Specific Data::. - -`int pthread_sigmask (int HOW, const sigset_t *NEWMASK, sigset_t *OLDMASK)' - `pthread.h' (POSIX): *Note Threads and Signal Handling::. - -`void pthread_testcancel (VOID)' - `pthread.h' (POSIX): *Note Cancellation::. - -`char * P_tmpdir' - `stdio.h' (SVID): *Note Temporary Files::. - -`ptrdiff_t' - `stddef.h' (ISO): *Note Important Data Types::. - -`char * ptsname (int FILEDES)' - `stdlib.h' (SVID, XPG4.2): *Note Allocation::. - -`int ptsname_r (int FILEDES, char *BUF, size_t LEN)' - `stdlib.h' (GNU): *Note Allocation::. - -`int putc (int C, FILE *STREAM)' - `stdio.h' (ISO): *Note Simple Output::. - -`int putchar (int C)' - `stdio.h' (ISO): *Note Simple Output::. - -`int putchar_unlocked (int C)' - `stdio.h' (POSIX): *Note Simple Output::. - -`int putc_unlocked (int C, FILE *STREAM)' - `stdio.h' (POSIX): *Note Simple Output::. - -`int putenv (char *STRING)' - `stdlib.h' (SVID): *Note Environment Access::. - -`int putpwent (const struct passwd *P, FILE *STREAM)' - `pwd.h' (SVID): *Note Writing a User Entry::. - -`int puts (const char *S)' - `stdio.h' (ISO): *Note Simple Output::. - -`struct utmp * pututline (const struct utmp *UTMP)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`struct utmpx * pututxline (const struct utmpx *UTMP)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int putw (int W, FILE *STREAM)' - `stdio.h' (SVID): *Note Simple Output::. - -`wint_t putwc (wchar_t WC, FILE *STREAM)' - `wchar.h' (ISO): *Note Simple Output::. - -`wint_t putwchar (wchar_t WC)' - `wchar.h' (ISO): *Note Simple Output::. - -`wint_t putwchar_unlocked (wchar_t WC)' - `wchar.h' (GNU): *Note Simple Output::. - -`wint_t putwc_unlocked (wchar_t WC, FILE *STREAM)' - `wchar.h' (GNU): *Note Simple Output::. - -`ssize_t pwrite (int FILEDES, const void *BUFFER, size_t SIZE, off_t OFFSET)' - `unistd.h' (Unix98): *Note I/O Primitives::. - -`ssize_t pwrite64 (int FILEDES, const void *BUFFER, size_t SIZE, off64_t OFFSET)' - `unistd.h' (Unix98): *Note I/O Primitives::. - -`char * qecvt (long double VALUE, int NDIGIT, int *DECPT, int *NEG)' - `stdlib.h' (GNU): *Note System V Number Conversion::. - -`char * qecvt_r (long double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' - `stdlib.h' (GNU): *Note System V Number Conversion::. - -`char * qfcvt (long double VALUE, int NDIGIT, int *DECPT, int *NEG)' - `stdlib.h' (GNU): *Note System V Number Conversion::. - -`char * qfcvt_r (long double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' - `stdlib.h' (GNU): *Note System V Number Conversion::. - -`char * qgcvt (long double VALUE, int NDIGIT, char *BUF)' - `stdlib.h' (GNU): *Note System V Number Conversion::. - -`void qsort (void *ARRAY, size_t COUNT, size_t SIZE, comparison_fn_t COMPARE)' - `stdlib.h' (ISO): *Note Array Sort Function::. - -`int raise (int SIGNUM)' - `signal.h' (ISO): *Note Signaling Yourself::. - -`int rand (void)' - `stdlib.h' (ISO): *Note ISO Random::. - -`int RAND_MAX' - `stdlib.h' (ISO): *Note ISO Random::. - -`long int random (void)' - `stdlib.h' (BSD): *Note BSD Random::. - -`int random_r (struct random_data *restrict BUF, int32_t *restrict RESULT)' - `stdlib.h' (GNU): *Note BSD Random::. - -`int rand_r (unsigned int *SEED)' - `stdlib.h' (POSIX.1): *Note ISO Random::. - -`void * rawmemchr (const void *BLOCK, int C)' - `string.h' (GNU): *Note Search Functions::. - -`ssize_t read (int FILEDES, void *BUFFER, size_t SIZE)' - `unistd.h' (POSIX.1): *Note I/O Primitives::. - -`struct dirent * readdir (DIR *DIRSTREAM)' - `dirent.h' (POSIX.1): *Note Reading/Closing Directory::. - -`struct dirent64 * readdir64 (DIR *DIRSTREAM)' - `dirent.h' (LFS): *Note Reading/Closing Directory::. - -`int readdir64_r (DIR *DIRSTREAM, struct dirent64 *ENTRY, struct dirent64 **RESULT)' - `dirent.h' (LFS): *Note Reading/Closing Directory::. - -`int readdir_r (DIR *DIRSTREAM, struct dirent *ENTRY, struct dirent **RESULT)' - `dirent.h' (GNU): *Note Reading/Closing Directory::. - -`int readlink (const char *FILENAME, char *BUFFER, size_t SIZE)' - `unistd.h' (BSD): *Note Symbolic Links::. - -`ssize_t readv (int FILEDES, const struct iovec *VECTOR, int COUNT)' - `sys/uio.h' (BSD): *Note Scatter-Gather::. - -`void * realloc (void *PTR, size_t NEWSIZE)' - `malloc.h', `stdlib.h' (ISO): *Note Changing Block Size::. - -`__realloc_hook' - `malloc.h' (GNU): *Note Hooks for Malloc::. - -`char * realpath (const char *restrict NAME, char *restrict RESOLVED)' - `stdlib.h' (XPG): *Note Symbolic Links::. - -`int recv (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS)' - `sys/socket.h' (BSD): *Note Receiving Data::. - -`int recvfrom (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS, struct sockaddr *ADDR, socklen_t *LENGTH-PTR)' - `sys/socket.h' (BSD): *Note Receiving Datagrams::. - -`int recvmsg (int SOCKET, struct msghdr *MESSAGE, int FLAGS)' - `sys/socket.h' (BSD): *Note Receiving Datagrams::. - -`int RE_DUP_MAX' - `limits.h' (POSIX.2): *Note General Limits::. - -`_REENTRANT' - (GNU): *Note Feature Test Macros::. - -`REG_BADBR' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_BADPAT' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_BADRPT' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`int regcomp (regex_t *COMPILED, const char *PATTERN, int CFLAGS)' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_EBRACE' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_EBRACK' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_ECOLLATE' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_ECTYPE' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_EESCAPE' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_EPAREN' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_ERANGE' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`size_t regerror (int ERRCODE, regex_t *COMPILED, char *BUFFER, size_t LENGTH)' - `regex.h' (POSIX.2): *Note Regexp Cleanup::. - -`REG_ESPACE' - `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. - -`REG_ESPACE' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_ESUBREG' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`int regexec (regex_t *COMPILED, char *STRING, size_t NMATCH, regmatch_t MATCHPTR [], int EFLAGS)' - `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. - -`regex_t' - `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. - -`REG_EXTENDED' - `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. - -`void regfree (regex_t *COMPILED)' - `regex.h' (POSIX.2): *Note Regexp Cleanup::. - -`REG_ICASE' - `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. - -`int register_printf_function (int SPEC, printf_function HANDLER-FUNCTION, printf_arginfo_function ARGINFO-FUNCTION)' - `printf.h' (GNU): *Note Registering New Conversions::. - -`regmatch_t' - `regex.h' (POSIX.2): *Note Regexp Subexpressions::. - -`REG_NEWLINE' - `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. - -`REG_NOMATCH' - `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. - -`REG_NOSUB' - `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. - -`REG_NOTBOL' - `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. - -`REG_NOTEOL' - `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. - -`regoff_t' - `regex.h' (POSIX.2): *Note Regexp Subexpressions::. - -`double remainder (double NUMERATOR, double DENOMINATOR)' - `math.h' (BSD): *Note Remainder Functions::. - -`float remainderf (float NUMERATOR, float DENOMINATOR)' - `math.h' (BSD): *Note Remainder Functions::. - -`long double remainderl (long double NUMERATOR, long double DENOMINATOR)' - `math.h' (BSD): *Note Remainder Functions::. - -`int remove (const char *FILENAME)' - `stdio.h' (ISO): *Note Deleting Files::. - -`int rename (const char *OLDNAME, const char *NEWNAME)' - `stdio.h' (ISO): *Note Renaming Files::. - -`void rewind (FILE *STREAM)' - `stdio.h' (ISO): *Note File Positioning::. - -`void rewinddir (DIR *DIRSTREAM)' - `dirent.h' (POSIX.1): *Note Random Access Directory::. - -`char * rindex (const char *STRING, int C)' - `string.h' (BSD): *Note Search Functions::. - -`double rint (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`float rintf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long double rintl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`int RLIM_INFINITY' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_AS' - `sys/resource.h' (Unix98): *Note Limits on Resources::. - -`RLIMIT_CORE' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_CPU' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_DATA' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_FSIZE' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_MEMLOCK' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_NOFILE' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_NPROC' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_RSS' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIMIT_STACK' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`RLIM_NLIMITS' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`int rmdir (const char *FILENAME)' - `unistd.h' (POSIX.1): *Note Deleting Files::. - -`int R_OK' - `unistd.h' (POSIX.1): *Note Testing File Access::. - -`double round (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`float roundf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long double roundl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`int rpmatch (const char *RESPONSE)' - `stdlib.h' (stdlib.h): *Note Yes-or-No Questions::. - -`RUN_LVL' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`RUN_LVL' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`RUSAGE_CHILDREN' - `sys/resource.h' (BSD): *Note Resource Usage::. - -`RUSAGE_SELF' - `sys/resource.h' (BSD): *Note Resource Usage::. - -`int SA_NOCLDSTOP' - `signal.h' (POSIX.1): *Note Flags for Sigaction::. - -`int SA_ONSTACK' - `signal.h' (BSD): *Note Flags for Sigaction::. - -`int SA_RESTART' - `signal.h' (BSD): *Note Flags for Sigaction::. - -`int sbrk (ptrdiff_t DELTA)' - `unistd.h' (BSD): *Note Resizing the Data Segment::. - -`_SC_2_C_DEV' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_2_FORT_DEV' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_2_FORT_RUN' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_2_LOCALEDEF' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_2_SW_DEV' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_2_VERSION' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_AIO_LISTIO_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_AIO_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_AIO_PRIO_DELTA_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`double scalb (double VALUE, int EXPONENT)' - `math.h' (BSD): *Note Normalization Functions::. - -`float scalbf (float VALUE, int EXPONENT)' - `math.h' (BSD): *Note Normalization Functions::. - -`long double scalbl (long double VALUE, int EXPONENT)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int scalbln (double X, long int n)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int scalblnf (float X, long int n)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int scalblnl (long double X, long int n)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int scalbn (double X, int n)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int scalbnf (float X, int n)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int scalbnl (long double X, int n)' - `math.h' (BSD): *Note Normalization Functions::. - -`int scandir (const char *DIR, struct dirent ***NAMELIST, int (*SELECTOR) (const struct dirent *), int (*CMP) (const void *, const void *))' - `dirent.h' (BSD/SVID): *Note Scanning Directory Content::. - -`int scandir64 (const char *DIR, struct dirent64 ***NAMELIST, int (*SELECTOR) (const struct dirent64 *), int (*CMP) (const void *, const void *))' - `dirent.h' (GNU): *Note Scanning Directory Content::. - -`int scanf (const char *TEMPLATE, ...)' - `stdio.h' (ISO): *Note Formatted Input Functions::. - -`_SC_ARG_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_ASYNCHRONOUS_IO' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_ATEXIT_MAX' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_AVPHYS_PAGES' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_BC_BASE_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_BC_DIM_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_BC_SCALE_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_BC_STRING_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_CHAR_BIT' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_CHARCLASS_NAME_MAX' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_CHAR_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_CHAR_MIN' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_CHILD_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_CLK_TCK' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_COLL_WEIGHTS_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_DELAYTIMER_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_EQUIV_CLASS_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_EXPR_NEST_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_FSYNC' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_GETGR_R_SIZE_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_GETPW_R_SIZE_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`SCHAR_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`SCHAR_MIN' - `limits.h' (ISO): *Note Range of Type::. - -`int sched_getparam (pid_t PID, const struct sched_param *PARAM)' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_get_priority_max (int *POLICY);' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_get_priority_min (int *POLICY);' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_getscheduler (pid_t PID)' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_rr_get_interval (pid_t PID, struct timespec *INTERVAL)' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_setparam (pid_t PID, const struct sched_param *PARAM)' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_setscheduler (pid_t PID, int POLICY, const struct sched_param *PARAM)' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`int sched_yield (void)' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`_SC_INT_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_INT_MIN' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_JOB_CONTROL' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_LINE_MAX' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_LOGIN_NAME_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_LONG_BIT' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_MAPPED_FILES' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_MB_LEN_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_MEMLOCK' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_MEMLOCK_RANGE' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_MEMORY_PROTECTION' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_MESSAGE_PASSING' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_MQ_OPEN_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_MQ_PRIO_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_NGROUPS_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_NL_ARGMAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_NL_LANGMAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_NL_MSGMAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_NL_NMAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_NL_SETMAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_NL_TEXTMAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_NPROCESSORS_CONF' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_NPROCESSORS_ONLN' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_NZERO' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_OPEN_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_PAGESIZE' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_PHYS_PAGES' - `unistd.h' (GNU): *Note Constants for Sysconf::. - -`_SC_PII' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_INTERNET' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_INTERNET_DGRAM' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_INTERNET_STREAM' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_OSI' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_OSI_CLTS' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_OSI_COTS' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_OSI_M' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_SOCKET' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PII_XTI' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_PRIORITIZED_IO' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_PRIORITY_SCHEDULING' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_REALTIME_SIGNALS' - `unistdh.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_RTSIG_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SAVED_IDS' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SCHAR_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_SCHAR_MIN' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_SELECT' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_SEMAPHORES' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SEM_NSEMS_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SEM_VALUE_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SHARED_MEMORY_OBJECTS' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SHRT_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_SHRT_MIN' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_SIGQUEUE_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`SC_SSIZE_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_STREAM_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_SYNCHRONIZED_IO' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_ATTR_STACKADDR' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_ATTR_STACKSIZE' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_DESTRUCTOR_ITERATIONS' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_KEYS_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_PRIO_INHERIT' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_PRIO_PROTECT' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_PRIORITY_SCHEDULING' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_PROCESS_SHARED' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREADS' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_SAFE_FUNCTIONS' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_STACK_MIN' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_THREAD_THREADS_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_TIMER_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_TIMERS' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_T_IOV_MAX' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_TTY_NAME_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_TZNAME_MAX' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_UCHAR_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_UINT_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_UIO_MAXIOV' - `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. - -`_SC_ULONG_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_USHRT_MAX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_VERSION' - `unistd.h' (POSIX.1): *Note Constants for Sysconf::. - -`_SC_VERSION' - `unistd.h' (POSIX.2): *Note Constants for Sysconf::. - -`_SC_WORD_BIT' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_CRYPT' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_ENH_I18N' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_LEGACY' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_REALTIME' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_REALTIME_THREADS' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_SHM' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_UNIX' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_VERSION' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_XCU_VERSION' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_XPG2' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_XPG3' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`_SC_XOPEN_XPG4' - `unistd.h' (X/Open): *Note Constants for Sysconf::. - -`unsigned short int * seed48 (unsigned short int SEED16V[3])' - `stdlib.h' (SVID): *Note SVID Random::. - -`int seed48_r (unsigned short int SEED16V[3], struct drand48_data *BUFFER)' - `stdlib.h' (GNU): *Note SVID Random::. - -`int SEEK_CUR' - `stdio.h' (ISO): *Note File Positioning::. - -`void seekdir (DIR *DIRSTREAM, off_t POS)' - `dirent.h' (BSD): *Note Random Access Directory::. - -`int SEEK_END' - `stdio.h' (ISO): *Note File Positioning::. - -`int SEEK_SET' - `stdio.h' (ISO): *Note File Positioning::. - -`int select (int NFDS, fd_set *READ-FDS, fd_set *WRITE-FDS, fd_set *EXCEPT-FDS, struct timeval *TIMEOUT)' - `sys/types.h' (BSD): *Note Waiting for I/O::. - -`int sem_destroy (sem_t * SEM)' - `semaphore.h' (POSIX): *Note POSIX Semaphores::. - -`int sem_getvalue (sem_t * SEM, int * SVAL)' - `semaphore.h' (POSIX): *Note POSIX Semaphores::. - -`int sem_init (sem_t *SEM, int PSHARED, unsigned int VALUE)' - `semaphore.h' (POSIX): *Note POSIX Semaphores::. - -`int sem_post (sem_t * SEM)' - `semaphore.h' (POSIX): *Note POSIX Semaphores::. - -`int sem_trywait (sem_t * SEM)' - `semaphore.h' (POSIX): *Note POSIX Semaphores::. - -`int sem_wait (sem_t * SEM)' - `semaphore.h' (POSIX): *Note POSIX Semaphores::. - -`int send (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS)' - `sys/socket.h' (BSD): *Note Sending Data::. - -`int sendmsg (int SOCKET, const struct msghdr *MESSAGE, int FLAGS)' - `sys/socket.h' (BSD): *Note Receiving Datagrams::. - -`int sendto (int SOCKET, void *BUFFER. size_t SIZE, int FLAGS, struct sockaddr *ADDR, socklen_t LENGTH)' - `sys/socket.h' (BSD): *Note Sending Datagrams::. - -`void setbuf (FILE *STREAM, char *BUF)' - `stdio.h' (ISO): *Note Controlling Buffering::. - -`void setbuffer (FILE *STREAM, char *BUF, size_t SIZE)' - `stdio.h' (BSD): *Note Controlling Buffering::. - -`int setcontext (const ucontext_t *UCP)' - `ucontext.h' (SVID): *Note System V contexts::. - -`int setdomainname (const char *NAME, size_t LENGTH)' - `unistd.h' (???): *Note Host Identification::. - -`int setegid (gid_t NEWGID)' - `unistd.h' (POSIX.1): *Note Setting Groups::. - -`int setenv (const char *NAME, const char *VALUE, int REPLACE)' - `stdlib.h' (BSD): *Note Environment Access::. - -`int seteuid (uid_t NEWEUID)' - `unistd.h' (POSIX.1): *Note Setting User ID::. - -`int setfsent (void)' - `fstab.h' (BSD): *Note fstab::. - -`int setgid (gid_t NEWGID)' - `unistd.h' (POSIX.1): *Note Setting Groups::. - -`void setgrent (void)' - `grp.h' (SVID, BSD): *Note Scanning All Groups::. - -`int setgroups (size_t COUNT, gid_t *GROUPS)' - `grp.h' (BSD): *Note Setting Groups::. - -`void sethostent (int STAYOPEN)' - `netdb.h' (BSD): *Note Host Names::. - -`int sethostid (long int ID)' - `unistd.h' (BSD): *Note Host Identification::. - -`int sethostname (const char *NAME, size_t LENGTH)' - `unistd.h' (BSD): *Note Host Identification::. - -`int setitimer (int WHICH, struct itimerval *NEW, struct itimerval *OLD)' - `sys/time.h' (BSD): *Note Setting an Alarm::. - -`int setjmp (jmp_buf STATE)' - `setjmp.h' (ISO): *Note Non-Local Details::. - -`void setkey (const char *KEY)' - `crypt.h' (BSD, SVID): *Note DES Encryption::. - -`void setkey_r (const char *KEY, struct crypt_data * DATA)' - `crypt.h' (GNU): *Note DES Encryption::. - -`void setlinebuf (FILE *STREAM)' - `stdio.h' (BSD): *Note Controlling Buffering::. - -`char * setlocale (int CATEGORY, const char *LOCALE)' - `locale.h' (ISO): *Note Setting the Locale::. - -`int setlogmask (int MASK)' - `syslog.h' (BSD): *Note setlogmask::. - -`FILE * setmntent (const char *FILE, const char *MODE)' - `mntent.h' (BSD): *Note mtab::. - -`void setnetent (int STAYOPEN)' - `netdb.h' (BSD): *Note Networks Database::. - -`int setnetgrent (const char *NETGROUP)' - `netdb.h' (BSD): *Note Lookup Netgroup::. - -`int setpgid (pid_t PID, pid_t PGID)' - `unistd.h' (POSIX.1): *Note Process Group Functions::. - -`int setpgrp (pid_t PID, pid_t PGID)' - `unistd.h' (BSD): *Note Process Group Functions::. - -`int setpriority (int CLASS, int ID, int NICEVAL)' - `sys/resource.h' (BSD,POSIX): *Note Traditional Scheduling - Functions::. - -`void setprotoent (int STAYOPEN)' - `netdb.h' (BSD): *Note Protocols Database::. - -`void setpwent (void)' - `pwd.h' (SVID, BSD): *Note Scanning All Users::. - -`int setregid (gid_t RGID, gid_t EGID)' - `unistd.h' (BSD): *Note Setting Groups::. - -`int setreuid (uid_t RUID, uid_t EUID)' - `unistd.h' (BSD): *Note Setting User ID::. - -`int setrlimit (int RESOURCE, const struct rlimit *RLP)' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`int setrlimit64 (int RESOURCE, const struct rlimit64 *RLP)' - `sys/resource.h' (Unix98): *Note Limits on Resources::. - -`void setservent (int STAYOPEN)' - `netdb.h' (BSD): *Note Services Database::. - -`pid_t setsid (void)' - `unistd.h' (POSIX.1): *Note Process Group Functions::. - -`int setsockopt (int SOCKET, int LEVEL, int OPTNAME, void *OPTVAL, socklen_t OPTLEN)' - `sys/socket.h' (BSD): *Note Socket Option Functions::. - -`void * setstate (void *STATE)' - `stdlib.h' (BSD): *Note BSD Random::. - -`int setstate_r (char *restrict STATEBUF, struct random_data *restrict BUF)' - `stdlib.h' (GNU): *Note BSD Random::. - -`int settimeofday (const struct timeval *TP, const struct timezone *TZP)' - `sys/time.h' (BSD): *Note High-Resolution Calendar::. - -`int setuid (uid_t NEWUID)' - `unistd.h' (POSIX.1): *Note Setting User ID::. - -`void setutent (void)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`void setutxent (void)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`int setvbuf (FILE *STREAM, char *BUF, int MODE, size_t SIZE)' - `stdio.h' (ISO): *Note Controlling Buffering::. - -`SHRT_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`SHRT_MIN' - `limits.h' (ISO): *Note Range of Type::. - -`int shutdown (int SOCKET, int HOW)' - `sys/socket.h' (BSD): *Note Closing a Socket::. - -`S_IEXEC' - `sys/stat.h' (BSD): *Note Permission Bits::. - -`S_IFBLK' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`S_IFCHR' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`S_IFDIR' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`S_IFIFO' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`S_IFLNK' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`int S_IFMT' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`S_IFREG' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`S_IFSOCK' - `sys/stat.h' (BSD): *Note Testing File Type::. - -`int SIGABRT' - `signal.h' (ISO): *Note Program Error Signals::. - -`int sigaction (int SIGNUM, const struct sigaction *restrict ACTION, struct sigaction *restrict OLD-ACTION)' - `signal.h' (POSIX.1): *Note Advanced Signal Handling::. - -`int sigaddset (sigset_t *SET, int SIGNUM)' - `signal.h' (POSIX.1): *Note Signal Sets::. - -`int SIGALRM' - `signal.h' (POSIX.1): *Note Alarm Signals::. - -`int sigaltstack (const stack_t *restrict STACK, stack_t *restrict OLDSTACK)' - `signal.h' (XPG): *Note Signal Stack::. - -`sig_atomic_t' - `signal.h' (ISO): *Note Atomic Types::. - -`SIG_BLOCK' - `signal.h' (POSIX.1): *Note Process Signal Mask::. - -`int sigblock (int MASK)' - `signal.h' (BSD): *Note Blocking in BSD::. - -`int SIGBUS' - `signal.h' (BSD): *Note Program Error Signals::. - -`int SIGCHLD' - `signal.h' (POSIX.1): *Note Job Control Signals::. - -`int SIGCLD' - `signal.h' (SVID): *Note Job Control Signals::. - -`int SIGCONT' - `signal.h' (POSIX.1): *Note Job Control Signals::. - -`int sigdelset (sigset_t *SET, int SIGNUM)' - `signal.h' (POSIX.1): *Note Signal Sets::. - -`int sigemptyset (sigset_t *SET)' - `signal.h' (POSIX.1): *Note Signal Sets::. - -`int SIGEMT' - `signal.h' (BSD): *Note Program Error Signals::. - -`sighandler_t SIG_ERR' - `signal.h' (ISO): *Note Basic Signal Handling::. - -`int sigfillset (sigset_t *SET)' - `signal.h' (POSIX.1): *Note Signal Sets::. - -`int SIGFPE' - `signal.h' (ISO): *Note Program Error Signals::. - -`sighandler_t' - `signal.h' (GNU): *Note Basic Signal Handling::. - -`int SIGHUP' - `signal.h' (POSIX.1): *Note Termination Signals::. - -`int SIGILL' - `signal.h' (ISO): *Note Program Error Signals::. - -`int SIGINFO' - `signal.h' (BSD): *Note Miscellaneous Signals::. - -`int SIGINT' - `signal.h' (ISO): *Note Termination Signals::. - -`int siginterrupt (int SIGNUM, int FAILFLAG)' - `signal.h' (BSD): *Note BSD Handler::. - -`int SIGIO' - `signal.h' (BSD): *Note Asynchronous I/O Signals::. - -`int SIGIOT' - `signal.h' (Unix): *Note Program Error Signals::. - -`int sigismember (const sigset_t *SET, int SIGNUM)' - `signal.h' (POSIX.1): *Note Signal Sets::. - -`sigjmp_buf' - `setjmp.h' (POSIX.1): *Note Non-Local Exits and Signals::. - -`int SIGKILL' - `signal.h' (POSIX.1): *Note Termination Signals::. - -`void siglongjmp (sigjmp_buf STATE, int VALUE)' - `setjmp.h' (POSIX.1): *Note Non-Local Exits and Signals::. - -`int SIGLOST' - `signal.h' (GNU): *Note Operation Error Signals::. - -`int sigmask (int SIGNUM)' - `signal.h' (BSD): *Note Blocking in BSD::. - -`sighandler_t signal (int SIGNUM, sighandler_t ACTION)' - `signal.h' (ISO): *Note Basic Signal Handling::. - -`int signbit (_float-type_ X)' - `math.h' (ISO): *Note FP Bit Twiddling::. - -`long long int significand (double X)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int significandf (float X)' - `math.h' (BSD): *Note Normalization Functions::. - -`long long int significandl (long double X)' - `math.h' (BSD): *Note Normalization Functions::. - -`int sigpause (int MASK)' - `signal.h' (BSD): *Note Blocking in BSD::. - -`int sigpending (sigset_t *SET)' - `signal.h' (POSIX.1): *Note Checking for Pending Signals::. - -`int SIGPIPE' - `signal.h' (POSIX.1): *Note Operation Error Signals::. - -`int SIGPOLL' - `signal.h' (SVID): *Note Asynchronous I/O Signals::. - -`int sigprocmask (int HOW, const sigset_t *restrict SET, sigset_t *restrict OLDSET)' - `signal.h' (POSIX.1): *Note Process Signal Mask::. - -`int SIGPROF' - `signal.h' (BSD): *Note Alarm Signals::. - -`int SIGQUIT' - `signal.h' (POSIX.1): *Note Termination Signals::. - -`int SIGSEGV' - `signal.h' (ISO): *Note Program Error Signals::. - -`int sigsetjmp (sigjmp_buf STATE, int SAVESIGS)' - `setjmp.h' (POSIX.1): *Note Non-Local Exits and Signals::. - -`SIG_SETMASK' - `signal.h' (POSIX.1): *Note Process Signal Mask::. - -`int sigsetmask (int MASK)' - `signal.h' (BSD): *Note Blocking in BSD::. - -`sigset_t' - `signal.h' (POSIX.1): *Note Signal Sets::. - -`int sigstack (const struct sigstack *STACK, struct sigstack *OLDSTACK)' - `signal.h' (BSD): *Note Signal Stack::. - -`int SIGSTOP' - `signal.h' (POSIX.1): *Note Job Control Signals::. - -`int sigsuspend (const sigset_t *SET)' - `signal.h' (POSIX.1): *Note Sigsuspend::. - -`int SIGSYS' - `signal.h' (Unix): *Note Program Error Signals::. - -`int SIGTERM' - `signal.h' (ISO): *Note Termination Signals::. - -`int SIGTRAP' - `signal.h' (BSD): *Note Program Error Signals::. - -`int SIGTSTP' - `signal.h' (POSIX.1): *Note Job Control Signals::. - -`int SIGTTIN' - `signal.h' (POSIX.1): *Note Job Control Signals::. - -`int SIGTTOU' - `signal.h' (POSIX.1): *Note Job Control Signals::. - -`SIG_UNBLOCK' - `signal.h' (POSIX.1): *Note Process Signal Mask::. - -`int SIGURG' - `signal.h' (BSD): *Note Asynchronous I/O Signals::. - -`int SIGUSR1' - `signal.h' (POSIX.1): *Note Miscellaneous Signals::. - -`int SIGUSR2' - `signal.h' (POSIX.1): *Note Miscellaneous Signals::. - -`int sigvec (int SIGNUM, const struct sigvec *ACTION,struct sigvec *OLD-ACTION)' - `signal.h' (BSD): *Note BSD Handler::. - -`int SIGVTALRM' - `signal.h' (BSD): *Note Alarm Signals::. - -`int sigwait (const sigset_t *SET, int *SIG)' - `pthread.h' (POSIX): *Note Threads and Signal Handling::. - -`int SIGWINCH' - `signal.h' (BSD): *Note Miscellaneous Signals::. - -`int SIGXCPU' - `signal.h' (BSD): *Note Operation Error Signals::. - -`int SIGXFSZ' - `signal.h' (BSD): *Note Operation Error Signals::. - -`double sin (double X)' - `math.h' (ISO): *Note Trig Functions::. - -`void sincos (double X, double *SINX, double *COSX)' - `math.h' (GNU): *Note Trig Functions::. - -`void sincosf (float X, float *SINX, float *COSX)' - `math.h' (GNU): *Note Trig Functions::. - -`void sincosl (long double X, long double *SINX, long double *COSX)' - `math.h' (GNU): *Note Trig Functions::. - -`float sinf (float X)' - `math.h' (ISO): *Note Trig Functions::. - -`double sinh (double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`float sinhf (float X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double sinhl (long double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double sinl (long double X)' - `math.h' (ISO): *Note Trig Functions::. - -`S_IREAD' - `sys/stat.h' (BSD): *Note Permission Bits::. - -`S_IRGRP' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IROTH' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IRUSR' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IRWXG' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IRWXO' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IRWXU' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`int S_ISBLK (mode_t M)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int S_ISCHR (mode_t M)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int S_ISDIR (mode_t M)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int S_ISFIFO (mode_t M)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`S_ISGID' - `sys/stat.h' (POSIX): *Note Permission Bits::. - -`int S_ISLNK (mode_t M)' - `sys/stat.h' (GNU): *Note Testing File Type::. - -`int S_ISREG (mode_t M)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int S_ISSOCK (mode_t M)' - `sys/stat.h' (GNU): *Note Testing File Type::. - -`S_ISUID' - `sys/stat.h' (POSIX): *Note Permission Bits::. - -`S_ISVTX' - `sys/stat.h' (BSD): *Note Permission Bits::. - -`S_IWGRP' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IWOTH' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IWRITE' - `sys/stat.h' (BSD): *Note Permission Bits::. - -`S_IWUSR' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IXGRP' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IXOTH' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`S_IXUSR' - `sys/stat.h' (POSIX.1): *Note Permission Bits::. - -`size_t' - `stddef.h' (ISO): *Note Important Data Types::. - -`unsigned int sleep (unsigned int SECONDS)' - `unistd.h' (POSIX.1): *Note Sleeping::. - -`int snprintf (char *S, size_t SIZE, const char *TEMPLATE, ...)' - `stdio.h' (GNU): *Note Formatted Output Functions::. - -`SO_BROADCAST' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`int SOCK_DGRAM' - `sys/socket.h' (BSD): *Note Communication Styles::. - -`int socket (int NAMESPACE, int STYLE, int PROTOCOL)' - `sys/socket.h' (BSD): *Note Creating a Socket::. - -`int socketpair (int NAMESPACE, int STYLE, int PROTOCOL, int FILEDES[2])' - `sys/socket.h' (BSD): *Note Socket Pairs::. - -`int SOCK_RAW' - `sys/socket.h' (BSD): *Note Communication Styles::. - -`int SOCK_RDM' - `sys/socket.h' (BSD): *Note Communication Styles::. - -`int SOCK_SEQPACKET' - `sys/socket.h' (BSD): *Note Communication Styles::. - -`int SOCK_STREAM' - `sys/socket.h' (BSD): *Note Communication Styles::. - -`SO_DEBUG' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_DONTROUTE' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_ERROR' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_KEEPALIVE' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_LINGER' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`int SOL_SOCKET' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_OOBINLINE' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_RCVBUF' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_REUSEADDR' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_SNDBUF' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`SO_STYLE' - `sys/socket.h' (GNU): *Note Socket-Level Options::. - -`SO_TYPE' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`speed_t' - `termios.h' (POSIX.1): *Note Line Speed::. - -`int sprintf (char *S, const char *TEMPLATE, ...)' - `stdio.h' (ISO): *Note Formatted Output Functions::. - -`double sqrt (double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`float sqrtf (float X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`long double sqrtl (long double X)' - `math.h' (ISO): *Note Exponents and Logarithms::. - -`void srand (unsigned int SEED)' - `stdlib.h' (ISO): *Note ISO Random::. - -`void srand48 (long int SEEDVAL)' - `stdlib.h' (SVID): *Note SVID Random::. - -`int srand48_r (long int SEEDVAL, struct drand48_data *BUFFER)' - `stdlib.h' (GNU): *Note SVID Random::. - -`void srandom (unsigned int SEED)' - `stdlib.h' (BSD): *Note BSD Random::. - -`int srandom_r (unsigned int SEED, struct random_data *BUF)' - `stdlib.h' (GNU): *Note BSD Random::. - -`int sscanf (const char *S, const char *TEMPLATE, ...)' - `stdio.h' (ISO): *Note Formatted Input Functions::. - -`sighandler_t ssignal (int SIGNUM, sighandler_t ACTION)' - `signal.h' (SVID): *Note Basic Signal Handling::. - -`int SSIZE_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`ssize_t' - `unistd.h' (POSIX.1): *Note I/O Primitives::. - -`stack_t' - `signal.h' (XPG): *Note Signal Stack::. - -`int stat (const char *FILENAME, struct stat *BUF)' - `sys/stat.h' (POSIX.1): *Note Reading Attributes::. - -`int stat64 (const char *FILENAME, struct stat64 *BUF)' - `sys/stat.h' (Unix98): *Note Reading Attributes::. - -`FILE * stderr' - `stdio.h' (ISO): *Note Standard Streams::. - -`STDERR_FILENO' - `unistd.h' (POSIX.1): *Note Descriptors and Streams::. - -`FILE * stdin' - `stdio.h' (ISO): *Note Standard Streams::. - -`STDIN_FILENO' - `unistd.h' (POSIX.1): *Note Descriptors and Streams::. - -`FILE * stdout' - `stdio.h' (ISO): *Note Standard Streams::. - -`STDOUT_FILENO' - `unistd.h' (POSIX.1): *Note Descriptors and Streams::. - -`int stime (time_t *NEWTIME)' - `time.h' (SVID, XPG): *Note Simple Calendar Time::. - -`char * stpcpy (char *restrict TO, const char *restrict FROM)' - `string.h' (Unknown origin): *Note Copying and Concatenation::. - -`char * stpncpy (char *restrict TO, const char *restrict FROM, size_t SIZE)' - `string.h' (GNU): *Note Copying and Concatenation::. - -`int strcasecmp (const char *S1, const char *S2)' - `string.h' (BSD): *Note String/Array Comparison::. - -`char * strcasestr (const char *HAYSTACK, const char *NEEDLE)' - `string.h' (GNU): *Note Search Functions::. - -`char * strcat (char *restrict TO, const char *restrict FROM)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`char * strchr (const char *STRING, int C)' - `string.h' (ISO): *Note Search Functions::. - -`char * strchrnul (const char *STRING, int C)' - `string.h' (GNU): *Note Search Functions::. - -`int strcmp (const char *S1, const char *S2)' - `string.h' (ISO): *Note String/Array Comparison::. - -`int strcoll (const char *S1, const char *S2)' - `string.h' (ISO): *Note Collation Functions::. - -`char * strcpy (char *restrict TO, const char *restrict FROM)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`size_t strcspn (const char *STRING, const char *STOPSET)' - `string.h' (ISO): *Note Search Functions::. - -`char * strdup (const char *S)' - `string.h' (SVID): *Note Copying and Concatenation::. - -`char * strdupa (const char *S)' - `string.h' (GNU): *Note Copying and Concatenation::. - -`int STREAM_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`char * strerror (int ERRNUM)' - `string.h' (ISO): *Note Error Messages::. - -`char * strerror_r (int ERRNUM, char *BUF, size_t N)' - `string.h' (GNU): *Note Error Messages::. - -`char * strfry (char *STRING)' - `string.h' (GNU): *Note strfry::. - -`size_t strftime (char *S, size_t SIZE, const char *TEMPLATE, const struct tm *BROKENTIME)' - `time.h' (ISO): *Note Formatting Calendar Time::. - -`size_t strlen (const char *S)' - `string.h' (ISO): *Note String Length::. - -`int strncasecmp (const char *S1, const char *S2, size_t N)' - `string.h' (BSD): *Note String/Array Comparison::. - -`char * strncat (char *restrict TO, const char *restrict FROM, size_t SIZE)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`int strncmp (const char *S1, const char *S2, size_t SIZE)' - `string.h' (ISO): *Note String/Array Comparison::. - -`char * strncpy (char *restrict TO, const char *restrict FROM, size_t SIZE)' - `string.h' (ISO): *Note Copying and Concatenation::. - -`char * strndup (const char *S, size_t SIZE)' - `string.h' (GNU): *Note Copying and Concatenation::. - -`char * strndupa (const char *S, size_t SIZE)' - `string.h' (GNU): *Note Copying and Concatenation::. - -`size_t strnlen (const char *S, size_t MAXLEN)' - `string.h' (GNU): *Note String Length::. - -`char * strpbrk (const char *STRING, const char *STOPSET)' - `string.h' (ISO): *Note Search Functions::. - -`char * strptime (const char *S, const char *FMT, struct tm *TP)' - `time.h' (XPG4): *Note Low-Level Time String Parsing::. - -`char * strrchr (const char *STRING, int C)' - `string.h' (ISO): *Note Search Functions::. - -`char * strsep (char **STRING_PTR, const char *DELIMITER)' - `string.h' (BSD): *Note Finding Tokens in a String::. - -`char * strsignal (int SIGNUM)' - `string.h' (GNU): *Note Signal Messages::. - -`size_t strspn (const char *STRING, const char *SKIPSET)' - `string.h' (ISO): *Note Search Functions::. - -`char * strstr (const char *HAYSTACK, const char *NEEDLE)' - `string.h' (ISO): *Note Search Functions::. - -`double strtod (const char *restrict STRING, char **restrict TAILPTR)' - `stdlib.h' (ISO): *Note Parsing of Floats::. - -`float strtof (const char *STRING, char **TAILPTR)' - `stdlib.h' (ISO): *Note Parsing of Floats::. - -`intmax_t strtoimax (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `inttypes.h' (ISO): *Note Parsing of Integers::. - -`char * strtok (char *restrict NEWSTRING, const char *restrict DELIMITERS)' - `string.h' (ISO): *Note Finding Tokens in a String::. - -`char * strtok_r (char *NEWSTRING, const char *DELIMITERS, char **SAVE_PTR)' - `string.h' (POSIX): *Note Finding Tokens in a String::. - -`long int strtol (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`long double strtold (const char *STRING, char **TAILPTR)' - `stdlib.h' (ISO): *Note Parsing of Floats::. - -`long long int strtoll (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`long long int strtoq (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `stdlib.h' (BSD): *Note Parsing of Integers::. - -`unsigned long int strtoul (const char *retrict STRING, char **restrict TAILPTR, int BASE)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`unsigned long long int strtoull (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `stdlib.h' (ISO): *Note Parsing of Integers::. - -`uintmax_t strtoumax (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `inttypes.h' (ISO): *Note Parsing of Integers::. - -`unsigned long long int strtouq (const char *restrict STRING, char **restrict TAILPTR, int BASE)' - `stdlib.h' (BSD): *Note Parsing of Integers::. - -`struct aiocb' - `aio.h' (POSIX.1b): *Note Asynchronous I/O::. - -`struct aiocb64' - `aio.h' (POSIX.1b): *Note Asynchronous I/O::. - -`struct aioinit' - `aio.h' (GNU): *Note Configuration of AIO::. - -`struct argp' - `argp.h' (GNU): *Note Argp Parsers::. - -`struct argp_child' - `argp.h' (GNU): *Note Argp Children::. - -`struct argp_option' - `argp.h' (GNU): *Note Argp Option Vectors::. - -`struct argp_state' - `argp.h' (GNU): *Note Argp Parsing State::. - -`struct dirent' - `dirent.h' (POSIX.1): *Note Directory Entries::. - -`struct exit_status' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`struct flock' - `fcntl.h' (POSIX.1): *Note File Locks::. - -`struct fstab' - `fstab.h' (BSD): *Note fstab::. - -`struct FTW' - `ftw.h' (XPG4.2): *Note Working with Directory Trees::. - -`struct __gconv_step' - `gconv.h' (GNU): *Note glibc iconv Implementation::. - -`struct __gconv_step_data' - `gconv.h' (GNU): *Note glibc iconv Implementation::. - -`struct group' - `grp.h' (POSIX.1): *Note Group Data Structure::. - -`struct hostent' - `netdb.h' (BSD): *Note Host Names::. - -`struct if_nameindex' - `net/if.h' (IPv6 basic API): *Note Interface Naming::. - -`struct in6_addr' - `netinet/in.h' (IPv6 basic API): *Note Host Address Data Type::. - -`struct in_addr' - `netinet/in.h' (BSD): *Note Host Address Data Type::. - -`struct iovec' - `sys/uio.h' (BSD): *Note Scatter-Gather::. - -`struct itimerval' - `sys/time.h' (BSD): *Note Setting an Alarm::. - -`struct lconv' - `locale.h' (ISO): *Note The Lame Way to Locale Data::. - -`struct linger' - `sys/socket.h' (BSD): *Note Socket-Level Options::. - -`struct mallinfo' - `malloc.h' (GNU): *Note Statistics of Malloc::. - -`struct mntent' - `mntent.h' (BSD): *Note mtab::. - -`struct msghdr' - `sys/socket.h' (BSD): *Note Receiving Datagrams::. - -`struct netent' - `netdb.h' (BSD): *Note Networks Database::. - -`struct obstack' - `obstack.h' (GNU): *Note Creating Obstacks::. - -`struct option' - `getopt.h' (GNU): *Note Getopt Long Options::. - -`struct passwd' - `pwd.h' (POSIX.1): *Note User Data Structure::. - -`struct printf_info' - `printf.h' (GNU): *Note Conversion Specifier Options::. - -`struct protoent' - `netdb.h' (BSD): *Note Protocols Database::. - -`struct random_data' - `stdlib.h' (GNU): *Note BSD Random::. - -`struct rlimit' - `sys/resource.h' (BSD): *Note Limits on Resources::. - -`struct rlimit64' - `sys/resource.h' (Unix98): *Note Limits on Resources::. - -`struct rusage' - `sys/resource.h' (BSD): *Note Resource Usage::. - -`struct sched_param' - `sched.h' (POSIX): *Note Basic Scheduling Functions::. - -`struct servent' - `netdb.h' (BSD): *Note Services Database::. - -`struct sgttyb' - `termios.h' (BSD): *Note BSD Terminal Modes::. - -`struct sigaction' - `signal.h' (POSIX.1): *Note Advanced Signal Handling::. - -`struct sigstack' - `signal.h' (BSD): *Note Signal Stack::. - -`struct sigvec' - `signal.h' (BSD): *Note BSD Handler::. - -`struct sockaddr' - `sys/socket.h' (BSD): *Note Address Formats::. - -`struct sockaddr_in' - `netinet/in.h' (BSD): *Note Internet Address Formats::. - -`struct sockaddr_un' - `sys/un.h' (BSD): *Note Local Namespace Details::. - -`struct stat' - `sys/stat.h' (POSIX.1): *Note Attribute Meanings::. - -`struct stat64' - `sys/stat.h' (LFS): *Note Attribute Meanings::. - -`struct termios' - `termios.h' (POSIX.1): *Note Mode Data Types::. - -`struct timespec' - `sys/time.h' (POSIX.1): *Note Elapsed Time::. - -`struct timeval' - `sys/time.h' (BSD): *Note Elapsed Time::. - -`struct timezone' - `sys/time.h' (BSD): *Note High-Resolution Calendar::. - -`struct tm' - `time.h' (ISO): *Note Broken-down Time::. - -`struct tms' - `sys/times.h' (POSIX.1): *Note Processor Time::. - -`struct utimbuf' - `time.h' (POSIX.1): *Note File Times::. - -`struct utsname' - `sys/utsname.h' (POSIX.1): *Note Platform Type::. - -`int strverscmp (const char *S1, const char *S2)' - `string.h' (GNU): *Note String/Array Comparison::. - -`size_t strxfrm (char *restrict TO, const char *restrict FROM, size_t SIZE)' - `string.h' (ISO): *Note Collation Functions::. - -`int stty (int FILEDES, struct sgttyb * attributes)' - `sgtty.h' (BSD): *Note BSD Terminal Modes::. - -`int S_TYPEISMQ (struct stat *S)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int S_TYPEISSEM (struct stat *S)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int S_TYPEISSHM (struct stat *S)' - `sys/stat.h' (POSIX): *Note Testing File Type::. - -`int SUN_LEN (_struct sockaddr_un *_ PTR)' - `sys/un.h' (BSD): *Note Local Namespace Details::. - -`_SVID_SOURCE' - (GNU): *Note Feature Test Macros::. - -`int SV_INTERRUPT' - `signal.h' (BSD): *Note BSD Handler::. - -`int SV_ONSTACK' - `signal.h' (BSD): *Note BSD Handler::. - -`int SV_RESETHAND' - `signal.h' (Sun): *Note BSD Handler::. - -`int swapcontext (ucontext_t *restrict OUCP, const ucontext_t *restrict UCP)' - `ucontext.h' (SVID): *Note System V contexts::. - -`int swprintf (wchar_t *S, size_t SIZE, const wchar_t *TEMPLATE, ...)' - `wchar.h' (GNU): *Note Formatted Output Functions::. - -`int swscanf (const wchar_t *WS, const char *TEMPLATE, ...)' - `wchar.h' (ISO): *Note Formatted Input Functions::. - -`int symlink (const char *OLDNAME, const char *NEWNAME)' - `unistd.h' (BSD): *Note Symbolic Links::. - -`SYMLINK_MAX' - `limits.h' (POSIX.1): *Note File Minimums::. - -`int sync (void)' - `unistd.h' (X/Open): *Note Synchronizing I/O::. - -`long int syscall (long int SYSNO, ...)' - `unistd.h' (???): *Note System Calls::. - -`long int sysconf (int PARAMETER)' - `unistd.h' (POSIX.1): *Note Sysconf Definition::. - -`int sysctl (int *NAMES, int NLEN, void *OLDVAL,' - `sysctl.h' (BSD): *Note System Parameters::. - -`void syslog (int FACILITY_PRIORITY, char *FORMAT, ...)' - `syslog.h' (BSD): *Note syslog; vsyslog::. - -`int system (const char *COMMAND)' - `stdlib.h' (ISO): *Note Running a Command::. - -`sighandler_t sysv_signal (int SIGNUM, sighandler_t ACTION)' - `signal.h' (GNU): *Note Basic Signal Handling::. - -`double tan (double X)' - `math.h' (ISO): *Note Trig Functions::. - -`float tanf (float X)' - `math.h' (ISO): *Note Trig Functions::. - -`double tanh (double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`float tanhf (float X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double tanhl (long double X)' - `math.h' (ISO): *Note Hyperbolic Functions::. - -`long double tanl (long double X)' - `math.h' (ISO): *Note Trig Functions::. - -`int tcdrain (int FILEDES)' - `termios.h' (POSIX.1): *Note Line Control::. - -`tcflag_t' - `termios.h' (POSIX.1): *Note Mode Data Types::. - -`int tcflow (int FILEDES, int ACTION)' - `termios.h' (POSIX.1): *Note Line Control::. - -`int tcflush (int FILEDES, int QUEUE)' - `termios.h' (POSIX.1): *Note Line Control::. - -`int tcgetattr (int FILEDES, struct termios *TERMIOS-P)' - `termios.h' (POSIX.1): *Note Mode Functions::. - -`pid_t tcgetpgrp (int FILEDES)' - `unistd.h' (POSIX.1): *Note Terminal Access Functions::. - -`pid_t tcgetsid (int FILDES)' - `termios.h' (Unix98): *Note Terminal Access Functions::. - -`TCSADRAIN' - `termios.h' (POSIX.1): *Note Mode Functions::. - -`TCSAFLUSH' - `termios.h' (POSIX.1): *Note Mode Functions::. - -`TCSANOW' - `termios.h' (POSIX.1): *Note Mode Functions::. - -`TCSASOFT' - `termios.h' (BSD): *Note Mode Functions::. - -`int tcsendbreak (int FILEDES, int DURATION)' - `termios.h' (POSIX.1): *Note Line Control::. - -`int tcsetattr (int FILEDES, int WHEN, const struct termios *TERMIOS-P)' - `termios.h' (POSIX.1): *Note Mode Functions::. - -`int tcsetpgrp (int FILEDES, pid_t PGID)' - `unistd.h' (POSIX.1): *Note Terminal Access Functions::. - -`void * tdelete (const void *KEY, void **ROOTP, comparison_fn_t COMPAR)' - `search.h' (SVID): *Note Tree Search Function::. - -`void tdestroy (void *VROOT, __free_fn_t FREEFCT)' - `search.h' (GNU): *Note Tree Search Function::. - -`off_t telldir (DIR *DIRSTREAM)' - `dirent.h' (BSD): *Note Random Access Directory::. - -`TEMP_FAILURE_RETRY (EXPRESSION)' - `unistd.h' (GNU): *Note Interrupted Primitives::. - -`char * tempnam (const char *DIR, const char *PREFIX)' - `stdio.h' (SVID): *Note Temporary Files::. - -`char * textdomain (const char *DOMAINNAME)' - `libintl.h' (GNU): *Note Locating gettext catalog::. - -`void * tfind (const void *KEY, void *const *ROOTP, comparison_fn_t COMPAR)' - `search.h' (SVID): *Note Tree Search Function::. - -`double tgamma (double X)' - `math.h' (XPG, ISO): *Note Special Functions::. - -`float tgammaf (float X)' - `math.h' (XPG, ISO): *Note Special Functions::. - -`long double tgammal (long double X)' - `math.h' (XPG, ISO): *Note Special Functions::. - -`time_t time (time_t *RESULT)' - `time.h' (ISO): *Note Simple Calendar Time::. - -`time_t timegm (struct tm *BROKENTIME)' - `time.h' (???): *Note Broken-down Time::. - -`time_t timelocal (struct tm *BROKENTIME)' - `time.h' (???): *Note Broken-down Time::. - -`clock_t times (struct tms *BUFFER)' - `sys/times.h' (POSIX.1): *Note Processor Time::. - -`time_t' - `time.h' (ISO): *Note Simple Calendar Time::. - -`long int timezone' - `time.h' (SVID): *Note Time Zone Functions::. - -`FILE * tmpfile (void)' - `stdio.h' (ISO): *Note Temporary Files::. - -`FILE * tmpfile64 (void)' - `stdio.h' (Unix98): *Note Temporary Files::. - -`int TMP_MAX' - `stdio.h' (ISO): *Note Temporary Files::. - -`char * tmpnam (char *RESULT)' - `stdio.h' (ISO): *Note Temporary Files::. - -`char * tmpnam_r (char *RESULT)' - `stdio.h' (GNU): *Note Temporary Files::. - -`int toascii (int C)' - `ctype.h' (SVID, BSD): *Note Case Conversion::. - -`int _tolower (int C)' - `ctype.h' (SVID): *Note Case Conversion::. - -`int tolower (int C)' - `ctype.h' (ISO): *Note Case Conversion::. - -`tcflag_t TOSTOP' - `termios.h' (POSIX.1): *Note Local Modes::. - -`int _toupper (int C)' - `ctype.h' (SVID): *Note Case Conversion::. - -`int toupper (int C)' - `ctype.h' (ISO): *Note Case Conversion::. - -`wint_t towctrans (wint_t WC, wctrans_t DESC)' - `wctype.h' (ISO): *Note Wide Character Case Conversion::. - -`wint_t towlower (wint_t WC)' - `wctype.h' (ISO): *Note Wide Character Case Conversion::. - -`wint_t towupper (wint_t WC)' - `wctype.h' (ISO): *Note Wide Character Case Conversion::. - -`double trunc (double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`int truncate (const char *FILENAME, off_t LENGTH)' - `unistd.h' (X/Open): *Note File Size::. - -`int truncate64 (const char *NAME, off64_t LENGTH)' - `unistd.h' (Unix98): *Note File Size::. - -`float truncf (float X)' - `math.h' (ISO): *Note Rounding Functions::. - -`long double truncl (long double X)' - `math.h' (ISO): *Note Rounding Functions::. - -`TRY_AGAIN' - `netdb.h' (BSD): *Note Host Names::. - -`void * tsearch (const void *KEY, void **ROOTP, comparison_fn_t COMPAR)' - `search.h' (SVID): *Note Tree Search Function::. - -`char * ttyname (int FILEDES)' - `unistd.h' (POSIX.1): *Note Is It a Terminal::. - -`int ttyname_r (int FILEDES, char *BUF, size_t LEN)' - `unistd.h' (POSIX.1): *Note Is It a Terminal::. - -`void twalk (const void *ROOT, __action_fn_t ACTION)' - `search.h' (SVID): *Note Tree Search Function::. - -`char * tzname [2]' - `time.h' (POSIX.1): *Note Time Zone Functions::. - -`int TZNAME_MAX' - `limits.h' (POSIX.1): *Note General Limits::. - -`void tzset (void)' - `time.h' (POSIX.1): *Note Time Zone Functions::. - -`UCHAR_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`ucontext_t' - `ucontext.h' (SVID): *Note System V contexts::. - -`uid_t' - `sys/types.h' (POSIX.1): *Note Reading Persona::. - -`UINT_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`int ulimit (int CMD, ...)' - `ulimit.h' (BSD): *Note Limits on Resources::. - -`ULONG_LONG_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`ULONG_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`mode_t umask (mode_t MASK)' - `sys/stat.h' (POSIX.1): *Note Setting Permissions::. - -`int umount (const char *FILE)' - `sys/mount.h' (SVID, GNU): *Note Mount-Unmount-Remount::. - -`int umount2 (const char *FILE, int FLAGS)' - `sys/mount.h' (GNU): *Note Mount-Unmount-Remount::. - -`int uname (struct utsname *INFO)' - `sys/utsname.h' (POSIX.1): *Note Platform Type::. - -`int ungetc (int C, FILE *STREAM)' - `stdio.h' (ISO): *Note How Unread::. - -`wint_t ungetwc (wint_t WC, FILE *STREAM)' - `wchar.h' (ISO): *Note How Unread::. - -`union wait' - `sys/wait.h' (BSD): *Note BSD Wait Functions::. - -`int unlink (const char *FILENAME)' - `unistd.h' (POSIX.1): *Note Deleting Files::. - -`int unlockpt (int FILEDES)' - `stdlib.h' (SVID, XPG4.2): *Note Allocation::. - -`int unsetenv (const char *NAME)' - `stdlib.h' (BSD): *Note Environment Access::. - -`void updwtmp (const char *WTMP_FILE, const struct utmp *UTMP)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`USER_PROCESS' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`USER_PROCESS' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`USHRT_MAX' - `limits.h' (ISO): *Note Range of Type::. - -`int utime (const char *FILENAME, const struct utimbuf *TIMES)' - `time.h' (POSIX.1): *Note File Times::. - -`int utimes (const char *FILENAME, struct timeval TVP[2])' - `sys/time.h' (BSD): *Note File Times::. - -`int utmpname (const char *FILE)' - `utmp.h' (SVID): *Note Manipulating the Database::. - -`int utmpxname (const char *FILE)' - `utmpx.h' (XPG4.2): *Note XPG Functions::. - -`va_alist' - `varargs.h' (Unix): *Note Old Varargs::. - -`TYPE va_arg (va_list AP, TYPE)' - `stdarg.h' (ISO): *Note Argument Macros::. - -`void __va_copy (va_list DEST, va_list SRC)' - `stdarg.h' (GNU): *Note Argument Macros::. - -`va_dcl' - `varargs.h' (Unix): *Note Old Varargs::. - -`void va_end (va_list AP)' - `stdarg.h' (ISO): *Note Argument Macros::. - -`va_list' - `stdarg.h' (ISO): *Note Argument Macros::. - -`void * valloc (size_t SIZE)' - `malloc.h', `stdlib.h' (BSD): *Note Aligned Memory Blocks::. - -`int vasprintf (char **PTR, const char *TEMPLATE, va_list AP)' - `stdio.h' (GNU): *Note Variable Arguments Output::. - -`void va_start (va_list AP)' - `varargs.h' (Unix): *Note Old Varargs::. - -`void va_start (va_list AP, LAST-REQUIRED)' - `stdarg.h' (ISO): *Note Argument Macros::. - -`int VDISCARD' - `termios.h' (BSD): *Note Other Special::. - -`int VDSUSP' - `termios.h' (BSD): *Note Signal Characters::. - -`int VEOF' - `termios.h' (POSIX.1): *Note Editing Characters::. - -`int VEOL' - `termios.h' (POSIX.1): *Note Editing Characters::. - -`int VEOL2' - `termios.h' (BSD): *Note Editing Characters::. - -`int VERASE' - `termios.h' (POSIX.1): *Note Editing Characters::. - -`int versionsort (const void *A, const void *B)' - `dirent.h' (GNU): *Note Scanning Directory Content::. - -`int versionsort64 (const void *A, const void *B)' - `dirent.h' (GNU): *Note Scanning Directory Content::. - -`pid_t vfork (void)' - `unistd.h' (BSD): *Note Creating a Process::. - -`int vfprintf (FILE *STREAM, const char *TEMPLATE, va_list AP)' - `stdio.h' (ISO): *Note Variable Arguments Output::. - -`int vfscanf (FILE *STREAM, const char *TEMPLATE, va_list AP)' - `stdio.h' (ISO): *Note Variable Arguments Input::. - -`int vfwprintf (FILE *STREAM, const wchar_t *TEMPLATE, va_list AP)' - `wchar.h' (ISO): *Note Variable Arguments Output::. - -`int vfwscanf (FILE *STREAM, const wchar_t *TEMPLATE, va_list AP)' - `wchar.h' (ISO): *Note Variable Arguments Input::. - -`int VINTR' - `termios.h' (POSIX.1): *Note Signal Characters::. - -`int VKILL' - `termios.h' (POSIX.1): *Note Editing Characters::. - -`int vlimit (int RESOURCE, int LIMIT)' - `sys/vlimit.h' (BSD): *Note Limits on Resources::. - -`int VLNEXT' - `termios.h' (BSD): *Note Other Special::. - -`int VMIN' - `termios.h' (POSIX.1): *Note Noncanonical Input::. - -`int vprintf (const char *TEMPLATE, va_list AP)' - `stdio.h' (ISO): *Note Variable Arguments Output::. - -`int VQUIT' - `termios.h' (POSIX.1): *Note Signal Characters::. - -`int VREPRINT' - `termios.h' (BSD): *Note Editing Characters::. - -`int vscanf (const char *TEMPLATE, va_list AP)' - `stdio.h' (ISO): *Note Variable Arguments Input::. - -`int vsnprintf (char *S, size_t SIZE, const char *TEMPLATE, va_list AP)' - `stdio.h' (GNU): *Note Variable Arguments Output::. - -`int vsprintf (char *S, const char *TEMPLATE, va_list AP)' - `stdio.h' (ISO): *Note Variable Arguments Output::. - -`int vsscanf (const char *S, const char *TEMPLATE, va_list AP)' - `stdio.h' (ISO): *Note Variable Arguments Input::. - -`int VSTART' - `termios.h' (POSIX.1): *Note Start/Stop Characters::. - -`int VSTATUS' - `termios.h' (BSD): *Note Other Special::. - -`int VSTOP' - `termios.h' (POSIX.1): *Note Start/Stop Characters::. - -`int VSUSP' - `termios.h' (POSIX.1): *Note Signal Characters::. - -`int vswprintf (wchar_t *S, size_t SIZE, const wchar_t *TEMPLATE, va_list AP)' - `wchar.h' (GNU): *Note Variable Arguments Output::. - -`int vswscanf (const wchar_t *S, const wchar_t *TEMPLATE, va_list AP)' - `wchar.h' (ISO): *Note Variable Arguments Input::. - -`void vsyslog (int FACILITY_PRIORITY, char *FORMAT, va_list arglist)' - `syslog.h' (BSD): *Note syslog; vsyslog::. - -`int VTIME' - `termios.h' (POSIX.1): *Note Noncanonical Input::. - -`int vtimes (struct vtimes CURRENT, struct vtimes CHILD)' - `vtimes.h' (vtimes.h): *Note Resource Usage::. - -`int VWERASE' - `termios.h' (BSD): *Note Editing Characters::. - -`int vwprintf (const wchar_t *TEMPLATE, va_list AP)' - `wchar.h' (ISO): *Note Variable Arguments Output::. - -`int vwscanf (const wchar_t *TEMPLATE, va_list AP)' - `wchar.h' (ISO): *Note Variable Arguments Input::. - -`pid_t wait (int *STATUS-PTR)' - `sys/wait.h' (POSIX.1): *Note Process Completion::. - -`pid_t wait3 (union wait *STATUS-PTR, int OPTIONS, struct rusage *USAGE)' - `sys/wait.h' (BSD): *Note BSD Wait Functions::. - -`pid_t wait4 (pid_t PID, int *STATUS-PTR, int OPTIONS, struct rusage *USAGE)' - `sys/wait.h' (BSD): *Note Process Completion::. - -`pid_t waitpid (pid_t PID, int *STATUS-PTR, int OPTIONS)' - `sys/wait.h' (POSIX.1): *Note Process Completion::. - -`WCHAR_MAX' - `limits.h' (GNU): *Note Range of Type::. - -`wint_t WCHAR_MAX' - `wchar.h' (ISO): *Note Extended Char Intro::. - -`wint_t WCHAR_MIN' - `wchar.h' (ISO): *Note Extended Char Intro::. - -`wchar_t' - `stddef.h' (ISO): *Note Extended Char Intro::. - -`int WCOREDUMP (int STATUS)' - `sys/wait.h' (BSD): *Note Process Completion Status::. - -`wchar_t * wcpcpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM)' - `wchar.h' (GNU): *Note Copying and Concatenation::. - -`wchar_t * wcpncpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' - `wchar.h' (GNU): *Note Copying and Concatenation::. - -`size_t wcrtomb (char *restrict S, wchar_t WC, mbstate_t *restrict PS)' - `wchar.h' (ISO): *Note Converting a Character::. - -`int wcscasecmp (const wchar_t *WS1, const wchar_T *WS2)' - `wchar.h' (GNU): *Note String/Array Comparison::. - -`wchar_t * wcscat (wchar_t *restrict WTO, const wchar_t *restrict WFROM)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`wchar_t * wcschr (const wchar_t *WSTRING, int WC)' - `wchar.h' (ISO): *Note Search Functions::. - -`wchar_t * wcschrnul (const wchar_t *WSTRING, wchar_t WC)' - `wchar.h' (GNU): *Note Search Functions::. - -`int wcscmp (const wchar_t *WS1, const wchar_t *WS2)' - `wchar.h' (ISO): *Note String/Array Comparison::. - -`int wcscoll (const wchar_t *WS1, const wchar_t *WS2)' - `wchar.h' (ISO): *Note Collation Functions::. - -`wchar_t * wcscpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`size_t wcscspn (const wchar_t *WSTRING, const wchar_t *STOPSET)' - `wchar.h' (ISO): *Note Search Functions::. - -`wchar_t * wcsdup (const wchar_t *WS)' - `wchar.h' (GNU): *Note Copying and Concatenation::. - -`size_t wcsftime (wchar_t *S, size_t SIZE, const wchar_t *TEMPLATE, const struct tm *BROKENTIME)' - `time.h' (ISO/Amend1): *Note Formatting Calendar Time::. - -`size_t wcslen (const wchar_t *WS)' - `wchar.h' (ISO): *Note String Length::. - -`int wcsncasecmp (const wchar_t *WS1, const wchar_t *S2, size_t N)' - `wchar.h' (GNU): *Note String/Array Comparison::. - -`wchar_t * wcsncat (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`int wcsncmp (const wchar_t *WS1, const wchar_t *WS2, size_t SIZE)' - `wchar.h' (ISO): *Note String/Array Comparison::. - -`wchar_t * wcsncpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`size_t wcsnlen (const wchar_t *WS, size_t MAXLEN)' - `wchar.h' (GNU): *Note String Length::. - -`size_t wcsnrtombs (char *restrict DST, const wchar_t **restrict SRC, size_t NWC, size_t LEN, mbstate_t *restrict PS)' - `wchar.h' (GNU): *Note Converting Strings::. - -`wchar_t * wcspbrk (const wchar_t *WSTRING, const wchar_t *STOPSET)' - `wchar.h' (ISO): *Note Search Functions::. - -`wchar_t * wcsrchr (const wchar_t *WSTRING, wchar_t C)' - `wchar.h' (ISO): *Note Search Functions::. - -`size_t wcsrtombs (char *restrict DST, const wchar_t **restrict SRC, size_t LEN, mbstate_t *restrict PS)' - `wchar.h' (ISO): *Note Converting Strings::. - -`size_t wcsspn (const wchar_t *WSTRING, const wchar_t *SKIPSET)' - `wchar.h' (ISO): *Note Search Functions::. - -`wchar_t * wcsstr (const wchar_t *HAYSTACK, const wchar_t *NEEDLE)' - `wchar.h' (ISO): *Note Search Functions::. - -`double wcstod (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR)' - `wchar.h' (ISO): *Note Parsing of Floats::. - -`float wcstof (const wchar_t *STRING, wchar_t **TAILPTR)' - `stdlib.h' (ISO): *Note Parsing of Floats::. - -`intmax_t wcstoimax (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (ISO): *Note Parsing of Integers::. - -`wchar_t * wcstok (wchar_t *NEWSTRING, const char *DELIMITERS)' - `wchar.h' (ISO): *Note Finding Tokens in a String::. - -`long int wcstol (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (ISO): *Note Parsing of Integers::. - -`long double wcstold (const wchar_t *STRING, wchar_t **TAILPTR)' - `stdlib.h' (ISO): *Note Parsing of Floats::. - -`long long int wcstoll (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (ISO): *Note Parsing of Integers::. - -`size_t wcstombs (char *STRING, const wchar_t *WSTRING, size_t SIZE)' - `stdlib.h' (ISO): *Note Non-reentrant String Conversion::. - -`long long int wcstoq (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (GNU): *Note Parsing of Integers::. - -`unsigned long int wcstoul (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (ISO): *Note Parsing of Integers::. - -`unsigned long long int wcstoull (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (ISO): *Note Parsing of Integers::. - -`uintmax_t wcstoumax (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (ISO): *Note Parsing of Integers::. - -`unsigned long long int wcstouq (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' - `wchar.h' (GNU): *Note Parsing of Integers::. - -`wchar_t * wcswcs (const wchar_t *HAYSTACK, const wchar_t *NEEDLE)' - `wchar.h' (XPG): *Note Search Functions::. - -`size_t wcsxfrm (wchar_t *restrict WTO, const wchar_t *WFROM, size_t SIZE)' - `wchar.h' (ISO): *Note Collation Functions::. - -`int wctob (wint_t C)' - `wchar.h' (ISO): *Note Converting a Character::. - -`int wctomb (char *STRING, wchar_t WCHAR)' - `stdlib.h' (ISO): *Note Non-reentrant Character Conversion::. - -`wctrans_t wctrans (const char *PROPERTY)' - `wctype.h' (ISO): *Note Wide Character Case Conversion::. - -`wctrans_t' - `wctype.h' (ISO): *Note Wide Character Case Conversion::. - -`wctype_t wctype (const char *PROPERTY)' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`wctype_t' - `wctype.h' (ISO): *Note Classification of Wide Characters::. - -`int WEOF' - `wchar.h' (ISO): *Note EOF and Errors::. - -`wint_t WEOF' - `wchar.h' (ISO): *Note Extended Char Intro::. - -`int WEXITSTATUS (int STATUS)' - `sys/wait.h' (POSIX.1): *Note Process Completion Status::. - -`int WIFEXITED (int STATUS)' - `sys/wait.h' (POSIX.1): *Note Process Completion Status::. - -`int WIFSIGNALED (int STATUS)' - `sys/wait.h' (POSIX.1): *Note Process Completion Status::. - -`int WIFSTOPPED (int STATUS)' - `sys/wait.h' (POSIX.1): *Note Process Completion Status::. - -`wint_t' - `wchar.h' (ISO): *Note Extended Char Intro::. - -`wchar_t * wmemchr (const wchar_t *BLOCK, wchar_t WC, size_t SIZE)' - `wchar.h' (ISO): *Note Search Functions::. - -`int wmemcmp (const wchar_t *A1, const wchar_t *A2, size_t SIZE)' - `wcjar.h' (ISO): *Note String/Array Comparison::. - -`wchar_t * wmemcpy (wchar_t *restrict WTO, const wchar_t *restruct WFROM, size_t SIZE)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`wchar_t * wmemmove (wchar *WTO, const wchar_t *WFROM, size_t SIZE)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`wchar_t * wmempcpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' - `wchar.h' (GNU): *Note Copying and Concatenation::. - -`wchar_t * wmemset (wchar_t *BLOCK, wchar_t WC, size_t SIZE)' - `wchar.h' (ISO): *Note Copying and Concatenation::. - -`int W_OK' - `unistd.h' (POSIX.1): *Note Testing File Access::. - -`int wordexp (const char *WORDS, wordexp_t *WORD-VECTOR-PTR, int FLAGS)' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`wordexp_t' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`void wordfree (wordexp_t *WORD-VECTOR-PTR)' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`int wprintf (const wchar_t *TEMPLATE, ...)' - `wchar.h' (ISO): *Note Formatted Output Functions::. - -`WRDE_APPEND' - `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. - -`WRDE_BADCHAR' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`WRDE_BADVAL' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`WRDE_CMDSUB' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`WRDE_DOOFFS' - `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. - -`WRDE_NOCMD' - `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. - -`WRDE_NOSPACE' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`WRDE_REUSE' - `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. - -`WRDE_SHOWERR' - `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. - -`WRDE_SYNTAX' - `wordexp.h' (POSIX.2): *Note Calling Wordexp::. - -`WRDE_UNDEF' - `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. - -`ssize_t write (int FILEDES, const void *BUFFER, size_t SIZE)' - `unistd.h' (POSIX.1): *Note I/O Primitives::. + The value of this macro is the minimum normalized positive floating + point number that is representable in type `float'. It is supposed + to be no more than `1E-37'. -`ssize_t writev (int FILEDES, const struct iovec *VECTOR, int COUNT)' - `sys/uio.h' (BSD): *Note Scatter-Gather::. +`DBL_MIN' +`LDBL_MIN' + These are similar to `FLT_MIN', but for the data types `double' + and `long double', respectively. The type of the macro's value is + the same as the type it describes. -`int wscanf (const wchar_t *TEMPLATE, ...)' - `wchar.h' (ISO): *Note Formatted Input Functions::. +`FLT_EPSILON' + This is the maximum positive floating point number of type `float' + such that `1.0 + FLT_EPSILON != 1.0' is true. It's supposed to be + no greater than `1E-5'. -`int WSTOPSIG (int STATUS)' - `sys/wait.h' (POSIX.1): *Note Process Completion Status::. +`DBL_EPSILON' +`LDBL_EPSILON' + These are similar to `FLT_EPSILON', but for the data types + `double' and `long double', respectively. The type of the macro's + value is the same as the type it describes. The values are not + supposed to be greater than `1E-9'. -`int WTERMSIG (int STATUS)' - `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +File: libc.info, Node: IEEE Floating Point, Prev: Floating Point Parameters, Up: Floating Type Macros -`int X_OK' - `unistd.h' (POSIX.1): *Note Testing File Access::. +IEEE Floating Point +................... -`_XOPEN_SOURCE' - (X/Open): *Note Feature Test Macros::. + Here is an example showing how the floating type measurements come +out for the most common floating point representation, specified by the +`IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE Std +754-1985)'. Nearly all computers designed since the 1980s use this +format. -`_XOPEN_SOURCE_EXTENDED' - (X/Open): *Note Feature Test Macros::. + The IEEE single-precision float representation uses a base of 2. +There is a sign bit, a mantissa with 23 bits plus one hidden bit (so +the total precision is 24 base-2 digits), and an 8-bit exponent that +can represent values in the range -125 to 128, inclusive. -`double y0 (double X)' - `math.h' (SVID): *Note Special Functions::. + So, for an implementation that uses this representation for the +`float' data type, appropriate values for the corresponding parameters +are: -`float y0f (float X)' - `math.h' (SVID): *Note Special Functions::. + FLT_RADIX 2 + FLT_MANT_DIG 24 + FLT_DIG 6 + FLT_MIN_EXP -125 + FLT_MIN_10_EXP -37 + FLT_MAX_EXP 128 + FLT_MAX_10_EXP +38 + FLT_MIN 1.17549435E-38F + FLT_MAX 3.40282347E+38F + FLT_EPSILON 1.19209290E-07F -`long double y0l (long double X)' - `math.h' (SVID): *Note Special Functions::. + Here are the values for the `double' data type: -`double y1 (double X)' - `math.h' (SVID): *Note Special Functions::. + DBL_MANT_DIG 53 + DBL_DIG 15 + DBL_MIN_EXP -1021 + DBL_MIN_10_EXP -307 + DBL_MAX_EXP 1024 + DBL_MAX_10_EXP 308 + DBL_MAX 1.7976931348623157E+308 + DBL_MIN 2.2250738585072014E-308 + DBL_EPSILON 2.2204460492503131E-016 -`float y1f (float X)' - `math.h' (SVID): *Note Special Functions::. + +File: libc.info, Node: Structure Measurement, Prev: Floating Type Macros, Up: Data Type Measurements -`long double y1l (long double X)' - `math.h' (SVID): *Note Special Functions::. +Structure Field Offset Measurement +---------------------------------- -`double yn (int n, double X)' - `math.h' (SVID): *Note Special Functions::. + You can use `offsetof' to measure the location within a structure +type of a particular structure member. -`float ynf (int n, float X)' - `math.h' (SVID): *Note Special Functions::. + - Macro: size_t offsetof (TYPE, MEMBER) + This expands to a integer constant expression that is the offset + of the structure member named MEMBER in a the structure type TYPE. + For example, `offsetof (struct s, elem)' is the offset, in bytes, + of the member `elem' in a `struct s'. -`long double ynl (int n, long double X)' - `math.h' (SVID): *Note Special Functions::. + This macro won't work if MEMBER is a bit field; you get an error + from the C compiler in that case. diff -durpN glibc-2.2.4/manual/libc.info-53 glibc-2.2.5/manual/libc.info-53 --- glibc-2.2.4/manual/libc.info-53 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-53 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,998 +33,7010 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Installation, Next: Maintenance, Prev: Library Summary, Up: Top +File: libc.info, Node: Library Summary, Next: Installation, Prev: Language Features, Up: Top -Installing the GNU C Library -**************************** +Summary of Library Facilities +***************************** - Before you do anything else, you should read the file `FAQ' found at -the top level of the source tree. This file answers common questions -and describes problems you may experience with compilation and -installation. It is updated more frequently than this manual. + This appendix is a complete list of the facilities declared within +the header files supplied with the GNU C library. Each entry also +lists the standard or other source from which each facility is derived, +and tells you where in the manual you can find more information about +how to use it. - Features can be added to GNU Libc via "add-on" bundles. These are -separate tarfiles which you unpack into the top level of the source -tree. Then you give `configure' the `--enable-add-ons' option to -activate them, and they will be compiled into the library. As of the -2.2 release, one important component of glibc is distributed as -"official" add-ons: the linuxthreads add-on. Unless you are doing an -unusual installation, you should get this. +`long int a64l (const char *STRING)' + `stdlib.h' (XPG): *Note Encode Binary Data::. - Support for POSIX threads is maintained by someone else, so it's in a -separate package. It is only available for Linux systems, but this will -change in the future. Get it from the same place you got the main -bundle; the file is `glibc-linuxthreads-VERSION.tar.gz'. +`void abort (void)' + `stdlib.h' (ISO): *Note Aborting a Program::. - You will need recent versions of several GNU tools: definitely GCC -and GNU Make, and possibly others. *Note Tools for Compilation::, -below. +`int abs (int NUMBER)' + `stdlib.h' (ISO): *Note Absolute Value::. -* Menu: +`int accept (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH_PTR)' + `sys/socket.h' (BSD): *Note Accepting Connections::. -* Configuring and compiling:: How to compile and test GNU libc. -* Running make install:: How to install it once you've got it compiled. -* Tools for Compilation:: You'll need these first. -* Supported Configurations:: What it runs on, what it doesn't. -* Linux:: Specific advice for Linux systems. -* Reporting Bugs:: So they'll get fixed. +`int access (const char *FILENAME, int HOW)' + `unistd.h' (POSIX.1): *Note Testing File Access::. - -File: libc.info, Node: Configuring and compiling, Next: Running make install, Up: Installation +`ACCOUNTING' + `utmp.h' (SVID): *Note Manipulating the Database::. -Configuring and compiling GNU Libc -================================== +`double acos (double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - GNU libc can be compiled in the source directory, but we strongly -advise to build it in a separate build directory. For example, if you -have unpacked the glibc sources in `/src/gnu/glibc-2.2.0', create a -directory `/src/gnu/glibc-build' to put the object files in. This -allows removing the whole build directory in case an error occurs, -which is the safest way to get a fresh start and should always be done. +`float acosf (float X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - From your object directory, run the shell script `configure' found -at the top level of the source tree. In the scenario above, you'd type +`double acosh (double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - $ ../glibc-2.2.0/configure ARGS... +`float acoshf (float X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - Please note that even if you're building in a separate build -directory, the compilation needs to modify a few files in the source -directory, especially some files in the manual subdirectory. +`long double acoshl (long double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. -`configure' takes many options, but you can get away with knowing only -two: `--prefix' and `--enable-add-ons'. The `--prefix' option tells -configure where you want glibc installed. This defaults to -`/usr/local'. The `--enable-add-ons' option tells configure to use all -the add-on bundles it finds in the source directory. Since important -functionality is provided in add-ons, you should always specify this -option. +`long double acosl (long double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - It may also be useful to set the CC and CFLAGS variables in the -environment when running `configure'. CC selects the C compiler that -will be used, and CFLAGS sets optimization options for the compiler. +`int addmntent (FILE *STREAM, const struct mntent *MNT)' + `mntent.h' (BSD): *Note mtab::. - The following list describes all of the available options for -`configure': +`int adjtime (const struct timeval *DELTA, struct timeval *OLDDELTA)' + `sys/time.h' (BSD): *Note High-Resolution Calendar::. -`--prefix=DIRECTORY' - Install machine-independent data files in subdirectories of - `DIRECTORY'. The default is to install in `/usr/local'. +`int adjtimex (struct timex *TIMEX)' + `sys/timex.h' (GNU): *Note High-Resolution Calendar::. -`--exec-prefix=DIRECTORY' - Install the library and other machine-dependent files in - subdirectories of `DIRECTORY'. The default is to the `--prefix' - directory if that option is specified, or `/usr/local' otherwise. +`AF_FILE' + `sys/socket.h' (GNU): *Note Address Formats::. -`--with-headers=DIRECTORY' - Look for kernel header files in DIRECTORY, not `/usr/include'. - Glibc needs information from the kernel's private header files. - It will normally look in `/usr/include' for them, but if you - specify this option, it will look in DIRECTORY instead. +`AF_INET' + `sys/socket.h' (BSD): *Note Address Formats::. - This option is primarily of use on a system where the headers in - `/usr/include' come from an older version of glibc. Conflicts can - occasionally happen in this case. Note that Linux libc5 qualifies - as an older version of glibc. You can also use this option if you - want to compile glibc with a newer set of kernel headers than the - ones found in `/usr/include'. +`AF_INET6' + `sys/socket.h' (IPv6 Basic API): *Note Address Formats::. -`--enable-add-ons[=LIST]' - Enable add-on packages in your source tree. If this option is - specified with no list, it enables all the add-on packages it - finds. If you do not wish to use some add-on package that you - have present in your source tree, give this option a list of the - add-ons that you _do_ want used, like this: - `--enable-add-ons=linuxthreads' +`AF_LOCAL' + `sys/socket.h' (POSIX): *Note Address Formats::. -`--enable-kernel=VERSION' - This option is currently only useful on Linux systems. The - VERSION parameter should have the form X.Y.Z and describes the - smallest version of the Linux kernel the generated library is - expected to support. The higher the VERSION number is, the less - compatibility code is added, and the faster the code gets. +`AF_UNIX' + `sys/socket.h' (BSD, Unix98): *Note Address Formats::. -`--with-binutils=DIRECTORY' - Use the binutils (assembler and linker) in `DIRECTORY', not the - ones the C compiler would default to. You could use this option if - the default binutils on your system cannot deal with all the - constructs in the GNU C library. In that case, `configure' will - detect the problem and suppress these constructs, so that the - library will still be usable, but functionality may be lost--for - example, you can't build a shared libc with old binutils. +`AF_UNSPEC' + `sys/socket.h' (BSD): *Note Address Formats::. -`--without-fp' - Use this option if your computer lacks hardware floating-point - support and your operating system does not emulate an FPU. +`int aio_cancel (int FILDES, struct aiocb *AIOCBP)' + `aio.h' (POSIX.1b): *Note Cancel AIO Operations::. -`--disable-shared' - Don't build shared libraries even if it is possible. Not all - systems support shared libraries; you need ELF support and - (currently) the GNU linker. +`int aio_cancel64 (int FILDES, struct aiocb64 *AIOCBP)' + `aio.h' (Unix98): *Note Cancel AIO Operations::. -`--disable-profile' - Don't build libraries with profiling information. You may want to - use this option if you don't plan to do profiling. +`int aio_error (const struct aiocb *AIOCBP)' + `aio.h' (POSIX.1b): *Note Status of AIO Operations::. -`--enable-omitfp' - Use maximum optimization for the normal (static and shared) - libraries, and compile separate static libraries with debugging - information and no optimization. We recommend against this. The - extra optimization doesn't gain you much, it may provoke compiler - bugs, and you won't be able to trace bugs through the C library. +`int aio_error64 (const struct aiocb64 *AIOCBP)' + `aio.h' (Unix98): *Note Status of AIO Operations::. -`--disable-versioning' - Don't compile the shared libraries with symbol version information. - Doing this will make the resulting library incompatible with old - binaries, so it's not recommended. +`int aio_fsync (int OP, struct aiocb *AIOCBP)' + `aio.h' (POSIX.1b): *Note Synchronizing AIO Operations::. -`--enable-static-nss' - Compile static versions of the NSS (Name Service Switch) libraries. - This is not recommended because it defeats the purpose of NSS; a - program linked statically with the NSS libraries cannot be - dynamically reconfigured to use a different name database. +`int aio_fsync64 (int OP, struct aiocb64 *AIOCBP)' + `aio.h' (Unix98): *Note Synchronizing AIO Operations::. -`--build=BUILD-SYSTEM' -`--host=HOST-SYSTEM' - These options are for cross-compiling. If you specify both - options and BUILD-SYSTEM is different from HOST-SYSTEM, `configure' - will prepare to cross-compile glibc from BUILD-SYSTEM to be used - on HOST-SYSTEM. You'll probably need the `--with-headers' option - too, and you may have to override CONFIGURE's selection of the - compiler and/or binutils. +`void aio_init (const struct aioinit *INIT)' + `aio.h' (GNU): *Note Configuration of AIO::. - If you only specify `--host', configure will prepare for a native - compile but use what you specify instead of guessing what your - system is. This is most useful to change the CPU submodel. For - example, if configure guesses your machine as `i586-pc-linux-gnu' - but you want to compile a library for 386es, give - `--host=i386-pc-linux-gnu' or just `--host=i386-linux' and add the - appropriate compiler flags (`-mcpu=i386' will do the trick) to - CFLAGS. +`int aio_read (struct aiocb *AIOCBP)' + `aio.h' (POSIX.1b): *Note Asynchronous Reads/Writes::. - If you specify just `--build', configure will get confused. +`int aio_read64 (struct aiocb *AIOCBP)' + `aio.h' (Unix98): *Note Asynchronous Reads/Writes::. - To build the library and related programs, type `make'. This will -produce a lot of output, some of which may look like errors from `make' -but isn't. Look for error messages from `make' containing `***'. -Those indicate that something is really wrong. +`ssize_t aio_return (const struct aiocb *AIOCBP)' + `aio.h' (POSIX.1b): *Note Status of AIO Operations::. - The compilation process takes several hours even on fast hardware. -Expect at least two hours for the default configuration on i586 for -Linux. For Hurd times are much longer. Except for EGCS 1.1 and GCC -2.95 (and later versions of GCC), all supported versions of GCC have a -problem which causes them to take several minutes to compile certain -files in the iconvdata directory. Do not panic if the compiler appears -to hang. +`int aio_return64 (const struct aiocb64 *AIOCBP)' + `aio.h' (Unix98): *Note Status of AIO Operations::. - If you want to run a parallel make, you can't just give `make' the -`-j' option, because it won't be passed down to the sub-makes. -Instead, edit the generated `Makefile' and uncomment the line +`int aio_suspend (const struct aiocb *const LIST[], int NENT, const struct timespec *TIMEOUT)' + `aio.h' (POSIX.1b): *Note Synchronizing AIO Operations::. - # PARALLELMFLAGS = -j 4 +`int aio_suspend64 (const struct aiocb64 *const LIST[], int NENT, const struct timespec *TIMEOUT)' + `aio.h' (Unix98): *Note Synchronizing AIO Operations::. -You can change the `4' to some other number as appropriate for your -system. Instead of changing the `Makefile', you could give this option -directly to `make' and call it as, for example, `make -PARALLELMFLAGS=-j4'. If you're building in the source directory, you -must use the latter approach since in this case no new `Makefile' is -generated for you to change. +`int aio_write (struct aiocb *AIOCBP)' + `aio.h' (POSIX.1b): *Note Asynchronous Reads/Writes::. - To build and run test programs which exercise some of the library -facilities, type `make check'. If it does not complete successfully, -do not use the built library, and report a bug after verifying that the -problem is not already known. *Note Reporting Bugs::, for instructions -on reporting bugs. Note that some of the tests assume they are not -being run by `root'. We recommend you compile and test glibc as an -unprivileged user. +`int aio_write64 (struct aiocb *AIOCBP)' + `aio.h' (Unix98): *Note Asynchronous Reads/Writes::. - To format the `GNU C Library Reference Manual' for printing, type -`make dvi'. You need a working TeX installation to do this. The -distribution already includes the on-line formatted version of the -manual, as Info files. You can regenerate those with `make info', but -it shouldn't be necessary. +`unsigned int alarm (unsigned int SECONDS)' + `unistd.h' (POSIX.1): *Note Setting an Alarm::. - The library has a number of special-purpose configuration parameters -which you can find in `Makeconfig'. These can be overwritten with the -file `configparms'. To change them, create a `configparms' in your -build directory and add values as appropriate for your system. The -file is included and parsed by `make' and has to follow the conventions -for makefiles. +`void * alloca (size_t SIZE);' + `stdlib.h' (GNU, BSD): *Note Variable Size Automatic::. - It is easy to configure the GNU C library for cross-compilation by -setting a few variables in `configparms'. Set `CC' to the -cross-compiler for the target you configured the library for; it is -important to use this same `CC' value when running `configure', like -this: `CC=TARGET-gcc configure TARGET'. Set `BUILD_CC' to the compiler -to use for for programs run on the build system as part of compiling -the library. You may need to set `AR' and `RANLIB' to cross-compiling -versions of `ar' and `ranlib' if the native tools are not configured to -work with object files for the target you configured for. +`int alphasort (const void *A, const void *B)' + `dirent.h' (BSD/SVID): *Note Scanning Directory Content::. - -File: libc.info, Node: Running make install, Next: Tools for Compilation, Prev: Configuring and compiling, Up: Installation +`int alphasort64 (const void *A, const void *B)' + `dirent.h' (GNU): *Note Scanning Directory Content::. -Installing the C Library -======================== +`tcflag_t ALTWERASE' + `termios.h' (BSD): *Note Local Modes::. - To install the library and its header files, and the Info files of -the manual, type `env LANGUAGE=C LC_ALL=C make install'. This will -build things if necessary, before installing them. However, you should -still compile everything first. If you are installing glibc as your -primary C library, we recommend that you shut the system down to -single-user mode first, and reboot afterward. This minimizes the risk -of breaking things when the library changes out from underneath. +`int ARG_MAX' + `limits.h' (POSIX.1): *Note General Limits::. - If you're upgrading from Linux libc5 or some other C library, you -need to replace the `/usr/include' with a fresh directory before -installing it. The new `/usr/include' should contain the Linux -headers, but nothing else. +`error_t argp_err_exit_status' + `argp.h' (GNU): *Note Argp Global Variables::. - You must first build the library (`make'), optionally check it -(`make check'), switch the include directories and then install (`make -install'). The steps must be done in this order. Not moving the -directory before install will result in an unusable mixture of header -files from both libraries, but configuring, building, and checking the -library requires the ability to compile and run programs against the old -library. +`void argp_error (const struct argp_state *STATE, const char *FMT, ...)' + `argp.h' (GNU): *Note Argp Helper Functions::. - If you are upgrading from a previous installation of glibc 2.0 or -2.1, `make install' will do the entire job. You do not need to remove -the old includes - if you want to do so anyway you must then follow the -order given above. +`int ARGP_ERR_UNKNOWN' + `argp.h' (GNU): *Note Argp Parser Functions::. - You may also need to reconfigure GCC to work with the new library. -The easiest way to do that is to figure out the compiler switches to -make it work again (`-Wl,--dynamic-linker=/lib/ld-linux.so.2' should -work on Linux systems) and use them to recompile gcc. You can also -edit the specs file (`/usr/lib/gcc-lib/TARGET/VERSION/specs'), but that -is a bit of a black art. +`void argp_failure (const struct argp_state *STATE, int STATUS, int ERRNUM, const char *FMT, ...)' + `argp.h' (GNU): *Note Argp Helper Functions::. - You can install glibc somewhere other than where you configured it -to go by setting the `install_root' variable on the command line for -`make install'. The value of this variable is prepended to all the -paths for installation. This is useful when setting up a chroot -environment or preparing a binary distribution. The directory should be -specified with an absolute file name. +`void argp_help (const struct argp *ARGP, FILE *STREAM, unsigned FLAGS, char *NAME)' + `argp.h' (GNU): *Note Argp Help::. - Glibc 2.2 includes a daemon called `nscd', which you may or may not -want to run. `nscd' caches name service lookups; it can dramatically -improve performance with NIS+, and may help with DNS as well. +`ARGP_IN_ORDER' + `argp.h' (GNU): *Note Argp Flags::. - One auxiliary program, `/usr/libexec/pt_chown', is installed setuid -`root'. This program is invoked by the `grantpt' function; it sets the -permissions on a pseudoterminal so it can be used by the calling -process. This means programs like `xterm' and `screen' do not have to -be setuid to get a pty. (There may be other reasons why they need -privileges.) If you are using a 2.1 or newer Linux kernel with the -`devptsfs' or `devfs' filesystems providing pty slaves, you don't need -this program; otherwise you do. The source for `pt_chown' is in -`login/programs/pt_chown.c'. +`ARGP_KEY_ARG' + `argp.h' (GNU): *Note Argp Special Keys::. - After installation you might want to configure the timezone and -locale installation of your system. The GNU C library comes with a -locale database which gets configured with `localedef'. For example, to -set up a German locale with name `de_DE', simply issue the command -`localedef -i de_DE -f ISO-8859-1 de_DE'. To configure all locales -that are supported by glibc, you can issue from your build directory the -command `make localedata/install-locales'. +`ARGP_KEY_ARGS' + `argp.h' (GNU): *Note Argp Special Keys::. - To configure the locally used timezone, you can either set the `TZ' -environment variable. The script `tzselect' helps you to select the -right value. As an example for Germany, tzselect would tell you to use -`TZ='Europe/Berlin''. For a system wide installation (the given paths -are for an installation with `--prefix=/usr'), link the timezone file -which is in `/usr/share/zoneinfo' to the file `/etc/localtime'. For -Germany, you might execute `ln -s /usr/share/zoneinfo/Europe/Berlin -/etc/localtime'. +`ARGP_KEY_END' + `argp.h' (GNU): *Note Argp Special Keys::. - -File: libc.info, Node: Tools for Compilation, Next: Supported Configurations, Prev: Running make install, Up: Installation +`ARGP_KEY_ERROR' + `argp.h' (GNU): *Note Argp Special Keys::. -Recommended Tools for Compilation -================================= +`ARGP_KEY_FINI' + `argp.h' (GNU): *Note Argp Special Keys::. - We recommend installing the following GNU tools before attempting to -build the GNU C library: +`ARGP_KEY_HELP_ARGS_DOC' + `argp.h' (GNU): *Note Argp Help Filter Keys::. - * GNU `make' 3.79 or newer +`ARGP_KEY_HELP_DUP_ARGS_NOTE' + `argp.h' (GNU): *Note Argp Help Filter Keys::. - You need the latest version of GNU `make'. Modifying the GNU C - Library to work with other `make' programs would be so difficult - that we recommend you port GNU `make' instead. *Really.* We - recommend version GNU `make' version 3.79. All earlier versions - have severe bugs or lack features. +`ARGP_KEY_HELP_EXTRA' + `argp.h' (GNU): *Note Argp Help Filter Keys::. - * GCC 2.95 or newer +`ARGP_KEY_HELP_HEADER' + `argp.h' (GNU): *Note Argp Help Filter Keys::. - The GNU C library can only be compiled with the GNU C compiler - family. As of the 2.2 release, GCC 2.95.2 or higher is required. - As of this writing, GCC 2.95.3 is the compiler we advise to use. +`ARGP_KEY_HELP_POST_DOC' + `argp.h' (GNU): *Note Argp Help Filter Keys::. - You can use whatever compiler you like to compile programs that - use GNU libc, but be aware that both GCC 2.7 and 2.8 have bugs in - their floating-point support that may be triggered by the math - library. +`ARGP_KEY_HELP_PRE_DOC' + `argp.h' (GNU): *Note Argp Help Filter Keys::. - For PPC you might need some patches even on top of the last GCC - version. See the FAQ. +`ARGP_KEY_INIT' + `argp.h' (GNU): *Note Argp Special Keys::. - * GNU `binutils' 2.10.1 or later +`ARGP_KEY_NO_ARGS' + `argp.h' (GNU): *Note Argp Special Keys::. - You must use GNU binutils (as and ld) if you want to build a shared - library. Even if you don't, we recommend you use them anyway. No - one has tested compilation with non-GNU binutils in a long time. +`ARGP_KEY_SUCCESS' + `argp.h' (GNU): *Note Argp Special Keys::. - The quality of binutils releases has varied a bit recently. The - bugs are in obscure features, but glibc uses quite a few of those. - 2.10.1 and later releases are known to work. Versions after - 2.8.1.0.23 may or may not work. Older versions definitely don't. +`ARGP_LONG_ONLY' + `argp.h' (GNU): *Note Argp Flags::. - For PPC you might need some patches even on top of the last - binutils version. See the FAQ. +`ARGP_NO_ARGS' + `argp.h' (GNU): *Note Argp Flags::. - * GNU `texinfo' 3.12f +`ARGP_NO_ERRS' + `argp.h' (GNU): *Note Argp Flags::. - To correctly translate and install the Texinfo documentation you - need this version of the `texinfo' package. Earlier versions do - not understand all the tags used in the document, and the - installation mechanism for the info files is not present or works - differently. +`ARGP_NO_EXIT' + `argp.h' (GNU): *Note Argp Flags::. - * GNU `awk' 3.0, or some other POSIX awk +`ARGP_NO_HELP' + `argp.h' (GNU): *Note Argp Flags::. - Awk is used in several places to generate files. The scripts - should work with any POSIX-compliant awk implementation; `gawk' - 3.0 and `mawk' 1.3 are known to work. +`error_t argp_parse (const struct argp *ARGP, int ARGC, char **ARGV, unsigned FLAGS, int *ARG_INDEX, void *INPUT)' + `argp.h' (GNU): *Note Suboptions: Argp. - * Perl 5 +`ARGP_PARSE_ARGV0' + `argp.h' (GNU): *Note Argp Flags::. - Perl is not required, but it is used if present to test the - installation. We may decide to use it elsewhere in the future. +`const char * argp_program_bug_address' + `argp.h' (GNU): *Note Argp Global Variables::. - * GNU `sed' 3.02 or newer +`const char * argp_program_version' + `argp.h' (GNU): *Note Argp Global Variables::. - Sed is used in several places to generate files. Most scripts - work with any version of `sed'. The known exception is the script - `po2test.sed' in the `intl' subdirectory which is used to generate - `msgs.h' for the testsuite. This script works correctly only with - GNU `sed' 3.02. If you like to run the testsuite, you should - definitely upgrade `sed'. +`argp_program_version_hook' + `argp.h' (GNU): *Note Argp Global Variables::. +`ARGP_SILENT' + `argp.h' (GNU): *Note Argp Flags::. -If you change any of the `configure.in' files you will also need +`void argp_state_help (const struct argp_state *STATE, FILE *STREAM, unsigned FLAGS)' + `argp.h' (GNU): *Note Argp Helper Functions::. - * GNU `autoconf' 2.12 or higher +`void argp_usage (const struct argp_state *STATE)' + `argp.h' (GNU): *Note Argp Helper Functions::. -and if you change any of the message translation files you will need +`error_t argz_add (char **ARGZ, size_t *ARGZ_LEN, const char *STR)' + `argz.h' (GNU): *Note Argz Functions::. - * GNU `gettext' 0.10.36 or later +`error_t argz_add_sep (char **ARGZ, size_t *ARGZ_LEN, const char *STR, int DELIM)' + `argz.h' (GNU): *Note Argz Functions::. -You may also need these packages if you upgrade your source tree using -patches, although we try to avoid this. +`error_t argz_append (char **ARGZ, size_t *ARGZ_LEN, const char *BUF, size_t BUF_LEN)' + `argz.h' (GNU): *Note Argz Functions::. - -File: libc.info, Node: Supported Configurations, Next: Linux, Prev: Tools for Compilation, Up: Installation +`size_t argz_count (const char *ARGZ, size_t ARG_LEN)' + `argz.h' (GNU): *Note Argz Functions::. -Supported Configurations -======================== +`error_t argz_create (char *const ARGV[], char **ARGZ, size_t *ARGZ_LEN)' + `argz.h' (GNU): *Note Argz Functions::. - The GNU C Library currently supports configurations that match the -following patterns: +`error_t argz_create_sep (const char *STRING, int SEP, char **ARGZ, size_t *ARGZ_LEN)' + `argz.h' (GNU): *Note Argz Functions::. - alpha*-*-linux - arm-*-linux - cris-*-linux - hppa-*-linux - iX86-*-gnu - iX86-*-linux - ia64-*-linux - m68k-*-linux - mips*-*-linux - powerpc-*-linux - s390-*-linux - s390x-*-linux - sparc-*-linux - sparc64-*-linux +`error_t argz_delete (char **ARGZ, size_t *ARGZ_LEN, char *ENTRY)' + `argz.h' (GNU): *Note Argz Functions::. - Former releases of this library (version 2.1 and/or 2.0) used to run -on the following configurations: +`void argz_extract (char *ARGZ, size_t ARGZ_LEN, char **ARGV)' + `argz.h' (GNU): *Note Argz Functions::. - arm-*-linuxaout - arm-*-none +`error_t argz_insert (char **ARGZ, size_t *ARGZ_LEN, char *BEFORE, const char *ENTRY)' + `argz.h' (GNU): *Note Argz Functions::. - Very early releases (version 1.09.1 and perhaps earlier versions) -used to run on the following configurations: +`char * argz_next (char *ARGZ, size_t ARGZ_LEN, const char *ENTRY)' + `argz.h' (GNU): *Note Argz Functions::. - alpha-dec-osf1 - alpha-*-linuxecoff - iX86-*-bsd4.3 - iX86-*-isc2.2 - iX86-*-isc3.N - iX86-*-sco3.2 - iX86-*-sco3.2v4 - iX86-*-sysv - iX86-*-sysv4 - iX86-force_cpu386-none - iX86-sequent-bsd - i960-nindy960-none - m68k-hp-bsd4.3 - m68k-mvme135-none - m68k-mvme136-none - m68k-sony-newsos3 - m68k-sony-newsos4 - m68k-sun-sunos4.N - mips-dec-ultrix4.N - mips-sgi-irix4.N - sparc-sun-solaris2.N - sparc-sun-sunos4.N +`error_t argz_replace (char **ARGZ, size_t *ARGZ_LEN, const char *STR, const char *WITH, unsigned *REPLACE_COUNT)' + `argz.h' (GNU): *Note Argz Functions::. - Since no one has volunteered to test and fix these configurations, -they are not supported at the moment. They probably don't compile; -they definitely 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 . +`void argz_stringify (char *ARGZ, size_t LEN, int SEP)' + `argz.h' (GNU): *Note Argz Functions::. - Valid cases of `iX86' include `i386', `i486', `i586', and `i686'. -All of those configurations produce a library that can run on this -processor and newer processors. The GCC compiler by default generates -code that's optimized for the machine it's configured for and will use -the instructions available on that machine. For example if your GCC is -configured for `i686', gcc will optimize for `i686' and might issue -some `i686' specific instructions. To generate code for other models, -you have to configure for that model and give GCC the appropriate -`-march=' and `-mcpu=' compiler switches via CFLAGS. +`char * asctime (const struct tm *BROKENTIME)' + `time.h' (ISO): *Note Formatting Calendar Time::. - -File: libc.info, Node: Linux, Next: Reporting Bugs, Prev: Supported Configurations, Up: Installation +`char * asctime_r (const struct tm *BROKENTIME, char *BUFFER)' + `time.h' (POSIX.1c): *Note Formatting Calendar Time::. -Specific advice for Linux systems -================================= +`double asin (double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - If you are installing GNU libc on a Linux system, you need to have -the header files from a 2.2 or newer kernel around for reference. For -some architectures, like ia64, sh and hppa, you need at least headers -from kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64). You do not need to -use that kernel, just have its headers where glibc can access at them. -The easiest way to do this is to unpack it in a directory such as -`/usr/src/linux-2.2.1'. In that directory, run `make config' and -accept all the defaults. Then run `make include/linux/version.h'. -Finally, configure glibc with the option -`--with-headers=/usr/src/linux-2.2.1/include'. Use the most recent -kernel you can get your hands on. +`float asinf (float X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - An alternate tactic is to unpack the 2.2 kernel and run `make -config' as above. Then rename or delete `/usr/include', create a new -`/usr/include', and make the usual symbolic links of -`/usr/include/linux' and `/usr/include/asm' into the 2.2 kernel -sources. You can then configure glibc with no special options. This -tactic is recommended if you are upgrading from libc5, since you need -to get rid of the old header files anyway. +`double asinh (double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - Note that `/usr/include/net' and `/usr/include/scsi' should *not* be -symlinks into the kernel sources. GNU libc provides its own versions -of these files. +`float asinhf (float X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - Linux expects some components of the libc installation to be in -`/lib' and some in `/usr/lib'. This is handled automatically if you -configure glibc with `--prefix=/usr'. If you set some other prefix or -allow it to default to `/usr/local', then all the components are -installed there. +`long double asinhl (long double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - If you are upgrading from libc5, you need to recompile every shared -library on your system against the new library for the sake of new code, -but keep the old libraries around for old binaries to use. This is -complicated and difficult. Consult the Glibc2 HOWTO at - for details. +`long double asinl (long double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - You cannot use `nscd' with 2.0 kernels, due to bugs in the -kernel-side thread support. `nscd' happens to hit these bugs -particularly hard, but you might have problems with any threaded -program. +`int asprintf (char **PTR, const char *TEMPLATE, ...)' + `stdio.h' (GNU): *Note Dynamic Output::. - -File: libc.info, Node: Reporting Bugs, Prev: Linux, Up: Installation +`void assert (int EXPRESSION)' + `assert.h' (ISO): *Note Consistency Checking::. -Reporting Bugs -============== +`void assert_perror (int ERRNUM)' + `assert.h' (GNU): *Note Consistency Checking::. - There are probably bugs in the GNU C library. There are certainly -errors and omissions in this manual. If you report them, they will get -fixed. If you don't, no one will ever know about them and they will -remain unfixed for all eternity, if not longer. +`double atan (double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - It is a good idea to verify that the problem has not already been -reported. Bugs are documented in two places: The file `BUGS' describes -a number of well known bugs and the bug tracking system has a WWW -interface at . The -WWW interface gives you access to open and closed reports. The closed -reports normally include a patch or a hint on solving the problem. +`double atan2 (double Y, double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - To report a bug, first you must find it. Hopefully, this will be the -hard part. Once you've found a bug, make sure it's really a bug. A -good way to do this is to see if the GNU C library behaves the same way -some other C library does. If so, probably you are wrong and the -libraries are right (but not necessarily). If not, one of the libraries -is probably wrong. It might not be the GNU library. Many historical -Unix C libraries permit things that we don't, such as closing a file -twice. +`float atan2f (float Y, float X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - If you think you have found some way in which the GNU C library does -not conform to the ISO and POSIX standards (*note Standards and -Portability::), that is definitely a bug. Report it! +`long double atan2l (long double Y, long double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - Once you're sure you've found a bug, try to narrow it down to the -smallest test case that reproduces the problem. In the case of a C -library, you really only need to narrow it down to one library function -call, if possible. This should not be too difficult. +`float atanf (float X)' + `math.h' (ISO): *Note Inverse Trig Functions::. - The final step when you have a simple test case is to report the bug. -Do this using the `glibcbug' script. It is installed with libc, or if -you haven't installed it, will be in your build directory. Send your -test case, the results you got, the results you expected, and what you -think the problem might be (if you've thought of anything). `glibcbug' -will insert the configuration information we need to see, and ship the -report off to . Don't send a message there directly; it -is fed to a program that expects mail to be formatted in a particular -way. Use the script. +`double atanh (double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - If you are not sure how a function should behave, and this manual -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 . If you refer to specific sections -of the manual, please include the section names for easier -identification. +`float atanhf (float X)' + `math.h' (ISO): *Note Hyperbolic Functions::. - -File: libc.info, Node: Maintenance, Next: Contributors, Prev: Installation, Up: Top +`long double atanhl (long double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. -Library Maintenance -******************* +`long double atanl (long double X)' + `math.h' (ISO): *Note Inverse Trig Functions::. -* Menu: +`int atexit (void (*FUNCTION) (void))' + `stdlib.h' (ISO): *Note Cleanups on Exit::. -* Source Layout:: How to add new functions or header files - to the GNU C library. -* Porting:: How to port the GNU C library to - a new machine or operating system. +`double atof (const char *STRING)' + `stdlib.h' (ISO): *Note Parsing of Floats::. - -File: libc.info, Node: Source Layout, Next: Porting, Up: Maintenance +`int atoi (const char *STRING)' + `stdlib.h' (ISO): *Note Parsing of Integers::. -Adding New Functions -==================== +`long int atol (const char *STRING)' + `stdlib.h' (ISO): *Note Parsing of Integers::. - The process of building the library is driven by the makefiles, which -make heavy use of special features of GNU `make'. The makefiles are -very complex, and you probably don't want to try to understand them. -But what they do is fairly straightforward, and only requires that you -define a few variables in the right places. +`long long int atoll (const char *STRING)' + `stdlib.h' (ISO): *Note Parsing of Integers::. - The library sources are divided into subdirectories, grouped by -topic. +`B0' + `termios.h' (POSIX.1): *Note Line Speed::. - The `string' subdirectory has all the string-manipulation functions, -`math' has all the mathematical functions, etc. +`B110' + `termios.h' (POSIX.1): *Note Line Speed::. - Each subdirectory contains a simple makefile, called `Makefile', -which defines a few `make' variables and then includes the global -makefile `Rules' with a line like: +`B115200' + `termios.h' (GNU): *Note Line Speed::. - include ../Rules +`B1200' + `termios.h' (POSIX.1): *Note Line Speed::. -The basic variables that a subdirectory makefile defines are: +`B134' + `termios.h' (POSIX.1): *Note Line Speed::. -`subdir' - The name of the subdirectory, for example `stdio'. This variable - *must* be defined. +`B150' + `termios.h' (POSIX.1): *Note Line Speed::. -`headers' - The names of the header files in this section of the library, such - as `stdio.h'. +`B1800' + `termios.h' (POSIX.1): *Note Line Speed::. -`routines' -`aux' - The names of the modules (source files) in this section of the - library. These should be simple names, such as `strlen' (rather - than complete file names, such as `strlen.c'). Use `routines' for - modules that define functions in the library, and `aux' for - auxiliary modules containing things like data definitions. But the - values of `routines' and `aux' are just concatenated, so there - really is no practical difference. +`B19200' + `termios.h' (POSIX.1): *Note Line Speed::. -`tests' - The names of test programs for this section of the library. These - should be simple names, such as `tester' (rather than complete file - names, such as `tester.c'). `make tests' will build and run all - the test programs. If a test program needs input, put the test - data in a file called `TEST-PROGRAM.input'; it will be given to - the test program on its standard input. If a test program wants - to be run with arguments, put the arguments (all on a single line) - in a file called `TEST-PROGRAM.args'. Test programs should exit - with zero status when the test passes, and nonzero status when the - test indicates a bug in the library or error in building. +`B200' + `termios.h' (POSIX.1): *Note Line Speed::. -`others' - The names of "other" programs associated with this section of the - library. These are programs which are not tests per se, but are - other small programs included with the library. They are built by - `make others'. +`B230400' + `termios.h' (GNU): *Note Line Speed::. -`install-lib' -`install-data' -`install' - Files to be installed by `make install'. Files listed in - `install-lib' are installed in the directory specified by `libdir' - in `configparms' or `Makeconfig' (*note Installation::). Files - listed in `install-data' are installed in the directory specified - by `datadir' in `configparms' or `Makeconfig'. Files listed in - `install' are installed in the directory specified by `bindir' in - `configparms' or `Makeconfig'. +`B2400' + `termios.h' (POSIX.1): *Note Line Speed::. -`distribute' - Other files from this subdirectory which should be put into a - distribution tar file. You need not list here the makefile itself - or the source and header files listed in the other standard - variables. Only define `distribute' if there are files used in an - unusual way that should go into the distribution. +`B300' + `termios.h' (POSIX.1): *Note Line Speed::. -`generated' - Files which are generated by `Makefile' in this subdirectory. - These files will be removed by `make clean', and they will never - go into a distribution. +`B38400' + `termios.h' (POSIX.1): *Note Line Speed::. -`extra-objs' - Extra object files which are built by `Makefile' in this - subdirectory. This should be a list of file names like `foo.o'; - the files will actually be found in whatever directory object - files are being built in. These files will be removed by - `make clean'. This variable is used for secondary object files - needed to build `others' or `tests'. +`B460800' + `termios.h' (GNU): *Note Line Speed::. - -File: libc.info, Node: Porting, Prev: Source Layout, Up: Maintenance +`B4800' + `termios.h' (POSIX.1): *Note Line Speed::. -Porting the GNU C Library -========================= +`B50' + `termios.h' (POSIX.1): *Note Line Speed::. - The GNU C library is written to be easily portable to a variety of -machines and operating systems. Machine- and operating system-dependent -functions are well separated to make it easy to add implementations for -new machines or operating systems. This section describes the layout of -the library source tree and explains the mechanisms used to select -machine-dependent code to use. +`B57600' + `termios.h' (GNU): *Note Line Speed::. - All the machine-dependent and operating system-dependent files in the -library are in the subdirectory `sysdeps' under the top-level library -source directory. This directory contains a hierarchy of -subdirectories (*note Hierarchy Conventions::). +`B600' + `termios.h' (POSIX.1): *Note Line Speed::. - Each subdirectory of `sysdeps' contains source files for a -particular machine or operating system, or for a class of machine or -operating system (for example, systems by a particular vendor, or all -machines that use IEEE 754 floating-point format). A configuration -specifies an ordered list of these subdirectories. Each subdirectory -implicitly appends its parent directory to the list. For example, -specifying the list `unix/bsd/vax' is equivalent to specifying the list -`unix/bsd/vax unix/bsd unix'. A subdirectory can also specify that it -implies other subdirectories which are not directly above it in the -directory hierarchy. If the file `Implies' exists in a subdirectory, -it lists other subdirectories of `sysdeps' which are appended to the -list, appearing after the subdirectory containing the `Implies' file. -Lines in an `Implies' file that begin with a `#' character are ignored -as comments. For example, `unix/bsd/Implies' contains: - # BSD has Internet-related things. - unix/inet +`B75' + `termios.h' (POSIX.1): *Note Line Speed::. -and `unix/Implies' contains: - posix +`B9600' + `termios.h' (POSIX.1): *Note Line Speed::. -So the final list is `unix/bsd/vax unix/bsd unix/inet unix posix'. +`int backtrace (void **BUFFER, int SIZE)' + `execinfo.h' (GNU): *Note Backtraces::. - `sysdeps' has a "special" subdirectory called `generic'. It is -always implicitly appended to the list of subdirectories, so you -needn't put it in an `Implies' file, and you should not create any -subdirectories under it intended to be new specific categories. -`generic' serves two purposes. First, the makefiles do not bother to -look for a system-dependent version of a file that's not in `generic'. -This means that any system-dependent source file must have an analogue -in `generic', even if the routines defined by that file are not -implemented on other platforms. Second. the `generic' version of a -system-dependent file is used if the makefiles do not find a version -specific to the system you're compiling for. +`char ** backtrace_symbols (void *const *BUFFER, int SIZE)' + `execinfo.h' (GNU): *Note Backtraces::. - If it is possible to implement the routines in a `generic' file in -machine-independent C, using only other machine-independent functions in -the C library, then you should do so. Otherwise, make them stubs. A -"stub" function is a function which cannot be implemented on a -particular machine or operating system. Stub functions always return an -error, and set `errno' to `ENOSYS' (Function not implemented). *Note -Error Reporting::. If you define a stub function, you must place the -statement `stub_warning(FUNCTION)', where FUNCTION is the name of your -function, after its definition; also, you must include the file -`' into your file. This causes the function to be listed -in the installed `', and makes GNU ld warn when the -function is used. +`void backtrace_symbols_fd (void *const *BUFFER, int SIZE, int FD)' + `execinfo.h' (GNU): *Note Backtraces::. - Some rare functions are only useful on specific systems and aren't -defined at all on others; these do not appear anywhere in the -system-independent source code or makefiles (including the `generic' -directory), only in the system-dependent `Makefile' in the specific -system's subdirectory. +`char * basename (char *PATH)' + `libgen.h' (XPG): *Note Finding Tokens in a String::. - If you come across a file that is in one of the main source -directories (`string', `stdio', etc.), and you want to write a machine- -or operating system-dependent version of it, move the file into -`sysdeps/generic' and write your new implementation in the appropriate -system-specific subdirectory. Note that if a file is to be -system-dependent, it *must not* appear in one of the main source -directories. +`char * basename (const char *FILENAME)' + `string.h' (GNU): *Note Finding Tokens in a String::. - There are a few special files that may exist in each subdirectory of -`sysdeps': +`int BC_BASE_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. -`Makefile' - A makefile for this machine or operating system, or class of - machine or operating system. This file is included by the library - makefile `Makerules', which is used by the top-level makefile and - the subdirectory makefiles. It can change the variables set in the - including makefile or add new rules. It can use GNU `make' - conditional directives based on the variable `subdir' (see above) - to select different sets of variables and rules for different - sections of the library. It can also set the `make' variable - `sysdep-routines', to specify extra modules to be included in the - library. You should use `sysdep-routines' rather than adding - modules to `routines' because the latter is used in determining - what to distribute for each subdirectory of the main source tree. +`int BC_DIM_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. - Each makefile in a subdirectory in the ordered list of - subdirectories to be searched is included in order. Since several - system-dependent makefiles may be included, each should append to - `sysdep-routines' rather than simply setting it: +`int bcmp (const void *A1, const void *A2, size_t SIZE)' + `string.h' (BSD): *Note String/Array Comparison::. - sysdep-routines := $(sysdep-routines) foo bar +`void bcopy (const void *FROM, void *TO, size_t SIZE)' + `string.h' (BSD): *Note Copying and Concatenation::. -`Subdirs' - This file contains the names of new whole subdirectories under the - top-level library source tree that should be included for this - system. These subdirectories are treated just like the - system-independent subdirectories in the library source tree, such - as `stdio' and `math'. +`int BC_SCALE_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. - Use this when there are completely new sets of functions and header - files that should go into the library for the system this - subdirectory of `sysdeps' implements. For example, - `sysdeps/unix/inet/Subdirs' contains `inet'; the `inet' directory - contains various network-oriented operations which only make sense - to put in the library on systems that support the Internet. +`int BC_STRING_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. -`Dist' - This file contains the names of files (relative to the - subdirectory of `sysdeps' in which it appears) which should be - included in the distribution. List any new files used by rules in - the `Makefile' in the same directory, or header files used by the - source files in that directory. You don't need to list files that - are implementations (either C or assembly source) of routines - whose names are given in the machine-independent makefiles in the - main source tree. +`int bind (int SOCKET, struct sockaddr *ADDR, socklen_t LENGTH)' + `sys/socket.h' (BSD): *Note Setting Address::. -`configure' - This file is a shell script fragment to be run at configuration - time. The top-level `configure' script uses the shell `.' command - to read the `configure' file in each system-dependent directory - chosen, in order. The `configure' files are often generated from - `configure.in' files using Autoconf. +`char * bindtextdomain (const char *DOMAINNAME, const char *DIRNAME)' + `libintl.h' (GNU): *Note Locating gettext catalog::. - A system-dependent `configure' script will usually add things to - the shell variables `DEFS' and `config_vars'; see the top-level - `configure' script for details. The script can check for - `--with-PACKAGE' options that were passed to the top-level - `configure'. For an option `--with-PACKAGE=VALUE' `configure' - sets the shell variable `with_PACKAGE' (with any dashes in PACKAGE - converted to underscores) to VALUE; if the option is just - `--with-PACKAGE' (no argument), then it sets `with_PACKAGE' to - `yes'. +`char * bind_textdomain_codeset (const char *DOMAINNAME, const char *CODESET)' + `libintl.h' (GNU): *Note Charset conversion in gettext::. -`configure.in' - This file is an Autoconf input fragment to be processed into the - file `configure' in this subdirectory. *Note Introduction: - (autoconf.info)Introduction, for a description of Autoconf. You - should write either `configure' or `configure.in', but not both. - The first line of `configure.in' should invoke the `m4' macro - `GLIBC_PROVIDES'. This macro does several `AC_PROVIDE' calls for - Autoconf macros which are used by the top-level `configure' - script; without this, those macros might be invoked again - unnecessarily by Autoconf. +`blkcnt64_t' + `sys/types.h' (Unix98): *Note Attribute Meanings::. - That is the general system for how system-dependencies are isolated. +`blkcnt_t' + `sys/types.h' (Unix98): *Note Attribute Meanings::. -* Menu: +`BOOT_TIME' + `utmp.h' (SVID): *Note Manipulating the Database::. -* Hierarchy Conventions:: The layout of the `sysdeps' hierarchy. -* Porting to Unix:: Porting the library to an average - Unix-like system. +`BOOT_TIME' + `utmpx.h' (XPG4.2): *Note XPG Functions::. - -File: libc.info, Node: Hierarchy Conventions, Next: Porting to Unix, Up: Porting +`int brk (void *ADDR)' + `unistd.h' (BSD): *Note Resizing the Data Segment::. -Layout of the `sysdeps' Directory Hierarchy -------------------------------------------- +`tcflag_t BRKINT' + `termios.h' (POSIX.1): *Note Input Modes::. - A GNU configuration name has three parts: the CPU type, the -manufacturer's name, and the operating system. `configure' uses these -to pick the list of system-dependent directories to look for. If the -`--nfp' option is _not_ passed to `configure', the directory -`MACHINE/fpu' is also used. The operating system often has a "base -operating system"; for example, if the operating system is `Linux', the -base operating system is `unix/sysv'. The algorithm used to pick the -list of directories is simple: `configure' makes a list of the base -operating system, manufacturer, CPU type, and operating system, in that -order. It then concatenates all these together with slashes in -between, to produce a directory name; for example, the configuration -`i686-linux-gnu' results in `unix/sysv/linux/i386/i686'. `configure' -then tries removing each element of the list in turn, so -`unix/sysv/linux' and `unix/sysv' are also tried, among others. Since -the precise version number of the operating system is often not -important, and it would be very inconvenient, for example, to have -identical `irix6.2' and `irix6.3' directories, `configure' tries -successively less specific operating system names by removing trailing -suffixes starting with a period. +`_BSD_SOURCE' + (GNU): *Note Feature Test Macros::. - As an example, here is the complete list of directories that would be -tried for the configuration `i686-linux-gnu' (with the `crypt' and -`linuxthreads' add-on): +`void * bsearch (const void *KEY, const void *ARRAY, size_t COUNT, size_t SIZE, comparison_fn_t COMPARE)' + `stdlib.h' (ISO): *Note Array Search Function::. - sysdeps/i386/elf - crypt/sysdeps/unix - linuxthreads/sysdeps/unix/sysv/linux - linuxthreads/sysdeps/pthread - linuxthreads/sysdeps/unix/sysv - linuxthreads/sysdeps/unix - linuxthreads/sysdeps/i386/i686 - linuxthreads/sysdeps/i386 - linuxthreads/sysdeps/pthread/no-cmpxchg - sysdeps/unix/sysv/linux/i386 - sysdeps/unix/sysv/linux - sysdeps/gnu - sysdeps/unix/common - sysdeps/unix/mman - sysdeps/unix/inet - sysdeps/unix/sysv/i386/i686 - sysdeps/unix/sysv/i386 - sysdeps/unix/sysv - sysdeps/unix/i386 - sysdeps/unix - sysdeps/posix - sysdeps/i386/i686 - sysdeps/i386/i486 - sysdeps/libm-i387/i686 - sysdeps/i386/fpu - sysdeps/libm-i387 - sysdeps/i386 - sysdeps/wordsize-32 - sysdeps/ieee754 - sysdeps/libm-ieee754 - sysdeps/generic +`wint_t btowc (int C)' + `wchar.h' (ISO): *Note Converting a Character::. - Different machine architectures are conventionally subdirectories at -the top level of the `sysdeps' directory tree. For example, -`sysdeps/sparc' and `sysdeps/m68k'. These contain files specific to -those machine architectures, but not specific to any particular -operating system. There might be subdirectories for specializations of -those architectures, such as `sysdeps/m68k/68020'. Code which is -specific to the floating-point coprocessor used with a particular -machine should go in `sysdeps/MACHINE/fpu'. +`int BUFSIZ' + `stdio.h' (ISO): *Note Controlling Buffering::. - There are a few directories at the top level of the `sysdeps' -hierarchy that are not for particular machine architectures. +`void bzero (void *BLOCK, size_t SIZE)' + `string.h' (BSD): *Note Copying and Concatenation::. -`generic' - As described above (*note Porting::), this is the subdirectory - that every configuration implicitly uses after all others. +`double cabs (complex double Z)' + `complex.h' (ISO): *Note Absolute Value::. -`ieee754' - This directory is for code using the IEEE 754 floating-point - format, where the C type `float' is IEEE 754 single-precision - format, and `double' is IEEE 754 double-precision format. Usually - this directory is referred to in the `Implies' file in a machine - architecture-specific directory, such as `m68k/Implies'. +`float cabsf (complex float Z)' + `complex.h' (ISO): *Note Absolute Value::. -`libm-ieee754' - This directory contains an implementation of a mathematical library - usable on platforms which use IEEE 754 conformant floating-point - arithmetic. +`long double cabsl (complex long double Z)' + `complex.h' (ISO): *Note Absolute Value::. -`libm-i387' - This is a special case. Ideally the code should be in - `sysdeps/i386/fpu' but for various reasons it is kept aside. +`complex double cacos (complex double Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. -`posix' - This directory contains implementations of things in the library in - terms of POSIX.1 functions. This includes some of the POSIX.1 - functions themselves. Of course, POSIX.1 cannot be completely - implemented in terms of itself, so a configuration using just - `posix' cannot be complete. +`complex float cacosf (complex float Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. -`unix' - This is the directory for Unix-like things. *Note Porting to - Unix::. `unix' implies `posix'. There are some special-purpose - subdirectories of `unix': +`complex double cacosh (complex double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. - `unix/common' - This directory is for things common to both BSD and System V - release 4. Both `unix/bsd' and `unix/sysv/sysv4' imply - `unix/common'. +`complex float cacoshf (complex float Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. - `unix/inet' - This directory is for `socket' and related functions on Unix - systems. `unix/inet/Subdirs' enables the `inet' top-level - subdirectory. `unix/common' implies `unix/inet'. +`complex long double cacoshl (complex long double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. -`mach' - This is the directory for things based on the Mach microkernel - from CMU (including the GNU operating system). Other basic - operating systems (VMS, for example) would have their own - directories at the top level of the `sysdeps' hierarchy, parallel - to `unix' and `mach'. +`complex long double cacosl (complex long double Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. - -File: libc.info, Node: Porting to Unix, Prev: Hierarchy Conventions, Up: Porting +`void * calloc (size_t COUNT, size_t ELTSIZE)' + `malloc.h', `stdlib.h' (ISO): *Note Allocating Cleared Space::. -Porting the GNU C Library to Unix Systems ------------------------------------------ +`char * canonicalize_file_name (const char *NAME)' + `stdlib.h' (GNU): *Note Symbolic Links::. - Most Unix systems are fundamentally very similar. There are -variations between different machines, and variations in what -facilities are provided by the kernel. But the interface to the -operating system facilities is, for the most part, pretty uniform and -simple. +`double carg (complex double Z)' + `complex.h' (ISO): *Note Operations on Complex::. - The code for Unix systems is in the directory `unix', at the top -level of the `sysdeps' hierarchy. This directory contains -subdirectories (and subdirectory trees) for various Unix variants. +`float cargf (complex float Z)' + `complex.h' (ISO): *Note Operations on Complex::. - The functions which are system calls in most Unix systems are -implemented in assembly code, which is generated automatically from -specifications in files named `syscalls.list'. There are several such -files, one in `sysdeps/unix' and others in its subdirectories. Some -special system calls are implemented in files that are named with a -suffix of `.S'; for example, `_exit.S'. Files ending in `.S' are run -through the C preprocessor before being fed to the assembler. +`long double cargl (complex long double Z)' + `complex.h' (ISO): *Note Operations on Complex::. - These files all use a set of macros that should be defined in -`sysdep.h'. The `sysdep.h' file in `sysdeps/unix' partially defines -them; a `sysdep.h' file in another directory must finish defining them -for the particular machine and operating system variant. See -`sysdeps/unix/sysdep.h' and the machine-specific `sysdep.h' -implementations to see what these macros are and what they should do. +`complex double casin (complex double Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. - The system-specific makefile for the `unix' directory -(`sysdeps/unix/Makefile') gives rules to generate several files from -the Unix system you are building the library on (which is assumed to be -the target system you are building the library _for_). All the -generated files are put in the directory where the object files are -kept; they should not affect the source tree itself. The files -generated are `ioctls.h', `errnos.h', `sys/param.h', and `errlist.c' -(for the `stdio' section of the library). +`complex float casinf (complex float Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. + +`complex double casinh (complex double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex float casinhf (complex float Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double casinhl (complex long double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double casinl (complex long double Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. + +`complex double catan (complex double Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. + +`complex float catanf (complex float Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. + +`complex double catanh (complex double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex float catanhf (complex float Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double catanhl (complex long double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double catanl (complex long double Z)' + `complex.h' (ISO): *Note Inverse Trig Functions::. + +`nl_catd catopen (const char *CAT_NAME, int FLAG)' + `nl_types.h' (X/Open): *Note The catgets Functions::. + +`int cbc_crypt (char *KEY, char *BLOCKS, unsigned LEN, unsigned MODE, char *IVEC)' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`double cbrt (double X)' + `math.h' (BSD): *Note Exponents and Logarithms::. + +`float cbrtf (float X)' + `math.h' (BSD): *Note Exponents and Logarithms::. + +`long double cbrtl (long double X)' + `math.h' (BSD): *Note Exponents and Logarithms::. + +`complex double ccos (complex double Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`complex float ccosf (complex float Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`complex double ccosh (complex double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex float ccoshf (complex float Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double ccoshl (complex long double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double ccosl (complex long double Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`cc_t' + `termios.h' (POSIX.1): *Note Mode Data Types::. + +`tcflag_t CCTS_OFLOW' + `termios.h' (BSD): *Note Control Modes::. + +`double ceil (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`float ceilf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double ceill (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`complex double cexp (complex double Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex float cexpf (complex float Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex long double cexpl (complex long double Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`speed_t cfgetispeed (const struct termios *TERMIOS-P)' + `termios.h' (POSIX.1): *Note Line Speed::. + +`speed_t cfgetospeed (const struct termios *TERMIOS-P)' + `termios.h' (POSIX.1): *Note Line Speed::. + +`int cfmakeraw (struct termios *TERMIOS-P)' + `termios.h' (BSD): *Note Noncanonical Input::. + +`void cfree (void *PTR)' + `stdlib.h' (Sun): *Note Freeing after Malloc::. + +`int cfsetispeed (struct termios *TERMIOS-P, speed_t SPEED)' + `termios.h' (POSIX.1): *Note Line Speed::. + +`int cfsetospeed (struct termios *TERMIOS-P, speed_t SPEED)' + `termios.h' (POSIX.1): *Note Line Speed::. + +`int cfsetspeed (struct termios *TERMIOS-P, speed_t SPEED)' + `termios.h' (BSD): *Note Line Speed::. + +`CHAR_BIT' + `limits.h' (ISO): *Note Width of Type::. + +`CHAR_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`CHAR_MIN' + `limits.h' (ISO): *Note Range of Type::. + +`int chdir (const char *FILENAME)' + `unistd.h' (POSIX.1): *Note Working Directory::. + +`int CHILD_MAX' + `limits.h' (POSIX.1): *Note General Limits::. + +`int chmod (const char *FILENAME, mode_t MODE)' + `sys/stat.h' (POSIX.1): *Note Setting Permissions::. + +`int chown (const char *FILENAME, uid_t OWNER, gid_t GROUP)' + `unistd.h' (POSIX.1): *Note File Owner::. + +`tcflag_t CIGNORE' + `termios.h' (BSD): *Note Control Modes::. + +`double cimag (complex double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`float cimagf (complex float Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`long double cimagl (complex long double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`int clearenv (void)' + `stdlib.h' (GNU): *Note Environment Access::. + +`void clearerr (FILE *STREAM)' + `stdio.h' (ISO): *Note Error Recovery::. + +`void clearerr_unlocked (FILE *STREAM)' + `stdio.h' (GNU): *Note Error Recovery::. + +`int CLK_TCK' + `time.h' (POSIX.1): *Note CPU Time::. + +`tcflag_t CLOCAL' + `termios.h' (POSIX.1): *Note Control Modes::. + +`clock_t clock (void)' + `time.h' (ISO): *Note CPU Time::. + +`int CLOCKS_PER_SEC' + `time.h' (ISO): *Note CPU Time::. + +`clock_t' + `time.h' (ISO): *Note CPU Time::. + +`complex double clog (complex double Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex double clog10 (complex double Z)' + `complex.h' (GNU): *Note Exponents and Logarithms::. + +`complex float clog10f (complex float Z)' + `complex.h' (GNU): *Note Exponents and Logarithms::. + +`complex long double clog10l (complex long double Z)' + `complex.h' (GNU): *Note Exponents and Logarithms::. + +`complex float clogf (complex float Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex long double clogl (complex long double Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`int close (int FILEDES)' + `unistd.h' (POSIX.1): *Note Opening and Closing Files::. + +`int closedir (DIR *DIRSTREAM)' + `dirent.h' (POSIX.1): *Note Reading/Closing Directory::. + +`void closelog (void)' + `syslog.h' (BSD): *Note closelog::. + +`int COLL_WEIGHTS_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. + +`size_t confstr (int PARAMETER, char *BUF, size_t LEN)' + `unistd.h' (POSIX.2): *Note String Parameters::. + +`complex double conj (complex double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`complex float conjf (complex float Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`complex long double conjl (complex long double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`int connect (int SOCKET, struct sockaddr *ADDR, socklen_t LENGTH)' + `sys/socket.h' (BSD): *Note Connecting::. + +`cookie_close_function' + `stdio.h' (GNU): *Note Hook Functions::. + +`cookie_io_functions_t' + `stdio.h' (GNU): *Note Streams and Cookies::. + +`cookie_read_function' + `stdio.h' (GNU): *Note Hook Functions::. + +`cookie_seek_function' + `stdio.h' (GNU): *Note Hook Functions::. + +`cookie_write_function' + `stdio.h' (GNU): *Note Hook Functions::. + +`double copysign (double X, double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`float copysignf (float X, float Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`long double copysignl (long double X, long double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`double cos (double X)' + `math.h' (ISO): *Note Trig Functions::. + +`float cosf (float X)' + `math.h' (ISO): *Note Trig Functions::. + +`double cosh (double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`float coshf (float X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`long double coshl (long double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`long double cosl (long double X)' + `math.h' (ISO): *Note Trig Functions::. + +`complex double cpow (complex double BASE, complex double POWER)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex float cpowf (complex float BASE, complex float POWER)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex long double cpowl (complex long double BASE, complex long double POWER)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex double cproj (complex double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`complex float cprojf (complex float Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`complex long double cprojl (complex long double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`tcflag_t CREAD' + `termios.h' (POSIX.1): *Note Control Modes::. + +`double creal (complex double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`float crealf (complex float Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`long double creall (complex long double Z)' + `complex.h' (ISO): *Note Operations on Complex::. + +`int creat (const char *FILENAME, mode_t MODE)' + `fcntl.h' (POSIX.1): *Note Opening and Closing Files::. + +`int creat64 (const char *FILENAME, mode_t MODE)' + `fcntl.h' (Unix98): *Note Opening and Closing Files::. + +`tcflag_t CRTS_IFLOW' + `termios.h' (BSD): *Note Control Modes::. + +`char * crypt (const char *KEY, const char *SALT)' + `crypt.h' (BSD, SVID): *Note crypt::. + +`char * crypt_r (const char *KEY, const char *SALT, struct crypt_data * DATA)' + `crypt.h' (GNU): *Note crypt::. + +`tcflag_t CS5' + `termios.h' (POSIX.1): *Note Control Modes::. + +`tcflag_t CS6' + `termios.h' (POSIX.1): *Note Control Modes::. + +`tcflag_t CS7' + `termios.h' (POSIX.1): *Note Control Modes::. + +`tcflag_t CS8' + `termios.h' (POSIX.1): *Note Control Modes::. + +`complex double csin (complex double Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`complex float csinf (complex float Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`complex double csinh (complex double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex float csinhf (complex float Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double csinhl (complex long double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double csinl (complex long double Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`tcflag_t CSIZE' + `termios.h' (POSIX.1): *Note Control Modes::. + +`_CS_LFS64_CFLAGS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS64_LDFLAGS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS64_LIBS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS64_LINTFLAGS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS_CFLAGS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS_LDFLAGS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS_LIBS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_LFS_LINTFLAGS' + `unistd.h' (Unix98): *Note String Parameters::. + +`_CS_PATH' + `unistd.h' (POSIX.2): *Note String Parameters::. + +`complex double csqrt (complex double Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex float csqrtf (complex float Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`complex long double csqrtl (complex long double Z)' + `complex.h' (ISO): *Note Exponents and Logarithms::. + +`tcflag_t CSTOPB' + `termios.h' (POSIX.1): *Note Control Modes::. + +`complex double ctan (complex double Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`complex float ctanf (complex float Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`complex double ctanh (complex double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex float ctanhf (complex float Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double ctanhl (complex long double Z)' + `complex.h' (ISO): *Note Hyperbolic Functions::. + +`complex long double ctanl (complex long double Z)' + `complex.h' (ISO): *Note Trig Functions::. + +`char * ctermid (char *STRING)' + `stdio.h' (POSIX.1): *Note Identifying the Terminal::. + +`char * ctime (const time_t *TIME)' + `time.h' (ISO): *Note Formatting Calendar Time::. + +`char * ctime_r (const time_t *TIME, char *BUFFER)' + `time.h' (POSIX.1c): *Note Formatting Calendar Time::. + +`char * cuserid (char *STRING)' + `stdio.h' (POSIX.1): *Note Who Logged In::. + +`int daylight' + `time.h' (SVID): *Note Time Zone Functions::. + +`DBL_DIG' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_EPSILON' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MANT_DIG' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MAX' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MAX_10_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MAX_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MIN' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MIN_10_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`DBL_MIN_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`char * dcgettext (const char *DOMAINNAME, const char *MSGID, int CATEGORY)' + `libintl.h' (GNU): *Note Translation with gettext::. + +`char * dcngettext (const char *DOMAIN, const char *MSGID1, const char *MSGID2, unsigned long int N, int CATEGORY)' + `libintl.h' (GNU): *Note Advanced gettext functions::. + +`DEAD_PROCESS' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`DEAD_PROCESS' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`DES_DECRYPT' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DES_ENCRYPT' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DESERR_BADPARAM' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DESERR_HWERROR' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DESERR_NOHWDEVICE' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DESERR_NONE' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`int DES_FAILED (int ERR)' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DES_HW' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`void des_setparity (char *KEY)' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`DES_SW' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`dev_t' + `sys/types.h' (POSIX.1): *Note Attribute Meanings::. + +`char * dgettext (const char *DOMAINNAME, const char *MSGID)' + `libintl.h' (GNU): *Note Translation with gettext::. + +`double difftime (time_t TIME1, time_t TIME0)' + `time.h' (ISO): *Note Elapsed Time::. + +`DIR' + `dirent.h' (POSIX.1): *Note Opening a Directory::. + +`int dirfd (DIR *DIRSTREAM)' + `dirent.h' (GNU): *Note Opening a Directory::. + +`char * dirname (char *PATH)' + `libgen.h' (XPG): *Note Finding Tokens in a String::. + +`div_t div (int NUMERATOR, int DENOMINATOR)' + `stdlib.h' (ISO): *Note Integer Division::. + +`div_t' + `stdlib.h' (ISO): *Note Integer Division::. + +`char * dngettext (const char *DOMAIN, const char *MSGID1, const char *MSGID2, unsigned long int N)' + `libintl.h' (GNU): *Note Advanced gettext functions::. + +`double drand48 (void)' + `stdlib.h' (SVID): *Note SVID Random::. + +`int drand48_r (struct drand48_data *BUFFER, double *RESULT)' + `stdlib.h' (GNU): *Note SVID Random::. + +`double drem (double NUMERATOR, double DENOMINATOR)' + `math.h' (BSD): *Note Remainder Functions::. + +`float dremf (float NUMERATOR, float DENOMINATOR)' + `math.h' (BSD): *Note Remainder Functions::. + +`long double dreml (long double NUMERATOR, long double DENOMINATOR)' + `math.h' (BSD): *Note Remainder Functions::. + +`mode_t DTTOIF (int DTYPE)' + `dirent.h' (BSD): *Note Directory Entries::. + +`int dup (int OLD)' + `unistd.h' (POSIX.1): *Note Duplicating Descriptors::. + +`int dup2 (int OLD, int NEW)' + `unistd.h' (POSIX.1): *Note Duplicating Descriptors::. + +`int E2BIG' + `errno.h' (POSIX.1: Argument list too long): *Note Error Codes::. + +`int EACCES' + `errno.h' (POSIX.1: Permission denied): *Note Error Codes::. + +`int EADDRINUSE' + `errno.h' (BSD: Address already in use): *Note Error Codes::. + +`int EADDRNOTAVAIL' + `errno.h' (BSD: Cannot assign requested address): *Note Error + Codes::. + +`int EADV' + `errno.h' (Linux???: Advertise error): *Note Error Codes::. + +`int EAFNOSUPPORT' + `errno.h' (BSD: Address family not supported by protocol): *Note + Error Codes::. + +`int EAGAIN' + `errno.h' (POSIX.1: Resource temporarily unavailable): *Note + Error Codes::. + +`int EALREADY' + `errno.h' (BSD: Operation already in progress): *Note Error + Codes::. + +`int EAUTH' + `errno.h' (BSD: Authentication error): *Note Error Codes::. + +`int EBACKGROUND' + `errno.h' (GNU: Inappropriate operation for background process): + *Note Error Codes::. + +`int EBADE' + `errno.h' (Linux???: Invalid exchange): *Note Error Codes::. + +`int EBADF' + `errno.h' (POSIX.1: Bad file descriptor): *Note Error Codes::. + +`int EBADFD' + `errno.h' (Linux???: File descriptor in bad state): *Note Error + Codes::. + +`int EBADMSG' + `errno.h' (XOPEN: Bad message): *Note Error Codes::. + +`int EBADR' + `errno.h' (Linux???: Invalid request descriptor): *Note Error + Codes::. + +`int EBADRPC' + `errno.h' (BSD: RPC struct is bad): *Note Error Codes::. + +`int EBADRQC' + `errno.h' (Linux???: Invalid request code): *Note Error Codes::. + +`int EBADSLT' + `errno.h' (Linux???: Invalid slot): *Note Error Codes::. + +`int EBFONT' + `errno.h' (Linux???: Bad font file format): *Note Error Codes::. + +`int EBUSY' + `errno.h' (POSIX.1: Device or resource busy): *Note Error Codes::. + +`int ecb_crypt (char *KEY, char *BLOCKS, unsigned LEN, unsigned MODE)' + `rpc/des_crypt.h' (SUNRPC): *Note DES Encryption::. + +`int ECHILD' + `errno.h' (POSIX.1: No child processes): *Note Error Codes::. + +`tcflag_t ECHO' + `termios.h' (POSIX.1): *Note Local Modes::. + +`tcflag_t ECHOCTL' + `termios.h' (BSD): *Note Local Modes::. + +`tcflag_t ECHOE' + `termios.h' (POSIX.1): *Note Local Modes::. + +`tcflag_t ECHOK' + `termios.h' (POSIX.1): *Note Local Modes::. + +`tcflag_t ECHOKE' + `termios.h' (BSD): *Note Local Modes::. + +`tcflag_t ECHONL' + `termios.h' (POSIX.1): *Note Local Modes::. + +`tcflag_t ECHOPRT' + `termios.h' (BSD): *Note Local Modes::. + +`int ECHRNG' + `errno.h' (Linux???: Channel number out of range): *Note Error + Codes::. + +`int ECOMM' + `errno.h' (Linux???: Communication error on send): *Note Error + Codes::. + +`int ECONNABORTED' + `errno.h' (BSD: Software caused connection abort): *Note Error + Codes::. + +`int ECONNREFUSED' + `errno.h' (BSD: Connection refused): *Note Error Codes::. + +`int ECONNRESET' + `errno.h' (BSD: Connection reset by peer): *Note Error Codes::. + +`char * ecvt (double VALUE, int NDIGIT, int *DECPT, int *NEG)' + `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. + +`char * ecvt_r (double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' + `stdlib.h' (GNU): *Note System V Number Conversion::. + +`int ED' + `errno.h' (GNU: ?): *Note Error Codes::. + +`int EDEADLK' + `errno.h' (POSIX.1: Resource deadlock avoided): *Note Error + Codes::. + +`int EDEADLOCK' + `errno.h' (Linux???: File locking deadlock error): *Note Error + Codes::. + +`int EDESTADDRREQ' + `errno.h' (BSD: Destination address required): *Note Error + Codes::. + +`int EDIED' + `errno.h' (GNU: Translator died): *Note Error Codes::. + +`int EDOM' + `errno.h' (ISO: Numerical argument out of domain): *Note Error + Codes::. + +`int EDOTDOT' + `errno.h' (Linux???: RFS specific error): *Note Error Codes::. + +`int EDQUOT' + `errno.h' (BSD: Disk quota exceeded): *Note Error Codes::. + +`int EEXIST' + `errno.h' (POSIX.1: File exists): *Note Error Codes::. + +`int EFAULT' + `errno.h' (POSIX.1: Bad address): *Note Error Codes::. + +`int EFBIG' + `errno.h' (POSIX.1: File too large): *Note Error Codes::. + +`int EFTYPE' + `errno.h' (BSD: Inappropriate file type or format): *Note Error + Codes::. + +`int EGRATUITOUS' + `errno.h' (GNU: Gratuitous error): *Note Error Codes::. + +`int EGREGIOUS' + `errno.h' (GNU: You really blew it this time): *Note Error + Codes::. + +`int EHOSTDOWN' + `errno.h' (BSD: Host is down): *Note Error Codes::. + +`int EHOSTUNREACH' + `errno.h' (BSD: No route to host): *Note Error Codes::. + +`int EIDRM' + `errno.h' (XOPEN: Identifier removed): *Note Error Codes::. + +`int EIEIO' + `errno.h' (GNU: Computer bought the farm): *Note Error Codes::. + +`int EILSEQ' + `errno.h' (ISO: Invalid or incomplete multibyte or wide + character): *Note Error Codes::. + +`int EINPROGRESS' + `errno.h' (BSD: Operation now in progress): *Note Error Codes::. + +`int EINTR' + `errno.h' (POSIX.1: Interrupted system call): *Note Error Codes::. + +`int EINVAL' + `errno.h' (POSIX.1: Invalid argument): *Note Error Codes::. + +`int EIO' + `errno.h' (POSIX.1: Input/output error): *Note Error Codes::. + +`int EISCONN' + `errno.h' (BSD: Transport endpoint is already connected): *Note + Error Codes::. + +`int EISDIR' + `errno.h' (POSIX.1: Is a directory): *Note Error Codes::. + +`int EISNAM' + `errno.h' (Linux???: Is a named type file): *Note Error Codes::. + +`int EL2HLT' + `errno.h' (Obsolete: Level 2 halted): *Note Error Codes::. + +`int EL2NSYNC' + `errno.h' (Obsolete: Level 2 not synchronized): *Note Error + Codes::. + +`int EL3HLT' + `errno.h' (Obsolete: Level 3 halted): *Note Error Codes::. + +`int EL3RST' + `errno.h' (Obsolete: Level 3 reset): *Note Error Codes::. + +`int ELIBACC' + `errno.h' (Linux???: Can not access a needed shared library): + *Note Error Codes::. + +`int ELIBBAD' + `errno.h' (Linux???: Accessing a corrupted shared library): *Note + Error Codes::. + +`int ELIBEXEC' + `errno.h' (Linux???: Cannot exec a shared library directly): + *Note Error Codes::. + +`int ELIBMAX' + `errno.h' (Linux???: Attempting to link in too many shared + libraries): *Note Error Codes::. + +`int ELIBSCN' + `errno.h' (Linux???: .lib section in a.out corrupted): *Note + Error Codes::. + +`int ELNRNG' + `errno.h' (Linux???: Link number out of range): *Note Error + Codes::. + +`int ELOOP' + `errno.h' (BSD: Too many levels of symbolic links): *Note Error + Codes::. + +`int EMEDIUMTYPE' + `errno.h' (Linux???: Wrong medium type): *Note Error Codes::. + +`int EMFILE' + `errno.h' (POSIX.1: Too many open files): *Note Error Codes::. + +`int EMLINK' + `errno.h' (POSIX.1: Too many links): *Note Error Codes::. + +`EMPTY' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`EMPTY' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int EMSGSIZE' + `errno.h' (BSD: Message too long): *Note Error Codes::. + +`int EMULTIHOP' + `errno.h' (XOPEN: Multihop attempted): *Note Error Codes::. + +`int ENAMETOOLONG' + `errno.h' (POSIX.1: File name too long): *Note Error Codes::. + +`int ENAVAIL' + `errno.h' (Linux???: No XENIX semaphores available): *Note Error + Codes::. + +`void encrypt (char *BLOCK, int EDFLAG)' + `crypt.h' (BSD, SVID): *Note DES Encryption::. + +`void encrypt_r (char *BLOCK, int EDFLAG, struct crypt_data * DATA)' + `crypt.h' (GNU): *Note DES Encryption::. + +`void endfsent (void)' + `fstab.h' (BSD): *Note fstab::. + +`void endgrent (void)' + `grp.h' (SVID, BSD): *Note Scanning All Groups::. + +`void endhostent (void)' + `netdb.h' (BSD): *Note Host Names::. + +`int endmntent (FILE *STREAM)' + `mntent.h' (BSD): *Note mtab::. + +`void endnetent (void)' + `netdb.h' (BSD): *Note Networks Database::. + +`void endnetgrent (void)' + `netdb.h' (BSD): *Note Lookup Netgroup::. + +`void endprotoent (void)' + `netdb.h' (BSD): *Note Protocols Database::. + +`void endpwent (void)' + `pwd.h' (SVID, BSD): *Note Scanning All Users::. + +`void endservent (void)' + `netdb.h' (BSD): *Note Services Database::. + +`void endutent (void)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`void endutxent (void)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int ENEEDAUTH' + `errno.h' (BSD: Need authenticator): *Note Error Codes::. + +`int ENETDOWN' + `errno.h' (BSD: Network is down): *Note Error Codes::. + +`int ENETRESET' + `errno.h' (BSD: Network dropped connection on reset): *Note Error + Codes::. + +`int ENETUNREACH' + `errno.h' (BSD: Network is unreachable): *Note Error Codes::. + +`int ENFILE' + `errno.h' (POSIX.1: Too many open files in system): *Note Error + Codes::. + +`int ENOANO' + `errno.h' (Linux???: No anode): *Note Error Codes::. + +`int ENOBUFS' + `errno.h' (BSD: No buffer space available): *Note Error Codes::. + +`int ENOCSI' + `errno.h' (Linux???: No CSI structure available): *Note Error + Codes::. + +`int ENODATA' + `errno.h' (XOPEN: No data available): *Note Error Codes::. + +`int ENODEV' + `errno.h' (POSIX.1: No such device): *Note Error Codes::. + +`int ENOENT' + `errno.h' (POSIX.1: No such file or directory): *Note Error + Codes::. + +`int ENOEXEC' + `errno.h' (POSIX.1: Exec format error): *Note Error Codes::. + +`int ENOLCK' + `errno.h' (POSIX.1: No locks available): *Note Error Codes::. + +`int ENOLINK' + `errno.h' (XOPEN: Link has been severed): *Note Error Codes::. + +`int ENOMEDIUM' + `errno.h' (Linux???: No medium found): *Note Error Codes::. + +`int ENOMEM' + `errno.h' (POSIX.1: Cannot allocate memory): *Note Error Codes::. + +`int ENOMSG' + `errno.h' (XOPEN: No message of desired type): *Note Error + Codes::. + +`int ENONET' + `errno.h' (Linux???: Machine is not on the network): *Note Error + Codes::. + +`int ENOPKG' + `errno.h' (Linux???: Package not installed): *Note Error Codes::. + +`int ENOPROTOOPT' + `errno.h' (BSD: Protocol not available): *Note Error Codes::. + +`int ENOSPC' + `errno.h' (POSIX.1: No space left on device): *Note Error Codes::. + +`int ENOSR' + `errno.h' (XOPEN: Out of streams resources): *Note Error Codes::. + +`int ENOSTR' + `errno.h' (XOPEN: Device not a stream): *Note Error Codes::. + +`int ENOSYS' + `errno.h' (POSIX.1: Function not implemented): *Note Error + Codes::. + +`int ENOTBLK' + `errno.h' (BSD: Block device required): *Note Error Codes::. + +`int ENOTCONN' + `errno.h' (BSD: Transport endpoint is not connected): *Note Error + Codes::. + +`int ENOTDIR' + `errno.h' (POSIX.1: Not a directory): *Note Error Codes::. + +`int ENOTEMPTY' + `errno.h' (POSIX.1: Directory not empty): *Note Error Codes::. + +`int ENOTNAM' + `errno.h' (Linux???: Not a XENIX named type file): *Note Error + Codes::. + +`int ENOTSOCK' + `errno.h' (BSD: Socket operation on non-socket): *Note Error + Codes::. + +`int ENOTSUP' + `errno.h' (POSIX.1: Not supported): *Note Error Codes::. + +`int ENOTTY' + `errno.h' (POSIX.1: Inappropriate ioctl for device): *Note Error + Codes::. + +`int ENOTUNIQ' + `errno.h' (Linux???: Name not unique on network): *Note Error + Codes::. + +`char ** environ' + `unistd.h' (POSIX.1): *Note Environment Access::. + +`error_t envz_add (char **ENVZ, size_t *ENVZ_LEN, const char *NAME, const char *VALUE)' + `envz.h' (GNU): *Note Envz Functions::. + +`char * envz_entry (const char *ENVZ, size_t ENVZ_LEN, const char *NAME)' + `envz.h' (GNU): *Note Envz Functions::. + +`char * envz_get (const char *ENVZ, size_t ENVZ_LEN, const char *NAME)' + `envz.h' (GNU): *Note Envz Functions::. + +`error_t envz_merge (char **ENVZ, size_t *ENVZ_LEN, const char *ENVZ2, size_t ENVZ2_LEN, int OVERRIDE)' + `envz.h' (GNU): *Note Envz Functions::. + +`void envz_strip (char **ENVZ, size_t *ENVZ_LEN)' + `envz.h' (GNU): *Note Envz Functions::. + +`int ENXIO' + `errno.h' (POSIX.1: No such device or address): *Note Error + Codes::. + +`int EOF' + `stdio.h' (ISO): *Note EOF and Errors::. + +`int EOPNOTSUPP' + `errno.h' (BSD: Operation not supported): *Note Error Codes::. + +`int EOVERFLOW' + `errno.h' (XOPEN: Value too large for defined data type): *Note + Error Codes::. + +`int EPERM' + `errno.h' (POSIX.1: Operation not permitted): *Note Error Codes::. + +`int EPFNOSUPPORT' + `errno.h' (BSD: Protocol family not supported): *Note Error + Codes::. + +`int EPIPE' + `errno.h' (POSIX.1: Broken pipe): *Note Error Codes::. + +`int EPROCLIM' + `errno.h' (BSD: Too many processes): *Note Error Codes::. + +`int EPROCUNAVAIL' + `errno.h' (BSD: RPC bad procedure for program): *Note Error + Codes::. + +`int EPROGMISMATCH' + `errno.h' (BSD: RPC program version wrong): *Note Error Codes::. + +`int EPROGUNAVAIL' + `errno.h' (BSD: RPC program not available): *Note Error Codes::. + +`int EPROTO' + `errno.h' (XOPEN: Protocol error): *Note Error Codes::. + +`int EPROTONOSUPPORT' + `errno.h' (BSD: Protocol not supported): *Note Error Codes::. + +`int EPROTOTYPE' + `errno.h' (BSD: Protocol wrong type for socket): *Note Error + Codes::. + +`int EQUIV_CLASS_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. + +`double erand48 (unsigned short int XSUBI[3])' + `stdlib.h' (SVID): *Note SVID Random::. + +`int erand48_r (unsigned short int XSUBI[3], struct drand48_data *BUFFER, double *RESULT)' + `stdlib.h' (GNU): *Note SVID Random::. + +`int ERANGE' + `errno.h' (ISO: Numerical result out of range): *Note Error + Codes::. + +`int EREMCHG' + `errno.h' (Linux???: Remote address changed): *Note Error Codes::. + +`int EREMOTE' + `errno.h' (BSD: Object is remote): *Note Error Codes::. + +`int EREMOTEIO' + `errno.h' (Linux???: Remote I/O error): *Note Error Codes::. + +`int ERESTART' + `errno.h' (Linux???: Interrupted system call should be restarted): + *Note Error Codes::. + +`double erf (double X)' + `math.h' (SVID): *Note Special Functions::. + +`double erfc (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float erfcf (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double erfcl (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`float erff (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double erfl (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`int EROFS' + `errno.h' (POSIX.1: Read-only file system): *Note Error Codes::. + +`int ERPCMISMATCH' + `errno.h' (BSD: RPC version wrong): *Note Error Codes::. + +`void err (int STATUS, const char *FORMAT, ...)' + `err.h' (BSD): *Note Error Messages::. + +`volatile int errno' + `errno.h' (ISO): *Note Checking for Errors::. + +`void error (int STATUS, int ERRNUM, const char *FORMAT, ...)' + `error.h' (GNU): *Note Error Messages::. + +`void error_at_line (int STATUS, int ERRNUM, const char *FNAME, unsigned int LINENO, const char *FORMAT, ...)' + `error.h' (GNU): *Note Error Messages::. + +`unsigned int error_message_count' + `error.h' (GNU): *Note Error Messages::. + +`int error_one_per_line' + `error.h' (GNU): *Note Error Messages::. + +`void (* error_print_progname ) (void)' + `error.h' (GNU): *Note Error Messages::. + +`void errx (int STATUS, const char *FORMAT, ...)' + `err.h' (BSD): *Note Error Messages::. + +`int ESHUTDOWN' + `errno.h' (BSD: Cannot send after transport endpoint shutdown): + *Note Error Codes::. + +`int ESOCKTNOSUPPORT' + `errno.h' (BSD: Socket type not supported): *Note Error Codes::. + +`int ESPIPE' + `errno.h' (POSIX.1: Illegal seek): *Note Error Codes::. + +`int ESRCH' + `errno.h' (POSIX.1: No such process): *Note Error Codes::. + +`int ESRMNT' + `errno.h' (Linux???: Srmount error): *Note Error Codes::. + +`int ESTALE' + `errno.h' (BSD: Stale NFS file handle): *Note Error Codes::. + +`int ESTRPIPE' + `errno.h' (Linux???: Streams pipe error): *Note Error Codes::. + +`int ETIME' + `errno.h' (XOPEN: Timer expired): *Note Error Codes::. + +`int ETIMEDOUT' + `errno.h' (BSD: Connection timed out): *Note Error Codes::. + +`int ETOOMANYREFS' + `errno.h' (BSD: Too many references: cannot splice): *Note Error + Codes::. + +`int ETXTBSY' + `errno.h' (BSD: Text file busy): *Note Error Codes::. + +`int EUCLEAN' + `errno.h' (Linux???: Structure needs cleaning): *Note Error + Codes::. + +`int EUNATCH' + `errno.h' (Linux???: Protocol driver not attached): *Note Error + Codes::. + +`int EUSERS' + `errno.h' (BSD: Too many users): *Note Error Codes::. + +`int EWOULDBLOCK' + `errno.h' (BSD: Operation would block): *Note Error Codes::. + +`int EXDEV' + `errno.h' (POSIX.1: Invalid cross-device link): *Note Error + Codes::. + +`int execl (const char *FILENAME, const char *ARG0, ...)' + `unistd.h' (POSIX.1): *Note Executing a File::. + +`int execle (const char *FILENAME, const char *ARG0, char *const ENV[], ...)' + `unistd.h' (POSIX.1): *Note Executing a File::. + +`int execlp (const char *FILENAME, const char *ARG0, ...)' + `unistd.h' (POSIX.1): *Note Executing a File::. + +`int execv (const char *FILENAME, char *const ARGV[])' + `unistd.h' (POSIX.1): *Note Executing a File::. + +`int execve (const char *FILENAME, char *const ARGV[], char *const ENV[])' + `unistd.h' (POSIX.1): *Note Executing a File::. + +`int execvp (const char *FILENAME, char *const ARGV[])' + `unistd.h' (POSIX.1): *Note Executing a File::. + +`int EXFULL' + `errno.h' (Linux???: Exchange full): *Note Error Codes::. + +`void _Exit (int STATUS)' + `stdlib.h' (ISO): *Note Termination Internals::. + +`void _exit (int STATUS)' + `unistd.h' (POSIX.1): *Note Termination Internals::. + +`void exit (int STATUS)' + `stdlib.h' (ISO): *Note Normal Termination::. + +`int EXIT_FAILURE' + `stdlib.h' (ISO): *Note Exit Status::. + +`int EXIT_SUCCESS' + `stdlib.h' (ISO): *Note Exit Status::. + +`double exp (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double exp10 (double X)' + `math.h' (GNU): *Note Exponents and Logarithms::. + +`float exp10f (float X)' + `math.h' (GNU): *Note Exponents and Logarithms::. + +`long double exp10l (long double X)' + `math.h' (GNU): *Note Exponents and Logarithms::. + +`double exp2 (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float exp2f (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double exp2l (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float expf (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double expl (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double expm1 (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float expm1f (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double expm1l (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`int EXPR_NEST_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. + +`double fabs (double NUMBER)' + `math.h' (ISO): *Note Absolute Value::. + +`float fabsf (float NUMBER)' + `math.h' (ISO): *Note Absolute Value::. + +`long double fabsl (long double NUMBER)' + `math.h' (ISO): *Note Absolute Value::. + +`size_t __fbufsize (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Controlling Buffering::. + +`int fchdir (int FILEDES)' + `unistd.h' (XPG): *Note Working Directory::. + +`int fchmod (int FILEDES, int MODE)' + `sys/stat.h' (BSD): *Note Setting Permissions::. + +`int fchown (int FILEDES, int OWNER, int GROUP)' + `unistd.h' (BSD): *Note File Owner::. + +`int fclean (FILE *STREAM)' + `stdio.h' (GNU): *Note Cleaning Streams::. + +`int fclose (FILE *STREAM)' + `stdio.h' (ISO): *Note Closing Streams::. + +`int fcloseall (void)' + `stdio.h' (GNU): *Note Closing Streams::. + +`int fcntl (int FILEDES, int COMMAND, ...)' + `fcntl.h' (POSIX.1): *Note Control Operations::. + +`char * fcvt (double VALUE, int NDIGIT, int *DECPT, int *NEG)' + `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. + +`char * fcvt_r (double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' + `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. + +`int fdatasync (int FILDES)' + `unistd.h' (POSIX): *Note Synchronizing I/O::. + +`int FD_CLOEXEC' + `fcntl.h' (POSIX.1): *Note Descriptor Flags::. + +`void FD_CLR (int FILEDES, fd_set *SET)' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`double fdim (double X, double Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`float fdimf (float X, float Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`long double fdiml (long double X, long double Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`int FD_ISSET (int FILEDES, fd_set *SET)' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`FILE * fdopen (int FILEDES, const char *OPENTYPE)' + `stdio.h' (POSIX.1): *Note Descriptors and Streams::. + +`void FD_SET (int FILEDES, fd_set *SET)' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`fd_set' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`int FD_SETSIZE' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`int F_DUPFD' + `fcntl.h' (POSIX.1): *Note Duplicating Descriptors::. + +`void FD_ZERO (fd_set *SET)' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`int feclearexcept (int EXCEPTS)' + `fenv.h' (ISO): *Note Status bit operations::. + +`int fedisableexcept (int EXCEPTS)' + `fenv.h' (GNU): *Note Control Functions::. + +`FE_DIVBYZERO' + `fenv.h' (ISO): *Note Status bit operations::. + +`FE_DOWNWARD' + `fenv.h' (ISO): *Note Rounding::. + +`int feenableexcept (int EXCEPTS)' + `fenv.h' (GNU): *Note Control Functions::. + +`int fegetenv (fenv_t *ENVP)' + `fenv.h' (ISO): *Note Control Functions::. + +`int fegetexcept (int EXCEPTS)' + `fenv.h' (GNU): *Note Control Functions::. + +`int fegetexceptflag (fexcept_t *FLAGP, int EXCEPTS)' + `fenv.h' (ISO): *Note Status bit operations::. + +`int fegetround (void)' + `fenv.h' (ISO): *Note Rounding::. + +`int feholdexcept (fenv_t *ENVP)' + `fenv.h' (ISO): *Note Control Functions::. + +`FE_INEXACT' + `fenv.h' (ISO): *Note Status bit operations::. + +`FE_INVALID' + `fenv.h' (ISO): *Note Status bit operations::. + +`int feof (FILE *STREAM)' + `stdio.h' (ISO): *Note EOF and Errors::. + +`int feof_unlocked (FILE *STREAM)' + `stdio.h' (GNU): *Note EOF and Errors::. + +`FE_OVERFLOW' + `fenv.h' (ISO): *Note Status bit operations::. + +`int feraiseexcept (int EXCEPTS)' + `fenv.h' (ISO): *Note Status bit operations::. + +`int ferror (FILE *STREAM)' + `stdio.h' (ISO): *Note EOF and Errors::. + +`int ferror_unlocked (FILE *STREAM)' + `stdio.h' (GNU): *Note EOF and Errors::. + +`int fesetenv (const fenv_t *ENVP)' + `fenv.h' (ISO): *Note Control Functions::. + +`int fesetexceptflag (const fexcept_t *FLAGP, int' + `fenv.h' (ISO): *Note Status bit operations::. + +`int fesetround (int ROUND)' + `fenv.h' (ISO): *Note Rounding::. + +`int fetestexcept (int EXCEPTS)' + `fenv.h' (ISO): *Note Status bit operations::. + +`FE_TONEAREST' + `fenv.h' (ISO): *Note Rounding::. + +`FE_TOWARDZERO' + `fenv.h' (ISO): *Note Rounding::. + +`FE_UNDERFLOW' + `fenv.h' (ISO): *Note Status bit operations::. + +`int feupdateenv (const fenv_t *ENVP)' + `fenv.h' (ISO): *Note Control Functions::. + +`FE_UPWARD' + `fenv.h' (ISO): *Note Rounding::. + +`int fflush (FILE *STREAM)' + `stdio.h' (ISO): *Note Flushing Buffers::. + +`int fflush_unlocked (FILE *STREAM)' + `stdio.h' (POSIX): *Note Flushing Buffers::. + +`int fgetc (FILE *STREAM)' + `stdio.h' (ISO): *Note Character Input::. + +`int fgetc_unlocked (FILE *STREAM)' + `stdio.h' (POSIX): *Note Character Input::. + +`int F_GETFD' + `fcntl.h' (POSIX.1): *Note Descriptor Flags::. + +`int F_GETFL' + `fcntl.h' (POSIX.1): *Note Getting File Status Flags::. + +`struct group * fgetgrent (FILE *STREAM)' + `grp.h' (SVID): *Note Scanning All Groups::. + +`int fgetgrent_r (FILE *STREAM, struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' + `grp.h' (GNU): *Note Scanning All Groups::. + +`int F_GETLK' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`int F_GETOWN' + `fcntl.h' (BSD): *Note Interrupt Input::. + +`int fgetpos (FILE *STREAM, fpos_t *POSITION)' + `stdio.h' (ISO): *Note Portable Positioning::. + +`int fgetpos64 (FILE *STREAM, fpos64_t *POSITION)' + `stdio.h' (Unix98): *Note Portable Positioning::. + +`struct passwd * fgetpwent (FILE *STREAM)' + `pwd.h' (SVID): *Note Scanning All Users::. + +`int fgetpwent_r (FILE *STREAM, struct passwd *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd **RESULT)' + `pwd.h' (GNU): *Note Scanning All Users::. + +`char * fgets (char *S, int COUNT, FILE *STREAM)' + `stdio.h' (ISO): *Note Line Input::. + +`char * fgets_unlocked (char *S, int COUNT, FILE *STREAM)' + `stdio.h' (GNU): *Note Line Input::. + +`wint_t fgetwc (FILE *STREAM)' + `wchar.h' (ISO): *Note Character Input::. + +`wint_t fgetwc_unlocked (FILE *STREAM)' + `wchar.h' (GNU): *Note Character Input::. + +`wchar_t * fgetws (wchar_t *WS, int COUNT, FILE *STREAM)' + `wchar.h' (ISO): *Note Line Input::. + +`wchar_t * fgetws_unlocked (wchar_t *WS, int COUNT, FILE *STREAM)' + `wchar.h' (GNU): *Note Line Input::. + +`FILE' + `stdio.h' (ISO): *Note Streams::. + +`int FILENAME_MAX' + `stdio.h' (ISO): *Note Limits for Files::. + +`int fileno (FILE *STREAM)' + `stdio.h' (POSIX.1): *Note Descriptors and Streams::. + +`int fileno_unlocked (FILE *STREAM)' + `stdio.h' (GNU): *Note Descriptors and Streams::. + +`int finite (double X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int finitef (float X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int finitel (long double X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int __flbf (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Controlling Buffering::. + +`void flockfile (FILE *STREAM)' + `stdio.h' (POSIX): *Note Streams and Threads::. + +`double floor (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`float floorf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double floorl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`FLT_DIG' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_EPSILON' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MANT_DIG' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MAX' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MAX_10_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MAX_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MIN' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MIN_10_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_MIN_EXP' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_RADIX' + `float.h' (ISO): *Note Floating Point Parameters::. + +`FLT_ROUNDS' + `float.h' (ISO): *Note Floating Point Parameters::. + +`void _flushlbf (void)' + `stdio_ext.h' (GNU): *Note Flushing Buffers::. + +`tcflag_t FLUSHO' + `termios.h' (BSD): *Note Local Modes::. + +`double fma (double X, double Y, double Z)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`float fmaf (float X, float Y, float Z)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`long double fmal (long double X, long double Y, long double Z)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`double fmax (double X, double Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`float fmaxf (float X, float Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`long double fmaxl (long double X, long double Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`FILE * fmemopen (void *BUF, size_t SIZE, const char *OPENTYPE)' + `stdio.h' (GNU): *Note String Streams::. + +`double fmin (double X, double Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`float fminf (float X, float Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`long double fminl (long double X, long double Y)' + `math.h' (ISO): *Note Misc FP Arithmetic::. + +`double fmod (double NUMERATOR, double DENOMINATOR)' + `math.h' (ISO): *Note Remainder Functions::. + +`float fmodf (float NUMERATOR, float DENOMINATOR)' + `math.h' (ISO): *Note Remainder Functions::. + +`long double fmodl (long double NUMERATOR, long double DENOMINATOR)' + `math.h' (ISO): *Note Remainder Functions::. + +`int fmtmsg (long int CLASSIFICATION, const char *LABEL, int SEVERITY, const char *TEXT, const char *ACTION, const char *TAG)' + `fmtmsg.h' (XPG): *Note Printing Formatted Messages::. + +`int fnmatch (const char *PATTERN, const char *STRING, int FLAGS)' + `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. + +`FNM_CASEFOLD' + `fnmatch.h' (GNU): *Note Wildcard Matching::. + +`FNM_EXTMATCH' + `fnmatch.h' (GNU): *Note Wildcard Matching::. + +`FNM_FILE_NAME' + `fnmatch.h' (GNU): *Note Wildcard Matching::. + +`FNM_LEADING_DIR' + `fnmatch.h' (GNU): *Note Wildcard Matching::. + +`FNM_NOESCAPE' + `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. + +`FNM_PATHNAME' + `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. + +`FNM_PERIOD' + `fnmatch.h' (POSIX.2): *Note Wildcard Matching::. + +`int F_OK' + `unistd.h' (POSIX.1): *Note Testing File Access::. + +`FILE * fopen (const char *FILENAME, const char *OPENTYPE)' + `stdio.h' (ISO): *Note Opening Streams::. + +`FILE * fopen64 (const char *FILENAME, const char *OPENTYPE)' + `stdio.h' (Unix98): *Note Opening Streams::. + +`FILE * fopencookie (void *COOKIE, const char *OPENTYPE, cookie_io_functions_t IO-FUNCTIONS)' + `stdio.h' (GNU): *Note Streams and Cookies::. + +`int FOPEN_MAX' + `stdio.h' (ISO): *Note Opening Streams::. + +`pid_t fork (void)' + `unistd.h' (POSIX.1): *Note Creating a Process::. + +`int forkpty (int *AMASTER, char *NAME, struct termios *TERMP, struct winsize *WINP)' + `pty.h' (BSD): *Note Pseudo-Terminal Pairs::. + +`long int fpathconf (int FILEDES, int PARAMETER)' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`int fpclassify (_float-type_ X)' + `math.h' (ISO): *Note Floating Point Classes::. + +`FPE_DECOVF_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_FLTDIV_FAULT' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_FLTDIV_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_FLTOVF_FAULT' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_FLTOVF_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_FLTUND_FAULT' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_FLTUND_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_INTDIV_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`FPE_INTOVF_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`size_t __fpending (FILE *STREAM) The `__fpending'' + `stdio_ext.h' (GNU): *Note Controlling Buffering::. + +`FPE_SUBRNG_TRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`int FP_ILOGB0' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`int FP_ILOGBNAN' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`fpos64_t' + `stdio.h' (Unix98): *Note Portable Positioning::. + +`fpos_t' + `stdio.h' (ISO): *Note Portable Positioning::. + +`int fprintf (FILE *STREAM, const char *TEMPLATE, ...)' + `stdio.h' (ISO): *Note Formatted Output Functions::. + +`void __fpurge (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Flushing Buffers::. + +`int fputc (int C, FILE *STREAM)' + `stdio.h' (ISO): *Note Simple Output::. + +`int fputc_unlocked (int C, FILE *STREAM)' + `stdio.h' (POSIX): *Note Simple Output::. + +`int fputs (const char *S, FILE *STREAM)' + `stdio.h' (ISO): *Note Simple Output::. + +`int fputs_unlocked (const char *S, FILE *STREAM)' + `stdio.h' (GNU): *Note Simple Output::. + +`wint_t fputwc (wchar_t WC, FILE *STREAM)' + `wchar.h' (ISO): *Note Simple Output::. + +`wint_t fputwc_unlocked (wint_t WC, FILE *STREAM)' + `wchar.h' (POSIX): *Note Simple Output::. + +`int fputws (const wchar_t *WS, FILE *STREAM)' + `wchar.h' (ISO): *Note Simple Output::. + +`int fputws_unlocked (const wchar_t *WS, FILE *STREAM)' + `wchar.h' (GNU): *Note Simple Output::. + +`F_RDLCK' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`size_t fread (void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' + `stdio.h' (ISO): *Note Block Input/Output::. + +`int __freadable (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Opening Streams::. + +`int __freading (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Opening Streams::. + +`size_t fread_unlocked (void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' + `stdio.h' (GNU): *Note Block Input/Output::. + +`void free (void *PTR)' + `malloc.h', `stdlib.h' (ISO): *Note Freeing after Malloc::. + +`__free_hook' + `malloc.h' (GNU): *Note Hooks for Malloc::. + +`FILE * freopen (const char *FILENAME, const char *OPENTYPE, FILE *STREAM)' + `stdio.h' (ISO): *Note Opening Streams::. + +`FILE * freopen64 (const char *FILENAME, const char *OPENTYPE, FILE *STREAM)' + `stdio.h' (Unix98): *Note Opening Streams::. + +`double frexp (double VALUE, int *EXPONENT)' + `math.h' (ISO): *Note Normalization Functions::. + +`float frexpf (float VALUE, int *EXPONENT)' + `math.h' (ISO): *Note Normalization Functions::. + +`long double frexpl (long double VALUE, int *EXPONENT)' + `math.h' (ISO): *Note Normalization Functions::. + +`int fscanf (FILE *STREAM, const char *TEMPLATE, ...)' + `stdio.h' (ISO): *Note Formatted Input Functions::. + +`int fseek (FILE *STREAM, long int OFFSET, int WHENCE)' + `stdio.h' (ISO): *Note File Positioning::. + +`int fseeko (FILE *STREAM, off_t OFFSET, int WHENCE)' + `stdio.h' (Unix98): *Note File Positioning::. + +`int fseeko64 (FILE *STREAM, off64_t OFFSET, int WHENCE)' + `stdio.h' (Unix98): *Note File Positioning::. + +`int F_SETFD' + `fcntl.h' (POSIX.1): *Note Descriptor Flags::. + +`int F_SETFL' + `fcntl.h' (POSIX.1): *Note Getting File Status Flags::. + +`int F_SETLK' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`int F_SETLKW' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`int __fsetlocking (FILE *STREAM, int TYPE)' + `stdio_ext.h' (GNU): *Note Streams and Threads::. + +`int F_SETOWN' + `fcntl.h' (BSD): *Note Interrupt Input::. + +`int fsetpos (FILE *STREAM, const fpos_t *POSITION)' + `stdio.h' (ISO): *Note Portable Positioning::. + +`int fsetpos64 (FILE *STREAM, const fpos64_t *POSITION)' + `stdio.h' (Unix98): *Note Portable Positioning::. + +`int fstat (int FILEDES, struct stat *BUF)' + `sys/stat.h' (POSIX.1): *Note Reading Attributes::. + +`int fstat64 (int FILEDES, struct stat64 *BUF)' + `sys/stat.h' (Unix98): *Note Reading Attributes::. + +`int fsync (int FILDES)' + `unistd.h' (POSIX): *Note Synchronizing I/O::. + +`long int ftell (FILE *STREAM)' + `stdio.h' (ISO): *Note File Positioning::. + +`off_t ftello (FILE *STREAM)' + `stdio.h' (Unix98): *Note File Positioning::. + +`off64_t ftello64 (FILE *STREAM)' + `stdio.h' (Unix98): *Note File Positioning::. + +`int ftruncate (int FD, off_t LENGTH)' + `unistd.h' (POSIX): *Note File Size::. + +`int ftruncate64 (int ID, off64_t LENGTH)' + `unistd.h' (Unix98): *Note File Size::. + +`int ftrylockfile (FILE *STREAM)' + `stdio.h' (POSIX): *Note Streams and Threads::. + +`int ftw (const char *FILENAME, __ftw_func_t FUNC, int DESCRIPTORS)' + `ftw.h' (SVID): *Note Working with Directory Trees::. + +`int ftw64 (const char *FILENAME, __ftw64_func_t FUNC, int DESCRIPTORS)' + `ftw.h' (Unix98): *Note Working with Directory Trees::. + +`__ftw64_func_t' + `ftw.h' (GNU): *Note Working with Directory Trees::. + +`__ftw_func_t' + `ftw.h' (GNU): *Note Working with Directory Trees::. + +`F_UNLCK' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`void funlockfile (FILE *STREAM)' + `stdio.h' (POSIX): *Note Streams and Threads::. + +`int fwide (FILE *STREAM, int MODE)' + `wchar.h' (ISO): *Note Streams and I18N::. + +`int fwprintf (FILE *STREAM, const wchar_t *TEMPLATE, ...)' + `wchar.h' (ISO): *Note Formatted Output Functions::. + +`int __fwritable (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Opening Streams::. + +`size_t fwrite (const void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' + `stdio.h' (ISO): *Note Block Input/Output::. + +`size_t fwrite_unlocked (const void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM)' + `stdio.h' (GNU): *Note Block Input/Output::. + +`int __fwriting (FILE *STREAM)' + `stdio_ext.h' (GNU): *Note Opening Streams::. + +`F_WRLCK' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`int fwscanf (FILE *STREAM, const wchar_t *TEMPLATE, ...)' + `wchar.h' (ISO): *Note Formatted Input Functions::. + +`double gamma (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float gammaf (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double gammal (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`void (*__gconv_end_fct) (struct gconv_step *)' + `gconv.h' (GNU): *Note glibc iconv Implementation::. + +`int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, const char **, const char *, size_t *, int)' + `gconv.h' (GNU): *Note glibc iconv Implementation::. + +`int (*__gconv_init_fct) (struct __gconv_step *)' + `gconv.h' (GNU): *Note glibc iconv Implementation::. + +`char * gcvt (double VALUE, int NDIGIT, char *BUF)' + `stdlib.h' (SVID, Unix98): *Note System V Number Conversion::. + +`long int get_avphys_pages (void)' + `sys/sysinfo.h' (GNU): *Note Query Memory Parameters::. + +`int getc (FILE *STREAM)' + `stdio.h' (ISO): *Note Character Input::. + +`int getchar (void)' + `stdio.h' (ISO): *Note Character Input::. + +`int getchar_unlocked (void)' + `stdio.h' (POSIX): *Note Character Input::. + +`int getcontext (ucontext_t *UCP)' + `ucontext.h' (SVID): *Note System V contexts::. + +`int getc_unlocked (FILE *STREAM)' + `stdio.h' (POSIX): *Note Character Input::. + +`char * get_current_dir_name (void)' + `unistd.h' (GNU): *Note Working Directory::. + +`char * getcwd (char *BUFFER, size_t SIZE)' + `unistd.h' (POSIX.1): *Note Working Directory::. + +`struct tm * getdate (const char *STRING)' + `time.h' (Unix98): *Note General Time String Parsing::. + +`getdate_err' + `time.h' (Unix98): *Note General Time String Parsing::. + +`int getdate_r (const char *STRING, struct tm *TP)' + `time.h' (GNU): *Note General Time String Parsing::. + +`ssize_t getdelim (char **LINEPTR, size_t *N, int DELIMITER, FILE *STREAM)' + `stdio.h' (GNU): *Note Line Input::. + +`int getdomainnname (char *NAME, size_t LENGTH)' + `unistd.h' (???): *Note Host Identification::. + +`gid_t getegid (void)' + `unistd.h' (POSIX.1): *Note Reading Persona::. + +`char * getenv (const char *NAME)' + `stdlib.h' (ISO): *Note Environment Access::. + +`uid_t geteuid (void)' + `unistd.h' (POSIX.1): *Note Reading Persona::. + +`struct fstab * getfsent (void)' + `fstab.h' (BSD): *Note fstab::. + +`struct fstab * getfsfile (const char *NAME)' + `fstab.h' (BSD): *Note fstab::. + +`struct fstab * getfsspec (const char *NAME)' + `fstab.h' (BSD): *Note fstab::. + +`gid_t getgid (void)' + `unistd.h' (POSIX.1): *Note Reading Persona::. + +`struct group * getgrent (void)' + `grp.h' (SVID, BSD): *Note Scanning All Groups::. + +`int getgrent_r (struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' + `grp.h' (GNU): *Note Scanning All Groups::. + +`struct group * getgrgid (gid_t GID)' + `grp.h' (POSIX.1): *Note Lookup Group::. + +`int getgrgid_r (gid_t GID, struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' + `grp.h' (POSIX.1c): *Note Lookup Group::. + +`struct group * getgrnam (const char *NAME)' + `grp.h' (SVID, BSD): *Note Lookup Group::. + +`int getgrnam_r (const char *NAME, struct group *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct group **RESULT)' + `grp.h' (POSIX.1c): *Note Lookup Group::. + +`int getgrouplist (const char *USER, gid_t GROUP, gid_t *GROUPS, int *NGROUPS)' + `grp.h' (BSD): *Note Setting Groups::. + +`int getgroups (int COUNT, gid_t *GROUPS)' + `unistd.h' (POSIX.1): *Note Reading Persona::. + +`struct hostent * gethostbyaddr (const char *ADDR, size_t LENGTH, int FORMAT)' + `netdb.h' (BSD): *Note Host Names::. + +`int gethostbyaddr_r (const char *ADDR, size_t LENGTH, int FORMAT, struct hostent *restrict RESULT_BUF, char *restrict BUF, size_t BUFLEN, struct hostent **restrict RESULT, int *restrict H_ERRNOP)' + `netdb.h' (GNU): *Note Host Names::. + +`struct hostent * gethostbyname (const char *NAME)' + `netdb.h' (BSD): *Note Host Names::. + +`struct hostent * gethostbyname2 (const char *NAME, int AF)' + `netdb.h' (IPv6 Basic API): *Note Host Names::. + +`int gethostbyname2_r (const char *NAME, int AF, struct hostent *restrict RESULT_BUF, char *restrict BUF, size_t BUFLEN, struct hostent **restrict RESULT, int *restrict H_ERRNOP)' + `netdb.h' (GNU): *Note Host Names::. + +`int gethostbyname_r (const char *restrict NAME, struct hostent *restrict RESULT_BUF, char *restrict BUF, size_t BUFLEN, struct hostent **restrict RESULT, int *restrict H_ERRNOP)' + `netdb.h' (GNU): *Note Host Names::. + +`struct hostent * gethostent (void)' + `netdb.h' (BSD): *Note Host Names::. + +`long int gethostid (void)' + `unistd.h' (BSD): *Note Host Identification::. + +`int gethostname (char *NAME, size_t SIZE)' + `unistd.h' (BSD): *Note Host Identification::. + +`int getitimer (int WHICH, struct itimerval *OLD)' + `sys/time.h' (BSD): *Note Setting an Alarm::. + +`ssize_t getline (char **LINEPTR, size_t *N, FILE *STREAM)' + `stdio.h' (GNU): *Note Line Input::. + +`int getloadavg (double LOADAVG[], int NELEM)' + `stdlib.h' (BSD): *Note Processor Resources::. + +`char * getlogin (void)' + `unistd.h' (POSIX.1): *Note Who Logged In::. + +`struct mntent * getmntent (FILE *STREAM)' + `mntent.h' (BSD): *Note mtab::. + +`struct mntent * getmntent_r (FILE *STREAM, struct mentent *RESULT, char *BUFFER, int BUFSIZE)' + `mntent.h' (BSD): *Note mtab::. + +`struct netent * getnetbyaddr (unsigned long int NET, int TYPE)' + `netdb.h' (BSD): *Note Networks Database::. + +`struct netent * getnetbyname (const char *NAME)' + `netdb.h' (BSD): *Note Networks Database::. + +`struct netent * getnetent (void)' + `netdb.h' (BSD): *Note Networks Database::. + +`int getnetgrent (char **HOSTP, char **USERP, char **DOMAINP)' + `netdb.h' (BSD): *Note Lookup Netgroup::. + +`int getnetgrent_r (char **HOSTP, char **USERP, char **DOMAINP, char *BUFFER, int BUFLEN)' + `netdb.h' (GNU): *Note Lookup Netgroup::. + +`int get_nprocs (void)' + `sys/sysinfo.h' (GNU): *Note Processor Resources::. + +`int get_nprocs_conf (void)' + `sys/sysinfo.h' (GNU): *Note Processor Resources::. + +`int getopt (int ARGC, char **ARGV, const char *OPTIONS)' + `unistd.h' (POSIX.2): *Note Using Getopt::. + +`int getopt_long (int ARGC, char *const *ARGV, const char *SHORTOPTS, const struct option *LONGOPTS, int *INDEXPTR)' + `getopt.h' (GNU): *Note Getopt Long Options::. + +`int getopt_long_only (int ARGC, char *const *ARGV, const char *SHORTOPTS, const struct option *LONGOPTS, int *INDEXPTR)' + `getopt.h' (GNU): *Note Getopt Long Options::. + +`int getpagesize (void)' + `unistd.h' (BSD): *Note Query Memory Parameters::. + +`char * getpass (const char *PROMPT)' + `unistd.h' (BSD): *Note getpass::. + +`int getpeername (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH-PTR)' + `sys/socket.h' (BSD): *Note Who is Connected::. + +`int getpgid (pid_t PID)' + `unistd.h' (SVID): *Note Process Group Functions::. + +`pid_t getpgrp (pid_t PID)' + `unistd.h' (BSD): *Note Process Group Functions::. + +`pid_t getpgrp (void)' + `unistd.h' (POSIX.1): *Note Process Group Functions::. + +`long int get_phys_pages (void)' + `sys/sysinfo.h' (GNU): *Note Query Memory Parameters::. + +`pid_t getpid (void)' + `unistd.h' (POSIX.1): *Note Process Identification::. + +`pid_t getppid (void)' + `unistd.h' (POSIX.1): *Note Process Identification::. + +`int getpriority (int CLASS, int ID)' + `sys/resource.h' (BSD,POSIX): *Note Traditional Scheduling + Functions::. + +`struct protoent * getprotobyname (const char *NAME)' + `netdb.h' (BSD): *Note Protocols Database::. + +`struct protoent * getprotobynumber (int PROTOCOL)' + `netdb.h' (BSD): *Note Protocols Database::. + +`struct protoent * getprotoent (void)' + `netdb.h' (BSD): *Note Protocols Database::. + +`int getpt (void)' + `stdlib.h' (GNU): *Note Allocation::. + +`struct passwd * getpwent (void)' + `pwd.h' (POSIX.1): *Note Scanning All Users::. + +`int getpwent_r (struct passwd *RESULT_BUF, char *BUFFER, int BUFLEN, struct passwd **RESULT)' + `pwd.h' (GNU): *Note Scanning All Users::. + +`struct passwd * getpwnam (const char *NAME)' + `pwd.h' (POSIX.1): *Note Lookup User::. + +`int getpwnam_r (const char *NAME, struct passwd *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd **RESULT)' + `pwd.h' (POSIX.1c): *Note Lookup User::. + +`struct passwd * getpwuid (uid_t UID)' + `pwd.h' (POSIX.1): *Note Lookup User::. + +`int getpwuid_r (uid_t UID, struct passwd *RESULT_BUF, char *BUFFER, size_t BUFLEN, struct passwd **RESULT)' + `pwd.h' (POSIX.1c): *Note Lookup User::. + +`int getrlimit (int RESOURCE, struct rlimit *RLP)' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`int getrlimit64 (int RESOURCE, struct rlimit64 *RLP)' + `sys/resource.h' (Unix98): *Note Limits on Resources::. + +`int getrusage (int PROCESSES, struct rusage *RUSAGE)' + `sys/resource.h' (BSD): *Note Resource Usage::. + +`char * gets (char *S)' + `stdio.h' (ISO): *Note Line Input::. + +`struct servent * getservbyname (const char *NAME, const char *PROTO)' + `netdb.h' (BSD): *Note Services Database::. + +`struct servent * getservbyport (int PORT, const char *PROTO)' + `netdb.h' (BSD): *Note Services Database::. + +`struct servent * getservent (void)' + `netdb.h' (BSD): *Note Services Database::. + +`pid_t getsid (pid_t PID)' + `unistd.h' (SVID): *Note Process Group Functions::. + +`int getsockname (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH-PTR)' + `sys/socket.h' (BSD): *Note Reading Address::. + +`int getsockopt (int SOCKET, int LEVEL, int OPTNAME, void *OPTVAL, socklen_t *OPTLEN-PTR)' + `sys/socket.h' (BSD): *Note Socket Option Functions::. + +`int getsubopt (char **OPTIONP, const char* const *TOKENS, char **VALUEP)' + `stdlib.h' (stdlib.h): *Note Suboptions Example: Suboptions. + +`char * gettext (const char *MSGID)' + `libintl.h' (GNU): *Note Translation with gettext::. + +`int gettimeofday (struct timeval *TP, struct timezone *TZP)' + `sys/time.h' (BSD): *Note High-Resolution Calendar::. + +`uid_t getuid (void)' + `unistd.h' (POSIX.1): *Note Reading Persona::. + +`mode_t getumask (void)' + `sys/stat.h' (GNU): *Note Setting Permissions::. + +`struct utmp * getutent (void)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`int getutent_r (struct utmp *BUFFER, struct utmp **RESULT)' + `utmp.h' (GNU): *Note Manipulating the Database::. + +`struct utmp * getutid (const struct utmp *ID)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`int getutid_r (const struct utmp *ID, struct utmp *BUFFER, struct utmp **RESULT)' + `utmp.h' (GNU): *Note Manipulating the Database::. + +`struct utmp * getutline (const struct utmp *LINE)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`int getutline_r (const struct utmp *LINE, struct utmp *BUFFER, struct utmp **RESULT)' + `utmp.h' (GNU): *Note Manipulating the Database::. + +`int getutmp (const struct utmpx *utmpx, struct utmp *utmp)' + `utmp.h' (GNU): *Note XPG Functions::. + +`int getutmpx (const struct utmp *utmp, struct utmpx *utmpx)' + `utmp.h' (GNU): *Note XPG Functions::. + +`struct utmpx * getutxent (void)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`struct utmpx * getutxid (const struct utmpx *ID)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`struct utmpx * getutxline (const struct utmpx *LINE)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int getw (FILE *STREAM)' + `stdio.h' (SVID): *Note Character Input::. + +`wint_t getwc (FILE *STREAM)' + `wchar.h' (ISO): *Note Character Input::. + +`wint_t getwchar (void)' + `wchar.h' (ISO): *Note Character Input::. + +`wint_t getwchar_unlocked (void)' + `wchar.h' (GNU): *Note Character Input::. + +`wint_t getwc_unlocked (FILE *STREAM)' + `wchar.h' (GNU): *Note Character Input::. + +`char * getwd (char *BUFFER)' + `unistd.h' (BSD): *Note Working Directory::. + +`gid_t' + `sys/types.h' (POSIX.1): *Note Reading Persona::. + +`int glob (const char *PATTERN, int FLAGS, int (*ERRFUNC) (const char *FILENAME, int ERROR-CODE), glob_t *VECTOR-PTR)' + `glob.h' (POSIX.2): *Note Calling Glob::. + +`int glob64 (const char *PATTERN, int FLAGS, int (*ERRFUNC) (const char *FILENAME, int ERROR-CODE), glob64_t *VECTOR-PTR)' + `glob.h' (GNU): *Note Calling Glob::. + +`glob64_t' + `glob.h' (GNU): *Note Calling Glob::. + +`GLOB_ABORTED' + `glob.h' (POSIX.2): *Note Calling Glob::. + +`GLOB_ALTDIRFUNC' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_APPEND' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`GLOB_BRACE' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_DOOFFS' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`GLOB_ERR' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`void globfree (glob_t *PGLOB)' + `glob.h' (POSIX.2): *Note More Flags for Globbing::. + +`void globfree64 (glob64_t *PGLOB)' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_MAGCHAR' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_MARK' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`GLOB_NOCHECK' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`GLOB_NOESCAPE' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`GLOB_NOMAGIC' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_NOMATCH' + `glob.h' (POSIX.2): *Note Calling Glob::. + +`GLOB_NOSORT' + `glob.h' (POSIX.2): *Note Flags for Globbing::. + +`GLOB_NOSPACE' + `glob.h' (POSIX.2): *Note Calling Glob::. + +`GLOB_ONLYDIR' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_PERIOD' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`glob_t' + `glob.h' (POSIX.2): *Note Calling Glob::. + +`GLOB_TILDE' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`GLOB_TILDE_CHECK' + `glob.h' (GNU): *Note More Flags for Globbing::. + +`struct tm * gmtime (const time_t *TIME)' + `time.h' (ISO): *Note Broken-down Time::. + +`struct tm * gmtime_r (const time_t *TIME, struct tm *RESULTP)' + `time.h' (POSIX.1c): *Note Broken-down Time::. + +`_GNU_SOURCE' + (GNU): *Note Feature Test Macros::. + +`int grantpt (int FILEDES)' + `stdlib.h' (SVID, XPG4.2): *Note Allocation::. + +`int gsignal (int SIGNUM)' + `signal.h' (SVID): *Note Signaling Yourself::. + +`int gtty (int FILEDES, struct sgttyb *ATTRIBUTES)' + `sgtty.h' (BSD): *Note BSD Terminal Modes::. + +`char * hasmntopt (const struct mntent *MNT, const char *OPT)' + `mntent.h' (BSD): *Note mtab::. + +`int hcreate (size_t NEL)' + `search.h' (SVID): *Note Hash Search Function::. + +`int hcreate_r (size_t NEL, struct hsearch_data *HTAB)' + `search.h' (GNU): *Note Hash Search Function::. + +`void hdestroy (void)' + `search.h' (SVID): *Note Hash Search Function::. + +`void hdestroy_r (struct hsearch_data *HTAB)' + `search.h' (GNU): *Note Hash Search Function::. + +`HOST_NOT_FOUND' + `netdb.h' (BSD): *Note Host Names::. + +`ENTRY * hsearch (ENTRY ITEM, ACTION ACTION)' + `search.h' (SVID): *Note Hash Search Function::. + +`int hsearch_r (ENTRY ITEM, ACTION ACTION, ENTRY **RETVAL, struct hsearch_data *HTAB)' + `search.h' (GNU): *Note Hash Search Function::. + +`uint32_t htonl (uint32_t HOSTLONG)' + `netinet/in.h' (BSD): *Note Byte Order::. + +`uint16_t htons (uint16_t HOSTSHORT)' + `netinet/in.h' (BSD): *Note Byte Order::. + +`double HUGE_VAL' + `math.h' (ISO): *Note Math Error Reporting::. + +`float HUGE_VALF' + `math.h' (ISO): *Note Math Error Reporting::. + +`long double HUGE_VALL' + `math.h' (ISO): *Note Math Error Reporting::. + +`tcflag_t HUPCL' + `termios.h' (POSIX.1): *Note Control Modes::. + +`double hypot (double X, double Y)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float hypotf (float X, float Y)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double hypotl (long double X, long double Y)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`tcflag_t ICANON' + `termios.h' (POSIX.1): *Note Local Modes::. + +`size_t iconv (iconv_t CD, char **INBUF, size_t *INBYTESLEFT, char **OUTBUF, size_t *OUTBYTESLEFT)' + `iconv.h' (XPG2): *Note Generic Conversion Interface::. + +`int iconv_close (iconv_t CD)' + `iconv.h' (XPG2): *Note Generic Conversion Interface::. + +`iconv_t iconv_open (const char *TOCODE, const char *FROMCODE)' + `iconv.h' (XPG2): *Note Generic Conversion Interface::. + +`iconv_t' + `iconv.h' (XPG2): *Note Generic Conversion Interface::. + +`tcflag_t ICRNL' + `termios.h' (POSIX.1): *Note Input Modes::. + +`tcflag_t IEXTEN' + `termios.h' (POSIX.1): *Note Local Modes::. + +`void if_freenameindex (struct if_nameindex *ptr)' + `net/if.h' (IPv6 basic API): *Note Interface Naming::. + +`char * if_indextoname (unsigned int ifindex, char *ifname)' + `net/if.h' (IPv6 basic API): *Note Interface Naming::. + +`struct if_nameindex * if_nameindex (void)' + `net/if.h' (IPv6 basic API): *Note Interface Naming::. + +`unsigned int if_nametoindex (const char *ifname)' + `net/if.h' (IPv6 basic API): *Note Interface Naming::. + +`size_t IFNAMSIZ' + `net/if.h' (net/if.h): *Note Interface Naming::. + +`int IFTODT (mode_t MODE)' + `dirent.h' (BSD): *Note Directory Entries::. + +`tcflag_t IGNBRK' + `termios.h' (POSIX.1): *Note Input Modes::. + +`tcflag_t IGNCR' + `termios.h' (POSIX.1): *Note Input Modes::. + +`tcflag_t IGNPAR' + `termios.h' (POSIX.1): *Note Input Modes::. + +`int ilogb (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`int ilogbf (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`int ilogbl (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`intmax_t imaxabs (intmax_t NUMBER)' + `inttypes.h' (ISO): *Note Absolute Value::. + +`tcflag_t IMAXBEL' + `termios.h' (BSD): *Note Input Modes::. + +`imaxdiv_t imaxdiv (intmax_t NUMERATOR, intmax_t DENOMINATOR)' + `inttypes.h' (ISO): *Note Integer Division::. + +`imaxdiv_t' + `inttypes.h' (ISO): *Note Integer Division::. + +`struct in6_addr in6addr_any' + `netinet/in.h' (IPv6 basic API): *Note Host Address Data Type::. + +`struct in6_addr in6addr_loopback' + `netinet/in.h' (IPv6 basic API): *Note Host Address Data Type::. + +`uint32_t INADDR_ANY' + `netinet/in.h' (BSD): *Note Host Address Data Type::. + +`uint32_t INADDR_BROADCAST' + `netinet/in.h' (BSD): *Note Host Address Data Type::. + +`uint32_t INADDR_LOOPBACK' + `netinet/in.h' (BSD): *Note Host Address Data Type::. + +`uint32_t INADDR_NONE' + `netinet/in.h' (BSD): *Note Host Address Data Type::. + +`char * index (const char *STRING, int C)' + `string.h' (BSD): *Note Search Functions::. + +`uint32_t inet_addr (const char *NAME)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`int inet_aton (const char *NAME, struct in_addr *ADDR)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`uint32_t inet_lnaof (struct in_addr ADDR)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`struct in_addr inet_makeaddr (uint32_t NET, uint32_t LOCAL)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`uint32_t inet_netof (struct in_addr ADDR)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`uint32_t inet_network (const char *NAME)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`char * inet_ntoa (struct in_addr ADDR)' + `arpa/inet.h' (BSD): *Note Host Address Functions::. + +`const char * inet_ntop (int AF, const void *CP, char *BUF, size_t LEN)' + `arpa/inet.h' (IPv6 basic API): *Note Host Address Functions::. + +`int inet_pton (int AF, const char *CP, void *BUF)' + `arpa/inet.h' (IPv6 basic API): *Note Host Address Functions::. + +`float INFINITY' + `math.h' (ISO): *Note Infinity and NaN::. + +`int initgroups (const char *USER, gid_t GROUP)' + `grp.h' (BSD): *Note Setting Groups::. + +`INIT_PROCESS' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`INIT_PROCESS' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`void * initstate (unsigned int SEED, void *STATE, size_t SIZE)' + `stdlib.h' (BSD): *Note BSD Random::. + +`int initstate_r (unsigned int SEED, char *restrict STATEBUF, size_t STATELEN, struct random_data *restrict BUF)' + `stdlib.h' (GNU): *Note BSD Random::. + +`tcflag_t INLCR' + `termios.h' (POSIX.1): *Note Input Modes::. + +`int innetgr (const char *NETGROUP, const char *HOST, const char *USER, const char *DOMAIN)' + `netdb.h' (BSD): *Note Netgroup Membership::. + +`ino64_t' + `sys/types.h' (Unix98): *Note Attribute Meanings::. + +`ino_t' + `sys/types.h' (POSIX.1): *Note Attribute Meanings::. + +`tcflag_t INPCK' + `termios.h' (POSIX.1): *Note Input Modes::. + +`INT_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`INT_MIN' + `limits.h' (ISO): *Note Range of Type::. + +`int ioctl (int FILEDES, int COMMAND, ...)' + `sys/ioctl.h' (BSD): *Note IOCTLs::. + +`int _IOFBF' + `stdio.h' (ISO): *Note Controlling Buffering::. + +`int _IOLBF' + `stdio.h' (ISO): *Note Controlling Buffering::. + +`int _IONBF' + `stdio.h' (ISO): *Note Controlling Buffering::. + +`int IPPORT_RESERVED' + `netinet/in.h' (BSD): *Note Ports::. + +`int IPPORT_USERRESERVED' + `netinet/in.h' (BSD): *Note Ports::. + +`int isalnum (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isalpha (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isascii (int C)' + `ctype.h' (SVID, BSD): *Note Classification of Characters::. + +`int isatty (int FILEDES)' + `unistd.h' (POSIX.1): *Note Is It a Terminal::. + +`int isblank (int C)' + `ctype.h' (GNU): *Note Classification of Characters::. + +`int iscntrl (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isdigit (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isfinite (_float-type_ X)' + `math.h' (ISO): *Note Floating Point Classes::. + +`int isgraph (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isgreater (_real-floating_ X, _real-floating_ Y)' + `math.h' (ISO): *Note FP Comparison Functions::. + +`int isgreaterequal (_real-floating_ X, _real-floating_ Y)' + `math.h' (ISO): *Note FP Comparison Functions::. + +`tcflag_t ISIG' + `termios.h' (POSIX.1): *Note Local Modes::. + +`int isinf (double X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int isinff (float X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int isinfl (long double X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int isless (_real-floating_ X, _real-floating_ Y)' + `math.h' (ISO): *Note FP Comparison Functions::. + +`int islessequal (_real-floating_ X, _real-floating_ Y)' + `math.h' (ISO): *Note FP Comparison Functions::. + +`int islessgreater (_real-floating_ X, _real-floating_ Y)' + `math.h' (ISO): *Note FP Comparison Functions::. + +`int islower (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isnan (_float-type_ X)' + `math.h' (ISO): *Note Floating Point Classes::. + +`int isnan (double X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int isnanf (float X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int isnanl (long double X)' + `math.h' (BSD): *Note Floating Point Classes::. + +`int isnormal (_float-type_ X)' + `math.h' (ISO): *Note Floating Point Classes::. + +`_ISOC99_SOURCE' + (GNU): *Note Feature Test Macros::. + +`int isprint (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int ispunct (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int isspace (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`tcflag_t ISTRIP' + `termios.h' (POSIX.1): *Note Input Modes::. + +`int isunordered (_real-floating_ X, _real-floating_ Y)' + `math.h' (ISO): *Note FP Comparison Functions::. + +`int isupper (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`int iswalnum (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswalpha (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswblank (wint_t WC)' + `wctype.h' (GNU): *Note Classification of Wide Characters::. + +`int iswcntrl (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswctype (wint_t WC, wctype_t DESC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswdigit (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswgraph (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswlower (wint_t WC)' + `ctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswprint (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswpunct (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswspace (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswupper (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int iswxdigit (wint_t WC)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int isxdigit (int C)' + `ctype.h' (ISO): *Note Classification of Characters::. + +`ITIMER_PROF' + `sys/time.h' (BSD): *Note Setting an Alarm::. + +`ITIMER_REAL' + `sys/time.h' (BSD): *Note Setting an Alarm::. + +`ITIMER_VIRTUAL' + `sys/time.h' (BSD): *Note Setting an Alarm::. + +`tcflag_t IXANY' + `termios.h' (BSD): *Note Input Modes::. + +`tcflag_t IXOFF' + `termios.h' (POSIX.1): *Note Input Modes::. + +`tcflag_t IXON' + `termios.h' (POSIX.1): *Note Input Modes::. + +`double j0 (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float j0f (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double j0l (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`double j1 (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float j1f (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double j1l (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`jmp_buf' + `setjmp.h' (ISO): *Note Non-Local Details::. + +`double jn (int n, double X)' + `math.h' (SVID): *Note Special Functions::. + +`float jnf (int n, float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double jnl (int n, long double X)' + `math.h' (SVID): *Note Special Functions::. + +`long int jrand48 (unsigned short int XSUBI[3])' + `stdlib.h' (SVID): *Note SVID Random::. + +`int jrand48_r (unsigned short int XSUBI[3], struct drand48_data *BUFFER, long int *RESULT)' + `stdlib.h' (GNU): *Note SVID Random::. + +`int kill (pid_t PID, int SIGNUM)' + `signal.h' (POSIX.1): *Note Signaling Another Process::. + +`int killpg (int PGID, int SIGNUM)' + `signal.h' (BSD): *Note Signaling Another Process::. + +`char * l64a (long int N)' + `stdlib.h' (XPG): *Note Encode Binary Data::. + +`long int labs (long int NUMBER)' + `stdlib.h' (ISO): *Note Absolute Value::. + +`LANG' + `locale.h' (ISO): *Note Locale Categories::. + +`LC_ALL' + `locale.h' (ISO): *Note Locale Categories::. + +`LC_COLLATE' + `locale.h' (ISO): *Note Locale Categories::. + +`LC_CTYPE' + `locale.h' (ISO): *Note Locale Categories::. + +`LC_MESSAGES' + `locale.h' (XOPEN): *Note Locale Categories::. + +`LC_MONETARY' + `locale.h' (ISO): *Note Locale Categories::. + +`LC_NUMERIC' + `locale.h' (ISO): *Note Locale Categories::. + +`void lcong48 (unsigned short int PARAM[7])' + `stdlib.h' (SVID): *Note SVID Random::. + +`int lcong48_r (unsigned short int PARAM[7], struct drand48_data *BUFFER)' + `stdlib.h' (GNU): *Note SVID Random::. + +`int L_ctermid' + `stdio.h' (POSIX.1): *Note Identifying the Terminal::. + +`LC_TIME' + `locale.h' (ISO): *Note Locale Categories::. + +`int L_cuserid' + `stdio.h' (POSIX.1): *Note Who Logged In::. + +`double ldexp (double VALUE, int EXPONENT)' + `math.h' (ISO): *Note Normalization Functions::. + +`float ldexpf (float VALUE, int EXPONENT)' + `math.h' (ISO): *Note Normalization Functions::. + +`long double ldexpl (long double VALUE, int EXPONENT)' + `math.h' (ISO): *Note Normalization Functions::. + +`ldiv_t ldiv (long int NUMERATOR, long int DENOMINATOR)' + `stdlib.h' (ISO): *Note Integer Division::. + +`ldiv_t' + `stdlib.h' (ISO): *Note Integer Division::. + +`void * lfind (const void *KEY, void *BASE, size_t *NMEMB, size_t SIZE, comparison_fn_t COMPAR)' + `search.h' (SVID): *Note Array Search Function::. + +`double lgamma (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float lgammaf (float X)' + `math.h' (SVID): *Note Special Functions::. + +`float lgammaf_r (float X, int *SIGNP)' + `math.h' (XPG): *Note Special Functions::. + +`long double lgammal (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`long double lgammal_r (long double X, int *SIGNP)' + `math.h' (XPG): *Note Special Functions::. + +`double lgamma_r (double X, int *SIGNP)' + `math.h' (XPG): *Note Special Functions::. + +`L_INCR' + `sys/file.h' (BSD): *Note File Positioning::. + +`int LINE_MAX' + `limits.h' (POSIX.2): *Note Utility Limits::. + +`int link (const char *OLDNAME, const char *NEWNAME)' + `unistd.h' (POSIX.1): *Note Hard Links::. + +`int LINK_MAX' + `limits.h' (POSIX.1): *Note Limits for Files::. + +`int lio_listio (int MODE, struct aiocb *const LIST[], int NENT, struct sigevent *SIG)' + `aio.h' (POSIX.1b): *Note Asynchronous Reads/Writes::. + +`int lio_listio64 (int MODE, struct aiocb *const LIST, int NENT, struct sigevent *SIG)' + `aio.h' (Unix98): *Note Asynchronous Reads/Writes::. + +`int listen (int SOCKET, unsigned int N)' + `sys/socket.h' (BSD): *Note Listening::. + +`long long int llabs (long long int NUMBER)' + `stdlib.h' (ISO): *Note Absolute Value::. + +`lldiv_t lldiv (long long int NUMERATOR, long long int DENOMINATOR)' + `stdlib.h' (ISO): *Note Integer Division::. + +`lldiv_t' + `stdlib.h' (ISO): *Note Integer Division::. + +`long long int llrint (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long long int llrintf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long long int llrintl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long long int llround (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long long int llroundf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long long int llroundl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`struct lconv * localeconv (void)' + `locale.h' (ISO): *Note The Lame Way to Locale Data::. + +`struct tm * localtime (const time_t *TIME)' + `time.h' (ISO): *Note Broken-down Time::. + +`struct tm * localtime_r (const time_t *TIME, struct tm *RESULTP)' + `time.h' (POSIX.1c): *Note Broken-down Time::. + +`double log (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double log10 (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float log10f (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double log10l (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double log1p (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float log1pf (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double log1pl (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double log2 (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float log2f (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double log2l (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double logb (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float logbf (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double logbl (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float logf (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`void login (const struct utmp *ENTRY)' + `utmp.h' (BSD): *Note Logging In and Out::. + +`LOGIN_PROCESS' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`LOGIN_PROCESS' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int login_tty (int FILEDES)' + `utmp.h' (BSD): *Note Logging In and Out::. + +`long double logl (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`int logout (const char *UT_LINE)' + `utmp.h' (BSD): *Note Logging In and Out::. + +`void logwtmp (const char *UT_LINE, const char *UT_NAME, const char *UT_HOST)' + `utmp.h' (BSD): *Note Logging In and Out::. + +`void longjmp (jmp_buf STATE, int VALUE)' + `setjmp.h' (ISO): *Note Non-Local Details::. + +`LONG_LONG_MAX' + `limits.h' (GNU): *Note Range of Type::. + +`LONG_LONG_MIN' + `limits.h' (GNU): *Note Range of Type::. + +`LONG_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`LONG_MIN' + `limits.h' (ISO): *Note Range of Type::. + +`long int lrand48 (void)' + `stdlib.h' (SVID): *Note SVID Random::. + +`int lrand48_r (struct drand48_data *BUFFER, double *RESULT)' + `stdlib.h' (GNU): *Note SVID Random::. + +`long int lrint (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long int lrintf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long int lrintl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long int lround (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long int lroundf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long int lroundl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`void * lsearch (const void *KEY, void *BASE, size_t *NMEMB, size_t SIZE, comparison_fn_t COMPAR)' + `search.h' (SVID): *Note Array Search Function::. + +`off_t lseek (int FILEDES, off_t OFFSET, int WHENCE)' + `unistd.h' (POSIX.1): *Note File Position Primitive::. + +`off64_t lseek64 (int FILEDES, off64_t OFFSET, int WHENCE)' + `unistd.h' (Unix98): *Note File Position Primitive::. + +`L_SET' + `sys/file.h' (BSD): *Note File Positioning::. + +`int lstat (const char *FILENAME, struct stat *BUF)' + `sys/stat.h' (BSD): *Note Reading Attributes::. + +`int lstat64 (const char *FILENAME, struct stat64 *BUF)' + `sys/stat.h' (Unix98): *Note Reading Attributes::. + +`int L_tmpnam' + `stdio.h' (ISO): *Note Temporary Files::. + +`L_XTND' + `sys/file.h' (BSD): *Note File Positioning::. + +`int madvise (void *ADDR, size_t LENGTH, int ADVICE)' + `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. + +`void makecontext (ucontext_t *UCP, void (*FUNC) (void), int ARGC, ...)' + `ucontext.h' (SVID): *Note System V contexts::. + +`struct mallinfo mallinfo (void)' + `malloc.h' (SVID): *Note Statistics of Malloc::. + +`void * malloc (size_t SIZE)' + `malloc.h', `stdlib.h' (ISO): *Note Basic Allocation::. + +`__malloc_hook' + `malloc.h' (GNU): *Note Hooks for Malloc::. + +`__malloc_initialize_hook' + `malloc.h' (GNU): *Note Hooks for Malloc::. + +`int MAX_CANON' + `limits.h' (POSIX.1): *Note Limits for Files::. + +`int MAX_INPUT' + `limits.h' (POSIX.1): *Note Limits for Files::. + +`int MAXNAMLEN' + `dirent.h' (BSD): *Note Limits for Files::. + +`int MAXSYMLINKS' + `sys/param.h' (BSD): *Note Symbolic Links::. + +`int MB_CUR_MAX' + `stdlib.h' (ISO): *Note Selecting the Conversion::. + +`int mblen (const char *STRING, size_t SIZE)' + `stdlib.h' (ISO): *Note Non-reentrant Character Conversion::. + +`int MB_LEN_MAX' + `limits.h' (ISO): *Note Selecting the Conversion::. + +`size_t mbrlen (const char *restrict S, size_t N, mbstate_t *PS)' + `wchar.h' (ISO): *Note Converting a Character::. + +`size_t mbrtowc (wchar_t *restrict PWC, const char *restrict S, size_t N, mbstate_t *restrict PS)' + `wchar.h' (ISO): *Note Converting a Character::. + +`int mbsinit (const mbstate_t *PS)' + `wchar.h' (ISO): *Note Keeping the state::. + +`size_t mbsnrtowcs (wchar_t *restrict DST, const char **restrict SRC, size_t NMC, size_t LEN, mbstate_t *restrict PS)' + `wchar.h' (GNU): *Note Converting Strings::. + +`size_t mbsrtowcs (wchar_t *restrict DST, const char **restrict SRC, size_t LEN, mbstate_t *restrict PS)' + `wchar.h' (ISO): *Note Converting Strings::. + +`mbstate_t' + `wchar.h' (ISO): *Note Keeping the state::. + +`size_t mbstowcs (wchar_t *WSTRING, const char *STRING, size_t SIZE)' + `stdlib.h' (ISO): *Note Non-reentrant String Conversion::. + +`int mbtowc (wchar_t *restrict RESULT, const char *restrict STRING, size_t SIZE)' + `stdlib.h' (ISO): *Note Non-reentrant Character Conversion::. + +`int mcheck (void (*ABORTFN) (enum mcheck_status STATUS))' + `mcheck.h' (GNU): *Note Heap Consistency Checking::. + +`tcflag_t MDMBUF' + `termios.h' (BSD): *Note Control Modes::. + +`void * memalign (size_t BOUNDARY, size_t SIZE)' + `malloc.h', `stdlib.h' (BSD): *Note Aligned Memory Blocks::. + +`__memalign_hook' + `malloc.h' (GNU): *Note Hooks for Malloc::. + +`void * memccpy (void *restrict TO, const void *restrict FROM, int C, size_t SIZE)' + `string.h' (SVID): *Note Copying and Concatenation::. + +`void * memchr (const void *BLOCK, int C, size_t SIZE)' + `string.h' (ISO): *Note Search Functions::. + +`int memcmp (const void *A1, const void *A2, size_t SIZE)' + `string.h' (ISO): *Note String/Array Comparison::. + +`void * memcpy (void *restrict TO, const void *restrict FROM, size_t SIZE)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`void * memfrob (void *MEM, size_t LENGTH)' + `string.h' (GNU): *Note Trivial Encryption::. + +`void * memmem (const void *HAYSTACK, size_t HAYSTACK-LEN, + const void *NEEDLE, size_t NEEDLE-LEN)' + `string.h' (GNU): *Note Search Functions::. + +`void * memmove (void *TO, const void *FROM, size_t SIZE)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`void * mempcpy (void *restrict TO, const void *restrict FROM, size_t SIZE)' + `string.h' (GNU): *Note Copying and Concatenation::. + +`void * memrchr (const void *BLOCK, int C, size_t SIZE)' + `string.h' (GNU): *Note Search Functions::. + +`void * memset (void *BLOCK, int C, size_t SIZE)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`int mkdir (const char *FILENAME, mode_t MODE)' + `sys/stat.h' (POSIX.1): *Note Creating Directories::. + +`char * mkdtemp (char *TEMPLATE)' + `stdlib.h' (BSD): *Note Temporary Files::. + +`int mkfifo (const char *FILENAME, mode_t MODE)' + `sys/stat.h' (POSIX.1): *Note FIFO Special Files::. + +`int mknod (const char *FILENAME, int MODE, int DEV)' + `sys/stat.h' (BSD): *Note Making Special Files::. + +`int mkstemp (char *TEMPLATE)' + `stdlib.h' (BSD): *Note Temporary Files::. + +`char * mktemp (char *TEMPLATE)' + `stdlib.h' (Unix): *Note Temporary Files::. + +`time_t mktime (struct tm *BROKENTIME)' + `time.h' (ISO): *Note Broken-down Time::. + +`int mlock (const void *ADDR, size_t LEN)' + `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. + +`int mlockall (int FLAGS)' + `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. + +`void * mmap (void *ADDRESS, size_t LENGTH,int PROTECT, int FLAGS, int FILEDES, off_t OFFSET)' + `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. + +`void * mmap64 (void *ADDRESS, size_t LENGTH,int PROTECT, int FLAGS, int FILEDES, off64_t OFFSET)' + `sys/mman.h' (LFS): *Note Memory-mapped I/O::. + +`mode_t' + `sys/types.h' (POSIX.1): *Note Attribute Meanings::. + +`double modf (double VALUE, double *INTEGER-PART)' + `math.h' (ISO): *Note Rounding Functions::. + +`float modff (float VALUE, float *INTEGER-PART)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double modfl (long double VALUE, long double *INTEGER-PART)' + `math.h' (ISO): *Note Rounding Functions::. + +`int mount (const char *SPECIAL_FILE, const char *DIR, const char *FSTYPE, unsigned long int OPTIONS, const void *DATA)' + `sys/mount.h' (SVID, BSD): *Note Mount-Unmount-Remount::. + +`long int mrand48 (void)' + `stdlib.h' (SVID): *Note SVID Random::. + +`int mrand48_r (struct drand48_data *BUFFER, double *RESULT)' + `stdlib.h' (GNU): *Note SVID Random::. + +`void * mremap (void *ADDRESS, size_t LENGTH, size_t NEW_LENGTH, int FLAG)' + `sys/mman.h' (GNU): *Note Memory-mapped I/O::. + +`int MSG_DONTROUTE' + `sys/socket.h' (BSD): *Note Socket Data Options::. + +`int MSG_OOB' + `sys/socket.h' (BSD): *Note Socket Data Options::. + +`int MSG_PEEK' + `sys/socket.h' (BSD): *Note Socket Data Options::. + +`int msync (void *ADDRESS, size_t LENGTH, int FLAGS)' + `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. + +`void mtrace (void)' + `mcheck.h' (GNU): *Note Tracing malloc::. + +`int munlock (const void *ADDR, size_t LEN)' + `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. + +`int munlockall (void)' + `sys/mman.h' (POSIX.1b): *Note Page Lock Functions::. + +`int munmap (void *ADDR, size_t LENGTH)' + `sys/mman.h' (POSIX): *Note Memory-mapped I/O::. + +`void muntrace (void)' + `mcheck.h' (GNU): *Note Tracing malloc::. + +`int NAME_MAX' + `limits.h' (POSIX.1): *Note Limits for Files::. + +`float NAN' + `math.h' (GNU): *Note Infinity and NaN::. + +`double nan (const char *TAGP)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`float nanf (const char *TAGP)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`long double nanl (const char *TAGP)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`int nanosleep (const struct timespec *REQUESTED_TIME, struct timespec *REMAINING)' + `time.h' (POSIX.1): *Note Sleeping::. + +`int NCCS' + `termios.h' (POSIX.1): *Note Mode Data Types::. + +`double nearbyint (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`float nearbyintf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double nearbyintl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`NEW_TIME' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`NEW_TIME' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`double nextafter (double X, double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`float nextafterf (float X, float Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`long double nextafterl (long double X, long double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`double nexttoward (double X, long double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`float nexttowardf (float X, long double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`long double nexttowardl (long double X, long double Y)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`int nftw (const char *FILENAME, __nftw_func_t FUNC, int DESCRIPTORS, int FLAG)' + `ftw.h' (XPG4.2): *Note Working with Directory Trees::. + +`int nftw64 (const char *FILENAME, __nftw64_func_t FUNC, int DESCRIPTORS, int FLAG)' + `ftw.h' (Unix98): *Note Working with Directory Trees::. + +`__nftw64_func_t' + `ftw.h' (GNU): *Note Working with Directory Trees::. + +`__nftw_func_t' + `ftw.h' (GNU): *Note Working with Directory Trees::. + +`char * ngettext (const char *MSGID1, const char *MSGID2, unsigned long int N)' + `libintl.h' (GNU): *Note Advanced gettext functions::. + +`int NGROUPS_MAX' + `limits.h' (POSIX.1): *Note General Limits::. + +`int nice (int INCREMENT)' + `unistd.h' (BSD): *Note Traditional Scheduling Functions::. + +`nlink_t' + `sys/types.h' (POSIX.1): *Note Attribute Meanings::. + +`char * nl_langinfo (nl_item ITEM)' + `langinfo.h' (XOPEN): *Note The Elegant and Fast Way::. + +`NO_ADDRESS' + `netdb.h' (BSD): *Note Host Names::. + +`tcflag_t NOFLSH' + `termios.h' (POSIX.1): *Note Local Modes::. + +`tcflag_t NOKERNINFO' + `termios.h' (BSD): *Note Local Modes::. + +`NO_RECOVERY' + `netdb.h' (BSD): *Note Host Names::. + +`long int nrand48 (unsigned short int XSUBI[3])' + `stdlib.h' (SVID): *Note SVID Random::. + +`int nrand48_r (unsigned short int XSUBI[3], struct drand48_data *BUFFER, long int *RESULT)' + `stdlib.h' (GNU): *Note SVID Random::. + +`int NSIG' + `signal.h' (BSD): *Note Standard Signals::. + +`uint32_t ntohl (uint32_t NETLONG)' + `netinet/in.h' (BSD): *Note Byte Order::. + +`uint16_t ntohs (uint16_t NETSHORT)' + `netinet/in.h' (BSD): *Note Byte Order::. + +`int ntp_adjtime (struct timex *TPTR)' + `sys/timex.h' (GNU): *Note High Accuracy Clock::. + +`int ntp_gettime (struct ntptimeval *TPTR)' + `sys/timex.h' (GNU): *Note High Accuracy Clock::. + +`void * NULL' + `stddef.h' (ISO): *Note Null Pointer Constant::. + +`int O_ACCMODE' + `fcntl.h' (POSIX.1): *Note Access Modes::. + +`int O_APPEND' + `fcntl.h' (POSIX.1): *Note Operating Modes::. + +`int O_ASYNC' + `fcntl.h' (BSD): *Note Operating Modes::. + +`void obstack_1grow (struct obstack *OBSTACK-PTR, char C)' + `obstack.h' (GNU): *Note Growing Objects::. + +`void obstack_1grow_fast (struct obstack *OBSTACK-PTR, char C)' + `obstack.h' (GNU): *Note Extra Fast Growing::. + +`int obstack_alignment_mask (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Obstacks Data Alignment::. + +`void * obstack_alloc (struct obstack *OBSTACK-PTR, int SIZE)' + `obstack.h' (GNU): *Note Allocation in an Obstack::. + +`obstack_alloc_failed_handler' + `obstack.h' (GNU): *Note Preparing for Obstacks::. + +`void * obstack_base (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Status of an Obstack::. + +`void obstack_blank (struct obstack *OBSTACK-PTR, int SIZE)' + `obstack.h' (GNU): *Note Growing Objects::. + +`void obstack_blank_fast (struct obstack *OBSTACK-PTR, int SIZE)' + `obstack.h' (GNU): *Note Extra Fast Growing::. + +`int obstack_chunk_size (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Obstack Chunks::. + +`void * obstack_copy (struct obstack *OBSTACK-PTR, void *ADDRESS, int SIZE)' + `obstack.h' (GNU): *Note Allocation in an Obstack::. + +`void * obstack_copy0 (struct obstack *OBSTACK-PTR, void *ADDRESS, int SIZE)' + `obstack.h' (GNU): *Note Allocation in an Obstack::. + +`void * obstack_finish (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Growing Objects::. + +`void obstack_free (struct obstack *OBSTACK-PTR, void *OBJECT)' + `obstack.h' (GNU): *Note Freeing Obstack Objects::. + +`void obstack_grow (struct obstack *OBSTACK-PTR, void *DATA, int SIZE)' + `obstack.h' (GNU): *Note Growing Objects::. + +`void obstack_grow0 (struct obstack *OBSTACK-PTR, void *DATA, int SIZE)' + `obstack.h' (GNU): *Note Growing Objects::. + +`int obstack_init (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Preparing for Obstacks::. + +`void obstack_int_grow (struct obstack *OBSTACK-PTR, int DATA)' + `obstack.h' (GNU): *Note Growing Objects::. + +`void obstack_int_grow_fast (struct obstack *OBSTACK-PTR, int DATA)' + `obstack.h' (GNU): *Note Extra Fast Growing::. + +`void * obstack_next_free (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Status of an Obstack::. + +`int obstack_object_size (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Growing Objects::. + +`int obstack_object_size (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Status of an Obstack::. + +`int obstack_printf (struct obstack *OBSTACK, const char *TEMPLATE, ...)' + `stdio.h' (GNU): *Note Dynamic Output::. + +`void obstack_ptr_grow (struct obstack *OBSTACK-PTR, void *DATA)' + `obstack.h' (GNU): *Note Growing Objects::. + +`void obstack_ptr_grow_fast (struct obstack *OBSTACK-PTR, void *DATA)' + `obstack.h' (GNU): *Note Extra Fast Growing::. + +`int obstack_room (struct obstack *OBSTACK-PTR)' + `obstack.h' (GNU): *Note Extra Fast Growing::. + +`int obstack_vprintf (struct obstack *OBSTACK, const char *TEMPLATE, va_list AP)' + `stdio.h' (GNU): *Note Variable Arguments Output::. + +`int O_CREAT' + `fcntl.h' (POSIX.1): *Note Open-time Flags::. + +`int O_EXCL' + `fcntl.h' (POSIX.1): *Note Open-time Flags::. + +`int O_EXEC' + `fcntl.h' (GNU): *Note Access Modes::. + +`int O_EXLOCK' + `fcntl.h' (BSD): *Note Open-time Flags::. + +`off64_t' + `sys/types.h' (Unix98): *Note File Position Primitive::. + +`size_t offsetof (TYPE, MEMBER)' + `stddef.h' (ISO): *Note Structure Measurement::. + +`off_t' + `sys/types.h' (POSIX.1): *Note File Position Primitive::. + +`int O_FSYNC' + `fcntl.h' (BSD): *Note Operating Modes::. + +`int O_IGNORE_CTTY' + `fcntl.h' (GNU): *Note Open-time Flags::. + +`OLD_TIME' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`OLD_TIME' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int O_NDELAY' + `fcntl.h' (BSD): *Note Operating Modes::. + +`int on_exit (void (*FUNCTION)(int STATUS, void *ARG), void *ARG)' + `stdlib.h' (SunOS): *Note Cleanups on Exit::. + +`tcflag_t ONLCR' + `termios.h' (BSD): *Note Output Modes::. + +`int O_NOATIME' + `fcntl.h' (GNU): *Note Operating Modes::. + +`int O_NOCTTY' + `fcntl.h' (POSIX.1): *Note Open-time Flags::. + +`tcflag_t ONOEOT' + `termios.h' (BSD): *Note Output Modes::. + +`int O_NOLINK' + `fcntl.h' (GNU): *Note Open-time Flags::. + +`int O_NONBLOCK' + `fcntl.h' (POSIX.1): *Note Open-time Flags::. + +`int O_NONBLOCK' + `fcntl.h' (POSIX.1): *Note Operating Modes::. + +`int O_NOTRANS' + `fcntl.h' (GNU): *Note Open-time Flags::. + +`int open (const char *FILENAME, int FLAGS[, mode_t MODE])' + `fcntl.h' (POSIX.1): *Note Opening and Closing Files::. + +`int open64 (const char *FILENAME, int FLAGS[, mode_t MODE])' + `fcntl.h' (Unix98): *Note Opening and Closing Files::. + +`DIR * opendir (const char *DIRNAME)' + `dirent.h' (POSIX.1): *Note Opening a Directory::. + +`void openlog (char *IDENT, int OPTION,' + `syslog.h' (BSD): *Note openlog::. + +`int OPEN_MAX' + `limits.h' (POSIX.1): *Note General Limits::. + +`FILE * open_memstream (char **PTR, size_t *SIZELOC)' + `stdio.h' (GNU): *Note String Streams::. + +`FILE * open_obstack_stream (struct obstack *OBSTACK)' + `stdio.h' (GNU): *Note Obstack Streams::. + +`int openpty (int *AMASTER, int *ASLAVE, char *NAME, struct termios *TERMP, struct winsize *WINP)' + `pty.h' (BSD): *Note Pseudo-Terminal Pairs::. + +`tcflag_t OPOST' + `termios.h' (POSIX.1): *Note Output Modes::. + +`char * optarg' + `unistd.h' (POSIX.2): *Note Using Getopt::. + +`int opterr' + `unistd.h' (POSIX.2): *Note Using Getopt::. + +`int optind' + `unistd.h' (POSIX.2): *Note Using Getopt::. + +`OPTION_ALIAS' + `argp.h' (GNU): *Note Argp Option Flags::. + +`OPTION_ARG_OPTIONAL' + `argp.h' (GNU): *Note Argp Option Flags::. + +`OPTION_DOC' + `argp.h' (GNU): *Note Argp Option Flags::. + +`OPTION_HIDDEN' + `argp.h' (GNU): *Note Argp Option Flags::. + +`OPTION_NO_USAGE' + `argp.h' (GNU): *Note Argp Option Flags::. + +`int optopt' + `unistd.h' (POSIX.2): *Note Using Getopt::. + +`int O_RDONLY' + `fcntl.h' (POSIX.1): *Note Access Modes::. + +`int O_RDWR' + `fcntl.h' (POSIX.1): *Note Access Modes::. + +`int O_READ' + `fcntl.h' (GNU): *Note Access Modes::. + +`int O_SHLOCK' + `fcntl.h' (BSD): *Note Open-time Flags::. + +`int O_SYNC' + `fcntl.h' (BSD): *Note Operating Modes::. + +`int O_TRUNC' + `fcntl.h' (POSIX.1): *Note Open-time Flags::. + +`int O_WRITE' + `fcntl.h' (GNU): *Note Access Modes::. + +`int O_WRONLY' + `fcntl.h' (POSIX.1): *Note Access Modes::. + +`tcflag_t OXTABS' + `termios.h' (BSD): *Note Output Modes::. + +`PA_CHAR' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_DOUBLE' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_FLAG_LONG' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_FLAG_LONG_DOUBLE' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_FLAG_LONG_LONG' + `printf.h' (GNU): *Note Parsing a Template String::. + +`int PA_FLAG_MASK' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_FLAG_PTR' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_FLAG_SHORT' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_FLOAT' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_INT' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_LAST' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_POINTER' + `printf.h' (GNU): *Note Parsing a Template String::. + +`tcflag_t PARENB' + `termios.h' (POSIX.1): *Note Control Modes::. + +`tcflag_t PARMRK' + `termios.h' (POSIX.1): *Note Input Modes::. + +`tcflag_t PARODD' + `termios.h' (POSIX.1): *Note Control Modes::. + +`size_t parse_printf_format (const char *TEMPLATE, size_t N, int *ARGTYPES)' + `printf.h' (GNU): *Note Parsing a Template String::. + +`PA_STRING' + `printf.h' (GNU): *Note Parsing a Template String::. + +`long int pathconf (const char *FILENAME, int PARAMETER)' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`int PATH_MAX' + `limits.h' (POSIX.1): *Note Limits for Files::. + +`int pause ()' + `unistd.h' (POSIX.1): *Note Using Pause::. + +`_PC_ASYNC_IO' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_CHOWN_RESTRICTED' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_FILESIZEBITS' + `unistd.h' (LFS): *Note Pathconf::. + +`_PC_LINK_MAX' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`int pclose (FILE *STREAM)' + `stdio.h' (POSIX.2, SVID, BSD): *Note Pipe to a Subprocess::. + +`_PC_MAX_CANON' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_MAX_INPUT' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_NAME_MAX' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_NO_TRUNC' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_PATH_MAX' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_PIPE_BUF' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_PRIO_IO' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_REC_INCR_XFER_SIZE' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_REC_MAX_XFER_SIZE' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_REC_MIN_XFER_SIZE' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_REC_XFER_ALIGN' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_SOCK_MAXBUF' + `unistd.h' (POSIX.1g): *Note Pathconf::. + +`_PC_SYNC_IO' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`_PC_VDISABLE' + `unistd.h' (POSIX.1): *Note Pathconf::. + +`tcflag_t PENDIN' + `termios.h' (BSD): *Note Local Modes::. + +`void perror (const char *MESSAGE)' + `stdio.h' (ISO): *Note Error Messages::. + +`int PF_FILE' + `sys/socket.h' (GNU): *Note Local Namespace Details::. + +`int PF_INET' + `sys/socket.h' (BSD): *Note Internet Namespace::. + +`int PF_INET6' + `sys/socket.h' (X/Open): *Note Internet Namespace::. + +`int PF_LOCAL' + `sys/socket.h' (POSIX): *Note Local Namespace Details::. + +`int PF_UNIX' + `sys/socket.h' (BSD): *Note Local Namespace Details::. + +`pid_t' + `sys/types.h' (POSIX.1): *Note Process Identification::. + +`int pipe (int FILEDES[2])' + `unistd.h' (POSIX.1): *Note Creating a Pipe::. + +`int PIPE_BUF' + `limits.h' (POSIX.1): *Note Limits for Files::. + +`FILE * popen (const char *COMMAND, const char *MODE)' + `stdio.h' (POSIX.2, SVID, BSD): *Note Pipe to a Subprocess::. + +`_POSIX2_BC_BASE_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`_POSIX2_BC_DIM_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`_POSIX2_BC_SCALE_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`_POSIX2_BC_STRING_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`int _POSIX2_C_DEV' + `unistd.h' (POSIX.2): *Note System Options::. + +`_POSIX2_COLL_WEIGHTS_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`long int _POSIX2_C_VERSION' + `unistd.h' (POSIX.2): *Note Version Supported::. + +`_POSIX2_EQUIV_CLASS_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`_POSIX2_EXPR_NEST_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`int _POSIX2_FORT_DEV' + `unistd.h' (POSIX.2): *Note System Options::. + +`int _POSIX2_FORT_RUN' + `unistd.h' (POSIX.2): *Note System Options::. + +`_POSIX2_LINE_MAX' + `limits.h' (POSIX.2): *Note Utility Minimums::. + +`int _POSIX2_LOCALEDEF' + `unistd.h' (POSIX.2): *Note System Options::. + +`_POSIX2_RE_DUP_MAX' + `limits.h' (POSIX.2): *Note Minimums::. + +`int _POSIX2_SW_DEV' + `unistd.h' (POSIX.2): *Note System Options::. + +`_POSIX_AIO_LISTIO_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`_POSIX_AIO_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`_POSIX_ARG_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`_POSIX_CHILD_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`int _POSIX_CHOWN_RESTRICTED' + `unistd.h' (POSIX.1): *Note Options for Files::. + +`_POSIX_C_SOURCE' + (POSIX.2): *Note Feature Test Macros::. + +`int _POSIX_JOB_CONTROL' + `unistd.h' (POSIX.1): *Note System Options::. + +`_POSIX_LINK_MAX' + `limits.h' (POSIX.1): *Note File Minimums::. + +`_POSIX_MAX_CANON' + `limits.h' (POSIX.1): *Note File Minimums::. + +`_POSIX_MAX_INPUT' + `limits.h' (POSIX.1): *Note File Minimums::. + +`int posix_memalign (void **MEMPTR, size_t ALIGNMENT, size_t SIZE)' + `stdlib.h' (POSIX): *Note Aligned Memory Blocks::. + +`_POSIX_NAME_MAX' + `limits.h' (POSIX.1): *Note File Minimums::. + +`_POSIX_NGROUPS_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`int _POSIX_NO_TRUNC' + `unistd.h' (POSIX.1): *Note Options for Files::. + +`_POSIX_OPEN_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`_POSIX_PATH_MAX' + `limits.h' (POSIX.1): *Note File Minimums::. + +`_POSIX_PIPE_BUF' + `limits.h' (POSIX.1): *Note File Minimums::. + +`POSIX_REC_INCR_XFER_SIZE' + `limits.h' (POSIX.1): *Note File Minimums::. + +`POSIX_REC_MAX_XFER_SIZE' + `limits.h' (POSIX.1): *Note File Minimums::. + +`POSIX_REC_MIN_XFER_SIZE' + `limits.h' (POSIX.1): *Note File Minimums::. + +`POSIX_REC_XFER_ALIGN' + `limits.h' (POSIX.1): *Note File Minimums::. + +`int _POSIX_SAVED_IDS' + `unistd.h' (POSIX.1): *Note System Options::. + +`_POSIX_SOURCE' + (POSIX.1): *Note Feature Test Macros::. + +`_POSIX_SSIZE_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`_POSIX_STREAM_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`_POSIX_TZNAME_MAX' + `limits.h' (POSIX.1): *Note Minimums::. + +`unsigned char _POSIX_VDISABLE' + `unistd.h' (POSIX.1): *Note Options for Files::. + +`long int _POSIX_VERSION' + `unistd.h' (POSIX.1): *Note Version Supported::. + +`double pow (double BASE, double POWER)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`double pow10 (double X)' + `math.h' (GNU): *Note Exponents and Logarithms::. + +`float pow10f (float X)' + `math.h' (GNU): *Note Exponents and Logarithms::. + +`long double pow10l (long double X)' + `math.h' (GNU): *Note Exponents and Logarithms::. + +`float powf (float BASE, float POWER)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double powl (long double BASE, long double POWER)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`ssize_t pread (int FILEDES, void *BUFFER, size_t SIZE, off_t OFFSET)' + `unistd.h' (Unix98): *Note I/O Primitives::. + +`ssize_t pread64 (int FILEDES, void *BUFFER, size_t SIZE, off64_t OFFSET)' + `unistd.h' (Unix98): *Note I/O Primitives::. + +`int printf (const char *TEMPLATE, ...)' + `stdio.h' (ISO): *Note Formatted Output Functions::. + +`printf_arginfo_function' + `printf.h' (GNU): *Note Defining the Output Handler::. + +`printf_function' + `printf.h' (GNU): *Note Defining the Output Handler::. + +`int printf_size (FILE *FP, const struct printf_info *INFO, const void *const *ARGS)' + `printf.h' (GNU): *Note Predefined Printf Handlers::. + +`int printf_size_info (const struct printf_info *INFO, size_t N, int *ARGTYPES)' + `printf.h' (GNU): *Note Predefined Printf Handlers::. + +`PRIO_MAX' + `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. + +`PRIO_MIN' + `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. + +`PRIO_PGRP' + `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. + +`PRIO_PROCESS' + `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. + +`PRIO_USER' + `sys/resource.h' (BSD): *Note Traditional Scheduling Functions::. + +`char * program_invocation_name' + `errno.h' (GNU): *Note Error Messages::. + +`char * program_invocation_short_name' + `errno.h' (GNU): *Note Error Messages::. + +`void psignal (int SIGNUM, const char *MESSAGE)' + `signal.h' (BSD): *Note Signal Messages::. + +`int pthread_atfork (void (*PREPARE)(void), void (*PARENT)(void), void (*CHILD)(void))' + `pthread.h' (POSIX): *Note Threads and Fork::. + +`int pthread_attr_destroy (pthread_attr_t *ATTR)' + `pthread.h' (POSIX): *Note Thread Attributes::. + +`int pthread_attr_getattr (const pthread_attr_t *OBJ, int *VALUE)' + `pthread.h' (POSIX): *Note Thread Attributes::. + +`int pthread_attr_init (pthread_attr_t *ATTR)' + `pthread.h' (POSIX): *Note Thread Attributes::. + +`int pthread_attr_setattr (pthread_attr_t *OBJ, int VALUE)' + `pthread.h' (POSIX): *Note Thread Attributes::. + +`int pthread_cancel (pthread_t THREAD)' + `pthread.h' (POSIX): *Note Basic Thread Operations::. + +`void pthread_cleanup_pop (int EXECUTE)' + `pthread.h' (POSIX): *Note Cleanup Handlers::. + +`void pthread_cleanup_pop_restore_np (int EXECUTE)' + `pthread.h' (GNU): *Note Cleanup Handlers::. + +`void pthread_cleanup_push (void (*ROUTINE) (void *), void *ARG)' + `pthread.h' (POSIX): *Note Cleanup Handlers::. + +`void pthread_cleanup_push_defer_np (void (*ROUTINE) (void *), void *ARG)' + `pthread.h' (GNU): *Note Cleanup Handlers::. + +`int pthread_condattr_init (pthread_condattr_t *ATTR)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_cond_broadcast (pthread_cond_t *COND)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_cond_destroy (pthread_cond_t *COND)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_cond_init (pthread_cond_t *COND, pthread_condattr_t *cond_ATTR)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_cond_signal (pthread_cond_t *COND)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_cond_timedwait (pthread_cond_t *COND, pthread_mutex_t *MUTEX, const struct timespec *ABSTIME)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_cond_wait (pthread_cond_t *COND, pthread_mutex_t *MUTEX)' + `pthread.h' (POSIX): *Note Condition Variables::. + +`int pthread_create (pthread_t * THREAD, pthread_attr_t * ATTR, void * (*START_ROUTINE)(void *), void * ARG)' + `pthread.h' (POSIX): *Note Basic Thread Operations::. + +`int pthread_detach (pthread_t TH)' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`int pthread_equal (pthread_t thread1, pthread_t thread2)' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`void pthread_exit (void *RETVAL)' + `pthread.h' (POSIX): *Note Basic Thread Operations::. + +`int pthread_getconcurrency ()' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`int pthread_getschedparam (pthread_t target_THREAD, int *POLICY, struct sched_param *PARAM)' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`void * pthread_getspecific (pthread_key_t KEY)' + `pthread.h' (POSIX): *Note Thread-Specific Data::. + +`int pthread_join (pthread_t TH, void **thread_RETURN)' + `pthread.h' (POSIX): *Note Basic Thread Operations::. + +`int pthread_key_create (pthread_key_t *KEY, void (*destr_function) (void *))' + `pthread.h' (POSIX): *Note Thread-Specific Data::. + +`int pthread_key_delete (pthread_key_t KEY)' + `pthread.h' (POSIX): *Note Thread-Specific Data::. + +`int pthread_kill (pthread_t THREAD, int SIGNO)' + `pthread.h' (POSIX): *Note Threads and Signal Handling::. + +`void pthread_kill_other_threads_np (VOID)' + `pthread.h' (GNU): *Note Miscellaneous Thread Functions::. + +`int pthread_mutexattr_destroy (pthread_mutexattr_t *ATTR)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutexattr_gettype (const pthread_mutexattr_t *ATTR, int *TYPE)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutexattr_init (pthread_mutexattr_t *ATTR)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutexattr_settype (pthread_mutexattr_t *ATTR, int TYPE)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutex_destroy (pthread_mutex_t *MUTEX)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutex_init (pthread_mutex_t *MUTEX, const pthread_mutexattr_t *MUTEXATTR)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutex_lock (pthread_mutex_t *mutex))' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutex_timedlock (pthread_mutex_t *MUTEX, const struct timespec *ABSTIME)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutex_trylock (pthread_mutex_t *MUTEX)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_mutex_unlock (pthread_mutex_t *MUTEX)' + `pthread.h' (POSIX): *Note Mutexes::. + +`int pthread_once (pthread_once_t *once_CONTROL, void (*INIT_ROUTINE) (void))' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`pthread_t pthread_self (VOID)' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`int pthread_setcancelstate (int STATE, int *OLDSTATE)' + `pthread.h' (POSIX): *Note Cancellation::. + +`int pthread_setcanceltype (int TYPE, int *OLDTYPE)' + `pthread.h' (POSIX): *Note Cancellation::. + +`int pthread_setconcurrency (int LEVEL)' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`int pthread_setschedparam (pthread_t target_THREAD, int POLICY, const struct sched_param *PARAM)' + `pthread.h' (POSIX): *Note Miscellaneous Thread Functions::. + +`int pthread_setspecific (pthread_key_t KEY, const void *POINTER)' + `pthread.h' (POSIX): *Note Thread-Specific Data::. + +`int pthread_sigmask (int HOW, const sigset_t *NEWMASK, sigset_t *OLDMASK)' + `pthread.h' (POSIX): *Note Threads and Signal Handling::. + +`void pthread_testcancel (VOID)' + `pthread.h' (POSIX): *Note Cancellation::. + +`char * P_tmpdir' + `stdio.h' (SVID): *Note Temporary Files::. + +`ptrdiff_t' + `stddef.h' (ISO): *Note Important Data Types::. + +`char * ptsname (int FILEDES)' + `stdlib.h' (SVID, XPG4.2): *Note Allocation::. + +`int ptsname_r (int FILEDES, char *BUF, size_t LEN)' + `stdlib.h' (GNU): *Note Allocation::. + +`int putc (int C, FILE *STREAM)' + `stdio.h' (ISO): *Note Simple Output::. + +`int putchar (int C)' + `stdio.h' (ISO): *Note Simple Output::. + +`int putchar_unlocked (int C)' + `stdio.h' (POSIX): *Note Simple Output::. + +`int putc_unlocked (int C, FILE *STREAM)' + `stdio.h' (POSIX): *Note Simple Output::. + +`int putenv (char *STRING)' + `stdlib.h' (SVID): *Note Environment Access::. + +`int putpwent (const struct passwd *P, FILE *STREAM)' + `pwd.h' (SVID): *Note Writing a User Entry::. + +`int puts (const char *S)' + `stdio.h' (ISO): *Note Simple Output::. + +`struct utmp * pututline (const struct utmp *UTMP)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`struct utmpx * pututxline (const struct utmpx *UTMP)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int putw (int W, FILE *STREAM)' + `stdio.h' (SVID): *Note Simple Output::. + +`wint_t putwc (wchar_t WC, FILE *STREAM)' + `wchar.h' (ISO): *Note Simple Output::. + +`wint_t putwchar (wchar_t WC)' + `wchar.h' (ISO): *Note Simple Output::. + +`wint_t putwchar_unlocked (wchar_t WC)' + `wchar.h' (GNU): *Note Simple Output::. + +`wint_t putwc_unlocked (wchar_t WC, FILE *STREAM)' + `wchar.h' (GNU): *Note Simple Output::. + +`ssize_t pwrite (int FILEDES, const void *BUFFER, size_t SIZE, off_t OFFSET)' + `unistd.h' (Unix98): *Note I/O Primitives::. + +`ssize_t pwrite64 (int FILEDES, const void *BUFFER, size_t SIZE, off64_t OFFSET)' + `unistd.h' (Unix98): *Note I/O Primitives::. + +`char * qecvt (long double VALUE, int NDIGIT, int *DECPT, int *NEG)' + `stdlib.h' (GNU): *Note System V Number Conversion::. + +`char * qecvt_r (long double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' + `stdlib.h' (GNU): *Note System V Number Conversion::. + +`char * qfcvt (long double VALUE, int NDIGIT, int *DECPT, int *NEG)' + `stdlib.h' (GNU): *Note System V Number Conversion::. + +`char * qfcvt_r (long double VALUE, int NDIGIT, int *DECPT, int *NEG, char *BUF, size_t LEN)' + `stdlib.h' (GNU): *Note System V Number Conversion::. + +`char * qgcvt (long double VALUE, int NDIGIT, char *BUF)' + `stdlib.h' (GNU): *Note System V Number Conversion::. + +`void qsort (void *ARRAY, size_t COUNT, size_t SIZE, comparison_fn_t COMPARE)' + `stdlib.h' (ISO): *Note Array Sort Function::. + +`int raise (int SIGNUM)' + `signal.h' (ISO): *Note Signaling Yourself::. + +`int rand (void)' + `stdlib.h' (ISO): *Note ISO Random::. + +`int RAND_MAX' + `stdlib.h' (ISO): *Note ISO Random::. + +`long int random (void)' + `stdlib.h' (BSD): *Note BSD Random::. + +`int random_r (struct random_data *restrict BUF, int32_t *restrict RESULT)' + `stdlib.h' (GNU): *Note BSD Random::. + +`int rand_r (unsigned int *SEED)' + `stdlib.h' (POSIX.1): *Note ISO Random::. + +`void * rawmemchr (const void *BLOCK, int C)' + `string.h' (GNU): *Note Search Functions::. + +`ssize_t read (int FILEDES, void *BUFFER, size_t SIZE)' + `unistd.h' (POSIX.1): *Note I/O Primitives::. + +`struct dirent * readdir (DIR *DIRSTREAM)' + `dirent.h' (POSIX.1): *Note Reading/Closing Directory::. + +`struct dirent64 * readdir64 (DIR *DIRSTREAM)' + `dirent.h' (LFS): *Note Reading/Closing Directory::. + +`int readdir64_r (DIR *DIRSTREAM, struct dirent64 *ENTRY, struct dirent64 **RESULT)' + `dirent.h' (LFS): *Note Reading/Closing Directory::. + +`int readdir_r (DIR *DIRSTREAM, struct dirent *ENTRY, struct dirent **RESULT)' + `dirent.h' (GNU): *Note Reading/Closing Directory::. + +`int readlink (const char *FILENAME, char *BUFFER, size_t SIZE)' + `unistd.h' (BSD): *Note Symbolic Links::. + +`ssize_t readv (int FILEDES, const struct iovec *VECTOR, int COUNT)' + `sys/uio.h' (BSD): *Note Scatter-Gather::. + +`void * realloc (void *PTR, size_t NEWSIZE)' + `malloc.h', `stdlib.h' (ISO): *Note Changing Block Size::. + +`__realloc_hook' + `malloc.h' (GNU): *Note Hooks for Malloc::. + +`char * realpath (const char *restrict NAME, char *restrict RESOLVED)' + `stdlib.h' (XPG): *Note Symbolic Links::. + +`int recv (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS)' + `sys/socket.h' (BSD): *Note Receiving Data::. + +`int recvfrom (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS, struct sockaddr *ADDR, socklen_t *LENGTH-PTR)' + `sys/socket.h' (BSD): *Note Receiving Datagrams::. + +`int recvmsg (int SOCKET, struct msghdr *MESSAGE, int FLAGS)' + `sys/socket.h' (BSD): *Note Receiving Datagrams::. + +`int RE_DUP_MAX' + `limits.h' (POSIX.2): *Note General Limits::. + +`_REENTRANT' + (GNU): *Note Feature Test Macros::. + +`REG_BADBR' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_BADPAT' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_BADRPT' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`int regcomp (regex_t *COMPILED, const char *PATTERN, int CFLAGS)' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_EBRACE' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_EBRACK' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_ECOLLATE' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_ECTYPE' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_EESCAPE' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_EPAREN' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_ERANGE' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`size_t regerror (int ERRCODE, regex_t *COMPILED, char *BUFFER, size_t LENGTH)' + `regex.h' (POSIX.2): *Note Regexp Cleanup::. + +`REG_ESPACE' + `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. + +`REG_ESPACE' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_ESUBREG' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`int regexec (regex_t *COMPILED, char *STRING, size_t NMATCH, regmatch_t MATCHPTR [], int EFLAGS)' + `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. + +`regex_t' + `regex.h' (POSIX.2): *Note POSIX Regexp Compilation::. + +`REG_EXTENDED' + `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. + +`void regfree (regex_t *COMPILED)' + `regex.h' (POSIX.2): *Note Regexp Cleanup::. + +`REG_ICASE' + `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. + +`int register_printf_function (int SPEC, printf_function HANDLER-FUNCTION, printf_arginfo_function ARGINFO-FUNCTION)' + `printf.h' (GNU): *Note Registering New Conversions::. + +`regmatch_t' + `regex.h' (POSIX.2): *Note Regexp Subexpressions::. + +`REG_NEWLINE' + `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. + +`REG_NOMATCH' + `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. + +`REG_NOSUB' + `regex.h' (POSIX.2): *Note Flags for POSIX Regexps::. + +`REG_NOTBOL' + `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. + +`REG_NOTEOL' + `regex.h' (POSIX.2): *Note Matching POSIX Regexps::. + +`regoff_t' + `regex.h' (POSIX.2): *Note Regexp Subexpressions::. + +`double remainder (double NUMERATOR, double DENOMINATOR)' + `math.h' (BSD): *Note Remainder Functions::. + +`float remainderf (float NUMERATOR, float DENOMINATOR)' + `math.h' (BSD): *Note Remainder Functions::. + +`long double remainderl (long double NUMERATOR, long double DENOMINATOR)' + `math.h' (BSD): *Note Remainder Functions::. + +`int remove (const char *FILENAME)' + `stdio.h' (ISO): *Note Deleting Files::. + +`int rename (const char *OLDNAME, const char *NEWNAME)' + `stdio.h' (ISO): *Note Renaming Files::. + +`void rewind (FILE *STREAM)' + `stdio.h' (ISO): *Note File Positioning::. + +`void rewinddir (DIR *DIRSTREAM)' + `dirent.h' (POSIX.1): *Note Random Access Directory::. + +`char * rindex (const char *STRING, int C)' + `string.h' (BSD): *Note Search Functions::. + +`double rint (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`float rintf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double rintl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`int RLIM_INFINITY' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_AS' + `sys/resource.h' (Unix98): *Note Limits on Resources::. + +`RLIMIT_CORE' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_CPU' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_DATA' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_FSIZE' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_MEMLOCK' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_NOFILE' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_NPROC' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_RSS' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIMIT_STACK' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`RLIM_NLIMITS' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`int rmdir (const char *FILENAME)' + `unistd.h' (POSIX.1): *Note Deleting Files::. + +`int R_OK' + `unistd.h' (POSIX.1): *Note Testing File Access::. + +`double round (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`float roundf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double roundl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`int rpmatch (const char *RESPONSE)' + `stdlib.h' (stdlib.h): *Note Yes-or-No Questions::. + +`RUN_LVL' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`RUN_LVL' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`RUSAGE_CHILDREN' + `sys/resource.h' (BSD): *Note Resource Usage::. + +`RUSAGE_SELF' + `sys/resource.h' (BSD): *Note Resource Usage::. + +`int SA_NOCLDSTOP' + `signal.h' (POSIX.1): *Note Flags for Sigaction::. + +`int SA_ONSTACK' + `signal.h' (BSD): *Note Flags for Sigaction::. + +`int SA_RESTART' + `signal.h' (BSD): *Note Flags for Sigaction::. + +`int sbrk (ptrdiff_t DELTA)' + `unistd.h' (BSD): *Note Resizing the Data Segment::. + +`_SC_2_C_DEV' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_2_FORT_DEV' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_2_FORT_RUN' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_2_LOCALEDEF' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_2_SW_DEV' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_2_VERSION' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_AIO_LISTIO_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_AIO_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_AIO_PRIO_DELTA_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`double scalb (double VALUE, int EXPONENT)' + `math.h' (BSD): *Note Normalization Functions::. + +`float scalbf (float VALUE, int EXPONENT)' + `math.h' (BSD): *Note Normalization Functions::. + +`long double scalbl (long double VALUE, int EXPONENT)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int scalbln (double X, long int n)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int scalblnf (float X, long int n)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int scalblnl (long double X, long int n)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int scalbn (double X, int n)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int scalbnf (float X, int n)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int scalbnl (long double X, int n)' + `math.h' (BSD): *Note Normalization Functions::. + +`int scandir (const char *DIR, struct dirent ***NAMELIST, int (*SELECTOR) (const struct dirent *), int (*CMP) (const void *, const void *))' + `dirent.h' (BSD/SVID): *Note Scanning Directory Content::. + +`int scandir64 (const char *DIR, struct dirent64 ***NAMELIST, int (*SELECTOR) (const struct dirent64 *), int (*CMP) (const void *, const void *))' + `dirent.h' (GNU): *Note Scanning Directory Content::. + +`int scanf (const char *TEMPLATE, ...)' + `stdio.h' (ISO): *Note Formatted Input Functions::. + +`_SC_ARG_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_ASYNCHRONOUS_IO' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_ATEXIT_MAX' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_AVPHYS_PAGES' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_BC_BASE_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_BC_DIM_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_BC_SCALE_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_BC_STRING_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_CHAR_BIT' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_CHARCLASS_NAME_MAX' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_CHAR_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_CHAR_MIN' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_CHILD_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_CLK_TCK' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_COLL_WEIGHTS_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_DELAYTIMER_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_EQUIV_CLASS_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_EXPR_NEST_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_FSYNC' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_GETGR_R_SIZE_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_GETPW_R_SIZE_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`SCHAR_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`SCHAR_MIN' + `limits.h' (ISO): *Note Range of Type::. + +`int sched_getparam (pid_t PID, const struct sched_param *PARAM)' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_get_priority_max (int *POLICY);' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_get_priority_min (int *POLICY);' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_getscheduler (pid_t PID)' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_rr_get_interval (pid_t PID, struct timespec *INTERVAL)' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_setparam (pid_t PID, const struct sched_param *PARAM)' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_setscheduler (pid_t PID, int POLICY, const struct sched_param *PARAM)' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`int sched_yield (void)' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`_SC_INT_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_INT_MIN' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_JOB_CONTROL' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_LINE_MAX' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_LOGIN_NAME_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_LONG_BIT' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_MAPPED_FILES' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_MB_LEN_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_MEMLOCK' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_MEMLOCK_RANGE' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_MEMORY_PROTECTION' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_MESSAGE_PASSING' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_MQ_OPEN_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_MQ_PRIO_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_NGROUPS_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_NL_ARGMAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_NL_LANGMAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_NL_MSGMAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_NL_NMAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_NL_SETMAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_NL_TEXTMAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_NPROCESSORS_CONF' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_NPROCESSORS_ONLN' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_NZERO' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_OPEN_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_PAGESIZE' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_PHYS_PAGES' + `unistd.h' (GNU): *Note Constants for Sysconf::. + +`_SC_PII' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_INTERNET' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_INTERNET_DGRAM' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_INTERNET_STREAM' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_OSI' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_OSI_CLTS' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_OSI_COTS' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_OSI_M' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_SOCKET' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PII_XTI' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_PRIORITIZED_IO' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_PRIORITY_SCHEDULING' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_REALTIME_SIGNALS' + `unistdh.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_RTSIG_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SAVED_IDS' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SCHAR_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_SCHAR_MIN' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_SELECT' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_SEMAPHORES' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SEM_NSEMS_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SEM_VALUE_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SHARED_MEMORY_OBJECTS' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SHRT_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_SHRT_MIN' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_SIGQUEUE_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`SC_SSIZE_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_STREAM_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_SYNCHRONIZED_IO' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_ATTR_STACKADDR' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_ATTR_STACKSIZE' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_DESTRUCTOR_ITERATIONS' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_KEYS_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_PRIO_INHERIT' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_PRIO_PROTECT' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_PRIORITY_SCHEDULING' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_PROCESS_SHARED' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREADS' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_SAFE_FUNCTIONS' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_STACK_MIN' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_THREAD_THREADS_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_TIMER_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_TIMERS' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_T_IOV_MAX' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_TTY_NAME_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_TZNAME_MAX' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_UCHAR_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_UINT_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_UIO_MAXIOV' + `unistd.h' (POSIX.1g): *Note Constants for Sysconf::. + +`_SC_ULONG_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_USHRT_MAX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_VERSION' + `unistd.h' (POSIX.1): *Note Constants for Sysconf::. + +`_SC_VERSION' + `unistd.h' (POSIX.2): *Note Constants for Sysconf::. + +`_SC_WORD_BIT' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_CRYPT' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_ENH_I18N' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_LEGACY' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_REALTIME' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_REALTIME_THREADS' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_SHM' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_UNIX' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_VERSION' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_XCU_VERSION' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_XPG2' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_XPG3' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`_SC_XOPEN_XPG4' + `unistd.h' (X/Open): *Note Constants for Sysconf::. + +`unsigned short int * seed48 (unsigned short int SEED16V[3])' + `stdlib.h' (SVID): *Note SVID Random::. + +`int seed48_r (unsigned short int SEED16V[3], struct drand48_data *BUFFER)' + `stdlib.h' (GNU): *Note SVID Random::. + +`int SEEK_CUR' + `stdio.h' (ISO): *Note File Positioning::. + +`void seekdir (DIR *DIRSTREAM, off_t POS)' + `dirent.h' (BSD): *Note Random Access Directory::. + +`int SEEK_END' + `stdio.h' (ISO): *Note File Positioning::. + +`int SEEK_SET' + `stdio.h' (ISO): *Note File Positioning::. + +`int select (int NFDS, fd_set *READ-FDS, fd_set *WRITE-FDS, fd_set *EXCEPT-FDS, struct timeval *TIMEOUT)' + `sys/types.h' (BSD): *Note Waiting for I/O::. + +`int sem_destroy (sem_t * SEM)' + `semaphore.h' (POSIX): *Note POSIX Semaphores::. + +`int sem_getvalue (sem_t * SEM, int * SVAL)' + `semaphore.h' (POSIX): *Note POSIX Semaphores::. + +`int sem_init (sem_t *SEM, int PSHARED, unsigned int VALUE)' + `semaphore.h' (POSIX): *Note POSIX Semaphores::. + +`int sem_post (sem_t * SEM)' + `semaphore.h' (POSIX): *Note POSIX Semaphores::. + +`int sem_trywait (sem_t * SEM)' + `semaphore.h' (POSIX): *Note POSIX Semaphores::. + +`int sem_wait (sem_t * SEM)' + `semaphore.h' (POSIX): *Note POSIX Semaphores::. + +`int send (int SOCKET, void *BUFFER, size_t SIZE, int FLAGS)' + `sys/socket.h' (BSD): *Note Sending Data::. + +`int sendmsg (int SOCKET, const struct msghdr *MESSAGE, int FLAGS)' + `sys/socket.h' (BSD): *Note Receiving Datagrams::. + +`int sendto (int SOCKET, void *BUFFER. size_t SIZE, int FLAGS, struct sockaddr *ADDR, socklen_t LENGTH)' + `sys/socket.h' (BSD): *Note Sending Datagrams::. + +`void setbuf (FILE *STREAM, char *BUF)' + `stdio.h' (ISO): *Note Controlling Buffering::. + +`void setbuffer (FILE *STREAM, char *BUF, size_t SIZE)' + `stdio.h' (BSD): *Note Controlling Buffering::. + +`int setcontext (const ucontext_t *UCP)' + `ucontext.h' (SVID): *Note System V contexts::. + +`int setdomainname (const char *NAME, size_t LENGTH)' + `unistd.h' (???): *Note Host Identification::. + +`int setegid (gid_t NEWGID)' + `unistd.h' (POSIX.1): *Note Setting Groups::. + +`int setenv (const char *NAME, const char *VALUE, int REPLACE)' + `stdlib.h' (BSD): *Note Environment Access::. + +`int seteuid (uid_t NEWEUID)' + `unistd.h' (POSIX.1): *Note Setting User ID::. + +`int setfsent (void)' + `fstab.h' (BSD): *Note fstab::. + +`int setgid (gid_t NEWGID)' + `unistd.h' (POSIX.1): *Note Setting Groups::. + +`void setgrent (void)' + `grp.h' (SVID, BSD): *Note Scanning All Groups::. + +`int setgroups (size_t COUNT, gid_t *GROUPS)' + `grp.h' (BSD): *Note Setting Groups::. + +`void sethostent (int STAYOPEN)' + `netdb.h' (BSD): *Note Host Names::. + +`int sethostid (long int ID)' + `unistd.h' (BSD): *Note Host Identification::. + +`int sethostname (const char *NAME, size_t LENGTH)' + `unistd.h' (BSD): *Note Host Identification::. + +`int setitimer (int WHICH, struct itimerval *NEW, struct itimerval *OLD)' + `sys/time.h' (BSD): *Note Setting an Alarm::. + +`int setjmp (jmp_buf STATE)' + `setjmp.h' (ISO): *Note Non-Local Details::. + +`void setkey (const char *KEY)' + `crypt.h' (BSD, SVID): *Note DES Encryption::. + +`void setkey_r (const char *KEY, struct crypt_data * DATA)' + `crypt.h' (GNU): *Note DES Encryption::. + +`void setlinebuf (FILE *STREAM)' + `stdio.h' (BSD): *Note Controlling Buffering::. + +`char * setlocale (int CATEGORY, const char *LOCALE)' + `locale.h' (ISO): *Note Setting the Locale::. + +`int setlogmask (int MASK)' + `syslog.h' (BSD): *Note setlogmask::. + +`FILE * setmntent (const char *FILE, const char *MODE)' + `mntent.h' (BSD): *Note mtab::. + +`void setnetent (int STAYOPEN)' + `netdb.h' (BSD): *Note Networks Database::. + +`int setnetgrent (const char *NETGROUP)' + `netdb.h' (BSD): *Note Lookup Netgroup::. + +`int setpgid (pid_t PID, pid_t PGID)' + `unistd.h' (POSIX.1): *Note Process Group Functions::. + +`int setpgrp (pid_t PID, pid_t PGID)' + `unistd.h' (BSD): *Note Process Group Functions::. + +`int setpriority (int CLASS, int ID, int NICEVAL)' + `sys/resource.h' (BSD,POSIX): *Note Traditional Scheduling + Functions::. + +`void setprotoent (int STAYOPEN)' + `netdb.h' (BSD): *Note Protocols Database::. + +`void setpwent (void)' + `pwd.h' (SVID, BSD): *Note Scanning All Users::. + +`int setregid (gid_t RGID, gid_t EGID)' + `unistd.h' (BSD): *Note Setting Groups::. + +`int setreuid (uid_t RUID, uid_t EUID)' + `unistd.h' (BSD): *Note Setting User ID::. + +`int setrlimit (int RESOURCE, const struct rlimit *RLP)' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`int setrlimit64 (int RESOURCE, const struct rlimit64 *RLP)' + `sys/resource.h' (Unix98): *Note Limits on Resources::. + +`void setservent (int STAYOPEN)' + `netdb.h' (BSD): *Note Services Database::. + +`pid_t setsid (void)' + `unistd.h' (POSIX.1): *Note Process Group Functions::. + +`int setsockopt (int SOCKET, int LEVEL, int OPTNAME, void *OPTVAL, socklen_t OPTLEN)' + `sys/socket.h' (BSD): *Note Socket Option Functions::. + +`void * setstate (void *STATE)' + `stdlib.h' (BSD): *Note BSD Random::. + +`int setstate_r (char *restrict STATEBUF, struct random_data *restrict BUF)' + `stdlib.h' (GNU): *Note BSD Random::. + +`int settimeofday (const struct timeval *TP, const struct timezone *TZP)' + `sys/time.h' (BSD): *Note High-Resolution Calendar::. + +`int setuid (uid_t NEWUID)' + `unistd.h' (POSIX.1): *Note Setting User ID::. + +`void setutent (void)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`void setutxent (void)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`int setvbuf (FILE *STREAM, char *BUF, int MODE, size_t SIZE)' + `stdio.h' (ISO): *Note Controlling Buffering::. + +`SHRT_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`SHRT_MIN' + `limits.h' (ISO): *Note Range of Type::. + +`int shutdown (int SOCKET, int HOW)' + `sys/socket.h' (BSD): *Note Closing a Socket::. + +`S_IEXEC' + `sys/stat.h' (BSD): *Note Permission Bits::. + +`S_IFBLK' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`S_IFCHR' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`S_IFDIR' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`S_IFIFO' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`S_IFLNK' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`int S_IFMT' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`S_IFREG' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`S_IFSOCK' + `sys/stat.h' (BSD): *Note Testing File Type::. + +`int SIGABRT' + `signal.h' (ISO): *Note Program Error Signals::. + +`int sigaction (int SIGNUM, const struct sigaction *restrict ACTION, struct sigaction *restrict OLD-ACTION)' + `signal.h' (POSIX.1): *Note Advanced Signal Handling::. + +`int sigaddset (sigset_t *SET, int SIGNUM)' + `signal.h' (POSIX.1): *Note Signal Sets::. + +`int SIGALRM' + `signal.h' (POSIX.1): *Note Alarm Signals::. + +`int sigaltstack (const stack_t *restrict STACK, stack_t *restrict OLDSTACK)' + `signal.h' (XPG): *Note Signal Stack::. + +`sig_atomic_t' + `signal.h' (ISO): *Note Atomic Types::. + +`SIG_BLOCK' + `signal.h' (POSIX.1): *Note Process Signal Mask::. + +`int sigblock (int MASK)' + `signal.h' (BSD): *Note Blocking in BSD::. + +`int SIGBUS' + `signal.h' (BSD): *Note Program Error Signals::. + +`int SIGCHLD' + `signal.h' (POSIX.1): *Note Job Control Signals::. + +`int SIGCLD' + `signal.h' (SVID): *Note Job Control Signals::. + +`int SIGCONT' + `signal.h' (POSIX.1): *Note Job Control Signals::. + +`int sigdelset (sigset_t *SET, int SIGNUM)' + `signal.h' (POSIX.1): *Note Signal Sets::. + +`int sigemptyset (sigset_t *SET)' + `signal.h' (POSIX.1): *Note Signal Sets::. + +`int SIGEMT' + `signal.h' (BSD): *Note Program Error Signals::. + +`sighandler_t SIG_ERR' + `signal.h' (ISO): *Note Basic Signal Handling::. + +`int sigfillset (sigset_t *SET)' + `signal.h' (POSIX.1): *Note Signal Sets::. + +`int SIGFPE' + `signal.h' (ISO): *Note Program Error Signals::. + +`sighandler_t' + `signal.h' (GNU): *Note Basic Signal Handling::. + +`int SIGHUP' + `signal.h' (POSIX.1): *Note Termination Signals::. + +`int SIGILL' + `signal.h' (ISO): *Note Program Error Signals::. + +`int SIGINFO' + `signal.h' (BSD): *Note Miscellaneous Signals::. + +`int SIGINT' + `signal.h' (ISO): *Note Termination Signals::. + +`int siginterrupt (int SIGNUM, int FAILFLAG)' + `signal.h' (BSD): *Note BSD Handler::. + +`int SIGIO' + `signal.h' (BSD): *Note Asynchronous I/O Signals::. + +`int SIGIOT' + `signal.h' (Unix): *Note Program Error Signals::. + +`int sigismember (const sigset_t *SET, int SIGNUM)' + `signal.h' (POSIX.1): *Note Signal Sets::. + +`sigjmp_buf' + `setjmp.h' (POSIX.1): *Note Non-Local Exits and Signals::. + +`int SIGKILL' + `signal.h' (POSIX.1): *Note Termination Signals::. + +`void siglongjmp (sigjmp_buf STATE, int VALUE)' + `setjmp.h' (POSIX.1): *Note Non-Local Exits and Signals::. + +`int SIGLOST' + `signal.h' (GNU): *Note Operation Error Signals::. + +`int sigmask (int SIGNUM)' + `signal.h' (BSD): *Note Blocking in BSD::. + +`sighandler_t signal (int SIGNUM, sighandler_t ACTION)' + `signal.h' (ISO): *Note Basic Signal Handling::. + +`int signbit (_float-type_ X)' + `math.h' (ISO): *Note FP Bit Twiddling::. + +`long long int significand (double X)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int significandf (float X)' + `math.h' (BSD): *Note Normalization Functions::. + +`long long int significandl (long double X)' + `math.h' (BSD): *Note Normalization Functions::. + +`int sigpause (int MASK)' + `signal.h' (BSD): *Note Blocking in BSD::. + +`int sigpending (sigset_t *SET)' + `signal.h' (POSIX.1): *Note Checking for Pending Signals::. + +`int SIGPIPE' + `signal.h' (POSIX.1): *Note Operation Error Signals::. + +`int SIGPOLL' + `signal.h' (SVID): *Note Asynchronous I/O Signals::. + +`int sigprocmask (int HOW, const sigset_t *restrict SET, sigset_t *restrict OLDSET)' + `signal.h' (POSIX.1): *Note Process Signal Mask::. + +`int SIGPROF' + `signal.h' (BSD): *Note Alarm Signals::. + +`int SIGQUIT' + `signal.h' (POSIX.1): *Note Termination Signals::. + +`int SIGSEGV' + `signal.h' (ISO): *Note Program Error Signals::. + +`int sigsetjmp (sigjmp_buf STATE, int SAVESIGS)' + `setjmp.h' (POSIX.1): *Note Non-Local Exits and Signals::. + +`SIG_SETMASK' + `signal.h' (POSIX.1): *Note Process Signal Mask::. + +`int sigsetmask (int MASK)' + `signal.h' (BSD): *Note Blocking in BSD::. + +`sigset_t' + `signal.h' (POSIX.1): *Note Signal Sets::. + +`int sigstack (const struct sigstack *STACK, struct sigstack *OLDSTACK)' + `signal.h' (BSD): *Note Signal Stack::. + +`int SIGSTOP' + `signal.h' (POSIX.1): *Note Job Control Signals::. + +`int sigsuspend (const sigset_t *SET)' + `signal.h' (POSIX.1): *Note Sigsuspend::. + +`int SIGSYS' + `signal.h' (Unix): *Note Program Error Signals::. + +`int SIGTERM' + `signal.h' (ISO): *Note Termination Signals::. + +`int SIGTRAP' + `signal.h' (BSD): *Note Program Error Signals::. + +`int SIGTSTP' + `signal.h' (POSIX.1): *Note Job Control Signals::. + +`int SIGTTIN' + `signal.h' (POSIX.1): *Note Job Control Signals::. + +`int SIGTTOU' + `signal.h' (POSIX.1): *Note Job Control Signals::. + +`SIG_UNBLOCK' + `signal.h' (POSIX.1): *Note Process Signal Mask::. + +`int SIGURG' + `signal.h' (BSD): *Note Asynchronous I/O Signals::. + +`int SIGUSR1' + `signal.h' (POSIX.1): *Note Miscellaneous Signals::. + +`int SIGUSR2' + `signal.h' (POSIX.1): *Note Miscellaneous Signals::. + +`int sigvec (int SIGNUM, const struct sigvec *ACTION,struct sigvec *OLD-ACTION)' + `signal.h' (BSD): *Note BSD Handler::. + +`int SIGVTALRM' + `signal.h' (BSD): *Note Alarm Signals::. + +`int sigwait (const sigset_t *SET, int *SIG)' + `pthread.h' (POSIX): *Note Threads and Signal Handling::. + +`int SIGWINCH' + `signal.h' (BSD): *Note Miscellaneous Signals::. + +`int SIGXCPU' + `signal.h' (BSD): *Note Operation Error Signals::. + +`int SIGXFSZ' + `signal.h' (BSD): *Note Operation Error Signals::. + +`double sin (double X)' + `math.h' (ISO): *Note Trig Functions::. + +`void sincos (double X, double *SINX, double *COSX)' + `math.h' (GNU): *Note Trig Functions::. + +`void sincosf (float X, float *SINX, float *COSX)' + `math.h' (GNU): *Note Trig Functions::. + +`void sincosl (long double X, long double *SINX, long double *COSX)' + `math.h' (GNU): *Note Trig Functions::. + +`float sinf (float X)' + `math.h' (ISO): *Note Trig Functions::. + +`double sinh (double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`float sinhf (float X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`long double sinhl (long double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`long double sinl (long double X)' + `math.h' (ISO): *Note Trig Functions::. + +`S_IREAD' + `sys/stat.h' (BSD): *Note Permission Bits::. + +`S_IRGRP' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IROTH' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IRUSR' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IRWXG' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IRWXO' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IRWXU' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`int S_ISBLK (mode_t M)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int S_ISCHR (mode_t M)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int S_ISDIR (mode_t M)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int S_ISFIFO (mode_t M)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`S_ISGID' + `sys/stat.h' (POSIX): *Note Permission Bits::. + +`int S_ISLNK (mode_t M)' + `sys/stat.h' (GNU): *Note Testing File Type::. + +`int S_ISREG (mode_t M)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int S_ISSOCK (mode_t M)' + `sys/stat.h' (GNU): *Note Testing File Type::. + +`S_ISUID' + `sys/stat.h' (POSIX): *Note Permission Bits::. + +`S_ISVTX' + `sys/stat.h' (BSD): *Note Permission Bits::. + +`S_IWGRP' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IWOTH' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IWRITE' + `sys/stat.h' (BSD): *Note Permission Bits::. + +`S_IWUSR' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IXGRP' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IXOTH' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`S_IXUSR' + `sys/stat.h' (POSIX.1): *Note Permission Bits::. + +`size_t' + `stddef.h' (ISO): *Note Important Data Types::. + +`unsigned int sleep (unsigned int SECONDS)' + `unistd.h' (POSIX.1): *Note Sleeping::. + +`int snprintf (char *S, size_t SIZE, const char *TEMPLATE, ...)' + `stdio.h' (GNU): *Note Formatted Output Functions::. + +`SO_BROADCAST' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`int SOCK_DGRAM' + `sys/socket.h' (BSD): *Note Communication Styles::. + +`int socket (int NAMESPACE, int STYLE, int PROTOCOL)' + `sys/socket.h' (BSD): *Note Creating a Socket::. + +`int socketpair (int NAMESPACE, int STYLE, int PROTOCOL, int FILEDES[2])' + `sys/socket.h' (BSD): *Note Socket Pairs::. + +`int SOCK_RAW' + `sys/socket.h' (BSD): *Note Communication Styles::. + +`int SOCK_RDM' + `sys/socket.h' (BSD): *Note Communication Styles::. + +`int SOCK_SEQPACKET' + `sys/socket.h' (BSD): *Note Communication Styles::. + +`int SOCK_STREAM' + `sys/socket.h' (BSD): *Note Communication Styles::. + +`SO_DEBUG' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_DONTROUTE' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_ERROR' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_KEEPALIVE' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_LINGER' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`int SOL_SOCKET' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_OOBINLINE' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_RCVBUF' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_REUSEADDR' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_SNDBUF' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`SO_STYLE' + `sys/socket.h' (GNU): *Note Socket-Level Options::. + +`SO_TYPE' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`speed_t' + `termios.h' (POSIX.1): *Note Line Speed::. + +`int sprintf (char *S, const char *TEMPLATE, ...)' + `stdio.h' (ISO): *Note Formatted Output Functions::. + +`double sqrt (double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`float sqrtf (float X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`long double sqrtl (long double X)' + `math.h' (ISO): *Note Exponents and Logarithms::. + +`void srand (unsigned int SEED)' + `stdlib.h' (ISO): *Note ISO Random::. + +`void srand48 (long int SEEDVAL)' + `stdlib.h' (SVID): *Note SVID Random::. + +`int srand48_r (long int SEEDVAL, struct drand48_data *BUFFER)' + `stdlib.h' (GNU): *Note SVID Random::. + +`void srandom (unsigned int SEED)' + `stdlib.h' (BSD): *Note BSD Random::. + +`int srandom_r (unsigned int SEED, struct random_data *BUF)' + `stdlib.h' (GNU): *Note BSD Random::. + +`int sscanf (const char *S, const char *TEMPLATE, ...)' + `stdio.h' (ISO): *Note Formatted Input Functions::. + +`sighandler_t ssignal (int SIGNUM, sighandler_t ACTION)' + `signal.h' (SVID): *Note Basic Signal Handling::. + +`int SSIZE_MAX' + `limits.h' (POSIX.1): *Note General Limits::. + +`ssize_t' + `unistd.h' (POSIX.1): *Note I/O Primitives::. + +`stack_t' + `signal.h' (XPG): *Note Signal Stack::. + +`int stat (const char *FILENAME, struct stat *BUF)' + `sys/stat.h' (POSIX.1): *Note Reading Attributes::. + +`int stat64 (const char *FILENAME, struct stat64 *BUF)' + `sys/stat.h' (Unix98): *Note Reading Attributes::. + +`FILE * stderr' + `stdio.h' (ISO): *Note Standard Streams::. + +`STDERR_FILENO' + `unistd.h' (POSIX.1): *Note Descriptors and Streams::. + +`FILE * stdin' + `stdio.h' (ISO): *Note Standard Streams::. + +`STDIN_FILENO' + `unistd.h' (POSIX.1): *Note Descriptors and Streams::. + +`FILE * stdout' + `stdio.h' (ISO): *Note Standard Streams::. + +`STDOUT_FILENO' + `unistd.h' (POSIX.1): *Note Descriptors and Streams::. + +`int stime (time_t *NEWTIME)' + `time.h' (SVID, XPG): *Note Simple Calendar Time::. + +`char * stpcpy (char *restrict TO, const char *restrict FROM)' + `string.h' (Unknown origin): *Note Copying and Concatenation::. + +`char * stpncpy (char *restrict TO, const char *restrict FROM, size_t SIZE)' + `string.h' (GNU): *Note Copying and Concatenation::. + +`int strcasecmp (const char *S1, const char *S2)' + `string.h' (BSD): *Note String/Array Comparison::. + +`char * strcasestr (const char *HAYSTACK, const char *NEEDLE)' + `string.h' (GNU): *Note Search Functions::. + +`char * strcat (char *restrict TO, const char *restrict FROM)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`char * strchr (const char *STRING, int C)' + `string.h' (ISO): *Note Search Functions::. + +`char * strchrnul (const char *STRING, int C)' + `string.h' (GNU): *Note Search Functions::. + +`int strcmp (const char *S1, const char *S2)' + `string.h' (ISO): *Note String/Array Comparison::. + +`int strcoll (const char *S1, const char *S2)' + `string.h' (ISO): *Note Collation Functions::. + +`char * strcpy (char *restrict TO, const char *restrict FROM)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`size_t strcspn (const char *STRING, const char *STOPSET)' + `string.h' (ISO): *Note Search Functions::. + +`char * strdup (const char *S)' + `string.h' (SVID): *Note Copying and Concatenation::. + +`char * strdupa (const char *S)' + `string.h' (GNU): *Note Copying and Concatenation::. + +`int STREAM_MAX' + `limits.h' (POSIX.1): *Note General Limits::. + +`char * strerror (int ERRNUM)' + `string.h' (ISO): *Note Error Messages::. + +`char * strerror_r (int ERRNUM, char *BUF, size_t N)' + `string.h' (GNU): *Note Error Messages::. + +`char * strfry (char *STRING)' + `string.h' (GNU): *Note strfry::. + +`size_t strftime (char *S, size_t SIZE, const char *TEMPLATE, const struct tm *BROKENTIME)' + `time.h' (ISO): *Note Formatting Calendar Time::. + +`size_t strlen (const char *S)' + `string.h' (ISO): *Note String Length::. + +`int strncasecmp (const char *S1, const char *S2, size_t N)' + `string.h' (BSD): *Note String/Array Comparison::. + +`char * strncat (char *restrict TO, const char *restrict FROM, size_t SIZE)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`int strncmp (const char *S1, const char *S2, size_t SIZE)' + `string.h' (ISO): *Note String/Array Comparison::. + +`char * strncpy (char *restrict TO, const char *restrict FROM, size_t SIZE)' + `string.h' (ISO): *Note Copying and Concatenation::. + +`char * strndup (const char *S, size_t SIZE)' + `string.h' (GNU): *Note Copying and Concatenation::. + +`char * strndupa (const char *S, size_t SIZE)' + `string.h' (GNU): *Note Copying and Concatenation::. + +`size_t strnlen (const char *S, size_t MAXLEN)' + `string.h' (GNU): *Note String Length::. + +`char * strpbrk (const char *STRING, const char *STOPSET)' + `string.h' (ISO): *Note Search Functions::. + +`char * strptime (const char *S, const char *FMT, struct tm *TP)' + `time.h' (XPG4): *Note Low-Level Time String Parsing::. + +`char * strrchr (const char *STRING, int C)' + `string.h' (ISO): *Note Search Functions::. + +`char * strsep (char **STRING_PTR, const char *DELIMITER)' + `string.h' (BSD): *Note Finding Tokens in a String::. + +`char * strsignal (int SIGNUM)' + `string.h' (GNU): *Note Signal Messages::. + +`size_t strspn (const char *STRING, const char *SKIPSET)' + `string.h' (ISO): *Note Search Functions::. + +`char * strstr (const char *HAYSTACK, const char *NEEDLE)' + `string.h' (ISO): *Note Search Functions::. + +`double strtod (const char *restrict STRING, char **restrict TAILPTR)' + `stdlib.h' (ISO): *Note Parsing of Floats::. + +`float strtof (const char *STRING, char **TAILPTR)' + `stdlib.h' (ISO): *Note Parsing of Floats::. + +`intmax_t strtoimax (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `inttypes.h' (ISO): *Note Parsing of Integers::. + +`char * strtok (char *restrict NEWSTRING, const char *restrict DELIMITERS)' + `string.h' (ISO): *Note Finding Tokens in a String::. + +`char * strtok_r (char *NEWSTRING, const char *DELIMITERS, char **SAVE_PTR)' + `string.h' (POSIX): *Note Finding Tokens in a String::. + +`long int strtol (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `stdlib.h' (ISO): *Note Parsing of Integers::. + +`long double strtold (const char *STRING, char **TAILPTR)' + `stdlib.h' (ISO): *Note Parsing of Floats::. + +`long long int strtoll (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `stdlib.h' (ISO): *Note Parsing of Integers::. + +`long long int strtoq (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `stdlib.h' (BSD): *Note Parsing of Integers::. + +`unsigned long int strtoul (const char *retrict STRING, char **restrict TAILPTR, int BASE)' + `stdlib.h' (ISO): *Note Parsing of Integers::. + +`unsigned long long int strtoull (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `stdlib.h' (ISO): *Note Parsing of Integers::. + +`uintmax_t strtoumax (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `inttypes.h' (ISO): *Note Parsing of Integers::. + +`unsigned long long int strtouq (const char *restrict STRING, char **restrict TAILPTR, int BASE)' + `stdlib.h' (BSD): *Note Parsing of Integers::. + +`struct aiocb' + `aio.h' (POSIX.1b): *Note Asynchronous I/O::. + +`struct aiocb64' + `aio.h' (POSIX.1b): *Note Asynchronous I/O::. + +`struct aioinit' + `aio.h' (GNU): *Note Configuration of AIO::. + +`struct argp' + `argp.h' (GNU): *Note Argp Parsers::. + +`struct argp_child' + `argp.h' (GNU): *Note Argp Children::. + +`struct argp_option' + `argp.h' (GNU): *Note Argp Option Vectors::. + +`struct argp_state' + `argp.h' (GNU): *Note Argp Parsing State::. + +`struct dirent' + `dirent.h' (POSIX.1): *Note Directory Entries::. + +`struct exit_status' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`struct flock' + `fcntl.h' (POSIX.1): *Note File Locks::. + +`struct fstab' + `fstab.h' (BSD): *Note fstab::. + +`struct FTW' + `ftw.h' (XPG4.2): *Note Working with Directory Trees::. + +`struct __gconv_step' + `gconv.h' (GNU): *Note glibc iconv Implementation::. + +`struct __gconv_step_data' + `gconv.h' (GNU): *Note glibc iconv Implementation::. + +`struct group' + `grp.h' (POSIX.1): *Note Group Data Structure::. + +`struct hostent' + `netdb.h' (BSD): *Note Host Names::. + +`struct if_nameindex' + `net/if.h' (IPv6 basic API): *Note Interface Naming::. + +`struct in6_addr' + `netinet/in.h' (IPv6 basic API): *Note Host Address Data Type::. + +`struct in_addr' + `netinet/in.h' (BSD): *Note Host Address Data Type::. + +`struct iovec' + `sys/uio.h' (BSD): *Note Scatter-Gather::. + +`struct itimerval' + `sys/time.h' (BSD): *Note Setting an Alarm::. + +`struct lconv' + `locale.h' (ISO): *Note The Lame Way to Locale Data::. + +`struct linger' + `sys/socket.h' (BSD): *Note Socket-Level Options::. + +`struct mallinfo' + `malloc.h' (GNU): *Note Statistics of Malloc::. + +`struct mntent' + `mntent.h' (BSD): *Note mtab::. + +`struct msghdr' + `sys/socket.h' (BSD): *Note Receiving Datagrams::. + +`struct netent' + `netdb.h' (BSD): *Note Networks Database::. + +`struct obstack' + `obstack.h' (GNU): *Note Creating Obstacks::. + +`struct option' + `getopt.h' (GNU): *Note Getopt Long Options::. + +`struct passwd' + `pwd.h' (POSIX.1): *Note User Data Structure::. + +`struct printf_info' + `printf.h' (GNU): *Note Conversion Specifier Options::. + +`struct protoent' + `netdb.h' (BSD): *Note Protocols Database::. + +`struct random_data' + `stdlib.h' (GNU): *Note BSD Random::. + +`struct rlimit' + `sys/resource.h' (BSD): *Note Limits on Resources::. + +`struct rlimit64' + `sys/resource.h' (Unix98): *Note Limits on Resources::. + +`struct rusage' + `sys/resource.h' (BSD): *Note Resource Usage::. + +`struct sched_param' + `sched.h' (POSIX): *Note Basic Scheduling Functions::. + +`struct servent' + `netdb.h' (BSD): *Note Services Database::. + +`struct sgttyb' + `termios.h' (BSD): *Note BSD Terminal Modes::. + +`struct sigaction' + `signal.h' (POSIX.1): *Note Advanced Signal Handling::. + +`struct sigstack' + `signal.h' (BSD): *Note Signal Stack::. + +`struct sigvec' + `signal.h' (BSD): *Note BSD Handler::. + +`struct sockaddr' + `sys/socket.h' (BSD): *Note Address Formats::. + +`struct sockaddr_in' + `netinet/in.h' (BSD): *Note Internet Address Formats::. + +`struct sockaddr_un' + `sys/un.h' (BSD): *Note Local Namespace Details::. + +`struct stat' + `sys/stat.h' (POSIX.1): *Note Attribute Meanings::. + +`struct stat64' + `sys/stat.h' (LFS): *Note Attribute Meanings::. + +`struct termios' + `termios.h' (POSIX.1): *Note Mode Data Types::. + +`struct timespec' + `sys/time.h' (POSIX.1): *Note Elapsed Time::. + +`struct timeval' + `sys/time.h' (BSD): *Note Elapsed Time::. + +`struct timezone' + `sys/time.h' (BSD): *Note High-Resolution Calendar::. + +`struct tm' + `time.h' (ISO): *Note Broken-down Time::. + +`struct tms' + `sys/times.h' (POSIX.1): *Note Processor Time::. + +`struct utimbuf' + `time.h' (POSIX.1): *Note File Times::. + +`struct utsname' + `sys/utsname.h' (POSIX.1): *Note Platform Type::. + +`int strverscmp (const char *S1, const char *S2)' + `string.h' (GNU): *Note String/Array Comparison::. + +`size_t strxfrm (char *restrict TO, const char *restrict FROM, size_t SIZE)' + `string.h' (ISO): *Note Collation Functions::. + +`int stty (int FILEDES, struct sgttyb * attributes)' + `sgtty.h' (BSD): *Note BSD Terminal Modes::. + +`int S_TYPEISMQ (struct stat *S)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int S_TYPEISSEM (struct stat *S)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int S_TYPEISSHM (struct stat *S)' + `sys/stat.h' (POSIX): *Note Testing File Type::. + +`int SUN_LEN (_struct sockaddr_un *_ PTR)' + `sys/un.h' (BSD): *Note Local Namespace Details::. + +`_SVID_SOURCE' + (GNU): *Note Feature Test Macros::. + +`int SV_INTERRUPT' + `signal.h' (BSD): *Note BSD Handler::. + +`int SV_ONSTACK' + `signal.h' (BSD): *Note BSD Handler::. + +`int SV_RESETHAND' + `signal.h' (Sun): *Note BSD Handler::. + +`int swapcontext (ucontext_t *restrict OUCP, const ucontext_t *restrict UCP)' + `ucontext.h' (SVID): *Note System V contexts::. + +`int swprintf (wchar_t *S, size_t SIZE, const wchar_t *TEMPLATE, ...)' + `wchar.h' (GNU): *Note Formatted Output Functions::. + +`int swscanf (const wchar_t *WS, const char *TEMPLATE, ...)' + `wchar.h' (ISO): *Note Formatted Input Functions::. + +`int symlink (const char *OLDNAME, const char *NEWNAME)' + `unistd.h' (BSD): *Note Symbolic Links::. + +`SYMLINK_MAX' + `limits.h' (POSIX.1): *Note File Minimums::. + +`int sync (void)' + `unistd.h' (X/Open): *Note Synchronizing I/O::. + +`long int syscall (long int SYSNO, ...)' + `unistd.h' (???): *Note System Calls::. + +`long int sysconf (int PARAMETER)' + `unistd.h' (POSIX.1): *Note Sysconf Definition::. + +`int sysctl (int *NAMES, int NLEN, void *OLDVAL,' + `sysctl.h' (BSD): *Note System Parameters::. + +`void syslog (int FACILITY_PRIORITY, char *FORMAT, ...)' + `syslog.h' (BSD): *Note syslog; vsyslog::. + +`int system (const char *COMMAND)' + `stdlib.h' (ISO): *Note Running a Command::. + +`sighandler_t sysv_signal (int SIGNUM, sighandler_t ACTION)' + `signal.h' (GNU): *Note Basic Signal Handling::. + +`double tan (double X)' + `math.h' (ISO): *Note Trig Functions::. + +`float tanf (float X)' + `math.h' (ISO): *Note Trig Functions::. + +`double tanh (double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`float tanhf (float X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`long double tanhl (long double X)' + `math.h' (ISO): *Note Hyperbolic Functions::. + +`long double tanl (long double X)' + `math.h' (ISO): *Note Trig Functions::. + +`int tcdrain (int FILEDES)' + `termios.h' (POSIX.1): *Note Line Control::. + +`tcflag_t' + `termios.h' (POSIX.1): *Note Mode Data Types::. + +`int tcflow (int FILEDES, int ACTION)' + `termios.h' (POSIX.1): *Note Line Control::. + +`int tcflush (int FILEDES, int QUEUE)' + `termios.h' (POSIX.1): *Note Line Control::. + +`int tcgetattr (int FILEDES, struct termios *TERMIOS-P)' + `termios.h' (POSIX.1): *Note Mode Functions::. + +`pid_t tcgetpgrp (int FILEDES)' + `unistd.h' (POSIX.1): *Note Terminal Access Functions::. + +`pid_t tcgetsid (int FILDES)' + `termios.h' (Unix98): *Note Terminal Access Functions::. + +`TCSADRAIN' + `termios.h' (POSIX.1): *Note Mode Functions::. + +`TCSAFLUSH' + `termios.h' (POSIX.1): *Note Mode Functions::. + +`TCSANOW' + `termios.h' (POSIX.1): *Note Mode Functions::. + +`TCSASOFT' + `termios.h' (BSD): *Note Mode Functions::. + +`int tcsendbreak (int FILEDES, int DURATION)' + `termios.h' (POSIX.1): *Note Line Control::. + +`int tcsetattr (int FILEDES, int WHEN, const struct termios *TERMIOS-P)' + `termios.h' (POSIX.1): *Note Mode Functions::. + +`int tcsetpgrp (int FILEDES, pid_t PGID)' + `unistd.h' (POSIX.1): *Note Terminal Access Functions::. + +`void * tdelete (const void *KEY, void **ROOTP, comparison_fn_t COMPAR)' + `search.h' (SVID): *Note Tree Search Function::. + +`void tdestroy (void *VROOT, __free_fn_t FREEFCT)' + `search.h' (GNU): *Note Tree Search Function::. + +`off_t telldir (DIR *DIRSTREAM)' + `dirent.h' (BSD): *Note Random Access Directory::. + +`TEMP_FAILURE_RETRY (EXPRESSION)' + `unistd.h' (GNU): *Note Interrupted Primitives::. + +`char * tempnam (const char *DIR, const char *PREFIX)' + `stdio.h' (SVID): *Note Temporary Files::. + +`char * textdomain (const char *DOMAINNAME)' + `libintl.h' (GNU): *Note Locating gettext catalog::. + +`void * tfind (const void *KEY, void *const *ROOTP, comparison_fn_t COMPAR)' + `search.h' (SVID): *Note Tree Search Function::. + +`double tgamma (double X)' + `math.h' (XPG, ISO): *Note Special Functions::. + +`float tgammaf (float X)' + `math.h' (XPG, ISO): *Note Special Functions::. + +`long double tgammal (long double X)' + `math.h' (XPG, ISO): *Note Special Functions::. + +`time_t time (time_t *RESULT)' + `time.h' (ISO): *Note Simple Calendar Time::. + +`time_t timegm (struct tm *BROKENTIME)' + `time.h' (???): *Note Broken-down Time::. + +`time_t timelocal (struct tm *BROKENTIME)' + `time.h' (???): *Note Broken-down Time::. + +`clock_t times (struct tms *BUFFER)' + `sys/times.h' (POSIX.1): *Note Processor Time::. + +`time_t' + `time.h' (ISO): *Note Simple Calendar Time::. + +`long int timezone' + `time.h' (SVID): *Note Time Zone Functions::. + +`FILE * tmpfile (void)' + `stdio.h' (ISO): *Note Temporary Files::. + +`FILE * tmpfile64 (void)' + `stdio.h' (Unix98): *Note Temporary Files::. + +`int TMP_MAX' + `stdio.h' (ISO): *Note Temporary Files::. + +`char * tmpnam (char *RESULT)' + `stdio.h' (ISO): *Note Temporary Files::. + +`char * tmpnam_r (char *RESULT)' + `stdio.h' (GNU): *Note Temporary Files::. + +`int toascii (int C)' + `ctype.h' (SVID, BSD): *Note Case Conversion::. + +`int _tolower (int C)' + `ctype.h' (SVID): *Note Case Conversion::. + +`int tolower (int C)' + `ctype.h' (ISO): *Note Case Conversion::. + +`tcflag_t TOSTOP' + `termios.h' (POSIX.1): *Note Local Modes::. + +`int _toupper (int C)' + `ctype.h' (SVID): *Note Case Conversion::. + +`int toupper (int C)' + `ctype.h' (ISO): *Note Case Conversion::. + +`wint_t towctrans (wint_t WC, wctrans_t DESC)' + `wctype.h' (ISO): *Note Wide Character Case Conversion::. + +`wint_t towlower (wint_t WC)' + `wctype.h' (ISO): *Note Wide Character Case Conversion::. + +`wint_t towupper (wint_t WC)' + `wctype.h' (ISO): *Note Wide Character Case Conversion::. + +`double trunc (double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`int truncate (const char *FILENAME, off_t LENGTH)' + `unistd.h' (X/Open): *Note File Size::. + +`int truncate64 (const char *NAME, off64_t LENGTH)' + `unistd.h' (Unix98): *Note File Size::. + +`float truncf (float X)' + `math.h' (ISO): *Note Rounding Functions::. + +`long double truncl (long double X)' + `math.h' (ISO): *Note Rounding Functions::. + +`TRY_AGAIN' + `netdb.h' (BSD): *Note Host Names::. + +`void * tsearch (const void *KEY, void **ROOTP, comparison_fn_t COMPAR)' + `search.h' (SVID): *Note Tree Search Function::. + +`char * ttyname (int FILEDES)' + `unistd.h' (POSIX.1): *Note Is It a Terminal::. + +`int ttyname_r (int FILEDES, char *BUF, size_t LEN)' + `unistd.h' (POSIX.1): *Note Is It a Terminal::. + +`void twalk (const void *ROOT, __action_fn_t ACTION)' + `search.h' (SVID): *Note Tree Search Function::. + +`char * tzname [2]' + `time.h' (POSIX.1): *Note Time Zone Functions::. + +`int TZNAME_MAX' + `limits.h' (POSIX.1): *Note General Limits::. + +`void tzset (void)' + `time.h' (POSIX.1): *Note Time Zone Functions::. + +`UCHAR_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`ucontext_t' + `ucontext.h' (SVID): *Note System V contexts::. + +`uid_t' + `sys/types.h' (POSIX.1): *Note Reading Persona::. + +`UINT_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`int ulimit (int CMD, ...)' + `ulimit.h' (BSD): *Note Limits on Resources::. + +`ULONG_LONG_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`ULONG_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`mode_t umask (mode_t MASK)' + `sys/stat.h' (POSIX.1): *Note Setting Permissions::. + +`int umount (const char *FILE)' + `sys/mount.h' (SVID, GNU): *Note Mount-Unmount-Remount::. + +`int umount2 (const char *FILE, int FLAGS)' + `sys/mount.h' (GNU): *Note Mount-Unmount-Remount::. + +`int uname (struct utsname *INFO)' + `sys/utsname.h' (POSIX.1): *Note Platform Type::. + +`int ungetc (int C, FILE *STREAM)' + `stdio.h' (ISO): *Note How Unread::. + +`wint_t ungetwc (wint_t WC, FILE *STREAM)' + `wchar.h' (ISO): *Note How Unread::. + +`union wait' + `sys/wait.h' (BSD): *Note BSD Wait Functions::. + +`int unlink (const char *FILENAME)' + `unistd.h' (POSIX.1): *Note Deleting Files::. + +`int unlockpt (int FILEDES)' + `stdlib.h' (SVID, XPG4.2): *Note Allocation::. + +`int unsetenv (const char *NAME)' + `stdlib.h' (BSD): *Note Environment Access::. + +`void updwtmp (const char *WTMP_FILE, const struct utmp *UTMP)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`USER_PROCESS' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`USER_PROCESS' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`USHRT_MAX' + `limits.h' (ISO): *Note Range of Type::. + +`int utime (const char *FILENAME, const struct utimbuf *TIMES)' + `time.h' (POSIX.1): *Note File Times::. + +`int utimes (const char *FILENAME, struct timeval TVP[2])' + `sys/time.h' (BSD): *Note File Times::. + +`int utmpname (const char *FILE)' + `utmp.h' (SVID): *Note Manipulating the Database::. + +`int utmpxname (const char *FILE)' + `utmpx.h' (XPG4.2): *Note XPG Functions::. + +`va_alist' + `varargs.h' (Unix): *Note Old Varargs::. + +`TYPE va_arg (va_list AP, TYPE)' + `stdarg.h' (ISO): *Note Argument Macros::. + +`void __va_copy (va_list DEST, va_list SRC)' + `stdarg.h' (GNU): *Note Argument Macros::. + +`va_dcl' + `varargs.h' (Unix): *Note Old Varargs::. + +`void va_end (va_list AP)' + `stdarg.h' (ISO): *Note Argument Macros::. + +`va_list' + `stdarg.h' (ISO): *Note Argument Macros::. + +`void * valloc (size_t SIZE)' + `malloc.h', `stdlib.h' (BSD): *Note Aligned Memory Blocks::. + +`int vasprintf (char **PTR, const char *TEMPLATE, va_list AP)' + `stdio.h' (GNU): *Note Variable Arguments Output::. + +`void va_start (va_list AP)' + `varargs.h' (Unix): *Note Old Varargs::. + +`void va_start (va_list AP, LAST-REQUIRED)' + `stdarg.h' (ISO): *Note Argument Macros::. + +`int VDISCARD' + `termios.h' (BSD): *Note Other Special::. + +`int VDSUSP' + `termios.h' (BSD): *Note Signal Characters::. + +`int VEOF' + `termios.h' (POSIX.1): *Note Editing Characters::. + +`int VEOL' + `termios.h' (POSIX.1): *Note Editing Characters::. + +`int VEOL2' + `termios.h' (BSD): *Note Editing Characters::. + +`int VERASE' + `termios.h' (POSIX.1): *Note Editing Characters::. + +`void verr (int STATUS, const char *FORMAT, va_list)' + `err.h' (BSD): *Note Error Messages::. + +`void verrx (int STATUS, const char *FORMAT, va_list)' + `err.h' (BSD): *Note Error Messages::. + +`int versionsort (const void *A, const void *B)' + `dirent.h' (GNU): *Note Scanning Directory Content::. + +`int versionsort64 (const void *A, const void *B)' + `dirent.h' (GNU): *Note Scanning Directory Content::. + +`pid_t vfork (void)' + `unistd.h' (BSD): *Note Creating a Process::. + +`int vfprintf (FILE *STREAM, const char *TEMPLATE, va_list AP)' + `stdio.h' (ISO): *Note Variable Arguments Output::. + +`int vfscanf (FILE *STREAM, const char *TEMPLATE, va_list AP)' + `stdio.h' (ISO): *Note Variable Arguments Input::. + +`int vfwprintf (FILE *STREAM, const wchar_t *TEMPLATE, va_list AP)' + `wchar.h' (ISO): *Note Variable Arguments Output::. + +`int vfwscanf (FILE *STREAM, const wchar_t *TEMPLATE, va_list AP)' + `wchar.h' (ISO): *Note Variable Arguments Input::. + +`int VINTR' + `termios.h' (POSIX.1): *Note Signal Characters::. + +`int VKILL' + `termios.h' (POSIX.1): *Note Editing Characters::. + +`int vlimit (int RESOURCE, int LIMIT)' + `sys/vlimit.h' (BSD): *Note Limits on Resources::. + +`int VLNEXT' + `termios.h' (BSD): *Note Other Special::. + +`int VMIN' + `termios.h' (POSIX.1): *Note Noncanonical Input::. + +`int vprintf (const char *TEMPLATE, va_list AP)' + `stdio.h' (ISO): *Note Variable Arguments Output::. + +`int VQUIT' + `termios.h' (POSIX.1): *Note Signal Characters::. + +`int VREPRINT' + `termios.h' (BSD): *Note Editing Characters::. + +`int vscanf (const char *TEMPLATE, va_list AP)' + `stdio.h' (ISO): *Note Variable Arguments Input::. + +`int vsnprintf (char *S, size_t SIZE, const char *TEMPLATE, va_list AP)' + `stdio.h' (GNU): *Note Variable Arguments Output::. + +`int vsprintf (char *S, const char *TEMPLATE, va_list AP)' + `stdio.h' (ISO): *Note Variable Arguments Output::. + +`int vsscanf (const char *S, const char *TEMPLATE, va_list AP)' + `stdio.h' (ISO): *Note Variable Arguments Input::. + +`int VSTART' + `termios.h' (POSIX.1): *Note Start/Stop Characters::. + +`int VSTATUS' + `termios.h' (BSD): *Note Other Special::. + +`int VSTOP' + `termios.h' (POSIX.1): *Note Start/Stop Characters::. + +`int VSUSP' + `termios.h' (POSIX.1): *Note Signal Characters::. + +`int vswprintf (wchar_t *S, size_t SIZE, const wchar_t *TEMPLATE, va_list AP)' + `wchar.h' (GNU): *Note Variable Arguments Output::. + +`int vswscanf (const wchar_t *S, const wchar_t *TEMPLATE, va_list AP)' + `wchar.h' (ISO): *Note Variable Arguments Input::. + +`void vsyslog (int FACILITY_PRIORITY, char *FORMAT, va_list arglist)' + `syslog.h' (BSD): *Note syslog; vsyslog::. + +`int VTIME' + `termios.h' (POSIX.1): *Note Noncanonical Input::. + +`int vtimes (struct vtimes CURRENT, struct vtimes CHILD)' + `vtimes.h' (vtimes.h): *Note Resource Usage::. + +`void vwarn (const char *FORMAT, va_list)' + `err.h' (BSD): *Note Error Messages::. + +`void vwarnx (const char *FORMAT, va_list)' + `err.h' (BSD): *Note Error Messages::. + +`int VWERASE' + `termios.h' (BSD): *Note Editing Characters::. + +`int vwprintf (const wchar_t *TEMPLATE, va_list AP)' + `wchar.h' (ISO): *Note Variable Arguments Output::. + +`int vwscanf (const wchar_t *TEMPLATE, va_list AP)' + `wchar.h' (ISO): *Note Variable Arguments Input::. + +`pid_t wait (int *STATUS-PTR)' + `sys/wait.h' (POSIX.1): *Note Process Completion::. + +`pid_t wait3 (union wait *STATUS-PTR, int OPTIONS, struct rusage *USAGE)' + `sys/wait.h' (BSD): *Note BSD Wait Functions::. + +`pid_t wait4 (pid_t PID, int *STATUS-PTR, int OPTIONS, struct rusage *USAGE)' + `sys/wait.h' (BSD): *Note Process Completion::. + +`pid_t waitpid (pid_t PID, int *STATUS-PTR, int OPTIONS)' + `sys/wait.h' (POSIX.1): *Note Process Completion::. + +`void warn (const char *FORMAT, ...)' + `err.h' (BSD): *Note Error Messages::. + +`void warnx (const char *FORMAT, ...)' + `err.h' (BSD): *Note Error Messages::. + +`WCHAR_MAX' + `limits.h' (GNU): *Note Range of Type::. + +`wint_t WCHAR_MAX' + `wchar.h' (ISO): *Note Extended Char Intro::. + +`wint_t WCHAR_MIN' + `wchar.h' (ISO): *Note Extended Char Intro::. + +`wchar_t' + `stddef.h' (ISO): *Note Extended Char Intro::. + +`int WCOREDUMP (int STATUS)' + `sys/wait.h' (BSD): *Note Process Completion Status::. + +`wchar_t * wcpcpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM)' + `wchar.h' (GNU): *Note Copying and Concatenation::. + +`wchar_t * wcpncpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' + `wchar.h' (GNU): *Note Copying and Concatenation::. + +`size_t wcrtomb (char *restrict S, wchar_t WC, mbstate_t *restrict PS)' + `wchar.h' (ISO): *Note Converting a Character::. + +`int wcscasecmp (const wchar_t *WS1, const wchar_T *WS2)' + `wchar.h' (GNU): *Note String/Array Comparison::. + +`wchar_t * wcscat (wchar_t *restrict WTO, const wchar_t *restrict WFROM)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`wchar_t * wcschr (const wchar_t *WSTRING, int WC)' + `wchar.h' (ISO): *Note Search Functions::. + +`wchar_t * wcschrnul (const wchar_t *WSTRING, wchar_t WC)' + `wchar.h' (GNU): *Note Search Functions::. + +`int wcscmp (const wchar_t *WS1, const wchar_t *WS2)' + `wchar.h' (ISO): *Note String/Array Comparison::. + +`int wcscoll (const wchar_t *WS1, const wchar_t *WS2)' + `wchar.h' (ISO): *Note Collation Functions::. + +`wchar_t * wcscpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`size_t wcscspn (const wchar_t *WSTRING, const wchar_t *STOPSET)' + `wchar.h' (ISO): *Note Search Functions::. + +`wchar_t * wcsdup (const wchar_t *WS)' + `wchar.h' (GNU): *Note Copying and Concatenation::. + +`size_t wcsftime (wchar_t *S, size_t SIZE, const wchar_t *TEMPLATE, const struct tm *BROKENTIME)' + `time.h' (ISO/Amend1): *Note Formatting Calendar Time::. + +`size_t wcslen (const wchar_t *WS)' + `wchar.h' (ISO): *Note String Length::. + +`int wcsncasecmp (const wchar_t *WS1, const wchar_t *S2, size_t N)' + `wchar.h' (GNU): *Note String/Array Comparison::. + +`wchar_t * wcsncat (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`int wcsncmp (const wchar_t *WS1, const wchar_t *WS2, size_t SIZE)' + `wchar.h' (ISO): *Note String/Array Comparison::. + +`wchar_t * wcsncpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`size_t wcsnlen (const wchar_t *WS, size_t MAXLEN)' + `wchar.h' (GNU): *Note String Length::. + +`size_t wcsnrtombs (char *restrict DST, const wchar_t **restrict SRC, size_t NWC, size_t LEN, mbstate_t *restrict PS)' + `wchar.h' (GNU): *Note Converting Strings::. + +`wchar_t * wcspbrk (const wchar_t *WSTRING, const wchar_t *STOPSET)' + `wchar.h' (ISO): *Note Search Functions::. + +`wchar_t * wcsrchr (const wchar_t *WSTRING, wchar_t C)' + `wchar.h' (ISO): *Note Search Functions::. + +`size_t wcsrtombs (char *restrict DST, const wchar_t **restrict SRC, size_t LEN, mbstate_t *restrict PS)' + `wchar.h' (ISO): *Note Converting Strings::. + +`size_t wcsspn (const wchar_t *WSTRING, const wchar_t *SKIPSET)' + `wchar.h' (ISO): *Note Search Functions::. + +`wchar_t * wcsstr (const wchar_t *HAYSTACK, const wchar_t *NEEDLE)' + `wchar.h' (ISO): *Note Search Functions::. + +`double wcstod (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR)' + `wchar.h' (ISO): *Note Parsing of Floats::. + +`float wcstof (const wchar_t *STRING, wchar_t **TAILPTR)' + `stdlib.h' (ISO): *Note Parsing of Floats::. + +`intmax_t wcstoimax (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (ISO): *Note Parsing of Integers::. + +`wchar_t * wcstok (wchar_t *NEWSTRING, const char *DELIMITERS)' + `wchar.h' (ISO): *Note Finding Tokens in a String::. + +`long int wcstol (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (ISO): *Note Parsing of Integers::. + +`long double wcstold (const wchar_t *STRING, wchar_t **TAILPTR)' + `stdlib.h' (ISO): *Note Parsing of Floats::. + +`long long int wcstoll (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (ISO): *Note Parsing of Integers::. + +`size_t wcstombs (char *STRING, const wchar_t *WSTRING, size_t SIZE)' + `stdlib.h' (ISO): *Note Non-reentrant String Conversion::. + +`long long int wcstoq (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (GNU): *Note Parsing of Integers::. + +`unsigned long int wcstoul (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (ISO): *Note Parsing of Integers::. + +`unsigned long long int wcstoull (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (ISO): *Note Parsing of Integers::. + +`uintmax_t wcstoumax (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (ISO): *Note Parsing of Integers::. + +`unsigned long long int wcstouq (const wchar_t *restrict STRING, wchar_t **restrict TAILPTR, int BASE)' + `wchar.h' (GNU): *Note Parsing of Integers::. + +`wchar_t * wcswcs (const wchar_t *HAYSTACK, const wchar_t *NEEDLE)' + `wchar.h' (XPG): *Note Search Functions::. + +`size_t wcsxfrm (wchar_t *restrict WTO, const wchar_t *WFROM, size_t SIZE)' + `wchar.h' (ISO): *Note Collation Functions::. + +`int wctob (wint_t C)' + `wchar.h' (ISO): *Note Converting a Character::. + +`int wctomb (char *STRING, wchar_t WCHAR)' + `stdlib.h' (ISO): *Note Non-reentrant Character Conversion::. + +`wctrans_t wctrans (const char *PROPERTY)' + `wctype.h' (ISO): *Note Wide Character Case Conversion::. + +`wctrans_t' + `wctype.h' (ISO): *Note Wide Character Case Conversion::. + +`wctype_t wctype (const char *PROPERTY)' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`wctype_t' + `wctype.h' (ISO): *Note Classification of Wide Characters::. + +`int WEOF' + `wchar.h' (ISO): *Note EOF and Errors::. + +`wint_t WEOF' + `wchar.h' (ISO): *Note Extended Char Intro::. + +`int WEXITSTATUS (int STATUS)' + `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +`int WIFEXITED (int STATUS)' + `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +`int WIFSIGNALED (int STATUS)' + `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +`int WIFSTOPPED (int STATUS)' + `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +`wint_t' + `wchar.h' (ISO): *Note Extended Char Intro::. + +`wchar_t * wmemchr (const wchar_t *BLOCK, wchar_t WC, size_t SIZE)' + `wchar.h' (ISO): *Note Search Functions::. + +`int wmemcmp (const wchar_t *A1, const wchar_t *A2, size_t SIZE)' + `wcjar.h' (ISO): *Note String/Array Comparison::. + +`wchar_t * wmemcpy (wchar_t *restrict WTO, const wchar_t *restruct WFROM, size_t SIZE)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`wchar_t * wmemmove (wchar *WTO, const wchar_t *WFROM, size_t SIZE)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`wchar_t * wmempcpy (wchar_t *restrict WTO, const wchar_t *restrict WFROM, size_t SIZE)' + `wchar.h' (GNU): *Note Copying and Concatenation::. + +`wchar_t * wmemset (wchar_t *BLOCK, wchar_t WC, size_t SIZE)' + `wchar.h' (ISO): *Note Copying and Concatenation::. + +`int W_OK' + `unistd.h' (POSIX.1): *Note Testing File Access::. + +`int wordexp (const char *WORDS, wordexp_t *WORD-VECTOR-PTR, int FLAGS)' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`wordexp_t' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`void wordfree (wordexp_t *WORD-VECTOR-PTR)' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`int wprintf (const wchar_t *TEMPLATE, ...)' + `wchar.h' (ISO): *Note Formatted Output Functions::. + +`WRDE_APPEND' + `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. + +`WRDE_BADCHAR' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`WRDE_BADVAL' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`WRDE_CMDSUB' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`WRDE_DOOFFS' + `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. + +`WRDE_NOCMD' + `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. + +`WRDE_NOSPACE' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`WRDE_REUSE' + `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. + +`WRDE_SHOWERR' + `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. + +`WRDE_SYNTAX' + `wordexp.h' (POSIX.2): *Note Calling Wordexp::. + +`WRDE_UNDEF' + `wordexp.h' (POSIX.2): *Note Flags for Wordexp::. + +`ssize_t write (int FILEDES, const void *BUFFER, size_t SIZE)' + `unistd.h' (POSIX.1): *Note I/O Primitives::. + +`ssize_t writev (int FILEDES, const struct iovec *VECTOR, int COUNT)' + `sys/uio.h' (BSD): *Note Scatter-Gather::. + +`int wscanf (const wchar_t *TEMPLATE, ...)' + `wchar.h' (ISO): *Note Formatted Input Functions::. + +`int WSTOPSIG (int STATUS)' + `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +`int WTERMSIG (int STATUS)' + `sys/wait.h' (POSIX.1): *Note Process Completion Status::. + +`int X_OK' + `unistd.h' (POSIX.1): *Note Testing File Access::. + +`_XOPEN_SOURCE' + (X/Open): *Note Feature Test Macros::. + +`_XOPEN_SOURCE_EXTENDED' + (X/Open): *Note Feature Test Macros::. + +`double y0 (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float y0f (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double y0l (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`double y1 (double X)' + `math.h' (SVID): *Note Special Functions::. + +`float y1f (float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double y1l (long double X)' + `math.h' (SVID): *Note Special Functions::. + +`double yn (int n, double X)' + `math.h' (SVID): *Note Special Functions::. + +`float ynf (int n, float X)' + `math.h' (SVID): *Note Special Functions::. + +`long double ynl (int n, long double X)' + `math.h' (SVID): *Note Special Functions::. diff -durpN glibc-2.2.4/manual/libc.info-54 glibc-2.2.5/manual/libc.info-54 --- glibc-2.2.4/manual/libc.info-54 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-54 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,905 +33,998 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Contributors, Next: Copying, Prev: Maintenance, Up: Top +File: libc.info, Node: Installation, Next: Maintenance, Prev: Library Summary, Up: Top -Contributors to the GNU C Library -********************************* +Installing the GNU C Library +**************************** - The GNU C library was written originally by Roland McGrath, and is -currently maintained by Ulrich Drepper. Some parts of the library were -contributed or worked on by other people. + Before you do anything else, you should read the file `FAQ' found at +the top level of the source tree. This file answers common questions +and describes problems you may experience with compilation and +installation. It is updated more frequently than this manual. - * The `getopt' function and related code was written by Richard - Stallman, David J. MacKenzie, and Roland McGrath. + Features can be added to GNU Libc via "add-on" bundles. These are +separate tarfiles which you unpack into the top level of the source +tree. Then you give `configure' the `--enable-add-ons' option to +activate them, and they will be compiled into the library. As of the +2.2 release, one important component of glibc is distributed as +"official" add-ons: the linuxthreads add-on. Unless you are doing an +unusual installation, you should get this. - * The merge sort function `qsort' was written by Michael J. Haertel. + Support for POSIX threads is maintained by someone else, so it's in a +separate package. It is only available for Linux systems, but this will +change in the future. Get it from the same place you got the main +bundle; the file is `glibc-linuxthreads-VERSION.tar.gz'. - * The quick sort function used as a fallback by `qsort' was written - by Douglas C. Schmidt. + You will need recent versions of several GNU tools: definitely GCC +and GNU Make, and possibly others. *Note Tools for Compilation::, +below. - * The memory allocation functions `malloc', `realloc' and `free' and - related code were written by Michael J. Haertel, Wolfram Gloger, - and Doug Lea. +* Menu: - * Fast implementations of many of the string functions (`memcpy', - `strlen', etc.) were written by Torbjo"rn Granlund. +* Configuring and compiling:: How to compile and test GNU libc. +* Running make install:: How to install it once you've got it compiled. +* Tools for Compilation:: You'll need these first. +* Supported Configurations:: What it runs on, what it doesn't. +* Linux:: Specific advice for Linux systems. +* Reporting Bugs:: So they'll get fixed. - * The `tar.h' header file was written by David J. MacKenzie. + +File: libc.info, Node: Configuring and compiling, Next: Running make install, Up: Installation - * The port to the MIPS DECStation running Ultrix 4 - (`mips-dec-ultrix4') was contributed by Brendan Kehoe and Ian - Lance Taylor. +Configuring and compiling GNU Libc +================================== - * The DES encryption function `crypt' and related functions were - contributed by Michael Glad. + GNU libc can be compiled in the source directory, but we strongly +advise to build it in a separate build directory. For example, if you +have unpacked the glibc sources in `/src/gnu/glibc-2.2.0', create a +directory `/src/gnu/glibc-build' to put the object files in. This +allows removing the whole build directory in case an error occurs, +which is the safest way to get a fresh start and should always be done. - * The `ftw' and `nftw' functions were contributed by Ulrich Drepper. + From your object directory, run the shell script `configure' found +at the top level of the source tree. In the scenario above, you'd type - * The startup code to support SunOS shared libraries was contributed - by Tom Quinn. + $ ../glibc-2.2.0/configure ARGS... - * The `mktime' function was contributed by Paul Eggert. + Please note that even if you're building in a separate build +directory, the compilation needs to modify a few files in the source +directory, especially some files in the manual subdirectory. - * The port to the Sequent Symmetry running Dynix version 3 - (`i386-sequent-bsd') was contributed by Jason Merrill. +`configure' takes many options, but you can get away with knowing only +two: `--prefix' and `--enable-add-ons'. The `--prefix' option tells +configure where you want glibc installed. This defaults to +`/usr/local'. The `--enable-add-ons' option tells configure to use all +the add-on bundles it finds in the source directory. Since important +functionality is provided in add-ons, you should always specify this +option. - * The timezone support code is derived from the public-domain - timezone package by Arthur David Olson and his many contributors. + It may also be useful to set the CC and CFLAGS variables in the +environment when running `configure'. CC selects the C compiler that +will be used, and CFLAGS sets optimization options for the compiler. - * The port to the DEC Alpha running OSF/1 (`alpha-dec-osf1') was - contributed by Brendan Kehoe, using some code written by Roland - McGrath. + The following list describes all of the available options for +`configure': - * The port to SGI machines running Irix 4 (`mips-sgi-irix4') was - contributed by Tom Quinn. +`--prefix=DIRECTORY' + Install machine-independent data files in subdirectories of + `DIRECTORY'. The default is to install in `/usr/local'. - * The port of the Mach and Hurd code to the MIPS architecture - (`mips-ANYTHING-gnu') was contributed by Kazumoto Kojima. +`--exec-prefix=DIRECTORY' + Install the library and other machine-dependent files in + subdirectories of `DIRECTORY'. The default is to the `--prefix' + directory if that option is specified, or `/usr/local' otherwise. - * The floating-point printing function used by `printf' and friends - and the floating-point reading function used by `scanf', `strtod' - and friends were written by Ulrich Drepper. The multi-precision - integer functions used in those functions are taken from GNU MP, - which was contributed by Torbjo"rn Granlund. +`--with-headers=DIRECTORY' + Look for kernel header files in DIRECTORY, not `/usr/include'. + Glibc needs information from the kernel's private header files. + It will normally look in `/usr/include' for them, but if you + specify this option, it will look in DIRECTORY instead. - * The internationalization support in the library, and the support - programs `locale' and `localedef', were written by Ulrich Drepper. - Ulrich Drepper adapted the support code for message catalogs - (`libintl.h', etc.) from the GNU `gettext' package, which he also - wrote. He also contributed the `catgets' support and the entire - suite of multi-byte and wide-character support functions - (`wctype.h', `wchar.h', etc.). + This option is primarily of use on a system where the headers in + `/usr/include' come from an older version of glibc. Conflicts can + occasionally happen in this case. Note that Linux libc5 qualifies + as an older version of glibc. You can also use this option if you + want to compile glibc with a newer set of kernel headers than the + ones found in `/usr/include'. - * The implementations of the `nsswitch.conf' mechanism and the files - and DNS backends for it were designed and written by Ulrich - Drepper and Roland McGrath, based on a backend interface defined - by Peter Eriksson. +`--enable-add-ons[=LIST]' + Enable add-on packages in your source tree. If this option is + specified with no list, it enables all the add-on packages it + finds. If you do not wish to use some add-on package that you + have present in your source tree, give this option a list of the + add-ons that you _do_ want used, like this: + `--enable-add-ons=linuxthreads' - * The port to Linux i386/ELF (`i386-ANYTHING-linux') was contributed - by Ulrich Drepper, based in large part on work done in Hongjiu - Lu's Linux version of the GNU C Library. +`--enable-kernel=VERSION' + This option is currently only useful on Linux systems. The + VERSION parameter should have the form X.Y.Z and describes the + smallest version of the Linux kernel the generated library is + expected to support. The higher the VERSION number is, the less + compatibility code is added, and the faster the code gets. - * The port to Linux/m68k (`m68k-ANYTHING-linux') was contributed by - Andreas Schwab. +`--with-binutils=DIRECTORY' + Use the binutils (assembler and linker) in `DIRECTORY', not the + ones the C compiler would default to. You could use this option if + the default binutils on your system cannot deal with all the + constructs in the GNU C library. In that case, `configure' will + detect the problem and suppress these constructs, so that the + library will still be usable, but functionality may be lost--for + example, you can't build a shared libc with old binutils. - * The ports to Linux/ARM (`arm-ANYTHING-linuxaout') and ARM - standalone (`arm-ANYTHING-none'), as well as parts of the IPv6 - support code, were contributed by Philip Blundell. +`--without-fp' + Use this option if your computer lacks hardware floating-point + support and your operating system does not emulate an FPU. - * Richard Henderson contributed the ELF dynamic linking code and - other support for the Alpha processor. +`--disable-shared' + Don't build shared libraries even if it is possible. Not all + systems support shared libraries; you need ELF support and + (currently) the GNU linker. - * David Mosberger-Tang contributed the port to Linux/Alpha - (`alpha-ANYTHING-linux'). +`--disable-profile' + Don't build libraries with profiling information. You may want to + use this option if you don't plan to do profiling. - * The port to Linux on PowerPC (`powerpc-ANYTHING-linux') was - contributed by Geoffrey Keating. +`--enable-omitfp' + Use maximum optimization for the normal (static and shared) + libraries, and compile separate static libraries with debugging + information and no optimization. We recommend against this. The + extra optimization doesn't gain you much, it may provoke compiler + bugs, and you won't be able to trace bugs through the C library. - * Miles Bader wrote the argp argument-parsing package, and the - argz/envz interfaces. +`--disable-versioning' + Don't compile the shared libraries with symbol version information. + Doing this will make the resulting library incompatible with old + binaries, so it's not recommended. - * Stephen R. van den Berg contributed a highly-optimized `strstr' - function. +`--enable-static-nss' + Compile static versions of the NSS (Name Service Switch) libraries. + This is not recommended because it defeats the purpose of NSS; a + program linked statically with the NSS libraries cannot be + dynamically reconfigured to use a different name database. - * Ulrich Drepper contributed the `hsearch' and `drand48' families of - functions; reentrant `...`_r'' versions of the `random' family; - System V shared memory and IPC support code; and several - highly-optimized string functions for iX86 processors. +`--build=BUILD-SYSTEM' +`--host=HOST-SYSTEM' + These options are for cross-compiling. If you specify both + options and BUILD-SYSTEM is different from HOST-SYSTEM, `configure' + will prepare to cross-compile glibc from BUILD-SYSTEM to be used + on HOST-SYSTEM. You'll probably need the `--with-headers' option + too, and you may have to override CONFIGURE's selection of the + compiler and/or binutils. - * The math functions are taken from `fdlibm-5.1' by Sun - Microsystems, as modified by J.T. Conklin, Ian Lance Taylor, - Ulrich Drepper, Andreas Schwab, and Roland McGrath. + If you only specify `--host', configure will prepare for a native + compile but use what you specify instead of guessing what your + system is. This is most useful to change the CPU submodel. For + example, if configure guesses your machine as `i586-pc-linux-gnu' + but you want to compile a library for 386es, give + `--host=i386-pc-linux-gnu' or just `--host=i386-linux' and add the + appropriate compiler flags (`-mcpu=i386' will do the trick) to + CFLAGS. - * The `libio' library used to implement `stdio' functions on some - platforms was written by Per Bothner and modified by Ulrich - Drepper. + If you specify just `--build', configure will get confused. - * Eric Youngdale and Ulrich Drepper implemented versioning of - objects on symbol level. + To build the library and related programs, type `make'. This will +produce a lot of output, some of which may look like errors from `make' +but isn't. Look for error messages from `make' containing `***'. +Those indicate that something is really wrong. - * Thorsten Kukuk provided an implementation for NIS (YP) and NIS+, - securelevel 0, 1 and 2. + The compilation process takes several hours even on fast hardware. +Expect at least two hours for the default configuration on i586 for +Linux. For Hurd times are much longer. Except for EGCS 1.1 and GCC +2.95 (and later versions of GCC), all supported versions of GCC have a +problem which causes them to take several minutes to compile certain +files in the iconvdata directory. Do not panic if the compiler appears +to hang. - * Andreas Jaeger provided a test suite for the math library. + If you want to run a parallel make, you can't just give `make' the +`-j' option, because it won't be passed down to the sub-makes. +Instead, edit the generated `Makefile' and uncomment the line - * Mark Kettenis implemented the utmpx interface and an utmp daemon. + # PARALLELMFLAGS = -j 4 - * Ulrich Drepper added character conversion functions (`iconv'). +You can change the `4' to some other number as appropriate for your +system. Instead of changing the `Makefile', you could give this option +directly to `make' and call it as, for example, `make +PARALLELMFLAGS=-j4'. If you're building in the source directory, you +must use the latter approach since in this case no new `Makefile' is +generated for you to change. - * Thorsten Kukuk provided an implementation for a caching daemon for - NSS (nscd). + To build and run test programs which exercise some of the library +facilities, type `make check'. If it does not complete successfully, +do not use the built library, and report a bug after verifying that the +problem is not already known. *Note Reporting Bugs::, for instructions +on reporting bugs. Note that some of the tests assume they are not +being run by `root'. We recommend you compile and test glibc as an +unprivileged user. - * Tim Waugh provided an implementation of the POSIX.2 wordexp - function family. + To format the `GNU C Library Reference Manual' for printing, type +`make dvi'. You need a working TeX installation to do this. The +distribution already includes the on-line formatted version of the +manual, as Info files. You can regenerate those with `make info', but +it shouldn't be necessary. - * Mark Kettenis provided a Hesiod NSS module. + The library has a number of special-purpose configuration parameters +which you can find in `Makeconfig'. These can be overwritten with the +file `configparms'. To change them, create a `configparms' in your +build directory and add values as appropriate for your system. The +file is included and parsed by `make' and has to follow the conventions +for makefiles. - * 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. + It is easy to configure the GNU C library for cross-compilation by +setting a few variables in `configparms'. Set `CC' to the +cross-compiler for the target you configured the library for; it is +important to use this same `CC' value when running `configure', like +this: `CC=TARGET-gcc configure TARGET'. Set `BUILD_CC' to the compiler +to use for for programs run on the build system as part of compiling +the library. You may need to set `AR' and `RANLIB' to cross-compiling +versions of `ar' and `ranlib' if the native tools are not configured to +work with object files for the target you configured for. - All code incorporated from 4.4 BSD is under the following - copyright: + +File: libc.info, Node: Running make install, Next: Tools for Compilation, Prev: Configuring and compiling, Up: Installation - Copyright (C) 1991 Regents of the University of California. - All rights reserved. +Installing the C Library +======================== - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the - following conditions are met: + To install the library and its header files, and the Info files of +the manual, type `env LANGUAGE=C LC_ALL=C make install'. This will +build things if necessary, before installing them. However, you should +still compile everything first. If you are installing glibc as your +primary C library, we recommend that you shut the system down to +single-user mode first, and reboot afterward. This minimizes the risk +of breaking things when the library changes out from underneath. - 1. Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. + If you're upgrading from Linux libc5 or some other C library, you +need to replace the `/usr/include' with a fresh directory before +installing it. The new `/usr/include' should contain the Linux +headers, but nothing else. - 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. + You must first build the library (`make'), optionally check it +(`make check'), switch the include directories and then install (`make +install'). The steps must be done in this order. Not moving the +directory before install will result in an unusable mixture of header +files from both libraries, but configuring, building, and checking the +library requires the ability to compile and run programs against the old +library. - 3. [This condition was removed.] + If you are upgrading from a previous installation of glibc 2.0 or +2.1, `make install' will do the entire job. You do not need to remove +the old includes - if you want to do so anyway you must then follow the +order given above. - 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. + You may also need to reconfigure GCC to work with the new library. +The easiest way to do that is to figure out the compiler switches to +make it work again (`-Wl,--dynamic-linker=/lib/ld-linux.so.2' should +work on Linux systems) and use them to recompile gcc. You can also +edit the specs file (`/usr/lib/gcc-lib/TARGET/VERSION/specs'), but that +is a bit of a black art. - 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. + You can install glibc somewhere other than where you configured it +to go by setting the `install_root' variable on the command line for +`make install'. The value of this variable is prepended to all the +paths for installation. This is useful when setting up a chroot +environment or preparing a binary distribution. The directory should be +specified with an absolute file name. - * The random number generation functions `random', `srandom', - `setstate' and `initstate', which are also the basis for the - `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 ISO C - standard, but the functional code is Berkeley's. + Glibc 2.2 includes a daemon called `nscd', which you may or may not +want to run. `nscd' caches name service lookups; it can dramatically +improve performance with NIS+, and may help with DNS as well. - * The DNS resolver code is taken directly from BIND 4.9.5, which is - under both the Berkeley copyright above and also: + One auxiliary program, `/usr/libexec/pt_chown', is installed setuid +`root'. This program is invoked by the `grantpt' function; it sets the +permissions on a pseudoterminal so it can be used by the calling +process. This means programs like `xterm' and `screen' do not have to +be setuid to get a pty. (There may be other reasons why they need +privileges.) If you are using a 2.1 or newer Linux kernel with the +`devptsfs' or `devfs' filesystems providing pty slaves, you don't need +this program; otherwise you do. The source for `pt_chown' is in +`login/programs/pt_chown.c'. - Portions Copyright (C) 1993 by Digital Equipment Corporation. + After installation you might want to configure the timezone and +locale installation of your system. The GNU C library comes with a +locale database which gets configured with `localedef'. For example, to +set up a German locale with name `de_DE', simply issue the command +`localedef -i de_DE -f ISO-8859-1 de_DE'. To configure all locales +that are supported by glibc, you can issue from your build directory the +command `make localedata/install-locales'. - Permission to use, copy, modify, and distribute this software - for any purpose with or without fee is hereby granted, - provided that the above copyright notice and this permission - notice appear in all copies, and that the name of Digital - Equipment Corporation not be used in advertising or publicity - pertaining to distribution of the document or software - without specific, written prior permission. + To configure the locally used timezone, you can either set the `TZ' +environment variable. The script `tzselect' helps you to select the +right value. As an example for Germany, tzselect would tell you to use +`TZ='Europe/Berlin''. For a system wide installation (the given paths +are for an installation with `--prefix=/usr'), link the timezone file +which is in `/usr/share/zoneinfo' to the file `/etc/localtime'. For +Germany, you might execute `ln -s /usr/share/zoneinfo/Europe/Berlin +/etc/localtime'. - THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE - LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +File: libc.info, Node: Tools for Compilation, Next: Supported Configurations, Prev: Running make install, Up: Installation - * The code to support Sun RPC is taken verbatim from Sun's - RPCSRC-4.0 distribution, and is covered by this copyright: +Recommended Tools for Compilation +================================= - Copyright (C) 1984, Sun Microsystems, Inc. + We recommend installing the following GNU tools before attempting to +build the GNU C library: - Sun RPC is a product of Sun Microsystems, Inc. and is - provided for unrestricted use provided that this legend is - included on all tape media and as a part of the software - program in whole or part. Users may copy or modify Sun RPC - without charge, but are not authorized to license or - distribute it to anyone else except as part of a product or - program developed by the user. + * GNU `make' 3.79 or newer - SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND - INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND - FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF - DEALING, USAGE OR TRADE PRACTICE. + You need the latest version of GNU `make'. Modifying the GNU C + Library to work with other `make' programs would be so difficult + that we recommend you port GNU `make' instead. *Really.* We + recommend version GNU `make' version 3.79. All earlier versions + have severe bugs or lack features. - Sun RPC is provided with no support and without any - obligation on the part of Sun Microsystems, Inc. to assist in - its use, correction, modification or enhancement. + * GCC 2.95 or newer - SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT - TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY - PATENTS BY SUN RPC OR ANY PART THEREOF. + The GNU C library can only be compiled with the GNU C compiler + family. As of the 2.2 release, GCC 2.95.2 or higher is required. + As of this writing, GCC 2.95.3 is the compiler we advise to use. - In no event will Sun Microsystems, Inc. be liable for any - lost revenue or profits or other special, indirect and - consequential damages, even if Sun has been advised of the - possibility of such damages. + You can use whatever compiler you like to compile programs that + use GNU libc, but be aware that both GCC 2.7 and 2.8 have bugs in + their floating-point support that may be triggered by the math + library. - Sun Microsystems, Inc. - 2550 Garcia Avenue - Mountain View, California 94043 + For PPC you might need some patches even on top of the last GCC + version. See the FAQ. - * Some of the support code for Mach is taken from Mach 3.0 by CMU, - and is under the following copyright terms: + * GNU `binutils' 2.10.1 or later - Mach Operating System - Copyright (C) 1991,1990,1989 Carnegie Mellon University - All Rights Reserved. + You must use GNU binutils (as and ld) if you want to build a shared + library. Even if you don't, we recommend you use them anyway. No + one has tested compilation with non-GNU binutils in a long time. - Permission to use, copy, modify and distribute this software - and its documentation is hereby granted, provided that both - the copyright notice and this permission notice appear in all - copies of the software, derivative works or modified - versions, and any portions thereof, and that both notices - appear in supporting documentation. + The quality of binutils releases has varied a bit recently. The + bugs are in obscure features, but glibc uses quite a few of those. + 2.10.1 and later releases are known to work. Versions after + 2.8.1.0.23 may or may not work. Older versions definitely don't. - CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS - IS" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF - ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF - THIS SOFTWARE. + For PPC you might need some patches even on top of the last + binutils version. See the FAQ. - Carnegie Mellon requests users of this software to return to + * GNU `texinfo' 3.12f - Software Distribution Coordinator - School of Computer Science - Carnegie Mellon University - Pittsburgh PA 15213-3890 + To correctly translate and install the Texinfo documentation you + need this version of the `texinfo' package. Earlier versions do + not understand all the tags used in the document, and the + installation mechanism for the info files is not present or works + differently. - or any improvements or - extensions that they make and grant Carnegie Mellon the - rights to redistribute these changes. + * GNU `awk' 3.0, or some other POSIX awk - * The code for the database library `libdb' comes from the 2.3 - release of Berkeley DB. That code is under the same copyright as - 4.4 BSD and also: + Awk is used in several places to generate files. The scripts + should work with any POSIX-compliant awk implementation; `gawk' + 3.0 and `mawk' 1.3 are known to work. - Copyright (C) 1990, 1993, 1994, 1995, 1996, 1997 - Sleepycat Software. All rights reserved. + * Perl 5 - Redistribution and use in source and binary forms, with or - without modification, are permitted provided that the - following conditions are met: + Perl is not required, but it is used if present to test the + installation. We may decide to use it elsewhere in the future. - 1. Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. + * GNU `sed' 3.02 or newer - 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. + Sed is used in several places to generate files. Most scripts + work with any version of `sed'. The known exception is the script + `po2test.sed' in the `intl' subdirectory which is used to generate + `msgs.h' for the testsuite. This script works correctly only with + GNU `sed' 3.02. If you like to run the testsuite, you should + definitely upgrade `sed'. - 3. Redistributions in any form must be accompanied by - information on how to obtain complete source code for - the DB software and any accompanying software that uses - the DB software. The source code must either be - included in the distribution or be available for no more - than the cost of distribution plus a nominal fee, and - must be freely redistributable under reasonable - conditions. For an executable file, complete source - code means the source code for all modules it contains. - It does not mean source code for modules or files that - typically accompany the operating system on which the - executable file runs, e.g., standard library modules or - system header files. - THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE "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 - SLEEPYCAT SOFTWARE 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 you change any of the `configure.in' files you will also need - Portions copyright (C) 1995, 1996 - The President and Fellows of Harvard University. - All rights reserved. + * GNU `autoconf' 2.12 or higher - 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. +and if you change any of the message translation files you will need - 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. + * GNU `gettext' 0.10.36 or later - 3. All advertising materials mentioning features or use of - this software must display the following acknowledgement: - This product includes software developed by - Harvard University and its contributors. +You may also need these packages if you upgrade your source tree using +patches, although we try to avoid this. - 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. + +File: libc.info, Node: Supported Configurations, Next: Linux, Prev: Tools for Compilation, Up: Installation - THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS 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 HARVARD OR ITS 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. +Supported Configurations +======================== - For a license to use, redistribute or sell DB software under - conditions other than those described above, or to purchase - support for this software, please contact Sleepycat Software - at + The GNU C Library currently supports configurations that match the +following patterns: - Sleepycat Software - 394 E. Riding Dr. - Carlisle, MA 01741 - USA - +1-508-287-4781 + alpha*-*-linux + arm-*-linux + cris-*-linux + hppa-*-linux + iX86-*-gnu + iX86-*-linux + ia64-*-linux + m68k-*-linux + mips*-*-linux + powerpc-*-linux + s390-*-linux + s390x-*-linux + sparc-*-linux + sparc64-*-linux - or . + Former releases of this library (version 2.1 and/or 2.0) used to run +on the following configurations: + + arm-*-linuxaout + arm-*-none + + Very early releases (version 1.09.1 and perhaps earlier versions) +used to run on the following configurations: + alpha-dec-osf1 + alpha-*-linuxecoff + iX86-*-bsd4.3 + iX86-*-isc2.2 + iX86-*-isc3.N + iX86-*-sco3.2 + iX86-*-sco3.2v4 + iX86-*-sysv + iX86-*-sysv4 + iX86-force_cpu386-none + iX86-sequent-bsd + i960-nindy960-none + m68k-hp-bsd4.3 + m68k-mvme135-none + m68k-mvme136-none + m68k-sony-newsos3 + m68k-sony-newsos4 + m68k-sun-sunos4.N + mips-dec-ultrix4.N + mips-sgi-irix4.N + sparc-sun-solaris2.N + sparc-sun-sunos4.N + Since no one has volunteered to test and fix these configurations, +they are not supported at the moment. They probably don't compile; +they definitely 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 . + + Valid cases of `iX86' include `i386', `i486', `i586', and `i686'. +All of those configurations produce a library that can run on this +processor and newer processors. The GCC compiler by default generates +code that's optimized for the machine it's configured for and will use +the instructions available on that machine. For example if your GCC is +configured for `i686', gcc will optimize for `i686' and might issue +some `i686' specific instructions. To generate code for other models, +you have to configure for that model and give GCC the appropriate +`-march=' and `-mcpu=' compiler switches via CFLAGS.  -File: libc.info, Node: Copying, Next: Documentation License, Prev: Contributors, Up: Top +File: libc.info, Node: Linux, Next: Reporting Bugs, Prev: Supported Configurations, Up: Installation -GNU Lesser General Public License -********************************* +Specific advice for Linux systems +================================= - Version 2.1, February 1999 - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - [This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence the - version number 2.1.] + If you are installing GNU libc on a Linux system, you need to have +the header files from a 2.2 or newer kernel around for reference. For +some architectures, like ia64, sh and hppa, you need at least headers +from kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64). You do not need to +use that kernel, just have its headers where glibc can access at them. +The easiest way to do this is to unpack it in a directory such as +`/usr/src/linux-2.2.1'. In that directory, run `make config' and +accept all the defaults. Then run `make include/linux/version.h'. +Finally, configure glibc with the option +`--with-headers=/usr/src/linux-2.2.1/include'. Use the most recent +kernel you can get your hands on. -Preamble --------- + An alternate tactic is to unpack the 2.2 kernel and run `make +config' as above. Then rename or delete `/usr/include', create a new +`/usr/include', and make the usual symbolic links of +`/usr/include/linux' and `/usr/include/asm' into the 2.2 kernel +sources. You can then configure glibc with no special options. This +tactic is recommended if you are upgrading from libc5, since you need +to get rid of the old header files anyway. - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. + Note that `/usr/include/net' and `/usr/include/scsi' should *not* be +symlinks into the kernel sources. GNU libc provides its own versions +of these files. - This license, the Lesser General Public License, applies to some -specially designated software--typically libraries--of the Free -Software Foundation and other authors who decide to use it. You can use -it too, but we suggest you first think carefully about whether this -license or the ordinary General Public License is the better strategy to -use in any particular case, based on the explanations below. + Linux expects some components of the libc installation to be in +`/lib' and some in `/usr/lib'. This is handled automatically if you +configure glibc with `--prefix=/usr'. If you set some other prefix or +allow it to default to `/usr/local', then all the components are +installed there. - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of it -in new free programs; and that you are informed that you can do these -things. + If you are upgrading from libc5, you need to recompile every shared +library on your system against the new library for the sake of new code, +but keep the old libraries around for old binaries to use. This is +complicated and difficult. Consult the Glibc2 HOWTO at + for details. - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. + You cannot use `nscd' with 2.0 kernels, due to bugs in the +kernel-side thread support. `nscd' happens to hit these bugs +particularly hard, but you might have problems with any threaded +program. - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. + +File: libc.info, Node: Reporting Bugs, Prev: Linux, Up: Installation - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. +Reporting Bugs +============== - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know that -what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. + There are probably bugs in the GNU C library. There are certainly +errors and omissions in this manual. If you report them, they will get +fixed. If you don't, no one will ever know about them and they will +remain unfixed for all eternity, if not longer. - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. + It is a good idea to verify that the problem has not already been +reported. Bugs are documented in two places: The file `BUGS' describes +a number of well known bugs and the bug tracking system has a WWW +interface at . The +WWW interface gives you access to open and closed reports. The closed +reports normally include a patch or a hint on solving the problem. - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and is -quite different from the ordinary General Public License. We use this -license for certain libraries in order to permit linking those -libraries into non-free programs. + To report a bug, first you must find it. Hopefully, this will be the +hard part. Once you've found a bug, make sure it's really a bug. A +good way to do this is to see if the GNU C library behaves the same way +some other C library does. If so, probably you are wrong and the +libraries are right (but not necessarily). If not, one of the libraries +is probably wrong. It might not be the GNU library. Many historical +Unix C libraries permit things that we don't, such as closing a file +twice. - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. + If you think you have found some way in which the GNU C library does +not conform to the ISO and POSIX standards (*note Standards and +Portability::), that is definitely a bug. Report it! - We call this license the "Lesser" General Public License because it -does _Less_ to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. + Once you're sure you've found a bug, try to narrow it down to the +smallest test case that reproduces the problem. In the case of a C +library, you really only need to narrow it down to one library function +call, if possible. This should not be too difficult. - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. + The final step when you have a simple test case is to report the bug. +Do this using the `glibcbug' script. It is installed with libc, or if +you haven't installed it, will be in your build directory. Send your +test case, the results you got, the results you expected, and what you +think the problem might be (if you've thought of anything). `glibcbug' +will insert the configuration information we need to see, and ship the +report off to . Don't send a message there directly; it +is fed to a program that expects mail to be formatted in a particular +way. Use the script. - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of free -software. For example, permission to use the GNU C Library in non-free -programs enables many more people to use the whole GNU operating -system, as well as its variant, the GNU/Linux operating system. + If you are not sure how a function should behave, and this manual +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 . If you refer to specific sections +of the manual, please include the section names for easier +identification. - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run that -program using a modified version of the Library. + +File: libc.info, Node: Maintenance, Next: Contributors, Prev: Installation, Up: Top - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. +Library Maintenance +******************* - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License Agreement applies to any software library or other - program which contains a notice placed by the copyright holder or - other authorized party saying it may be distributed under the - terms of this Lesser General Public License (also called "this - License"). Each licensee is addressed as "you". +* Menu: - A "library" means a collection of software functions and/or data - prepared so as to be conveniently linked with application programs - (which use some of those functions and data) to form executables. +* Source Layout:: How to add new functions or header files + to the GNU C library. +* Porting:: How to port the GNU C library to + a new machine or operating system. - The "Library", below, refers to any such software library or work - which has been distributed under these terms. A "work based on the - Library" means either the Library or any derivative work under - copyright law: that is to say, a work containing the Library or a - portion of it, either verbatim or with modifications and/or - translated straightforwardly into another language. (Hereinafter, - translation is included without limitation in the term - "modification".) + +File: libc.info, Node: Source Layout, Next: Porting, Up: Maintenance - "Source code" for a work means the preferred form of the work for - making modifications to it. For a library, complete source code - means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the library. +Adding New Functions +==================== - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running a program using the Library is not restricted, and - output from such a program is covered only if its contents - constitute a work based on the Library (independent of the use of - the Library in a tool for writing it). Whether that is true - depends on what the Library does and what the program that uses - the Library does. + The process of building the library is driven by the makefiles, which +make heavy use of special features of GNU `make'. The makefiles are +very complex, and you probably don't want to try to understand them. +But what they do is fairly straightforward, and only requires that you +define a few variables in the right places. - 1. You may copy and distribute verbatim copies of the Library's - complete source code as you receive it, in any medium, provided - that you conspicuously and appropriately publish on each copy an - appropriate copyright notice and disclaimer of warranty; keep - intact all the notices that refer to this License and to the - absence of any warranty; and distribute a copy of this License - along with the Library. + The library sources are divided into subdirectories, grouped by +topic. - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. + The `string' subdirectory has all the string-manipulation functions, +`math' has all the mathematical functions, etc. - 2. You may modify your copy or copies of the Library or any portion - of it, thus forming a work based on the Library, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: + Each subdirectory contains a simple makefile, called `Makefile', +which defines a few `make' variables and then includes the global +makefile `Rules' with a line like: - a. The modified work must itself be a software library. + include ../Rules - b. You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. +The basic variables that a subdirectory makefile defines are: - c. You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. +`subdir' + The name of the subdirectory, for example `stdio'. This variable + *must* be defined. - d. If a facility in the modified Library refers to a function or - a table of data to be supplied by an application program that - uses the facility, other than as an argument passed when the - facility is invoked, then you must make a good faith effort - to ensure that, in the event an application does not supply - such function or table, the facility still operates, and - performs whatever part of its purpose remains meaningful. +`headers' + The names of the header files in this section of the library, such + as `stdio.h'. - (For example, a function in a library to compute square roots - has a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function - must be optional: if the application does not supply it, the - square root function must still compute square roots.) +`routines' +`aux' + The names of the modules (source files) in this section of the + library. These should be simple names, such as `strlen' (rather + than complete file names, such as `strlen.c'). Use `routines' for + modules that define functions in the library, and `aux' for + auxiliary modules containing things like data definitions. But the + values of `routines' and `aux' are just concatenated, so there + really is no practical difference. - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Library, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not - apply to those sections when you distribute them as separate - works. But when you distribute the same sections as part of a - whole which is a work based on the Library, the distribution of - the whole must be on the terms of this License, whose permissions - for other licensees extend to the entire whole, and thus to each - and every part regardless of who wrote it. +`tests' + The names of test programs for this section of the library. These + should be simple names, such as `tester' (rather than complete file + names, such as `tester.c'). `make tests' will build and run all + the test programs. If a test program needs input, put the test + data in a file called `TEST-PROGRAM.input'; it will be given to + the test program on its standard input. If a test program wants + to be run with arguments, put the arguments (all on a single line) + in a file called `TEST-PROGRAM.args'. Test programs should exit + with zero status when the test passes, and nonzero status when the + test indicates a bug in the library or error in building. - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Library. +`others' + The names of "other" programs associated with this section of the + library. These are programs which are not tests per se, but are + other small programs included with the library. They are built by + `make others'. - In addition, mere aggregation of another work not based on the - Library with the Library (or with a work based on the Library) on - a volume of a storage or distribution medium does not bring the - other work under the scope of this License. +`install-lib' +`install-data' +`install' + Files to be installed by `make install'. Files listed in + `install-lib' are installed in the directory specified by `libdir' + in `configparms' or `Makeconfig' (*note Installation::). Files + listed in `install-data' are installed in the directory specified + by `datadir' in `configparms' or `Makeconfig'. Files listed in + `install' are installed in the directory specified by `bindir' in + `configparms' or `Makeconfig'. - 3. You may opt to apply the terms of the ordinary GNU General Public - License instead of this License to a given copy of the Library. - To do this, you must alter all the notices that refer to this - License, so that they refer to the ordinary GNU General Public - License, version 2, instead of to this License. (If a newer - version than version 2 of the ordinary GNU General Public License - has appeared, then you can specify that version instead if you - wish.) Do not make any other change in these notices. +`distribute' + Other files from this subdirectory which should be put into a + distribution tar file. You need not list here the makefile itself + or the source and header files listed in the other standard + variables. Only define `distribute' if there are files used in an + unusual way that should go into the distribution. - Once this change is made in a given copy, it is irreversible for - that copy, so the ordinary GNU General Public License applies to - all subsequent copies and derivative works made from that copy. +`generated' + Files which are generated by `Makefile' in this subdirectory. + These files will be removed by `make clean', and they will never + go into a distribution. - This option is useful when you wish to copy part of the code of - the Library into a program that is not a library. +`extra-objs' + Extra object files which are built by `Makefile' in this + subdirectory. This should be a list of file names like `foo.o'; + the files will actually be found in whatever directory object + files are being built in. These files will be removed by + `make clean'. This variable is used for secondary object files + needed to build `others' or `tests'. - 4. You may copy and distribute the Library (or a portion or - derivative of it, under Section 2) in object code or executable - form under the terms of Sections 1 and 2 above provided that you - accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software - interchange. + +File: libc.info, Node: Porting, Prev: Source Layout, Up: Maintenance - If distribution of object code is made by offering access to copy - from a designated place, then offering equivalent access to copy - the source code from the same place satisfies the requirement to - distribute the source code, even though third parties are not - compelled to copy the source along with the object code. +Porting the GNU C Library +========================= - 5. A program that contains no derivative of any portion of the - Library, but is designed to work with the Library by being - compiled or linked with it, is called a "work that uses the - Library". Such a work, in isolation, is not a derivative work of - the Library, and therefore falls outside the scope of this License. + The GNU C library is written to be easily portable to a variety of +machines and operating systems. Machine- and operating system-dependent +functions are well separated to make it easy to add implementations for +new machines or operating systems. This section describes the layout of +the library source tree and explains the mechanisms used to select +machine-dependent code to use. - However, linking a "work that uses the Library" with the Library - creates an executable that is a derivative of the Library (because - it contains portions of the Library), rather than a "work that - uses the library". The executable is therefore covered by this - License. Section 6 states terms for distribution of such - executables. + All the machine-dependent and operating system-dependent files in the +library are in the subdirectory `sysdeps' under the top-level library +source directory. This directory contains a hierarchy of +subdirectories (*note Hierarchy Conventions::). - When a "work that uses the Library" uses material from a header - file that is part of the Library, the object code for the work may - be a derivative work of the Library even though the source code is - not. Whether this is true is especially significant if the work - can be linked without the Library, or if the work is itself a - library. The threshold for this to be true is not precisely - defined by law. + Each subdirectory of `sysdeps' contains source files for a +particular machine or operating system, or for a class of machine or +operating system (for example, systems by a particular vendor, or all +machines that use IEEE 754 floating-point format). A configuration +specifies an ordered list of these subdirectories. Each subdirectory +implicitly appends its parent directory to the list. For example, +specifying the list `unix/bsd/vax' is equivalent to specifying the list +`unix/bsd/vax unix/bsd unix'. A subdirectory can also specify that it +implies other subdirectories which are not directly above it in the +directory hierarchy. If the file `Implies' exists in a subdirectory, +it lists other subdirectories of `sysdeps' which are appended to the +list, appearing after the subdirectory containing the `Implies' file. +Lines in an `Implies' file that begin with a `#' character are ignored +as comments. For example, `unix/bsd/Implies' contains: + # BSD has Internet-related things. + unix/inet - If such an object file uses only numerical parameters, data - structure layouts and accessors, and small macros and small inline - functions (ten lines or less in length), then the use of the object - file is unrestricted, regardless of whether it is legally a - derivative work. (Executables containing this object code plus - portions of the Library will still fall under Section 6.) +and `unix/Implies' contains: + posix - Otherwise, if the work is a derivative of the Library, you may - distribute the object code for the work under the terms of Section - 6. Any executables containing that work also fall under Section 6, - whether or not they are linked directly with the Library itself. +So the final list is `unix/bsd/vax unix/bsd unix/inet unix posix'. - 6. As an exception to the Sections above, you may also combine or - link a "work that uses the Library" with the Library to produce a - work containing portions of the Library, and distribute that work - under terms of your choice, provided that the terms permit - modification of the work for the customer's own use and reverse - engineering for debugging such modifications. + `sysdeps' has a "special" subdirectory called `generic'. It is +always implicitly appended to the list of subdirectories, so you +needn't put it in an `Implies' file, and you should not create any +subdirectories under it intended to be new specific categories. +`generic' serves two purposes. First, the makefiles do not bother to +look for a system-dependent version of a file that's not in `generic'. +This means that any system-dependent source file must have an analogue +in `generic', even if the routines defined by that file are not +implemented on other platforms. Second. the `generic' version of a +system-dependent file is used if the makefiles do not find a version +specific to the system you're compiling for. - You must give prominent notice with each copy of the work that the - Library is used in it and that the Library and its use are covered - by this License. You must supply a copy of this License. If the - work during execution displays copyright notices, you must include - the copyright notice for the Library among them, as well as a - reference directing the user to the copy of this License. Also, - you must do one of these things: + If it is possible to implement the routines in a `generic' file in +machine-independent C, using only other machine-independent functions in +the C library, then you should do so. Otherwise, make them stubs. A +"stub" function is a function which cannot be implemented on a +particular machine or operating system. Stub functions always return an +error, and set `errno' to `ENOSYS' (Function not implemented). *Note +Error Reporting::. If you define a stub function, you must place the +statement `stub_warning(FUNCTION)', where FUNCTION is the name of your +function, after its definition; also, you must include the file +`' into your file. This causes the function to be listed +in the installed `', and makes GNU ld warn when the +function is used. - a. Accompany the work with the complete corresponding - machine-readable source code for the Library including - whatever changes were used in the work (which must be - distributed under Sections 1 and 2 above); and, if the work - is an executable linked with the Library, with the complete - machine-readable "work that uses the Library", as object code - and/or source code, so that the user can modify the Library - and then relink to produce a modified executable containing - the modified Library. (It is understood that the user who - changes the contents of definitions files in the Library will - not necessarily be able to recompile the application to use - the modified definitions.) + Some rare functions are only useful on specific systems and aren't +defined at all on others; these do not appear anywhere in the +system-independent source code or makefiles (including the `generic' +directory), only in the system-dependent `Makefile' in the specific +system's subdirectory. - b. Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run - time a copy of the library already present on the user's - computer system, rather than copying library functions into - the executable, and (2) will operate properly with a modified - version of the library, if the user installs one, as long as - the modified version is interface-compatible with the version - that the work was made with. + If you come across a file that is in one of the main source +directories (`string', `stdio', etc.), and you want to write a machine- +or operating system-dependent version of it, move the file into +`sysdeps/generic' and write your new implementation in the appropriate +system-specific subdirectory. Note that if a file is to be +system-dependent, it *must not* appear in one of the main source +directories. - c. Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. + There are a few special files that may exist in each subdirectory of +`sysdeps': - d. If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the - above specified materials from the same place. +`Makefile' + A makefile for this machine or operating system, or class of + machine or operating system. This file is included by the library + makefile `Makerules', which is used by the top-level makefile and + the subdirectory makefiles. It can change the variables set in the + including makefile or add new rules. It can use GNU `make' + conditional directives based on the variable `subdir' (see above) + to select different sets of variables and rules for different + sections of the library. It can also set the `make' variable + `sysdep-routines', to specify extra modules to be included in the + library. You should use `sysdep-routines' rather than adding + modules to `routines' because the latter is used in determining + what to distribute for each subdirectory of the main source tree. - e. Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. + Each makefile in a subdirectory in the ordered list of + subdirectories to be searched is included in order. Since several + system-dependent makefiles may be included, each should append to + `sysdep-routines' rather than simply setting it: - For an executable, the required form of the "work that uses the - Library" must include any data and utility programs needed for - reproducing the executable from it. However, as a special - exception, the materials to be distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of - the operating system on which the executable runs, unless that - component itself accompanies the executable. + sysdep-routines := $(sysdep-routines) foo bar - It may happen that this requirement contradicts the license - restrictions of other proprietary libraries that do not normally - accompany the operating system. Such a contradiction means you - cannot use both them and the Library together in an executable - that you distribute. +`Subdirs' + This file contains the names of new whole subdirectories under the + top-level library source tree that should be included for this + system. These subdirectories are treated just like the + system-independent subdirectories in the library source tree, such + as `stdio' and `math'. - 7. You may place library facilities that are a work based on the - Library side-by-side in a single library together with other - library facilities not covered by this License, and distribute - such a combined library, provided that the separate distribution - of the work based on the Library and of the other library - facilities is otherwise permitted, and provided that you do these - two things: + Use this when there are completely new sets of functions and header + files that should go into the library for the system this + subdirectory of `sysdeps' implements. For example, + `sysdeps/unix/inet/Subdirs' contains `inet'; the `inet' directory + contains various network-oriented operations which only make sense + to put in the library on systems that support the Internet. - a. Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. +`Dist' + This file contains the names of files (relative to the + subdirectory of `sysdeps' in which it appears) which should be + included in the distribution. List any new files used by rules in + the `Makefile' in the same directory, or header files used by the + source files in that directory. You don't need to list files that + are implementations (either C or assembly source) of routines + whose names are given in the machine-independent makefiles in the + main source tree. - b. Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same - work. +`configure' + This file is a shell script fragment to be run at configuration + time. The top-level `configure' script uses the shell `.' command + to read the `configure' file in each system-dependent directory + chosen, in order. The `configure' files are often generated from + `configure.in' files using Autoconf. - 8. You may not copy, modify, sublicense, link with, or distribute the - Library except as expressly provided under this License. Any - attempt otherwise to copy, modify, sublicense, link with, or - distribute the Library is void, and will automatically terminate - your rights under this License. However, parties who have - received copies, or rights, from you under this License will not - have their licenses terminated so long as such parties remain in - full compliance. + A system-dependent `configure' script will usually add things to + the shell variables `DEFS' and `config_vars'; see the top-level + `configure' script for details. The script can check for + `--with-PACKAGE' options that were passed to the top-level + `configure'. For an option `--with-PACKAGE=VALUE' `configure' + sets the shell variable `with_PACKAGE' (with any dashes in PACKAGE + converted to underscores) to VALUE; if the option is just + `--with-PACKAGE' (no argument), then it sets `with_PACKAGE' to + `yes'. - 9. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Library or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Library (or any work - based on the Library), you indicate your acceptance of this - License to do so, and all its terms and conditions for copying, - distributing or modifying the Library or works based on it. +`configure.in' + This file is an Autoconf input fragment to be processed into the + file `configure' in this subdirectory. *Note Introduction: + (autoconf.info)Introduction, for a description of Autoconf. You + should write either `configure' or `configure.in', but not both. + The first line of `configure.in' should invoke the `m4' macro + `GLIBC_PROVIDES'. This macro does several `AC_PROVIDE' calls for + Autoconf macros which are used by the top-level `configure' + script; without this, those macros might be invoked again + unnecessarily by Autoconf. - 10. Each time you redistribute the Library (or any work based on the - Library), the recipient automatically receives a license from the - original licensor to copy, distribute, link with or modify the - Library subject to these terms and conditions. You may not impose - any further restrictions on the recipients' exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties with this License. + That is the general system for how system-dependencies are isolated. - 11. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Library at all. For example, if a patent license would not permit - royalty-free redistribution of the Library by all those who - receive copies directly or indirectly through you, then the only - way you could satisfy both it and this License would be to refrain - entirely from distribution of the Library. +* Menu: - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply, and the section as a whole is intended to apply - in other circumstances. +* Hierarchy Conventions:: The layout of the `sysdeps' hierarchy. +* Porting to Unix:: Porting the library to an average + Unix-like system. - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. + +File: libc.info, Node: Hierarchy Conventions, Next: Porting to Unix, Up: Porting - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. +Layout of the `sysdeps' Directory Hierarchy +------------------------------------------- - 12. If the distribution and/or use of the Library is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Library under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. + A GNU configuration name has three parts: the CPU type, the +manufacturer's name, and the operating system. `configure' uses these +to pick the list of system-dependent directories to look for. If the +`--nfp' option is _not_ passed to `configure', the directory +`MACHINE/fpu' is also used. The operating system often has a "base +operating system"; for example, if the operating system is `Linux', the +base operating system is `unix/sysv'. The algorithm used to pick the +list of directories is simple: `configure' makes a list of the base +operating system, manufacturer, CPU type, and operating system, in that +order. It then concatenates all these together with slashes in +between, to produce a directory name; for example, the configuration +`i686-linux-gnu' results in `unix/sysv/linux/i386/i686'. `configure' +then tries removing each element of the list in turn, so +`unix/sysv/linux' and `unix/sysv' are also tried, among others. Since +the precise version number of the operating system is often not +important, and it would be very inconvenient, for example, to have +identical `irix6.2' and `irix6.3' directories, `configure' tries +successively less specific operating system names by removing trailing +suffixes starting with a period. - 13. The Free Software Foundation may publish revised and/or new - versions of the Lesser General Public License from time to time. - Such new versions will be similar in spirit to the present version, - but may differ in detail to address new problems or concerns. + As an example, here is the complete list of directories that would be +tried for the configuration `i686-linux-gnu' (with the `crypt' and +`linuxthreads' add-on): - Each version is given a distinguishing version number. If the - Library specifies a version number of this License which applies - to it and "any later version", you have the option of following - the terms and conditions either of that version or of any later - version published by the Free Software Foundation. If the Library - does not specify a license version number, you may choose any - version ever published by the Free Software Foundation. + sysdeps/i386/elf + crypt/sysdeps/unix + linuxthreads/sysdeps/unix/sysv/linux + linuxthreads/sysdeps/pthread + linuxthreads/sysdeps/unix/sysv + linuxthreads/sysdeps/unix + linuxthreads/sysdeps/i386/i686 + linuxthreads/sysdeps/i386 + linuxthreads/sysdeps/pthread/no-cmpxchg + sysdeps/unix/sysv/linux/i386 + sysdeps/unix/sysv/linux + sysdeps/gnu + sysdeps/unix/common + sysdeps/unix/mman + sysdeps/unix/inet + sysdeps/unix/sysv/i386/i686 + sysdeps/unix/sysv/i386 + sysdeps/unix/sysv + sysdeps/unix/i386 + sysdeps/unix + sysdeps/posix + sysdeps/i386/i686 + sysdeps/i386/i486 + sysdeps/libm-i387/i686 + sysdeps/i386/fpu + sysdeps/libm-i387 + sysdeps/i386 + sysdeps/wordsize-32 + sysdeps/ieee754 + sysdeps/libm-ieee754 + sysdeps/generic - 14. If you wish to incorporate parts of the Library into other free - programs whose distribution conditions are incompatible with these, - write to the author to ask for permission. For software which is - copyrighted by the Free Software Foundation, write to the Free - Software Foundation; we sometimes make exceptions for this. Our - decision will be guided by the two goals of preserving the free - status of all derivatives of our free software and of promoting - the sharing and reuse of software generally. + Different machine architectures are conventionally subdirectories at +the top level of the `sysdeps' directory tree. For example, +`sysdeps/sparc' and `sysdeps/m68k'. These contain files specific to +those machine architectures, but not specific to any particular +operating system. There might be subdirectories for specializations of +those architectures, such as `sysdeps/m68k/68020'. Code which is +specific to the floating-point coprocessor used with a particular +machine should go in `sysdeps/MACHINE/fpu'. - NO WARRANTY + There are a few directories at the top level of the `sysdeps' +hierarchy that are not for particular machine architectures. - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE - QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE - LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY - SERVICING, REPAIR OR CORRECTION. +`generic' + As described above (*note Porting::), this is the subdirectory + that every configuration implicitly uses after all others. - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY - OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +`ieee754' + This directory is for code using the IEEE 754 floating-point + format, where the C type `float' is IEEE 754 single-precision + format, and `double' is IEEE 754 double-precision format. Usually + this directory is referred to in the `Implies' file in a machine + architecture-specific directory, such as `m68k/Implies'. - END OF TERMS AND CONDITIONS +`libm-ieee754' + This directory contains an implementation of a mathematical library + usable on platforms which use IEEE 754 conformant floating-point + arithmetic. -How to Apply These Terms to Your New Libraries ----------------------------------------------- +`libm-i387' + This is a special case. Ideally the code should be in + `sysdeps/i386/fpu' but for various reasons it is kept aside. - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of -the ordinary General Public License). +`posix' + This directory contains implementations of things in the library in + terms of POSIX.1 functions. This includes some of the POSIX.1 + functions themselves. Of course, POSIX.1 cannot be completely + implemented in terms of itself, so a configuration using just + `posix' cannot be complete. - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should have -at least the "copyright" line and a pointer to where the full notice is -found. +`unix' + This is the directory for Unix-like things. *Note Porting to + Unix::. `unix' implies `posix'. There are some special-purpose + subdirectories of `unix': - ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or (at - your option) any later version. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, - USA. + `unix/common' + This directory is for things common to both BSD and System V + release 4. Both `unix/bsd' and `unix/sysv/sysv4' imply + `unix/common'. - Also add information on how to contact you by electronic and paper -mail. + `unix/inet' + This directory is for `socket' and related functions on Unix + systems. `unix/inet/Subdirs' enables the `inet' top-level + subdirectory. `unix/common' implies `unix/inet'. - You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the library, -if necessary. Here is a sample; alter the names: +`mach' + This is the directory for things based on the Mach microkernel + from CMU (including the GNU operating system). Other basic + operating systems (VMS, for example) would have their own + directories at the top level of the `sysdeps' hierarchy, parallel + to `unix' and `mach'. - Yoyodyne, Inc., hereby disclaims all copyright interest in the library - `Frob' (a library for tweaking knobs) written by James Random Hacker. - - SIGNATURE OF TY COON, 1 April 1990 - Ty Coon, President of Vice + +File: libc.info, Node: Porting to Unix, Prev: Hierarchy Conventions, Up: Porting - That's all there is to it! +Porting the GNU C Library to Unix Systems +----------------------------------------- + + Most Unix systems are fundamentally very similar. There are +variations between different machines, and variations in what +facilities are provided by the kernel. But the interface to the +operating system facilities is, for the most part, pretty uniform and +simple. + + The code for Unix systems is in the directory `unix', at the top +level of the `sysdeps' hierarchy. This directory contains +subdirectories (and subdirectory trees) for various Unix variants. + + The functions which are system calls in most Unix systems are +implemented in assembly code, which is generated automatically from +specifications in files named `syscalls.list'. There are several such +files, one in `sysdeps/unix' and others in its subdirectories. Some +special system calls are implemented in files that are named with a +suffix of `.S'; for example, `_exit.S'. Files ending in `.S' are run +through the C preprocessor before being fed to the assembler. + + These files all use a set of macros that should be defined in +`sysdep.h'. The `sysdep.h' file in `sysdeps/unix' partially defines +them; a `sysdep.h' file in another directory must finish defining them +for the particular machine and operating system variant. See +`sysdeps/unix/sysdep.h' and the machine-specific `sysdep.h' +implementations to see what these macros are and what they should do. + + The system-specific makefile for the `unix' directory +(`sysdeps/unix/Makefile') gives rules to generate several files from +the Unix system you are building the library on (which is assumed to be +the target system you are building the library _for_). All the +generated files are put in the directory where the object files are +kept; they should not affect the source tree itself. The files +generated are `ioctls.h', `errnos.h', `sys/param.h', and `errlist.c' +(for the `stdio' section of the library). diff -durpN glibc-2.2.4/manual/libc.info-55 glibc-2.2.5/manual/libc.info-55 --- glibc-2.2.4/manual/libc.info-55 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-55 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,387 +33,472 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Documentation License, Next: Concept Index, Prev: Copying, Up: Top +File: libc.info, Node: Contributors, Next: Free Manuals, Prev: Maintenance, Up: Top -GNU Free Documentation License -****************************** +Contributors to the GNU C Library +********************************* - Version 1.1, March 2000 - Copyright (C) 2000 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. + The GNU C library was written originally by Roland McGrath, and is +currently maintained by Ulrich Drepper. Some parts of the library were +contributed or worked on by other people. - 0. PREAMBLE + * The `getopt' function and related code was written by Richard + Stallman, David J. MacKenzie, and Roland McGrath. - The purpose of this License is to make a manual, textbook, or other - written document "free" in the sense of freedom: to assure everyone - the effective freedom to copy and redistribute it, with or without - modifying it, either commercially or noncommercially. Secondarily, - this License preserves for the author and publisher a way to get - credit for their work, while not being considered responsible for - modifications made by others. + * The merge sort function `qsort' was written by Michael J. Haertel. - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. + * The quick sort function used as a fallback by `qsort' was written + by Douglas C. Schmidt. - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. + * The memory allocation functions `malloc', `realloc' and `free' and + related code were written by Michael J. Haertel, Wolfram Gloger, + and Doug Lea. - 1. APPLICABILITY AND DEFINITIONS + * Fast implementations of many of the string functions (`memcpy', + `strlen', etc.) were written by Torbjo"rn Granlund. - This License applies to any manual or other work that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document", below, refers to - any such manual or work. Any member of the public is a licensee, - and is addressed as "you". + * The `tar.h' header file was written by David J. MacKenzie. - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. + * The port to the MIPS DECStation running Ultrix 4 + (`mips-dec-ultrix4') was contributed by Brendan Kehoe and Ian + Lance Taylor. - A "Secondary Section" is a named appendix or a front-matter - section of the Document that deals exclusively with the - relationship of the publishers or authors of the Document to the - Document's overall subject (or to related matters) and contains - nothing that could fall directly within that overall subject. - (For example, if the Document is in part a textbook of - mathematics, a Secondary Section may not explain any mathematics.) - The relationship could be a matter of historical connection with - the subject or with related matters, or of legal, commercial, - philosophical, ethical or political position regarding them. + * The DES encryption function `crypt' and related functions were + contributed by Michael Glad. - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. + * The `ftw' and `nftw' functions were contributed by Ulrich Drepper. - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. + * The startup code to support SunOS shared libraries was contributed + by Tom Quinn. - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly - and straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup has been designed - to thwart or discourage subsequent modification by readers is not - Transparent. A copy that is not "Transparent" is called "Opaque". + * The `mktime' function was contributed by Paul Eggert. - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML designed for human modification. - Opaque formats include PostScript, PDF, proprietary formats that - can be read and edited only by proprietary word processors, SGML - or XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML produced by some word - processors for output purposes only. + * The port to the Sequent Symmetry running Dynix version 3 + (`i386-sequent-bsd') was contributed by Jason Merrill. - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. + * The timezone support code is derived from the public-domain + timezone package by Arthur David Olson and his many contributors. - 2. VERBATIM COPYING + * The port to the DEC Alpha running OSF/1 (`alpha-dec-osf1') was + contributed by Brendan Kehoe, using some code written by Roland + McGrath. - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. + * The port to SGI machines running Irix 4 (`mips-sgi-irix4') was + contributed by Tom Quinn. - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. + * The port of the Mach and Hurd code to the MIPS architecture + (`mips-ANYTHING-gnu') was contributed by Kazumoto Kojima. - 3. COPYING IN QUANTITY + * The floating-point printing function used by `printf' and friends + and the floating-point reading function used by `scanf', `strtod' + and friends were written by Ulrich Drepper. The multi-precision + integer functions used in those functions are taken from GNU MP, + which was contributed by Torbjo"rn Granlund. - If you publish printed copies of the Document numbering more than - 100, and the Document's license notice requires Cover Texts, you - must enclose the copies in covers that carry, clearly and legibly, - all these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. + * The internationalization support in the library, and the support + programs `locale' and `localedef', were written by Ulrich Drepper. + Ulrich Drepper adapted the support code for message catalogs + (`libintl.h', etc.) from the GNU `gettext' package, which he also + wrote. He also contributed the `catgets' support and the entire + suite of multi-byte and wide-character support functions + (`wctype.h', `wchar.h', etc.). - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. + * The implementations of the `nsswitch.conf' mechanism and the files + and DNS backends for it were designed and written by Ulrich + Drepper and Roland McGrath, based on a backend interface defined + by Peter Eriksson. - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a publicly-accessible - computer-network location containing a complete Transparent copy - of the Document, free of added material, which the general - network-using public has access to download anonymously at no - charge using public-standard network protocols. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. + * The port to Linux i386/ELF (`i386-ANYTHING-linux') was contributed + by Ulrich Drepper, based in large part on work done in Hongjiu + Lu's Linux version of the GNU C Library. - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. + * The port to Linux/m68k (`m68k-ANYTHING-linux') was contributed by + Andreas Schwab. - 4. MODIFICATIONS + * The ports to Linux/ARM (`arm-ANYTHING-linuxaout') and ARM + standalone (`arm-ANYTHING-none'), as well as parts of the IPv6 + support code, were contributed by Philip Blundell. - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: + * Richard Henderson contributed the ELF dynamic linking code and + other support for the Alpha processor. - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. + * David Mosberger-Tang contributed the port to Linux/Alpha + (`alpha-ANYTHING-linux'). - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has less than five). + * The port to Linux on PowerPC (`powerpc-ANYTHING-linux') was + contributed by Geoffrey Keating. - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. + * Miles Bader wrote the argp argument-parsing package, and the + argz/envz interfaces. - D. Preserve all the copyright notices of the Document. + * Stephen R. van den Berg contributed a highly-optimized `strstr' + function. - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. + * Ulrich Drepper contributed the `hsearch' and `drand48' families of + functions; reentrant `...`_r'' versions of the `random' family; + System V shared memory and IPC support code; and several + highly-optimized string functions for iX86 processors. - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. + * The math functions are taken from `fdlibm-5.1' by Sun + Microsystems, as modified by J.T. Conklin, Ian Lance Taylor, + Ulrich Drepper, Andreas Schwab, and Roland McGrath. - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. + * The `libio' library used to implement `stdio' functions on some + platforms was written by Per Bothner and modified by Ulrich + Drepper. - H. Include an unaltered copy of this License. + * Eric Youngdale and Ulrich Drepper implemented versioning of + objects on symbol level. - I. Preserve the section entitled "History", and its title, and - add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. + * Thorsten Kukuk provided an implementation for NIS (YP) and NIS+, + securelevel 0, 1 and 2. - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. + * Andreas Jaeger provided a test suite for the math library. - K. In any section entitled "Acknowledgments" or "Dedications", - preserve the section's title, and preserve in the section all - the substance and tone of each of the contributor - acknowledgments and/or dedications given therein. + * Mark Kettenis implemented the utmpx interface and an utmp daemon. - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. + * Ulrich Drepper added character conversion functions (`iconv'). - M. Delete any section entitled "Endorsements". Such a section - may not be included in the Modified Version. + * Thorsten Kukuk provided an implementation for a caching daemon for + NSS (nscd). - N. Do not retitle any existing section as "Endorsements" or to - conflict in title with any Invariant Section. + * Tim Waugh provided an implementation of the POSIX.2 wordexp + function family. - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. + * Mark Kettenis provided a Hesiod NSS module. - You may add a section entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. + * 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. - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. + All code incorporated from 4.4 BSD is under the following + copyright: - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. + Copyright (C) 1991 Regents of the University of California. + All rights reserved. - 5. COMBINING DOCUMENTS + Redistribution and use in source and binary forms, with or + without modification, are permitted provided that the + following conditions are met: - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice. + 1. Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. + 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. - In the combination, you must combine any sections entitled - "History" in the various original documents, forming one section - entitled "History"; likewise combine any sections entitled - "Acknowledgments", and any sections entitled "Dedications". You - must delete all sections entitled "Endorsements." + 3. [This condition was removed.] - 6. COLLECTIONS OF DOCUMENTS + 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. - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. + 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. - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. + * The random number generation functions `random', `srandom', + `setstate' and `initstate', which are also the basis for the + `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 ISO C + standard, but the functional code is Berkeley's. - 7. AGGREGATION WITH INDEPENDENT WORKS + * The DNS resolver code is taken directly from BIND 4.9.5, which is + under both the Berkeley copyright above and also: - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, does not as a whole count as a - Modified Version of the Document, provided no compilation - copyright is claimed for the compilation. Such a compilation is - called an "aggregate", and this License does not apply to the - other self-contained works thus compiled with the Document, on - account of their being thus compiled, if they are not themselves - derivative works of the Document. + Portions Copyright (C) 1993 by Digital Equipment Corporation. - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one - quarter of the entire aggregate, the Document's Cover Texts may be - placed on covers that surround only the Document within the - aggregate. Otherwise they must appear on covers around the whole - aggregate. + Permission to use, copy, modify, and distribute this software + for any purpose with or without fee is hereby granted, + provided that the above copyright notice and this permission + notice appear in all copies, and that the name of Digital + Equipment Corporation not be used in advertising or publicity + pertaining to distribution of the document or software + without specific, written prior permission. - 8. TRANSLATION + THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. + DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE + LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License provided that you also include the - original English version of this License. In case of a - disagreement between the translation and the original English - version of this License, the original English version will prevail. + * The code to support Sun RPC is taken verbatim from Sun's + RPCSRC-4.0 distribution, and is covered by this copyright: - 9. TERMINATION + Copyright (C) 1984, Sun Microsystems, Inc. - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. + Sun RPC is a product of Sun Microsystems, Inc. and is + provided for unrestricted use provided that this legend is + included on all tape media and as a part of the software + program in whole or part. Users may copy or modify Sun RPC + without charge, but are not authorized to license or + distribute it to anyone else except as part of a product or + program developed by the user. - 10. FUTURE REVISIONS OF THIS LICENSE + SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND + INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND + FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF + DEALING, USAGE OR TRADE PRACTICE. - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. + Sun RPC is provided with no support and without any + obligation on the part of Sun Microsystems, Inc. to assist in + its use, correction, modification or enhancement. - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. + SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT + TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY + PATENTS BY SUN RPC OR ANY PART THEREOF. -ADDENDUM: How to use this License for your documents ----------------------------------------------------- + In no event will Sun Microsystems, Inc. be liable for any + lost revenue or profits or other special, indirect and + consequential damages, even if Sun has been advised of the + possibility of such damages. - To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: + Sun Microsystems, Inc. + 2550 Garcia Avenue + Mountain View, California 94043 - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. + * Some of the support code for Mach is taken from Mach 3.0 by CMU, + and is under the following copyright terms: - If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no Front-Cover -Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being -LIST"; likewise for Back-Cover Texts. + Mach Operating System + Copyright (C) 1991,1990,1989 Carnegie Mellon University + All Rights Reserved. - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. + Permission to use, copy, modify and distribute this software + and its documentation is hereby granted, provided that both + the copyright notice and this permission notice appear in all + copies of the software, derivative works or modified + versions, and any portions thereof, and that both notices + appear in supporting documentation. + + CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS + IS" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF + ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF + THIS SOFTWARE. + + Carnegie Mellon requests users of this software to return to + + Software Distribution Coordinator + School of Computer Science + Carnegie Mellon University + Pittsburgh PA 15213-3890 + + or any improvements or + extensions that they make and grant Carnegie Mellon the + rights to redistribute these changes. + + * The code for the database library `libdb' comes from the 2.3 + release of Berkeley DB. That code is under the same copyright as + 4.4 BSD and also: + + Copyright (C) 1990, 1993, 1994, 1995, 1996, 1997 + Sleepycat Software. 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. Redistributions in any form must be accompanied by + information on how to obtain complete source code for + the DB software and any accompanying software that uses + the DB software. The source code must either be + included in the distribution or be available for no more + than the cost of distribution plus a nominal fee, and + must be freely redistributable under reasonable + conditions. For an executable file, complete source + code means the source code for all modules it contains. + It does not mean source code for modules or files that + typically accompany the operating system on which the + executable file runs, e.g., standard library modules or + system header files. + + THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE "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 + SLEEPYCAT SOFTWARE 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. + + Portions copyright (C) 1995, 1996 + The President and Fellows of Harvard University. + 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 + Harvard University 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 HARVARD AND ITS 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 HARVARD OR ITS 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. + + For a license to use, redistribute or sell DB software under + conditions other than those described above, or to purchase + support for this software, please contact Sleepycat Software + at + + Sleepycat Software + 394 E. Riding Dr. + Carlisle, MA 01741 + USA + +1-508-287-4781 + + or . + + + + +File: libc.info, Node: Free Manuals, Next: Copying, Prev: Contributors, Up: Top + +Free Software Needs Free Documentation +************************************** + + The biggest deficiency in the free software community today is not in +the software--it is the lack of good free documentation that we can +include with the free software. Many of our most important programs do +not come with free reference manuals and free introductory texts. +Documentation is an essential part of any software package; when an +important free software package does not come with a free manual and a +free tutorial, that is a major gap. We have many such gaps today. + + Consider Perl, for instance. The tutorial manuals that people +normally use are non-free. How did this come about? Because the +authors of those manuals published them with restrictive terms--no +copying, no modification, source files not available--which exclude +them from the free software world. + + That wasn't the first time this sort of thing happened, and it was +far from the last. Many times we have heard a GNU user eagerly +describe a manual that he is writing, his intended contribution to the +community, only to learn that he had ruined everything by signing a +publication contract to make it non-free. + + Free documentation, like free software, is a matter of freedom, not +price. The problem with the non-free manual is not that publishers +charge a price for printed copies--that in itself is fine. (The Free +Software Foundation sells printed copies of manuals, too.) The problem +is the restrictions on the use of the manual. Free manuals are +available in source code form, and give you permission to copy and +modify. Non-free manuals do not allow this. + + The criteria of freedom for a free manual are roughly the same as for +free software. Redistribution (including the normal kinds of +commercial redistribution) must be permitted, so that the manual can +accompany every copy of the program, both on-line and on paper. + + Permission for modification of the technical content is crucial too. +When people modify the software, adding or changing features, if they +are conscientious they will change the manual too--so they can provide +accurate and clear documentation for the modified program. A manual +that leaves you no choice but to write a new manual to document a +changed version of the program is not really available to our community. + + Some kinds of limits on the way modification is handled are +acceptable. For example, requirements to preserve the original +author's copyright notice, the distribution terms, or the list of +authors, are ok. It is also no problem to require modified versions to +include notice that they were modified. Even entire sections that may +not be deleted or changed are acceptable, as long as they deal with +nontechnical topics (like this one). These kinds of restrictions are +acceptable because they don't obstruct the community's normal use of +the manual. + + However, it must be possible to modify all the _technical_ content +of the manual, and then distribute the result in all the usual media, +through all the usual channels. Otherwise, the restrictions obstruct +the use of the manual, it is not free, and we need another manual to +replace it. + + Please spread the word about this issue. Our community continues to +lose manuals to proprietary publishing. If we spread the word that +free software needs free reference manuals and free tutorials, perhaps +the next person who wants to contribute by writing documentation will +realize, before it is too late, that only free manuals contribute to +the free software community. + + If you are writing documentation, please insist on publishing it +under the GNU Free Documentation License or another free documentation +license. Remember that this decision requires your approval--you don't +have to let the publisher decide. Some commercial publishers will use +a free license if you insist, but they will not propose the option; it +is up to you to raise the issue and say firmly that this is what you +want. If the publisher you are dealing with refuses, please try other +publishers. If you're not sure whether a proposed license is free, +write to . + + You can encourage commercial publishers to sell more free, copylefted +manuals and tutorials by buying them, and particularly by buying copies +from the publishers that paid for their writing or for major +improvements. Meanwhile, try to avoid buying non-free documentation at +all. Check the distribution terms of a manual before you buy it, and +insist that whoever seeks your business must respect your freedom. +Check the history of the book, and try reward the publishers that have +paid or pay the authors to work on it. + + The Free Software Foundation maintains a list of free documentation +published by other publishers, at +. diff -durpN glibc-2.2.4/manual/libc.info-56 glibc-2.2.5/manual/libc.info-56 --- glibc-2.2.4/manual/libc.info-56 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-56 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1054 +33,916 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Concept Index, Next: Type Index, Prev: Documentation License, Up: Top +File: libc.info, Node: Copying, Next: Documentation License, Prev: Free Manuals, Up: Top -Concept Index -************* +GNU Lesser General Public License +********************************* -* Menu: + Version 2.1, February 1999 -* /etc/hostname: Host Identification. -* /etc/nsswitch.conf: NSS Configuration File. -* 4.N BSD Unix: Berkeley Unix. -* __va_copy: Copying and Concatenation. -* _POSIX_OPTION_ORDER environment variable.: Standard Environment. -* _POSIX_SAVED_IDS: How Change Persona. -* abort signal: Program Error Signals. -* aborting a program: Aborting a Program. -* absolute file name: File Name Resolution. -* absolute priority: Absolute Priority. -* absolute value functions: Absolute Value. -* accepting connections: Accepting Connections. -* access permission for a file: Access Permission. -* access, testing for: Testing File Access. -* accessing directories: Accessing Directories. -* address of socket: Socket Addresses. -* address space <1>: Program Basics. -* address space: Memory Subsystem. -* alarm signal: Alarm Signals. -* alarms, setting: Setting an Alarm. -* alignment (in obstacks): Obstacks Data Alignment. -* alignment (with malloc): Aligned Memory Blocks. -* alloca disadvantages: Disadvantages of Alloca. -* alloca function: Variable Size Automatic. -* allocating pseudo-terminals: Allocation. -* allocation (obstacks): Allocation in an Obstack. -* allocation debugging: Allocation Debugging. -* allocation hooks, for malloc: Hooks for Malloc. -* allocation of memory with malloc: Basic Allocation. -* allocation size of string: Representation of Strings. -* allocation statistics: Statistics of Malloc. -* alphabetic character <1>: Classification of Wide Characters. -* alphabetic character: Classification of Characters. -* alphanumeric character <1>: Classification of Wide Characters. -* alphanumeric character: Classification of Characters. -* append-access files: File Position. -* argc (program argument count): Program Arguments. -* argp (program argument parser): Argp. -* argp parser functions: Argp Parser Functions. -* ARGP_HELP_FMT environment variable: Argp User Customization. -* argument parsing with argp: Argp. -* argument promotion: Calling Variadics. -* argument vectors, null-character separated: Argz and Envz Vectors. -* arguments (variadic functions): Receiving Arguments. -* arguments, how many: How Many Arguments. -* arguments, to program: Program Arguments. -* argv (program argument vector): Program Arguments. -* argz vectors (string vectors): Argz and Envz Vectors. -* arithmetic expansion: Expansion Stages. -* array comparison functions: String/Array Comparison. -* array copy functions: Copying and Concatenation. -* array search function: Array Search Function. -* array sort function: Array Sort Function. -* ASCII character: Classification of Characters. -* assertions: Consistency Checking. -* attributes of a file: Attribute Meanings. -* automatic freeing: Variable Size Automatic. -* automatic memory allocation: Memory Allocation and C. -* automatic storage class: Memory Allocation and C. -* automatic storage with variable size: Variable Size Automatic. -* background job: Concepts of Job Control. -* background job, launching: Foreground and Background. -* backtrace: Backtraces. -* backtrace_fd: Backtraces. -* backtrace_symbols: Backtraces. -* base (of floating point number): Floating Point Concepts. -* baud rate: Line Speed. -* Berkeley Unix: Berkeley Unix. -* Bessel functions: Special Functions. -* bias (of floating point number exponent): Floating Point Concepts. -* big-endian: Byte Order. -* binary I/O to a stream: Block Input/Output. -* binary search function (for arrays): Array Search Function. -* binary stream: Binary Streams. -* binding a socket address: Socket Addresses. -* blank character <1>: Classification of Wide Characters. -* blank character: Classification of Characters. -* block I/O to a stream: Block Input/Output. -* blocked signals: Delivery of Signal. -* blocked signals, checking for: Checking for Pending Signals. -* blocking signals: Blocking Signals. -* blocking signals, in a handler: Blocking for Handler. -* bootstrapping, and services: Actions in the NSS configuration. -* break condition, detecting: Input Modes. -* break condition, generating: Line Control. -* breaking a string into tokens: Finding Tokens in a String. -* broken pipe signal: Operation Error Signals. -* broken-down time <1>: Broken-down Time. -* broken-down time: Calendar Time. -* BSD compatibility library: Process Group Functions. -* BSD compatibility library.: Feature Test Macros. -* BSD Unix: Berkeley Unix. -* buffering of streams: Stream Buffering. -* buffering, controlling: Controlling Buffering. -* bugs, reporting: Reporting Bugs. -* bus error: Program Error Signals. -* butterfly: Misc FP Arithmetic. -* byte order conversion, for socket: Byte Order. -* byte stream: Socket Concepts. -* C++ streams: Streams and I18N. -* calendar time: Time Basics. -* calendar time and broken-down time: Broken-down Time. -* calendar, Gregorian: Calendar Time. -* calling variadic functions: Calling Variadics. -* canonical input processing: Canonical or Not. -* capacity limits, POSIX: General Limits. -* carrier detect: Control Modes. -* case conversion of characters: Case Conversion. -* catching signals: Delivery of Signal. -* categories for locales: Locale Categories. -* change working directory: Working Directory. -* changing the locale: Setting the Locale. -* changing the size of a block (malloc): Changing Block Size. -* changing the size of a block (obstacks): Growing Objects. -* channels: Stream/Descriptor Precautions. -* character case conversion: Case Conversion. -* character predicates: Classification of Characters. -* character testing: Classification of Characters. -* checking for pending signals: Checking for Pending Signals. -* child process <1>: Process Creation Concepts. -* child process <2>: Processes. -* child process: Processor Time. -* child process signal: Job Control Signals. -* chunks: Obstack Chunks. -* classes, floating-point: Floating Point Classes. -* classification of characters: Classification of Characters. -* cleaning up a stream: Linked Channels. -* clearing terminal input queue: Line Control. -* client: Connections. -* clock ticks: Processor And CPU Time. -* clock, high accuracy: High Accuracy Clock. -* close-on-exec (file descriptor flag): Descriptor Flags. -* closing a file descriptor: Opening and Closing Files. -* closing a socket: Closing a Socket. -* closing a stream: Closing Streams. -* collating strings: Collation Functions. -* combining locales: Choosing Locale. -* command argument syntax: Argument Syntax. -* command arguments, parsing: Parsing Program Arguments. -* command line arguments: Program Arguments. -* command substitution: Expansion Stages. -* communication style (of a socket): Socket Concepts. -* comparing strings and arrays: String/Array Comparison. -* Comparison Function: Comparison Functions. -* compiling: Configuring and compiling. -* complex exponentiation functions: Exponents and Logarithms. -* complex logarithm functions: Exponents and Logarithms. -* complex numbers: Complex Numbers. -* complex trigonometric functions: Trig Functions. -* concatenating strings: Copying and Concatenation. -* configurations, all supported: Supported Configurations. -* configuring: Configuring and compiling. -* conjugate complex numbers: Operations on Complex. -* connecting a socket: Connecting. -* connection: Connections. -* consistency checking: Consistency Checking. -* consistency checking, of heap: Heap Consistency Checking. -* constants <1>: Mathematical Constants. -* constants: Memory Concepts. -* continue signal: Job Control Signals. -* control character <1>: Classification of Wide Characters. -* control character: Classification of Characters. -* control operations on files: Control Operations. -* controlling process: Controlling Terminal. -* controlling terminal: Concepts of Job Control. -* controlling terminal, access to: Access to the Terminal. -* controlling terminal, determining: Identifying the Terminal. -* controlling terminal, setting: Open-time Flags. -* conversion specifications (printf): Formatted Output Basics. -* conversion specifications (scanf): Formatted Input Basics. -* converting byte order: Byte Order. -* converting case of characters: Case Conversion. -* converting file descriptor to stream: Descriptors and Streams. -* converting floats to integers: Rounding Functions. -* converting group ID to group name: Lookup Group. -* converting group name to group ID: Lookup Group. -* converting host address to name: Host Names. -* converting host name to address: Host Names. -* converting network name to network number: Networks Database. -* converting network number to network name: Networks Database. -* converting port number to service name: Services Database. -* converting service name to port number: Services Database. -* converting string to collation order: Collation Functions. -* converting strings to numbers: Parsing of Numbers. -* converting user ID to user name: Lookup User. -* converting user name to user ID: Lookup User. -* cookie, for custom stream: Streams and Cookies. -* copy-on-write page fault: Locked Memory Details. -* copying strings and arrays: Copying and Concatenation. -* cpu priority: Priority. -* CPU time <1>: Processor Time. -* CPU time <2>: Processor And CPU Time. -* CPU time: Time Basics. -* create on open (file status flag): Open-time Flags. -* creating a directory: Creating Directories. -* creating a FIFO special file: FIFO Special Files. -* creating a pipe: Creating a Pipe. -* creating a pipe to a subprocess: Pipe to a Subprocess. -* creating a process: Process Creation Concepts. -* creating a socket: Creating a Socket. -* creating a socket pair: Socket Pairs. -* creating special files: Making Special Files. -* cube root function: Exponents and Logarithms. -* currency symbols: Currency Symbol. -* current limit: Limits on Resources. -* current working directory: Working Directory. -* custom streams: Custom Streams. -* customizing printf: Customizing Printf. -* data loss on sockets: Socket Concepts. -* databases: Name Service Switch. -* datagram socket: Datagrams. -* datagrams, transmitting: Sending Datagrams. -* date: Time Basics. -* Daylight Saving Time: Broken-down Time. -* decimal digit character: Classification of Characters. -* decimal-point separator: General Numeric. -* declaration (compared to definition): Header Files. -* declaring variadic functions: Calling Variadics. -* decompose complex numbers: Operations on Complex. -* default action (for a signal): Delivery of Signal. -* default action for a signal: Basic Signal Handling. -* default argument promotions: Calling Variadics. -* default value, and NSS: Notes on NSS Configuration File. -* defining new printf conversions: Customizing Printf. -* definition (compared to declaration): Header Files. -* delayed suspend character: Signal Characters. -* deleting a directory: Deleting Files. -* deleting a file: Deleting Files. -* delivery of signals: Delivery of Signal. -* descriptors and streams: Stream/Descriptor Precautions. -* digit character <1>: Classification of Wide Characters. -* digit character: Classification of Characters. -* directories, accessing: Accessing Directories. -* directories, creating: Creating Directories. -* directories, deleting: Deleting Files. -* directory: Directories. -* directory entry: Directories. -* directory hierarchy: Working with Directory Trees. -* directory stream: Accessing Directories. -* disadvantages of alloca: Disadvantages of Alloca. -* DISCARD character: Other Special. -* division by zero: FP Exceptions. -* DNS: Host Identification. -* DNS server unavailable: Actions in the NSS configuration. -* domain (of socket): Socket Concepts. -* domain error: Math Error Reporting. -* domain name: Host Identification. -* Domain Name System: Host Identification. -* dot notation, for Internet addresses: Abstract Host Addresses. -* DSUSP character: Signal Characters. -* duplicating file descriptors: Duplicating Descriptors. -* dynamic memory allocation: Memory Allocation and C. -* EBCDIC: Extended Char Intro. -* echo of terminal input: Local Modes. -* effective group ID: Process Persona. -* effective user ID: Process Persona. -* efficiency and malloc: Efficiency and Malloc. -* efficiency and obstacks: Extra Fast Growing. -* efficiency of chunks: Obstack Chunks. -* EINTR, and restarting interrupted primitives: Interrupted Primitives. -* elapsed time <1>: Elapsed Time. -* elapsed time: Time Basics. -* encryption: Trivial Encryption. -* end of file, on a stream: EOF and Errors. -* end-of-file, on a file descriptor: I/O Primitives. -* environment: Environment Variables. -* environment access: Environment Access. -* environment representation: Environment Access. -* environment variable: Environment Variables. -* environment vectors, null-character separated: Argz and Envz Vectors. -* envz vectors (environment vectors): Argz and Envz Vectors. -* EOF character: Editing Characters. -* EOL character: Editing Characters. -* EOL2 character: Editing Characters. -* epoch: Simple Calendar Time. -* ERASE character: Editing Characters. -* errno: System Calls. -* error codes: Error Reporting. -* error messages, in argp: Argp Helper Functions. -* error reporting: Error Reporting. -* errors, mathematical: Math Error Reporting. -* establishing a handler: Signal Actions. -* ethers: NSS Basics. -* EUC: Extended Char Intro. -* EUC-JP: glibc iconv Implementation. -* exception <1>: Program Error Signals. -* exception: FP Exceptions. -* exclusive lock: File Locks. -* exec functions: Executing a File. -* execing a program: Memory Concepts. -* executable: Memory Concepts. -* executing a file: Executing a File. -* exit status: Exit Status. -* exit status value: Program Termination. -* exiting a program: Memory Concepts. -* expansion of shell words: Word Expansion. -* exponent (of floating point number): Floating Point Concepts. -* exponentiation functions: Exponents and Logarithms. -* extending printf: Customizing Printf. -* extracting file descriptor from stream: Descriptors and Streams. -* fcntl function: Control Operations. -* FDL, GNU Free Documentation License: Documentation License. -* feature test macros: Feature Test Macros. -* field splitting: Expansion Stages. -* FIFO special file: Pipes and FIFOs. -* file access permission: Access Permission. -* file access time: File Times. -* file attribute modification time: File Times. -* file attributes: Attribute Meanings. -* file creation mask: Setting Permissions. -* file descriptor flags: Descriptor Flags. -* file descriptor sets, for select: Waiting for I/O. -* file descriptors, standard: Descriptors and Streams. -* file locks: File Locks. -* file modification time: File Times. -* file name: File Names. -* file name component: Directories. -* file name errors: File Name Errors. -* file name resolution: File Name Resolution. -* file name translation flags: Open-time Flags. -* file names, multiple: Hard Links. -* file owner: File Owner. -* file permission bits: Permission Bits. -* file pointer: Streams. -* file position: File Position. -* file positioning on a file descriptor: File Position Primitive. -* file positioning on a stream: File Positioning. -* file status flags: File Status Flags. -* files, accessing: Memory Concepts. -* filtering i/o through subprocess: Pipe to a Subprocess. -* flag character (printf): Output Conversion Syntax. -* flag character (scanf): Input Conversion Syntax. -* flags for sigaction: Flags for Sigaction. -* flags, file name translation: Open-time Flags. -* flags, open-time action: Open-time Flags. -* floating point: Floating Point Numbers. -* floating point, IEEE: IEEE Floating Point. -* floating type measurements: Floating Type Macros. -* floating-point classes: Floating Point Classes. -* floating-point exception: Program Error Signals. -* flow control, terminal: Line Control. -* flushing a stream: Flushing Buffers. -* flushing terminal output queue: Line Control. -* foreground job: Concepts of Job Control. -* foreground job, launching: Foreground and Background. -* forking a process: Process Creation Concepts. -* format string, for printf: Formatted Output. -* format string, for scanf: Formatted Input. -* formatted input from a stream: Formatted Input. -* formatted messages: Formatted Messages. -* formatted output to a stream: Formatted Output. -* FP arithmetic: FP Bit Twiddling. -* FQDN: Host Identification. -* frame, real memory: Memory Concepts. -* freeing (obstacks): Freeing Obstack Objects. -* freeing memory: Memory Concepts. -* freeing memory allocated with malloc: Freeing after Malloc. -* fully buffered stream: Buffering Concepts. -* function prototypes (variadic): Variadic Prototypes. -* gamma function: Special Functions. -* gcvt_r: System V Number Conversion. -* gencat: The gencat program. -* generation of signals: Signal Generation. -* generic i/o control operations: IOCTLs. -* globbing: Globbing. -* graphic character <1>: Classification of Wide Characters. -* graphic character: Classification of Characters. -* Gregorian calendar: Calendar Time. -* group: NSS Basics. -* group database: Group Database. -* group ID: User and Group IDs. -* group name: User and Group IDs. -* group owner of a file: File Owner. -* grouping of digits: General Numeric. -* growing objects (in obstacks): Growing Objects. -* handling multiple signals: Merged Signals. -* hangup signal: Termination Signals. -* hard limit: Limits on Resources. -* hard link: Hard Links. -* header files: Header Files. -* heap consistency checking: Heap Consistency Checking. -* heap, dynamic allocation from: Unconstrained Allocation. -* heap, freeing memory from: Freeing after Malloc. -* hexadecimal digit character <1>: Classification of Wide Characters. -* hexadecimal digit character: Classification of Characters. -* hidden bit (of floating point number mantissa): Floating Point Concepts. -* hierarchy, directory: Working with Directory Trees. -* high-priority data: Out-of-Band Data. -* high-resolution time: Calendar Time. -* holes in files: File Position Primitive. -* home directory: Standard Environment. -* HOME environment variable: Standard Environment. -* hook functions (of custom streams): Hook Functions. -* host address, Internet: Abstract Host Addresses. -* host name: Host Identification. -* hostname: Host Identification. -* hosts: NSS Basics. -* hosts database: Host Names. -* how many arguments: How Many Arguments. -* hyperbolic functions: Hyperbolic Functions. -* identifying terminals: Is It a Terminal. -* IEEE 754: Floating Point Numbers. -* IEEE floating point: Floating Point Numbers. -* IEEE floating point representation: IEEE Floating Point. -* IEEE Std 1003.1: POSIX. -* IEEE Std 1003.2: POSIX. -* ignore action for a signal: Basic Signal Handling. -* illegal instruction: Program Error Signals. -* impossible events: Consistency Checking. -* independent channels: Independent Channels. -* inexact exception: FP Exceptions. -* infinity: Infinity and NaN. -* initial signal actions: Initial Signal Actions. -* inode number: Attribute Meanings. -* input available signal: Asynchronous I/O Signals. -* input conversions, for scanf: Table of Input Conversions. -* input from multiple files: Waiting for I/O. -* installation tools: Tools for Compilation. -* installing: Running make install. -* integer: Integers. -* integer division functions: Integer Division. -* integer type range: Range of Type. -* integer type width: Width of Type. -* interactive signals, from terminal: Local Modes. -* interactive stop signal: Job Control Signals. -* internal representation: Extended Char Intro. -* internationalization: Locales. -* Internet host address: Abstract Host Addresses. -* Internet namespace, for sockets: Internet Namespace. -* interprocess communication, with FIFO: FIFO Special Files. -* interprocess communication, with pipes: Creating a Pipe. -* interprocess communication, with signals: Kill Example. -* interprocess communication, with sockets: Sockets. -* interrupt character: Signal Characters. -* interrupt signal: Termination Signals. -* interrupt-driven input: Interrupt Input. -* interrupting primitives: Interrupted Primitives. -* interval: Time Basics. -* interval timer, setting: Setting an Alarm. -* INTR character: Signal Characters. -* invalid exception: FP Exceptions. -* inverse complex hyperbolic functions: Hyperbolic Functions. -* inverse complex trigonometric functions: Inverse Trig Functions. -* inverse hyperbolic functions: Hyperbolic Functions. -* inverse trigonometric functions: Inverse Trig Functions. -* invocation of program: Program Arguments. -* IOCTLs: IOCTLs. -* ISO 10646: Extended Char Intro. -* ISO 2022: Extended Char Intro. -* ISO 6937: Extended Char Intro. -* ISO C: ISO C. -* ISO-2022-JP: glibc iconv Implementation. -* ISO/IEC 9945-1: POSIX. -* ISO/IEC 9945-2: POSIX. -* job: Job Control. -* job control: Job Control. -* job control functions: Functions for Job Control. -* job control is optional: Job Control is Optional. -* job control signals: Job Control Signals. -* job control, enabling: Initializing the Shell. -* Kermit the frog: Search/Sort Example. -* kernel call: System Calls. -* kernel header files: Linux. -* KILL character: Editing Characters. -* kill signal: Termination Signals. -* killing a process: Signaling Another Process. -* Korn Shell: Wildcard Matching. -* LANG environment variable <1>: Standard Environment. -* LANG environment variable: The catgets Functions. -* launching jobs: Launching Jobs. -* LC_ALL environment variable <1>: Standard Environment. -* LC_ALL environment variable: The catgets Functions. -* LC_COLLATE environment variable: Standard Environment. -* LC_CTYPE environment variable: Standard Environment. -* LC_MESSAGES environment variable <1>: Standard Environment. -* LC_MESSAGES environment variable: The catgets Functions. -* LC_MONETARY environment variable: Standard Environment. -* LC_NUMERIC environment variable: Standard Environment. -* LC_TIME environment variable: Standard Environment. -* leap second: Broken-down Time. -* length of string: Representation of Strings. -* level, for socket options: Socket Options. -* LGPL, Lesser General Public License: Copying. -* library: Introduction. -* limit: Limits on Resources. -* limits on resource usage: Limits on Resources. -* limits, file name length: Limits for Files. -* limits, floating types: Floating Type Macros. -* limits, integer types: Range of Type. -* limits, link count of files: Limits for Files. -* limits, number of open files: General Limits. -* limits, number of processes: General Limits. -* limits, number of supplementary group IDs: General Limits. -* limits, pipe buffer size: Limits for Files. -* limits, POSIX: General Limits. -* limits, program argument size: General Limits. -* limits, terminal input queue: Limits for Files. -* limits, time zone name length: General Limits. -* line buffered stream: Buffering Concepts. -* line speed: Line Speed. -* lines (in a text file): Binary Streams. -* link: Directories. -* link, hard: Hard Links. -* link, soft: Symbolic Links. -* link, symbolic: Symbolic Links. -* linked channels: Linked Channels. -* listening (sockets): Listening. -* literals: Memory Concepts. -* little-endian: Byte Order. -* LNEXT character: Other Special. -* load average: Processor Resources. -* local namespace, for sockets: Local Namespace. -* local network address number: Abstract Host Addresses. -* local time: Calendar Time. -* locale categories: Locale Categories. -* locale, changing: Setting the Locale. -* locales: Locales. -* locking pages: Locking Pages. -* logarithm functions: Exponents and Logarithms. -* login name: User and Group IDs. -* login name, determining: Who Logged In. -* LOGNAME environment variable: Standard Environment. -* long jumps: Non-Local Exits. -* long-named options: Argument Syntax. -* longjmp: Advantages of Alloca. -* loss of data on sockets: Socket Concepts. -* lost resource signal: Operation Error Signals. -* lower-case character <1>: Classification of Wide Characters. -* lower-case character: Classification of Characters. -* macros: Obstack Functions. -* main function: Program Arguments. -* malloc debugger: Allocation Debugging. -* malloc function: Unconstrained Allocation. -* mantissa (of floating point number): Floating Point Concepts. -* matching failure, in scanf: Formatted Input Basics. -* math errors: Errors in Math Functions. -* mathematical constants: Mathematical Constants. -* maximum: Misc FP Arithmetic. -* maximum field width (scanf): Input Conversion Syntax. -* maximum limit: Limits on Resources. -* maximum possible integer: Integers. -* measurements of floating types: Floating Type Macros. -* memory allocation: Memory. -* memory lock: Locking Pages. -* memory mapped file: Memory Concepts. -* memory mapped I/O: Memory Concepts. -* memory page: Memory Subsystem. -* merging of signals: Merged Signals. -* MIN termios slot: Noncanonical Input. -* minimum: Misc FP Arithmetic. -* minimum field width (printf): Output Conversion Syntax. -* minimum possible integer: Integers. -* mixing descriptors and streams: Stream/Descriptor Precautions. -* modem disconnect: Control Modes. -* modem status lines: Control Modes. -* monetary value formatting: The Lame Way to Locale Data. -* multi-threaded application: Streams and Threads. -* multibyte character: Extended Char Intro. -* multibyte character string: Representation of Strings. -* multibyte string: Representation of Strings. -* multiple names for one file: Hard Links. -* multiplexing input: Waiting for I/O. -* multiply-add: Misc FP Arithmetic. -* name of running program: Error Messages. -* name of socket: Socket Addresses. -* Name Service Switch: Name Service Switch. -* name space: Reserved Names. -* names of signals: Standard Signals. -* namespace (of socket): Socket Concepts. -* NaN <1>: FP Bit Twiddling. -* NaN: Infinity and NaN. -* Netgroup: Netgroup Data. -* netgroup: NSS Basics. -* network byte order: Byte Order. -* network number: Abstract Host Addresses. -* network protocol: Socket Concepts. -* networks: NSS Basics. -* networks database: Networks Database. -* NIS: Host Identification. -* NIS domain name: Host Identification. -* nisplus, and booting: Actions in the NSS configuration. -* nisplus, and completeness: Actions in the NSS configuration. -* NLSPATH environment variable <1>: Standard Environment. -* NLSPATH environment variable: The catgets Functions. -* non-blocking open: Open-time Flags. -* non-local exit, from signal handler: Longjmp in Handler. -* non-local exits: Non-Local Exits. -* noncanonical input processing: Canonical or Not. -* normalization functions (floating-point): Normalization Functions. -* normalized floating point number: Floating Point Concepts. -* not a number: Infinity and NaN. -* NSS: Name Service Switch. -* nsswitch.conf: NSS Configuration File. -* null character: Representation of Strings. -* null pointer constant: Null Pointer Constant. -* null wide character: Representation of Strings. -* number of arguments passed: How Many Arguments. -* number syntax, parsing: Parsing of Numbers. -* numeric value formatting: The Lame Way to Locale Data. -* obstack status: Status of an Obstack. -* obstacks: Obstacks. -* open-time action flags: Open-time Flags. -* opening a file: I/O Concepts. -* opening a file descriptor: Opening and Closing Files. -* opening a pipe: Creating a Pipe. -* opening a pseudo-terminal pair: Pseudo-Terminal Pairs. -* opening a socket: Creating a Socket. -* opening a socket pair: Socket Pairs. -* opening a stream: Opening Streams. -* Optimization: FP Function Optimizations. -* optimizing NSS: Notes on NSS Configuration File. -* option parsing with argp: Argp. -* optional arguments: Variadic Functions. -* optional POSIX features: System Options. -* orientation, stream <1>: Streams and I18N. -* orientation, stream: Opening Streams. -* orphaned process group: Orphaned Process Groups. -* out-of-band data: Out-of-Band Data. -* output conversions, for printf: Table of Output Conversions. -* output possible signal: Asynchronous I/O Signals. -* overflow exception: FP Exceptions. -* owner of a file: File Owner. -* packet: Socket Concepts. -* page boundary: Aligned Memory Blocks. -* page fault: Memory Concepts. -* page fault, copy-on-write: Locked Memory Details. -* page frame: Memory Concepts. -* page, memory: Memory Subsystem. -* page, virtual memory: Memory Concepts. -* paging <1>: Locking Pages. -* paging: Memory Concepts. -* parameter promotion: String/Array Conventions. -* parent directory: File Name Resolution. -* parent process <1>: Process Creation Concepts. -* parent process: Processes. -* parity checking: Input Modes. -* parsing a template string: Parsing a Template String. -* parsing numbers (in formatted input): Parsing of Numbers. -* parsing program arguments: Parsing Program Arguments. -* parsing tokens from a string: Finding Tokens in a String. -* passwd: NSS Basics. -* password database: User Database. -* PATH environment variable: Standard Environment. -* pause function: Waiting for a Signal. -* peeking at input: Unreading. -* pending signals: Delivery of Signal. -* pending signals, checking for: Checking for Pending Signals. -* period of time: Time Basics. -* permission to access a file: Access Permission. -* persona: Process Persona. -* physical address: Memory Subsystem. -* physical memory: Memory Subsystem. -* pi (trigonometric constant): Trig Functions. -* pipe: Pipes and FIFOs. -* pipe signal: Operation Error Signals. -* pipe to a subprocess: Pipe to a Subprocess. -* port number: Ports. -* positioning a file descriptor: File Position Primitive. -* positioning a stream: File Positioning. -* positive difference: Misc FP Arithmetic. -* POSIX: POSIX. -* POSIX capacity limits: General Limits. -* POSIX optional features: System Options. -* POSIX.1: POSIX. -* POSIX.2: POSIX. -* power functions: Exponents and Logarithms. -* precision (of floating point number): Floating Point Concepts. -* precision (printf): Output Conversion Syntax. -* predicates on arrays: String/Array Comparison. -* predicates on characters: Classification of Characters. -* predicates on strings: String/Array Comparison. -* preemptive scheduling: Absolute Priority. -* primitives, interrupting: Interrupted Primitives. -* printing character <1>: Classification of Wide Characters. -* printing character: Classification of Characters. -* priority of a process: Priority. -* priority, absolute: Absolute Priority. -* process <1>: Processes. -* process: Program Basics. -* process completion: Process Completion. -* process group functions: Functions for Job Control. -* process group ID: Launching Jobs. -* process group leader: Launching Jobs. -* process groups: Job Control. -* process ID: Process Creation Concepts. -* process image: Process Creation Concepts. -* process lifetime: Process Creation Concepts. -* process priority: Priority. -* process signal mask: Process Signal Mask. -* process termination: Program Termination. -* processor time <1>: Processor Time. -* processor time: Time Basics. -* profiling alarm signal: Alarm Signals. -* profiling timer: Setting an Alarm. -* program: Program Basics. -* program argument syntax: Argument Syntax. -* program arguments: Program Arguments. -* program arguments, parsing: Parsing Program Arguments. -* program error signals: Program Error Signals. -* program name: Error Messages. -* program startup: Program Arguments. -* program termination: Program Termination. -* program termination signals: Termination Signals. -* programming your own streams: Custom Streams. -* project complex numbers: Operations on Complex. -* protocol (of socket): Socket Concepts. -* protocol family: Socket Concepts. -* protocols: NSS Basics. -* protocols database: Protocols Database. -* prototypes for variadic functions: Variadic Prototypes. -* pseudo-random numbers: Pseudo-Random Numbers. -* pseudo-terminals: Pseudo-Terminals. -* punctuation character <1>: Classification of Wide Characters. -* punctuation character: Classification of Characters. -* pushing input back: Unreading. -* quick sort function (for arrays): Array Sort Function. -* QUIT character: Signal Characters. -* quit signal: Termination Signals. -* quote removal: Expansion Stages. -* race conditions, relating to job control: Launching Jobs. -* race conditions, relating to signals: Signals in Handler. -* radix (of floating point number): Floating Point Concepts. -* raising signals: Generating Signals. -* random numbers: Pseudo-Random Numbers. -* random-access files: File Position. -* range error: Math Error Reporting. -* range of integer type: Range of Type. -* read lock: File Locks. -* reading from a directory: Accessing Directories. -* reading from a file descriptor: I/O Primitives. -* reading from a socket: Transferring Data. -* reading from a stream, by blocks: Block Input/Output. -* reading from a stream, by characters: Character Input. -* reading from a stream, formatted: Formatted Input. -* ready to run: Absolute Priority. -* real group ID: Process Persona. -* real user ID: Process Persona. -* real-time timer: Setting an Alarm. -* realtime CPU scheduling: Absolute Priority. -* realtime processing: Why Lock Pages. -* realtime scheduling: Realtime Scheduling. -* receiving datagrams: Receiving Datagrams. -* record locking: File Locks. -* redirecting input and output: Duplicating Descriptors. -* reentrant functions: Nonreentrancy. -* reentrant NSS functions: NSS Module Names. -* relative file name: File Name Resolution. -* removal of quotes: Expansion Stages. -* removing a file: Deleting Files. -* removing macros that shadow functions: Macro Definitions. -* renaming a file: Renaming Files. -* reporting bugs: Reporting Bugs. -* reporting errors: Error Reporting. -* REPRINT character: Editing Characters. -* reserved names: Reserved Names. -* resource limits: Limits on Resources. -* restarting interrupted primitives: Interrupted Primitives. -* restrictions on signal handler functions: Nonreentrancy. -* root directory: File Name Resolution. -* Rot13: Trivial Encryption. -* rpc: NSS Basics. -* runnable process: Absolute Priority. -* running a command: Running a Command. -* saved set-group-ID: How Change Persona. -* saved set-user-ID: How Change Persona. -* scanning the group list: Scanning All Groups. -* scanning the user list: Scanning All Users. -* scatter-gather: Scatter-Gather. -* scheduling, traditional: Traditional Scheduling. -* search function (for arrays): Array Search Function. -* search functions (for strings): Search Functions. -* seed (for random numbers): Pseudo-Random Numbers. -* seeking on a file descriptor: File Position Primitive. -* seeking on a stream: File Positioning. -* segmentation violation: Program Error Signals. -* sending a datagram: Sending Datagrams. -* sending signals: Generating Signals. -* sequential-access files: File Position. -* server: Connections. -* services: NSS Basics. -* services database: Services Database. -* session <1>: Concepts of Job Control. -* session: Job Control. -* session leader: Concepts of Job Control. -* setting an alarm: Setting an Alarm. -* setuid programs: How Change Persona. -* setuid programs and file access: Testing File Access. -* severity class <1>: Adding Severity Classes. -* severity class: Printing Formatted Messages. -* sgettext: GUI program problems. -* shadow: NSS Basics. -* shadowing functions with macros: Macro Definitions. -* shared lock: File Locks. -* shared memory: Memory Subsystem. -* shell: Concepts of Job Control. -* shift state: Keeping the state. -* Shift_JIS: Extended Char Intro. -* shrinking objects: Growing Objects. -* shutting down a socket: Closing a Socket. -* sigaction flags: Flags for Sigaction. -* sigaction function: Advanced Signal Handling. -* SIGCHLD, handling of: Stopped and Terminated Jobs. -* sign (of floating point number): Floating Point Concepts. -* signal <1>: Signal Handling. -* signal: FP Exceptions. -* signal action: Delivery of Signal. -* signal actions: Signal Actions. -* signal flags: Flags for Sigaction. -* signal function: Basic Signal Handling. -* signal handler function: Defining Handlers. -* signal mask: Process Signal Mask. -* signal messages: Signal Messages. -* signal names: Standard Signals. -* signal number: Standard Signals. -* signal set: Signal Sets. -* signals, generating: Generating Signals. -* signedness: Integers. -* significand (of floating point number): Floating Point Concepts. -* SIGTTIN, from background job: Access to the Terminal. -* SIGTTOU, from background job: Access to the Terminal. -* simple time: Calendar Time. -* single-byte string: Representation of Strings. -* size of string: Representation of Strings. -* SJIS: Extended Char Intro. -* socket: Sockets. -* socket address (name) binding: Socket Addresses. -* socket domain: Socket Concepts. -* socket namespace: Socket Concepts. -* socket option level: Socket Options. -* socket options: Socket Options. -* socket pair: Socket Pairs. -* socket protocol: Socket Concepts. -* socket shutdown: Closing a Socket. -* socket, client actions: Connecting. -* socket, closing: Closing a Socket. -* socket, connecting: Connecting. -* socket, creating: Creating a Socket. -* socket, initiating a connection: Connecting. -* sockets, accepting connections: Accepting Connections. -* sockets, listening: Listening. -* sockets, server actions: Listening. -* soft limit: Limits on Resources. -* soft link: Symbolic Links. -* sort function (for arrays): Array Sort Function. -* sparse files: File Position Primitive. -* special files: Making Special Files. -* special functions: Special Functions. -* specified action (for a signal): Delivery of Signal. -* speed of execution: Why Lock Pages. -* square root function: Exponents and Logarithms. -* stable sorting: Array Sort Function. -* standard dot notation, for Internet addresses: Abstract Host Addresses. -* standard environment variables: Standard Environment. -* standard error file descriptor: Descriptors and Streams. -* standard error stream: Standard Streams. -* standard file descriptors: Descriptors and Streams. -* standard input file descriptor: Descriptors and Streams. -* standard input stream: Standard Streams. -* standard output file descriptor: Descriptors and Streams. -* standard output stream: Standard Streams. -* standard streams: Standard Streams. -* standards: Standards and Portability. -* START character: Start/Stop Characters. -* startup of program: Program Arguments. -* stateful <1>: glibc iconv Implementation. -* stateful <2>: iconv Examples. -* stateful <3>: Generic Conversion Interface. -* stateful <4>: Converting Strings. -* stateful <5>: Converting a Character. -* stateful: Keeping the state. -* static memory allocation: Memory Allocation and C. -* static storage class: Memory Allocation and C. -* STATUS character: Other Special. -* status codes: Error Reporting. -* status of a file: Attribute Meanings. -* status of obstack: Status of an Obstack. -* sticky bit: Permission Bits. -* STOP character: Start/Stop Characters. -* stop signal: Job Control Signals. -* stopped job: Concepts of Job Control. -* stopped jobs, continuing: Continuing Stopped Jobs. -* stopped jobs, detecting: Stopped and Terminated Jobs. -* storage allocation: Memory. -* stream (sockets): Socket Concepts. -* stream orientation <1>: Streams and I18N. -* stream orientation: Opening Streams. -* stream, for I/O to a string: String Streams. -* streams and descriptors: Stream/Descriptor Precautions. -* streams, and file descriptors: Descriptors and Streams. -* streams, C++: Streams and I18N. -* streams, standard: Standard Streams. -* string: Representation of Strings. -* string allocation: Representation of Strings. -* string collation functions: Collation Functions. -* string comparison functions: String/Array Comparison. -* string concatenation functions: Copying and Concatenation. -* string copy functions: Copying and Concatenation. -* string length: Representation of Strings. -* string literal: Representation of Strings. -* string search functions: Search Functions. -* string stream: String Streams. -* string vectors, null-character separated: Argz and Envz Vectors. -* string, representation of: Representation of Strings. -* style of communication (of a socket): Socket Concepts. -* subshell: Initializing the Shell. -* substitution of variables and commands: Expansion Stages. -* successive signals: Merged Signals. -* summer time: Broken-down Time. -* SunOS: Berkeley Unix. -* supplementary group IDs: Process Persona. -* SUSP character: Signal Characters. -* suspend character: Signal Characters. -* SVID: SVID. -* swap space: Memory Concepts. -* symbolic link: Symbolic Links. -* symbolic link, opening: Open-time Flags. -* synchronizing <1>: Synchronizing AIO Operations. -* synchronizing: Synchronizing I/O. -* syntax error messages, in argp: Argp Helper Functions. -* syntax, for program arguments: Argument Syntax. -* syntax, for reading numbers: Parsing of Numbers. -* sysconf <1>: Processor Resources. -* sysconf: Query Memory Parameters. -* system call: System Calls. -* system call number: System Calls. -* System V Unix: SVID. -* TCP (Internet protocol): Protocols Database. -* template, for printf: Formatted Output. -* template, for scanf: Formatted Input. -* TERM environment variable: Standard Environment. -* terminal flow control: Line Control. -* terminal identification: Is It a Terminal. -* terminal input queue: I/O Queues. -* terminal input queue, clearing: Line Control. -* terminal input signal: Job Control Signals. -* terminal line control functions: Line Control. -* terminal line speed: Line Speed. -* terminal mode data types: Mode Data Types. -* terminal mode functions: Mode Functions. -* terminal modes, BSD: BSD Terminal Modes. -* terminal output queue: I/O Queues. -* terminal output queue, flushing: Line Control. -* terminal output signal: Job Control Signals. -* terminated jobs, detecting: Stopped and Terminated Jobs. -* termination signal: Termination Signals. -* testing access permission: Testing File Access. -* testing exit status of child process: Process Completion. -* text stream: Binary Streams. -* thrashing: Memory Subsystem. -* thread of control: Program Basics. -* threads: Streams and Threads. -* ticks, clock: Processor And CPU Time. -* tilde expansion: Expansion Stages. -* time: Time Basics. -* TIME termios slot: Noncanonical Input. -* time zone: TZ Variable. -* time zone database: TZ Variable. -* time, elapsed: Time Basics. -* time, high precision: High Accuracy Clock. -* timer, profiling: Setting an Alarm. -* timer, real-time: Setting an Alarm. -* timer, virtual: Setting an Alarm. -* timers, setting: Setting an Alarm. -* timespec: Elapsed Time. -* timeval: Elapsed Time. -* timing error in signal handling: Remembering a Signal. -* TMPDIR environment variable: Temporary Files. -* tokenizing strings: Finding Tokens in a String. -* tools, for installing library: Tools for Compilation. -* transmitting datagrams: Sending Datagrams. -* tree, directory: Working with Directory Trees. -* triangulation: glibc iconv Implementation. -* trigonometric functions: Trig Functions. -* type measurements, floating: Floating Type Macros. -* type measurements, integer: Width of Type. -* type modifier character (printf): Output Conversion Syntax. -* type modifier character (scanf): Input Conversion Syntax. -* typeahead buffer: I/O Queues. -* TZ environment variable: Standard Environment. -* UCS-2: Extended Char Intro. -* UCS-4: Extended Char Intro. -* ulps: Errors in Math Functions. -* umask: Setting Permissions. -* unbuffered stream: Buffering Concepts. -* unconstrained memory allocation: Unconstrained Allocation. -* undefining macros that shadow functions: Macro Definitions. -* underflow exception: FP Exceptions. -* Unicode: Extended Char Intro. -* Unix, Berkeley: Berkeley Unix. -* Unix, System V: SVID. -* unlinking a file: Deleting Files. -* unordered comparison: FP Comparison Functions. -* unreading characters: Unreading. -* upgrading from libc5: Linux. -* upper-case character <1>: Classification of Wide Characters. -* upper-case character: Classification of Characters. -* urgent data signal: Asynchronous I/O Signals. -* urgent socket condition: Out-of-Band Data. -* usage limits: Limits on Resources. -* usage messages, in argp: Argp Helper Functions. -* user accounting database: User Accounting Database. -* user database: User Database. -* user ID: User and Group IDs. -* user ID, determining: Who Logged In. -* user name: User and Group IDs. -* user signals: Miscellaneous Signals. -* usual file name errors: File Name Errors. -* UTF-16: Extended Char Intro. -* UTF-7: Extended Char Intro. -* UTF-8: Extended Char Intro. -* va_copy: Copying and Concatenation. -* variable number of arguments: Variadic Functions. -* variable substitution: Expansion Stages. -* variable-sized arrays: GNU C Variable-Size Arrays. -* variadic function argument access: Receiving Arguments. -* variadic function prototypes: Variadic Prototypes. -* variadic functions: Variadic Functions. -* variadic functions, calling: Calling Variadics. -* virtual time alarm signal: Alarm Signals. -* virtual timer: Setting an Alarm. -* volatile declarations: Nonreentrancy. -* waiting for a signal: Waiting for a Signal. -* waiting for completion of child process: Process Completion. -* waiting for input or output: Waiting for I/O. -* WERASE character: Editing Characters. -* whitespace character <1>: Classification of Wide Characters. -* whitespace character: Classification of Characters. -* wide character: Extended Char Intro. -* wide character string: Representation of Strings. -* width of integer type: Width of Type. -* wildcard expansion: Expansion Stages. -* wint_t: String/Array Conventions. -* word expansion: Word Expansion. -* working directory: Working Directory. -* write lock: File Locks. -* writing to a file descriptor: I/O Primitives. -* writing to a socket: Transferring Data. -* writing to a stream, by blocks: Block Input/Output. -* writing to a stream, by characters: Simple Output. -* writing to a stream, formatted: Formatted Output. -* YP: Host Identification. -* YP domain name: Host Identification. -* zero divide: FP Exceptions. + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence the + version number 2.1.] + +Preamble +-------- + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software--typically libraries--of the Free +Software Foundation and other authors who decide to use it. You can use +it too, but we suggest you first think carefully about whether this +license or the ordinary General Public License is the better strategy to +use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of it +in new free programs; and that you are informed that you can do these +things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know that +what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and is +quite different from the ordinary General Public License. We use this +license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does _Less_ to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of free +software. For example, permission to use the GNU C Library in non-free +programs enables many more people to use the whole GNU operating +system, as well as its variant, the GNU/Linux operating system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run that +program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other + program which contains a notice placed by the copyright holder or + other authorized party saying it may be distributed under the + terms of this Lesser General Public License (also called "this + License"). Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or + translated straightforwardly into another language. (Hereinafter, + translation is included without limitation in the term + "modification".) + + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code + means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the library. + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running a program using the Library is not restricted, and + output from such a program is covered only if its contents + constitute a work based on the Library (independent of the use of + the Library in a tool for writing it). Whether that is true + depends on what the Library does and what the program that uses + the Library does. + + 1. You may copy and distribute verbatim copies of the Library's + complete source code as you receive it, in any medium, provided + that you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep + intact all the notices that refer to this License and to the + absence of any warranty; and distribute a copy of this License + along with the Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Library or any portion + of it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. The modified work must itself be a software library. + + b. You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c. You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d. If a facility in the modified Library refers to a function or + a table of data to be supplied by an application program that + uses the facility, other than as an argument passed when the + facility is invoked, then you must make a good faith effort + to ensure that, in the event an application does not supply + such function or table, the facility still operates, and + performs whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots + has a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function + must be optional: if the application does not supply it, the + square root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Library, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a + whole which is a work based on the Library, the distribution of + the whole must be on the terms of this License, whose permissions + for other licensees extend to the entire whole, and thus to each + and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Library. + + In addition, mere aggregation of another work not based on the + Library with the Library (or with a work based on the Library) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. + To do this, you must alter all the notices that refer to this + License, so that they refer to the ordinary GNU General Public + License, version 2, instead of to this License. (If a newer + version than version 2 of the ordinary GNU General Public License + has appeared, then you can specify that version instead if you + wish.) Do not make any other change in these notices. + + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to + all subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable + form under the terms of Sections 1 and 2 above provided that you + accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software + interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy + the source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being + compiled or linked with it, is called a "work that uses the + Library". Such a work, in isolation, is not a derivative work of + the Library, and therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because + it contains portions of the Library), rather than a "work that + uses the library". The executable is therefore covered by this + License. Section 6 states terms for distribution of such + executables. + + When a "work that uses the Library" uses material from a header + file that is part of the Library, the object code for the work may + be a derivative work of the Library even though the source code is + not. Whether this is true is especially significant if the work + can be linked without the Library, or if the work is itself a + library. The threshold for this to be true is not precisely + defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a + derivative work. (Executables containing this object code plus + portions of the Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section + 6. Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered + by this License. You must supply a copy of this License. If the + work during execution displays copyright notices, you must include + the copyright notice for the Library among them, as well as a + reference directing the user to the copy of this License. Also, + you must do one of these things: + + a. Accompany the work with the complete corresponding + machine-readable source code for the Library including + whatever changes were used in the work (which must be + distributed under Sections 1 and 2 above); and, if the work + is an executable linked with the Library, with the complete + machine-readable "work that uses the Library", as object code + and/or source code, so that the user can modify the Library + and then relink to produce a modified executable containing + the modified Library. (It is understood that the user who + changes the contents of definitions files in the Library will + not necessarily be able to recompile the application to use + the modified definitions.) + + b. Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run + time a copy of the library already present on the user's + computer system, rather than copying library functions into + the executable, and (2) will operate properly with a modified + version of the library, if the user installs one, as long as + the modified version is interface-compatible with the version + that the work was made with. + + c. Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d. If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the + above specified materials from the same place. + + e. Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special + exception, the materials to be distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of + the operating system on which the executable runs, unless that + component itself accompanies the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you + cannot use both them and the Library together in an executable + that you distribute. + + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other + library facilities not covered by this License, and distribute + such a combined library, provided that the separate distribution + of the work based on the Library and of the other library + facilities is otherwise permitted, and provided that you do these + two things: + + a. Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b. Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same + work. + + 8. You may not copy, modify, sublicense, link with, or distribute the + Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate + your rights under this License. However, parties who have + received copies, or rights, from you under this License will not + have their licenses terminated so long as such parties remain in + full compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Library or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work + based on the Library), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the + Library subject to these terms and conditions. You may not impose + any further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties with this License. + + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Library at all. For example, if a patent license would not permit + royalty-free redistribution of the Library by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply, and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Library under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Library specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Library + does not specify a license version number, you may choose any + version ever published by the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free + status of all derivatives of our free software and of promoting + the sharing and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE + QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE + LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY + OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries +---------------------------------------------- + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of +the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should have +at least the "copyright" line and a pointer to where the full notice is +found. + + ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, + USA. + + Also add information on how to contact you by electronic and paper +mail. + + You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the library + `Frob' (a library for tweaking knobs) written by James Random Hacker. + + SIGNATURE OF TY COON, 1 April 1990 + Ty Coon, President of Vice + + That's all there is to it! + + +File: libc.info, Node: Documentation License, Next: Concept Index, Prev: Copying, Up: Top + +GNU Free Documentation License +****************************** + + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + written document "free" in the sense of freedom: to assure everyone + the effective freedom to copy and redistribute it, with or without + modifying it, either commercially or noncommercially. Secondarily, + this License preserves for the author and publisher a way to get + credit for their work, while not being considered responsible for + modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work that contains a + notice placed by the copyright holder saying it can be distributed + under the terms of this License. The "Document", below, refers to + any such manual or work. Any member of the public is a licensee, + and is addressed as "you". + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter + section of the Document that deals exclusively with the + relationship of the publishers or authors of the Document to the + Document's overall subject (or to related matters) and contains + nothing that could fall directly within that overall subject. + (For example, if the Document is in part a textbook of + mathematics, a Secondary Section may not explain any mathematics.) + The relationship could be a matter of historical connection with + the subject or with related matters, or of legal, commercial, + philosophical, ethical or political position regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, whose contents can be viewed and edited directly + and straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup has been designed + to thwart or discourage subsequent modification by readers is not + Transparent. A copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML designed for human modification. + Opaque formats include PostScript, PDF, proprietary formats that + can be read and edited only by proprietary word processors, SGML + or XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies of the Document numbering more than + 100, and the Document's license notice requires Cover Texts, you + must enclose the copies in covers that carry, clearly and legibly, + all these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a publicly-accessible + computer-network location containing a complete Transparent copy + of the Document, free of added material, which the general + network-using public has access to download anonymously at no + charge using public-standard network protocols. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of + previous versions (which should, if there were any, be listed + in the History section of the Document). You may use the + same title as a previous version if the original publisher of + that version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has less than five). + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section entitled "History", and its title, and + add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on + the Title Page. If there is no section entitled "History" in + the Document, create one stating the title, year, authors, + and publisher of the Document as given on its Title Page, + then add an item describing the Modified Version as stated in + the previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in + the "History" section. You may omit a network location for a + work that was published at least four years before the + Document itself, or if the original publisher of the version + it refers to gives permission. + + K. In any section entitled "Acknowledgments" or "Dedications", + preserve the section's title, and preserve in the section all + the substance and tone of each of the contributor + acknowledgments and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section + titles. + + M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section as "Endorsements" or to + conflict in title with any Invariant Section. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections entitled + "History" in the various original documents, forming one section + entitled "History"; likewise combine any sections entitled + "Acknowledgments", and any sections entitled "Dedications". You + must delete all sections entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, does not as a whole count as a + Modified Version of the Document, provided no compilation + copyright is claimed for the compilation. Such a compilation is + called an "aggregate", and this License does not apply to the + other self-contained works thus compiled with the Document, on + account of their being thus compiled, if they are not themselves + derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one + quarter of the entire aggregate, the Document's Cover Texts may be + placed on covers that surround only the Document within the + aggregate. Otherwise they must appear on covers around the whole + aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License provided that you also include the + original English version of this License. In case of a + disagreement between the translation and the original English + version of this License, the original English version will prevail. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided for under this License. Any other + attempt to copy, modify, sublicense or distribute the Document is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + `http://www.gnu.org/copyleft/'. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. + +ADDENDUM: How to use this License for your documents +---------------------------------------------------- + + To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no Front-Cover +Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being +LIST"; likewise for Back-Cover Texts. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, to +permit their use in free software. diff -durpN glibc-2.2.4/manual/libc.info-57 glibc-2.2.5/manual/libc.info-57 --- glibc-2.2.4/manual/libc.info-57 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-57 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,136 +33,1055 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Type Index, Next: Function Index, Prev: Concept Index, Up: Top +File: libc.info, Node: Concept Index, Next: Type Index, Prev: Documentation License, Up: Top -Type Index -********** +Concept Index +************* * Menu: -* __ftw64_func_t: Working with Directory Trees. -* __ftw_func_t: Working with Directory Trees. -* __nftw64_func_t: Working with Directory Trees. -* __nftw_func_t: Working with Directory Trees. -* blkcnt64_t: Attribute Meanings. -* blkcnt_t: Attribute Meanings. -* cc_t: Mode Data Types. -* clock_t: CPU Time. -* comparison_fn_t: Comparison Functions. -* cookie_close_function: Hook Functions. -* cookie_io_functions_t: Streams and Cookies. -* cookie_read_function: Hook Functions. -* cookie_seek_function: Hook Functions. -* cookie_write_function: Hook Functions. -* dev_t: Attribute Meanings. -* DIR: Opening a Directory. -* div_t: Integer Division. -* enum mcheck_status: Heap Consistency Checking. -* fd_set: Waiting for I/O. -* FILE: Streams. -* fpos64_t: Portable Positioning. -* fpos_t: Portable Positioning. -* gid_t: Reading Persona. -* glob64_t: Calling Glob. -* glob_t: Calling Glob. -* iconv_t: Generic Conversion Interface. -* imaxdiv_t: Integer Division. -* ino64_t: Attribute Meanings. -* ino_t: Attribute Meanings. -* jmp_buf: Non-Local Details. -* ldiv_t: Integer Division. -* lldiv_t: Integer Division. -* mbstate_t: Keeping the state. -* mode_t: Attribute Meanings. -* nlink_t: Attribute Meanings. -* off64_t: File Position Primitive. -* off_t: File Position Primitive. -* pid_t: Process Identification. -* printf_arginfo_function: Defining the Output Handler. -* printf_function: Defining the Output Handler. -* ptrdiff_t: Important Data Types. -* regex_t: POSIX Regexp Compilation. -* regmatch_t: Regexp Subexpressions. -* regoff_t: Regexp Subexpressions. -* sig_atomic_t: Atomic Types. -* sighandler_t: Basic Signal Handling. -* sigjmp_buf: Non-Local Exits and Signals. -* sigset_t: Signal Sets. -* size_t: Important Data Types. -* speed_t: Line Speed. -* ssize_t: I/O Primitives. -* stack_t: Signal Stack. -* struct __gconv_step: glibc iconv Implementation. -* struct __gconv_step_data: glibc iconv Implementation. -* struct aiocb: Asynchronous I/O. -* struct aiocb64: Asynchronous I/O. -* struct aioinit: Configuration of AIO. -* struct argp: Argp Parsers. -* struct argp_child: Argp Children. -* struct argp_option: Argp Option Vectors. -* struct argp_state: Argp Parsing State. -* struct dirent: Directory Entries. -* struct ENTRY: Hash Search Function. -* struct exit_status: Manipulating the Database. -* struct flock: File Locks. -* struct fstab: fstab. -* struct FTW: Working with Directory Trees. -* struct group: Group Data Structure. -* struct hostent: Host Names. -* struct if_nameindex: Interface Naming. -* struct in6_addr: Host Address Data Type. -* struct in_addr: Host Address Data Type. -* struct iovec: Scatter-Gather. -* struct itimerval: Setting an Alarm. -* struct lconv: The Lame Way to Locale Data. -* struct linger: Socket-Level Options. -* struct mallinfo: Statistics of Malloc. -* struct mntent: mtab. -* struct netent: Networks Database. -* struct ntptimeval: High Accuracy Clock. -* struct obstack: Creating Obstacks. -* struct option: Getopt Long Options. -* struct passwd: User Data Structure. -* struct printf_info: Conversion Specifier Options. -* struct protoent: Protocols Database. -* struct random_data: BSD Random. -* struct rlimit: Limits on Resources. -* struct rlimit64: Limits on Resources. -* struct rusage: Resource Usage. -* struct sched_param: Basic Scheduling Functions. -* struct servent: Services Database. -* struct sgttyb: BSD Terminal Modes. -* struct sigaction: Advanced Signal Handling. -* struct sigstack: Signal Stack. -* struct sigvec: BSD Handler. -* struct sockaddr: Address Formats. -* struct sockaddr_in: Internet Address Formats. -* struct sockaddr_in6: Internet Address Formats. -* struct sockaddr_un: Local Namespace Details. -* struct stat: Attribute Meanings. -* struct stat64: Attribute Meanings. -* struct termios: Mode Data Types. -* struct timespec: Elapsed Time. -* struct timeval: Elapsed Time. -* struct timex: High Accuracy Clock. -* struct timezone: High-Resolution Calendar. -* struct tm: Broken-down Time. -* struct tms: Processor Time. -* struct utimbuf: File Times. -* struct utmp: Manipulating the Database. -* struct utmpx: XPG Functions. -* struct utsname: Platform Type. -* struct vtimes: Resource Usage. -* tcflag_t: Mode Data Types. -* time_t: Simple Calendar Time. -* ucontext_t: System V contexts. -* uid_t: Reading Persona. -* union wait: BSD Wait Functions. -* va_list: Argument Macros. -* VISIT: Tree Search Function. -* wchar_t: Extended Char Intro. -* wctrans_t: Wide Character Case Conversion. -* wctype_t: Classification of Wide Characters. -* wint_t: Extended Char Intro. -* wordexp_t: Calling Wordexp. +* /etc/hostname: Host Identification. +* /etc/nsswitch.conf: NSS Configuration File. +* 4.N BSD Unix: Berkeley Unix. +* __va_copy: Copying and Concatenation. +* _POSIX_OPTION_ORDER environment variable.: Standard Environment. +* _POSIX_SAVED_IDS: How Change Persona. +* abort signal: Program Error Signals. +* aborting a program: Aborting a Program. +* absolute file name: File Name Resolution. +* absolute priority: Absolute Priority. +* absolute value functions: Absolute Value. +* accepting connections: Accepting Connections. +* access permission for a file: Access Permission. +* access, testing for: Testing File Access. +* accessing directories: Accessing Directories. +* address of socket: Socket Addresses. +* address space <1>: Program Basics. +* address space: Memory Subsystem. +* alarm signal: Alarm Signals. +* alarms, setting: Setting an Alarm. +* alignment (in obstacks): Obstacks Data Alignment. +* alignment (with malloc): Aligned Memory Blocks. +* alloca disadvantages: Disadvantages of Alloca. +* alloca function: Variable Size Automatic. +* allocating pseudo-terminals: Allocation. +* allocation (obstacks): Allocation in an Obstack. +* allocation debugging: Allocation Debugging. +* allocation hooks, for malloc: Hooks for Malloc. +* allocation of memory with malloc: Basic Allocation. +* allocation size of string: Representation of Strings. +* allocation statistics: Statistics of Malloc. +* alphabetic character <1>: Classification of Wide Characters. +* alphabetic character: Classification of Characters. +* alphanumeric character <1>: Classification of Wide Characters. +* alphanumeric character: Classification of Characters. +* append-access files: File Position. +* argc (program argument count): Program Arguments. +* argp (program argument parser): Argp. +* argp parser functions: Argp Parser Functions. +* ARGP_HELP_FMT environment variable: Argp User Customization. +* argument parsing with argp: Argp. +* argument promotion: Calling Variadics. +* argument vectors, null-character separated: Argz and Envz Vectors. +* arguments (variadic functions): Receiving Arguments. +* arguments, how many: How Many Arguments. +* arguments, to program: Program Arguments. +* argv (program argument vector): Program Arguments. +* argz vectors (string vectors): Argz and Envz Vectors. +* arithmetic expansion: Expansion Stages. +* array comparison functions: String/Array Comparison. +* array copy functions: Copying and Concatenation. +* array search function: Array Search Function. +* array sort function: Array Sort Function. +* ASCII character: Classification of Characters. +* assertions: Consistency Checking. +* attributes of a file: Attribute Meanings. +* automatic freeing: Variable Size Automatic. +* automatic memory allocation: Memory Allocation and C. +* automatic storage class: Memory Allocation and C. +* automatic storage with variable size: Variable Size Automatic. +* background job: Concepts of Job Control. +* background job, launching: Foreground and Background. +* backtrace: Backtraces. +* backtrace_fd: Backtraces. +* backtrace_symbols: Backtraces. +* base (of floating point number): Floating Point Concepts. +* baud rate: Line Speed. +* Berkeley Unix: Berkeley Unix. +* Bessel functions: Special Functions. +* bias (of floating point number exponent): Floating Point Concepts. +* big-endian: Byte Order. +* binary I/O to a stream: Block Input/Output. +* binary search function (for arrays): Array Search Function. +* binary stream: Binary Streams. +* binding a socket address: Socket Addresses. +* blank character <1>: Classification of Wide Characters. +* blank character: Classification of Characters. +* block I/O to a stream: Block Input/Output. +* blocked signals: Delivery of Signal. +* blocked signals, checking for: Checking for Pending Signals. +* blocking signals: Blocking Signals. +* blocking signals, in a handler: Blocking for Handler. +* bootstrapping, and services: Actions in the NSS configuration. +* break condition, detecting: Input Modes. +* break condition, generating: Line Control. +* breaking a string into tokens: Finding Tokens in a String. +* broken pipe signal: Operation Error Signals. +* broken-down time <1>: Broken-down Time. +* broken-down time: Calendar Time. +* BSD compatibility library: Process Group Functions. +* BSD compatibility library.: Feature Test Macros. +* BSD Unix: Berkeley Unix. +* buffering of streams: Stream Buffering. +* buffering, controlling: Controlling Buffering. +* bugs, reporting: Reporting Bugs. +* bus error: Program Error Signals. +* butterfly: Misc FP Arithmetic. +* byte order conversion, for socket: Byte Order. +* byte stream: Socket Concepts. +* C++ streams: Streams and I18N. +* calendar time: Time Basics. +* calendar time and broken-down time: Broken-down Time. +* calendar, Gregorian: Calendar Time. +* calling variadic functions: Calling Variadics. +* canonical input processing: Canonical or Not. +* capacity limits, POSIX: General Limits. +* carrier detect: Control Modes. +* case conversion of characters: Case Conversion. +* catching signals: Delivery of Signal. +* categories for locales: Locale Categories. +* change working directory: Working Directory. +* changing the locale: Setting the Locale. +* changing the size of a block (malloc): Changing Block Size. +* changing the size of a block (obstacks): Growing Objects. +* channels: Stream/Descriptor Precautions. +* character case conversion: Case Conversion. +* character predicates: Classification of Characters. +* character testing: Classification of Characters. +* checking for pending signals: Checking for Pending Signals. +* child process <1>: Process Creation Concepts. +* child process <2>: Processes. +* child process: Processor Time. +* child process signal: Job Control Signals. +* chunks: Obstack Chunks. +* classes, floating-point: Floating Point Classes. +* classification of characters: Classification of Characters. +* cleaning up a stream: Linked Channels. +* clearing terminal input queue: Line Control. +* client: Connections. +* clock ticks: Processor And CPU Time. +* clock, high accuracy: High Accuracy Clock. +* close-on-exec (file descriptor flag): Descriptor Flags. +* closing a file descriptor: Opening and Closing Files. +* closing a socket: Closing a Socket. +* closing a stream: Closing Streams. +* collating strings: Collation Functions. +* combining locales: Choosing Locale. +* command argument syntax: Argument Syntax. +* command arguments, parsing: Parsing Program Arguments. +* command line arguments: Program Arguments. +* command substitution: Expansion Stages. +* communication style (of a socket): Socket Concepts. +* comparing strings and arrays: String/Array Comparison. +* Comparison Function: Comparison Functions. +* compiling: Configuring and compiling. +* complex exponentiation functions: Exponents and Logarithms. +* complex logarithm functions: Exponents and Logarithms. +* complex numbers: Complex Numbers. +* complex trigonometric functions: Trig Functions. +* concatenating strings: Copying and Concatenation. +* configurations, all supported: Supported Configurations. +* configuring: Configuring and compiling. +* conjugate complex numbers: Operations on Complex. +* connecting a socket: Connecting. +* connection: Connections. +* consistency checking: Consistency Checking. +* consistency checking, of heap: Heap Consistency Checking. +* constants <1>: Mathematical Constants. +* constants: Memory Concepts. +* continue signal: Job Control Signals. +* control character <1>: Classification of Wide Characters. +* control character: Classification of Characters. +* control operations on files: Control Operations. +* controlling process: Controlling Terminal. +* controlling terminal: Concepts of Job Control. +* controlling terminal, access to: Access to the Terminal. +* controlling terminal, determining: Identifying the Terminal. +* controlling terminal, setting: Open-time Flags. +* conversion specifications (printf): Formatted Output Basics. +* conversion specifications (scanf): Formatted Input Basics. +* converting byte order: Byte Order. +* converting case of characters: Case Conversion. +* converting file descriptor to stream: Descriptors and Streams. +* converting floats to integers: Rounding Functions. +* converting group ID to group name: Lookup Group. +* converting group name to group ID: Lookup Group. +* converting host address to name: Host Names. +* converting host name to address: Host Names. +* converting network name to network number: Networks Database. +* converting network number to network name: Networks Database. +* converting port number to service name: Services Database. +* converting service name to port number: Services Database. +* converting string to collation order: Collation Functions. +* converting strings to numbers: Parsing of Numbers. +* converting user ID to user name: Lookup User. +* converting user name to user ID: Lookup User. +* cookie, for custom stream: Streams and Cookies. +* copy-on-write page fault: Locked Memory Details. +* copying strings and arrays: Copying and Concatenation. +* cpu priority: Priority. +* CPU time <1>: Processor Time. +* CPU time <2>: Processor And CPU Time. +* CPU time: Time Basics. +* create on open (file status flag): Open-time Flags. +* creating a directory: Creating Directories. +* creating a FIFO special file: FIFO Special Files. +* creating a pipe: Creating a Pipe. +* creating a pipe to a subprocess: Pipe to a Subprocess. +* creating a process: Process Creation Concepts. +* creating a socket: Creating a Socket. +* creating a socket pair: Socket Pairs. +* creating special files: Making Special Files. +* cube root function: Exponents and Logarithms. +* currency symbols: Currency Symbol. +* current limit: Limits on Resources. +* current working directory: Working Directory. +* custom streams: Custom Streams. +* customizing printf: Customizing Printf. +* data loss on sockets: Socket Concepts. +* databases: Name Service Switch. +* datagram socket: Datagrams. +* datagrams, transmitting: Sending Datagrams. +* date: Time Basics. +* Daylight Saving Time: Broken-down Time. +* decimal digit character: Classification of Characters. +* decimal-point separator: General Numeric. +* declaration (compared to definition): Header Files. +* declaring variadic functions: Calling Variadics. +* decompose complex numbers: Operations on Complex. +* default action (for a signal): Delivery of Signal. +* default action for a signal: Basic Signal Handling. +* default argument promotions: Calling Variadics. +* default value, and NSS: Notes on NSS Configuration File. +* defining new printf conversions: Customizing Printf. +* definition (compared to declaration): Header Files. +* delayed suspend character: Signal Characters. +* deleting a directory: Deleting Files. +* deleting a file: Deleting Files. +* delivery of signals: Delivery of Signal. +* descriptors and streams: Stream/Descriptor Precautions. +* digit character <1>: Classification of Wide Characters. +* digit character: Classification of Characters. +* directories, accessing: Accessing Directories. +* directories, creating: Creating Directories. +* directories, deleting: Deleting Files. +* directory: Directories. +* directory entry: Directories. +* directory hierarchy: Working with Directory Trees. +* directory stream: Accessing Directories. +* disadvantages of alloca: Disadvantages of Alloca. +* DISCARD character: Other Special. +* division by zero: FP Exceptions. +* DNS: Host Identification. +* DNS server unavailable: Actions in the NSS configuration. +* domain (of socket): Socket Concepts. +* domain error: Math Error Reporting. +* domain name: Host Identification. +* Domain Name System: Host Identification. +* dot notation, for Internet addresses: Abstract Host Addresses. +* DSUSP character: Signal Characters. +* duplicating file descriptors: Duplicating Descriptors. +* dynamic memory allocation: Memory Allocation and C. +* EBCDIC: Extended Char Intro. +* echo of terminal input: Local Modes. +* effective group ID: Process Persona. +* effective user ID: Process Persona. +* efficiency and malloc: Efficiency and Malloc. +* efficiency and obstacks: Extra Fast Growing. +* efficiency of chunks: Obstack Chunks. +* EINTR, and restarting interrupted primitives: Interrupted Primitives. +* elapsed time <1>: Elapsed Time. +* elapsed time: Time Basics. +* encryption: Trivial Encryption. +* end of file, on a stream: EOF and Errors. +* end-of-file, on a file descriptor: I/O Primitives. +* environment: Environment Variables. +* environment access: Environment Access. +* environment representation: Environment Access. +* environment variable: Environment Variables. +* environment vectors, null-character separated: Argz and Envz Vectors. +* envz vectors (environment vectors): Argz and Envz Vectors. +* EOF character: Editing Characters. +* EOL character: Editing Characters. +* EOL2 character: Editing Characters. +* epoch: Simple Calendar Time. +* ERASE character: Editing Characters. +* errno: System Calls. +* error codes: Error Reporting. +* error messages, in argp: Argp Helper Functions. +* error reporting: Error Reporting. +* errors, mathematical: Math Error Reporting. +* establishing a handler: Signal Actions. +* ethers: NSS Basics. +* EUC: Extended Char Intro. +* EUC-JP: glibc iconv Implementation. +* exception <1>: Program Error Signals. +* exception: FP Exceptions. +* exclusive lock: File Locks. +* exec functions: Executing a File. +* execing a program: Memory Concepts. +* executable: Memory Concepts. +* executing a file: Executing a File. +* exit status: Exit Status. +* exit status value: Program Termination. +* exiting a program: Memory Concepts. +* expansion of shell words: Word Expansion. +* exponent (of floating point number): Floating Point Concepts. +* exponentiation functions: Exponents and Logarithms. +* extending printf: Customizing Printf. +* extracting file descriptor from stream: Descriptors and Streams. +* fcntl function: Control Operations. +* FDL, GNU Free Documentation License: Documentation License. +* feature test macros: Feature Test Macros. +* field splitting: Expansion Stages. +* FIFO special file: Pipes and FIFOs. +* file access permission: Access Permission. +* file access time: File Times. +* file attribute modification time: File Times. +* file attributes: Attribute Meanings. +* file creation mask: Setting Permissions. +* file descriptor flags: Descriptor Flags. +* file descriptor sets, for select: Waiting for I/O. +* file descriptors, standard: Descriptors and Streams. +* file locks: File Locks. +* file modification time: File Times. +* file name: File Names. +* file name component: Directories. +* file name errors: File Name Errors. +* file name resolution: File Name Resolution. +* file name translation flags: Open-time Flags. +* file names, multiple: Hard Links. +* file owner: File Owner. +* file permission bits: Permission Bits. +* file pointer: Streams. +* file position: File Position. +* file positioning on a file descriptor: File Position Primitive. +* file positioning on a stream: File Positioning. +* file status flags: File Status Flags. +* files, accessing: Memory Concepts. +* filtering i/o through subprocess: Pipe to a Subprocess. +* flag character (printf): Output Conversion Syntax. +* flag character (scanf): Input Conversion Syntax. +* flags for sigaction: Flags for Sigaction. +* flags, file name translation: Open-time Flags. +* flags, open-time action: Open-time Flags. +* floating point: Floating Point Numbers. +* floating point, IEEE: IEEE Floating Point. +* floating type measurements: Floating Type Macros. +* floating-point classes: Floating Point Classes. +* floating-point exception: Program Error Signals. +* flow control, terminal: Line Control. +* flushing a stream: Flushing Buffers. +* flushing terminal output queue: Line Control. +* foreground job: Concepts of Job Control. +* foreground job, launching: Foreground and Background. +* forking a process: Process Creation Concepts. +* format string, for printf: Formatted Output. +* format string, for scanf: Formatted Input. +* formatted input from a stream: Formatted Input. +* formatted messages: Formatted Messages. +* formatted output to a stream: Formatted Output. +* FP arithmetic: FP Bit Twiddling. +* FQDN: Host Identification. +* frame, real memory: Memory Concepts. +* free documentation: Free Manuals. +* freeing (obstacks): Freeing Obstack Objects. +* freeing memory: Memory Concepts. +* freeing memory allocated with malloc: Freeing after Malloc. +* fully buffered stream: Buffering Concepts. +* function prototypes (variadic): Variadic Prototypes. +* gamma function: Special Functions. +* gcvt_r: System V Number Conversion. +* gencat: The gencat program. +* generation of signals: Signal Generation. +* generic i/o control operations: IOCTLs. +* globbing: Globbing. +* graphic character <1>: Classification of Wide Characters. +* graphic character: Classification of Characters. +* Gregorian calendar: Calendar Time. +* group: NSS Basics. +* group database: Group Database. +* group ID: User and Group IDs. +* group name: User and Group IDs. +* group owner of a file: File Owner. +* grouping of digits: General Numeric. +* growing objects (in obstacks): Growing Objects. +* handling multiple signals: Merged Signals. +* hangup signal: Termination Signals. +* hard limit: Limits on Resources. +* hard link: Hard Links. +* header files: Header Files. +* heap consistency checking: Heap Consistency Checking. +* heap, dynamic allocation from: Unconstrained Allocation. +* heap, freeing memory from: Freeing after Malloc. +* hexadecimal digit character <1>: Classification of Wide Characters. +* hexadecimal digit character: Classification of Characters. +* hidden bit (of floating point number mantissa): Floating Point Concepts. +* hierarchy, directory: Working with Directory Trees. +* high-priority data: Out-of-Band Data. +* high-resolution time: Calendar Time. +* holes in files: File Position Primitive. +* home directory: Standard Environment. +* HOME environment variable: Standard Environment. +* hook functions (of custom streams): Hook Functions. +* host address, Internet: Abstract Host Addresses. +* host name: Host Identification. +* hostname: Host Identification. +* hosts: NSS Basics. +* hosts database: Host Names. +* how many arguments: How Many Arguments. +* hyperbolic functions: Hyperbolic Functions. +* identifying terminals: Is It a Terminal. +* IEEE 754: Floating Point Numbers. +* IEEE floating point: Floating Point Numbers. +* IEEE floating point representation: IEEE Floating Point. +* IEEE Std 1003.1: POSIX. +* IEEE Std 1003.2: POSIX. +* ignore action for a signal: Basic Signal Handling. +* illegal instruction: Program Error Signals. +* impossible events: Consistency Checking. +* independent channels: Independent Channels. +* inexact exception: FP Exceptions. +* infinity: Infinity and NaN. +* initial signal actions: Initial Signal Actions. +* inode number: Attribute Meanings. +* input available signal: Asynchronous I/O Signals. +* input conversions, for scanf: Table of Input Conversions. +* input from multiple files: Waiting for I/O. +* installation tools: Tools for Compilation. +* installing: Running make install. +* integer: Integers. +* integer division functions: Integer Division. +* integer type range: Range of Type. +* integer type width: Width of Type. +* interactive signals, from terminal: Local Modes. +* interactive stop signal: Job Control Signals. +* internal representation: Extended Char Intro. +* internationalization: Locales. +* Internet host address: Abstract Host Addresses. +* Internet namespace, for sockets: Internet Namespace. +* interprocess communication, with FIFO: FIFO Special Files. +* interprocess communication, with pipes: Creating a Pipe. +* interprocess communication, with signals: Kill Example. +* interprocess communication, with sockets: Sockets. +* interrupt character: Signal Characters. +* interrupt signal: Termination Signals. +* interrupt-driven input: Interrupt Input. +* interrupting primitives: Interrupted Primitives. +* interval: Time Basics. +* interval timer, setting: Setting an Alarm. +* INTR character: Signal Characters. +* invalid exception: FP Exceptions. +* inverse complex hyperbolic functions: Hyperbolic Functions. +* inverse complex trigonometric functions: Inverse Trig Functions. +* inverse hyperbolic functions: Hyperbolic Functions. +* inverse trigonometric functions: Inverse Trig Functions. +* invocation of program: Program Arguments. +* IOCTLs: IOCTLs. +* ISO 10646: Extended Char Intro. +* ISO 2022: Extended Char Intro. +* ISO 6937: Extended Char Intro. +* ISO C: ISO C. +* ISO-2022-JP: glibc iconv Implementation. +* ISO/IEC 9945-1: POSIX. +* ISO/IEC 9945-2: POSIX. +* job: Job Control. +* job control: Job Control. +* job control functions: Functions for Job Control. +* job control is optional: Job Control is Optional. +* job control signals: Job Control Signals. +* job control, enabling: Initializing the Shell. +* Kermit the frog: Search/Sort Example. +* kernel call: System Calls. +* kernel header files: Linux. +* KILL character: Editing Characters. +* kill signal: Termination Signals. +* killing a process: Signaling Another Process. +* Korn Shell: Wildcard Matching. +* LANG environment variable <1>: Standard Environment. +* LANG environment variable: The catgets Functions. +* launching jobs: Launching Jobs. +* LC_ALL environment variable <1>: Standard Environment. +* LC_ALL environment variable: The catgets Functions. +* LC_COLLATE environment variable: Standard Environment. +* LC_CTYPE environment variable: Standard Environment. +* LC_MESSAGES environment variable <1>: Standard Environment. +* LC_MESSAGES environment variable: The catgets Functions. +* LC_MONETARY environment variable: Standard Environment. +* LC_NUMERIC environment variable: Standard Environment. +* LC_TIME environment variable: Standard Environment. +* leap second: Broken-down Time. +* length of string: Representation of Strings. +* level, for socket options: Socket Options. +* LGPL, Lesser General Public License: Copying. +* library: Introduction. +* limit: Limits on Resources. +* limits on resource usage: Limits on Resources. +* limits, file name length: Limits for Files. +* limits, floating types: Floating Type Macros. +* limits, integer types: Range of Type. +* limits, link count of files: Limits for Files. +* limits, number of open files: General Limits. +* limits, number of processes: General Limits. +* limits, number of supplementary group IDs: General Limits. +* limits, pipe buffer size: Limits for Files. +* limits, POSIX: General Limits. +* limits, program argument size: General Limits. +* limits, terminal input queue: Limits for Files. +* limits, time zone name length: General Limits. +* line buffered stream: Buffering Concepts. +* line speed: Line Speed. +* lines (in a text file): Binary Streams. +* link: Directories. +* link, hard: Hard Links. +* link, soft: Symbolic Links. +* link, symbolic: Symbolic Links. +* linked channels: Linked Channels. +* listening (sockets): Listening. +* literals: Memory Concepts. +* little-endian: Byte Order. +* LNEXT character: Other Special. +* load average: Processor Resources. +* local namespace, for sockets: Local Namespace. +* local network address number: Abstract Host Addresses. +* local time: Calendar Time. +* locale categories: Locale Categories. +* locale, changing: Setting the Locale. +* locales: Locales. +* locking pages: Locking Pages. +* logarithm functions: Exponents and Logarithms. +* login name: User and Group IDs. +* login name, determining: Who Logged In. +* LOGNAME environment variable: Standard Environment. +* long jumps: Non-Local Exits. +* long-named options: Argument Syntax. +* longjmp: Advantages of Alloca. +* loss of data on sockets: Socket Concepts. +* lost resource signal: Operation Error Signals. +* lower-case character <1>: Classification of Wide Characters. +* lower-case character: Classification of Characters. +* macros: Obstack Functions. +* main function: Program Arguments. +* malloc debugger: Allocation Debugging. +* malloc function: Unconstrained Allocation. +* mantissa (of floating point number): Floating Point Concepts. +* matching failure, in scanf: Formatted Input Basics. +* math errors: Errors in Math Functions. +* mathematical constants: Mathematical Constants. +* maximum: Misc FP Arithmetic. +* maximum field width (scanf): Input Conversion Syntax. +* maximum limit: Limits on Resources. +* maximum possible integer: Integers. +* measurements of floating types: Floating Type Macros. +* memory allocation: Memory. +* memory lock: Locking Pages. +* memory mapped file: Memory Concepts. +* memory mapped I/O: Memory Concepts. +* memory page: Memory Subsystem. +* merging of signals: Merged Signals. +* MIN termios slot: Noncanonical Input. +* minimum: Misc FP Arithmetic. +* minimum field width (printf): Output Conversion Syntax. +* minimum possible integer: Integers. +* mixing descriptors and streams: Stream/Descriptor Precautions. +* modem disconnect: Control Modes. +* modem status lines: Control Modes. +* monetary value formatting: The Lame Way to Locale Data. +* multi-threaded application: Streams and Threads. +* multibyte character: Extended Char Intro. +* multibyte character string: Representation of Strings. +* multibyte string: Representation of Strings. +* multiple names for one file: Hard Links. +* multiplexing input: Waiting for I/O. +* multiply-add: Misc FP Arithmetic. +* name of running program: Error Messages. +* name of socket: Socket Addresses. +* Name Service Switch: Name Service Switch. +* name space: Reserved Names. +* names of signals: Standard Signals. +* namespace (of socket): Socket Concepts. +* NaN <1>: FP Bit Twiddling. +* NaN: Infinity and NaN. +* Netgroup: Netgroup Data. +* netgroup: NSS Basics. +* network byte order: Byte Order. +* network number: Abstract Host Addresses. +* network protocol: Socket Concepts. +* networks: NSS Basics. +* networks database: Networks Database. +* NIS: Host Identification. +* NIS domain name: Host Identification. +* nisplus, and booting: Actions in the NSS configuration. +* nisplus, and completeness: Actions in the NSS configuration. +* NLSPATH environment variable <1>: Standard Environment. +* NLSPATH environment variable: The catgets Functions. +* non-blocking open: Open-time Flags. +* non-local exit, from signal handler: Longjmp in Handler. +* non-local exits: Non-Local Exits. +* noncanonical input processing: Canonical or Not. +* normalization functions (floating-point): Normalization Functions. +* normalized floating point number: Floating Point Concepts. +* not a number: Infinity and NaN. +* NSS: Name Service Switch. +* nsswitch.conf: NSS Configuration File. +* null character: Representation of Strings. +* null pointer constant: Null Pointer Constant. +* null wide character: Representation of Strings. +* number of arguments passed: How Many Arguments. +* number syntax, parsing: Parsing of Numbers. +* numeric value formatting: The Lame Way to Locale Data. +* obstack status: Status of an Obstack. +* obstacks: Obstacks. +* open-time action flags: Open-time Flags. +* opening a file: I/O Concepts. +* opening a file descriptor: Opening and Closing Files. +* opening a pipe: Creating a Pipe. +* opening a pseudo-terminal pair: Pseudo-Terminal Pairs. +* opening a socket: Creating a Socket. +* opening a socket pair: Socket Pairs. +* opening a stream: Opening Streams. +* Optimization: FP Function Optimizations. +* optimizing NSS: Notes on NSS Configuration File. +* option parsing with argp: Argp. +* optional arguments: Variadic Functions. +* optional POSIX features: System Options. +* orientation, stream <1>: Streams and I18N. +* orientation, stream: Opening Streams. +* orphaned process group: Orphaned Process Groups. +* out-of-band data: Out-of-Band Data. +* output conversions, for printf: Table of Output Conversions. +* output possible signal: Asynchronous I/O Signals. +* overflow exception: FP Exceptions. +* owner of a file: File Owner. +* packet: Socket Concepts. +* page boundary: Aligned Memory Blocks. +* page fault: Memory Concepts. +* page fault, copy-on-write: Locked Memory Details. +* page frame: Memory Concepts. +* page, memory: Memory Subsystem. +* page, virtual memory: Memory Concepts. +* paging <1>: Locking Pages. +* paging: Memory Concepts. +* parameter promotion: String/Array Conventions. +* parent directory: File Name Resolution. +* parent process <1>: Process Creation Concepts. +* parent process: Processes. +* parity checking: Input Modes. +* parsing a template string: Parsing a Template String. +* parsing numbers (in formatted input): Parsing of Numbers. +* parsing program arguments: Parsing Program Arguments. +* parsing tokens from a string: Finding Tokens in a String. +* passwd: NSS Basics. +* password database: User Database. +* PATH environment variable: Standard Environment. +* pause function: Waiting for a Signal. +* peeking at input: Unreading. +* pending signals: Delivery of Signal. +* pending signals, checking for: Checking for Pending Signals. +* period of time: Time Basics. +* permission to access a file: Access Permission. +* persona: Process Persona. +* physical address: Memory Subsystem. +* physical memory: Memory Subsystem. +* pi (trigonometric constant): Trig Functions. +* pipe: Pipes and FIFOs. +* pipe signal: Operation Error Signals. +* pipe to a subprocess: Pipe to a Subprocess. +* port number: Ports. +* positioning a file descriptor: File Position Primitive. +* positioning a stream: File Positioning. +* positive difference: Misc FP Arithmetic. +* POSIX: POSIX. +* POSIX capacity limits: General Limits. +* POSIX optional features: System Options. +* POSIX.1: POSIX. +* POSIX.2: POSIX. +* power functions: Exponents and Logarithms. +* precision (of floating point number): Floating Point Concepts. +* precision (printf): Output Conversion Syntax. +* predicates on arrays: String/Array Comparison. +* predicates on characters: Classification of Characters. +* predicates on strings: String/Array Comparison. +* preemptive scheduling: Absolute Priority. +* primitives, interrupting: Interrupted Primitives. +* printing character <1>: Classification of Wide Characters. +* printing character: Classification of Characters. +* priority of a process: Priority. +* priority, absolute: Absolute Priority. +* process <1>: Processes. +* process: Program Basics. +* process completion: Process Completion. +* process group functions: Functions for Job Control. +* process group ID: Launching Jobs. +* process group leader: Launching Jobs. +* process groups: Job Control. +* process ID: Process Creation Concepts. +* process image: Process Creation Concepts. +* process lifetime: Process Creation Concepts. +* process priority: Priority. +* process signal mask: Process Signal Mask. +* process termination: Program Termination. +* processor time <1>: Processor Time. +* processor time: Time Basics. +* profiling alarm signal: Alarm Signals. +* profiling timer: Setting an Alarm. +* program: Program Basics. +* program argument syntax: Argument Syntax. +* program arguments: Program Arguments. +* program arguments, parsing: Parsing Program Arguments. +* program error signals: Program Error Signals. +* program name: Error Messages. +* program startup: Program Arguments. +* program termination: Program Termination. +* program termination signals: Termination Signals. +* programming your own streams: Custom Streams. +* project complex numbers: Operations on Complex. +* protocol (of socket): Socket Concepts. +* protocol family: Socket Concepts. +* protocols: NSS Basics. +* protocols database: Protocols Database. +* prototypes for variadic functions: Variadic Prototypes. +* pseudo-random numbers: Pseudo-Random Numbers. +* pseudo-terminals: Pseudo-Terminals. +* punctuation character <1>: Classification of Wide Characters. +* punctuation character: Classification of Characters. +* pushing input back: Unreading. +* quick sort function (for arrays): Array Sort Function. +* QUIT character: Signal Characters. +* quit signal: Termination Signals. +* quote removal: Expansion Stages. +* race conditions, relating to job control: Launching Jobs. +* race conditions, relating to signals: Signals in Handler. +* radix (of floating point number): Floating Point Concepts. +* raising signals: Generating Signals. +* random numbers: Pseudo-Random Numbers. +* random-access files: File Position. +* range error: Math Error Reporting. +* range of integer type: Range of Type. +* read lock: File Locks. +* reading from a directory: Accessing Directories. +* reading from a file descriptor: I/O Primitives. +* reading from a socket: Transferring Data. +* reading from a stream, by blocks: Block Input/Output. +* reading from a stream, by characters: Character Input. +* reading from a stream, formatted: Formatted Input. +* ready to run: Absolute Priority. +* real group ID: Process Persona. +* real user ID: Process Persona. +* real-time timer: Setting an Alarm. +* realtime CPU scheduling: Absolute Priority. +* realtime processing: Why Lock Pages. +* realtime scheduling: Realtime Scheduling. +* receiving datagrams: Receiving Datagrams. +* record locking: File Locks. +* redirecting input and output: Duplicating Descriptors. +* reentrant functions: Nonreentrancy. +* reentrant NSS functions: NSS Module Names. +* relative file name: File Name Resolution. +* removal of quotes: Expansion Stages. +* removing a file: Deleting Files. +* removing macros that shadow functions: Macro Definitions. +* renaming a file: Renaming Files. +* reporting bugs: Reporting Bugs. +* reporting errors: Error Reporting. +* REPRINT character: Editing Characters. +* reserved names: Reserved Names. +* resource limits: Limits on Resources. +* restarting interrupted primitives: Interrupted Primitives. +* restrictions on signal handler functions: Nonreentrancy. +* root directory: File Name Resolution. +* Rot13: Trivial Encryption. +* rpc: NSS Basics. +* runnable process: Absolute Priority. +* running a command: Running a Command. +* saved set-group-ID: How Change Persona. +* saved set-user-ID: How Change Persona. +* scanning the group list: Scanning All Groups. +* scanning the user list: Scanning All Users. +* scatter-gather: Scatter-Gather. +* scheduling, traditional: Traditional Scheduling. +* search function (for arrays): Array Search Function. +* search functions (for strings): Search Functions. +* seed (for random numbers): Pseudo-Random Numbers. +* seeking on a file descriptor: File Position Primitive. +* seeking on a stream: File Positioning. +* segmentation violation: Program Error Signals. +* sending a datagram: Sending Datagrams. +* sending signals: Generating Signals. +* sequential-access files: File Position. +* server: Connections. +* services: NSS Basics. +* services database: Services Database. +* session <1>: Concepts of Job Control. +* session: Job Control. +* session leader: Concepts of Job Control. +* setting an alarm: Setting an Alarm. +* setuid programs: How Change Persona. +* setuid programs and file access: Testing File Access. +* severity class <1>: Adding Severity Classes. +* severity class: Printing Formatted Messages. +* sgettext: GUI program problems. +* shadow: NSS Basics. +* shadowing functions with macros: Macro Definitions. +* shared lock: File Locks. +* shared memory: Memory Subsystem. +* shell: Concepts of Job Control. +* shift state: Keeping the state. +* Shift_JIS: Extended Char Intro. +* shrinking objects: Growing Objects. +* shutting down a socket: Closing a Socket. +* sigaction flags: Flags for Sigaction. +* sigaction function: Advanced Signal Handling. +* SIGCHLD, handling of: Stopped and Terminated Jobs. +* sign (of floating point number): Floating Point Concepts. +* signal <1>: Signal Handling. +* signal: FP Exceptions. +* signal action: Delivery of Signal. +* signal actions: Signal Actions. +* signal flags: Flags for Sigaction. +* signal function: Basic Signal Handling. +* signal handler function: Defining Handlers. +* signal mask: Process Signal Mask. +* signal messages: Signal Messages. +* signal names: Standard Signals. +* signal number: Standard Signals. +* signal set: Signal Sets. +* signals, generating: Generating Signals. +* signedness: Integers. +* significand (of floating point number): Floating Point Concepts. +* SIGTTIN, from background job: Access to the Terminal. +* SIGTTOU, from background job: Access to the Terminal. +* simple time: Calendar Time. +* single-byte string: Representation of Strings. +* size of string: Representation of Strings. +* SJIS: Extended Char Intro. +* socket: Sockets. +* socket address (name) binding: Socket Addresses. +* socket domain: Socket Concepts. +* socket namespace: Socket Concepts. +* socket option level: Socket Options. +* socket options: Socket Options. +* socket pair: Socket Pairs. +* socket protocol: Socket Concepts. +* socket shutdown: Closing a Socket. +* socket, client actions: Connecting. +* socket, closing: Closing a Socket. +* socket, connecting: Connecting. +* socket, creating: Creating a Socket. +* socket, initiating a connection: Connecting. +* sockets, accepting connections: Accepting Connections. +* sockets, listening: Listening. +* sockets, server actions: Listening. +* soft limit: Limits on Resources. +* soft link: Symbolic Links. +* sort function (for arrays): Array Sort Function. +* sparse files: File Position Primitive. +* special files: Making Special Files. +* special functions: Special Functions. +* specified action (for a signal): Delivery of Signal. +* speed of execution: Why Lock Pages. +* square root function: Exponents and Logarithms. +* stable sorting: Array Sort Function. +* standard dot notation, for Internet addresses: Abstract Host Addresses. +* standard environment variables: Standard Environment. +* standard error file descriptor: Descriptors and Streams. +* standard error stream: Standard Streams. +* standard file descriptors: Descriptors and Streams. +* standard input file descriptor: Descriptors and Streams. +* standard input stream: Standard Streams. +* standard output file descriptor: Descriptors and Streams. +* standard output stream: Standard Streams. +* standard streams: Standard Streams. +* standards: Standards and Portability. +* START character: Start/Stop Characters. +* startup of program: Program Arguments. +* stateful <1>: glibc iconv Implementation. +* stateful <2>: iconv Examples. +* stateful <3>: Generic Conversion Interface. +* stateful <4>: Converting Strings. +* stateful <5>: Converting a Character. +* stateful: Keeping the state. +* static memory allocation: Memory Allocation and C. +* static storage class: Memory Allocation and C. +* STATUS character: Other Special. +* status codes: Error Reporting. +* status of a file: Attribute Meanings. +* status of obstack: Status of an Obstack. +* sticky bit: Permission Bits. +* STOP character: Start/Stop Characters. +* stop signal: Job Control Signals. +* stopped job: Concepts of Job Control. +* stopped jobs, continuing: Continuing Stopped Jobs. +* stopped jobs, detecting: Stopped and Terminated Jobs. +* storage allocation: Memory. +* stream (sockets): Socket Concepts. +* stream orientation <1>: Streams and I18N. +* stream orientation: Opening Streams. +* stream, for I/O to a string: String Streams. +* streams and descriptors: Stream/Descriptor Precautions. +* streams, and file descriptors: Descriptors and Streams. +* streams, C++: Streams and I18N. +* streams, standard: Standard Streams. +* string: Representation of Strings. +* string allocation: Representation of Strings. +* string collation functions: Collation Functions. +* string comparison functions: String/Array Comparison. +* string concatenation functions: Copying and Concatenation. +* string copy functions: Copying and Concatenation. +* string length: Representation of Strings. +* string literal: Representation of Strings. +* string search functions: Search Functions. +* string stream: String Streams. +* string vectors, null-character separated: Argz and Envz Vectors. +* string, representation of: Representation of Strings. +* style of communication (of a socket): Socket Concepts. +* subshell: Initializing the Shell. +* substitution of variables and commands: Expansion Stages. +* successive signals: Merged Signals. +* summer time: Broken-down Time. +* SunOS: Berkeley Unix. +* supplementary group IDs: Process Persona. +* SUSP character: Signal Characters. +* suspend character: Signal Characters. +* SVID: SVID. +* swap space: Memory Concepts. +* symbolic link: Symbolic Links. +* symbolic link, opening: Open-time Flags. +* synchronizing <1>: Synchronizing AIO Operations. +* synchronizing: Synchronizing I/O. +* syntax error messages, in argp: Argp Helper Functions. +* syntax, for program arguments: Argument Syntax. +* syntax, for reading numbers: Parsing of Numbers. +* sysconf <1>: Processor Resources. +* sysconf: Query Memory Parameters. +* system call: System Calls. +* system call number: System Calls. +* System V Unix: SVID. +* TCP (Internet protocol): Protocols Database. +* template, for printf: Formatted Output. +* template, for scanf: Formatted Input. +* TERM environment variable: Standard Environment. +* terminal flow control: Line Control. +* terminal identification: Is It a Terminal. +* terminal input queue: I/O Queues. +* terminal input queue, clearing: Line Control. +* terminal input signal: Job Control Signals. +* terminal line control functions: Line Control. +* terminal line speed: Line Speed. +* terminal mode data types: Mode Data Types. +* terminal mode functions: Mode Functions. +* terminal modes, BSD: BSD Terminal Modes. +* terminal output queue: I/O Queues. +* terminal output queue, flushing: Line Control. +* terminal output signal: Job Control Signals. +* terminated jobs, detecting: Stopped and Terminated Jobs. +* termination signal: Termination Signals. +* testing access permission: Testing File Access. +* testing exit status of child process: Process Completion. +* text stream: Binary Streams. +* thrashing: Memory Subsystem. +* thread of control: Program Basics. +* threads: Streams and Threads. +* ticks, clock: Processor And CPU Time. +* tilde expansion: Expansion Stages. +* time: Time Basics. +* TIME termios slot: Noncanonical Input. +* time zone: TZ Variable. +* time zone database: TZ Variable. +* time, elapsed: Time Basics. +* time, high precision: High Accuracy Clock. +* timer, profiling: Setting an Alarm. +* timer, real-time: Setting an Alarm. +* timer, virtual: Setting an Alarm. +* timers, setting: Setting an Alarm. +* timespec: Elapsed Time. +* timeval: Elapsed Time. +* timing error in signal handling: Remembering a Signal. +* TMPDIR environment variable: Temporary Files. +* tokenizing strings: Finding Tokens in a String. +* tools, for installing library: Tools for Compilation. +* transmitting datagrams: Sending Datagrams. +* tree, directory: Working with Directory Trees. +* triangulation: glibc iconv Implementation. +* trigonometric functions: Trig Functions. +* type measurements, floating: Floating Type Macros. +* type measurements, integer: Width of Type. +* type modifier character (printf): Output Conversion Syntax. +* type modifier character (scanf): Input Conversion Syntax. +* typeahead buffer: I/O Queues. +* TZ environment variable: Standard Environment. +* UCS-2: Extended Char Intro. +* UCS-4: Extended Char Intro. +* ulps: Errors in Math Functions. +* umask: Setting Permissions. +* unbuffered stream: Buffering Concepts. +* unconstrained memory allocation: Unconstrained Allocation. +* undefining macros that shadow functions: Macro Definitions. +* underflow exception: FP Exceptions. +* Unicode: Extended Char Intro. +* Unix, Berkeley: Berkeley Unix. +* Unix, System V: SVID. +* unlinking a file: Deleting Files. +* unordered comparison: FP Comparison Functions. +* unreading characters: Unreading. +* upgrading from libc5: Linux. +* upper-case character <1>: Classification of Wide Characters. +* upper-case character: Classification of Characters. +* urgent data signal: Asynchronous I/O Signals. +* urgent socket condition: Out-of-Band Data. +* usage limits: Limits on Resources. +* usage messages, in argp: Argp Helper Functions. +* user accounting database: User Accounting Database. +* user database: User Database. +* user ID: User and Group IDs. +* user ID, determining: Who Logged In. +* user name: User and Group IDs. +* user signals: Miscellaneous Signals. +* usual file name errors: File Name Errors. +* UTF-16: Extended Char Intro. +* UTF-7: Extended Char Intro. +* UTF-8: Extended Char Intro. +* va_copy: Copying and Concatenation. +* variable number of arguments: Variadic Functions. +* variable substitution: Expansion Stages. +* variable-sized arrays: GNU C Variable-Size Arrays. +* variadic function argument access: Receiving Arguments. +* variadic function prototypes: Variadic Prototypes. +* variadic functions: Variadic Functions. +* variadic functions, calling: Calling Variadics. +* virtual time alarm signal: Alarm Signals. +* virtual timer: Setting an Alarm. +* volatile declarations: Nonreentrancy. +* waiting for a signal: Waiting for a Signal. +* waiting for completion of child process: Process Completion. +* waiting for input or output: Waiting for I/O. +* WERASE character: Editing Characters. +* whitespace character <1>: Classification of Wide Characters. +* whitespace character: Classification of Characters. +* wide character: Extended Char Intro. +* wide character string: Representation of Strings. +* width of integer type: Width of Type. +* wildcard expansion: Expansion Stages. +* wint_t: String/Array Conventions. +* word expansion: Word Expansion. +* working directory: Working Directory. +* write lock: File Locks. +* writing to a file descriptor: I/O Primitives. +* writing to a socket: Transferring Data. +* writing to a stream, by blocks: Block Input/Output. +* writing to a stream, by characters: Simple Output. +* writing to a stream, formatted: Formatted Output. +* YP: Host Identification. +* YP domain name: Host Identification. +* zero divide: FP Exceptions. diff -durpN glibc-2.2.4/manual/libc.info-58 glibc-2.2.5/manual/libc.info-58 --- glibc-2.2.4/manual/libc.info-58 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-58 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1330 +33,136 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Function Index, Next: Variable Index, Prev: Type Index, Up: Top +File: libc.info, Node: Type Index, Next: Function Index, Prev: Concept Index, Up: Top -Function and Macro Index -************************ +Type Index +********** * Menu: -* __fbufsize: Controlling Buffering. -* __flbf: Controlling Buffering. -* __fpending: Controlling Buffering. -* __fpurge: Flushing Buffers. -* __freadable: Opening Streams. -* __freading: Opening Streams. -* __fsetlocking: Streams and Threads. -* __fwritable: Opening Streams. -* __fwriting: Opening Streams. -* __va_copy: Argument Macros. -* _Exit: Termination Internals. -* _exit: Termination Internals. -* _flushlbf: Flushing Buffers. -* _tolower: Case Conversion. -* _toupper: Case Conversion. -* a64l: Encode Binary Data. -* abort: Aborting a Program. -* abs: Absolute Value. -* accept: Accepting Connections. -* access: Testing File Access. -* acos: Inverse Trig Functions. -* acosf: Inverse Trig Functions. -* acosh: Hyperbolic Functions. -* acoshf: Hyperbolic Functions. -* acoshl: Hyperbolic Functions. -* acosl: Inverse Trig Functions. -* addmntent: mtab. -* addseverity: Adding Severity Classes. -* adjtime: High-Resolution Calendar. -* adjtimex: High-Resolution Calendar. -* aio_cancel: Cancel AIO Operations. -* aio_cancel64: Cancel AIO Operations. -* aio_error: Status of AIO Operations. -* aio_error64: Status of AIO Operations. -* aio_fsync: Synchronizing AIO Operations. -* aio_fsync64: Synchronizing AIO Operations. -* aio_init: Configuration of AIO. -* aio_read: Asynchronous Reads/Writes. -* aio_read64: Asynchronous Reads/Writes. -* aio_return: Status of AIO Operations. -* aio_return64: Status of AIO Operations. -* aio_suspend: Synchronizing AIO Operations. -* aio_suspend64: Synchronizing AIO Operations. -* aio_write: Asynchronous Reads/Writes. -* aio_write64: Asynchronous Reads/Writes. -* alarm: Setting an Alarm. -* alloca: Variable Size Automatic. -* alphasort: Scanning Directory Content. -* alphasort64: Scanning Directory Content. -* argp_error: Argp Helper Functions. -* argp_failure: Argp Helper Functions. -* argp_help: Argp Help. -* argp_parse: Argp. -* argp_state_help: Argp Helper Functions. -* argp_usage: Argp Helper Functions. -* argz_add: Argz Functions. -* argz_add_sep: Argz Functions. -* argz_append: Argz Functions. -* argz_count: Argz Functions. -* argz_create: Argz Functions. -* argz_create_sep: Argz Functions. -* argz_delete: Argz Functions. -* argz_extract: Argz Functions. -* argz_insert: Argz Functions. -* argz_next: Argz Functions. -* argz_replace: Argz Functions. -* argz_stringify: Argz Functions. -* asctime: Formatting Calendar Time. -* asctime_r: Formatting Calendar Time. -* asin: Inverse Trig Functions. -* asinf: Inverse Trig Functions. -* asinh: Hyperbolic Functions. -* asinhf: Hyperbolic Functions. -* asinhl: Hyperbolic Functions. -* asinl: Inverse Trig Functions. -* asprintf: Dynamic Output. -* assert: Consistency Checking. -* assert_perror: Consistency Checking. -* atan: Inverse Trig Functions. -* atan2: Inverse Trig Functions. -* atan2f: Inverse Trig Functions. -* atan2l: Inverse Trig Functions. -* atanf: Inverse Trig Functions. -* atanh: Hyperbolic Functions. -* atanhf: Hyperbolic Functions. -* atanhl: Hyperbolic Functions. -* atanl: Inverse Trig Functions. -* atexit: Cleanups on Exit. -* atof: Parsing of Floats. -* atoi: Parsing of Integers. -* atol: Parsing of Integers. -* atoll: Parsing of Integers. -* backtrace: Backtraces. -* backtrace_symbols: Backtraces. -* backtrace_symbols_fd: Backtraces. -* basename: Finding Tokens in a String. -* bcmp: String/Array Comparison. -* bcopy: Copying and Concatenation. -* bind: Setting Address. -* bind_textdomain_codeset: Charset conversion in gettext. -* bindtextdomain: Locating gettext catalog. -* brk: Resizing the Data Segment. -* bsearch: Array Search Function. -* btowc: Converting a Character. -* bzero: Copying and Concatenation. -* cabs: Absolute Value. -* cabsf: Absolute Value. -* cabsl: Absolute Value. -* cacos: Inverse Trig Functions. -* cacosf: Inverse Trig Functions. -* cacosh: Hyperbolic Functions. -* cacoshf: Hyperbolic Functions. -* cacoshl: Hyperbolic Functions. -* cacosl: Inverse Trig Functions. -* calloc: Allocating Cleared Space. -* canonicalize_file_name: Symbolic Links. -* carg: Operations on Complex. -* cargf: Operations on Complex. -* cargl: Operations on Complex. -* casin: Inverse Trig Functions. -* casinf: Inverse Trig Functions. -* casinh: Hyperbolic Functions. -* casinhf: Hyperbolic Functions. -* casinhl: Hyperbolic Functions. -* casinl: Inverse Trig Functions. -* catan: Inverse Trig Functions. -* catanf: Inverse Trig Functions. -* catanh: Hyperbolic Functions. -* catanhf: Hyperbolic Functions. -* catanhl: Hyperbolic Functions. -* catanl: Inverse Trig Functions. -* catclose: The catgets Functions. -* catgets: The catgets Functions. -* catopen: The catgets Functions. -* cbc_crypt: DES Encryption. -* cbrt: Exponents and Logarithms. -* cbrtf: Exponents and Logarithms. -* cbrtl: Exponents and Logarithms. -* ccos: Trig Functions. -* ccosf: Trig Functions. -* ccosh: Hyperbolic Functions. -* ccoshf: Hyperbolic Functions. -* ccoshl: Hyperbolic Functions. -* ccosl: Trig Functions. -* ceil: Rounding Functions. -* ceilf: Rounding Functions. -* ceill: Rounding Functions. -* cexp: Exponents and Logarithms. -* cexpf: Exponents and Logarithms. -* cexpl: Exponents and Logarithms. -* cfgetispeed: Line Speed. -* cfgetospeed: Line Speed. -* cfmakeraw: Noncanonical Input. -* cfree: Freeing after Malloc. -* cfsetispeed: Line Speed. -* cfsetospeed: Line Speed. -* cfsetspeed: Line Speed. -* chdir: Working Directory. -* chmod: Setting Permissions. -* chown: File Owner. -* cimag: Operations on Complex. -* cimagf: Operations on Complex. -* cimagl: Operations on Complex. -* clearenv: Environment Access. -* clearerr: Error Recovery. -* clearerr_unlocked: Error Recovery. -* clock: CPU Time. -* clog: Exponents and Logarithms. -* clog10: Exponents and Logarithms. -* clog10f: Exponents and Logarithms. -* clog10l: Exponents and Logarithms. -* clogf: Exponents and Logarithms. -* clogl: Exponents and Logarithms. -* close: Opening and Closing Files. -* closedir: Reading/Closing Directory. -* closelog: closelog. -* confstr: String Parameters. -* conj: Operations on Complex. -* conjf: Operations on Complex. -* conjl: Operations on Complex. -* connect: Connecting. -* copysign: FP Bit Twiddling. -* copysignf: FP Bit Twiddling. -* copysignl: FP Bit Twiddling. -* cos: Trig Functions. -* cosf: Trig Functions. -* cosh: Hyperbolic Functions. -* coshf: Hyperbolic Functions. -* coshl: Hyperbolic Functions. -* cosl: Trig Functions. -* cpow: Exponents and Logarithms. -* cpowf: Exponents and Logarithms. -* cpowl: Exponents and Logarithms. -* cproj: Operations on Complex. -* cprojf: Operations on Complex. -* cprojl: Operations on Complex. -* creal: Operations on Complex. -* crealf: Operations on Complex. -* creall: Operations on Complex. -* creat: Opening and Closing Files. -* creat64: Opening and Closing Files. -* crypt: crypt. -* crypt_r: crypt. -* csin: Trig Functions. -* csinf: Trig Functions. -* csinh: Hyperbolic Functions. -* csinhf: Hyperbolic Functions. -* csinhl: Hyperbolic Functions. -* csinl: Trig Functions. -* csqrt: Exponents and Logarithms. -* csqrtf: Exponents and Logarithms. -* csqrtl: Exponents and Logarithms. -* ctan: Trig Functions. -* ctanf: Trig Functions. -* ctanh: Hyperbolic Functions. -* ctanhf: Hyperbolic Functions. -* ctanhl: Hyperbolic Functions. -* ctanl: Trig Functions. -* ctermid: Identifying the Terminal. -* ctime: Formatting Calendar Time. -* ctime_r: Formatting Calendar Time. -* cuserid: Who Logged In. -* dcgettext: Translation with gettext. -* dcngettext: Advanced gettext functions. -* DES_FAILED: DES Encryption. -* des_setparity: DES Encryption. -* dgettext: Translation with gettext. -* difftime: Elapsed Time. -* dirfd: Opening a Directory. -* dirname: Finding Tokens in a String. -* div: Integer Division. -* dngettext: Advanced gettext functions. -* drand48: SVID Random. -* drand48_r: SVID Random. -* drem: Remainder Functions. -* dremf: Remainder Functions. -* dreml: Remainder Functions. -* DTTOIF: Directory Entries. -* dup: Duplicating Descriptors. -* dup2: Duplicating Descriptors. -* ecb_crypt: DES Encryption. -* ecvt: System V Number Conversion. -* ecvt_r: System V Number Conversion. -* encrypt: DES Encryption. -* encrypt_r: DES Encryption. -* endfsent: fstab. -* endgrent: Scanning All Groups. -* endhostent: Host Names. -* endmntent: mtab. -* endnetent: Networks Database. -* endnetgrent: Lookup Netgroup. -* endprotoent: Protocols Database. -* endpwent: Scanning All Users. -* endservent: Services Database. -* endutent: Manipulating the Database. -* endutxent: XPG Functions. -* envz_add: Envz Functions. -* envz_entry: Envz Functions. -* envz_get: Envz Functions. -* envz_merge: Envz Functions. -* envz_strip: Envz Functions. -* erand48: SVID Random. -* erand48_r: SVID Random. -* erf: Special Functions. -* erfc: Special Functions. -* erfcf: Special Functions. -* erfcl: Special Functions. -* erff: Special Functions. -* erfl: Special Functions. -* execl: Executing a File. -* execle: Executing a File. -* execlp: Executing a File. -* execv: Executing a File. -* execve: Executing a File. -* execvp: Executing a File. -* exit: Normal Termination. -* exp: Exponents and Logarithms. -* exp10: Exponents and Logarithms. -* exp10f: Exponents and Logarithms. -* exp10l: Exponents and Logarithms. -* exp2: Exponents and Logarithms. -* exp2f: Exponents and Logarithms. -* exp2l: Exponents and Logarithms. -* expf: Exponents and Logarithms. -* expl: Exponents and Logarithms. -* expm1: Exponents and Logarithms. -* expm1f: Exponents and Logarithms. -* expm1l: Exponents and Logarithms. -* fabs: Absolute Value. -* fabsf: Absolute Value. -* fabsl: Absolute Value. -* fchdir: Working Directory. -* fchmod: Setting Permissions. -* fchown: File Owner. -* fclean: Cleaning Streams. -* fclose: Closing Streams. -* fcloseall: Closing Streams. -* fcntl: Control Operations. -* fcvt: System V Number Conversion. -* fcvt_r: System V Number Conversion. -* FD_CLR: Waiting for I/O. -* FD_ISSET: Waiting for I/O. -* FD_SET: Waiting for I/O. -* FD_ZERO: Waiting for I/O. -* fdatasync: Synchronizing I/O. -* fdim: Misc FP Arithmetic. -* fdimf: Misc FP Arithmetic. -* fdiml: Misc FP Arithmetic. -* fdopen: Descriptors and Streams. -* feclearexcept: Status bit operations. -* fedisableexcept: Control Functions. -* feenableexcept: Control Functions. -* fegetenv: Control Functions. -* fegetexcept: Control Functions. -* fegetexceptflag: Status bit operations. -* fegetround: Rounding. -* feholdexcept: Control Functions. -* feof: EOF and Errors. -* feof_unlocked: EOF and Errors. -* feraiseexcept: Status bit operations. -* ferror: EOF and Errors. -* ferror_unlocked: EOF and Errors. -* fesetenv: Control Functions. -* fesetexceptflag: Status bit operations. -* fesetround: Rounding. -* fetestexcept: Status bit operations. -* feupdateenv: Control Functions. -* fflush: Flushing Buffers. -* fflush_unlocked: Flushing Buffers. -* fgetc: Character Input. -* fgetc_unlocked: Character Input. -* fgetgrent: Scanning All Groups. -* fgetgrent_r: Scanning All Groups. -* fgetpos: Portable Positioning. -* fgetpos64: Portable Positioning. -* fgetpwent: Scanning All Users. -* fgetpwent_r: Scanning All Users. -* fgets: Line Input. -* fgets_unlocked: Line Input. -* fgetwc: Character Input. -* fgetwc_unlocked: Character Input. -* fgetws: Line Input. -* fgetws_unlocked: Line Input. -* fileno: Descriptors and Streams. -* fileno_unlocked: Descriptors and Streams. -* finite: Floating Point Classes. -* finitef: Floating Point Classes. -* finitel: Floating Point Classes. -* flockfile: Streams and Threads. -* floor: Rounding Functions. -* floorf: Rounding Functions. -* floorl: Rounding Functions. -* fma: Misc FP Arithmetic. -* fmaf: Misc FP Arithmetic. -* fmal: Misc FP Arithmetic. -* fmax: Misc FP Arithmetic. -* fmaxf: Misc FP Arithmetic. -* fmaxl: Misc FP Arithmetic. -* fmemopen: String Streams. -* fmin: Misc FP Arithmetic. -* fminf: Misc FP Arithmetic. -* fminl: Misc FP Arithmetic. -* fmod: Remainder Functions. -* fmodf: Remainder Functions. -* fmodl: Remainder Functions. -* fmtmsg: Printing Formatted Messages. -* fnmatch: Wildcard Matching. -* fopen: Opening Streams. -* fopen64: Opening Streams. -* fopencookie: Streams and Cookies. -* fork: Creating a Process. -* forkpty: Pseudo-Terminal Pairs. -* fpathconf: Pathconf. -* fpclassify: Floating Point Classes. -* fprintf: Formatted Output Functions. -* fputc: Simple Output. -* fputc_unlocked: Simple Output. -* fputs: Simple Output. -* fputs_unlocked: Simple Output. -* fputwc: Simple Output. -* fputwc_unlocked: Simple Output. -* fputws: Simple Output. -* fputws_unlocked: Simple Output. -* fread: Block Input/Output. -* fread_unlocked: Block Input/Output. -* free: Freeing after Malloc. -* freopen: Opening Streams. -* freopen64: Opening Streams. -* frexp: Normalization Functions. -* frexpf: Normalization Functions. -* frexpl: Normalization Functions. -* fscanf: Formatted Input Functions. -* fseek: File Positioning. -* fseeko: File Positioning. -* fseeko64: File Positioning. -* fsetpos: Portable Positioning. -* fsetpos64: Portable Positioning. -* fstat: Reading Attributes. -* fstat64: Reading Attributes. -* fsync: Synchronizing I/O. -* ftell: File Positioning. -* ftello: File Positioning. -* ftello64: File Positioning. -* ftruncate: File Size. -* ftruncate64: File Size. -* ftrylockfile: Streams and Threads. -* ftw: Working with Directory Trees. -* ftw64: Working with Directory Trees. -* funlockfile: Streams and Threads. -* fwide: Streams and I18N. -* fwprintf: Formatted Output Functions. -* fwrite: Block Input/Output. -* fwrite_unlocked: Block Input/Output. -* fwscanf: Formatted Input Functions. -* gamma: Special Functions. -* gammaf: Special Functions. -* gammal: Special Functions. -* gcvt: System V Number Conversion. -* get_avphys_pages: Query Memory Parameters. -* get_current_dir_name: Working Directory. -* get_nprocs: Processor Resources. -* get_nprocs_conf: Processor Resources. -* get_phys_pages: Query Memory Parameters. -* getc: Character Input. -* getc_unlocked: Character Input. -* getchar: Character Input. -* getchar_unlocked: Character Input. -* getcontext: System V contexts. -* getcwd: Working Directory. -* getdate: General Time String Parsing. -* getdate_r: General Time String Parsing. -* getdelim: Line Input. -* getdomainnname: Host Identification. -* getegid: Reading Persona. -* getenv: Environment Access. -* geteuid: Reading Persona. -* getfsent: fstab. -* getfsfile: fstab. -* getfsspec: fstab. -* getgid: Reading Persona. -* getgrent: Scanning All Groups. -* getgrent_r: Scanning All Groups. -* getgrgid: Lookup Group. -* getgrgid_r: Lookup Group. -* getgrnam: Lookup Group. -* getgrnam_r: Lookup Group. -* getgrouplist: Setting Groups. -* getgroups: Reading Persona. -* gethostbyaddr: Host Names. -* gethostbyaddr_r: Host Names. -* gethostbyname: Host Names. -* gethostbyname2: Host Names. -* gethostbyname2_r: Host Names. -* gethostbyname_r: Host Names. -* gethostent: Host Names. -* gethostid: Host Identification. -* gethostname: Host Identification. -* getitimer: Setting an Alarm. -* getline: Line Input. -* getloadavg: Processor Resources. -* getlogin: Who Logged In. -* getmntent: mtab. -* getmntent_r: mtab. -* getnetbyaddr: Networks Database. -* getnetbyname: Networks Database. -* getnetent: Networks Database. -* getnetgrent: Lookup Netgroup. -* getnetgrent_r: Lookup Netgroup. -* getopt: Using Getopt. -* getopt_long: Getopt Long Options. -* getopt_long_only: Getopt Long Options. -* getpagesize: Query Memory Parameters. -* getpass: getpass. -* getpeername: Who is Connected. -* getpgid: Process Group Functions. -* getpgrp: Process Group Functions. -* getpid: Process Identification. -* getppid: Process Identification. -* getpriority: Traditional Scheduling Functions. -* getprotobyname: Protocols Database. -* getprotobynumber: Protocols Database. -* getprotoent: Protocols Database. -* getpt: Allocation. -* getpwent: Scanning All Users. -* getpwent_r: Scanning All Users. -* getpwnam: Lookup User. -* getpwnam_r: Lookup User. -* getpwuid: Lookup User. -* getpwuid_r: Lookup User. -* getrlimit: Limits on Resources. -* getrlimit64: Limits on Resources. -* getrusage: Resource Usage. -* gets: Line Input. -* getservbyname: Services Database. -* getservbyport: Services Database. -* getservent: Services Database. -* getsid: Process Group Functions. -* getsockname: Reading Address. -* getsockopt: Socket Option Functions. -* getsubopt: Suboptions. -* gettext: Translation with gettext. -* gettimeofday: High-Resolution Calendar. -* getuid: Reading Persona. -* getumask: Setting Permissions. -* getutent: Manipulating the Database. -* getutent_r: Manipulating the Database. -* getutid: Manipulating the Database. -* getutid_r: Manipulating the Database. -* getutline: Manipulating the Database. -* getutline_r: Manipulating the Database. -* getutmp: XPG Functions. -* getutmpx: XPG Functions. -* getutxent: XPG Functions. -* getutxid: XPG Functions. -* getutxline: XPG Functions. -* getw: Character Input. -* getwc: Character Input. -* getwc_unlocked: Character Input. -* getwchar: Character Input. -* getwchar_unlocked: Character Input. -* getwd: Working Directory. -* glob: Calling Glob. -* glob64: Calling Glob. -* globfree: More Flags for Globbing. -* globfree64: More Flags for Globbing. -* gmtime: Broken-down Time. -* gmtime_r: Broken-down Time. -* grantpt: Allocation. -* gsignal: Signaling Yourself. -* gtty: BSD Terminal Modes. -* hasmntopt: mtab. -* hcreate: Hash Search Function. -* hcreate_r: Hash Search Function. -* hdestroy: Hash Search Function. -* hdestroy_r: Hash Search Function. -* hsearch: Hash Search Function. -* hsearch_r: Hash Search Function. -* htonl: Byte Order. -* htons: Byte Order. -* hypot: Exponents and Logarithms. -* hypotf: Exponents and Logarithms. -* hypotl: Exponents and Logarithms. -* iconv: Generic Conversion Interface. -* iconv_close: Generic Conversion Interface. -* iconv_open: Generic Conversion Interface. -* if_freenameindex: Interface Naming. -* if_indextoname: Interface Naming. -* if_nameindex: Interface Naming. -* if_nametoindex: Interface Naming. -* IFTODT: Directory Entries. -* ilogb: Exponents and Logarithms. -* ilogbf: Exponents and Logarithms. -* ilogbl: Exponents and Logarithms. -* imaxabs: Absolute Value. -* imaxdiv: Integer Division. -* index: Search Functions. -* inet_addr: Host Address Functions. -* inet_aton: Host Address Functions. -* inet_lnaof: Host Address Functions. -* inet_makeaddr: Host Address Functions. -* inet_netof: Host Address Functions. -* inet_network: Host Address Functions. -* inet_ntoa: Host Address Functions. -* inet_ntop: Host Address Functions. -* inet_pton: Host Address Functions. -* initgroups: Setting Groups. -* initstate: BSD Random. -* initstate_r: BSD Random. -* innetgr: Netgroup Membership. -* ioctl: IOCTLs. -* isalnum: Classification of Characters. -* isalpha: Classification of Characters. -* isascii: Classification of Characters. -* isatty: Is It a Terminal. -* isblank: Classification of Characters. -* iscntrl: Classification of Characters. -* isdigit: Classification of Characters. -* isfinite: Floating Point Classes. -* isgraph: Classification of Characters. -* isgreater: FP Comparison Functions. -* isgreaterequal: FP Comparison Functions. -* isinf: Floating Point Classes. -* isinff: Floating Point Classes. -* isinfl: Floating Point Classes. -* isless: FP Comparison Functions. -* islessequal: FP Comparison Functions. -* islessgreater: FP Comparison Functions. -* islower: Classification of Characters. -* isnan: Floating Point Classes. -* isnanf: Floating Point Classes. -* isnanl: Floating Point Classes. -* isnormal: Floating Point Classes. -* isprint: Classification of Characters. -* ispunct: Classification of Characters. -* isspace: Classification of Characters. -* isunordered: FP Comparison Functions. -* isupper: Classification of Characters. -* iswalnum: Classification of Wide Characters. -* iswalpha: Classification of Wide Characters. -* iswblank: Classification of Wide Characters. -* iswcntrl: Classification of Wide Characters. -* iswctype: Classification of Wide Characters. -* iswdigit: Classification of Wide Characters. -* iswgraph: Classification of Wide Characters. -* iswlower: Classification of Wide Characters. -* iswprint: Classification of Wide Characters. -* iswpunct: Classification of Wide Characters. -* iswspace: Classification of Wide Characters. -* iswupper: Classification of Wide Characters. -* iswxdigit: Classification of Wide Characters. -* isxdigit: Classification of Characters. -* j0: Special Functions. -* j0f: Special Functions. -* j0l: Special Functions. -* j1: Special Functions. -* j1f: Special Functions. -* j1l: Special Functions. -* jn: Special Functions. -* jnf: Special Functions. -* jnl: Special Functions. -* jrand48: SVID Random. -* jrand48_r: SVID Random. -* kill: Signaling Another Process. -* killpg: Signaling Another Process. -* l64a: Encode Binary Data. -* labs: Absolute Value. -* lcong48: SVID Random. -* lcong48_r: SVID Random. -* ldexp: Normalization Functions. -* ldexpf: Normalization Functions. -* ldexpl: Normalization Functions. -* ldiv: Integer Division. -* lfind: Array Search Function. -* lgamma: Special Functions. -* lgamma_r: Special Functions. -* lgammaf: Special Functions. -* lgammaf_r: Special Functions. -* lgammal: Special Functions. -* lgammal_r: Special Functions. -* link: Hard Links. -* lio_listio: Asynchronous Reads/Writes. -* lio_listio64: Asynchronous Reads/Writes. -* listen: Listening. -* llabs: Absolute Value. -* lldiv: Integer Division. -* llrint: Rounding Functions. -* llrintf: Rounding Functions. -* llrintl: Rounding Functions. -* llround: Rounding Functions. -* llroundf: Rounding Functions. -* llroundl: Rounding Functions. -* localeconv: The Lame Way to Locale Data. -* localtime: Broken-down Time. -* localtime_r: Broken-down Time. -* log: Exponents and Logarithms. -* log10: Exponents and Logarithms. -* log10f: Exponents and Logarithms. -* log10l: Exponents and Logarithms. -* log1p: Exponents and Logarithms. -* log1pf: Exponents and Logarithms. -* log1pl: Exponents and Logarithms. -* log2: Exponents and Logarithms. -* log2f: Exponents and Logarithms. -* log2l: Exponents and Logarithms. -* logb: Exponents and Logarithms. -* logbf: Exponents and Logarithms. -* logbl: Exponents and Logarithms. -* logf: Exponents and Logarithms. -* login: Logging In and Out. -* login_tty: Logging In and Out. -* logl: Exponents and Logarithms. -* logout: Logging In and Out. -* logwtmp: Logging In and Out. -* longjmp: Non-Local Details. -* lrand48: SVID Random. -* lrand48_r: SVID Random. -* lrint: Rounding Functions. -* lrintf: Rounding Functions. -* lrintl: Rounding Functions. -* lround: Rounding Functions. -* lroundf: Rounding Functions. -* lroundl: Rounding Functions. -* lsearch: Array Search Function. -* lseek: File Position Primitive. -* lseek64: File Position Primitive. -* lstat: Reading Attributes. -* lstat64: Reading Attributes. -* madvise: Memory-mapped I/O. -* main: Program Arguments. -* makecontext: System V contexts. -* mallinfo: Statistics of Malloc. -* malloc: Basic Allocation. -* mallopt: Malloc Tunable Parameters. -* matherr: FP Exceptions. -* mblen: Non-reentrant Character Conversion. -* mbrlen: Converting a Character. -* mbrtowc: Converting a Character. -* mbsinit: Keeping the state. -* mbsnrtowcs: Converting Strings. -* mbsrtowcs: Converting Strings. -* mbstowcs: Non-reentrant String Conversion. -* mbtowc: Non-reentrant Character Conversion. -* mcheck: Heap Consistency Checking. -* memalign: Aligned Memory Blocks. -* memccpy: Copying and Concatenation. -* memchr: Search Functions. -* memcmp: String/Array Comparison. -* memcpy: Copying and Concatenation. -* memfrob: Trivial Encryption. -* memmem: Search Functions. -* memmove: Copying and Concatenation. -* mempcpy: Copying and Concatenation. -* memrchr: Search Functions. -* memset: Copying and Concatenation. -* mkdir: Creating Directories. -* mkdtemp: Temporary Files. -* mkfifo: FIFO Special Files. -* mknod: Making Special Files. -* mkstemp: Temporary Files. -* mktemp: Temporary Files. -* mktime: Broken-down Time. -* mlock: Page Lock Functions. -* mlockall: Page Lock Functions. -* mmap: Memory-mapped I/O. -* mmap64: Memory-mapped I/O. -* modf: Rounding Functions. -* modff: Rounding Functions. -* modfl: Rounding Functions. -* mount: Mount-Unmount-Remount. -* mprobe: Heap Consistency Checking. -* mrand48: SVID Random. -* mrand48_r: SVID Random. -* mremap: Memory-mapped I/O. -* msync: Memory-mapped I/O. -* mtrace: Tracing malloc. -* munlock: Page Lock Functions. -* munlockall: Page Lock Functions. -* munmap: Memory-mapped I/O. -* muntrace: Tracing malloc. -* nan: FP Bit Twiddling. -* nanf: FP Bit Twiddling. -* nanl: FP Bit Twiddling. -* nanosleep: Sleeping. -* nearbyint: Rounding Functions. -* nearbyintf: Rounding Functions. -* nearbyintl: Rounding Functions. -* nextafter: FP Bit Twiddling. -* nextafterf: FP Bit Twiddling. -* nextafterl: FP Bit Twiddling. -* nexttoward: FP Bit Twiddling. -* nexttowardf: FP Bit Twiddling. -* nexttowardl: FP Bit Twiddling. -* nftw: Working with Directory Trees. -* nftw64: Working with Directory Trees. -* ngettext: Advanced gettext functions. -* nice: Traditional Scheduling Functions. -* nl_langinfo: The Elegant and Fast Way. -* notfound: Actions in the NSS configuration. -* nrand48: SVID Random. -* nrand48_r: SVID Random. -* ntohl: Byte Order. -* ntohs: Byte Order. -* ntp_adjtime: High Accuracy Clock. -* ntp_gettime: High Accuracy Clock. -* obstack_1grow: Growing Objects. -* obstack_1grow_fast: Extra Fast Growing. -* obstack_alignment_mask: Obstacks Data Alignment. -* obstack_alloc: Allocation in an Obstack. -* obstack_base: Status of an Obstack. -* obstack_blank: Growing Objects. -* obstack_blank_fast: Extra Fast Growing. -* obstack_chunk_alloc: Preparing for Obstacks. -* obstack_chunk_free: Preparing for Obstacks. -* obstack_chunk_size: Obstack Chunks. -* obstack_copy: Allocation in an Obstack. -* obstack_copy0: Allocation in an Obstack. -* obstack_finish: Growing Objects. -* obstack_free: Freeing Obstack Objects. -* obstack_grow: Growing Objects. -* obstack_grow0: Growing Objects. -* obstack_init: Preparing for Obstacks. -* obstack_int_grow: Growing Objects. -* obstack_int_grow_fast: Extra Fast Growing. -* obstack_next_free: Status of an Obstack. -* obstack_object_size <1>: Status of an Obstack. -* obstack_object_size: Growing Objects. -* obstack_printf: Dynamic Output. -* obstack_ptr_grow: Growing Objects. -* obstack_ptr_grow_fast: Extra Fast Growing. -* obstack_room: Extra Fast Growing. -* obstack_vprintf: Variable Arguments Output. -* offsetof: Structure Measurement. -* on_exit: Cleanups on Exit. -* open: Opening and Closing Files. -* open64: Opening and Closing Files. -* open_memstream: String Streams. -* open_obstack_stream: Obstack Streams. -* opendir: Opening a Directory. -* openlog: openlog. -* openpty: Pseudo-Terminal Pairs. -* parse_printf_format: Parsing a Template String. -* pathconf: Pathconf. -* pause: Using Pause. -* pclose: Pipe to a Subprocess. -* perror: Error Messages. -* pipe: Creating a Pipe. -* popen: Pipe to a Subprocess. -* posix_memalign: Aligned Memory Blocks. -* pow: Exponents and Logarithms. -* pow10: Exponents and Logarithms. -* pow10f: Exponents and Logarithms. -* pow10l: Exponents and Logarithms. -* powf: Exponents and Logarithms. -* powl: Exponents and Logarithms. -* pread: I/O Primitives. -* pread64: I/O Primitives. -* printf: Formatted Output Functions. -* printf_size: Predefined Printf Handlers. -* printf_size_info: Predefined Printf Handlers. -* psignal: Signal Messages. -* pthread_atfork: Threads and Fork. -* pthread_attr_destroy: Thread Attributes. -* pthread_attr_getattr: Thread Attributes. -* pthread_attr_getdetachstate: Thread Attributes. -* pthread_attr_getguardsize: Thread Attributes. -* pthread_attr_getinheritsched: Thread Attributes. -* pthread_attr_getschedparam: Thread Attributes. -* pthread_attr_getschedpolicy: Thread Attributes. -* pthread_attr_getscope: Thread Attributes. -* pthread_attr_getstack: Thread Attributes. -* pthread_attr_getstackaddr: Thread Attributes. -* pthread_attr_getstacksize: Thread Attributes. -* pthread_attr_init: Thread Attributes. -* pthread_attr_setattr: Thread Attributes. -* pthread_attr_setdetachstate: Thread Attributes. -* pthread_attr_setguardsize: Thread Attributes. -* pthread_attr_setinheritsched: Thread Attributes. -* pthread_attr_setschedparam: Thread Attributes. -* pthread_attr_setschedpolicy: Thread Attributes. -* pthread_attr_setscope: Thread Attributes. -* pthread_attr_setstack: Thread Attributes. -* pthread_attr_setstackaddr: Thread Attributes. -* pthread_attr_setstacksize: Thread Attributes. -* pthread_cancel: Basic Thread Operations. -* pthread_cleanup_pop: Cleanup Handlers. -* pthread_cleanup_pop_restore_np: Cleanup Handlers. -* pthread_cleanup_push: Cleanup Handlers. -* pthread_cleanup_push_defer_np: Cleanup Handlers. -* pthread_cond_broadcast: Condition Variables. -* pthread_cond_destroy: Condition Variables. -* pthread_cond_init: Condition Variables. -* pthread_cond_signal: Condition Variables. -* pthread_cond_timedwait: Condition Variables. -* pthread_cond_wait: Condition Variables. -* pthread_condattr_destroy: Condition Variables. -* pthread_condattr_init: Condition Variables. -* pthread_create: Basic Thread Operations. -* pthread_detach: Miscellaneous Thread Functions. -* pthread_equal: Miscellaneous Thread Functions. -* pthread_exit: Basic Thread Operations. -* pthread_getconcurrency: Miscellaneous Thread Functions. -* pthread_getschedparam: Miscellaneous Thread Functions. -* pthread_getspecific: Thread-Specific Data. -* pthread_join: Basic Thread Operations. -* pthread_key_create: Thread-Specific Data. -* pthread_key_delete: Thread-Specific Data. -* pthread_kill: Threads and Signal Handling. -* pthread_kill_other_threads_np: Miscellaneous Thread Functions. -* pthread_mutex_destroy: Mutexes. -* pthread_mutex_init: Mutexes. -* pthread_mutex_lock: Mutexes. -* pthread_mutex_timedlock: Mutexes. -* pthread_mutex_trylock: Mutexes. -* pthread_mutex_unlock: Mutexes. -* pthread_mutexattr_destroy: Mutexes. -* pthread_mutexattr_gettype: Mutexes. -* pthread_mutexattr_init: Mutexes. -* pthread_mutexattr_settype: Mutexes. -* pthread_once: Miscellaneous Thread Functions. -* pthread_self: Miscellaneous Thread Functions. -* pthread_setcancelstate: Cancellation. -* pthread_setcanceltype: Cancellation. -* pthread_setconcurrency: Miscellaneous Thread Functions. -* pthread_setschedparam: Miscellaneous Thread Functions. -* pthread_setspecific: Thread-Specific Data. -* pthread_sigmask: Threads and Signal Handling. -* pthread_testcancel: Cancellation. -* ptsname: Allocation. -* ptsname_r: Allocation. -* putc: Simple Output. -* putc_unlocked: Simple Output. -* putchar: Simple Output. -* putchar_unlocked: Simple Output. -* putenv: Environment Access. -* putpwent: Writing a User Entry. -* puts: Simple Output. -* pututline: Manipulating the Database. -* pututxline: XPG Functions. -* putw: Simple Output. -* putwc: Simple Output. -* putwc_unlocked: Simple Output. -* putwchar: Simple Output. -* putwchar_unlocked: Simple Output. -* pwrite: I/O Primitives. -* pwrite64: I/O Primitives. -* qecvt: System V Number Conversion. -* qecvt_r: System V Number Conversion. -* qfcvt: System V Number Conversion. -* qfcvt_r: System V Number Conversion. -* qgcvt: System V Number Conversion. -* qsort: Array Sort Function. -* raise: Signaling Yourself. -* rand: ISO Random. -* rand_r: ISO Random. -* random: BSD Random. -* random_r: BSD Random. -* rawmemchr: Search Functions. -* read: I/O Primitives. -* readdir: Reading/Closing Directory. -* readdir64: Reading/Closing Directory. -* readdir64_r: Reading/Closing Directory. -* readdir_r: Reading/Closing Directory. -* readlink: Symbolic Links. -* readv: Scatter-Gather. -* realloc: Changing Block Size. -* realpath: Symbolic Links. -* recv: Receiving Data. -* recvfrom: Receiving Datagrams. -* regcomp: POSIX Regexp Compilation. -* regerror: Regexp Cleanup. -* regexec: Matching POSIX Regexps. -* regfree: Regexp Cleanup. -* register_printf_function: Registering New Conversions. -* remainder: Remainder Functions. -* remainderf: Remainder Functions. -* remainderl: Remainder Functions. -* remove: Deleting Files. -* rename: Renaming Files. -* rewind: File Positioning. -* rewinddir: Random Access Directory. -* rindex: Search Functions. -* rint: Rounding Functions. -* rintf: Rounding Functions. -* rintl: Rounding Functions. -* rmdir: Deleting Files. -* round: Rounding Functions. -* roundf: Rounding Functions. -* roundl: Rounding Functions. -* rpmatch: Yes-or-No Questions. -* S_ISBLK: Testing File Type. -* S_ISCHR: Testing File Type. -* S_ISDIR: Testing File Type. -* S_ISFIFO: Testing File Type. -* S_ISLNK: Testing File Type. -* S_ISREG: Testing File Type. -* S_ISSOCK: Testing File Type. -* S_TYPEISMQ: Testing File Type. -* S_TYPEISSEM: Testing File Type. -* S_TYPEISSHM: Testing File Type. -* sbrk: Resizing the Data Segment. -* scalb: Normalization Functions. -* scalbf: Normalization Functions. -* scalbl: Normalization Functions. -* scalbln: Normalization Functions. -* scalblnf: Normalization Functions. -* scalblnl: Normalization Functions. -* scalbn: Normalization Functions. -* scalbnf: Normalization Functions. -* scalbnl: Normalization Functions. -* scandir: Scanning Directory Content. -* scandir64: Scanning Directory Content. -* scanf: Formatted Input Functions. -* sched_get_priority_max: Basic Scheduling Functions. -* sched_get_priority_min: Basic Scheduling Functions. -* sched_getparam: Basic Scheduling Functions. -* sched_getscheduler: Basic Scheduling Functions. -* sched_rr_get_interval: Basic Scheduling Functions. -* sched_setparam: Basic Scheduling Functions. -* sched_setscheduler: Basic Scheduling Functions. -* sched_yield: Basic Scheduling Functions. -* seed48: SVID Random. -* seed48_r: SVID Random. -* seekdir: Random Access Directory. -* select: Waiting for I/O. -* sem_destroy: POSIX Semaphores. -* sem_getvalue: POSIX Semaphores. -* sem_init: POSIX Semaphores. -* sem_post: POSIX Semaphores. -* sem_trywait: POSIX Semaphores. -* sem_wait: POSIX Semaphores. -* send: Sending Data. -* sendto: Sending Datagrams. -* setbuf: Controlling Buffering. -* setbuffer: Controlling Buffering. -* setcontext: System V contexts. -* setdomainname: Host Identification. -* setegid: Setting Groups. -* setenv: Environment Access. -* seteuid: Setting User ID. -* setfsent: fstab. -* setgid: Setting Groups. -* setgrent: Scanning All Groups. -* setgroups: Setting Groups. -* sethostent: Host Names. -* sethostid: Host Identification. -* sethostname: Host Identification. -* setitimer: Setting an Alarm. -* setjmp: Non-Local Details. -* setkey: DES Encryption. -* setkey_r: DES Encryption. -* setlinebuf: Controlling Buffering. -* setlocale: Setting the Locale. -* setlogmask: setlogmask. -* setmntent: mtab. -* setnetent: Networks Database. -* setnetgrent: Lookup Netgroup. -* setpgid: Process Group Functions. -* setpgrp: Process Group Functions. -* setpriority: Traditional Scheduling Functions. -* setprotoent: Protocols Database. -* setpwent: Scanning All Users. -* setregid: Setting Groups. -* setreuid: Setting User ID. -* setrlimit: Limits on Resources. -* setrlimit64: Limits on Resources. -* setservent: Services Database. -* setsid: Process Group Functions. -* setsockopt: Socket Option Functions. -* setstate: BSD Random. -* setstate_r: BSD Random. -* settimeofday: High-Resolution Calendar. -* setuid: Setting User ID. -* setutent: Manipulating the Database. -* setutxent: XPG Functions. -* setvbuf: Controlling Buffering. -* shutdown: Closing a Socket. -* sigaction: Advanced Signal Handling. -* sigaddset: Signal Sets. -* sigaltstack: Signal Stack. -* sigblock: Blocking in BSD. -* sigdelset: Signal Sets. -* sigemptyset: Signal Sets. -* sigfillset: Signal Sets. -* siginterrupt: BSD Handler. -* sigismember: Signal Sets. -* siglongjmp: Non-Local Exits and Signals. -* sigmask: Blocking in BSD. -* signal: Basic Signal Handling. -* signbit: FP Bit Twiddling. -* significand: Normalization Functions. -* significandf: Normalization Functions. -* significandl: Normalization Functions. -* sigpause: Blocking in BSD. -* sigpending: Checking for Pending Signals. -* sigprocmask: Process Signal Mask. -* sigsetjmp: Non-Local Exits and Signals. -* sigsetmask: Blocking in BSD. -* sigstack: Signal Stack. -* sigsuspend: Sigsuspend. -* sigvec: BSD Handler. -* sigwait: Threads and Signal Handling. -* sin: Trig Functions. -* sincos: Trig Functions. -* sincosf: Trig Functions. -* sincosl: Trig Functions. -* sinf: Trig Functions. -* sinh: Hyperbolic Functions. -* sinhf: Hyperbolic Functions. -* sinhl: Hyperbolic Functions. -* sinl: Trig Functions. -* sleep: Sleeping. -* snprintf: Formatted Output Functions. -* socket: Creating a Socket. -* socketpair: Socket Pairs. -* sprintf: Formatted Output Functions. -* sqrt: Exponents and Logarithms. -* sqrtf: Exponents and Logarithms. -* sqrtl: Exponents and Logarithms. -* srand: ISO Random. -* srand48: SVID Random. -* srand48_r: SVID Random. -* srandom: BSD Random. -* srandom_r: BSD Random. -* sscanf: Formatted Input Functions. -* ssignal: Basic Signal Handling. -* stat: Reading Attributes. -* stat64: Reading Attributes. -* stime: Simple Calendar Time. -* stpcpy: Copying and Concatenation. -* stpncpy: Copying and Concatenation. -* strcasecmp: String/Array Comparison. -* strcasestr: Search Functions. -* strcat: Copying and Concatenation. -* strchr: Search Functions. -* strchrnul: Search Functions. -* strcmp: String/Array Comparison. -* strcoll: Collation Functions. -* strcpy: Copying and Concatenation. -* strcspn: Search Functions. -* strdup: Copying and Concatenation. -* strdupa: Copying and Concatenation. -* strerror: Error Messages. -* strerror_r: Error Messages. -* strfmon: Formatting Numbers. -* strfry: strfry. -* strftime: Formatting Calendar Time. -* strlen: String Length. -* strncasecmp: String/Array Comparison. -* strncat: Copying and Concatenation. -* strncmp: String/Array Comparison. -* strncpy: Copying and Concatenation. -* strndup: Copying and Concatenation. -* strndupa: Copying and Concatenation. -* strnlen: String Length. -* strpbrk: Search Functions. -* strptime: Low-Level Time String Parsing. -* strrchr: Search Functions. -* strsep: Finding Tokens in a String. -* strsignal: Signal Messages. -* strspn: Search Functions. -* strstr: Search Functions. -* strtod: Parsing of Floats. -* strtof: Parsing of Floats. -* strtoimax: Parsing of Integers. -* strtok: Finding Tokens in a String. -* strtok_r: Finding Tokens in a String. -* strtol: Parsing of Integers. -* strtold: Parsing of Floats. -* strtoll: Parsing of Integers. -* strtoq: Parsing of Integers. -* strtoul: Parsing of Integers. -* strtoull: Parsing of Integers. -* strtoumax: Parsing of Integers. -* strtouq: Parsing of Integers. -* strverscmp: String/Array Comparison. -* strxfrm: Collation Functions. -* stty: BSD Terminal Modes. -* success: Actions in the NSS configuration. -* SUN_LEN: Local Namespace Details. -* swapcontext: System V contexts. -* swprintf: Formatted Output Functions. -* swscanf: Formatted Input Functions. -* symlink: Symbolic Links. -* sync: Synchronizing I/O. -* syscall: System Calls. -* sysconf: Sysconf Definition. -* sysctl: System Parameters. -* syslog: syslog; vsyslog. -* system: Running a Command. -* sysv_signal: Basic Signal Handling. -* tan: Trig Functions. -* tanf: Trig Functions. -* tanh: Hyperbolic Functions. -* tanhf: Hyperbolic Functions. -* tanhl: Hyperbolic Functions. -* tanl: Trig Functions. -* tcdrain: Line Control. -* tcflow: Line Control. -* tcflush: Line Control. -* tcgetattr: Mode Functions. -* tcgetpgrp: Terminal Access Functions. -* tcgetsid: Terminal Access Functions. -* tcsendbreak: Line Control. -* tcsetattr: Mode Functions. -* tcsetpgrp: Terminal Access Functions. -* tdelete: Tree Search Function. -* tdestroy: Tree Search Function. -* telldir: Random Access Directory. -* TEMP_FAILURE_RETRY: Interrupted Primitives. -* tempnam: Temporary Files. -* textdomain: Locating gettext catalog. -* tfind: Tree Search Function. -* tgamma: Special Functions. -* tgammaf: Special Functions. -* tgammal: Special Functions. -* time: Simple Calendar Time. -* timegm: Broken-down Time. -* timelocal: Broken-down Time. -* times: Processor Time. -* tmpfile: Temporary Files. -* tmpfile64: Temporary Files. -* tmpnam: Temporary Files. -* tmpnam_r: Temporary Files. -* toascii: Case Conversion. -* tolower: Case Conversion. -* toupper: Case Conversion. -* towctrans: Wide Character Case Conversion. -* towlower: Wide Character Case Conversion. -* towupper: Wide Character Case Conversion. -* trunc: Rounding Functions. -* truncate: File Size. -* truncate64: File Size. -* truncf: Rounding Functions. -* truncl: Rounding Functions. -* tryagain: Actions in the NSS configuration. -* tsearch: Tree Search Function. -* ttyname: Is It a Terminal. -* ttyname_r: Is It a Terminal. -* twalk: Tree Search Function. -* tzset: Time Zone Functions. -* ulimit: Limits on Resources. -* umask: Setting Permissions. -* umount: Mount-Unmount-Remount. -* umount2: Mount-Unmount-Remount. -* uname: Platform Type. -* unavail: Actions in the NSS configuration. -* ungetc: How Unread. -* ungetwc: How Unread. -* unlink: Deleting Files. -* unlockpt: Allocation. -* unsetenv: Environment Access. -* updwtmp: Manipulating the Database. -* utime: File Times. -* utimes: File Times. -* utmpname: Manipulating the Database. -* utmpxname: XPG Functions. -* va_alist: Old Varargs. -* va_arg: Argument Macros. -* va_dcl: Old Varargs. -* va_end: Argument Macros. -* va_start <1>: Old Varargs. -* va_start: Argument Macros. -* valloc: Aligned Memory Blocks. -* vasprintf: Variable Arguments Output. -* versionsort: Scanning Directory Content. -* versionsort64: Scanning Directory Content. -* vfork: Creating a Process. -* vfprintf: Variable Arguments Output. -* vfscanf: Variable Arguments Input. -* vfwprintf: Variable Arguments Output. -* vfwscanf: Variable Arguments Input. -* vlimit: Limits on Resources. -* vprintf: Variable Arguments Output. -* vscanf: Variable Arguments Input. -* vsnprintf: Variable Arguments Output. -* vsprintf: Variable Arguments Output. -* vsscanf: Variable Arguments Input. -* vswprintf: Variable Arguments Output. -* vswscanf: Variable Arguments Input. -* vsyslog: syslog; vsyslog. -* vtimes: Resource Usage. -* vwprintf: Variable Arguments Output. -* vwscanf: Variable Arguments Input. -* wait: Process Completion. -* wait3: BSD Wait Functions. -* wait4: Process Completion. -* waitpid: Process Completion. -* WCOREDUMP: Process Completion Status. -* wcpcpy: Copying and Concatenation. -* wcpncpy: Copying and Concatenation. -* wcrtomb: Converting a Character. -* wcscasecmp: String/Array Comparison. -* wcscat: Copying and Concatenation. -* wcschr: Search Functions. -* wcschrnul: Search Functions. -* wcscmp: String/Array Comparison. -* wcscoll: Collation Functions. -* wcscpy: Copying and Concatenation. -* wcscspn: Search Functions. -* wcsdup: Copying and Concatenation. -* wcsftime: Formatting Calendar Time. -* wcslen: String Length. -* wcsncasecmp: String/Array Comparison. -* wcsncat: Copying and Concatenation. -* wcsncmp: String/Array Comparison. -* wcsncpy: Copying and Concatenation. -* wcsnlen: String Length. -* wcsnrtombs: Converting Strings. -* wcspbrk: Search Functions. -* wcsrchr: Search Functions. -* wcsrtombs: Converting Strings. -* wcsspn: Search Functions. -* wcsstr: Search Functions. -* wcstod: Parsing of Floats. -* wcstof: Parsing of Floats. -* wcstoimax: Parsing of Integers. -* wcstok: Finding Tokens in a String. -* wcstol: Parsing of Integers. -* wcstold: Parsing of Floats. -* wcstoll: Parsing of Integers. -* wcstombs: Non-reentrant String Conversion. -* wcstoq: Parsing of Integers. -* wcstoul: Parsing of Integers. -* wcstoull: Parsing of Integers. -* wcstoumax: Parsing of Integers. -* wcstouq: Parsing of Integers. -* wcswcs: Search Functions. -* wcsxfrm: Collation Functions. -* wctob: Converting a Character. -* wctomb: Non-reentrant Character Conversion. -* wctrans: Wide Character Case Conversion. -* wctype: Classification of Wide Characters. -* WEXITSTATUS: Process Completion Status. -* WIFEXITED: Process Completion Status. -* WIFSIGNALED: Process Completion Status. -* WIFSTOPPED: Process Completion Status. -* wmemchr: Search Functions. -* wmemcmp: String/Array Comparison. -* wmemcpy: Copying and Concatenation. -* wmemmove: Copying and Concatenation. -* wmempcpy: Copying and Concatenation. -* wmemset: Copying and Concatenation. -* wordexp: Calling Wordexp. -* wordfree: Calling Wordexp. -* wprintf: Formatted Output Functions. -* write: I/O Primitives. -* writev: Scatter-Gather. -* wscanf: Formatted Input Functions. -* WSTOPSIG: Process Completion Status. -* WTERMSIG: Process Completion Status. -* y0: Special Functions. -* y0f: Special Functions. -* y0l: Special Functions. -* y1: Special Functions. -* y1f: Special Functions. -* y1l: Special Functions. -* yn: Special Functions. -* ynf: Special Functions. -* ynl: Special Functions. +* __ftw64_func_t: Working with Directory Trees. +* __ftw_func_t: Working with Directory Trees. +* __nftw64_func_t: Working with Directory Trees. +* __nftw_func_t: Working with Directory Trees. +* blkcnt64_t: Attribute Meanings. +* blkcnt_t: Attribute Meanings. +* cc_t: Mode Data Types. +* clock_t: CPU Time. +* comparison_fn_t: Comparison Functions. +* cookie_close_function: Hook Functions. +* cookie_io_functions_t: Streams and Cookies. +* cookie_read_function: Hook Functions. +* cookie_seek_function: Hook Functions. +* cookie_write_function: Hook Functions. +* dev_t: Attribute Meanings. +* DIR: Opening a Directory. +* div_t: Integer Division. +* enum mcheck_status: Heap Consistency Checking. +* fd_set: Waiting for I/O. +* FILE: Streams. +* fpos64_t: Portable Positioning. +* fpos_t: Portable Positioning. +* gid_t: Reading Persona. +* glob64_t: Calling Glob. +* glob_t: Calling Glob. +* iconv_t: Generic Conversion Interface. +* imaxdiv_t: Integer Division. +* ino64_t: Attribute Meanings. +* ino_t: Attribute Meanings. +* jmp_buf: Non-Local Details. +* ldiv_t: Integer Division. +* lldiv_t: Integer Division. +* mbstate_t: Keeping the state. +* mode_t: Attribute Meanings. +* nlink_t: Attribute Meanings. +* off64_t: File Position Primitive. +* off_t: File Position Primitive. +* pid_t: Process Identification. +* printf_arginfo_function: Defining the Output Handler. +* printf_function: Defining the Output Handler. +* ptrdiff_t: Important Data Types. +* regex_t: POSIX Regexp Compilation. +* regmatch_t: Regexp Subexpressions. +* regoff_t: Regexp Subexpressions. +* sig_atomic_t: Atomic Types. +* sighandler_t: Basic Signal Handling. +* sigjmp_buf: Non-Local Exits and Signals. +* sigset_t: Signal Sets. +* size_t: Important Data Types. +* speed_t: Line Speed. +* ssize_t: I/O Primitives. +* stack_t: Signal Stack. +* struct __gconv_step: glibc iconv Implementation. +* struct __gconv_step_data: glibc iconv Implementation. +* struct aiocb: Asynchronous I/O. +* struct aiocb64: Asynchronous I/O. +* struct aioinit: Configuration of AIO. +* struct argp: Argp Parsers. +* struct argp_child: Argp Children. +* struct argp_option: Argp Option Vectors. +* struct argp_state: Argp Parsing State. +* struct dirent: Directory Entries. +* struct ENTRY: Hash Search Function. +* struct exit_status: Manipulating the Database. +* struct flock: File Locks. +* struct fstab: fstab. +* struct FTW: Working with Directory Trees. +* struct group: Group Data Structure. +* struct hostent: Host Names. +* struct if_nameindex: Interface Naming. +* struct in6_addr: Host Address Data Type. +* struct in_addr: Host Address Data Type. +* struct iovec: Scatter-Gather. +* struct itimerval: Setting an Alarm. +* struct lconv: The Lame Way to Locale Data. +* struct linger: Socket-Level Options. +* struct mallinfo: Statistics of Malloc. +* struct mntent: mtab. +* struct netent: Networks Database. +* struct ntptimeval: High Accuracy Clock. +* struct obstack: Creating Obstacks. +* struct option: Getopt Long Options. +* struct passwd: User Data Structure. +* struct printf_info: Conversion Specifier Options. +* struct protoent: Protocols Database. +* struct random_data: BSD Random. +* struct rlimit: Limits on Resources. +* struct rlimit64: Limits on Resources. +* struct rusage: Resource Usage. +* struct sched_param: Basic Scheduling Functions. +* struct servent: Services Database. +* struct sgttyb: BSD Terminal Modes. +* struct sigaction: Advanced Signal Handling. +* struct sigstack: Signal Stack. +* struct sigvec: BSD Handler. +* struct sockaddr: Address Formats. +* struct sockaddr_in: Internet Address Formats. +* struct sockaddr_in6: Internet Address Formats. +* struct sockaddr_un: Local Namespace Details. +* struct stat: Attribute Meanings. +* struct stat64: Attribute Meanings. +* struct termios: Mode Data Types. +* struct timespec: Elapsed Time. +* struct timeval: Elapsed Time. +* struct timex: High Accuracy Clock. +* struct timezone: High-Resolution Calendar. +* struct tm: Broken-down Time. +* struct tms: Processor Time. +* struct utimbuf: File Times. +* struct utmp: Manipulating the Database. +* struct utmpx: XPG Functions. +* struct utsname: Platform Type. +* struct vtimes: Resource Usage. +* tcflag_t: Mode Data Types. +* time_t: Simple Calendar Time. +* ucontext_t: System V contexts. +* uid_t: Reading Persona. +* union wait: BSD Wait Functions. +* va_list: Argument Macros. +* VISIT: Tree Search Function. +* wchar_t: Extended Char Intro. +* wctrans_t: Wide Character Case Conversion. +* wctype_t: Classification of Wide Characters. +* wint_t: Extended Char Intro. +* wordexp_t: Calling Wordexp. diff -durpN glibc-2.2.4/manual/libc.info-59 glibc-2.2.5/manual/libc.info-59 --- glibc-2.2.4/manual/libc.info-59 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-59 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1077 +33,1340 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Variable Index, Next: File Index, Prev: Function Index, Up: Top +File: libc.info, Node: Function Index, Next: Variable Index, Prev: Type Index, Up: Top -Variable and Constant Macro Index -********************************* +Function and Macro Index +************************ * Menu: -* (*__gconv_end_fct): glibc iconv Implementation. -* (*__gconv_fct): glibc iconv Implementation. -* (*__gconv_init_fct): glibc iconv Implementation. -* __free_hook: Hooks for Malloc. -* __malloc_hook: Hooks for Malloc. -* __malloc_initialize_hook: Hooks for Malloc. -* __memalign_hook: Hooks for Malloc. -* __realloc_hook: Hooks for Malloc. -* _BSD_SOURCE: Feature Test Macros. -* _Complex_I: Complex Numbers. -* _FILE_OFFSET_BITS: Feature Test Macros. -* _GNU_SOURCE: Feature Test Macros. -* _IOFBF: Controlling Buffering. -* _IOLBF: Controlling Buffering. -* _IONBF: Controlling Buffering. -* _ISOC99_SOURCE: Feature Test Macros. -* _LARGEFILE64_SOURCE: Feature Test Macros. -* _LARGEFILE_SOURCE: Feature Test Macros. -* _PATH_FSTAB: Mount Information. -* _PATH_MNTTAB: Mount Information. -* _PATH_MOUNTED: Mount Information. -* _PATH_UTMP: Manipulating the Database. -* _PATH_WTMP: Manipulating the Database. -* _POSIX2_C_DEV: System Options. -* _POSIX2_C_VERSION: Version Supported. -* _POSIX2_FORT_DEV: System Options. -* _POSIX2_FORT_RUN: System Options. -* _POSIX2_LOCALEDEF: System Options. -* _POSIX2_SW_DEV: System Options. -* _POSIX_C_SOURCE: Feature Test Macros. -* _POSIX_CHOWN_RESTRICTED: Options for Files. -* _POSIX_JOB_CONTROL: System Options. -* _POSIX_NO_TRUNC: Options for Files. -* _POSIX_SAVED_IDS: System Options. -* _POSIX_SOURCE: Feature Test Macros. -* _POSIX_VDISABLE <1>: Options for Files. -* _POSIX_VDISABLE: Special Characters. -* _POSIX_VERSION: Version Supported. -* _REENTRANT: Feature Test Macros. -* _SC_2_C_DEV: Constants for Sysconf. -* _SC_2_FORT_DEV: Constants for Sysconf. -* _SC_2_FORT_RUN: Constants for Sysconf. -* _SC_2_LOCALEDEF: Constants for Sysconf. -* _SC_2_SW_DEV: Constants for Sysconf. -* _SC_2_VERSION: Constants for Sysconf. -* _SC_AIO_LISTIO_MAX: Constants for Sysconf. -* _SC_AIO_MAX: Constants for Sysconf. -* _SC_AIO_PRIO_DELTA_MAX: Constants for Sysconf. -* _SC_ARG_MAX: Constants for Sysconf. -* _SC_ASYNCHRONOUS_IO: Constants for Sysconf. -* _SC_ATEXIT_MAX: Constants for Sysconf. -* _SC_AVPHYS_PAGES <1>: Constants for Sysconf. -* _SC_AVPHYS_PAGES: Query Memory Parameters. -* _SC_BC_BASE_MAX: Constants for Sysconf. -* _SC_BC_DIM_MAX: Constants for Sysconf. -* _SC_BC_SCALE_MAX: Constants for Sysconf. -* _SC_BC_STRING_MAX: Constants for Sysconf. -* _SC_CHAR_BIT: Constants for Sysconf. -* _SC_CHAR_MAX: Constants for Sysconf. -* _SC_CHAR_MIN: Constants for Sysconf. -* _SC_CHARCLASS_NAME_MAX: Constants for Sysconf. -* _SC_CHILD_MAX: Constants for Sysconf. -* _SC_CLK_TCK: Constants for Sysconf. -* _SC_COLL_WEIGHTS_MAX: Constants for Sysconf. -* _SC_DELAYTIMER_MAX: Constants for Sysconf. -* _SC_EQUIV_CLASS_MAX: Constants for Sysconf. -* _SC_EXPR_NEST_MAX: Constants for Sysconf. -* _SC_FSYNC: Constants for Sysconf. -* _SC_GETGR_R_SIZE_MAX: Constants for Sysconf. -* _SC_GETPW_R_SIZE_MAX: Constants for Sysconf. -* _SC_INT_MAX: Constants for Sysconf. -* _SC_INT_MIN: Constants for Sysconf. -* _SC_JOB_CONTROL: Constants for Sysconf. -* _SC_LINE_MAX: Constants for Sysconf. -* _SC_LOGIN_NAME_MAX: Constants for Sysconf. -* _SC_LONG_BIT: Constants for Sysconf. -* _SC_MAPPED_FILES: Constants for Sysconf. -* _SC_MB_LEN_MAX: Constants for Sysconf. -* _SC_MEMLOCK: Constants for Sysconf. -* _SC_MEMLOCK_RANGE: Constants for Sysconf. -* _SC_MEMORY_PROTECTION: Constants for Sysconf. -* _SC_MESSAGE_PASSING: Constants for Sysconf. -* _SC_MQ_OPEN_MAX: Constants for Sysconf. -* _SC_MQ_PRIO_MAX: Constants for Sysconf. -* _SC_NGROUPS_MAX: Constants for Sysconf. -* _SC_NL_ARGMAX: Constants for Sysconf. -* _SC_NL_LANGMAX: Constants for Sysconf. -* _SC_NL_MSGMAX: Constants for Sysconf. -* _SC_NL_NMAX: Constants for Sysconf. -* _SC_NL_SETMAX: Constants for Sysconf. -* _SC_NL_TEXTMAX: Constants for Sysconf. -* _SC_NPROCESSORS_CONF <1>: Constants for Sysconf. -* _SC_NPROCESSORS_CONF: Processor Resources. -* _SC_NPROCESSORS_ONLN <1>: Constants for Sysconf. -* _SC_NPROCESSORS_ONLN: Processor Resources. -* _SC_NZERO: Constants for Sysconf. -* _SC_OPEN_MAX: Constants for Sysconf. -* _SC_PAGESIZE <1>: Constants for Sysconf. -* _SC_PAGESIZE <2>: Query Memory Parameters. -* _SC_PAGESIZE: Memory-mapped I/O. -* _SC_PHYS_PAGES <1>: Constants for Sysconf. -* _SC_PHYS_PAGES: Query Memory Parameters. -* _SC_PII: Constants for Sysconf. -* _SC_PII_INTERNET: Constants for Sysconf. -* _SC_PII_INTERNET_DGRAM: Constants for Sysconf. -* _SC_PII_INTERNET_STREAM: Constants for Sysconf. -* _SC_PII_OSI: Constants for Sysconf. -* _SC_PII_OSI_CLTS: Constants for Sysconf. -* _SC_PII_OSI_COTS: Constants for Sysconf. -* _SC_PII_OSI_M: Constants for Sysconf. -* _SC_PII_SOCKET: Constants for Sysconf. -* _SC_PII_XTI: Constants for Sysconf. -* _SC_PRIORITIZED_IO: Constants for Sysconf. -* _SC_PRIORITY_SCHEDULING: Constants for Sysconf. -* _SC_REALTIME_SIGNALS: Constants for Sysconf. -* _SC_RTSIG_MAX: Constants for Sysconf. -* _SC_SAVED_IDS: Constants for Sysconf. -* _SC_SCHAR_MAX: Constants for Sysconf. -* _SC_SCHAR_MIN: Constants for Sysconf. -* _SC_SELECT: Constants for Sysconf. -* _SC_SEM_NSEMS_MAX: Constants for Sysconf. -* _SC_SEM_VALUE_MAX: Constants for Sysconf. -* _SC_SEMAPHORES: Constants for Sysconf. -* _SC_SHARED_MEMORY_OBJECTS: Constants for Sysconf. -* _SC_SHRT_MAX: Constants for Sysconf. -* _SC_SHRT_MIN: Constants for Sysconf. -* _SC_SIGQUEUE_MAX: Constants for Sysconf. -* _SC_STREAM_MAX: Constants for Sysconf. -* _SC_SYNCHRONIZED_IO: Constants for Sysconf. -* _SC_T_IOV_MAX: Constants for Sysconf. -* _SC_THREAD_ATTR_STACKADDR: Constants for Sysconf. -* _SC_THREAD_ATTR_STACKSIZE: Constants for Sysconf. -* _SC_THREAD_DESTRUCTOR_ITERATIONS: Constants for Sysconf. -* _SC_THREAD_KEYS_MAX: Constants for Sysconf. -* _SC_THREAD_PRIO_INHERIT: Constants for Sysconf. -* _SC_THREAD_PRIO_PROTECT: Constants for Sysconf. -* _SC_THREAD_PRIORITY_SCHEDULING: Constants for Sysconf. -* _SC_THREAD_PROCESS_SHARED: Constants for Sysconf. -* _SC_THREAD_SAFE_FUNCTIONS: Constants for Sysconf. -* _SC_THREAD_STACK_MIN: Constants for Sysconf. -* _SC_THREAD_THREADS_MAX: Constants for Sysconf. -* _SC_THREADS: Constants for Sysconf. -* _SC_TIMER_MAX: Constants for Sysconf. -* _SC_TIMERS: Constants for Sysconf. -* _SC_TTY_NAME_MAX: Constants for Sysconf. -* _SC_TZNAME_MAX: Constants for Sysconf. -* _SC_UCHAR_MAX: Constants for Sysconf. -* _SC_UINT_MAX: Constants for Sysconf. -* _SC_UIO_MAXIOV: Constants for Sysconf. -* _SC_ULONG_MAX: Constants for Sysconf. -* _SC_USHRT_MAX: Constants for Sysconf. -* _SC_VERSION: Constants for Sysconf. -* _SC_WORD_BIT: Constants for Sysconf. -* _SC_XOPEN_CRYPT: Constants for Sysconf. -* _SC_XOPEN_ENH_I18N: Constants for Sysconf. -* _SC_XOPEN_LEGACY: Constants for Sysconf. -* _SC_XOPEN_REALTIME: Constants for Sysconf. -* _SC_XOPEN_REALTIME_THREADS: Constants for Sysconf. -* _SC_XOPEN_SHM: Constants for Sysconf. -* _SC_XOPEN_UNIX: Constants for Sysconf. -* _SC_XOPEN_VERSION: Constants for Sysconf. -* _SC_XOPEN_XCU_VERSION: Constants for Sysconf. -* _SC_XOPEN_XPG2: Constants for Sysconf. -* _SC_XOPEN_XPG3: Constants for Sysconf. -* _SC_XOPEN_XPG4: Constants for Sysconf. -* _SVID_SOURCE: Feature Test Macros. -* _THREAD_SAFE: Feature Test Macros. -* _XOPEN_SOURCE: Feature Test Macros. -* _XOPEN_SOURCE_EXTENDED: Feature Test Macros. -* ABDAY_1: The Elegant and Fast Way. -* ABDAY_2: The Elegant and Fast Way. -* ABDAY_3: The Elegant and Fast Way. -* ABDAY_4: The Elegant and Fast Way. -* ABDAY_5: The Elegant and Fast Way. -* ABDAY_6: The Elegant and Fast Way. -* ABDAY_7: The Elegant and Fast Way. -* ABMON_1: The Elegant and Fast Way. -* ABMON_10: The Elegant and Fast Way. -* ABMON_11: The Elegant and Fast Way. -* ABMON_12: The Elegant and Fast Way. -* ABMON_2: The Elegant and Fast Way. -* ABMON_3: The Elegant and Fast Way. -* ABMON_4: The Elegant and Fast Way. -* ABMON_5: The Elegant and Fast Way. -* ABMON_6: The Elegant and Fast Way. -* ABMON_7: The Elegant and Fast Way. -* ABMON_8: The Elegant and Fast Way. -* ABMON_9: The Elegant and Fast Way. -* ACCOUNTING: Manipulating the Database. -* AF_FILE: Address Formats. -* AF_INET: Address Formats. -* AF_LOCAL: Address Formats. -* AF_UNIX: Address Formats. -* AF_UNSPEC: Address Formats. -* aliases: NSS Basics. -* ALT_DIGITS: The Elegant and Fast Way. -* ALTWERASE: Local Modes. -* AM_STR: The Elegant and Fast Way. -* ARG_MAX: General Limits. -* argp_err_exit_status: Argp Global Variables. -* ARGP_ERR_UNKNOWN: Argp Parser Functions. -* ARGP_HELP_BUG_ADDR: Argp Help Flags. -* ARGP_HELP_DOC: Argp Help Flags. -* ARGP_HELP_EXIT_ERR: Argp Help Flags. -* ARGP_HELP_EXIT_OK: Argp Help Flags. -* ARGP_HELP_LONG: Argp Help Flags. -* ARGP_HELP_LONG_ONLY: Argp Help Flags. -* ARGP_HELP_POST_DOC: Argp Help Flags. -* ARGP_HELP_PRE_DOC: Argp Help Flags. -* ARGP_HELP_SEE: Argp Help Flags. -* ARGP_HELP_SHORT_USAGE: Argp Help Flags. -* ARGP_HELP_STD_ERR: Argp Help Flags. -* ARGP_HELP_STD_HELP: Argp Help Flags. -* ARGP_HELP_STD_USAGE: Argp Help Flags. -* ARGP_HELP_USAGE: Argp Help Flags. -* ARGP_IN_ORDER: Argp Flags. -* ARGP_KEY_ARG: Argp Special Keys. -* ARGP_KEY_ARGS: Argp Special Keys. -* ARGP_KEY_END: Argp Special Keys. -* ARGP_KEY_ERROR: Argp Special Keys. -* ARGP_KEY_FINI: Argp Special Keys. -* ARGP_KEY_HELP_ARGS_DOC: Argp Help Filter Keys. -* ARGP_KEY_HELP_DUP_ARGS_NOTE: Argp Help Filter Keys. -* ARGP_KEY_HELP_EXTRA: Argp Help Filter Keys. -* ARGP_KEY_HELP_HEADER: Argp Help Filter Keys. -* ARGP_KEY_HELP_POST_DOC: Argp Help Filter Keys. -* ARGP_KEY_HELP_PRE_DOC: Argp Help Filter Keys. -* ARGP_KEY_INIT: Argp Special Keys. -* ARGP_KEY_NO_ARGS: Argp Special Keys. -* ARGP_KEY_SUCCESS: Argp Special Keys. -* ARGP_LONG_ONLY: Argp Flags. -* ARGP_NO_ARGS: Argp Flags. -* ARGP_NO_ERRS: Argp Flags. -* ARGP_NO_EXIT: Argp Flags. -* ARGP_NO_HELP: Argp Flags. -* ARGP_PARSE_ARGV0: Argp Flags. -* argp_program_bug_address: Argp Global Variables. -* argp_program_version: Argp Global Variables. -* argp_program_version_hook: Argp Global Variables. -* ARGP_SILENT: Argp Flags. -* B0: Line Speed. -* B110: Line Speed. -* B115200: Line Speed. -* B1200: Line Speed. -* B134: Line Speed. -* B150: Line Speed. -* B1800: Line Speed. -* B19200: Line Speed. -* B200: Line Speed. -* B230400: Line Speed. -* B2400: Line Speed. -* B300: Line Speed. -* B38400: Line Speed. -* B460800: Line Speed. -* B4800: Line Speed. -* B50: Line Speed. -* B57600: Line Speed. -* B600: Line Speed. -* B75: Line Speed. -* B9600: Line Speed. -* BC_BASE_MAX: Utility Limits. -* BC_DIM_MAX: Utility Limits. -* BC_SCALE_MAX: Utility Limits. -* BC_STRING_MAX: Utility Limits. -* BOOT_TIME <1>: XPG Functions. -* BOOT_TIME: Manipulating the Database. -* BRKINT: Input Modes. -* BUFSIZ: Controlling Buffering. -* CCTS_OFLOW: Control Modes. -* CHAR_MAX: Range of Type. -* CHAR_MIN: Range of Type. -* CHILD_MAX: General Limits. -* CIGNORE: Control Modes. -* CLK_TCK: CPU Time. -* CLOCAL: Control Modes. -* CLOCKS_PER_SEC: CPU Time. -* CODESET: The Elegant and Fast Way. -* COLL_WEIGHTS_MAX: Utility Limits. -* COREFILE: Program Error Signals. -* CREAD: Control Modes. -* CRNCYSTR: The Elegant and Fast Way. -* CRTS_IFLOW: Control Modes. -* CS5: Control Modes. -* CS6: Control Modes. -* CS7: Control Modes. -* CS8: Control Modes. -* CSIZE: Control Modes. -* CSTOPB: Control Modes. -* CURRENCY_SYMBOL: The Elegant and Fast Way. -* D_FMT: The Elegant and Fast Way. -* D_T_FMT: The Elegant and Fast Way. -* DAY_1: The Elegant and Fast Way. -* DAY_2: The Elegant and Fast Way. -* DAY_3: The Elegant and Fast Way. -* DAY_4: The Elegant and Fast Way. -* DAY_5: The Elegant and Fast Way. -* DAY_6: The Elegant and Fast Way. -* DAY_7: The Elegant and Fast Way. -* daylight: Time Zone Functions. -* DBL_DIG: Floating Point Parameters. -* DBL_EPSILON: Floating Point Parameters. -* DBL_MANT_DIG: Floating Point Parameters. -* DBL_MAX: Floating Point Parameters. -* DBL_MAX_10_EXP: Floating Point Parameters. -* DBL_MAX_EXP: Floating Point Parameters. -* DBL_MIN: Floating Point Parameters. -* DBL_MIN_10_EXP: Floating Point Parameters. -* DBL_MIN_EXP: Floating Point Parameters. -* DEAD_PROCESS <1>: XPG Functions. -* DEAD_PROCESS: Manipulating the Database. -* DECIMAL_POINT: The Elegant and Fast Way. -* DES_DECRYPT: DES Encryption. -* DES_ENCRYPT: DES Encryption. -* DES_HW: DES Encryption. -* DES_SW: DES Encryption. -* DESERR_BADPARAM: DES Encryption. -* DESERR_HWERROR: DES Encryption. -* DESERR_NOHWDEVICE: DES Encryption. -* DESERR_NONE: DES Encryption. -* DT_BLK: Directory Entries. -* DT_CHR: Directory Entries. -* DT_DIR: Directory Entries. -* DT_FIFO: Directory Entries. -* DT_REG: Directory Entries. -* DT_SOCK: Directory Entries. -* DT_UNKNOWN: Directory Entries. -* E2BIG: Error Codes. -* EACCES: Error Codes. -* EADDRINUSE: Error Codes. -* EADDRNOTAVAIL: Error Codes. -* EADV: Error Codes. -* EAFNOSUPPORT: Error Codes. -* EAGAIN: Error Codes. -* EALREADY: Error Codes. -* EAUTH: Error Codes. -* EBACKGROUND: Error Codes. -* EBADE: Error Codes. -* EBADF <1>: Line Control. -* EBADF: Error Codes. -* EBADFD: Error Codes. -* EBADMSG: Error Codes. -* EBADR: Error Codes. -* EBADRPC: Error Codes. -* EBADRQC: Error Codes. -* EBADSLT: Error Codes. -* EBFONT: Error Codes. -* EBUSY: Error Codes. -* ECHILD: Error Codes. -* ECHO: Local Modes. -* ECHOCTL: Local Modes. -* ECHOE: Local Modes. -* ECHOK: Local Modes. -* ECHOKE: Local Modes. -* ECHONL: Local Modes. -* ECHOPRT: Local Modes. -* ECHRNG: Error Codes. -* ECOMM: Error Codes. -* ECONNABORTED: Error Codes. -* ECONNREFUSED: Error Codes. -* ECONNRESET: Error Codes. -* ED: Error Codes. -* EDEADLK: Error Codes. -* EDEADLOCK: Error Codes. -* EDESTADDRREQ: Error Codes. -* EDIED: Error Codes. -* EDOM: Error Codes. -* EDOTDOT: Error Codes. -* EDQUOT: Error Codes. -* EEXIST: Error Codes. -* EFAULT: Error Codes. -* EFBIG: Error Codes. -* EFTYPE: Error Codes. -* EGRATUITOUS: Error Codes. -* EGREGIOUS: Error Codes. -* EHOSTDOWN: Error Codes. -* EHOSTUNREACH: Error Codes. -* EIDRM: Error Codes. -* EIEIO: Error Codes. -* EILSEQ: Error Codes. -* EINPROGRESS: Error Codes. -* EINTR: Error Codes. -* EINVAL <1>: Line Control. -* EINVAL: Error Codes. -* EIO: Error Codes. -* EISCONN: Error Codes. -* EISDIR: Error Codes. -* EISNAM: Error Codes. -* EL2HLT: Error Codes. -* EL2NSYNC: Error Codes. -* EL3HLT: Error Codes. -* EL3RST: Error Codes. -* ELIBACC: Error Codes. -* ELIBBAD: Error Codes. -* ELIBEXEC: Error Codes. -* ELIBMAX: Error Codes. -* ELIBSCN: Error Codes. -* ELNRNG: Error Codes. -* ELOOP: Error Codes. -* EMEDIUMTYPE: Error Codes. -* EMFILE: Error Codes. -* EMLINK: Error Codes. -* EMPTY <1>: XPG Functions. -* EMPTY: Manipulating the Database. -* EMSGSIZE: Error Codes. -* EMULTIHOP: Error Codes. -* ENAMETOOLONG: Error Codes. -* ENAVAIL: Error Codes. -* ENEEDAUTH: Error Codes. -* ENETDOWN: Error Codes. -* ENETRESET: Error Codes. -* ENETUNREACH: Error Codes. -* ENFILE: Error Codes. -* ENOANO: Error Codes. -* ENOBUFS: Error Codes. -* ENOCSI: Error Codes. -* ENODATA: Error Codes. -* ENODEV: Error Codes. -* ENOENT: Error Codes. -* ENOEXEC: Error Codes. -* ENOLCK: Error Codes. -* ENOLINK: Error Codes. -* ENOMEDIUM: Error Codes. -* ENOMEM: Error Codes. -* ENOMSG: Error Codes. -* ENONET: Error Codes. -* ENOPKG: Error Codes. -* ENOPROTOOPT: Error Codes. -* ENOSPC: Error Codes. -* ENOSR: Error Codes. -* ENOSTR: Error Codes. -* ENOSYS: Error Codes. -* ENOTBLK: Error Codes. -* ENOTCONN: Error Codes. -* ENOTDIR: Error Codes. -* ENOTEMPTY: Error Codes. -* ENOTNAM: Error Codes. -* ENOTSOCK: Error Codes. -* ENOTSUP: Error Codes. -* ENOTTY <1>: Line Control. -* ENOTTY: Error Codes. -* ENOTUNIQ: Error Codes. -* environ: Environment Access. -* ENXIO: Error Codes. -* EOF: EOF and Errors. -* EOPNOTSUPP: Error Codes. -* EOVERFLOW: Error Codes. -* EPERM: Error Codes. -* EPFNOSUPPORT: Error Codes. -* EPIPE: Error Codes. -* EPROCLIM: Error Codes. -* EPROCUNAVAIL: Error Codes. -* EPROGMISMATCH: Error Codes. -* EPROGUNAVAIL: Error Codes. -* EPROTO: Error Codes. -* EPROTONOSUPPORT: Error Codes. -* EPROTOTYPE: Error Codes. -* EQUIV_CLASS_MAX: Utility Limits. -* ERA: The Elegant and Fast Way. -* ERA_D_FMT: The Elegant and Fast Way. -* ERA_D_T_FMT: The Elegant and Fast Way. -* ERA_T_FMT: The Elegant and Fast Way. -* ERA_YEAR: The Elegant and Fast Way. -* ERANGE: Error Codes. -* EREMCHG: Error Codes. -* EREMOTE: Error Codes. -* EREMOTEIO: Error Codes. -* ERESTART: Error Codes. -* EROFS: Error Codes. -* ERPCMISMATCH: Error Codes. -* errno: Checking for Errors. -* ESHUTDOWN: Error Codes. -* ESOCKTNOSUPPORT: Error Codes. -* ESPIPE: Error Codes. -* ESRCH: Error Codes. -* ESRMNT: Error Codes. -* ESTALE: Error Codes. -* ESTRPIPE: Error Codes. -* ethers: NSS Basics. -* ETIME: Error Codes. -* ETIMEDOUT: Error Codes. -* ETOOMANYREFS: Error Codes. -* ETXTBSY: Error Codes. -* EUCLEAN: Error Codes. -* EUNATCH: Error Codes. -* EUSERS: Error Codes. -* EWOULDBLOCK: Error Codes. -* EXDEV: Error Codes. -* EXFULL: Error Codes. -* EXIT_FAILURE: Exit Status. -* EXIT_SUCCESS: Exit Status. -* EXPR_NEST_MAX: Utility Limits. -* EXTA: Line Speed. -* EXTB: Line Speed. -* F_DUPFD: Duplicating Descriptors. -* F_GETFD: Descriptor Flags. -* F_GETFL: Getting File Status Flags. -* F_GETLK: File Locks. -* F_GETOWN: Interrupt Input. -* F_OK: Testing File Access. -* F_RDLCK: File Locks. -* F_SETFD: Descriptor Flags. -* F_SETFL: Getting File Status Flags. -* F_SETLK: File Locks. -* F_SETLKW: File Locks. -* F_SETOWN: Interrupt Input. -* F_UNLCK: File Locks. -* F_WRLCK: File Locks. -* FD_CLOEXEC: Descriptor Flags. -* FD_SETSIZE: Waiting for I/O. -* FE_DFL_ENV: Control Functions. -* FE_DIVBYZERO: Status bit operations. -* FE_DOWNWARD: Rounding. -* FE_INEXACT: Status bit operations. -* FE_INVALID: Status bit operations. -* FE_NOMASK_ENV: Control Functions. -* FE_OVERFLOW: Status bit operations. -* FE_TONEAREST: Rounding. -* FE_TOWARDZERO: Rounding. -* FE_UNDERFLOW: Status bit operations. -* FE_UPWARD: Rounding. -* FILENAME_MAX: Limits for Files. -* FLT_DIG: Floating Point Parameters. -* FLT_EPSILON: Floating Point Parameters. -* FLT_MANT_DIG: Floating Point Parameters. -* FLT_MAX: Floating Point Parameters. -* FLT_MAX_10_EXP: Floating Point Parameters. -* FLT_MAX_EXP: Floating Point Parameters. -* FLT_MIN: Floating Point Parameters. -* FLT_MIN_10_EXP: Floating Point Parameters. -* FLT_MIN_EXP: Floating Point Parameters. -* FLT_RADIX: Floating Point Parameters. -* FLT_ROUNDS: Floating Point Parameters. -* FLUSHO: Local Modes. -* FOPEN_MAX: Opening Streams. -* FP_FAST_FMA: Misc FP Arithmetic. -* FP_ILOGB0: Exponents and Logarithms. -* FP_ILOGBNAN: Exponents and Logarithms. -* FP_INFINITE: Floating Point Classes. -* FP_NAN: Floating Point Classes. -* FP_NORMAL: Floating Point Classes. -* FP_SUBNORMAL: Floating Point Classes. -* FP_ZERO: Floating Point Classes. -* FPE_DECOVF_TRAP: Program Error Signals. -* FPE_FLTDIV_TRAP: Program Error Signals. -* FPE_FLTOVF_TRAP: Program Error Signals. -* FPE_FLTUND_TRAP: Program Error Signals. -* FPE_INTDIV_TRAP: Program Error Signals. -* FPE_INTOVF_TRAP: Program Error Signals. -* FPE_SUBRNG_TRAP: Program Error Signals. -* FRAC_DIGITS: The Elegant and Fast Way. -* FSETLOCKING_BYCALLER: Streams and Threads. -* FSETLOCKING_INTERNAL: Streams and Threads. -* FSETLOCKING_QUERY: Streams and Threads. -* FSTAB: Mount Information. -* FSTAB_RO: fstab. -* FSTAB_RQ: fstab. -* FSTAB_RW: fstab. -* FSTAB_SW: fstab. -* FSTAB_XX: fstab. -* FTW_CHDIR: Working with Directory Trees. -* FTW_D: Working with Directory Trees. -* FTW_DEPTH: Working with Directory Trees. -* FTW_DNR: Working with Directory Trees. -* FTW_DP: Working with Directory Trees. -* FTW_F: Working with Directory Trees. -* FTW_MOUNT: Working with Directory Trees. -* FTW_NS: Working with Directory Trees. -* FTW_PHYS: Working with Directory Trees. -* FTW_SL: Working with Directory Trees. -* FTW_SLN: Working with Directory Trees. -* getdate_err: General Time String Parsing. -* GLOB_ABORTED: Calling Glob. -* GLOB_ALTDIRFUNC: More Flags for Globbing. -* GLOB_APPEND: Flags for Globbing. -* GLOB_BRACE: More Flags for Globbing. -* GLOB_DOOFFS: Flags for Globbing. -* GLOB_ERR: Flags for Globbing. -* GLOB_MAGCHAR: More Flags for Globbing. -* GLOB_MARK: Flags for Globbing. -* GLOB_NOCHECK: Flags for Globbing. -* GLOB_NOESCAPE: Flags for Globbing. -* GLOB_NOMAGIC: More Flags for Globbing. -* GLOB_NOMATCH: Calling Glob. -* GLOB_NOSORT: Flags for Globbing. -* GLOB_NOSPACE: Calling Glob. -* GLOB_ONLYDIR: More Flags for Globbing. -* GLOB_PERIOD: More Flags for Globbing. -* GLOB_TILDE: More Flags for Globbing. -* GLOB_TILDE_CHECK: More Flags for Globbing. -* group: NSS Basics. -* GROUPING: The Elegant and Fast Way. -* h_errno: Host Names. -* HOST_NOT_FOUND: Host Names. -* hosts: NSS Basics. -* HUGE_VAL: Math Error Reporting. -* HUGE_VALF: Math Error Reporting. -* HUGE_VALL: Math Error Reporting. -* HUPCL: Control Modes. -* I: Complex Numbers. -* ICANON: Local Modes. -* ICRNL: Input Modes. -* IEXTEN: Local Modes. -* IFNAMSIZ: Interface Naming. -* IGNBRK: Input Modes. -* IGNCR: Input Modes. -* IGNPAR: Input Modes. -* IMAXBEL: Input Modes. -* in6addr_any: Host Address Data Type. -* in6addr_loopback: Host Address Data Type. -* INADDR_ANY: Host Address Data Type. -* INADDR_BROADCAST: Host Address Data Type. -* INADDR_LOOPBACK: Host Address Data Type. -* INADDR_NONE: Host Address Data Type. -* INFINITY: Infinity and NaN. -* INIT_PROCESS <1>: XPG Functions. -* INIT_PROCESS: Manipulating the Database. -* INLCR: Input Modes. -* INPCK: Input Modes. -* INT_CURR_SYMBOL: The Elegant and Fast Way. -* INT_FRAC_DIGITS: The Elegant and Fast Way. -* INT_MAX: Range of Type. -* INT_MIN: Range of Type. -* INT_N_CS_PRECEDES: The Elegant and Fast Way. -* INT_N_SEP_BY_SPACE: The Elegant and Fast Way. -* INT_N_SIGN_POSN: The Elegant and Fast Way. -* INT_P_CS_PRECEDES: The Elegant and Fast Way. -* INT_P_SEP_BY_SPACE: The Elegant and Fast Way. -* INT_P_SIGN_POSN: The Elegant and Fast Way. -* IPPORT_RESERVED: Ports. -* IPPORT_USERRESERVED: Ports. -* ISIG: Local Modes. -* ISTRIP: Input Modes. -* ITIMER_PROF: Setting an Alarm. -* ITIMER_REAL: Setting an Alarm. -* ITIMER_VIRTUAL: Setting an Alarm. -* IXANY: Input Modes. -* IXOFF: Input Modes. -* IXON: Input Modes. -* L_ctermid: Identifying the Terminal. -* L_cuserid: Who Logged In. -* L_INCR: File Positioning. -* L_SET: File Positioning. -* L_tmpnam: Temporary Files. -* L_XTND: File Positioning. -* LANG: Locale Categories. -* LANGUAGE: Locale Categories. -* LC_ALL: Locale Categories. -* LC_COLLATE: Locale Categories. -* LC_CTYPE: Locale Categories. -* LC_MESSAGES: Locale Categories. -* LC_MONETARY: Locale Categories. -* LC_NUMERIC: Locale Categories. -* LC_TIME: Locale Categories. -* LDBL_DIG: Floating Point Parameters. -* LDBL_EPSILON: Floating Point Parameters. -* LDBL_MANT_DIG: Floating Point Parameters. -* LDBL_MAX: Floating Point Parameters. -* LDBL_MAX_10_EXP: Floating Point Parameters. -* LDBL_MAX_EXP: Floating Point Parameters. -* LDBL_MIN: Floating Point Parameters. -* LDBL_MIN_10_EXP: Floating Point Parameters. -* LDBL_MIN_EXP: Floating Point Parameters. -* LINE_MAX: Utility Limits. -* LINK_MAX: Limits for Files. -* LIO_NOP: Asynchronous I/O. -* LIO_READ: Asynchronous I/O. -* LIO_WRITE: Asynchronous I/O. -* LOG_ALERT: syslog; vsyslog. -* LOG_AUTH: syslog; vsyslog. -* LOG_AUTHPRIV: syslog; vsyslog. -* LOG_CRIT: syslog; vsyslog. -* LOG_CRON: syslog; vsyslog. -* LOG_DAEMON: syslog; vsyslog. -* LOG_DEBUG: syslog; vsyslog. -* LOG_EMERG: syslog; vsyslog. -* LOG_ERR: syslog; vsyslog. -* LOG_FTP: syslog; vsyslog. -* LOG_INFO: syslog; vsyslog. -* LOG_LOCAL0: syslog; vsyslog. -* LOG_LOCAL1: syslog; vsyslog. -* LOG_LOCAL2: syslog; vsyslog. -* LOG_LOCAL3: syslog; vsyslog. -* LOG_LOCAL4: syslog; vsyslog. -* LOG_LOCAL5: syslog; vsyslog. -* LOG_LOCAL6: syslog; vsyslog. -* LOG_LOCAL7: syslog; vsyslog. -* LOG_LPR: syslog; vsyslog. -* LOG_MAIL: syslog; vsyslog. -* LOG_NEWS: syslog; vsyslog. -* LOG_NOTICE: syslog; vsyslog. -* LOG_SYSLOG: syslog; vsyslog. -* LOG_USER: syslog; vsyslog. -* LOG_UUCP: syslog; vsyslog. -* LOG_WARNING: syslog; vsyslog. -* LOGIN_PROCESS <1>: XPG Functions. -* LOGIN_PROCESS: Manipulating the Database. -* LONG_LONG_MAX: Range of Type. -* LONG_LONG_MIN: Range of Type. -* LONG_MAX: Range of Type. -* LONG_MIN: Range of Type. -* M_1_PI: Mathematical Constants. -* M_2_PI: Mathematical Constants. -* M_2_SQRTPI: Mathematical Constants. -* M_E: Mathematical Constants. -* M_LN10: Mathematical Constants. -* M_LN2: Mathematical Constants. -* M_LOG10E: Mathematical Constants. -* M_LOG2E: Mathematical Constants. -* M_PI: Mathematical Constants. -* M_PI_2: Mathematical Constants. -* M_PI_4: Mathematical Constants. -* M_SQRT1_2: Mathematical Constants. -* M_SQRT2: Mathematical Constants. -* MAP_ANON: Memory-mapped I/O. -* MAP_ANONYMOUS: Memory-mapped I/O. -* MAP_FIXED: Memory-mapped I/O. -* MAP_PRIVATE: Memory-mapped I/O. -* MAP_SHARED: Memory-mapped I/O. -* MAX_CANON: Limits for Files. -* MAX_INPUT: Limits for Files. -* MAXNAMLEN: Limits for Files. -* MAXSYMLINKS: Symbolic Links. -* MB_CUR_MAX: Selecting the Conversion. -* MB_LEN_MAX: Selecting the Conversion. -* MDMBUF: Control Modes. -* MINSIGSTKSZ: Signal Stack. -* MM_APPL: Printing Formatted Messages. -* MM_CONSOLE: Printing Formatted Messages. -* MM_ERROR: Printing Formatted Messages. -* MM_FIRM: Printing Formatted Messages. -* MM_HALT: Printing Formatted Messages. -* MM_HARD: Printing Formatted Messages. -* MM_INFO: Printing Formatted Messages. -* MM_NOSEV: Printing Formatted Messages. -* MM_NRECOV: Printing Formatted Messages. -* MM_NULLACT: Printing Formatted Messages. -* MM_NULLLBL: Printing Formatted Messages. -* MM_NULLMC: Printing Formatted Messages. -* MM_NULLSEV: Printing Formatted Messages. -* MM_NULLTAG: Printing Formatted Messages. -* MM_NULLTXT: Printing Formatted Messages. -* MM_OPSYS: Printing Formatted Messages. -* MM_PRINT: Printing Formatted Messages. -* MM_RECOVER: Printing Formatted Messages. -* MM_SOFT: Printing Formatted Messages. -* MM_UTIL: Printing Formatted Messages. -* MM_WARNING: Printing Formatted Messages. -* MNTOPT_DEFAULTS: mtab. -* MNTOPT_NOAUTO: mtab. -* MNTOPT_NOSUID: mtab. -* MNTOPT_RO: mtab. -* MNTOPT_RW: mtab. -* MNTOPT_SUID: mtab. -* MNTTYPE_IGNORE: mtab. -* MNTTYPE_NFS: mtab. -* MNTTYPE_SWAP: mtab. -* MON_1: The Elegant and Fast Way. -* MON_10: The Elegant and Fast Way. -* MON_11: The Elegant and Fast Way. -* MON_12: The Elegant and Fast Way. -* MON_2: The Elegant and Fast Way. -* MON_3: The Elegant and Fast Way. -* MON_4: The Elegant and Fast Way. -* MON_5: The Elegant and Fast Way. -* MON_6: The Elegant and Fast Way. -* MON_7: The Elegant and Fast Way. -* MON_8: The Elegant and Fast Way. -* MON_9: The Elegant and Fast Way. -* MON_DECIMAL_POINT: The Elegant and Fast Way. -* MON_GROUPING: The Elegant and Fast Way. -* MON_THOUSANDS_SEP: The Elegant and Fast Way. -* MS_ASYNC: Memory-mapped I/O. -* MS_SYNC: Memory-mapped I/O. -* MSG_DONTROUTE: Socket Data Options. -* MSG_OOB: Socket Data Options. -* MSG_PEEK: Socket Data Options. -* N_CS_PRECEDES: The Elegant and Fast Way. -* N_SEP_BY_SPACE: The Elegant and Fast Way. -* N_SIGN_POSN: The Elegant and Fast Way. -* NAME_MAX: Limits for Files. -* NAN: Infinity and NaN. -* NCCS: Mode Data Types. -* NDEBUG: Consistency Checking. -* NEGATIVE_SIGN: The Elegant and Fast Way. -* netgroup: NSS Basics. -* networks: NSS Basics. -* NEW_TIME <1>: XPG Functions. -* NEW_TIME: Manipulating the Database. -* NGROUPS_MAX: General Limits. -* NL_ARGMAX: Output Conversion Syntax. -* NO_ADDRESS: Host Names. -* NO_RECOVERY: Host Names. -* NOEXPR: The Elegant and Fast Way. -* NOFLSH: Local Modes. -* NOKERNINFO: Local Modes. -* NOSTR: The Elegant and Fast Way. -* NSIG: Standard Signals. -* NSS_STATUS_NOTFOUND: NSS Modules Interface. -* NSS_STATUS_SUCCESS: NSS Modules Interface. -* NSS_STATUS_TRYAGAIN: NSS Modules Interface. -* NSS_STATUS_UNAVAIL: NSS Modules Interface. -* NULL: Null Pointer Constant. -* O_ACCMODE: Access Modes. -* O_APPEND: Operating Modes. -* O_ASYNC: Operating Modes. -* O_CREAT: Open-time Flags. -* O_EXCL: Open-time Flags. -* O_EXEC: Access Modes. -* O_EXLOCK: Open-time Flags. -* O_FSYNC: Operating Modes. -* O_IGNORE_CTTY: Open-time Flags. -* O_NDELAY: Operating Modes. -* O_NOATIME: Operating Modes. -* O_NOCTTY: Open-time Flags. -* O_NOLINK: Open-time Flags. -* O_NONBLOCK <1>: Operating Modes. -* O_NONBLOCK: Open-time Flags. -* O_NOTRANS: Open-time Flags. -* O_RDONLY: Access Modes. -* O_RDWR: Access Modes. -* O_READ: Access Modes. -* O_SHLOCK: Open-time Flags. -* O_SYNC: Operating Modes. -* O_TRUNC: Open-time Flags. -* O_WRITE: Access Modes. -* O_WRONLY: Access Modes. -* obstack_alloc_failed_handler: Preparing for Obstacks. -* OLD_TIME <1>: XPG Functions. -* OLD_TIME: Manipulating the Database. -* ONLCR: Output Modes. -* ONOEOT: Output Modes. -* OPEN_MAX: General Limits. -* OPOST: Output Modes. -* optarg: Using Getopt. -* opterr: Using Getopt. -* optind: Using Getopt. -* OPTION_ALIAS: Argp Option Flags. -* OPTION_ARG_OPTIONAL: Argp Option Flags. -* OPTION_DOC: Argp Option Flags. -* OPTION_HIDDEN: Argp Option Flags. -* OPTION_NO_USAGE: Argp Option Flags. -* optopt: Using Getopt. -* OXTABS: Output Modes. -* P_CS_PRECEDES: The Elegant and Fast Way. -* P_SEP_BY_SPACE: The Elegant and Fast Way. -* P_SIGN_POSN: The Elegant and Fast Way. -* P_tmpdir: Temporary Files. -* PA_CHAR: Parsing a Template String. -* PA_DOUBLE: Parsing a Template String. -* PA_FLAG_LONG: Parsing a Template String. -* PA_FLAG_LONG_DOUBLE: Parsing a Template String. -* PA_FLAG_LONG_LONG: Parsing a Template String. -* PA_FLAG_MASK: Parsing a Template String. -* PA_FLAG_PTR: Parsing a Template String. -* PA_FLAG_SHORT: Parsing a Template String. -* PA_FLOAT: Parsing a Template String. -* PA_INT: Parsing a Template String. -* PA_LAST: Parsing a Template String. -* PA_POINTER: Parsing a Template String. -* PA_STRING: Parsing a Template String. -* PARENB: Control Modes. -* PARMRK: Input Modes. -* PARODD: Control Modes. -* passwd: NSS Basics. -* PATH_MAX: Limits for Files. -* PENDIN: Local Modes. -* PF_CCITT: Misc Namespaces. -* PF_FILE: Local Namespace Details. -* PF_IMPLINK: Misc Namespaces. -* PF_INET: Internet Namespace. -* PF_INET6: Internet Namespace. -* PF_ISO: Misc Namespaces. -* PF_LOCAL: Local Namespace Details. -* PF_NS: Misc Namespaces. -* PF_ROUTE: Misc Namespaces. -* PF_UNIX: Local Namespace Details. -* PI: Mathematical Constants. -* PIPE_BUF: Limits for Files. -* PM_STR: The Elegant and Fast Way. -* POSITIVE_SIGN: The Elegant and Fast Way. -* PRIO_MAX: Traditional Scheduling Functions. -* PRIO_MIN: Traditional Scheduling Functions. -* PRIO_PGRP: Traditional Scheduling Functions. -* PRIO_PROCESS: Traditional Scheduling Functions. -* PRIO_USER: Traditional Scheduling Functions. -* program_invocation_name: Error Messages. -* program_invocation_short_name: Error Messages. -* PROT_EXEC: Memory-mapped I/O. -* PROT_READ: Memory-mapped I/O. -* PROT_WRITE: Memory-mapped I/O. -* protocols: NSS Basics. -* PWD: Working Directory. -* R_OK: Testing File Access. -* RADIXCHAR: The Elegant and Fast Way. -* RAND_MAX: ISO Random. -* RE_DUP_MAX: General Limits. -* RLIM_INFINITY: Limits on Resources. -* RLIM_NLIMITS: Limits on Resources. -* RLIMIT_AS: Limits on Resources. -* RLIMIT_CORE: Limits on Resources. -* RLIMIT_CPU: Limits on Resources. -* RLIMIT_DATA: Limits on Resources. -* RLIMIT_FSIZE: Limits on Resources. -* RLIMIT_NOFILE: Limits on Resources. -* RLIMIT_OFILE: Limits on Resources. -* RLIMIT_RSS: Limits on Resources. -* RLIMIT_STACK: Limits on Resources. -* rpc: NSS Basics. -* RUN_LVL <1>: XPG Functions. -* RUN_LVL: Manipulating the Database. -* S_IEXEC: Permission Bits. -* S_IFBLK: Testing File Type. -* S_IFCHR: Testing File Type. -* S_IFDIR: Testing File Type. -* S_IFIFO: Testing File Type. -* S_IFLNK: Testing File Type. -* S_IFMT: Testing File Type. -* S_IFREG: Testing File Type. -* S_IFSOCK: Testing File Type. -* S_IREAD: Permission Bits. -* S_IRGRP: Permission Bits. -* S_IROTH: Permission Bits. -* S_IRUSR: Permission Bits. -* S_IRWXG: Permission Bits. -* S_IRWXO: Permission Bits. -* S_IRWXU: Permission Bits. -* S_ISGID: Permission Bits. -* S_ISUID: Permission Bits. -* S_ISVTX: Permission Bits. -* S_IWGRP: Permission Bits. -* S_IWOTH: Permission Bits. -* S_IWRITE: Permission Bits. -* S_IWUSR: Permission Bits. -* S_IXGRP: Permission Bits. -* S_IXOTH: Permission Bits. -* S_IXUSR: Permission Bits. -* SA_NOCLDSTOP: Flags for Sigaction. -* SA_ONSTACK: Flags for Sigaction. -* SA_RESTART: Flags for Sigaction. -* SC_SSIZE_MAX: Constants for Sysconf. -* SCHAR_MAX: Range of Type. -* SCHAR_MIN: Range of Type. -* SEEK_CUR: File Positioning. -* SEEK_END: File Positioning. -* SEEK_SET: File Positioning. -* SEM_VALUE_MAX: POSIX Semaphores. -* services: NSS Basics. -* shadow: NSS Basics. -* SHRT_MAX: Range of Type. -* SHRT_MIN: Range of Type. -* SIG_BLOCK: Process Signal Mask. -* SIG_DFL: Basic Signal Handling. -* SIG_ERR: Basic Signal Handling. -* SIG_IGN: Basic Signal Handling. -* SIG_SETMASK: Process Signal Mask. -* SIG_UNBLOCK: Process Signal Mask. -* SIGABRT: Program Error Signals. -* SIGALRM: Alarm Signals. -* SIGBUS: Program Error Signals. -* SIGCHLD: Job Control Signals. -* SIGCLD: Job Control Signals. -* SIGCONT: Job Control Signals. -* SIGEMT: Program Error Signals. -* SIGFPE: Program Error Signals. -* SIGHUP: Termination Signals. -* SIGILL: Program Error Signals. -* SIGINFO: Miscellaneous Signals. -* SIGINT: Termination Signals. -* SIGIO: Asynchronous I/O Signals. -* SIGIOT: Program Error Signals. -* SIGKILL: Termination Signals. -* SIGLOST: Operation Error Signals. -* signgam: Special Functions. -* SIGPIPE: Operation Error Signals. -* SIGPOLL: Asynchronous I/O Signals. -* SIGPROF: Alarm Signals. -* SIGQUIT: Termination Signals. -* SIGSEGV: Program Error Signals. -* SIGSTKSZ: Signal Stack. -* SIGSTOP: Job Control Signals. -* SIGSYS: Program Error Signals. -* SIGTERM: Termination Signals. -* SIGTRAP: Program Error Signals. -* SIGTSTP: Job Control Signals. -* SIGTTIN: Job Control Signals. -* SIGTTOU: Job Control Signals. -* SIGURG: Asynchronous I/O Signals. -* SIGUSR1: Miscellaneous Signals. -* SIGUSR2: Miscellaneous Signals. -* SIGVTALRM: Alarm Signals. -* SIGWINCH: Miscellaneous Signals. -* SIGXCPU: Operation Error Signals. -* SIGXFSZ: Operation Error Signals. -* SOCK_DGRAM: Communication Styles. -* SOCK_RAW: Communication Styles. -* SOCK_STREAM: Communication Styles. -* SOL_SOCKET: Socket-Level Options. -* SS_DISABLE: Signal Stack. -* SS_ONSTACK: Signal Stack. -* SSIZE_MAX: General Limits. -* stderr: Standard Streams. -* STDERR_FILENO: Descriptors and Streams. -* stdin: Standard Streams. -* STDIN_FILENO: Descriptors and Streams. -* stdout: Standard Streams. -* STDOUT_FILENO: Descriptors and Streams. -* STREAM_MAX: General Limits. -* SV_INTERRUPT: BSD Handler. -* SV_ONSTACK: BSD Handler. -* SV_RESETHAND: BSD Handler. -* sys_siglist: Signal Messages. -* T_FMT: The Elegant and Fast Way. -* T_FMT_AMPM: The Elegant and Fast Way. -* TCIFLUSH: Line Control. -* TCIOFF: Line Control. -* TCIOFLUSH: Line Control. -* TCION: Line Control. -* TCOFLUSH: Line Control. -* TCOOFF: Line Control. -* TCOON: Line Control. -* TCSADRAIN: Mode Functions. -* TCSAFLUSH: Mode Functions. -* TCSANOW: Mode Functions. -* TCSASOFT: Mode Functions. -* THOUSANDS_SEP: The Elegant and Fast Way. -* THOUSEP: The Elegant and Fast Way. -* timezone: Time Zone Functions. -* TMP_MAX: Temporary Files. -* TOSTOP: Local Modes. -* TRY_AGAIN: Host Names. -* tzname: Time Zone Functions. -* TZNAME_MAX: General Limits. -* UCHAR_MAX: Range of Type. -* UINT_MAX: Range of Type. -* ULONG_LONG_MAX: Range of Type. -* ULONG_MAX: Range of Type. -* USER_PROCESS <1>: XPG Functions. -* USER_PROCESS: Manipulating the Database. -* USHRT_MAX: Range of Type. -* VDISCARD: Other Special. -* VDSUSP: Signal Characters. -* VEOF: Editing Characters. -* VEOL: Editing Characters. -* VEOL2: Editing Characters. -* VERASE: Editing Characters. -* VINTR: Signal Characters. -* VKILL: Editing Characters. -* VLNEXT: Other Special. -* VMIN: Noncanonical Input. -* VQUIT: Signal Characters. -* VREPRINT: Editing Characters. -* VSTART: Start/Stop Characters. -* VSTATUS: Other Special. -* VSTOP: Start/Stop Characters. -* VSUSP: Signal Characters. -* VTIME: Noncanonical Input. -* VWERASE: Editing Characters. -* W_OK: Testing File Access. -* WCHAR_MAX <1>: Range of Type. -* WCHAR_MAX: Extended Char Intro. -* WCHAR_MIN: Extended Char Intro. -* WEOF <1>: EOF and Errors. -* WEOF: Extended Char Intro. -* X_OK: Testing File Access. -* YESEXPR: The Elegant and Fast Way. -* YESSTR: The Elegant and Fast Way. +* __fbufsize: Controlling Buffering. +* __flbf: Controlling Buffering. +* __fpending: Controlling Buffering. +* __fpurge: Flushing Buffers. +* __freadable: Opening Streams. +* __freading: Opening Streams. +* __fsetlocking: Streams and Threads. +* __fwritable: Opening Streams. +* __fwriting: Opening Streams. +* __va_copy: Argument Macros. +* _Exit: Termination Internals. +* _exit: Termination Internals. +* _flushlbf: Flushing Buffers. +* _tolower: Case Conversion. +* _toupper: Case Conversion. +* a64l: Encode Binary Data. +* abort: Aborting a Program. +* abs: Absolute Value. +* accept: Accepting Connections. +* access: Testing File Access. +* acos: Inverse Trig Functions. +* acosf: Inverse Trig Functions. +* acosh: Hyperbolic Functions. +* acoshf: Hyperbolic Functions. +* acoshl: Hyperbolic Functions. +* acosl: Inverse Trig Functions. +* addmntent: mtab. +* addseverity: Adding Severity Classes. +* adjtime: High-Resolution Calendar. +* adjtimex: High-Resolution Calendar. +* aio_cancel: Cancel AIO Operations. +* aio_cancel64: Cancel AIO Operations. +* aio_error: Status of AIO Operations. +* aio_error64: Status of AIO Operations. +* aio_fsync: Synchronizing AIO Operations. +* aio_fsync64: Synchronizing AIO Operations. +* aio_init: Configuration of AIO. +* aio_read: Asynchronous Reads/Writes. +* aio_read64: Asynchronous Reads/Writes. +* aio_return: Status of AIO Operations. +* aio_return64: Status of AIO Operations. +* aio_suspend: Synchronizing AIO Operations. +* aio_suspend64: Synchronizing AIO Operations. +* aio_write: Asynchronous Reads/Writes. +* aio_write64: Asynchronous Reads/Writes. +* alarm: Setting an Alarm. +* alloca: Variable Size Automatic. +* alphasort: Scanning Directory Content. +* alphasort64: Scanning Directory Content. +* argp_error: Argp Helper Functions. +* argp_failure: Argp Helper Functions. +* argp_help: Argp Help. +* argp_parse: Argp. +* argp_state_help: Argp Helper Functions. +* argp_usage: Argp Helper Functions. +* argz_add: Argz Functions. +* argz_add_sep: Argz Functions. +* argz_append: Argz Functions. +* argz_count: Argz Functions. +* argz_create: Argz Functions. +* argz_create_sep: Argz Functions. +* argz_delete: Argz Functions. +* argz_extract: Argz Functions. +* argz_insert: Argz Functions. +* argz_next: Argz Functions. +* argz_replace: Argz Functions. +* argz_stringify: Argz Functions. +* asctime: Formatting Calendar Time. +* asctime_r: Formatting Calendar Time. +* asin: Inverse Trig Functions. +* asinf: Inverse Trig Functions. +* asinh: Hyperbolic Functions. +* asinhf: Hyperbolic Functions. +* asinhl: Hyperbolic Functions. +* asinl: Inverse Trig Functions. +* asprintf: Dynamic Output. +* assert: Consistency Checking. +* assert_perror: Consistency Checking. +* atan: Inverse Trig Functions. +* atan2: Inverse Trig Functions. +* atan2f: Inverse Trig Functions. +* atan2l: Inverse Trig Functions. +* atanf: Inverse Trig Functions. +* atanh: Hyperbolic Functions. +* atanhf: Hyperbolic Functions. +* atanhl: Hyperbolic Functions. +* atanl: Inverse Trig Functions. +* atexit: Cleanups on Exit. +* atof: Parsing of Floats. +* atoi: Parsing of Integers. +* atol: Parsing of Integers. +* atoll: Parsing of Integers. +* backtrace: Backtraces. +* backtrace_symbols: Backtraces. +* backtrace_symbols_fd: Backtraces. +* basename: Finding Tokens in a String. +* bcmp: String/Array Comparison. +* bcopy: Copying and Concatenation. +* bind: Setting Address. +* bind_textdomain_codeset: Charset conversion in gettext. +* bindtextdomain: Locating gettext catalog. +* brk: Resizing the Data Segment. +* bsearch: Array Search Function. +* btowc: Converting a Character. +* bzero: Copying and Concatenation. +* cabs: Absolute Value. +* cabsf: Absolute Value. +* cabsl: Absolute Value. +* cacos: Inverse Trig Functions. +* cacosf: Inverse Trig Functions. +* cacosh: Hyperbolic Functions. +* cacoshf: Hyperbolic Functions. +* cacoshl: Hyperbolic Functions. +* cacosl: Inverse Trig Functions. +* calloc: Allocating Cleared Space. +* canonicalize_file_name: Symbolic Links. +* carg: Operations on Complex. +* cargf: Operations on Complex. +* cargl: Operations on Complex. +* casin: Inverse Trig Functions. +* casinf: Inverse Trig Functions. +* casinh: Hyperbolic Functions. +* casinhf: Hyperbolic Functions. +* casinhl: Hyperbolic Functions. +* casinl: Inverse Trig Functions. +* catan: Inverse Trig Functions. +* catanf: Inverse Trig Functions. +* catanh: Hyperbolic Functions. +* catanhf: Hyperbolic Functions. +* catanhl: Hyperbolic Functions. +* catanl: Inverse Trig Functions. +* catclose: The catgets Functions. +* catgets: The catgets Functions. +* catopen: The catgets Functions. +* cbc_crypt: DES Encryption. +* cbrt: Exponents and Logarithms. +* cbrtf: Exponents and Logarithms. +* cbrtl: Exponents and Logarithms. +* ccos: Trig Functions. +* ccosf: Trig Functions. +* ccosh: Hyperbolic Functions. +* ccoshf: Hyperbolic Functions. +* ccoshl: Hyperbolic Functions. +* ccosl: Trig Functions. +* ceil: Rounding Functions. +* ceilf: Rounding Functions. +* ceill: Rounding Functions. +* cexp: Exponents and Logarithms. +* cexpf: Exponents and Logarithms. +* cexpl: Exponents and Logarithms. +* cfgetispeed: Line Speed. +* cfgetospeed: Line Speed. +* cfmakeraw: Noncanonical Input. +* cfree: Freeing after Malloc. +* cfsetispeed: Line Speed. +* cfsetospeed: Line Speed. +* cfsetspeed: Line Speed. +* chdir: Working Directory. +* chmod: Setting Permissions. +* chown: File Owner. +* cimag: Operations on Complex. +* cimagf: Operations on Complex. +* cimagl: Operations on Complex. +* clearenv: Environment Access. +* clearerr: Error Recovery. +* clearerr_unlocked: Error Recovery. +* clock: CPU Time. +* clog: Exponents and Logarithms. +* clog10: Exponents and Logarithms. +* clog10f: Exponents and Logarithms. +* clog10l: Exponents and Logarithms. +* clogf: Exponents and Logarithms. +* clogl: Exponents and Logarithms. +* close: Opening and Closing Files. +* closedir: Reading/Closing Directory. +* closelog: closelog. +* confstr: String Parameters. +* conj: Operations on Complex. +* conjf: Operations on Complex. +* conjl: Operations on Complex. +* connect: Connecting. +* copysign: FP Bit Twiddling. +* copysignf: FP Bit Twiddling. +* copysignl: FP Bit Twiddling. +* cos: Trig Functions. +* cosf: Trig Functions. +* cosh: Hyperbolic Functions. +* coshf: Hyperbolic Functions. +* coshl: Hyperbolic Functions. +* cosl: Trig Functions. +* cpow: Exponents and Logarithms. +* cpowf: Exponents and Logarithms. +* cpowl: Exponents and Logarithms. +* cproj: Operations on Complex. +* cprojf: Operations on Complex. +* cprojl: Operations on Complex. +* creal: Operations on Complex. +* crealf: Operations on Complex. +* creall: Operations on Complex. +* creat: Opening and Closing Files. +* creat64: Opening and Closing Files. +* crypt: crypt. +* crypt_r: crypt. +* csin: Trig Functions. +* csinf: Trig Functions. +* csinh: Hyperbolic Functions. +* csinhf: Hyperbolic Functions. +* csinhl: Hyperbolic Functions. +* csinl: Trig Functions. +* csqrt: Exponents and Logarithms. +* csqrtf: Exponents and Logarithms. +* csqrtl: Exponents and Logarithms. +* ctan: Trig Functions. +* ctanf: Trig Functions. +* ctanh: Hyperbolic Functions. +* ctanhf: Hyperbolic Functions. +* ctanhl: Hyperbolic Functions. +* ctanl: Trig Functions. +* ctermid: Identifying the Terminal. +* ctime: Formatting Calendar Time. +* ctime_r: Formatting Calendar Time. +* cuserid: Who Logged In. +* dcgettext: Translation with gettext. +* dcngettext: Advanced gettext functions. +* DES_FAILED: DES Encryption. +* des_setparity: DES Encryption. +* dgettext: Translation with gettext. +* difftime: Elapsed Time. +* dirfd: Opening a Directory. +* dirname: Finding Tokens in a String. +* div: Integer Division. +* dngettext: Advanced gettext functions. +* drand48: SVID Random. +* drand48_r: SVID Random. +* drem: Remainder Functions. +* dremf: Remainder Functions. +* dreml: Remainder Functions. +* DTTOIF: Directory Entries. +* dup: Duplicating Descriptors. +* dup2: Duplicating Descriptors. +* ecb_crypt: DES Encryption. +* ecvt: System V Number Conversion. +* ecvt_r: System V Number Conversion. +* encrypt: DES Encryption. +* encrypt_r: DES Encryption. +* endfsent: fstab. +* endgrent: Scanning All Groups. +* endhostent: Host Names. +* endmntent: mtab. +* endnetent: Networks Database. +* endnetgrent: Lookup Netgroup. +* endprotoent: Protocols Database. +* endpwent: Scanning All Users. +* endservent: Services Database. +* endutent: Manipulating the Database. +* endutxent: XPG Functions. +* envz_add: Envz Functions. +* envz_entry: Envz Functions. +* envz_get: Envz Functions. +* envz_merge: Envz Functions. +* envz_strip: Envz Functions. +* erand48: SVID Random. +* erand48_r: SVID Random. +* erf: Special Functions. +* erfc: Special Functions. +* erfcf: Special Functions. +* erfcl: Special Functions. +* erff: Special Functions. +* erfl: Special Functions. +* err: Error Messages. +* error: Error Messages. +* error_at_line: Error Messages. +* errx: Error Messages. +* execl: Executing a File. +* execle: Executing a File. +* execlp: Executing a File. +* execv: Executing a File. +* execve: Executing a File. +* execvp: Executing a File. +* exit: Normal Termination. +* exp: Exponents and Logarithms. +* exp10: Exponents and Logarithms. +* exp10f: Exponents and Logarithms. +* exp10l: Exponents and Logarithms. +* exp2: Exponents and Logarithms. +* exp2f: Exponents and Logarithms. +* exp2l: Exponents and Logarithms. +* expf: Exponents and Logarithms. +* expl: Exponents and Logarithms. +* expm1: Exponents and Logarithms. +* expm1f: Exponents and Logarithms. +* expm1l: Exponents and Logarithms. +* fabs: Absolute Value. +* fabsf: Absolute Value. +* fabsl: Absolute Value. +* fchdir: Working Directory. +* fchmod: Setting Permissions. +* fchown: File Owner. +* fclean: Cleaning Streams. +* fclose: Closing Streams. +* fcloseall: Closing Streams. +* fcntl: Control Operations. +* fcvt: System V Number Conversion. +* fcvt_r: System V Number Conversion. +* FD_CLR: Waiting for I/O. +* FD_ISSET: Waiting for I/O. +* FD_SET: Waiting for I/O. +* FD_ZERO: Waiting for I/O. +* fdatasync: Synchronizing I/O. +* fdim: Misc FP Arithmetic. +* fdimf: Misc FP Arithmetic. +* fdiml: Misc FP Arithmetic. +* fdopen: Descriptors and Streams. +* feclearexcept: Status bit operations. +* fedisableexcept: Control Functions. +* feenableexcept: Control Functions. +* fegetenv: Control Functions. +* fegetexcept: Control Functions. +* fegetexceptflag: Status bit operations. +* fegetround: Rounding. +* feholdexcept: Control Functions. +* feof: EOF and Errors. +* feof_unlocked: EOF and Errors. +* feraiseexcept: Status bit operations. +* ferror: EOF and Errors. +* ferror_unlocked: EOF and Errors. +* fesetenv: Control Functions. +* fesetexceptflag: Status bit operations. +* fesetround: Rounding. +* fetestexcept: Status bit operations. +* feupdateenv: Control Functions. +* fflush: Flushing Buffers. +* fflush_unlocked: Flushing Buffers. +* fgetc: Character Input. +* fgetc_unlocked: Character Input. +* fgetgrent: Scanning All Groups. +* fgetgrent_r: Scanning All Groups. +* fgetpos: Portable Positioning. +* fgetpos64: Portable Positioning. +* fgetpwent: Scanning All Users. +* fgetpwent_r: Scanning All Users. +* fgets: Line Input. +* fgets_unlocked: Line Input. +* fgetwc: Character Input. +* fgetwc_unlocked: Character Input. +* fgetws: Line Input. +* fgetws_unlocked: Line Input. +* fileno: Descriptors and Streams. +* fileno_unlocked: Descriptors and Streams. +* finite: Floating Point Classes. +* finitef: Floating Point Classes. +* finitel: Floating Point Classes. +* flockfile: Streams and Threads. +* floor: Rounding Functions. +* floorf: Rounding Functions. +* floorl: Rounding Functions. +* fma: Misc FP Arithmetic. +* fmaf: Misc FP Arithmetic. +* fmal: Misc FP Arithmetic. +* fmax: Misc FP Arithmetic. +* fmaxf: Misc FP Arithmetic. +* fmaxl: Misc FP Arithmetic. +* fmemopen: String Streams. +* fmin: Misc FP Arithmetic. +* fminf: Misc FP Arithmetic. +* fminl: Misc FP Arithmetic. +* fmod: Remainder Functions. +* fmodf: Remainder Functions. +* fmodl: Remainder Functions. +* fmtmsg: Printing Formatted Messages. +* fnmatch: Wildcard Matching. +* fopen: Opening Streams. +* fopen64: Opening Streams. +* fopencookie: Streams and Cookies. +* fork: Creating a Process. +* forkpty: Pseudo-Terminal Pairs. +* fpathconf: Pathconf. +* fpclassify: Floating Point Classes. +* fprintf: Formatted Output Functions. +* fputc: Simple Output. +* fputc_unlocked: Simple Output. +* fputs: Simple Output. +* fputs_unlocked: Simple Output. +* fputwc: Simple Output. +* fputwc_unlocked: Simple Output. +* fputws: Simple Output. +* fputws_unlocked: Simple Output. +* fread: Block Input/Output. +* fread_unlocked: Block Input/Output. +* free: Freeing after Malloc. +* freopen: Opening Streams. +* freopen64: Opening Streams. +* frexp: Normalization Functions. +* frexpf: Normalization Functions. +* frexpl: Normalization Functions. +* fscanf: Formatted Input Functions. +* fseek: File Positioning. +* fseeko: File Positioning. +* fseeko64: File Positioning. +* fsetpos: Portable Positioning. +* fsetpos64: Portable Positioning. +* fstat: Reading Attributes. +* fstat64: Reading Attributes. +* fsync: Synchronizing I/O. +* ftell: File Positioning. +* ftello: File Positioning. +* ftello64: File Positioning. +* ftruncate: File Size. +* ftruncate64: File Size. +* ftrylockfile: Streams and Threads. +* ftw: Working with Directory Trees. +* ftw64: Working with Directory Trees. +* funlockfile: Streams and Threads. +* fwide: Streams and I18N. +* fwprintf: Formatted Output Functions. +* fwrite: Block Input/Output. +* fwrite_unlocked: Block Input/Output. +* fwscanf: Formatted Input Functions. +* gamma: Special Functions. +* gammaf: Special Functions. +* gammal: Special Functions. +* gcvt: System V Number Conversion. +* get_avphys_pages: Query Memory Parameters. +* get_current_dir_name: Working Directory. +* get_nprocs: Processor Resources. +* get_nprocs_conf: Processor Resources. +* get_phys_pages: Query Memory Parameters. +* getc: Character Input. +* getc_unlocked: Character Input. +* getchar: Character Input. +* getchar_unlocked: Character Input. +* getcontext: System V contexts. +* getcwd: Working Directory. +* getdate: General Time String Parsing. +* getdate_r: General Time String Parsing. +* getdelim: Line Input. +* getdomainnname: Host Identification. +* getegid: Reading Persona. +* getenv: Environment Access. +* geteuid: Reading Persona. +* getfsent: fstab. +* getfsfile: fstab. +* getfsspec: fstab. +* getgid: Reading Persona. +* getgrent: Scanning All Groups. +* getgrent_r: Scanning All Groups. +* getgrgid: Lookup Group. +* getgrgid_r: Lookup Group. +* getgrnam: Lookup Group. +* getgrnam_r: Lookup Group. +* getgrouplist: Setting Groups. +* getgroups: Reading Persona. +* gethostbyaddr: Host Names. +* gethostbyaddr_r: Host Names. +* gethostbyname: Host Names. +* gethostbyname2: Host Names. +* gethostbyname2_r: Host Names. +* gethostbyname_r: Host Names. +* gethostent: Host Names. +* gethostid: Host Identification. +* gethostname: Host Identification. +* getitimer: Setting an Alarm. +* getline: Line Input. +* getloadavg: Processor Resources. +* getlogin: Who Logged In. +* getmntent: mtab. +* getmntent_r: mtab. +* getnetbyaddr: Networks Database. +* getnetbyname: Networks Database. +* getnetent: Networks Database. +* getnetgrent: Lookup Netgroup. +* getnetgrent_r: Lookup Netgroup. +* getopt: Using Getopt. +* getopt_long: Getopt Long Options. +* getopt_long_only: Getopt Long Options. +* getpagesize: Query Memory Parameters. +* getpass: getpass. +* getpeername: Who is Connected. +* getpgid: Process Group Functions. +* getpgrp: Process Group Functions. +* getpid: Process Identification. +* getppid: Process Identification. +* getpriority: Traditional Scheduling Functions. +* getprotobyname: Protocols Database. +* getprotobynumber: Protocols Database. +* getprotoent: Protocols Database. +* getpt: Allocation. +* getpwent: Scanning All Users. +* getpwent_r: Scanning All Users. +* getpwnam: Lookup User. +* getpwnam_r: Lookup User. +* getpwuid: Lookup User. +* getpwuid_r: Lookup User. +* getrlimit: Limits on Resources. +* getrlimit64: Limits on Resources. +* getrusage: Resource Usage. +* gets: Line Input. +* getservbyname: Services Database. +* getservbyport: Services Database. +* getservent: Services Database. +* getsid: Process Group Functions. +* getsockname: Reading Address. +* getsockopt: Socket Option Functions. +* getsubopt: Suboptions. +* gettext: Translation with gettext. +* gettimeofday: High-Resolution Calendar. +* getuid: Reading Persona. +* getumask: Setting Permissions. +* getutent: Manipulating the Database. +* getutent_r: Manipulating the Database. +* getutid: Manipulating the Database. +* getutid_r: Manipulating the Database. +* getutline: Manipulating the Database. +* getutline_r: Manipulating the Database. +* getutmp: XPG Functions. +* getutmpx: XPG Functions. +* getutxent: XPG Functions. +* getutxid: XPG Functions. +* getutxline: XPG Functions. +* getw: Character Input. +* getwc: Character Input. +* getwc_unlocked: Character Input. +* getwchar: Character Input. +* getwchar_unlocked: Character Input. +* getwd: Working Directory. +* glob: Calling Glob. +* glob64: Calling Glob. +* globfree: More Flags for Globbing. +* globfree64: More Flags for Globbing. +* gmtime: Broken-down Time. +* gmtime_r: Broken-down Time. +* grantpt: Allocation. +* gsignal: Signaling Yourself. +* gtty: BSD Terminal Modes. +* hasmntopt: mtab. +* hcreate: Hash Search Function. +* hcreate_r: Hash Search Function. +* hdestroy: Hash Search Function. +* hdestroy_r: Hash Search Function. +* hsearch: Hash Search Function. +* hsearch_r: Hash Search Function. +* htonl: Byte Order. +* htons: Byte Order. +* hypot: Exponents and Logarithms. +* hypotf: Exponents and Logarithms. +* hypotl: Exponents and Logarithms. +* iconv: Generic Conversion Interface. +* iconv_close: Generic Conversion Interface. +* iconv_open: Generic Conversion Interface. +* if_freenameindex: Interface Naming. +* if_indextoname: Interface Naming. +* if_nameindex: Interface Naming. +* if_nametoindex: Interface Naming. +* IFTODT: Directory Entries. +* ilogb: Exponents and Logarithms. +* ilogbf: Exponents and Logarithms. +* ilogbl: Exponents and Logarithms. +* imaxabs: Absolute Value. +* imaxdiv: Integer Division. +* index: Search Functions. +* inet_addr: Host Address Functions. +* inet_aton: Host Address Functions. +* inet_lnaof: Host Address Functions. +* inet_makeaddr: Host Address Functions. +* inet_netof: Host Address Functions. +* inet_network: Host Address Functions. +* inet_ntoa: Host Address Functions. +* inet_ntop: Host Address Functions. +* inet_pton: Host Address Functions. +* initgroups: Setting Groups. +* initstate: BSD Random. +* initstate_r: BSD Random. +* innetgr: Netgroup Membership. +* ioctl: IOCTLs. +* isalnum: Classification of Characters. +* isalpha: Classification of Characters. +* isascii: Classification of Characters. +* isatty: Is It a Terminal. +* isblank: Classification of Characters. +* iscntrl: Classification of Characters. +* isdigit: Classification of Characters. +* isfinite: Floating Point Classes. +* isgraph: Classification of Characters. +* isgreater: FP Comparison Functions. +* isgreaterequal: FP Comparison Functions. +* isinf: Floating Point Classes. +* isinff: Floating Point Classes. +* isinfl: Floating Point Classes. +* isless: FP Comparison Functions. +* islessequal: FP Comparison Functions. +* islessgreater: FP Comparison Functions. +* islower: Classification of Characters. +* isnan: Floating Point Classes. +* isnanf: Floating Point Classes. +* isnanl: Floating Point Classes. +* isnormal: Floating Point Classes. +* isprint: Classification of Characters. +* ispunct: Classification of Characters. +* isspace: Classification of Characters. +* isunordered: FP Comparison Functions. +* isupper: Classification of Characters. +* iswalnum: Classification of Wide Characters. +* iswalpha: Classification of Wide Characters. +* iswblank: Classification of Wide Characters. +* iswcntrl: Classification of Wide Characters. +* iswctype: Classification of Wide Characters. +* iswdigit: Classification of Wide Characters. +* iswgraph: Classification of Wide Characters. +* iswlower: Classification of Wide Characters. +* iswprint: Classification of Wide Characters. +* iswpunct: Classification of Wide Characters. +* iswspace: Classification of Wide Characters. +* iswupper: Classification of Wide Characters. +* iswxdigit: Classification of Wide Characters. +* isxdigit: Classification of Characters. +* j0: Special Functions. +* j0f: Special Functions. +* j0l: Special Functions. +* j1: Special Functions. +* j1f: Special Functions. +* j1l: Special Functions. +* jn: Special Functions. +* jnf: Special Functions. +* jnl: Special Functions. +* jrand48: SVID Random. +* jrand48_r: SVID Random. +* kill: Signaling Another Process. +* killpg: Signaling Another Process. +* l64a: Encode Binary Data. +* labs: Absolute Value. +* lcong48: SVID Random. +* lcong48_r: SVID Random. +* ldexp: Normalization Functions. +* ldexpf: Normalization Functions. +* ldexpl: Normalization Functions. +* ldiv: Integer Division. +* lfind: Array Search Function. +* lgamma: Special Functions. +* lgamma_r: Special Functions. +* lgammaf: Special Functions. +* lgammaf_r: Special Functions. +* lgammal: Special Functions. +* lgammal_r: Special Functions. +* link: Hard Links. +* lio_listio: Asynchronous Reads/Writes. +* lio_listio64: Asynchronous Reads/Writes. +* listen: Listening. +* llabs: Absolute Value. +* lldiv: Integer Division. +* llrint: Rounding Functions. +* llrintf: Rounding Functions. +* llrintl: Rounding Functions. +* llround: Rounding Functions. +* llroundf: Rounding Functions. +* llroundl: Rounding Functions. +* localeconv: The Lame Way to Locale Data. +* localtime: Broken-down Time. +* localtime_r: Broken-down Time. +* log: Exponents and Logarithms. +* log10: Exponents and Logarithms. +* log10f: Exponents and Logarithms. +* log10l: Exponents and Logarithms. +* log1p: Exponents and Logarithms. +* log1pf: Exponents and Logarithms. +* log1pl: Exponents and Logarithms. +* log2: Exponents and Logarithms. +* log2f: Exponents and Logarithms. +* log2l: Exponents and Logarithms. +* logb: Exponents and Logarithms. +* logbf: Exponents and Logarithms. +* logbl: Exponents and Logarithms. +* logf: Exponents and Logarithms. +* login: Logging In and Out. +* login_tty: Logging In and Out. +* logl: Exponents and Logarithms. +* logout: Logging In and Out. +* logwtmp: Logging In and Out. +* longjmp: Non-Local Details. +* lrand48: SVID Random. +* lrand48_r: SVID Random. +* lrint: Rounding Functions. +* lrintf: Rounding Functions. +* lrintl: Rounding Functions. +* lround: Rounding Functions. +* lroundf: Rounding Functions. +* lroundl: Rounding Functions. +* lsearch: Array Search Function. +* lseek: File Position Primitive. +* lseek64: File Position Primitive. +* lstat: Reading Attributes. +* lstat64: Reading Attributes. +* madvise: Memory-mapped I/O. +* main: Program Arguments. +* makecontext: System V contexts. +* mallinfo: Statistics of Malloc. +* malloc: Basic Allocation. +* mallopt: Malloc Tunable Parameters. +* matherr: FP Exceptions. +* mblen: Non-reentrant Character Conversion. +* mbrlen: Converting a Character. +* mbrtowc: Converting a Character. +* mbsinit: Keeping the state. +* mbsnrtowcs: Converting Strings. +* mbsrtowcs: Converting Strings. +* mbstowcs: Non-reentrant String Conversion. +* mbtowc: Non-reentrant Character Conversion. +* mcheck: Heap Consistency Checking. +* memalign: Aligned Memory Blocks. +* memccpy: Copying and Concatenation. +* memchr: Search Functions. +* memcmp: String/Array Comparison. +* memcpy: Copying and Concatenation. +* memfrob: Trivial Encryption. +* memmem: Search Functions. +* memmove: Copying and Concatenation. +* mempcpy: Copying and Concatenation. +* memrchr: Search Functions. +* memset: Copying and Concatenation. +* mkdir: Creating Directories. +* mkdtemp: Temporary Files. +* mkfifo: FIFO Special Files. +* mknod: Making Special Files. +* mkstemp: Temporary Files. +* mktemp: Temporary Files. +* mktime: Broken-down Time. +* mlock: Page Lock Functions. +* mlockall: Page Lock Functions. +* mmap: Memory-mapped I/O. +* mmap64: Memory-mapped I/O. +* modf: Rounding Functions. +* modff: Rounding Functions. +* modfl: Rounding Functions. +* mount: Mount-Unmount-Remount. +* mprobe: Heap Consistency Checking. +* mrand48: SVID Random. +* mrand48_r: SVID Random. +* mremap: Memory-mapped I/O. +* msync: Memory-mapped I/O. +* mtrace: Tracing malloc. +* munlock: Page Lock Functions. +* munlockall: Page Lock Functions. +* munmap: Memory-mapped I/O. +* muntrace: Tracing malloc. +* nan: FP Bit Twiddling. +* nanf: FP Bit Twiddling. +* nanl: FP Bit Twiddling. +* nanosleep: Sleeping. +* nearbyint: Rounding Functions. +* nearbyintf: Rounding Functions. +* nearbyintl: Rounding Functions. +* nextafter: FP Bit Twiddling. +* nextafterf: FP Bit Twiddling. +* nextafterl: FP Bit Twiddling. +* nexttoward: FP Bit Twiddling. +* nexttowardf: FP Bit Twiddling. +* nexttowardl: FP Bit Twiddling. +* nftw: Working with Directory Trees. +* nftw64: Working with Directory Trees. +* ngettext: Advanced gettext functions. +* nice: Traditional Scheduling Functions. +* nl_langinfo: The Elegant and Fast Way. +* notfound: Actions in the NSS configuration. +* nrand48: SVID Random. +* nrand48_r: SVID Random. +* ntohl: Byte Order. +* ntohs: Byte Order. +* ntp_adjtime: High Accuracy Clock. +* ntp_gettime: High Accuracy Clock. +* obstack_1grow: Growing Objects. +* obstack_1grow_fast: Extra Fast Growing. +* obstack_alignment_mask: Obstacks Data Alignment. +* obstack_alloc: Allocation in an Obstack. +* obstack_base: Status of an Obstack. +* obstack_blank: Growing Objects. +* obstack_blank_fast: Extra Fast Growing. +* obstack_chunk_alloc: Preparing for Obstacks. +* obstack_chunk_free: Preparing for Obstacks. +* obstack_chunk_size: Obstack Chunks. +* obstack_copy: Allocation in an Obstack. +* obstack_copy0: Allocation in an Obstack. +* obstack_finish: Growing Objects. +* obstack_free: Freeing Obstack Objects. +* obstack_grow: Growing Objects. +* obstack_grow0: Growing Objects. +* obstack_init: Preparing for Obstacks. +* obstack_int_grow: Growing Objects. +* obstack_int_grow_fast: Extra Fast Growing. +* obstack_next_free: Status of an Obstack. +* obstack_object_size <1>: Status of an Obstack. +* obstack_object_size: Growing Objects. +* obstack_printf: Dynamic Output. +* obstack_ptr_grow: Growing Objects. +* obstack_ptr_grow_fast: Extra Fast Growing. +* obstack_room: Extra Fast Growing. +* obstack_vprintf: Variable Arguments Output. +* offsetof: Structure Measurement. +* on_exit: Cleanups on Exit. +* open: Opening and Closing Files. +* open64: Opening and Closing Files. +* open_memstream: String Streams. +* open_obstack_stream: Obstack Streams. +* opendir: Opening a Directory. +* openlog: openlog. +* openpty: Pseudo-Terminal Pairs. +* parse_printf_format: Parsing a Template String. +* pathconf: Pathconf. +* pause: Using Pause. +* pclose: Pipe to a Subprocess. +* perror: Error Messages. +* pipe: Creating a Pipe. +* popen: Pipe to a Subprocess. +* posix_memalign: Aligned Memory Blocks. +* pow: Exponents and Logarithms. +* pow10: Exponents and Logarithms. +* pow10f: Exponents and Logarithms. +* pow10l: Exponents and Logarithms. +* powf: Exponents and Logarithms. +* powl: Exponents and Logarithms. +* pread: I/O Primitives. +* pread64: I/O Primitives. +* printf: Formatted Output Functions. +* printf_size: Predefined Printf Handlers. +* printf_size_info: Predefined Printf Handlers. +* psignal: Signal Messages. +* pthread_atfork: Threads and Fork. +* pthread_attr_destroy: Thread Attributes. +* pthread_attr_getattr: Thread Attributes. +* pthread_attr_getdetachstate: Thread Attributes. +* pthread_attr_getguardsize: Thread Attributes. +* pthread_attr_getinheritsched: Thread Attributes. +* pthread_attr_getschedparam: Thread Attributes. +* pthread_attr_getschedpolicy: Thread Attributes. +* pthread_attr_getscope: Thread Attributes. +* pthread_attr_getstack: Thread Attributes. +* pthread_attr_getstackaddr: Thread Attributes. +* pthread_attr_getstacksize: Thread Attributes. +* pthread_attr_init: Thread Attributes. +* pthread_attr_setattr: Thread Attributes. +* pthread_attr_setdetachstate: Thread Attributes. +* pthread_attr_setguardsize: Thread Attributes. +* pthread_attr_setinheritsched: Thread Attributes. +* pthread_attr_setschedparam: Thread Attributes. +* pthread_attr_setschedpolicy: Thread Attributes. +* pthread_attr_setscope: Thread Attributes. +* pthread_attr_setstack: Thread Attributes. +* pthread_attr_setstackaddr: Thread Attributes. +* pthread_attr_setstacksize: Thread Attributes. +* pthread_cancel: Basic Thread Operations. +* pthread_cleanup_pop: Cleanup Handlers. +* pthread_cleanup_pop_restore_np: Cleanup Handlers. +* pthread_cleanup_push: Cleanup Handlers. +* pthread_cleanup_push_defer_np: Cleanup Handlers. +* pthread_cond_broadcast: Condition Variables. +* pthread_cond_destroy: Condition Variables. +* pthread_cond_init: Condition Variables. +* pthread_cond_signal: Condition Variables. +* pthread_cond_timedwait: Condition Variables. +* pthread_cond_wait: Condition Variables. +* pthread_condattr_destroy: Condition Variables. +* pthread_condattr_init: Condition Variables. +* pthread_create: Basic Thread Operations. +* pthread_detach: Miscellaneous Thread Functions. +* pthread_equal: Miscellaneous Thread Functions. +* pthread_exit: Basic Thread Operations. +* pthread_getconcurrency: Miscellaneous Thread Functions. +* pthread_getschedparam: Miscellaneous Thread Functions. +* pthread_getspecific: Thread-Specific Data. +* pthread_join: Basic Thread Operations. +* pthread_key_create: Thread-Specific Data. +* pthread_key_delete: Thread-Specific Data. +* pthread_kill: Threads and Signal Handling. +* pthread_kill_other_threads_np: Miscellaneous Thread Functions. +* pthread_mutex_destroy: Mutexes. +* pthread_mutex_init: Mutexes. +* pthread_mutex_lock: Mutexes. +* pthread_mutex_timedlock: Mutexes. +* pthread_mutex_trylock: Mutexes. +* pthread_mutex_unlock: Mutexes. +* pthread_mutexattr_destroy: Mutexes. +* pthread_mutexattr_gettype: Mutexes. +* pthread_mutexattr_init: Mutexes. +* pthread_mutexattr_settype: Mutexes. +* pthread_once: Miscellaneous Thread Functions. +* pthread_self: Miscellaneous Thread Functions. +* pthread_setcancelstate: Cancellation. +* pthread_setcanceltype: Cancellation. +* pthread_setconcurrency: Miscellaneous Thread Functions. +* pthread_setschedparam: Miscellaneous Thread Functions. +* pthread_setspecific: Thread-Specific Data. +* pthread_sigmask: Threads and Signal Handling. +* pthread_testcancel: Cancellation. +* ptsname: Allocation. +* ptsname_r: Allocation. +* putc: Simple Output. +* putc_unlocked: Simple Output. +* putchar: Simple Output. +* putchar_unlocked: Simple Output. +* putenv: Environment Access. +* putpwent: Writing a User Entry. +* puts: Simple Output. +* pututline: Manipulating the Database. +* pututxline: XPG Functions. +* putw: Simple Output. +* putwc: Simple Output. +* putwc_unlocked: Simple Output. +* putwchar: Simple Output. +* putwchar_unlocked: Simple Output. +* pwrite: I/O Primitives. +* pwrite64: I/O Primitives. +* qecvt: System V Number Conversion. +* qecvt_r: System V Number Conversion. +* qfcvt: System V Number Conversion. +* qfcvt_r: System V Number Conversion. +* qgcvt: System V Number Conversion. +* qsort: Array Sort Function. +* raise: Signaling Yourself. +* rand: ISO Random. +* rand_r: ISO Random. +* random: BSD Random. +* random_r: BSD Random. +* rawmemchr: Search Functions. +* read: I/O Primitives. +* readdir: Reading/Closing Directory. +* readdir64: Reading/Closing Directory. +* readdir64_r: Reading/Closing Directory. +* readdir_r: Reading/Closing Directory. +* readlink: Symbolic Links. +* readv: Scatter-Gather. +* realloc: Changing Block Size. +* realpath: Symbolic Links. +* recv: Receiving Data. +* recvfrom: Receiving Datagrams. +* regcomp: POSIX Regexp Compilation. +* regerror: Regexp Cleanup. +* regexec: Matching POSIX Regexps. +* regfree: Regexp Cleanup. +* register_printf_function: Registering New Conversions. +* remainder: Remainder Functions. +* remainderf: Remainder Functions. +* remainderl: Remainder Functions. +* remove: Deleting Files. +* rename: Renaming Files. +* rewind: File Positioning. +* rewinddir: Random Access Directory. +* rindex: Search Functions. +* rint: Rounding Functions. +* rintf: Rounding Functions. +* rintl: Rounding Functions. +* rmdir: Deleting Files. +* round: Rounding Functions. +* roundf: Rounding Functions. +* roundl: Rounding Functions. +* rpmatch: Yes-or-No Questions. +* S_ISBLK: Testing File Type. +* S_ISCHR: Testing File Type. +* S_ISDIR: Testing File Type. +* S_ISFIFO: Testing File Type. +* S_ISLNK: Testing File Type. +* S_ISREG: Testing File Type. +* S_ISSOCK: Testing File Type. +* S_TYPEISMQ: Testing File Type. +* S_TYPEISSEM: Testing File Type. +* S_TYPEISSHM: Testing File Type. +* sbrk: Resizing the Data Segment. +* scalb: Normalization Functions. +* scalbf: Normalization Functions. +* scalbl: Normalization Functions. +* scalbln: Normalization Functions. +* scalblnf: Normalization Functions. +* scalblnl: Normalization Functions. +* scalbn: Normalization Functions. +* scalbnf: Normalization Functions. +* scalbnl: Normalization Functions. +* scandir: Scanning Directory Content. +* scandir64: Scanning Directory Content. +* scanf: Formatted Input Functions. +* sched_get_priority_max: Basic Scheduling Functions. +* sched_get_priority_min: Basic Scheduling Functions. +* sched_getparam: Basic Scheduling Functions. +* sched_getscheduler: Basic Scheduling Functions. +* sched_rr_get_interval: Basic Scheduling Functions. +* sched_setparam: Basic Scheduling Functions. +* sched_setscheduler: Basic Scheduling Functions. +* sched_yield: Basic Scheduling Functions. +* seed48: SVID Random. +* seed48_r: SVID Random. +* seekdir: Random Access Directory. +* select: Waiting for I/O. +* sem_destroy: POSIX Semaphores. +* sem_getvalue: POSIX Semaphores. +* sem_init: POSIX Semaphores. +* sem_post: POSIX Semaphores. +* sem_trywait: POSIX Semaphores. +* sem_wait: POSIX Semaphores. +* send: Sending Data. +* sendto: Sending Datagrams. +* setbuf: Controlling Buffering. +* setbuffer: Controlling Buffering. +* setcontext: System V contexts. +* setdomainname: Host Identification. +* setegid: Setting Groups. +* setenv: Environment Access. +* seteuid: Setting User ID. +* setfsent: fstab. +* setgid: Setting Groups. +* setgrent: Scanning All Groups. +* setgroups: Setting Groups. +* sethostent: Host Names. +* sethostid: Host Identification. +* sethostname: Host Identification. +* setitimer: Setting an Alarm. +* setjmp: Non-Local Details. +* setkey: DES Encryption. +* setkey_r: DES Encryption. +* setlinebuf: Controlling Buffering. +* setlocale: Setting the Locale. +* setlogmask: setlogmask. +* setmntent: mtab. +* setnetent: Networks Database. +* setnetgrent: Lookup Netgroup. +* setpgid: Process Group Functions. +* setpgrp: Process Group Functions. +* setpriority: Traditional Scheduling Functions. +* setprotoent: Protocols Database. +* setpwent: Scanning All Users. +* setregid: Setting Groups. +* setreuid: Setting User ID. +* setrlimit: Limits on Resources. +* setrlimit64: Limits on Resources. +* setservent: Services Database. +* setsid: Process Group Functions. +* setsockopt: Socket Option Functions. +* setstate: BSD Random. +* setstate_r: BSD Random. +* settimeofday: High-Resolution Calendar. +* setuid: Setting User ID. +* setutent: Manipulating the Database. +* setutxent: XPG Functions. +* setvbuf: Controlling Buffering. +* shutdown: Closing a Socket. +* sigaction: Advanced Signal Handling. +* sigaddset: Signal Sets. +* sigaltstack: Signal Stack. +* sigblock: Blocking in BSD. +* sigdelset: Signal Sets. +* sigemptyset: Signal Sets. +* sigfillset: Signal Sets. +* siginterrupt: BSD Handler. +* sigismember: Signal Sets. +* siglongjmp: Non-Local Exits and Signals. +* sigmask: Blocking in BSD. +* signal: Basic Signal Handling. +* signbit: FP Bit Twiddling. +* significand: Normalization Functions. +* significandf: Normalization Functions. +* significandl: Normalization Functions. +* sigpause: Blocking in BSD. +* sigpending: Checking for Pending Signals. +* sigprocmask: Process Signal Mask. +* sigsetjmp: Non-Local Exits and Signals. +* sigsetmask: Blocking in BSD. +* sigstack: Signal Stack. +* sigsuspend: Sigsuspend. +* sigvec: BSD Handler. +* sigwait: Threads and Signal Handling. +* sin: Trig Functions. +* sincos: Trig Functions. +* sincosf: Trig Functions. +* sincosl: Trig Functions. +* sinf: Trig Functions. +* sinh: Hyperbolic Functions. +* sinhf: Hyperbolic Functions. +* sinhl: Hyperbolic Functions. +* sinl: Trig Functions. +* sleep: Sleeping. +* snprintf: Formatted Output Functions. +* socket: Creating a Socket. +* socketpair: Socket Pairs. +* sprintf: Formatted Output Functions. +* sqrt: Exponents and Logarithms. +* sqrtf: Exponents and Logarithms. +* sqrtl: Exponents and Logarithms. +* srand: ISO Random. +* srand48: SVID Random. +* srand48_r: SVID Random. +* srandom: BSD Random. +* srandom_r: BSD Random. +* sscanf: Formatted Input Functions. +* ssignal: Basic Signal Handling. +* stat: Reading Attributes. +* stat64: Reading Attributes. +* stime: Simple Calendar Time. +* stpcpy: Copying and Concatenation. +* stpncpy: Copying and Concatenation. +* strcasecmp: String/Array Comparison. +* strcasestr: Search Functions. +* strcat: Copying and Concatenation. +* strchr: Search Functions. +* strchrnul: Search Functions. +* strcmp: String/Array Comparison. +* strcoll: Collation Functions. +* strcpy: Copying and Concatenation. +* strcspn: Search Functions. +* strdup: Copying and Concatenation. +* strdupa: Copying and Concatenation. +* strerror: Error Messages. +* strerror_r: Error Messages. +* strfmon: Formatting Numbers. +* strfry: strfry. +* strftime: Formatting Calendar Time. +* strlen: String Length. +* strncasecmp: String/Array Comparison. +* strncat: Copying and Concatenation. +* strncmp: String/Array Comparison. +* strncpy: Copying and Concatenation. +* strndup: Copying and Concatenation. +* strndupa: Copying and Concatenation. +* strnlen: String Length. +* strpbrk: Search Functions. +* strptime: Low-Level Time String Parsing. +* strrchr: Search Functions. +* strsep: Finding Tokens in a String. +* strsignal: Signal Messages. +* strspn: Search Functions. +* strstr: Search Functions. +* strtod: Parsing of Floats. +* strtof: Parsing of Floats. +* strtoimax: Parsing of Integers. +* strtok: Finding Tokens in a String. +* strtok_r: Finding Tokens in a String. +* strtol: Parsing of Integers. +* strtold: Parsing of Floats. +* strtoll: Parsing of Integers. +* strtoq: Parsing of Integers. +* strtoul: Parsing of Integers. +* strtoull: Parsing of Integers. +* strtoumax: Parsing of Integers. +* strtouq: Parsing of Integers. +* strverscmp: String/Array Comparison. +* strxfrm: Collation Functions. +* stty: BSD Terminal Modes. +* success: Actions in the NSS configuration. +* SUN_LEN: Local Namespace Details. +* swapcontext: System V contexts. +* swprintf: Formatted Output Functions. +* swscanf: Formatted Input Functions. +* symlink: Symbolic Links. +* sync: Synchronizing I/O. +* syscall: System Calls. +* sysconf: Sysconf Definition. +* sysctl: System Parameters. +* syslog: syslog; vsyslog. +* system: Running a Command. +* sysv_signal: Basic Signal Handling. +* tan: Trig Functions. +* tanf: Trig Functions. +* tanh: Hyperbolic Functions. +* tanhf: Hyperbolic Functions. +* tanhl: Hyperbolic Functions. +* tanl: Trig Functions. +* tcdrain: Line Control. +* tcflow: Line Control. +* tcflush: Line Control. +* tcgetattr: Mode Functions. +* tcgetpgrp: Terminal Access Functions. +* tcgetsid: Terminal Access Functions. +* tcsendbreak: Line Control. +* tcsetattr: Mode Functions. +* tcsetpgrp: Terminal Access Functions. +* tdelete: Tree Search Function. +* tdestroy: Tree Search Function. +* telldir: Random Access Directory. +* TEMP_FAILURE_RETRY: Interrupted Primitives. +* tempnam: Temporary Files. +* textdomain: Locating gettext catalog. +* tfind: Tree Search Function. +* tgamma: Special Functions. +* tgammaf: Special Functions. +* tgammal: Special Functions. +* time: Simple Calendar Time. +* timegm: Broken-down Time. +* timelocal: Broken-down Time. +* times: Processor Time. +* tmpfile: Temporary Files. +* tmpfile64: Temporary Files. +* tmpnam: Temporary Files. +* tmpnam_r: Temporary Files. +* toascii: Case Conversion. +* tolower: Case Conversion. +* toupper: Case Conversion. +* towctrans: Wide Character Case Conversion. +* towlower: Wide Character Case Conversion. +* towupper: Wide Character Case Conversion. +* trunc: Rounding Functions. +* truncate: File Size. +* truncate64: File Size. +* truncf: Rounding Functions. +* truncl: Rounding Functions. +* tryagain: Actions in the NSS configuration. +* tsearch: Tree Search Function. +* ttyname: Is It a Terminal. +* ttyname_r: Is It a Terminal. +* twalk: Tree Search Function. +* tzset: Time Zone Functions. +* ulimit: Limits on Resources. +* umask: Setting Permissions. +* umount: Mount-Unmount-Remount. +* umount2: Mount-Unmount-Remount. +* uname: Platform Type. +* unavail: Actions in the NSS configuration. +* ungetc: How Unread. +* ungetwc: How Unread. +* unlink: Deleting Files. +* unlockpt: Allocation. +* unsetenv: Environment Access. +* updwtmp: Manipulating the Database. +* utime: File Times. +* utimes: File Times. +* utmpname: Manipulating the Database. +* utmpxname: XPG Functions. +* va_alist: Old Varargs. +* va_arg: Argument Macros. +* va_dcl: Old Varargs. +* va_end: Argument Macros. +* va_start <1>: Old Varargs. +* va_start: Argument Macros. +* valloc: Aligned Memory Blocks. +* vasprintf: Variable Arguments Output. +* verr: Error Messages. +* verrx: Error Messages. +* versionsort: Scanning Directory Content. +* versionsort64: Scanning Directory Content. +* vfork: Creating a Process. +* vfprintf: Variable Arguments Output. +* vfscanf: Variable Arguments Input. +* vfwprintf: Variable Arguments Output. +* vfwscanf: Variable Arguments Input. +* vlimit: Limits on Resources. +* vprintf: Variable Arguments Output. +* vscanf: Variable Arguments Input. +* vsnprintf: Variable Arguments Output. +* vsprintf: Variable Arguments Output. +* vsscanf: Variable Arguments Input. +* vswprintf: Variable Arguments Output. +* vswscanf: Variable Arguments Input. +* vsyslog: syslog; vsyslog. +* vtimes: Resource Usage. +* vwarn: Error Messages. +* vwarnx: Error Messages. +* vwprintf: Variable Arguments Output. +* vwscanf: Variable Arguments Input. +* wait: Process Completion. +* wait3: BSD Wait Functions. +* wait4: Process Completion. +* waitpid: Process Completion. +* warn: Error Messages. +* warnx: Error Messages. +* WCOREDUMP: Process Completion Status. +* wcpcpy: Copying and Concatenation. +* wcpncpy: Copying and Concatenation. +* wcrtomb: Converting a Character. +* wcscasecmp: String/Array Comparison. +* wcscat: Copying and Concatenation. +* wcschr: Search Functions. +* wcschrnul: Search Functions. +* wcscmp: String/Array Comparison. +* wcscoll: Collation Functions. +* wcscpy: Copying and Concatenation. +* wcscspn: Search Functions. +* wcsdup: Copying and Concatenation. +* wcsftime: Formatting Calendar Time. +* wcslen: String Length. +* wcsncasecmp: String/Array Comparison. +* wcsncat: Copying and Concatenation. +* wcsncmp: String/Array Comparison. +* wcsncpy: Copying and Concatenation. +* wcsnlen: String Length. +* wcsnrtombs: Converting Strings. +* wcspbrk: Search Functions. +* wcsrchr: Search Functions. +* wcsrtombs: Converting Strings. +* wcsspn: Search Functions. +* wcsstr: Search Functions. +* wcstod: Parsing of Floats. +* wcstof: Parsing of Floats. +* wcstoimax: Parsing of Integers. +* wcstok: Finding Tokens in a String. +* wcstol: Parsing of Integers. +* wcstold: Parsing of Floats. +* wcstoll: Parsing of Integers. +* wcstombs: Non-reentrant String Conversion. +* wcstoq: Parsing of Integers. +* wcstoul: Parsing of Integers. +* wcstoull: Parsing of Integers. +* wcstoumax: Parsing of Integers. +* wcstouq: Parsing of Integers. +* wcswcs: Search Functions. +* wcsxfrm: Collation Functions. +* wctob: Converting a Character. +* wctomb: Non-reentrant Character Conversion. +* wctrans: Wide Character Case Conversion. +* wctype: Classification of Wide Characters. +* WEXITSTATUS: Process Completion Status. +* WIFEXITED: Process Completion Status. +* WIFSIGNALED: Process Completion Status. +* WIFSTOPPED: Process Completion Status. +* wmemchr: Search Functions. +* wmemcmp: String/Array Comparison. +* wmemcpy: Copying and Concatenation. +* wmemmove: Copying and Concatenation. +* wmempcpy: Copying and Concatenation. +* wmemset: Copying and Concatenation. +* wordexp: Calling Wordexp. +* wordfree: Calling Wordexp. +* wprintf: Formatted Output Functions. +* write: I/O Primitives. +* writev: Scatter-Gather. +* wscanf: Formatted Input Functions. +* WSTOPSIG: Process Completion Status. +* WTERMSIG: Process Completion Status. +* y0: Special Functions. +* y0f: Special Functions. +* y0l: Special Functions. +* y1: Special Functions. +* y1f: Special Functions. +* y1l: Special Functions. +* yn: Special Functions. +* ynf: Special Functions. +* ynl: Special Functions. diff -durpN glibc-2.2.4/manual/libc.info-6 glibc-2.2.5/manual/libc.info-6 --- glibc-2.2.4/manual/libc.info-6 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-6 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,6 +33,404 @@ software. Copies published by the Free funds for GNU development.  +File: libc.info, Node: Classification of Wide Characters, Next: Using Wide Char Classes, Prev: Case Conversion, Up: Character Handling + +Character class determination for wide characters +================================================= + + Amendment 1 to ISO C90 defines functions to classify wide +characters. Although the original ISO C90 standard already defined the +type `wchar_t', no functions operating on them were defined. + + The general design of the classification functions for wide +characters is more general. It allows extensions to the set of +available classifications, beyond those which are always available. +The POSIX standard specifies how extensions can be made, and this is +already implemented in the GNU C library implementation of the +`localedef' program. + + The character class functions are normally implemented with bitsets, +with a bitset per character. For a given character, the appropriate +bitset is read from a table and a test is performed as to whether a +certain bit is set. Which bit is tested for is determined by the class. + + For the wide character classification functions this is made visible. +There is a type classification type defined, a function to retrieve this +value for a given class, and a function to test whether a given +character is in this class, using the classification value. On top of +this the normal character classification functions as used for `char' +objects can be defined. + + - Data type: wctype_t + The `wctype_t' can hold a value which represents a character class. + The only defined way to generate such a value is by using the + `wctype' function. + + This type is defined in `wctype.h'. + + - Function: wctype_t wctype (const char *PROPERTY) + The `wctype' returns a value representing a class of wide + characters which is identified by the string PROPERTY. Beside + some standard properties each locale can define its own ones. In + case no property with the given name is known for the current + locale selected for the `LC_CTYPE' category, the function returns + zero. + + The properties known in every locale are: + + `"alnum"' `"alpha"' `"cntrl"' `"digit"' + `"graph"' `"lower"' `"print"' `"punct"' + `"space"' `"upper"' `"xdigit"' + + This function is declared in `wctype.h'. + + To test the membership of a character to one of the non-standard +classes the ISO C standard defines a completely new function. + + - Function: int iswctype (wint_t WC, wctype_t DESC) + This function returns a nonzero value if WC is in the character + class specified by DESC. DESC must previously be returned by a + successful call to `wctype'. + + This function is declared in `wctype.h'. + + To make it easier to use the commonly-used classification functions, +they are defined in the C library. There is no need to use `wctype' if +the property string is one of the known character classes. In some +situations it is desirable to construct the property strings, and then +it is important that `wctype' can also handle the standard classes. + + - Function: int iswalnum (wint_t WC) + This function returns a nonzero value if WC is an alphanumeric + character (a letter or number); in other words, if either + `iswalpha' or `iswdigit' is true of a character, then `iswalnum' + is also true. + + This function can be implemented using + + iswctype (wc, wctype ("alnum")) + + It is declared in `wctype.h'. + + - Function: int iswalpha (wint_t WC) + Returns true if WC is an alphabetic character (a letter). If + `iswlower' or `iswupper' is true of a character, then `iswalpha' + is also true. + + In some locales, there may be additional characters for which + `iswalpha' is true--letters which are neither upper case nor lower + case. But in the standard `"C"' locale, there are no such + additional characters. + + This function can be implemented using + + iswctype (wc, wctype ("alpha")) + + It is declared in `wctype.h'. + + - Function: int iswcntrl (wint_t WC) + Returns true if WC is a control character (that is, a character + that is not a printing character). + + This function can be implemented using + + iswctype (wc, wctype ("cntrl")) + + It is declared in `wctype.h'. + + - Function: int iswdigit (wint_t WC) + Returns true if WC is a digit (e.g., `0' through `9'). Please + note that this function does not only return a nonzero value for + _decimal_ digits, but for all kinds of digits. A consequence is + that code like the following will *not* work unconditionally for + wide characters: + + n = 0; + while (iswdigit (*wc)) + { + n *= 10; + n += *wc++ - L'0'; + } + + This function can be implemented using + + iswctype (wc, wctype ("digit")) + + It is declared in `wctype.h'. + + - Function: int iswgraph (wint_t WC) + Returns true if WC is a graphic character; that is, a character + that has a glyph associated with it. The whitespace characters + are not considered graphic. + + This function can be implemented using + + iswctype (wc, wctype ("graph")) + + It is declared in `wctype.h'. + + - Function: int iswlower (wint_t WC) + Returns true if WC is a lower-case letter. The letter need not be + from the Latin alphabet, any alphabet representable is valid. + + This function can be implemented using + + iswctype (wc, wctype ("lower")) + + It is declared in `wctype.h'. + + - Function: int iswprint (wint_t WC) + Returns true if WC is a printing character. Printing characters + include all the graphic characters, plus the space (` ') character. + + This function can be implemented using + + iswctype (wc, wctype ("print")) + + It is declared in `wctype.h'. + + - Function: int iswpunct (wint_t WC) + Returns true if WC is a punctuation character. This means any + printing character that is not alphanumeric or a space character. + + This function can be implemented using + + iswctype (wc, wctype ("punct")) + + It is declared in `wctype.h'. + + - Function: int iswspace (wint_t WC) + Returns true if WC is a "whitespace" character. In the standard + `"C"' locale, `iswspace' returns true for only the standard + whitespace characters: + + `L' '' + space + + `L'\f'' + formfeed + + `L'\n'' + newline + + `L'\r'' + carriage return + + `L'\t'' + horizontal tab + + `L'\v'' + vertical tab + + This function can be implemented using + + iswctype (wc, wctype ("space")) + + It is declared in `wctype.h'. + + - Function: int iswupper (wint_t WC) + Returns true if WC is an upper-case letter. The letter need not be + from the Latin alphabet, any alphabet representable is valid. + + This function can be implemented using + + iswctype (wc, wctype ("upper")) + + It is declared in `wctype.h'. + + - Function: int iswxdigit (wint_t WC) + Returns true if WC is a hexadecimal digit. Hexadecimal digits + include the normal decimal digits `0' through `9' and the letters + `A' through `F' and `a' through `f'. + + This function can be implemented using + + iswctype (wc, wctype ("xdigit")) + + It is declared in `wctype.h'. + + The GNU C library also provides a function which is not defined in +the ISO C standard but which is available as a version for single byte +characters as well. + + - Function: int iswblank (wint_t WC) + Returns true if WC is a blank character; that is, a space or a tab. + This function is a GNU extension. It is declared in `wchar.h'. + + +File: libc.info, Node: Using Wide Char Classes, Next: Wide Character Case Conversion, Prev: Classification of Wide Characters, Up: Character Handling + +Notes on using the wide character classes +========================================= + + The first note is probably not astonishing but still occasionally a +cause of problems. The `iswXXX' functions can be implemented using +macros and in fact, the GNU C library does this. They are still +available as real functions but when the `wctype.h' header is included +the macros will be used. This is the same as the `char' type versions +of these functions. + + The second note covers something new. It can be best illustrated by +a (real-world) example. The first piece of code is an excerpt from the +original code. It is truncated a bit but the intention should be clear. + + int + is_in_class (int c, const char *class) + { + if (strcmp (class, "alnum") == 0) + return isalnum (c); + if (strcmp (class, "alpha") == 0) + return isalpha (c); + if (strcmp (class, "cntrl") == 0) + return iscntrl (c); + ... + return 0; + } + + Now, with the `wctype' and `iswctype' you can avoid the `if' +cascades, but rewriting the code as follows is wrong: + + int + is_in_class (int c, const char *class) + { + wctype_t desc = wctype (class); + return desc ? iswctype ((wint_t) c, desc) : 0; + } + + The problem is that it is not guaranteed that the wide character +representation of a single-byte character can be found using casting. +In fact, usually this fails miserably. The correct solution to this +problem is to write the code as follows: + + int + is_in_class (int c, const char *class) + { + wctype_t desc = wctype (class); + return desc ? iswctype (btowc (c), desc) : 0; + } + + *Note Converting a Character::, for more information on `btowc'. +Note that this change probably does not improve the performance of the +program a lot since the `wctype' function still has to make the string +comparisons. It gets really interesting if the `is_in_class' function +is called more than once for the same class name. In this case the +variable DESC could be computed once and reused for all the calls. +Therefore the above form of the function is probably not the final one. + + +File: libc.info, Node: Wide Character Case Conversion, Prev: Using Wide Char Classes, Up: Character Handling + +Mapping of wide characters. +=========================== + + The classification functions are also generalized by the ISO C +standard. Instead of just allowing the two standard mappings, a locale +can contain others. Again, the `localedef' program already supports +generating such locale data files. + + - Data Type: wctrans_t + This data type is defined as a scalar type which can hold a value + representing the locale-dependent character mapping. There is no + way to construct such a value apart from using the return value of + the `wctrans' function. + + This type is defined in `wctype.h'. + + - Function: wctrans_t wctrans (const char *PROPERTY) + The `wctrans' function has to be used to find out whether a named + mapping is defined in the current locale selected for the + `LC_CTYPE' category. If the returned value is non-zero, you can + use it afterwards in calls to `towctrans'. If the return value is + zero no such mapping is known in the current locale. + + Beside locale-specific mappings there are two mappings which are + guaranteed to be available in every locale: + + `"tolower"' `"toupper"' + + These functions are declared in `wctype.h'. + + - Function: wint_t towctrans (wint_t WC, wctrans_t DESC) + `towctrans' maps the input character WC according to the rules of + the mapping for which DESC is a descriptor, and returns the value + it finds. DESC must be obtained by a successful call to `wctrans'. + + This function is declared in `wctype.h'. + + For the generally available mappings, the ISO C standard defines +convenient shortcuts so that it is not necessary to call `wctrans' for +them. + + - Function: wint_t towlower (wint_t WC) + If WC is an upper-case letter, `towlower' returns the corresponding + lower-case letter. If WC is not an upper-case letter, WC is + returned unchanged. + + `towlower' can be implemented using + + towctrans (wc, wctrans ("tolower")) + + This function is declared in `wctype.h'. + + - Function: wint_t towupper (wint_t WC) + If WC is a lower-case letter, `towupper' returns the corresponding + upper-case letter. Otherwise WC is returned unchanged. + + `towupper' can be implemented using + + towctrans (wc, wctrans ("toupper")) + + This function is declared in `wctype.h'. + + The same warnings given in the last section for the use of the wide +character classification functions apply here. It is not possible to +simply cast a `char' type value to a `wint_t' and use it as an argument +to `towctrans' calls. + + +File: libc.info, Node: String and Array Utilities, Next: Character Set Handling, Prev: Character Handling, Up: Top + +String and Array Utilities +************************** + + Operations on strings (or arrays of characters) are an important +part of many programs. The GNU C library provides an extensive set of +string utility functions, including functions for copying, +concatenating, comparing, and searching strings. Many of these +functions can also operate on arbitrary regions of storage; for +example, the `memcpy' function can be used to copy the contents of any +kind of array. + + It's fairly common for beginning C programmers to "reinvent the +wheel" by duplicating this functionality in their own code, but it pays +to become familiar with the library functions and to make use of them, +since this offers benefits in maintenance, efficiency, and portability. + + For instance, you could easily compare one string to another in two +lines of C code, but if you use the built-in `strcmp' function, you're +less likely to make a mistake. And, since these library functions are +typically highly optimized, your program may run faster too. + +* Menu: + +* Representation of Strings:: Introduction to basic concepts. +* String/Array Conventions:: Whether to use a string function or an + arbitrary array function. +* String Length:: Determining the length of a string. +* Copying and Concatenation:: Functions to copy the contents of strings + and arrays. +* String/Array Comparison:: Functions for byte-wise and character-wise + comparison. +* Collation Functions:: Functions for collating strings. +* Search Functions:: Searching for a specific element or substring. +* Finding Tokens in a String:: Splitting a string into tokens by looking + for delimiters. +* strfry:: Function for flash-cooking a string. +* Trivial Encryption:: Obscuring data. +* Encode Binary Data:: Encoding and Decoding of Binary Data. +* Argz and Envz Vectors:: Null-separated string vectors. + + File: libc.info, Node: Representation of Strings, Next: String/Array Conventions, Up: String and Array Utilities Representation of Strings @@ -284,860 +683,4 @@ This function is declared in the header MAXLEN parameter specifies the maximum number of wide characters. This function is a GNU extension and is declared in `wchar.h'. - - -File: libc.info, Node: Copying and Concatenation, Next: String/Array Comparison, Prev: String Length, Up: String and Array Utilities - -Copying and Concatenation -========================= - - You can use the functions described in this section to copy the -contents of strings and arrays, or to append the contents of one string -to another. The `str' and `mem' functions are declared in the header -file `string.h' while the `wstr' and `wmem' functions are declared in -the file `wchar.h'. - - A helpful way to remember the ordering of the arguments to the -functions in this section is that it corresponds to an assignment -expression, with the destination array specified to the left of the -source array. All of these functions return the address of the -destination array. - - Most of these functions do not work properly if the source and -destination arrays overlap. For example, if the beginning of the -destination array overlaps the end of the source array, the original -contents of that part of the source array may get overwritten before it -is copied. Even worse, in the case of the string functions, the null -character marking the end of the string may be lost, and the copy -function might get stuck in a loop trashing all the memory allocated to -your program. - - All functions that have problems copying between overlapping arrays -are explicitly identified in this manual. In addition to functions in -this section, there are a few others like `sprintf' (*note Formatted -Output Functions::) and `scanf' (*note Formatted Input Functions::). - - - Function: void * memcpy (void *restrict TO, const void *restrict - FROM, size_t SIZE) - The `memcpy' function copies SIZE bytes from the object beginning - at FROM into the object beginning at TO. The behavior of this - function is undefined if the two arrays TO and FROM overlap; use - `memmove' instead if overlapping is possible. - - The value returned by `memcpy' is the value of TO. - - Here is an example of how you might use `memcpy' to copy the - contents of an array: - - struct foo *oldarray, *newarray; - int arraysize; - ... - memcpy (new, old, arraysize * sizeof (struct foo)); - - - Function: wchar_t * wmemcpy (wchar_t *restrict WTO, const wchar_t - *restruct WFROM, size_t SIZE) - The `wmemcpy' function copies SIZE wide characters from the object - beginning at WFROM into the object beginning at WTO. The behavior - of this function is undefined if the two arrays WTO and WFROM - overlap; use `wmemmove' instead if overlapping is possible. - - The following is a possible implementation of `wmemcpy' but there - are more optimizations possible. - - wchar_t * - wmemcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom, - size_t size) - { - return (wchar_t *) memcpy (wto, wfrom, size * sizeof (wchar_t)); - } - - The value returned by `wmemcpy' is the value of WTO. - - This function was introduced in Amendment 1 to ISO C90. - - - Function: void * mempcpy (void *restrict TO, const void *restrict - FROM, size_t SIZE) - The `mempcpy' function is nearly identical to the `memcpy' - function. It copies SIZE bytes from the object beginning at - `from' into the object pointed to by TO. But instead of returning - the value of TO it returns a pointer to the byte following the - last written byte in the object beginning at TO. I.e., the value - is `((void *) ((char *) TO + SIZE))'. - - This function is useful in situations where a number of objects - shall be copied to consecutive memory positions. - - void * - combine (void *o1, size_t s1, void *o2, size_t s2) - { - void *result = malloc (s1 + s2); - if (result != NULL) - mempcpy (mempcpy (result, o1, s1), o2, s2); - return result; - } - - This function is a GNU extension. - - - Function: wchar_t * wmempcpy (wchar_t *restrict WTO, const wchar_t - *restrict WFROM, size_t SIZE) - The `wmempcpy' function is nearly identical to the `wmemcpy' - function. It copies SIZE wide characters from the object - beginning at `wfrom' into the object pointed to by WTO. But - instead of returning the value of WTO it returns a pointer to the - wide character following the last written wide character in the - object beginning at WTO. I.e., the value is `WTO + SIZE'. - - This function is useful in situations where a number of objects - shall be copied to consecutive memory positions. - - The following is a possible implementation of `wmemcpy' but there - are more optimizations possible. - - wchar_t * - wmempcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom, - size_t size) - { - return (wchar_t *) mempcpy (wto, wfrom, size * sizeof (wchar_t)); - } - - This function is a GNU extension. - - - Function: void * memmove (void *TO, const void *FROM, size_t SIZE) - `memmove' copies the SIZE bytes at FROM into the SIZE bytes at TO, - even if those two blocks of space overlap. In the case of - overlap, `memmove' is careful to copy the original values of the - bytes in the block at FROM, including those bytes which also - belong to the block at TO. - - The value returned by `memmove' is the value of TO. - - - Function: wchar_t * wmemmove (wchar *WTO, const wchar_t *WFROM, - size_t SIZE) - `wmemmove' copies the SIZE wide characters at WFROM into the SIZE - wide characters at WTO, even if those two blocks of space overlap. - In the case of overlap, `memmove' is careful to copy the original - values of the wide characters in the block at WFROM, including - those wide characters which also belong to the block at WTO. - - The following is a possible implementation of `wmemcpy' but there - are more optimizations possible. - - wchar_t * - wmempcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom, - size_t size) - { - return (wchar_t *) mempcpy (wto, wfrom, size * sizeof (wchar_t)); - } - - The value returned by `wmemmove' is the value of WTO. - - This function is a GNU extension. - - - Function: void * memccpy (void *restrict TO, const void *restrict - FROM, int C, size_t SIZE) - This function copies no more than SIZE bytes from FROM to TO, - stopping if a byte matching C is found. The return value is a - pointer into TO one byte past where C was copied, or a null - pointer if no byte matching C appeared in the first SIZE bytes of - FROM. - - - Function: void * memset (void *BLOCK, int C, size_t SIZE) - This function copies the value of C (converted to an `unsigned - char') into each of the first SIZE bytes of the object beginning - at BLOCK. It returns the value of BLOCK. - - - Function: wchar_t * wmemset (wchar_t *BLOCK, wchar_t WC, size_t SIZE) - This function copies the value of WC into each of the first SIZE - wide characters of the object beginning at BLOCK. It returns the - value of BLOCK. - - - Function: char * strcpy (char *restrict TO, const char *restrict - FROM) - This copies characters from the string FROM (up to and including - the terminating null character) into the string TO. Like - `memcpy', this function has undefined results if the strings - overlap. The return value is the value of TO. - - - Function: wchar_t * wcscpy (wchar_t *restrict WTO, const wchar_t - *restrict WFROM) - This copies wide characters from the string WFROM (up to and - including the terminating null wide character) into the string - WTO. Like `wmemcpy', this function has undefined results if the - strings overlap. The return value is the value of WTO. - - - Function: char * strncpy (char *restrict TO, const char *restrict - FROM, size_t SIZE) - This function is similar to `strcpy' but always copies exactly - SIZE characters into TO. - - If the length of FROM is more than SIZE, then `strncpy' copies - just the first SIZE characters. Note that in this case there is - no null terminator written into TO. - - If the length of FROM is less than SIZE, then `strncpy' copies all - of FROM, followed by enough null characters to add up to SIZE - characters in all. This behavior is rarely useful, but it is - specified by the ISO C standard. - - The behavior of `strncpy' is undefined if the strings overlap. - - Using `strncpy' as opposed to `strcpy' is a way to avoid bugs - relating to writing past the end of the allocated space for TO. - However, it can also make your program much slower in one common - case: copying a string which is probably small into a potentially - large buffer. In this case, SIZE may be large, and when it is, - `strncpy' will waste a considerable amount of time copying null - characters. - - - Function: wchar_t * wcsncpy (wchar_t *restrict WTO, const wchar_t - *restrict WFROM, size_t SIZE) - This function is similar to `wcscpy' but always copies exactly - SIZE wide characters into WTO. - - If the length of WFROM is more than SIZE, then `wcsncpy' copies - just the first SIZE wide characters. Note that in this case there - is no null terminator written into WTO. - - If the length of WFROM is less than SIZE, then `wcsncpy' copies - all of WFROM, followed by enough null wide characters to add up to - SIZE wide characters in all. This behavior is rarely useful, but - it is specified by the ISO C standard. - - The behavior of `wcsncpy' is undefined if the strings overlap. - - Using `wcsncpy' as opposed to `wcscpy' is a way to avoid bugs - relating to writing past the end of the allocated space for WTO. - However, it can also make your program much slower in one common - case: copying a string which is probably small into a potentially - large buffer. In this case, SIZE may be large, and when it is, - `wcsncpy' will waste a considerable amount of time copying null - wide characters. - - - Function: char * strdup (const char *S) - This function copies the null-terminated string S into a newly - allocated string. The string is allocated using `malloc'; see - *Note Unconstrained Allocation::. If `malloc' cannot allocate - space for the new string, `strdup' returns a null pointer. - Otherwise it returns a pointer to the new string. - - - Function: wchar_t * wcsdup (const wchar_t *WS) - This function copies the null-terminated wide character string WS - into a newly allocated string. The string is allocated using - `malloc'; see *Note Unconstrained Allocation::. If `malloc' - cannot allocate space for the new string, `wcsdup' returns a null - pointer. Otherwise it returns a pointer to the new wide character - string. - - This function is a GNU extension. - - - Function: char * strndup (const char *S, size_t SIZE) - This function is similar to `strdup' but always copies at most - SIZE characters into the newly allocated string. - - If the length of S is more than SIZE, then `strndup' copies just - the first SIZE characters and adds a closing null terminator. - Otherwise all characters are copied and the string is terminated. - - This function is different to `strncpy' in that it always - terminates the destination string. - - `strndup' is a GNU extension. - - - Function: char * stpcpy (char *restrict TO, const char *restrict - FROM) - This function is like `strcpy', except that it returns a pointer to - the end of the string TO (that is, the address of the terminating - null character `to + strlen (from)') rather than the beginning. - - For example, this program uses `stpcpy' to concatenate `foo' and - `bar' to produce `foobar', which it then prints. - - #include - #include - - int - main (void) - { - char buffer[10]; - char *to = buffer; - to = stpcpy (to, "foo"); - to = stpcpy (to, "bar"); - puts (buffer); - return 0; - } - - This function is not part of the ISO or POSIX standards, and is not - customary on Unix systems, but we did not invent it either. - Perhaps it comes from MS-DOG. - - Its behavior is undefined if the strings overlap. The function is - declared in `string.h'. - - - Function: wchar_t * wcpcpy (wchar_t *restrict WTO, const wchar_t - *restrict WFROM) - This function is like `wcscpy', except that it returns a pointer to - the end of the string WTO (that is, the address of the terminating - null character `wto + strlen (wfrom)') rather than the beginning. - - This function is not part of ISO or POSIX but was found useful - while developing the GNU C Library itself. - - The behavior of `wcpcpy' is undefined if the strings overlap. - - `wcpcpy' is a GNU extension and is declared in `wchar.h'. - - - Function: char * stpncpy (char *restrict TO, const char *restrict - FROM, size_t SIZE) - This function is similar to `stpcpy' but copies always exactly - SIZE characters into TO. - - If the length of FROM is more then SIZE, then `stpncpy' copies - just the first SIZE characters and returns a pointer to the - character directly following the one which was copied last. Note - that in this case there is no null terminator written into TO. - - If the length of FROM is less than SIZE, then `stpncpy' copies all - of FROM, followed by enough null characters to add up to SIZE - characters in all. This behavior is rarely useful, but it is - implemented to be useful in contexts where this behavior of the - `strncpy' is used. `stpncpy' returns a pointer to the _first_ - written null character. - - This function is not part of ISO or POSIX but was found useful - while developing the GNU C Library itself. - - Its behavior is undefined if the strings overlap. The function is - declared in `string.h'. - - - Function: wchar_t * wcpncpy (wchar_t *restrict WTO, const wchar_t - *restrict WFROM, size_t SIZE) - This function is similar to `wcpcpy' but copies always exactly - WSIZE characters into WTO. - - If the length of WFROM is more then SIZE, then `wcpncpy' copies - just the first SIZE wide characters and returns a pointer to the - wide character directly following the one which was copied last. - Note that in this case there is no null terminator written into - WTO. - - If the length of WFROM is less than SIZE, then `wcpncpy' copies - all of WFROM, followed by enough null characters to add up to SIZE - characters in all. This behavior is rarely useful, but it is - implemented to be useful in contexts where this behavior of the - `wcsncpy' is used. `wcpncpy' returns a pointer to the _first_ - written null character. - - This function is not part of ISO or POSIX but was found useful - while developing the GNU C Library itself. - - Its behavior is undefined if the strings overlap. - - `wcpncpy' is a GNU extension and is declared in `wchar.h'. - - - Macro: char * strdupa (const char *S) - This macro is similar to `strdup' but allocates the new string - using `alloca' instead of `malloc' (*note Variable Size - Automatic::). This means of course the returned string has the - same limitations as any block of memory allocated using `alloca'. - - For obvious reasons `strdupa' is implemented only as a macro; you - cannot get the address of this function. Despite this limitation - it is a useful function. The following code shows a situation - where using `malloc' would be a lot more expensive. - - #include - #include - #include - - const char path[] = _PATH_STDPATH; - - int - main (void) - { - char *wr_path = strdupa (path); - char *cp = strtok (wr_path, ":"); - - while (cp != NULL) - { - puts (cp); - cp = strtok (NULL, ":"); - } - return 0; - } - - Please note that calling `strtok' using PATH directly is invalid. - It is also not allowed to call `strdupa' in the argument list of - `strtok' since `strdupa' uses `alloca' (*note Variable Size - Automatic::) can interfere with the parameter passing. - - This function is only available if GNU CC is used. - - - Macro: char * strndupa (const char *S, size_t SIZE) - This function is similar to `strndup' but like `strdupa' it - allocates the new string using `alloca' *note Variable Size - Automatic::. The same advantages and limitations of `strdupa' are - valid for `strndupa', too. - - This function is implemented only as a macro, just like `strdupa'. - Just as `strdupa' this macro also must not be used inside the - parameter list in a function call. - - `strndupa' is only available if GNU CC is used. - - - Function: char * strcat (char *restrict TO, const char *restrict - FROM) - The `strcat' function is similar to `strcpy', except that the - characters from FROM are concatenated or appended to the end of - TO, instead of overwriting it. That is, the first character from - FROM overwrites the null character marking the end of TO. - - An equivalent definition for `strcat' would be: - - char * - strcat (char *restrict to, const char *restrict from) - { - strcpy (to + strlen (to), from); - return to; - } - - This function has undefined results if the strings overlap. - - - Function: wchar_t * wcscat (wchar_t *restrict WTO, const wchar_t - *restrict WFROM) - The `wcscat' function is similar to `wcscpy', except that the - characters from WFROM are concatenated or appended to the end of - WTO, instead of overwriting it. That is, the first character from - WFROM overwrites the null character marking the end of WTO. - - An equivalent definition for `wcscat' would be: - - wchar_t * - wcscat (wchar_t *wto, const wchar_t *wfrom) - { - wcscpy (wto + wcslen (wto), wfrom); - return wto; - } - - This function has undefined results if the strings overlap. - - Programmers using the `strcat' or `wcscat' function (or the -following `strncat' or `wcsncar' functions for that matter) can easily -be recognized as lazy and reckless. In almost all situations the -lengths of the participating strings are known (it better should be -since how can one otherwise ensure the allocated size of the buffer is -sufficient?) Or at least, one could know them if one keeps track of the -results of the various function calls. But then it is very inefficient -to use `strcat'/`wcscat'. A lot of time is wasted finding the end of -the destination string so that the actual copying can start. This is a -common example: - - /* This function concatenates arbitrarily many strings. The last - parameter must be `NULL'. */ - char * - concat (const char *str, ...) - { - va_list ap, ap2; - size_t total = 1; - const char *s; - char *result; - - va_start (ap, str); - /* Actually `va_copy', but this is the name more gcc versions - understand. */ - __va_copy (ap2, ap); - - /* Determine how much space we need. */ - for (s = str; s != NULL; s = va_arg (ap, const char *)) - total += strlen (s); - - va_end (ap); - - result = (char *) malloc (total); - if (result != NULL) - { - result[0] = '\0'; - - /* Copy the strings. */ - for (s = str; s != NULL; s = va_arg (ap2, const char *)) - strcat (result, s); - } - - va_end (ap2); - - return result; - } - - This looks quite simple, especially the second loop where the strings -are actually copied. But these innocent lines hide a major performance -penalty. Just imagine that ten strings of 100 bytes each have to be -concatenated. For the second string we search the already stored 100 -bytes for the end of the string so that we can append the next string. -For all strings in total the comparisons necessary to find the end of -the intermediate results sums up to 5500! If we combine the copying -with the search for the allocation we can write this function more -efficient: - - char * - concat (const char *str, ...) - { - va_list ap; - size_t allocated = 100; - char *result = (char *) malloc (allocated); - char *wp; - - if (allocated != NULL) - { - char *newp; - - va_start (ap, atr); - - wp = result; - for (s = str; s != NULL; s = va_arg (ap, const char *)) - { - size_t len = strlen (s); - - /* Resize the allocated memory if necessary. */ - if (wp + len + 1 > result + allocated) - { - allocated = (allocated + len) * 2; - newp = (char *) realloc (result, allocated); - if (newp == NULL) - { - free (result); - return NULL; - } - wp = newp + (wp - result); - result = newp; - } - - wp = mempcpy (wp, s, len); - } - - /* Terminate the result string. */ - *wp++ = '\0'; - - /* Resize memory to the optimal size. */ - newp = realloc (result, wp - result); - if (newp != NULL) - result = newp; - - va_end (ap); - } - - return result; - } - - With a bit more knowledge about the input strings one could fine-tune -the memory allocation. The difference we are pointing to here is that -we don't use `strcat' anymore. We always keep track of the length of -the current intermediate result so we can safe us the search for the -end of the string and use `mempcpy'. Please note that we also don't -use `stpcpy' which might seem more natural since we handle with -strings. But this is not necessary since we already know the length of -the string and therefore can use the faster memory copying function. -The example would work for wide characters the same way. - - Whenever a programmer feels the need to use `strcat' she or he -should think twice and look through the program whether the code cannot -be rewritten to take advantage of already calculated results. Again: it -is almost always unnecessary to use `strcat'. - - - Function: char * strncat (char *restrict TO, const char *restrict - FROM, size_t SIZE) - This function is like `strcat' except that not more than SIZE - characters from FROM are appended to the end of TO. A single null - character is also always appended to TO, so the total allocated - size of TO must be at least `SIZE + 1' bytes longer than its - initial length. - - The `strncat' function could be implemented like this: - - char * - strncat (char *to, const char *from, size_t size) - { - to[strlen (to) + size] = '\0'; - strncpy (to + strlen (to), from, size); - return to; - } - - The behavior of `strncat' is undefined if the strings overlap. - - - Function: wchar_t * wcsncat (wchar_t *restrict WTO, const wchar_t - *restrict WFROM, size_t SIZE) - This function is like `wcscat' except that not more than SIZE - characters from FROM are appended to the end of TO. A single null - character is also always appended to TO, so the total allocated - size of TO must be at least `SIZE + 1' bytes longer than its - initial length. - - The `wcsncat' function could be implemented like this: - - wchar_t * - wcsncat (wchar_t *restrict wto, const wchar_t *restrict wfrom, - size_t size) - { - wto[wcslen (to) + size] = L'\0'; - wcsncpy (wto + wcslen (wto), wfrom, size); - return wto; - } - - The behavior of `wcsncat' is undefined if the strings overlap. - - Here is an example showing the use of `strncpy' and `strncat' (the -wide character version is equivalent). Notice how, in the call to -`strncat', the SIZE parameter is computed to avoid overflowing the -character array `buffer'. - - #include - #include - - #define SIZE 10 - - static char buffer[SIZE]; - - main () - { - strncpy (buffer, "hello", SIZE); - puts (buffer); - strncat (buffer, ", world", SIZE - strlen (buffer) - 1); - puts (buffer); - } - -The output produced by this program looks like: - - hello - hello, wo - - - Function: void bcopy (const void *FROM, void *TO, size_t SIZE) - This is a partially obsolete alternative for `memmove', derived - from BSD. Note that it is not quite equivalent to `memmove', - because the arguments are not in the same order and there is no - return value. - - - Function: void bzero (void *BLOCK, size_t SIZE) - This is a partially obsolete alternative for `memset', derived from - BSD. Note that it is not as general as `memset', because the only - value it can store is zero. - - -File: libc.info, Node: String/Array Comparison, Next: Collation Functions, Prev: Copying and Concatenation, Up: String and Array Utilities - -String/Array Comparison -======================= - - You can use the functions in this section to perform comparisons on -the contents of strings and arrays. As well as checking for equality, -these functions can also be used as the ordering functions for sorting -operations. *Note Searching and Sorting::, for an example of this. - - Unlike most comparison operations in C, the string comparison -functions return a nonzero value if the strings are _not_ equivalent -rather than if they are. The sign of the value indicates the relative -ordering of the first characters in the strings that are not -equivalent: a negative value indicates that the first string is "less" -than the second, while a positive value indicates that the first string -is "greater". - - The most common use of these functions is to check only for equality. -This is canonically done with an expression like `! strcmp (s1, s2)'. - - All of these functions are declared in the header file `string.h'. - - - Function: int memcmp (const void *A1, const void *A2, size_t SIZE) - The function `memcmp' compares the SIZE bytes of memory beginning - at A1 against the SIZE bytes of memory beginning at A2. The value - returned has the same sign as the difference between the first - differing pair of bytes (interpreted as `unsigned char' objects, - then promoted to `int'). - - If the contents of the two blocks are equal, `memcmp' returns `0'. - - - Function: int wmemcmp (const wchar_t *A1, const wchar_t *A2, size_t - SIZE) - The function `wmemcmp' compares the SIZE wide characters beginning - at A1 against the SIZE wide characters beginning at A2. The value - returned is smaller than or larger than zero depending on whether - the first differing wide character is A1 is smaller or larger than - the corresponding character in A2. - - If the contents of the two blocks are equal, `wmemcmp' returns `0'. - - On arbitrary arrays, the `memcmp' function is mostly useful for -testing equality. It usually isn't meaningful to do byte-wise ordering -comparisons on arrays of things other than bytes. For example, a -byte-wise comparison on the bytes that make up floating-point numbers -isn't likely to tell you anything about the relationship between the -values of the floating-point numbers. - - `wmemcmp' is really only useful to compare arrays of type `wchar_t' -since the function looks at `sizeof (wchar_t)' bytes at a time and this -number of bytes is system dependent. - - You should also be careful about using `memcmp' to compare objects -that can contain "holes", such as the padding inserted into structure -objects to enforce alignment requirements, extra space at the end of -unions, and extra characters at the ends of strings whose length is less -than their allocated size. The contents of these "holes" are -indeterminate and may cause strange behavior when performing byte-wise -comparisons. For more predictable results, perform an explicit -component-wise comparison. - - For example, given a structure type definition like: - - struct foo - { - unsigned char tag; - union - { - double f; - long i; - char *p; - } value; - }; - -you are better off writing a specialized comparison function to compare -`struct foo' objects instead of comparing them with `memcmp'. - - - Function: int strcmp (const char *S1, const char *S2) - The `strcmp' function compares the string S1 against S2, returning - a value that has the same sign as the difference between the first - differing pair of characters (interpreted as `unsigned char' - objects, then promoted to `int'). - - If the two strings are equal, `strcmp' returns `0'. - - A consequence of the ordering used by `strcmp' is that if S1 is an - initial substring of S2, then S1 is considered to be "less than" - S2. - - `strcmp' does not take sorting conventions of the language the - strings are written in into account. To get that one has to use - `strcoll'. - - - Function: int wcscmp (const wchar_t *WS1, const wchar_t *WS2) - The `wcscmp' function compares the wide character string WS1 - against WS2. The value returned is smaller than or larger than - zero depending on whether the first differing wide character is - WS1 is smaller or larger than the corresponding character in WS2. - - If the two strings are equal, `wcscmp' returns `0'. - - A consequence of the ordering used by `wcscmp' is that if WS1 is - an initial substring of WS2, then WS1 is considered to be "less - than" WS2. - - `wcscmp' does not take sorting conventions of the language the - strings are written in into account. To get that one has to use - `wcscoll'. - - - Function: int strcasecmp (const char *S1, const char *S2) - This function is like `strcmp', except that differences in case are - ignored. How uppercase and lowercase characters are related is - determined by the currently selected locale. In the standard `"C"' - locale the characters A" and a" do not match but in a locale which - regards these characters as parts of the alphabet they do match. - - `strcasecmp' is derived from BSD. - - - Function: int wcscasecmp (const wchar_t *WS1, const wchar_T *WS2) - This function is like `wcscmp', except that differences in case are - ignored. How uppercase and lowercase characters are related is - determined by the currently selected locale. In the standard `"C"' - locale the characters A" and a" do not match but in a locale which - regards these characters as parts of the alphabet they do match. - - `wcscasecmp' is a GNU extension. - - - Function: int strncmp (const char *S1, const char *S2, size_t SIZE) - This function is the similar to `strcmp', except that no more than - SIZE wide characters are compared. In other words, if the two - strings are the same in their first SIZE wide characters, the - return value is zero. - - - Function: int wcsncmp (const wchar_t *WS1, const wchar_t *WS2, - size_t SIZE) - This function is the similar to `wcscmp', except that no more than - SIZE wide characters are compared. In other words, if the two - strings are the same in their first SIZE wide characters, the - return value is zero. - - - Function: int strncasecmp (const char *S1, const char *S2, size_t N) - This function is like `strncmp', except that differences in case - are ignored. Like `strcasecmp', it is locale dependent how - uppercase and lowercase characters are related. - - `strncasecmp' is a GNU extension. - - - Function: int wcsncasecmp (const wchar_t *WS1, const wchar_t *S2, - size_t N) - This function is like `wcsncmp', except that differences in case - are ignored. Like `wcscasecmp', it is locale dependent how - uppercase and lowercase characters are related. - - `wcsncasecmp' is a GNU extension. - - Here are some examples showing the use of `strcmp' and `strncmp' -(equivalent examples can be constructed for the wide character -functions). These examples assume the use of the ASCII character set. -(If some other character set--say, EBCDIC--is used instead, then the -glyphs are associated with different numeric codes, and the return -values and ordering may differ.) - - strcmp ("hello", "hello") - => 0 /* These two strings are the same. */ - strcmp ("hello", "Hello") - => 32 /* Comparisons are case-sensitive. */ - strcmp ("hello", "world") - => -15 /* The character `'h'' comes before `'w''. */ - strcmp ("hello", "hello, world") - => -44 /* Comparing a null character against a comma. */ - strncmp ("hello", "hello, world", 5) - => 0 /* The initial 5 characters are the same. */ - strncmp ("hello, world", "hello, stupid world!!!", 5) - => 0 /* The initial 5 characters are the same. */ - - - Function: int strverscmp (const char *S1, const char *S2) - The `strverscmp' function compares the string S1 against S2, - considering them as holding indices/version numbers. Return value - follows the same conventions as found in the `strverscmp' - function. In fact, if S1 and S2 contain no digits, `strverscmp' - behaves like `strcmp'. - - Basically, we compare strings normally (character by character), - until we find a digit in each string - then we enter a special - comparison mode, where each sequence of digits is taken as a - whole. If we reach the end of these two parts without noticing a - difference, we return to the standard comparison mode. There are - two types of numeric parts: "integral" and "fractional" (those - begin with a '0'). The types of the numeric parts affect the way - we sort them: - - * integral/integral: we compare values as you would expect. - - * fractional/integral: the fractional part is less than the - integral one. Again, no surprise. - - * fractional/fractional: the things become a bit more complex. - If the common prefix contains only leading zeroes, the - longest part is less than the other one; else the comparison - behaves normally. - - strverscmp ("no digit", "no digit") - => 0 /* same behavior as strcmp. */ - strverscmp ("item#99", "item#100") - => <0 /* same prefix, but 99 < 100. */ - strverscmp ("alpha1", "alpha001") - => >0 /* fractional part inferior to integral one. */ - strverscmp ("part1_f012", "part1_f01") - => >0 /* two fractional parts. */ - strverscmp ("foo.009", "foo.0") - => <0 /* idem, but with leading zeroes only. */ - - This function is especially useful when dealing with filename - sorting, because filenames frequently hold indices/version numbers. - - `strverscmp' is a GNU extension. - - - Function: int bcmp (const void *A1, const void *A2, size_t SIZE) - This is an obsolete alias for `memcmp', derived from BSD. diff -durpN glibc-2.2.4/manual/libc.info-60 glibc-2.2.5/manual/libc.info-60 --- glibc-2.2.4/manual/libc.info-60 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-60 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,270 +33,1080 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: File Index, Prev: Variable Index, Up: Top +File: libc.info, Node: Variable Index, Next: File Index, Prev: Function Index, Up: Top -Program and File Index -********************** +Variable and Constant Macro Index +********************************* * Menu: -* -lbsd-compat <1>: Process Group Functions. -* -lbsd-compat: Feature Test Macros. -* /etc/group: Group Database. -* /etc/hosts: Host Names. -* /etc/localtime: TZ Variable. -* /etc/networks: Networks Database. -* /etc/passwd: User Database. -* /etc/protocols: Protocols Database. -* /etc/services: Services Database. -* /share/lib/zoneinfo: TZ Variable. -* argp.h: Argp. -* argz.h: Argz Functions. -* arpa/inet.h: Host Address Functions. -* assert.h: Consistency Checking. -* bsd-compat <1>: Process Group Functions. -* bsd-compat: Feature Test Macros. -* cd: Working Directory. -* chgrp: File Owner. -* chown: File Owner. -* complex.h <1>: Operations on Complex. -* complex.h <2>: Complex Numbers. -* complex.h: Mathematics. -* ctype.h <1>: Case Conversion. -* ctype.h <2>: Classification of Characters. -* ctype.h: Character Handling. -* dirent.h <1>: Random Access Directory. -* dirent.h <2>: Reading/Closing Directory. -* dirent.h <3>: Opening a Directory. -* dirent.h <4>: Directory Entries. -* dirent.h: Reserved Names. -* envz.h: Envz Functions. -* errno.h <1>: Error Codes. -* errno.h <2>: Checking for Errors. -* errno.h: Error Reporting. -* execinfo.h: Backtraces. -* fcntl.h <1>: Interrupt Input. -* fcntl.h <2>: File Locks. -* fcntl.h <3>: File Status Flags. -* fcntl.h <4>: Descriptor Flags. -* fcntl.h <5>: Duplicating Descriptors. -* fcntl.h <6>: Control Operations. -* fcntl.h <7>: Opening and Closing Files. -* fcntl.h: Reserved Names. -* float.h: Floating Point Parameters. -* fnmatch.h: Wildcard Matching. -* gcc: ISO C. -* gconv.h: glibc iconv Implementation. -* grp.h <1>: Group Data Structure. -* grp.h <2>: Setting Groups. -* grp.h: Reserved Names. -* hostid: Host Identification. -* hostname: Host Identification. -* iconv.h: Generic Conversion Interface. -* kill: Termination Signals. -* ksh: Wildcard Matching. -* langinfo.h: The Elegant and Fast Way. -* limits.h <1>: Width of Type. -* limits.h <2>: Limits for Files. -* limits.h <3>: General Limits. -* limits.h <4>: Selecting the Conversion. -* limits.h: Reserved Names. -* locale: Setting the Locale. -* locale.h <1>: The Lame Way to Locale Data. -* locale.h: Setting the Locale. -* localtime: TZ Variable. -* ls: File Attributes. -* malloc.h <1>: Statistics of Malloc. -* malloc.h <2>: Hooks for Malloc. -* malloc.h: Malloc Tunable Parameters. -* math.h <1>: Rounding Functions. -* math.h <2>: Normalization Functions. -* math.h <3>: Absolute Value. -* math.h <4>: Floating Point Classes. -* math.h: Mathematics. -* mcheck.h: Heap Consistency Checking. -* mkdir: Creating Directories. -* netdb.h <1>: Networks Database. -* netdb.h <2>: Protocols Database. -* netdb.h <3>: Services Database. -* netdb.h: Host Names. -* netinet/in.h <1>: Byte Order. -* netinet/in.h <2>: Ports. -* netinet/in.h <3>: Host Address Data Type. -* netinet/in.h: Internet Address Formats. -* obstack.h: Creating Obstacks. -* printf.h <1>: Conversion Specifier Options. -* printf.h: Registering New Conversions. -* pwd.h <1>: User Data Structure. -* pwd.h: Reserved Names. -* setjmp.h <1>: Non-Local Exits and Signals. -* setjmp.h: Non-Local Details. -* sh: Running a Command. -* signal.h <1>: BSD Signal Handling. -* signal.h <2>: Checking for Pending Signals. -* signal.h <3>: Process Signal Mask. -* signal.h <4>: Signal Sets. -* signal.h <5>: Signaling Another Process. -* signal.h <6>: Signaling Yourself. -* signal.h <7>: Flags for Sigaction. -* signal.h <8>: Advanced Signal Handling. -* signal.h <9>: Basic Signal Handling. -* signal.h <10>: Standard Signals. -* signal.h: Reserved Names. -* stdarg.h <1>: Argument Macros. -* stdarg.h: Receiving Arguments. -* stddef.h: Important Data Types. -* stdint.h: Integers. -* stdio.h <1>: Who Logged In. -* stdio.h <2>: Identifying the Terminal. -* stdio.h <3>: Signal Messages. -* stdio.h <4>: Temporary Files. -* stdio.h <5>: Deleting Files. -* stdio.h <6>: Descriptors and Streams. -* stdio.h <7>: Streams and Cookies. -* stdio.h <8>: String Streams. -* stdio.h <9>: Controlling Buffering. -* stdio.h <10>: Flushing Buffers. -* stdio.h <11>: Portable Positioning. -* stdio.h <12>: File Positioning. -* stdio.h <13>: Formatted Input Functions. -* stdio.h <14>: Variable Arguments Output. -* stdio.h <15>: Formatted Output Functions. -* stdio.h <16>: Block Input/Output. -* stdio.h <17>: Character Input. -* stdio.h <18>: Simple Output. -* stdio.h <19>: Opening Streams. -* stdio.h <20>: Standard Streams. -* stdio.h: Streams. -* stdlib.h <1>: Running a Command. -* stdlib.h <2>: Aborting a Program. -* stdlib.h <3>: Exit Status. -* stdlib.h <4>: Environment Access. -* stdlib.h <5>: Parsing of Floats. -* stdlib.h <6>: Parsing of Integers. -* stdlib.h <7>: Absolute Value. -* stdlib.h <8>: Integer Division. -* stdlib.h <9>: SVID Random. -* stdlib.h <10>: BSD Random. -* stdlib.h <11>: ISO Random. -* stdlib.h <12>: Allocation. -* stdlib.h <13>: Array Sort Function. -* stdlib.h <14>: Array Search Function. -* stdlib.h <15>: Non-reentrant Character Conversion. -* stdlib.h <16>: Selecting the Conversion. -* stdlib.h <17>: Variable Size Automatic. -* stdlib.h <18>: Aligned Memory Blocks. -* stdlib.h <19>: Allocating Cleared Space. -* stdlib.h <20>: Changing Block Size. -* stdlib.h <21>: Freeing after Malloc. -* stdlib.h: Basic Allocation. -* string.h <1>: Signal Messages. -* string.h <2>: Trivial Encryption. -* string.h <3>: Finding Tokens in a String. -* string.h <4>: Search Functions. -* string.h <5>: Collation Functions. -* string.h <6>: String/Array Comparison. -* string.h <7>: Copying and Concatenation. -* string.h: String Length. -* sys/param.h: Host Identification. -* sys/resource.h <1>: Traditional Scheduling Functions. -* sys/resource.h <2>: Limits on Resources. -* sys/resource.h: Resource Usage. -* sys/socket.h <1>: Socket-Level Options. -* sys/socket.h <2>: Socket Option Functions. -* sys/socket.h <3>: Sending Datagrams. -* sys/socket.h <4>: Socket Data Options. -* sys/socket.h <5>: Receiving Data. -* sys/socket.h <6>: Sending Data. -* sys/socket.h <7>: Socket Pairs. -* sys/socket.h <8>: Closing a Socket. -* sys/socket.h <9>: Creating a Socket. -* sys/socket.h <10>: Internet Namespace. -* sys/socket.h <11>: Local Namespace Details. -* sys/socket.h <12>: Reading Address. -* sys/socket.h <13>: Setting Address. -* sys/socket.h <14>: Address Formats. -* sys/socket.h: Communication Styles. -* sys/stat.h <1>: FIFO Special Files. -* sys/stat.h <2>: Making Special Files. -* sys/stat.h <3>: Setting Permissions. -* sys/stat.h <4>: Permission Bits. -* sys/stat.h <5>: Testing File Type. -* sys/stat.h <6>: Attribute Meanings. -* sys/stat.h <7>: Creating Directories. -* sys/stat.h: Reserved Names. -* sys/time.h <1>: Setting an Alarm. -* sys/time.h <2>: High-Resolution Calendar. -* sys/time.h: File Times. -* sys/times.h <1>: Processor Time. -* sys/times.h: Reserved Names. -* sys/timex.h: High Accuracy Clock. -* sys/types.h <1>: Setting Groups. -* sys/types.h <2>: Setting User ID. -* sys/types.h <3>: Reading Persona. -* sys/types.h <4>: Terminal Access Functions. -* sys/types.h <5>: Process Group Functions. -* sys/types.h <6>: Process Identification. -* sys/types.h: Waiting for I/O. -* sys/un.h: Local Namespace Details. -* sys/utsname.h: Platform Type. -* sys/vlimit.h: Limits on Resources. -* sys/vtimes.h: Resource Usage. -* sys/wait.h <1>: BSD Wait Functions. -* sys/wait.h <2>: Process Completion Status. -* sys/wait.h: Process Completion. -* termios.h <1>: Terminal Modes. -* termios.h: Reserved Names. -* time.h <1>: TZ Variable. -* time.h <2>: Formatting Calendar Time. -* time.h <3>: Simple Calendar Time. -* time.h <4>: CPU Time. -* time.h: File Times. -* ulimit.h: Limits on Resources. -* umask: Setting Permissions. -* unistd.h <1>: Options for Files. -* unistd.h <2>: System Options. -* unistd.h <3>: Host Identification. -* unistd.h <4>: Who Logged In. -* unistd.h <5>: Setting Groups. -* unistd.h <6>: Setting User ID. -* unistd.h <7>: Reading Persona. -* unistd.h <8>: Terminal Access Functions. -* unistd.h <9>: Process Group Functions. -* unistd.h <10>: Executing a File. -* unistd.h <11>: Creating a Process. -* unistd.h <12>: Process Identification. -* unistd.h <13>: Termination Internals. -* unistd.h <14>: Using Getopt. -* unistd.h <15>: Setting an Alarm. -* unistd.h <16>: Is It a Terminal. -* unistd.h <17>: Creating a Pipe. -* unistd.h <18>: Testing File Access. -* unistd.h <19>: File Owner. -* unistd.h <20>: Deleting Files. -* unistd.h <21>: Symbolic Links. -* unistd.h <22>: Hard Links. -* unistd.h <23>: Working Directory. -* unistd.h <24>: Duplicating Descriptors. -* unistd.h <25>: Descriptors and Streams. -* unistd.h <26>: I/O Primitives. -* unistd.h: Opening and Closing Files. -* utime.h: File Times. -* utmp.h <1>: Logging In and Out. -* utmp.h: Manipulating the Database. -* utmpx.h: XPG Functions. -* varargs.h: Old Varargs. -* wchar.h <1>: Parsing of Integers. -* wchar.h <2>: Character Input. -* wchar.h <3>: Simple Output. -* wchar.h <4>: Converting Strings. -* wchar.h <5>: Converting a Character. -* wchar.h <6>: Keeping the state. -* wchar.h <7>: Extended Char Intro. -* wchar.h <8>: Collation Functions. -* wchar.h: Copying and Concatenation. -* wctype.h <1>: Wide Character Case Conversion. -* wctype.h: Classification of Wide Characters. -* zoneinfo: TZ Variable. - +* (*__gconv_end_fct): glibc iconv Implementation. +* (*__gconv_fct): glibc iconv Implementation. +* (*__gconv_init_fct): glibc iconv Implementation. +* __free_hook: Hooks for Malloc. +* __malloc_hook: Hooks for Malloc. +* __malloc_initialize_hook: Hooks for Malloc. +* __memalign_hook: Hooks for Malloc. +* __realloc_hook: Hooks for Malloc. +* _BSD_SOURCE: Feature Test Macros. +* _Complex_I: Complex Numbers. +* _FILE_OFFSET_BITS: Feature Test Macros. +* _GNU_SOURCE: Feature Test Macros. +* _IOFBF: Controlling Buffering. +* _IOLBF: Controlling Buffering. +* _IONBF: Controlling Buffering. +* _ISOC99_SOURCE: Feature Test Macros. +* _LARGEFILE64_SOURCE: Feature Test Macros. +* _LARGEFILE_SOURCE: Feature Test Macros. +* _PATH_FSTAB: Mount Information. +* _PATH_MNTTAB: Mount Information. +* _PATH_MOUNTED: Mount Information. +* _PATH_UTMP: Manipulating the Database. +* _PATH_WTMP: Manipulating the Database. +* _POSIX2_C_DEV: System Options. +* _POSIX2_C_VERSION: Version Supported. +* _POSIX2_FORT_DEV: System Options. +* _POSIX2_FORT_RUN: System Options. +* _POSIX2_LOCALEDEF: System Options. +* _POSIX2_SW_DEV: System Options. +* _POSIX_C_SOURCE: Feature Test Macros. +* _POSIX_CHOWN_RESTRICTED: Options for Files. +* _POSIX_JOB_CONTROL: System Options. +* _POSIX_NO_TRUNC: Options for Files. +* _POSIX_SAVED_IDS: System Options. +* _POSIX_SOURCE: Feature Test Macros. +* _POSIX_VDISABLE <1>: Options for Files. +* _POSIX_VDISABLE: Special Characters. +* _POSIX_VERSION: Version Supported. +* _REENTRANT: Feature Test Macros. +* _SC_2_C_DEV: Constants for Sysconf. +* _SC_2_FORT_DEV: Constants for Sysconf. +* _SC_2_FORT_RUN: Constants for Sysconf. +* _SC_2_LOCALEDEF: Constants for Sysconf. +* _SC_2_SW_DEV: Constants for Sysconf. +* _SC_2_VERSION: Constants for Sysconf. +* _SC_AIO_LISTIO_MAX: Constants for Sysconf. +* _SC_AIO_MAX: Constants for Sysconf. +* _SC_AIO_PRIO_DELTA_MAX: Constants for Sysconf. +* _SC_ARG_MAX: Constants for Sysconf. +* _SC_ASYNCHRONOUS_IO: Constants for Sysconf. +* _SC_ATEXIT_MAX: Constants for Sysconf. +* _SC_AVPHYS_PAGES <1>: Constants for Sysconf. +* _SC_AVPHYS_PAGES: Query Memory Parameters. +* _SC_BC_BASE_MAX: Constants for Sysconf. +* _SC_BC_DIM_MAX: Constants for Sysconf. +* _SC_BC_SCALE_MAX: Constants for Sysconf. +* _SC_BC_STRING_MAX: Constants for Sysconf. +* _SC_CHAR_BIT: Constants for Sysconf. +* _SC_CHAR_MAX: Constants for Sysconf. +* _SC_CHAR_MIN: Constants for Sysconf. +* _SC_CHARCLASS_NAME_MAX: Constants for Sysconf. +* _SC_CHILD_MAX: Constants for Sysconf. +* _SC_CLK_TCK: Constants for Sysconf. +* _SC_COLL_WEIGHTS_MAX: Constants for Sysconf. +* _SC_DELAYTIMER_MAX: Constants for Sysconf. +* _SC_EQUIV_CLASS_MAX: Constants for Sysconf. +* _SC_EXPR_NEST_MAX: Constants for Sysconf. +* _SC_FSYNC: Constants for Sysconf. +* _SC_GETGR_R_SIZE_MAX: Constants for Sysconf. +* _SC_GETPW_R_SIZE_MAX: Constants for Sysconf. +* _SC_INT_MAX: Constants for Sysconf. +* _SC_INT_MIN: Constants for Sysconf. +* _SC_JOB_CONTROL: Constants for Sysconf. +* _SC_LINE_MAX: Constants for Sysconf. +* _SC_LOGIN_NAME_MAX: Constants for Sysconf. +* _SC_LONG_BIT: Constants for Sysconf. +* _SC_MAPPED_FILES: Constants for Sysconf. +* _SC_MB_LEN_MAX: Constants for Sysconf. +* _SC_MEMLOCK: Constants for Sysconf. +* _SC_MEMLOCK_RANGE: Constants for Sysconf. +* _SC_MEMORY_PROTECTION: Constants for Sysconf. +* _SC_MESSAGE_PASSING: Constants for Sysconf. +* _SC_MQ_OPEN_MAX: Constants for Sysconf. +* _SC_MQ_PRIO_MAX: Constants for Sysconf. +* _SC_NGROUPS_MAX: Constants for Sysconf. +* _SC_NL_ARGMAX: Constants for Sysconf. +* _SC_NL_LANGMAX: Constants for Sysconf. +* _SC_NL_MSGMAX: Constants for Sysconf. +* _SC_NL_NMAX: Constants for Sysconf. +* _SC_NL_SETMAX: Constants for Sysconf. +* _SC_NL_TEXTMAX: Constants for Sysconf. +* _SC_NPROCESSORS_CONF <1>: Constants for Sysconf. +* _SC_NPROCESSORS_CONF: Processor Resources. +* _SC_NPROCESSORS_ONLN <1>: Constants for Sysconf. +* _SC_NPROCESSORS_ONLN: Processor Resources. +* _SC_NZERO: Constants for Sysconf. +* _SC_OPEN_MAX: Constants for Sysconf. +* _SC_PAGESIZE <1>: Constants for Sysconf. +* _SC_PAGESIZE <2>: Query Memory Parameters. +* _SC_PAGESIZE: Memory-mapped I/O. +* _SC_PHYS_PAGES <1>: Constants for Sysconf. +* _SC_PHYS_PAGES: Query Memory Parameters. +* _SC_PII: Constants for Sysconf. +* _SC_PII_INTERNET: Constants for Sysconf. +* _SC_PII_INTERNET_DGRAM: Constants for Sysconf. +* _SC_PII_INTERNET_STREAM: Constants for Sysconf. +* _SC_PII_OSI: Constants for Sysconf. +* _SC_PII_OSI_CLTS: Constants for Sysconf. +* _SC_PII_OSI_COTS: Constants for Sysconf. +* _SC_PII_OSI_M: Constants for Sysconf. +* _SC_PII_SOCKET: Constants for Sysconf. +* _SC_PII_XTI: Constants for Sysconf. +* _SC_PRIORITIZED_IO: Constants for Sysconf. +* _SC_PRIORITY_SCHEDULING: Constants for Sysconf. +* _SC_REALTIME_SIGNALS: Constants for Sysconf. +* _SC_RTSIG_MAX: Constants for Sysconf. +* _SC_SAVED_IDS: Constants for Sysconf. +* _SC_SCHAR_MAX: Constants for Sysconf. +* _SC_SCHAR_MIN: Constants for Sysconf. +* _SC_SELECT: Constants for Sysconf. +* _SC_SEM_NSEMS_MAX: Constants for Sysconf. +* _SC_SEM_VALUE_MAX: Constants for Sysconf. +* _SC_SEMAPHORES: Constants for Sysconf. +* _SC_SHARED_MEMORY_OBJECTS: Constants for Sysconf. +* _SC_SHRT_MAX: Constants for Sysconf. +* _SC_SHRT_MIN: Constants for Sysconf. +* _SC_SIGQUEUE_MAX: Constants for Sysconf. +* _SC_STREAM_MAX: Constants for Sysconf. +* _SC_SYNCHRONIZED_IO: Constants for Sysconf. +* _SC_T_IOV_MAX: Constants for Sysconf. +* _SC_THREAD_ATTR_STACKADDR: Constants for Sysconf. +* _SC_THREAD_ATTR_STACKSIZE: Constants for Sysconf. +* _SC_THREAD_DESTRUCTOR_ITERATIONS: Constants for Sysconf. +* _SC_THREAD_KEYS_MAX: Constants for Sysconf. +* _SC_THREAD_PRIO_INHERIT: Constants for Sysconf. +* _SC_THREAD_PRIO_PROTECT: Constants for Sysconf. +* _SC_THREAD_PRIORITY_SCHEDULING: Constants for Sysconf. +* _SC_THREAD_PROCESS_SHARED: Constants for Sysconf. +* _SC_THREAD_SAFE_FUNCTIONS: Constants for Sysconf. +* _SC_THREAD_STACK_MIN: Constants for Sysconf. +* _SC_THREAD_THREADS_MAX: Constants for Sysconf. +* _SC_THREADS: Constants for Sysconf. +* _SC_TIMER_MAX: Constants for Sysconf. +* _SC_TIMERS: Constants for Sysconf. +* _SC_TTY_NAME_MAX: Constants for Sysconf. +* _SC_TZNAME_MAX: Constants for Sysconf. +* _SC_UCHAR_MAX: Constants for Sysconf. +* _SC_UINT_MAX: Constants for Sysconf. +* _SC_UIO_MAXIOV: Constants for Sysconf. +* _SC_ULONG_MAX: Constants for Sysconf. +* _SC_USHRT_MAX: Constants for Sysconf. +* _SC_VERSION: Constants for Sysconf. +* _SC_WORD_BIT: Constants for Sysconf. +* _SC_XOPEN_CRYPT: Constants for Sysconf. +* _SC_XOPEN_ENH_I18N: Constants for Sysconf. +* _SC_XOPEN_LEGACY: Constants for Sysconf. +* _SC_XOPEN_REALTIME: Constants for Sysconf. +* _SC_XOPEN_REALTIME_THREADS: Constants for Sysconf. +* _SC_XOPEN_SHM: Constants for Sysconf. +* _SC_XOPEN_UNIX: Constants for Sysconf. +* _SC_XOPEN_VERSION: Constants for Sysconf. +* _SC_XOPEN_XCU_VERSION: Constants for Sysconf. +* _SC_XOPEN_XPG2: Constants for Sysconf. +* _SC_XOPEN_XPG3: Constants for Sysconf. +* _SC_XOPEN_XPG4: Constants for Sysconf. +* _SVID_SOURCE: Feature Test Macros. +* _THREAD_SAFE: Feature Test Macros. +* _XOPEN_SOURCE: Feature Test Macros. +* _XOPEN_SOURCE_EXTENDED: Feature Test Macros. +* ABDAY_1: The Elegant and Fast Way. +* ABDAY_2: The Elegant and Fast Way. +* ABDAY_3: The Elegant and Fast Way. +* ABDAY_4: The Elegant and Fast Way. +* ABDAY_5: The Elegant and Fast Way. +* ABDAY_6: The Elegant and Fast Way. +* ABDAY_7: The Elegant and Fast Way. +* ABMON_1: The Elegant and Fast Way. +* ABMON_10: The Elegant and Fast Way. +* ABMON_11: The Elegant and Fast Way. +* ABMON_12: The Elegant and Fast Way. +* ABMON_2: The Elegant and Fast Way. +* ABMON_3: The Elegant and Fast Way. +* ABMON_4: The Elegant and Fast Way. +* ABMON_5: The Elegant and Fast Way. +* ABMON_6: The Elegant and Fast Way. +* ABMON_7: The Elegant and Fast Way. +* ABMON_8: The Elegant and Fast Way. +* ABMON_9: The Elegant and Fast Way. +* ACCOUNTING: Manipulating the Database. +* AF_FILE: Address Formats. +* AF_INET: Address Formats. +* AF_LOCAL: Address Formats. +* AF_UNIX: Address Formats. +* AF_UNSPEC: Address Formats. +* aliases: NSS Basics. +* ALT_DIGITS: The Elegant and Fast Way. +* ALTWERASE: Local Modes. +* AM_STR: The Elegant and Fast Way. +* ARG_MAX: General Limits. +* argp_err_exit_status: Argp Global Variables. +* ARGP_ERR_UNKNOWN: Argp Parser Functions. +* ARGP_HELP_BUG_ADDR: Argp Help Flags. +* ARGP_HELP_DOC: Argp Help Flags. +* ARGP_HELP_EXIT_ERR: Argp Help Flags. +* ARGP_HELP_EXIT_OK: Argp Help Flags. +* ARGP_HELP_LONG: Argp Help Flags. +* ARGP_HELP_LONG_ONLY: Argp Help Flags. +* ARGP_HELP_POST_DOC: Argp Help Flags. +* ARGP_HELP_PRE_DOC: Argp Help Flags. +* ARGP_HELP_SEE: Argp Help Flags. +* ARGP_HELP_SHORT_USAGE: Argp Help Flags. +* ARGP_HELP_STD_ERR: Argp Help Flags. +* ARGP_HELP_STD_HELP: Argp Help Flags. +* ARGP_HELP_STD_USAGE: Argp Help Flags. +* ARGP_HELP_USAGE: Argp Help Flags. +* ARGP_IN_ORDER: Argp Flags. +* ARGP_KEY_ARG: Argp Special Keys. +* ARGP_KEY_ARGS: Argp Special Keys. +* ARGP_KEY_END: Argp Special Keys. +* ARGP_KEY_ERROR: Argp Special Keys. +* ARGP_KEY_FINI: Argp Special Keys. +* ARGP_KEY_HELP_ARGS_DOC: Argp Help Filter Keys. +* ARGP_KEY_HELP_DUP_ARGS_NOTE: Argp Help Filter Keys. +* ARGP_KEY_HELP_EXTRA: Argp Help Filter Keys. +* ARGP_KEY_HELP_HEADER: Argp Help Filter Keys. +* ARGP_KEY_HELP_POST_DOC: Argp Help Filter Keys. +* ARGP_KEY_HELP_PRE_DOC: Argp Help Filter Keys. +* ARGP_KEY_INIT: Argp Special Keys. +* ARGP_KEY_NO_ARGS: Argp Special Keys. +* ARGP_KEY_SUCCESS: Argp Special Keys. +* ARGP_LONG_ONLY: Argp Flags. +* ARGP_NO_ARGS: Argp Flags. +* ARGP_NO_ERRS: Argp Flags. +* ARGP_NO_EXIT: Argp Flags. +* ARGP_NO_HELP: Argp Flags. +* ARGP_PARSE_ARGV0: Argp Flags. +* argp_program_bug_address: Argp Global Variables. +* argp_program_version: Argp Global Variables. +* argp_program_version_hook: Argp Global Variables. +* ARGP_SILENT: Argp Flags. +* B0: Line Speed. +* B110: Line Speed. +* B115200: Line Speed. +* B1200: Line Speed. +* B134: Line Speed. +* B150: Line Speed. +* B1800: Line Speed. +* B19200: Line Speed. +* B200: Line Speed. +* B230400: Line Speed. +* B2400: Line Speed. +* B300: Line Speed. +* B38400: Line Speed. +* B460800: Line Speed. +* B4800: Line Speed. +* B50: Line Speed. +* B57600: Line Speed. +* B600: Line Speed. +* B75: Line Speed. +* B9600: Line Speed. +* BC_BASE_MAX: Utility Limits. +* BC_DIM_MAX: Utility Limits. +* BC_SCALE_MAX: Utility Limits. +* BC_STRING_MAX: Utility Limits. +* BOOT_TIME <1>: XPG Functions. +* BOOT_TIME: Manipulating the Database. +* BRKINT: Input Modes. +* BUFSIZ: Controlling Buffering. +* CCTS_OFLOW: Control Modes. +* CHAR_MAX: Range of Type. +* CHAR_MIN: Range of Type. +* CHILD_MAX: General Limits. +* CIGNORE: Control Modes. +* CLK_TCK: CPU Time. +* CLOCAL: Control Modes. +* CLOCKS_PER_SEC: CPU Time. +* CODESET: The Elegant and Fast Way. +* COLL_WEIGHTS_MAX: Utility Limits. +* COREFILE: Program Error Signals. +* CREAD: Control Modes. +* CRNCYSTR: The Elegant and Fast Way. +* CRTS_IFLOW: Control Modes. +* CS5: Control Modes. +* CS6: Control Modes. +* CS7: Control Modes. +* CS8: Control Modes. +* CSIZE: Control Modes. +* CSTOPB: Control Modes. +* CURRENCY_SYMBOL: The Elegant and Fast Way. +* D_FMT: The Elegant and Fast Way. +* D_T_FMT: The Elegant and Fast Way. +* DAY_1: The Elegant and Fast Way. +* DAY_2: The Elegant and Fast Way. +* DAY_3: The Elegant and Fast Way. +* DAY_4: The Elegant and Fast Way. +* DAY_5: The Elegant and Fast Way. +* DAY_6: The Elegant and Fast Way. +* DAY_7: The Elegant and Fast Way. +* daylight: Time Zone Functions. +* DBL_DIG: Floating Point Parameters. +* DBL_EPSILON: Floating Point Parameters. +* DBL_MANT_DIG: Floating Point Parameters. +* DBL_MAX: Floating Point Parameters. +* DBL_MAX_10_EXP: Floating Point Parameters. +* DBL_MAX_EXP: Floating Point Parameters. +* DBL_MIN: Floating Point Parameters. +* DBL_MIN_10_EXP: Floating Point Parameters. +* DBL_MIN_EXP: Floating Point Parameters. +* DEAD_PROCESS <1>: XPG Functions. +* DEAD_PROCESS: Manipulating the Database. +* DECIMAL_POINT: The Elegant and Fast Way. +* DES_DECRYPT: DES Encryption. +* DES_ENCRYPT: DES Encryption. +* DES_HW: DES Encryption. +* DES_SW: DES Encryption. +* DESERR_BADPARAM: DES Encryption. +* DESERR_HWERROR: DES Encryption. +* DESERR_NOHWDEVICE: DES Encryption. +* DESERR_NONE: DES Encryption. +* DT_BLK: Directory Entries. +* DT_CHR: Directory Entries. +* DT_DIR: Directory Entries. +* DT_FIFO: Directory Entries. +* DT_REG: Directory Entries. +* DT_SOCK: Directory Entries. +* DT_UNKNOWN: Directory Entries. +* E2BIG: Error Codes. +* EACCES: Error Codes. +* EADDRINUSE: Error Codes. +* EADDRNOTAVAIL: Error Codes. +* EADV: Error Codes. +* EAFNOSUPPORT: Error Codes. +* EAGAIN: Error Codes. +* EALREADY: Error Codes. +* EAUTH: Error Codes. +* EBACKGROUND: Error Codes. +* EBADE: Error Codes. +* EBADF <1>: Line Control. +* EBADF: Error Codes. +* EBADFD: Error Codes. +* EBADMSG: Error Codes. +* EBADR: Error Codes. +* EBADRPC: Error Codes. +* EBADRQC: Error Codes. +* EBADSLT: Error Codes. +* EBFONT: Error Codes. +* EBUSY: Error Codes. +* ECHILD: Error Codes. +* ECHO: Local Modes. +* ECHOCTL: Local Modes. +* ECHOE: Local Modes. +* ECHOK: Local Modes. +* ECHOKE: Local Modes. +* ECHONL: Local Modes. +* ECHOPRT: Local Modes. +* ECHRNG: Error Codes. +* ECOMM: Error Codes. +* ECONNABORTED: Error Codes. +* ECONNREFUSED: Error Codes. +* ECONNRESET: Error Codes. +* ED: Error Codes. +* EDEADLK: Error Codes. +* EDEADLOCK: Error Codes. +* EDESTADDRREQ: Error Codes. +* EDIED: Error Codes. +* EDOM: Error Codes. +* EDOTDOT: Error Codes. +* EDQUOT: Error Codes. +* EEXIST: Error Codes. +* EFAULT: Error Codes. +* EFBIG: Error Codes. +* EFTYPE: Error Codes. +* EGRATUITOUS: Error Codes. +* EGREGIOUS: Error Codes. +* EHOSTDOWN: Error Codes. +* EHOSTUNREACH: Error Codes. +* EIDRM: Error Codes. +* EIEIO: Error Codes. +* EILSEQ: Error Codes. +* EINPROGRESS: Error Codes. +* EINTR: Error Codes. +* EINVAL <1>: Line Control. +* EINVAL: Error Codes. +* EIO: Error Codes. +* EISCONN: Error Codes. +* EISDIR: Error Codes. +* EISNAM: Error Codes. +* EL2HLT: Error Codes. +* EL2NSYNC: Error Codes. +* EL3HLT: Error Codes. +* EL3RST: Error Codes. +* ELIBACC: Error Codes. +* ELIBBAD: Error Codes. +* ELIBEXEC: Error Codes. +* ELIBMAX: Error Codes. +* ELIBSCN: Error Codes. +* ELNRNG: Error Codes. +* ELOOP: Error Codes. +* EMEDIUMTYPE: Error Codes. +* EMFILE: Error Codes. +* EMLINK: Error Codes. +* EMPTY <1>: XPG Functions. +* EMPTY: Manipulating the Database. +* EMSGSIZE: Error Codes. +* EMULTIHOP: Error Codes. +* ENAMETOOLONG: Error Codes. +* ENAVAIL: Error Codes. +* ENEEDAUTH: Error Codes. +* ENETDOWN: Error Codes. +* ENETRESET: Error Codes. +* ENETUNREACH: Error Codes. +* ENFILE: Error Codes. +* ENOANO: Error Codes. +* ENOBUFS: Error Codes. +* ENOCSI: Error Codes. +* ENODATA: Error Codes. +* ENODEV: Error Codes. +* ENOENT: Error Codes. +* ENOEXEC: Error Codes. +* ENOLCK: Error Codes. +* ENOLINK: Error Codes. +* ENOMEDIUM: Error Codes. +* ENOMEM: Error Codes. +* ENOMSG: Error Codes. +* ENONET: Error Codes. +* ENOPKG: Error Codes. +* ENOPROTOOPT: Error Codes. +* ENOSPC: Error Codes. +* ENOSR: Error Codes. +* ENOSTR: Error Codes. +* ENOSYS: Error Codes. +* ENOTBLK: Error Codes. +* ENOTCONN: Error Codes. +* ENOTDIR: Error Codes. +* ENOTEMPTY: Error Codes. +* ENOTNAM: Error Codes. +* ENOTSOCK: Error Codes. +* ENOTSUP: Error Codes. +* ENOTTY <1>: Line Control. +* ENOTTY: Error Codes. +* ENOTUNIQ: Error Codes. +* environ: Environment Access. +* ENXIO: Error Codes. +* EOF: EOF and Errors. +* EOPNOTSUPP: Error Codes. +* EOVERFLOW: Error Codes. +* EPERM: Error Codes. +* EPFNOSUPPORT: Error Codes. +* EPIPE: Error Codes. +* EPROCLIM: Error Codes. +* EPROCUNAVAIL: Error Codes. +* EPROGMISMATCH: Error Codes. +* EPROGUNAVAIL: Error Codes. +* EPROTO: Error Codes. +* EPROTONOSUPPORT: Error Codes. +* EPROTOTYPE: Error Codes. +* EQUIV_CLASS_MAX: Utility Limits. +* ERA: The Elegant and Fast Way. +* ERA_D_FMT: The Elegant and Fast Way. +* ERA_D_T_FMT: The Elegant and Fast Way. +* ERA_T_FMT: The Elegant and Fast Way. +* ERA_YEAR: The Elegant and Fast Way. +* ERANGE: Error Codes. +* EREMCHG: Error Codes. +* EREMOTE: Error Codes. +* EREMOTEIO: Error Codes. +* ERESTART: Error Codes. +* EROFS: Error Codes. +* ERPCMISMATCH: Error Codes. +* errno: Checking for Errors. +* error_message_count: Error Messages. +* error_one_per_line: Error Messages. +* error_print_progname: Error Messages. +* ESHUTDOWN: Error Codes. +* ESOCKTNOSUPPORT: Error Codes. +* ESPIPE: Error Codes. +* ESRCH: Error Codes. +* ESRMNT: Error Codes. +* ESTALE: Error Codes. +* ESTRPIPE: Error Codes. +* ethers: NSS Basics. +* ETIME: Error Codes. +* ETIMEDOUT: Error Codes. +* ETOOMANYREFS: Error Codes. +* ETXTBSY: Error Codes. +* EUCLEAN: Error Codes. +* EUNATCH: Error Codes. +* EUSERS: Error Codes. +* EWOULDBLOCK: Error Codes. +* EXDEV: Error Codes. +* EXFULL: Error Codes. +* EXIT_FAILURE: Exit Status. +* EXIT_SUCCESS: Exit Status. +* EXPR_NEST_MAX: Utility Limits. +* EXTA: Line Speed. +* EXTB: Line Speed. +* F_DUPFD: Duplicating Descriptors. +* F_GETFD: Descriptor Flags. +* F_GETFL: Getting File Status Flags. +* F_GETLK: File Locks. +* F_GETOWN: Interrupt Input. +* F_OK: Testing File Access. +* F_RDLCK: File Locks. +* F_SETFD: Descriptor Flags. +* F_SETFL: Getting File Status Flags. +* F_SETLK: File Locks. +* F_SETLKW: File Locks. +* F_SETOWN: Interrupt Input. +* F_UNLCK: File Locks. +* F_WRLCK: File Locks. +* FD_CLOEXEC: Descriptor Flags. +* FD_SETSIZE: Waiting for I/O. +* FE_DFL_ENV: Control Functions. +* FE_DIVBYZERO: Status bit operations. +* FE_DOWNWARD: Rounding. +* FE_INEXACT: Status bit operations. +* FE_INVALID: Status bit operations. +* FE_NOMASK_ENV: Control Functions. +* FE_OVERFLOW: Status bit operations. +* FE_TONEAREST: Rounding. +* FE_TOWARDZERO: Rounding. +* FE_UNDERFLOW: Status bit operations. +* FE_UPWARD: Rounding. +* FILENAME_MAX: Limits for Files. +* FLT_DIG: Floating Point Parameters. +* FLT_EPSILON: Floating Point Parameters. +* FLT_MANT_DIG: Floating Point Parameters. +* FLT_MAX: Floating Point Parameters. +* FLT_MAX_10_EXP: Floating Point Parameters. +* FLT_MAX_EXP: Floating Point Parameters. +* FLT_MIN: Floating Point Parameters. +* FLT_MIN_10_EXP: Floating Point Parameters. +* FLT_MIN_EXP: Floating Point Parameters. +* FLT_RADIX: Floating Point Parameters. +* FLT_ROUNDS: Floating Point Parameters. +* FLUSHO: Local Modes. +* FOPEN_MAX: Opening Streams. +* FP_FAST_FMA: Misc FP Arithmetic. +* FP_ILOGB0: Exponents and Logarithms. +* FP_ILOGBNAN: Exponents and Logarithms. +* FP_INFINITE: Floating Point Classes. +* FP_NAN: Floating Point Classes. +* FP_NORMAL: Floating Point Classes. +* FP_SUBNORMAL: Floating Point Classes. +* FP_ZERO: Floating Point Classes. +* FPE_DECOVF_TRAP: Program Error Signals. +* FPE_FLTDIV_TRAP: Program Error Signals. +* FPE_FLTOVF_TRAP: Program Error Signals. +* FPE_FLTUND_TRAP: Program Error Signals. +* FPE_INTDIV_TRAP: Program Error Signals. +* FPE_INTOVF_TRAP: Program Error Signals. +* FPE_SUBRNG_TRAP: Program Error Signals. +* FRAC_DIGITS: The Elegant and Fast Way. +* FSETLOCKING_BYCALLER: Streams and Threads. +* FSETLOCKING_INTERNAL: Streams and Threads. +* FSETLOCKING_QUERY: Streams and Threads. +* FSTAB: Mount Information. +* FSTAB_RO: fstab. +* FSTAB_RQ: fstab. +* FSTAB_RW: fstab. +* FSTAB_SW: fstab. +* FSTAB_XX: fstab. +* FTW_CHDIR: Working with Directory Trees. +* FTW_D: Working with Directory Trees. +* FTW_DEPTH: Working with Directory Trees. +* FTW_DNR: Working with Directory Trees. +* FTW_DP: Working with Directory Trees. +* FTW_F: Working with Directory Trees. +* FTW_MOUNT: Working with Directory Trees. +* FTW_NS: Working with Directory Trees. +* FTW_PHYS: Working with Directory Trees. +* FTW_SL: Working with Directory Trees. +* FTW_SLN: Working with Directory Trees. +* getdate_err: General Time String Parsing. +* GLOB_ABORTED: Calling Glob. +* GLOB_ALTDIRFUNC: More Flags for Globbing. +* GLOB_APPEND: Flags for Globbing. +* GLOB_BRACE: More Flags for Globbing. +* GLOB_DOOFFS: Flags for Globbing. +* GLOB_ERR: Flags for Globbing. +* GLOB_MAGCHAR: More Flags for Globbing. +* GLOB_MARK: Flags for Globbing. +* GLOB_NOCHECK: Flags for Globbing. +* GLOB_NOESCAPE: Flags for Globbing. +* GLOB_NOMAGIC: More Flags for Globbing. +* GLOB_NOMATCH: Calling Glob. +* GLOB_NOSORT: Flags for Globbing. +* GLOB_NOSPACE: Calling Glob. +* GLOB_ONLYDIR: More Flags for Globbing. +* GLOB_PERIOD: More Flags for Globbing. +* GLOB_TILDE: More Flags for Globbing. +* GLOB_TILDE_CHECK: More Flags for Globbing. +* group: NSS Basics. +* GROUPING: The Elegant and Fast Way. +* h_errno: Host Names. +* HOST_NOT_FOUND: Host Names. +* hosts: NSS Basics. +* HUGE_VAL: Math Error Reporting. +* HUGE_VALF: Math Error Reporting. +* HUGE_VALL: Math Error Reporting. +* HUPCL: Control Modes. +* I: Complex Numbers. +* ICANON: Local Modes. +* ICRNL: Input Modes. +* IEXTEN: Local Modes. +* IFNAMSIZ: Interface Naming. +* IGNBRK: Input Modes. +* IGNCR: Input Modes. +* IGNPAR: Input Modes. +* IMAXBEL: Input Modes. +* in6addr_any: Host Address Data Type. +* in6addr_loopback: Host Address Data Type. +* INADDR_ANY: Host Address Data Type. +* INADDR_BROADCAST: Host Address Data Type. +* INADDR_LOOPBACK: Host Address Data Type. +* INADDR_NONE: Host Address Data Type. +* INFINITY: Infinity and NaN. +* INIT_PROCESS <1>: XPG Functions. +* INIT_PROCESS: Manipulating the Database. +* INLCR: Input Modes. +* INPCK: Input Modes. +* INT_CURR_SYMBOL: The Elegant and Fast Way. +* INT_FRAC_DIGITS: The Elegant and Fast Way. +* INT_MAX: Range of Type. +* INT_MIN: Range of Type. +* INT_N_CS_PRECEDES: The Elegant and Fast Way. +* INT_N_SEP_BY_SPACE: The Elegant and Fast Way. +* INT_N_SIGN_POSN: The Elegant and Fast Way. +* INT_P_CS_PRECEDES: The Elegant and Fast Way. +* INT_P_SEP_BY_SPACE: The Elegant and Fast Way. +* INT_P_SIGN_POSN: The Elegant and Fast Way. +* IPPORT_RESERVED: Ports. +* IPPORT_USERRESERVED: Ports. +* ISIG: Local Modes. +* ISTRIP: Input Modes. +* ITIMER_PROF: Setting an Alarm. +* ITIMER_REAL: Setting an Alarm. +* ITIMER_VIRTUAL: Setting an Alarm. +* IXANY: Input Modes. +* IXOFF: Input Modes. +* IXON: Input Modes. +* L_ctermid: Identifying the Terminal. +* L_cuserid: Who Logged In. +* L_INCR: File Positioning. +* L_SET: File Positioning. +* L_tmpnam: Temporary Files. +* L_XTND: File Positioning. +* LANG: Locale Categories. +* LANGUAGE: Locale Categories. +* LC_ALL: Locale Categories. +* LC_COLLATE: Locale Categories. +* LC_CTYPE: Locale Categories. +* LC_MESSAGES: Locale Categories. +* LC_MONETARY: Locale Categories. +* LC_NUMERIC: Locale Categories. +* LC_TIME: Locale Categories. +* LDBL_DIG: Floating Point Parameters. +* LDBL_EPSILON: Floating Point Parameters. +* LDBL_MANT_DIG: Floating Point Parameters. +* LDBL_MAX: Floating Point Parameters. +* LDBL_MAX_10_EXP: Floating Point Parameters. +* LDBL_MAX_EXP: Floating Point Parameters. +* LDBL_MIN: Floating Point Parameters. +* LDBL_MIN_10_EXP: Floating Point Parameters. +* LDBL_MIN_EXP: Floating Point Parameters. +* LINE_MAX: Utility Limits. +* LINK_MAX: Limits for Files. +* LIO_NOP: Asynchronous I/O. +* LIO_READ: Asynchronous I/O. +* LIO_WRITE: Asynchronous I/O. +* LOG_ALERT: syslog; vsyslog. +* LOG_AUTH: syslog; vsyslog. +* LOG_AUTHPRIV: syslog; vsyslog. +* LOG_CRIT: syslog; vsyslog. +* LOG_CRON: syslog; vsyslog. +* LOG_DAEMON: syslog; vsyslog. +* LOG_DEBUG: syslog; vsyslog. +* LOG_EMERG: syslog; vsyslog. +* LOG_ERR: syslog; vsyslog. +* LOG_FTP: syslog; vsyslog. +* LOG_INFO: syslog; vsyslog. +* LOG_LOCAL0: syslog; vsyslog. +* LOG_LOCAL1: syslog; vsyslog. +* LOG_LOCAL2: syslog; vsyslog. +* LOG_LOCAL3: syslog; vsyslog. +* LOG_LOCAL4: syslog; vsyslog. +* LOG_LOCAL5: syslog; vsyslog. +* LOG_LOCAL6: syslog; vsyslog. +* LOG_LOCAL7: syslog; vsyslog. +* LOG_LPR: syslog; vsyslog. +* LOG_MAIL: syslog; vsyslog. +* LOG_NEWS: syslog; vsyslog. +* LOG_NOTICE: syslog; vsyslog. +* LOG_SYSLOG: syslog; vsyslog. +* LOG_USER: syslog; vsyslog. +* LOG_UUCP: syslog; vsyslog. +* LOG_WARNING: syslog; vsyslog. +* LOGIN_PROCESS <1>: XPG Functions. +* LOGIN_PROCESS: Manipulating the Database. +* LONG_LONG_MAX: Range of Type. +* LONG_LONG_MIN: Range of Type. +* LONG_MAX: Range of Type. +* LONG_MIN: Range of Type. +* M_1_PI: Mathematical Constants. +* M_2_PI: Mathematical Constants. +* M_2_SQRTPI: Mathematical Constants. +* M_E: Mathematical Constants. +* M_LN10: Mathematical Constants. +* M_LN2: Mathematical Constants. +* M_LOG10E: Mathematical Constants. +* M_LOG2E: Mathematical Constants. +* M_PI: Mathematical Constants. +* M_PI_2: Mathematical Constants. +* M_PI_4: Mathematical Constants. +* M_SQRT1_2: Mathematical Constants. +* M_SQRT2: Mathematical Constants. +* MAP_ANON: Memory-mapped I/O. +* MAP_ANONYMOUS: Memory-mapped I/O. +* MAP_FIXED: Memory-mapped I/O. +* MAP_PRIVATE: Memory-mapped I/O. +* MAP_SHARED: Memory-mapped I/O. +* MAX_CANON: Limits for Files. +* MAX_INPUT: Limits for Files. +* MAXNAMLEN: Limits for Files. +* MAXSYMLINKS: Symbolic Links. +* MB_CUR_MAX: Selecting the Conversion. +* MB_LEN_MAX: Selecting the Conversion. +* MDMBUF: Control Modes. +* MINSIGSTKSZ: Signal Stack. +* MM_APPL: Printing Formatted Messages. +* MM_CONSOLE: Printing Formatted Messages. +* MM_ERROR: Printing Formatted Messages. +* MM_FIRM: Printing Formatted Messages. +* MM_HALT: Printing Formatted Messages. +* MM_HARD: Printing Formatted Messages. +* MM_INFO: Printing Formatted Messages. +* MM_NOSEV: Printing Formatted Messages. +* MM_NRECOV: Printing Formatted Messages. +* MM_NULLACT: Printing Formatted Messages. +* MM_NULLLBL: Printing Formatted Messages. +* MM_NULLMC: Printing Formatted Messages. +* MM_NULLSEV: Printing Formatted Messages. +* MM_NULLTAG: Printing Formatted Messages. +* MM_NULLTXT: Printing Formatted Messages. +* MM_OPSYS: Printing Formatted Messages. +* MM_PRINT: Printing Formatted Messages. +* MM_RECOVER: Printing Formatted Messages. +* MM_SOFT: Printing Formatted Messages. +* MM_UTIL: Printing Formatted Messages. +* MM_WARNING: Printing Formatted Messages. +* MNTOPT_DEFAULTS: mtab. +* MNTOPT_NOAUTO: mtab. +* MNTOPT_NOSUID: mtab. +* MNTOPT_RO: mtab. +* MNTOPT_RW: mtab. +* MNTOPT_SUID: mtab. +* MNTTYPE_IGNORE: mtab. +* MNTTYPE_NFS: mtab. +* MNTTYPE_SWAP: mtab. +* MON_1: The Elegant and Fast Way. +* MON_10: The Elegant and Fast Way. +* MON_11: The Elegant and Fast Way. +* MON_12: The Elegant and Fast Way. +* MON_2: The Elegant and Fast Way. +* MON_3: The Elegant and Fast Way. +* MON_4: The Elegant and Fast Way. +* MON_5: The Elegant and Fast Way. +* MON_6: The Elegant and Fast Way. +* MON_7: The Elegant and Fast Way. +* MON_8: The Elegant and Fast Way. +* MON_9: The Elegant and Fast Way. +* MON_DECIMAL_POINT: The Elegant and Fast Way. +* MON_GROUPING: The Elegant and Fast Way. +* MON_THOUSANDS_SEP: The Elegant and Fast Way. +* MS_ASYNC: Memory-mapped I/O. +* MS_SYNC: Memory-mapped I/O. +* MSG_DONTROUTE: Socket Data Options. +* MSG_OOB: Socket Data Options. +* MSG_PEEK: Socket Data Options. +* N_CS_PRECEDES: The Elegant and Fast Way. +* N_SEP_BY_SPACE: The Elegant and Fast Way. +* N_SIGN_POSN: The Elegant and Fast Way. +* NAME_MAX: Limits for Files. +* NAN: Infinity and NaN. +* NCCS: Mode Data Types. +* NDEBUG: Consistency Checking. +* NEGATIVE_SIGN: The Elegant and Fast Way. +* netgroup: NSS Basics. +* networks: NSS Basics. +* NEW_TIME <1>: XPG Functions. +* NEW_TIME: Manipulating the Database. +* NGROUPS_MAX: General Limits. +* NL_ARGMAX: Output Conversion Syntax. +* NO_ADDRESS: Host Names. +* NO_RECOVERY: Host Names. +* NOEXPR: The Elegant and Fast Way. +* NOFLSH: Local Modes. +* NOKERNINFO: Local Modes. +* NOSTR: The Elegant and Fast Way. +* NSIG: Standard Signals. +* NSS_STATUS_NOTFOUND: NSS Modules Interface. +* NSS_STATUS_SUCCESS: NSS Modules Interface. +* NSS_STATUS_TRYAGAIN: NSS Modules Interface. +* NSS_STATUS_UNAVAIL: NSS Modules Interface. +* NULL: Null Pointer Constant. +* O_ACCMODE: Access Modes. +* O_APPEND: Operating Modes. +* O_ASYNC: Operating Modes. +* O_CREAT: Open-time Flags. +* O_EXCL: Open-time Flags. +* O_EXEC: Access Modes. +* O_EXLOCK: Open-time Flags. +* O_FSYNC: Operating Modes. +* O_IGNORE_CTTY: Open-time Flags. +* O_NDELAY: Operating Modes. +* O_NOATIME: Operating Modes. +* O_NOCTTY: Open-time Flags. +* O_NOLINK: Open-time Flags. +* O_NONBLOCK <1>: Operating Modes. +* O_NONBLOCK: Open-time Flags. +* O_NOTRANS: Open-time Flags. +* O_RDONLY: Access Modes. +* O_RDWR: Access Modes. +* O_READ: Access Modes. +* O_SHLOCK: Open-time Flags. +* O_SYNC: Operating Modes. +* O_TRUNC: Open-time Flags. +* O_WRITE: Access Modes. +* O_WRONLY: Access Modes. +* obstack_alloc_failed_handler: Preparing for Obstacks. +* OLD_TIME <1>: XPG Functions. +* OLD_TIME: Manipulating the Database. +* ONLCR: Output Modes. +* ONOEOT: Output Modes. +* OPEN_MAX: General Limits. +* OPOST: Output Modes. +* optarg: Using Getopt. +* opterr: Using Getopt. +* optind: Using Getopt. +* OPTION_ALIAS: Argp Option Flags. +* OPTION_ARG_OPTIONAL: Argp Option Flags. +* OPTION_DOC: Argp Option Flags. +* OPTION_HIDDEN: Argp Option Flags. +* OPTION_NO_USAGE: Argp Option Flags. +* optopt: Using Getopt. +* OXTABS: Output Modes. +* P_CS_PRECEDES: The Elegant and Fast Way. +* P_SEP_BY_SPACE: The Elegant and Fast Way. +* P_SIGN_POSN: The Elegant and Fast Way. +* P_tmpdir: Temporary Files. +* PA_CHAR: Parsing a Template String. +* PA_DOUBLE: Parsing a Template String. +* PA_FLAG_LONG: Parsing a Template String. +* PA_FLAG_LONG_DOUBLE: Parsing a Template String. +* PA_FLAG_LONG_LONG: Parsing a Template String. +* PA_FLAG_MASK: Parsing a Template String. +* PA_FLAG_PTR: Parsing a Template String. +* PA_FLAG_SHORT: Parsing a Template String. +* PA_FLOAT: Parsing a Template String. +* PA_INT: Parsing a Template String. +* PA_LAST: Parsing a Template String. +* PA_POINTER: Parsing a Template String. +* PA_STRING: Parsing a Template String. +* PARENB: Control Modes. +* PARMRK: Input Modes. +* PARODD: Control Modes. +* passwd: NSS Basics. +* PATH_MAX: Limits for Files. +* PENDIN: Local Modes. +* PF_CCITT: Misc Namespaces. +* PF_FILE: Local Namespace Details. +* PF_IMPLINK: Misc Namespaces. +* PF_INET: Internet Namespace. +* PF_INET6: Internet Namespace. +* PF_ISO: Misc Namespaces. +* PF_LOCAL: Local Namespace Details. +* PF_NS: Misc Namespaces. +* PF_ROUTE: Misc Namespaces. +* PF_UNIX: Local Namespace Details. +* PI: Mathematical Constants. +* PIPE_BUF: Limits for Files. +* PM_STR: The Elegant and Fast Way. +* POSITIVE_SIGN: The Elegant and Fast Way. +* PRIO_MAX: Traditional Scheduling Functions. +* PRIO_MIN: Traditional Scheduling Functions. +* PRIO_PGRP: Traditional Scheduling Functions. +* PRIO_PROCESS: Traditional Scheduling Functions. +* PRIO_USER: Traditional Scheduling Functions. +* program_invocation_name: Error Messages. +* program_invocation_short_name: Error Messages. +* PROT_EXEC: Memory-mapped I/O. +* PROT_READ: Memory-mapped I/O. +* PROT_WRITE: Memory-mapped I/O. +* protocols: NSS Basics. +* PWD: Working Directory. +* R_OK: Testing File Access. +* RADIXCHAR: The Elegant and Fast Way. +* RAND_MAX: ISO Random. +* RE_DUP_MAX: General Limits. +* RLIM_INFINITY: Limits on Resources. +* RLIM_NLIMITS: Limits on Resources. +* RLIMIT_AS: Limits on Resources. +* RLIMIT_CORE: Limits on Resources. +* RLIMIT_CPU: Limits on Resources. +* RLIMIT_DATA: Limits on Resources. +* RLIMIT_FSIZE: Limits on Resources. +* RLIMIT_NOFILE: Limits on Resources. +* RLIMIT_OFILE: Limits on Resources. +* RLIMIT_RSS: Limits on Resources. +* RLIMIT_STACK: Limits on Resources. +* rpc: NSS Basics. +* RUN_LVL <1>: XPG Functions. +* RUN_LVL: Manipulating the Database. +* S_IEXEC: Permission Bits. +* S_IFBLK: Testing File Type. +* S_IFCHR: Testing File Type. +* S_IFDIR: Testing File Type. +* S_IFIFO: Testing File Type. +* S_IFLNK: Testing File Type. +* S_IFMT: Testing File Type. +* S_IFREG: Testing File Type. +* S_IFSOCK: Testing File Type. +* S_IREAD: Permission Bits. +* S_IRGRP: Permission Bits. +* S_IROTH: Permission Bits. +* S_IRUSR: Permission Bits. +* S_IRWXG: Permission Bits. +* S_IRWXO: Permission Bits. +* S_IRWXU: Permission Bits. +* S_ISGID: Permission Bits. +* S_ISUID: Permission Bits. +* S_ISVTX: Permission Bits. +* S_IWGRP: Permission Bits. +* S_IWOTH: Permission Bits. +* S_IWRITE: Permission Bits. +* S_IWUSR: Permission Bits. +* S_IXGRP: Permission Bits. +* S_IXOTH: Permission Bits. +* S_IXUSR: Permission Bits. +* SA_NOCLDSTOP: Flags for Sigaction. +* SA_ONSTACK: Flags for Sigaction. +* SA_RESTART: Flags for Sigaction. +* SC_SSIZE_MAX: Constants for Sysconf. +* SCHAR_MAX: Range of Type. +* SCHAR_MIN: Range of Type. +* SEEK_CUR: File Positioning. +* SEEK_END: File Positioning. +* SEEK_SET: File Positioning. +* SEM_VALUE_MAX: POSIX Semaphores. +* services: NSS Basics. +* shadow: NSS Basics. +* SHRT_MAX: Range of Type. +* SHRT_MIN: Range of Type. +* SIG_BLOCK: Process Signal Mask. +* SIG_DFL: Basic Signal Handling. +* SIG_ERR: Basic Signal Handling. +* SIG_IGN: Basic Signal Handling. +* SIG_SETMASK: Process Signal Mask. +* SIG_UNBLOCK: Process Signal Mask. +* SIGABRT: Program Error Signals. +* SIGALRM: Alarm Signals. +* SIGBUS: Program Error Signals. +* SIGCHLD: Job Control Signals. +* SIGCLD: Job Control Signals. +* SIGCONT: Job Control Signals. +* SIGEMT: Program Error Signals. +* SIGFPE: Program Error Signals. +* SIGHUP: Termination Signals. +* SIGILL: Program Error Signals. +* SIGINFO: Miscellaneous Signals. +* SIGINT: Termination Signals. +* SIGIO: Asynchronous I/O Signals. +* SIGIOT: Program Error Signals. +* SIGKILL: Termination Signals. +* SIGLOST: Operation Error Signals. +* signgam: Special Functions. +* SIGPIPE: Operation Error Signals. +* SIGPOLL: Asynchronous I/O Signals. +* SIGPROF: Alarm Signals. +* SIGQUIT: Termination Signals. +* SIGSEGV: Program Error Signals. +* SIGSTKSZ: Signal Stack. +* SIGSTOP: Job Control Signals. +* SIGSYS: Program Error Signals. +* SIGTERM: Termination Signals. +* SIGTRAP: Program Error Signals. +* SIGTSTP: Job Control Signals. +* SIGTTIN: Job Control Signals. +* SIGTTOU: Job Control Signals. +* SIGURG: Asynchronous I/O Signals. +* SIGUSR1: Miscellaneous Signals. +* SIGUSR2: Miscellaneous Signals. +* SIGVTALRM: Alarm Signals. +* SIGWINCH: Miscellaneous Signals. +* SIGXCPU: Operation Error Signals. +* SIGXFSZ: Operation Error Signals. +* SOCK_DGRAM: Communication Styles. +* SOCK_RAW: Communication Styles. +* SOCK_STREAM: Communication Styles. +* SOL_SOCKET: Socket-Level Options. +* SS_DISABLE: Signal Stack. +* SS_ONSTACK: Signal Stack. +* SSIZE_MAX: General Limits. +* stderr: Standard Streams. +* STDERR_FILENO: Descriptors and Streams. +* stdin: Standard Streams. +* STDIN_FILENO: Descriptors and Streams. +* stdout: Standard Streams. +* STDOUT_FILENO: Descriptors and Streams. +* STREAM_MAX: General Limits. +* SV_INTERRUPT: BSD Handler. +* SV_ONSTACK: BSD Handler. +* SV_RESETHAND: BSD Handler. +* sys_siglist: Signal Messages. +* T_FMT: The Elegant and Fast Way. +* T_FMT_AMPM: The Elegant and Fast Way. +* TCIFLUSH: Line Control. +* TCIOFF: Line Control. +* TCIOFLUSH: Line Control. +* TCION: Line Control. +* TCOFLUSH: Line Control. +* TCOOFF: Line Control. +* TCOON: Line Control. +* TCSADRAIN: Mode Functions. +* TCSAFLUSH: Mode Functions. +* TCSANOW: Mode Functions. +* TCSASOFT: Mode Functions. +* THOUSANDS_SEP: The Elegant and Fast Way. +* THOUSEP: The Elegant and Fast Way. +* timezone: Time Zone Functions. +* TMP_MAX: Temporary Files. +* TOSTOP: Local Modes. +* TRY_AGAIN: Host Names. +* tzname: Time Zone Functions. +* TZNAME_MAX: General Limits. +* UCHAR_MAX: Range of Type. +* UINT_MAX: Range of Type. +* ULONG_LONG_MAX: Range of Type. +* ULONG_MAX: Range of Type. +* USER_PROCESS <1>: XPG Functions. +* USER_PROCESS: Manipulating the Database. +* USHRT_MAX: Range of Type. +* VDISCARD: Other Special. +* VDSUSP: Signal Characters. +* VEOF: Editing Characters. +* VEOL: Editing Characters. +* VEOL2: Editing Characters. +* VERASE: Editing Characters. +* VINTR: Signal Characters. +* VKILL: Editing Characters. +* VLNEXT: Other Special. +* VMIN: Noncanonical Input. +* VQUIT: Signal Characters. +* VREPRINT: Editing Characters. +* VSTART: Start/Stop Characters. +* VSTATUS: Other Special. +* VSTOP: Start/Stop Characters. +* VSUSP: Signal Characters. +* VTIME: Noncanonical Input. +* VWERASE: Editing Characters. +* W_OK: Testing File Access. +* WCHAR_MAX <1>: Range of Type. +* WCHAR_MAX: Extended Char Intro. +* WCHAR_MIN: Extended Char Intro. +* WEOF <1>: EOF and Errors. +* WEOF: Extended Char Intro. +* X_OK: Testing File Access. +* YESEXPR: The Elegant and Fast Way. +* YESSTR: The Elegant and Fast Way. diff -durpN glibc-2.2.4/manual/libc.info-61 glibc-2.2.5/manual/libc.info-61 --- glibc-2.2.4/manual/libc.info-61 Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/manual/libc.info-61 Sun Jan 20 19:28:42 2002 @@ -0,0 +1,302 @@ +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. + +INFO-DIR-SECTION GNU libraries +START-INFO-DIR-ENTRY +* Libc: (libc). C library. +END-INFO-DIR-ENTRY + + This file documents the GNU C library. + + This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library +Reference Manual', for Version 2.2.x. + + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". + + (a) The FSF's Front-Cover Text is: + + A GNU Manual + + (b) The FSF's Back-Cover Text is: + + You have freedom to copy and modify this GNU Manual, like GNU +software. Copies published by the Free Software Foundation raise +funds for GNU development. + + +File: libc.info, Node: File Index, Prev: Variable Index, Up: Top + +Program and File Index +********************** + +* Menu: + +* -lbsd-compat <1>: Process Group Functions. +* -lbsd-compat: Feature Test Macros. +* /etc/group: Group Database. +* /etc/hosts: Host Names. +* /etc/localtime: TZ Variable. +* /etc/networks: Networks Database. +* /etc/passwd: User Database. +* /etc/protocols: Protocols Database. +* /etc/services: Services Database. +* /share/lib/zoneinfo: TZ Variable. +* argp.h: Argp. +* argz.h: Argz Functions. +* arpa/inet.h: Host Address Functions. +* assert.h: Consistency Checking. +* bsd-compat <1>: Process Group Functions. +* bsd-compat: Feature Test Macros. +* cd: Working Directory. +* chgrp: File Owner. +* chown: File Owner. +* complex.h <1>: Operations on Complex. +* complex.h <2>: Complex Numbers. +* complex.h: Mathematics. +* ctype.h <1>: Case Conversion. +* ctype.h <2>: Classification of Characters. +* ctype.h: Character Handling. +* dirent.h <1>: Random Access Directory. +* dirent.h <2>: Reading/Closing Directory. +* dirent.h <3>: Opening a Directory. +* dirent.h <4>: Directory Entries. +* dirent.h: Reserved Names. +* envz.h: Envz Functions. +* errno.h <1>: Error Codes. +* errno.h <2>: Checking for Errors. +* errno.h: Error Reporting. +* execinfo.h: Backtraces. +* fcntl.h <1>: Interrupt Input. +* fcntl.h <2>: File Locks. +* fcntl.h <3>: File Status Flags. +* fcntl.h <4>: Descriptor Flags. +* fcntl.h <5>: Duplicating Descriptors. +* fcntl.h <6>: Control Operations. +* fcntl.h <7>: Opening and Closing Files. +* fcntl.h: Reserved Names. +* float.h: Floating Point Parameters. +* fnmatch.h: Wildcard Matching. +* gcc: ISO C. +* gconv.h: glibc iconv Implementation. +* grp.h <1>: Group Data Structure. +* grp.h <2>: Setting Groups. +* grp.h: Reserved Names. +* hostid: Host Identification. +* hostname: Host Identification. +* iconv.h: Generic Conversion Interface. +* kill: Termination Signals. +* ksh: Wildcard Matching. +* langinfo.h: The Elegant and Fast Way. +* limits.h <1>: Width of Type. +* limits.h <2>: Limits for Files. +* limits.h <3>: General Limits. +* limits.h <4>: Selecting the Conversion. +* limits.h: Reserved Names. +* locale: Setting the Locale. +* locale.h <1>: The Lame Way to Locale Data. +* locale.h: Setting the Locale. +* localtime: TZ Variable. +* ls: File Attributes. +* malloc.h <1>: Statistics of Malloc. +* malloc.h <2>: Hooks for Malloc. +* malloc.h: Malloc Tunable Parameters. +* math.h <1>: Rounding Functions. +* math.h <2>: Normalization Functions. +* math.h <3>: Absolute Value. +* math.h <4>: Floating Point Classes. +* math.h: Mathematics. +* mcheck.h: Heap Consistency Checking. +* mkdir: Creating Directories. +* netdb.h <1>: Networks Database. +* netdb.h <2>: Protocols Database. +* netdb.h <3>: Services Database. +* netdb.h: Host Names. +* netinet/in.h <1>: Byte Order. +* netinet/in.h <2>: Ports. +* netinet/in.h <3>: Host Address Data Type. +* netinet/in.h: Internet Address Formats. +* obstack.h: Creating Obstacks. +* printf.h <1>: Conversion Specifier Options. +* printf.h: Registering New Conversions. +* pwd.h <1>: User Data Structure. +* pwd.h: Reserved Names. +* setjmp.h <1>: Non-Local Exits and Signals. +* setjmp.h: Non-Local Details. +* sh: Running a Command. +* signal.h <1>: BSD Signal Handling. +* signal.h <2>: Checking for Pending Signals. +* signal.h <3>: Process Signal Mask. +* signal.h <4>: Signal Sets. +* signal.h <5>: Signaling Another Process. +* signal.h <6>: Signaling Yourself. +* signal.h <7>: Flags for Sigaction. +* signal.h <8>: Advanced Signal Handling. +* signal.h <9>: Basic Signal Handling. +* signal.h <10>: Standard Signals. +* signal.h: Reserved Names. +* stdarg.h <1>: Argument Macros. +* stdarg.h: Receiving Arguments. +* stddef.h: Important Data Types. +* stdint.h: Integers. +* stdio.h <1>: Who Logged In. +* stdio.h <2>: Identifying the Terminal. +* stdio.h <3>: Signal Messages. +* stdio.h <4>: Temporary Files. +* stdio.h <5>: Deleting Files. +* stdio.h <6>: Descriptors and Streams. +* stdio.h <7>: Streams and Cookies. +* stdio.h <8>: String Streams. +* stdio.h <9>: Controlling Buffering. +* stdio.h <10>: Flushing Buffers. +* stdio.h <11>: Portable Positioning. +* stdio.h <12>: File Positioning. +* stdio.h <13>: Formatted Input Functions. +* stdio.h <14>: Variable Arguments Output. +* stdio.h <15>: Formatted Output Functions. +* stdio.h <16>: Block Input/Output. +* stdio.h <17>: Character Input. +* stdio.h <18>: Simple Output. +* stdio.h <19>: Opening Streams. +* stdio.h <20>: Standard Streams. +* stdio.h: Streams. +* stdlib.h <1>: Running a Command. +* stdlib.h <2>: Aborting a Program. +* stdlib.h <3>: Exit Status. +* stdlib.h <4>: Environment Access. +* stdlib.h <5>: Parsing of Floats. +* stdlib.h <6>: Parsing of Integers. +* stdlib.h <7>: Absolute Value. +* stdlib.h <8>: Integer Division. +* stdlib.h <9>: SVID Random. +* stdlib.h <10>: BSD Random. +* stdlib.h <11>: ISO Random. +* stdlib.h <12>: Allocation. +* stdlib.h <13>: Array Sort Function. +* stdlib.h <14>: Array Search Function. +* stdlib.h <15>: Non-reentrant Character Conversion. +* stdlib.h <16>: Selecting the Conversion. +* stdlib.h <17>: Variable Size Automatic. +* stdlib.h <18>: Aligned Memory Blocks. +* stdlib.h <19>: Allocating Cleared Space. +* stdlib.h <20>: Changing Block Size. +* stdlib.h <21>: Freeing after Malloc. +* stdlib.h: Basic Allocation. +* string.h <1>: Signal Messages. +* string.h <2>: Trivial Encryption. +* string.h <3>: Finding Tokens in a String. +* string.h <4>: Search Functions. +* string.h <5>: Collation Functions. +* string.h <6>: String/Array Comparison. +* string.h <7>: Copying and Concatenation. +* string.h: String Length. +* sys/param.h: Host Identification. +* sys/resource.h <1>: Traditional Scheduling Functions. +* sys/resource.h <2>: Limits on Resources. +* sys/resource.h: Resource Usage. +* sys/socket.h <1>: Socket-Level Options. +* sys/socket.h <2>: Socket Option Functions. +* sys/socket.h <3>: Sending Datagrams. +* sys/socket.h <4>: Socket Data Options. +* sys/socket.h <5>: Receiving Data. +* sys/socket.h <6>: Sending Data. +* sys/socket.h <7>: Socket Pairs. +* sys/socket.h <8>: Closing a Socket. +* sys/socket.h <9>: Creating a Socket. +* sys/socket.h <10>: Internet Namespace. +* sys/socket.h <11>: Local Namespace Details. +* sys/socket.h <12>: Reading Address. +* sys/socket.h <13>: Setting Address. +* sys/socket.h <14>: Address Formats. +* sys/socket.h: Communication Styles. +* sys/stat.h <1>: FIFO Special Files. +* sys/stat.h <2>: Making Special Files. +* sys/stat.h <3>: Setting Permissions. +* sys/stat.h <4>: Permission Bits. +* sys/stat.h <5>: Testing File Type. +* sys/stat.h <6>: Attribute Meanings. +* sys/stat.h <7>: Creating Directories. +* sys/stat.h: Reserved Names. +* sys/time.h <1>: Setting an Alarm. +* sys/time.h <2>: High-Resolution Calendar. +* sys/time.h: File Times. +* sys/times.h <1>: Processor Time. +* sys/times.h: Reserved Names. +* sys/timex.h: High Accuracy Clock. +* sys/types.h <1>: Setting Groups. +* sys/types.h <2>: Setting User ID. +* sys/types.h <3>: Reading Persona. +* sys/types.h <4>: Terminal Access Functions. +* sys/types.h <5>: Process Group Functions. +* sys/types.h <6>: Process Identification. +* sys/types.h: Waiting for I/O. +* sys/un.h: Local Namespace Details. +* sys/utsname.h: Platform Type. +* sys/vlimit.h: Limits on Resources. +* sys/vtimes.h: Resource Usage. +* sys/wait.h <1>: BSD Wait Functions. +* sys/wait.h <2>: Process Completion Status. +* sys/wait.h: Process Completion. +* termios.h <1>: Terminal Modes. +* termios.h: Reserved Names. +* time.h <1>: TZ Variable. +* time.h <2>: Formatting Calendar Time. +* time.h <3>: Simple Calendar Time. +* time.h <4>: CPU Time. +* time.h: File Times. +* ulimit.h: Limits on Resources. +* umask: Setting Permissions. +* unistd.h <1>: Options for Files. +* unistd.h <2>: System Options. +* unistd.h <3>: Host Identification. +* unistd.h <4>: Who Logged In. +* unistd.h <5>: Setting Groups. +* unistd.h <6>: Setting User ID. +* unistd.h <7>: Reading Persona. +* unistd.h <8>: Terminal Access Functions. +* unistd.h <9>: Process Group Functions. +* unistd.h <10>: Executing a File. +* unistd.h <11>: Creating a Process. +* unistd.h <12>: Process Identification. +* unistd.h <13>: Termination Internals. +* unistd.h <14>: Using Getopt. +* unistd.h <15>: Setting an Alarm. +* unistd.h <16>: Is It a Terminal. +* unistd.h <17>: Creating a Pipe. +* unistd.h <18>: Testing File Access. +* unistd.h <19>: File Owner. +* unistd.h <20>: Deleting Files. +* unistd.h <21>: Symbolic Links. +* unistd.h <22>: Hard Links. +* unistd.h <23>: Working Directory. +* unistd.h <24>: Duplicating Descriptors. +* unistd.h <25>: Descriptors and Streams. +* unistd.h <26>: I/O Primitives. +* unistd.h: Opening and Closing Files. +* utime.h: File Times. +* utmp.h <1>: Logging In and Out. +* utmp.h: Manipulating the Database. +* utmpx.h: XPG Functions. +* varargs.h: Old Varargs. +* wchar.h <1>: Parsing of Integers. +* wchar.h <2>: Character Input. +* wchar.h <3>: Simple Output. +* wchar.h <4>: Converting Strings. +* wchar.h <5>: Converting a Character. +* wchar.h <6>: Keeping the state. +* wchar.h <7>: Extended Char Intro. +* wchar.h <8>: Collation Functions. +* wchar.h: Copying and Concatenation. +* wctype.h <1>: Wide Character Case Conversion. +* wctype.h: Classification of Wide Characters. +* zoneinfo: TZ Variable. + + diff -durpN glibc-2.2.4/manual/libc.info-7 glibc-2.2.5/manual/libc.info-7 --- glibc-2.2.4/manual/libc.info-7 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-7 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,6 +33,862 @@ software. Copies published by the Free funds for GNU development.  +File: libc.info, Node: Copying and Concatenation, Next: String/Array Comparison, Prev: String Length, Up: String and Array Utilities + +Copying and Concatenation +========================= + + You can use the functions described in this section to copy the +contents of strings and arrays, or to append the contents of one string +to another. The `str' and `mem' functions are declared in the header +file `string.h' while the `wstr' and `wmem' functions are declared in +the file `wchar.h'. + + A helpful way to remember the ordering of the arguments to the +functions in this section is that it corresponds to an assignment +expression, with the destination array specified to the left of the +source array. All of these functions return the address of the +destination array. + + Most of these functions do not work properly if the source and +destination arrays overlap. For example, if the beginning of the +destination array overlaps the end of the source array, the original +contents of that part of the source array may get overwritten before it +is copied. Even worse, in the case of the string functions, the null +character marking the end of the string may be lost, and the copy +function might get stuck in a loop trashing all the memory allocated to +your program. + + All functions that have problems copying between overlapping arrays +are explicitly identified in this manual. In addition to functions in +this section, there are a few others like `sprintf' (*note Formatted +Output Functions::) and `scanf' (*note Formatted Input Functions::). + + - Function: void * memcpy (void *restrict TO, const void *restrict + FROM, size_t SIZE) + The `memcpy' function copies SIZE bytes from the object beginning + at FROM into the object beginning at TO. The behavior of this + function is undefined if the two arrays TO and FROM overlap; use + `memmove' instead if overlapping is possible. + + The value returned by `memcpy' is the value of TO. + + Here is an example of how you might use `memcpy' to copy the + contents of an array: + + struct foo *oldarray, *newarray; + int arraysize; + ... + memcpy (new, old, arraysize * sizeof (struct foo)); + + - Function: wchar_t * wmemcpy (wchar_t *restrict WTO, const wchar_t + *restruct WFROM, size_t SIZE) + The `wmemcpy' function copies SIZE wide characters from the object + beginning at WFROM into the object beginning at WTO. The behavior + of this function is undefined if the two arrays WTO and WFROM + overlap; use `wmemmove' instead if overlapping is possible. + + The following is a possible implementation of `wmemcpy' but there + are more optimizations possible. + + wchar_t * + wmemcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom, + size_t size) + { + return (wchar_t *) memcpy (wto, wfrom, size * sizeof (wchar_t)); + } + + The value returned by `wmemcpy' is the value of WTO. + + This function was introduced in Amendment 1 to ISO C90. + + - Function: void * mempcpy (void *restrict TO, const void *restrict + FROM, size_t SIZE) + The `mempcpy' function is nearly identical to the `memcpy' + function. It copies SIZE bytes from the object beginning at + `from' into the object pointed to by TO. But instead of returning + the value of TO it returns a pointer to the byte following the + last written byte in the object beginning at TO. I.e., the value + is `((void *) ((char *) TO + SIZE))'. + + This function is useful in situations where a number of objects + shall be copied to consecutive memory positions. + + void * + combine (void *o1, size_t s1, void *o2, size_t s2) + { + void *result = malloc (s1 + s2); + if (result != NULL) + mempcpy (mempcpy (result, o1, s1), o2, s2); + return result; + } + + This function is a GNU extension. + + - Function: wchar_t * wmempcpy (wchar_t *restrict WTO, const wchar_t + *restrict WFROM, size_t SIZE) + The `wmempcpy' function is nearly identical to the `wmemcpy' + function. It copies SIZE wide characters from the object + beginning at `wfrom' into the object pointed to by WTO. But + instead of returning the value of WTO it returns a pointer to the + wide character following the last written wide character in the + object beginning at WTO. I.e., the value is `WTO + SIZE'. + + This function is useful in situations where a number of objects + shall be copied to consecutive memory positions. + + The following is a possible implementation of `wmemcpy' but there + are more optimizations possible. + + wchar_t * + wmempcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom, + size_t size) + { + return (wchar_t *) mempcpy (wto, wfrom, size * sizeof (wchar_t)); + } + + This function is a GNU extension. + + - Function: void * memmove (void *TO, const void *FROM, size_t SIZE) + `memmove' copies the SIZE bytes at FROM into the SIZE bytes at TO, + even if those two blocks of space overlap. In the case of + overlap, `memmove' is careful to copy the original values of the + bytes in the block at FROM, including those bytes which also + belong to the block at TO. + + The value returned by `memmove' is the value of TO. + + - Function: wchar_t * wmemmove (wchar *WTO, const wchar_t *WFROM, + size_t SIZE) + `wmemmove' copies the SIZE wide characters at WFROM into the SIZE + wide characters at WTO, even if those two blocks of space overlap. + In the case of overlap, `memmove' is careful to copy the original + values of the wide characters in the block at WFROM, including + those wide characters which also belong to the block at WTO. + + The following is a possible implementation of `wmemcpy' but there + are more optimizations possible. + + wchar_t * + wmempcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom, + size_t size) + { + return (wchar_t *) mempcpy (wto, wfrom, size * sizeof (wchar_t)); + } + + The value returned by `wmemmove' is the value of WTO. + + This function is a GNU extension. + + - Function: void * memccpy (void *restrict TO, const void *restrict + FROM, int C, size_t SIZE) + This function copies no more than SIZE bytes from FROM to TO, + stopping if a byte matching C is found. The return value is a + pointer into TO one byte past where C was copied, or a null + pointer if no byte matching C appeared in the first SIZE bytes of + FROM. + + - Function: void * memset (void *BLOCK, int C, size_t SIZE) + This function copies the value of C (converted to an `unsigned + char') into each of the first SIZE bytes of the object beginning + at BLOCK. It returns the value of BLOCK. + + - Function: wchar_t * wmemset (wchar_t *BLOCK, wchar_t WC, size_t SIZE) + This function copies the value of WC into each of the first SIZE + wide characters of the object beginning at BLOCK. It returns the + value of BLOCK. + + - Function: char * strcpy (char *restrict TO, const char *restrict + FROM) + This copies characters from the string FROM (up to and including + the terminating null character) into the string TO. Like + `memcpy', this function has undefined results if the strings + overlap. The return value is the value of TO. + + - Function: wchar_t * wcscpy (wchar_t *restrict WTO, const wchar_t + *restrict WFROM) + This copies wide characters from the string WFROM (up to and + including the terminating null wide character) into the string + WTO. Like `wmemcpy', this function has undefined results if the + strings overlap. The return value is the value of WTO. + + - Function: char * strncpy (char *restrict TO, const char *restrict + FROM, size_t SIZE) + This function is similar to `strcpy' but always copies exactly + SIZE characters into TO. + + If the length of FROM is more than SIZE, then `strncpy' copies + just the first SIZE characters. Note that in this case there is + no null terminator written into TO. + + If the length of FROM is less than SIZE, then `strncpy' copies all + of FROM, followed by enough null characters to add up to SIZE + characters in all. This behavior is rarely useful, but it is + specified by the ISO C standard. + + The behavior of `strncpy' is undefined if the strings overlap. + + Using `strncpy' as opposed to `strcpy' is a way to avoid bugs + relating to writing past the end of the allocated space for TO. + However, it can also make your program much slower in one common + case: copying a string which is probably small into a potentially + large buffer. In this case, SIZE may be large, and when it is, + `strncpy' will waste a considerable amount of time copying null + characters. + + - Function: wchar_t * wcsncpy (wchar_t *restrict WTO, const wchar_t + *restrict WFROM, size_t SIZE) + This function is similar to `wcscpy' but always copies exactly + SIZE wide characters into WTO. + + If the length of WFROM is more than SIZE, then `wcsncpy' copies + just the first SIZE wide characters. Note that in this case there + is no null terminator written into WTO. + + If the length of WFROM is less than SIZE, then `wcsncpy' copies + all of WFROM, followed by enough null wide characters to add up to + SIZE wide characters in all. This behavior is rarely useful, but + it is specified by the ISO C standard. + + The behavior of `wcsncpy' is undefined if the strings overlap. + + Using `wcsncpy' as opposed to `wcscpy' is a way to avoid bugs + relating to writing past the end of the allocated space for WTO. + However, it can also make your program much slower in one common + case: copying a string which is probably small into a potentially + large buffer. In this case, SIZE may be large, and when it is, + `wcsncpy' will waste a considerable amount of time copying null + wide characters. + + - Function: char * strdup (const char *S) + This function copies the null-terminated string S into a newly + allocated string. The string is allocated using `malloc'; see + *Note Unconstrained Allocation::. If `malloc' cannot allocate + space for the new string, `strdup' returns a null pointer. + Otherwise it returns a pointer to the new string. + + - Function: wchar_t * wcsdup (const wchar_t *WS) + This function copies the null-terminated wide character string WS + into a newly allocated string. The string is allocated using + `malloc'; see *Note Unconstrained Allocation::. If `malloc' + cannot allocate space for the new string, `wcsdup' returns a null + pointer. Otherwise it returns a pointer to the new wide character + string. + + This function is a GNU extension. + + - Function: char * strndup (const char *S, size_t SIZE) + This function is similar to `strdup' but always copies at most + SIZE characters into the newly allocated string. + + If the length of S is more than SIZE, then `strndup' copies just + the first SIZE characters and adds a closing null terminator. + Otherwise all characters are copied and the string is terminated. + + This function is different to `strncpy' in that it always + terminates the destination string. + + `strndup' is a GNU extension. + + - Function: char * stpcpy (char *restrict TO, const char *restrict + FROM) + This function is like `strcpy', except that it returns a pointer to + the end of the string TO (that is, the address of the terminating + null character `to + strlen (from)') rather than the beginning. + + For example, this program uses `stpcpy' to concatenate `foo' and + `bar' to produce `foobar', which it then prints. + + #include + #include + + int + main (void) + { + char buffer[10]; + char *to = buffer; + to = stpcpy (to, "foo"); + to = stpcpy (to, "bar"); + puts (buffer); + return 0; + } + + This function is not part of the ISO or POSIX standards, and is not + customary on Unix systems, but we did not invent it either. + Perhaps it comes from MS-DOG. + + Its behavior is undefined if the strings overlap. The function is + declared in `string.h'. + + - Function: wchar_t * wcpcpy (wchar_t *restrict WTO, const wchar_t + *restrict WFROM) + This function is like `wcscpy', except that it returns a pointer to + the end of the string WTO (that is, the address of the terminating + null character `wto + strlen (wfrom)') rather than the beginning. + + This function is not part of ISO or POSIX but was found useful + while developing the GNU C Library itself. + + The behavior of `wcpcpy' is undefined if the strings overlap. + + `wcpcpy' is a GNU extension and is declared in `wchar.h'. + + - Function: char * stpncpy (char *restrict TO, const char *restrict + FROM, size_t SIZE) + This function is similar to `stpcpy' but copies always exactly + SIZE characters into TO. + + If the length of FROM is more then SIZE, then `stpncpy' copies + just the first SIZE characters and returns a pointer to the + character directly following the one which was copied last. Note + that in this case there is no null terminator written into TO. + + If the length of FROM is less than SIZE, then `stpncpy' copies all + of FROM, followed by enough null characters to add up to SIZE + characters in all. This behavior is rarely useful, but it is + implemented to be useful in contexts where this behavior of the + `strncpy' is used. `stpncpy' returns a pointer to the _first_ + written null character. + + This function is not part of ISO or POSIX but was found useful + while developing the GNU C Library itself. + + Its behavior is undefined if the strings overlap. The function is + declared in `string.h'. + + - Function: wchar_t * wcpncpy (wchar_t *restrict WTO, const wchar_t + *restrict WFROM, size_t SIZE) + This function is similar to `wcpcpy' but copies always exactly + WSIZE characters into WTO. + + If the length of WFROM is more then SIZE, then `wcpncpy' copies + just the first SIZE wide characters and returns a pointer to the + wide character directly following the one which was copied last. + Note that in this case there is no null terminator written into + WTO. + + If the length of WFROM is less than SIZE, then `wcpncpy' copies + all of WFROM, followed by enough null characters to add up to SIZE + characters in all. This behavior is rarely useful, but it is + implemented to be useful in contexts where this behavior of the + `wcsncpy' is used. `wcpncpy' returns a pointer to the _first_ + written null character. + + This function is not part of ISO or POSIX but was found useful + while developing the GNU C Library itself. + + Its behavior is undefined if the strings overlap. + + `wcpncpy' is a GNU extension and is declared in `wchar.h'. + + - Macro: char * strdupa (const char *S) + This macro is similar to `strdup' but allocates the new string + using `alloca' instead of `malloc' (*note Variable Size + Automatic::). This means of course the returned string has the + same limitations as any block of memory allocated using `alloca'. + + For obvious reasons `strdupa' is implemented only as a macro; you + cannot get the address of this function. Despite this limitation + it is a useful function. The following code shows a situation + where using `malloc' would be a lot more expensive. + + #include + #include + #include + + const char path[] = _PATH_STDPATH; + + int + main (void) + { + char *wr_path = strdupa (path); + char *cp = strtok (wr_path, ":"); + + while (cp != NULL) + { + puts (cp); + cp = strtok (NULL, ":"); + } + return 0; + } + + Please note that calling `strtok' using PATH directly is invalid. + It is also not allowed to call `strdupa' in the argument list of + `strtok' since `strdupa' uses `alloca' (*note Variable Size + Automatic::) can interfere with the parameter passing. + + This function is only available if GNU CC is used. + + - Macro: char * strndupa (const char *S, size_t SIZE) + This function is similar to `strndup' but like `strdupa' it + allocates the new string using `alloca' *note Variable Size + Automatic::. The same advantages and limitations of `strdupa' are + valid for `strndupa', too. + + This function is implemented only as a macro, just like `strdupa'. + Just as `strdupa' this macro also must not be used inside the + parameter list in a function call. + + `strndupa' is only available if GNU CC is used. + + - Function: char * strcat (char *restrict TO, const char *restrict + FROM) + The `strcat' function is similar to `strcpy', except that the + characters from FROM are concatenated or appended to the end of + TO, instead of overwriting it. That is, the first character from + FROM overwrites the null character marking the end of TO. + + An equivalent definition for `strcat' would be: + + char * + strcat (char *restrict to, const char *restrict from) + { + strcpy (to + strlen (to), from); + return to; + } + + This function has undefined results if the strings overlap. + + - Function: wchar_t * wcscat (wchar_t *restrict WTO, const wchar_t + *restrict WFROM) + The `wcscat' function is similar to `wcscpy', except that the + characters from WFROM are concatenated or appended to the end of + WTO, instead of overwriting it. That is, the first character from + WFROM overwrites the null character marking the end of WTO. + + An equivalent definition for `wcscat' would be: + + wchar_t * + wcscat (wchar_t *wto, const wchar_t *wfrom) + { + wcscpy (wto + wcslen (wto), wfrom); + return wto; + } + + This function has undefined results if the strings overlap. + + Programmers using the `strcat' or `wcscat' function (or the +following `strncat' or `wcsncar' functions for that matter) can easily +be recognized as lazy and reckless. In almost all situations the +lengths of the participating strings are known (it better should be +since how can one otherwise ensure the allocated size of the buffer is +sufficient?) Or at least, one could know them if one keeps track of the +results of the various function calls. But then it is very inefficient +to use `strcat'/`wcscat'. A lot of time is wasted finding the end of +the destination string so that the actual copying can start. This is a +common example: + + /* This function concatenates arbitrarily many strings. The last + parameter must be `NULL'. */ + char * + concat (const char *str, ...) + { + va_list ap, ap2; + size_t total = 1; + const char *s; + char *result; + + va_start (ap, str); + /* Actually `va_copy', but this is the name more gcc versions + understand. */ + __va_copy (ap2, ap); + + /* Determine how much space we need. */ + for (s = str; s != NULL; s = va_arg (ap, const char *)) + total += strlen (s); + + va_end (ap); + + result = (char *) malloc (total); + if (result != NULL) + { + result[0] = '\0'; + + /* Copy the strings. */ + for (s = str; s != NULL; s = va_arg (ap2, const char *)) + strcat (result, s); + } + + va_end (ap2); + + return result; + } + + This looks quite simple, especially the second loop where the strings +are actually copied. But these innocent lines hide a major performance +penalty. Just imagine that ten strings of 100 bytes each have to be +concatenated. For the second string we search the already stored 100 +bytes for the end of the string so that we can append the next string. +For all strings in total the comparisons necessary to find the end of +the intermediate results sums up to 5500! If we combine the copying +with the search for the allocation we can write this function more +efficient: + + char * + concat (const char *str, ...) + { + va_list ap; + size_t allocated = 100; + char *result = (char *) malloc (allocated); + char *wp; + + if (allocated != NULL) + { + char *newp; + + va_start (ap, atr); + + wp = result; + for (s = str; s != NULL; s = va_arg (ap, const char *)) + { + size_t len = strlen (s); + + /* Resize the allocated memory if necessary. */ + if (wp + len + 1 > result + allocated) + { + allocated = (allocated + len) * 2; + newp = (char *) realloc (result, allocated); + if (newp == NULL) + { + free (result); + return NULL; + } + wp = newp + (wp - result); + result = newp; + } + + wp = mempcpy (wp, s, len); + } + + /* Terminate the result string. */ + *wp++ = '\0'; + + /* Resize memory to the optimal size. */ + newp = realloc (result, wp - result); + if (newp != NULL) + result = newp; + + va_end (ap); + } + + return result; + } + + With a bit more knowledge about the input strings one could fine-tune +the memory allocation. The difference we are pointing to here is that +we don't use `strcat' anymore. We always keep track of the length of +the current intermediate result so we can safe us the search for the +end of the string and use `mempcpy'. Please note that we also don't +use `stpcpy' which might seem more natural since we handle with +strings. But this is not necessary since we already know the length of +the string and therefore can use the faster memory copying function. +The example would work for wide characters the same way. + + Whenever a programmer feels the need to use `strcat' she or he +should think twice and look through the program whether the code cannot +be rewritten to take advantage of already calculated results. Again: it +is almost always unnecessary to use `strcat'. + + - Function: char * strncat (char *restrict TO, const char *restrict + FROM, size_t SIZE) + This function is like `strcat' except that not more than SIZE + characters from FROM are appended to the end of TO. A single null + character is also always appended to TO, so the total allocated + size of TO must be at least `SIZE + 1' bytes longer than its + initial length. + + The `strncat' function could be implemented like this: + + char * + strncat (char *to, const char *from, size_t size) + { + to[strlen (to) + size] = '\0'; + strncpy (to + strlen (to), from, size); + return to; + } + + The behavior of `strncat' is undefined if the strings overlap. + + - Function: wchar_t * wcsncat (wchar_t *restrict WTO, const wchar_t + *restrict WFROM, size_t SIZE) + This function is like `wcscat' except that not more than SIZE + characters from FROM are appended to the end of TO. A single null + character is also always appended to TO, so the total allocated + size of TO must be at least `SIZE + 1' bytes longer than its + initial length. + + The `wcsncat' function could be implemented like this: + + wchar_t * + wcsncat (wchar_t *restrict wto, const wchar_t *restrict wfrom, + size_t size) + { + wto[wcslen (to) + size] = L'\0'; + wcsncpy (wto + wcslen (wto), wfrom, size); + return wto; + } + + The behavior of `wcsncat' is undefined if the strings overlap. + + Here is an example showing the use of `strncpy' and `strncat' (the +wide character version is equivalent). Notice how, in the call to +`strncat', the SIZE parameter is computed to avoid overflowing the +character array `buffer'. + + #include + #include + + #define SIZE 10 + + static char buffer[SIZE]; + + main () + { + strncpy (buffer, "hello", SIZE); + puts (buffer); + strncat (buffer, ", world", SIZE - strlen (buffer) - 1); + puts (buffer); + } + +The output produced by this program looks like: + + hello + hello, wo + + - Function: void bcopy (const void *FROM, void *TO, size_t SIZE) + This is a partially obsolete alternative for `memmove', derived + from BSD. Note that it is not quite equivalent to `memmove', + because the arguments are not in the same order and there is no + return value. + + - Function: void bzero (void *BLOCK, size_t SIZE) + This is a partially obsolete alternative for `memset', derived from + BSD. Note that it is not as general as `memset', because the only + value it can store is zero. + + +File: libc.info, Node: String/Array Comparison, Next: Collation Functions, Prev: Copying and Concatenation, Up: String and Array Utilities + +String/Array Comparison +======================= + + You can use the functions in this section to perform comparisons on +the contents of strings and arrays. As well as checking for equality, +these functions can also be used as the ordering functions for sorting +operations. *Note Searching and Sorting::, for an example of this. + + Unlike most comparison operations in C, the string comparison +functions return a nonzero value if the strings are _not_ equivalent +rather than if they are. The sign of the value indicates the relative +ordering of the first characters in the strings that are not +equivalent: a negative value indicates that the first string is "less" +than the second, while a positive value indicates that the first string +is "greater". + + The most common use of these functions is to check only for equality. +This is canonically done with an expression like `! strcmp (s1, s2)'. + + All of these functions are declared in the header file `string.h'. + + - Function: int memcmp (const void *A1, const void *A2, size_t SIZE) + The function `memcmp' compares the SIZE bytes of memory beginning + at A1 against the SIZE bytes of memory beginning at A2. The value + returned has the same sign as the difference between the first + differing pair of bytes (interpreted as `unsigned char' objects, + then promoted to `int'). + + If the contents of the two blocks are equal, `memcmp' returns `0'. + + - Function: int wmemcmp (const wchar_t *A1, const wchar_t *A2, size_t + SIZE) + The function `wmemcmp' compares the SIZE wide characters beginning + at A1 against the SIZE wide characters beginning at A2. The value + returned is smaller than or larger than zero depending on whether + the first differing wide character is A1 is smaller or larger than + the corresponding character in A2. + + If the contents of the two blocks are equal, `wmemcmp' returns `0'. + + On arbitrary arrays, the `memcmp' function is mostly useful for +testing equality. It usually isn't meaningful to do byte-wise ordering +comparisons on arrays of things other than bytes. For example, a +byte-wise comparison on the bytes that make up floating-point numbers +isn't likely to tell you anything about the relationship between the +values of the floating-point numbers. + + `wmemcmp' is really only useful to compare arrays of type `wchar_t' +since the function looks at `sizeof (wchar_t)' bytes at a time and this +number of bytes is system dependent. + + You should also be careful about using `memcmp' to compare objects +that can contain "holes", such as the padding inserted into structure +objects to enforce alignment requirements, extra space at the end of +unions, and extra characters at the ends of strings whose length is less +than their allocated size. The contents of these "holes" are +indeterminate and may cause strange behavior when performing byte-wise +comparisons. For more predictable results, perform an explicit +component-wise comparison. + + For example, given a structure type definition like: + + struct foo + { + unsigned char tag; + union + { + double f; + long i; + char *p; + } value; + }; + +you are better off writing a specialized comparison function to compare +`struct foo' objects instead of comparing them with `memcmp'. + + - Function: int strcmp (const char *S1, const char *S2) + The `strcmp' function compares the string S1 against S2, returning + a value that has the same sign as the difference between the first + differing pair of characters (interpreted as `unsigned char' + objects, then promoted to `int'). + + If the two strings are equal, `strcmp' returns `0'. + + A consequence of the ordering used by `strcmp' is that if S1 is an + initial substring of S2, then S1 is considered to be "less than" + S2. + + `strcmp' does not take sorting conventions of the language the + strings are written in into account. To get that one has to use + `strcoll'. + + - Function: int wcscmp (const wchar_t *WS1, const wchar_t *WS2) + The `wcscmp' function compares the wide character string WS1 + against WS2. The value returned is smaller than or larger than + zero depending on whether the first differing wide character is + WS1 is smaller or larger than the corresponding character in WS2. + + If the two strings are equal, `wcscmp' returns `0'. + + A consequence of the ordering used by `wcscmp' is that if WS1 is + an initial substring of WS2, then WS1 is considered to be "less + than" WS2. + + `wcscmp' does not take sorting conventions of the language the + strings are written in into account. To get that one has to use + `wcscoll'. + + - Function: int strcasecmp (const char *S1, const char *S2) + This function is like `strcmp', except that differences in case are + ignored. How uppercase and lowercase characters are related is + determined by the currently selected locale. In the standard `"C"' + locale the characters A" and a" do not match but in a locale which + regards these characters as parts of the alphabet they do match. + + `strcasecmp' is derived from BSD. + + - Function: int wcscasecmp (const wchar_t *WS1, const wchar_T *WS2) + This function is like `wcscmp', except that differences in case are + ignored. How uppercase and lowercase characters are related is + determined by the currently selected locale. In the standard `"C"' + locale the characters A" and a" do not match but in a locale which + regards these characters as parts of the alphabet they do match. + + `wcscasecmp' is a GNU extension. + + - Function: int strncmp (const char *S1, const char *S2, size_t SIZE) + This function is the similar to `strcmp', except that no more than + SIZE wide characters are compared. In other words, if the two + strings are the same in their first SIZE wide characters, the + return value is zero. + + - Function: int wcsncmp (const wchar_t *WS1, const wchar_t *WS2, + size_t SIZE) + This function is the similar to `wcscmp', except that no more than + SIZE wide characters are compared. In other words, if the two + strings are the same in their first SIZE wide characters, the + return value is zero. + + - Function: int strncasecmp (const char *S1, const char *S2, size_t N) + This function is like `strncmp', except that differences in case + are ignored. Like `strcasecmp', it is locale dependent how + uppercase and lowercase characters are related. + + `strncasecmp' is a GNU extension. + + - Function: int wcsncasecmp (const wchar_t *WS1, const wchar_t *S2, + size_t N) + This function is like `wcsncmp', except that differences in case + are ignored. Like `wcscasecmp', it is locale dependent how + uppercase and lowercase characters are related. + + `wcsncasecmp' is a GNU extension. + + Here are some examples showing the use of `strcmp' and `strncmp' +(equivalent examples can be constructed for the wide character +functions). These examples assume the use of the ASCII character set. +(If some other character set--say, EBCDIC--is used instead, then the +glyphs are associated with different numeric codes, and the return +values and ordering may differ.) + + strcmp ("hello", "hello") + => 0 /* These two strings are the same. */ + strcmp ("hello", "Hello") + => 32 /* Comparisons are case-sensitive. */ + strcmp ("hello", "world") + => -15 /* The character `'h'' comes before `'w''. */ + strcmp ("hello", "hello, world") + => -44 /* Comparing a null character against a comma. */ + strncmp ("hello", "hello, world", 5) + => 0 /* The initial 5 characters are the same. */ + strncmp ("hello, world", "hello, stupid world!!!", 5) + => 0 /* The initial 5 characters are the same. */ + + - Function: int strverscmp (const char *S1, const char *S2) + The `strverscmp' function compares the string S1 against S2, + considering them as holding indices/version numbers. Return value + follows the same conventions as found in the `strverscmp' + function. In fact, if S1 and S2 contain no digits, `strverscmp' + behaves like `strcmp'. + + Basically, we compare strings normally (character by character), + until we find a digit in each string - then we enter a special + comparison mode, where each sequence of digits is taken as a + whole. If we reach the end of these two parts without noticing a + difference, we return to the standard comparison mode. There are + two types of numeric parts: "integral" and "fractional" (those + begin with a '0'). The types of the numeric parts affect the way + we sort them: + + * integral/integral: we compare values as you would expect. + + * fractional/integral: the fractional part is less than the + integral one. Again, no surprise. + + * fractional/fractional: the things become a bit more complex. + If the common prefix contains only leading zeroes, the + longest part is less than the other one; else the comparison + behaves normally. + + strverscmp ("no digit", "no digit") + => 0 /* same behavior as strcmp. */ + strverscmp ("item#99", "item#100") + => <0 /* same prefix, but 99 < 100. */ + strverscmp ("alpha1", "alpha001") + => >0 /* fractional part inferior to integral one. */ + strverscmp ("part1_f012", "part1_f01") + => >0 /* two fractional parts. */ + strverscmp ("foo.009", "foo.0") + => <0 /* idem, but with leading zeroes only. */ + + This function is especially useful when dealing with filename + sorting, because filenames frequently hold indices/version numbers. + + `strverscmp' is a GNU extension. + + - Function: int bcmp (const void *A1, const void *A2, size_t SIZE) + This is an obsolete alias for `memcmp', derived from BSD. + + File: libc.info, Node: Collation Functions, Next: Search Functions, Prev: String/Array Comparison, Up: String and Array Utilities Collation Functions @@ -271,877 +1128,4 @@ Note the additional multiplication with *Compatibility Note:* The string collation functions are a new feature of ISO C90. Older C dialects have no equivalent feature. The wide character versions were introduced in Amendment 1 to ISO C90. - - -File: libc.info, Node: Search Functions, Next: Finding Tokens in a String, Prev: Collation Functions, Up: String and Array Utilities - -Search Functions -================ - - This section describes library functions which perform various kinds -of searching operations on strings and arrays. These functions are -declared in the header file `string.h'. - - - Function: void * memchr (const void *BLOCK, int C, size_t SIZE) - This function finds the first occurrence of the byte C (converted - to an `unsigned char') in the initial SIZE bytes of the object - beginning at BLOCK. The return value is a pointer to the located - byte, or a null pointer if no match was found. - - - Function: wchar_t * wmemchr (const wchar_t *BLOCK, wchar_t WC, - size_t SIZE) - This function finds the first occurrence of the wide character WC - in the initial SIZE wide characters of the object beginning at - BLOCK. The return value is a pointer to the located wide - character, or a null pointer if no match was found. - - - Function: void * rawmemchr (const void *BLOCK, int C) - Often the `memchr' function is used with the knowledge that the - byte C is available in the memory block specified by the - parameters. But this means that the SIZE parameter is not really - needed and that the tests performed with it at runtime (to check - whether the end of the block is reached) are not needed. - - The `rawmemchr' function exists for just this situation which is - surprisingly frequent. The interface is similar to `memchr' except - that the SIZE parameter is missing. The function will look beyond - the end of the block pointed to by BLOCK in case the programmer - made an error in assuming that the byte C is present in the block. - In this case the result is unspecified. Otherwise the return - value is a pointer to the located byte. - - This function is of special interest when looking for the end of a - string. Since all strings are terminated by a null byte a call - like - - rawmemchr (str, '\0') - - will never go beyond the end of the string. - - This function is a GNU extension. - - - Function: void * memrchr (const void *BLOCK, int C, size_t SIZE) - The function `memrchr' is like `memchr', except that it searches - backwards from the end of the block defined by BLOCK and SIZE - (instead of forwards from the front). - - - Function: char * strchr (const char *STRING, int C) - The `strchr' function finds the first occurrence of the character - C (converted to a `char') in the null-terminated string beginning - at STRING. The return value is a pointer to the located - character, or a null pointer if no match was found. - - For example, - strchr ("hello, world", 'l') - => "llo, world" - strchr ("hello, world", '?') - => NULL - - The terminating null character is considered to be part of the - string, so you can use this function get a pointer to the end of a - string by specifying a null character as the value of the C - argument. It would be better (but less portable) to use - `strchrnul' in this case, though. - - - Function: wchar_t * wcschr (const wchar_t *WSTRING, int WC) - The `wcschr' function finds the first occurrence of the wide - character WC in the null-terminated wide character string - beginning at WSTRING. The return value is a pointer to the - located wide character, or a null pointer if no match was found. - - The terminating null character is considered to be part of the wide - character string, so you can use this function get a pointer to - the end of a wide character string by specifying a null wude - character as the value of the WC argument. It would be better - (but less portable) to use `wcschrnul' in this case, though. - - - Function: char * strchrnul (const char *STRING, int C) - `strchrnul' is the same as `strchr' except that if it does not - find the character, it returns a pointer to string's terminating - null character rather than a null pointer. - - This function is a GNU extension. - - - Function: wchar_t * wcschrnul (const wchar_t *WSTRING, wchar_t WC) - `wcschrnul' is the same as `wcschr' except that if it does not - find the wide character, it returns a pointer to wide character - string's terminating null wide character rather than a null - pointer. - - This function is a GNU extension. - - One useful, but unusual, use of the `strchr' function is when one -wants to have a pointer pointing to the NUL byte terminating a string. -This is often written in this way: - - s += strlen (s); - -This is almost optimal but the addition operation duplicated a bit of -the work already done in the `strlen' function. A better solution is -this: - - s = strchr (s, '\0'); - - There is no restriction on the second parameter of `strchr' so it -could very well also be the NUL character. Those readers thinking very -hard about this might now point out that the `strchr' function is more -expensive than the `strlen' function since we have two abort criteria. -This is right. But in the GNU C library the implementation of `strchr' -is optimized in a special way so that `strchr' actually is faster. - - - Function: char * strrchr (const char *STRING, int C) - The function `strrchr' is like `strchr', except that it searches - backwards from the end of the string STRING (instead of forwards - from the front). - - For example, - strrchr ("hello, world", 'l') - => "ld" - - - Function: wchar_t * wcsrchr (const wchar_t *WSTRING, wchar_t C) - The function `wcsrchr' is like `wcschr', except that it searches - backwards from the end of the string WSTRING (instead of forwards - from the front). - - - Function: char * strstr (const char *HAYSTACK, const char *NEEDLE) - This is like `strchr', except that it searches HAYSTACK for a - substring NEEDLE rather than just a single character. It returns - a pointer into the string HAYSTACK that is the first character of - the substring, or a null pointer if no match was found. If NEEDLE - is an empty string, the function returns HAYSTACK. - - For example, - strstr ("hello, world", "l") - => "llo, world" - strstr ("hello, world", "wo") - => "world" - - - Function: wchar_t * wcsstr (const wchar_t *HAYSTACK, const wchar_t - *NEEDLE) - This is like `wcschr', except that it searches HAYSTACK for a - substring NEEDLE rather than just a single wide character. It - returns a pointer into the string HAYSTACK that is the first wide - character of the substring, or a null pointer if no match was - found. If NEEDLE is an empty string, the function returns - HAYSTACK. - - - Function: wchar_t * wcswcs (const wchar_t *HAYSTACK, const wchar_t - *NEEDLE) - `wcsstr' is an depricated alias for `wcsstr'. This is the name - originally used in the X/Open Portability Guide before the - Amendment 1 to ISO C90 was published. - - - Function: char * strcasestr (const char *HAYSTACK, const char - *NEEDLE) - This is like `strstr', except that it ignores case in searching for - the substring. Like `strcasecmp', it is locale dependent how - uppercase and lowercase characters are related. - - For example, - strstr ("hello, world", "L") - => "llo, world" - strstr ("hello, World", "wo") - => "World" - - - Function: void * memmem (const void *HAYSTACK, size_t HAYSTACK-LEN, - const void *NEEDLE, size_t NEEDLE-LEN) - This is like `strstr', but NEEDLE and HAYSTACK are byte arrays - rather than null-terminated strings. NEEDLE-LEN is the length of - NEEDLE and HAYSTACK-LEN is the length of HAYSTACK. - - This function is a GNU extension. - - - Function: size_t strspn (const char *STRING, const char *SKIPSET) - The `strspn' ("string span") function returns the length of the - initial substring of STRING that consists entirely of characters - that are members of the set specified by the string SKIPSET. The - order of the characters in SKIPSET is not important. - - For example, - strspn ("hello, world", "abcdefghijklmnopqrstuvwxyz") - => 5 - - Note that "character" is here used in the sense of byte. In a - string using a multibyte character encoding (abstract) character - consisting of more than one byte are not treated as an entity. - Each byte is treated separately. The function is not - locale-dependent. - - - Function: size_t wcsspn (const wchar_t *WSTRING, const wchar_t - *SKIPSET) - The `wcsspn' ("wide character string span") function returns the - length of the initial substring of WSTRING that consists entirely - of wide characters that are members of the set specified by the - string SKIPSET. The order of the wide characters in SKIPSET is not - important. - - - Function: size_t strcspn (const char *STRING, const char *STOPSET) - The `strcspn' ("string complement span") function returns the - length of the initial substring of STRING that consists entirely - of characters that are _not_ members of the set specified by the - string STOPSET. (In other words, it returns the offset of the - first character in STRING that is a member of the set STOPSET.) - - For example, - strcspn ("hello, world", " \t\n,.;!?") - => 5 - - Note that "character" is here used in the sense of byte. In a - string using a multibyte character encoding (abstract) character - consisting of more than one byte are not treated as an entity. - Each byte is treated separately. The function is not - locale-dependent. - - - Function: size_t wcscspn (const wchar_t *WSTRING, const wchar_t - *STOPSET) - The `wcscspn' ("wide character string complement span") function - returns the length of the initial substring of WSTRING that - consists entirely of wide characters that are _not_ members of the - set specified by the string STOPSET. (In other words, it returns - the offset of the first character in STRING that is a member of - the set STOPSET.) - - - Function: char * strpbrk (const char *STRING, const char *STOPSET) - The `strpbrk' ("string pointer break") function is related to - `strcspn', except that it returns a pointer to the first character - in STRING that is a member of the set STOPSET instead of the - length of the initial substring. It returns a null pointer if no - such character from STOPSET is found. - - For example, - - strpbrk ("hello, world", " \t\n,.;!?") - => ", world" - - Note that "character" is here used in the sense of byte. In a - string using a multibyte character encoding (abstract) character - consisting of more than one byte are not treated as an entity. - Each byte is treated separately. The function is not - locale-dependent. - - - Function: wchar_t * wcspbrk (const wchar_t *WSTRING, const wchar_t - *STOPSET) - The `wcspbrk' ("wide character string pointer break") function is - related to `wcscspn', except that it returns a pointer to the first - wide character in WSTRING that is a member of the set STOPSET - instead of the length of the initial substring. It returns a null - pointer if no such character from STOPSET is found. - -Compatibility String Search Functions -------------------------------------- - - - Function: char * index (const char *STRING, int C) - `index' is another name for `strchr'; they are exactly the same. - New code should always use `strchr' since this name is defined in - ISO C while `index' is a BSD invention which never was available - on System V derived systems. - - - Function: char * rindex (const char *STRING, int C) - `rindex' is another name for `strrchr'; they are exactly the same. - New code should always use `strrchr' since this name is defined in - ISO C while `rindex' is a BSD invention which never was available - on System V derived systems. - - -File: libc.info, Node: Finding Tokens in a String, Next: strfry, Prev: Search Functions, Up: String and Array Utilities - -Finding Tokens in a String -========================== - - It's fairly common for programs to have a need to do some simple -kinds of lexical analysis and parsing, such as splitting a command -string up into tokens. You can do this with the `strtok' function, -declared in the header file `string.h'. - - - Function: char * strtok (char *restrict NEWSTRING, const char - *restrict DELIMITERS) - A string can be split into tokens by making a series of calls to - the function `strtok'. - - The string to be split up is passed as the NEWSTRING argument on - the first call only. The `strtok' function uses this to set up - some internal state information. Subsequent calls to get - additional tokens from the same string are indicated by passing a - null pointer as the NEWSTRING argument. Calling `strtok' with - another non-null NEWSTRING argument reinitializes the state - information. It is guaranteed that no other library function ever - calls `strtok' behind your back (which would mess up this internal - state information). - - The DELIMITERS argument is a string that specifies a set of - delimiters that may surround the token being extracted. All the - initial characters that are members of this set are discarded. - The first character that is _not_ a member of this set of - delimiters marks the beginning of the next token. The end of the - token is found by looking for the next character that is a member - of the delimiter set. This character in the original string - NEWSTRING is overwritten by a null character, and the pointer to - the beginning of the token in NEWSTRING is returned. - - On the next call to `strtok', the searching begins at the next - character beyond the one that marked the end of the previous token. - Note that the set of delimiters DELIMITERS do not have to be the - same on every call in a series of calls to `strtok'. - - If the end of the string NEWSTRING is reached, or if the remainder - of string consists only of delimiter characters, `strtok' returns - a null pointer. - - Note that "character" is here used in the sense of byte. In a - string using a multibyte character encoding (abstract) character - consisting of more than one byte are not treated as an entity. - Each byte is treated separately. The function is not - locale-dependent. - - Note that "character" is here used in the sense of byte. In a - string using a multibyte character encoding (abstract) character - consisting of more than one byte are not treated as an entity. - Each byte is treated separately. The function is not - locale-dependent. - - - Function: wchar_t * wcstok (wchar_t *NEWSTRING, const char - *DELIMITERS) - A string can be split into tokens by making a series of calls to - the function `wcstok'. - - The string to be split up is passed as the NEWSTRING argument on - the first call only. The `wcstok' function uses this to set up - some internal state information. Subsequent calls to get - additional tokens from the same wide character string are - indicated by passing a null pointer as the NEWSTRING argument. - Calling `wcstok' with another non-null NEWSTRING argument - reinitializes the state information. It is guaranteed that no - other library function ever calls `wcstok' behind your back (which - would mess up this internal state information). - - The DELIMITERS argument is a wide character string that specifies - a set of delimiters that may surround the token being extracted. - All the initial wide characters that are members of this set are - discarded. The first wide character that is _not_ a member of - this set of delimiters marks the beginning of the next token. The - end of the token is found by looking for the next wide character - that is a member of the delimiter set. This wide character in the - original wide character string NEWSTRING is overwritten by a null - wide character, and the pointer to the beginning of the token in - NEWSTRING is returned. - - On the next call to `wcstok', the searching begins at the next - wide character beyond the one that marked the end of the previous - token. Note that the set of delimiters DELIMITERS do not have to - be the same on every call in a series of calls to `wcstok'. - - If the end of the wide character string NEWSTRING is reached, or - if the remainder of string consists only of delimiter wide - characters, `wcstok' returns a null pointer. - - Note that "character" is here used in the sense of byte. In a - string using a multibyte character encoding (abstract) character - consisting of more than one byte are not treated as an entity. - Each byte is treated separately. The function is not - locale-dependent. - - *Warning:* Since `strtok' and `wcstok' alter the string they is -parsing, you should always copy the string to a temporary buffer before -parsing it with `strtok'/`wcstok' (*note Copying and Concatenation::). -If you allow `strtok' or `wcstok' to modify a string that came from -another part of your program, you are asking for trouble; that string -might be used for other purposes after `strtok' or `wcstok' has -modified it, and it would not have the expected value. - - The string that you are operating on might even be a constant. Then -when `strtok' or `wcstok' tries to modify it, your program will get a -fatal signal for writing in read-only memory. *Note Program Error -Signals::. Even if the operation of `strtok' or `wcstok' would not -require a modification of the string (e.g., if there is exactly one -token) the string can (and in the GNU libc case will) be modified. - - This is a special case of a general principle: if a part of a program -does not have as its purpose the modification of a certain data -structure, then it is error-prone to modify the data structure -temporarily. - - The functions `strtok' and `wcstok' are not reentrant. *Note -Nonreentrancy::, for a discussion of where and why reentrancy is -important. - - Here is a simple example showing the use of `strtok'. - - #include - #include - - ... - - const char string[] = "words separated by spaces -- and, punctuation!"; - const char delimiters[] = " .,;:!-"; - char *token, *cp; - - ... - - cp = strdupa (string); /* Make writable copy. */ - token = strtok (cp, delimiters); /* token => "words" */ - token = strtok (NULL, delimiters); /* token => "separated" */ - token = strtok (NULL, delimiters); /* token => "by" */ - token = strtok (NULL, delimiters); /* token => "spaces" */ - token = strtok (NULL, delimiters); /* token => "and" */ - token = strtok (NULL, delimiters); /* token => "punctuation" */ - token = strtok (NULL, delimiters); /* token => NULL */ - - The GNU C library contains two more functions for tokenizing a string -which overcome the limitation of non-reentrancy. They are only -available for multibyte character strings. - - - Function: char * strtok_r (char *NEWSTRING, const char *DELIMITERS, - char **SAVE_PTR) - Just like `strtok', this function splits the string into several - tokens which can be accessed by successive calls to `strtok_r'. - The difference is that the information about the next token is - stored in the space pointed to by the third argument, SAVE_PTR, - which is a pointer to a string pointer. Calling `strtok_r' with a - null pointer for NEWSTRING and leaving SAVE_PTR between the calls - unchanged does the job without hindering reentrancy. - - This function is defined in POSIX.1 and can be found on many - systems which support multi-threading. - - - Function: char * strsep (char **STRING_PTR, const char *DELIMITER) - This function has a similar functionality as `strtok_r' with the - NEWSTRING argument replaced by the SAVE_PTR argument. The - initialization of the moving pointer has to be done by the user. - Successive calls to `strsep' move the pointer along the tokens - separated by DELIMITER, returning the address of the next token - and updating STRING_PTR to point to the beginning of the next - token. - - One difference between `strsep' and `strtok_r' is that if the - input string contains more than one character from DELIMITER in a - row `strsep' returns an empty string for each pair of characters - from DELIMITER. This means that a program normally should test - for `strsep' returning an empty string before processing it. - - This function was introduced in 4.3BSD and therefore is widely - available. - - Here is how the above example looks like when `strsep' is used. - - #include - #include - - ... - - const char string[] = "words separated by spaces -- and, punctuation!"; - const char delimiters[] = " .,;:!-"; - char *running; - char *token; - - ... - - running = strdupa (string); - token = strsep (&running, delimiters); /* token => "words" */ - token = strsep (&running, delimiters); /* token => "separated" */ - token = strsep (&running, delimiters); /* token => "by" */ - token = strsep (&running, delimiters); /* token => "spaces" */ - token = strsep (&running, delimiters); /* token => "" */ - token = strsep (&running, delimiters); /* token => "" */ - token = strsep (&running, delimiters); /* token => "" */ - token = strsep (&running, delimiters); /* token => "and" */ - token = strsep (&running, delimiters); /* token => "" */ - token = strsep (&running, delimiters); /* token => "punctuation" */ - token = strsep (&running, delimiters); /* token => "" */ - token = strsep (&running, delimiters); /* token => NULL */ - - - Function: char * basename (const char *FILENAME) - The GNU version of the `basename' function returns the last - component of the path in FILENAME. This function is the prefered - usage, since it does not modify the argument, FILENAME, and - respects trailing slashes. The prototype for `basename' can be - found in `string.h'. Note, this function is overriden by the XPG - version, if `libgen.h' is included. - - Example of using GNU `basename': - - #include - - int - main (int argc, char *argv[]) - { - char *prog = basename (argv[0]); - - if (argc < 2) - { - fprintf (stderr, "Usage %s \n", prog); - exit (1); - } - - ... - } - - *Portability Note:* This function may produce different results on - different systems. - - - - Function: char * basename (char *PATH) - This is the standard XPG defined `basename'. It is similar in - spirit to the GNU version, but may modify the PATH by removing - trailing '/' characters. If the PATH is made up entirely of '/' - characters, then "/" will be returned. Also, if PATH is `NULL' or - an empty string, then "." is returned. The prototype for the XPG - version can be found in `libgen.h'. - - Example of using XPG `basename': - - #include - - int - main (int argc, char *argv[]) - { - char *prog; - char *path = strdupa (argv[0]); - - prog = basename (path); - - if (argc < 2) - { - fprintf (stderr, "Usage %s \n", prog); - exit (1); - } - - ... - - } - - - Function: char * dirname (char *PATH) - The `dirname' function is the compliment to the XPG version of - `basename'. It returns the parent directory of the file specified - by PATH. If PATH is `NULL', an empty string, or contains no '/' - characters, then "." is returned. The prototype for this function - can be found in `libgen.h'. - - -File: libc.info, Node: strfry, Next: Trivial Encryption, Prev: Finding Tokens in a String, Up: String and Array Utilities - -strfry -====== - - The function below addresses the perennial programming quandary: -"How do I take good data in string form and painlessly turn it into -garbage?" This is actually a fairly simple task for C programmers who -do not use the GNU C library string functions, but for programs based -on the GNU C library, the `strfry' function is the preferred method for -destroying string data. - - The prototype for this function is in `string.h'. - - - Function: char * strfry (char *STRING) - `strfry' creates a pseudorandom anagram of a string, replacing the - input with the anagram in place. For each position in the string, - `strfry' swaps it with a position in the string selected at random - (from a uniform distribution). The two positions may be the same. - - The return value of `strfry' is always STRING. - - *Portability Note:* This function is unique to the GNU C library. - - - -File: libc.info, Node: Trivial Encryption, Next: Encode Binary Data, Prev: strfry, Up: String and Array Utilities - -Trivial Encryption -================== - - The `memfrob' function converts an array of data to something -unrecognizable and back again. It is not encryption in its usual sense -since it is easy for someone to convert the encrypted data back to clear -text. The transformation is analogous to Usenet's "Rot13" encryption -method for obscuring offensive jokes from sensitive eyes and such. -Unlike Rot13, `memfrob' works on arbitrary binary data, not just text. - - For true encryption, *Note Cryptographic Functions::. - - This function is declared in `string.h'. - - - Function: void * memfrob (void *MEM, size_t LENGTH) - `memfrob' transforms (frobnicates) each byte of the data structure - at MEM, which is LENGTH bytes long, by bitwise exclusive oring it - with binary 00101010. It does the transformation in place and its - return value is always MEM. - - Note that `memfrob' a second time on the same data structure - returns it to its original state. - - This is a good function for hiding information from someone who - doesn't want to see it or doesn't want to see it very much. To - really prevent people from retrieving the information, use - stronger encryption such as that described in *Note Cryptographic - Functions::. - - *Portability Note:* This function is unique to the GNU C library. - - - -File: libc.info, Node: Encode Binary Data, Next: Argz and Envz Vectors, Prev: Trivial Encryption, Up: String and Array Utilities - -Encode Binary Data -================== - - To store or transfer binary data in environments which only support -text one has to encode the binary data by mapping the input bytes to -characters in the range allowed for storing or transfering. SVID -systems (and nowadays XPG compliant systems) provide minimal support for -this task. - - - Function: char * l64a (long int N) - This function encodes a 32-bit input value using characters from - the basic character set. It returns a pointer to a 6 character - buffer which contains an encoded version of N. To encode a series - of bytes the user must copy the returned string to a destination - buffer. It returns the empty string if N is zero, which is - somewhat bizarre but mandated by the standard. - *Warning:* Since a static buffer is used this function should not - be used in multi-threaded programs. There is no thread-safe - alternative to this function in the C library. - *Compatibility Note:* The XPG standard states that the return - value of `l64a' is undefined if N is negative. In the GNU - implementation, `l64a' treats its argument as unsigned, so it will - return a sensible encoding for any nonzero N; however, portable - programs should not rely on this. - - To encode a large buffer `l64a' must be called in a loop, once for - each 32-bit word of the buffer. For example, one could do - something like this: - - char * - encode (const void *buf, size_t len) - { - /* We know in advance how long the buffer has to be. */ - unsigned char *in = (unsigned char *) buf; - char *out = malloc (6 + ((len + 3) / 4) * 6 + 1); - char *cp = out; - - /* Encode the length. */ - /* Using `htonl' is necessary so that the data can be - decoded even on machines with different byte order. */ - - cp = mempcpy (cp, l64a (htonl (len)), 6); - - while (len > 3) - { - unsigned long int n = *in++; - n = (n << 8) | *in++; - n = (n << 8) | *in++; - n = (n << 8) | *in++; - len -= 4; - if (n) - cp = mempcpy (cp, l64a (htonl (n)), 6); - else - /* `l64a' returns the empty string for n==0, so we - must generate its encoding ("......") by hand. */ - cp = stpcpy (cp, "......"); - } - if (len > 0) - { - unsigned long int n = *in++; - if (--len > 0) - { - n = (n << 8) | *in++; - if (--len > 0) - n = (n << 8) | *in; - } - memcpy (cp, l64a (htonl (n)), 6); - cp += 6; - } - *cp = '\0'; - return out; - } - - It is strange that the library does not provide the complete - functionality needed but so be it. - - - To decode data produced with `l64a' the following function should be -used. - - - Function: long int a64l (const char *STRING) - The parameter STRING should contain a string which was produced by - a call to `l64a'. The function processes at least 6 characters of - this string, and decodes the characters it finds according to the - table below. It stops decoding when it finds a character not in - the table, rather like `atoi'; if you have a buffer which has been - broken into lines, you must be careful to skip over the - end-of-line characters. - - The decoded number is returned as a `long int' value. - - The `l64a' and `a64l' functions use a base 64 encoding, in which -each character of an encoded string represents six bits of an input -word. These symbols are used for the base 64 digits: - - 0 1 2 3 4 5 6 7 -0 `.' `/' `0' `1' `2' `3' `4' `5' -8 `6' `7' `8' `9' `A' `B' `C' `D' -16 `E' `F' `G' `H' `I' `J' `K' `L' -24 `M' `N' `O' `P' `Q' `R' `S' `T' -32 `U' `V' `W' `X' `Y' `Z' `a' `b' -40 `c' `d' `e' `f' `g' `h' `i' `j' -48 `k' `l' `m' `n' `o' `p' `q' `r' -56 `s' `t' `u' `v' `w' `x' `y' `z' - - This encoding scheme is not standard. There are some other encoding -methods which are much more widely used (UU encoding, MIME encoding). -Generally, it is better to use one of these encodings. - - -File: libc.info, Node: Argz and Envz Vectors, Prev: Encode Binary Data, Up: String and Array Utilities - -Argz and Envz Vectors -===================== - - "argz vectors" are vectors of strings in a contiguous block of -memory, each element separated from its neighbors by null-characters -(`'\0''). - - "Envz vectors" are an extension of argz vectors where each element -is a name-value pair, separated by a `'='' character (as in a Unix -environment). - -* Menu: - -* Argz Functions:: Operations on argz vectors. -* Envz Functions:: Additional operations on environment vectors. - - -File: libc.info, Node: Argz Functions, Next: Envz Functions, Up: Argz and Envz Vectors - -Argz Functions --------------- - - Each argz vector is represented by a pointer to the first element, of -type `char *', and a size, of type `size_t', both of which can be -initialized to `0' to represent an empty argz vector. All argz -functions accept either a pointer and a size argument, or pointers to -them, if they will be modified. - - The argz functions use `malloc'/`realloc' to allocate/grow argz -vectors, and so any argz vector creating using these functions may be -freed by using `free'; conversely, any argz function that may grow a -string expects that string to have been allocated using `malloc' (those -argz functions that only examine their arguments or modify them in -place will work on any sort of memory). *Note Unconstrained -Allocation::. - - All argz functions that do memory allocation have a return type of -`error_t', and return `0' for success, and `ENOMEM' if an allocation -error occurs. - - These functions are declared in the standard include file `argz.h'. - - - Function: error_t argz_create (char *const ARGV[], char **ARGZ, - size_t *ARGZ_LEN) - The `argz_create' function converts the Unix-style argument vector - ARGV (a vector of pointers to normal C strings, terminated by - `(char *)0'; *note Program Arguments::) into an argz vector with - the same elements, which is returned in ARGZ and ARGZ_LEN. - - - Function: error_t argz_create_sep (const char *STRING, int SEP, char - **ARGZ, size_t *ARGZ_LEN) - The `argz_create_sep' function converts the null-terminated string - STRING into an argz vector (returned in ARGZ and ARGZ_LEN) by - splitting it into elements at every occurrence of the character - SEP. - - - Function: size_t argz_count (const char *ARGZ, size_t ARG_LEN) - Returns the number of elements in the argz vector ARGZ and - ARGZ_LEN. - - - Function: void argz_extract (char *ARGZ, size_t ARGZ_LEN, char - **ARGV) - The `argz_extract' function converts the argz vector ARGZ and - ARGZ_LEN into a Unix-style argument vector stored in ARGV, by - putting pointers to every element in ARGZ into successive - positions in ARGV, followed by a terminator of `0'. ARGV must be - pre-allocated with enough space to hold all the elements in ARGZ - plus the terminating `(char *)0' (`(argz_count (ARGZ, ARGZ_LEN) + - 1) * sizeof (char *)' bytes should be enough). Note that the - string pointers stored into ARGV point into ARGZ--they are not - copies--and so ARGZ must be copied if it will be changed while - ARGV is still active. This function is useful for passing the - elements in ARGZ to an exec function (*note Executing a File::). - - - Function: void argz_stringify (char *ARGZ, size_t LEN, int SEP) - The `argz_stringify' converts ARGZ into a normal string with the - elements separated by the character SEP, by replacing each `'\0'' - inside ARGZ (except the last one, which terminates the string) - with SEP. This is handy for printing ARGZ in a readable manner. - - - Function: error_t argz_add (char **ARGZ, size_t *ARGZ_LEN, const - char *STR) - The `argz_add' function adds the string STR to the end of the argz - vector `*ARGZ', and updates `*ARGZ' and `*ARGZ_LEN' accordingly. - - - Function: error_t argz_add_sep (char **ARGZ, size_t *ARGZ_LEN, const - char *STR, int DELIM) - The `argz_add_sep' function is similar to `argz_add', but STR is - split into separate elements in the result at occurrences of the - character DELIM. This is useful, for instance, for adding the - components of a Unix search path to an argz vector, by using a - value of `':'' for DELIM. - - - Function: error_t argz_append (char **ARGZ, size_t *ARGZ_LEN, const - char *BUF, size_t BUF_LEN) - The `argz_append' function appends BUF_LEN bytes starting at BUF - to the argz vector `*ARGZ', reallocating `*ARGZ' to accommodate - it, and adding BUF_LEN to `*ARGZ_LEN'. - - - Function: error_t argz_delete (char **ARGZ, size_t *ARGZ_LEN, char - *ENTRY) - If ENTRY points to the beginning of one of the elements in the - argz vector `*ARGZ', the `argz_delete' function will remove this - entry and reallocate `*ARGZ', modifying `*ARGZ' and `*ARGZ_LEN' - accordingly. Note that as destructive argz functions usually - reallocate their argz argument, pointers into argz vectors such as - ENTRY will then become invalid. - - - Function: error_t argz_insert (char **ARGZ, size_t *ARGZ_LEN, char - *BEFORE, const char *ENTRY) - The `argz_insert' function inserts the string ENTRY into the argz - vector `*ARGZ' at a point just before the existing element pointed - to by BEFORE, reallocating `*ARGZ' and updating `*ARGZ' and - `*ARGZ_LEN'. If BEFORE is `0', ENTRY is added to the end instead - (as if by `argz_add'). Since the first element is in fact the - same as `*ARGZ', passing in `*ARGZ' as the value of BEFORE will - result in ENTRY being inserted at the beginning. - - - Function: char * argz_next (char *ARGZ, size_t ARGZ_LEN, const char - *ENTRY) - The `argz_next' function provides a convenient way of iterating - over the elements in the argz vector ARGZ. It returns a pointer - to the next element in ARGZ after the element ENTRY, or `0' if - there are no elements following ENTRY. If ENTRY is `0', the first - element of ARGZ is returned. - - This behavior suggests two styles of iteration: - - char *entry = 0; - while ((entry = argz_next (ARGZ, ARGZ_LEN, entry))) - ACTION; - - (the double parentheses are necessary to make some C compilers - shut up about what they consider a questionable `while'-test) and: - - char *entry; - for (entry = ARGZ; - entry; - entry = argz_next (ARGZ, ARGZ_LEN, entry)) - ACTION; - - Note that the latter depends on ARGZ having a value of `0' if it - is empty (rather than a pointer to an empty block of memory); this - invariant is maintained for argz vectors created by the functions - here. - - - Function: error_t argz_replace (char **ARGZ, size_t *ARGZ_LEN, - const char *STR, const char *WITH, unsigned *REPLACE_COUNT) - Replace any occurrences of the string STR in ARGZ with WITH, - reallocating ARGZ as necessary. If REPLACE_COUNT is non-zero, - `*REPLACE_COUNT' will be incremented by number of replacements - performed. diff -durpN glibc-2.2.4/manual/libc.info-8 glibc-2.2.5/manual/libc.info-8 --- glibc-2.2.4/manual/libc.info-8 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-8 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,920 +33,965 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Envz Functions, Prev: Argz Functions, Up: Argz and Envz Vectors +File: libc.info, Node: Search Functions, Next: Finding Tokens in a String, Prev: Collation Functions, Up: String and Array Utilities -Envz Functions --------------- +Search Functions +================ - Envz vectors are just argz vectors with additional constraints on -the form of each element; as such, argz functions can also be used on -them, where it makes sense. + This section describes library functions which perform various kinds +of searching operations on strings and arrays. These functions are +declared in the header file `string.h'. - Each element in an envz vector is a name-value pair, separated by a -`'='' character; if multiple `'='' characters are present in an -element, those after the first are considered part of the value, and -treated like all other non-`'\0'' characters. + - Function: void * memchr (const void *BLOCK, int C, size_t SIZE) + This function finds the first occurrence of the byte C (converted + to an `unsigned char') in the initial SIZE bytes of the object + beginning at BLOCK. The return value is a pointer to the located + byte, or a null pointer if no match was found. - If _no_ `'='' characters are present in an element, that element is -considered the name of a "null" entry, as distinct from an entry with an -empty value: `envz_get' will return `0' if given the name of null -entry, whereas an entry with an empty value would result in a value of -`""'; `envz_entry' will still find such entries, however. Null entries -can be removed with `envz_strip' function. + - Function: wchar_t * wmemchr (const wchar_t *BLOCK, wchar_t WC, + size_t SIZE) + This function finds the first occurrence of the wide character WC + in the initial SIZE wide characters of the object beginning at + BLOCK. The return value is a pointer to the located wide + character, or a null pointer if no match was found. - As with argz functions, envz functions that may allocate memory (and -thus fail) have a return type of `error_t', and return either `0' or -`ENOMEM'. + - Function: void * rawmemchr (const void *BLOCK, int C) + Often the `memchr' function is used with the knowledge that the + byte C is available in the memory block specified by the + parameters. But this means that the SIZE parameter is not really + needed and that the tests performed with it at runtime (to check + whether the end of the block is reached) are not needed. - These functions are declared in the standard include file `envz.h'. + The `rawmemchr' function exists for just this situation which is + surprisingly frequent. The interface is similar to `memchr' except + that the SIZE parameter is missing. The function will look beyond + the end of the block pointed to by BLOCK in case the programmer + made an error in assuming that the byte C is present in the block. + In this case the result is unspecified. Otherwise the return + value is a pointer to the located byte. - - Function: char * envz_entry (const char *ENVZ, size_t ENVZ_LEN, - const char *NAME) - The `envz_entry' function finds the entry in ENVZ with the name - NAME, and returns a pointer to the whole entry--that is, the argz - element which begins with NAME followed by a `'='' character. If - there is no entry with that name, `0' is returned. + This function is of special interest when looking for the end of a + string. Since all strings are terminated by a null byte a call + like - - Function: char * envz_get (const char *ENVZ, size_t ENVZ_LEN, const - char *NAME) - The `envz_get' function finds the entry in ENVZ with the name NAME - (like `envz_entry'), and returns a pointer to the value portion of - that entry (following the `'=''). If there is no entry with that - name (or only a null entry), `0' is returned. + rawmemchr (str, '\0') - - Function: error_t envz_add (char **ENVZ, size_t *ENVZ_LEN, const - char *NAME, const char *VALUE) - The `envz_add' function adds an entry to `*ENVZ' (updating `*ENVZ' - and `*ENVZ_LEN') with the name NAME, and value VALUE. If an entry - with the same name already exists in ENVZ, it is removed first. - If VALUE is `0', then the new entry will the special null type of - entry (mentioned above). + will never go beyond the end of the string. - - Function: error_t envz_merge (char **ENVZ, size_t *ENVZ_LEN, const - char *ENVZ2, size_t ENVZ2_LEN, int OVERRIDE) - The `envz_merge' function adds each entry in ENVZ2 to ENVZ, as if - with `envz_add', updating `*ENVZ' and `*ENVZ_LEN'. If OVERRIDE is - true, then values in ENVZ2 will supersede those with the same name - in ENVZ, otherwise not. + This function is a GNU extension. - Null entries are treated just like other entries in this respect, - so a null entry in ENVZ can prevent an entry of the same name in - ENVZ2 from being added to ENVZ, if OVERRIDE is false. + - Function: void * memrchr (const void *BLOCK, int C, size_t SIZE) + The function `memrchr' is like `memchr', except that it searches + backwards from the end of the block defined by BLOCK and SIZE + (instead of forwards from the front). - - Function: void envz_strip (char **ENVZ, size_t *ENVZ_LEN) - The `envz_strip' function removes any null entries from ENVZ, - updating `*ENVZ' and `*ENVZ_LEN'. + - Function: char * strchr (const char *STRING, int C) + The `strchr' function finds the first occurrence of the character + C (converted to a `char') in the null-terminated string beginning + at STRING. The return value is a pointer to the located + character, or a null pointer if no match was found. - -File: libc.info, Node: Character Set Handling, Next: Locales, Prev: String and Array Utilities, Up: Top + For example, + strchr ("hello, world", 'l') + => "llo, world" + strchr ("hello, world", '?') + => NULL -Character Set Handling -********************** + The terminating null character is considered to be part of the + string, so you can use this function get a pointer to the end of a + string by specifying a null character as the value of the C + argument. It would be better (but less portable) to use + `strchrnul' in this case, though. - Character sets used in the early days of computing had only six, -seven, or eight bits for each character: there was never a case where -more than eight bits (one byte) were used to represent a single -character. The limitations of this approach became more apparent as -more people grappled with non-Roman character sets, where not all the -characters that make up a language's character set can be represented -by 2^8 choices. This chapter shows the functionality which was added -to the C library to support multiple character sets. + - Function: wchar_t * wcschr (const wchar_t *WSTRING, int WC) + The `wcschr' function finds the first occurrence of the wide + character WC in the null-terminated wide character string + beginning at WSTRING. The return value is a pointer to the + located wide character, or a null pointer if no match was found. -* Menu: + The terminating null character is considered to be part of the wide + character string, so you can use this function get a pointer to + the end of a wide character string by specifying a null wude + character as the value of the WC argument. It would be better + (but less portable) to use `wcschrnul' in this case, though. -* Extended Char Intro:: Introduction to Extended Characters. -* Charset Function Overview:: Overview about Character Handling - Functions. -* Restartable multibyte conversion:: Restartable multibyte conversion - Functions. -* Non-reentrant Conversion:: Non-reentrant Conversion Function. -* Generic Charset Conversion:: Generic Charset Conversion. + - Function: char * strchrnul (const char *STRING, int C) + `strchrnul' is the same as `strchr' except that if it does not + find the character, it returns a pointer to string's terminating + null character rather than a null pointer. - -File: libc.info, Node: Extended Char Intro, Next: Charset Function Overview, Up: Character Set Handling + This function is a GNU extension. -Introduction to Extended Characters -=================================== + - Function: wchar_t * wcschrnul (const wchar_t *WSTRING, wchar_t WC) + `wcschrnul' is the same as `wcschr' except that if it does not + find the wide character, it returns a pointer to wide character + string's terminating null wide character rather than a null + pointer. - A variety of solutions to overcome the differences between character -sets with a 1:1 relation between bytes and characters and character -sets with ratios of 2:1 or 4:1 exist. The remainder of this section -gives a few examples to help understand the design decisions made while -developing the functionality of the C library. + This function is a GNU extension. - A distinction we have to make right away is between internal and -external representation. "Internal representation" means the -representation used by a program while keeping the text in memory. -External representations are used when text is stored or transmitted -through whatever communication channel. Examples of external -representations include files lying in a directory that are going to be -read and parsed. + One useful, but unusual, use of the `strchr' function is when one +wants to have a pointer pointing to the NUL byte terminating a string. +This is often written in this way: - Traditionally there has been no difference between the two -representations. It was equally comfortable and useful to use the same -single-byte representation internally and externally. This changes -with more and larger character sets. + s += strlen (s); - One of the problems to overcome with the internal representation is -handling text that is externally encoded using different character -sets. Assume a program which reads two texts and compares them using -some metric. The comparison can be usefully done only if the texts are -internally kept in a common format. +This is almost optimal but the addition operation duplicated a bit of +the work already done in the `strlen' function. A better solution is +this: - For such a common format (= character set) eight bits are certainly -no longer enough. So the smallest entity will have to grow: "wide -characters" will now be used. Instead of one byte, two or four will be -used instead. (Three are not good to address in memory and more than -four bytes seem not to be necessary). + s = strchr (s, '\0'); - As shown in some other part of this manual, there exists a -completely new family of functions which can handle texts of this kind -in memory. The most commonly used character sets for such internal -wide character representations are Unicode and ISO 10646 (also known as -UCS for Universal Character Set). Unicode was originally planned as a -16-bit character set, whereas ISO 10646 was designed to be a 31-bit -large code space. The two standards are practically identical. They -have the same character repertoire and code table, but Unicode specifies -added semantics. At the moment, only characters in the first `0x10000' -code positions (the so-called Basic Multilingual Plane, BMP) have been -assigned, but the assignment of more specialized characters outside this -16-bit space is already in progress. A number of encodings have been -defined for Unicode and ISO 10646 characters: UCS-2 is a 16-bit word -that can only represent characters from the BMP, UCS-4 is a 32-bit word -than can represent any Unicode and ISO 10646 character, UTF-8 is an -ASCII compatible encoding where ASCII characters are represented by -ASCII bytes and non-ASCII characters by sequences of 2-6 non-ASCII -bytes, and finally UTF-16 is an extension of UCS-2 in which pairs of -certain UCS-2 words can be used to encode non-BMP characters up to -`0x10ffff'. + There is no restriction on the second parameter of `strchr' so it +could very well also be the NUL character. Those readers thinking very +hard about this might now point out that the `strchr' function is more +expensive than the `strlen' function since we have two abort criteria. +This is right. But in the GNU C library the implementation of `strchr' +is optimized in a special way so that `strchr' actually is faster. - To represent wide characters the `char' type is not suitable. For -this reason the ISO C standard introduces a new type which is designed -to keep one character of a wide character string. To maintain the -similarity there is also a type corresponding to `int' for those -functions which take a single wide character. + - Function: char * strrchr (const char *STRING, int C) + The function `strrchr' is like `strchr', except that it searches + backwards from the end of the string STRING (instead of forwards + from the front). - - Data type: wchar_t - This data type is used as the base type for wide character strings. - I.e., arrays of objects of this type are the equivalent of `char[]' - for multibyte character strings. The type is defined in - `stddef.h'. + For example, + strrchr ("hello, world", 'l') + => "ld" - The ISO C90 standard, where this type was introduced, does not say - anything specific about the representation. It only requires that - this type is capable of storing all elements of the basic - character set. Therefore it would be legitimate to define - `wchar_t' as `char'. This might make sense for embedded systems. + - Function: wchar_t * wcsrchr (const wchar_t *WSTRING, wchar_t C) + The function `wcsrchr' is like `wcschr', except that it searches + backwards from the end of the string WSTRING (instead of forwards + from the front). - But for GNU systems this type is always 32 bits wide. It is - therefore capable of representing all UCS-4 values and therefore - covering all of ISO 10646. Some Unix systems define `wchar_t' as - a 16-bit type and thereby follow Unicode very strictly. This is - perfectly fine with the standard but it also means that to - represent all characters from Unicode and ISO 10646 one has to use - UTF-16 surrogate characters which is in fact a - multi-wide-character encoding. But this contradicts the purpose - of the `wchar_t' type. + - Function: char * strstr (const char *HAYSTACK, const char *NEEDLE) + This is like `strchr', except that it searches HAYSTACK for a + substring NEEDLE rather than just a single character. It returns + a pointer into the string HAYSTACK that is the first character of + the substring, or a null pointer if no match was found. If NEEDLE + is an empty string, the function returns HAYSTACK. - - Data type: wint_t - `wint_t' is a data type used for parameters and variables which - contain a single wide character. As the name already suggests it - is the equivalent to `int' when using the normal `char' strings. - The types `wchar_t' and `wint_t' have often the same - representation if their size if 32 bits wide but if `wchar_t' is - defined as `char' the type `wint_t' must be defined as `int' due - to the parameter promotion. + For example, + strstr ("hello, world", "l") + => "llo, world" + strstr ("hello, world", "wo") + => "world" - This type is defined in `wchar.h' and got introduced in - Amendment 1 to ISO C90. + - Function: wchar_t * wcsstr (const wchar_t *HAYSTACK, const wchar_t + *NEEDLE) + This is like `wcschr', except that it searches HAYSTACK for a + substring NEEDLE rather than just a single wide character. It + returns a pointer into the string HAYSTACK that is the first wide + character of the substring, or a null pointer if no match was + found. If NEEDLE is an empty string, the function returns + HAYSTACK. - As there are for the `char' data type there also exist macros -specifying the minimum and maximum value representable in an object of -type `wchar_t'. + - Function: wchar_t * wcswcs (const wchar_t *HAYSTACK, const wchar_t + *NEEDLE) + `wcsstr' is an depricated alias for `wcsstr'. This is the name + originally used in the X/Open Portability Guide before the + Amendment 1 to ISO C90 was published. - - Macro: wint_t WCHAR_MIN - The macro `WCHAR_MIN' evaluates to the minimum value representable - by an object of type `wint_t'. + - Function: char * strcasestr (const char *HAYSTACK, const char + *NEEDLE) + This is like `strstr', except that it ignores case in searching for + the substring. Like `strcasecmp', it is locale dependent how + uppercase and lowercase characters are related. - This macro got introduced in Amendment 1 to ISO C90. + For example, + strstr ("hello, world", "L") + => "llo, world" + strstr ("hello, World", "wo") + => "World" - - Macro: wint_t WCHAR_MAX - The macro `WCHAR_MAX' evaluates to the maximum value representable - by an object of type `wint_t'. + - Function: void * memmem (const void *HAYSTACK, size_t HAYSTACK-LEN, + const void *NEEDLE, size_t NEEDLE-LEN) + This is like `strstr', but NEEDLE and HAYSTACK are byte arrays + rather than null-terminated strings. NEEDLE-LEN is the length of + NEEDLE and HAYSTACK-LEN is the length of HAYSTACK. - This macro got introduced in Amendment 1 to ISO C90. + This function is a GNU extension. - Another special wide character value is the equivalent to `EOF'. + - Function: size_t strspn (const char *STRING, const char *SKIPSET) + The `strspn' ("string span") function returns the length of the + initial substring of STRING that consists entirely of characters + that are members of the set specified by the string SKIPSET. The + order of the characters in SKIPSET is not important. - - Macro: wint_t WEOF - The macro `WEOF' evaluates to a constant expression of type - `wint_t' whose value is different from any member of the extended - character set. + For example, + strspn ("hello, world", "abcdefghijklmnopqrstuvwxyz") + => 5 - `WEOF' need not be the same value as `EOF' and unlike `EOF' it - also need _not_ be negative. I.e., sloppy code like + Note that "character" is here used in the sense of byte. In a + string using a multibyte character encoding (abstract) character + consisting of more than one byte are not treated as an entity. + Each byte is treated separately. The function is not + locale-dependent. - { - int c; - ... - while ((c = getc (fp)) < 0) - ... - } + - Function: size_t wcsspn (const wchar_t *WSTRING, const wchar_t + *SKIPSET) + The `wcsspn' ("wide character string span") function returns the + length of the initial substring of WSTRING that consists entirely + of wide characters that are members of the set specified by the + string SKIPSET. The order of the wide characters in SKIPSET is not + important. - has to be rewritten to explicitly use `WEOF' when wide characters - are used. + - Function: size_t strcspn (const char *STRING, const char *STOPSET) + The `strcspn' ("string complement span") function returns the + length of the initial substring of STRING that consists entirely + of characters that are _not_ members of the set specified by the + string STOPSET. (In other words, it returns the offset of the + first character in STRING that is a member of the set STOPSET.) - { - wint_t c; - ... - while ((c = wgetc (fp)) != WEOF) - ... - } + For example, + strcspn ("hello, world", " \t\n,.;!?") + => 5 - This macro was introduced in Amendment 1 to ISO C90 and is defined - in `wchar.h'. + Note that "character" is here used in the sense of byte. In a + string using a multibyte character encoding (abstract) character + consisting of more than one byte are not treated as an entity. + Each byte is treated separately. The function is not + locale-dependent. - These internal representations present problems when it comes to -storing and transmittal, since a single wide character consists of more -than one byte they are effected by byte-ordering. I.e., machines with -different endianesses would see different value accessing the same data. -This also applies for communication protocols which are all byte-based -and therefore the sender has to decide about splitting the wide -character in bytes. A last (but not least important) point is that wide -characters often require more storage space than an customized byte -oriented character set. + - Function: size_t wcscspn (const wchar_t *WSTRING, const wchar_t + *STOPSET) + The `wcscspn' ("wide character string complement span") function + returns the length of the initial substring of WSTRING that + consists entirely of wide characters that are _not_ members of the + set specified by the string STOPSET. (In other words, it returns + the offset of the first character in STRING that is a member of + the set STOPSET.) - For all the above reasons, an external encoding which is different -from the internal encoding is often used if the latter is UCS-2 or -UCS-4. The external encoding is byte-based and can be chosen -appropriately for the environment and for the texts to be handled. -There exist a variety of different character sets which can be used for -this external encoding. Information which will not be exhaustively -presented here-instead, a description of the major groups will suffice. -All of the ASCII-based character sets [_bkoz_: do you mean Roman -character sets? If not, what do you mean here?] fulfill one -requirement: they are "filesystem safe". This means that the character -`'/'' is used in the encoding _only_ to represent itself. Things are a -bit different for character sets like EBCDIC (Extended Binary Coded -Decimal Interchange Code, a character set family used by IBM) but if the -operation system does not understand EBCDIC directly the parameters to -system calls have to be converted first anyhow. + - Function: char * strpbrk (const char *STRING, const char *STOPSET) + The `strpbrk' ("string pointer break") function is related to + `strcspn', except that it returns a pointer to the first character + in STRING that is a member of the set STOPSET instead of the + length of the initial substring. It returns a null pointer if no + such character from STOPSET is found. - * The simplest character sets are single-byte character sets. There - can be only up to 256 characters (for 8 bit character sets) which - is not sufficient to cover all languages but might be sufficient - to handle a specific text. Another reason to choose this is - because of constraints from interaction with other programs (which - might not be 8-bit clean). + For example, - * The ISO 2022 standard defines a mechanism for extended character - sets where one character _can_ be represented by more than one - byte. This is achieved by associating a state with the text. - Embedded in the text can be characters which can be used to change - the state. Each byte in the text might have a different - interpretation in each state. The state might even influence - whether a given byte stands for a character on its own or whether - it has to be combined with some more bytes. + strpbrk ("hello, world", " \t\n,.;!?") + => ", world" - In most uses of ISO 2022 the defined character sets do not allow - state changes which cover more than the next character. This has - the big advantage that whenever one can identify the beginning of - the byte sequence of a character one can interpret a text - correctly. Examples of character sets using this policy are the - various EUC character sets (used by Sun's operations systems, - EUC-JP, EUC-KR, EUC-TW, and EUC-CN) or Shift_JIS (SJIS, a Japanese - encoding). + Note that "character" is here used in the sense of byte. In a + string using a multibyte character encoding (abstract) character + consisting of more than one byte are not treated as an entity. + Each byte is treated separately. The function is not + locale-dependent. - But there are also character sets using a state which is valid for - more than one character and has to be changed by another byte - sequence. Examples for this are ISO-2022-JP, ISO-2022-KR, and - ISO-2022-CN. + - Function: wchar_t * wcspbrk (const wchar_t *WSTRING, const wchar_t + *STOPSET) + The `wcspbrk' ("wide character string pointer break") function is + related to `wcscspn', except that it returns a pointer to the first + wide character in WSTRING that is a member of the set STOPSET + instead of the length of the initial substring. It returns a null + pointer if no such character from STOPSET is found. - * Early attempts to fix 8 bit character sets for other languages - using the Roman alphabet lead to character sets like ISO 6937. - Here bytes representing characters like the acute accent do not - produce output themselves: one has to combine them with other - characters to get the desired result. E.g., the byte sequence - `0xc2 0x61' (non-spacing acute accent, following by lower-case - `a') to get the "small a with acute" character. To get the acute - accent character on its own, one has to write `0xc2 0x20' (the - non-spacing acute followed by a space). +Compatibility String Search Functions +------------------------------------- - This type of character set is used in some embedded systems such as - teletex. + - Function: char * index (const char *STRING, int C) + `index' is another name for `strchr'; they are exactly the same. + New code should always use `strchr' since this name is defined in + ISO C while `index' is a BSD invention which never was available + on System V derived systems. - * Instead of converting the Unicode or ISO 10646 text used - internally, it is often also sufficient to simply use an encoding - different than UCS-2/UCS-4. The Unicode and ISO 10646 standards - even specify such an encoding: UTF-8. This encoding is able to - represent all of ISO 10464 31 bits in a byte string of length one - to six. + - Function: char * rindex (const char *STRING, int C) + `rindex' is another name for `strrchr'; they are exactly the same. + New code should always use `strrchr' since this name is defined in + ISO C while `rindex' is a BSD invention which never was available + on System V derived systems. - There were a few other attempts to encode ISO 10646 such as UTF-7 - but UTF-8 is today the only encoding which should be used. In - fact, UTF-8 will hopefully soon be the only external encoding that - has to be supported. It proves to be universally usable and the - only disadvantage is that it favors Roman languages by making the - byte string representation of other scripts (Cyrillic, Greek, - Asian scripts) longer than necessary if using a specific character - set for these scripts. Methods like the Unicode compression - scheme can alleviate these problems. + +File: libc.info, Node: Finding Tokens in a String, Next: strfry, Prev: Search Functions, Up: String and Array Utilities - The question remaining is: how to select the character set or -encoding to use. The answer: you cannot decide about it yourself, it -is decided by the developers of the system or the majority of the -users. Since the goal is interoperability one has to use whatever the -other people one works with use. If there are no constraints the -selection is based on the requirements the expected circle of users -will have. I.e., if a project is expected to only be used in, say, -Russia it is fine to use KOI8-R or a similar character set. But if at -the same time people from, say, Greece are participating one should use -a character set which allows all people to collaborate. +Finding Tokens in a String +========================== - The most widely useful solution seems to be: go with the most general -character set, namely ISO 10646. Use UTF-8 as the external encoding -and problems about users not being able to use their own language -adequately are a thing of the past. + It's fairly common for programs to have a need to do some simple +kinds of lexical analysis and parsing, such as splitting a command +string up into tokens. You can do this with the `strtok' function, +declared in the header file `string.h'. - One final comment about the choice of the wide character -representation is necessary at this point. We have said above that the -natural choice is using Unicode or ISO 10646. This is not required, -but at least encouraged, by the ISO C standard. The standard defines -at least a macro `__STDC_ISO_10646__' that is only defined on systems -where the `wchar_t' type encodes ISO 10646 characters. If this symbol -is not defined one should as much as possible avoid making assumption -about the wide character representation. If the programmer uses only -the functions provided by the C library to handle wide character -strings there should not be any compatibility problems with other -systems. + - Function: char * strtok (char *restrict NEWSTRING, const char + *restrict DELIMITERS) + A string can be split into tokens by making a series of calls to + the function `strtok'. - -File: libc.info, Node: Charset Function Overview, Next: Restartable multibyte conversion, Prev: Extended Char Intro, Up: Character Set Handling + The string to be split up is passed as the NEWSTRING argument on + the first call only. The `strtok' function uses this to set up + some internal state information. Subsequent calls to get + additional tokens from the same string are indicated by passing a + null pointer as the NEWSTRING argument. Calling `strtok' with + another non-null NEWSTRING argument reinitializes the state + information. It is guaranteed that no other library function ever + calls `strtok' behind your back (which would mess up this internal + state information). -Overview about Character Handling Functions -=========================================== + The DELIMITERS argument is a string that specifies a set of + delimiters that may surround the token being extracted. All the + initial characters that are members of this set are discarded. + The first character that is _not_ a member of this set of + delimiters marks the beginning of the next token. The end of the + token is found by looking for the next character that is a member + of the delimiter set. This character in the original string + NEWSTRING is overwritten by a null character, and the pointer to + the beginning of the token in NEWSTRING is returned. - A Unix C library contains three different sets of functions in two -families to handle character set conversion. The one function family -is specified in the ISO C standard and therefore is portable even -beyond the Unix world. + On the next call to `strtok', the searching begins at the next + character beyond the one that marked the end of the previous token. + Note that the set of delimiters DELIMITERS do not have to be the + same on every call in a series of calls to `strtok'. - The most commonly known set of functions, coming from the ISO C90 -standard, is unfortunately the least useful one. In fact, these -functions should be avoided whenever possible, especially when -developing libraries (as opposed to applications). + If the end of the string NEWSTRING is reached, or if the remainder + of string consists only of delimiter characters, `strtok' returns + a null pointer. - The second family of functions got introduced in the early Unix -standards (XPG2) and is still part of the latest and greatest Unix -standard: Unix 98. It is also the most powerful and useful set of -functions. But we will start with the functions defined in Amendment 1 -to ISO C90. + Note that "character" is here used in the sense of byte. In a + string using a multibyte character encoding (abstract) character + consisting of more than one byte are not treated as an entity. + Each byte is treated separately. The function is not + locale-dependent. - -File: libc.info, Node: Restartable multibyte conversion, Next: Non-reentrant Conversion, Prev: Charset Function Overview, Up: Character Set Handling + Note that "character" is here used in the sense of byte. In a + string using a multibyte character encoding (abstract) character + consisting of more than one byte are not treated as an entity. + Each byte is treated separately. The function is not + locale-dependent. -Restartable Multibyte Conversion Functions -========================================== + - Function: wchar_t * wcstok (wchar_t *NEWSTRING, const char + *DELIMITERS) + A string can be split into tokens by making a series of calls to + the function `wcstok'. - The ISO C standard defines functions to convert strings from a -multibyte representation to wide character strings. There are a number -of peculiarities: + The string to be split up is passed as the NEWSTRING argument on + the first call only. The `wcstok' function uses this to set up + some internal state information. Subsequent calls to get + additional tokens from the same wide character string are + indicated by passing a null pointer as the NEWSTRING argument. + Calling `wcstok' with another non-null NEWSTRING argument + reinitializes the state information. It is guaranteed that no + other library function ever calls `wcstok' behind your back (which + would mess up this internal state information). - * The character set assumed for the multibyte encoding is not - specified as an argument to the functions. Instead the character - set specified by the `LC_CTYPE' category of the current locale is - used; see *Note Locale Categories::. + The DELIMITERS argument is a wide character string that specifies + a set of delimiters that may surround the token being extracted. + All the initial wide characters that are members of this set are + discarded. The first wide character that is _not_ a member of + this set of delimiters marks the beginning of the next token. The + end of the token is found by looking for the next wide character + that is a member of the delimiter set. This wide character in the + original wide character string NEWSTRING is overwritten by a null + wide character, and the pointer to the beginning of the token in + NEWSTRING is returned. - * The functions handling more than one character at a time require - NUL terminated strings as the argument. I.e., converting blocks - of text does not work unless one can add a NUL byte at an - appropriate place. The GNU C library contains some extensions the - standard which allow specifying a size but basically they also - expect terminated strings. + On the next call to `wcstok', the searching begins at the next + wide character beyond the one that marked the end of the previous + token. Note that the set of delimiters DELIMITERS do not have to + be the same on every call in a series of calls to `wcstok'. - Despite these limitations the ISO C functions can very well be used -in many contexts. In graphical user interfaces, for instance, it is not -uncommon to have functions which require text to be displayed in a wide -character string if it is not simple ASCII. The text itself might come -from a file with translations and the user should decide about the -current locale which determines the translation and therefore also the -external encoding used. In such a situation (and many others) the -functions described here are perfect. If more freedom while performing -the conversion is necessary take a look at the `iconv' functions (*note -Generic Charset Conversion::). + If the end of the wide character string NEWSTRING is reached, or + if the remainder of string consists only of delimiter wide + characters, `wcstok' returns a null pointer. -* Menu: + Note that "character" is here used in the sense of byte. In a + string using a multibyte character encoding (abstract) character + consisting of more than one byte are not treated as an entity. + Each byte is treated separately. The function is not + locale-dependent. -* Selecting the Conversion:: Selecting the conversion and its properties. -* Keeping the state:: Representing the state of the conversion. -* Converting a Character:: Converting Single Characters. -* Converting Strings:: Converting Multibyte and Wide Character - Strings. -* Multibyte Conversion Example:: A Complete Multibyte Conversion Example. + *Warning:* Since `strtok' and `wcstok' alter the string they is +parsing, you should always copy the string to a temporary buffer before +parsing it with `strtok'/`wcstok' (*note Copying and Concatenation::). +If you allow `strtok' or `wcstok' to modify a string that came from +another part of your program, you are asking for trouble; that string +might be used for other purposes after `strtok' or `wcstok' has +modified it, and it would not have the expected value. - -File: libc.info, Node: Selecting the Conversion, Next: Keeping the state, Up: Restartable multibyte conversion + The string that you are operating on might even be a constant. Then +when `strtok' or `wcstok' tries to modify it, your program will get a +fatal signal for writing in read-only memory. *Note Program Error +Signals::. Even if the operation of `strtok' or `wcstok' would not +require a modification of the string (e.g., if there is exactly one +token) the string can (and in the GNU libc case will) be modified. -Selecting the conversion and its properties -------------------------------------------- + This is a special case of a general principle: if a part of a program +does not have as its purpose the modification of a certain data +structure, then it is error-prone to modify the data structure +temporarily. - We already said above that the currently selected locale for the -`LC_CTYPE' category decides about the conversion which is performed by -the functions we are about to describe. Each locale uses its own -character set (given as an argument to `localedef') and this is the one -assumed as the external multibyte encoding. The wide character -character set always is UCS-4, at least on GNU systems. + The functions `strtok' and `wcstok' are not reentrant. *Note +Nonreentrancy::, for a discussion of where and why reentrancy is +important. - A characteristic of each multibyte character set is the maximum -number of bytes which can be necessary to represent one character. This -information is quite important when writing code which uses the -conversion functions. In the examples below we will see some examples. -The ISO C standard defines two macros which provide this information. + Here is a simple example showing the use of `strtok'. - - Macro: int MB_LEN_MAX - This macro specifies the maximum number of bytes in the multibyte - sequence for a single character in any of the supported locales. - It is a compile-time constant and it is defined in `limits.h'. + #include + #include + + ... + + const char string[] = "words separated by spaces -- and, punctuation!"; + const char delimiters[] = " .,;:!-"; + char *token, *cp; + + ... + + cp = strdupa (string); /* Make writable copy. */ + token = strtok (cp, delimiters); /* token => "words" */ + token = strtok (NULL, delimiters); /* token => "separated" */ + token = strtok (NULL, delimiters); /* token => "by" */ + token = strtok (NULL, delimiters); /* token => "spaces" */ + token = strtok (NULL, delimiters); /* token => "and" */ + token = strtok (NULL, delimiters); /* token => "punctuation" */ + token = strtok (NULL, delimiters); /* token => NULL */ - - Macro: int MB_CUR_MAX - `MB_CUR_MAX' expands into a positive integer expression that is the - maximum number of bytes in a multibyte character in the current - locale. The value is never greater than `MB_LEN_MAX'. Unlike - `MB_LEN_MAX' this macro need not be a compile-time constant and in - fact, in the GNU C library it is not. + The GNU C library contains two more functions for tokenizing a string +which overcome the limitation of non-reentrancy. They are only +available for multibyte character strings. - `MB_CUR_MAX' is defined in `stdlib.h'. + - Function: char * strtok_r (char *NEWSTRING, const char *DELIMITERS, + char **SAVE_PTR) + Just like `strtok', this function splits the string into several + tokens which can be accessed by successive calls to `strtok_r'. + The difference is that the information about the next token is + stored in the space pointed to by the third argument, SAVE_PTR, + which is a pointer to a string pointer. Calling `strtok_r' with a + null pointer for NEWSTRING and leaving SAVE_PTR between the calls + unchanged does the job without hindering reentrancy. - Two different macros are necessary since strictly ISO C90 compilers -do not allow variable length array definitions but still it is desirable -to avoid dynamic allocation. This incomplete piece of code shows the -problem: + This function is defined in POSIX.1 and can be found on many + systems which support multi-threading. - { - char buf[MB_LEN_MAX]; - ssize_t len = 0; + - Function: char * strsep (char **STRING_PTR, const char *DELIMITER) + This function has a similar functionality as `strtok_r' with the + NEWSTRING argument replaced by the SAVE_PTR argument. The + initialization of the moving pointer has to be done by the user. + Successive calls to `strsep' move the pointer along the tokens + separated by DELIMITER, returning the address of the next token + and updating STRING_PTR to point to the beginning of the next + token. + + One difference between `strsep' and `strtok_r' is that if the + input string contains more than one character from DELIMITER in a + row `strsep' returns an empty string for each pair of characters + from DELIMITER. This means that a program normally should test + for `strsep' returning an empty string before processing it. + + This function was introduced in 4.3BSD and therefore is widely + available. + + Here is how the above example looks like when `strsep' is used. + + #include + #include - while (! feof (fp)) - { - fread (&buf[len], 1, MB_CUR_MAX - len, fp); - /* ... process buf */ - len -= used; - } - } + ... + + const char string[] = "words separated by spaces -- and, punctuation!"; + const char delimiters[] = " .,;:!-"; + char *running; + char *token; + + ... + + running = strdupa (string); + token = strsep (&running, delimiters); /* token => "words" */ + token = strsep (&running, delimiters); /* token => "separated" */ + token = strsep (&running, delimiters); /* token => "by" */ + token = strsep (&running, delimiters); /* token => "spaces" */ + token = strsep (&running, delimiters); /* token => "" */ + token = strsep (&running, delimiters); /* token => "" */ + token = strsep (&running, delimiters); /* token => "" */ + token = strsep (&running, delimiters); /* token => "and" */ + token = strsep (&running, delimiters); /* token => "" */ + token = strsep (&running, delimiters); /* token => "punctuation" */ + token = strsep (&running, delimiters); /* token => "" */ + token = strsep (&running, delimiters); /* token => NULL */ - The code in the inner loop is expected to have always enough bytes in -the array BUF to convert one multibyte character. The array BUF has to -be sized statically since many compilers do not allow a variable size. -The `fread' call makes sure that always `MB_CUR_MAX' bytes are -available in BUF. Note that it isn't a problem if `MB_CUR_MAX' is not -a compile-time constant. + - Function: char * basename (const char *FILENAME) + The GNU version of the `basename' function returns the last + component of the path in FILENAME. This function is the preferred + usage, since it does not modify the argument, FILENAME, and + respects trailing slashes. The prototype for `basename' can be + found in `string.h'. Note, this function is overriden by the XPG + version, if `libgen.h' is included. + + Example of using GNU `basename': + + #include + + int + main (int argc, char *argv[]) + { + char *prog = basename (argv[0]); + + if (argc < 2) + { + fprintf (stderr, "Usage %s \n", prog); + exit (1); + } + + ... + } + + *Portability Note:* This function may produce different results on + different systems. + + + - Function: char * basename (char *PATH) + This is the standard XPG defined `basename'. It is similar in + spirit to the GNU version, but may modify the PATH by removing + trailing '/' characters. If the PATH is made up entirely of '/' + characters, then "/" will be returned. Also, if PATH is `NULL' or + an empty string, then "." is returned. The prototype for the XPG + version can be found in `libgen.h'. + + Example of using XPG `basename': + + #include + + int + main (int argc, char *argv[]) + { + char *prog; + char *path = strdupa (argv[0]); + + prog = basename (path); + + if (argc < 2) + { + fprintf (stderr, "Usage %s \n", prog); + exit (1); + } + + ... + + } + + - Function: char * dirname (char *PATH) + The `dirname' function is the compliment to the XPG version of + `basename'. It returns the parent directory of the file specified + by PATH. If PATH is `NULL', an empty string, or contains no '/' + characters, then "." is returned. The prototype for this function + can be found in `libgen.h'.  -File: libc.info, Node: Keeping the state, Next: Converting a Character, Prev: Selecting the Conversion, Up: Restartable multibyte conversion +File: libc.info, Node: strfry, Next: Trivial Encryption, Prev: Finding Tokens in a String, Up: String and Array Utilities -Representing the state of the conversion ----------------------------------------- +strfry +====== - In the introduction of this chapter it was said that certain -character sets use a "stateful" encoding. I.e., the encoded values -depend in some way on the previous bytes in the text. + The function below addresses the perennial programming quandary: +"How do I take good data in string form and painlessly turn it into +garbage?" This is actually a fairly simple task for C programmers who +do not use the GNU C library string functions, but for programs based +on the GNU C library, the `strfry' function is the preferred method for +destroying string data. - Since the conversion functions allow converting a text in more than -one step we must have a way to pass this information from one call of -the functions to another. + The prototype for this function is in `string.h'. - - Data type: mbstate_t - A variable of type `mbstate_t' can contain all the information - about the "shift state" needed from one call to a conversion - function to another. + - Function: char * strfry (char *STRING) + `strfry' creates a pseudorandom anagram of a string, replacing the + input with the anagram in place. For each position in the string, + `strfry' swaps it with a position in the string selected at random + (from a uniform distribution). The two positions may be the same. - This type is defined in `wchar.h'. It got introduced in - Amendment 1 to ISO C90. + The return value of `strfry' is always STRING. - To use objects of this type the programmer has to define such objects -(normally as local variables on the stack) and pass a pointer to the -object to the conversion functions. This way the conversion function -can update the object if the current multibyte character set is -stateful. + *Portability Note:* This function is unique to the GNU C library. - There is no specific function or initializer to put the state object -in any specific state. The rules are that the object should always -represent the initial state before the first use and this is achieved by -clearing the whole variable with code such as follows: - { - mbstate_t state; - memset (&state, '\0', sizeof (state)); - /* from now on STATE can be used. */ - ... - } + +File: libc.info, Node: Trivial Encryption, Next: Encode Binary Data, Prev: strfry, Up: String and Array Utilities - When using the conversion functions to generate output it is often -necessary to test whether the current state corresponds to the initial -state. This is necessary, for example, to decide whether or not to emit -escape sequences to set the state to the initial state at certain -sequence points. Communication protocols often require this. +Trivial Encryption +================== - - Function: int mbsinit (const mbstate_t *PS) - This function determines whether the state object pointed to by PS - is in the initial state or not. If PS is a null pointer or the - object is in the initial state the return value is nonzero. - Otherwise it is zero. + The `memfrob' function converts an array of data to something +unrecognizable and back again. It is not encryption in its usual sense +since it is easy for someone to convert the encrypted data back to clear +text. The transformation is analogous to Usenet's "Rot13" encryption +method for obscuring offensive jokes from sensitive eyes and such. +Unlike Rot13, `memfrob' works on arbitrary binary data, not just text. - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + For true encryption, *Note Cryptographic Functions::. - Code using this function often looks similar to this: + This function is declared in `string.h'. - { - mbstate_t state; - memset (&state, '\0', sizeof (state)); - /* Use STATE. */ - ... - if (! mbsinit (&state)) - { - /* Emit code to return to initial state. */ - const wchar_t empty[] = L""; - const wchar_t *srcp = empty; - wcsrtombs (outbuf, &srcp, outbuflen, &state); - } - ... - } + - Function: void * memfrob (void *MEM, size_t LENGTH) + `memfrob' transforms (frobnicates) each byte of the data structure + at MEM, which is LENGTH bytes long, by bitwise exclusive oring it + with binary 00101010. It does the transformation in place and its + return value is always MEM. + + Note that `memfrob' a second time on the same data structure + returns it to its original state. + + This is a good function for hiding information from someone who + doesn't want to see it or doesn't want to see it very much. To + really prevent people from retrieving the information, use + stronger encryption such as that described in *Note Cryptographic + Functions::. + + *Portability Note:* This function is unique to the GNU C library. - The code to emit the escape sequence to get back to the initial -state is interesting. The `wcsrtombs' function can be used to -determine the necessary output code (*note Converting Strings::). -Please note that on GNU systems it is not necessary to perform this -extra action for the conversion from multibyte text to wide character -text since the wide character encoding is not stateful. But there is -nothing mentioned in any standard which prohibits making `wchar_t' -using a stateful encoding.  -File: libc.info, Node: Converting a Character, Next: Converting Strings, Prev: Keeping the state, Up: Restartable multibyte conversion +File: libc.info, Node: Encode Binary Data, Next: Argz and Envz Vectors, Prev: Trivial Encryption, Up: String and Array Utilities -Converting Single Characters ----------------------------- +Encode Binary Data +================== - The most fundamental of the conversion functions are those dealing -with single characters. Please note that this does not always mean -single bytes. But since there is very often a subset of the multibyte -character set which consists of single byte sequences there are -functions to help with converting bytes. One very important and often -applicable scenario is where ASCII is a subpart of the multibyte -character set. I.e., all ASCII characters stand for itself and all -other characters have at least a first byte which is beyond the range 0 -to 127. + To store or transfer binary data in environments which only support +text one has to encode the binary data by mapping the input bytes to +characters in the range allowed for storing or transfering. SVID +systems (and nowadays XPG compliant systems) provide minimal support for +this task. - - Function: wint_t btowc (int C) - The `btowc' function ("byte to wide character") converts a valid - single byte character C in the initial shift state into the wide - character equivalent using the conversion rules from the currently - selected locale of the `LC_CTYPE' category. + - Function: char * l64a (long int N) + This function encodes a 32-bit input value using characters from + the basic character set. It returns a pointer to a 6 character + buffer which contains an encoded version of N. To encode a series + of bytes the user must copy the returned string to a destination + buffer. It returns the empty string if N is zero, which is + somewhat bizarre but mandated by the standard. + *Warning:* Since a static buffer is used this function should not + be used in multi-threaded programs. There is no thread-safe + alternative to this function in the C library. + *Compatibility Note:* The XPG standard states that the return + value of `l64a' is undefined if N is negative. In the GNU + implementation, `l64a' treats its argument as unsigned, so it will + return a sensible encoding for any nonzero N; however, portable + programs should not rely on this. - If `(unsigned char) C' is no valid single byte multibyte character - or if C is `EOF' the function returns `WEOF'. + To encode a large buffer `l64a' must be called in a loop, once for + each 32-bit word of the buffer. For example, one could do + something like this: - Please note the restriction of C being tested for validity only in - the initial shift state. There is no `mbstate_t' object used from - which the state information is taken and the function also does - not use any static state. + char * + encode (const void *buf, size_t len) + { + /* We know in advance how long the buffer has to be. */ + unsigned char *in = (unsigned char *) buf; + char *out = malloc (6 + ((len + 3) / 4) * 6 + 1); + char *cp = out; + + /* Encode the length. */ + /* Using `htonl' is necessary so that the data can be + decoded even on machines with different byte order. */ + + cp = mempcpy (cp, l64a (htonl (len)), 6); + + while (len > 3) + { + unsigned long int n = *in++; + n = (n << 8) | *in++; + n = (n << 8) | *in++; + n = (n << 8) | *in++; + len -= 4; + if (n) + cp = mempcpy (cp, l64a (htonl (n)), 6); + else + /* `l64a' returns the empty string for n==0, so we + must generate its encoding ("......") by hand. */ + cp = stpcpy (cp, "......"); + } + if (len > 0) + { + unsigned long int n = *in++; + if (--len > 0) + { + n = (n << 8) | *in++; + if (--len > 0) + n = (n << 8) | *in; + } + memcpy (cp, l64a (htonl (n)), 6); + cp += 6; + } + *cp = '\0'; + return out; + } - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + It is strange that the library does not provide the complete + functionality needed but so be it. - Despite the limitation that the single byte value always is -interpreted in the initial state this function is actually useful most -of the time. Most characters are either entirely single-byte character -sets or they are extension to ASCII. But then it is possible to write -code like this (not that this specific example is very useful): - wchar_t * - itow (unsigned long int val) - { - static wchar_t buf[30]; - wchar_t *wcp = &buf[29]; - *wcp = L'\0'; - while (val != 0) - { - *--wcp = btowc ('0' + val % 10); - val /= 10; - } - if (wcp == &buf[29]) - *--wcp = L'0'; - return wcp; - } + To decode data produced with `l64a' the following function should be +used. - Why is it necessary to use such a complicated implementation and not -simply cast `'0' + val % 10' to a wide character? The answer is that -there is no guarantee that one can perform this kind of arithmetic on -the character of the character set used for `wchar_t' representation. -In other situations the bytes are not constant at compile time and so -the compiler cannot do the work. In situations like this it is -necessary `btowc'. + - Function: long int a64l (const char *STRING) + The parameter STRING should contain a string which was produced by + a call to `l64a'. The function processes at least 6 characters of + this string, and decodes the characters it finds according to the + table below. It stops decoding when it finds a character not in + the table, rather like `atoi'; if you have a buffer which has been + broken into lines, you must be careful to skip over the + end-of-line characters. -There also is a function for the conversion in the other direction. + The decoded number is returned as a `long int' value. - - Function: int wctob (wint_t C) - The `wctob' function ("wide character to byte") takes as the - parameter a valid wide character. If the multibyte representation - for this character in the initial state is exactly one byte long - the return value of this function is this character. Otherwise - the return value is `EOF'. + The `l64a' and `a64l' functions use a base 64 encoding, in which +each character of an encoded string represents six bits of an input +word. These symbols are used for the base 64 digits: - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + 0 1 2 3 4 5 6 7 +0 `.' `/' `0' `1' `2' `3' `4' `5' +8 `6' `7' `8' `9' `A' `B' `C' `D' +16 `E' `F' `G' `H' `I' `J' `K' `L' +24 `M' `N' `O' `P' `Q' `R' `S' `T' +32 `U' `V' `W' `X' `Y' `Z' `a' `b' +40 `c' `d' `e' `f' `g' `h' `i' `j' +48 `k' `l' `m' `n' `o' `p' `q' `r' +56 `s' `t' `u' `v' `w' `x' `y' `z' - There are more general functions to convert single character from -multibyte representation to wide characters and vice versa. These -functions pose no limit on the length of the multibyte representation -and they also do not require it to be in the initial state. + This encoding scheme is not standard. There are some other encoding +methods which are much more widely used (UU encoding, MIME encoding). +Generally, it is better to use one of these encodings. - - Function: size_t mbrtowc (wchar_t *restrict PWC, const char - *restrict S, size_t N, mbstate_t *restrict PS) - The `mbrtowc' function ("multibyte restartable to wide character") - converts the next multibyte character in the string pointed to by - S into a wide character and stores it in the wide character string - pointed to by PWC. The conversion is performed according to the - locale currently selected for the `LC_CTYPE' category. If the - conversion for the character set used in the locale requires a - state the multibyte string is interpreted in the state represented - by the object pointed to by PS. If PS is a null pointer, a static, - internal state variable used only by the `mbrtowc' function is - used. + +File: libc.info, Node: Argz and Envz Vectors, Prev: Encode Binary Data, Up: String and Array Utilities - If the next multibyte character corresponds to the NUL wide - character the return value of the function is 0 and the state - object is afterwards in the initial state. If the next N or fewer - bytes form a correct multibyte character the return value is the - number of bytes starting from S which form the multibyte - character. The conversion state is updated according to the bytes - consumed in the conversion. In both cases the wide character - (either the `L'\0'' or the one found in the conversion) is stored - in the string pointer to by PWC iff PWC is not null. +Argz and Envz Vectors +===================== - If the first N bytes of the multibyte string possibly form a valid - multibyte character but there are more than N bytes needed to - complete it the return value of the function is `(size_t) -2' and - no value is stored. Please note that this can happen even if N - has a value greater or equal to `MB_CUR_MAX' since the input might - contain redundant shift sequences. + "argz vectors" are vectors of strings in a contiguous block of +memory, each element separated from its neighbors by null-characters +(`'\0''). - If the first `n' bytes of the multibyte string cannot possibly form - a valid multibyte character also no value is stored, the global - variable `errno' is set to the value `EILSEQ' and the function - returns `(size_t) -1'. The conversion state is afterwards - undefined. + "Envz vectors" are an extension of argz vectors where each element +is a name-value pair, separated by a `'='' character (as in a Unix +environment). - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. +* Menu: - Using this function is straight forward. A function which copies a -multibyte string into a wide character string while at the same time -converting all lowercase character into uppercase could look like this -(this is not the final version, just an example; it has no error -checking, and leaks sometimes memory): +* Argz Functions:: Operations on argz vectors. +* Envz Functions:: Additional operations on environment vectors. - wchar_t * - mbstouwcs (const char *s) - { - size_t len = strlen (s); - wchar_t *result = malloc ((len + 1) * sizeof (wchar_t)); - wchar_t *wcp = result; - wchar_t tmp[1]; - mbstate_t state; - size_t nbytes; - - memset (&state, '\0', sizeof (state)); - while ((nbytes = mbrtowc (tmp, s, len, &state)) > 0) - { - if (nbytes >= (size_t) -2) - /* Invalid input string. */ - return NULL; - *result++ = towupper (tmp[0]); - len -= nbytes; - s += nbytes; - } - return result; - } + +File: libc.info, Node: Argz Functions, Next: Envz Functions, Up: Argz and Envz Vectors - The use of `mbrtowc' should be clear. A single wide character is -stored in `TMP[0]' and the number of consumed bytes is stored in the -variable NBYTES. In case the the conversion was successful the -uppercase variant of the wide character is stored in the RESULT array -and the pointer to the input string and the number of available bytes -is adjusted. +Argz Functions +-------------- - The only non-obvious thing about the function might be the way -memory is allocated for the result. The above code uses the fact that -there can never be more wide characters in the converted results than -there are bytes in the multibyte input string. This method yields to a -pessimistic guess about the size of the result and if many wide -character strings have to be constructed this way or the strings are -long, the extra memory required allocated because the input string -contains multibyte characters might be significant. It would be -possible to resize the allocated memory block to the correct size before -returning it. A better solution might be to allocate just the right -amount of space for the result right away. Unfortunately there is no -function to compute the length of the wide character string directly -from the multibyte string. But there is a function which does part of -the work. + Each argz vector is represented by a pointer to the first element, of +type `char *', and a size, of type `size_t', both of which can be +initialized to `0' to represent an empty argz vector. All argz +functions accept either a pointer and a size argument, or pointers to +them, if they will be modified. - - Function: size_t mbrlen (const char *restrict S, size_t N, mbstate_t - *PS) - The `mbrlen' function ("multibyte restartable length") computes - the number of at most N bytes starting at S which form the next - valid and complete multibyte character. + The argz functions use `malloc'/`realloc' to allocate/grow argz +vectors, and so any argz vector creating using these functions may be +freed by using `free'; conversely, any argz function that may grow a +string expects that string to have been allocated using `malloc' (those +argz functions that only examine their arguments or modify them in +place will work on any sort of memory). *Note Unconstrained +Allocation::. - If the next multibyte character corresponds to the NUL wide - character the return value is 0. If the next N bytes form a valid - multibyte character the number of bytes belonging to this multibyte - character byte sequence is returned. + All argz functions that do memory allocation have a return type of +`error_t', and return `0' for success, and `ENOMEM' if an allocation +error occurs. - If the the first N bytes possibly form a valid multibyte character - but it is incomplete the return value is `(size_t) -2'. Otherwise - the multibyte character sequence is invalid and the return value - is `(size_t) -1'. + These functions are declared in the standard include file `argz.h'. - The multibyte sequence is interpreted in the state represented by - the object pointed to by PS. If PS is a null pointer, a state - object local to `mbrlen' is used. + - Function: error_t argz_create (char *const ARGV[], char **ARGZ, + size_t *ARGZ_LEN) + The `argz_create' function converts the Unix-style argument vector + ARGV (a vector of pointers to normal C strings, terminated by + `(char *)0'; *note Program Arguments::) into an argz vector with + the same elements, which is returned in ARGZ and ARGZ_LEN. - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + - Function: error_t argz_create_sep (const char *STRING, int SEP, char + **ARGZ, size_t *ARGZ_LEN) + The `argz_create_sep' function converts the null-terminated string + STRING into an argz vector (returned in ARGZ and ARGZ_LEN) by + splitting it into elements at every occurrence of the character + SEP. - The tentative reader now will of course note that `mbrlen' can be -implemented as + - Function: size_t argz_count (const char *ARGZ, size_t ARG_LEN) + Returns the number of elements in the argz vector ARGZ and + ARGZ_LEN. - mbrtowc (NULL, s, n, ps != NULL ? ps : &internal) + - Function: void argz_extract (char *ARGZ, size_t ARGZ_LEN, char + **ARGV) + The `argz_extract' function converts the argz vector ARGZ and + ARGZ_LEN into a Unix-style argument vector stored in ARGV, by + putting pointers to every element in ARGZ into successive + positions in ARGV, followed by a terminator of `0'. ARGV must be + pre-allocated with enough space to hold all the elements in ARGZ + plus the terminating `(char *)0' (`(argz_count (ARGZ, ARGZ_LEN) + + 1) * sizeof (char *)' bytes should be enough). Note that the + string pointers stored into ARGV point into ARGZ--they are not + copies--and so ARGZ must be copied if it will be changed while + ARGV is still active. This function is useful for passing the + elements in ARGZ to an exec function (*note Executing a File::). - This is true and in fact is mentioned in the official specification. -Now, how can this function be used to determine the length of the wide -character string created from a multibyte character string? It is not -directly usable but we can define a function `mbslen' using it: + - Function: void argz_stringify (char *ARGZ, size_t LEN, int SEP) + The `argz_stringify' converts ARGZ into a normal string with the + elements separated by the character SEP, by replacing each `'\0'' + inside ARGZ (except the last one, which terminates the string) + with SEP. This is handy for printing ARGZ in a readable manner. - size_t - mbslen (const char *s) - { - mbstate_t state; - size_t result = 0; - size_t nbytes; - memset (&state, '\0', sizeof (state)); - while ((nbytes = mbrlen (s, MB_LEN_MAX, &state)) > 0) - { - if (nbytes >= (size_t) -2) - /* Something is wrong. */ - return (size_t) -1; - s += nbytes; - ++result; - } - return result; - } + - Function: error_t argz_add (char **ARGZ, size_t *ARGZ_LEN, const + char *STR) + The `argz_add' function adds the string STR to the end of the argz + vector `*ARGZ', and updates `*ARGZ' and `*ARGZ_LEN' accordingly. - This function simply calls `mbrlen' for each multibyte character in -the string and counts the number of function calls. Please note that -we here use `MB_LEN_MAX' as the size argument in the `mbrlen' call. -This is OK since a) this value is larger then the length of the longest -multibyte character sequence and b) because we know that the string S -ends with a NUL byte which cannot be part of any other multibyte -character sequence but the one representing the NUL wide character. -Therefore the `mbrlen' function will never read invalid memory. + - Function: error_t argz_add_sep (char **ARGZ, size_t *ARGZ_LEN, const + char *STR, int DELIM) + The `argz_add_sep' function is similar to `argz_add', but STR is + split into separate elements in the result at occurrences of the + character DELIM. This is useful, for instance, for adding the + components of a Unix search path to an argz vector, by using a + value of `':'' for DELIM. - Now that this function is available (just to make this clear, this -function is _not_ part of the GNU C library) we can compute the number -of wide character required to store the converted multibyte character -string S using + - Function: error_t argz_append (char **ARGZ, size_t *ARGZ_LEN, const + char *BUF, size_t BUF_LEN) + The `argz_append' function appends BUF_LEN bytes starting at BUF + to the argz vector `*ARGZ', reallocating `*ARGZ' to accommodate + it, and adding BUF_LEN to `*ARGZ_LEN'. - wcs_bytes = (mbslen (s) + 1) * sizeof (wchar_t); + - Function: error_t argz_delete (char **ARGZ, size_t *ARGZ_LEN, char + *ENTRY) + If ENTRY points to the beginning of one of the elements in the + argz vector `*ARGZ', the `argz_delete' function will remove this + entry and reallocate `*ARGZ', modifying `*ARGZ' and `*ARGZ_LEN' + accordingly. Note that as destructive argz functions usually + reallocate their argz argument, pointers into argz vectors such as + ENTRY will then become invalid. - Please note that the `mbslen' function is quite inefficient. The -implementation of `mbstouwcs' implemented using `mbslen' would have to -perform the conversion of the multibyte character input string twice -and this conversion might be quite expensive. So it is necessary to -think about the consequences of using the easier but imprecise method -before doing the work twice. + - Function: error_t argz_insert (char **ARGZ, size_t *ARGZ_LEN, char + *BEFORE, const char *ENTRY) + The `argz_insert' function inserts the string ENTRY into the argz + vector `*ARGZ' at a point just before the existing element pointed + to by BEFORE, reallocating `*ARGZ' and updating `*ARGZ' and + `*ARGZ_LEN'. If BEFORE is `0', ENTRY is added to the end instead + (as if by `argz_add'). Since the first element is in fact the + same as `*ARGZ', passing in `*ARGZ' as the value of BEFORE will + result in ENTRY being inserted at the beginning. - - Function: size_t wcrtomb (char *restrict S, wchar_t WC, mbstate_t - *restrict PS) - The `wcrtomb' function ("wide character restartable to multibyte") - converts a single wide character into a multibyte string - corresponding to that wide character. + - Function: char * argz_next (char *ARGZ, size_t ARGZ_LEN, const char + *ENTRY) + The `argz_next' function provides a convenient way of iterating + over the elements in the argz vector ARGZ. It returns a pointer + to the next element in ARGZ after the element ENTRY, or `0' if + there are no elements following ENTRY. If ENTRY is `0', the first + element of ARGZ is returned. - If S is a null pointer the function resets the the state stored in - the objects pointer to by PS (or the internal `mbstate_t' object) - to the initial state. This can also be achieved by a call like - this: + This behavior suggests two styles of iteration: - wcrtombs (temp_buf, L'\0', ps) + char *entry = 0; + while ((entry = argz_next (ARGZ, ARGZ_LEN, entry))) + ACTION; - since if S is a null pointer `wcrtomb' performs as if it writes - into an internal buffer which is guaranteed to be large enough. + (the double parentheses are necessary to make some C compilers + shut up about what they consider a questionable `while'-test) and: - If WC is the NUL wide character `wcrtomb' emits, if necessary, a - shift sequence to get the state PS into the initial state followed - by a single NUL byte is stored in the string S. + char *entry; + for (entry = ARGZ; + entry; + entry = argz_next (ARGZ, ARGZ_LEN, entry)) + ACTION; - Otherwise a byte sequence (possibly including shift sequences) is - written into the string S. This of only happens if WC is a valid - wide character, i.e., it has a multibyte representation in the - character set selected by locale of the `LC_CTYPE' category. If - WC is no valid wide character nothing is stored in the strings S, - `errno' is set to `EILSEQ', the conversion state in PS is - undefined and the return value is `(size_t) -1'. + Note that the latter depends on ARGZ having a value of `0' if it + is empty (rather than a pointer to an empty block of memory); this + invariant is maintained for argz vectors created by the functions + here. - If no error occurred the function returns the number of bytes - stored in the string S. This includes all byte representing shift - sequences. + - Function: error_t argz_replace (char **ARGZ, size_t *ARGZ_LEN, + const char *STR, const char *WITH, unsigned *REPLACE_COUNT) + Replace any occurrences of the string STR in ARGZ with WITH, + reallocating ARGZ as necessary. If REPLACE_COUNT is non-zero, + `*REPLACE_COUNT' will be incremented by number of replacements + performed. - One word about the interface of the function: there is no parameter - specifying the length of the array S. Instead the function - assumes that there are at least `MB_CUR_MAX' bytes available since - this is the maximum length of any byte sequence representing a - single character. So the caller has to make sure that there is - enough space available, otherwise buffer overruns can occur. + +File: libc.info, Node: Envz Functions, Prev: Argz Functions, Up: Argz and Envz Vectors - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. +Envz Functions +-------------- - Using this function is as easy as using `mbrtowc'. The following -example appends a wide character string to a multibyte character string. -Again, the code is not really useful (and correct), it is simply here to -demonstrate the use and some problems. + Envz vectors are just argz vectors with additional constraints on +the form of each element; as such, argz functions can also be used on +them, where it makes sense. - char * - mbscatwcs (char *s, size_t len, const wchar_t *ws) - { - mbstate_t state; - /* Find the end of the existing string. */ - char *wp = strchr (s, '\0'); - len -= wp - s; - memset (&state, '\0', sizeof (state)); - do - { - size_t nbytes; - if (len < MB_CUR_LEN) - { - /* We cannot guarantee that the next - character fits into the buffer, so - return an error. */ - errno = E2BIG; - return NULL; - } - nbytes = wcrtomb (wp, *ws, &state); - if (nbytes == (size_t) -1) - /* Error in the conversion. */ - return NULL; - len -= nbytes; - wp += nbytes; - } - while (*ws++ != L'\0'); - return s; - } + Each element in an envz vector is a name-value pair, separated by a +`'='' character; if multiple `'='' characters are present in an +element, those after the first are considered part of the value, and +treated like all other non-`'\0'' characters. - First the function has to find the end of the string currently in the -array S. The `strchr' call does this very efficiently since a -requirement for multibyte character representations is that the NUL byte -never is used except to represent itself (and in this context, the end -of the string). + If _no_ `'='' characters are present in an element, that element is +considered the name of a "null" entry, as distinct from an entry with an +empty value: `envz_get' will return `0' if given the name of null +entry, whereas an entry with an empty value would result in a value of +`""'; `envz_entry' will still find such entries, however. Null entries +can be removed with `envz_strip' function. - After initializing the state object the loop is entered where the -first task is to make sure there is enough room in the array S. We -abort if there are not at least `MB_CUR_LEN' bytes available. This is -not always optimal but we have no other choice. We might have less -than `MB_CUR_LEN' bytes available but the next multibyte character -might also be only one byte long. At the time the `wcrtomb' call -returns it is too late to decide whether the buffer was large enough or -not. If this solution is really unsuitable there is a very slow but -more accurate solution. + As with argz functions, envz functions that may allocate memory (and +thus fail) have a return type of `error_t', and return either `0' or +`ENOMEM'. - ... - if (len < MB_CUR_LEN) - { - mbstate_t temp_state; - memcpy (&temp_state, &state, sizeof (state)); - if (wcrtomb (NULL, *ws, &temp_state) > len) - { - /* We cannot guarantee that the next - character fits into the buffer, so - return an error. */ - errno = E2BIG; - return NULL; - } - } - ... + These functions are declared in the standard include file `envz.h'. - Here we do perform the conversion which might overflow the buffer so -that we are afterwards in the position to make an exact decision about -the buffer size. Please note the `NULL' argument for the destination -buffer in the new `wcrtomb' call; since we are not interested in the -converted text at this point this is a nice way to express this. The -most unusual thing about this piece of code certainly is the -duplication of the conversion state object. But think about this: if a -change of the state is necessary to emit the next multibyte character -we want to have the same shift state change performed in the real -conversion. Therefore we have to preserve the initial shift state -information. + - Function: char * envz_entry (const char *ENVZ, size_t ENVZ_LEN, + const char *NAME) + The `envz_entry' function finds the entry in ENVZ with the name + NAME, and returns a pointer to the whole entry--that is, the argz + element which begins with NAME followed by a `'='' character. If + there is no entry with that name, `0' is returned. - There are certainly many more and even better solutions to this -problem. This example is only meant for educational purposes. + - Function: char * envz_get (const char *ENVZ, size_t ENVZ_LEN, const + char *NAME) + The `envz_get' function finds the entry in ENVZ with the name NAME + (like `envz_entry'), and returns a pointer to the value portion of + that entry (following the `'=''). If there is no entry with that + name (or only a null entry), `0' is returned. + + - Function: error_t envz_add (char **ENVZ, size_t *ENVZ_LEN, const + char *NAME, const char *VALUE) + The `envz_add' function adds an entry to `*ENVZ' (updating `*ENVZ' + and `*ENVZ_LEN') with the name NAME, and value VALUE. If an entry + with the same name already exists in ENVZ, it is removed first. + If VALUE is `0', then the new entry will the special null type of + entry (mentioned above). + + - Function: error_t envz_merge (char **ENVZ, size_t *ENVZ_LEN, const + char *ENVZ2, size_t ENVZ2_LEN, int OVERRIDE) + The `envz_merge' function adds each entry in ENVZ2 to ENVZ, as if + with `envz_add', updating `*ENVZ' and `*ENVZ_LEN'. If OVERRIDE is + true, then values in ENVZ2 will supersede those with the same name + in ENVZ, otherwise not. + + Null entries are treated just like other entries in this respect, + so a null entry in ENVZ can prevent an entry of the same name in + ENVZ2 from being added to ENVZ, if OVERRIDE is false. + + - Function: void envz_strip (char **ENVZ, size_t *ENVZ_LEN) + The `envz_strip' function removes any null entries from ENVZ, + updating `*ENVZ' and `*ENVZ_LEN'. + + +File: libc.info, Node: Character Set Handling, Next: Locales, Prev: String and Array Utilities, Up: Top + +Character Set Handling +********************** + + Character sets used in the early days of computing had only six, +seven, or eight bits for each character: there was never a case where +more than eight bits (one byte) were used to represent a single +character. The limitations of this approach became more apparent as +more people grappled with non-Roman character sets, where not all the +characters that make up a language's character set can be represented +by 2^8 choices. This chapter shows the functionality that was added to +the C library to support multiple character sets. + +* Menu: + +* Extended Char Intro:: Introduction to Extended Characters. +* Charset Function Overview:: Overview about Character Handling + Functions. +* Restartable multibyte conversion:: Restartable multibyte conversion + Functions. +* Non-reentrant Conversion:: Non-reentrant Conversion Function. +* Generic Charset Conversion:: Generic Charset Conversion. diff -durpN glibc-2.2.4/manual/libc.info-9 glibc-2.2.5/manual/libc.info-9 --- glibc-2.2.4/manual/libc.info-9 Mon Aug 13 15:03:42 2001 +++ glibc-2.2.5/manual/libc.info-9 Sun Jan 20 19:28:42 2002 @@ -1,4 +1,4 @@ -This is libc.info, produced by makeinfo version 4.0c from libc.texinfo. +This is libc.info, produced by makeinfo version 4.0 from libc.texinfo. INFO-DIR-SECTION GNU libraries START-INFO-DIR-ENTRY @@ -10,16 +10,17 @@ END-INFO-DIR-ENTRY This is Edition 0.10, last updated 2001-07-06, of `The GNU C Library Reference Manual', for Version 2.2.x. - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free -Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 +Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -32,1061 +33,1024 @@ software. Copies published by the Free funds for GNU development.  -File: libc.info, Node: Converting Strings, Next: Multibyte Conversion Example, Prev: Converting a Character, Up: Restartable multibyte conversion - -Converting Multibyte and Wide Character Strings ------------------------------------------------ - - The functions described in the previous section only convert a single -character at a time. Most operations to be performed in real-world -programs include strings and therefore the ISO C standard also defines -conversions on entire strings. However, the defined set of functions -is quite limited, thus the GNU C library contains a few extensions -which can help in some important situations. - - - Function: size_t mbsrtowcs (wchar_t *restrict DST, const char - **restrict SRC, size_t LEN, mbstate_t *restrict PS) - The `mbsrtowcs' function ("multibyte string restartable to wide - character string") converts an NUL terminated multibyte character - string at `*SRC' into an equivalent wide character string, - including the NUL wide character at the end. The conversion is - started using the state information from the object pointed to by - PS or from an internal object of `mbsrtowcs' if PS is a null - pointer. Before returning the state object to match the state - after the last converted character. The state is the initial - state if the terminating NUL byte is reached and converted. - - If DST is not a null pointer the result is stored in the array - pointed to by DST, otherwise the conversion result is not - available since it is stored in an internal buffer. +File: libc.info, Node: Extended Char Intro, Next: Charset Function Overview, Up: Character Set Handling - If LEN wide characters are stored in the array DST before reaching - the end of the input string the conversion stops and LEN is - returned. If DST is a null pointer LEN is never checked. +Introduction to Extended Characters +=================================== - Another reason for a premature return from the function call is if - the input string contains an invalid multibyte sequence. In this - case the global variable `errno' is set to `EILSEQ' and the - function returns `(size_t) -1'. + A variety of solutions is available to overcome the differences +between character sets with a 1:1 relation between bytes and characters +and character sets with ratios of 2:1 or 4:1. The remainder of this +section gives a few examples to help understand the design decisions +made while developing the functionality of the C library. - In all other cases the function returns the number of wide - characters converted during this call. If DST is not null - `mbsrtowcs' stores in the pointer pointed to by SRC a null pointer - (if the NUL byte in the input string was reached) or the address - of the byte following the last converted multibyte character. + A distinction we have to make right away is between internal and +external representation. "Internal representation" means the +representation used by a program while keeping the text in memory. +External representations are used when text is stored or transmitted +through some communication channel. Examples of external +representations include files waiting in a directory to be read and +parsed. - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + Traditionally there has been no difference between the two +representations. It was equally comfortable and useful to use the same +single-byte representation internally and externally. This comfort +level decreases with more and larger character sets. - The definition of this function has one limitation which has to be -understood. The requirement that DST has to be a NUL terminated string -provides problems if one wants to convert buffers with text. A buffer -is normally no collection of NUL terminated strings but instead a -continuous collection of lines, separated by newline characters. Now -assume a function to convert one line from a buffer is needed. Since -the line is not NUL terminated the source pointer cannot directly point -into the unmodified text buffer. This means, either one inserts the NUL -byte at the appropriate place for the time of the `mbsrtowcs' function -call (which is not doable for a read-only buffer or in a multi-threaded -application) or one copies the line in an extra buffer where it can be -terminated by a NUL byte. Note that it is not in general possible to -limit the number of characters to convert by setting the parameter LEN -to any specific value. Since it is not known how many bytes each -multibyte character sequence is in length one always could do only a -guess. + One of the problems to overcome with the internal representation is +handling text that is externally encoded using different character +sets. Assume a program that reads two texts and compares them using +some metric. The comparison can be usefully done only if the texts are +internally kept in a common format. - There is still a problem with the method of NUL-terminating a line -right after the newline character which could lead to very strange -results. As said in the description of the MBSRTOWCS function above the -conversion state is guaranteed to be in the initial shift state after -processing the NUL byte at the end of the input string. But this NUL -byte is not really part of the text. I.e., the conversion state after -the newline in the original text could be something different than the -initial shift state and therefore the first character of the next line -is encoded using this state. But the state in question is never -accessible to the user since the conversion stops after the NUL byte -(which resets the state). Most stateful character sets in use today -require that the shift state after a newline is the initial state-but -this is not a strict guarantee. Therefore simply NUL terminating a -piece of a running text is not always an adequate solution and therefore -never should be used in generally used code. + For such a common format (= character set) eight bits are certainly +no longer enough. So the smallest entity will have to grow: "wide +characters" will now be used. Instead of one byte per character, two or +four will be used instead. (Three are not good to address in memory and +more than four bytes seem not to be necessary). - The generic conversion interface (*note Generic Charset Conversion::) -does not have this limitation (it simply works on buffers, not -strings), and the GNU C library contains a set of functions which take -additional parameters specifying the maximal number of bytes which are -consumed from the input string. This way the problem of `mbsrtowcs''s -example above could be solved by determining the line length and -passing this length to the function. + As shown in some other part of this manual, a completely new family +has been created of functions that can handle wide character texts in +memory. The most commonly used character sets for such internal wide +character representations are Unicode and ISO 10646 (also known as UCS +for Universal Character Set). Unicode was originally planned as a +16-bit character set; whereas, ISO 10646 was designed to be a 31-bit +large code space. The two standards are practically identical. They +have the same character repertoire and code table, but Unicode specifies +added semantics. At the moment, only characters in the first `0x10000' +code positions (the so-called Basic Multilingual Plane, BMP) have been +assigned, but the assignment of more specialized characters outside this +16-bit space is already in progress. A number of encodings have been +defined for Unicode and ISO 10646 characters: UCS-2 is a 16-bit word +that can only represent characters from the BMP, UCS-4 is a 32-bit word +than can represent any Unicode and ISO 10646 character, UTF-8 is an +ASCII compatible encoding where ASCII characters are represented by +ASCII bytes and non-ASCII characters by sequences of 2-6 non-ASCII +bytes, and finally UTF-16 is an extension of UCS-2 in which pairs of +certain UCS-2 words can be used to encode non-BMP characters up to +`0x10ffff'. - - Function: size_t wcsrtombs (char *restrict DST, const wchar_t - **restrict SRC, size_t LEN, mbstate_t *restrict PS) - The `wcsrtombs' function ("wide character string restartable to - multibyte string") converts the NUL terminated wide character - string at `*SRC' into an equivalent multibyte character string and - stores the result in the array pointed to by DST. The NUL wide - character is also converted. The conversion starts in the state - described in the object pointed to by PS or by a state object - locally to `wcsrtombs' in case PS is a null pointer. If DST is a - null pointer the conversion is performed as usual but the result - is not available. If all characters of the input string were - successfully converted and if DST is not a null pointer the - pointer pointed to by SRC gets assigned a null pointer. + To represent wide characters the `char' type is not suitable. For +this reason the ISO C standard introduces a new type that is designed +to keep one character of a wide character string. To maintain the +similarity there is also a type corresponding to `int' for those +functions that take a single wide character. - If one of the wide characters in the input string has no valid - multibyte character equivalent the conversion stops early, sets - the global variable `errno' to `EILSEQ', and returns `(size_t) -1'. + - Data type: wchar_t + This data type is used as the base type for wide character strings. + In other words, arrays of objects of this type are the equivalent + of `char[]' for multibyte character strings. The type is defined + in `stddef.h'. - Another reason for a premature stop is if DST is not a null - pointer and the next converted character would require more than - LEN bytes in total to the array DST. In this case (and if DEST is - not a null pointer) the pointer pointed to by SRC is assigned a - value pointing to the wide character right after the last one - successfully converted. + The ISO C90 standard, where `wchar_t' was introduced, does not say + anything specific about the representation. It only requires that + this type is capable of storing all elements of the basic + character set. Therefore it would be legitimate to define + `wchar_t' as `char', which might make sense for embedded systems. - Except in the case of an encoding error the return value of the - function is the number of bytes in all the multibyte character - sequences stored in DST. Before returning the state in the object - pointed to by PS (or the internal object in case PS is a null - pointer) is updated to reflect the state after the last - conversion. The state is the initial shift state in case the - terminating NUL wide character was converted. + But for GNU systems `wchar_t' is always 32 bits wide and, + therefore, capable of representing all UCS-4 values and, + therefore, covering all of ISO 10646. Some Unix systems define + `wchar_t' as a 16-bit type and thereby follow Unicode very + strictly. This definition is perfectly fine with the standard, + but it also means that to represent all characters from Unicode + and ISO 10646 one has to use UTF-16 surrogate characters, which is + in fact a multi-wide-character encoding. But resorting to + multi-wide-character encoding contradicts the purpose of the + `wchar_t' type. - This function was introduced in Amendment 1 to ISO C90 and is - declared in `wchar.h'. + - Data type: wint_t + `wint_t' is a data type used for parameters and variables that + contain a single wide character. As the name suggests this type + is the equivalent of `int' when using the normal `char' strings. + The types `wchar_t' and `wint_t' often have the same + representation if their size is 32 bits wide but if `wchar_t' is + defined as `char' the type `wint_t' must be defined as `int' due + to the parameter promotion. - The restriction mentions above for the `mbsrtowcs' function applies -also here. There is no possibility to directly control the number of -input characters. One has to place the NUL wide character at the -correct place or control the consumed input indirectly via the available -output array size (the LEN parameter). + This type is defined in `wchar.h' and was introduced in + Amendment 1 to ISO C90. - - Function: size_t mbsnrtowcs (wchar_t *restrict DST, const char - **restrict SRC, size_t NMC, size_t LEN, mbstate_t *restrict - PS) - The `mbsnrtowcs' function is very similar to the `mbsrtowcs' - function. All the parameters are the same except for NMC which is - new. The return value is the same as for `mbsrtowcs'. + As there are for the `char' data type macros are available for +specifying the minimum and maximum value representable in an object of +type `wchar_t'. - This new parameter specifies how many bytes at most can be used - from the multibyte character string. I.e., the multibyte - character string `*SRC' need not be NUL terminated. But if a NUL - byte is found within the NMC first bytes of the string the - conversion stops here. + - Macro: wint_t WCHAR_MIN + The macro `WCHAR_MIN' evaluates to the minimum value representable + by an object of type `wint_t'. - This function is a GNU extensions. It is meant to work around the - problems mentioned above. Now it is possible to convert buffer - with multibyte character text piece for piece without having to - care about inserting NUL bytes and the effect of NUL bytes on the - conversion state. + This macro was introduced in Amendment 1 to ISO C90. - A function to convert a multibyte string into a wide character string -and display it could be written like this (this is not a really useful -example): + - Macro: wint_t WCHAR_MAX + The macro `WCHAR_MAX' evaluates to the maximum value representable + by an object of type `wint_t'. - void - showmbs (const char *src, FILE *fp) - { - mbstate_t state; - int cnt = 0; - memset (&state, '\0', sizeof (state)); - while (1) - { - wchar_t linebuf[100]; - const char *endp = strchr (src, '\n'); - size_t n; - - /* Exit if there is no more line. */ - if (endp == NULL) - break; - - n = mbsnrtowcs (linebuf, &src, endp - src, 99, &state); - linebuf[n] = L'\0'; - fprintf (fp, "line %d: \"%S\"\n", linebuf); - } - } + This macro was introduced in Amendment 1 to ISO C90. - There is no problem with the state after a call to `mbsnrtowcs'. -Since we don't insert characters in the strings which were not in there -right from the beginning and we use STATE only for the conversion of -the given buffer there is no problem with altering the state. + Another special wide character value is the equivalent to `EOF'. - - Function: size_t wcsnrtombs (char *restrict DST, const wchar_t - **restrict SRC, size_t NWC, size_t LEN, mbstate_t *restrict - PS) - The `wcsnrtombs' function implements the conversion from wide - character strings to multibyte character strings. It is similar to - `wcsrtombs' but it takes, just like `mbsnrtowcs', an extra - parameter which specifies the length of the input string. + - Macro: wint_t WEOF + The macro `WEOF' evaluates to a constant expression of type + `wint_t' whose value is different from any member of the extended + character set. - No more than NWC wide characters from the input string `*SRC' are - converted. If the input string contains a NUL wide character in - the first NWC character to conversion stops at this place. + `WEOF' need not be the same value as `EOF' and unlike `EOF' it + also need _not_ be negative. In other words, sloppy code like - This function is a GNU extension and just like `mbsnrtowcs' is - helps in situations where no NUL terminated input strings are - available. + { + int c; + ... + while ((c = getc (fp)) < 0) + ... + } - -File: libc.info, Node: Multibyte Conversion Example, Prev: Converting Strings, Up: Restartable multibyte conversion + has to be rewritten to use `WEOF' explicitly when wide characters + are used: -A Complete Multibyte Conversion Example ---------------------------------------- + { + wint_t c; + ... + while ((c = wgetc (fp)) != WEOF) + ... + } - The example programs given in the last sections are only brief and do -not contain all the error checking etc. Presented here is a complete -and documented example. It features the `mbrtowc' function but it -should be easy to derive versions using the other functions. + This macro was introduced in Amendment 1 to ISO C90 and is defined + in `wchar.h'. - int - file_mbsrtowcs (int input, int output) - { - /* Note the use of `MB_LEN_MAX'. - `MB_CUR_MAX' cannot portably be used here. */ - char buffer[BUFSIZ + MB_LEN_MAX]; - mbstate_t state; - int filled = 0; - int eof = 0; - - /* Initialize the state. */ - memset (&state, '\0', sizeof (state)); - - while (!eof) - { - ssize_t nread; - ssize_t nwrite; - char *inp = buffer; - wchar_t outbuf[BUFSIZ]; - wchar_t *outp = outbuf; - - /* Fill up the buffer from the input file. */ - nread = read (input, buffer + filled, BUFSIZ); - if (nread < 0) - { - perror ("read"); - return 0; - } - /* If we reach end of file, make a note to read no more. */ - if (nread == 0) - eof = 1; - - /* `filled' is now the number of bytes in `buffer'. */ - filled += nread; - - /* Convert those bytes to wide characters-as many as we can. */ - while (1) - { - size_t thislen = mbrtowc (outp, inp, filled, &state); - /* Stop converting at invalid character; - this can mean we have read just the first part - of a valid character. */ - if (thislen == (size_t) -1) - break; - /* We want to handle embedded NUL bytes - but the return value is 0. Correct this. */ - if (thislen == 0) - thislen = 1; - /* Advance past this character. */ - inp += thislen; - filled -= thislen; - ++outp; - } - - /* Write the wide characters we just made. */ - nwrite = write (output, outbuf, - (outp - outbuf) * sizeof (wchar_t)); - if (nwrite < 0) - { - perror ("write"); - return 0; - } - - /* See if we have a _real_ invalid character. */ - if ((eof && filled > 0) || filled >= MB_CUR_MAX) - { - error (0, 0, "invalid multibyte character"); - return 0; - } - - /* If any characters must be carried forward, - put them at the beginning of `buffer'. */ - if (filled > 0) - memmove (inp, buffer, filled); - } - - return 1; - } + These internal representations present problems when it comes to +storing and transmittal. Because each single wide character consists +of more than one byte, they are effected by byte-ordering. Thus, +machines with different endianesses would see different values when +accessing the same data. This byte ordering concern also applies for +communication protocols that are all byte-based and, thereforet require +that the sender has to decide about splitting the wide character in +bytes. A last (but not least important) point is that wide characters +often require more storage space than a customized byte-oriented +character set. - -File: libc.info, Node: Non-reentrant Conversion, Next: Generic Charset Conversion, Prev: Restartable multibyte conversion, Up: Character Set Handling + For all the above reasons, an external encoding that is different +from the internal encoding is often used if the latter is UCS-2 or +UCS-4. The external encoding is byte-based and can be chosen +appropriately for the environment and for the texts to be handled. A +variety of different character sets can be used for this external +encoding (information that will not be exhaustively presented +here-instead, a description of the major groups will suffice). All of +the ASCII-based character sets fulfill one requirement: they are +"filesystem safe." This means that the character `'/'' is used in the +encoding _only_ to represent itself. Things are a bit different for +character sets like EBCDIC (Extended Binary Coded Decimal Interchange +Code, a character set family used by IBM), but if the operation system +does not understand EBCDIC directly the parameters-to-system calls have +to be converted first anyhow. -Non-reentrant Conversion Function -================================= + * The simplest character sets are single-byte character sets. There + can be only up to 256 characters (for 8 bit character sets), which + is not sufficient to cover all languages but might be sufficient + to handle a specific text. Handling of a 8 bit character sets is + simple. This is not true for other kinds presented later, and + therefore, the application one uses might require the use of 8 bit + character sets. - The functions described in the last chapter are defined in -Amendment 1 to ISO C90. But the original ISO C90 standard also -contained functions for character set conversion. The reason that they -are not described in the first place is that they are almost entirely -useless. + * The ISO 2022 standard defines a mechanism for extended character + sets where one character _can_ be represented by more than one + byte. This is achieved by associating a state with the text. + Characters that can be used to change the state can be embedded in + the text. Each byte in the text might have a different + interpretation in each state. The state might even influence + whether a given byte stands for a character on its own or whether + it has to be combined with some more bytes. - The problem is that all the functions for conversion defined in -ISO C90 use a local state. This implies that multiple conversions at -the same time (not only when using threads) cannot be done, and that you -cannot first convert single characters and then strings since you cannot -tell the conversion functions which state to use. + In most uses of ISO 2022 the defined character sets do not allow + state changes that cover more than the next character. This has + the big advantage that whenever one can identify the beginning of + the byte sequence of a character one can interpret a text + correctly. Examples of character sets using this policy are the + various EUC character sets (used by Sun's operations systems, + EUC-JP, EUC-KR, EUC-TW, and EUC-CN) or Shift_JIS (SJIS, a Japanese + encoding). - These functions are therefore usable only in a very limited set of -situations. One must complete converting the entire string before -starting a new one and each string/text must be converted with the same -function (there is no problem with the library itself; it is guaranteed -that no library function changes the state of any of these functions). -*For the above reasons it is highly requested that the functions from -the last section are used in place of non-reentrant conversion -functions.* + But there are also character sets using a state that is valid for + more than one character and has to be changed by another byte + sequence. Examples for this are ISO-2022-JP, ISO-2022-KR, and + ISO-2022-CN. -* Menu: + * Early attempts to fix 8 bit character sets for other languages + using the Roman alphabet lead to character sets like ISO 6937. + Here bytes representing characters like the acute accent do not + produce output themselves: one has to combine them with other + characters to get the desired result. For example, the byte + sequence `0xc2 0x61' (non-spacing acute accent, followed by + lower-case `a') to get the "small a with acute" character. To + get the acute accent character on its own, one has to write `0xc2 + 0x20' (the non-spacing acute followed by a space). -* Non-reentrant Character Conversion:: Non-reentrant Conversion of Single - Characters. -* Non-reentrant String Conversion:: Non-reentrant Conversion of Strings. -* Shift State:: States in Non-reentrant Functions. + Character sets like ISO 6937 are used in some embedded systems such + as teletex. - -File: libc.info, Node: Non-reentrant Character Conversion, Next: Non-reentrant String Conversion, Up: Non-reentrant Conversion + * Instead of converting the Unicode or ISO 10646 text used + internally, it is often also sufficient to simply use an encoding + different than UCS-2/UCS-4. The Unicode and ISO 10646 standards + even specify such an encoding: UTF-8. This encoding is able to + represent all of ISO 10646 31 bits in a byte string of length one + to six. -Non-reentrant Conversion of Single Characters ---------------------------------------------- + There were a few other attempts to encode ISO 10646 such as UTF-7, + but UTF-8 is today the only encoding that should be used. In + fact, with any luck UTF-8 will soon be the only external encoding + that has to be supported. It proves to be universally usable and + its only disadvantage is that it favors Roman languages by making + the byte string representation of other scripts (Cyrillic, Greek, + Asian scripts) longer than necessary if using a specific character + set for these scripts. Methods like the Unicode compression + scheme can alleviate these problems. - - Function: int mbtowc (wchar_t *restrict RESULT, const char *restrict - STRING, size_t SIZE) - The `mbtowc' ("multibyte to wide character") function when called - with non-null STRING converts the first multibyte character - beginning at STRING to its corresponding wide character code. It - stores the result in `*RESULT'. + The question remaining is: how to select the character set or +encoding to use. The answer: you cannot decide about it yourself, it +is decided by the developers of the system or the majority of the +users. Since the goal is interoperability one has to use whatever the +other people one works with use. If there are no constraints, the +selection is based on the requirements the expected circle of users +will have. In other words, if a project is expected to be used in +only, say, Russia it is fine to use KOI8-R or a similar character set. +But if at the same time people from, say, Greece are participating one +should use a character set that allows all people to collaborate. - `mbtowc' never examines more than SIZE bytes. (The idea is to - supply for SIZE the number of bytes of data you have in hand.) + The most widely useful solution seems to be: go with the most general +character set, namely ISO 10646. Use UTF-8 as the external encoding +and problems about users not being able to use their own language +adequately are a thing of the past. - `mbtowc' with non-null STRING distinguishes three possibilities: - the first SIZE bytes at STRING start with valid multibyte - character, they start with an invalid byte sequence or just part - of a character, or STRING points to an empty string (a null - character). + One final comment about the choice of the wide character +representation is necessary at this point. We have said above that the +natural choice is using Unicode or ISO 10646. This is not required, +but at least encouraged, by the ISO C standard. The standard defines +at least a macro `__STDC_ISO_10646__' that is only defined on systems +where the `wchar_t' type encodes ISO 10646 characters. If this symbol +is not defined one should avoid making assumptions about the wide +character representation. If the programmer uses only the functions +provided by the C library to handle wide character strings there should +be no compatibility problems with other systems. - For a valid multibyte character, `mbtowc' converts it to a wide - character and stores that in `*RESULT', and returns the number of - bytes in that character (always at least 1, and never more than - SIZE). + +File: libc.info, Node: Charset Function Overview, Next: Restartable multibyte conversion, Prev: Extended Char Intro, Up: Character Set Handling - For an invalid byte sequence, `mbtowc' returns -1. For an empty - string, it returns 0, also storing `'\0'' in `*RESULT'. +Overview about Character Handling Functions +=========================================== - If the multibyte character code uses shift characters, then - `mbtowc' maintains and updates a shift state as it scans. If you - call `mbtowc' with a null pointer for STRING, that initializes the - shift state to its standard initial value. It also returns - nonzero if the multibyte character code in use actually has a - shift state. *Note Shift State::. + A Unix C library contains three different sets of functions in two +families to handle character set conversion. One of the function +families (the most commonly used) is specified in the ISO C90 standard +and, therefore, is portable even beyond the Unix world. Unfortunately +this family is the least useful one. These functions should be avoided +whenever possible, especially when developing libraries (as opposed to +applications). - - Function: int wctomb (char *STRING, wchar_t WCHAR) - The `wctomb' ("wide character to multibyte") function converts the - wide character code WCHAR to its corresponding multibyte character - sequence, and stores the result in bytes starting at STRING. At - most `MB_CUR_MAX' characters are stored. + The second family of functions got introduced in the early Unix +standards (XPG2) and is still part of the latest and greatest Unix +standard: Unix 98. It is also the most powerful and useful set of +functions. But we will start with the functions defined in Amendment 1 +to ISO C90. - `wctomb' with non-null STRING distinguishes three possibilities - for WCHAR: a valid wide character code (one that can be translated - to a multibyte character), an invalid code, and `L'\0''. + +File: libc.info, Node: Restartable multibyte conversion, Next: Non-reentrant Conversion, Prev: Charset Function Overview, Up: Character Set Handling - Given a valid code, `wctomb' converts it to a multibyte character, - storing the bytes starting at STRING. Then it returns the number - of bytes in that character (always at least 1, and never more than - `MB_CUR_MAX'). +Restartable Multibyte Conversion Functions +========================================== - If WCHAR is an invalid wide character code, `wctomb' returns -1. - If WCHAR is `L'\0'', it returns `0', also storing `'\0'' in - `*STRING'. + The ISO C standard defines functions to convert strings from a +multibyte representation to wide character strings. There are a number +of peculiarities: - If the multibyte character code uses shift characters, then - `wctomb' maintains and updates a shift state as it scans. If you - call `wctomb' with a null pointer for STRING, that initializes the - shift state to its standard initial value. It also returns - nonzero if the multibyte character code in use actually has a - shift state. *Note Shift State::. + * The character set assumed for the multibyte encoding is not + specified as an argument to the functions. Instead the character + set specified by the `LC_CTYPE' category of the current locale is + used; see *Note Locale Categories::. - Calling this function with a WCHAR argument of zero when STRING is - not null has the side-effect of reinitializing the stored shift - state _as well as_ storing the multibyte character `'\0'' and - returning 0. + * The functions handling more than one character at a time require + NUL terminated strings as the argument (i.e., converting blocks of + text does not work unless one can add a NUL byte at an appropriate + place). The GNU C library contains some extensions to the + standard that allow specifying a size, but basically they also + expect terminated strings. - Similar to `mbrlen' there is also a non-reentrant function which -computes the length of a multibyte character. It can be defined in -terms of `mbtowc'. + Despite these limitations the ISO C functions can be used in many +contexts. In graphical user interfaces, for instance, it is not +uncommon to have functions that require text to be displayed in a wide +character string if the text is not simple ASCII. The text itself might +come from a file with translations and the user should decide about the +current locale, which determines the translation and therefore also the +external encoding used. In such a situation (and many others) the +functions described here are perfect. If more freedom while performing +the conversion is necessary take a look at the `iconv' functions (*note +Generic Charset Conversion::). - - Function: int mblen (const char *STRING, size_t SIZE) - The `mblen' function with a non-null STRING argument returns the - number of bytes that make up the multibyte character beginning at - STRING, never examining more than SIZE bytes. (The idea is to - supply for SIZE the number of bytes of data you have in hand.) +* Menu: - The return value of `mblen' distinguishes three possibilities: the - first SIZE bytes at STRING start with valid multibyte character, - they start with an invalid byte sequence or just part of a - character, or STRING points to an empty string (a null character). +* Selecting the Conversion:: Selecting the conversion and its properties. +* Keeping the state:: Representing the state of the conversion. +* Converting a Character:: Converting Single Characters. +* Converting Strings:: Converting Multibyte and Wide Character + Strings. +* Multibyte Conversion Example:: A Complete Multibyte Conversion Example. - For a valid multibyte character, `mblen' returns the number of - bytes in that character (always at least `1', and never more than - SIZE). For an invalid byte sequence, `mblen' returns -1. For an - empty string, it returns 0. + +File: libc.info, Node: Selecting the Conversion, Next: Keeping the state, Up: Restartable multibyte conversion - If the multibyte character code uses shift characters, then `mblen' - maintains and updates a shift state as it scans. If you call - `mblen' with a null pointer for STRING, that initializes the shift - state to its standard initial value. It also returns a nonzero - value if the multibyte character code in use actually has a shift - state. *Note Shift State::. +Selecting the conversion and its properties +------------------------------------------- - The function `mblen' is declared in `stdlib.h'. + We already said above that the currently selected locale for the +`LC_CTYPE' category decides about the conversion that is performed by +the functions we are about to describe. Each locale uses its own +character set (given as an argument to `localedef') and this is the one +assumed as the external multibyte encoding. The wide character +character set always is UCS-4, at least on GNU systems. - -File: libc.info, Node: Non-reentrant String Conversion, Next: Shift State, Prev: Non-reentrant Character Conversion, Up: Non-reentrant Conversion + A characteristic of each multibyte character set is the maximum +number of bytes that can be necessary to represent one character. This +information is quite important when writing code that uses the +conversion functions (as shown in the examples below). The ISO C +standard defines two macros that provide this information. -Non-reentrant Conversion of Strings ------------------------------------ + - Macro: int MB_LEN_MAX + `MB_LEN_MAX' specifies the maximum number of bytes in the multibyte + sequence for a single character in any of the supported locales. + It is a compile-time constant and is defined in `limits.h'. - For convenience reasons the ISO C90 standard defines also functions -to convert entire strings instead of single characters. These functions -suffer from the same problems as their reentrant counterparts from -Amendment 1 to ISO C90; see *Note Converting Strings::. + - Macro: int MB_CUR_MAX + `MB_CUR_MAX' expands into a positive integer expression that is the + maximum number of bytes in a multibyte character in the current + locale. The value is never greater than `MB_LEN_MAX'. Unlike + `MB_LEN_MAX' this macro need not be a compile-time constant, and in + the GNU C library it is not. - - Function: size_t mbstowcs (wchar_t *WSTRING, const char *STRING, - size_t SIZE) - The `mbstowcs' ("multibyte string to wide character string") - function converts the null-terminated string of multibyte - characters STRING to an array of wide character codes, storing not - more than SIZE wide characters into the array beginning at WSTRING. - The terminating null character counts towards the size, so if SIZE - is less than the actual number of wide characters resulting from - STRING, no terminating null character is stored. + `MB_CUR_MAX' is defined in `stdlib.h'. - The conversion of characters from STRING begins in the initial - shift state. + Two different macros are necessary since strictly ISO C90 compilers +do not allow variable length array definitions, but still it is +desirable to avoid dynamic allocation. This incomplete piece of code +shows the problem: - If an invalid multibyte character sequence is found, this function - returns a value of -1. Otherwise, it returns the number of wide - characters stored in the array WSTRING. This number does not - include the terminating null character, which is present if the - number is less than SIZE. + { + char buf[MB_LEN_MAX]; + ssize_t len = 0; + + while (! feof (fp)) + { + fread (&buf[len], 1, MB_CUR_MAX - len, fp); + /* ... process buf */ + len -= used; + } + } - Here is an example showing how to convert a string of multibyte - characters, allocating enough space for the result. + The code in the inner loop is expected to have always enough bytes in +the array BUF to convert one multibyte character. The array BUF has to +be sized statically since many compilers do not allow a variable size. +The `fread' call makes sure that `MB_CUR_MAX' bytes are always +available in BUF. Note that it isn't a problem if `MB_CUR_MAX' is not +a compile-time constant. - wchar_t * - mbstowcs_alloc (const char *string) - { - size_t size = strlen (string) + 1; - wchar_t *buf = xmalloc (size * sizeof (wchar_t)); - - size = mbstowcs (buf, string, size); - if (size == (size_t) -1) - return NULL; - buf = xrealloc (buf, (size + 1) * sizeof (wchar_t)); - return buf; - } + +File: libc.info, Node: Keeping the state, Next: Converting a Character, Prev: Selecting the Conversion, Up: Restartable multibyte conversion +Representing the state of the conversion +---------------------------------------- - - Function: size_t wcstombs (char *STRING, const wchar_t *WSTRING, - size_t SIZE) - The `wcstombs' ("wide character string to multibyte string") - function converts the null-terminated wide character array WSTRING - into a string containing multibyte characters, storing not more - than SIZE bytes starting at STRING, followed by a terminating null - character if there is room. The conversion of characters begins in - the initial shift state. + In the introduction of this chapter it was said that certain +character sets use a "stateful" encoding. That is, the encoded values +depend in some way on the previous bytes in the text. - The terminating null character counts towards the size, so if SIZE - is less than or equal to the number of bytes needed in WSTRING, no - terminating null character is stored. + Since the conversion functions allow converting a text in more than +one step we must have a way to pass this information from one call of +the functions to another. - If a code that does not correspond to a valid multibyte character - is found, this function returns a value of -1. Otherwise, the - return value is the number of bytes stored in the array STRING. - This number does not include the terminating null character, which - is present if the number is less than SIZE. + - Data type: mbstate_t + A variable of type `mbstate_t' can contain all the information + about the "shift state" needed from one call to a conversion + function to another. - -File: libc.info, Node: Shift State, Prev: Non-reentrant String Conversion, Up: Non-reentrant Conversion + `mbstate_t' is defined in `wchar.h'. It was introduced in + Amendment 1 to ISO C90. -States in Non-reentrant Functions ---------------------------------- + To use objects of type `mbstate_t' the programmer has to define such +objects (normally as local variables on the stack) and pass a pointer to +the object to the conversion functions. This way the conversion +function can update the object if the current multibyte character set +is stateful. - In some multibyte character codes, the _meaning_ of any particular -byte sequence is not fixed; it depends on what other sequences have come -earlier in the same string. Typically there are just a few sequences -that can change the meaning of other sequences; these few are called -"shift sequences" and we say that they set the "shift state" for other -sequences that follow. + There is no specific function or initializer to put the state object +in any specific state. The rules are that the object should always +represent the initial state before the first use, and this is achieved +by clearing the whole variable with code such as follows: - To illustrate shift state and shift sequences, suppose we decide that -the sequence `0200' (just one byte) enters Japanese mode, in which -pairs of bytes in the range from `0240' to `0377' are single -characters, while `0201' enters Latin-1 mode, in which single bytes in -the range from `0240' to `0377' are characters, and interpreted -according to the ISO Latin-1 character set. This is a multibyte code -which has two alternative shift states ("Japanese mode" and "Latin-1 -mode"), and two shift sequences that specify particular shift states. + { + mbstate_t state; + memset (&state, '\0', sizeof (state)); + /* from now on STATE can be used. */ + ... + } - When the multibyte character code in use has shift states, then -`mblen', `mbtowc' and `wctomb' must maintain and update the current -shift state as they scan the string. To make this work properly, you -must follow these rules: + When using the conversion functions to generate output it is often +necessary to test whether the current state corresponds to the initial +state. This is necessary, for example, to decide whether to emit +escape sequences to set the state to the initial state at certain +sequence points. Communication protocols often require this. - * Before starting to scan a string, call the function with a null - pointer for the multibyte character address--for example, `mblen - (NULL, 0)'. This initializes the shift state to its standard - initial value. + - Function: int mbsinit (const mbstate_t *PS) + The `mbsinit' function determines whether the state object pointed + to by PS is in the initial state. If PS is a null pointer or the + object is in the initial state the return value is nonzero. + Otherwise it is zero. - * Scan the string one character at a time, in order. Do not "back - up" and rescan characters already scanned, and do not intersperse - the processing of different strings. + `mbsinit' was introduced in Amendment 1 to ISO C90 and is declared + in `wchar.h'. - Here is an example of using `mblen' following these rules: + Code using `mbsinit' often looks similar to this: - void - scan_string (char *s) { - int length = strlen (s); - - /* Initialize shift state. */ - mblen (NULL, 0); - - while (1) + mbstate_t state; + memset (&state, '\0', sizeof (state)); + /* Use STATE. */ + ... + if (! mbsinit (&state)) { - int thischar = mblen (s, length); - /* Deal with end of string and invalid characters. */ - if (thischar == 0) - break; - if (thischar == -1) - { - error ("invalid multibyte character"); - break; - } - /* Advance past this character. */ - s += thischar; - length -= thischar; + /* Emit code to return to initial state. */ + const wchar_t empty[] = L""; + const wchar_t *srcp = empty; + wcsrtombs (outbuf, &srcp, outbuflen, &state); } + ... } - The functions `mblen', `mbtowc' and `wctomb' are not reentrant when -using a multibyte code that uses a shift state. However, no other -library functions call these functions, so you don't have to worry that -the shift state will be changed mysteriously. + The code to emit the escape sequence to get back to the initial +state is interesting. The `wcsrtombs' function can be used to +determine the necessary output code (*note Converting Strings::). +Please note that on GNU systems it is not necessary to perform this +extra action for the conversion from multibyte text to wide character +text since the wide character encoding is not stateful. But there is +nothing mentioned in any standard that prohibits making `wchar_t' using +a stateful encoding.  -File: libc.info, Node: Generic Charset Conversion, Prev: Non-reentrant Conversion, Up: Character Set Handling - -Generic Charset Conversion -========================== - - The conversion functions mentioned so far in this chapter all had in -common that they operate on character sets which are not directly -specified by the functions. The multibyte encoding used is specified by -the currently selected locale for the `LC_CTYPE' category. The wide -character set is fixed by the implementation (in the case of GNU C -library it always is UCS-4 encoded ISO 10646. - - This has of course several problems when it comes to general -character conversion: - - * For every conversion where neither the source or destination - character set is the character set of the locale for the - `LC_CTYPE' category, one has to change the `LC_CTYPE' locale using - `setlocale'. - - This introduces major problems for the rest of the programs since - several more functions (e.g., the character classification - functions, *note Classification of Characters::) use the - `LC_CTYPE' category. - - * Parallel conversions to and from different character sets are not - possible since the `LC_CTYPE' selection is global and shared by all - threads. - - * If neither the source nor the destination character set is the - character set used for `wchar_t' representation there is at least - a two-step process necessary to convert a text using the functions - above. One would have to select the source character set as the - multibyte encoding, convert the text into a `wchar_t' text, select - the destination character set as the multibyte encoding and - convert the wide character text to the multibyte (= destination) - character set. +File: libc.info, Node: Converting a Character, Next: Converting Strings, Prev: Keeping the state, Up: Restartable multibyte conversion - Even if this is possible (which is not guaranteed) it is a very - tiring work. Plus it suffers from the other two raised points - even more due to the steady changing of the locale. +Converting Single Characters +---------------------------- - The XPG2 standard defines a completely new set of functions which has -none of these limitations. They are not at all coupled to the selected -locales and they but no constraints on the character sets selected for -source and destination. Only the set of available conversions is -limiting them. The standard does not specify that any conversion at all -must be available. It is a measure of the quality of the -implementation. + The most fundamental of the conversion functions are those dealing +with single characters. Please note that this does not always mean +single bytes. But since there is very often a subset of the multibyte +character set that consists of single byte sequences, there are +functions to help with converting bytes. Frequently, ASCII is a subpart +of the multibyte character set. In such a scenario, each ASCII +character stands for itself, and all other characters have at least a +first byte that is beyond the range 0 to 127. - In the following text first the interface to `iconv', the conversion -function, will be described. Comparisons with other implementations -will show what pitfalls lie on the way of portable applications. At -last, the implementation is described as far as interesting to the -advanced user who wants to extend the conversion capabilities. + - Function: wint_t btowc (int C) + The `btowc' function ("byte to wide character") converts a valid + single byte character C in the initial shift state into the wide + character equivalent using the conversion rules from the currently + selected locale of the `LC_CTYPE' category. -* Menu: + If `(unsigned char) C' is no valid single byte multibyte character + or if C is `EOF', the function returns `WEOF'. -* Generic Conversion Interface:: Generic Character Set Conversion Interface. -* iconv Examples:: A complete `iconv' example. -* Other iconv Implementations:: Some Details about other `iconv' - Implementations. -* glibc iconv Implementation:: The `iconv' Implementation in the GNU C - library. + Please note the restriction of C being tested for validity only in + the initial shift state. No `mbstate_t' object is used from which + the state information is taken, and the function also does not use + any static state. - -File: libc.info, Node: Generic Conversion Interface, Next: iconv Examples, Up: Generic Charset Conversion + The `btowc' function was introduced in Amendment 1 to ISO C90 and + is declared in `wchar.h'. -Generic Character Set Conversion Interface ------------------------------------------- + Despite the limitation that the single byte value always is +interpreted in the initial state this function is actually useful most +of the time. Most characters are either entirely single-byte character +sets or they are extension to ASCII. But then it is possible to write +code like this (not that this specific example is very useful): - This set of functions follows the traditional cycle of using a -resource: open-use-close. The interface consists of three functions, -each of which implement one step. + wchar_t * + itow (unsigned long int val) + { + static wchar_t buf[30]; + wchar_t *wcp = &buf[29]; + *wcp = L'\0'; + while (val != 0) + { + *--wcp = btowc ('0' + val % 10); + val /= 10; + } + if (wcp == &buf[29]) + *--wcp = L'0'; + return wcp; + } - Before the interfaces are described it is necessary to introduce a -datatype. Just like other open-use-close interface the functions -introduced here work using a handles and the `iconv.h' header defines a -special type for the handles used. + Why is it necessary to use such a complicated implementation and not +simply cast `'0' + val % 10' to a wide character? The answer is that +there is no guarantee that one can perform this kind of arithmetic on +the character of the character set used for `wchar_t' representation. +In other situations the bytes are not constant at compile time and so +the compiler cannot do the work. In situations like this it is +necessary `btowc'. - - Data Type: iconv_t - This data type is an abstract type defined in `iconv.h'. The user - must not assume anything about the definition of this type, it - must be completely opaque. +There also is a function for the conversion in the other direction. - Objects of this type can get assigned handles for the conversions - using the `iconv' functions. The objects themselves need not be - freed but the conversions for which the handles stand for have to. + - Function: int wctob (wint_t C) + The `wctob' function ("wide character to byte") takes as the + parameter a valid wide character. If the multibyte representation + for this character in the initial state is exactly one byte long, + the return value of this function is this character. Otherwise + the return value is `EOF'. -The first step is the function to create a handle. + `wctob' was introduced in Amendment 1 to ISO C90 and is declared + in `wchar.h'. - - Function: iconv_t iconv_open (const char *TOCODE, const char - *FROMCODE) - The `iconv_open' function has to be used before starting a - conversion. The two parameters this function takes determine the - source and destination character set for the conversion and if the - implementation has the possibility to perform such a conversion the - function returns a handle. + There are more general functions to convert single character from +multibyte representation to wide characters and vice versa. These +functions pose no limit on the length of the multibyte representation +and they also do not require it to be in the initial state. - If the wanted conversion is not available the function returns - `(iconv_t) -1'. In this case the global variable `errno' can have - the following values: + - Function: size_t mbrtowc (wchar_t *restrict PWC, const char + *restrict S, size_t N, mbstate_t *restrict PS) + The `mbrtowc' function ("multibyte restartable to wide character") + converts the next multibyte character in the string pointed to by + S into a wide character and stores it in the wide character string + pointed to by PWC. The conversion is performed according to the + locale currently selected for the `LC_CTYPE' category. If the + conversion for the character set used in the locale requires a + state, the multibyte string is interpreted in the state + represented by the object pointed to by PS. If PS is a null + pointer, a static, internal state variable used only by the + `mbrtowc' function is used. - `EMFILE' - The process already has `OPEN_MAX' file descriptors open. + If the next multibyte character corresponds to the NUL wide + character, the return value of the function is 0 and the state + object is afterwards in the initial state. If the next N or fewer + bytes form a correct multibyte character, the return value is the + number of bytes starting from S that form the multibyte character. + The conversion state is updated according to the bytes consumed + in the conversion. In both cases the wide character (either the + `L'\0'' or the one found in the conversion) is stored in the + string pointed to by PWC if PWC is not null. - `ENFILE' - The system limit of open file is reached. + If the first N bytes of the multibyte string possibly form a valid + multibyte character but there are more than N bytes needed to + complete it, the return value of the function is `(size_t) -2' and + no value is stored. Please note that this can happen even if N + has a value greater than or equal to `MB_CUR_MAX' since the input + might contain redundant shift sequences. - `ENOMEM' - Not enough memory to carry out the operation. + If the first `n' bytes of the multibyte string cannot possibly form + a valid multibyte character, no value is stored, the global + variable `errno' is set to the value `EILSEQ', and the function + returns `(size_t) -1'. The conversion state is afterwards + undefined. - `EINVAL' - The conversion from FROMCODE to TOCODE is not supported. + `mbrtowc' was introduced in Amendment 1 to ISO C90 and is declared + in `wchar.h'. - It is not possible to use the same descriptor in different threads - to perform independent conversions. Within the data structures - associated with the descriptor there is information about the - conversion state. This must not be messed up by using it in - different conversions. + Use of `mbrtowc' is straightforward. A function that copies a +multibyte string into a wide character string while at the same time +converting all lowercase characters into uppercase could look like this +(this is not the final version, just an example; it has no error +checking, and sometimes leaks memory): - An `iconv' descriptor is like a file descriptor as for every use a - new descriptor must be created. The descriptor does not stand for - all of the conversions from FROMSET to TOSET. + wchar_t * + mbstouwcs (const char *s) + { + size_t len = strlen (s); + wchar_t *result = malloc ((len + 1) * sizeof (wchar_t)); + wchar_t *wcp = result; + wchar_t tmp[1]; + mbstate_t state; + size_t nbytes; + + memset (&state, '\0', sizeof (state)); + while ((nbytes = mbrtowc (tmp, s, len, &state)) > 0) + { + if (nbytes >= (size_t) -2) + /* Invalid input string. */ + return NULL; + *result++ = towupper (tmp[0]); + len -= nbytes; + s += nbytes; + } + return result; + } - The GNU C library implementation of `iconv_open' has one - significant extension to other implementations. To ease the - extension of the set of available conversions the implementation - allows storing the necessary files with data and code in - arbitrarily many directories. How this extension has to be - written will be explained below (*note glibc iconv - Implementation::). Here it is only important to say that all - directories mentioned in the `GCONV_PATH' environment variable are - considered if they contain a file `gconv-modules'. These - directories need not necessarily be created by the system - administrator. In fact, this extension is introduced to help users - writing and using their own, new conversions. Of course this does - not work for security reasons in SUID binaries; in this case only - the system directory is considered and this normally is - `PREFIX/lib/gconv'. The `GCONV_PATH' environment variable is - examined exactly once at the first call of the `iconv_open' - function. Later modifications of the variable have no effect. + The use of `mbrtowc' should be clear. A single wide character is +stored in `TMP[0]', and the number of consumed bytes is stored in the +variable NBYTES. If the conversion is successful, the uppercase +variant of the wide character is stored in the RESULT array and the +pointer to the input string and the number of available bytes is +adjusted. - This function got introduced early in the X/Open Portability Guide, - version 2. It is supported by all commercial Unices as it is - required for the Unix branding. However, the quality and - completeness of the implementation varies widely. The function is - declared in `iconv.h'. + The only non-obvious thing about `mbrtowc' might be the way memory +is allocated for the result. The above code uses the fact that there +can never be more wide characters in the converted results than there +are bytes in the multibyte input string. This method yields a +pessimistic guess about the size of the result, and if many wide +character strings have to be constructed this way or if the strings are +long, the extra memory required to be allocated because the input +string contains multibyte characters might be significant. The +allocated memory block can be resized to the correct size before +returning it, but a better solution might be to allocate just the right +amount of space for the result right away. Unfortunately there is no +function to compute the length of the wide character string directly +from the multibyte string. There is, however, a function that does +part of the work. - The `iconv' implementation can associate large data structure with -the handle returned by `iconv_open'. Therefore it is crucial to free -all the resources once all conversions are carried out and the -conversion is not needed anymore. + - Function: size_t mbrlen (const char *restrict S, size_t N, mbstate_t + *PS) + The `mbrlen' function ("multibyte restartable length") computes + the number of at most N bytes starting at S, which form the next + valid and complete multibyte character. - - Function: int iconv_close (iconv_t CD) - The `iconv_close' function frees all resources associated with the - handle CD which must have been returned by a successful call to - the `iconv_open' function. + If the next multibyte character corresponds to the NUL wide + character, the return value is 0. If the next N bytes form a valid + multibyte character, the number of bytes belonging to this + multibyte character byte sequence is returned. - If the function call was successful the return value is 0. - Otherwise it is -1 and `errno' is set appropriately. Defined - error are: + If the the first N bytes possibly form a valid multibyte character + but the character is incomplete, the return value is `(size_t) + -2'. Otherwise the multibyte character sequence is invalid and + the return value is `(size_t) -1'. - `EBADF' - The conversion descriptor is invalid. + The multibyte sequence is interpreted in the state represented by + the object pointed to by PS. If PS is a null pointer, a state + object local to `mbrlen' is used. - This function was introduced together with the rest of the `iconv' - functions in XPG2 and it is declared in `iconv.h'. + `mbrlen' was introduced in Amendment 1 to ISO C90 and is declared + in `wchar.h'. - The standard defines only one actual conversion function. This has -therefore the most general interface: it allows conversion from one -buffer to another. Conversion from a file to a buffer, vice versa, or -even file to file can be implemented on top of it. + The attentive reader now will note that `mbrlen' can be implemented +as - - Function: size_t iconv (iconv_t CD, char **INBUF, size_t - *INBYTESLEFT, char **OUTBUF, size_t *OUTBYTESLEFT) - The `iconv' function converts the text in the input buffer - according to the rules associated with the descriptor CD and - stores the result in the output buffer. It is possible to call the - function for the same text several times in a row since for - stateful character sets the necessary state information is kept in - the data structures associated with the descriptor. + mbrtowc (NULL, s, n, ps != NULL ? ps : &internal) - The input buffer is specified by `*INBUF' and it contains - `*INBYTESLEFT' bytes. The extra indirection is necessary for - communicating the used input back to the caller (see below). It is - important to note that the buffer pointer is of type `char' and the - length is measured in bytes even if the input text is encoded in - wide characters. + This is true and in fact is mentioned in the official specification. +How can this function be used to determine the length of the wide +character string created from a multibyte character string? It is not +directly usable, but we can define a function `mbslen' using it: - The output buffer is specified in a similar way. `*OUTBUF' points - to the beginning of the buffer with at least `*OUTBYTESLEFT' bytes - room for the result. The buffer pointer again is of type `char' - and the length is measured in bytes. If OUTBUF or `*OUTBUF' is a - null pointer the conversion is performed but no output is - available. + size_t + mbslen (const char *s) + { + mbstate_t state; + size_t result = 0; + size_t nbytes; + memset (&state, '\0', sizeof (state)); + while ((nbytes = mbrlen (s, MB_LEN_MAX, &state)) > 0) + { + if (nbytes >= (size_t) -2) + /* Something is wrong. */ + return (size_t) -1; + s += nbytes; + ++result; + } + return result; + } - If INBUF is a null pointer the `iconv' function performs the - necessary action to put the state of the conversion into the - initial state. This is obviously a no-op for non-stateful - encodings, but if the encoding has a state such a function call - might put some byte sequences in the output buffer which perform - the necessary state changes. The next call with INBUF not being a - null pointer then simply goes on from the initial state. It is - important that the programmer never makes any assumption on - whether the conversion has to deal with states or not. Even if - the input and output character sets are not stateful the - implementation might still have to keep states. This is due to the - implementation chosen for the GNU C library as it is described - below. Therefore an `iconv' call to reset the state should always - be performed if some protocol requires this for the output text. + This function simply calls `mbrlen' for each multibyte character in +the string and counts the number of function calls. Please note that +we here use `MB_LEN_MAX' as the size argument in the `mbrlen' call. +This is acceptable since a) this value is larger then the length of the +longest multibyte character sequence and b) we know that the string S +ends with a NUL byte, which cannot be part of any other multibyte +character sequence but the one representing the NUL wide character. +Therefore, the `mbrlen' function will never read invalid memory. - The conversion stops for three reasons. The first is that all - characters from the input buffer are converted. This actually can - mean two things: really all bytes from the input buffer are - consumed or there are some bytes at the end of the buffer which - possibly can form a complete character but the input is - incomplete. The second reason for a stop is when the output - buffer is full. And the third reason is that the input contains - invalid characters. + Now that this function is available (just to make this clear, this +function is _not_ part of the GNU C library) we can compute the number +of wide character required to store the converted multibyte character +string S using - In all these cases the buffer pointers after the last successful - conversion, for input and output buffer, are stored in INBUF and - OUTBUF and the available room in each buffer is stored in - INBYTESLEFT and OUTBYTESLEFT. + wcs_bytes = (mbslen (s) + 1) * sizeof (wchar_t); - Since the character sets selected in the `iconv_open' call can be - almost arbitrary there can be situations where the input buffer - contains valid characters which have no identical representation - in the output character set. The behavior in this situation is - undefined. The _current_ behavior of the GNU C library in this - situation is to return with an error immediately. This certainly - is not the most desirable solution. Therefore future versions - will provide better ones but they are not yet finished. + Please note that the `mbslen' function is quite inefficient. The +implementation of `mbstouwcs' with `mbslen' would have to perform the +conversion of the multibyte character input string twice, and this +conversion might be quite expensive. So it is necessary to think about +the consequences of using the easier but imprecise method before doing +the work twice. - If all input from the input buffer is successfully converted and - stored in the output buffer the function returns the number of - non-reversible conversions performed. In all other cases the - return value is `(size_t) -1' and `errno' is set appropriately. - In this case the value pointed to by INBYTESLEFT is nonzero. + - Function: size_t wcrtomb (char *restrict S, wchar_t WC, mbstate_t + *restrict PS) + The `wcrtomb' function ("wide character restartable to multibyte") + converts a single wide character into a multibyte string + corresponding to that wide character. - `EILSEQ' - The conversion stopped because of an invalid byte sequence in - the input. After the call `*INBUF' points at the first byte - of the invalid byte sequence. + If S is a null pointer, the function resets the state stored in + the objects pointed to by PS (or the internal `mbstate_t' object) + to the initial state. This can also be achieved by a call like + this: - `E2BIG' - The conversion stopped because it ran out of space in the - output buffer. + wcrtombs (temp_buf, L'\0', ps) - `EINVAL' - The conversion stopped because of an incomplete byte sequence - at the end of the input buffer. + since, if S is a null pointer, `wcrtomb' performs as if it writes + into an internal buffer, which is guaranteed to be large enough. - `EBADF' - The CD argument is invalid. + If WC is the NUL wide character, `wcrtomb' emits, if necessary, a + shift sequence to get the state PS into the initial state followed + by a single NUL byte, which is stored in the string S. - This function was introduced in the XPG2 standard and is declared - in the `iconv.h' header. + Otherwise a byte sequence (possibly including shift sequences) is + written into the string S. This only happens if WC is a valid wide + character (i.e., it has a multibyte representation in the + character set selected by locale of the `LC_CTYPE' category). If + WC is no valid wide character, nothing is stored in the strings S, + `errno' is set to `EILSEQ', the conversion state in PS is + undefined and the return value is `(size_t) -1'. - The definition of the `iconv' function is quite good overall. It -provides quite flexible functionality. The only problems lie in the -boundary cases which are incomplete byte sequences at the end of the -input buffer and invalid input. A third problem, which is not really a -design problem, is the way conversions are selected. The standard does -not say anything about the legitimate names, a minimal set of available -conversions. We will see how this negatively impacts other -implementations, as is demonstrated below. + If no error occurred the function returns the number of bytes + stored in the string S. This includes all bytes representing shift + sequences. - -File: libc.info, Node: iconv Examples, Next: Other iconv Implementations, Prev: Generic Conversion Interface, Up: Generic Charset Conversion + One word about the interface of the function: there is no parameter + specifying the length of the array S. Instead the function + assumes that there are at least `MB_CUR_MAX' bytes available since + this is the maximum length of any byte sequence representing a + single character. So the caller has to make sure that there is + enough space available, otherwise buffer overruns can occur. -A complete `iconv' example --------------------------- + `wcrtomb' was introduced in Amendment 1 to ISO C90 and is declared + in `wchar.h'. - The example below features a solution for a common problem. Given -that one knows the internal encoding used by the system for `wchar_t' -strings one often is in the position to read text from a file and store -it in wide character buffers. One can do this using `mbsrtowcs' but -then we run into the problems discussed above. + Using `wcrtomb' is as easy as using `mbrtowc'. The following +example appends a wide character string to a multibyte character string. +Again, the code is not really useful (or correct), it is simply here to +demonstrate the use and some problems. - int - file2wcs (int fd, const char *charset, wchar_t *outbuf, size_t avail) + char * + mbscatwcs (char *s, size_t len, const wchar_t *ws) { - char inbuf[BUFSIZ]; - size_t insize = 0; - char *wrptr = (char *) outbuf; - int result = 0; - iconv_t cd; - - cd = iconv_open ("WCHAR_T", charset); - if (cd == (iconv_t) -1) - { - /* Something went wrong. */ - if (errno == EINVAL) - error (0, 0, "conversion from '%s' to wchar_t not available", - charset); - else - perror ("iconv_open"); - - /* Terminate the output string. */ - *outbuf = L'\0'; - - return -1; - } - - while (avail > 0) + mbstate_t state; + /* Find the end of the existing string. */ + char *wp = strchr (s, '\0'); + len -= wp - s; + memset (&state, '\0', sizeof (state)); + do { - size_t nread; - size_t nconv; - char *inptr = inbuf; - - /* Read more input. */ - nread = read (fd, inbuf + insize, sizeof (inbuf) - insize); - if (nread == 0) - { - /* When we come here the file is completely read. - This still could mean there are some unused - characters in the `inbuf'. Put them back. */ - if (lseek (fd, -insize, SEEK_CUR) == -1) - result = -1; - - /* Now write out the byte sequence to get into the - initial state if this is necessary. */ - iconv (cd, NULL, NULL, &wrptr, &avail); - - break; - } - insize += nread; - - /* Do the conversion. */ - nconv = iconv (cd, &inptr, &insize, &wrptr, &avail); - if (nconv == (size_t) -1) + size_t nbytes; + if (len < MB_CUR_LEN) { - /* Not everything went right. It might only be - an unfinished byte sequence at the end of the - buffer. Or it is a real problem. */ - if (errno == EINVAL) - /* This is harmless. Simply move the unused - bytes to the beginning of the buffer so that - they can be used in the next round. */ - memmove (inbuf, inptr, insize); - else - { - /* It is a real problem. Maybe we ran out of - space in the output buffer or we have invalid - input. In any case back the file pointer to - the position of the last processed byte. */ - lseek (fd, -insize, SEEK_CUR); - result = -1; - break; - } + /* We cannot guarantee that the next + character fits into the buffer, so + return an error. */ + errno = E2BIG; + return NULL; } + nbytes = wcrtomb (wp, *ws, &state); + if (nbytes == (size_t) -1) + /* Error in the conversion. */ + return NULL; + len -= nbytes; + wp += nbytes; } - - /* Terminate the output string. */ - if (avail >= sizeof (wchar_t)) - *((wchar_t *) wrptr) = L'\0'; - - if (iconv_close (cd) != 0) - perror ("iconv_close"); - - return (wchar_t *) wrptr - outbuf; + while (*ws++ != L'\0'); + return s; } - This example shows the most important aspects of using the `iconv' -functions. It shows how successive calls to `iconv' can be used to -convert large amounts of text. The user does not have to care about -stateful encodings as the functions take care of everything. + First the function has to find the end of the string currently in the +array S. The `strchr' call does this very efficiently since a +requirement for multibyte character representations is that the NUL byte +is never used except to represent itself (and in this context, the end +of the string). - An interesting point is the case where `iconv' return an error and -`errno' is set to `EINVAL'. This is not really an error in the -transformation. It can happen whenever the input character set -contains byte sequences of more than one byte for some character and -texts are not processed in one piece. In this case there is a chance -that a multibyte sequence is cut. The caller than can simply read the -remainder of the takes and feed the offending bytes together with new -character from the input to `iconv' and continue the work. The -internal state kept in the descriptor is _not_ unspecified after such -an event as it is the case with the conversion functions from the ISO C -standard. + After initializing the state object the loop is entered where the +first task is to make sure there is enough room in the array S. We +abort if there are not at least `MB_CUR_LEN' bytes available. This is +not always optimal but we have no other choice. We might have less +than `MB_CUR_LEN' bytes available but the next multibyte character +might also be only one byte long. At the time the `wcrtomb' call +returns it is too late to decide whether the buffer was large enough. +If this solution is unsuitable, there is a very slow but more accurate +solution. - The example also shows the problem of using wide character strings -with `iconv'. As explained in the description of the `iconv' function -above the function always takes a pointer to a `char' array and the -available space is measured in bytes. In the example the output buffer -is a wide character buffer. Therefore we use a local variable WRPTR of -type `char *' which is used in the `iconv' calls. + ... + if (len < MB_CUR_LEN) + { + mbstate_t temp_state; + memcpy (&temp_state, &state, sizeof (state)); + if (wcrtomb (NULL, *ws, &temp_state) > len) + { + /* We cannot guarantee that the next + character fits into the buffer, so + return an error. */ + errno = E2BIG; + return NULL; + } + } + ... - This looks rather innocent but can lead to problems on platforms -which have tight restriction on alignment. Therefore the caller of -`iconv' has to make sure that the pointers passed are suitable for -access of characters from the appropriate character set. Since in the -above case the input parameter to the function is a `wchar_t' pointer -this is the case (unless the user violates alignment when computing the -parameter). But in other situations, especially when writing generic -functions where one does not know what type of character set one uses -and therefore treats text as a sequence of bytes, it might become -tricky. + Here we perform the conversion that might overflow the buffer so that +we are afterwards in the position to make an exact decision about the +buffer size. Please note the `NULL' argument for the destination +buffer in the new `wcrtomb' call; since we are not interested in the +converted text at this point, this is a nice way to express this. The +most unusual thing about this piece of code certainly is the duplication +of the conversion state object, but if a change of the state is +necessary to emit the next multibyte character, we want to have the +same shift state change performed in the real conversion. Therefore, +we have to preserve the initial shift state information. + + There are certainly many more and even better solutions to this +problem. This example is only provided for educational purposes.  -File: libc.info, Node: Other iconv Implementations, Next: glibc iconv Implementation, Prev: iconv Examples, Up: Generic Charset Conversion +File: libc.info, Node: Converting Strings, Next: Multibyte Conversion Example, Prev: Converting a Character, Up: Restartable multibyte conversion -Some Details about other `iconv' Implementations ------------------------------------------------- +Converting Multibyte and Wide Character Strings +----------------------------------------------- - This is not really the place to discuss the `iconv' implementation -of other systems but it is necessary to know a bit about them to write -portable programs. The above mentioned problems with the specification -of the `iconv' functions can lead to portability issues. + The functions described in the previous section only convert a single +character at a time. Most operations to be performed in real-world +programs include strings and therefore the ISO C standard also defines +conversions on entire strings. However, the defined set of functions +is quite limited; therefore, the GNU C library contains a few +extensions that can help in some important situations. - The first thing to notice is that due to the large number of -character sets in use it is certainly not practical to encode the -conversions directly in the C library. Therefore the conversion -information must come from files outside the C library. This is -usually done in one or both of the following ways: + - Function: size_t mbsrtowcs (wchar_t *restrict DST, const char + **restrict SRC, size_t LEN, mbstate_t *restrict PS) + The `mbsrtowcs' function ("multibyte string restartable to wide + character string") converts an NUL-terminated multibyte character + string at `*SRC' into an equivalent wide character string, + including the NUL wide character at the end. The conversion is + started using the state information from the object pointed to by + PS or from an internal object of `mbsrtowcs' if PS is a null + pointer. Before returning, the state object is updated to match + the state after the last converted character. The state is the + initial state if the terminating NUL byte is reached and converted. - * The C library contains a set of generic conversion functions which - can read the needed conversion tables and other information from - data files. These files get loaded when necessary. + If DST is not a null pointer, the result is stored in the array + pointed to by DST; otherwise, the conversion result is not + available since it is stored in an internal buffer. - This solution is problematic as it requires a great deal of effort - to apply to all character sets (potentially an infinite set). The - differences in the structure of the different character sets is so - large that many different variants of the table processing - functions must be developed. On top of this the generic nature of - these functions make them slower than specifically implemented - functions. + If LEN wide characters are stored in the array DST before reaching + the end of the input string, the conversion stops and LEN is + returned. If DST is a null pointer, LEN is never checked. - * The C library only contains a framework which can dynamically load - object files and execute the therein contained conversion - functions. + Another reason for a premature return from the function call is if + the input string contains an invalid multibyte sequence. In this + case the global variable `errno' is set to `EILSEQ' and the + function returns `(size_t) -1'. - This solution provides much more flexibility. The C library itself - contains only very little code and therefore reduces the general - memory footprint. Also, with a documented interface between the C - library and the loadable modules it is possible for third parties - to extend the set of available conversion modules. A drawback of - this solution is that dynamic loading must be available. + In all other cases the function returns the number of wide + characters converted during this call. If DST is not null, + `mbsrtowcs' stores in the pointer pointed to by SRC either a null + pointer (if the NUL byte in the input string was reached) or the + address of the byte following the last converted multibyte + character. - Some implementations in commercial Unices implement a mixture of -these these possibilities, the majority only the second solution. Using -loadable modules moves the code out of the library itself and keeps the -door open for extensions and improvements. But this design is also -limiting on some platforms since not many platforms support dynamic -loading in statically linked programs. On platforms without his -capability it is therefore not possible to use this interface in -statically linked programs. The GNU C library has on ELF platforms no -problems with dynamic loading in in these situations and therefore this -point is moot. The danger is that one gets acquainted with this and -forgets about the restrictions on other systems. + `mbsrtowcs' was introduced in Amendment 1 to ISO C90 and is + declared in `wchar.h'. - A second thing to know about other `iconv' implementations is that -the number of available conversions is often very limited. Some -implementations provide in the standard release (not special -international or developer releases) at most 100 to 200 conversion -possibilities. This does not mean 200 different character sets are -supported. E.g., conversions from one character set to a set of, say, -10 others counts as 10 conversion. Together with the other direction -this makes already 20. One can imagine the thin coverage these platform -provide. Some Unix vendors even provide only a handful of conversions -which renders them useless for almost all uses. + The definition of the `mbsrtowcs' function has one important +limitation. The requirement that DST has to be a NUL-terminated string +provides problems if one wants to convert buffers with text. A buffer +is normally no collection of NUL-terminated strings but instead a +continuous collection of lines, separated by newline characters. Now +assume that a function to convert one line from a buffer is needed. +Since the line is not NUL-terminated, the source pointer cannot +directly point into the unmodified text buffer. This means, either one +inserts the NUL byte at the appropriate place for the time of the +`mbsrtowcs' function call (which is not doable for a read-only buffer +or in a multi-threaded application) or one copies the line in an extra +buffer where it can be terminated by a NUL byte. Note that it is not +in general possible to limit the number of characters to convert by +setting the parameter LEN to any specific value. Since it is not known +how many bytes each multibyte character sequence is in length, one can +only guess. - This directly leads to a third and probably the most problematic -point. The way the `iconv' conversion functions are implemented on all -known Unix system and the availability of the conversion functions from -character set A to B and the conversion from B to C does _not_ imply -that the conversion from A to C is available. + There is still a problem with the method of NUL-terminating a line +right after the newline character, which could lead to very strange +results. As said in the description of the `mbsrtowcs' function above +the conversion state is guaranteed to be in the initial shift state +after processing the NUL byte at the end of the input string. But this +NUL byte is not really part of the text (i.e., the conversion state +after the newline in the original text could be something different +than the initial shift state and therefore the first character of the +next line is encoded using this state). But the state in question is +never accessible to the user since the conversion stops after the NUL +byte (which resets the state). Most stateful character sets in use +today require that the shift state after a newline be the initial +state-but this is not a strict guarantee. Therefore, simply +NUL-terminating a piece of a running text is not always an adequate +solution and, therefore, should never be used in generally used code. - This might not seem unreasonable and problematic at first but it is a -quite big problem as one will notice shortly after hitting it. To show -the problem we assume to write a program which has to convert from A to -C. A call like + The generic conversion interface (*note Generic Charset Conversion::) +does not have this limitation (it simply works on buffers, not +strings), and the GNU C library contains a set of functions that take +additional parameters specifying the maximal number of bytes that are +consumed from the input string. This way the problem of `mbsrtowcs''s +example above could be solved by determining the line length and +passing this length to the function. - cd = iconv_open ("C", "A"); + - Function: size_t wcsrtombs (char *restrict DST, const wchar_t + **restrict SRC, size_t LEN, mbstate_t *restrict PS) + The `wcsrtombs' function ("wide character string restartable to + multibyte string") converts the NUL-terminated wide character + string at `*SRC' into an equivalent multibyte character string and + stores the result in the array pointed to by DST. The NUL wide + character is also converted. The conversion starts in the state + described in the object pointed to by PS or by a state object + locally to `wcsrtombs' in case PS is a null pointer. If DST is a + null pointer, the conversion is performed as usual but the result + is not available. If all characters of the input string were + successfully converted and if DST is not a null pointer, the + pointer pointed to by SRC gets assigned a null pointer. -does fail according to the assumption above. But what does the program -do now? The conversion is really necessary and therefore simply giving -up is no possibility. + If one of the wide characters in the input string has no valid + multibyte character equivalent, the conversion stops early, sets + the global variable `errno' to `EILSEQ', and returns `(size_t) -1'. - This is a nuisance. The `iconv' function should take care of this. -But how should the program proceed from here on? If it would try to -convert to character set B first the two `iconv_open' calls + Another reason for a premature stop is if DST is not a null + pointer and the next converted character would require more than + LEN bytes in total to the array DST. In this case (and if DEST is + not a null pointer) the pointer pointed to by SRC is assigned a + value pointing to the wide character right after the last one + successfully converted. - cd1 = iconv_open ("B", "A"); + Except in the case of an encoding error the return value of the + `wcsrtombs' function is the number of bytes in all the multibyte + character sequences stored in DST. Before returning the state in + the object pointed to by PS (or the internal object in case PS is + a null pointer) is updated to reflect the state after the last + conversion. The state is the initial shift state in case the + terminating NUL wide character was converted. -and + The `wcsrtombs' function was introduced in Amendment 1 to ISO C90 + and is declared in `wchar.h'. - cd2 = iconv_open ("C", "B"); + The restriction mentioned above for the `mbsrtowcs' function applies +here also. There is no possibility of directly controlling the number +of input characters. One has to place the NUL wide character at the +correct place or control the consumed input indirectly via the +available output array size (the LEN parameter). -will succeed but how to find B? + - Function: size_t mbsnrtowcs (wchar_t *restrict DST, const char + **restrict SRC, size_t NMC, size_t LEN, mbstate_t *restrict + PS) + The `mbsnrtowcs' function is very similar to the `mbsrtowcs' + function. All the parameters are the same except for NMC, which is + new. The return value is the same as for `mbsrtowcs'. - Unfortunately, the answer is: there is no general solution. On some -systems guessing might help. On those systems most character sets can -convert to and from UTF-8 encoded ISO 10646 or Unicode text. Beside -this only some very system-specific methods can help. Since the -conversion functions come from loadable modules and these modules must -be stored somewhere in the filesystem, one _could_ try to find them and -determine from the available file which conversions are available and -whether there is an indirect route from A to C. + This new parameter specifies how many bytes at most can be used + from the multibyte character string. In other words, the + multibyte character string `*SRC' need not be NUL-terminated. But + if a NUL byte is found within the NMC first bytes of the string, + the conversion stops here. - This shows one of the design errors of `iconv' mentioned above. It -should at least be possible to determine the list of available -conversion programmatically so that if `iconv_open' says there is no -such conversion, one could make sure this also is true for indirect -routes. + This function is a GNU extension. It is meant to work around the + problems mentioned above. Now it is possible to convert a buffer + with multibyte character text piece for piece without having to + care about inserting NUL bytes and the effect of NUL bytes on the + conversion state. + + A function to convert a multibyte string into a wide character string +and display it could be written like this (this is not a really useful +example): + + void + showmbs (const char *src, FILE *fp) + { + mbstate_t state; + int cnt = 0; + memset (&state, '\0', sizeof (state)); + while (1) + { + wchar_t linebuf[100]; + const char *endp = strchr (src, '\n'); + size_t n; + + /* Exit if there is no more line. */ + if (endp == NULL) + break; + + n = mbsnrtowcs (linebuf, &src, endp - src, 99, &state); + linebuf[n] = L'\0'; + fprintf (fp, "line %d: \"%S\"\n", linebuf); + } + } + + There is no problem with the state after a call to `mbsnrtowcs'. +Since we don't insert characters in the strings that were not in there +right from the beginning and we use STATE only for the conversion of +the given buffer, there is no problem with altering the state. + + - Function: size_t wcsnrtombs (char *restrict DST, const wchar_t + **restrict SRC, size_t NWC, size_t LEN, mbstate_t *restrict + PS) + The `wcsnrtombs' function implements the conversion from wide + character strings to multibyte character strings. It is similar to + `wcsrtombs' but, just like `mbsnrtowcs', it takes an extra + parameter, which specifies the length of the input string. + + No more than NWC wide characters from the input string `*SRC' are + converted. If the input string contains a NUL wide character in + the first NWC characters, the conversion stops at this place. + + The `wcsnrtombs' function is a GNU extension and just like + `mbsnrtowcs' helps in situations where no NUL-terminated input + strings are available. diff -durpN glibc-2.2.4/manual/libc.pg glibc-2.2.5/manual/libc.pg --- glibc-2.2.4/manual/libc.pg Mon Aug 13 15:04:27 2001 +++ glibc-2.2.5/manual/libc.pg Sun Jan 20 19:29:27 2002 @@ -14,276 +14,276 @@ \entry{errno.h}{15}{\code {errno.h}} \entry{errno.h}{16}{\code {errno.h}} \entry{errno.h}{16}{\code {errno.h}} -\entry{stdlib.h}{32}{\code {stdlib.h}} -\entry{stdlib.h}{33}{\code {stdlib.h}} -\entry{stdlib.h}{34}{\code {stdlib.h}} -\entry{stdlib.h}{35}{\code {stdlib.h}} \entry{stdlib.h}{36}{\code {stdlib.h}} -\entry{malloc.h}{37}{\code {malloc.h}} -\entry{mcheck.h}{37}{\code {mcheck.h}} -\entry{malloc.h}{39}{\code {malloc.h}} -\entry{malloc.h}{42}{\code {malloc.h}} -\entry{obstack.h}{48}{\code {obstack.h}} -\entry{stdlib.h}{58}{\code {stdlib.h}} -\entry{ctype.h}{65}{\code {ctype.h}} -\entry{ctype.h}{65}{\code {ctype.h}} -\entry{ctype.h}{67}{\code {ctype.h}} -\entry{wctype.h}{68}{\code {wctype.h}} -\entry{wctype.h}{68}{\code {wctype.h}} -\entry{wctype.h}{68}{\code {wctype.h}} -\entry{wctype.h}{69}{\code {wctype.h}} -\entry{wctype.h}{69}{\code {wctype.h}} -\entry{wctype.h}{69}{\code {wctype.h}} -\entry{wctype.h}{69}{\code {wctype.h}} -\entry{wctype.h}{70}{\code {wctype.h}} -\entry{wctype.h}{70}{\code {wctype.h}} -\entry{wctype.h}{70}{\code {wctype.h}} -\entry{wctype.h}{70}{\code {wctype.h}} -\entry{wctype.h}{70}{\code {wctype.h}} -\entry{wctype.h}{71}{\code {wctype.h}} -\entry{wctype.h}{71}{\code {wctype.h}} +\entry{stdlib.h}{37}{\code {stdlib.h}} +\entry{stdlib.h}{38}{\code {stdlib.h}} +\entry{stdlib.h}{39}{\code {stdlib.h}} +\entry{stdlib.h}{40}{\code {stdlib.h}} +\entry{malloc.h}{41}{\code {malloc.h}} +\entry{mcheck.h}{41}{\code {mcheck.h}} +\entry{malloc.h}{43}{\code {malloc.h}} +\entry{malloc.h}{46}{\code {malloc.h}} +\entry{obstack.h}{52}{\code {obstack.h}} +\entry{stdlib.h}{62}{\code {stdlib.h}} +\entry{ctype.h}{69}{\code {ctype.h}} +\entry{ctype.h}{69}{\code {ctype.h}} +\entry{ctype.h}{71}{\code {ctype.h}} +\entry{wctype.h}{72}{\code {wctype.h}} \entry{wctype.h}{72}{\code {wctype.h}} \entry{wctype.h}{72}{\code {wctype.h}} \entry{wctype.h}{73}{\code {wctype.h}} \entry{wctype.h}{73}{\code {wctype.h}} \entry{wctype.h}{73}{\code {wctype.h}} -\entry{string.h}{77}{\code {string.h}} -\entry{string.h}{79}{\code {string.h}} -\entry{wchar.h}{79}{\code {wchar.h}} -\entry{string.h}{90}{\code {string.h}} -\entry{string.h}{93}{\code {string.h}} -\entry{wchar.h}{93}{\code {wchar.h}} +\entry{wctype.h}{73}{\code {wctype.h}} +\entry{wctype.h}{74}{\code {wctype.h}} +\entry{wctype.h}{74}{\code {wctype.h}} +\entry{wctype.h}{74}{\code {wctype.h}} +\entry{wctype.h}{74}{\code {wctype.h}} +\entry{wctype.h}{74}{\code {wctype.h}} +\entry{wctype.h}{75}{\code {wctype.h}} +\entry{wctype.h}{75}{\code {wctype.h}} +\entry{wctype.h}{76}{\code {wctype.h}} +\entry{wctype.h}{76}{\code {wctype.h}} +\entry{wctype.h}{77}{\code {wctype.h}} +\entry{wctype.h}{77}{\code {wctype.h}} +\entry{wctype.h}{77}{\code {wctype.h}} +\entry{string.h}{81}{\code {string.h}} +\entry{string.h}{83}{\code {string.h}} +\entry{wchar.h}{83}{\code {wchar.h}} +\entry{string.h}{94}{\code {string.h}} \entry{string.h}{97}{\code {string.h}} -\entry{string.h}{102}{\code {string.h}} -\entry{string.h}{107}{\code {string.h}} -\entry{argz.h}{110}{\code {argz.h}} -\entry{envz.h}{112}{\code {envz.h}} -\entry{wchar.h}{116}{\code {wchar.h}} -\entry{wchar.h}{117}{\code {wchar.h}} -\entry{limits.h}{120}{\code {limits.h}} -\entry{stdlib.h}{120}{\code {stdlib.h}} -\entry{wchar.h}{121}{\code {wchar.h}} +\entry{wchar.h}{97}{\code {wchar.h}} +\entry{string.h}{101}{\code {string.h}} +\entry{string.h}{106}{\code {string.h}} +\entry{string.h}{111}{\code {string.h}} +\entry{argz.h}{114}{\code {argz.h}} +\entry{envz.h}{116}{\code {envz.h}} +\entry{wchar.h}{120}{\code {wchar.h}} \entry{wchar.h}{121}{\code {wchar.h}} -\entry{wchar.h}{122}{\code {wchar.h}} -\entry{wchar.h}{123}{\code {wchar.h}} -\entry{wchar.h}{123}{\code {wchar.h}} +\entry{limits.h}{124}{\code {limits.h}} +\entry{stdlib.h}{124}{\code {stdlib.h}} +\entry{wchar.h}{124}{\code {wchar.h}} \entry{wchar.h}{125}{\code {wchar.h}} \entry{wchar.h}{126}{\code {wchar.h}} +\entry{wchar.h}{127}{\code {wchar.h}} +\entry{wchar.h}{127}{\code {wchar.h}} \entry{wchar.h}{128}{\code {wchar.h}} -\entry{wchar.h}{129}{\code {wchar.h}} -\entry{stdlib.h}{134}{\code {stdlib.h}} -\entry{iconv.h}{138}{\code {iconv.h}} -\entry{iconv.h}{139}{\code {iconv.h}} -\entry{iconv.h}{140}{\code {iconv.h}} -\entry{gconv.h}{147}{\code {gconv.h}} -\entry{locale.h}{161}{\code {locale.h}} -\entry{locale}{161}{\code {locale}} -\entry{locale.h}{164}{\code {locale.h}} -\entry{langinfo.h}{168}{\code {langinfo.h}} -\entry{stdlib.h}{204}{\code {stdlib.h}} -\entry{stdlib.h}{204}{\code {stdlib.h}} -\entry{fnmatch.h}{213}{\code {fnmatch.h}} -\entry{ksh}{214}{\code {ksh}} -\entry{stdio.h}{239}{\code {stdio.h}} -\entry{stdio.h}{239}{\code {stdio.h}} -\entry{stdio.h}{240}{\code {stdio.h}} -\entry{stdio.h}{249}{\code {stdio.h}} -\entry{wchar.h}{249}{\code {wchar.h}} -\entry{stdio.h}{251}{\code {stdio.h}} -\entry{wchar.h}{251}{\code {wchar.h}} -\entry{stdio.h}{258}{\code {stdio.h}} -\entry{stdio.h}{267}{\code {stdio.h}} -\entry{stdio.h}{271}{\code {stdio.h}} -\entry{printf.h}{276}{\code {printf.h}} -\entry{printf.h}{276}{\code {printf.h}} -\entry{stdio.h}{289}{\code {stdio.h}} -\entry{stdio.h}{293}{\code {stdio.h}} -\entry{stdio.h}{296}{\code {stdio.h}} -\entry{stdio.h}{298}{\code {stdio.h}} +\entry{wchar.h}{130}{\code {wchar.h}} +\entry{wchar.h}{132}{\code {wchar.h}} +\entry{wchar.h}{133}{\code {wchar.h}} +\entry{stdlib.h}{138}{\code {stdlib.h}} +\entry{iconv.h}{142}{\code {iconv.h}} +\entry{iconv.h}{142}{\code {iconv.h}} +\entry{iconv.h}{144}{\code {iconv.h}} +\entry{gconv.h}{151}{\code {gconv.h}} +\entry{locale.h}{165}{\code {locale.h}} +\entry{locale}{165}{\code {locale}} +\entry{locale.h}{168}{\code {locale.h}} +\entry{langinfo.h}{172}{\code {langinfo.h}} +\entry{stdlib.h}{210}{\code {stdlib.h}} +\entry{stdlib.h}{210}{\code {stdlib.h}} +\entry{fnmatch.h}{219}{\code {fnmatch.h}} +\entry{ksh}{220}{\code {ksh}} +\entry{stdio.h}{245}{\code {stdio.h}} +\entry{stdio.h}{245}{\code {stdio.h}} +\entry{stdio.h}{246}{\code {stdio.h}} +\entry{stdio.h}{255}{\code {stdio.h}} +\entry{wchar.h}{255}{\code {wchar.h}} +\entry{stdio.h}{257}{\code {stdio.h}} +\entry{wchar.h}{257}{\code {wchar.h}} +\entry{stdio.h}{264}{\code {stdio.h}} +\entry{stdio.h}{273}{\code {stdio.h}} +\entry{stdio.h}{277}{\code {stdio.h}} +\entry{printf.h}{282}{\code {printf.h}} +\entry{printf.h}{282}{\code {printf.h}} +\entry{stdio.h}{295}{\code {stdio.h}} \entry{stdio.h}{299}{\code {stdio.h}} \entry{stdio.h}{302}{\code {stdio.h}} +\entry{stdio.h}{304}{\code {stdio.h}} \entry{stdio.h}{305}{\code {stdio.h}} -\entry{unistd.h}{313}{\code {unistd.h}} -\entry{fcntl.h}{313}{\code {fcntl.h}} -\entry{unistd.h}{316}{\code {unistd.h}} -\entry{stdio.h}{323}{\code {stdio.h}} -\entry{unistd.h}{323}{\code {unistd.h}} -\entry{sys/types.h}{331}{\code {sys/types.h}} -\entry{fcntl.h}{347}{\code {fcntl.h}} -\entry{unistd.h}{348}{\code {unistd.h}} -\entry{fcntl.h}{348}{\code {fcntl.h}} -\entry{fcntl.h}{349}{\code {fcntl.h}} -\entry{fcntl.h}{351}{\code {fcntl.h}} +\entry{stdio.h}{308}{\code {stdio.h}} +\entry{stdio.h}{311}{\code {stdio.h}} +\entry{unistd.h}{319}{\code {unistd.h}} +\entry{fcntl.h}{319}{\code {fcntl.h}} +\entry{unistd.h}{322}{\code {unistd.h}} +\entry{stdio.h}{329}{\code {stdio.h}} +\entry{unistd.h}{329}{\code {unistd.h}} +\entry{sys/types.h}{337}{\code {sys/types.h}} +\entry{fcntl.h}{353}{\code {fcntl.h}} +\entry{unistd.h}{354}{\code {unistd.h}} +\entry{fcntl.h}{354}{\code {fcntl.h}} \entry{fcntl.h}{356}{\code {fcntl.h}} -\entry{fcntl.h}{359}{\code {fcntl.h}} -\entry{cd}{361}{\code {cd}} -\entry{unistd.h}{361}{\code {unistd.h}} -\entry{dirent.h}{363}{\code {dirent.h}} -\entry{dirent.h}{364}{\code {dirent.h}} -\entry{dirent.h}{365}{\code {dirent.h}} -\entry{dirent.h}{367}{\code {dirent.h}} -\entry{unistd.h}{374}{\code {unistd.h}} -\entry{unistd.h}{375}{\code {unistd.h}} -\entry{unistd.h}{377}{\code {unistd.h}} -\entry{unistd.h}{378}{\code {unistd.h}} -\entry{stdio.h}{378}{\code {stdio.h}} -\entry{mkdir}{380}{\code {mkdir}} -\entry{sys/stat.h}{380}{\code {sys/stat.h}} -\entry{ls}{380}{\code {ls}} -\entry{sys/stat.h}{380}{\code {sys/stat.h}} -\entry{sys/stat.h}{386}{\code {sys/stat.h}} -\entry{chown}{388}{\code {chown}} -\entry{chgrp}{388}{\code {chgrp}} -\entry{unistd.h}{388}{\code {unistd.h}} -\entry{sys/stat.h}{389}{\code {sys/stat.h}} -\entry{umask}{391}{\code {umask}} -\entry{sys/stat.h}{391}{\code {sys/stat.h}} -\entry{unistd.h}{393}{\code {unistd.h}} -\entry{unistd.h}{394}{\code {unistd.h}} -\entry{time.h}{394}{\code {time.h}} -\entry{utime.h}{394}{\code {utime.h}} -\entry{sys/time.h}{395}{\code {sys/time.h}} -\entry{sys/stat.h}{398}{\code {sys/stat.h}} -\entry{stdio.h}{399}{\code {stdio.h}} -\entry{unistd.h}{403}{\code {unistd.h}} -\entry{sys/stat.h}{407}{\code {sys/stat.h}} -\entry{sys/socket.h}{410}{\code {sys/socket.h}} -\entry{sys/socket.h}{412}{\code {sys/socket.h}} -\entry{sys/socket.h}{413}{\code {sys/socket.h}} -\entry{sys/socket.h}{413}{\code {sys/socket.h}} -\entry{sys/socket.h}{415}{\code {sys/socket.h}} -\entry{sys/un.h}{415}{\code {sys/un.h}} -\entry{sys/socket.h}{417}{\code {sys/socket.h}} -\entry{netinet/in.h}{418}{\code {netinet/in.h}} -\entry{netinet/in.h}{420}{\code {netinet/in.h}} -\entry{arpa/inet.h}{421}{\code {arpa/inet.h}} -\entry{/etc/hosts}{423}{\code {/etc/hosts}} -\entry{netdb.h}{423}{\code {netdb.h}} -\entry{netinet/in.h}{427}{\code {netinet/in.h}} -\entry{/etc/services}{427}{\code {/etc/services}} -\entry{netdb.h}{427}{\code {netdb.h}} -\entry{netinet/in.h}{429}{\code {netinet/in.h}} -\entry{/etc/protocols}{429}{\code {/etc/protocols}} -\entry{netdb.h}{429}{\code {netdb.h}} -\entry{sys/socket.h}{432}{\code {sys/socket.h}} -\entry{sys/socket.h}{433}{\code {sys/socket.h}} -\entry{sys/socket.h}{433}{\code {sys/socket.h}} -\entry{sys/socket.h}{438}{\code {sys/socket.h}} -\entry{sys/socket.h}{439}{\code {sys/socket.h}} +\entry{fcntl.h}{357}{\code {fcntl.h}} +\entry{fcntl.h}{363}{\code {fcntl.h}} +\entry{fcntl.h}{365}{\code {fcntl.h}} +\entry{cd}{369}{\code {cd}} +\entry{unistd.h}{369}{\code {unistd.h}} +\entry{dirent.h}{371}{\code {dirent.h}} +\entry{dirent.h}{372}{\code {dirent.h}} +\entry{dirent.h}{373}{\code {dirent.h}} +\entry{dirent.h}{375}{\code {dirent.h}} +\entry{unistd.h}{382}{\code {unistd.h}} +\entry{unistd.h}{383}{\code {unistd.h}} +\entry{unistd.h}{385}{\code {unistd.h}} +\entry{unistd.h}{386}{\code {unistd.h}} +\entry{stdio.h}{386}{\code {stdio.h}} +\entry{mkdir}{388}{\code {mkdir}} +\entry{sys/stat.h}{388}{\code {sys/stat.h}} +\entry{ls}{388}{\code {ls}} +\entry{sys/stat.h}{388}{\code {sys/stat.h}} +\entry{sys/stat.h}{394}{\code {sys/stat.h}} +\entry{chown}{396}{\code {chown}} +\entry{chgrp}{396}{\code {chgrp}} +\entry{unistd.h}{396}{\code {unistd.h}} +\entry{sys/stat.h}{397}{\code {sys/stat.h}} +\entry{umask}{399}{\code {umask}} +\entry{sys/stat.h}{399}{\code {sys/stat.h}} +\entry{unistd.h}{401}{\code {unistd.h}} +\entry{unistd.h}{402}{\code {unistd.h}} +\entry{time.h}{402}{\code {time.h}} +\entry{utime.h}{402}{\code {utime.h}} +\entry{sys/time.h}{403}{\code {sys/time.h}} +\entry{sys/stat.h}{406}{\code {sys/stat.h}} +\entry{stdio.h}{407}{\code {stdio.h}} +\entry{unistd.h}{411}{\code {unistd.h}} +\entry{sys/stat.h}{415}{\code {sys/stat.h}} +\entry{sys/socket.h}{418}{\code {sys/socket.h}} +\entry{sys/socket.h}{420}{\code {sys/socket.h}} +\entry{sys/socket.h}{421}{\code {sys/socket.h}} +\entry{sys/socket.h}{421}{\code {sys/socket.h}} +\entry{sys/socket.h}{423}{\code {sys/socket.h}} +\entry{sys/un.h}{423}{\code {sys/un.h}} +\entry{sys/socket.h}{425}{\code {sys/socket.h}} +\entry{netinet/in.h}{426}{\code {netinet/in.h}} +\entry{netinet/in.h}{428}{\code {netinet/in.h}} +\entry{arpa/inet.h}{429}{\code {arpa/inet.h}} +\entry{/etc/hosts}{431}{\code {/etc/hosts}} +\entry{netdb.h}{431}{\code {netdb.h}} +\entry{netinet/in.h}{435}{\code {netinet/in.h}} +\entry{/etc/services}{435}{\code {/etc/services}} +\entry{netdb.h}{435}{\code {netdb.h}} +\entry{netinet/in.h}{437}{\code {netinet/in.h}} +\entry{/etc/protocols}{437}{\code {/etc/protocols}} +\entry{netdb.h}{437}{\code {netdb.h}} \entry{sys/socket.h}{440}{\code {sys/socket.h}} +\entry{sys/socket.h}{441}{\code {sys/socket.h}} +\entry{sys/socket.h}{441}{\code {sys/socket.h}} +\entry{sys/socket.h}{446}{\code {sys/socket.h}} \entry{sys/socket.h}{447}{\code {sys/socket.h}} -\entry{sys/socket.h}{452}{\code {sys/socket.h}} -\entry{sys/socket.h}{453}{\code {sys/socket.h}} -\entry{/etc/networks}{454}{\code {/etc/networks}} -\entry{netdb.h}{454}{\code {netdb.h}} -\entry{unistd.h}{457}{\code {unistd.h}} -\entry{termios.h}{459}{\code {termios.h}} -\entry{stdlib.h}{481}{\code {stdlib.h}} -\entry{math.h}{493}{\code {math.h}} -\entry{complex.h}{493}{\code {complex.h}} -\entry{stdlib.h}{512}{\code {stdlib.h}} -\entry{stdlib.h}{512}{\code {stdlib.h}} -\entry{stdlib.h}{514}{\code {stdlib.h}} -\entry{stdint.h}{521}{\code {stdint.h}} -\entry{stdlib.h}{522}{\code {stdlib.h}} -\entry{math.h}{524}{\code {math.h}} -\entry{math.h}{535}{\code {math.h}} -\entry{stdlib.h}{535}{\code {stdlib.h}} -\entry{math.h}{535}{\code {math.h}} -\entry{math.h}{537}{\code {math.h}} -\entry{complex.h}{542}{\code {complex.h}} -\entry{complex.h}{543}{\code {complex.h}} -\entry{stdlib.h}{544}{\code {stdlib.h}} -\entry{wchar.h}{544}{\code {wchar.h}} -\entry{stdlib.h}{548}{\code {stdlib.h}} -\entry{time.h}{555}{\code {time.h}} -\entry{sys/times.h}{556}{\code {sys/times.h}} -\entry{time.h}{558}{\code {time.h}} -\entry{sys/time.h}{558}{\code {sys/time.h}} -\entry{sys/timex.h}{563}{\code {sys/timex.h}} -\entry{time.h}{566}{\code {time.h}} -\entry{time.h}{579}{\code {time.h}} -\entry{/etc/localtime}{580}{\code {/etc/localtime}} -\entry{localtime}{580}{\code {localtime}} -\entry{/share/lib/zoneinfo}{580}{\code {/share/lib/zoneinfo}} -\entry{zoneinfo}{580}{\code {zoneinfo}} -\entry{unistd.h}{583}{\code {unistd.h}} -\entry{sys/time.h}{583}{\code {sys/time.h}} -\entry{sys/resource.h}{587}{\code {sys/resource.h}} -\entry{sys/vtimes.h}{588}{\code {sys/vtimes.h}} -\entry{sys/resource.h}{590}{\code {sys/resource.h}} -\entry{ulimit.h}{592}{\code {ulimit.h}} -\entry{sys/vlimit.h}{593}{\code {sys/vlimit.h}} -\entry{sys/resource.h}{600}{\code {sys/resource.h}} -\entry{setjmp.h}{608}{\code {setjmp.h}} -\entry{setjmp.h}{609}{\code {setjmp.h}} -\entry{signal.h}{619}{\code {signal.h}} -\entry{kill}{622}{\code {kill}} -\entry{string.h}{628}{\code {string.h}} -\entry{stdio.h}{628}{\code {stdio.h}} -\entry{signal.h}{628}{\code {signal.h}} -\entry{signal.h}{630}{\code {signal.h}} -\entry{signal.h}{633}{\code {signal.h}} +\entry{sys/socket.h}{448}{\code {sys/socket.h}} +\entry{sys/socket.h}{455}{\code {sys/socket.h}} +\entry{sys/socket.h}{460}{\code {sys/socket.h}} +\entry{sys/socket.h}{461}{\code {sys/socket.h}} +\entry{/etc/networks}{462}{\code {/etc/networks}} +\entry{netdb.h}{462}{\code {netdb.h}} +\entry{unistd.h}{465}{\code {unistd.h}} +\entry{termios.h}{467}{\code {termios.h}} +\entry{stdlib.h}{489}{\code {stdlib.h}} +\entry{math.h}{501}{\code {math.h}} +\entry{complex.h}{501}{\code {complex.h}} +\entry{stdlib.h}{531}{\code {stdlib.h}} +\entry{stdlib.h}{532}{\code {stdlib.h}} +\entry{stdlib.h}{534}{\code {stdlib.h}} +\entry{stdint.h}{539}{\code {stdint.h}} +\entry{stdlib.h}{540}{\code {stdlib.h}} +\entry{math.h}{542}{\code {math.h}} +\entry{math.h}{553}{\code {math.h}} +\entry{stdlib.h}{553}{\code {stdlib.h}} +\entry{math.h}{553}{\code {math.h}} +\entry{math.h}{555}{\code {math.h}} +\entry{complex.h}{560}{\code {complex.h}} +\entry{complex.h}{561}{\code {complex.h}} +\entry{stdlib.h}{562}{\code {stdlib.h}} +\entry{wchar.h}{562}{\code {wchar.h}} +\entry{stdlib.h}{566}{\code {stdlib.h}} +\entry{time.h}{573}{\code {time.h}} +\entry{sys/times.h}{574}{\code {sys/times.h}} +\entry{time.h}{576}{\code {time.h}} +\entry{sys/time.h}{576}{\code {sys/time.h}} +\entry{sys/timex.h}{581}{\code {sys/timex.h}} +\entry{time.h}{584}{\code {time.h}} +\entry{time.h}{597}{\code {time.h}} +\entry{/etc/localtime}{598}{\code {/etc/localtime}} +\entry{localtime}{598}{\code {localtime}} +\entry{/share/lib/zoneinfo}{599}{\code {/share/lib/zoneinfo}} +\entry{zoneinfo}{599}{\code {zoneinfo}} +\entry{unistd.h}{601}{\code {unistd.h}} +\entry{sys/time.h}{601}{\code {sys/time.h}} +\entry{sys/resource.h}{605}{\code {sys/resource.h}} +\entry{sys/vtimes.h}{606}{\code {sys/vtimes.h}} +\entry{sys/resource.h}{608}{\code {sys/resource.h}} +\entry{ulimit.h}{610}{\code {ulimit.h}} +\entry{sys/vlimit.h}{611}{\code {sys/vlimit.h}} +\entry{sys/resource.h}{618}{\code {sys/resource.h}} +\entry{setjmp.h}{626}{\code {setjmp.h}} +\entry{setjmp.h}{627}{\code {setjmp.h}} +\entry{signal.h}{637}{\code {signal.h}} +\entry{kill}{640}{\code {kill}} +\entry{string.h}{646}{\code {string.h}} +\entry{stdio.h}{646}{\code {stdio.h}} \entry{signal.h}{646}{\code {signal.h}} -\entry{signal.h}{647}{\code {signal.h}} +\entry{signal.h}{648}{\code {signal.h}} \entry{signal.h}{651}{\code {signal.h}} -\entry{signal.h}{652}{\code {signal.h}} -\entry{signal.h}{655}{\code {signal.h}} -\entry{signal.h}{662}{\code {signal.h}} -\entry{unistd.h}{667}{\code {unistd.h}} -\entry{argp.h}{674}{\code {argp.h}} -\entry{stdlib.h}{701}{\code {stdlib.h}} -\entry{stdlib.h}{707}{\code {stdlib.h}} -\entry{stdlib.h}{708}{\code {stdlib.h}} -\entry{unistd.h}{709}{\code {unistd.h}} -\entry{sh}{711}{\code {sh}} -\entry{stdlib.h}{711}{\code {stdlib.h}} -\entry{sys/types.h}{712}{\code {sys/types.h}} -\entry{unistd.h}{712}{\code {unistd.h}} -\entry{unistd.h}{713}{\code {unistd.h}} -\entry{unistd.h}{714}{\code {unistd.h}} -\entry{sys/wait.h}{716}{\code {sys/wait.h}} -\entry{sys/wait.h}{719}{\code {sys/wait.h}} -\entry{sys/wait.h}{720}{\code {sys/wait.h}} -\entry{stdio.h}{738}{\code {stdio.h}} -\entry{unistd.h}{738}{\code {unistd.h}} -\entry{sys/types.h}{738}{\code {sys/types.h}} -\entry{-lbsd-compat}{739}{\code {-lbsd-compat}} -\entry{bsd-compat}{739}{\code {bsd-compat}} -\entry{unistd.h}{740}{\code {unistd.h}} -\entry{sys/types.h}{740}{\code {sys/types.h}} -\entry{unistd.h}{755}{\code {unistd.h}} -\entry{sys/types.h}{755}{\code {sys/types.h}} +\entry{signal.h}{664}{\code {signal.h}} +\entry{signal.h}{665}{\code {signal.h}} +\entry{signal.h}{669}{\code {signal.h}} +\entry{signal.h}{670}{\code {signal.h}} +\entry{signal.h}{673}{\code {signal.h}} +\entry{signal.h}{680}{\code {signal.h}} +\entry{unistd.h}{685}{\code {unistd.h}} +\entry{argp.h}{692}{\code {argp.h}} +\entry{stdlib.h}{719}{\code {stdlib.h}} +\entry{stdlib.h}{725}{\code {stdlib.h}} +\entry{stdlib.h}{726}{\code {stdlib.h}} +\entry{unistd.h}{727}{\code {unistd.h}} +\entry{sh}{729}{\code {sh}} +\entry{stdlib.h}{729}{\code {stdlib.h}} +\entry{sys/types.h}{730}{\code {sys/types.h}} +\entry{unistd.h}{730}{\code {unistd.h}} +\entry{unistd.h}{731}{\code {unistd.h}} +\entry{unistd.h}{732}{\code {unistd.h}} +\entry{sys/wait.h}{734}{\code {sys/wait.h}} +\entry{sys/wait.h}{737}{\code {sys/wait.h}} +\entry{sys/wait.h}{738}{\code {sys/wait.h}} +\entry{stdio.h}{756}{\code {stdio.h}} \entry{unistd.h}{756}{\code {unistd.h}} \entry{sys/types.h}{756}{\code {sys/types.h}} -\entry{unistd.h}{757}{\code {unistd.h}} -\entry{sys/types.h}{757}{\code {sys/types.h}} -\entry{grp.h}{758}{\code {grp.h}} -\entry{grp.h}{758}{\code {grp.h}} -\entry{stdio.h}{763}{\code {stdio.h}} -\entry{unistd.h}{763}{\code {unistd.h}} -\entry{utmp.h}{764}{\code {utmp.h}} -\entry{utmpx.h}{768}{\code {utmpx.h}} -\entry{utmp.h}{771}{\code {utmp.h}} -\entry{/etc/passwd}{771}{\code {/etc/passwd}} -\entry{pwd.h}{772}{\code {pwd.h}} -\entry{/etc/group}{774}{\code {/etc/group}} -\entry{grp.h}{775}{\code {grp.h}} -\entry{hostname}{781}{\code {hostname}} -\entry{hostid}{781}{\code {hostid}} +\entry{-lbsd-compat}{757}{\code {-lbsd-compat}} +\entry{bsd-compat}{757}{\code {bsd-compat}} +\entry{unistd.h}{758}{\code {unistd.h}} +\entry{sys/types.h}{758}{\code {sys/types.h}} +\entry{unistd.h}{773}{\code {unistd.h}} +\entry{sys/types.h}{773}{\code {sys/types.h}} +\entry{unistd.h}{774}{\code {unistd.h}} +\entry{sys/types.h}{774}{\code {sys/types.h}} +\entry{unistd.h}{775}{\code {unistd.h}} +\entry{sys/types.h}{775}{\code {sys/types.h}} +\entry{grp.h}{776}{\code {grp.h}} +\entry{grp.h}{776}{\code {grp.h}} +\entry{stdio.h}{781}{\code {stdio.h}} \entry{unistd.h}{781}{\code {unistd.h}} -\entry{sys/param.h}{782}{\code {sys/param.h}} -\entry{sys/utsname.h}{783}{\code {sys/utsname.h}} -\entry{limits.h}{797}{\code {limits.h}} -\entry{unistd.h}{798}{\code {unistd.h}} -\entry{limits.h}{810}{\code {limits.h}} -\entry{unistd.h}{811}{\code {unistd.h}} -\entry{unistd.h}{812}{\code {unistd.h}} -\entry{execinfo.h}{827}{\code {execinfo.h}} -\entry{assert.h}{853}{\code {assert.h}} -\entry{stdarg.h}{856}{\code {stdarg.h}} -\entry{stdarg.h}{858}{\code {stdarg.h}} -\entry{varargs.h}{860}{\code {varargs.h}} -\entry{stddef.h}{861}{\code {stddef.h}} -\entry{limits.h}{862}{\code {limits.h}} -\entry{float.h}{865}{\code {float.h}} +\entry{utmp.h}{782}{\code {utmp.h}} +\entry{utmpx.h}{786}{\code {utmpx.h}} +\entry{utmp.h}{789}{\code {utmp.h}} +\entry{/etc/passwd}{789}{\code {/etc/passwd}} +\entry{pwd.h}{790}{\code {pwd.h}} +\entry{/etc/group}{792}{\code {/etc/group}} +\entry{grp.h}{793}{\code {grp.h}} +\entry{hostname}{799}{\code {hostname}} +\entry{hostid}{799}{\code {hostid}} +\entry{unistd.h}{799}{\code {unistd.h}} +\entry{sys/param.h}{800}{\code {sys/param.h}} +\entry{sys/utsname.h}{801}{\code {sys/utsname.h}} +\entry{limits.h}{815}{\code {limits.h}} +\entry{unistd.h}{816}{\code {unistd.h}} +\entry{limits.h}{828}{\code {limits.h}} +\entry{unistd.h}{829}{\code {unistd.h}} +\entry{unistd.h}{830}{\code {unistd.h}} +\entry{execinfo.h}{845}{\code {execinfo.h}} +\entry{assert.h}{871}{\code {assert.h}} +\entry{stdarg.h}{874}{\code {stdarg.h}} +\entry{stdarg.h}{876}{\code {stdarg.h}} +\entry{varargs.h}{878}{\code {varargs.h}} +\entry{stddef.h}{879}{\code {stddef.h}} +\entry{limits.h}{880}{\code {limits.h}} +\entry{float.h}{883}{\code {float.h}} diff -durpN glibc-2.2.4/manual/libc.pgs glibc-2.2.5/manual/libc.pgs --- glibc-2.2.4/manual/libc.pgs Mon Aug 13 15:03:57 2001 +++ glibc-2.2.5/manual/libc.pgs Sun Jan 20 19:29:12 2002 @@ -1,106 +1,106 @@ \initial {-} -\entry {\code {-lbsd-compat}}{8, 739} +\entry {\code {-lbsd-compat}}{8, 757} \initial {/} -\entry {\code {/etc/group}}{774} -\entry {\code {/etc/hosts}}{423} -\entry {\code {/etc/localtime}}{580} -\entry {\code {/etc/networks}}{454} -\entry {\code {/etc/passwd}}{771} -\entry {\code {/etc/protocols}}{429} -\entry {\code {/etc/services}}{427} -\entry {\code {/share/lib/zoneinfo}}{580} +\entry {\code {/etc/group}}{792} +\entry {\code {/etc/hosts}}{431} +\entry {\code {/etc/localtime}}{598} +\entry {\code {/etc/networks}}{462} +\entry {\code {/etc/passwd}}{789} +\entry {\code {/etc/protocols}}{437} +\entry {\code {/etc/services}}{435} +\entry {\code {/share/lib/zoneinfo}}{599} \initial {A} -\entry {\code {argp.h}}{674} -\entry {\code {argz.h}}{110} -\entry {\code {arpa/inet.h}}{421} -\entry {\code {assert.h}}{853} +\entry {\code {argp.h}}{692} +\entry {\code {argz.h}}{114} +\entry {\code {arpa/inet.h}}{429} +\entry {\code {assert.h}}{871} \initial {B} -\entry {\code {bsd-compat}}{8, 739} +\entry {\code {bsd-compat}}{8, 757} \initial {C} -\entry {\code {cd}}{361} -\entry {\code {chgrp}}{388} -\entry {\code {chown}}{388} -\entry {\code {complex.h}}{493, 542, 543} -\entry {\code {ctype.h}}{65, 67} +\entry {\code {cd}}{369} +\entry {\code {chgrp}}{396} +\entry {\code {chown}}{396} +\entry {\code {complex.h}}{501, 560, 561} +\entry {\code {ctype.h}}{69, 71} \initial {D} -\entry {\code {dirent.h}}{7, 363, 364, 365, 367} +\entry {\code {dirent.h}}{7, 371, 372, 373, 375} \initial {E} -\entry {\code {envz.h}}{112} +\entry {\code {envz.h}}{116} \entry {\code {errno.h}}{15, 16} -\entry {\code {execinfo.h}}{827} +\entry {\code {execinfo.h}}{845} \initial {F} -\entry {\code {fcntl.h}}{7, 313, 347, 348, 349, 351, 356, 359} -\entry {\code {float.h}}{865} -\entry {\code {fnmatch.h}}{213} +\entry {\code {fcntl.h}}{7, 319, 353, 354, 356, 357, 363, 365} +\entry {\code {float.h}}{883} +\entry {\code {fnmatch.h}}{219} \initial {G} \entry {\code {gcc}}{2} -\entry {\code {gconv.h}}{147} -\entry {\code {grp.h}}{7, 758, 775} +\entry {\code {gconv.h}}{151} +\entry {\code {grp.h}}{7, 776, 793} \initial {H} -\entry {\code {hostid}}{781} -\entry {\code {hostname}}{781} +\entry {\code {hostid}}{799} +\entry {\code {hostname}}{799} \initial {I} -\entry {\code {iconv.h}}{138, 139, 140} +\entry {\code {iconv.h}}{142, 144} \initial {K} -\entry {\code {kill}}{622} -\entry {\code {ksh}}{214} +\entry {\code {kill}}{640} +\entry {\code {ksh}}{220} \initial {L} -\entry {\code {langinfo.h}}{168} -\entry {\code {limits.h}}{7, 120, 797, 810, 862} -\entry {\code {locale}}{161} -\entry {\code {locale.h}}{161, 164} -\entry {\code {localtime}}{580} -\entry {\code {ls}}{380} +\entry {\code {langinfo.h}}{172} +\entry {\code {limits.h}}{7, 124, 815, 828, 880} +\entry {\code {locale}}{165} +\entry {\code {locale.h}}{165, 168} +\entry {\code {localtime}}{598} +\entry {\code {ls}}{388} \initial {M} -\entry {\code {malloc.h}}{37, 39, 42} -\entry {\code {math.h}}{493, 524, 535, 537} -\entry {\code {mcheck.h}}{37} -\entry {\code {mkdir}}{380} +\entry {\code {malloc.h}}{41, 43, 46} +\entry {\code {math.h}}{501, 542, 553, 555} +\entry {\code {mcheck.h}}{41} +\entry {\code {mkdir}}{388} \initial {N} -\entry {\code {netdb.h}}{423, 427, 429, 454} -\entry {\code {netinet/in.h}}{418, 420, 427, 429} +\entry {\code {netdb.h}}{431, 435, 437, 462} +\entry {\code {netinet/in.h}}{426, 428, 435, 437} \initial {O} -\entry {\code {obstack.h}}{48} +\entry {\code {obstack.h}}{52} \initial {P} -\entry {\code {printf.h}}{276} -\entry {\code {pwd.h}}{7, 772} +\entry {\code {printf.h}}{282} +\entry {\code {pwd.h}}{7, 790} \initial {S} -\entry {\code {setjmp.h}}{608, 609} -\entry {\code {sh}}{711} -\entry {\code {signal.h}}{7, 619, 628, 630, 633, 646, 647, 651, 652, 655, 662} -\entry {\code {stdarg.h}}{856, 858} -\entry {\code {stddef.h}}{861} -\entry {\code {stdint.h}}{521} -\entry {\code {stdio.h}}{239, 240, 249, 251, 258, 267, 271, 289, 293, 296, 298, 299, 302, 305, 323, 378, 399, 628, 738, 763} -\entry {\code {stdlib.h}}{32, 33, 34, 35, 36, 58, 120, 134, 204, 481, 512, 514, 522, 535, 544, 548, 701, 707, 708, 711} -\entry {\code {string.h}}{77, 79, 90, 93, 97, 102, 107, 628} -\entry {\code {sys/param.h}}{782} -\entry {\code {sys/resource.h}}{587, 590, 600} -\entry {\code {sys/socket.h}}{410, 412, 413, 415, 417, 432, 433, 438, 439, 440, 447, 452, 453} -\entry {\code {sys/stat.h}}{7, 380, 386, 389, 391, 398, 407} -\entry {\code {sys/time.h}}{395, 558, 583} -\entry {\code {sys/times.h}}{7, 556} -\entry {\code {sys/timex.h}}{563} -\entry {\code {sys/types.h}}{331, 712, 738, 740, 755, 756, 757} -\entry {\code {sys/un.h}}{415} -\entry {\code {sys/utsname.h}}{783} -\entry {\code {sys/vlimit.h}}{593} -\entry {\code {sys/vtimes.h}}{588} -\entry {\code {sys/wait.h}}{716, 719, 720} +\entry {\code {setjmp.h}}{626, 627} +\entry {\code {sh}}{729} +\entry {\code {signal.h}}{7, 637, 646, 648, 651, 664, 665, 669, 670, 673, 680} +\entry {\code {stdarg.h}}{874, 876} +\entry {\code {stddef.h}}{879} +\entry {\code {stdint.h}}{539} +\entry {\code {stdio.h}}{245, 246, 255, 257, 264, 273, 277, 295, 299, 302, 304, 305, 308, 311, 329, 386, 407, 646, 756, 781} +\entry {\code {stdlib.h}}{36, 37, 38, 39, 40, 62, 124, 138, 210, 489, 531, 532, 534, 540, 553, 562, 566, 719, 725, 726, 729} +\entry {\code {string.h}}{81, 83, 94, 97, 101, 106, 111, 646} +\entry {\code {sys/param.h}}{800} +\entry {\code {sys/resource.h}}{605, 608, 618} +\entry {\code {sys/socket.h}}{418, 420, 421, 423, 425, 440, 441, 446, 447, 448, 455, 460, 461} +\entry {\code {sys/stat.h}}{7, 388, 394, 397, 399, 406, 415} +\entry {\code {sys/time.h}}{403, 576, 601} +\entry {\code {sys/times.h}}{7, 574} +\entry {\code {sys/timex.h}}{581} +\entry {\code {sys/types.h}}{337, 730, 756, 758, 773, 774, 775} +\entry {\code {sys/un.h}}{423} +\entry {\code {sys/utsname.h}}{801} +\entry {\code {sys/vlimit.h}}{611} +\entry {\code {sys/vtimes.h}}{606} +\entry {\code {sys/wait.h}}{734, 737, 738} \initial {T} -\entry {\code {termios.h}}{7, 459} -\entry {\code {time.h}}{394, 555, 558, 566, 579} +\entry {\code {termios.h}}{7, 467} +\entry {\code {time.h}}{402, 573, 576, 584, 597} \initial {U} -\entry {\code {ulimit.h}}{592} -\entry {\code {umask}}{391} -\entry {\code {unistd.h}}{313, 316, 323, 348, 361, 374, 375, 377, 378, 388, 393, 394, 403, 457, 583, 667, 709, 712, 713, 714, 738, 740, 755, 756, 757, 763, 781, 798, 811, 812} -\entry {\code {utime.h}}{394} -\entry {\code {utmp.h}}{764, 771} -\entry {\code {utmpx.h}}{768} +\entry {\code {ulimit.h}}{610} +\entry {\code {umask}}{399} +\entry {\code {unistd.h}}{319, 322, 329, 354, 369, 382, 383, 385, 386, 396, 401, 402, 411, 465, 601, 685, 727, 730, 731, 732, 756, 758, 773, 774, 775, 781, 799, 816, 829, 830} +\entry {\code {utime.h}}{402} +\entry {\code {utmp.h}}{782, 789} +\entry {\code {utmpx.h}}{786} \initial {V} -\entry {\code {varargs.h}}{860} +\entry {\code {varargs.h}}{878} \initial {W} -\entry {\code {wchar.h}}{79, 93, 116, 117, 121, 122, 123, 125, 126, 128, 129, 249, 251, 544} -\entry {\code {wctype.h}}{68, 69, 70, 71, 72, 73} +\entry {\code {wchar.h}}{83, 97, 120, 121, 124, 125, 126, 127, 128, 130, 132, 133, 255, 257, 562} +\entry {\code {wctype.h}}{72, 73, 74, 75, 76, 77} \initial {Z} -\entry {\code {zoneinfo}}{580} +\entry {\code {zoneinfo}}{599} diff -durpN glibc-2.2.4/manual/libc.texinfo glibc-2.2.5/manual/libc.texinfo --- glibc-2.2.4/manual/libc.texinfo Mon Jul 23 10:54:40 2001 +++ glibc-2.2.5/manual/libc.texinfo Sun Jan 20 19:21:48 2002 @@ -28,15 +28,17 @@ This file documents the GNU C library. This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU C Library Reference Manual}, for Version @value{VERSION}. -Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". + (a) The FSF's Front-Cover Text is: @@ -68,7 +70,7 @@ entitled "GNU Free Documentation License @center for version @value{VERSION} @page @vskip 0pt plus 1filll -Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. +Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation @* 59 Temple Place -- Suite 330, @* @@ -78,10 +80,11 @@ ISBN @value{ISBN} @* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the -Invariant Sections being "GNU Lesser General Public License", the -Front-Cover texts being (a) (see below), and with the Back-Cover Texts -being (b) (see below). A copy of the license is included in the section -entitled "GNU Free Documentation License". +Invariant Sections being "Free Software Needs Free Documentation" and +"GNU Lesser General Public License", the Front-Cover texts being (a) +(see below), and with the Back-Cover Texts being (b) (see below). A +copy of the license is included in the section entitled "GNU Free +Documentation License". (a) The FSF's Front-Cover Text is: @@ -110,8 +113,11 @@ of the GNU C Library. @include top-menu.texi @include chapters.texi +@node Free Manuals, Copying, Contributors, Top +@include freemanuals.texi + @set lgpl-appendix -@node Copying, Documentation License, Contributors, Top +@node Copying, Documentation License, Free Manuals, Top @include lesser.texi @node Documentation License, Concept Index, Copying, Top diff -durpN glibc-2.2.4/manual/libc.tp glibc-2.2.5/manual/libc.tp --- glibc-2.2.4/manual/libc.tp Mon Aug 13 15:04:27 2001 +++ glibc-2.2.5/manual/libc.tp Sun Jan 20 19:29:27 2002 @@ -1,127 +1,127 @@ -\entry{enum mcheck{\_}status}{38}{\code {enum mcheck_status}} -\entry{struct mallinfo}{42}{\code {struct mallinfo}} -\entry{struct obstack}{48}{\code {struct obstack}} -\entry{wctype{\_}t}{68}{\code {wctype_t}} -\entry{wctrans{\_}t}{72}{\code {wctrans_t}} -\entry{wchar{\_}t}{116}{\code {wchar_t}} -\entry{wint{\_}t}{116}{\code {wint_t}} -\entry{mbstate{\_}t}{121}{\code {mbstate_t}} -\entry{iconv{\_}t}{137}{\code {iconv_t}} -\entry{struct {\_}{\_}gconv{\_}step}{147}{\code {struct __gconv_step}} -\entry{struct {\_}{\_}gconv{\_}step{\_}data}{148}{\code {struct __gconv_step_data}} -\entry{struct lconv}{164}{\code {struct lconv}} -\entry{comparison{\_}fn{\_}t}{203}{\code {comparison_fn_t}} -\entry{struct ENTRY}{209}{\code {struct ENTRY}} -\entry{VISIT}{212}{\code {VISIT}} -\entry{glob{\_}t}{215}{\code {glob_t}} -\entry{glob64{\_}t}{216}{\code {glob64_t}} -\entry{regex{\_}t}{222}{\code {regex_t}} -\entry{regmatch{\_}t}{225}{\code {regmatch_t}} -\entry{regoff{\_}t}{225}{\code {regoff_t}} -\entry{wordexp{\_}t}{228}{\code {wordexp_t}} -\entry{FILE}{239}{\code {FILE}} -\entry{struct printf{\_}info}{276}{\code {struct printf_info}} -\entry{printf{\_}function}{278}{\code {printf_function}} -\entry{printf{\_}arginfo{\_}function}{278}{\code {printf_arginfo_function}} -\entry{fpos{\_}t}{296}{\code {fpos_t}} -\entry{fpos64{\_}t}{297}{\code {fpos64_t}} -\entry{cookie{\_}io{\_}functions{\_}t}{305}{\code {cookie_io_functions_t}} -\entry{cookie{\_}read{\_}function}{307}{\code {cookie_read_function}} -\entry{cookie{\_}write{\_}function}{307}{\code {cookie_write_function}} -\entry{cookie{\_}seek{\_}function}{307}{\code {cookie_seek_function}} -\entry{cookie{\_}close{\_}function}{307}{\code {cookie_close_function}} -\entry{ssize{\_}t}{316}{\code {ssize_t}} -\entry{off{\_}t}{322}{\code {off_t}} -\entry{off64{\_}t}{322}{\code {off64_t}} -\entry{struct iovec}{326}{\code {struct iovec}} -\entry{fd{\_}set}{331}{\code {fd_set}} -\entry{struct aiocb}{335}{\code {struct aiocb}} -\entry{struct aiocb64}{336}{\code {struct aiocb64}} -\entry{struct aioinit}{346}{\code {struct aioinit}} -\entry{struct flock}{356}{\code {struct flock}} -\entry{struct dirent}{363}{\code {struct dirent}} -\entry{DIR}{364}{\code {DIR}} -\entry{{\_}{\_}ftw{\_}func{\_}t}{370}{\code {__ftw_func_t}} -\entry{{\_}{\_}ftw64{\_}func{\_}t}{371}{\code {__ftw64_func_t}} -\entry{{\_}{\_}nftw{\_}func{\_}t}{371}{\code {__nftw_func_t}} -\entry{{\_}{\_}nftw64{\_}func{\_}t}{372}{\code {__nftw64_func_t}} -\entry{struct FTW}{372}{\code {struct FTW}} -\entry{struct stat}{381}{\code {struct stat}} -\entry{struct stat64}{382}{\code {struct stat64}} -\entry{mode{\_}t}{383}{\code {mode_t}} -\entry{ino{\_}t}{384}{\code {ino_t}} -\entry{ino64{\_}t}{384}{\code {ino64_t}} -\entry{dev{\_}t}{384}{\code {dev_t}} -\entry{nlink{\_}t}{384}{\code {nlink_t}} -\entry{blkcnt{\_}t}{384}{\code {blkcnt_t}} -\entry{blkcnt64{\_}t}{384}{\code {blkcnt64_t}} -\entry{struct utimbuf}{395}{\code {struct utimbuf}} -\entry{struct sockaddr}{412}{\code {struct sockaddr}} -\entry{struct if{\_}nameindex}{414}{\code {struct if_nameindex}} -\entry{struct sockaddr{\_}un}{416}{\code {struct sockaddr_un}} -\entry{struct sockaddr{\_}in}{418}{\code {struct sockaddr_in}} -\entry{struct sockaddr{\_}in6}{418}{\code {struct sockaddr_in6}} -\entry{struct in{\_}addr}{421}{\code {struct in_addr}} -\entry{struct in6{\_}addr}{421}{\code {struct in6_addr}} -\entry{struct hostent}{423}{\code {struct hostent}} -\entry{struct servent}{427}{\code {struct servent}} -\entry{struct protoent}{430}{\code {struct protoent}} -\entry{struct linger}{454}{\code {struct linger}} -\entry{struct netent}{454}{\code {struct netent}} -\entry{struct termios}{459}{\code {struct termios}} -\entry{tcflag{\_}t}{460}{\code {tcflag_t}} -\entry{cc{\_}t}{460}{\code {cc_t}} -\entry{speed{\_}t}{470}{\code {speed_t}} -\entry{struct sgttyb}{477}{\code {struct sgttyb}} -\entry{struct random{\_}data}{513}{\code {struct random_data}} -\entry{div{\_}t}{522}{\code {div_t}} -\entry{ldiv{\_}t}{523}{\code {ldiv_t}} -\entry{lldiv{\_}t}{523}{\code {lldiv_t}} -\entry{imaxdiv{\_}t}{523}{\code {imaxdiv_t}} -\entry{struct timeval}{554}{\code {struct timeval}} -\entry{struct timespec}{554}{\code {struct timespec}} -\entry{clock{\_}t}{556}{\code {clock_t}} -\entry{struct tms}{556}{\code {struct tms}} -\entry{time{\_}t}{558}{\code {time_t}} -\entry{struct timezone}{559}{\code {struct timezone}} -\entry{struct tm}{561}{\code {struct tm}} -\entry{struct ntptimeval}{563}{\code {struct ntptimeval}} -\entry{struct ntptimeval}{563}{\code {struct ntptimeval}} -\entry{struct timex}{564}{\code {struct timex}} -\entry{struct timex}{564}{\code {struct timex}} -\entry{struct itimerval}{583}{\code {struct itimerval}} -\entry{struct rusage}{587}{\code {struct rusage}} -\entry{struct vtimes}{589}{\code {struct vtimes}} -\entry{struct rlimit}{590}{\code {struct rlimit}} -\entry{struct rlimit64}{591}{\code {struct rlimit64}} -\entry{struct sched{\_}param}{597}{\code {struct sched_param}} -\entry{jmp{\_}buf}{608}{\code {jmp_buf}} -\entry{sigjmp{\_}buf}{609}{\code {sigjmp_buf}} -\entry{ucontext{\_}t}{610}{\code {ucontext_t}} -\entry{sighandler{\_}t}{628}{\code {sighandler_t}} -\entry{struct sigaction}{631}{\code {struct sigaction}} -\entry{sig{\_}atomic{\_}t}{644}{\code {sig_atomic_t}} -\entry{sigset{\_}t}{651}{\code {sigset_t}} -\entry{stack{\_}t}{660}{\code {stack_t}} -\entry{struct sigstack}{661}{\code {struct sigstack}} -\entry{struct sigvec}{662}{\code {struct sigvec}} -\entry{struct option}{670}{\code {struct option}} -\entry{struct argp}{676}{\code {struct argp}} -\entry{struct argp{\_}option}{677}{\code {struct argp_option}} -\entry{struct argp{\_}state}{683}{\code {struct argp_state}} -\entry{struct argp{\_}child}{684}{\code {struct argp_child}} -\entry{pid{\_}t}{712}{\code {pid_t}} -\entry{union wait}{720}{\code {union wait}} -\entry{uid{\_}t}{755}{\code {uid_t}} -\entry{gid{\_}t}{755}{\code {gid_t}} -\entry{struct exit{\_}status}{764}{\code {struct exit_status}} -\entry{struct utmp}{764}{\code {struct utmp}} -\entry{struct utmpx}{768}{\code {struct utmpx}} -\entry{struct passwd}{772}{\code {struct passwd}} -\entry{struct group}{775}{\code {struct group}} -\entry{struct utsname}{783}{\code {struct utsname}} -\entry{struct fstab}{785}{\code {struct fstab}} -\entry{struct mntent}{787}{\code {struct mntent}} -\entry{va{\_}list}{858}{\code {va_list}} -\entry{ptrdiff{\_}t}{861}{\code {ptrdiff_t}} -\entry{size{\_}t}{861}{\code {size_t}} +\entry{enum mcheck{\_}status}{42}{\code {enum mcheck_status}} +\entry{struct mallinfo}{46}{\code {struct mallinfo}} +\entry{struct obstack}{52}{\code {struct obstack}} +\entry{wctype{\_}t}{72}{\code {wctype_t}} +\entry{wctrans{\_}t}{76}{\code {wctrans_t}} +\entry{wchar{\_}t}{120}{\code {wchar_t}} +\entry{wint{\_}t}{120}{\code {wint_t}} +\entry{mbstate{\_}t}{124}{\code {mbstate_t}} +\entry{iconv{\_}t}{141}{\code {iconv_t}} +\entry{struct {\_}{\_}gconv{\_}step}{151}{\code {struct __gconv_step}} +\entry{struct {\_}{\_}gconv{\_}step{\_}data}{152}{\code {struct __gconv_step_data}} +\entry{struct lconv}{168}{\code {struct lconv}} +\entry{comparison{\_}fn{\_}t}{209}{\code {comparison_fn_t}} +\entry{struct ENTRY}{215}{\code {struct ENTRY}} +\entry{VISIT}{218}{\code {VISIT}} +\entry{glob{\_}t}{221}{\code {glob_t}} +\entry{glob64{\_}t}{222}{\code {glob64_t}} +\entry{regex{\_}t}{228}{\code {regex_t}} +\entry{regmatch{\_}t}{231}{\code {regmatch_t}} +\entry{regoff{\_}t}{231}{\code {regoff_t}} +\entry{wordexp{\_}t}{234}{\code {wordexp_t}} +\entry{FILE}{245}{\code {FILE}} +\entry{struct printf{\_}info}{282}{\code {struct printf_info}} +\entry{printf{\_}function}{284}{\code {printf_function}} +\entry{printf{\_}arginfo{\_}function}{284}{\code {printf_arginfo_function}} +\entry{fpos{\_}t}{302}{\code {fpos_t}} +\entry{fpos64{\_}t}{303}{\code {fpos64_t}} +\entry{cookie{\_}io{\_}functions{\_}t}{311}{\code {cookie_io_functions_t}} +\entry{cookie{\_}read{\_}function}{313}{\code {cookie_read_function}} +\entry{cookie{\_}write{\_}function}{313}{\code {cookie_write_function}} +\entry{cookie{\_}seek{\_}function}{313}{\code {cookie_seek_function}} +\entry{cookie{\_}close{\_}function}{313}{\code {cookie_close_function}} +\entry{ssize{\_}t}{322}{\code {ssize_t}} +\entry{off{\_}t}{328}{\code {off_t}} +\entry{off64{\_}t}{328}{\code {off64_t}} +\entry{struct iovec}{332}{\code {struct iovec}} +\entry{fd{\_}set}{337}{\code {fd_set}} +\entry{struct aiocb}{341}{\code {struct aiocb}} +\entry{struct aiocb64}{343}{\code {struct aiocb64}} +\entry{struct aioinit}{352}{\code {struct aioinit}} +\entry{struct flock}{363}{\code {struct flock}} +\entry{struct dirent}{371}{\code {struct dirent}} +\entry{DIR}{372}{\code {DIR}} +\entry{{\_}{\_}ftw{\_}func{\_}t}{378}{\code {__ftw_func_t}} +\entry{{\_}{\_}ftw64{\_}func{\_}t}{379}{\code {__ftw64_func_t}} +\entry{{\_}{\_}nftw{\_}func{\_}t}{379}{\code {__nftw_func_t}} +\entry{{\_}{\_}nftw64{\_}func{\_}t}{380}{\code {__nftw64_func_t}} +\entry{struct FTW}{380}{\code {struct FTW}} +\entry{struct stat}{389}{\code {struct stat}} +\entry{struct stat64}{390}{\code {struct stat64}} +\entry{mode{\_}t}{391}{\code {mode_t}} +\entry{ino{\_}t}{392}{\code {ino_t}} +\entry{ino64{\_}t}{392}{\code {ino64_t}} +\entry{dev{\_}t}{392}{\code {dev_t}} +\entry{nlink{\_}t}{392}{\code {nlink_t}} +\entry{blkcnt{\_}t}{392}{\code {blkcnt_t}} +\entry{blkcnt64{\_}t}{392}{\code {blkcnt64_t}} +\entry{struct utimbuf}{403}{\code {struct utimbuf}} +\entry{struct sockaddr}{420}{\code {struct sockaddr}} +\entry{struct if{\_}nameindex}{422}{\code {struct if_nameindex}} +\entry{struct sockaddr{\_}un}{424}{\code {struct sockaddr_un}} +\entry{struct sockaddr{\_}in}{426}{\code {struct sockaddr_in}} +\entry{struct sockaddr{\_}in6}{426}{\code {struct sockaddr_in6}} +\entry{struct in{\_}addr}{429}{\code {struct in_addr}} +\entry{struct in6{\_}addr}{429}{\code {struct in6_addr}} +\entry{struct hostent}{431}{\code {struct hostent}} +\entry{struct servent}{435}{\code {struct servent}} +\entry{struct protoent}{438}{\code {struct protoent}} +\entry{struct linger}{462}{\code {struct linger}} +\entry{struct netent}{462}{\code {struct netent}} +\entry{struct termios}{467}{\code {struct termios}} +\entry{tcflag{\_}t}{468}{\code {tcflag_t}} +\entry{cc{\_}t}{468}{\code {cc_t}} +\entry{speed{\_}t}{478}{\code {speed_t}} +\entry{struct sgttyb}{485}{\code {struct sgttyb}} +\entry{struct random{\_}data}{533}{\code {struct random_data}} +\entry{div{\_}t}{540}{\code {div_t}} +\entry{ldiv{\_}t}{541}{\code {ldiv_t}} +\entry{lldiv{\_}t}{541}{\code {lldiv_t}} +\entry{imaxdiv{\_}t}{541}{\code {imaxdiv_t}} +\entry{struct timeval}{572}{\code {struct timeval}} +\entry{struct timespec}{572}{\code {struct timespec}} +\entry{clock{\_}t}{574}{\code {clock_t}} +\entry{struct tms}{574}{\code {struct tms}} +\entry{time{\_}t}{576}{\code {time_t}} +\entry{struct timezone}{577}{\code {struct timezone}} +\entry{struct tm}{579}{\code {struct tm}} +\entry{struct ntptimeval}{581}{\code {struct ntptimeval}} +\entry{struct ntptimeval}{581}{\code {struct ntptimeval}} +\entry{struct timex}{582}{\code {struct timex}} +\entry{struct timex}{582}{\code {struct timex}} +\entry{struct itimerval}{601}{\code {struct itimerval}} +\entry{struct rusage}{605}{\code {struct rusage}} +\entry{struct vtimes}{607}{\code {struct vtimes}} +\entry{struct rlimit}{608}{\code {struct rlimit}} +\entry{struct rlimit64}{609}{\code {struct rlimit64}} +\entry{struct sched{\_}param}{615}{\code {struct sched_param}} +\entry{jmp{\_}buf}{626}{\code {jmp_buf}} +\entry{sigjmp{\_}buf}{627}{\code {sigjmp_buf}} +\entry{ucontext{\_}t}{628}{\code {ucontext_t}} +\entry{sighandler{\_}t}{646}{\code {sighandler_t}} +\entry{struct sigaction}{649}{\code {struct sigaction}} +\entry{sig{\_}atomic{\_}t}{662}{\code {sig_atomic_t}} +\entry{sigset{\_}t}{669}{\code {sigset_t}} +\entry{stack{\_}t}{678}{\code {stack_t}} +\entry{struct sigstack}{679}{\code {struct sigstack}} +\entry{struct sigvec}{680}{\code {struct sigvec}} +\entry{struct option}{688}{\code {struct option}} +\entry{struct argp}{694}{\code {struct argp}} +\entry{struct argp{\_}option}{695}{\code {struct argp_option}} +\entry{struct argp{\_}state}{701}{\code {struct argp_state}} +\entry{struct argp{\_}child}{702}{\code {struct argp_child}} +\entry{pid{\_}t}{730}{\code {pid_t}} +\entry{union wait}{738}{\code {union wait}} +\entry{uid{\_}t}{773}{\code {uid_t}} +\entry{gid{\_}t}{773}{\code {gid_t}} +\entry{struct exit{\_}status}{782}{\code {struct exit_status}} +\entry{struct utmp}{782}{\code {struct utmp}} +\entry{struct utmpx}{786}{\code {struct utmpx}} +\entry{struct passwd}{790}{\code {struct passwd}} +\entry{struct group}{793}{\code {struct group}} +\entry{struct utsname}{801}{\code {struct utsname}} +\entry{struct fstab}{803}{\code {struct fstab}} +\entry{struct mntent}{805}{\code {struct mntent}} +\entry{va{\_}list}{876}{\code {va_list}} +\entry{ptrdiff{\_}t}{879}{\code {ptrdiff_t}} +\entry{size{\_}t}{879}{\code {size_t}} diff -durpN glibc-2.2.4/manual/libc.tps glibc-2.2.5/manual/libc.tps --- glibc-2.2.4/manual/libc.tps Mon Aug 13 15:03:57 2001 +++ glibc-2.2.5/manual/libc.tps Sun Jan 20 19:29:12 2002 @@ -1,145 +1,145 @@ \initial {{\_}} -\entry {\code {__ftw_func_t}}{370} -\entry {\code {__ftw64_func_t}}{371} -\entry {\code {__nftw_func_t}}{371} -\entry {\code {__nftw64_func_t}}{372} +\entry {\code {__ftw_func_t}}{378} +\entry {\code {__ftw64_func_t}}{379} +\entry {\code {__nftw_func_t}}{379} +\entry {\code {__nftw64_func_t}}{380} \initial {B} -\entry {\code {blkcnt_t}}{384} -\entry {\code {blkcnt64_t}}{384} +\entry {\code {blkcnt_t}}{392} +\entry {\code {blkcnt64_t}}{392} \initial {C} -\entry {\code {cc_t}}{460} -\entry {\code {clock_t}}{556} -\entry {\code {comparison_fn_t}}{203} -\entry {\code {cookie_close_function}}{307} -\entry {\code {cookie_io_functions_t}}{305} -\entry {\code {cookie_read_function}}{307} -\entry {\code {cookie_seek_function}}{307} -\entry {\code {cookie_write_function}}{307} +\entry {\code {cc_t}}{468} +\entry {\code {clock_t}}{574} +\entry {\code {comparison_fn_t}}{209} +\entry {\code {cookie_close_function}}{313} +\entry {\code {cookie_io_functions_t}}{311} +\entry {\code {cookie_read_function}}{313} +\entry {\code {cookie_seek_function}}{313} +\entry {\code {cookie_write_function}}{313} \initial {D} -\entry {\code {dev_t}}{384} -\entry {\code {DIR}}{364} -\entry {\code {div_t}}{522} +\entry {\code {dev_t}}{392} +\entry {\code {DIR}}{372} +\entry {\code {div_t}}{540} \initial {E} -\entry {\code {enum mcheck_status}}{38} +\entry {\code {enum mcheck_status}}{42} \initial {F} -\entry {\code {fd_set}}{331} -\entry {\code {FILE}}{239} -\entry {\code {fpos_t}}{296} -\entry {\code {fpos64_t}}{297} +\entry {\code {fd_set}}{337} +\entry {\code {FILE}}{245} +\entry {\code {fpos_t}}{302} +\entry {\code {fpos64_t}}{303} \initial {G} -\entry {\code {gid_t}}{755} -\entry {\code {glob_t}}{215} -\entry {\code {glob64_t}}{216} +\entry {\code {gid_t}}{773} +\entry {\code {glob_t}}{221} +\entry {\code {glob64_t}}{222} \initial {I} -\entry {\code {iconv_t}}{137} -\entry {\code {imaxdiv_t}}{523} -\entry {\code {ino_t}}{384} -\entry {\code {ino64_t}}{384} +\entry {\code {iconv_t}}{141} +\entry {\code {imaxdiv_t}}{541} +\entry {\code {ino_t}}{392} +\entry {\code {ino64_t}}{392} \initial {J} -\entry {\code {jmp_buf}}{608} +\entry {\code {jmp_buf}}{626} \initial {L} -\entry {\code {ldiv_t}}{523} -\entry {\code {lldiv_t}}{523} +\entry {\code {ldiv_t}}{541} +\entry {\code {lldiv_t}}{541} \initial {M} -\entry {\code {mbstate_t}}{121} -\entry {\code {mode_t}}{383} +\entry {\code {mbstate_t}}{124} +\entry {\code {mode_t}}{391} \initial {N} -\entry {\code {nlink_t}}{384} +\entry {\code {nlink_t}}{392} \initial {O} -\entry {\code {off_t}}{322} -\entry {\code {off64_t}}{322} +\entry {\code {off_t}}{328} +\entry {\code {off64_t}}{328} \initial {P} -\entry {\code {pid_t}}{712} -\entry {\code {printf_arginfo_function}}{278} -\entry {\code {printf_function}}{278} -\entry {\code {ptrdiff_t}}{861} +\entry {\code {pid_t}}{730} +\entry {\code {printf_arginfo_function}}{284} +\entry {\code {printf_function}}{284} +\entry {\code {ptrdiff_t}}{879} \initial {R} -\entry {\code {regex_t}}{222} -\entry {\code {regmatch_t}}{225} -\entry {\code {regoff_t}}{225} +\entry {\code {regex_t}}{228} +\entry {\code {regmatch_t}}{231} +\entry {\code {regoff_t}}{231} \initial {S} -\entry {\code {sig_atomic_t}}{644} -\entry {\code {sighandler_t}}{628} -\entry {\code {sigjmp_buf}}{609} -\entry {\code {sigset_t}}{651} -\entry {\code {size_t}}{861} -\entry {\code {speed_t}}{470} -\entry {\code {ssize_t}}{316} -\entry {\code {stack_t}}{660} -\entry {\code {struct __gconv_step}}{147} -\entry {\code {struct __gconv_step_data}}{148} -\entry {\code {struct aiocb}}{335} -\entry {\code {struct aiocb64}}{336} -\entry {\code {struct aioinit}}{346} -\entry {\code {struct argp}}{676} -\entry {\code {struct argp_child}}{684} -\entry {\code {struct argp_option}}{677} -\entry {\code {struct argp_state}}{683} -\entry {\code {struct dirent}}{363} -\entry {\code {struct ENTRY}}{209} -\entry {\code {struct exit_status}}{764} -\entry {\code {struct flock}}{356} -\entry {\code {struct fstab}}{785} -\entry {\code {struct FTW}}{372} -\entry {\code {struct group}}{775} -\entry {\code {struct hostent}}{423} -\entry {\code {struct if_nameindex}}{414} -\entry {\code {struct in_addr}}{421} -\entry {\code {struct in6_addr}}{421} -\entry {\code {struct iovec}}{326} -\entry {\code {struct itimerval}}{583} -\entry {\code {struct lconv}}{164} -\entry {\code {struct linger}}{454} -\entry {\code {struct mallinfo}}{42} -\entry {\code {struct mntent}}{787} -\entry {\code {struct netent}}{454} -\entry {\code {struct ntptimeval}}{563} -\entry {\code {struct obstack}}{48} -\entry {\code {struct option}}{670} -\entry {\code {struct passwd}}{772} -\entry {\code {struct printf_info}}{276} -\entry {\code {struct protoent}}{430} -\entry {\code {struct random_data}}{513} -\entry {\code {struct rlimit}}{590} -\entry {\code {struct rlimit64}}{591} -\entry {\code {struct rusage}}{587} -\entry {\code {struct sched_param}}{597} -\entry {\code {struct servent}}{427} -\entry {\code {struct sgttyb}}{477} -\entry {\code {struct sigaction}}{631} -\entry {\code {struct sigstack}}{661} -\entry {\code {struct sigvec}}{662} -\entry {\code {struct sockaddr}}{412} -\entry {\code {struct sockaddr_in}}{418} -\entry {\code {struct sockaddr_in6}}{418} -\entry {\code {struct sockaddr_un}}{416} -\entry {\code {struct stat}}{381} -\entry {\code {struct stat64}}{382} -\entry {\code {struct termios}}{459} -\entry {\code {struct timespec}}{554} -\entry {\code {struct timeval}}{554} -\entry {\code {struct timex}}{564} -\entry {\code {struct timezone}}{559} -\entry {\code {struct tm}}{561} -\entry {\code {struct tms}}{556} -\entry {\code {struct utimbuf}}{395} -\entry {\code {struct utmp}}{764} -\entry {\code {struct utmpx}}{768} -\entry {\code {struct utsname}}{783} -\entry {\code {struct vtimes}}{589} +\entry {\code {sig_atomic_t}}{662} +\entry {\code {sighandler_t}}{646} +\entry {\code {sigjmp_buf}}{627} +\entry {\code {sigset_t}}{669} +\entry {\code {size_t}}{879} +\entry {\code {speed_t}}{478} +\entry {\code {ssize_t}}{322} +\entry {\code {stack_t}}{678} +\entry {\code {struct __gconv_step}}{151} +\entry {\code {struct __gconv_step_data}}{152} +\entry {\code {struct aiocb}}{341} +\entry {\code {struct aiocb64}}{343} +\entry {\code {struct aioinit}}{352} +\entry {\code {struct argp}}{694} +\entry {\code {struct argp_child}}{702} +\entry {\code {struct argp_option}}{695} +\entry {\code {struct argp_state}}{701} +\entry {\code {struct dirent}}{371} +\entry {\code {struct ENTRY}}{215} +\entry {\code {struct exit_status}}{782} +\entry {\code {struct flock}}{363} +\entry {\code {struct fstab}}{803} +\entry {\code {struct FTW}}{380} +\entry {\code {struct group}}{793} +\entry {\code {struct hostent}}{431} +\entry {\code {struct if_nameindex}}{422} +\entry {\code {struct in_addr}}{429} +\entry {\code {struct in6_addr}}{429} +\entry {\code {struct iovec}}{332} +\entry {\code {struct itimerval}}{601} +\entry {\code {struct lconv}}{168} +\entry {\code {struct linger}}{462} +\entry {\code {struct mallinfo}}{46} +\entry {\code {struct mntent}}{805} +\entry {\code {struct netent}}{462} +\entry {\code {struct ntptimeval}}{581} +\entry {\code {struct obstack}}{52} +\entry {\code {struct option}}{688} +\entry {\code {struct passwd}}{790} +\entry {\code {struct printf_info}}{282} +\entry {\code {struct protoent}}{438} +\entry {\code {struct random_data}}{533} +\entry {\code {struct rlimit}}{608} +\entry {\code {struct rlimit64}}{609} +\entry {\code {struct rusage}}{605} +\entry {\code {struct sched_param}}{615} +\entry {\code {struct servent}}{435} +\entry {\code {struct sgttyb}}{485} +\entry {\code {struct sigaction}}{649} +\entry {\code {struct sigstack}}{679} +\entry {\code {struct sigvec}}{680} +\entry {\code {struct sockaddr}}{420} +\entry {\code {struct sockaddr_in}}{426} +\entry {\code {struct sockaddr_in6}}{426} +\entry {\code {struct sockaddr_un}}{424} +\entry {\code {struct stat}}{389} +\entry {\code {struct stat64}}{390} +\entry {\code {struct termios}}{467} +\entry {\code {struct timespec}}{572} +\entry {\code {struct timeval}}{572} +\entry {\code {struct timex}}{582} +\entry {\code {struct timezone}}{577} +\entry {\code {struct tm}}{579} +\entry {\code {struct tms}}{574} +\entry {\code {struct utimbuf}}{403} +\entry {\code {struct utmp}}{782} +\entry {\code {struct utmpx}}{786} +\entry {\code {struct utsname}}{801} +\entry {\code {struct vtimes}}{607} \initial {T} -\entry {\code {tcflag_t}}{460} -\entry {\code {time_t}}{558} +\entry {\code {tcflag_t}}{468} +\entry {\code {time_t}}{576} \initial {U} -\entry {\code {ucontext_t}}{610} -\entry {\code {uid_t}}{755} -\entry {\code {union wait}}{720} +\entry {\code {ucontext_t}}{628} +\entry {\code {uid_t}}{773} +\entry {\code {union wait}}{738} \initial {V} -\entry {\code {va_list}}{858} -\entry {\code {VISIT}}{212} +\entry {\code {va_list}}{876} +\entry {\code {VISIT}}{218} \initial {W} -\entry {\code {wchar_t}}{116} -\entry {\code {wctrans_t}}{72} -\entry {\code {wctype_t}}{68} -\entry {\code {wint_t}}{116} -\entry {\code {wordexp_t}}{228} +\entry {\code {wchar_t}}{120} +\entry {\code {wctrans_t}}{76} +\entry {\code {wctype_t}}{72} +\entry {\code {wint_t}}{120} +\entry {\code {wordexp_t}}{234} diff -durpN glibc-2.2.4/manual/libc.vr glibc-2.2.5/manual/libc.vr --- glibc-2.2.4/manual/libc.vr Mon Aug 13 15:04:27 2001 +++ glibc-2.2.5/manual/libc.vr Sun Jan 20 19:29:27 2002 @@ -154,914 +154,917 @@ \entry{EMEDIUMTYPE}{26}{\code {EMEDIUMTYPE}} \entry{program{\_}invocation{\_}name}{28}{\code {program_invocation_name}} \entry{program{\_}invocation{\_}short{\_}name}{28}{\code {program_invocation_short_name}} -\entry{{\_}{\_}malloc{\_}hook}{39}{\code {__malloc_hook}} -\entry{{\_}{\_}realloc{\_}hook}{39}{\code {__realloc_hook}} -\entry{{\_}{\_}free{\_}hook}{40}{\code {__free_hook}} -\entry{{\_}{\_}memalign{\_}hook}{40}{\code {__memalign_hook}} -\entry{{\_}{\_}malloc{\_}initialize{\_}hook}{40}{\code {__malloc_initialize_hook}} -\entry{obstack{\_}alloc{\_}failed{\_}handler}{49}{\code {obstack_alloc_failed_handler}} -\entry{WCHAR{\_}MIN}{116}{\code {WCHAR_MIN}} -\entry{WCHAR{\_}MAX}{116}{\code {WCHAR_MAX}} -\entry{WEOF}{117}{\code {WEOF}} -\entry{MB{\_}LEN{\_}MAX}{120}{\code {MB_LEN_MAX}} -\entry{MB{\_}CUR{\_}MAX}{120}{\code {MB_CUR_MAX}} -\entry{(*{\_}{\_}gconv{\_}init{\_}fct)}{150}{\code {(*__gconv_init_fct)}} -\entry{(*{\_}{\_}gconv{\_}end{\_}fct)}{153}{\code {(*__gconv_end_fct)}} -\entry{(*{\_}{\_}gconv{\_}fct)}{153}{\code {(*__gconv_fct)}} -\entry{LC{\_}COLLATE}{160}{\code {LC_COLLATE}} -\entry{LC{\_}CTYPE}{160}{\code {LC_CTYPE}} -\entry{LC{\_}MONETARY}{160}{\code {LC_MONETARY}} -\entry{LC{\_}NUMERIC}{160}{\code {LC_NUMERIC}} -\entry{LC{\_}TIME}{160}{\code {LC_TIME}} -\entry{LC{\_}MESSAGES}{160}{\code {LC_MESSAGES}} -\entry{LC{\_}ALL}{161}{\code {LC_ALL}} -\entry{LANG}{161}{\code {LANG}} -\entry{LANGUAGE}{161}{\code {LANGUAGE}} -\entry{CODESET}{168}{\code {CODESET}} -\entry{ABDAY{\_}1}{168}{\code {ABDAY_1}} -\entry{ABDAY{\_}2}{168}{\code {ABDAY_2}} -\entry{ABDAY{\_}3}{168}{\code {ABDAY_3}} -\entry{ABDAY{\_}4}{168}{\code {ABDAY_4}} -\entry{ABDAY{\_}5}{168}{\code {ABDAY_5}} -\entry{ABDAY{\_}6}{168}{\code {ABDAY_6}} -\entry{ABDAY{\_}7}{168}{\code {ABDAY_7}} -\entry{DAY{\_}1}{168}{\code {DAY_1}} -\entry{DAY{\_}2}{168}{\code {DAY_2}} -\entry{DAY{\_}3}{168}{\code {DAY_3}} -\entry{DAY{\_}4}{168}{\code {DAY_4}} -\entry{DAY{\_}5}{168}{\code {DAY_5}} -\entry{DAY{\_}6}{168}{\code {DAY_6}} -\entry{DAY{\_}7}{168}{\code {DAY_7}} -\entry{ABMON{\_}1}{168}{\code {ABMON_1}} -\entry{ABMON{\_}2}{168}{\code {ABMON_2}} -\entry{ABMON{\_}3}{168}{\code {ABMON_3}} -\entry{ABMON{\_}4}{168}{\code {ABMON_4}} -\entry{ABMON{\_}5}{168}{\code {ABMON_5}} -\entry{ABMON{\_}6}{168}{\code {ABMON_6}} -\entry{ABMON{\_}7}{168}{\code {ABMON_7}} -\entry{ABMON{\_}8}{168}{\code {ABMON_8}} -\entry{ABMON{\_}9}{168}{\code {ABMON_9}} -\entry{ABMON{\_}10}{168}{\code {ABMON_10}} -\entry{ABMON{\_}11}{168}{\code {ABMON_11}} -\entry{ABMON{\_}12}{168}{\code {ABMON_12}} -\entry{MON{\_}1}{168}{\code {MON_1}} -\entry{MON{\_}2}{169}{\code {MON_2}} -\entry{MON{\_}3}{169}{\code {MON_3}} -\entry{MON{\_}4}{169}{\code {MON_4}} -\entry{MON{\_}5}{169}{\code {MON_5}} -\entry{MON{\_}6}{169}{\code {MON_6}} -\entry{MON{\_}7}{169}{\code {MON_7}} -\entry{MON{\_}8}{169}{\code {MON_8}} -\entry{MON{\_}9}{169}{\code {MON_9}} -\entry{MON{\_}10}{169}{\code {MON_10}} -\entry{MON{\_}11}{169}{\code {MON_11}} -\entry{MON{\_}12}{169}{\code {MON_12}} -\entry{AM{\_}STR}{169}{\code {AM_STR}} -\entry{PM{\_}STR}{169}{\code {PM_STR}} -\entry{D{\_}T{\_}FMT}{169}{\code {D_T_FMT}} -\entry{D{\_}FMT}{169}{\code {D_FMT}} -\entry{T{\_}FMT}{169}{\code {T_FMT}} -\entry{T{\_}FMT{\_}AMPM}{169}{\code {T_FMT_AMPM}} -\entry{ERA}{169}{\code {ERA}} -\entry{ERA{\_}YEAR}{169}{\code {ERA_YEAR}} -\entry{ERA{\_}D{\_}T{\_}FMT}{170}{\code {ERA_D_T_FMT}} -\entry{ERA{\_}D{\_}FMT}{170}{\code {ERA_D_FMT}} -\entry{ERA{\_}T{\_}FMT}{170}{\code {ERA_T_FMT}} -\entry{ALT{\_}DIGITS}{170}{\code {ALT_DIGITS}} -\entry{INT{\_}CURR{\_}SYMBOL}{170}{\code {INT_CURR_SYMBOL}} -\entry{CURRENCY{\_}SYMBOL}{170}{\code {CURRENCY_SYMBOL}} -\entry{CRNCYSTR}{170}{\code {CRNCYSTR}} -\entry{MON{\_}DECIMAL{\_}POINT}{170}{\code {MON_DECIMAL_POINT}} -\entry{MON{\_}THOUSANDS{\_}SEP}{170}{\code {MON_THOUSANDS_SEP}} -\entry{MON{\_}GROUPING}{170}{\code {MON_GROUPING}} -\entry{POSITIVE{\_}SIGN}{170}{\code {POSITIVE_SIGN}} -\entry{NEGATIVE{\_}SIGN}{170}{\code {NEGATIVE_SIGN}} -\entry{INT{\_}FRAC{\_}DIGITS}{170}{\code {INT_FRAC_DIGITS}} -\entry{FRAC{\_}DIGITS}{171}{\code {FRAC_DIGITS}} -\entry{P{\_}CS{\_}PRECEDES}{171}{\code {P_CS_PRECEDES}} -\entry{P{\_}SEP{\_}BY{\_}SPACE}{171}{\code {P_SEP_BY_SPACE}} -\entry{N{\_}CS{\_}PRECEDES}{171}{\code {N_CS_PRECEDES}} -\entry{N{\_}SEP{\_}BY{\_}SPACE}{171}{\code {N_SEP_BY_SPACE}} -\entry{P{\_}SIGN{\_}POSN}{171}{\code {P_SIGN_POSN}} -\entry{N{\_}SIGN{\_}POSN}{171}{\code {N_SIGN_POSN}} -\entry{INT{\_}P{\_}CS{\_}PRECEDES}{171}{\code {INT_P_CS_PRECEDES}} -\entry{INT{\_}P{\_}SEP{\_}BY{\_}SPACE}{171}{\code {INT_P_SEP_BY_SPACE}} -\entry{INT{\_}N{\_}CS{\_}PRECEDES}{171}{\code {INT_N_CS_PRECEDES}} -\entry{INT{\_}N{\_}SEP{\_}BY{\_}SPACE}{171}{\code {INT_N_SEP_BY_SPACE}} -\entry{INT{\_}P{\_}SIGN{\_}POSN}{171}{\code {INT_P_SIGN_POSN}} -\entry{INT{\_}N{\_}SIGN{\_}POSN}{171}{\code {INT_N_SIGN_POSN}} -\entry{DECIMAL{\_}POINT}{172}{\code {DECIMAL_POINT}} -\entry{RADIXCHAR}{172}{\code {RADIXCHAR}} -\entry{THOUSANDS{\_}SEP}{172}{\code {THOUSANDS_SEP}} -\entry{THOUSEP}{172}{\code {THOUSEP}} -\entry{GROUPING}{172}{\code {GROUPING}} -\entry{YESEXPR}{172}{\code {YESEXPR}} -\entry{NOEXPR}{172}{\code {NOEXPR}} -\entry{YESSTR}{172}{\code {YESSTR}} -\entry{NOSTR}{172}{\code {NOSTR}} -\entry{GLOB{\_}ABORTED}{217}{\code {GLOB_ABORTED}} -\entry{GLOB{\_}NOMATCH}{217}{\code {GLOB_NOMATCH}} -\entry{GLOB{\_}NOSPACE}{217}{\code {GLOB_NOSPACE}} -\entry{GLOB{\_}APPEND}{218}{\code {GLOB_APPEND}} -\entry{GLOB{\_}DOOFFS}{218}{\code {GLOB_DOOFFS}} -\entry{GLOB{\_}ERR}{218}{\code {GLOB_ERR}} -\entry{GLOB{\_}MARK}{219}{\code {GLOB_MARK}} -\entry{GLOB{\_}NOCHECK}{219}{\code {GLOB_NOCHECK}} -\entry{GLOB{\_}NOSORT}{219}{\code {GLOB_NOSORT}} -\entry{GLOB{\_}NOESCAPE}{219}{\code {GLOB_NOESCAPE}} -\entry{GLOB{\_}PERIOD}{219}{\code {GLOB_PERIOD}} -\entry{GLOB{\_}MAGCHAR}{219}{\code {GLOB_MAGCHAR}} -\entry{GLOB{\_}ALTDIRFUNC}{219}{\code {GLOB_ALTDIRFUNC}} -\entry{GLOB{\_}BRACE}{219}{\code {GLOB_BRACE}} -\entry{GLOB{\_}NOMAGIC}{220}{\code {GLOB_NOMAGIC}} -\entry{GLOB{\_}TILDE}{220}{\code {GLOB_TILDE}} -\entry{GLOB{\_}TILDE{\_}CHECK}{220}{\code {GLOB_TILDE_CHECK}} -\entry{GLOB{\_}ONLYDIR}{221}{\code {GLOB_ONLYDIR}} -\entry{stdin}{239}{\code {stdin}} -\entry{stdout}{239}{\code {stdout}} -\entry{stderr}{239}{\code {stderr}} -\entry{FOPEN{\_}MAX}{242}{\code {FOPEN_MAX}} -\entry{FSETLOCKING{\_}INTERNAL}{247}{\code {FSETLOCKING_INTERNAL}} -\entry{FSETLOCKING{\_}BYCALLER}{247}{\code {FSETLOCKING_BYCALLER}} -\entry{FSETLOCKING{\_}QUERY}{247}{\code {FSETLOCKING_QUERY}} -\entry{NL{\_}ARGMAX}{260}{\code {NL_ARGMAX}} -\entry{PA{\_}FLAG{\_}MASK}{273}{\code {PA_FLAG_MASK}} -\entry{PA{\_}INT}{273}{\code {PA_INT}} -\entry{PA{\_}CHAR}{273}{\code {PA_CHAR}} -\entry{PA{\_}STRING}{273}{\code {PA_STRING}} -\entry{PA{\_}POINTER}{273}{\code {PA_POINTER}} -\entry{PA{\_}FLOAT}{273}{\code {PA_FLOAT}} -\entry{PA{\_}DOUBLE}{273}{\code {PA_DOUBLE}} -\entry{PA{\_}LAST}{273}{\code {PA_LAST}} -\entry{PA{\_}FLAG{\_}PTR}{273}{\code {PA_FLAG_PTR}} -\entry{PA{\_}FLAG{\_}SHORT}{273}{\code {PA_FLAG_SHORT}} -\entry{PA{\_}FLAG{\_}LONG}{274}{\code {PA_FLAG_LONG}} -\entry{PA{\_}FLAG{\_}LONG{\_}LONG}{274}{\code {PA_FLAG_LONG_LONG}} -\entry{PA{\_}FLAG{\_}LONG{\_}DOUBLE}{274}{\code {PA_FLAG_LONG_DOUBLE}} -\entry{EOF}{291}{\code {EOF}} -\entry{WEOF}{291}{\code {WEOF}} -\entry{SEEK{\_}SET}{295}{\code {SEEK_SET}} -\entry{SEEK{\_}CUR}{295}{\code {SEEK_CUR}} -\entry{SEEK{\_}END}{295}{\code {SEEK_END}} -\entry{L{\_}SET}{295}{\code {L_SET}} -\entry{L{\_}INCR}{295}{\code {L_INCR}} -\entry{L{\_}XTND}{295}{\code {L_XTND}} -\entry{{\_}IOFBF}{300}{\code {_IOFBF}} -\entry{{\_}IOLBF}{300}{\code {_IOLBF}} -\entry{{\_}IONBF}{300}{\code {_IONBF}} -\entry{BUFSIZ}{300}{\code {BUFSIZ}} -\entry{MM{\_}PRINT}{307}{\code {MM_PRINT}} -\entry{MM{\_}CONSOLE}{307}{\code {MM_CONSOLE}} -\entry{MM{\_}HARD}{307}{\code {MM_HARD}} -\entry{MM{\_}SOFT}{307}{\code {MM_SOFT}} -\entry{MM{\_}FIRM}{307}{\code {MM_FIRM}} -\entry{MM{\_}APPL}{307}{\code {MM_APPL}} -\entry{MM{\_}UTIL}{307}{\code {MM_UTIL}} -\entry{MM{\_}OPSYS}{307}{\code {MM_OPSYS}} -\entry{MM{\_}RECOVER}{308}{\code {MM_RECOVER}} -\entry{MM{\_}NRECOV}{308}{\code {MM_NRECOV}} -\entry{MM{\_}NULLLBL}{308}{\code {MM_NULLLBL}} -\entry{MM{\_}NULLSEV}{308}{\code {MM_NULLSEV}} -\entry{MM{\_}NULLMC}{308}{\code {MM_NULLMC}} -\entry{MM{\_}NULLTXT}{308}{\code {MM_NULLTXT}} -\entry{MM{\_}NULLACT}{308}{\code {MM_NULLACT}} -\entry{MM{\_}NULLTAG}{308}{\code {MM_NULLTAG}} -\entry{MM{\_}NOSEV}{308}{\code {MM_NOSEV}} -\entry{MM{\_}HALT}{308}{\code {MM_HALT}} -\entry{MM{\_}ERROR}{308}{\code {MM_ERROR}} -\entry{MM{\_}WARNING}{308}{\code {MM_WARNING}} -\entry{MM{\_}INFO}{309}{\code {MM_INFO}} -\entry{STDIN{\_}FILENO}{323}{\code {STDIN_FILENO}} -\entry{STDOUT{\_}FILENO}{323}{\code {STDOUT_FILENO}} -\entry{STDERR{\_}FILENO}{323}{\code {STDERR_FILENO}} -\entry{{\_}SC{\_}PAGESIZE}{327}{\code {_SC_PAGESIZE}} -\entry{PROT{\_}READ}{327}{\code {PROT_READ}} -\entry{PROT{\_}WRITE}{327}{\code {PROT_WRITE}} -\entry{PROT{\_}EXEC}{327}{\code {PROT_EXEC}} -\entry{MAP{\_}PRIVATE}{327}{\code {MAP_PRIVATE}} -\entry{MAP{\_}SHARED}{327}{\code {MAP_SHARED}} -\entry{MAP{\_}FIXED}{328}{\code {MAP_FIXED}} -\entry{MAP{\_}ANONYMOUS}{328}{\code {MAP_ANONYMOUS}} -\entry{MAP{\_}ANON}{328}{\code {MAP_ANON}} -\entry{MS{\_}SYNC}{329}{\code {MS_SYNC}} -\entry{MS{\_}ASYNC}{329}{\code {MS_ASYNC}} -\entry{FD{\_}SETSIZE}{331}{\code {FD_SETSIZE}} -\entry{LIO{\_}READ}{336}{\code {LIO_READ}} -\entry{LIO{\_}WRITE}{336}{\code {LIO_WRITE}} -\entry{LIO{\_}NOP}{336}{\code {LIO_NOP}} -\entry{F{\_}DUPFD}{348}{\code {F_DUPFD}} -\entry{F{\_}GETFD}{349}{\code {F_GETFD}} -\entry{F{\_}SETFD}{349}{\code {F_SETFD}} -\entry{FD{\_}CLOEXEC}{350}{\code {FD_CLOEXEC}} -\entry{O{\_}RDONLY}{351}{\code {O_RDONLY}} -\entry{O{\_}WRONLY}{351}{\code {O_WRONLY}} -\entry{O{\_}RDWR}{351}{\code {O_RDWR}} -\entry{O{\_}READ}{351}{\code {O_READ}} -\entry{O{\_}WRITE}{351}{\code {O_WRITE}} -\entry{O{\_}EXEC}{351}{\code {O_EXEC}} -\entry{O{\_}ACCMODE}{352}{\code {O_ACCMODE}} -\entry{O{\_}CREAT}{352}{\code {O_CREAT}} -\entry{O{\_}EXCL}{352}{\code {O_EXCL}} -\entry{O{\_}NONBLOCK}{352}{\code {O_NONBLOCK}} -\entry{O{\_}NOCTTY}{352}{\code {O_NOCTTY}} -\entry{O{\_}IGNORE{\_}CTTY}{353}{\code {O_IGNORE_CTTY}} -\entry{O{\_}NOLINK}{353}{\code {O_NOLINK}} -\entry{O{\_}NOTRANS}{353}{\code {O_NOTRANS}} -\entry{O{\_}TRUNC}{353}{\code {O_TRUNC}} -\entry{O{\_}SHLOCK}{353}{\code {O_SHLOCK}} -\entry{O{\_}EXLOCK}{353}{\code {O_EXLOCK}} -\entry{O{\_}APPEND}{354}{\code {O_APPEND}} -\entry{O{\_}NONBLOCK}{354}{\code {O_NONBLOCK}} -\entry{O{\_}NDELAY}{354}{\code {O_NDELAY}} -\entry{O{\_}ASYNC}{354}{\code {O_ASYNC}} -\entry{O{\_}FSYNC}{354}{\code {O_FSYNC}} -\entry{O{\_}SYNC}{354}{\code {O_SYNC}} -\entry{O{\_}NOATIME}{354}{\code {O_NOATIME}} -\entry{F{\_}GETFL}{355}{\code {F_GETFL}} -\entry{F{\_}SETFL}{355}{\code {F_SETFL}} -\entry{F{\_}GETLK}{357}{\code {F_GETLK}} -\entry{F{\_}SETLK}{357}{\code {F_SETLK}} -\entry{F{\_}SETLKW}{358}{\code {F_SETLKW}} -\entry{F{\_}RDLCK}{358}{\code {F_RDLCK}} -\entry{F{\_}WRLCK}{359}{\code {F_WRLCK}} -\entry{F{\_}UNLCK}{359}{\code {F_UNLCK}} -\entry{F{\_}GETOWN}{359}{\code {F_GETOWN}} -\entry{F{\_}SETOWN}{359}{\code {F_SETOWN}} -\entry{PWD}{362}{\code {PWD}} -\entry{DT{\_}UNKNOWN}{363}{\code {DT_UNKNOWN}} -\entry{DT{\_}REG}{364}{\code {DT_REG}} -\entry{DT{\_}DIR}{364}{\code {DT_DIR}} -\entry{DT{\_}FIFO}{364}{\code {DT_FIFO}} -\entry{DT{\_}SOCK}{364}{\code {DT_SOCK}} -\entry{DT{\_}CHR}{364}{\code {DT_CHR}} -\entry{DT{\_}BLK}{364}{\code {DT_BLK}} -\entry{FTW{\_}F}{371}{\code {FTW_F}} -\entry{FTW{\_}D}{371}{\code {FTW_D}} -\entry{FTW{\_}NS}{371}{\code {FTW_NS}} -\entry{FTW{\_}DNR}{371}{\code {FTW_DNR}} -\entry{FTW{\_}SL}{371}{\code {FTW_SL}} -\entry{FTW{\_}DP}{371}{\code {FTW_DP}} -\entry{FTW{\_}SLN}{371}{\code {FTW_SLN}} -\entry{FTW{\_}PHYS}{373}{\code {FTW_PHYS}} -\entry{FTW{\_}MOUNT}{373}{\code {FTW_MOUNT}} -\entry{FTW{\_}CHDIR}{373}{\code {FTW_CHDIR}} -\entry{FTW{\_}DEPTH}{373}{\code {FTW_DEPTH}} -\entry{MAXSYMLINKS}{375}{\code {MAXSYMLINKS}} -\entry{S{\_}IFMT}{387}{\code {S_IFMT}} -\entry{S{\_}IFDIR}{387}{\code {S_IFDIR}} -\entry{S{\_}IFCHR}{387}{\code {S_IFCHR}} -\entry{S{\_}IFBLK}{387}{\code {S_IFBLK}} -\entry{S{\_}IFREG}{387}{\code {S_IFREG}} -\entry{S{\_}IFLNK}{387}{\code {S_IFLNK}} -\entry{S{\_}IFSOCK}{387}{\code {S_IFSOCK}} -\entry{S{\_}IFIFO}{387}{\code {S_IFIFO}} -\entry{S{\_}IRUSR}{389}{\code {S_IRUSR}} -\entry{S{\_}IREAD}{389}{\code {S_IREAD}} -\entry{S{\_}IWUSR}{389}{\code {S_IWUSR}} -\entry{S{\_}IWRITE}{389}{\code {S_IWRITE}} -\entry{S{\_}IXUSR}{389}{\code {S_IXUSR}} -\entry{S{\_}IEXEC}{389}{\code {S_IEXEC}} -\entry{S{\_}IRWXU}{389}{\code {S_IRWXU}} -\entry{S{\_}IRGRP}{389}{\code {S_IRGRP}} -\entry{S{\_}IWGRP}{389}{\code {S_IWGRP}} -\entry{S{\_}IXGRP}{389}{\code {S_IXGRP}} -\entry{S{\_}IRWXG}{389}{\code {S_IRWXG}} -\entry{S{\_}IROTH}{389}{\code {S_IROTH}} -\entry{S{\_}IWOTH}{389}{\code {S_IWOTH}} -\entry{S{\_}IXOTH}{389}{\code {S_IXOTH}} -\entry{S{\_}IRWXO}{389}{\code {S_IRWXO}} -\entry{S{\_}ISUID}{389}{\code {S_ISUID}} -\entry{S{\_}ISGID}{390}{\code {S_ISGID}} -\entry{S{\_}ISVTX}{390}{\code {S_ISVTX}} -\entry{R{\_}OK}{394}{\code {R_OK}} -\entry{W{\_}OK}{394}{\code {W_OK}} -\entry{X{\_}OK}{394}{\code {X_OK}} -\entry{F{\_}OK}{394}{\code {F_OK}} -\entry{L{\_}tmpnam}{400}{\code {L_tmpnam}} -\entry{TMP{\_}MAX}{400}{\code {TMP_MAX}} -\entry{P{\_}tmpdir}{401}{\code {P_tmpdir}} -\entry{SOCK{\_}STREAM}{410}{\code {SOCK_STREAM}} -\entry{SOCK{\_}DGRAM}{410}{\code {SOCK_DGRAM}} -\entry{SOCK{\_}RAW}{411}{\code {SOCK_RAW}} -\entry{AF{\_}LOCAL}{412}{\code {AF_LOCAL}} -\entry{AF{\_}UNIX}{412}{\code {AF_UNIX}} -\entry{AF{\_}FILE}{412}{\code {AF_FILE}} -\entry{AF{\_}INET}{412}{\code {AF_INET}} -\entry{AF{\_}UNSPEC}{412}{\code {AF_UNSPEC}} -\entry{IFNAMSIZ}{414}{\code {IFNAMSIZ}} -\entry{PF{\_}LOCAL}{415}{\code {PF_LOCAL}} -\entry{PF{\_}UNIX}{415}{\code {PF_UNIX}} -\entry{PF{\_}FILE}{415}{\code {PF_FILE}} -\entry{PF{\_}INET}{417}{\code {PF_INET}} -\entry{PF{\_}INET6}{417}{\code {PF_INET6}} -\entry{INADDR{\_}LOOPBACK}{421}{\code {INADDR_LOOPBACK}} -\entry{INADDR{\_}ANY}{421}{\code {INADDR_ANY}} -\entry{INADDR{\_}BROADCAST}{421}{\code {INADDR_BROADCAST}} -\entry{INADDR{\_}NONE}{421}{\code {INADDR_NONE}} -\entry{in6addr{\_}loopback}{421}{\code {in6addr_loopback}} -\entry{in6addr{\_}any}{421}{\code {in6addr_any}} -\entry{h{\_}errno}{424}{\code {h_errno}} -\entry{HOST{\_}NOT{\_}FOUND}{424}{\code {HOST_NOT_FOUND}} -\entry{TRY{\_}AGAIN}{424}{\code {TRY_AGAIN}} -\entry{NO{\_}RECOVERY}{425}{\code {NO_RECOVERY}} -\entry{NO{\_}ADDRESS}{425}{\code {NO_ADDRESS}} -\entry{IPPORT{\_}RESERVED}{427}{\code {IPPORT_RESERVED}} -\entry{IPPORT{\_}USERRESERVED}{427}{\code {IPPORT_USERRESERVED}} -\entry{PF{\_}NS}{432}{\code {PF_NS}} -\entry{PF{\_}ISO}{432}{\code {PF_ISO}} -\entry{PF{\_}CCITT}{432}{\code {PF_CCITT}} -\entry{PF{\_}IMPLINK}{432}{\code {PF_IMPLINK}} -\entry{PF{\_}ROUTE}{432}{\code {PF_ROUTE}} -\entry{MSG{\_}OOB}{440}{\code {MSG_OOB}} -\entry{MSG{\_}PEEK}{440}{\code {MSG_PEEK}} -\entry{MSG{\_}DONTROUTE}{440}{\code {MSG_DONTROUTE}} -\entry{SOL{\_}SOCKET}{453}{\code {SOL_SOCKET}} -\entry{NCCS}{460}{\code {NCCS}} -\entry{TCSANOW}{460}{\code {TCSANOW}} -\entry{TCSADRAIN}{460}{\code {TCSADRAIN}} -\entry{TCSAFLUSH}{460}{\code {TCSAFLUSH}} -\entry{TCSASOFT}{460}{\code {TCSASOFT}} -\entry{INPCK}{462}{\code {INPCK}} -\entry{IGNPAR}{462}{\code {IGNPAR}} -\entry{PARMRK}{463}{\code {PARMRK}} -\entry{ISTRIP}{463}{\code {ISTRIP}} -\entry{IGNBRK}{463}{\code {IGNBRK}} -\entry{BRKINT}{463}{\code {BRKINT}} -\entry{IGNCR}{463}{\code {IGNCR}} -\entry{ICRNL}{463}{\code {ICRNL}} -\entry{INLCR}{463}{\code {INLCR}} -\entry{IXOFF}{464}{\code {IXOFF}} -\entry{IXON}{464}{\code {IXON}} -\entry{IXANY}{464}{\code {IXANY}} -\entry{IMAXBEL}{464}{\code {IMAXBEL}} -\entry{OPOST}{464}{\code {OPOST}} -\entry{ONLCR}{465}{\code {ONLCR}} -\entry{OXTABS}{465}{\code {OXTABS}} -\entry{ONOEOT}{465}{\code {ONOEOT}} -\entry{CLOCAL}{465}{\code {CLOCAL}} -\entry{HUPCL}{465}{\code {HUPCL}} -\entry{CREAD}{465}{\code {CREAD}} -\entry{CSTOPB}{465}{\code {CSTOPB}} -\entry{PARENB}{466}{\code {PARENB}} -\entry{PARODD}{466}{\code {PARODD}} -\entry{CSIZE}{466}{\code {CSIZE}} -\entry{CS5}{466}{\code {CS5}} -\entry{CS6}{466}{\code {CS6}} -\entry{CS7}{466}{\code {CS7}} -\entry{CS8}{466}{\code {CS8}} -\entry{CCTS{\_}OFLOW}{466}{\code {CCTS_OFLOW}} -\entry{CRTS{\_}IFLOW}{466}{\code {CRTS_IFLOW}} -\entry{MDMBUF}{466}{\code {MDMBUF}} -\entry{CIGNORE}{466}{\code {CIGNORE}} -\entry{ICANON}{467}{\code {ICANON}} -\entry{ECHO}{467}{\code {ECHO}} -\entry{ECHOE}{467}{\code {ECHOE}} -\entry{ECHOPRT}{467}{\code {ECHOPRT}} -\entry{ECHOK}{467}{\code {ECHOK}} -\entry{ECHOKE}{468}{\code {ECHOKE}} -\entry{ECHONL}{468}{\code {ECHONL}} -\entry{ECHOCTL}{468}{\code {ECHOCTL}} -\entry{ISIG}{468}{\code {ISIG}} -\entry{IEXTEN}{468}{\code {IEXTEN}} -\entry{NOFLSH}{468}{\code {NOFLSH}} -\entry{TOSTOP}{468}{\code {TOSTOP}} -\entry{ALTWERASE}{469}{\code {ALTWERASE}} -\entry{FLUSHO}{469}{\code {FLUSHO}} -\entry{NOKERNINFO}{469}{\code {NOKERNINFO}} -\entry{PENDIN}{469}{\code {PENDIN}} -\entry{B0}{470}{\code {B0}} -\entry{B50}{470}{\code {B50}} -\entry{B75}{470}{\code {B75}} -\entry{B110}{470}{\code {B110}} -\entry{B134}{470}{\code {B134}} -\entry{B150}{470}{\code {B150}} -\entry{B200}{470}{\code {B200}} -\entry{B300}{470}{\code {B300}} -\entry{B600}{470}{\code {B600}} -\entry{B1200}{470}{\code {B1200}} -\entry{B1800}{470}{\code {B1800}} -\entry{B2400}{470}{\code {B2400}} -\entry{B4800}{470}{\code {B4800}} -\entry{B9600}{470}{\code {B9600}} -\entry{B19200}{470}{\code {B19200}} -\entry{B38400}{470}{\code {B38400}} -\entry{B57600}{470}{\code {B57600}} -\entry{B115200}{470}{\code {B115200}} -\entry{B230400}{470}{\code {B230400}} -\entry{B460800}{470}{\code {B460800}} -\entry{EXTA}{470}{\code {EXTA}} -\entry{EXTB}{470}{\code {EXTB}} -\entry{{\_}POSIX{\_}VDISABLE}{471}{\code {_POSIX_VDISABLE}} -\entry{VEOF}{471}{\code {VEOF}} -\entry{VEOL}{471}{\code {VEOL}} -\entry{VEOL2}{471}{\code {VEOL2}} -\entry{VERASE}{472}{\code {VERASE}} -\entry{VWERASE}{472}{\code {VWERASE}} -\entry{VKILL}{472}{\code {VKILL}} -\entry{VREPRINT}{472}{\code {VREPRINT}} -\entry{VINTR}{473}{\code {VINTR}} -\entry{VQUIT}{473}{\code {VQUIT}} -\entry{VSUSP}{473}{\code {VSUSP}} -\entry{VDSUSP}{473}{\code {VDSUSP}} -\entry{VSTART}{474}{\code {VSTART}} -\entry{VSTOP}{474}{\code {VSTOP}} -\entry{VLNEXT}{474}{\code {VLNEXT}} -\entry{VDISCARD}{474}{\code {VDISCARD}} -\entry{VSTATUS}{475}{\code {VSTATUS}} -\entry{VMIN}{475}{\code {VMIN}} -\entry{VTIME}{475}{\code {VTIME}} -\entry{TCIFLUSH}{478}{\code {TCIFLUSH}} -\entry{TCOFLUSH}{478}{\code {TCOFLUSH}} -\entry{TCIOFLUSH}{478}{\code {TCIOFLUSH}} -\entry{TCOOFF}{479}{\code {TCOOFF}} -\entry{TCOON}{479}{\code {TCOON}} -\entry{TCIOFF}{479}{\code {TCIOFF}} -\entry{TCION}{479}{\code {TCION}} -\entry{EBADF}{479}{\code {EBADF}} -\entry{ENOTTY}{479}{\code {ENOTTY}} -\entry{EINVAL}{479}{\code {EINVAL}} -\entry{LOG{\_}USER}{488}{\code {LOG_USER}} -\entry{LOG{\_}MAIL}{488}{\code {LOG_MAIL}} -\entry{LOG{\_}DAEMON}{488}{\code {LOG_DAEMON}} -\entry{LOG{\_}AUTH}{488}{\code {LOG_AUTH}} -\entry{LOG{\_}SYSLOG}{488}{\code {LOG_SYSLOG}} -\entry{LOG{\_}LPR}{488}{\code {LOG_LPR}} -\entry{LOG{\_}NEWS}{488}{\code {LOG_NEWS}} -\entry{LOG{\_}UUCP}{488}{\code {LOG_UUCP}} -\entry{LOG{\_}CRON}{488}{\code {LOG_CRON}} -\entry{LOG{\_}AUTHPRIV}{488}{\code {LOG_AUTHPRIV}} -\entry{LOG{\_}FTP}{488}{\code {LOG_FTP}} -\entry{LOG{\_}LOCAL0}{488}{\code {LOG_LOCAL0}} -\entry{LOG{\_}LOCAL1}{488}{\code {LOG_LOCAL1}} -\entry{LOG{\_}LOCAL2}{488}{\code {LOG_LOCAL2}} -\entry{LOG{\_}LOCAL3}{488}{\code {LOG_LOCAL3}} -\entry{LOG{\_}LOCAL4}{488}{\code {LOG_LOCAL4}} -\entry{LOG{\_}LOCAL5}{488}{\code {LOG_LOCAL5}} -\entry{LOG{\_}LOCAL6}{489}{\code {LOG_LOCAL6}} -\entry{LOG{\_}LOCAL7}{489}{\code {LOG_LOCAL7}} -\entry{LOG{\_}EMERG}{489}{\code {LOG_EMERG}} -\entry{LOG{\_}ALERT}{489}{\code {LOG_ALERT}} -\entry{LOG{\_}CRIT}{489}{\code {LOG_CRIT}} -\entry{LOG{\_}ERR}{489}{\code {LOG_ERR}} -\entry{LOG{\_}WARNING}{489}{\code {LOG_WARNING}} -\entry{LOG{\_}NOTICE}{489}{\code {LOG_NOTICE}} -\entry{LOG{\_}INFO}{489}{\code {LOG_INFO}} -\entry{LOG{\_}DEBUG}{489}{\code {LOG_DEBUG}} -\entry{M{\_}E}{493}{\code {M_E}} -\entry{M{\_}LOG2E}{493}{\code {M_LOG2E}} -\entry{M{\_}LOG10E}{493}{\code {M_LOG10E}} -\entry{M{\_}LN2}{493}{\code {M_LN2}} -\entry{M{\_}LN10}{493}{\code {M_LN10}} -\entry{M{\_}PI}{493}{\code {M_PI}} -\entry{M{\_}PI{\_}2}{493}{\code {M_PI_2}} -\entry{M{\_}PI{\_}4}{493}{\code {M_PI_4}} -\entry{M{\_}1{\_}PI}{493}{\code {M_1_PI}} -\entry{M{\_}2{\_}PI}{493}{\code {M_2_PI}} -\entry{M{\_}2{\_}SQRTPI}{493}{\code {M_2_SQRTPI}} -\entry{M{\_}SQRT2}{493}{\code {M_SQRT2}} -\entry{M{\_}SQRT1{\_}2}{493}{\code {M_SQRT1_2}} -\entry{PI}{494}{\code {PI}} -\entry{FP{\_}ILOGB0}{498}{\code {FP_ILOGB0}} -\entry{FP{\_}ILOGBNAN}{498}{\code {FP_ILOGBNAN}} -\entry{signgam}{503}{\code {signgam}} -\entry{RAND{\_}MAX}{512}{\code {RAND_MAX}} -\entry{FP{\_}NAN}{524}{\code {FP_NAN}} -\entry{FP{\_}INFINITE}{525}{\code {FP_INFINITE}} -\entry{FP{\_}ZERO}{525}{\code {FP_ZERO}} -\entry{FP{\_}SUBNORMAL}{525}{\code {FP_SUBNORMAL}} -\entry{FP{\_}NORMAL}{525}{\code {FP_NORMAL}} -\entry{INFINITY}{528}{\code {INFINITY}} -\entry{NAN}{528}{\code {NAN}} -\entry{FE{\_}INEXACT}{529}{\code {FE_INEXACT}} -\entry{FE{\_}DIVBYZERO}{529}{\code {FE_DIVBYZERO}} -\entry{FE{\_}UNDERFLOW}{529}{\code {FE_UNDERFLOW}} -\entry{FE{\_}OVERFLOW}{529}{\code {FE_OVERFLOW}} -\entry{FE{\_}INVALID}{529}{\code {FE_INVALID}} -\entry{HUGE{\_}VAL}{531}{\code {HUGE_VAL}} -\entry{HUGE{\_}VALF}{531}{\code {HUGE_VALF}} -\entry{HUGE{\_}VALL}{531}{\code {HUGE_VALL}} -\entry{FE{\_}TONEAREST}{532}{\code {FE_TONEAREST}} -\entry{FE{\_}UPWARD}{532}{\code {FE_UPWARD}} -\entry{FE{\_}DOWNWARD}{532}{\code {FE_DOWNWARD}} -\entry{FE{\_}TOWARDZERO}{532}{\code {FE_TOWARDZERO}} -\entry{FE{\_}DFL{\_}ENV}{533}{\code {FE_DFL_ENV}} -\entry{FE{\_}NOMASK{\_}ENV}{533}{\code {FE_NOMASK_ENV}} -\entry{FP{\_}FAST{\_}FMA}{542}{\code {FP_FAST_FMA}} -\entry{{\_}Complex{\_}I}{542}{\code {_Complex_I}} -\entry{I}{543}{\code {I}} -\entry{CLOCKS{\_}PER{\_}SEC}{556}{\code {CLOCKS_PER_SEC}} -\entry{CLK{\_}TCK}{556}{\code {CLK_TCK}} -\entry{getdate{\_}err}{576}{\code {getdate_err}} -\entry{tzname}{581}{\code {tzname}} -\entry{timezone}{581}{\code {timezone}} -\entry{daylight}{581}{\code {daylight}} -\entry{ITIMER{\_}REAL}{584}{\code {ITIMER_REAL}} -\entry{ITIMER{\_}VIRTUAL}{584}{\code {ITIMER_VIRTUAL}} -\entry{ITIMER{\_}PROF}{584}{\code {ITIMER_PROF}} -\entry{RLIMIT{\_}CPU}{591}{\code {RLIMIT_CPU}} -\entry{RLIMIT{\_}FSIZE}{591}{\code {RLIMIT_FSIZE}} -\entry{RLIMIT{\_}DATA}{591}{\code {RLIMIT_DATA}} -\entry{RLIMIT{\_}STACK}{591}{\code {RLIMIT_STACK}} -\entry{RLIMIT{\_}CORE}{591}{\code {RLIMIT_CORE}} -\entry{RLIMIT{\_}RSS}{591}{\code {RLIMIT_RSS}} -\entry{RLIMIT{\_}NOFILE}{592}{\code {RLIMIT_NOFILE}} -\entry{RLIMIT{\_}OFILE}{592}{\code {RLIMIT_OFILE}} -\entry{RLIMIT{\_}AS}{592}{\code {RLIMIT_AS}} -\entry{RLIM{\_}NLIMITS}{592}{\code {RLIM_NLIMITS}} -\entry{RLIM{\_}INFINITY}{592}{\code {RLIM_INFINITY}} -\entry{PRIO{\_}MIN}{601}{\code {PRIO_MIN}} -\entry{PRIO{\_}MAX}{601}{\code {PRIO_MAX}} -\entry{PRIO{\_}PROCESS}{601}{\code {PRIO_PROCESS}} -\entry{PRIO{\_}PGRP}{601}{\code {PRIO_PGRP}} -\entry{PRIO{\_}USER}{602}{\code {PRIO_USER}} -\entry{{\_}SC{\_}PAGESIZE}{603}{\code {_SC_PAGESIZE}} -\entry{{\_}SC{\_}PHYS{\_}PAGES}{603}{\code {_SC_PHYS_PAGES}} -\entry{{\_}SC{\_}AVPHYS{\_}PAGES}{603}{\code {_SC_AVPHYS_PAGES}} -\entry{{\_}SC{\_}NPROCESSORS{\_}CONF}{604}{\code {_SC_NPROCESSORS_CONF}} -\entry{{\_}SC{\_}NPROCESSORS{\_}ONLN}{604}{\code {_SC_NPROCESSORS_ONLN}} -\entry{NSIG}{619}{\code {NSIG}} -\entry{COREFILE}{620}{\code {COREFILE}} -\entry{SIGFPE}{620}{\code {SIGFPE}} -\entry{FPE{\_}INTOVF{\_}TRAP}{620}{\code {FPE_INTOVF_TRAP}} -\entry{FPE{\_}INTDIV{\_}TRAP}{620}{\code {FPE_INTDIV_TRAP}} -\entry{FPE{\_}SUBRNG{\_}TRAP}{620}{\code {FPE_SUBRNG_TRAP}} -\entry{FPE{\_}FLTOVF{\_}TRAP}{621}{\code {FPE_FLTOVF_TRAP}} -\entry{FPE{\_}FLTDIV{\_}TRAP}{621}{\code {FPE_FLTDIV_TRAP}} -\entry{FPE{\_}FLTUND{\_}TRAP}{621}{\code {FPE_FLTUND_TRAP}} -\entry{FPE{\_}DECOVF{\_}TRAP}{621}{\code {FPE_DECOVF_TRAP}} -\entry{SIGILL}{621}{\code {SIGILL}} -\entry{SIGSEGV}{621}{\code {SIGSEGV}} -\entry{SIGBUS}{621}{\code {SIGBUS}} -\entry{SIGABRT}{622}{\code {SIGABRT}} -\entry{SIGIOT}{622}{\code {SIGIOT}} -\entry{SIGTRAP}{622}{\code {SIGTRAP}} -\entry{SIGEMT}{622}{\code {SIGEMT}} -\entry{SIGSYS}{622}{\code {SIGSYS}} -\entry{SIGTERM}{622}{\code {SIGTERM}} -\entry{SIGINT}{622}{\code {SIGINT}} -\entry{SIGQUIT}{623}{\code {SIGQUIT}} -\entry{SIGKILL}{623}{\code {SIGKILL}} -\entry{SIGHUP}{623}{\code {SIGHUP}} -\entry{SIGALRM}{623}{\code {SIGALRM}} -\entry{SIGVTALRM}{624}{\code {SIGVTALRM}} -\entry{SIGPROF}{624}{\code {SIGPROF}} -\entry{SIGIO}{624}{\code {SIGIO}} -\entry{SIGURG}{624}{\code {SIGURG}} -\entry{SIGPOLL}{624}{\code {SIGPOLL}} -\entry{SIGCHLD}{624}{\code {SIGCHLD}} -\entry{SIGCLD}{625}{\code {SIGCLD}} -\entry{SIGCONT}{625}{\code {SIGCONT}} -\entry{SIGSTOP}{625}{\code {SIGSTOP}} -\entry{SIGTSTP}{625}{\code {SIGTSTP}} -\entry{SIGTTIN}{625}{\code {SIGTTIN}} -\entry{SIGTTOU}{625}{\code {SIGTTOU}} -\entry{SIGPIPE}{626}{\code {SIGPIPE}} -\entry{SIGLOST}{626}{\code {SIGLOST}} -\entry{SIGXCPU}{626}{\code {SIGXCPU}} -\entry{SIGXFSZ}{627}{\code {SIGXFSZ}} -\entry{SIGUSR1}{627}{\code {SIGUSR1}} -\entry{SIGUSR2}{627}{\code {SIGUSR2}} -\entry{SIGWINCH}{627}{\code {SIGWINCH}} -\entry{SIGINFO}{627}{\code {SIGINFO}} -\entry{sys{\_}siglist}{628}{\code {sys_siglist}} -\entry{SIG{\_}DFL}{629}{\code {SIG_DFL}} -\entry{SIG{\_}IGN}{629}{\code {SIG_IGN}} -\entry{SIG{\_}ERR}{630}{\code {SIG_ERR}} -\entry{SA{\_}NOCLDSTOP}{633}{\code {SA_NOCLDSTOP}} -\entry{SA{\_}ONSTACK}{633}{\code {SA_ONSTACK}} -\entry{SA{\_}RESTART}{634}{\code {SA_RESTART}} -\entry{SIG{\_}BLOCK}{652}{\code {SIG_BLOCK}} -\entry{SIG{\_}UNBLOCK}{652}{\code {SIG_UNBLOCK}} -\entry{SIG{\_}SETMASK}{653}{\code {SIG_SETMASK}} -\entry{SIGSTKSZ}{660}{\code {SIGSTKSZ}} -\entry{MINSIGSTKSZ}{660}{\code {MINSIGSTKSZ}} -\entry{SS{\_}DISABLE}{660}{\code {SS_DISABLE}} -\entry{SS{\_}ONSTACK}{661}{\code {SS_ONSTACK}} -\entry{SV{\_}ONSTACK}{662}{\code {SV_ONSTACK}} -\entry{SV{\_}INTERRUPT}{662}{\code {SV_INTERRUPT}} -\entry{SV{\_}RESETHAND}{663}{\code {SV_RESETHAND}} -\entry{opterr}{667}{\code {opterr}} -\entry{optopt}{667}{\code {optopt}} -\entry{optind}{667}{\code {optind}} -\entry{optarg}{667}{\code {optarg}} -\entry{argp{\_}program{\_}version}{675}{\code {argp_program_version}} -\entry{argp{\_}program{\_}bug{\_}address}{675}{\code {argp_program_bug_address}} -\entry{argp{\_}program{\_}version{\_}hook}{675}{\code {argp_program_version_hook}} -\entry{argp{\_}err{\_}exit{\_}status}{676}{\code {argp_err_exit_status}} -\entry{OPTION{\_}ARG{\_}OPTIONAL}{678}{\code {OPTION_ARG_OPTIONAL}} -\entry{OPTION{\_}HIDDEN}{678}{\code {OPTION_HIDDEN}} -\entry{OPTION{\_}ALIAS}{678}{\code {OPTION_ALIAS}} -\entry{OPTION{\_}DOC}{678}{\code {OPTION_DOC}} -\entry{OPTION{\_}NO{\_}USAGE}{678}{\code {OPTION_NO_USAGE}} -\entry{ARGP{\_}ERR{\_}UNKNOWN}{679}{\code {ARGP_ERR_UNKNOWN}} -\entry{ARGP{\_}KEY{\_}ARG}{680}{\code {ARGP_KEY_ARG}} -\entry{ARGP{\_}KEY{\_}ARGS}{680}{\code {ARGP_KEY_ARGS}} -\entry{ARGP{\_}KEY{\_}END}{680}{\code {ARGP_KEY_END}} -\entry{ARGP{\_}KEY{\_}NO{\_}ARGS}{680}{\code {ARGP_KEY_NO_ARGS}} -\entry{ARGP{\_}KEY{\_}INIT}{681}{\code {ARGP_KEY_INIT}} -\entry{ARGP{\_}KEY{\_}SUCCESS}{681}{\code {ARGP_KEY_SUCCESS}} -\entry{ARGP{\_}KEY{\_}ERROR}{681}{\code {ARGP_KEY_ERROR}} -\entry{ARGP{\_}KEY{\_}FINI}{681}{\code {ARGP_KEY_FINI}} -\entry{ARGP{\_}PARSE{\_}ARGV0}{685}{\code {ARGP_PARSE_ARGV0}} -\entry{ARGP{\_}NO{\_}ERRS}{685}{\code {ARGP_NO_ERRS}} -\entry{ARGP{\_}NO{\_}ARGS}{685}{\code {ARGP_NO_ARGS}} -\entry{ARGP{\_}IN{\_}ORDER}{685}{\code {ARGP_IN_ORDER}} -\entry{ARGP{\_}NO{\_}HELP}{685}{\code {ARGP_NO_HELP}} -\entry{ARGP{\_}NO{\_}EXIT}{686}{\code {ARGP_NO_EXIT}} -\entry{ARGP{\_}LONG{\_}ONLY}{686}{\code {ARGP_LONG_ONLY}} -\entry{ARGP{\_}SILENT}{686}{\code {ARGP_SILENT}} -\entry{ARGP{\_}KEY{\_}HELP{\_}PRE{\_}DOC}{686}{\code {ARGP_KEY_HELP_PRE_DOC}} -\entry{ARGP{\_}KEY{\_}HELP{\_}POST{\_}DOC}{686}{\code {ARGP_KEY_HELP_POST_DOC}} -\entry{ARGP{\_}KEY{\_}HELP{\_}HEADER}{686}{\code {ARGP_KEY_HELP_HEADER}} -\entry{ARGP{\_}KEY{\_}HELP{\_}EXTRA}{686}{\code {ARGP_KEY_HELP_EXTRA}} -\entry{ARGP{\_}KEY{\_}HELP{\_}DUP{\_}ARGS{\_}NOTE}{686}{\code {ARGP_KEY_HELP_DUP_ARGS_NOTE}} -\entry{ARGP{\_}KEY{\_}HELP{\_}ARGS{\_}DOC}{687}{\code {ARGP_KEY_HELP_ARGS_DOC}} -\entry{ARGP{\_}HELP{\_}USAGE}{687}{\code {ARGP_HELP_USAGE}} -\entry{ARGP{\_}HELP{\_}SHORT{\_}USAGE}{687}{\code {ARGP_HELP_SHORT_USAGE}} -\entry{ARGP{\_}HELP{\_}SEE}{687}{\code {ARGP_HELP_SEE}} -\entry{ARGP{\_}HELP{\_}LONG}{687}{\code {ARGP_HELP_LONG}} -\entry{ARGP{\_}HELP{\_}PRE{\_}DOC}{687}{\code {ARGP_HELP_PRE_DOC}} -\entry{ARGP{\_}HELP{\_}POST{\_}DOC}{687}{\code {ARGP_HELP_POST_DOC}} -\entry{ARGP{\_}HELP{\_}DOC}{688}{\code {ARGP_HELP_DOC}} -\entry{ARGP{\_}HELP{\_}BUG{\_}ADDR}{688}{\code {ARGP_HELP_BUG_ADDR}} -\entry{ARGP{\_}HELP{\_}LONG{\_}ONLY}{688}{\code {ARGP_HELP_LONG_ONLY}} -\entry{ARGP{\_}HELP{\_}EXIT{\_}ERR}{688}{\code {ARGP_HELP_EXIT_ERR}} -\entry{ARGP{\_}HELP{\_}EXIT{\_}OK}{688}{\code {ARGP_HELP_EXIT_OK}} -\entry{ARGP{\_}HELP{\_}STD{\_}ERR}{688}{\code {ARGP_HELP_STD_ERR}} -\entry{ARGP{\_}HELP{\_}STD{\_}USAGE}{688}{\code {ARGP_HELP_STD_USAGE}} -\entry{ARGP{\_}HELP{\_}STD{\_}HELP}{688}{\code {ARGP_HELP_STD_HELP}} -\entry{environ}{702}{\code {environ}} -\entry{EXIT{\_}SUCCESS}{707}{\code {EXIT_SUCCESS}} -\entry{EXIT{\_}FAILURE}{707}{\code {EXIT_FAILURE}} -\entry{L{\_}ctermid}{738}{\code {L_ctermid}} -\entry{aliases}{743}{\code {aliases}} -\entry{ethers}{743}{\code {ethers}} -\entry{group}{743}{\code {group}} -\entry{hosts}{743}{\code {hosts}} -\entry{netgroup}{743}{\code {netgroup}} -\entry{networks}{743}{\code {networks}} -\entry{protocols}{743}{\code {protocols}} -\entry{passwd}{743}{\code {passwd}} -\entry{rpc}{743}{\code {rpc}} -\entry{services}{743}{\code {services}} -\entry{shadow}{744}{\code {shadow}} -\entry{NSS{\_}STATUS{\_}TRYAGAIN}{748}{\code {NSS_STATUS_TRYAGAIN}} -\entry{NSS{\_}STATUS{\_}UNAVAIL}{748}{\code {NSS_STATUS_UNAVAIL}} -\entry{NSS{\_}STATUS{\_}NOTFOUND}{748}{\code {NSS_STATUS_NOTFOUND}} -\entry{NSS{\_}STATUS{\_}SUCCESS}{748}{\code {NSS_STATUS_SUCCESS}} -\entry{L{\_}cuserid}{763}{\code {L_cuserid}} -\entry{EMPTY}{765}{\code {EMPTY}} -\entry{RUN{\_}LVL}{765}{\code {RUN_LVL}} -\entry{BOOT{\_}TIME}{765}{\code {BOOT_TIME}} -\entry{OLD{\_}TIME}{765}{\code {OLD_TIME}} -\entry{NEW{\_}TIME}{765}{\code {NEW_TIME}} -\entry{INIT{\_}PROCESS}{765}{\code {INIT_PROCESS}} -\entry{LOGIN{\_}PROCESS}{765}{\code {LOGIN_PROCESS}} -\entry{USER{\_}PROCESS}{765}{\code {USER_PROCESS}} -\entry{DEAD{\_}PROCESS}{765}{\code {DEAD_PROCESS}} -\entry{ACCOUNTING}{765}{\code {ACCOUNTING}} -\entry{{\_}PATH{\_}UTMP}{768}{\code {_PATH_UTMP}} -\entry{{\_}PATH{\_}WTMP}{768}{\code {_PATH_WTMP}} -\entry{EMPTY}{769}{\code {EMPTY}} -\entry{RUN{\_}LVL}{769}{\code {RUN_LVL}} -\entry{BOOT{\_}TIME}{769}{\code {BOOT_TIME}} -\entry{OLD{\_}TIME}{769}{\code {OLD_TIME}} -\entry{NEW{\_}TIME}{769}{\code {NEW_TIME}} -\entry{INIT{\_}PROCESS}{769}{\code {INIT_PROCESS}} -\entry{LOGIN{\_}PROCESS}{769}{\code {LOGIN_PROCESS}} -\entry{USER{\_}PROCESS}{769}{\code {USER_PROCESS}} -\entry{DEAD{\_}PROCESS}{769}{\code {DEAD_PROCESS}} -\entry{{\_}PATH{\_}FSTAB}{785}{\code {_PATH_FSTAB}} -\entry{{\_}PATH{\_}MNTTAB}{785}{\code {_PATH_MNTTAB}} -\entry{FSTAB}{785}{\code {FSTAB}} -\entry{{\_}PATH{\_}MOUNTED}{785}{\code {_PATH_MOUNTED}} -\entry{FSTAB{\_}RW}{786}{\code {FSTAB_RW}} -\entry{FSTAB{\_}RQ}{786}{\code {FSTAB_RQ}} -\entry{FSTAB{\_}RO}{786}{\code {FSTAB_RO}} -\entry{FSTAB{\_}SW}{786}{\code {FSTAB_SW}} -\entry{FSTAB{\_}XX}{786}{\code {FSTAB_XX}} -\entry{MNTTYPE{\_}IGNORE}{788}{\code {MNTTYPE_IGNORE}} -\entry{MNTTYPE{\_}NFS}{788}{\code {MNTTYPE_NFS}} -\entry{MNTTYPE{\_}SWAP}{788}{\code {MNTTYPE_SWAP}} -\entry{MNTOPT{\_}DEFAULTS}{788}{\code {MNTOPT_DEFAULTS}} -\entry{MNTOPT{\_}RO}{788}{\code {MNTOPT_RO}} -\entry{MNTOPT{\_}RW}{788}{\code {MNTOPT_RW}} -\entry{MNTOPT{\_}SUID}{788}{\code {MNTOPT_SUID}} -\entry{MNTOPT{\_}NOSUID}{789}{\code {MNTOPT_NOSUID}} -\entry{MNTOPT{\_}NOAUTO}{789}{\code {MNTOPT_NOAUTO}} -\entry{ARG{\_}MAX}{797}{\code {ARG_MAX}} -\entry{CHILD{\_}MAX}{797}{\code {CHILD_MAX}} -\entry{OPEN{\_}MAX}{797}{\code {OPEN_MAX}} -\entry{STREAM{\_}MAX}{797}{\code {STREAM_MAX}} -\entry{TZNAME{\_}MAX}{797}{\code {TZNAME_MAX}} -\entry{NGROUPS{\_}MAX}{798}{\code {NGROUPS_MAX}} -\entry{SSIZE{\_}MAX}{798}{\code {SSIZE_MAX}} -\entry{RE{\_}DUP{\_}MAX}{798}{\code {RE_DUP_MAX}} -\entry{{\_}POSIX{\_}JOB{\_}CONTROL}{798}{\code {_POSIX_JOB_CONTROL}} -\entry{{\_}POSIX{\_}SAVED{\_}IDS}{798}{\code {_POSIX_SAVED_IDS}} -\entry{{\_}POSIX2{\_}C{\_}DEV}{799}{\code {_POSIX2_C_DEV}} -\entry{{\_}POSIX2{\_}FORT{\_}DEV}{799}{\code {_POSIX2_FORT_DEV}} -\entry{{\_}POSIX2{\_}FORT{\_}RUN}{799}{\code {_POSIX2_FORT_RUN}} -\entry{{\_}POSIX2{\_}LOCALEDEF}{799}{\code {_POSIX2_LOCALEDEF}} -\entry{{\_}POSIX2{\_}SW{\_}DEV}{799}{\code {_POSIX2_SW_DEV}} -\entry{{\_}POSIX{\_}VERSION}{799}{\code {_POSIX_VERSION}} -\entry{{\_}POSIX2{\_}C{\_}VERSION}{800}{\code {_POSIX2_C_VERSION}} -\entry{{\_}SC{\_}ARG{\_}MAX}{800}{\code {_SC_ARG_MAX}} -\entry{{\_}SC{\_}CHILD{\_}MAX}{800}{\code {_SC_CHILD_MAX}} -\entry{{\_}SC{\_}OPEN{\_}MAX}{800}{\code {_SC_OPEN_MAX}} -\entry{{\_}SC{\_}STREAM{\_}MAX}{801}{\code {_SC_STREAM_MAX}} -\entry{{\_}SC{\_}TZNAME{\_}MAX}{801}{\code {_SC_TZNAME_MAX}} -\entry{{\_}SC{\_}NGROUPS{\_}MAX}{801}{\code {_SC_NGROUPS_MAX}} -\entry{{\_}SC{\_}JOB{\_}CONTROL}{801}{\code {_SC_JOB_CONTROL}} -\entry{{\_}SC{\_}SAVED{\_}IDS}{801}{\code {_SC_SAVED_IDS}} -\entry{{\_}SC{\_}VERSION}{801}{\code {_SC_VERSION}} -\entry{{\_}SC{\_}CLK{\_}TCK}{801}{\code {_SC_CLK_TCK}} -\entry{{\_}SC{\_}CHARCLASS{\_}NAME{\_}MAX}{801}{\code {_SC_CHARCLASS_NAME_MAX}} -\entry{{\_}SC{\_}REALTIME{\_}SIGNALS}{801}{\code {_SC_REALTIME_SIGNALS}} -\entry{{\_}SC{\_}PRIORITY{\_}SCHEDULING}{801}{\code {_SC_PRIORITY_SCHEDULING}} -\entry{{\_}SC{\_}TIMERS}{801}{\code {_SC_TIMERS}} -\entry{{\_}SC{\_}ASYNCHRONOUS{\_}IO}{801}{\code {_SC_ASYNCHRONOUS_IO}} -\entry{{\_}SC{\_}PRIORITIZED{\_}IO}{801}{\code {_SC_PRIORITIZED_IO}} -\entry{{\_}SC{\_}SYNCHRONIZED{\_}IO}{801}{\code {_SC_SYNCHRONIZED_IO}} -\entry{{\_}SC{\_}FSYNC}{801}{\code {_SC_FSYNC}} -\entry{{\_}SC{\_}MAPPED{\_}FILES}{801}{\code {_SC_MAPPED_FILES}} -\entry{{\_}SC{\_}MEMLOCK}{801}{\code {_SC_MEMLOCK}} -\entry{{\_}SC{\_}MEMLOCK{\_}RANGE}{802}{\code {_SC_MEMLOCK_RANGE}} -\entry{{\_}SC{\_}MEMORY{\_}PROTECTION}{802}{\code {_SC_MEMORY_PROTECTION}} -\entry{{\_}SC{\_}MESSAGE{\_}PASSING}{802}{\code {_SC_MESSAGE_PASSING}} -\entry{{\_}SC{\_}SEMAPHORES}{802}{\code {_SC_SEMAPHORES}} -\entry{{\_}SC{\_}SHARED{\_}MEMORY{\_}OBJECTS}{802}{\code {_SC_SHARED_MEMORY_OBJECTS}} -\entry{{\_}SC{\_}AIO{\_}LISTIO{\_}MAX}{802}{\code {_SC_AIO_LISTIO_MAX}} -\entry{{\_}SC{\_}AIO{\_}MAX}{802}{\code {_SC_AIO_MAX}} -\entry{{\_}SC{\_}AIO{\_}PRIO{\_}DELTA{\_}MAX}{802}{\code {_SC_AIO_PRIO_DELTA_MAX}} -\entry{{\_}SC{\_}DELAYTIMER{\_}MAX}{802}{\code {_SC_DELAYTIMER_MAX}} -\entry{{\_}SC{\_}MQ{\_}OPEN{\_}MAX}{802}{\code {_SC_MQ_OPEN_MAX}} -\entry{{\_}SC{\_}MQ{\_}PRIO{\_}MAX}{802}{\code {_SC_MQ_PRIO_MAX}} -\entry{{\_}SC{\_}RTSIG{\_}MAX}{802}{\code {_SC_RTSIG_MAX}} -\entry{{\_}SC{\_}SEM{\_}NSEMS{\_}MAX}{802}{\code {_SC_SEM_NSEMS_MAX}} -\entry{{\_}SC{\_}SEM{\_}VALUE{\_}MAX}{802}{\code {_SC_SEM_VALUE_MAX}} -\entry{{\_}SC{\_}SIGQUEUE{\_}MAX}{802}{\code {_SC_SIGQUEUE_MAX}} -\entry{{\_}SC{\_}TIMER{\_}MAX}{802}{\code {_SC_TIMER_MAX}} -\entry{{\_}SC{\_}PII}{802}{\code {_SC_PII}} -\entry{{\_}SC{\_}PII{\_}XTI}{803}{\code {_SC_PII_XTI}} -\entry{{\_}SC{\_}PII{\_}SOCKET}{803}{\code {_SC_PII_SOCKET}} -\entry{{\_}SC{\_}PII{\_}INTERNET}{803}{\code {_SC_PII_INTERNET}} -\entry{{\_}SC{\_}PII{\_}OSI}{803}{\code {_SC_PII_OSI}} -\entry{{\_}SC{\_}SELECT}{803}{\code {_SC_SELECT}} -\entry{{\_}SC{\_}UIO{\_}MAXIOV}{803}{\code {_SC_UIO_MAXIOV}} -\entry{{\_}SC{\_}PII{\_}INTERNET{\_}STREAM}{803}{\code {_SC_PII_INTERNET_STREAM}} -\entry{{\_}SC{\_}PII{\_}INTERNET{\_}DGRAM}{803}{\code {_SC_PII_INTERNET_DGRAM}} -\entry{{\_}SC{\_}PII{\_}OSI{\_}COTS}{803}{\code {_SC_PII_OSI_COTS}} -\entry{{\_}SC{\_}PII{\_}OSI{\_}CLTS}{803}{\code {_SC_PII_OSI_CLTS}} -\entry{{\_}SC{\_}PII{\_}OSI{\_}M}{803}{\code {_SC_PII_OSI_M}} -\entry{{\_}SC{\_}T{\_}IOV{\_}MAX}{803}{\code {_SC_T_IOV_MAX}} -\entry{{\_}SC{\_}THREADS}{803}{\code {_SC_THREADS}} -\entry{{\_}SC{\_}THREAD{\_}SAFE{\_}FUNCTIONS}{803}{\code {_SC_THREAD_SAFE_FUNCTIONS}} -\entry{{\_}SC{\_}GETGR{\_}R{\_}SIZE{\_}MAX}{803}{\code {_SC_GETGR_R_SIZE_MAX}} -\entry{{\_}SC{\_}GETPW{\_}R{\_}SIZE{\_}MAX}{803}{\code {_SC_GETPW_R_SIZE_MAX}} -\entry{{\_}SC{\_}LOGIN{\_}NAME{\_}MAX}{803}{\code {_SC_LOGIN_NAME_MAX}} -\entry{{\_}SC{\_}TTY{\_}NAME{\_}MAX}{804}{\code {_SC_TTY_NAME_MAX}} -\entry{{\_}SC{\_}THREAD{\_}DESTRUCTOR{\_}ITERATIONS}{804}{\code {_SC_THREAD_DESTRUCTOR_ITERATIONS}} -\entry{{\_}SC{\_}THREAD{\_}KEYS{\_}MAX}{804}{\code {_SC_THREAD_KEYS_MAX}} -\entry{{\_}SC{\_}THREAD{\_}STACK{\_}MIN}{804}{\code {_SC_THREAD_STACK_MIN}} -\entry{{\_}SC{\_}THREAD{\_}THREADS{\_}MAX}{804}{\code {_SC_THREAD_THREADS_MAX}} -\entry{{\_}SC{\_}THREAD{\_}ATTR{\_}STACKADDR}{804}{\code {_SC_THREAD_ATTR_STACKADDR}} -\entry{{\_}SC{\_}THREAD{\_}ATTR{\_}STACKSIZE}{804}{\code {_SC_THREAD_ATTR_STACKSIZE}} -\entry{{\_}SC{\_}THREAD{\_}PRIORITY{\_}SCHEDULING}{804}{\code {_SC_THREAD_PRIORITY_SCHEDULING}} -\entry{{\_}SC{\_}THREAD{\_}PRIO{\_}INHERIT}{804}{\code {_SC_THREAD_PRIO_INHERIT}} -\entry{{\_}SC{\_}THREAD{\_}PRIO{\_}PROTECT}{804}{\code {_SC_THREAD_PRIO_PROTECT}} -\entry{{\_}SC{\_}THREAD{\_}PROCESS{\_}SHARED}{804}{\code {_SC_THREAD_PROCESS_SHARED}} -\entry{{\_}SC{\_}2{\_}C{\_}DEV}{804}{\code {_SC_2_C_DEV}} -\entry{{\_}SC{\_}2{\_}FORT{\_}DEV}{804}{\code {_SC_2_FORT_DEV}} -\entry{{\_}SC{\_}2{\_}FORT{\_}RUN}{804}{\code {_SC_2_FORT_RUN}} -\entry{{\_}SC{\_}2{\_}LOCALEDEF}{804}{\code {_SC_2_LOCALEDEF}} -\entry{{\_}SC{\_}2{\_}SW{\_}DEV}{805}{\code {_SC_2_SW_DEV}} -\entry{{\_}SC{\_}BC{\_}BASE{\_}MAX}{805}{\code {_SC_BC_BASE_MAX}} -\entry{{\_}SC{\_}BC{\_}DIM{\_}MAX}{805}{\code {_SC_BC_DIM_MAX}} -\entry{{\_}SC{\_}BC{\_}SCALE{\_}MAX}{805}{\code {_SC_BC_SCALE_MAX}} -\entry{{\_}SC{\_}BC{\_}STRING{\_}MAX}{805}{\code {_SC_BC_STRING_MAX}} -\entry{{\_}SC{\_}COLL{\_}WEIGHTS{\_}MAX}{805}{\code {_SC_COLL_WEIGHTS_MAX}} -\entry{{\_}SC{\_}EXPR{\_}NEST{\_}MAX}{805}{\code {_SC_EXPR_NEST_MAX}} -\entry{{\_}SC{\_}LINE{\_}MAX}{805}{\code {_SC_LINE_MAX}} -\entry{{\_}SC{\_}EQUIV{\_}CLASS{\_}MAX}{805}{\code {_SC_EQUIV_CLASS_MAX}} -\entry{{\_}SC{\_}VERSION}{805}{\code {_SC_VERSION}} -\entry{{\_}SC{\_}2{\_}VERSION}{805}{\code {_SC_2_VERSION}} -\entry{{\_}SC{\_}PAGESIZE}{805}{\code {_SC_PAGESIZE}} -\entry{{\_}SC{\_}NPROCESSORS{\_}CONF}{805}{\code {_SC_NPROCESSORS_CONF}} -\entry{{\_}SC{\_}NPROCESSORS{\_}ONLN}{805}{\code {_SC_NPROCESSORS_ONLN}} -\entry{{\_}SC{\_}PHYS{\_}PAGES}{806}{\code {_SC_PHYS_PAGES}} -\entry{{\_}SC{\_}AVPHYS{\_}PAGES}{806}{\code {_SC_AVPHYS_PAGES}} -\entry{{\_}SC{\_}ATEXIT{\_}MAX}{806}{\code {_SC_ATEXIT_MAX}} -\entry{{\_}SC{\_}XOPEN{\_}VERSION}{806}{\code {_SC_XOPEN_VERSION}} -\entry{{\_}SC{\_}XOPEN{\_}XCU{\_}VERSION}{806}{\code {_SC_XOPEN_XCU_VERSION}} -\entry{{\_}SC{\_}XOPEN{\_}UNIX}{806}{\code {_SC_XOPEN_UNIX}} -\entry{{\_}SC{\_}XOPEN{\_}REALTIME}{806}{\code {_SC_XOPEN_REALTIME}} -\entry{{\_}SC{\_}XOPEN{\_}REALTIME{\_}THREADS}{806}{\code {_SC_XOPEN_REALTIME_THREADS}} -\entry{{\_}SC{\_}XOPEN{\_}LEGACY}{806}{\code {_SC_XOPEN_LEGACY}} -\entry{{\_}SC{\_}XOPEN{\_}CRYPT}{806}{\code {_SC_XOPEN_CRYPT}} -\entry{{\_}SC{\_}XOPEN{\_}ENH{\_}I18N}{806}{\code {_SC_XOPEN_ENH_I18N}} -\entry{{\_}SC{\_}XOPEN{\_}SHM}{806}{\code {_SC_XOPEN_SHM}} -\entry{{\_}SC{\_}XOPEN{\_}XPG2}{806}{\code {_SC_XOPEN_XPG2}} -\entry{{\_}SC{\_}XOPEN{\_}XPG3}{806}{\code {_SC_XOPEN_XPG3}} -\entry{{\_}SC{\_}XOPEN{\_}XPG4}{806}{\code {_SC_XOPEN_XPG4}} -\entry{{\_}SC{\_}CHAR{\_}BIT}{806}{\code {_SC_CHAR_BIT}} -\entry{{\_}SC{\_}CHAR{\_}MAX}{806}{\code {_SC_CHAR_MAX}} -\entry{{\_}SC{\_}CHAR{\_}MIN}{807}{\code {_SC_CHAR_MIN}} -\entry{{\_}SC{\_}INT{\_}MAX}{807}{\code {_SC_INT_MAX}} -\entry{{\_}SC{\_}INT{\_}MIN}{807}{\code {_SC_INT_MIN}} -\entry{{\_}SC{\_}LONG{\_}BIT}{807}{\code {_SC_LONG_BIT}} -\entry{{\_}SC{\_}WORD{\_}BIT}{807}{\code {_SC_WORD_BIT}} -\entry{{\_}SC{\_}MB{\_}LEN{\_}MAX}{807}{\code {_SC_MB_LEN_MAX}} -\entry{{\_}SC{\_}NZERO}{807}{\code {_SC_NZERO}} -\entry{SC{\_}SSIZE{\_}MAX}{807}{\code {SC_SSIZE_MAX}} -\entry{{\_}SC{\_}SCHAR{\_}MAX}{807}{\code {_SC_SCHAR_MAX}} -\entry{{\_}SC{\_}SCHAR{\_}MIN}{807}{\code {_SC_SCHAR_MIN}} -\entry{{\_}SC{\_}SHRT{\_}MAX}{807}{\code {_SC_SHRT_MAX}} -\entry{{\_}SC{\_}SHRT{\_}MIN}{807}{\code {_SC_SHRT_MIN}} -\entry{{\_}SC{\_}UCHAR{\_}MAX}{807}{\code {_SC_UCHAR_MAX}} -\entry{{\_}SC{\_}UINT{\_}MAX}{807}{\code {_SC_UINT_MAX}} -\entry{{\_}SC{\_}ULONG{\_}MAX}{808}{\code {_SC_ULONG_MAX}} -\entry{{\_}SC{\_}USHRT{\_}MAX}{808}{\code {_SC_USHRT_MAX}} -\entry{{\_}SC{\_}NL{\_}ARGMAX}{808}{\code {_SC_NL_ARGMAX}} -\entry{{\_}SC{\_}NL{\_}LANGMAX}{808}{\code {_SC_NL_LANGMAX}} -\entry{{\_}SC{\_}NL{\_}MSGMAX}{808}{\code {_SC_NL_MSGMAX}} -\entry{{\_}SC{\_}NL{\_}NMAX}{808}{\code {_SC_NL_NMAX}} -\entry{{\_}SC{\_}NL{\_}SETMAX}{808}{\code {_SC_NL_SETMAX}} -\entry{{\_}SC{\_}NL{\_}TEXTMAX}{808}{\code {_SC_NL_TEXTMAX}} -\entry{LINK{\_}MAX}{810}{\code {LINK_MAX}} -\entry{MAX{\_}CANON}{810}{\code {MAX_CANON}} -\entry{MAX{\_}INPUT}{810}{\code {MAX_INPUT}} -\entry{NAME{\_}MAX}{810}{\code {NAME_MAX}} -\entry{PATH{\_}MAX}{811}{\code {PATH_MAX}} -\entry{PIPE{\_}BUF}{811}{\code {PIPE_BUF}} -\entry{MAXNAMLEN}{811}{\code {MAXNAMLEN}} -\entry{FILENAME{\_}MAX}{811}{\code {FILENAME_MAX}} -\entry{{\_}POSIX{\_}CHOWN{\_}RESTRICTED}{811}{\code {_POSIX_CHOWN_RESTRICTED}} -\entry{{\_}POSIX{\_}NO{\_}TRUNC}{812}{\code {_POSIX_NO_TRUNC}} -\entry{{\_}POSIX{\_}VDISABLE}{812}{\code {_POSIX_VDISABLE}} -\entry{BC{\_}BASE{\_}MAX}{815}{\code {BC_BASE_MAX}} -\entry{BC{\_}DIM{\_}MAX}{815}{\code {BC_DIM_MAX}} -\entry{BC{\_}SCALE{\_}MAX}{815}{\code {BC_SCALE_MAX}} -\entry{BC{\_}STRING{\_}MAX}{815}{\code {BC_STRING_MAX}} -\entry{COLL{\_}WEIGHTS{\_}MAX}{815}{\code {COLL_WEIGHTS_MAX}} -\entry{EXPR{\_}NEST{\_}MAX}{815}{\code {EXPR_NEST_MAX}} -\entry{LINE{\_}MAX}{815}{\code {LINE_MAX}} -\entry{EQUIV{\_}CLASS{\_}MAX}{815}{\code {EQUIV_CLASS_MAX}} -\entry{DES{\_}ENCRYPT}{824}{\code {DES_ENCRYPT}} -\entry{DES{\_}DECRYPT}{824}{\code {DES_DECRYPT}} -\entry{DES{\_}HW}{824}{\code {DES_HW}} -\entry{DES{\_}SW}{824}{\code {DES_SW}} -\entry{DESERR{\_}NONE}{824}{\code {DESERR_NONE}} -\entry{DESERR{\_}NOHWDEVICE}{824}{\code {DESERR_NOHWDEVICE}} -\entry{DESERR{\_}HWERROR}{824}{\code {DESERR_HWERROR}} -\entry{DESERR{\_}BADPARAM}{824}{\code {DESERR_BADPARAM}} -\entry{SEM{\_}VALUE{\_}MAX}{844}{\code {SEM_VALUE_MAX}} -\entry{NDEBUG}{853}{\code {NDEBUG}} -\entry{NULL}{860}{\code {NULL}} -\entry{SCHAR{\_}MIN}{862}{\code {SCHAR_MIN}} -\entry{SCHAR{\_}MAX}{862}{\code {SCHAR_MAX}} -\entry{UCHAR{\_}MAX}{862}{\code {UCHAR_MAX}} -\entry{CHAR{\_}MIN}{862}{\code {CHAR_MIN}} -\entry{CHAR{\_}MAX}{863}{\code {CHAR_MAX}} -\entry{SHRT{\_}MIN}{863}{\code {SHRT_MIN}} -\entry{SHRT{\_}MAX}{863}{\code {SHRT_MAX}} -\entry{USHRT{\_}MAX}{863}{\code {USHRT_MAX}} -\entry{INT{\_}MIN}{863}{\code {INT_MIN}} -\entry{INT{\_}MAX}{863}{\code {INT_MAX}} -\entry{UINT{\_}MAX}{863}{\code {UINT_MAX}} -\entry{LONG{\_}MIN}{863}{\code {LONG_MIN}} -\entry{LONG{\_}MAX}{863}{\code {LONG_MAX}} -\entry{ULONG{\_}MAX}{863}{\code {ULONG_MAX}} -\entry{LONG{\_}LONG{\_}MIN}{863}{\code {LONG_LONG_MIN}} -\entry{LONG{\_}LONG{\_}MAX}{863}{\code {LONG_LONG_MAX}} -\entry{ULONG{\_}LONG{\_}MAX}{863}{\code {ULONG_LONG_MAX}} -\entry{WCHAR{\_}MAX}{863}{\code {WCHAR_MAX}} -\entry{FLT{\_}ROUNDS}{865}{\code {FLT_ROUNDS}} -\entry{FLT{\_}RADIX}{866}{\code {FLT_RADIX}} -\entry{FLT{\_}MANT{\_}DIG}{866}{\code {FLT_MANT_DIG}} -\entry{DBL{\_}MANT{\_}DIG}{866}{\code {DBL_MANT_DIG}} -\entry{LDBL{\_}MANT{\_}DIG}{866}{\code {LDBL_MANT_DIG}} -\entry{FLT{\_}DIG}{866}{\code {FLT_DIG}} -\entry{DBL{\_}DIG}{866}{\code {DBL_DIG}} -\entry{LDBL{\_}DIG}{866}{\code {LDBL_DIG}} -\entry{FLT{\_}MIN{\_}EXP}{866}{\code {FLT_MIN_EXP}} -\entry{DBL{\_}MIN{\_}EXP}{867}{\code {DBL_MIN_EXP}} -\entry{LDBL{\_}MIN{\_}EXP}{867}{\code {LDBL_MIN_EXP}} -\entry{FLT{\_}MIN{\_}10{\_}EXP}{867}{\code {FLT_MIN_10_EXP}} -\entry{DBL{\_}MIN{\_}10{\_}EXP}{867}{\code {DBL_MIN_10_EXP}} -\entry{LDBL{\_}MIN{\_}10{\_}EXP}{867}{\code {LDBL_MIN_10_EXP}} -\entry{FLT{\_}MAX{\_}EXP}{867}{\code {FLT_MAX_EXP}} -\entry{DBL{\_}MAX{\_}EXP}{867}{\code {DBL_MAX_EXP}} -\entry{LDBL{\_}MAX{\_}EXP}{867}{\code {LDBL_MAX_EXP}} -\entry{FLT{\_}MAX{\_}10{\_}EXP}{867}{\code {FLT_MAX_10_EXP}} -\entry{DBL{\_}MAX{\_}10{\_}EXP}{867}{\code {DBL_MAX_10_EXP}} -\entry{LDBL{\_}MAX{\_}10{\_}EXP}{867}{\code {LDBL_MAX_10_EXP}} -\entry{FLT{\_}MAX}{867}{\code {FLT_MAX}} -\entry{DBL{\_}MAX}{867}{\code {DBL_MAX}} -\entry{LDBL{\_}MAX}{867}{\code {LDBL_MAX}} -\entry{FLT{\_}MIN}{867}{\code {FLT_MIN}} -\entry{DBL{\_}MIN}{868}{\code {DBL_MIN}} -\entry{LDBL{\_}MIN}{868}{\code {LDBL_MIN}} -\entry{FLT{\_}EPSILON}{868}{\code {FLT_EPSILON}} -\entry{DBL{\_}EPSILON}{868}{\code {DBL_EPSILON}} -\entry{LDBL{\_}EPSILON}{868}{\code {LDBL_EPSILON}} +\entry{error{\_}print{\_}progname}{30}{\code {error_print_progname}} +\entry{error{\_}message{\_}count}{30}{\code {error_message_count}} +\entry{error{\_}one{\_}per{\_}line}{30}{\code {error_one_per_line}} +\entry{{\_}{\_}malloc{\_}hook}{43}{\code {__malloc_hook}} +\entry{{\_}{\_}realloc{\_}hook}{43}{\code {__realloc_hook}} +\entry{{\_}{\_}free{\_}hook}{44}{\code {__free_hook}} +\entry{{\_}{\_}memalign{\_}hook}{44}{\code {__memalign_hook}} +\entry{{\_}{\_}malloc{\_}initialize{\_}hook}{44}{\code {__malloc_initialize_hook}} +\entry{obstack{\_}alloc{\_}failed{\_}handler}{53}{\code {obstack_alloc_failed_handler}} +\entry{WCHAR{\_}MIN}{120}{\code {WCHAR_MIN}} +\entry{WCHAR{\_}MAX}{120}{\code {WCHAR_MAX}} +\entry{WEOF}{121}{\code {WEOF}} +\entry{MB{\_}LEN{\_}MAX}{124}{\code {MB_LEN_MAX}} +\entry{MB{\_}CUR{\_}MAX}{124}{\code {MB_CUR_MAX}} +\entry{(*{\_}{\_}gconv{\_}init{\_}fct)}{154}{\code {(*__gconv_init_fct)}} +\entry{(*{\_}{\_}gconv{\_}end{\_}fct)}{157}{\code {(*__gconv_end_fct)}} +\entry{(*{\_}{\_}gconv{\_}fct)}{157}{\code {(*__gconv_fct)}} +\entry{LC{\_}COLLATE}{164}{\code {LC_COLLATE}} +\entry{LC{\_}CTYPE}{164}{\code {LC_CTYPE}} +\entry{LC{\_}MONETARY}{164}{\code {LC_MONETARY}} +\entry{LC{\_}NUMERIC}{164}{\code {LC_NUMERIC}} +\entry{LC{\_}TIME}{164}{\code {LC_TIME}} +\entry{LC{\_}MESSAGES}{164}{\code {LC_MESSAGES}} +\entry{LC{\_}ALL}{165}{\code {LC_ALL}} +\entry{LANG}{165}{\code {LANG}} +\entry{LANGUAGE}{165}{\code {LANGUAGE}} +\entry{CODESET}{172}{\code {CODESET}} +\entry{ABDAY{\_}1}{172}{\code {ABDAY_1}} +\entry{ABDAY{\_}2}{172}{\code {ABDAY_2}} +\entry{ABDAY{\_}3}{172}{\code {ABDAY_3}} +\entry{ABDAY{\_}4}{172}{\code {ABDAY_4}} +\entry{ABDAY{\_}5}{172}{\code {ABDAY_5}} +\entry{ABDAY{\_}6}{172}{\code {ABDAY_6}} +\entry{ABDAY{\_}7}{172}{\code {ABDAY_7}} +\entry{DAY{\_}1}{172}{\code {DAY_1}} +\entry{DAY{\_}2}{172}{\code {DAY_2}} +\entry{DAY{\_}3}{172}{\code {DAY_3}} +\entry{DAY{\_}4}{172}{\code {DAY_4}} +\entry{DAY{\_}5}{172}{\code {DAY_5}} +\entry{DAY{\_}6}{172}{\code {DAY_6}} +\entry{DAY{\_}7}{172}{\code {DAY_7}} +\entry{ABMON{\_}1}{172}{\code {ABMON_1}} +\entry{ABMON{\_}2}{172}{\code {ABMON_2}} +\entry{ABMON{\_}3}{172}{\code {ABMON_3}} +\entry{ABMON{\_}4}{172}{\code {ABMON_4}} +\entry{ABMON{\_}5}{172}{\code {ABMON_5}} +\entry{ABMON{\_}6}{172}{\code {ABMON_6}} +\entry{ABMON{\_}7}{172}{\code {ABMON_7}} +\entry{ABMON{\_}8}{172}{\code {ABMON_8}} +\entry{ABMON{\_}9}{172}{\code {ABMON_9}} +\entry{ABMON{\_}10}{172}{\code {ABMON_10}} +\entry{ABMON{\_}11}{172}{\code {ABMON_11}} +\entry{ABMON{\_}12}{172}{\code {ABMON_12}} +\entry{MON{\_}1}{172}{\code {MON_1}} +\entry{MON{\_}2}{173}{\code {MON_2}} +\entry{MON{\_}3}{173}{\code {MON_3}} +\entry{MON{\_}4}{173}{\code {MON_4}} +\entry{MON{\_}5}{173}{\code {MON_5}} +\entry{MON{\_}6}{173}{\code {MON_6}} +\entry{MON{\_}7}{173}{\code {MON_7}} +\entry{MON{\_}8}{173}{\code {MON_8}} +\entry{MON{\_}9}{173}{\code {MON_9}} +\entry{MON{\_}10}{173}{\code {MON_10}} +\entry{MON{\_}11}{173}{\code {MON_11}} +\entry{MON{\_}12}{173}{\code {MON_12}} +\entry{AM{\_}STR}{173}{\code {AM_STR}} +\entry{PM{\_}STR}{173}{\code {PM_STR}} +\entry{D{\_}T{\_}FMT}{173}{\code {D_T_FMT}} +\entry{D{\_}FMT}{173}{\code {D_FMT}} +\entry{T{\_}FMT}{173}{\code {T_FMT}} +\entry{T{\_}FMT{\_}AMPM}{173}{\code {T_FMT_AMPM}} +\entry{ERA}{173}{\code {ERA}} +\entry{ERA{\_}YEAR}{173}{\code {ERA_YEAR}} +\entry{ERA{\_}D{\_}T{\_}FMT}{174}{\code {ERA_D_T_FMT}} +\entry{ERA{\_}D{\_}FMT}{174}{\code {ERA_D_FMT}} +\entry{ERA{\_}T{\_}FMT}{174}{\code {ERA_T_FMT}} +\entry{ALT{\_}DIGITS}{174}{\code {ALT_DIGITS}} +\entry{INT{\_}CURR{\_}SYMBOL}{174}{\code {INT_CURR_SYMBOL}} +\entry{CURRENCY{\_}SYMBOL}{174}{\code {CURRENCY_SYMBOL}} +\entry{CRNCYSTR}{174}{\code {CRNCYSTR}} +\entry{MON{\_}DECIMAL{\_}POINT}{174}{\code {MON_DECIMAL_POINT}} +\entry{MON{\_}THOUSANDS{\_}SEP}{174}{\code {MON_THOUSANDS_SEP}} +\entry{MON{\_}GROUPING}{174}{\code {MON_GROUPING}} +\entry{POSITIVE{\_}SIGN}{174}{\code {POSITIVE_SIGN}} +\entry{NEGATIVE{\_}SIGN}{174}{\code {NEGATIVE_SIGN}} +\entry{INT{\_}FRAC{\_}DIGITS}{174}{\code {INT_FRAC_DIGITS}} +\entry{FRAC{\_}DIGITS}{175}{\code {FRAC_DIGITS}} +\entry{P{\_}CS{\_}PRECEDES}{175}{\code {P_CS_PRECEDES}} +\entry{P{\_}SEP{\_}BY{\_}SPACE}{175}{\code {P_SEP_BY_SPACE}} +\entry{N{\_}CS{\_}PRECEDES}{175}{\code {N_CS_PRECEDES}} +\entry{N{\_}SEP{\_}BY{\_}SPACE}{175}{\code {N_SEP_BY_SPACE}} +\entry{P{\_}SIGN{\_}POSN}{175}{\code {P_SIGN_POSN}} +\entry{N{\_}SIGN{\_}POSN}{175}{\code {N_SIGN_POSN}} +\entry{INT{\_}P{\_}CS{\_}PRECEDES}{175}{\code {INT_P_CS_PRECEDES}} +\entry{INT{\_}P{\_}SEP{\_}BY{\_}SPACE}{175}{\code {INT_P_SEP_BY_SPACE}} +\entry{INT{\_}N{\_}CS{\_}PRECEDES}{175}{\code {INT_N_CS_PRECEDES}} +\entry{INT{\_}N{\_}SEP{\_}BY{\_}SPACE}{175}{\code {INT_N_SEP_BY_SPACE}} +\entry{INT{\_}P{\_}SIGN{\_}POSN}{175}{\code {INT_P_SIGN_POSN}} +\entry{INT{\_}N{\_}SIGN{\_}POSN}{175}{\code {INT_N_SIGN_POSN}} +\entry{DECIMAL{\_}POINT}{176}{\code {DECIMAL_POINT}} +\entry{RADIXCHAR}{176}{\code {RADIXCHAR}} +\entry{THOUSANDS{\_}SEP}{176}{\code {THOUSANDS_SEP}} +\entry{THOUSEP}{176}{\code {THOUSEP}} +\entry{GROUPING}{176}{\code {GROUPING}} +\entry{YESEXPR}{176}{\code {YESEXPR}} +\entry{NOEXPR}{176}{\code {NOEXPR}} +\entry{YESSTR}{176}{\code {YESSTR}} +\entry{NOSTR}{176}{\code {NOSTR}} +\entry{GLOB{\_}ABORTED}{223}{\code {GLOB_ABORTED}} +\entry{GLOB{\_}NOMATCH}{223}{\code {GLOB_NOMATCH}} +\entry{GLOB{\_}NOSPACE}{223}{\code {GLOB_NOSPACE}} +\entry{GLOB{\_}APPEND}{224}{\code {GLOB_APPEND}} +\entry{GLOB{\_}DOOFFS}{224}{\code {GLOB_DOOFFS}} +\entry{GLOB{\_}ERR}{224}{\code {GLOB_ERR}} +\entry{GLOB{\_}MARK}{225}{\code {GLOB_MARK}} +\entry{GLOB{\_}NOCHECK}{225}{\code {GLOB_NOCHECK}} +\entry{GLOB{\_}NOSORT}{225}{\code {GLOB_NOSORT}} +\entry{GLOB{\_}NOESCAPE}{225}{\code {GLOB_NOESCAPE}} +\entry{GLOB{\_}PERIOD}{225}{\code {GLOB_PERIOD}} +\entry{GLOB{\_}MAGCHAR}{225}{\code {GLOB_MAGCHAR}} +\entry{GLOB{\_}ALTDIRFUNC}{225}{\code {GLOB_ALTDIRFUNC}} +\entry{GLOB{\_}BRACE}{225}{\code {GLOB_BRACE}} +\entry{GLOB{\_}NOMAGIC}{226}{\code {GLOB_NOMAGIC}} +\entry{GLOB{\_}TILDE}{226}{\code {GLOB_TILDE}} +\entry{GLOB{\_}TILDE{\_}CHECK}{226}{\code {GLOB_TILDE_CHECK}} +\entry{GLOB{\_}ONLYDIR}{227}{\code {GLOB_ONLYDIR}} +\entry{stdin}{245}{\code {stdin}} +\entry{stdout}{245}{\code {stdout}} +\entry{stderr}{245}{\code {stderr}} +\entry{FOPEN{\_}MAX}{248}{\code {FOPEN_MAX}} +\entry{FSETLOCKING{\_}INTERNAL}{253}{\code {FSETLOCKING_INTERNAL}} +\entry{FSETLOCKING{\_}BYCALLER}{253}{\code {FSETLOCKING_BYCALLER}} +\entry{FSETLOCKING{\_}QUERY}{253}{\code {FSETLOCKING_QUERY}} +\entry{NL{\_}ARGMAX}{266}{\code {NL_ARGMAX}} +\entry{PA{\_}FLAG{\_}MASK}{279}{\code {PA_FLAG_MASK}} +\entry{PA{\_}INT}{279}{\code {PA_INT}} +\entry{PA{\_}CHAR}{279}{\code {PA_CHAR}} +\entry{PA{\_}STRING}{279}{\code {PA_STRING}} +\entry{PA{\_}POINTER}{279}{\code {PA_POINTER}} +\entry{PA{\_}FLOAT}{279}{\code {PA_FLOAT}} +\entry{PA{\_}DOUBLE}{279}{\code {PA_DOUBLE}} +\entry{PA{\_}LAST}{279}{\code {PA_LAST}} +\entry{PA{\_}FLAG{\_}PTR}{279}{\code {PA_FLAG_PTR}} +\entry{PA{\_}FLAG{\_}SHORT}{279}{\code {PA_FLAG_SHORT}} +\entry{PA{\_}FLAG{\_}LONG}{280}{\code {PA_FLAG_LONG}} +\entry{PA{\_}FLAG{\_}LONG{\_}LONG}{280}{\code {PA_FLAG_LONG_LONG}} +\entry{PA{\_}FLAG{\_}LONG{\_}DOUBLE}{280}{\code {PA_FLAG_LONG_DOUBLE}} +\entry{EOF}{297}{\code {EOF}} +\entry{WEOF}{297}{\code {WEOF}} +\entry{SEEK{\_}SET}{301}{\code {SEEK_SET}} +\entry{SEEK{\_}CUR}{301}{\code {SEEK_CUR}} +\entry{SEEK{\_}END}{301}{\code {SEEK_END}} +\entry{L{\_}SET}{301}{\code {L_SET}} +\entry{L{\_}INCR}{301}{\code {L_INCR}} +\entry{L{\_}XTND}{301}{\code {L_XTND}} +\entry{{\_}IOFBF}{306}{\code {_IOFBF}} +\entry{{\_}IOLBF}{306}{\code {_IOLBF}} +\entry{{\_}IONBF}{306}{\code {_IONBF}} +\entry{BUFSIZ}{306}{\code {BUFSIZ}} +\entry{MM{\_}PRINT}{313}{\code {MM_PRINT}} +\entry{MM{\_}CONSOLE}{313}{\code {MM_CONSOLE}} +\entry{MM{\_}HARD}{313}{\code {MM_HARD}} +\entry{MM{\_}SOFT}{313}{\code {MM_SOFT}} +\entry{MM{\_}FIRM}{313}{\code {MM_FIRM}} +\entry{MM{\_}APPL}{313}{\code {MM_APPL}} +\entry{MM{\_}UTIL}{313}{\code {MM_UTIL}} +\entry{MM{\_}OPSYS}{313}{\code {MM_OPSYS}} +\entry{MM{\_}RECOVER}{314}{\code {MM_RECOVER}} +\entry{MM{\_}NRECOV}{314}{\code {MM_NRECOV}} +\entry{MM{\_}NULLLBL}{314}{\code {MM_NULLLBL}} +\entry{MM{\_}NULLSEV}{314}{\code {MM_NULLSEV}} +\entry{MM{\_}NULLMC}{314}{\code {MM_NULLMC}} +\entry{MM{\_}NULLTXT}{314}{\code {MM_NULLTXT}} +\entry{MM{\_}NULLACT}{314}{\code {MM_NULLACT}} +\entry{MM{\_}NULLTAG}{314}{\code {MM_NULLTAG}} +\entry{MM{\_}NOSEV}{314}{\code {MM_NOSEV}} +\entry{MM{\_}HALT}{314}{\code {MM_HALT}} +\entry{MM{\_}ERROR}{314}{\code {MM_ERROR}} +\entry{MM{\_}WARNING}{314}{\code {MM_WARNING}} +\entry{MM{\_}INFO}{315}{\code {MM_INFO}} +\entry{STDIN{\_}FILENO}{329}{\code {STDIN_FILENO}} +\entry{STDOUT{\_}FILENO}{329}{\code {STDOUT_FILENO}} +\entry{STDERR{\_}FILENO}{329}{\code {STDERR_FILENO}} +\entry{{\_}SC{\_}PAGESIZE}{333}{\code {_SC_PAGESIZE}} +\entry{PROT{\_}READ}{333}{\code {PROT_READ}} +\entry{PROT{\_}WRITE}{333}{\code {PROT_WRITE}} +\entry{PROT{\_}EXEC}{333}{\code {PROT_EXEC}} +\entry{MAP{\_}PRIVATE}{333}{\code {MAP_PRIVATE}} +\entry{MAP{\_}SHARED}{333}{\code {MAP_SHARED}} +\entry{MAP{\_}FIXED}{334}{\code {MAP_FIXED}} +\entry{MAP{\_}ANONYMOUS}{334}{\code {MAP_ANONYMOUS}} +\entry{MAP{\_}ANON}{334}{\code {MAP_ANON}} +\entry{MS{\_}SYNC}{335}{\code {MS_SYNC}} +\entry{MS{\_}ASYNC}{335}{\code {MS_ASYNC}} +\entry{FD{\_}SETSIZE}{337}{\code {FD_SETSIZE}} +\entry{LIO{\_}READ}{342}{\code {LIO_READ}} +\entry{LIO{\_}WRITE}{342}{\code {LIO_WRITE}} +\entry{LIO{\_}NOP}{342}{\code {LIO_NOP}} +\entry{F{\_}DUPFD}{354}{\code {F_DUPFD}} +\entry{F{\_}GETFD}{356}{\code {F_GETFD}} +\entry{F{\_}SETFD}{356}{\code {F_SETFD}} +\entry{FD{\_}CLOEXEC}{356}{\code {FD_CLOEXEC}} +\entry{O{\_}RDONLY}{357}{\code {O_RDONLY}} +\entry{O{\_}WRONLY}{357}{\code {O_WRONLY}} +\entry{O{\_}RDWR}{357}{\code {O_RDWR}} +\entry{O{\_}READ}{358}{\code {O_READ}} +\entry{O{\_}WRITE}{358}{\code {O_WRITE}} +\entry{O{\_}EXEC}{358}{\code {O_EXEC}} +\entry{O{\_}ACCMODE}{358}{\code {O_ACCMODE}} +\entry{O{\_}CREAT}{358}{\code {O_CREAT}} +\entry{O{\_}EXCL}{359}{\code {O_EXCL}} +\entry{O{\_}NONBLOCK}{359}{\code {O_NONBLOCK}} +\entry{O{\_}NOCTTY}{359}{\code {O_NOCTTY}} +\entry{O{\_}IGNORE{\_}CTTY}{359}{\code {O_IGNORE_CTTY}} +\entry{O{\_}NOLINK}{359}{\code {O_NOLINK}} +\entry{O{\_}NOTRANS}{359}{\code {O_NOTRANS}} +\entry{O{\_}TRUNC}{360}{\code {O_TRUNC}} +\entry{O{\_}SHLOCK}{360}{\code {O_SHLOCK}} +\entry{O{\_}EXLOCK}{360}{\code {O_EXLOCK}} +\entry{O{\_}APPEND}{360}{\code {O_APPEND}} +\entry{O{\_}NONBLOCK}{360}{\code {O_NONBLOCK}} +\entry{O{\_}NDELAY}{361}{\code {O_NDELAY}} +\entry{O{\_}ASYNC}{361}{\code {O_ASYNC}} +\entry{O{\_}FSYNC}{361}{\code {O_FSYNC}} +\entry{O{\_}SYNC}{361}{\code {O_SYNC}} +\entry{O{\_}NOATIME}{361}{\code {O_NOATIME}} +\entry{F{\_}GETFL}{361}{\code {F_GETFL}} +\entry{F{\_}SETFL}{361}{\code {F_SETFL}} +\entry{F{\_}GETLK}{363}{\code {F_GETLK}} +\entry{F{\_}SETLK}{364}{\code {F_SETLK}} +\entry{F{\_}SETLKW}{364}{\code {F_SETLKW}} +\entry{F{\_}RDLCK}{365}{\code {F_RDLCK}} +\entry{F{\_}WRLCK}{365}{\code {F_WRLCK}} +\entry{F{\_}UNLCK}{365}{\code {F_UNLCK}} +\entry{F{\_}GETOWN}{366}{\code {F_GETOWN}} +\entry{F{\_}SETOWN}{366}{\code {F_SETOWN}} +\entry{PWD}{370}{\code {PWD}} +\entry{DT{\_}UNKNOWN}{371}{\code {DT_UNKNOWN}} +\entry{DT{\_}REG}{372}{\code {DT_REG}} +\entry{DT{\_}DIR}{372}{\code {DT_DIR}} +\entry{DT{\_}FIFO}{372}{\code {DT_FIFO}} +\entry{DT{\_}SOCK}{372}{\code {DT_SOCK}} +\entry{DT{\_}CHR}{372}{\code {DT_CHR}} +\entry{DT{\_}BLK}{372}{\code {DT_BLK}} +\entry{FTW{\_}F}{379}{\code {FTW_F}} +\entry{FTW{\_}D}{379}{\code {FTW_D}} +\entry{FTW{\_}NS}{379}{\code {FTW_NS}} +\entry{FTW{\_}DNR}{379}{\code {FTW_DNR}} +\entry{FTW{\_}SL}{379}{\code {FTW_SL}} +\entry{FTW{\_}DP}{379}{\code {FTW_DP}} +\entry{FTW{\_}SLN}{379}{\code {FTW_SLN}} +\entry{FTW{\_}PHYS}{381}{\code {FTW_PHYS}} +\entry{FTW{\_}MOUNT}{381}{\code {FTW_MOUNT}} +\entry{FTW{\_}CHDIR}{381}{\code {FTW_CHDIR}} +\entry{FTW{\_}DEPTH}{381}{\code {FTW_DEPTH}} +\entry{MAXSYMLINKS}{383}{\code {MAXSYMLINKS}} +\entry{S{\_}IFMT}{395}{\code {S_IFMT}} +\entry{S{\_}IFDIR}{395}{\code {S_IFDIR}} +\entry{S{\_}IFCHR}{395}{\code {S_IFCHR}} +\entry{S{\_}IFBLK}{395}{\code {S_IFBLK}} +\entry{S{\_}IFREG}{395}{\code {S_IFREG}} +\entry{S{\_}IFLNK}{395}{\code {S_IFLNK}} +\entry{S{\_}IFSOCK}{395}{\code {S_IFSOCK}} +\entry{S{\_}IFIFO}{395}{\code {S_IFIFO}} +\entry{S{\_}IRUSR}{397}{\code {S_IRUSR}} +\entry{S{\_}IREAD}{397}{\code {S_IREAD}} +\entry{S{\_}IWUSR}{397}{\code {S_IWUSR}} +\entry{S{\_}IWRITE}{397}{\code {S_IWRITE}} +\entry{S{\_}IXUSR}{397}{\code {S_IXUSR}} +\entry{S{\_}IEXEC}{397}{\code {S_IEXEC}} +\entry{S{\_}IRWXU}{397}{\code {S_IRWXU}} +\entry{S{\_}IRGRP}{397}{\code {S_IRGRP}} +\entry{S{\_}IWGRP}{397}{\code {S_IWGRP}} +\entry{S{\_}IXGRP}{397}{\code {S_IXGRP}} +\entry{S{\_}IRWXG}{397}{\code {S_IRWXG}} +\entry{S{\_}IROTH}{397}{\code {S_IROTH}} +\entry{S{\_}IWOTH}{397}{\code {S_IWOTH}} +\entry{S{\_}IXOTH}{397}{\code {S_IXOTH}} +\entry{S{\_}IRWXO}{397}{\code {S_IRWXO}} +\entry{S{\_}ISUID}{397}{\code {S_ISUID}} +\entry{S{\_}ISGID}{398}{\code {S_ISGID}} +\entry{S{\_}ISVTX}{398}{\code {S_ISVTX}} +\entry{R{\_}OK}{402}{\code {R_OK}} +\entry{W{\_}OK}{402}{\code {W_OK}} +\entry{X{\_}OK}{402}{\code {X_OK}} +\entry{F{\_}OK}{402}{\code {F_OK}} +\entry{L{\_}tmpnam}{408}{\code {L_tmpnam}} +\entry{TMP{\_}MAX}{408}{\code {TMP_MAX}} +\entry{P{\_}tmpdir}{409}{\code {P_tmpdir}} +\entry{SOCK{\_}STREAM}{418}{\code {SOCK_STREAM}} +\entry{SOCK{\_}DGRAM}{418}{\code {SOCK_DGRAM}} +\entry{SOCK{\_}RAW}{419}{\code {SOCK_RAW}} +\entry{AF{\_}LOCAL}{420}{\code {AF_LOCAL}} +\entry{AF{\_}UNIX}{420}{\code {AF_UNIX}} +\entry{AF{\_}FILE}{420}{\code {AF_FILE}} +\entry{AF{\_}INET}{420}{\code {AF_INET}} +\entry{AF{\_}UNSPEC}{420}{\code {AF_UNSPEC}} +\entry{IFNAMSIZ}{422}{\code {IFNAMSIZ}} +\entry{PF{\_}LOCAL}{423}{\code {PF_LOCAL}} +\entry{PF{\_}UNIX}{423}{\code {PF_UNIX}} +\entry{PF{\_}FILE}{423}{\code {PF_FILE}} +\entry{PF{\_}INET}{425}{\code {PF_INET}} +\entry{PF{\_}INET6}{425}{\code {PF_INET6}} +\entry{INADDR{\_}LOOPBACK}{429}{\code {INADDR_LOOPBACK}} +\entry{INADDR{\_}ANY}{429}{\code {INADDR_ANY}} +\entry{INADDR{\_}BROADCAST}{429}{\code {INADDR_BROADCAST}} +\entry{INADDR{\_}NONE}{429}{\code {INADDR_NONE}} +\entry{in6addr{\_}loopback}{429}{\code {in6addr_loopback}} +\entry{in6addr{\_}any}{429}{\code {in6addr_any}} +\entry{h{\_}errno}{432}{\code {h_errno}} +\entry{HOST{\_}NOT{\_}FOUND}{432}{\code {HOST_NOT_FOUND}} +\entry{TRY{\_}AGAIN}{432}{\code {TRY_AGAIN}} +\entry{NO{\_}RECOVERY}{433}{\code {NO_RECOVERY}} +\entry{NO{\_}ADDRESS}{433}{\code {NO_ADDRESS}} +\entry{IPPORT{\_}RESERVED}{435}{\code {IPPORT_RESERVED}} +\entry{IPPORT{\_}USERRESERVED}{435}{\code {IPPORT_USERRESERVED}} +\entry{PF{\_}NS}{440}{\code {PF_NS}} +\entry{PF{\_}ISO}{440}{\code {PF_ISO}} +\entry{PF{\_}CCITT}{440}{\code {PF_CCITT}} +\entry{PF{\_}IMPLINK}{440}{\code {PF_IMPLINK}} +\entry{PF{\_}ROUTE}{440}{\code {PF_ROUTE}} +\entry{MSG{\_}OOB}{448}{\code {MSG_OOB}} +\entry{MSG{\_}PEEK}{448}{\code {MSG_PEEK}} +\entry{MSG{\_}DONTROUTE}{448}{\code {MSG_DONTROUTE}} +\entry{SOL{\_}SOCKET}{461}{\code {SOL_SOCKET}} +\entry{NCCS}{468}{\code {NCCS}} +\entry{TCSANOW}{468}{\code {TCSANOW}} +\entry{TCSADRAIN}{468}{\code {TCSADRAIN}} +\entry{TCSAFLUSH}{468}{\code {TCSAFLUSH}} +\entry{TCSASOFT}{468}{\code {TCSASOFT}} +\entry{INPCK}{470}{\code {INPCK}} +\entry{IGNPAR}{470}{\code {IGNPAR}} +\entry{PARMRK}{471}{\code {PARMRK}} +\entry{ISTRIP}{471}{\code {ISTRIP}} +\entry{IGNBRK}{471}{\code {IGNBRK}} +\entry{BRKINT}{471}{\code {BRKINT}} +\entry{IGNCR}{471}{\code {IGNCR}} +\entry{ICRNL}{471}{\code {ICRNL}} +\entry{INLCR}{471}{\code {INLCR}} +\entry{IXOFF}{472}{\code {IXOFF}} +\entry{IXON}{472}{\code {IXON}} +\entry{IXANY}{472}{\code {IXANY}} +\entry{IMAXBEL}{472}{\code {IMAXBEL}} +\entry{OPOST}{472}{\code {OPOST}} +\entry{ONLCR}{473}{\code {ONLCR}} +\entry{OXTABS}{473}{\code {OXTABS}} +\entry{ONOEOT}{473}{\code {ONOEOT}} +\entry{CLOCAL}{473}{\code {CLOCAL}} +\entry{HUPCL}{473}{\code {HUPCL}} +\entry{CREAD}{473}{\code {CREAD}} +\entry{CSTOPB}{473}{\code {CSTOPB}} +\entry{PARENB}{474}{\code {PARENB}} +\entry{PARODD}{474}{\code {PARODD}} +\entry{CSIZE}{474}{\code {CSIZE}} +\entry{CS5}{474}{\code {CS5}} +\entry{CS6}{474}{\code {CS6}} +\entry{CS7}{474}{\code {CS7}} +\entry{CS8}{474}{\code {CS8}} +\entry{CCTS{\_}OFLOW}{474}{\code {CCTS_OFLOW}} +\entry{CRTS{\_}IFLOW}{474}{\code {CRTS_IFLOW}} +\entry{MDMBUF}{474}{\code {MDMBUF}} +\entry{CIGNORE}{474}{\code {CIGNORE}} +\entry{ICANON}{475}{\code {ICANON}} +\entry{ECHO}{475}{\code {ECHO}} +\entry{ECHOE}{475}{\code {ECHOE}} +\entry{ECHOPRT}{475}{\code {ECHOPRT}} +\entry{ECHOK}{475}{\code {ECHOK}} +\entry{ECHOKE}{476}{\code {ECHOKE}} +\entry{ECHONL}{476}{\code {ECHONL}} +\entry{ECHOCTL}{476}{\code {ECHOCTL}} +\entry{ISIG}{476}{\code {ISIG}} +\entry{IEXTEN}{476}{\code {IEXTEN}} +\entry{NOFLSH}{476}{\code {NOFLSH}} +\entry{TOSTOP}{476}{\code {TOSTOP}} +\entry{ALTWERASE}{477}{\code {ALTWERASE}} +\entry{FLUSHO}{477}{\code {FLUSHO}} +\entry{NOKERNINFO}{477}{\code {NOKERNINFO}} +\entry{PENDIN}{477}{\code {PENDIN}} +\entry{B0}{478}{\code {B0}} +\entry{B50}{478}{\code {B50}} +\entry{B75}{478}{\code {B75}} +\entry{B110}{478}{\code {B110}} +\entry{B134}{478}{\code {B134}} +\entry{B150}{478}{\code {B150}} +\entry{B200}{478}{\code {B200}} +\entry{B300}{478}{\code {B300}} +\entry{B600}{478}{\code {B600}} +\entry{B1200}{478}{\code {B1200}} +\entry{B1800}{478}{\code {B1800}} +\entry{B2400}{478}{\code {B2400}} +\entry{B4800}{478}{\code {B4800}} +\entry{B9600}{478}{\code {B9600}} +\entry{B19200}{478}{\code {B19200}} +\entry{B38400}{478}{\code {B38400}} +\entry{B57600}{478}{\code {B57600}} +\entry{B115200}{478}{\code {B115200}} +\entry{B230400}{478}{\code {B230400}} +\entry{B460800}{478}{\code {B460800}} +\entry{EXTA}{478}{\code {EXTA}} +\entry{EXTB}{478}{\code {EXTB}} +\entry{{\_}POSIX{\_}VDISABLE}{479}{\code {_POSIX_VDISABLE}} +\entry{VEOF}{479}{\code {VEOF}} +\entry{VEOL}{479}{\code {VEOL}} +\entry{VEOL2}{479}{\code {VEOL2}} +\entry{VERASE}{480}{\code {VERASE}} +\entry{VWERASE}{480}{\code {VWERASE}} +\entry{VKILL}{480}{\code {VKILL}} +\entry{VREPRINT}{480}{\code {VREPRINT}} +\entry{VINTR}{481}{\code {VINTR}} +\entry{VQUIT}{481}{\code {VQUIT}} +\entry{VSUSP}{481}{\code {VSUSP}} +\entry{VDSUSP}{481}{\code {VDSUSP}} +\entry{VSTART}{482}{\code {VSTART}} +\entry{VSTOP}{482}{\code {VSTOP}} +\entry{VLNEXT}{482}{\code {VLNEXT}} +\entry{VDISCARD}{482}{\code {VDISCARD}} +\entry{VSTATUS}{483}{\code {VSTATUS}} +\entry{VMIN}{483}{\code {VMIN}} +\entry{VTIME}{483}{\code {VTIME}} +\entry{TCIFLUSH}{486}{\code {TCIFLUSH}} +\entry{TCOFLUSH}{486}{\code {TCOFLUSH}} +\entry{TCIOFLUSH}{486}{\code {TCIOFLUSH}} +\entry{TCOOFF}{487}{\code {TCOOFF}} +\entry{TCOON}{487}{\code {TCOON}} +\entry{TCIOFF}{487}{\code {TCIOFF}} +\entry{TCION}{487}{\code {TCION}} +\entry{EBADF}{487}{\code {EBADF}} +\entry{ENOTTY}{487}{\code {ENOTTY}} +\entry{EINVAL}{487}{\code {EINVAL}} +\entry{LOG{\_}USER}{496}{\code {LOG_USER}} +\entry{LOG{\_}MAIL}{496}{\code {LOG_MAIL}} +\entry{LOG{\_}DAEMON}{496}{\code {LOG_DAEMON}} +\entry{LOG{\_}AUTH}{496}{\code {LOG_AUTH}} +\entry{LOG{\_}SYSLOG}{496}{\code {LOG_SYSLOG}} +\entry{LOG{\_}LPR}{496}{\code {LOG_LPR}} +\entry{LOG{\_}NEWS}{496}{\code {LOG_NEWS}} +\entry{LOG{\_}UUCP}{496}{\code {LOG_UUCP}} +\entry{LOG{\_}CRON}{496}{\code {LOG_CRON}} +\entry{LOG{\_}AUTHPRIV}{496}{\code {LOG_AUTHPRIV}} +\entry{LOG{\_}FTP}{496}{\code {LOG_FTP}} +\entry{LOG{\_}LOCAL0}{496}{\code {LOG_LOCAL0}} +\entry{LOG{\_}LOCAL1}{496}{\code {LOG_LOCAL1}} +\entry{LOG{\_}LOCAL2}{496}{\code {LOG_LOCAL2}} +\entry{LOG{\_}LOCAL3}{496}{\code {LOG_LOCAL3}} +\entry{LOG{\_}LOCAL4}{496}{\code {LOG_LOCAL4}} +\entry{LOG{\_}LOCAL5}{496}{\code {LOG_LOCAL5}} +\entry{LOG{\_}LOCAL6}{497}{\code {LOG_LOCAL6}} +\entry{LOG{\_}LOCAL7}{497}{\code {LOG_LOCAL7}} +\entry{LOG{\_}EMERG}{497}{\code {LOG_EMERG}} +\entry{LOG{\_}ALERT}{497}{\code {LOG_ALERT}} +\entry{LOG{\_}CRIT}{497}{\code {LOG_CRIT}} +\entry{LOG{\_}ERR}{497}{\code {LOG_ERR}} +\entry{LOG{\_}WARNING}{497}{\code {LOG_WARNING}} +\entry{LOG{\_}NOTICE}{497}{\code {LOG_NOTICE}} +\entry{LOG{\_}INFO}{497}{\code {LOG_INFO}} +\entry{LOG{\_}DEBUG}{497}{\code {LOG_DEBUG}} +\entry{M{\_}E}{501}{\code {M_E}} +\entry{M{\_}LOG2E}{501}{\code {M_LOG2E}} +\entry{M{\_}LOG10E}{501}{\code {M_LOG10E}} +\entry{M{\_}LN2}{501}{\code {M_LN2}} +\entry{M{\_}LN10}{501}{\code {M_LN10}} +\entry{M{\_}PI}{501}{\code {M_PI}} +\entry{M{\_}PI{\_}2}{501}{\code {M_PI_2}} +\entry{M{\_}PI{\_}4}{501}{\code {M_PI_4}} +\entry{M{\_}1{\_}PI}{501}{\code {M_1_PI}} +\entry{M{\_}2{\_}PI}{501}{\code {M_2_PI}} +\entry{M{\_}2{\_}SQRTPI}{501}{\code {M_2_SQRTPI}} +\entry{M{\_}SQRT2}{501}{\code {M_SQRT2}} +\entry{M{\_}SQRT1{\_}2}{501}{\code {M_SQRT1_2}} +\entry{PI}{502}{\code {PI}} +\entry{FP{\_}ILOGB0}{506}{\code {FP_ILOGB0}} +\entry{FP{\_}ILOGBNAN}{506}{\code {FP_ILOGBNAN}} +\entry{signgam}{511}{\code {signgam}} +\entry{RAND{\_}MAX}{531}{\code {RAND_MAX}} +\entry{FP{\_}NAN}{542}{\code {FP_NAN}} +\entry{FP{\_}INFINITE}{543}{\code {FP_INFINITE}} +\entry{FP{\_}ZERO}{543}{\code {FP_ZERO}} +\entry{FP{\_}SUBNORMAL}{543}{\code {FP_SUBNORMAL}} +\entry{FP{\_}NORMAL}{543}{\code {FP_NORMAL}} +\entry{INFINITY}{546}{\code {INFINITY}} +\entry{NAN}{546}{\code {NAN}} +\entry{FE{\_}INEXACT}{547}{\code {FE_INEXACT}} +\entry{FE{\_}DIVBYZERO}{547}{\code {FE_DIVBYZERO}} +\entry{FE{\_}UNDERFLOW}{547}{\code {FE_UNDERFLOW}} +\entry{FE{\_}OVERFLOW}{547}{\code {FE_OVERFLOW}} +\entry{FE{\_}INVALID}{547}{\code {FE_INVALID}} +\entry{HUGE{\_}VAL}{549}{\code {HUGE_VAL}} +\entry{HUGE{\_}VALF}{549}{\code {HUGE_VALF}} +\entry{HUGE{\_}VALL}{549}{\code {HUGE_VALL}} +\entry{FE{\_}TONEAREST}{550}{\code {FE_TONEAREST}} +\entry{FE{\_}UPWARD}{550}{\code {FE_UPWARD}} +\entry{FE{\_}DOWNWARD}{550}{\code {FE_DOWNWARD}} +\entry{FE{\_}TOWARDZERO}{550}{\code {FE_TOWARDZERO}} +\entry{FE{\_}DFL{\_}ENV}{551}{\code {FE_DFL_ENV}} +\entry{FE{\_}NOMASK{\_}ENV}{551}{\code {FE_NOMASK_ENV}} +\entry{FP{\_}FAST{\_}FMA}{560}{\code {FP_FAST_FMA}} +\entry{{\_}Complex{\_}I}{560}{\code {_Complex_I}} +\entry{I}{561}{\code {I}} +\entry{CLOCKS{\_}PER{\_}SEC}{574}{\code {CLOCKS_PER_SEC}} +\entry{CLK{\_}TCK}{574}{\code {CLK_TCK}} +\entry{getdate{\_}err}{595}{\code {getdate_err}} +\entry{tzname}{599}{\code {tzname}} +\entry{timezone}{599}{\code {timezone}} +\entry{daylight}{600}{\code {daylight}} +\entry{ITIMER{\_}REAL}{602}{\code {ITIMER_REAL}} +\entry{ITIMER{\_}VIRTUAL}{602}{\code {ITIMER_VIRTUAL}} +\entry{ITIMER{\_}PROF}{602}{\code {ITIMER_PROF}} +\entry{RLIMIT{\_}CPU}{609}{\code {RLIMIT_CPU}} +\entry{RLIMIT{\_}FSIZE}{609}{\code {RLIMIT_FSIZE}} +\entry{RLIMIT{\_}DATA}{609}{\code {RLIMIT_DATA}} +\entry{RLIMIT{\_}STACK}{609}{\code {RLIMIT_STACK}} +\entry{RLIMIT{\_}CORE}{609}{\code {RLIMIT_CORE}} +\entry{RLIMIT{\_}RSS}{609}{\code {RLIMIT_RSS}} +\entry{RLIMIT{\_}NOFILE}{610}{\code {RLIMIT_NOFILE}} +\entry{RLIMIT{\_}OFILE}{610}{\code {RLIMIT_OFILE}} +\entry{RLIMIT{\_}AS}{610}{\code {RLIMIT_AS}} +\entry{RLIM{\_}NLIMITS}{610}{\code {RLIM_NLIMITS}} +\entry{RLIM{\_}INFINITY}{610}{\code {RLIM_INFINITY}} +\entry{PRIO{\_}MIN}{619}{\code {PRIO_MIN}} +\entry{PRIO{\_}MAX}{619}{\code {PRIO_MAX}} +\entry{PRIO{\_}PROCESS}{619}{\code {PRIO_PROCESS}} +\entry{PRIO{\_}PGRP}{619}{\code {PRIO_PGRP}} +\entry{PRIO{\_}USER}{620}{\code {PRIO_USER}} +\entry{{\_}SC{\_}PAGESIZE}{621}{\code {_SC_PAGESIZE}} +\entry{{\_}SC{\_}PHYS{\_}PAGES}{621}{\code {_SC_PHYS_PAGES}} +\entry{{\_}SC{\_}AVPHYS{\_}PAGES}{621}{\code {_SC_AVPHYS_PAGES}} +\entry{{\_}SC{\_}NPROCESSORS{\_}CONF}{622}{\code {_SC_NPROCESSORS_CONF}} +\entry{{\_}SC{\_}NPROCESSORS{\_}ONLN}{622}{\code {_SC_NPROCESSORS_ONLN}} +\entry{NSIG}{637}{\code {NSIG}} +\entry{COREFILE}{638}{\code {COREFILE}} +\entry{SIGFPE}{638}{\code {SIGFPE}} +\entry{FPE{\_}INTOVF{\_}TRAP}{638}{\code {FPE_INTOVF_TRAP}} +\entry{FPE{\_}INTDIV{\_}TRAP}{638}{\code {FPE_INTDIV_TRAP}} +\entry{FPE{\_}SUBRNG{\_}TRAP}{638}{\code {FPE_SUBRNG_TRAP}} +\entry{FPE{\_}FLTOVF{\_}TRAP}{639}{\code {FPE_FLTOVF_TRAP}} +\entry{FPE{\_}FLTDIV{\_}TRAP}{639}{\code {FPE_FLTDIV_TRAP}} +\entry{FPE{\_}FLTUND{\_}TRAP}{639}{\code {FPE_FLTUND_TRAP}} +\entry{FPE{\_}DECOVF{\_}TRAP}{639}{\code {FPE_DECOVF_TRAP}} +\entry{SIGILL}{639}{\code {SIGILL}} +\entry{SIGSEGV}{639}{\code {SIGSEGV}} +\entry{SIGBUS}{639}{\code {SIGBUS}} +\entry{SIGABRT}{640}{\code {SIGABRT}} +\entry{SIGIOT}{640}{\code {SIGIOT}} +\entry{SIGTRAP}{640}{\code {SIGTRAP}} +\entry{SIGEMT}{640}{\code {SIGEMT}} +\entry{SIGSYS}{640}{\code {SIGSYS}} +\entry{SIGTERM}{640}{\code {SIGTERM}} +\entry{SIGINT}{640}{\code {SIGINT}} +\entry{SIGQUIT}{641}{\code {SIGQUIT}} +\entry{SIGKILL}{641}{\code {SIGKILL}} +\entry{SIGHUP}{641}{\code {SIGHUP}} +\entry{SIGALRM}{641}{\code {SIGALRM}} +\entry{SIGVTALRM}{642}{\code {SIGVTALRM}} +\entry{SIGPROF}{642}{\code {SIGPROF}} +\entry{SIGIO}{642}{\code {SIGIO}} +\entry{SIGURG}{642}{\code {SIGURG}} +\entry{SIGPOLL}{642}{\code {SIGPOLL}} +\entry{SIGCHLD}{642}{\code {SIGCHLD}} +\entry{SIGCLD}{643}{\code {SIGCLD}} +\entry{SIGCONT}{643}{\code {SIGCONT}} +\entry{SIGSTOP}{643}{\code {SIGSTOP}} +\entry{SIGTSTP}{643}{\code {SIGTSTP}} +\entry{SIGTTIN}{643}{\code {SIGTTIN}} +\entry{SIGTTOU}{643}{\code {SIGTTOU}} +\entry{SIGPIPE}{644}{\code {SIGPIPE}} +\entry{SIGLOST}{644}{\code {SIGLOST}} +\entry{SIGXCPU}{644}{\code {SIGXCPU}} +\entry{SIGXFSZ}{645}{\code {SIGXFSZ}} +\entry{SIGUSR1}{645}{\code {SIGUSR1}} +\entry{SIGUSR2}{645}{\code {SIGUSR2}} +\entry{SIGWINCH}{645}{\code {SIGWINCH}} +\entry{SIGINFO}{645}{\code {SIGINFO}} +\entry{sys{\_}siglist}{646}{\code {sys_siglist}} +\entry{SIG{\_}DFL}{647}{\code {SIG_DFL}} +\entry{SIG{\_}IGN}{647}{\code {SIG_IGN}} +\entry{SIG{\_}ERR}{648}{\code {SIG_ERR}} +\entry{SA{\_}NOCLDSTOP}{651}{\code {SA_NOCLDSTOP}} +\entry{SA{\_}ONSTACK}{651}{\code {SA_ONSTACK}} +\entry{SA{\_}RESTART}{652}{\code {SA_RESTART}} +\entry{SIG{\_}BLOCK}{670}{\code {SIG_BLOCK}} +\entry{SIG{\_}UNBLOCK}{670}{\code {SIG_UNBLOCK}} +\entry{SIG{\_}SETMASK}{671}{\code {SIG_SETMASK}} +\entry{SIGSTKSZ}{678}{\code {SIGSTKSZ}} +\entry{MINSIGSTKSZ}{678}{\code {MINSIGSTKSZ}} +\entry{SS{\_}DISABLE}{678}{\code {SS_DISABLE}} +\entry{SS{\_}ONSTACK}{679}{\code {SS_ONSTACK}} +\entry{SV{\_}ONSTACK}{680}{\code {SV_ONSTACK}} +\entry{SV{\_}INTERRUPT}{680}{\code {SV_INTERRUPT}} +\entry{SV{\_}RESETHAND}{681}{\code {SV_RESETHAND}} +\entry{opterr}{685}{\code {opterr}} +\entry{optopt}{685}{\code {optopt}} +\entry{optind}{685}{\code {optind}} +\entry{optarg}{685}{\code {optarg}} +\entry{argp{\_}program{\_}version}{693}{\code {argp_program_version}} +\entry{argp{\_}program{\_}bug{\_}address}{693}{\code {argp_program_bug_address}} +\entry{argp{\_}program{\_}version{\_}hook}{693}{\code {argp_program_version_hook}} +\entry{argp{\_}err{\_}exit{\_}status}{694}{\code {argp_err_exit_status}} +\entry{OPTION{\_}ARG{\_}OPTIONAL}{696}{\code {OPTION_ARG_OPTIONAL}} +\entry{OPTION{\_}HIDDEN}{696}{\code {OPTION_HIDDEN}} +\entry{OPTION{\_}ALIAS}{696}{\code {OPTION_ALIAS}} +\entry{OPTION{\_}DOC}{696}{\code {OPTION_DOC}} +\entry{OPTION{\_}NO{\_}USAGE}{696}{\code {OPTION_NO_USAGE}} +\entry{ARGP{\_}ERR{\_}UNKNOWN}{697}{\code {ARGP_ERR_UNKNOWN}} +\entry{ARGP{\_}KEY{\_}ARG}{698}{\code {ARGP_KEY_ARG}} +\entry{ARGP{\_}KEY{\_}ARGS}{698}{\code {ARGP_KEY_ARGS}} +\entry{ARGP{\_}KEY{\_}END}{698}{\code {ARGP_KEY_END}} +\entry{ARGP{\_}KEY{\_}NO{\_}ARGS}{698}{\code {ARGP_KEY_NO_ARGS}} +\entry{ARGP{\_}KEY{\_}INIT}{699}{\code {ARGP_KEY_INIT}} +\entry{ARGP{\_}KEY{\_}SUCCESS}{699}{\code {ARGP_KEY_SUCCESS}} +\entry{ARGP{\_}KEY{\_}ERROR}{699}{\code {ARGP_KEY_ERROR}} +\entry{ARGP{\_}KEY{\_}FINI}{699}{\code {ARGP_KEY_FINI}} +\entry{ARGP{\_}PARSE{\_}ARGV0}{703}{\code {ARGP_PARSE_ARGV0}} +\entry{ARGP{\_}NO{\_}ERRS}{703}{\code {ARGP_NO_ERRS}} +\entry{ARGP{\_}NO{\_}ARGS}{703}{\code {ARGP_NO_ARGS}} +\entry{ARGP{\_}IN{\_}ORDER}{703}{\code {ARGP_IN_ORDER}} +\entry{ARGP{\_}NO{\_}HELP}{703}{\code {ARGP_NO_HELP}} +\entry{ARGP{\_}NO{\_}EXIT}{704}{\code {ARGP_NO_EXIT}} +\entry{ARGP{\_}LONG{\_}ONLY}{704}{\code {ARGP_LONG_ONLY}} +\entry{ARGP{\_}SILENT}{704}{\code {ARGP_SILENT}} +\entry{ARGP{\_}KEY{\_}HELP{\_}PRE{\_}DOC}{704}{\code {ARGP_KEY_HELP_PRE_DOC}} +\entry{ARGP{\_}KEY{\_}HELP{\_}POST{\_}DOC}{704}{\code {ARGP_KEY_HELP_POST_DOC}} +\entry{ARGP{\_}KEY{\_}HELP{\_}HEADER}{704}{\code {ARGP_KEY_HELP_HEADER}} +\entry{ARGP{\_}KEY{\_}HELP{\_}EXTRA}{704}{\code {ARGP_KEY_HELP_EXTRA}} +\entry{ARGP{\_}KEY{\_}HELP{\_}DUP{\_}ARGS{\_}NOTE}{704}{\code {ARGP_KEY_HELP_DUP_ARGS_NOTE}} +\entry{ARGP{\_}KEY{\_}HELP{\_}ARGS{\_}DOC}{705}{\code {ARGP_KEY_HELP_ARGS_DOC}} +\entry{ARGP{\_}HELP{\_}USAGE}{705}{\code {ARGP_HELP_USAGE}} +\entry{ARGP{\_}HELP{\_}SHORT{\_}USAGE}{705}{\code {ARGP_HELP_SHORT_USAGE}} +\entry{ARGP{\_}HELP{\_}SEE}{705}{\code {ARGP_HELP_SEE}} +\entry{ARGP{\_}HELP{\_}LONG}{705}{\code {ARGP_HELP_LONG}} +\entry{ARGP{\_}HELP{\_}PRE{\_}DOC}{705}{\code {ARGP_HELP_PRE_DOC}} +\entry{ARGP{\_}HELP{\_}POST{\_}DOC}{705}{\code {ARGP_HELP_POST_DOC}} +\entry{ARGP{\_}HELP{\_}DOC}{706}{\code {ARGP_HELP_DOC}} +\entry{ARGP{\_}HELP{\_}BUG{\_}ADDR}{706}{\code {ARGP_HELP_BUG_ADDR}} +\entry{ARGP{\_}HELP{\_}LONG{\_}ONLY}{706}{\code {ARGP_HELP_LONG_ONLY}} +\entry{ARGP{\_}HELP{\_}EXIT{\_}ERR}{706}{\code {ARGP_HELP_EXIT_ERR}} +\entry{ARGP{\_}HELP{\_}EXIT{\_}OK}{706}{\code {ARGP_HELP_EXIT_OK}} +\entry{ARGP{\_}HELP{\_}STD{\_}ERR}{706}{\code {ARGP_HELP_STD_ERR}} +\entry{ARGP{\_}HELP{\_}STD{\_}USAGE}{706}{\code {ARGP_HELP_STD_USAGE}} +\entry{ARGP{\_}HELP{\_}STD{\_}HELP}{706}{\code {ARGP_HELP_STD_HELP}} +\entry{environ}{720}{\code {environ}} +\entry{EXIT{\_}SUCCESS}{725}{\code {EXIT_SUCCESS}} +\entry{EXIT{\_}FAILURE}{725}{\code {EXIT_FAILURE}} +\entry{L{\_}ctermid}{756}{\code {L_ctermid}} +\entry{aliases}{761}{\code {aliases}} +\entry{ethers}{761}{\code {ethers}} +\entry{group}{761}{\code {group}} +\entry{hosts}{761}{\code {hosts}} +\entry{netgroup}{761}{\code {netgroup}} +\entry{networks}{761}{\code {networks}} +\entry{protocols}{761}{\code {protocols}} +\entry{passwd}{761}{\code {passwd}} +\entry{rpc}{761}{\code {rpc}} +\entry{services}{761}{\code {services}} +\entry{shadow}{762}{\code {shadow}} +\entry{NSS{\_}STATUS{\_}TRYAGAIN}{766}{\code {NSS_STATUS_TRYAGAIN}} +\entry{NSS{\_}STATUS{\_}UNAVAIL}{766}{\code {NSS_STATUS_UNAVAIL}} +\entry{NSS{\_}STATUS{\_}NOTFOUND}{766}{\code {NSS_STATUS_NOTFOUND}} +\entry{NSS{\_}STATUS{\_}SUCCESS}{766}{\code {NSS_STATUS_SUCCESS}} +\entry{L{\_}cuserid}{781}{\code {L_cuserid}} +\entry{EMPTY}{783}{\code {EMPTY}} +\entry{RUN{\_}LVL}{783}{\code {RUN_LVL}} +\entry{BOOT{\_}TIME}{783}{\code {BOOT_TIME}} +\entry{OLD{\_}TIME}{783}{\code {OLD_TIME}} +\entry{NEW{\_}TIME}{783}{\code {NEW_TIME}} +\entry{INIT{\_}PROCESS}{783}{\code {INIT_PROCESS}} +\entry{LOGIN{\_}PROCESS}{783}{\code {LOGIN_PROCESS}} +\entry{USER{\_}PROCESS}{783}{\code {USER_PROCESS}} +\entry{DEAD{\_}PROCESS}{783}{\code {DEAD_PROCESS}} +\entry{ACCOUNTING}{783}{\code {ACCOUNTING}} +\entry{{\_}PATH{\_}UTMP}{786}{\code {_PATH_UTMP}} +\entry{{\_}PATH{\_}WTMP}{786}{\code {_PATH_WTMP}} +\entry{EMPTY}{787}{\code {EMPTY}} +\entry{RUN{\_}LVL}{787}{\code {RUN_LVL}} +\entry{BOOT{\_}TIME}{787}{\code {BOOT_TIME}} +\entry{OLD{\_}TIME}{787}{\code {OLD_TIME}} +\entry{NEW{\_}TIME}{787}{\code {NEW_TIME}} +\entry{INIT{\_}PROCESS}{787}{\code {INIT_PROCESS}} +\entry{LOGIN{\_}PROCESS}{787}{\code {LOGIN_PROCESS}} +\entry{USER{\_}PROCESS}{787}{\code {USER_PROCESS}} +\entry{DEAD{\_}PROCESS}{787}{\code {DEAD_PROCESS}} +\entry{{\_}PATH{\_}FSTAB}{803}{\code {_PATH_FSTAB}} +\entry{{\_}PATH{\_}MNTTAB}{803}{\code {_PATH_MNTTAB}} +\entry{FSTAB}{803}{\code {FSTAB}} +\entry{{\_}PATH{\_}MOUNTED}{803}{\code {_PATH_MOUNTED}} +\entry{FSTAB{\_}RW}{804}{\code {FSTAB_RW}} +\entry{FSTAB{\_}RQ}{804}{\code {FSTAB_RQ}} +\entry{FSTAB{\_}RO}{804}{\code {FSTAB_RO}} +\entry{FSTAB{\_}SW}{804}{\code {FSTAB_SW}} +\entry{FSTAB{\_}XX}{804}{\code {FSTAB_XX}} +\entry{MNTTYPE{\_}IGNORE}{806}{\code {MNTTYPE_IGNORE}} +\entry{MNTTYPE{\_}NFS}{806}{\code {MNTTYPE_NFS}} +\entry{MNTTYPE{\_}SWAP}{806}{\code {MNTTYPE_SWAP}} +\entry{MNTOPT{\_}DEFAULTS}{806}{\code {MNTOPT_DEFAULTS}} +\entry{MNTOPT{\_}RO}{806}{\code {MNTOPT_RO}} +\entry{MNTOPT{\_}RW}{806}{\code {MNTOPT_RW}} +\entry{MNTOPT{\_}SUID}{806}{\code {MNTOPT_SUID}} +\entry{MNTOPT{\_}NOSUID}{807}{\code {MNTOPT_NOSUID}} +\entry{MNTOPT{\_}NOAUTO}{807}{\code {MNTOPT_NOAUTO}} +\entry{ARG{\_}MAX}{815}{\code {ARG_MAX}} +\entry{CHILD{\_}MAX}{815}{\code {CHILD_MAX}} +\entry{OPEN{\_}MAX}{815}{\code {OPEN_MAX}} +\entry{STREAM{\_}MAX}{815}{\code {STREAM_MAX}} +\entry{TZNAME{\_}MAX}{815}{\code {TZNAME_MAX}} +\entry{NGROUPS{\_}MAX}{816}{\code {NGROUPS_MAX}} +\entry{SSIZE{\_}MAX}{816}{\code {SSIZE_MAX}} +\entry{RE{\_}DUP{\_}MAX}{816}{\code {RE_DUP_MAX}} +\entry{{\_}POSIX{\_}JOB{\_}CONTROL}{816}{\code {_POSIX_JOB_CONTROL}} +\entry{{\_}POSIX{\_}SAVED{\_}IDS}{816}{\code {_POSIX_SAVED_IDS}} +\entry{{\_}POSIX2{\_}C{\_}DEV}{817}{\code {_POSIX2_C_DEV}} +\entry{{\_}POSIX2{\_}FORT{\_}DEV}{817}{\code {_POSIX2_FORT_DEV}} +\entry{{\_}POSIX2{\_}FORT{\_}RUN}{817}{\code {_POSIX2_FORT_RUN}} +\entry{{\_}POSIX2{\_}LOCALEDEF}{817}{\code {_POSIX2_LOCALEDEF}} +\entry{{\_}POSIX2{\_}SW{\_}DEV}{817}{\code {_POSIX2_SW_DEV}} +\entry{{\_}POSIX{\_}VERSION}{817}{\code {_POSIX_VERSION}} +\entry{{\_}POSIX2{\_}C{\_}VERSION}{818}{\code {_POSIX2_C_VERSION}} +\entry{{\_}SC{\_}ARG{\_}MAX}{818}{\code {_SC_ARG_MAX}} +\entry{{\_}SC{\_}CHILD{\_}MAX}{818}{\code {_SC_CHILD_MAX}} +\entry{{\_}SC{\_}OPEN{\_}MAX}{818}{\code {_SC_OPEN_MAX}} +\entry{{\_}SC{\_}STREAM{\_}MAX}{819}{\code {_SC_STREAM_MAX}} +\entry{{\_}SC{\_}TZNAME{\_}MAX}{819}{\code {_SC_TZNAME_MAX}} +\entry{{\_}SC{\_}NGROUPS{\_}MAX}{819}{\code {_SC_NGROUPS_MAX}} +\entry{{\_}SC{\_}JOB{\_}CONTROL}{819}{\code {_SC_JOB_CONTROL}} +\entry{{\_}SC{\_}SAVED{\_}IDS}{819}{\code {_SC_SAVED_IDS}} +\entry{{\_}SC{\_}VERSION}{819}{\code {_SC_VERSION}} +\entry{{\_}SC{\_}CLK{\_}TCK}{819}{\code {_SC_CLK_TCK}} +\entry{{\_}SC{\_}CHARCLASS{\_}NAME{\_}MAX}{819}{\code {_SC_CHARCLASS_NAME_MAX}} +\entry{{\_}SC{\_}REALTIME{\_}SIGNALS}{819}{\code {_SC_REALTIME_SIGNALS}} +\entry{{\_}SC{\_}PRIORITY{\_}SCHEDULING}{819}{\code {_SC_PRIORITY_SCHEDULING}} +\entry{{\_}SC{\_}TIMERS}{819}{\code {_SC_TIMERS}} +\entry{{\_}SC{\_}ASYNCHRONOUS{\_}IO}{819}{\code {_SC_ASYNCHRONOUS_IO}} +\entry{{\_}SC{\_}PRIORITIZED{\_}IO}{819}{\code {_SC_PRIORITIZED_IO}} +\entry{{\_}SC{\_}SYNCHRONIZED{\_}IO}{819}{\code {_SC_SYNCHRONIZED_IO}} +\entry{{\_}SC{\_}FSYNC}{819}{\code {_SC_FSYNC}} +\entry{{\_}SC{\_}MAPPED{\_}FILES}{819}{\code {_SC_MAPPED_FILES}} +\entry{{\_}SC{\_}MEMLOCK}{819}{\code {_SC_MEMLOCK}} +\entry{{\_}SC{\_}MEMLOCK{\_}RANGE}{820}{\code {_SC_MEMLOCK_RANGE}} +\entry{{\_}SC{\_}MEMORY{\_}PROTECTION}{820}{\code {_SC_MEMORY_PROTECTION}} +\entry{{\_}SC{\_}MESSAGE{\_}PASSING}{820}{\code {_SC_MESSAGE_PASSING}} +\entry{{\_}SC{\_}SEMAPHORES}{820}{\code {_SC_SEMAPHORES}} +\entry{{\_}SC{\_}SHARED{\_}MEMORY{\_}OBJECTS}{820}{\code {_SC_SHARED_MEMORY_OBJECTS}} +\entry{{\_}SC{\_}AIO{\_}LISTIO{\_}MAX}{820}{\code {_SC_AIO_LISTIO_MAX}} +\entry{{\_}SC{\_}AIO{\_}MAX}{820}{\code {_SC_AIO_MAX}} +\entry{{\_}SC{\_}AIO{\_}PRIO{\_}DELTA{\_}MAX}{820}{\code {_SC_AIO_PRIO_DELTA_MAX}} +\entry{{\_}SC{\_}DELAYTIMER{\_}MAX}{820}{\code {_SC_DELAYTIMER_MAX}} +\entry{{\_}SC{\_}MQ{\_}OPEN{\_}MAX}{820}{\code {_SC_MQ_OPEN_MAX}} +\entry{{\_}SC{\_}MQ{\_}PRIO{\_}MAX}{820}{\code {_SC_MQ_PRIO_MAX}} +\entry{{\_}SC{\_}RTSIG{\_}MAX}{820}{\code {_SC_RTSIG_MAX}} +\entry{{\_}SC{\_}SEM{\_}NSEMS{\_}MAX}{820}{\code {_SC_SEM_NSEMS_MAX}} +\entry{{\_}SC{\_}SEM{\_}VALUE{\_}MAX}{820}{\code {_SC_SEM_VALUE_MAX}} +\entry{{\_}SC{\_}SIGQUEUE{\_}MAX}{820}{\code {_SC_SIGQUEUE_MAX}} +\entry{{\_}SC{\_}TIMER{\_}MAX}{820}{\code {_SC_TIMER_MAX}} +\entry{{\_}SC{\_}PII}{820}{\code {_SC_PII}} +\entry{{\_}SC{\_}PII{\_}XTI}{821}{\code {_SC_PII_XTI}} +\entry{{\_}SC{\_}PII{\_}SOCKET}{821}{\code {_SC_PII_SOCKET}} +\entry{{\_}SC{\_}PII{\_}INTERNET}{821}{\code {_SC_PII_INTERNET}} +\entry{{\_}SC{\_}PII{\_}OSI}{821}{\code {_SC_PII_OSI}} +\entry{{\_}SC{\_}SELECT}{821}{\code {_SC_SELECT}} +\entry{{\_}SC{\_}UIO{\_}MAXIOV}{821}{\code {_SC_UIO_MAXIOV}} +\entry{{\_}SC{\_}PII{\_}INTERNET{\_}STREAM}{821}{\code {_SC_PII_INTERNET_STREAM}} +\entry{{\_}SC{\_}PII{\_}INTERNET{\_}DGRAM}{821}{\code {_SC_PII_INTERNET_DGRAM}} +\entry{{\_}SC{\_}PII{\_}OSI{\_}COTS}{821}{\code {_SC_PII_OSI_COTS}} +\entry{{\_}SC{\_}PII{\_}OSI{\_}CLTS}{821}{\code {_SC_PII_OSI_CLTS}} +\entry{{\_}SC{\_}PII{\_}OSI{\_}M}{821}{\code {_SC_PII_OSI_M}} +\entry{{\_}SC{\_}T{\_}IOV{\_}MAX}{821}{\code {_SC_T_IOV_MAX}} +\entry{{\_}SC{\_}THREADS}{821}{\code {_SC_THREADS}} +\entry{{\_}SC{\_}THREAD{\_}SAFE{\_}FUNCTIONS}{821}{\code {_SC_THREAD_SAFE_FUNCTIONS}} +\entry{{\_}SC{\_}GETGR{\_}R{\_}SIZE{\_}MAX}{821}{\code {_SC_GETGR_R_SIZE_MAX}} +\entry{{\_}SC{\_}GETPW{\_}R{\_}SIZE{\_}MAX}{821}{\code {_SC_GETPW_R_SIZE_MAX}} +\entry{{\_}SC{\_}LOGIN{\_}NAME{\_}MAX}{821}{\code {_SC_LOGIN_NAME_MAX}} +\entry{{\_}SC{\_}TTY{\_}NAME{\_}MAX}{822}{\code {_SC_TTY_NAME_MAX}} +\entry{{\_}SC{\_}THREAD{\_}DESTRUCTOR{\_}ITERATIONS}{822}{\code {_SC_THREAD_DESTRUCTOR_ITERATIONS}} +\entry{{\_}SC{\_}THREAD{\_}KEYS{\_}MAX}{822}{\code {_SC_THREAD_KEYS_MAX}} +\entry{{\_}SC{\_}THREAD{\_}STACK{\_}MIN}{822}{\code {_SC_THREAD_STACK_MIN}} +\entry{{\_}SC{\_}THREAD{\_}THREADS{\_}MAX}{822}{\code {_SC_THREAD_THREADS_MAX}} +\entry{{\_}SC{\_}THREAD{\_}ATTR{\_}STACKADDR}{822}{\code {_SC_THREAD_ATTR_STACKADDR}} +\entry{{\_}SC{\_}THREAD{\_}ATTR{\_}STACKSIZE}{822}{\code {_SC_THREAD_ATTR_STACKSIZE}} +\entry{{\_}SC{\_}THREAD{\_}PRIORITY{\_}SCHEDULING}{822}{\code {_SC_THREAD_PRIORITY_SCHEDULING}} +\entry{{\_}SC{\_}THREAD{\_}PRIO{\_}INHERIT}{822}{\code {_SC_THREAD_PRIO_INHERIT}} +\entry{{\_}SC{\_}THREAD{\_}PRIO{\_}PROTECT}{822}{\code {_SC_THREAD_PRIO_PROTECT}} +\entry{{\_}SC{\_}THREAD{\_}PROCESS{\_}SHARED}{822}{\code {_SC_THREAD_PROCESS_SHARED}} +\entry{{\_}SC{\_}2{\_}C{\_}DEV}{822}{\code {_SC_2_C_DEV}} +\entry{{\_}SC{\_}2{\_}FORT{\_}DEV}{822}{\code {_SC_2_FORT_DEV}} +\entry{{\_}SC{\_}2{\_}FORT{\_}RUN}{822}{\code {_SC_2_FORT_RUN}} +\entry{{\_}SC{\_}2{\_}LOCALEDEF}{822}{\code {_SC_2_LOCALEDEF}} +\entry{{\_}SC{\_}2{\_}SW{\_}DEV}{823}{\code {_SC_2_SW_DEV}} +\entry{{\_}SC{\_}BC{\_}BASE{\_}MAX}{823}{\code {_SC_BC_BASE_MAX}} +\entry{{\_}SC{\_}BC{\_}DIM{\_}MAX}{823}{\code {_SC_BC_DIM_MAX}} +\entry{{\_}SC{\_}BC{\_}SCALE{\_}MAX}{823}{\code {_SC_BC_SCALE_MAX}} +\entry{{\_}SC{\_}BC{\_}STRING{\_}MAX}{823}{\code {_SC_BC_STRING_MAX}} +\entry{{\_}SC{\_}COLL{\_}WEIGHTS{\_}MAX}{823}{\code {_SC_COLL_WEIGHTS_MAX}} +\entry{{\_}SC{\_}EXPR{\_}NEST{\_}MAX}{823}{\code {_SC_EXPR_NEST_MAX}} +\entry{{\_}SC{\_}LINE{\_}MAX}{823}{\code {_SC_LINE_MAX}} +\entry{{\_}SC{\_}EQUIV{\_}CLASS{\_}MAX}{823}{\code {_SC_EQUIV_CLASS_MAX}} +\entry{{\_}SC{\_}VERSION}{823}{\code {_SC_VERSION}} +\entry{{\_}SC{\_}2{\_}VERSION}{823}{\code {_SC_2_VERSION}} +\entry{{\_}SC{\_}PAGESIZE}{823}{\code {_SC_PAGESIZE}} +\entry{{\_}SC{\_}NPROCESSORS{\_}CONF}{823}{\code {_SC_NPROCESSORS_CONF}} +\entry{{\_}SC{\_}NPROCESSORS{\_}ONLN}{823}{\code {_SC_NPROCESSORS_ONLN}} +\entry{{\_}SC{\_}PHYS{\_}PAGES}{824}{\code {_SC_PHYS_PAGES}} +\entry{{\_}SC{\_}AVPHYS{\_}PAGES}{824}{\code {_SC_AVPHYS_PAGES}} +\entry{{\_}SC{\_}ATEXIT{\_}MAX}{824}{\code {_SC_ATEXIT_MAX}} +\entry{{\_}SC{\_}XOPEN{\_}VERSION}{824}{\code {_SC_XOPEN_VERSION}} +\entry{{\_}SC{\_}XOPEN{\_}XCU{\_}VERSION}{824}{\code {_SC_XOPEN_XCU_VERSION}} +\entry{{\_}SC{\_}XOPEN{\_}UNIX}{824}{\code {_SC_XOPEN_UNIX}} +\entry{{\_}SC{\_}XOPEN{\_}REALTIME}{824}{\code {_SC_XOPEN_REALTIME}} +\entry{{\_}SC{\_}XOPEN{\_}REALTIME{\_}THREADS}{824}{\code {_SC_XOPEN_REALTIME_THREADS}} +\entry{{\_}SC{\_}XOPEN{\_}LEGACY}{824}{\code {_SC_XOPEN_LEGACY}} +\entry{{\_}SC{\_}XOPEN{\_}CRYPT}{824}{\code {_SC_XOPEN_CRYPT}} +\entry{{\_}SC{\_}XOPEN{\_}ENH{\_}I18N}{824}{\code {_SC_XOPEN_ENH_I18N}} +\entry{{\_}SC{\_}XOPEN{\_}SHM}{824}{\code {_SC_XOPEN_SHM}} +\entry{{\_}SC{\_}XOPEN{\_}XPG2}{824}{\code {_SC_XOPEN_XPG2}} +\entry{{\_}SC{\_}XOPEN{\_}XPG3}{824}{\code {_SC_XOPEN_XPG3}} +\entry{{\_}SC{\_}XOPEN{\_}XPG4}{824}{\code {_SC_XOPEN_XPG4}} +\entry{{\_}SC{\_}CHAR{\_}BIT}{824}{\code {_SC_CHAR_BIT}} +\entry{{\_}SC{\_}CHAR{\_}MAX}{824}{\code {_SC_CHAR_MAX}} +\entry{{\_}SC{\_}CHAR{\_}MIN}{825}{\code {_SC_CHAR_MIN}} +\entry{{\_}SC{\_}INT{\_}MAX}{825}{\code {_SC_INT_MAX}} +\entry{{\_}SC{\_}INT{\_}MIN}{825}{\code {_SC_INT_MIN}} +\entry{{\_}SC{\_}LONG{\_}BIT}{825}{\code {_SC_LONG_BIT}} +\entry{{\_}SC{\_}WORD{\_}BIT}{825}{\code {_SC_WORD_BIT}} +\entry{{\_}SC{\_}MB{\_}LEN{\_}MAX}{825}{\code {_SC_MB_LEN_MAX}} +\entry{{\_}SC{\_}NZERO}{825}{\code {_SC_NZERO}} +\entry{SC{\_}SSIZE{\_}MAX}{825}{\code {SC_SSIZE_MAX}} +\entry{{\_}SC{\_}SCHAR{\_}MAX}{825}{\code {_SC_SCHAR_MAX}} +\entry{{\_}SC{\_}SCHAR{\_}MIN}{825}{\code {_SC_SCHAR_MIN}} +\entry{{\_}SC{\_}SHRT{\_}MAX}{825}{\code {_SC_SHRT_MAX}} +\entry{{\_}SC{\_}SHRT{\_}MIN}{825}{\code {_SC_SHRT_MIN}} +\entry{{\_}SC{\_}UCHAR{\_}MAX}{825}{\code {_SC_UCHAR_MAX}} +\entry{{\_}SC{\_}UINT{\_}MAX}{825}{\code {_SC_UINT_MAX}} +\entry{{\_}SC{\_}ULONG{\_}MAX}{826}{\code {_SC_ULONG_MAX}} +\entry{{\_}SC{\_}USHRT{\_}MAX}{826}{\code {_SC_USHRT_MAX}} +\entry{{\_}SC{\_}NL{\_}ARGMAX}{826}{\code {_SC_NL_ARGMAX}} +\entry{{\_}SC{\_}NL{\_}LANGMAX}{826}{\code {_SC_NL_LANGMAX}} +\entry{{\_}SC{\_}NL{\_}MSGMAX}{826}{\code {_SC_NL_MSGMAX}} +\entry{{\_}SC{\_}NL{\_}NMAX}{826}{\code {_SC_NL_NMAX}} +\entry{{\_}SC{\_}NL{\_}SETMAX}{826}{\code {_SC_NL_SETMAX}} +\entry{{\_}SC{\_}NL{\_}TEXTMAX}{826}{\code {_SC_NL_TEXTMAX}} +\entry{LINK{\_}MAX}{828}{\code {LINK_MAX}} +\entry{MAX{\_}CANON}{828}{\code {MAX_CANON}} +\entry{MAX{\_}INPUT}{828}{\code {MAX_INPUT}} +\entry{NAME{\_}MAX}{828}{\code {NAME_MAX}} +\entry{PATH{\_}MAX}{829}{\code {PATH_MAX}} +\entry{PIPE{\_}BUF}{829}{\code {PIPE_BUF}} +\entry{MAXNAMLEN}{829}{\code {MAXNAMLEN}} +\entry{FILENAME{\_}MAX}{829}{\code {FILENAME_MAX}} +\entry{{\_}POSIX{\_}CHOWN{\_}RESTRICTED}{829}{\code {_POSIX_CHOWN_RESTRICTED}} +\entry{{\_}POSIX{\_}NO{\_}TRUNC}{830}{\code {_POSIX_NO_TRUNC}} +\entry{{\_}POSIX{\_}VDISABLE}{830}{\code {_POSIX_VDISABLE}} +\entry{BC{\_}BASE{\_}MAX}{833}{\code {BC_BASE_MAX}} +\entry{BC{\_}DIM{\_}MAX}{833}{\code {BC_DIM_MAX}} +\entry{BC{\_}SCALE{\_}MAX}{833}{\code {BC_SCALE_MAX}} +\entry{BC{\_}STRING{\_}MAX}{833}{\code {BC_STRING_MAX}} +\entry{COLL{\_}WEIGHTS{\_}MAX}{833}{\code {COLL_WEIGHTS_MAX}} +\entry{EXPR{\_}NEST{\_}MAX}{833}{\code {EXPR_NEST_MAX}} +\entry{LINE{\_}MAX}{833}{\code {LINE_MAX}} +\entry{EQUIV{\_}CLASS{\_}MAX}{833}{\code {EQUIV_CLASS_MAX}} +\entry{DES{\_}ENCRYPT}{842}{\code {DES_ENCRYPT}} +\entry{DES{\_}DECRYPT}{842}{\code {DES_DECRYPT}} +\entry{DES{\_}HW}{842}{\code {DES_HW}} +\entry{DES{\_}SW}{842}{\code {DES_SW}} +\entry{DESERR{\_}NONE}{842}{\code {DESERR_NONE}} +\entry{DESERR{\_}NOHWDEVICE}{842}{\code {DESERR_NOHWDEVICE}} +\entry{DESERR{\_}HWERROR}{842}{\code {DESERR_HWERROR}} +\entry{DESERR{\_}BADPARAM}{842}{\code {DESERR_BADPARAM}} +\entry{SEM{\_}VALUE{\_}MAX}{862}{\code {SEM_VALUE_MAX}} +\entry{NDEBUG}{871}{\code {NDEBUG}} +\entry{NULL}{878}{\code {NULL}} +\entry{SCHAR{\_}MIN}{880}{\code {SCHAR_MIN}} +\entry{SCHAR{\_}MAX}{880}{\code {SCHAR_MAX}} +\entry{UCHAR{\_}MAX}{880}{\code {UCHAR_MAX}} +\entry{CHAR{\_}MIN}{880}{\code {CHAR_MIN}} +\entry{CHAR{\_}MAX}{881}{\code {CHAR_MAX}} +\entry{SHRT{\_}MIN}{881}{\code {SHRT_MIN}} +\entry{SHRT{\_}MAX}{881}{\code {SHRT_MAX}} +\entry{USHRT{\_}MAX}{881}{\code {USHRT_MAX}} +\entry{INT{\_}MIN}{881}{\code {INT_MIN}} +\entry{INT{\_}MAX}{881}{\code {INT_MAX}} +\entry{UINT{\_}MAX}{881}{\code {UINT_MAX}} +\entry{LONG{\_}MIN}{881}{\code {LONG_MIN}} +\entry{LONG{\_}MAX}{881}{\code {LONG_MAX}} +\entry{ULONG{\_}MAX}{881}{\code {ULONG_MAX}} +\entry{LONG{\_}LONG{\_}MIN}{881}{\code {LONG_LONG_MIN}} +\entry{LONG{\_}LONG{\_}MAX}{881}{\code {LONG_LONG_MAX}} +\entry{ULONG{\_}LONG{\_}MAX}{881}{\code {ULONG_LONG_MAX}} +\entry{WCHAR{\_}MAX}{881}{\code {WCHAR_MAX}} +\entry{FLT{\_}ROUNDS}{883}{\code {FLT_ROUNDS}} +\entry{FLT{\_}RADIX}{884}{\code {FLT_RADIX}} +\entry{FLT{\_}MANT{\_}DIG}{884}{\code {FLT_MANT_DIG}} +\entry{DBL{\_}MANT{\_}DIG}{884}{\code {DBL_MANT_DIG}} +\entry{LDBL{\_}MANT{\_}DIG}{884}{\code {LDBL_MANT_DIG}} +\entry{FLT{\_}DIG}{884}{\code {FLT_DIG}} +\entry{DBL{\_}DIG}{884}{\code {DBL_DIG}} +\entry{LDBL{\_}DIG}{884}{\code {LDBL_DIG}} +\entry{FLT{\_}MIN{\_}EXP}{884}{\code {FLT_MIN_EXP}} +\entry{DBL{\_}MIN{\_}EXP}{885}{\code {DBL_MIN_EXP}} +\entry{LDBL{\_}MIN{\_}EXP}{885}{\code {LDBL_MIN_EXP}} +\entry{FLT{\_}MIN{\_}10{\_}EXP}{885}{\code {FLT_MIN_10_EXP}} +\entry{DBL{\_}MIN{\_}10{\_}EXP}{885}{\code {DBL_MIN_10_EXP}} +\entry{LDBL{\_}MIN{\_}10{\_}EXP}{885}{\code {LDBL_MIN_10_EXP}} +\entry{FLT{\_}MAX{\_}EXP}{885}{\code {FLT_MAX_EXP}} +\entry{DBL{\_}MAX{\_}EXP}{885}{\code {DBL_MAX_EXP}} +\entry{LDBL{\_}MAX{\_}EXP}{885}{\code {LDBL_MAX_EXP}} +\entry{FLT{\_}MAX{\_}10{\_}EXP}{885}{\code {FLT_MAX_10_EXP}} +\entry{DBL{\_}MAX{\_}10{\_}EXP}{885}{\code {DBL_MAX_10_EXP}} +\entry{LDBL{\_}MAX{\_}10{\_}EXP}{885}{\code {LDBL_MAX_10_EXP}} +\entry{FLT{\_}MAX}{885}{\code {FLT_MAX}} +\entry{DBL{\_}MAX}{885}{\code {DBL_MAX}} +\entry{LDBL{\_}MAX}{885}{\code {LDBL_MAX}} +\entry{FLT{\_}MIN}{885}{\code {FLT_MIN}} +\entry{DBL{\_}MIN}{886}{\code {DBL_MIN}} +\entry{LDBL{\_}MIN}{886}{\code {LDBL_MIN}} +\entry{FLT{\_}EPSILON}{886}{\code {FLT_EPSILON}} +\entry{DBL{\_}EPSILON}{886}{\code {DBL_EPSILON}} +\entry{LDBL{\_}EPSILON}{886}{\code {LDBL_EPSILON}} diff -durpN glibc-2.2.4/manual/libc.vrs glibc-2.2.5/manual/libc.vrs --- glibc-2.2.4/manual/libc.vrs Mon Aug 13 15:03:57 2001 +++ glibc-2.2.5/manual/libc.vrs Sun Jan 20 19:29:12 2002 @@ -1,326 +1,326 @@ \initial {(} -\entry {\code {(*__gconv_end_fct)}}{153} -\entry {\code {(*__gconv_fct)}}{153} -\entry {\code {(*__gconv_init_fct)}}{150} +\entry {\code {(*__gconv_end_fct)}}{157} +\entry {\code {(*__gconv_fct)}}{157} +\entry {\code {(*__gconv_init_fct)}}{154} \initial {{\_}} -\entry {\code {__free_hook}}{40} -\entry {\code {__malloc_hook}}{39} -\entry {\code {__malloc_initialize_hook}}{40} -\entry {\code {__memalign_hook}}{40} -\entry {\code {__realloc_hook}}{39} +\entry {\code {__free_hook}}{44} +\entry {\code {__malloc_hook}}{43} +\entry {\code {__malloc_initialize_hook}}{44} +\entry {\code {__memalign_hook}}{44} +\entry {\code {__realloc_hook}}{43} \entry {\code {_BSD_SOURCE}}{8} -\entry {\code {_Complex_I}}{542} +\entry {\code {_Complex_I}}{560} \entry {\code {_FILE_OFFSET_BITS}}{9} \entry {\code {_GNU_SOURCE}}{10} -\entry {\code {_IOFBF}}{300} -\entry {\code {_IOLBF}}{300} -\entry {\code {_IONBF}}{300} +\entry {\code {_IOFBF}}{306} +\entry {\code {_IOLBF}}{306} +\entry {\code {_IONBF}}{306} \entry {\code {_ISOC99_SOURCE}}{9} \entry {\code {_LARGEFILE_SOURCE}}{9} \entry {\code {_LARGEFILE64_SOURCE}}{9} -\entry {\code {_PATH_FSTAB}}{785} -\entry {\code {_PATH_MNTTAB}}{785} -\entry {\code {_PATH_MOUNTED}}{785} -\entry {\code {_PATH_UTMP}}{768} -\entry {\code {_PATH_WTMP}}{768} +\entry {\code {_PATH_FSTAB}}{803} +\entry {\code {_PATH_MNTTAB}}{803} +\entry {\code {_PATH_MOUNTED}}{803} +\entry {\code {_PATH_UTMP}}{786} +\entry {\code {_PATH_WTMP}}{786} \entry {\code {_POSIX_C_SOURCE}}{8} -\entry {\code {_POSIX_CHOWN_RESTRICTED}}{811} -\entry {\code {_POSIX_JOB_CONTROL}}{798} -\entry {\code {_POSIX_NO_TRUNC}}{812} -\entry {\code {_POSIX_SAVED_IDS}}{798} +\entry {\code {_POSIX_CHOWN_RESTRICTED}}{829} +\entry {\code {_POSIX_JOB_CONTROL}}{816} +\entry {\code {_POSIX_NO_TRUNC}}{830} +\entry {\code {_POSIX_SAVED_IDS}}{816} \entry {\code {_POSIX_SOURCE}}{7} -\entry {\code {_POSIX_VDISABLE}}{471, 812} -\entry {\code {_POSIX_VERSION}}{799} -\entry {\code {_POSIX2_C_DEV}}{799} -\entry {\code {_POSIX2_C_VERSION}}{800} -\entry {\code {_POSIX2_FORT_DEV}}{799} -\entry {\code {_POSIX2_FORT_RUN}}{799} -\entry {\code {_POSIX2_LOCALEDEF}}{799} -\entry {\code {_POSIX2_SW_DEV}}{799} +\entry {\code {_POSIX_VDISABLE}}{479, 830} +\entry {\code {_POSIX_VERSION}}{817} +\entry {\code {_POSIX2_C_DEV}}{817} +\entry {\code {_POSIX2_C_VERSION}}{818} +\entry {\code {_POSIX2_FORT_DEV}}{817} +\entry {\code {_POSIX2_FORT_RUN}}{817} +\entry {\code {_POSIX2_LOCALEDEF}}{817} +\entry {\code {_POSIX2_SW_DEV}}{817} \entry {\code {_REENTRANT}}{10} -\entry {\code {_SC_2_C_DEV}}{804} -\entry {\code {_SC_2_FORT_DEV}}{804} -\entry {\code {_SC_2_FORT_RUN}}{804} -\entry {\code {_SC_2_LOCALEDEF}}{804} -\entry {\code {_SC_2_SW_DEV}}{805} -\entry {\code {_SC_2_VERSION}}{805} -\entry {\code {_SC_AIO_LISTIO_MAX}}{802} -\entry {\code {_SC_AIO_MAX}}{802} -\entry {\code {_SC_AIO_PRIO_DELTA_MAX}}{802} -\entry {\code {_SC_ARG_MAX}}{800} -\entry {\code {_SC_ASYNCHRONOUS_IO}}{801} -\entry {\code {_SC_ATEXIT_MAX}}{806} -\entry {\code {_SC_AVPHYS_PAGES}}{603, 806} -\entry {\code {_SC_BC_BASE_MAX}}{805} -\entry {\code {_SC_BC_DIM_MAX}}{805} -\entry {\code {_SC_BC_SCALE_MAX}}{805} -\entry {\code {_SC_BC_STRING_MAX}}{805} -\entry {\code {_SC_CHAR_BIT}}{806} -\entry {\code {_SC_CHAR_MAX}}{806} -\entry {\code {_SC_CHAR_MIN}}{807} -\entry {\code {_SC_CHARCLASS_NAME_MAX}}{801} -\entry {\code {_SC_CHILD_MAX}}{800} -\entry {\code {_SC_CLK_TCK}}{801} -\entry {\code {_SC_COLL_WEIGHTS_MAX}}{805} -\entry {\code {_SC_DELAYTIMER_MAX}}{802} -\entry {\code {_SC_EQUIV_CLASS_MAX}}{805} -\entry {\code {_SC_EXPR_NEST_MAX}}{805} -\entry {\code {_SC_FSYNC}}{801} -\entry {\code {_SC_GETGR_R_SIZE_MAX}}{803} -\entry {\code {_SC_GETPW_R_SIZE_MAX}}{803} -\entry {\code {_SC_INT_MAX}}{807} -\entry {\code {_SC_INT_MIN}}{807} -\entry {\code {_SC_JOB_CONTROL}}{801} -\entry {\code {_SC_LINE_MAX}}{805} -\entry {\code {_SC_LOGIN_NAME_MAX}}{803} -\entry {\code {_SC_LONG_BIT}}{807} -\entry {\code {_SC_MAPPED_FILES}}{801} -\entry {\code {_SC_MB_LEN_MAX}}{807} -\entry {\code {_SC_MEMLOCK}}{801} -\entry {\code {_SC_MEMLOCK_RANGE}}{802} -\entry {\code {_SC_MEMORY_PROTECTION}}{802} -\entry {\code {_SC_MESSAGE_PASSING}}{802} -\entry {\code {_SC_MQ_OPEN_MAX}}{802} -\entry {\code {_SC_MQ_PRIO_MAX}}{802} -\entry {\code {_SC_NGROUPS_MAX}}{801} -\entry {\code {_SC_NL_ARGMAX}}{808} -\entry {\code {_SC_NL_LANGMAX}}{808} -\entry {\code {_SC_NL_MSGMAX}}{808} -\entry {\code {_SC_NL_NMAX}}{808} -\entry {\code {_SC_NL_SETMAX}}{808} -\entry {\code {_SC_NL_TEXTMAX}}{808} -\entry {\code {_SC_NPROCESSORS_CONF}}{604, 805} -\entry {\code {_SC_NPROCESSORS_ONLN}}{604, 805} -\entry {\code {_SC_NZERO}}{807} -\entry {\code {_SC_OPEN_MAX}}{800} -\entry {\code {_SC_PAGESIZE}}{327, 603, 805} -\entry {\code {_SC_PHYS_PAGES}}{603, 806} -\entry {\code {_SC_PII}}{802} -\entry {\code {_SC_PII_INTERNET}}{803} -\entry {\code {_SC_PII_INTERNET_DGRAM}}{803} -\entry {\code {_SC_PII_INTERNET_STREAM}}{803} -\entry {\code {_SC_PII_OSI}}{803} -\entry {\code {_SC_PII_OSI_CLTS}}{803} -\entry {\code {_SC_PII_OSI_COTS}}{803} -\entry {\code {_SC_PII_OSI_M}}{803} -\entry {\code {_SC_PII_SOCKET}}{803} -\entry {\code {_SC_PII_XTI}}{803} -\entry {\code {_SC_PRIORITIZED_IO}}{801} -\entry {\code {_SC_PRIORITY_SCHEDULING}}{801} -\entry {\code {_SC_REALTIME_SIGNALS}}{801} -\entry {\code {_SC_RTSIG_MAX}}{802} -\entry {\code {_SC_SAVED_IDS}}{801} -\entry {\code {_SC_SCHAR_MAX}}{807} -\entry {\code {_SC_SCHAR_MIN}}{807} -\entry {\code {_SC_SELECT}}{803} -\entry {\code {_SC_SEM_NSEMS_MAX}}{802} -\entry {\code {_SC_SEM_VALUE_MAX}}{802} -\entry {\code {_SC_SEMAPHORES}}{802} -\entry {\code {_SC_SHARED_MEMORY_OBJECTS}}{802} -\entry {\code {_SC_SHRT_MAX}}{807} -\entry {\code {_SC_SHRT_MIN}}{807} -\entry {\code {_SC_SIGQUEUE_MAX}}{802} -\entry {\code {_SC_STREAM_MAX}}{801} -\entry {\code {_SC_SYNCHRONIZED_IO}}{801} -\entry {\code {_SC_T_IOV_MAX}}{803} -\entry {\code {_SC_THREAD_ATTR_STACKADDR}}{804} -\entry {\code {_SC_THREAD_ATTR_STACKSIZE}}{804} -\entry {\code {_SC_THREAD_DESTRUCTOR_ITERATIONS}}{804} -\entry {\code {_SC_THREAD_KEYS_MAX}}{804} -\entry {\code {_SC_THREAD_PRIO_INHERIT}}{804} -\entry {\code {_SC_THREAD_PRIO_PROTECT}}{804} -\entry {\code {_SC_THREAD_PRIORITY_SCHEDULING}}{804} -\entry {\code {_SC_THREAD_PROCESS_SHARED}}{804} -\entry {\code {_SC_THREAD_SAFE_FUNCTIONS}}{803} -\entry {\code {_SC_THREAD_STACK_MIN}}{804} -\entry {\code {_SC_THREAD_THREADS_MAX}}{804} -\entry {\code {_SC_THREADS}}{803} -\entry {\code {_SC_TIMER_MAX}}{802} -\entry {\code {_SC_TIMERS}}{801} -\entry {\code {_SC_TTY_NAME_MAX}}{804} -\entry {\code {_SC_TZNAME_MAX}}{801} -\entry {\code {_SC_UCHAR_MAX}}{807} -\entry {\code {_SC_UINT_MAX}}{807} -\entry {\code {_SC_UIO_MAXIOV}}{803} -\entry {\code {_SC_ULONG_MAX}}{808} -\entry {\code {_SC_USHRT_MAX}}{808} -\entry {\code {_SC_VERSION}}{801, 805} -\entry {\code {_SC_WORD_BIT}}{807} -\entry {\code {_SC_XOPEN_CRYPT}}{806} -\entry {\code {_SC_XOPEN_ENH_I18N}}{806} -\entry {\code {_SC_XOPEN_LEGACY}}{806} -\entry {\code {_SC_XOPEN_REALTIME}}{806} -\entry {\code {_SC_XOPEN_REALTIME_THREADS}}{806} -\entry {\code {_SC_XOPEN_SHM}}{806} -\entry {\code {_SC_XOPEN_UNIX}}{806} -\entry {\code {_SC_XOPEN_VERSION}}{806} -\entry {\code {_SC_XOPEN_XCU_VERSION}}{806} -\entry {\code {_SC_XOPEN_XPG2}}{806} -\entry {\code {_SC_XOPEN_XPG3}}{806} -\entry {\code {_SC_XOPEN_XPG4}}{806} +\entry {\code {_SC_2_C_DEV}}{822} +\entry {\code {_SC_2_FORT_DEV}}{822} +\entry {\code {_SC_2_FORT_RUN}}{822} +\entry {\code {_SC_2_LOCALEDEF}}{822} +\entry {\code {_SC_2_SW_DEV}}{823} +\entry {\code {_SC_2_VERSION}}{823} +\entry {\code {_SC_AIO_LISTIO_MAX}}{820} +\entry {\code {_SC_AIO_MAX}}{820} +\entry {\code {_SC_AIO_PRIO_DELTA_MAX}}{820} +\entry {\code {_SC_ARG_MAX}}{818} +\entry {\code {_SC_ASYNCHRONOUS_IO}}{819} +\entry {\code {_SC_ATEXIT_MAX}}{824} +\entry {\code {_SC_AVPHYS_PAGES}}{621, 824} +\entry {\code {_SC_BC_BASE_MAX}}{823} +\entry {\code {_SC_BC_DIM_MAX}}{823} +\entry {\code {_SC_BC_SCALE_MAX}}{823} +\entry {\code {_SC_BC_STRING_MAX}}{823} +\entry {\code {_SC_CHAR_BIT}}{824} +\entry {\code {_SC_CHAR_MAX}}{824} +\entry {\code {_SC_CHAR_MIN}}{825} +\entry {\code {_SC_CHARCLASS_NAME_MAX}}{819} +\entry {\code {_SC_CHILD_MAX}}{818} +\entry {\code {_SC_CLK_TCK}}{819} +\entry {\code {_SC_COLL_WEIGHTS_MAX}}{823} +\entry {\code {_SC_DELAYTIMER_MAX}}{820} +\entry {\code {_SC_EQUIV_CLASS_MAX}}{823} +\entry {\code {_SC_EXPR_NEST_MAX}}{823} +\entry {\code {_SC_FSYNC}}{819} +\entry {\code {_SC_GETGR_R_SIZE_MAX}}{821} +\entry {\code {_SC_GETPW_R_SIZE_MAX}}{821} +\entry {\code {_SC_INT_MAX}}{825} +\entry {\code {_SC_INT_MIN}}{825} +\entry {\code {_SC_JOB_CONTROL}}{819} +\entry {\code {_SC_LINE_MAX}}{823} +\entry {\code {_SC_LOGIN_NAME_MAX}}{821} +\entry {\code {_SC_LONG_BIT}}{825} +\entry {\code {_SC_MAPPED_FILES}}{819} +\entry {\code {_SC_MB_LEN_MAX}}{825} +\entry {\code {_SC_MEMLOCK}}{819} +\entry {\code {_SC_MEMLOCK_RANGE}}{820} +\entry {\code {_SC_MEMORY_PROTECTION}}{820} +\entry {\code {_SC_MESSAGE_PASSING}}{820} +\entry {\code {_SC_MQ_OPEN_MAX}}{820} +\entry {\code {_SC_MQ_PRIO_MAX}}{820} +\entry {\code {_SC_NGROUPS_MAX}}{819} +\entry {\code {_SC_NL_ARGMAX}}{826} +\entry {\code {_SC_NL_LANGMAX}}{826} +\entry {\code {_SC_NL_MSGMAX}}{826} +\entry {\code {_SC_NL_NMAX}}{826} +\entry {\code {_SC_NL_SETMAX}}{826} +\entry {\code {_SC_NL_TEXTMAX}}{826} +\entry {\code {_SC_NPROCESSORS_CONF}}{622, 823} +\entry {\code {_SC_NPROCESSORS_ONLN}}{622, 823} +\entry {\code {_SC_NZERO}}{825} +\entry {\code {_SC_OPEN_MAX}}{818} +\entry {\code {_SC_PAGESIZE}}{333, 621, 823} +\entry {\code {_SC_PHYS_PAGES}}{621, 824} +\entry {\code {_SC_PII}}{820} +\entry {\code {_SC_PII_INTERNET}}{821} +\entry {\code {_SC_PII_INTERNET_DGRAM}}{821} +\entry {\code {_SC_PII_INTERNET_STREAM}}{821} +\entry {\code {_SC_PII_OSI}}{821} +\entry {\code {_SC_PII_OSI_CLTS}}{821} +\entry {\code {_SC_PII_OSI_COTS}}{821} +\entry {\code {_SC_PII_OSI_M}}{821} +\entry {\code {_SC_PII_SOCKET}}{821} +\entry {\code {_SC_PII_XTI}}{821} +\entry {\code {_SC_PRIORITIZED_IO}}{819} +\entry {\code {_SC_PRIORITY_SCHEDULING}}{819} +\entry {\code {_SC_REALTIME_SIGNALS}}{819} +\entry {\code {_SC_RTSIG_MAX}}{820} +\entry {\code {_SC_SAVED_IDS}}{819} +\entry {\code {_SC_SCHAR_MAX}}{825} +\entry {\code {_SC_SCHAR_MIN}}{825} +\entry {\code {_SC_SELECT}}{821} +\entry {\code {_SC_SEM_NSEMS_MAX}}{820} +\entry {\code {_SC_SEM_VALUE_MAX}}{820} +\entry {\code {_SC_SEMAPHORES}}{820} +\entry {\code {_SC_SHARED_MEMORY_OBJECTS}}{820} +\entry {\code {_SC_SHRT_MAX}}{825} +\entry {\code {_SC_SHRT_MIN}}{825} +\entry {\code {_SC_SIGQUEUE_MAX}}{820} +\entry {\code {_SC_STREAM_MAX}}{819} +\entry {\code {_SC_SYNCHRONIZED_IO}}{819} +\entry {\code {_SC_T_IOV_MAX}}{821} +\entry {\code {_SC_THREAD_ATTR_STACKADDR}}{822} +\entry {\code {_SC_THREAD_ATTR_STACKSIZE}}{822} +\entry {\code {_SC_THREAD_DESTRUCTOR_ITERATIONS}}{822} +\entry {\code {_SC_THREAD_KEYS_MAX}}{822} +\entry {\code {_SC_THREAD_PRIO_INHERIT}}{822} +\entry {\code {_SC_THREAD_PRIO_PROTECT}}{822} +\entry {\code {_SC_THREAD_PRIORITY_SCHEDULING}}{822} +\entry {\code {_SC_THREAD_PROCESS_SHARED}}{822} +\entry {\code {_SC_THREAD_SAFE_FUNCTIONS}}{821} +\entry {\code {_SC_THREAD_STACK_MIN}}{822} +\entry {\code {_SC_THREAD_THREADS_MAX}}{822} +\entry {\code {_SC_THREADS}}{821} +\entry {\code {_SC_TIMER_MAX}}{820} +\entry {\code {_SC_TIMERS}}{819} +\entry {\code {_SC_TTY_NAME_MAX}}{822} +\entry {\code {_SC_TZNAME_MAX}}{819} +\entry {\code {_SC_UCHAR_MAX}}{825} +\entry {\code {_SC_UINT_MAX}}{825} +\entry {\code {_SC_UIO_MAXIOV}}{821} +\entry {\code {_SC_ULONG_MAX}}{826} +\entry {\code {_SC_USHRT_MAX}}{826} +\entry {\code {_SC_VERSION}}{819, 823} +\entry {\code {_SC_WORD_BIT}}{825} +\entry {\code {_SC_XOPEN_CRYPT}}{824} +\entry {\code {_SC_XOPEN_ENH_I18N}}{824} +\entry {\code {_SC_XOPEN_LEGACY}}{824} +\entry {\code {_SC_XOPEN_REALTIME}}{824} +\entry {\code {_SC_XOPEN_REALTIME_THREADS}}{824} +\entry {\code {_SC_XOPEN_SHM}}{824} +\entry {\code {_SC_XOPEN_UNIX}}{824} +\entry {\code {_SC_XOPEN_VERSION}}{824} +\entry {\code {_SC_XOPEN_XCU_VERSION}}{824} +\entry {\code {_SC_XOPEN_XPG2}}{824} +\entry {\code {_SC_XOPEN_XPG3}}{824} +\entry {\code {_SC_XOPEN_XPG4}}{824} \entry {\code {_SVID_SOURCE}}{8} \entry {\code {_THREAD_SAFE}}{10} \entry {\code {_XOPEN_SOURCE}}{8} \entry {\code {_XOPEN_SOURCE_EXTENDED}}{8} \initial {A} -\entry {\code {ABDAY_1}}{168} -\entry {\code {ABDAY_2}}{168} -\entry {\code {ABDAY_3}}{168} -\entry {\code {ABDAY_4}}{168} -\entry {\code {ABDAY_5}}{168} -\entry {\code {ABDAY_6}}{168} -\entry {\code {ABDAY_7}}{168} -\entry {\code {ABMON_1}}{168} -\entry {\code {ABMON_10}}{168} -\entry {\code {ABMON_11}}{168} -\entry {\code {ABMON_12}}{168} -\entry {\code {ABMON_2}}{168} -\entry {\code {ABMON_3}}{168} -\entry {\code {ABMON_4}}{168} -\entry {\code {ABMON_5}}{168} -\entry {\code {ABMON_6}}{168} -\entry {\code {ABMON_7}}{168} -\entry {\code {ABMON_8}}{168} -\entry {\code {ABMON_9}}{168} -\entry {\code {ACCOUNTING}}{765} -\entry {\code {AF_FILE}}{412} -\entry {\code {AF_INET}}{412} -\entry {\code {AF_LOCAL}}{412} -\entry {\code {AF_UNIX}}{412} -\entry {\code {AF_UNSPEC}}{412} -\entry {\code {aliases}}{743} -\entry {\code {ALT_DIGITS}}{170} -\entry {\code {ALTWERASE}}{469} -\entry {\code {AM_STR}}{169} -\entry {\code {ARG_MAX}}{797} -\entry {\code {argp_err_exit_status}}{676} -\entry {\code {ARGP_ERR_UNKNOWN}}{679} -\entry {\code {ARGP_HELP_BUG_ADDR}}{688} -\entry {\code {ARGP_HELP_DOC}}{688} -\entry {\code {ARGP_HELP_EXIT_ERR}}{688} -\entry {\code {ARGP_HELP_EXIT_OK}}{688} -\entry {\code {ARGP_HELP_LONG}}{687} -\entry {\code {ARGP_HELP_LONG_ONLY}}{688} -\entry {\code {ARGP_HELP_POST_DOC}}{687} -\entry {\code {ARGP_HELP_PRE_DOC}}{687} -\entry {\code {ARGP_HELP_SEE}}{687} -\entry {\code {ARGP_HELP_SHORT_USAGE}}{687} -\entry {\code {ARGP_HELP_STD_ERR}}{688} -\entry {\code {ARGP_HELP_STD_HELP}}{688} -\entry {\code {ARGP_HELP_STD_USAGE}}{688} -\entry {\code {ARGP_HELP_USAGE}}{687} -\entry {\code {ARGP_IN_ORDER}}{685} -\entry {\code {ARGP_KEY_ARG}}{680} -\entry {\code {ARGP_KEY_ARGS}}{680} -\entry {\code {ARGP_KEY_END}}{680} -\entry {\code {ARGP_KEY_ERROR}}{681} -\entry {\code {ARGP_KEY_FINI}}{681} -\entry {\code {ARGP_KEY_HELP_ARGS_DOC}}{687} -\entry {\code {ARGP_KEY_HELP_DUP_ARGS_NOTE}}{686} -\entry {\code {ARGP_KEY_HELP_EXTRA}}{686} -\entry {\code {ARGP_KEY_HELP_HEADER}}{686} -\entry {\code {ARGP_KEY_HELP_POST_DOC}}{686} -\entry {\code {ARGP_KEY_HELP_PRE_DOC}}{686} -\entry {\code {ARGP_KEY_INIT}}{681} -\entry {\code {ARGP_KEY_NO_ARGS}}{680} -\entry {\code {ARGP_KEY_SUCCESS}}{681} -\entry {\code {ARGP_LONG_ONLY}}{686} -\entry {\code {ARGP_NO_ARGS}}{685} -\entry {\code {ARGP_NO_ERRS}}{685} -\entry {\code {ARGP_NO_EXIT}}{686} -\entry {\code {ARGP_NO_HELP}}{685} -\entry {\code {ARGP_PARSE_ARGV0}}{685} -\entry {\code {argp_program_bug_address}}{675} -\entry {\code {argp_program_version}}{675} -\entry {\code {argp_program_version_hook}}{675} -\entry {\code {ARGP_SILENT}}{686} +\entry {\code {ABDAY_1}}{172} +\entry {\code {ABDAY_2}}{172} +\entry {\code {ABDAY_3}}{172} +\entry {\code {ABDAY_4}}{172} +\entry {\code {ABDAY_5}}{172} +\entry {\code {ABDAY_6}}{172} +\entry {\code {ABDAY_7}}{172} +\entry {\code {ABMON_1}}{172} +\entry {\code {ABMON_10}}{172} +\entry {\code {ABMON_11}}{172} +\entry {\code {ABMON_12}}{172} +\entry {\code {ABMON_2}}{172} +\entry {\code {ABMON_3}}{172} +\entry {\code {ABMON_4}}{172} +\entry {\code {ABMON_5}}{172} +\entry {\code {ABMON_6}}{172} +\entry {\code {ABMON_7}}{172} +\entry {\code {ABMON_8}}{172} +\entry {\code {ABMON_9}}{172} +\entry {\code {ACCOUNTING}}{783} +\entry {\code {AF_FILE}}{420} +\entry {\code {AF_INET}}{420} +\entry {\code {AF_LOCAL}}{420} +\entry {\code {AF_UNIX}}{420} +\entry {\code {AF_UNSPEC}}{420} +\entry {\code {aliases}}{761} +\entry {\code {ALT_DIGITS}}{174} +\entry {\code {ALTWERASE}}{477} +\entry {\code {AM_STR}}{173} +\entry {\code {ARG_MAX}}{815} +\entry {\code {argp_err_exit_status}}{694} +\entry {\code {ARGP_ERR_UNKNOWN}}{697} +\entry {\code {ARGP_HELP_BUG_ADDR}}{706} +\entry {\code {ARGP_HELP_DOC}}{706} +\entry {\code {ARGP_HELP_EXIT_ERR}}{706} +\entry {\code {ARGP_HELP_EXIT_OK}}{706} +\entry {\code {ARGP_HELP_LONG}}{705} +\entry {\code {ARGP_HELP_LONG_ONLY}}{706} +\entry {\code {ARGP_HELP_POST_DOC}}{705} +\entry {\code {ARGP_HELP_PRE_DOC}}{705} +\entry {\code {ARGP_HELP_SEE}}{705} +\entry {\code {ARGP_HELP_SHORT_USAGE}}{705} +\entry {\code {ARGP_HELP_STD_ERR}}{706} +\entry {\code {ARGP_HELP_STD_HELP}}{706} +\entry {\code {ARGP_HELP_STD_USAGE}}{706} +\entry {\code {ARGP_HELP_USAGE}}{705} +\entry {\code {ARGP_IN_ORDER}}{703} +\entry {\code {ARGP_KEY_ARG}}{698} +\entry {\code {ARGP_KEY_ARGS}}{698} +\entry {\code {ARGP_KEY_END}}{698} +\entry {\code {ARGP_KEY_ERROR}}{699} +\entry {\code {ARGP_KEY_FINI}}{699} +\entry {\code {ARGP_KEY_HELP_ARGS_DOC}}{705} +\entry {\code {ARGP_KEY_HELP_DUP_ARGS_NOTE}}{704} +\entry {\code {ARGP_KEY_HELP_EXTRA}}{704} +\entry {\code {ARGP_KEY_HELP_HEADER}}{704} +\entry {\code {ARGP_KEY_HELP_POST_DOC}}{704} +\entry {\code {ARGP_KEY_HELP_PRE_DOC}}{704} +\entry {\code {ARGP_KEY_INIT}}{699} +\entry {\code {ARGP_KEY_NO_ARGS}}{698} +\entry {\code {ARGP_KEY_SUCCESS}}{699} +\entry {\code {ARGP_LONG_ONLY}}{704} +\entry {\code {ARGP_NO_ARGS}}{703} +\entry {\code {ARGP_NO_ERRS}}{703} +\entry {\code {ARGP_NO_EXIT}}{704} +\entry {\code {ARGP_NO_HELP}}{703} +\entry {\code {ARGP_PARSE_ARGV0}}{703} +\entry {\code {argp_program_bug_address}}{693} +\entry {\code {argp_program_version}}{693} +\entry {\code {argp_program_version_hook}}{693} +\entry {\code {ARGP_SILENT}}{704} \initial {B} -\entry {\code {B0}}{470} -\entry {\code {B110}}{470} -\entry {\code {B115200}}{470} -\entry {\code {B1200}}{470} -\entry {\code {B134}}{470} -\entry {\code {B150}}{470} -\entry {\code {B1800}}{470} -\entry {\code {B19200}}{470} -\entry {\code {B200}}{470} -\entry {\code {B230400}}{470} -\entry {\code {B2400}}{470} -\entry {\code {B300}}{470} -\entry {\code {B38400}}{470} -\entry {\code {B460800}}{470} -\entry {\code {B4800}}{470} -\entry {\code {B50}}{470} -\entry {\code {B57600}}{470} -\entry {\code {B600}}{470} -\entry {\code {B75}}{470} -\entry {\code {B9600}}{470} -\entry {\code {BC_BASE_MAX}}{815} -\entry {\code {BC_DIM_MAX}}{815} -\entry {\code {BC_SCALE_MAX}}{815} -\entry {\code {BC_STRING_MAX}}{815} -\entry {\code {BOOT_TIME}}{765, 769} -\entry {\code {BRKINT}}{463} -\entry {\code {BUFSIZ}}{300} +\entry {\code {B0}}{478} +\entry {\code {B110}}{478} +\entry {\code {B115200}}{478} +\entry {\code {B1200}}{478} +\entry {\code {B134}}{478} +\entry {\code {B150}}{478} +\entry {\code {B1800}}{478} +\entry {\code {B19200}}{478} +\entry {\code {B200}}{478} +\entry {\code {B230400}}{478} +\entry {\code {B2400}}{478} +\entry {\code {B300}}{478} +\entry {\code {B38400}}{478} +\entry {\code {B460800}}{478} +\entry {\code {B4800}}{478} +\entry {\code {B50}}{478} +\entry {\code {B57600}}{478} +\entry {\code {B600}}{478} +\entry {\code {B75}}{478} +\entry {\code {B9600}}{478} +\entry {\code {BC_BASE_MAX}}{833} +\entry {\code {BC_DIM_MAX}}{833} +\entry {\code {BC_SCALE_MAX}}{833} +\entry {\code {BC_STRING_MAX}}{833} +\entry {\code {BOOT_TIME}}{783, 787} +\entry {\code {BRKINT}}{471} +\entry {\code {BUFSIZ}}{306} \initial {C} -\entry {\code {CCTS_OFLOW}}{466} -\entry {\code {CHAR_MAX}}{863} -\entry {\code {CHAR_MIN}}{862} -\entry {\code {CHILD_MAX}}{797} -\entry {\code {CIGNORE}}{466} -\entry {\code {CLK_TCK}}{556} -\entry {\code {CLOCAL}}{465} -\entry {\code {CLOCKS_PER_SEC}}{556} -\entry {\code {CODESET}}{168} -\entry {\code {COLL_WEIGHTS_MAX}}{815} -\entry {\code {COREFILE}}{620} -\entry {\code {CREAD}}{465} -\entry {\code {CRNCYSTR}}{170} -\entry {\code {CRTS_IFLOW}}{466} -\entry {\code {CS5}}{466} -\entry {\code {CS6}}{466} -\entry {\code {CS7}}{466} -\entry {\code {CS8}}{466} -\entry {\code {CSIZE}}{466} -\entry {\code {CSTOPB}}{465} -\entry {\code {CURRENCY_SYMBOL}}{170} +\entry {\code {CCTS_OFLOW}}{474} +\entry {\code {CHAR_MAX}}{881} +\entry {\code {CHAR_MIN}}{880} +\entry {\code {CHILD_MAX}}{815} +\entry {\code {CIGNORE}}{474} +\entry {\code {CLK_TCK}}{574} +\entry {\code {CLOCAL}}{473} +\entry {\code {CLOCKS_PER_SEC}}{574} +\entry {\code {CODESET}}{172} +\entry {\code {COLL_WEIGHTS_MAX}}{833} +\entry {\code {COREFILE}}{638} +\entry {\code {CREAD}}{473} +\entry {\code {CRNCYSTR}}{174} +\entry {\code {CRTS_IFLOW}}{474} +\entry {\code {CS5}}{474} +\entry {\code {CS6}}{474} +\entry {\code {CS7}}{474} +\entry {\code {CS8}}{474} +\entry {\code {CSIZE}}{474} +\entry {\code {CSTOPB}}{473} +\entry {\code {CURRENCY_SYMBOL}}{174} \initial {D} -\entry {\code {D_FMT}}{169} -\entry {\code {D_T_FMT}}{169} -\entry {\code {DAY_1}}{168} -\entry {\code {DAY_2}}{168} -\entry {\code {DAY_3}}{168} -\entry {\code {DAY_4}}{168} -\entry {\code {DAY_5}}{168} -\entry {\code {DAY_6}}{168} -\entry {\code {DAY_7}}{168} -\entry {\code {daylight}}{581} -\entry {\code {DBL_DIG}}{866} -\entry {\code {DBL_EPSILON}}{868} -\entry {\code {DBL_MANT_DIG}}{866} -\entry {\code {DBL_MAX}}{867} -\entry {\code {DBL_MAX_10_EXP}}{867} -\entry {\code {DBL_MAX_EXP}}{867} -\entry {\code {DBL_MIN}}{868} -\entry {\code {DBL_MIN_10_EXP}}{867} -\entry {\code {DBL_MIN_EXP}}{867} -\entry {\code {DEAD_PROCESS}}{765, 769} -\entry {\code {DECIMAL_POINT}}{172} -\entry {\code {DES_DECRYPT}}{824} -\entry {\code {DES_ENCRYPT}}{824} -\entry {\code {DES_HW}}{824} -\entry {\code {DES_SW}}{824} -\entry {\code {DESERR_BADPARAM}}{824} -\entry {\code {DESERR_HWERROR}}{824} -\entry {\code {DESERR_NOHWDEVICE}}{824} -\entry {\code {DESERR_NONE}}{824} -\entry {\code {DT_BLK}}{364} -\entry {\code {DT_CHR}}{364} -\entry {\code {DT_DIR}}{364} -\entry {\code {DT_FIFO}}{364} -\entry {\code {DT_REG}}{364} -\entry {\code {DT_SOCK}}{364} -\entry {\code {DT_UNKNOWN}}{363} +\entry {\code {D_FMT}}{173} +\entry {\code {D_T_FMT}}{173} +\entry {\code {DAY_1}}{172} +\entry {\code {DAY_2}}{172} +\entry {\code {DAY_3}}{172} +\entry {\code {DAY_4}}{172} +\entry {\code {DAY_5}}{172} +\entry {\code {DAY_6}}{172} +\entry {\code {DAY_7}}{172} +\entry {\code {daylight}}{600} +\entry {\code {DBL_DIG}}{884} +\entry {\code {DBL_EPSILON}}{886} +\entry {\code {DBL_MANT_DIG}}{884} +\entry {\code {DBL_MAX}}{885} +\entry {\code {DBL_MAX_10_EXP}}{885} +\entry {\code {DBL_MAX_EXP}}{885} +\entry {\code {DBL_MIN}}{886} +\entry {\code {DBL_MIN_10_EXP}}{885} +\entry {\code {DBL_MIN_EXP}}{885} +\entry {\code {DEAD_PROCESS}}{783, 787} +\entry {\code {DECIMAL_POINT}}{176} +\entry {\code {DES_DECRYPT}}{842} +\entry {\code {DES_ENCRYPT}}{842} +\entry {\code {DES_HW}}{842} +\entry {\code {DES_SW}}{842} +\entry {\code {DESERR_BADPARAM}}{842} +\entry {\code {DESERR_HWERROR}}{842} +\entry {\code {DESERR_NOHWDEVICE}}{842} +\entry {\code {DESERR_NONE}}{842} +\entry {\code {DT_BLK}}{372} +\entry {\code {DT_CHR}}{372} +\entry {\code {DT_DIR}}{372} +\entry {\code {DT_FIFO}}{372} +\entry {\code {DT_REG}}{372} +\entry {\code {DT_SOCK}}{372} +\entry {\code {DT_UNKNOWN}}{371} \initial {E} \entry {\code {E2BIG}}{17} \entry {\code {EACCES}}{17} @@ -333,7 +333,7 @@ \entry {\code {EAUTH}}{24} \entry {\code {EBACKGROUND}}{24} \entry {\code {EBADE}}{26} -\entry {\code {EBADF}}{17, 479} +\entry {\code {EBADF}}{17, 487} \entry {\code {EBADFD}}{26} \entry {\code {EBADMSG}}{25} \entry {\code {EBADR}}{26} @@ -343,13 +343,13 @@ \entry {\code {EBFONT}}{26} \entry {\code {EBUSY}}{17} \entry {\code {ECHILD}}{17} -\entry {\code {ECHO}}{467} -\entry {\code {ECHOCTL}}{468} -\entry {\code {ECHOE}}{467} -\entry {\code {ECHOK}}{467} -\entry {\code {ECHOKE}}{468} -\entry {\code {ECHONL}}{468} -\entry {\code {ECHOPRT}}{467} +\entry {\code {ECHO}}{475} +\entry {\code {ECHOCTL}}{476} +\entry {\code {ECHOE}}{475} +\entry {\code {ECHOK}}{475} +\entry {\code {ECHOKE}}{476} +\entry {\code {ECHONL}}{476} +\entry {\code {ECHOPRT}}{475} \entry {\code {ECHRNG}}{26} \entry {\code {ECOMM}}{26} \entry {\code {ECONNABORTED}}{21} @@ -376,7 +376,7 @@ \entry {\code {EILSEQ}}{24} \entry {\code {EINPROGRESS}}{20} \entry {\code {EINTR}}{16} -\entry {\code {EINVAL}}{18, 479} +\entry {\code {EINVAL}}{18, 487} \entry {\code {EIO}}{16} \entry {\code {EISCONN}}{21} \entry {\code {EISDIR}}{18} @@ -395,7 +395,7 @@ \entry {\code {EMEDIUMTYPE}}{26} \entry {\code {EMFILE}}{18} \entry {\code {EMLINK}}{19} -\entry {\code {EMPTY}}{765, 769} +\entry {\code {EMPTY}}{783, 787} \entry {\code {EMSGSIZE}}{20} \entry {\code {EMULTIHOP}}{25} \entry {\code {ENAMETOOLONG}}{22} @@ -431,11 +431,11 @@ \entry {\code {ENOTNAM}}{26} \entry {\code {ENOTSOCK}}{20} \entry {\code {ENOTSUP}}{24} -\entry {\code {ENOTTY}}{18, 479} +\entry {\code {ENOTTY}}{18, 487} \entry {\code {ENOTUNIQ}}{26} -\entry {\code {environ}}{702} +\entry {\code {environ}}{720} \entry {\code {ENXIO}}{17} -\entry {\code {EOF}}{291} +\entry {\code {EOF}}{297} \entry {\code {EOPNOTSUPP}}{21} \entry {\code {EOVERFLOW}}{25} \entry {\code {EPERM}}{16} @@ -448,12 +448,12 @@ \entry {\code {EPROTO}}{25} \entry {\code {EPROTONOSUPPORT}}{20} \entry {\code {EPROTOTYPE}}{20} -\entry {\code {EQUIV_CLASS_MAX}}{815} -\entry {\code {ERA}}{169} -\entry {\code {ERA_D_FMT}}{170} -\entry {\code {ERA_D_T_FMT}}{170} -\entry {\code {ERA_T_FMT}}{170} -\entry {\code {ERA_YEAR}}{169} +\entry {\code {EQUIV_CLASS_MAX}}{833} +\entry {\code {ERA}}{173} +\entry {\code {ERA_D_FMT}}{174} +\entry {\code {ERA_D_T_FMT}}{174} +\entry {\code {ERA_T_FMT}}{174} +\entry {\code {ERA_YEAR}}{173} \entry {\code {ERANGE}}{19} \entry {\code {EREMCHG}}{26} \entry {\code {EREMOTE}}{23} @@ -462,6 +462,9 @@ \entry {\code {EROFS}}{19} \entry {\code {ERPCMISMATCH}}{23} \entry {\code {errno}}{15} +\entry {\code {error_message_count}}{30} +\entry {\code {error_one_per_line}}{30} +\entry {\code {error_print_progname}}{30} \entry {\code {ESHUTDOWN}}{22} \entry {\code {ESOCKTNOSUPPORT}}{20} \entry {\code {ESPIPE}}{19} @@ -469,7 +472,7 @@ \entry {\code {ESRMNT}}{26} \entry {\code {ESTALE}}{23} \entry {\code {ESTRPIPE}}{26} -\entry {\code {ethers}}{743} +\entry {\code {ethers}}{761} \entry {\code {ETIME}}{25} \entry {\code {ETIMEDOUT}}{22} \entry {\code {ETOOMANYREFS}}{22} @@ -480,589 +483,589 @@ \entry {\code {EWOULDBLOCK}}{20} \entry {\code {EXDEV}}{18} \entry {\code {EXFULL}}{26} -\entry {\code {EXIT_FAILURE}}{707} -\entry {\code {EXIT_SUCCESS}}{707} -\entry {\code {EXPR_NEST_MAX}}{815} -\entry {\code {EXTA}}{470} -\entry {\code {EXTB}}{470} +\entry {\code {EXIT_FAILURE}}{725} +\entry {\code {EXIT_SUCCESS}}{725} +\entry {\code {EXPR_NEST_MAX}}{833} +\entry {\code {EXTA}}{478} +\entry {\code {EXTB}}{478} \initial {F} -\entry {\code {F_DUPFD}}{348} -\entry {\code {F_GETFD}}{349} -\entry {\code {F_GETFL}}{355} -\entry {\code {F_GETLK}}{357} -\entry {\code {F_GETOWN}}{359} -\entry {\code {F_OK}}{394} -\entry {\code {F_RDLCK}}{358} -\entry {\code {F_SETFD}}{349} -\entry {\code {F_SETFL}}{355} -\entry {\code {F_SETLK}}{357} -\entry {\code {F_SETLKW}}{358} -\entry {\code {F_SETOWN}}{359} -\entry {\code {F_UNLCK}}{359} -\entry {\code {F_WRLCK}}{359} -\entry {\code {FD_CLOEXEC}}{350} -\entry {\code {FD_SETSIZE}}{331} -\entry {\code {FE_DFL_ENV}}{533} -\entry {\code {FE_DIVBYZERO}}{529} -\entry {\code {FE_DOWNWARD}}{532} -\entry {\code {FE_INEXACT}}{529} -\entry {\code {FE_INVALID}}{529} -\entry {\code {FE_NOMASK_ENV}}{533} -\entry {\code {FE_OVERFLOW}}{529} -\entry {\code {FE_TONEAREST}}{532} -\entry {\code {FE_TOWARDZERO}}{532} -\entry {\code {FE_UNDERFLOW}}{529} -\entry {\code {FE_UPWARD}}{532} -\entry {\code {FILENAME_MAX}}{811} -\entry {\code {FLT_DIG}}{866} -\entry {\code {FLT_EPSILON}}{868} -\entry {\code {FLT_MANT_DIG}}{866} -\entry {\code {FLT_MAX}}{867} -\entry {\code {FLT_MAX_10_EXP}}{867} -\entry {\code {FLT_MAX_EXP}}{867} -\entry {\code {FLT_MIN}}{867} -\entry {\code {FLT_MIN_10_EXP}}{867} -\entry {\code {FLT_MIN_EXP}}{866} -\entry {\code {FLT_RADIX}}{866} -\entry {\code {FLT_ROUNDS}}{865} -\entry {\code {FLUSHO}}{469} -\entry {\code {FOPEN_MAX}}{242} -\entry {\code {FP_FAST_FMA}}{542} -\entry {\code {FP_ILOGB0}}{498} -\entry {\code {FP_ILOGBNAN}}{498} -\entry {\code {FP_INFINITE}}{525} -\entry {\code {FP_NAN}}{524} -\entry {\code {FP_NORMAL}}{525} -\entry {\code {FP_SUBNORMAL}}{525} -\entry {\code {FP_ZERO}}{525} -\entry {\code {FPE_DECOVF_TRAP}}{621} -\entry {\code {FPE_FLTDIV_TRAP}}{621} -\entry {\code {FPE_FLTOVF_TRAP}}{621} -\entry {\code {FPE_FLTUND_TRAP}}{621} -\entry {\code {FPE_INTDIV_TRAP}}{620} -\entry {\code {FPE_INTOVF_TRAP}}{620} -\entry {\code {FPE_SUBRNG_TRAP}}{620} -\entry {\code {FRAC_DIGITS}}{171} -\entry {\code {FSETLOCKING_BYCALLER}}{247} -\entry {\code {FSETLOCKING_INTERNAL}}{247} -\entry {\code {FSETLOCKING_QUERY}}{247} -\entry {\code {FSTAB}}{785} -\entry {\code {FSTAB_RO}}{786} -\entry {\code {FSTAB_RQ}}{786} -\entry {\code {FSTAB_RW}}{786} -\entry {\code {FSTAB_SW}}{786} -\entry {\code {FSTAB_XX}}{786} -\entry {\code {FTW_CHDIR}}{373} -\entry {\code {FTW_D}}{371} -\entry {\code {FTW_DEPTH}}{373} -\entry {\code {FTW_DNR}}{371} -\entry {\code {FTW_DP}}{371} -\entry {\code {FTW_F}}{371} -\entry {\code {FTW_MOUNT}}{373} -\entry {\code {FTW_NS}}{371} -\entry {\code {FTW_PHYS}}{373} -\entry {\code {FTW_SL}}{371} -\entry {\code {FTW_SLN}}{371} +\entry {\code {F_DUPFD}}{354} +\entry {\code {F_GETFD}}{356} +\entry {\code {F_GETFL}}{361} +\entry {\code {F_GETLK}}{363} +\entry {\code {F_GETOWN}}{366} +\entry {\code {F_OK}}{402} +\entry {\code {F_RDLCK}}{365} +\entry {\code {F_SETFD}}{356} +\entry {\code {F_SETFL}}{361} +\entry {\code {F_SETLK}}{364} +\entry {\code {F_SETLKW}}{364} +\entry {\code {F_SETOWN}}{366} +\entry {\code {F_UNLCK}}{365} +\entry {\code {F_WRLCK}}{365} +\entry {\code {FD_CLOEXEC}}{356} +\entry {\code {FD_SETSIZE}}{337} +\entry {\code {FE_DFL_ENV}}{551} +\entry {\code {FE_DIVBYZERO}}{547} +\entry {\code {FE_DOWNWARD}}{550} +\entry {\code {FE_INEXACT}}{547} +\entry {\code {FE_INVALID}}{547} +\entry {\code {FE_NOMASK_ENV}}{551} +\entry {\code {FE_OVERFLOW}}{547} +\entry {\code {FE_TONEAREST}}{550} +\entry {\code {FE_TOWARDZERO}}{550} +\entry {\code {FE_UNDERFLOW}}{547} +\entry {\code {FE_UPWARD}}{550} +\entry {\code {FILENAME_MAX}}{829} +\entry {\code {FLT_DIG}}{884} +\entry {\code {FLT_EPSILON}}{886} +\entry {\code {FLT_MANT_DIG}}{884} +\entry {\code {FLT_MAX}}{885} +\entry {\code {FLT_MAX_10_EXP}}{885} +\entry {\code {FLT_MAX_EXP}}{885} +\entry {\code {FLT_MIN}}{885} +\entry {\code {FLT_MIN_10_EXP}}{885} +\entry {\code {FLT_MIN_EXP}}{884} +\entry {\code {FLT_RADIX}}{884} +\entry {\code {FLT_ROUNDS}}{883} +\entry {\code {FLUSHO}}{477} +\entry {\code {FOPEN_MAX}}{248} +\entry {\code {FP_FAST_FMA}}{560} +\entry {\code {FP_ILOGB0}}{506} +\entry {\code {FP_ILOGBNAN}}{506} +\entry {\code {FP_INFINITE}}{543} +\entry {\code {FP_NAN}}{542} +\entry {\code {FP_NORMAL}}{543} +\entry {\code {FP_SUBNORMAL}}{543} +\entry {\code {FP_ZERO}}{543} +\entry {\code {FPE_DECOVF_TRAP}}{639} +\entry {\code {FPE_FLTDIV_TRAP}}{639} +\entry {\code {FPE_FLTOVF_TRAP}}{639} +\entry {\code {FPE_FLTUND_TRAP}}{639} +\entry {\code {FPE_INTDIV_TRAP}}{638} +\entry {\code {FPE_INTOVF_TRAP}}{638} +\entry {\code {FPE_SUBRNG_TRAP}}{638} +\entry {\code {FRAC_DIGITS}}{175} +\entry {\code {FSETLOCKING_BYCALLER}}{253} +\entry {\code {FSETLOCKING_INTERNAL}}{253} +\entry {\code {FSETLOCKING_QUERY}}{253} +\entry {\code {FSTAB}}{803} +\entry {\code {FSTAB_RO}}{804} +\entry {\code {FSTAB_RQ}}{804} +\entry {\code {FSTAB_RW}}{804} +\entry {\code {FSTAB_SW}}{804} +\entry {\code {FSTAB_XX}}{804} +\entry {\code {FTW_CHDIR}}{381} +\entry {\code {FTW_D}}{379} +\entry {\code {FTW_DEPTH}}{381} +\entry {\code {FTW_DNR}}{379} +\entry {\code {FTW_DP}}{379} +\entry {\code {FTW_F}}{379} +\entry {\code {FTW_MOUNT}}{381} +\entry {\code {FTW_NS}}{379} +\entry {\code {FTW_PHYS}}{381} +\entry {\code {FTW_SL}}{379} +\entry {\code {FTW_SLN}}{379} \initial {G} -\entry {\code {getdate_err}}{576} -\entry {\code {GLOB_ABORTED}}{217} -\entry {\code {GLOB_ALTDIRFUNC}}{219} -\entry {\code {GLOB_APPEND}}{218} -\entry {\code {GLOB_BRACE}}{219} -\entry {\code {GLOB_DOOFFS}}{218} -\entry {\code {GLOB_ERR}}{218} -\entry {\code {GLOB_MAGCHAR}}{219} -\entry {\code {GLOB_MARK}}{219} -\entry {\code {GLOB_NOCHECK}}{219} -\entry {\code {GLOB_NOESCAPE}}{219} -\entry {\code {GLOB_NOMAGIC}}{220} -\entry {\code {GLOB_NOMATCH}}{217} -\entry {\code {GLOB_NOSORT}}{219} -\entry {\code {GLOB_NOSPACE}}{217} -\entry {\code {GLOB_ONLYDIR}}{221} -\entry {\code {GLOB_PERIOD}}{219} -\entry {\code {GLOB_TILDE}}{220} -\entry {\code {GLOB_TILDE_CHECK}}{220} -\entry {\code {group}}{743} -\entry {\code {GROUPING}}{172} +\entry {\code {getdate_err}}{595} +\entry {\code {GLOB_ABORTED}}{223} +\entry {\code {GLOB_ALTDIRFUNC}}{225} +\entry {\code {GLOB_APPEND}}{224} +\entry {\code {GLOB_BRACE}}{225} +\entry {\code {GLOB_DOOFFS}}{224} +\entry {\code {GLOB_ERR}}{224} +\entry {\code {GLOB_MAGCHAR}}{225} +\entry {\code {GLOB_MARK}}{225} +\entry {\code {GLOB_NOCHECK}}{225} +\entry {\code {GLOB_NOESCAPE}}{225} +\entry {\code {GLOB_NOMAGIC}}{226} +\entry {\code {GLOB_NOMATCH}}{223} +\entry {\code {GLOB_NOSORT}}{225} +\entry {\code {GLOB_NOSPACE}}{223} +\entry {\code {GLOB_ONLYDIR}}{227} +\entry {\code {GLOB_PERIOD}}{225} +\entry {\code {GLOB_TILDE}}{226} +\entry {\code {GLOB_TILDE_CHECK}}{226} +\entry {\code {group}}{761} +\entry {\code {GROUPING}}{176} \initial {H} -\entry {\code {h_errno}}{424} -\entry {\code {HOST_NOT_FOUND}}{424} -\entry {\code {hosts}}{743} -\entry {\code {HUGE_VAL}}{531} -\entry {\code {HUGE_VALF}}{531} -\entry {\code {HUGE_VALL}}{531} -\entry {\code {HUPCL}}{465} +\entry {\code {h_errno}}{432} +\entry {\code {HOST_NOT_FOUND}}{432} +\entry {\code {hosts}}{761} +\entry {\code {HUGE_VAL}}{549} +\entry {\code {HUGE_VALF}}{549} +\entry {\code {HUGE_VALL}}{549} +\entry {\code {HUPCL}}{473} \initial {I} -\entry {\code {I}}{543} -\entry {\code {ICANON}}{467} -\entry {\code {ICRNL}}{463} -\entry {\code {IEXTEN}}{468} -\entry {\code {IFNAMSIZ}}{414} -\entry {\code {IGNBRK}}{463} -\entry {\code {IGNCR}}{463} -\entry {\code {IGNPAR}}{462} -\entry {\code {IMAXBEL}}{464} -\entry {\code {in6addr_any}}{421} -\entry {\code {in6addr_loopback}}{421} -\entry {\code {INADDR_ANY}}{421} -\entry {\code {INADDR_BROADCAST}}{421} -\entry {\code {INADDR_LOOPBACK}}{421} -\entry {\code {INADDR_NONE}}{421} -\entry {\code {INFINITY}}{528} -\entry {\code {INIT_PROCESS}}{765, 769} -\entry {\code {INLCR}}{463} -\entry {\code {INPCK}}{462} -\entry {\code {INT_CURR_SYMBOL}}{170} -\entry {\code {INT_FRAC_DIGITS}}{170} -\entry {\code {INT_MAX}}{863} -\entry {\code {INT_MIN}}{863} -\entry {\code {INT_N_CS_PRECEDES}}{171} -\entry {\code {INT_N_SEP_BY_SPACE}}{171} -\entry {\code {INT_N_SIGN_POSN}}{171} -\entry {\code {INT_P_CS_PRECEDES}}{171} -\entry {\code {INT_P_SEP_BY_SPACE}}{171} -\entry {\code {INT_P_SIGN_POSN}}{171} -\entry {\code {IPPORT_RESERVED}}{427} -\entry {\code {IPPORT_USERRESERVED}}{427} -\entry {\code {ISIG}}{468} -\entry {\code {ISTRIP}}{463} -\entry {\code {ITIMER_PROF}}{584} -\entry {\code {ITIMER_REAL}}{584} -\entry {\code {ITIMER_VIRTUAL}}{584} -\entry {\code {IXANY}}{464} -\entry {\code {IXOFF}}{464} -\entry {\code {IXON}}{464} +\entry {\code {I}}{561} +\entry {\code {ICANON}}{475} +\entry {\code {ICRNL}}{471} +\entry {\code {IEXTEN}}{476} +\entry {\code {IFNAMSIZ}}{422} +\entry {\code {IGNBRK}}{471} +\entry {\code {IGNCR}}{471} +\entry {\code {IGNPAR}}{470} +\entry {\code {IMAXBEL}}{472} +\entry {\code {in6addr_any}}{429} +\entry {\code {in6addr_loopback}}{429} +\entry {\code {INADDR_ANY}}{429} +\entry {\code {INADDR_BROADCAST}}{429} +\entry {\code {INADDR_LOOPBACK}}{429} +\entry {\code {INADDR_NONE}}{429} +\entry {\code {INFINITY}}{546} +\entry {\code {INIT_PROCESS}}{783, 787} +\entry {\code {INLCR}}{471} +\entry {\code {INPCK}}{470} +\entry {\code {INT_CURR_SYMBOL}}{174} +\entry {\code {INT_FRAC_DIGITS}}{174} +\entry {\code {INT_MAX}}{881} +\entry {\code {INT_MIN}}{881} +\entry {\code {INT_N_CS_PRECEDES}}{175} +\entry {\code {INT_N_SEP_BY_SPACE}}{175} +\entry {\code {INT_N_SIGN_POSN}}{175} +\entry {\code {INT_P_CS_PRECEDES}}{175} +\entry {\code {INT_P_SEP_BY_SPACE}}{175} +\entry {\code {INT_P_SIGN_POSN}}{175} +\entry {\code {IPPORT_RESERVED}}{435} +\entry {\code {IPPORT_USERRESERVED}}{435} +\entry {\code {ISIG}}{476} +\entry {\code {ISTRIP}}{471} +\entry {\code {ITIMER_PROF}}{602} +\entry {\code {ITIMER_REAL}}{602} +\entry {\code {ITIMER_VIRTUAL}}{602} +\entry {\code {IXANY}}{472} +\entry {\code {IXOFF}}{472} +\entry {\code {IXON}}{472} \initial {L} -\entry {\code {L_ctermid}}{738} -\entry {\code {L_cuserid}}{763} -\entry {\code {L_INCR}}{295} -\entry {\code {L_SET}}{295} -\entry {\code {L_tmpnam}}{400} -\entry {\code {L_XTND}}{295} -\entry {\code {LANG}}{161} -\entry {\code {LANGUAGE}}{161} -\entry {\code {LC_ALL}}{161} -\entry {\code {LC_COLLATE}}{160} -\entry {\code {LC_CTYPE}}{160} -\entry {\code {LC_MESSAGES}}{160} -\entry {\code {LC_MONETARY}}{160} -\entry {\code {LC_NUMERIC}}{160} -\entry {\code {LC_TIME}}{160} -\entry {\code {LDBL_DIG}}{866} -\entry {\code {LDBL_EPSILON}}{868} -\entry {\code {LDBL_MANT_DIG}}{866} -\entry {\code {LDBL_MAX}}{867} -\entry {\code {LDBL_MAX_10_EXP}}{867} -\entry {\code {LDBL_MAX_EXP}}{867} -\entry {\code {LDBL_MIN}}{868} -\entry {\code {LDBL_MIN_10_EXP}}{867} -\entry {\code {LDBL_MIN_EXP}}{867} -\entry {\code {LINE_MAX}}{815} -\entry {\code {LINK_MAX}}{810} -\entry {\code {LIO_NOP}}{336} -\entry {\code {LIO_READ}}{336} -\entry {\code {LIO_WRITE}}{336} -\entry {\code {LOG_ALERT}}{489} -\entry {\code {LOG_AUTH}}{488} -\entry {\code {LOG_AUTHPRIV}}{488} -\entry {\code {LOG_CRIT}}{489} -\entry {\code {LOG_CRON}}{488} -\entry {\code {LOG_DAEMON}}{488} -\entry {\code {LOG_DEBUG}}{489} -\entry {\code {LOG_EMERG}}{489} -\entry {\code {LOG_ERR}}{489} -\entry {\code {LOG_FTP}}{488} -\entry {\code {LOG_INFO}}{489} -\entry {\code {LOG_LOCAL0}}{488} -\entry {\code {LOG_LOCAL1}}{488} -\entry {\code {LOG_LOCAL2}}{488} -\entry {\code {LOG_LOCAL3}}{488} -\entry {\code {LOG_LOCAL4}}{488} -\entry {\code {LOG_LOCAL5}}{488} -\entry {\code {LOG_LOCAL6}}{489} -\entry {\code {LOG_LOCAL7}}{489} -\entry {\code {LOG_LPR}}{488} -\entry {\code {LOG_MAIL}}{488} -\entry {\code {LOG_NEWS}}{488} -\entry {\code {LOG_NOTICE}}{489} -\entry {\code {LOG_SYSLOG}}{488} -\entry {\code {LOG_USER}}{488} -\entry {\code {LOG_UUCP}}{488} -\entry {\code {LOG_WARNING}}{489} -\entry {\code {LOGIN_PROCESS}}{765, 769} -\entry {\code {LONG_LONG_MAX}}{863} -\entry {\code {LONG_LONG_MIN}}{863} -\entry {\code {LONG_MAX}}{863} -\entry {\code {LONG_MIN}}{863} +\entry {\code {L_ctermid}}{756} +\entry {\code {L_cuserid}}{781} +\entry {\code {L_INCR}}{301} +\entry {\code {L_SET}}{301} +\entry {\code {L_tmpnam}}{408} +\entry {\code {L_XTND}}{301} +\entry {\code {LANG}}{165} +\entry {\code {LANGUAGE}}{165} +\entry {\code {LC_ALL}}{165} +\entry {\code {LC_COLLATE}}{164} +\entry {\code {LC_CTYPE}}{164} +\entry {\code {LC_MESSAGES}}{164} +\entry {\code {LC_MONETARY}}{164} +\entry {\code {LC_NUMERIC}}{164} +\entry {\code {LC_TIME}}{164} +\entry {\code {LDBL_DIG}}{884} +\entry {\code {LDBL_EPSILON}}{886} +\entry {\code {LDBL_MANT_DIG}}{884} +\entry {\code {LDBL_MAX}}{885} +\entry {\code {LDBL_MAX_10_EXP}}{885} +\entry {\code {LDBL_MAX_EXP}}{885} +\entry {\code {LDBL_MIN}}{886} +\entry {\code {LDBL_MIN_10_EXP}}{885} +\entry {\code {LDBL_MIN_EXP}}{885} +\entry {\code {LINE_MAX}}{833} +\entry {\code {LINK_MAX}}{828} +\entry {\code {LIO_NOP}}{342} +\entry {\code {LIO_READ}}{342} +\entry {\code {LIO_WRITE}}{342} +\entry {\code {LOG_ALERT}}{497} +\entry {\code {LOG_AUTH}}{496} +\entry {\code {LOG_AUTHPRIV}}{496} +\entry {\code {LOG_CRIT}}{497} +\entry {\code {LOG_CRON}}{496} +\entry {\code {LOG_DAEMON}}{496} +\entry {\code {LOG_DEBUG}}{497} +\entry {\code {LOG_EMERG}}{497} +\entry {\code {LOG_ERR}}{497} +\entry {\code {LOG_FTP}}{496} +\entry {\code {LOG_INFO}}{497} +\entry {\code {LOG_LOCAL0}}{496} +\entry {\code {LOG_LOCAL1}}{496} +\entry {\code {LOG_LOCAL2}}{496} +\entry {\code {LOG_LOCAL3}}{496} +\entry {\code {LOG_LOCAL4}}{496} +\entry {\code {LOG_LOCAL5}}{496} +\entry {\code {LOG_LOCAL6}}{497} +\entry {\code {LOG_LOCAL7}}{497} +\entry {\code {LOG_LPR}}{496} +\entry {\code {LOG_MAIL}}{496} +\entry {\code {LOG_NEWS}}{496} +\entry {\code {LOG_NOTICE}}{497} +\entry {\code {LOG_SYSLOG}}{496} +\entry {\code {LOG_USER}}{496} +\entry {\code {LOG_UUCP}}{496} +\entry {\code {LOG_WARNING}}{497} +\entry {\code {LOGIN_PROCESS}}{783, 787} +\entry {\code {LONG_LONG_MAX}}{881} +\entry {\code {LONG_LONG_MIN}}{881} +\entry {\code {LONG_MAX}}{881} +\entry {\code {LONG_MIN}}{881} \initial {M} -\entry {\code {M_1_PI}}{493} -\entry {\code {M_2_PI}}{493} -\entry {\code {M_2_SQRTPI}}{493} -\entry {\code {M_E}}{493} -\entry {\code {M_LN10}}{493} -\entry {\code {M_LN2}}{493} -\entry {\code {M_LOG10E}}{493} -\entry {\code {M_LOG2E}}{493} -\entry {\code {M_PI}}{493} -\entry {\code {M_PI_2}}{493} -\entry {\code {M_PI_4}}{493} -\entry {\code {M_SQRT1_2}}{493} -\entry {\code {M_SQRT2}}{493} -\entry {\code {MAP_ANON}}{328} -\entry {\code {MAP_ANONYMOUS}}{328} -\entry {\code {MAP_FIXED}}{328} -\entry {\code {MAP_PRIVATE}}{327} -\entry {\code {MAP_SHARED}}{327} -\entry {\code {MAX_CANON}}{810} -\entry {\code {MAX_INPUT}}{810} -\entry {\code {MAXNAMLEN}}{811} -\entry {\code {MAXSYMLINKS}}{375} -\entry {\code {MB_CUR_MAX}}{120} -\entry {\code {MB_LEN_MAX}}{120} -\entry {\code {MDMBUF}}{466} -\entry {\code {MINSIGSTKSZ}}{660} -\entry {\code {MM_APPL}}{307} -\entry {\code {MM_CONSOLE}}{307} -\entry {\code {MM_ERROR}}{308} -\entry {\code {MM_FIRM}}{307} -\entry {\code {MM_HALT}}{308} -\entry {\code {MM_HARD}}{307} -\entry {\code {MM_INFO}}{309} -\entry {\code {MM_NOSEV}}{308} -\entry {\code {MM_NRECOV}}{308} -\entry {\code {MM_NULLACT}}{308} -\entry {\code {MM_NULLLBL}}{308} -\entry {\code {MM_NULLMC}}{308} -\entry {\code {MM_NULLSEV}}{308} -\entry {\code {MM_NULLTAG}}{308} -\entry {\code {MM_NULLTXT}}{308} -\entry {\code {MM_OPSYS}}{307} -\entry {\code {MM_PRINT}}{307} -\entry {\code {MM_RECOVER}}{308} -\entry {\code {MM_SOFT}}{307} -\entry {\code {MM_UTIL}}{307} -\entry {\code {MM_WARNING}}{308} -\entry {\code {MNTOPT_DEFAULTS}}{788} -\entry {\code {MNTOPT_NOAUTO}}{789} -\entry {\code {MNTOPT_NOSUID}}{789} -\entry {\code {MNTOPT_RO}}{788} -\entry {\code {MNTOPT_RW}}{788} -\entry {\code {MNTOPT_SUID}}{788} -\entry {\code {MNTTYPE_IGNORE}}{788} -\entry {\code {MNTTYPE_NFS}}{788} -\entry {\code {MNTTYPE_SWAP}}{788} -\entry {\code {MON_1}}{168} -\entry {\code {MON_10}}{169} -\entry {\code {MON_11}}{169} -\entry {\code {MON_12}}{169} -\entry {\code {MON_2}}{169} -\entry {\code {MON_3}}{169} -\entry {\code {MON_4}}{169} -\entry {\code {MON_5}}{169} -\entry {\code {MON_6}}{169} -\entry {\code {MON_7}}{169} -\entry {\code {MON_8}}{169} -\entry {\code {MON_9}}{169} -\entry {\code {MON_DECIMAL_POINT}}{170} -\entry {\code {MON_GROUPING}}{170} -\entry {\code {MON_THOUSANDS_SEP}}{170} -\entry {\code {MS_ASYNC}}{329} -\entry {\code {MS_SYNC}}{329} -\entry {\code {MSG_DONTROUTE}}{440} -\entry {\code {MSG_OOB}}{440} -\entry {\code {MSG_PEEK}}{440} +\entry {\code {M_1_PI}}{501} +\entry {\code {M_2_PI}}{501} +\entry {\code {M_2_SQRTPI}}{501} +\entry {\code {M_E}}{501} +\entry {\code {M_LN10}}{501} +\entry {\code {M_LN2}}{501} +\entry {\code {M_LOG10E}}{501} +\entry {\code {M_LOG2E}}{501} +\entry {\code {M_PI}}{501} +\entry {\code {M_PI_2}}{501} +\entry {\code {M_PI_4}}{501} +\entry {\code {M_SQRT1_2}}{501} +\entry {\code {M_SQRT2}}{501} +\entry {\code {MAP_ANON}}{334} +\entry {\code {MAP_ANONYMOUS}}{334} +\entry {\code {MAP_FIXED}}{334} +\entry {\code {MAP_PRIVATE}}{333} +\entry {\code {MAP_SHARED}}{333} +\entry {\code {MAX_CANON}}{828} +\entry {\code {MAX_INPUT}}{828} +\entry {\code {MAXNAMLEN}}{829} +\entry {\code {MAXSYMLINKS}}{383} +\entry {\code {MB_CUR_MAX}}{124} +\entry {\code {MB_LEN_MAX}}{124} +\entry {\code {MDMBUF}}{474} +\entry {\code {MINSIGSTKSZ}}{678} +\entry {\code {MM_APPL}}{313} +\entry {\code {MM_CONSOLE}}{313} +\entry {\code {MM_ERROR}}{314} +\entry {\code {MM_FIRM}}{313} +\entry {\code {MM_HALT}}{314} +\entry {\code {MM_HARD}}{313} +\entry {\code {MM_INFO}}{315} +\entry {\code {MM_NOSEV}}{314} +\entry {\code {MM_NRECOV}}{314} +\entry {\code {MM_NULLACT}}{314} +\entry {\code {MM_NULLLBL}}{314} +\entry {\code {MM_NULLMC}}{314} +\entry {\code {MM_NULLSEV}}{314} +\entry {\code {MM_NULLTAG}}{314} +\entry {\code {MM_NULLTXT}}{314} +\entry {\code {MM_OPSYS}}{313} +\entry {\code {MM_PRINT}}{313} +\entry {\code {MM_RECOVER}}{314} +\entry {\code {MM_SOFT}}{313} +\entry {\code {MM_UTIL}}{313} +\entry {\code {MM_WARNING}}{314} +\entry {\code {MNTOPT_DEFAULTS}}{806} +\entry {\code {MNTOPT_NOAUTO}}{807} +\entry {\code {MNTOPT_NOSUID}}{807} +\entry {\code {MNTOPT_RO}}{806} +\entry {\code {MNTOPT_RW}}{806} +\entry {\code {MNTOPT_SUID}}{806} +\entry {\code {MNTTYPE_IGNORE}}{806} +\entry {\code {MNTTYPE_NFS}}{806} +\entry {\code {MNTTYPE_SWAP}}{806} +\entry {\code {MON_1}}{172} +\entry {\code {MON_10}}{173} +\entry {\code {MON_11}}{173} +\entry {\code {MON_12}}{173} +\entry {\code {MON_2}}{173} +\entry {\code {MON_3}}{173} +\entry {\code {MON_4}}{173} +\entry {\code {MON_5}}{173} +\entry {\code {MON_6}}{173} +\entry {\code {MON_7}}{173} +\entry {\code {MON_8}}{173} +\entry {\code {MON_9}}{173} +\entry {\code {MON_DECIMAL_POINT}}{174} +\entry {\code {MON_GROUPING}}{174} +\entry {\code {MON_THOUSANDS_SEP}}{174} +\entry {\code {MS_ASYNC}}{335} +\entry {\code {MS_SYNC}}{335} +\entry {\code {MSG_DONTROUTE}}{448} +\entry {\code {MSG_OOB}}{448} +\entry {\code {MSG_PEEK}}{448} \initial {N} -\entry {\code {N_CS_PRECEDES}}{171} -\entry {\code {N_SEP_BY_SPACE}}{171} -\entry {\code {N_SIGN_POSN}}{171} -\entry {\code {NAME_MAX}}{810} -\entry {\code {NAN}}{528} -\entry {\code {NCCS}}{460} -\entry {\code {NDEBUG}}{853} -\entry {\code {NEGATIVE_SIGN}}{170} -\entry {\code {netgroup}}{743} -\entry {\code {networks}}{743} -\entry {\code {NEW_TIME}}{765, 769} -\entry {\code {NGROUPS_MAX}}{798} -\entry {\code {NL_ARGMAX}}{260} -\entry {\code {NO_ADDRESS}}{425} -\entry {\code {NO_RECOVERY}}{425} -\entry {\code {NOEXPR}}{172} -\entry {\code {NOFLSH}}{468} -\entry {\code {NOKERNINFO}}{469} -\entry {\code {NOSTR}}{172} -\entry {\code {NSIG}}{619} -\entry {\code {NSS_STATUS_NOTFOUND}}{748} -\entry {\code {NSS_STATUS_SUCCESS}}{748} -\entry {\code {NSS_STATUS_TRYAGAIN}}{748} -\entry {\code {NSS_STATUS_UNAVAIL}}{748} -\entry {\code {NULL}}{860} +\entry {\code {N_CS_PRECEDES}}{175} +\entry {\code {N_SEP_BY_SPACE}}{175} +\entry {\code {N_SIGN_POSN}}{175} +\entry {\code {NAME_MAX}}{828} +\entry {\code {NAN}}{546} +\entry {\code {NCCS}}{468} +\entry {\code {NDEBUG}}{871} +\entry {\code {NEGATIVE_SIGN}}{174} +\entry {\code {netgroup}}{761} +\entry {\code {networks}}{761} +\entry {\code {NEW_TIME}}{783, 787} +\entry {\code {NGROUPS_MAX}}{816} +\entry {\code {NL_ARGMAX}}{266} +\entry {\code {NO_ADDRESS}}{433} +\entry {\code {NO_RECOVERY}}{433} +\entry {\code {NOEXPR}}{176} +\entry {\code {NOFLSH}}{476} +\entry {\code {NOKERNINFO}}{477} +\entry {\code {NOSTR}}{176} +\entry {\code {NSIG}}{637} +\entry {\code {NSS_STATUS_NOTFOUND}}{766} +\entry {\code {NSS_STATUS_SUCCESS}}{766} +\entry {\code {NSS_STATUS_TRYAGAIN}}{766} +\entry {\code {NSS_STATUS_UNAVAIL}}{766} +\entry {\code {NULL}}{878} \initial {O} -\entry {\code {O_ACCMODE}}{352} -\entry {\code {O_APPEND}}{354} -\entry {\code {O_ASYNC}}{354} -\entry {\code {O_CREAT}}{352} -\entry {\code {O_EXCL}}{352} -\entry {\code {O_EXEC}}{351} -\entry {\code {O_EXLOCK}}{353} -\entry {\code {O_FSYNC}}{354} -\entry {\code {O_IGNORE_CTTY}}{353} -\entry {\code {O_NDELAY}}{354} -\entry {\code {O_NOATIME}}{354} -\entry {\code {O_NOCTTY}}{352} -\entry {\code {O_NOLINK}}{353} -\entry {\code {O_NONBLOCK}}{352, 354} -\entry {\code {O_NOTRANS}}{353} -\entry {\code {O_RDONLY}}{351} -\entry {\code {O_RDWR}}{351} -\entry {\code {O_READ}}{351} -\entry {\code {O_SHLOCK}}{353} -\entry {\code {O_SYNC}}{354} -\entry {\code {O_TRUNC}}{353} -\entry {\code {O_WRITE}}{351} -\entry {\code {O_WRONLY}}{351} -\entry {\code {obstack_alloc_failed_handler}}{49} -\entry {\code {OLD_TIME}}{765, 769} -\entry {\code {ONLCR}}{465} -\entry {\code {ONOEOT}}{465} -\entry {\code {OPEN_MAX}}{797} -\entry {\code {OPOST}}{464} -\entry {\code {optarg}}{667} -\entry {\code {opterr}}{667} -\entry {\code {optind}}{667} -\entry {\code {OPTION_ALIAS}}{678} -\entry {\code {OPTION_ARG_OPTIONAL}}{678} -\entry {\code {OPTION_DOC}}{678} -\entry {\code {OPTION_HIDDEN}}{678} -\entry {\code {OPTION_NO_USAGE}}{678} -\entry {\code {optopt}}{667} -\entry {\code {OXTABS}}{465} +\entry {\code {O_ACCMODE}}{358} +\entry {\code {O_APPEND}}{360} +\entry {\code {O_ASYNC}}{361} +\entry {\code {O_CREAT}}{358} +\entry {\code {O_EXCL}}{359} +\entry {\code {O_EXEC}}{358} +\entry {\code {O_EXLOCK}}{360} +\entry {\code {O_FSYNC}}{361} +\entry {\code {O_IGNORE_CTTY}}{359} +\entry {\code {O_NDELAY}}{361} +\entry {\code {O_NOATIME}}{361} +\entry {\code {O_NOCTTY}}{359} +\entry {\code {O_NOLINK}}{359} +\entry {\code {O_NONBLOCK}}{359, 360} +\entry {\code {O_NOTRANS}}{359} +\entry {\code {O_RDONLY}}{357} +\entry {\code {O_RDWR}}{357} +\entry {\code {O_READ}}{358} +\entry {\code {O_SHLOCK}}{360} +\entry {\code {O_SYNC}}{361} +\entry {\code {O_TRUNC}}{360} +\entry {\code {O_WRITE}}{358} +\entry {\code {O_WRONLY}}{357} +\entry {\code {obstack_alloc_failed_handler}}{53} +\entry {\code {OLD_TIME}}{783, 787} +\entry {\code {ONLCR}}{473} +\entry {\code {ONOEOT}}{473} +\entry {\code {OPEN_MAX}}{815} +\entry {\code {OPOST}}{472} +\entry {\code {optarg}}{685} +\entry {\code {opterr}}{685} +\entry {\code {optind}}{685} +\entry {\code {OPTION_ALIAS}}{696} +\entry {\code {OPTION_ARG_OPTIONAL}}{696} +\entry {\code {OPTION_DOC}}{696} +\entry {\code {OPTION_HIDDEN}}{696} +\entry {\code {OPTION_NO_USAGE}}{696} +\entry {\code {optopt}}{685} +\entry {\code {OXTABS}}{473} \initial {P} -\entry {\code {P_CS_PRECEDES}}{171} -\entry {\code {P_SEP_BY_SPACE}}{171} -\entry {\code {P_SIGN_POSN}}{171} -\entry {\code {P_tmpdir}}{401} -\entry {\code {PA_CHAR}}{273} -\entry {\code {PA_DOUBLE}}{273} -\entry {\code {PA_FLAG_LONG}}{274} -\entry {\code {PA_FLAG_LONG_DOUBLE}}{274} -\entry {\code {PA_FLAG_LONG_LONG}}{274} -\entry {\code {PA_FLAG_MASK}}{273} -\entry {\code {PA_FLAG_PTR}}{273} -\entry {\code {PA_FLAG_SHORT}}{273} -\entry {\code {PA_FLOAT}}{273} -\entry {\code {PA_INT}}{273} -\entry {\code {PA_LAST}}{273} -\entry {\code {PA_POINTER}}{273} -\entry {\code {PA_STRING}}{273} -\entry {\code {PARENB}}{466} -\entry {\code {PARMRK}}{463} -\entry {\code {PARODD}}{466} -\entry {\code {passwd}}{743} -\entry {\code {PATH_MAX}}{811} -\entry {\code {PENDIN}}{469} -\entry {\code {PF_CCITT}}{432} -\entry {\code {PF_FILE}}{415} -\entry {\code {PF_IMPLINK}}{432} -\entry {\code {PF_INET}}{417} -\entry {\code {PF_INET6}}{417} -\entry {\code {PF_ISO}}{432} -\entry {\code {PF_LOCAL}}{415} -\entry {\code {PF_NS}}{432} -\entry {\code {PF_ROUTE}}{432} -\entry {\code {PF_UNIX}}{415} -\entry {\code {PI}}{494} -\entry {\code {PIPE_BUF}}{811} -\entry {\code {PM_STR}}{169} -\entry {\code {POSITIVE_SIGN}}{170} -\entry {\code {PRIO_MAX}}{601} -\entry {\code {PRIO_MIN}}{601} -\entry {\code {PRIO_PGRP}}{601} -\entry {\code {PRIO_PROCESS}}{601} -\entry {\code {PRIO_USER}}{602} +\entry {\code {P_CS_PRECEDES}}{175} +\entry {\code {P_SEP_BY_SPACE}}{175} +\entry {\code {P_SIGN_POSN}}{175} +\entry {\code {P_tmpdir}}{409} +\entry {\code {PA_CHAR}}{279} +\entry {\code {PA_DOUBLE}}{279} +\entry {\code {PA_FLAG_LONG}}{280} +\entry {\code {PA_FLAG_LONG_DOUBLE}}{280} +\entry {\code {PA_FLAG_LONG_LONG}}{280} +\entry {\code {PA_FLAG_MASK}}{279} +\entry {\code {PA_FLAG_PTR}}{279} +\entry {\code {PA_FLAG_SHORT}}{279} +\entry {\code {PA_FLOAT}}{279} +\entry {\code {PA_INT}}{279} +\entry {\code {PA_LAST}}{279} +\entry {\code {PA_POINTER}}{279} +\entry {\code {PA_STRING}}{279} +\entry {\code {PARENB}}{474} +\entry {\code {PARMRK}}{471} +\entry {\code {PARODD}}{474} +\entry {\code {passwd}}{761} +\entry {\code {PATH_MAX}}{829} +\entry {\code {PENDIN}}{477} +\entry {\code {PF_CCITT}}{440} +\entry {\code {PF_FILE}}{423} +\entry {\code {PF_IMPLINK}}{440} +\entry {\code {PF_INET}}{425} +\entry {\code {PF_INET6}}{425} +\entry {\code {PF_ISO}}{440} +\entry {\code {PF_LOCAL}}{423} +\entry {\code {PF_NS}}{440} +\entry {\code {PF_ROUTE}}{440} +\entry {\code {PF_UNIX}}{423} +\entry {\code {PI}}{502} +\entry {\code {PIPE_BUF}}{829} +\entry {\code {PM_STR}}{173} +\entry {\code {POSITIVE_SIGN}}{174} +\entry {\code {PRIO_MAX}}{619} +\entry {\code {PRIO_MIN}}{619} +\entry {\code {PRIO_PGRP}}{619} +\entry {\code {PRIO_PROCESS}}{619} +\entry {\code {PRIO_USER}}{620} \entry {\code {program_invocation_name}}{28} \entry {\code {program_invocation_short_name}}{28} -\entry {\code {PROT_EXEC}}{327} -\entry {\code {PROT_READ}}{327} -\entry {\code {PROT_WRITE}}{327} -\entry {\code {protocols}}{743} -\entry {\code {PWD}}{362} +\entry {\code {PROT_EXEC}}{333} +\entry {\code {PROT_READ}}{333} +\entry {\code {PROT_WRITE}}{333} +\entry {\code {protocols}}{761} +\entry {\code {PWD}}{370} \initial {R} -\entry {\code {R_OK}}{394} -\entry {\code {RADIXCHAR}}{172} -\entry {\code {RAND_MAX}}{512} -\entry {\code {RE_DUP_MAX}}{798} -\entry {\code {RLIM_INFINITY}}{592} -\entry {\code {RLIM_NLIMITS}}{592} -\entry {\code {RLIMIT_AS}}{592} -\entry {\code {RLIMIT_CORE}}{591} -\entry {\code {RLIMIT_CPU}}{591} -\entry {\code {RLIMIT_DATA}}{591} -\entry {\code {RLIMIT_FSIZE}}{591} -\entry {\code {RLIMIT_NOFILE}}{592} -\entry {\code {RLIMIT_OFILE}}{592} -\entry {\code {RLIMIT_RSS}}{591} -\entry {\code {RLIMIT_STACK}}{591} -\entry {\code {rpc}}{743} -\entry {\code {RUN_LVL}}{765, 769} +\entry {\code {R_OK}}{402} +\entry {\code {RADIXCHAR}}{176} +\entry {\code {RAND_MAX}}{531} +\entry {\code {RE_DUP_MAX}}{816} +\entry {\code {RLIM_INFINITY}}{610} +\entry {\code {RLIM_NLIMITS}}{610} +\entry {\code {RLIMIT_AS}}{610} +\entry {\code {RLIMIT_CORE}}{609} +\entry {\code {RLIMIT_CPU}}{609} +\entry {\code {RLIMIT_DATA}}{609} +\entry {\code {RLIMIT_FSIZE}}{609} +\entry {\code {RLIMIT_NOFILE}}{610} +\entry {\code {RLIMIT_OFILE}}{610} +\entry {\code {RLIMIT_RSS}}{609} +\entry {\code {RLIMIT_STACK}}{609} +\entry {\code {rpc}}{761} +\entry {\code {RUN_LVL}}{783, 787} \initial {S} -\entry {\code {S_IEXEC}}{389} -\entry {\code {S_IFBLK}}{387} -\entry {\code {S_IFCHR}}{387} -\entry {\code {S_IFDIR}}{387} -\entry {\code {S_IFIFO}}{387} -\entry {\code {S_IFLNK}}{387} -\entry {\code {S_IFMT}}{387} -\entry {\code {S_IFREG}}{387} -\entry {\code {S_IFSOCK}}{387} -\entry {\code {S_IREAD}}{389} -\entry {\code {S_IRGRP}}{389} -\entry {\code {S_IROTH}}{389} -\entry {\code {S_IRUSR}}{389} -\entry {\code {S_IRWXG}}{389} -\entry {\code {S_IRWXO}}{389} -\entry {\code {S_IRWXU}}{389} -\entry {\code {S_ISGID}}{390} -\entry {\code {S_ISUID}}{389} -\entry {\code {S_ISVTX}}{390} -\entry {\code {S_IWGRP}}{389} -\entry {\code {S_IWOTH}}{389} -\entry {\code {S_IWRITE}}{389} -\entry {\code {S_IWUSR}}{389} -\entry {\code {S_IXGRP}}{389} -\entry {\code {S_IXOTH}}{389} -\entry {\code {S_IXUSR}}{389} -\entry {\code {SA_NOCLDSTOP}}{633} -\entry {\code {SA_ONSTACK}}{633} -\entry {\code {SA_RESTART}}{634} -\entry {\code {SC_SSIZE_MAX}}{807} -\entry {\code {SCHAR_MAX}}{862} -\entry {\code {SCHAR_MIN}}{862} -\entry {\code {SEEK_CUR}}{295} -\entry {\code {SEEK_END}}{295} -\entry {\code {SEEK_SET}}{295} -\entry {\code {SEM_VALUE_MAX}}{844} -\entry {\code {services}}{743} -\entry {\code {shadow}}{744} -\entry {\code {SHRT_MAX}}{863} -\entry {\code {SHRT_MIN}}{863} -\entry {\code {SIG_BLOCK}}{652} -\entry {\code {SIG_DFL}}{629} -\entry {\code {SIG_ERR}}{630} -\entry {\code {SIG_IGN}}{629} -\entry {\code {SIG_SETMASK}}{653} -\entry {\code {SIG_UNBLOCK}}{652} -\entry {\code {SIGABRT}}{622} -\entry {\code {SIGALRM}}{623} -\entry {\code {SIGBUS}}{621} -\entry {\code {SIGCHLD}}{624} -\entry {\code {SIGCLD}}{625} -\entry {\code {SIGCONT}}{625} -\entry {\code {SIGEMT}}{622} -\entry {\code {SIGFPE}}{620} -\entry {\code {SIGHUP}}{623} -\entry {\code {SIGILL}}{621} -\entry {\code {SIGINFO}}{627} -\entry {\code {SIGINT}}{622} -\entry {\code {SIGIO}}{624} -\entry {\code {SIGIOT}}{622} -\entry {\code {SIGKILL}}{623} -\entry {\code {SIGLOST}}{626} -\entry {\code {signgam}}{503} -\entry {\code {SIGPIPE}}{626} -\entry {\code {SIGPOLL}}{624} -\entry {\code {SIGPROF}}{624} -\entry {\code {SIGQUIT}}{623} -\entry {\code {SIGSEGV}}{621} -\entry {\code {SIGSTKSZ}}{660} -\entry {\code {SIGSTOP}}{625} -\entry {\code {SIGSYS}}{622} -\entry {\code {SIGTERM}}{622} -\entry {\code {SIGTRAP}}{622} -\entry {\code {SIGTSTP}}{625} -\entry {\code {SIGTTIN}}{625} -\entry {\code {SIGTTOU}}{625} -\entry {\code {SIGURG}}{624} -\entry {\code {SIGUSR1}}{627} -\entry {\code {SIGUSR2}}{627} -\entry {\code {SIGVTALRM}}{624} -\entry {\code {SIGWINCH}}{627} -\entry {\code {SIGXCPU}}{626} -\entry {\code {SIGXFSZ}}{627} -\entry {\code {SOCK_DGRAM}}{410} -\entry {\code {SOCK_RAW}}{411} -\entry {\code {SOCK_STREAM}}{410} -\entry {\code {SOL_SOCKET}}{453} -\entry {\code {SS_DISABLE}}{660} -\entry {\code {SS_ONSTACK}}{661} -\entry {\code {SSIZE_MAX}}{798} -\entry {\code {stderr}}{239} -\entry {\code {STDERR_FILENO}}{323} -\entry {\code {stdin}}{239} -\entry {\code {STDIN_FILENO}}{323} -\entry {\code {stdout}}{239} -\entry {\code {STDOUT_FILENO}}{323} -\entry {\code {STREAM_MAX}}{797} -\entry {\code {SV_INTERRUPT}}{662} -\entry {\code {SV_ONSTACK}}{662} -\entry {\code {SV_RESETHAND}}{663} -\entry {\code {sys_siglist}}{628} +\entry {\code {S_IEXEC}}{397} +\entry {\code {S_IFBLK}}{395} +\entry {\code {S_IFCHR}}{395} +\entry {\code {S_IFDIR}}{395} +\entry {\code {S_IFIFO}}{395} +\entry {\code {S_IFLNK}}{395} +\entry {\code {S_IFMT}}{395} +\entry {\code {S_IFREG}}{395} +\entry {\code {S_IFSOCK}}{395} +\entry {\code {S_IREAD}}{397} +\entry {\code {S_IRGRP}}{397} +\entry {\code {S_IROTH}}{397} +\entry {\code {S_IRUSR}}{397} +\entry {\code {S_IRWXG}}{397} +\entry {\code {S_IRWXO}}{397} +\entry {\code {S_IRWXU}}{397} +\entry {\code {S_ISGID}}{398} +\entry {\code {S_ISUID}}{397} +\entry {\code {S_ISVTX}}{398} +\entry {\code {S_IWGRP}}{397} +\entry {\code {S_IWOTH}}{397} +\entry {\code {S_IWRITE}}{397} +\entry {\code {S_IWUSR}}{397} +\entry {\code {S_IXGRP}}{397} +\entry {\code {S_IXOTH}}{397} +\entry {\code {S_IXUSR}}{397} +\entry {\code {SA_NOCLDSTOP}}{651} +\entry {\code {SA_ONSTACK}}{651} +\entry {\code {SA_RESTART}}{652} +\entry {\code {SC_SSIZE_MAX}}{825} +\entry {\code {SCHAR_MAX}}{880} +\entry {\code {SCHAR_MIN}}{880} +\entry {\code {SEEK_CUR}}{301} +\entry {\code {SEEK_END}}{301} +\entry {\code {SEEK_SET}}{301} +\entry {\code {SEM_VALUE_MAX}}{862} +\entry {\code {services}}{761} +\entry {\code {shadow}}{762} +\entry {\code {SHRT_MAX}}{881} +\entry {\code {SHRT_MIN}}{881} +\entry {\code {SIG_BLOCK}}{670} +\entry {\code {SIG_DFL}}{647} +\entry {\code {SIG_ERR}}{648} +\entry {\code {SIG_IGN}}{647} +\entry {\code {SIG_SETMASK}}{671} +\entry {\code {SIG_UNBLOCK}}{670} +\entry {\code {SIGABRT}}{640} +\entry {\code {SIGALRM}}{641} +\entry {\code {SIGBUS}}{639} +\entry {\code {SIGCHLD}}{642} +\entry {\code {SIGCLD}}{643} +\entry {\code {SIGCONT}}{643} +\entry {\code {SIGEMT}}{640} +\entry {\code {SIGFPE}}{638} +\entry {\code {SIGHUP}}{641} +\entry {\code {SIGILL}}{639} +\entry {\code {SIGINFO}}{645} +\entry {\code {SIGINT}}{640} +\entry {\code {SIGIO}}{642} +\entry {\code {SIGIOT}}{640} +\entry {\code {SIGKILL}}{641} +\entry {\code {SIGLOST}}{644} +\entry {\code {signgam}}{511} +\entry {\code {SIGPIPE}}{644} +\entry {\code {SIGPOLL}}{642} +\entry {\code {SIGPROF}}{642} +\entry {\code {SIGQUIT}}{641} +\entry {\code {SIGSEGV}}{639} +\entry {\code {SIGSTKSZ}}{678} +\entry {\code {SIGSTOP}}{643} +\entry {\code {SIGSYS}}{640} +\entry {\code {SIGTERM}}{640} +\entry {\code {SIGTRAP}}{640} +\entry {\code {SIGTSTP}}{643} +\entry {\code {SIGTTIN}}{643} +\entry {\code {SIGTTOU}}{643} +\entry {\code {SIGURG}}{642} +\entry {\code {SIGUSR1}}{645} +\entry {\code {SIGUSR2}}{645} +\entry {\code {SIGVTALRM}}{642} +\entry {\code {SIGWINCH}}{645} +\entry {\code {SIGXCPU}}{644} +\entry {\code {SIGXFSZ}}{645} +\entry {\code {SOCK_DGRAM}}{418} +\entry {\code {SOCK_RAW}}{419} +\entry {\code {SOCK_STREAM}}{418} +\entry {\code {SOL_SOCKET}}{461} +\entry {\code {SS_DISABLE}}{678} +\entry {\code {SS_ONSTACK}}{679} +\entry {\code {SSIZE_MAX}}{816} +\entry {\code {stderr}}{245} +\entry {\code {STDERR_FILENO}}{329} +\entry {\code {stdin}}{245} +\entry {\code {STDIN_FILENO}}{329} +\entry {\code {stdout}}{245} +\entry {\code {STDOUT_FILENO}}{329} +\entry {\code {STREAM_MAX}}{815} +\entry {\code {SV_INTERRUPT}}{680} +\entry {\code {SV_ONSTACK}}{680} +\entry {\code {SV_RESETHAND}}{681} +\entry {\code {sys_siglist}}{646} \initial {T} -\entry {\code {T_FMT}}{169} -\entry {\code {T_FMT_AMPM}}{169} -\entry {\code {TCIFLUSH}}{478} -\entry {\code {TCIOFF}}{479} -\entry {\code {TCIOFLUSH}}{478} -\entry {\code {TCION}}{479} -\entry {\code {TCOFLUSH}}{478} -\entry {\code {TCOOFF}}{479} -\entry {\code {TCOON}}{479} -\entry {\code {TCSADRAIN}}{460} -\entry {\code {TCSAFLUSH}}{460} -\entry {\code {TCSANOW}}{460} -\entry {\code {TCSASOFT}}{460} -\entry {\code {THOUSANDS_SEP}}{172} -\entry {\code {THOUSEP}}{172} -\entry {\code {timezone}}{581} -\entry {\code {TMP_MAX}}{400} -\entry {\code {TOSTOP}}{468} -\entry {\code {TRY_AGAIN}}{424} -\entry {\code {tzname}}{581} -\entry {\code {TZNAME_MAX}}{797} +\entry {\code {T_FMT}}{173} +\entry {\code {T_FMT_AMPM}}{173} +\entry {\code {TCIFLUSH}}{486} +\entry {\code {TCIOFF}}{487} +\entry {\code {TCIOFLUSH}}{486} +\entry {\code {TCION}}{487} +\entry {\code {TCOFLUSH}}{486} +\entry {\code {TCOOFF}}{487} +\entry {\code {TCOON}}{487} +\entry {\code {TCSADRAIN}}{468} +\entry {\code {TCSAFLUSH}}{468} +\entry {\code {TCSANOW}}{468} +\entry {\code {TCSASOFT}}{468} +\entry {\code {THOUSANDS_SEP}}{176} +\entry {\code {THOUSEP}}{176} +\entry {\code {timezone}}{599} +\entry {\code {TMP_MAX}}{408} +\entry {\code {TOSTOP}}{476} +\entry {\code {TRY_AGAIN}}{432} +\entry {\code {tzname}}{599} +\entry {\code {TZNAME_MAX}}{815} \initial {U} -\entry {\code {UCHAR_MAX}}{862} -\entry {\code {UINT_MAX}}{863} -\entry {\code {ULONG_LONG_MAX}}{863} -\entry {\code {ULONG_MAX}}{863} -\entry {\code {USER_PROCESS}}{765, 769} -\entry {\code {USHRT_MAX}}{863} +\entry {\code {UCHAR_MAX}}{880} +\entry {\code {UINT_MAX}}{881} +\entry {\code {ULONG_LONG_MAX}}{881} +\entry {\code {ULONG_MAX}}{881} +\entry {\code {USER_PROCESS}}{783, 787} +\entry {\code {USHRT_MAX}}{881} \initial {V} -\entry {\code {VDISCARD}}{474} -\entry {\code {VDSUSP}}{473} -\entry {\code {VEOF}}{471} -\entry {\code {VEOL}}{471} -\entry {\code {VEOL2}}{471} -\entry {\code {VERASE}}{472} -\entry {\code {VINTR}}{473} -\entry {\code {VKILL}}{472} -\entry {\code {VLNEXT}}{474} -\entry {\code {VMIN}}{475} -\entry {\code {VQUIT}}{473} -\entry {\code {VREPRINT}}{472} -\entry {\code {VSTART}}{474} -\entry {\code {VSTATUS}}{475} -\entry {\code {VSTOP}}{474} -\entry {\code {VSUSP}}{473} -\entry {\code {VTIME}}{475} -\entry {\code {VWERASE}}{472} +\entry {\code {VDISCARD}}{482} +\entry {\code {VDSUSP}}{481} +\entry {\code {VEOF}}{479} +\entry {\code {VEOL}}{479} +\entry {\code {VEOL2}}{479} +\entry {\code {VERASE}}{480} +\entry {\code {VINTR}}{481} +\entry {\code {VKILL}}{480} +\entry {\code {VLNEXT}}{482} +\entry {\code {VMIN}}{483} +\entry {\code {VQUIT}}{481} +\entry {\code {VREPRINT}}{480} +\entry {\code {VSTART}}{482} +\entry {\code {VSTATUS}}{483} +\entry {\code {VSTOP}}{482} +\entry {\code {VSUSP}}{481} +\entry {\code {VTIME}}{483} +\entry {\code {VWERASE}}{480} \initial {W} -\entry {\code {W_OK}}{394} -\entry {\code {WCHAR_MAX}}{116, 863} -\entry {\code {WCHAR_MIN}}{116} -\entry {\code {WEOF}}{117, 291} +\entry {\code {W_OK}}{402} +\entry {\code {WCHAR_MAX}}{120, 881} +\entry {\code {WCHAR_MIN}}{120} +\entry {\code {WEOF}}{121, 297} \initial {X} -\entry {\code {X_OK}}{394} +\entry {\code {X_OK}}{402} \initial {Y} -\entry {\code {YESEXPR}}{172} -\entry {\code {YESSTR}}{172} +\entry {\code {YESEXPR}}{176} +\entry {\code {YESSTR}}{176} diff -durpN glibc-2.2.4/manual/libm-err-tab.pl glibc-2.2.5/manual/libm-err-tab.pl --- glibc-2.2.4/manual/libm-err-tab.pl Mon Jul 23 10:54:40 2001 +++ glibc-2.2.5/manual/libm-err-tab.pl Tue Aug 28 01:05:40 2001 @@ -52,10 +52,19 @@ use vars qw (%results @all_floats %suffi %pplatforms = ( "i386/fpu" => "ix86", "generic" => "Generic", - "alpha" => "Alpha" + "alpha/fpu" => "Alpha", + "ia64/fpu" => "IA64", + "m68k/fpu" => "M68k", + "mips/fpu" => "MIPS", + "powerpc/fpu" => "PowerPC", + "sparc/sparc32/fpu" => "Sparc 32-bit", + "sparc/sparc64/fpu" => "Sparc 64-bit", + "sh/sh4/fpu" => "SH4", + "s390/fpu" => "S/390", + "arm" => "ARM" ); -@all_functions = +@all_functions = ( "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "cabs", "cacos", "cacosh", "carg", "casin", "casinh", "catan", "catanh", "cbrt", "ccos", "ccosh", "ceil", "cexp", "cimag", @@ -79,6 +88,8 @@ if ($#ARGV == 0) { find (\&find_files, $sources); +@platforms = sort by_platforms @platforms; + &print_all; sub find_files { @@ -131,7 +142,7 @@ sub parse_ulps { } elsif ($eps eq "0") { # ignore next; - } elsif (!exists $results{$test}{$platform}{$type}{$float} + } elsif (!exists $results{$test}{$platform}{$type}{$float} || $results{$test}{$platform}{$type}{$float} ne 'fail') { $results{$test}{$platform}{$type}{$float} = $eps; } @@ -150,7 +161,7 @@ sub parse_ulps { sub get_value { my ($fct, $platform, $type, $float) = @_; - return (exists $results{$fct}{$platform}{$type}{$float} + return (exists $results{$fct}{$platform}{$type}{$float} ? $results{$fct}{$platform}{$type}{$float} : "0"); } @@ -163,27 +174,28 @@ sub canonicalize_platform { return exists $pplatforms{$platform} ? $pplatforms{$platform} : $platform; } -sub print_all { - my ($fct, $platform, $float, $first, $i); +sub print_platforms { + my (@p) = @_; + my ($fct, $platform, $float, $first, $i, $platform_no, $platform_total); print '@multitable {nexttowardf} '; - foreach (@platforms) { + foreach (@p) { print ' {1000 + i 1000}'; } print "\n"; print '@item Function '; - foreach (@platforms) { + foreach (@p) { print ' @tab '; print &canonicalize_platform ($_); } print "\n"; - + foreach $fct (@all_functions) { foreach $float (@all_floats) { print "\@item $fct$suffices{$float} "; - foreach $platform (@platforms) { + foreach $platform (@p) { print ' @tab '; if (exists $results{$fct}{$platform}{'normal'}{$float} || exists $results{$fct}{$platform}{'real'}{$float} @@ -203,4 +215,25 @@ sub print_all { } print "\@end multitable\n"; +} + +sub print_all { + my ($i, $max); + + my ($columns) = 5; + + # Print only 5 platforms at a time. + for ($i=0; $i < $#platforms; $i+=$columns) { + $max = $i+$columns-1 > $#platforms ? $#platforms : $i+$columns-1; + print_platforms (@platforms[$i .. $max]); + } +} + +sub by_platforms { + my ($pa, $pb); + + $pa = $pplatforms{$a} ? $pplatforms{$a} : $a; + $pb = $pplatforms{$b} ? $pplatforms{$b} : $b; + + return $pa cmp $pb; } diff -durpN glibc-2.2.4/manual/libm-err.texi glibc-2.2.5/manual/libm-err.texi --- glibc-2.2.4/manual/libm-err.texi Fri Jul 27 23:53:12 2001 +++ glibc-2.2.5/manual/libm-err.texi Tue Jan 8 14:20:39 2002 @@ -1,267 +1,801 @@ -@multitable {nexttowardf} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} -@item Function @tab alpha/fpu @tab arm @tab Generic @tab ix86 @tab ia64/fpu @tab m68k/fpu @tab mips/fpu @tab powerpc/fpu @tab sparc/sparc32/fpu @tab sparc/sparc64/fpu @tab sh/sh4/fpu @tab s390/fpu -@item acosf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item acos @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item acosl @tab - @tab - @tab - @tab 1150 @tab - @tab 1 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item acoshf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item acosh @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item acoshl @tab - @tab - @tab - @tab 1 @tab - @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item asinf @tab 2 @tab 2 @tab - @tab - @tab - @tab - @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item asin @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item asinl @tab - @tab - @tab - @tab 1 @tab 1 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item asinhf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item asinh @tab - @tab - @tab - @tab - @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item asinhl @tab - @tab - @tab - @tab 656 @tab 656 @tab 14 @tab - @tab - @tab - @tab - @tab - @tab - -@item atanf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item atan @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item atanl @tab - @tab - @tab - @tab 549 @tab - @tab - @tab - @tab - @tab - @tab 1 @tab - @tab - -@item atanhf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item atanh @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item atanhl @tab - @tab - @tab - @tab 1605 @tab 1605 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item atan2f @tab 4 @tab - @tab - @tab - @tab - @tab - @tab 4 @tab 4 @tab 4.0000 @tab 4 @tab 4 @tab 4 -@item atan2 @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item atan2l @tab - @tab - @tab - @tab 549 @tab - @tab - @tab - @tab - @tab - @tab 1 @tab - @tab - -@item cabsf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item cabs @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item cabsl @tab - @tab - @tab - @tab 560 @tab 560 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item cacosf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 2 @tab 1 + i 2 @tab 1 + i 2 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item cacos @tab 1 + i 0 @tab 1 + i 0 @tab - @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 -@item cacosl @tab - @tab - @tab - @tab 151 + i 329 @tab 151 + i 329 @tab 1 + i 1 @tab - @tab - @tab - @tab 0 + i 3 @tab - @tab - -@item cacoshf @tab 7 + i 3 @tab 7 + i 3 @tab - @tab 4 + i 4 @tab 7 + i 3 @tab 7 + i 0 @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 -@item cacosh @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item cacoshl @tab - @tab - @tab - @tab 328 + i 151 @tab 328 + i 151 @tab 6 + i 2 @tab - @tab - @tab - @tab 5 + i 1 @tab - @tab - -@item cargf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item carg @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cargl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item casinf @tab 2 + i 1 @tab 2 + i 1 @tab - @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 -@item casin @tab 3 + i 0 @tab 3 + i 0 @tab - @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 -@item casinl @tab - @tab - @tab - @tab 603 + i 329 @tab 603 + i 329 @tab 1 + i 1 @tab - @tab - @tab - @tab 1 + i 3 @tab - @tab - -@item casinhf @tab 1 + i 6 @tab 1 + i 6 @tab - @tab 1 + i 6 @tab 1 + i 6 @tab 19 + i 2 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 -@item casinh @tab 5 + i 3 @tab 5 + i 3 @tab - @tab 5 + i 3 @tab 5 + i 3 @tab 6 + i 13 @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 -@item casinhl @tab - @tab - @tab - @tab 892 + i 12 @tab 892 + i 12 @tab 6 + i 7 @tab - @tab - @tab - @tab 4 + i 2 @tab - @tab - -@item catanf @tab 4 + i 1 @tab 4 + i 1 @tab - @tab 0 + i 1 @tab 4 + i 1 @tab 0 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 -@item catan @tab 0 + i 1 @tab 0 + i 1 @tab - @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 -@item catanl @tab - @tab - @tab - @tab 251 + i 474 @tab 251 + i 474 @tab 1 + i 7 @tab - @tab - @tab - @tab 0 + i 1 @tab - @tab - -@item catanhf @tab 1 + i 6 @tab 1 + i 6 @tab - @tab 1 + i 0 @tab 0 + i 6 @tab - @tab 1 + i 6 @tab 0 + i 6 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 -@item catanh @tab 4 + i 1 @tab 4 + i 1 @tab - @tab 2 + i 0 @tab 4 + i 1 @tab - @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 -@item catanhl @tab - @tab - @tab - @tab 66 + i 447 @tab 66 + i 447 @tab 2 + i 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item cbrtf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cbrt @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item cbrtl @tab - @tab - @tab - @tab 716 @tab - @tab 948 @tab - @tab - @tab - @tab - @tab - @tab - -@item ccosf @tab 0 + i 1 @tab 0 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 -@item ccos @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 0 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item ccosl @tab - @tab - @tab - @tab 5 + i 1901 @tab 5 + i 1901 @tab 0 + i 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item ccoshf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 3 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item ccosh @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item ccoshl @tab - @tab - @tab - @tab 1467 + i 1183 @tab 1467 + i 1183 @tab 1 + i 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item ceilf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item ceil @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item ceill @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cexpf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 0 @tab 1 + i 1 @tab 3 + i 2 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item cexp @tab 1 + i 0 @tab 1 + i 0 @tab - @tab - @tab 1 + i 0 @tab - @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 -@item cexpl @tab - @tab - @tab - @tab 940 + i 1067 @tab 940 + i 1067 @tab 2 + i 0 @tab - @tab - @tab - @tab 1 + i 1 @tab - @tab - -@item cimagf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cimag @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cimagl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item clogf @tab 0 + i 3 @tab 0 + i 3 @tab - @tab - @tab 0 + i 3 @tab - @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 -@item clog @tab 0 + i 1 @tab 0 + i 1 @tab - @tab - @tab 0 + i 1 @tab - @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 -@item clogl @tab - @tab - @tab - @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item clog10f @tab 1 + i 5 @tab 1 + i 5 @tab - @tab 1 + i 1 @tab 1 + i 5 @tab 1 + i 1 @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 -@item clog10 @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 2 + i 1 @tab 2 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item clog10l @tab - @tab - @tab - @tab 1403 + i 186 @tab 1402 + i 186 @tab 1 + i 3 @tab - @tab - @tab - @tab - @tab - @tab - -@item conjf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item conj @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item conjl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item copysignf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item copysign @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item copysignl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cosf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item cos @tab 2 @tab 2 @tab - @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item cosl @tab - @tab - @tab - @tab 529 @tab 529 @tab 1 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item coshf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cosh @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item coshl @tab - @tab - @tab - @tab 309 @tab 2 @tab 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item cpowf @tab 4 + i 2 @tab 4 + i 2 @tab - @tab 4 + i 2.5333 @tab 5 + i 2.5333 @tab 1 + i 6 @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 -@item cpow @tab 1 + i 1.1031 @tab 1 + i 1.1031 @tab - @tab 1 + i 1.104 @tab 1 + i 1.104 @tab 1 + i 1.103 @tab 1 + i 1.1031 @tab 1 + i 2 @tab 1 + i 1.1031 @tab 1 + i 1.1031 @tab 1 + i 1.1031 @tab 1 + i 1.1031 -@item cpowl @tab - @tab - @tab - @tab 2 + i 9 @tab 1 + i 4 @tab 5 + i 2 @tab - @tab - @tab - @tab 3 + i 0.9006 @tab - @tab - -@item cprojf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cproj @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item cprojl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item crealf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item creal @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item creall @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item csinf @tab 0 + i 1 @tab 0 + i 1 @tab - @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 -@item csin @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item csinl @tab - @tab - @tab - @tab 966 + i 168 @tab 966 + i 168 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item csinhf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item csinh @tab 0 + i 1 @tab 0 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 -@item csinhl @tab - @tab - @tab - @tab 413 + i 477 @tab 413 + i 477 @tab 1 + i 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item csqrtf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab - @tab 1 + i 2 @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item csqrt @tab 1 + i 0 @tab 1 + i 0 @tab - @tab 1 + i 0 @tab 1 + i 0 @tab - @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 -@item csqrtl @tab - @tab - @tab - @tab 237 + i 128 @tab 237 + i 128 @tab - @tab - @tab - @tab - @tab 1 + i 1 @tab - @tab - -@item ctanf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item ctan @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 -@item ctanl @tab - @tab - @tab - @tab 690 + i 367 @tab 690 + i 367 @tab 439 + i 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item ctanhf @tab 2 + i 1 @tab 2 + i 1 @tab - @tab 1 + i 1 @tab 2 + i 2 @tab 1 + i 0 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 -@item ctanh @tab 2 + i 2 @tab 2 + i 2 @tab - @tab 0 + i 1 @tab 2 + i 2 @tab 0 + i 1 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 -@item ctanhl @tab - @tab - @tab - @tab 286 + i 3074 @tab 286 + i 3074 @tab 2 + i 25 @tab - @tab - @tab - @tab - @tab - @tab - -@item erff @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item erf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item erfl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item erfcf @tab 12 @tab 12 @tab - @tab 12 @tab 12 @tab 11 @tab 12 @tab 12 @tab 12 @tab 12 @tab 12 @tab 12 -@item erfc @tab 24 @tab 24 @tab - @tab 24 @tab 24 @tab 24 @tab 24 @tab 24 @tab 24 @tab 24 @tab 24 @tab 24 -@item erfcl @tab - @tab - @tab - @tab 36 @tab 12 @tab 12 @tab - @tab - @tab - @tab - @tab - @tab - -@item expf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item exp @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item expl @tab - @tab - @tab - @tab 754 @tab 412 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item exp10f @tab 2 @tab 2 @tab - @tab - @tab 2 @tab - @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item exp10 @tab 6 @tab 6 @tab - @tab 1 @tab 6 @tab 1 @tab 6 @tab 6 @tab 6 @tab 6 @tab 6 @tab 6 -@item exp10l @tab - @tab - @tab - @tab 1182 @tab 1182 @tab 1 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item exp2f @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item exp2 @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item exp2l @tab - @tab - @tab - @tab 462 @tab 462 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item expm1f @tab 1 @tab 1 @tab - @tab - @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item expm1 @tab - @tab - @tab - @tab - @tab 1 @tab - @tab - @tab - @tab - @tab 1 @tab - @tab - -@item expm1l @tab - @tab - @tab - @tab 825 @tab 825 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item fabsf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fabs @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fabsl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fdimf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fdim @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fdiml @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item floorf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item floor @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item floorl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmaf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fma @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmal @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmaxf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmax @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmaxl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fminf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmin @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fminl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item fmodf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item fmod @tab 2 @tab 2 @tab - @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item fmodl @tab - @tab - @tab - @tab 4096 @tab 4096 @tab 1 @tab - @tab - @tab - @tab 2 @tab - @tab - -@item frexpf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item frexp @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item frexpl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item gammaf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item gamma @tab - @tab - @tab - @tab 1 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item gammal @tab - @tab - @tab - @tab 1 @tab 1 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item hypotf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item hypot @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item hypotl @tab - @tab - @tab - @tab 560 @tab 560 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item ilogbf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item ilogb @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item ilogbl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item j0f @tab 2 @tab 2 @tab - @tab 1 @tab 1 @tab 1 @tab 2 @tab 1 @tab 2 @tab 2 @tab 2 @tab 2 -@item j0 @tab 2 @tab 2 @tab - @tab 2 @tab 2 @tab 1 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item j0l @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item j1f @tab 2 @tab 2 @tab - @tab 1 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item j1 @tab 1 @tab 1 @tab - @tab 2 @tab 2 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item j1l @tab - @tab - @tab - @tab 2 @tab - @tab 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item jnf @tab 4 @tab 4 @tab - @tab 2 @tab 4 @tab 11 @tab 4 @tab 4 @tab 4 @tab 4 @tab 4 @tab 4 -@item jn @tab 6 @tab 6 @tab - @tab 5 @tab 6 @tab 4 @tab 6 @tab 6 @tab 6 @tab 6 @tab 6 @tab 6 -@item jnl @tab - @tab - @tab - @tab 2 @tab 2 @tab 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item lgammaf @tab 2 @tab 2 @tab - @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item lgamma @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item lgammal @tab - @tab - @tab - @tab 1 @tab 1 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item lrintf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item lrint @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item lrintl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item llrintf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item llrint @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item llrintl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item logf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item logl @tab - @tab - @tab - @tab 2341 @tab 2341 @tab 2 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item log10f @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log10 @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log10l @tab - @tab - @tab - @tab 2033 @tab 2033 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item log1pf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log1p @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log1pl @tab - @tab - @tab - @tab 585 @tab 585 @tab 2 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item log2f @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log2 @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item log2l @tab - @tab - @tab - @tab 1688 @tab 1688 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item logbf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item logb @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item logbl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item lroundf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item lround @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item lroundl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item llroundf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item llround @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item llroundl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item modff @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item modf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item modfl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nearbyintf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nearbyint @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nearbyintl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nextafterf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nextafter @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nextafterl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nexttowardf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nexttoward @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item nexttowardl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item powf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item pow @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item powl @tab - @tab - @tab - @tab 725 @tab 725 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item remainderf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item remainder @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item remainderl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item remquof @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item remquo @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item remquol @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item rintf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item rint @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item rintl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item roundf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item round @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item roundl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalbf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalb @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalbl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalbnf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalbn @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalbnl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalblnf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalbln @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item scalblnl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item sinf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item sin @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item sinl @tab - @tab - @tab - @tab 627 @tab 627 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item sincosf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item sincos @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item sincosl @tab - @tab - @tab - @tab 627 @tab 627 @tab 1 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item sinhf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item sinh @tab 1 @tab 1 @tab - @tab - @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item sinhl @tab - @tab - @tab - @tab 1029 @tab 1029 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item sqrtf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item sqrt @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item sqrtl @tab - @tab - @tab - @tab 489 @tab 489 @tab - @tab - @tab - @tab - @tab 1 @tab - @tab - -@item tanf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item tan @tab 0.5 @tab 0.5 @tab - @tab 0.5 @tab 0.5 @tab 0.5 @tab 0.5 @tab 1 @tab 0.5 @tab 0.5 @tab 0.5 @tab 0.5 -@item tanl @tab - @tab - @tab - @tab 1401 @tab 1401 @tab 1 @tab - @tab - @tab - @tab 1 @tab - @tab - -@item tanhf @tab 1 @tab 1 @tab - @tab - @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item tanh @tab 1 @tab 1 @tab - @tab - @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item tanhl @tab - @tab - @tab - @tab 521 @tab 521 @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item tgammaf @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item tgamma @tab 1 @tab 1 @tab - @tab 2 @tab 2 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item tgammal @tab - @tab - @tab - @tab 2 @tab 1 @tab 1 @tab - @tab - @tab - @tab - @tab - @tab - -@item truncf @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item trunc @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item truncl @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - @tab - -@item y0f @tab 1 @tab 1 @tab - @tab 1 @tab 1 @tab 2 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 -@item y0 @tab 2 @tab 2 @tab - @tab 3 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item y0l @tab - @tab - @tab - @tab 2 @tab 2 @tab 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item y1f @tab 2 @tab 2 @tab - @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item y1 @tab 3 @tab 3 @tab - @tab 3 @tab 3 @tab 1 @tab 3 @tab 3 @tab 3 @tab 3 @tab 3 @tab 3 -@item y1l @tab - @tab - @tab - @tab 2 @tab 1 @tab 2 @tab - @tab - @tab - @tab - @tab - @tab - -@item ynf @tab 2 @tab 2 @tab - @tab 3 @tab 3 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 -@item yn @tab 3 @tab 3 @tab - @tab 6 @tab 6 @tab 6 @tab 3 @tab 3 @tab 3 @tab 3 @tab 3 @tab 3 -@item ynl @tab - @tab - @tab - @tab 7 @tab 7 @tab 7 @tab - @tab - @tab - @tab - @tab - @tab - +@multitable {nexttowardf} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} +@item Function @tab Alpha @tab ARM @tab Generic @tab ix86 @tab IA64 +@item acosf @tab - @tab - @tab - @tab - @tab - +@item acos @tab - @tab - @tab - @tab - @tab - +@item acosl @tab - @tab - @tab - @tab 1150 @tab - +@item acoshf @tab - @tab - @tab - @tab - @tab - +@item acosh @tab - @tab - @tab - @tab - @tab - +@item acoshl @tab - @tab - @tab - @tab 1 @tab - +@item asinf @tab 2 @tab 2 @tab - @tab - @tab - +@item asin @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item asinl @tab - @tab - @tab - @tab 1 @tab - +@item asinhf @tab - @tab - @tab - @tab - @tab - +@item asinh @tab - @tab - @tab - @tab - @tab - +@item asinhl @tab - @tab - @tab - @tab 656 @tab 14 +@item atanf @tab - @tab - @tab - @tab - @tab - +@item atan @tab - @tab - @tab - @tab - @tab - +@item atanl @tab - @tab - @tab - @tab 549 @tab - +@item atanhf @tab - @tab - @tab - @tab - @tab - +@item atanh @tab 1 @tab 1 @tab - @tab 1 @tab - +@item atanhl @tab - @tab - @tab - @tab 1605 @tab - +@item atan2f @tab 4 @tab - @tab - @tab - @tab - +@item atan2 @tab - @tab - @tab - @tab - @tab - +@item atan2l @tab - @tab - @tab - @tab 549 @tab - +@item cabsf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item cabs @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item cabsl @tab - @tab - @tab - @tab 560 @tab 1 +@item cacosf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 2 @tab 1 + i 2 +@item cacos @tab 1 + i 0 @tab 1 + i 0 @tab - @tab 1 + i 0 @tab 1 + i 0 +@item cacosl @tab - @tab - @tab - @tab 151 + i 329 @tab 1 + i 1 +@item cacoshf @tab 7 + i 3 @tab 7 + i 3 @tab - @tab 4 + i 4 @tab 7 + i 0 +@item cacosh @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item cacoshl @tab - @tab - @tab - @tab 328 + i 151 @tab 7 + i 1 +@item cargf @tab - @tab - @tab - @tab - @tab - +@item carg @tab - @tab - @tab - @tab - @tab - +@item cargl @tab - @tab - @tab - @tab - @tab - +@item casinf @tab 2 + i 1 @tab 2 + i 1 @tab - @tab 2 + i 2 @tab 2 + i 2 +@item casin @tab 3 + i 0 @tab 3 + i 0 @tab - @tab 3 + i 0 @tab 3 + i 0 +@item casinl @tab - @tab - @tab - @tab 603 + i 329 @tab 0 + i 1 +@item casinhf @tab 1 + i 6 @tab 1 + i 6 @tab - @tab 1 + i 6 @tab 1 + i 6 +@item casinh @tab 5 + i 3 @tab 5 + i 3 @tab - @tab 5 + i 3 @tab 5 + i 3 +@item casinhl @tab - @tab - @tab - @tab 892 + i 12 @tab 5 + i 5 +@item catanf @tab 4 + i 1 @tab 4 + i 1 @tab - @tab 0 + i 1 @tab 0 + i 1 +@item catan @tab 0 + i 1 @tab 0 + i 1 @tab - @tab 0 + i 1 @tab 0 + i 1 +@item catanl @tab - @tab - @tab - @tab 251 + i 474 @tab 1 + i 0 +@item catanhf @tab 1 + i 6 @tab 1 + i 6 @tab - @tab 1 + i 0 @tab - +@item catanh @tab 4 + i 1 @tab 4 + i 1 @tab - @tab 2 + i 0 @tab 4 + i 0 +@item catanhl @tab - @tab - @tab - @tab 66 + i 447 @tab 1 + i 0 +@item cbrtf @tab - @tab - @tab - @tab - @tab - +@item cbrt @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item cbrtl @tab - @tab - @tab - @tab 716 @tab - +@item ccosf @tab 0 + i 1 @tab 0 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ccos @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ccosl @tab - @tab - @tab - @tab 5 + i 1901 @tab 0 + i 1 +@item ccoshf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ccosh @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ccoshl @tab - @tab - @tab - @tab 1467 + i 1183 @tab 1 + i 1 +@item ceilf @tab - @tab - @tab - @tab - @tab - +@item ceil @tab - @tab - @tab - @tab - @tab - +@item ceill @tab - @tab - @tab - @tab - @tab - +@item cexpf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 0 @tab 1 + i 1 +@item cexp @tab 1 + i 0 @tab 1 + i 0 @tab - @tab - @tab 1 + i 0 +@item cexpl @tab - @tab - @tab - @tab 940 + i 1067 @tab 2 + i 0 +@item cimagf @tab - @tab - @tab - @tab - @tab - +@item cimag @tab - @tab - @tab - @tab - @tab - +@item cimagl @tab - @tab - @tab - @tab - @tab - +@item clogf @tab 0 + i 3 @tab 0 + i 3 @tab - @tab - @tab - +@item clog @tab 0 + i 1 @tab 0 + i 1 @tab - @tab - @tab - +@item clogl @tab - @tab - @tab - @tab 0 + i 1 @tab - +@item clog10f @tab 1 + i 5 @tab 1 + i 5 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item clog10 @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 2 + i 1 @tab 2 + i 1 +@item clog10l @tab - @tab - @tab - @tab 1403 + i 186 @tab 1 + i 2 +@item conjf @tab - @tab - @tab - @tab - @tab - +@item conj @tab - @tab - @tab - @tab - @tab - +@item conjl @tab - @tab - @tab - @tab - @tab - +@item copysignf @tab - @tab - @tab - @tab - @tab - +@item copysign @tab - @tab - @tab - @tab - @tab - +@item copysignl @tab - @tab - @tab - @tab - @tab - +@item cosf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item cos @tab 2 @tab 2 @tab - @tab 2 @tab 2 +@item cosl @tab - @tab - @tab - @tab 529 @tab 0.5 +@item coshf @tab - @tab - @tab - @tab - @tab - +@item cosh @tab - @tab - @tab - @tab - @tab - +@item coshl @tab - @tab - @tab - @tab 309 @tab 2 +@item cpowf @tab 4 + i 2 @tab 4 + i 2 @tab - @tab 4 + i 2.5333 @tab 5 + i 2.5333 +@item cpow @tab 1 + i 1.1031 @tab 1 + i 1.1031 @tab - @tab 1 + i 1.104 @tab 1 + i 1.1031 +@item cpowl @tab - @tab - @tab - @tab 2 + i 9 @tab 1 + i 4 +@item cprojf @tab - @tab - @tab - @tab - @tab - +@item cproj @tab - @tab - @tab - @tab - @tab - +@item cprojl @tab - @tab - @tab - @tab - @tab - +@item crealf @tab - @tab - @tab - @tab - @tab - +@item creal @tab - @tab - @tab - @tab - @tab - +@item creall @tab - @tab - @tab - @tab - @tab - +@item csinf @tab 0 + i 1 @tab 0 + i 1 @tab - @tab - @tab - +@item csin @tab - @tab - @tab - @tab - @tab - +@item csinl @tab - @tab - @tab - @tab 966 + i 168 @tab 0 + i 1 +@item csinhf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item csinh @tab 0 + i 1 @tab 0 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item csinhl @tab - @tab - @tab - @tab 413 + i 477 @tab 2 + i 2 +@item csqrtf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab - @tab 1 + i 1 +@item csqrt @tab 1 + i 0 @tab 1 + i 0 @tab - @tab 1 + i 0 @tab 1 + i 0 +@item csqrtl @tab - @tab - @tab - @tab 237 + i 128 @tab - +@item ctanf @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ctan @tab 1 + i 1 @tab 1 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ctanl @tab - @tab - @tab - @tab 690 + i 367 @tab 436 + i 1 +@item ctanhf @tab 2 + i 1 @tab 2 + i 1 @tab - @tab 1 + i 1 @tab 1 + i 1 +@item ctanh @tab 2 + i 2 @tab 2 + i 2 @tab - @tab 0 + i 1 @tab 0 + i 1 +@item ctanhl @tab - @tab - @tab - @tab 286 + i 3074 @tab 1 + i 24 +@item erff @tab - @tab - @tab - @tab - @tab - +@item erf @tab - @tab - @tab - @tab - @tab - +@item erfl @tab - @tab - @tab - @tab - @tab - +@item erfcf @tab 12 @tab 12 @tab - @tab 12 @tab 12 +@item erfc @tab 24 @tab 24 @tab - @tab 24 @tab 24 +@item erfcl @tab - @tab - @tab - @tab 36 @tab 12 +@item expf @tab - @tab - @tab - @tab - @tab - +@item exp @tab - @tab - @tab - @tab - @tab - +@item expl @tab - @tab - @tab - @tab 754 @tab - +@item exp10f @tab 2 @tab 2 @tab - @tab - @tab 2 +@item exp10 @tab 6 @tab 6 @tab - @tab 1 @tab 6 +@item exp10l @tab - @tab - @tab - @tab 1182 @tab 3 +@item exp2f @tab - @tab - @tab - @tab - @tab - +@item exp2 @tab - @tab - @tab - @tab - @tab - +@item exp2l @tab - @tab - @tab - @tab 462 @tab - +@item expm1f @tab 1 @tab 1 @tab - @tab - @tab - +@item expm1 @tab - @tab - @tab - @tab - @tab - +@item expm1l @tab - @tab - @tab - @tab 825 @tab 1 +@item fabsf @tab - @tab - @tab - @tab - @tab - +@item fabs @tab - @tab - @tab - @tab - @tab - +@item fabsl @tab - @tab - @tab - @tab - @tab - +@item fdimf @tab - @tab - @tab - @tab - @tab - +@item fdim @tab - @tab - @tab - @tab - @tab - +@item fdiml @tab - @tab - @tab - @tab - @tab - +@item floorf @tab - @tab - @tab - @tab - @tab - +@item floor @tab - @tab - @tab - @tab - @tab - +@item floorl @tab - @tab - @tab - @tab - @tab - +@item fmaf @tab - @tab - @tab - @tab - @tab - +@item fma @tab - @tab - @tab - @tab - @tab - +@item fmal @tab - @tab - @tab - @tab - @tab - +@item fmaxf @tab - @tab - @tab - @tab - @tab - +@item fmax @tab - @tab - @tab - @tab - @tab - +@item fmaxl @tab - @tab - @tab - @tab - @tab - +@item fminf @tab - @tab - @tab - @tab - @tab - +@item fmin @tab - @tab - @tab - @tab - @tab - +@item fminl @tab - @tab - @tab - @tab - @tab - +@item fmodf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item fmod @tab 2 @tab 2 @tab - @tab 2 @tab 2 +@item fmodl @tab - @tab - @tab - @tab 4096 @tab 1 +@item frexpf @tab - @tab - @tab - @tab - @tab - +@item frexp @tab - @tab - @tab - @tab - @tab - +@item frexpl @tab - @tab - @tab - @tab - @tab - +@item gammaf @tab - @tab - @tab - @tab - @tab - +@item gamma @tab - @tab - @tab - @tab 1 @tab - +@item gammal @tab - @tab - @tab - @tab 1 @tab 1 +@item hypotf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item hypot @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item hypotl @tab - @tab - @tab - @tab 560 @tab 1 +@item ilogbf @tab - @tab - @tab - @tab - @tab - +@item ilogb @tab - @tab - @tab - @tab - @tab - +@item ilogbl @tab - @tab - @tab - @tab - @tab - +@item j0f @tab 2 @tab 2 @tab - @tab 1 @tab 1 +@item j0 @tab 2 @tab 2 @tab - @tab 2 @tab 2 +@item j0l @tab - @tab - @tab - @tab 1 @tab 2 +@item j1f @tab 2 @tab 2 @tab - @tab 1 @tab 2 +@item j1 @tab 1 @tab 1 @tab - @tab 2 @tab 1 +@item j1l @tab - @tab - @tab - @tab 2 @tab - +@item jnf @tab 4 @tab 4 @tab - @tab 2 @tab 4 +@item jn @tab 6 @tab 6 @tab - @tab 5 @tab 6 +@item jnl @tab - @tab - @tab - @tab 2 @tab 2 +@item lgammaf @tab 2 @tab 2 @tab - @tab 2 @tab 2 +@item lgamma @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item lgammal @tab - @tab - @tab - @tab 1 @tab 1 +@item lrintf @tab - @tab - @tab - @tab - @tab - +@item lrint @tab - @tab - @tab - @tab - @tab - +@item lrintl @tab - @tab - @tab - @tab - @tab - +@item llrintf @tab - @tab - @tab - @tab - @tab - +@item llrint @tab - @tab - @tab - @tab - @tab - +@item llrintl @tab - @tab - @tab - @tab - @tab - +@item logf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item logl @tab - @tab - @tab - @tab 2341 @tab 1 +@item log10f @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log10 @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log10l @tab - @tab - @tab - @tab 2033 @tab 1 +@item log1pf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log1p @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log1pl @tab - @tab - @tab - @tab 585 @tab 1 +@item log2f @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log2 @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item log2l @tab - @tab - @tab - @tab 1688 @tab - +@item logbf @tab - @tab - @tab - @tab - @tab - +@item logb @tab - @tab - @tab - @tab - @tab - +@item logbl @tab - @tab - @tab - @tab - @tab - +@item lroundf @tab - @tab - @tab - @tab - @tab - +@item lround @tab - @tab - @tab - @tab - @tab - +@item lroundl @tab - @tab - @tab - @tab - @tab - +@item llroundf @tab - @tab - @tab - @tab - @tab - +@item llround @tab - @tab - @tab - @tab - @tab - +@item llroundl @tab - @tab - @tab - @tab - @tab - +@item modff @tab - @tab - @tab - @tab - @tab - +@item modf @tab - @tab - @tab - @tab - @tab - +@item modfl @tab - @tab - @tab - @tab - @tab - +@item nearbyintf @tab - @tab - @tab - @tab - @tab - +@item nearbyint @tab - @tab - @tab - @tab - @tab - +@item nearbyintl @tab - @tab - @tab - @tab - @tab - +@item nextafterf @tab - @tab - @tab - @tab - @tab - +@item nextafter @tab - @tab - @tab - @tab - @tab - +@item nextafterl @tab - @tab - @tab - @tab - @tab - +@item nexttowardf @tab - @tab - @tab - @tab - @tab - +@item nexttoward @tab - @tab - @tab - @tab - @tab - +@item nexttowardl @tab - @tab - @tab - @tab - @tab - +@item powf @tab - @tab - @tab - @tab - @tab - +@item pow @tab - @tab - @tab - @tab - @tab - +@item powl @tab - @tab - @tab - @tab 725 @tab 1 +@item remainderf @tab - @tab - @tab - @tab - @tab - +@item remainder @tab - @tab - @tab - @tab - @tab - +@item remainderl @tab - @tab - @tab - @tab - @tab - +@item remquof @tab - @tab - @tab - @tab - @tab - +@item remquo @tab - @tab - @tab - @tab - @tab - +@item remquol @tab - @tab - @tab - @tab - @tab - +@item rintf @tab - @tab - @tab - @tab - @tab - +@item rint @tab - @tab - @tab - @tab - @tab - +@item rintl @tab - @tab - @tab - @tab - @tab - +@item roundf @tab - @tab - @tab - @tab - @tab - +@item round @tab - @tab - @tab - @tab - @tab - +@item roundl @tab - @tab - @tab - @tab - @tab - +@item scalbf @tab - @tab - @tab - @tab - @tab - +@item scalb @tab - @tab - @tab - @tab - @tab - +@item scalbl @tab - @tab - @tab - @tab - @tab - +@item scalbnf @tab - @tab - @tab - @tab - @tab - +@item scalbn @tab - @tab - @tab - @tab - @tab - +@item scalbnl @tab - @tab - @tab - @tab - @tab - +@item scalblnf @tab - @tab - @tab - @tab - @tab - +@item scalbln @tab - @tab - @tab - @tab - @tab - +@item scalblnl @tab - @tab - @tab - @tab - @tab - +@item sinf @tab - @tab - @tab - @tab - @tab - +@item sin @tab - @tab - @tab - @tab - @tab - +@item sinl @tab - @tab - @tab - @tab 627 @tab 1 +@item sincosf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item sincos @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item sincosl @tab - @tab - @tab - @tab 627 @tab 1 +@item sinhf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item sinh @tab 1 @tab 1 @tab - @tab - @tab - +@item sinhl @tab - @tab - @tab - @tab 1029 @tab 1 +@item sqrtf @tab - @tab - @tab - @tab - @tab - +@item sqrt @tab - @tab - @tab - @tab - @tab - +@item sqrtl @tab - @tab - @tab - @tab 489 @tab - +@item tanf @tab - @tab - @tab - @tab - @tab - +@item tan @tab 0.5 @tab 0.5 @tab - @tab 0.5 @tab 0.5 +@item tanl @tab - @tab - @tab - @tab 1401 @tab 1 +@item tanhf @tab 1 @tab 1 @tab - @tab - @tab 1 +@item tanh @tab 1 @tab 1 @tab - @tab - @tab 1 +@item tanhl @tab - @tab - @tab - @tab 521 @tab 1 +@item tgammaf @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item tgamma @tab 1 @tab 1 @tab - @tab 2 @tab 1 +@item tgammal @tab - @tab - @tab - @tab 2 @tab 1 +@item truncf @tab - @tab - @tab - @tab - @tab - +@item trunc @tab - @tab - @tab - @tab - @tab - +@item truncl @tab - @tab - @tab - @tab - @tab - +@item y0f @tab 1 @tab 1 @tab - @tab 1 @tab 1 +@item y0 @tab 2 @tab 2 @tab - @tab 3 @tab 2 +@item y0l @tab - @tab - @tab - @tab 2 @tab 2 +@item y1f @tab 2 @tab 2 @tab - @tab 2 @tab 2 +@item y1 @tab 3 @tab 3 @tab - @tab 3 @tab 3 +@item y1l @tab - @tab - @tab - @tab 2 @tab 1 +@item ynf @tab 2 @tab 2 @tab - @tab 3 @tab 2 +@item yn @tab 3 @tab 3 @tab - @tab 6 @tab 3 +@item ynl @tab - @tab - @tab - @tab 7 @tab 7 +@end multitable +@multitable {nexttowardf} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} +@item Function @tab M68k @tab MIPS @tab PowerPC @tab S/390 @tab SH4 +@item acosf @tab - @tab - @tab - @tab - @tab - +@item acos @tab - @tab - @tab - @tab - @tab - +@item acosl @tab 1 @tab - @tab - @tab - @tab - +@item acoshf @tab - @tab - @tab - @tab - @tab - +@item acosh @tab - @tab - @tab - @tab - @tab - +@item acoshl @tab 1 @tab - @tab - @tab - @tab - +@item asinf @tab - @tab 2 @tab 2 @tab 2 @tab 2 +@item asin @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item asinl @tab 1 @tab - @tab - @tab - @tab - +@item asinhf @tab - @tab - @tab - @tab - @tab - +@item asinh @tab - @tab - @tab - @tab - @tab - +@item asinhl @tab 14 @tab - @tab - @tab - @tab - +@item atanf @tab - @tab - @tab - @tab - @tab - +@item atan @tab - @tab - @tab - @tab - @tab - +@item atanl @tab - @tab - @tab - @tab - @tab - +@item atanhf @tab - @tab - @tab - @tab - @tab - +@item atanh @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item atanhl @tab - @tab - @tab - @tab - @tab - +@item atan2f @tab - @tab 4 @tab 4 @tab 4 @tab 4 +@item atan2 @tab - @tab - @tab - @tab - @tab - +@item atan2l @tab - @tab - @tab - @tab - @tab - +@item cabsf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item cabs @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item cabsl @tab 1 @tab - @tab - @tab - @tab - +@item cacosf @tab 1 + i 2 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item cacos @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 +@item cacosl @tab 1 + i 1 @tab - @tab - @tab - @tab - +@item cacoshf @tab 7 + i 0 @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 +@item cacosh @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item cacoshl @tab 6 + i 2 @tab - @tab - @tab - @tab - +@item cargf @tab - @tab - @tab - @tab - @tab - +@item carg @tab - @tab - @tab - @tab - @tab - +@item cargl @tab - @tab - @tab - @tab - @tab - +@item casinf @tab 2 + i 2 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 +@item casin @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 +@item casinl @tab 0 + i 1 @tab - @tab - @tab - @tab - +@item casinhf @tab 19 + i 2 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 +@item casinh @tab 6 + i 13 @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 +@item casinhl @tab 5 + i 6 @tab - @tab - @tab - @tab - +@item catanf @tab 0 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 +@item catan @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item catanl @tab 1 + i 0 @tab - @tab - @tab - @tab - +@item catanhf @tab - @tab 1 + i 6 @tab 0 + i 6 @tab 1 + i 6 @tab 1 + i 6 +@item catanh @tab - @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 +@item catanhl @tab 1 + i 0 @tab - @tab - @tab - @tab - +@item cbrtf @tab - @tab - @tab - @tab - @tab - +@item cbrt @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item cbrtl @tab 1 @tab - @tab - @tab - @tab - +@item ccosf @tab 1 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item ccos @tab 0 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ccosl @tab 0 + i 1 @tab - @tab - @tab - @tab - +@item ccoshf @tab 3 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ccosh @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ccoshl @tab 1 + i 2 @tab - @tab - @tab - @tab - +@item ceilf @tab - @tab - @tab - @tab - @tab - +@item ceil @tab - @tab - @tab - @tab - @tab - +@item ceill @tab - @tab - @tab - @tab - @tab - +@item cexpf @tab 3 + i 2 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item cexp @tab - @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 +@item cexpl @tab 2 + i 0 @tab - @tab - @tab - @tab - +@item cimagf @tab - @tab - @tab - @tab - @tab - +@item cimag @tab - @tab - @tab - @tab - @tab - +@item cimagl @tab - @tab - @tab - @tab - @tab - +@item clogf @tab - @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 +@item clog @tab - @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item clogl @tab - @tab - @tab - @tab - @tab - +@item clog10f @tab 1 + i 1 @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 +@item clog10 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item clog10l @tab 1 + i 3 @tab - @tab - @tab - @tab - +@item conjf @tab - @tab - @tab - @tab - @tab - +@item conj @tab - @tab - @tab - @tab - @tab - +@item conjl @tab - @tab - @tab - @tab - @tab - +@item copysignf @tab - @tab - @tab - @tab - @tab - +@item copysign @tab - @tab - @tab - @tab - @tab - +@item copysignl @tab - @tab - @tab - @tab - @tab - +@item cosf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item cos @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item cosl @tab 1 @tab - @tab - @tab - @tab - +@item coshf @tab - @tab - @tab - @tab - @tab - +@item cosh @tab - @tab - @tab - @tab - @tab - +@item coshl @tab 2 @tab - @tab - @tab - @tab - +@item cpowf @tab 1 + i 6 @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 +@item cpow @tab 1 + i 2 @tab 1 + i 1.1031 @tab 1 + i 2 @tab 1 + i 1.1031 @tab 1 + i 1.1031 +@item cpowl @tab 5 + i 2 @tab - @tab - @tab - @tab - +@item cprojf @tab - @tab - @tab - @tab - @tab - +@item cproj @tab - @tab - @tab - @tab - @tab - +@item cprojl @tab - @tab - @tab - @tab - @tab - +@item crealf @tab - @tab - @tab - @tab - @tab - +@item creal @tab - @tab - @tab - @tab - @tab - +@item creall @tab - @tab - @tab - @tab - @tab - +@item csinf @tab 1 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item csin @tab - @tab - @tab - @tab - @tab - +@item csinl @tab - @tab - @tab - @tab - @tab - +@item csinhf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item csinh @tab - @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item csinhl @tab 1 + i 2 @tab - @tab - @tab - @tab - +@item csqrtf @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item csqrt @tab - @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 +@item csqrtl @tab - @tab - @tab - @tab - @tab - +@item ctanf @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ctan @tab 1 + i 0 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ctanl @tab 439 + i 2 @tab - @tab - @tab - @tab - +@item ctanhf @tab 1 + i 0 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 +@item ctanh @tab 0 + i 1 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 +@item ctanhl @tab 2 + i 25 @tab - @tab - @tab - @tab - +@item erff @tab - @tab - @tab - @tab - @tab - +@item erf @tab - @tab - @tab - @tab - @tab - +@item erfl @tab - @tab - @tab - @tab - @tab - +@item erfcf @tab 11 @tab 12 @tab 12 @tab 12 @tab 12 +@item erfc @tab 24 @tab 24 @tab 24 @tab 24 @tab 24 +@item erfcl @tab 12 @tab - @tab - @tab - @tab - +@item expf @tab - @tab - @tab - @tab - @tab - +@item exp @tab - @tab - @tab - @tab - @tab - +@item expl @tab - @tab - @tab - @tab - @tab - +@item exp10f @tab - @tab 2 @tab 2 @tab 2 @tab 2 +@item exp10 @tab 1 @tab 6 @tab 6 @tab 6 @tab 6 +@item exp10l @tab 1 @tab - @tab - @tab - @tab - +@item exp2f @tab - @tab - @tab - @tab - @tab - +@item exp2 @tab - @tab - @tab - @tab - @tab - +@item exp2l @tab - @tab - @tab - @tab - @tab - +@item expm1f @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item expm1 @tab - @tab - @tab - @tab - @tab - +@item expm1l @tab 1 @tab - @tab - @tab - @tab - +@item fabsf @tab - @tab - @tab - @tab - @tab - +@item fabs @tab - @tab - @tab - @tab - @tab - +@item fabsl @tab - @tab - @tab - @tab - @tab - +@item fdimf @tab - @tab - @tab - @tab - @tab - +@item fdim @tab - @tab - @tab - @tab - @tab - +@item fdiml @tab - @tab - @tab - @tab - @tab - +@item floorf @tab - @tab - @tab - @tab - @tab - +@item floor @tab - @tab - @tab - @tab - @tab - +@item floorl @tab - @tab - @tab - @tab - @tab - +@item fmaf @tab - @tab - @tab - @tab - @tab - +@item fma @tab - @tab - @tab - @tab - @tab - +@item fmal @tab - @tab - @tab - @tab - @tab - +@item fmaxf @tab - @tab - @tab - @tab - @tab - +@item fmax @tab - @tab - @tab - @tab - @tab - +@item fmaxl @tab - @tab - @tab - @tab - @tab - +@item fminf @tab - @tab - @tab - @tab - @tab - +@item fmin @tab - @tab - @tab - @tab - @tab - +@item fminl @tab - @tab - @tab - @tab - @tab - +@item fmodf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item fmod @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item fmodl @tab 1 @tab - @tab - @tab - @tab - +@item frexpf @tab - @tab - @tab - @tab - @tab - +@item frexp @tab - @tab - @tab - @tab - @tab - +@item frexpl @tab - @tab - @tab - @tab - @tab - +@item gammaf @tab - @tab - @tab - @tab - @tab - +@item gamma @tab - @tab - @tab - @tab - @tab - +@item gammal @tab 1 @tab - @tab - @tab - @tab - +@item hypotf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item hypot @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item hypotl @tab 1 @tab - @tab - @tab - @tab - +@item ilogbf @tab - @tab - @tab - @tab - @tab - +@item ilogb @tab - @tab - @tab - @tab - @tab - +@item ilogbl @tab - @tab - @tab - @tab - @tab - +@item j0f @tab 1 @tab 2 @tab 1 @tab 2 @tab 2 +@item j0 @tab 1 @tab 2 @tab 2 @tab 2 @tab 2 +@item j0l @tab 1 @tab - @tab - @tab - @tab - +@item j1f @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item j1 @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item j1l @tab 2 @tab - @tab - @tab - @tab - +@item jnf @tab 11 @tab 4 @tab 4 @tab 4 @tab 4 +@item jn @tab 4 @tab 6 @tab 6 @tab 6 @tab 6 +@item jnl @tab 2 @tab - @tab - @tab - @tab - +@item lgammaf @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item lgamma @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item lgammal @tab 1 @tab - @tab - @tab - @tab - +@item lrintf @tab - @tab - @tab - @tab - @tab - +@item lrint @tab - @tab - @tab - @tab - @tab - +@item lrintl @tab - @tab - @tab - @tab - @tab - +@item llrintf @tab - @tab - @tab - @tab - @tab - +@item llrint @tab - @tab - @tab - @tab - @tab - +@item llrintl @tab - @tab - @tab - @tab - @tab - +@item logf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item logl @tab 2 @tab - @tab - @tab - @tab - +@item log10f @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log10 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log10l @tab 1 @tab - @tab - @tab - @tab - +@item log1pf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log1p @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log1pl @tab 2 @tab - @tab - @tab - @tab - +@item log2f @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log2 @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item log2l @tab 1 @tab - @tab - @tab - @tab - +@item logbf @tab - @tab - @tab - @tab - @tab - +@item logb @tab - @tab - @tab - @tab - @tab - +@item logbl @tab - @tab - @tab - @tab - @tab - +@item lroundf @tab - @tab - @tab - @tab - @tab - +@item lround @tab - @tab - @tab - @tab - @tab - +@item lroundl @tab - @tab - @tab - @tab - @tab - +@item llroundf @tab - @tab - @tab - @tab - @tab - +@item llround @tab - @tab - @tab - @tab - @tab - +@item llroundl @tab - @tab - @tab - @tab - @tab - +@item modff @tab - @tab - @tab - @tab - @tab - +@item modf @tab - @tab - @tab - @tab - @tab - +@item modfl @tab - @tab - @tab - @tab - @tab - +@item nearbyintf @tab - @tab - @tab - @tab - @tab - +@item nearbyint @tab - @tab - @tab - @tab - @tab - +@item nearbyintl @tab - @tab - @tab - @tab - @tab - +@item nextafterf @tab - @tab - @tab - @tab - @tab - +@item nextafter @tab - @tab - @tab - @tab - @tab - +@item nextafterl @tab - @tab - @tab - @tab - @tab - +@item nexttowardf @tab - @tab - @tab - @tab - @tab - +@item nexttoward @tab - @tab - @tab - @tab - @tab - +@item nexttowardl @tab - @tab - @tab - @tab - @tab - +@item powf @tab - @tab - @tab - @tab - @tab - +@item pow @tab - @tab - @tab - @tab - @tab - +@item powl @tab 1 @tab - @tab - @tab - @tab - +@item remainderf @tab - @tab - @tab - @tab - @tab - +@item remainder @tab - @tab - @tab - @tab - @tab - +@item remainderl @tab - @tab - @tab - @tab - @tab - +@item remquof @tab - @tab - @tab - @tab - @tab - +@item remquo @tab - @tab - @tab - @tab - @tab - +@item remquol @tab - @tab - @tab - @tab - @tab - +@item rintf @tab - @tab - @tab - @tab - @tab - +@item rint @tab - @tab - @tab - @tab - @tab - +@item rintl @tab - @tab - @tab - @tab - @tab - +@item roundf @tab - @tab - @tab - @tab - @tab - +@item round @tab - @tab - @tab - @tab - @tab - +@item roundl @tab - @tab - @tab - @tab - @tab - +@item scalbf @tab - @tab - @tab - @tab - @tab - +@item scalb @tab - @tab - @tab - @tab - @tab - +@item scalbl @tab - @tab - @tab - @tab - @tab - +@item scalbnf @tab - @tab - @tab - @tab - @tab - +@item scalbn @tab - @tab - @tab - @tab - @tab - +@item scalbnl @tab - @tab - @tab - @tab - @tab - +@item scalblnf @tab - @tab - @tab - @tab - @tab - +@item scalbln @tab - @tab - @tab - @tab - @tab - +@item scalblnl @tab - @tab - @tab - @tab - @tab - +@item sinf @tab - @tab - @tab - @tab - @tab - +@item sin @tab - @tab - @tab - @tab - @tab - +@item sinl @tab 1 @tab - @tab - @tab - @tab - +@item sincosf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item sincos @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item sincosl @tab 1 @tab - @tab - @tab - @tab - +@item sinhf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item sinh @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item sinhl @tab - @tab - @tab - @tab - @tab - +@item sqrtf @tab - @tab - @tab - @tab - @tab - +@item sqrt @tab - @tab - @tab - @tab - @tab - +@item sqrtl @tab - @tab - @tab - @tab - @tab - +@item tanf @tab - @tab - @tab - @tab - @tab - +@item tan @tab 1 @tab 0.5 @tab 1 @tab 0.5 @tab 0.5 +@item tanl @tab 1 @tab - @tab - @tab - @tab - +@item tanhf @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item tanh @tab - @tab 1 @tab 1 @tab 1 @tab 1 +@item tanhl @tab - @tab - @tab - @tab - @tab - +@item tgammaf @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item tgamma @tab 1 @tab 1 @tab 1 @tab 1 @tab 1 +@item tgammal @tab 1 @tab - @tab - @tab - @tab - +@item truncf @tab - @tab - @tab - @tab - @tab - +@item trunc @tab - @tab - @tab - @tab - @tab - +@item truncl @tab - @tab - @tab - @tab - @tab - +@item y0f @tab 2 @tab 1 @tab 1 @tab 1 @tab 1 +@item y0 @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item y0l @tab 2 @tab - @tab - @tab - @tab - +@item y1f @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item y1 @tab 1 @tab 3 @tab 3 @tab 3 @tab 3 +@item y1l @tab 2 @tab - @tab - @tab - @tab - +@item ynf @tab 2 @tab 2 @tab 2 @tab 2 @tab 2 +@item yn @tab 6 @tab 3 @tab 3 @tab 3 @tab 3 +@item ynl @tab 7 @tab - @tab - @tab - @tab - +@end multitable +@multitable {nexttowardf} {1000 + i 1000} {1000 + i 1000} {1000 + i 1000} +@item Function @tab Sparc 32-bit @tab Sparc 64-bit @tab x86_64/fpu +@item acosf @tab - @tab - @tab - +@item acos @tab - @tab - @tab - +@item acosl @tab - @tab 1 @tab - +@item acoshf @tab - @tab - @tab - +@item acosh @tab - @tab - @tab - +@item acoshl @tab - @tab - @tab - +@item asinf @tab 2 @tab 2 @tab - +@item asin @tab 1 @tab 1 @tab 1 +@item asinl @tab - @tab - @tab 1 +@item asinhf @tab - @tab - @tab - +@item asinh @tab - @tab - @tab - +@item asinhl @tab - @tab - @tab 15 +@item atanf @tab - @tab - @tab - +@item atan @tab - @tab - @tab - +@item atanl @tab - @tab 1 @tab - +@item atanhf @tab - @tab - @tab - +@item atanh @tab 1 @tab 1 @tab 1 +@item atanhl @tab - @tab - @tab 1 +@item atan2f @tab 4.0000 @tab 4 @tab 4 +@item atan2 @tab - @tab - @tab - +@item atan2l @tab - @tab 1 @tab - +@item cabsf @tab 1 @tab 1 @tab 1 +@item cabs @tab 1 @tab 1 @tab 1 +@item cabsl @tab - @tab - @tab 1 +@item cacosf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item cacos @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 +@item cacosl @tab - @tab 0 + i 3 @tab 1 + i 1 +@item cacoshf @tab 7 + i 3 @tab 7 + i 3 @tab 7 + i 3 +@item cacosh @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item cacoshl @tab - @tab 5 + i 1 @tab 6 + i 1 +@item cargf @tab - @tab - @tab - +@item carg @tab - @tab - @tab - +@item cargl @tab - @tab - @tab - +@item casinf @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 +@item casin @tab 3 + i 0 @tab 3 + i 0 @tab 3 + i 0 +@item casinl @tab - @tab 1 + i 3 @tab 0 + i 1 +@item casinhf @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 +@item casinh @tab 5 + i 3 @tab 5 + i 3 @tab 5 + i 3 +@item casinhl @tab - @tab 4 + i 2 @tab 5 + i 5 +@item catanf @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 1 +@item catan @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item catanl @tab - @tab 0 + i 1 @tab 1 + i 0 +@item catanhf @tab 1 + i 6 @tab 1 + i 6 @tab 1 + i 6 +@item catanh @tab 4 + i 1 @tab 4 + i 1 @tab 4 + i 0 +@item catanhl @tab - @tab - @tab 1 + i 0 +@item cbrtf @tab - @tab - @tab - +@item cbrt @tab 1 @tab 1 @tab 1 +@item cbrtl @tab - @tab - @tab 948 +@item ccosf @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item ccos @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ccosl @tab - @tab - @tab 0 + i 1 +@item ccoshf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ccosh @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ccoshl @tab - @tab - @tab 1 + i 1 +@item ceilf @tab - @tab - @tab - +@item ceil @tab - @tab - @tab - +@item ceill @tab - @tab - @tab - +@item cexpf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item cexp @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 +@item cexpl @tab - @tab 1 + i 1 @tab 2 + i 1 +@item cimagf @tab - @tab - @tab - +@item cimag @tab - @tab - @tab - +@item cimagl @tab - @tab - @tab - +@item clogf @tab 0 + i 3 @tab 0 + i 3 @tab 0 + i 3 +@item clog @tab 0 + i 1 @tab 0 + i 1 @tab - +@item clogl @tab - @tab - @tab - +@item clog10f @tab 1 + i 5 @tab 1 + i 5 @tab 1 + i 5 +@item clog10 @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item clog10l @tab - @tab - @tab 1 + i 3 +@item conjf @tab - @tab - @tab - +@item conj @tab - @tab - @tab - +@item conjl @tab - @tab - @tab - +@item copysignf @tab - @tab - @tab - +@item copysign @tab - @tab - @tab - +@item copysignl @tab - @tab - @tab - +@item cosf @tab 1 @tab 1 @tab 1 +@item cos @tab 2 @tab 2 @tab 2 +@item cosl @tab - @tab 1 @tab 0.5 +@item coshf @tab - @tab - @tab - +@item cosh @tab - @tab - @tab - +@item coshl @tab - @tab - @tab 2 +@item cpowf @tab 4 + i 2 @tab 4 + i 2 @tab 4 + i 2 +@item cpow @tab 1 + i 1.1031 @tab 1 + i 1.1031 @tab 1 + i 1.1031 +@item cpowl @tab - @tab 3 + i 0.9006 @tab 1 + i 2 +@item cprojf @tab - @tab - @tab - +@item cproj @tab - @tab - @tab - +@item cprojl @tab - @tab - @tab - +@item crealf @tab - @tab - @tab - +@item creal @tab - @tab - @tab - +@item creall @tab - @tab - @tab - +@item csinf @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item csin @tab - @tab - @tab - +@item csinl @tab - @tab - @tab 0 + i 2 +@item csinhf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item csinh @tab 0 + i 1 @tab 0 + i 1 @tab 0 + i 1 +@item csinhl @tab - @tab - @tab 2 + i 2 +@item csqrtf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item csqrt @tab 1 + i 0 @tab 1 + i 0 @tab 1 + i 0 +@item csqrtl @tab - @tab 1 + i 1 @tab - +@item ctanf @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ctan @tab 1 + i 1 @tab 1 + i 1 @tab 1 + i 1 +@item ctanl @tab - @tab - @tab 439 + i 2 +@item ctanhf @tab 2 + i 1 @tab 2 + i 1 @tab 2 + i 1 +@item ctanh @tab 2 + i 2 @tab 2 + i 2 @tab 2 + i 2 +@item ctanhl @tab - @tab - @tab 5 + i 25 +@item erff @tab - @tab - @tab - +@item erf @tab - @tab - @tab - +@item erfl @tab - @tab - @tab - +@item erfcf @tab 12 @tab 12 @tab 12 +@item erfc @tab 24 @tab 24 @tab 24 +@item erfcl @tab - @tab - @tab 36 +@item expf @tab - @tab - @tab - +@item exp @tab - @tab - @tab - +@item expl @tab - @tab - @tab - +@item exp10f @tab 2 @tab 2 @tab 2 +@item exp10 @tab 6 @tab 6 @tab 6 +@item exp10l @tab - @tab 1 @tab 3 +@item exp2f @tab - @tab - @tab - +@item exp2 @tab - @tab - @tab - +@item exp2l @tab - @tab - @tab - +@item expm1f @tab 1 @tab 1 @tab 1 +@item expm1 @tab - @tab 1 @tab 1 +@item expm1l @tab - @tab - @tab 1 +@item fabsf @tab - @tab - @tab - +@item fabs @tab - @tab - @tab - +@item fabsl @tab - @tab - @tab - +@item fdimf @tab - @tab - @tab - +@item fdim @tab - @tab - @tab - +@item fdiml @tab - @tab - @tab - +@item floorf @tab - @tab - @tab - +@item floor @tab - @tab - @tab - +@item floorl @tab - @tab - @tab - +@item fmaf @tab - @tab - @tab - +@item fma @tab - @tab - @tab - +@item fmal @tab - @tab - @tab - +@item fmaxf @tab - @tab - @tab - +@item fmax @tab - @tab - @tab - +@item fmaxl @tab - @tab - @tab - +@item fminf @tab - @tab - @tab - +@item fmin @tab - @tab - @tab - +@item fminl @tab - @tab - @tab - +@item fmodf @tab 1 @tab 1 @tab 1 +@item fmod @tab 2 @tab 2 @tab 2 +@item fmodl @tab - @tab 2 @tab 1 +@item frexpf @tab - @tab - @tab - +@item frexp @tab - @tab - @tab - +@item frexpl @tab - @tab - @tab - +@item gammaf @tab - @tab - @tab - +@item gamma @tab - @tab - @tab - +@item gammal @tab - @tab - @tab 1 +@item hypotf @tab 1 @tab 1 @tab 1 +@item hypot @tab 1 @tab 1 @tab 1 +@item hypotl @tab - @tab - @tab 1 +@item ilogbf @tab - @tab - @tab - +@item ilogb @tab - @tab - @tab - +@item ilogbl @tab - @tab - @tab - +@item j0f @tab 2 @tab 2 @tab 2 +@item j0 @tab 2 @tab 2 @tab 2 +@item j0l @tab - @tab - @tab - +@item j1f @tab 2 @tab 2 @tab 2 +@item j1 @tab 1 @tab 1 @tab 1 +@item j1l @tab - @tab - @tab 2 +@item jnf @tab 4 @tab 4 @tab 4 +@item jn @tab 6 @tab 6 @tab 6 +@item jnl @tab - @tab - @tab 2 +@item lgammaf @tab 2 @tab 2 @tab 2 +@item lgamma @tab 1 @tab 1 @tab 1 +@item lgammal @tab - @tab - @tab 1 +@item lrintf @tab - @tab - @tab - +@item lrint @tab - @tab - @tab - +@item lrintl @tab - @tab - @tab - +@item llrintf @tab - @tab - @tab - +@item llrint @tab - @tab - @tab - +@item llrintl @tab - @tab - @tab - +@item logf @tab 1 @tab 1 @tab 1 +@item log @tab 1 @tab 1 @tab 1 +@item logl @tab - @tab 1 @tab 1 +@item log10f @tab 1 @tab 1 @tab 1 +@item log10 @tab 1 @tab 1 @tab 1 +@item log10l @tab - @tab - @tab 1 +@item log1pf @tab 1 @tab 1 @tab 1 +@item log1p @tab 1 @tab 1 @tab 1 +@item log1pl @tab - @tab 1 @tab 1 +@item log2f @tab 1 @tab 1 @tab 1 +@item log2 @tab 1 @tab 1 @tab 1 +@item log2l @tab - @tab - @tab - +@item logbf @tab - @tab - @tab - +@item logb @tab - @tab - @tab - +@item logbl @tab - @tab - @tab - +@item lroundf @tab - @tab - @tab - +@item lround @tab - @tab - @tab - +@item lroundl @tab - @tab - @tab - +@item llroundf @tab - @tab - @tab - +@item llround @tab - @tab - @tab - +@item llroundl @tab - @tab - @tab - +@item modff @tab - @tab - @tab - +@item modf @tab - @tab - @tab - +@item modfl @tab - @tab - @tab - +@item nearbyintf @tab - @tab - @tab - +@item nearbyint @tab - @tab - @tab - +@item nearbyintl @tab - @tab - @tab - +@item nextafterf @tab - @tab - @tab - +@item nextafter @tab - @tab - @tab - +@item nextafterl @tab - @tab - @tab - +@item nexttowardf @tab - @tab - @tab - +@item nexttoward @tab - @tab - @tab - +@item nexttowardl @tab - @tab - @tab - +@item powf @tab - @tab - @tab - +@item pow @tab - @tab - @tab - +@item powl @tab - @tab - @tab - +@item remainderf @tab - @tab - @tab - +@item remainder @tab - @tab - @tab - +@item remainderl @tab - @tab - @tab - +@item remquof @tab - @tab - @tab - +@item remquo @tab - @tab - @tab - +@item remquol @tab - @tab - @tab - +@item rintf @tab - @tab - @tab - +@item rint @tab - @tab - @tab - +@item rintl @tab - @tab - @tab - +@item roundf @tab - @tab - @tab - +@item round @tab - @tab - @tab - +@item roundl @tab - @tab - @tab - +@item scalbf @tab - @tab - @tab - +@item scalb @tab - @tab - @tab - +@item scalbl @tab - @tab - @tab - +@item scalbnf @tab - @tab - @tab - +@item scalbn @tab - @tab - @tab - +@item scalbnl @tab - @tab - @tab - +@item scalblnf @tab - @tab - @tab - +@item scalbln @tab - @tab - @tab - +@item scalblnl @tab - @tab - @tab - +@item sinf @tab - @tab - @tab - +@item sin @tab - @tab - @tab - +@item sinl @tab - @tab - @tab 1 +@item sincosf @tab 1 @tab 1 @tab 1 +@item sincos @tab 1 @tab 1 @tab 1 +@item sincosl @tab - @tab 1 @tab 1 +@item sinhf @tab 1 @tab 1 @tab 1 +@item sinh @tab 1 @tab 1 @tab 1 +@item sinhl @tab - @tab - @tab 1 +@item sqrtf @tab - @tab - @tab - +@item sqrt @tab - @tab - @tab - +@item sqrtl @tab - @tab 1 @tab - +@item tanf @tab - @tab - @tab - +@item tan @tab 0.5 @tab 0.5 @tab 0.5 +@item tanl @tab - @tab 1 @tab 1 +@item tanhf @tab 1 @tab 1 @tab 1 +@item tanh @tab 1 @tab 1 @tab 1 +@item tanhl @tab - @tab - @tab 1 +@item tgammaf @tab 1 @tab 1 @tab 1 +@item tgamma @tab 1 @tab 1 @tab 1 +@item tgammal @tab - @tab - @tab 2 +@item truncf @tab - @tab - @tab - +@item trunc @tab - @tab - @tab - +@item truncl @tab - @tab - @tab - +@item y0f @tab 1 @tab 1 @tab 1 +@item y0 @tab 2 @tab 2 @tab 2 +@item y0l @tab - @tab - @tab 2 +@item y1f @tab 2 @tab 2 @tab 2 +@item y1 @tab 3 @tab 3 @tab 3 +@item y1l @tab - @tab - @tab 2 +@item ynf @tab 2 @tab 2 @tab 2 +@item yn @tab 3 @tab 3 @tab 3 +@item ynl @tab - @tab - @tab 7 @end multitable diff -durpN glibc-2.2.4/manual/llio.texi glibc-2.2.5/manual/llio.texi --- glibc-2.2.4/manual/llio.texi Fri Jul 27 23:13:17 2001 +++ glibc-2.2.5/manual/llio.texi Sun Oct 7 13:06:47 2001 @@ -1153,7 +1153,8 @@ These functions are declared in @file{sy The @code{mmap} function creates a new mapping, connected to bytes (@var{offset}) to (@var{offset} + @var{length} - 1) in the file open on -@var{filedes}. +@var{filedes}. A new reference for the file specified by @var{filedes} +is created, which is not removed by closing the file. @var{address} gives a preferred starting address for the mapping. @code{NULL} expresses no preference. Any previous mapping at that diff -durpN glibc-2.2.4/manual/math.texi glibc-2.2.5/manual/math.texi --- glibc-2.2.4/manual/math.texi Mon Apr 9 20:03:29 2001 +++ glibc-2.2.5/manual/math.texi Tue Aug 28 01:05:40 2001 @@ -1230,12 +1230,12 @@ floating-point number representation. I functions is always less than 0.5ulps. Using rounding bits this is also possible and normally implemented for the basic operations. To achieve the same for the complex math functions requires a lot more work and -this was not spend so far. +this has not yet been done. Therefore many of the functions in the math library have errors. The table lists the maximum error for each function which is exposed by one -of the existing tests in the test suite. It is tried to cover as much -as possible and really list the maximum error (or at least a ballpark +of the existing tests in the test suite. The table tries to cover as much +as possible and list the actual maximum error (or at least a ballpark figure) but this is often not achieved due to the large search space. The table lists the ULP values for different architectures. Different @@ -1243,6 +1243,8 @@ architectures have different results sin floating-point operations varies and also the existing hardware support is different. +@page +@c This multitable does not fit on a single page @include libm-err.texi @node Pseudo-Random Numbers diff -durpN glibc-2.2.4/manual/message.texi glibc-2.2.5/manual/message.texi --- glibc-2.2.4/manual/message.texi Sat Apr 7 14:02:35 2001 +++ glibc-2.2.5/manual/message.texi Sun Aug 26 10:37:15 2001 @@ -1313,7 +1313,23 @@ Languages with this property include: @table @asis @item Slavic family -Czech, Russian, Slovak +Czech, Russian +@end table + +@item Three forms, special cases for 1 and 2, 3, 4 +The header entry would look like this: + +@smallexample +Plural-Forms: nplurals=3; \ + plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0; +@end smallexample + +@noindent +Languages with this property include: + +@table @asis +@item Slavic family +Slovak @end table @item Three forms, special case for one and some numbers ending in 2, 3, or 4 @@ -1389,7 +1405,7 @@ If the @var{codeset} parameter is the nu for the domain with the name @var{domainname}. It returns @code{NULL} if no codeset has yet been selected. -The @code{bind_textdomain_codeset} function can be used several times. +The @code{bind_textdomain_codeset} function can be used several times. If used multiple times with the same @var{domainname} argument, the later call overrides the settings made by the earlier one. diff -durpN glibc-2.2.4/manual/stdio.texi glibc-2.2.5/manual/stdio.texi --- glibc-2.2.4/manual/stdio.texi Sun Aug 12 10:34:59 2001 +++ glibc-2.2.5/manual/stdio.texi Mon Oct 29 07:56:29 2001 @@ -1940,7 +1940,7 @@ conversion gives results like: | 0|0 | +0|+0 | 0|00000| | 00|0| | 1|1 | +1|+1 | 1|00001| 1| 01|1| | -1|-1 | -1|-1 | -1|-0001| -1| -01|-1| -|100000|100000|+100000| 100000|100000|100000|100000|100000| +|100000|100000|+100000|+100000| 100000|100000|100000|100000|100000| @end smallexample In particular, notice what happens in the last case where the number @@ -1954,7 +1954,7 @@ various format options, using the templa @end smallexample @smallexample -| 0| 0| 0| 0| 0| 0x0| 0X0|0x00000000| +| 0| 0| 0| 0| 0| 0| 0| 00000000| | 1| 1| 1| 1| 01| 0x1| 0X1|0x00000001| |100000|303240|186a0|186A0|0303240|0x186a0|0X186A0|0x000186a0| @end smallexample @@ -1983,10 +1983,10 @@ the precision. The exponent always cont The @samp{%g} and @samp{%G} conversions print the argument in the style of @samp{%e} or @samp{%E} (respectively) if the exponent would be less -than -4 or greater than or equal to the precision; otherwise they use the -@samp{%f} style. Trailing zeros are removed from the fractional portion -of the result and a decimal-point character appears only if it is -followed by a digit. +than -4 or greater than or equal to the precision; otherwise they use +the @samp{%f} style. A precision of @code{0}, is taken as 1. is +Trailing zeros are removed from the fractional portion of the result and +a decimal-point character appears only if it is followed by a digit. The @samp{%a} and @samp{%A} conversions are meant for representing floating-point numbers exactly in textual form so that they can be diff -durpN glibc-2.2.4/manual/string.texi glibc-2.2.5/manual/string.texi --- glibc-2.2.4/manual/string.texi Mon Jul 23 10:54:44 2001 +++ glibc-2.2.5/manual/string.texi Mon Nov 5 12:55:40 2001 @@ -2137,7 +2137,7 @@ token = strsep (&running, delimiters); @comment GNU @deftypefun {char *} basename (const char *@var{filename}) The GNU version of the @code{basename} function returns the last -component of the path in @var{filename}. This function is the prefered +component of the path in @var{filename}. This function is the preferred usage, since it does not modify the argument, @var{filename}, and respects trailing slashes. The prototype for @code{basename} can be found in @file{string.h}. Note, this function is overriden by the XPG diff -durpN glibc-2.2.4/manual/time.texi glibc-2.2.5/manual/time.texi --- glibc-2.2.4/manual/time.texi Thu Feb 15 14:08:40 2001 +++ glibc-2.2.5/manual/time.texi Fri Aug 31 23:22:16 2001 @@ -1480,6 +1480,11 @@ format; e.g. a date passed as @code{"02: though it is ambiguous without context. As long as the format string @var{fmt} matches the input string the function will succeed. +The user has to make sure, though, that the input can be parsed in a +unambiguous way. The string @code{"1999112"} can be parsed using the +format @code{"%Y%m%d"} as 1999-1-12, 1999-11-2, or even 19991-1-2. It +is necessary to add appropriate separators to reliably get results. + The format string consists of the same components as the format string of the @code{strftime} function. The only difference is that the flags @code{_}, @code{-}, @code{0}, and @code{^} are not allowed. @@ -1743,8 +1748,7 @@ The year as a decimal number, using the The full alternative year representation. @item %z -Equivalent to the use of @code{%a, %d %b %Y %H:%M:%S %z} in this place. -This is the full @w{ISO 8601} date and time format. +The offset from GMT in @w{ISO 8601}/RFC822 format. @item %Z The timezone name. diff -durpN glibc-2.2.4/math/libm-test.inc glibc-2.2.5/math/libm-test.inc --- glibc-2.2.4/math/libm-test.inc Mon Jul 23 10:54:45 2001 +++ glibc-2.2.5/math/libm-test.inc Thu Oct 18 04:45:22 2001 @@ -250,9 +250,10 @@ print_ulps (const char *test_name, FLOAT if (output_ulps) { fprintf (ulps_file, "Test \"%s\":\n", test_name); - fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n", + fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n", CHOOSE("ldouble", "double", "float", - "ildouble", "idouble", "ifloat"), ulp); + "ildouble", "idouble", "ifloat"), + FUNC(ceil) (ulp)); } } @@ -262,9 +263,10 @@ print_function_ulps (const char *functio if (output_ulps) { fprintf (ulps_file, "Function: \"%s\":\n", function_name); - fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n", + fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n", CHOOSE("ldouble", "double", "float", - "ildouble", "idouble", "ifloat"), ulp); + "ildouble", "idouble", "ifloat"), + FUNC(ceil) (ulp)); } } @@ -278,16 +280,18 @@ print_complex_function_ulps (const char if (real_ulp != 0.0) { fprintf (ulps_file, "Function: Real part of \"%s\":\n", function_name); - fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n", + fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n", CHOOSE("ldouble", "double", "float", - "ildouble", "idouble", "ifloat"), real_ulp); + "ildouble", "idouble", "ifloat"), + FUNC(ceil) (real_ulp)); } if (imag_ulp != 0.0) { fprintf (ulps_file, "Function: Imaginary part of \"%s\":\n", function_name); - fprintf (ulps_file, "%s: % .4" PRINTF_NEXPR "\n", + fprintf (ulps_file, "%s: %.0" PRINTF_NEXPR "\n", CHOOSE("ldouble", "double", "float", - "ildouble", "idouble", "ifloat"), imag_ulp); + "ildouble", "idouble", "ifloat"), + FUNC(ceil) (imag_ulp)); } @@ -336,8 +340,8 @@ print_max_error (const char *func_name, if (print_screen_max_error (ok, xfail)) { printf ("Maximal error of `%s'\n", func_name); - printf (" is : % .4" PRINTF_NEXPR " ulp\n", max_error); - printf (" accepted: % .4" PRINTF_NEXPR " ulp\n", allowed); + printf (" is : %.0" PRINTF_NEXPR " ulp\n", FUNC(ceil) (max_error)); + printf (" accepted: %.0" PRINTF_NEXPR " ulp\n", FUNC(ceil) (allowed)); } update_stats (ok, xfail); @@ -350,8 +354,10 @@ print_complex_max_error (const char *fun { int ok = 0; - if ((real_max_error <= __real__ allowed) - && (imag_max_error <= __imag__ allowed)) + if ((real_max_error == 0 && imag_max_error == 0) + || (real_max_error <= __real__ allowed + && imag_max_error <= __imag__ allowed + && !ignore_max_ulp)) { ok = 1; } @@ -363,11 +369,15 @@ print_complex_max_error (const char *fun if (print_screen_max_error (ok, xfail)) { printf ("Maximal error of real part of: %s\n", func_name); - printf (" is : % .4" PRINTF_NEXPR " ulp\n", real_max_error); - printf (" accepted: % .4" PRINTF_NEXPR " ulp\n", __real__ allowed); + printf (" is : %.0" PRINTF_NEXPR " ulp\n", + FUNC(ceil) (real_max_error)); + printf (" accepted: %.0" PRINTF_NEXPR " ulp\n", + FUNC(ceil) (__real__ allowed)); printf ("Maximal error of imaginary part of: %s\n", func_name); - printf (" is : % .4" PRINTF_NEXPR " ulp\n", imag_max_error); - printf (" accepted: % .4" PRINTF_NEXPR " ulp\n", __imag__ allowed); + printf (" is : %.0" PRINTF_NEXPR " ulp\n", + FUNC(ceil) (imag_max_error)); + printf (" accepted: %.0" PRINTF_NEXPR " ulp\n", + FUNC(ceil) (__imag__ allowed)); } update_stats (ok, xfail); @@ -2865,6 +2875,8 @@ j0_test (void) TEST_f_f (j0, 2.0, 0.22389077914123566805L); TEST_f_f (j0, 8.0, 0.17165080713755390609L); TEST_f_f (j0, 10.0, -0.24593576445134833520L); + TEST_f_f (j0, 4.0, -3.9714980986384737228659076845169804197562E-1L); + TEST_f_f (j0, -4.0, -3.9714980986384737228659076845169804197562E-1L); END (j0); } diff -durpN glibc-2.2.4/math/math_private.h glibc-2.2.5/math/math_private.h --- glibc-2.2.4/math/math_private.h Mon Jul 23 10:54:45 2001 +++ glibc-2.2.5/math/math_private.h Sat Sep 22 06:43:36 2001 @@ -11,7 +11,7 @@ /* * from: @(#)fdlibm.h 5.1 93/09/24 - * $Id: math_private.h,v 1.16 2001/06/06 12:34:09 drepper Exp $ + * $Id: math_private.h,v 1.17 2001/09/22 13:43:36 aj Exp $ */ #ifndef _MATH_PRIVATE_H_ @@ -293,6 +293,8 @@ extern long double __scalbnl (long doubl extern long double __sqrtl (long double x); extern long double fabsl (long double x); extern void __sincosl (long double, long double *, long double *); +extern long double __logbl (long double x); +extern long double __significandl (long double x); #endif /* Prototypes for functions of the IBM Accurate Mathematical Library. */ diff -durpN glibc-2.2.4/misc/err.c glibc-2.2.5/misc/err.c --- glibc-2.2.4/misc/err.c Mon Jul 23 10:54:45 2001 +++ glibc-2.2.5/misc/err.c Mon Aug 20 19:55:41 2001 @@ -1,5 +1,5 @@ -/* err.c --- 4.4BSD utility functions for error messages. - Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc. +/* 4.4BSD utility functions for error messages. + Copyright (C) 1995, 1996, 1998, 2001 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,6 +25,7 @@ #include #ifdef USE_IN_LIBIO +# include # define flockfile(s) _IO_flockfile (s) # define funlockfile(s) _IO_funlockfile (s) #endif @@ -39,15 +40,72 @@ extern char *__progname; va_end (ap); \ } +#ifdef USE_IN_LIBIO +static void +convert_and_print (const char *format, __gnuc_va_list ap) +{ +# define ALLOCA_LIMIT 2000 + size_t len; + wchar_t *wformat = NULL; + mbstate_t st; + size_t res; + const char *tmp; + + if (format == NULL) + return; + + len = strlen (format) + 1; + + do + { + if (len < ALLOCA_LIMIT) + wformat = (wchar_t *) alloca (len * sizeof (wchar_t)); + else + { + if (wformat != NULL && len / 2 < ALLOCA_LIMIT) + wformat = NULL; + + wformat = (wchar_t *) realloc (wformat, len * sizeof (wchar_t)); + + if (wformat == NULL) + { + fputws_unlocked (L"out of memory\n", stderr); + return; + } + } + + memset (&st, '\0', sizeof (st)); + tmp =format; + } + while ((res = __mbsrtowcs (wformat, &tmp, len, &st)) == len); + + if (res == (size_t) -1) + /* The string cannot be converted. */ + wformat = (wchar_t *) L"???"; + + __vfwprintf (stderr, wformat, ap); +} +#endif + void vwarnx (const char *format, __gnuc_va_list ap) { flockfile (stderr); - if (__progname) - fprintf (stderr, "%s: ", __progname); - if (format) - vfprintf (stderr, format, ap); - putc_unlocked ('\n', stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + { + __fwprintf (stderr, L"%s: ", __progname); + convert_and_print (format, ap); + putwc_unlocked (L'\n', stderr); + } + else +#endif + { + fprintf (stderr, "%s: ", __progname); + if (format) + vfprintf (stderr, format, ap); + putc_unlocked ('\n', stderr); + } funlockfile (stderr); } @@ -57,15 +115,30 @@ vwarn (const char *format, __gnuc_va_lis int error = errno; flockfile (stderr); - if (__progname) - fprintf (stderr, "%s: ", __progname); - if (format) +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) { - vfprintf (stderr, format, ap); - fputs_unlocked (": ", stderr); + __fwprintf (stderr, L"%s: ", __progname); + if (format) + { + convert_and_print (format, ap); + fputws_unlocked (L": ", stderr); + } + __set_errno (error); + __fwprintf (stderr, L"%m\n"); + } + else +#endif + { + fprintf (stderr, "%s: ", __progname); + if (format) + { + vfprintf (stderr, format, ap); + fputs_unlocked (": ", stderr); + } + __set_errno (error); + fprintf (stderr, "%m\n"); } - __set_errno (error); - fprintf (stderr, "%m\n"); funlockfile (stderr); } diff -durpN glibc-2.2.4/misc/error.c glibc-2.2.5/misc/error.c --- glibc-2.2.4/misc/error.c Mon Jul 23 10:54:46 2001 +++ glibc-2.2.5/misc/error.c Mon Aug 20 19:56:57 2001 @@ -26,6 +26,10 @@ #include #include +#ifdef _LIBC +# include +# define mbsrtowcs __mbsrtowcs +#endif #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC # if __STDC__ @@ -117,12 +121,94 @@ private_strerror (errnum) # endif /* HAVE_STRERROR_R */ #endif /* not _LIBC */ + +#ifdef VA_START +static void +error_tail (int status, int errnum, const char *message, va_list args) +{ +# if HAVE_VPRINTF || _LIBC +# if _LIBC && USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + { +# define ALLOCA_LIMIT 2000 + size_t len = strlen (message) + 1; + wchar_t *wmessage = NULL; + mbstate_t st; + size_t res; + const char *tmp; + + do + { + if (len < ALLOCA_LIMIT) + wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); + else + { + if (wmessage != NULL && len / 2 < ALLOCA_LIMIT) + wmessage = NULL; + + wmessage = (wchar_t *) realloc (wmessage, + len * sizeof (wchar_t)); + + if (wmessage == NULL) + { + fputws_unlocked (L"out of memory\n", stderr); + return; + } + } + + memset (&st, '\0', sizeof (st)); + tmp =message; + } + while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len); + + if (res == (size_t) -1) + /* The string cannot be converted. */ + wmessage = (wchar_t *) L"???"; + + __vfwprintf (stderr, wmessage, args); + } + else +# endif + vfprintf (stderr, message, args); +# else + _doprnt (message, args, stderr); +# endif + va_end (args); + + ++error_message_count; + if (errnum) + { +#if defined HAVE_STRERROR_R || _LIBC + char errbuf[1024]; + char *s = __strerror_r (errnum, errbuf, sizeof errbuf); +# if _LIBC && USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L": %s", s); + else +# endif + fprintf (stderr, ": %s", s); +#else + fprintf (stderr, ": %s", strerror (errnum)); +#endif + } +#if _LIBC && USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + putwc (L'\n', stderr); + else +#endif + putc ('\n', stderr); + fflush (stderr); + if (status) + exit (status); +} +#endif + + /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. Exit with status STATUS if it is nonzero. */ /* VARARGS */ - void #if defined VA_START && __STDC__ error (int status, int errnum, const char *message, ...) @@ -139,37 +225,47 @@ error (status, errnum, message, va_alist #endif fflush (stdout); +#ifdef _LIBC +# ifdef USE_IN_LIBIO + _IO_flockfile (stderr); +# else + __flockfile (stderr); +# endif +#endif if (error_print_progname) (*error_print_progname) (); else - fprintf (stderr, "%s: ", program_name); + { +#if _LIBC && USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s: ", program_name); + else +#endif + fprintf (stderr, "%s: ", program_name); + } #ifdef VA_START VA_START (args, message); -# if HAVE_VPRINTF || _LIBC - vfprintf (stderr, message, args); -# else - _doprnt (message, args, stderr); -# endif - va_end (args); + error_tail (status, errnum, message, args); #else fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); -#endif ++error_message_count; if (errnum) - { -#if defined HAVE_STRERROR_R || _LIBC - char errbuf[1024]; - fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf)); -#else - fprintf (stderr, ": %s", strerror (errnum)); -#endif - } + fprintf (stderr, ": %s", strerror (errnum)); putc ('\n', stderr); fflush (stderr); if (status) exit (status); +#endif + +#ifdef _LIBC +# ifdef USE_IN_LIBIO + _IO_funlockfile (stderr); +# else + __funlockfile (stderr); +# endif +#endif } /* Sometimes we want to have at most one error per line. This @@ -199,8 +295,9 @@ error_at_line (status, errnum, file_name static const char *old_file_name; static unsigned int old_line_number; - if (old_line_number == line_number && - (file_name == old_file_name || !strcmp (old_file_name, file_name))) + if (old_line_number == line_number + && (file_name == old_file_name + || strcmp (old_file_name, file_name) == 0)) /* Simply return and print nothing. */ return; @@ -209,40 +306,57 @@ error_at_line (status, errnum, file_name } fflush (stdout); +#ifdef _LIBC +# ifdef USE_IN_LIBIO + _IO_flockfile (stderr); +# else + __flockfile (stderr); +# endif +#endif if (error_print_progname) (*error_print_progname) (); else - fprintf (stderr, "%s:", program_name); + { +#if _LIBC && USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s: ", program_name); + else +#endif + fprintf (stderr, "%s:", program_name); + } if (file_name != NULL) - fprintf (stderr, "%s:%d: ", file_name, line_number); + { +#if _LIBC && USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s:%d: ", file_name, line_number); + else +#endif + fprintf (stderr, "%s:%d: ", file_name, line_number); + } #ifdef VA_START VA_START (args, message); -# if HAVE_VPRINTF || _LIBC - vfprintf (stderr, message, args); -# else - _doprnt (message, args, stderr); -# endif - va_end (args); + error_tail (status, errnum, message, args); #else fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8); -#endif ++error_message_count; if (errnum) - { -#if defined HAVE_STRERROR_R || _LIBC - char errbuf[1024]; - fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf)); -#else - fprintf (stderr, ": %s", strerror (errnum)); -#endif - } + fprintf (stderr, ": %s", strerror (errnum)); putc ('\n', stderr); fflush (stderr); if (status) exit (status); +#endif + +#ifdef _LIBC +# ifdef USE_IN_LIBIO + _IO_funlockfile (stderr); +# else + __funlockfile (stderr); +# endif +#endif } #ifdef _LIBC diff -durpN glibc-2.2.4/misc/getpass.c glibc-2.2.5/misc/getpass.c --- glibc-2.2.4/misc/getpass.c Mon Jul 23 10:54:46 2001 +++ glibc-2.2.5/misc/getpass.c Fri Aug 17 07:14:07 2001 @@ -22,6 +22,7 @@ #include #ifdef USE_IN_LIBIO +# include # define flockfile(s) _IO_flockfile (s) # define funlockfile(s) _IO_funlockfile (s) #endif @@ -79,7 +80,12 @@ getpass (prompt) tty_changed = 0; /* Write the prompt. */ - fputs_unlocked (prompt, out); +#ifdef USE_IN_LIBIO + if (_IO_fwide (out, 0) > 0) + __fwprintf (out, L"%s", prompt); + else +#endif + fputs_unlocked (prompt, out); fflush_unlocked (out); /* Read the password. */ @@ -93,8 +99,15 @@ getpass (prompt) /* Remove the newline. */ buf[nread - 1] = '\0'; if (tty_changed) - /* Write the newline that was not echoed. */ - putc_unlocked ('\n', out); + { + /* Write the newline that was not echoed. */ +#ifdef USE_IN_LIBIO + if (_IO_fwide (out, 0) > 0) + putwc_unlocked (L'\n', out); + else +#endif + putc_unlocked ('\n', out); + } } } diff -durpN glibc-2.2.4/misc/sys/cdefs.h glibc-2.2.5/misc/sys/cdefs.h --- glibc-2.2.4/misc/sys/cdefs.h Fri Jul 27 23:13:18 2001 +++ glibc-2.2.5/misc/sys/cdefs.h Fri Oct 26 16:35:32 2001 @@ -160,6 +160,15 @@ # define __attribute_pure__ /* Ignore */ #endif +/* At some point during the gcc 3.1 development the `used' attribute + for functions was introduced. We don't want to use it unconditionally + (although this would be possible) since it generates warnings. */ +#if __GNUC_PREREQ (3,1) +# define __attribute_used__ __attribute__ ((__used__)) +#else +# define __attribute_used__ __attribute__ ((__unused__)) +#endif + /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. diff -durpN glibc-2.2.4/misc/sys/select.h glibc-2.2.5/misc/sys/select.h --- glibc-2.2.4/misc/sys/select.h Mon Jul 23 10:54:46 2001 +++ glibc-2.2.5/misc/sys/select.h Sat Aug 18 16:34:57 2001 @@ -39,10 +39,16 @@ typedef __sigset_t sigset_t; #endif /* Get definition of timer specification structures. */ +#define __need_time_t #define __need_timespec #include #define __need_timeval #include + +#ifndef __suseconds_t_defined +typedef __suseconds_t suseconds_t; +# define __suseconds_t_defined +#endif /* The fd_set member is required to be an array of longs. */ diff -durpN glibc-2.2.4/misc/syslog.c glibc-2.2.5/misc/syslog.c --- glibc-2.2.4/misc/syslog.c Wed Jun 21 11:11:02 2000 +++ glibc-2.2.5/misc/syslog.c Thu Aug 30 16:13:49 2001 @@ -216,7 +216,7 @@ vsyslog(pri, fmt, ap) /* Prepare for multiple users. We have to take care: open and write are cancellation points. */ - __libc_cleanup_region_start ((void (*) (void *)) cancel_handler, + __libc_cleanup_region_start (1, (void (*) (void *)) cancel_handler, &oldaction_ptr); __libc_lock_lock (syslog_lock); @@ -239,17 +239,29 @@ vsyslog(pri, fmt, ap) if (!connected || __send(LogFile, buf, bufsize, 0) < 0) { - closelog_internal (); /* attempt re-open next time */ - /* - * Output the message to the console; don't worry about blocking, - * if console blocks everything will. Make sure the error reported - * is the one from the syslogd failure. - */ - if (LogStat & LOG_CONS && - (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) + if (connected) { - dprintf (fd, "%s\r\n", buf + msgoff); - (void)__close(fd); + /* Try to reopen the syslog connection. Maybe it went + down. */ + closelog_internal (); + openlog_internal(LogTag, LogStat | LOG_NDELAY, 0); + } + + if (!connected || __send(LogFile, buf, bufsize, 0) < 0) + { + closelog_internal (); /* attempt re-open next time */ + /* + * Output the message to the console; don't worry + * about blocking, if console blocks everything will. + * Make sure the error reported is the one from the + * syslogd failure. + */ + if (LogStat & LOG_CONS && + (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) + { + dprintf (fd, "%s\r\n", buf + msgoff); + (void)__close(fd); + } } } @@ -315,7 +327,8 @@ void openlog (const char *ident, int logstat, int logfac) { /* Protect against multiple users. */ - __libc_cleanup_region_start ((void (*) __P ((void *))) __libc_mutex_unlock, + __libc_cleanup_region_start (1, + (void (*) __P ((void *))) __libc_mutex_unlock, &syslog_lock); __libc_lock_lock (syslog_lock); @@ -346,7 +359,8 @@ void closelog () { /* Protect against multiple users. */ - __libc_cleanup_region_start ((void (*) __P ((void *))) __libc_mutex_unlock, + __libc_cleanup_region_start (1, + (void (*) __P ((void *))) __libc_mutex_unlock, &syslog_lock); __libc_lock_lock (syslog_lock); diff -durpN glibc-2.2.4/nis/nis_findserv.c glibc-2.2.5/nis/nis_findserv.c --- glibc-2.2.4/nis/nis_findserv.c Mon Jul 23 10:54:46 2001 +++ glibc-2.2.5/nis/nis_findserv.c Wed Dec 12 19:40:30 2001 @@ -110,37 +110,19 @@ struct findserv_req u_int server_ep; }; -long -__nis_findfastest (dir_binding *bind) -{ -#if 0 - unsigned long i, j; - - for (i = 0; i < bind->server_len; i++) - for (j = 0; j < bind->server_val[i].ep.ep_len; ++j) - if (strcmp (bind->server_val[i].ep.ep_val[j].family, "inet") == 0) - if ((bind->server_val[i].ep.ep_val[j].proto == NULL) || - (bind->server_val[i].ep.ep_val[j].proto[0] == '-') || - (bind->server_val[i].ep.ep_val[j].proto[0] == '\0')) - { - bind->server_used = i; - bind->current_ep = j; - return 1; - } - return 0; -#else - const struct timeval TIMEOUT50 = {5, 0}; - const struct timeval TIMEOUT00 = {0, 0}; +static long int +__nis_findfastest_with_timeout (dir_binding *bind, + const struct timeval *timeout) +{ + static const struct timeval TIMEOUT00 = { 0, 0 }; struct findserv_req *pings; struct sockaddr_in sin, saved_sin; int found = -1; - u_int32_t xid_seed, xid_lookup; + u_int32_t xid_seed; int sock, dontblock = 1; CLIENT *clnt; - char clnt_res; - void *foo = NULL; - u_long i, j, pings_count, pings_max; + u_long i, j, pings_count, pings_max, fastest = -1; struct cu_data *cu; pings_max = bind->server_len * 2; /* Reserve a little bit more memory @@ -188,10 +170,9 @@ __nis_findfastest (dir_binding *bind) memcpy ((char *) &pings[pings_count].sin, (char *) &sin, sizeof (sin)); memcpy ((char *)&saved_sin, (char *)&sin, sizeof(sin)); - pings[pings_count].xid = xid_seed; + pings[pings_count].xid = xid_seed + pings_count; pings[pings_count].server_nr = i; pings[pings_count].server_ep = j; - ++xid_seed; ++pings_count; } @@ -204,7 +185,7 @@ __nis_findfastest (dir_binding *bind) /* Create RPC handle */ sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); - clnt = clntudp_create (&saved_sin, NIS_PROG, NIS_VERSION, TIMEOUT50, &sock); + clnt = clntudp_create (&saved_sin, NIS_PROG, NIS_VERSION, *timeout, &sock); if (clnt == NULL) { close (sock); @@ -214,9 +195,7 @@ __nis_findfastest (dir_binding *bind) auth_destroy (clnt->cl_auth); clnt->cl_auth = authunix_create_default (); cu = (struct cu_data *) clnt->cl_private; - clnt_control (clnt, CLSET_TIMEOUT, (char *) &TIMEOUT00); ioctl (sock, FIONBIO, &dontblock); - /* Send to all servers the NULLPROC */ for (i = 0; i < pings_count; ++i) { @@ -225,25 +204,30 @@ __nis_findfastest (dir_binding *bind) memcpy ((char *) &cu->cu_raddr, (char *) &pings[i].sin, sizeof (struct sockaddr_in)); /* Transmit to NULLPROC, return immediately. */ - clnt_call (clnt, NULLPROC, (xdrproc_t) xdr_void, (caddr_t) foo, - (xdrproc_t) xdr_void, (caddr_t) & clnt_res, TIMEOUT00); + clnt_call (clnt, NULLPROC, + (xdrproc_t) xdr_void, (caddr_t) 0, + (xdrproc_t) xdr_void, (caddr_t) 0, TIMEOUT00); } - /* Receive reply from NULLPROC asynchronously */ - memset ((char *) &clnt_res, 0, sizeof (clnt_res)); - clnt_call (clnt, NULLPROC, (xdrproc_t) NULL, (caddr_t) foo, - (xdrproc_t) xdr_void, (caddr_t) &clnt_res, TIMEOUT00); - - xid_lookup = *((u_int32_t *) (cu->cu_inbuf)); - for (i = 0; i < pings_count; i++) - { - if (pings[i].xid == xid_lookup) - { - bind->server_used = pings[i].server_nr; - bind->current_ep = pings[i].server_ep; - found = 1; - } + while (found == -1) { + /* Receive reply from NULLPROC asynchronously. Note null inproc. */ + int rc = clnt_call (clnt, NULLPROC, + (xdrproc_t) NULL, (caddr_t) 0, + (xdrproc_t) xdr_void, (caddr_t) 0, + *timeout); + if (RPC_SUCCESS == rc) { + fastest = *((u_int32_t *) (cu->cu_inbuf)) - xid_seed; + if (fastest < pings_count) { + bind->server_used = pings[fastest].server_nr; + bind->current_ep = pings[fastest].server_ep; + found = 1; + } + } else { + /* clnt_perror(clnt, "__nis_findfastest"); */ + break; } + } + auth_destroy (clnt->cl_auth); clnt_destroy (clnt); @@ -252,5 +236,23 @@ __nis_findfastest (dir_binding *bind) free (pings); return found; -#endif +} + + +long int +__nis_findfastest (dir_binding *bind) +{ + struct timeval timeout = { __NIS_PING_TIMEOUT_START, 0 }; + long int found = -1; + long int retry = __NIS_PING_RETRY + 1; + + while (retry--) + { + found = __nis_findfastest_with_timeout (bind, &timeout); + if (found != -1) + break; + timeout.tv_sec += __NIS_PING_TIMEOUT_INCREMENT; + } + + return found; } diff -durpN glibc-2.2.4/nis/nis_intern.h glibc-2.2.5/nis/nis_intern.h --- glibc-2.2.4/nis/nis_intern.h Mon Jul 23 10:54:46 2001 +++ glibc-2.2.5/nis/nis_intern.h Wed Dec 12 19:39:53 2001 @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1997. @@ -21,6 +21,22 @@ #define __NIS_INTERN_H #include + +/* Configurable parameters for pinging NIS servers: */ + +/* Number of retries. */ +#ifndef __NIS_PING_RETRY +# define __NIS_PING_RETRY 2 +#endif +/* Initial timeout in seconds. */ +#ifndef __NIS_PING_TIMEOUT_START +# define __NIS_PING_TIMEOUT_START 3 +#endif +/* Timeout increment for retries in seconds. */ +#ifndef __NIS_PING_TIMEOUT_INCREMENT +# define __NIS_PING_TIMEOUT_INCREMENT 3 +#endif + __BEGIN_DECLS diff -durpN glibc-2.2.4/nscd/Makefile glibc-2.2.5/nscd/Makefile --- glibc-2.2.4/nscd/Makefile Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nscd/Makefile Sun Jan 20 19:44:55 2002 @@ -25,9 +25,12 @@ routines := nscd_getpw_r nscd_getgr_r ns include ../Makeconfig +# To find xmalloc.c +vpath %.c ../locale/programs + nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \ getgrnam_r getgrgid_r hstcache gethstbyad_r gethstbynm2_r \ - dbg_log nscd_conf nscd_stat cache + dbg_log nscd_conf nscd_stat cache xmalloc ifeq ($(have-thread-library),yes) @@ -44,8 +47,9 @@ otherlibs += $(nssobjdir)/libnss_files.a endif distribute := nscd.h nscd-client.h dbg_log.h \ - $(nscd-modules:=.c) nscd_nischeck.c TODO nscd.conf nscd.init \ - nscd_proto.h nscd-types.h + $(addsuffix .c, $(filter-out xmalloc, $(nscd-modules))) \ + nscd_nischeck.c TODO nscd.conf nscd.init nscd_proto.h \ + nscd-types.h include ../Rules diff -durpN glibc-2.2.4/nscd/connections.c glibc-2.2.5/nscd/connections.c --- glibc-2.2.4/nscd/connections.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nscd/connections.c Sun Jan 20 19:21:53 2002 @@ -1,5 +1,5 @@ /* Inner loops of cache daemon. - Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -21,7 +21,10 @@ #include #include #include +#include #include +#include +#include #include #include #include @@ -35,6 +38,24 @@ #include "nscd.h" #include "dbg_log.h" +/* Wrapper functions with error checking for standard functions. */ +extern void *xmalloc (size_t n); +extern void *xcalloc (size_t n, size_t s); +extern void *xrealloc (void *o, size_t n); + +/* Support to run nscd as an unprivileged user */ +const char *server_user; +static uid_t server_uid; +static gid_t server_gid; +static gid_t *server_groups; +#ifndef NGROUPS +# define NGROUPS 32 +#endif +static int server_ngroups = NGROUPS; + +static void begin_drop_privileges (void); +static void finish_drop_privileges (void); + /* Mapping of request type to database. */ static const dbtype serv2db[LASTDBREQ + 1] = @@ -125,6 +146,19 @@ nscd_init (const char *conffile) dbg_log (_("cannot read configuration file; this is fatal")); exit (1); } + + /* Secure mode and unprivileged mode are incompatible */ + if (server_user != NULL && secure_in_use) + { + dbg_log (_("Cannot run nscd in secure mode as unprivileged user")); + exit (1); + } + + /* Look up unprivileged uid/gid/groups before we start listening on the + socket */ + if (server_user != NULL) + begin_drop_privileges (); + if (nthreads == -1) /* No configuration for this value, assume a default. */ nthreads = 2 * lastdb; @@ -184,6 +218,10 @@ nscd_init (const char *conffile) strerror (errno)); exit (1); } + + /* Change to unprivileged uid/gid/groups if specifed in config file */ + if (server_user != NULL) + finish_drop_privileges (); } @@ -534,4 +572,69 @@ start_threads (void) pthread_attr_destroy (&attr); nscd_run ((void *) 0); +} + + +/* Look up the uid, gid, and supplementary groups to run nscd as. When + this function is called, we are not listening on the nscd socket yet so + we can just use the ordinary lookup functions without causing a lockup */ +static void +begin_drop_privileges (void) +{ + struct passwd *pwd; + + pwd = getpwnam (server_user); + + if (pwd == NULL) + { + dbg_log (_("Failed to run nscd as user '%s'"), server_user); + error (EXIT_FAILURE, 0, _("Failed to run nscd as user '%s'"), + server_user); + } + + server_uid = pwd->pw_uid; + server_gid = pwd->pw_gid; + + server_groups = (gid_t *) xmalloc (server_ngroups * sizeof (gid_t)); + + if (getgrouplist (server_user, server_gid, server_groups, &server_ngroups) + == 0) + return; + + server_groups = (gid_t *) xrealloc (server_groups, + server_ngroups * sizeof (gid_t)); + + if (getgrouplist (server_user, server_gid, server_groups, &server_ngroups) + == -1) + { + dbg_log (_("Failed to run nscd as user '%s'"), server_user); + error (EXIT_FAILURE, errno, _("getgrouplist failed")); + } +} + + +/* Call setgroups(), setgid(), and setuid() to drop root privileges and + run nscd as the user specified in the configuration file. */ +static void +finish_drop_privileges (void) +{ + if (setgroups (server_ngroups, server_groups) == -1) + { + dbg_log (_("Failed to run nscd as user '%s'"), server_user); + error (EXIT_FAILURE, errno, _("setgroups failed")); + } + + if (setgid (server_gid) == -1) + { + dbg_log (_("Failed to run nscd as user '%s'"), server_user); + perror ("setgid"); + exit (1); + } + + if (setuid (server_uid) == -1) + { + dbg_log (_("Failed to run nscd as user '%s'"), server_user); + perror ("setuid"); + exit (1); + } } diff -durpN glibc-2.2.4/nscd/nscd.c glibc-2.2.5/nscd/nscd.c --- glibc-2.2.4/nscd/nscd.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nscd/nscd.c Sun Jan 20 19:21:53 2002 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -23,11 +23,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -63,7 +61,6 @@ int do_shutdown; int disabled_passwd; int disabled_group; int go_background = 1; -const char *server_user; int secure[lastdb]; int secure_in_use; @@ -71,7 +68,6 @@ static const char *conffile = _PATH_NSCD static int check_pid (const char *file); static int write_pid (const char *file); -static void drop_privileges (void); /* Name and version of program. */ static void print_version (FILE *stream, struct argp_state *state); @@ -169,10 +165,6 @@ main (int argc, char **argv) /* Init databases. */ nscd_init (conffile); - /* Change to unprivileged UID if specifed in config file */ - if(server_user && !secure_in_use) - drop_privileges (); - /* Handle incoming requests */ start_threads (); @@ -288,7 +280,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk and Ulrich Drepper"); } @@ -372,37 +364,4 @@ write_pid (const char *file) fclose (fp); return 0; -} - -/* Look up the uid and gid associated with the user we are supposed to run - the server as, and then call setgid(), setgroups(), and setuid(). - Otherwise, abort- we should not run as root if the configuration file - specifically tells us not to. */ - -static void -drop_privileges (void) -{ - int buflen = 256; - char *buffer = alloca (buflen); - struct passwd resultbuf; - struct passwd *pwd; - - while (__getpwnam_r (server_user, &resultbuf, buffer, buflen, &pwd) != 0 - && errno == ERANGE) - { - errno = 0; - buflen += 256; - buffer = alloca (buflen); - } - - if(!pwd) - { - dbg_log (_("Failed to look up user '%s' to run server as"), - server_user); - exit(1); - } - - setgroups (0, NULL); - setgid (pwd->pw_gid); - setuid (pwd->pw_uid); } diff -durpN glibc-2.2.4/nscd/nscd_gethst_r.c glibc-2.2.5/nscd/nscd_gethst_r.c --- glibc-2.2.4/nscd/nscd_gethst_r.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nscd/nscd_gethst_r.c Tue Sep 11 20:48:35 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -219,10 +219,6 @@ nscd_gethst_r (const char *key, size_t k vec[2].iov_base = cp; vec[2].iov_len = hst_resp.h_addr_list_cnt * INADDRSZ; - ignore = alloca (hst_resp.h_addr_list_cnt * IN6ADDRSZ); - vec[3].iov_base = ignore; - vec[3].iov_len = hst_resp.h_addr_list_cnt * IN6ADDRSZ; - for (cnt = 0; cnt < hst_resp.h_addr_list_cnt; ++cnt) { resultbuf->h_addr_list[cnt] = cp; @@ -232,9 +228,9 @@ nscd_gethst_r (const char *key, size_t k resultbuf->h_addrtype = AF_INET; resultbuf->h_length = INADDRSZ; - total_len += hst_resp.h_addr_list_cnt * (INADDRSZ + IN6ADDRSZ); + total_len += hst_resp.h_addr_list_cnt * INADDRSZ; - n = 4; + n = 3; } else { diff -durpN glibc-2.2.4/nscd/nscd_nischeck.c glibc-2.2.5/nscd/nscd_nischeck.c --- glibc-2.2.4/nscd/nscd_nischeck.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nscd/nscd_nischeck.c Sun Jan 20 19:21:53 2002 @@ -1,4 +1,4 @@ -/* Copyright (c) 1999 Free Software Foundation, Inc. +/* Copyright (c) 1999, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1999. @@ -91,6 +91,6 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "1999"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } diff -durpN glibc-2.2.4/nss/getent.c glibc-2.2.5/nss/getent.c --- glibc-2.2.4/nss/getent.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nss/getent.c Sun Jan 20 19:21:54 2002 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (c) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -50,10 +50,21 @@ void (*argp_program_version_hook) (FILE /* Short description of parameters. */ static const char args_doc[] = N_("database [key ...]"); +/* Supported options. */ +static const struct argp_option args_options[] = + { + { "service", 's', "CONFIG", 0, N_("Service configuration to be used") }, + { NULL, 0, NULL, 0, NULL }, + }; + +/* Prototype for option handler. */ +static error_t parse_option (int key, char *arg, struct argp_state *state); + /* Data structure to communicate with argp functions. */ -static struct argp argp = { - NULL, NULL, args_doc, NULL, -}; +static struct argp argp = + { + args_options, parse_option, args_doc, NULL, + }; /* Print the version information. */ static void @@ -64,7 +75,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } @@ -76,11 +87,9 @@ print_aliases (struct aliasent *alias) printf ("%s: ", alias->alias_name); for (i = strlen (alias->alias_name); i < 14; ++i) - fputs (" ", stdout); + fputs_unlocked (" ", stdout); - for (i = 0; - i < alias->alias_members_len; - ++i) + for (i = 0; i < alias->alias_members_len; ++i) printf ("%s%s", alias->alias_members [i], i + 1 == alias->alias_members_len ? "\n" : ", "); @@ -93,10 +102,10 @@ aliases_keys (int number, char *key[]) int i; struct aliasent *alias; - if (!number) + if (number == 0) { setaliasent (); - while ((alias = getaliasent()) != NULL) + while ((alias = getaliasent ()) != NULL) print_aliases (alias); endaliasent (); return result; @@ -122,7 +131,7 @@ ethers_keys (int number, char *key[]) int result = 0; int i; - if (!number) + if (number == 0) { fprintf (stderr, _("Enumeration not supported on %s\n"), "ethers"); return 3; @@ -134,7 +143,7 @@ ethers_keys (int number, char *key[]) char buffer [1024], *p; ethp = ether_aton (key[i]); - if (ethp) + if (ethp != NULL) { if (ether_ntohost (buffer, ethp)) { @@ -167,16 +176,16 @@ print_group (struct group *grp) printf ("%s:%s:%ld:", grp->gr_name ? grp->gr_name : "", grp->gr_passwd ? grp->gr_passwd : "", - (unsigned long)grp->gr_gid); + (unsigned long int) grp->gr_gid); while (grp->gr_mem[i] != NULL) { - fputs (grp->gr_mem[i], stdout); + fputs_unlocked (grp->gr_mem[i], stdout); ++i; if (grp->gr_mem[i] != NULL) - fputs (",", stdout); + putchar_unlocked (','); } - fputs ("\n", stdout); + putchar_unlocked ('\n'); } static int @@ -186,10 +195,10 @@ group_keys (int number, char *key[]) int i; struct group *grp; - if (!number) + if (number == 0) { setgrent (); - while ((grp = getgrent()) != NULL) + while ((grp = getgrent ()) != NULL) print_group (grp); endgrent (); return result; @@ -220,20 +229,16 @@ print_hosts (struct hostent *host) const char *ip = inet_ntop (host->h_addrtype, host->h_addr_list[0], buf, sizeof (buf)); - fputs (ip, stdout); - for (i = strlen (ip); i < 15; ++i) - fputs (" ", stdout); - fputs (" ", stdout); - fputs (host->h_name, stdout); + printf ("%-15s %s", ip, host->h_name); i = 0; while (host->h_aliases[i] != NULL) { - fputs (" ", stdout); - fputs (host->h_aliases[i], stdout); + putchar_unlocked (' '); + fputs_unlocked (host->h_aliases[i], stdout); ++i; } - fputs ("\n", stdout); + putchar_unlocked ('\n'); } static int @@ -243,10 +248,10 @@ hosts_keys (int number, char *key[]) int i; struct hostent *host; - if (!number) + if (number == 0) { sethostent (0); - while ((host = gethostent()) != NULL) + while ((host = gethostent ()) != NULL) print_hosts (host); endhostent (); return result; @@ -285,9 +290,9 @@ static int netgroup_keys (int number, char *key[]) { int result = 0; - int i, j; + int i; - if (!number) + if (number == 0) { fprintf (stderr, _("Enumeration not supported on %s\n"), "netgroup"); return 3; @@ -301,13 +306,11 @@ netgroup_keys (int number, char *key[]) { char *p[3]; - fputs (key[i], stdout); - for (j = strlen (key[i]); j < 21; ++j) - fputs (" ", stdout); + printf ("%-21s", key[i]); while (getnetgrent (p, p + 1, p + 2)) printf (" (%s, %s, %s)", p[0] ?: " ", p[1] ?: "", p[2] ?: ""); - fputs ("\n", stdout); + putchar_unlocked ('\n'); } } @@ -322,21 +325,18 @@ print_networks (struct netent *net) struct in_addr ip; ip.s_addr = htonl (net->n_net); - printf ("%s ", net->n_name); - for (i = strlen (net->n_name); i < 21; ++i) - fputs (" ", stdout); - fputs (inet_ntoa (ip), stdout); + printf ("%-21s %s", net->n_name, inet_ntoa (ip)); i = 0; while (net->n_aliases[i] != NULL) { - fputs (" ", stdout); - fputs (net->n_aliases[i], stdout); + putchar_unlocked (' '); + fputs_unlocked (net->n_aliases[i], stdout); ++i; if (net->n_aliases[i] != NULL) - fputs (",", stdout); + putchar_unlocked (','); } - fputs ("\n", stdout); + putchar_unlocked ('\n'); } static int @@ -346,10 +346,10 @@ networks_keys (int number, char *key[]) int i; struct netent *net; - if (!number) + if (number == 0) { setnetent (0); - while ((net = getnetent()) != NULL) + while ((net = getnetent ()) != NULL) print_networks (net); endnetent (); return result; @@ -378,8 +378,8 @@ print_passwd (struct passwd *pwd) printf ("%s:%s:%ld:%ld:%s:%s:%s\n", pwd->pw_name ? pwd->pw_name : "", pwd->pw_passwd ? pwd->pw_passwd : "", - (unsigned long)pwd->pw_uid, - (unsigned long)pwd->pw_gid, + (unsigned long int) pwd->pw_uid, + (unsigned long int) pwd->pw_gid, pwd->pw_gecos ? pwd->pw_gecos : "", pwd->pw_dir ? pwd->pw_dir : "", pwd->pw_shell ? pwd->pw_shell : ""); @@ -392,10 +392,10 @@ passwd_keys (int number, char *key[]) int i; struct passwd *pwd; - if (!number) + if (number == 0) { setpwent (); - while ((pwd = getpwent()) != NULL) + while ((pwd = getpwent ()) != NULL) print_passwd (pwd); endpwent (); return result; @@ -423,19 +423,16 @@ print_protocols (struct protoent *proto) { unsigned int i; - fputs (proto->p_name, stdout); - for (i = strlen (proto->p_name); i < 21; ++i) - fputs (" ", stdout); - printf (" %d", proto->p_proto); + printf ("%-21s %d", proto->p_name, proto->p_proto); i = 0; while (proto->p_aliases[i] != NULL) { - fputs (" ", stdout); - fputs (proto->p_aliases[i], stdout); + putchar_unlocked (' '); + fputs_unlocked (proto->p_aliases[i], stdout); ++i; } - fputs ("\n", stdout); + putchar_unlocked ('\n'); } static int @@ -445,10 +442,10 @@ protocols_keys (int number, char *key[]) int i; struct protoent *proto; - if (!number) + if (number == 0) { setprotoent (0); - while ((proto = getprotoent()) != NULL) + while ((proto = getprotoent ()) != NULL) print_protocols (proto); endprotoent (); return result; @@ -476,14 +473,12 @@ print_rpc (struct rpcent *rpc) { int i; - fputs (rpc->r_name, stdout); - for (i = strlen (rpc->r_name); i < 15; ++i) - fputs (" ", stdout); - printf (" %d%s", rpc->r_number, rpc->r_aliases[0] ? " " : ""); + printf ("%-15s %d%s", + rpc->r_name, rpc->r_number, rpc->r_aliases[0] ? " " : ""); for (i = 0; rpc->r_aliases[i]; ++i) printf (" %s", rpc->r_aliases[i]); - fputs ("\n", stdout); + putchar_unlocked ('\n'); } static int @@ -493,10 +488,10 @@ rpc_keys (int number, char *key[]) int i; struct rpcent *rpc; - if (!number) + if (number == 0) { setrpcent (0); - while ((rpc = getrpcent()) != NULL) + while ((rpc = getrpcent ()) != NULL) print_rpc (rpc); endrpcent (); return result; @@ -524,19 +519,16 @@ print_services (struct servent *serv) { unsigned int i; - fputs (serv->s_name, stdout); - for (i = strlen (serv->s_name); i < 21; ++i) - fputs (" ", stdout); - printf (" %d/%s", ntohs (serv->s_port), serv->s_proto); + printf ("%-21s %d/%s", serv->s_name, ntohs (serv->s_port), serv->s_proto); i = 0; while (serv->s_aliases[i] != NULL) { - fputs (" ", stdout); - fputs (serv->s_aliases[i], stdout); + putchar_unlocked (' '); + fputs_unlocked (serv->s_aliases[i], stdout); ++i; } - fputs ("\n", stdout); + putchar_unlocked ('\n'); } static int @@ -549,7 +541,7 @@ services_keys (int number, char *key[]) if (!number) { setservent (0); - while ((serv = getservent()) != NULL) + while ((serv = getservent ()) != NULL) print_services (serv); endservent (); return result; @@ -620,10 +612,10 @@ print_shadow (struct spwd *sp) sp->sp_namp ? sp->sp_namp : "", sp->sp_pwdp ? sp->sp_pwdp : ""); -#define SHADOW_FIELD(n) \ - if (sp->n == -1) \ - fputs (":", stdout); \ - else \ +#define SHADOW_FIELD(n) \ + if (sp->n == -1) \ + putchar_unlocked (':'); \ + else \ printf ("%ld:", sp->n) SHADOW_FIELD (sp_lstchg); @@ -633,7 +625,7 @@ print_shadow (struct spwd *sp) SHADOW_FIELD (sp_inact); SHADOW_FIELD (sp_expire); if (sp->sp_flag == ~0ul) - fputs ("\n", stdout); + putchar_unlocked ('\n'); else printf ("%lu\n", sp->sp_flag); } @@ -644,12 +636,12 @@ shadow_keys (int number, char *key[]) int result = 0; int i; - if (!number) + if (number == 0) { struct spwd *sp; setspent (); - while ((sp = getspent()) != NULL) + while ((sp = getspent ()) != NULL) print_shadow (sp); endpwent (); return result; @@ -689,9 +681,28 @@ D(rpc) D(services) D(shadow) #undef D - { NULL, NULL } + { NULL, NULL } }; +/* Handle arguments found by argp. */ +static error_t +parse_option (int key, char *arg, struct argp_state *state) +{ + int i; + switch (key) + { + case 's': + for (i = 0; databases[i].name; ++i) + __nss_configure_lookup (databases[i].name, arg); + break; + + default: + return ARGP_ERR_UNKNOWN; + } + + return 0; +} + /* build doc */ static inline void build_doc (void) @@ -707,7 +718,7 @@ build_doc (void) len += strlen (databases[i].name) + 1; doc = (char *) malloc (len); - if (!doc) + if (doc == NULL) doc = short_doc; else { @@ -719,9 +730,9 @@ build_doc (void) for (i = 0, j = 0; databases[i].name; ++i) { len = strlen (databases[i].name); - if (i) + if (i != 0) { - if (j + len > 60) + if (j + len > 72) { j = 0; *p++ = '\n'; @@ -730,8 +741,7 @@ build_doc (void) *p++ = ' '; } - memcpy (p, databases[i].name, len); - p += len; + p = mempcpy (p, databases[i].name, len); j += len + 1; } } @@ -764,11 +774,11 @@ main (int argc, char *argv[]) } for (i = 0; databases[i].name; ++i) - if (argv[1][0] == databases[i].name[0] - && !strcmp (argv[1], databases[i].name)) - return databases[i].func (argc - 2, &argv[2]); + if (argv[remaining][0] == databases[i].name[0] + && !strcmp (argv[remaining], databases[i].name)) + return databases[i].func (argc - remaining - 1, &argv[remaining + 1]); - fprintf (stderr, _("Unknown database: %s\n"), argv[1]); + fprintf (stderr, _("Unknown database: %s\n"), argv[remaining]); argp_help (&argp, stdout, ARGP_HELP_SEE, program_invocation_short_name); return 1; } diff -durpN glibc-2.2.4/nss/nss_files/files-XXX.c glibc-2.2.5/nss/nss_files/files-XXX.c --- glibc-2.2.4/nss/nss_files/files-XXX.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nss/nss_files/files-XXX.c Wed Nov 28 12:11:29 2001 @@ -1,5 +1,5 @@ /* Common code for file-based databases in nss_files module. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2001 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 @@ -185,7 +185,7 @@ internal_getent (struct STRUCTURE *resul do { /* Terminate the line so that we can test for overflow. */ - data->linebuffer[linebuflen - 1] = '\xff'; + ((unsigned char *) data->linebuffer)[linebuflen - 1] = '\xff'; p = fgets_unlocked (data->linebuffer, linebuflen, stream); if (p == NULL) @@ -195,7 +195,7 @@ internal_getent (struct STRUCTURE *resul H_ERRNO_SET (HOST_NOT_FOUND); return NSS_STATUS_NOTFOUND; } - else if (data->linebuffer[linebuflen - 1] != '\xff') + else if (((unsigned char *) data->linebuffer)[linebuflen - 1] != 0xff) { /* The line is too long. Give the user the opportunity to enlarge the buffer. */ diff -durpN glibc-2.2.4/nss/nss_files/files-hosts.c glibc-2.2.5/nss/nss_files/files-hosts.c --- glibc-2.2.4/nss/nss_files/files-hosts.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nss/nss_files/files-hosts.c Wed Nov 28 12:21:09 2001 @@ -1,5 +1,5 @@ /* Hosts file parser in nss_files module. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -173,6 +173,7 @@ _nss_files_get##name##_r (proto, >= buffer + buflen) \ { \ *errnop = ERANGE; \ + *herrnop = NETDB_INTERNAL; \ status = NSS_STATUS_TRYAGAIN; \ break; \ } \ diff -durpN glibc-2.2.4/nss/nss_files/files-network.c glibc-2.2.5/nss/nss_files/files-network.c --- glibc-2.2.4/nss/nss_files/files-network.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nss/nss_files/files-network.c Sat Sep 22 16:55:43 2001 @@ -1,5 +1,5 @@ /* Networks file parser in nss_files module. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000, 2001 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 @@ -34,10 +34,40 @@ LINE_PARSER ("#", { char *addr; + char *cp; + int n = 1; STRING_FIELD (result->n_name, isspace, 1); STRING_FIELD (addr, isspace, 1); + /* 'inet_network' does not add zeroes at the end if the network number + does not four byte values. We add them outselves if necessary. */ + cp = strchr (addr, '.'); + if (cp != NULL) + { + ++n; + cp = strchr (cp + 1, '.'); + if (cp != NULL) + { + ++n; + cp = strchr (cp + 1, '.'); + if (cp != NULL) + ++n; + } + } + if (n < 4) + { + char *newp = (char *) alloca (strlen (addr) + (4 - n) * 2 + 1); + cp = stpcpy (newp, addr); + do + { + *cp++ = '.'; + *cp++ = '0'; + } + while (++n < 4); + *cp = '\0'; + addr = newp; + } result->n_net = inet_network (addr); result->n_addrtype = AF_INET; diff -durpN glibc-2.2.4/nss/test-netdb.c glibc-2.2.5/nss/test-netdb.c --- glibc-2.2.4/nss/test-netdb.c Mon Jul 23 10:54:48 2001 +++ glibc-2.2.5/nss/test-netdb.c Fri Aug 24 13:37:42 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998,99,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1998. @@ -40,6 +40,7 @@ #include #include #include +#include #include "nss.h" /* @@ -138,8 +139,8 @@ static void test_hosts (void) { struct hostent *hptr1, *hptr2; - char name[MAXHOSTNAMELEN]; - size_t namelen = sizeof(name); + char *name = NULL; + size_t namelen = 0; struct in_addr ip; hptr1 = gethostbyname ("localhost"); @@ -176,15 +177,23 @@ test_hosts (void) hptr1 = gethostbyname2 ("localhost", AF_INET); output_hostent ("gethostbyname2 (\"localhost\", AF_INET)", hptr1); + while (gethostname (name, namelen) < 0 && errno == ENAMETOOLONG) + { + namelen += 2; /* tiny increments to test a lot */ + name = realloc (name, namelen); + } if (gethostname (name, namelen) == 0) { printf ("Hostname: %s\n", name); - hptr1 = gethostbyname (name); - output_hostent ("gethostbyname (gethostname(...))", hptr1); + if (name != NULL) + { + hptr1 = gethostbyname (name); + output_hostent ("gethostbyname (gethostname(...))", hptr1); + } } ip.s_addr = htonl (INADDR_LOOPBACK); - hptr1 = gethostbyaddr ((char *)&ip, sizeof(ip), AF_INET); + hptr1 = gethostbyaddr ((char *) &ip, sizeof(ip), AF_INET); if (hptr1 != NULL) { printf ("official name of 127.0.0.1: %s\n", hptr1->h_name); Binary files glibc-2.2.4/po/ca.mo and glibc-2.2.5/po/ca.mo differ diff -durpN glibc-2.2.4/po/ca.po glibc-2.2.5/po/ca.po --- glibc-2.2.4/po/ca.po Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/po/ca.po Wed Dec 12 15:48:22 2001 @@ -0,0 +1,5643 @@ +# Catalan messages for GNU libc. +# Copyright (C) 2001 Free Software Foundation, Inc. +# Ivan Vilata i Balaguer , 1998, 1999, 2000, 2001 +# +msgid "" +msgstr "" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-12-13 00:22+01:00\n" +"Last-Translator: Ivan Vilata i Balaguer \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: el valor del camp «%s» ha d'estar en el rang %d...%d" + +#: nis/nis_print.c:277 +msgid "\t\tAccess Rights : " +msgstr "\t\tDrets d'accés : " + +#: nis/nis_print.c:275 +msgid "\t\tAttributes : " +msgstr "\t\tAtributs : " + +#: sunrpc/rpc_main.c:1427 +#, c-format +msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" +msgstr "\t%s [-abkCLNTM][-Dnom[=valor]] [-i tamany] [-I [-K segons]] [-Y camí] fitxerentrada\n" + +#: sunrpc/rpc_main.c:1429 +#, c-format +msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" +msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fitxereixida] [fitxerentrada]\n" + +#: sunrpc/rpc_main.c:1432 +#, c-format +msgid "\t%s [-n netid]* [-o outfile] [infile]\n" +msgstr "\t%s [-n idxarxa]* [-o fitxereixida] [fitxerentrada]\n" + +#: sunrpc/rpc_main.c:1431 +#, c-format +msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" +msgstr "\t%s [-s tipusdexarxa]* [-o fitxereixida] [fitxerentrada]\n" + +#: nis/nis_print.c:239 +msgid "\tAccess rights: " +msgstr "\tDrets d'accés: " + +#: nis/nis_print.c:297 +#, c-format +msgid "\tEntry data of type %s\n" +msgstr "\tDades de l'entrada de tipus «%s»\n" + +#: nis/nis_print.c:175 +#, c-format +msgid "\tName : %s\n" +msgstr "\tNom : %s\n" + +#: nis/nis_print.c:176 +msgid "\tPublic Key : " +msgstr "\tClau pública: " + +#: nis/nis_print.c:238 +#, c-format +msgid "\tType : %s\n" +msgstr "\tTipus : %s\n" + +#: nis/nis_print.c:205 +#, c-format +msgid "\tUniversal addresses (%u)\n" +msgstr "\tAdreces universals (%u)\n" + +#: nis/nis_print.c:273 +#, c-format +msgid "\t[%d]\tName : %s\n" +msgstr "\t[%d]\tNom : %s\n" + +#: nis/nis_print.c:300 +#, c-format +msgid "\t[%u] - [%u bytes] " +msgstr "\t[%u] - [%u octets] " + +#: nscd/nscd_stat.c:154 +#, c-format +msgid "" +"\n" +"%s cache:\n" +"\n" +"%15s cache is enabled\n" +"%15Zd suggested size\n" +"%15ld seconds time to live for positive entries\n" +"%15ld seconds time to live for negative entries\n" +"%15ld cache hits on positive entries\n" +"%15ld cache hits on negative entries\n" +"%15ld cache misses on positive entries\n" +"%15ld cache misses on negative entries\n" +"%15ld%% cache hit rate\n" +"%15s check /etc/%s for changes\n" +msgstr "" +"\n" +"Memòria cau de «%s»:\n" +"\n" +"%15s n'és habilitada la memòria cau?\n" +"%15Zd tamany suggerit\n" +"%15ld temps de vida en segons per entrades positives\n" +"%15ld temps de vida en segons per entrades negatives\n" +"%15ld encerts de memòria cau per entrades positives\n" +"%15ld encerts de memòria cau per entrades negatives\n" +"%15ld fallades de memòria cau per entrades positives\n" +"%15ld fallades de memòria cau per entrades negatives\n" +"%15ld%% ràtio d'encerts de memòria cau\n" +"%15s comprovar /etc/%s per si hi ha hagut canvis?\n" + +#: nis/nis_print.c:255 +msgid "\nGroup Members :\n" +msgstr "\nMembres del grup :\n" + +#: nis/nis_print.c:326 +msgid "\nTime to Live : " +msgstr "\nTemps de vida : " + +#: sunrpc/rpcinfo.c:679 +msgid " rpcinfo -b prognum versnum\n" +msgstr " rpcinfo -b númeroprograma númeroversió\n" + +#: sunrpc/rpcinfo.c:680 +msgid " rpcinfo -d prognum versnum\n" +msgstr " rpcinfo -d númeroprograma númeroversió\n" + +#: sunrpc/rpcinfo.c:678 +msgid " rpcinfo -p [ host ]\n" +msgstr " rpcinfo -p [ estació ]\n" + +#: sunrpc/rpcinfo.c:676 +msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n" +msgstr " rpcinfo [ -n númeroport ] -t estació númeroprograma [ númeroversió ]\n" + +#: nscd/nscd_stat.c:146 nscd/nscd_stat.c:148 +msgid " no" +msgstr " no" + +#: nscd/nscd_stat.c:146 nscd/nscd_stat.c:148 +msgid " yes" +msgstr " sí" + +#: nis/nis_print.c:352 +#, c-format +msgid " Data Length = %u\n" +msgstr " Longitud de les dades = %u\n" + +#: nis/nis_print_group_entry.c:123 +msgid " Explicit members:\n" +msgstr " Membres explícits:\n" + +#: nis/nis_print_group_entry.c:147 nis/nis_print_group_entry.c:163 +msgid " Explicit nonmembers:\n" +msgstr " No-membres explícits:\n" + +#: nis/nis_print_group_entry.c:131 +msgid " Implicit members:\n" +msgstr " Membres implícits:\n" + +#: nis/nis_print_group_entry.c:155 +msgid " Implicit nonmembers:\n" +msgstr " No-membres implícits:\n" + +#: nis/nis_print_group_entry.c:128 +msgid " No explicit members\n" +msgstr " No hi ha membres explícits\n" + +#: nis/nis_print_group_entry.c:152 +msgid " No explicit nonmembers\n" +msgstr " No hi ha no-membres explícits\n" + +#: nis/nis_print_group_entry.c:136 +msgid " No implicit members\n" +msgstr " No hi ha membres implícits\n" + +#: nis/nis_print_group_entry.c:160 +msgid " No implicit nonmembers\n" +msgstr " No hi ha no-membres implícits\n" + +#: nis/nis_print_group_entry.c:144 +msgid " No recursive members\n" +msgstr " No hi ha membres recursius\n" + +#: nis/nis_print_group_entry.c:168 +msgid " No recursive nonmembers\n" +msgstr " No hi ha no-membres recursius\n" + +#: nis/nis_print_group_entry.c:139 +msgid " Recursive members:\n" +msgstr " Membres recursius:\n" + +#: sunrpc/rpcinfo.c:574 +msgid " program vers proto port\n" +msgstr " programa vers proto port\n" + +#: argp/argp-help.c:1572 +msgid " or: " +msgstr " o bé: " + +# ivb (2001/10/28) +# ivb Es refereix a fer o no l'enllaç, no importa el gènere. +#: elf/ldconfig.c:457 +msgid " (SKIPPED)\n" +msgstr " (SALTAT)\n" + +# ivb (2001/10/28) +# ivb Es refereix a un enllaç -> masculí. +#: elf/ldconfig.c:455 +msgid " (changed)\n" +msgstr " (canviat)\n" + +#: timezone/zic.c:427 +#, c-format +msgid " (rule from \"%s\", line %d)" +msgstr " (regla de «%s», línia %d)" + +#: argp/argp-help.c:1584 +msgid " [OPTION...]" +msgstr " [OPCIÓ...]" + +#: timezone/zic.c:424 +#, c-format +msgid "\"%s\", line %d: %s" +msgstr "«%s», línia %d: %s" + +#: timezone/zic.c:989 +#, c-format +msgid "\"Zone %s\" line and -l option are mutually exclusive" +msgstr "la línia «Zone %s» i l'opció -l són mútuament excloents" + +#: timezone/zic.c:997 +#, c-format +msgid "\"Zone %s\" line and -p option are mutually exclusive" +msgstr "la línia «Zone %s» i l'opció -p són mútuament excloents" + +#: sunrpc/rpc_main.c:1412 +msgid "\"infile\" is required for template generation flags.\n" +msgstr "cal «fitxerentrada» pels senyaladors de generació de plantilles.\n" + +#: argp/argp-help.c:209 +#, c-format +msgid "%.*s: ARGP_HELP_FMT parameter requires a value" +msgstr "%.*s: El paràmetre ARGP_HELP_FMT necessita un valor" + +#: argp/argp-help.c:218 +#, c-format +msgid "%.*s: Unknown ARGP_HELP_FMT parameter" +msgstr "%.*s: El paràmetre d'ARGP_HELP_FMT no és conegut" + +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 +#, c-format +msgid "%1$s: definition does not end with `END %1$s'" +msgstr "%1$s: la definició no termina amb «END %1$s»" + +#: elf/cache.c:190 elf/cache.c:200 +#, c-format +msgid "%d libs found in cache `%s'\n" +msgstr "S'han trobat %d biblioteques en la memòria cau «%s»\n" + +#: timezone/zic.c:799 +#, c-format +msgid "%s in ruleless zone" +msgstr "«%s» en una zona sense regles" + +#: elf/../sysdeps/generic/readelflib.c:67 +#, c-format +msgid "%s is a 32 bit ELF file.\n" +msgstr "«%s» és un fitxer ELF de 32 bits.\n" + +#: elf/../sysdeps/generic/readelflib.c:69 +#, c-format +msgid "%s is a 64 bit ELF file.\n" +msgstr "%s és un fitxer ELF de 64 bits.\n" + +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 +#, c-format +msgid "%s is for unknown machine %d.\n" +msgstr "«%s» és per la màquina desconeguda %d.\n" + +#: elf/ldconfig.c:326 +#, c-format +msgid "%s is not a known library type" +msgstr "«%s» no és un tipus conegut de biblioteca" + +#: elf/../sysdeps/generic/readelflib.c:78 +#, c-format +msgid "%s is not a shared object file (Type: %d).\n" +msgstr "«%s» no és un fitxer objecte compartit (Tipus: %d).\n" + +#: elf/ldconfig.c:424 +#, c-format +msgid "%s is not a symbolic link\n" +msgstr "«%s» no és un enllaç simbòlic\n" + +#: elf/readlib.c:155 +#, c-format +msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" +msgstr "«%s» no és un fitxer ELF - els octets màgics del començament no són correctes.\n" + +#: assert/assert.c:52 +#, c-format +msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n" +msgstr "%s%s%s:%u: %s%sL'asserció «%s» ha fallat.\n" + +#: assert/assert-perr.c:54 +#, c-format +msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n" +msgstr "%s%s%s:%u: %s%sError inesperat: %s.\n" + +#: stdio-common/psignal.c:48 +#, c-format +msgid "%s%sUnknown signal %d\n" +msgstr "%s%sSenyal desconegut %d\n" + +# ivb (2001/10/28) +# ivb Resulta d'assignar un «int» a un «long». +#: timezone/zic.c:2234 +#, c-format +msgid "%s: %d did not sign extend correctly\n" +msgstr "%s: el signe de %d no s'ha estés correctament\n" + +#: locale/programs/charmap.c:331 +#, c-format +msgid "%s: must be greater than \n" +msgstr "%s: «mb_cur_max» ha de ser major que «mb_cur_min»\n" + +#: sunrpc/rpc_main.c:423 +#, c-format +msgid "%s: C preprocessor failed with exit code %d\n" +msgstr "%s: el preprocessador de C ha fallat amb el codi d'eixida %d\n" + +#: sunrpc/rpc_main.c:420 +#, c-format +msgid "%s: C preprocessor failed with signal %d\n" +msgstr "%s: el preprocessador de C ha fallat amb el senyal %d\n" + +#: timezone/zic.c:1500 +#, c-format +msgid "%s: Can't create %s: %s\n" +msgstr "%s: No s'ha pogut crear «%s»: %s\n" + +#: timezone/zic.c:2212 +#, c-format +msgid "%s: Can't create directory %s: %s\n" +msgstr "%s: No s'ha pogut crear el directori «%s»: %s\n" + +#: timezone/zic.c:651 +#, c-format +msgid "%s: Can't link from %s to %s: %s\n" +msgstr "%s: No s'ha pogut crear un enllaç des de «%s» fins «%s»: %s\n" + +#: timezone/zic.c:825 +#, c-format +msgid "%s: Can't open %s: %s\n" +msgstr "%s: No s'ha pogut obrir «%s»: %s\n" + +#: timezone/zic.c:1490 +#, c-format +msgid "%s: Can't remove %s: %s\n" +msgstr "%s: No s'ha pogut eliminar «%s»: %s\n" + +#: timezone/zic.c:636 +#, c-format +msgid "%s: Can't unlink %s: %s\n" +msgstr "%s: No s'ha pogut desenllaçar «%s»: %s\n" + +#: timezone/zic.c:894 +#, c-format +msgid "%s: Error closing %s: %s\n" +msgstr "%s: Error en tancar «%s»: %s\n" + +#: timezone/zic.c:887 +#, c-format +msgid "%s: Error reading %s\n" +msgstr "%s: Error en llegir «%s»\n" + +#: timezone/zic.c:1566 +#, c-format +msgid "%s: Error writing %s\n" +msgstr "%s: Error en escriure «%s»\n" + +#: timezone/zic.c:872 +#, c-format +msgid "%s: Leap line in non leap seconds file %s\n" +msgstr "%s: Línia «Leap» en fitxer no de segons de traspàs «%s»\n" + +#: timezone/zic.c:365 +#, c-format +msgid "%s: Memory exhausted: %s\n" +msgstr "%s: La memòria s'ha exhaurit: %s\n" + +#: timezone/zic.c:531 +#, c-format +msgid "%s: More than one -L option specified\n" +msgstr "%s: S'ha especificat l'opció -L més d'una volta\n" + +#: timezone/zic.c:491 +#, c-format +msgid "%s: More than one -d option specified\n" +msgstr "%s: S'ha especificat l'opció -d més d'una volta\n" + +#: timezone/zic.c:501 +#, c-format +msgid "%s: More than one -l option specified\n" +msgstr "%s: S'ha especificat l'opció -l més d'una volta\n" + +#: timezone/zic.c:511 +#, c-format +msgid "%s: More than one -p option specified\n" +msgstr "%s: S'ha especificat l'opció -p més d'una volta\n" + +#: timezone/zic.c:521 +#, c-format +msgid "%s: More than one -y option specified\n" +msgstr "%s: S'ha especificat l'opció -y més d'una volta\n" + +#: argp/argp-parse.c:646 +#, c-format +msgid "%s: Too many arguments\n" +msgstr "%s: Sobren arguments\n" + +#: locale/programs/ld-collate.c:457 locale/programs/ld-collate.c:483 +#: locale/programs/ld-collate.c:499 +#, c-format +msgid "%s: `%s' mentioned more than once in definition of weight %d" +msgstr "%s: s'ha mencionat «%s» més d'una volta en la definició de pes %d" + +#: locale/programs/ld-collate.c:1336 +#, c-format +msgid "%s: `%s' must be a character" +msgstr "%s: «%s» ha de ser un caràcter" + +#: locale/programs/ld-address.c:248 locale/programs/ld-address.c:276 +#: locale/programs/ld-address.c:309 locale/programs/ld-address.c:321 +#, c-format +msgid "%s: `%s' value does not match `%s' value" +msgstr "%s: el valor de «%s» no concorda amb el valor de «%s»" + +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 +#, c-format +msgid "%s: `-1' must be last entry in `%s' field" +msgstr "%s: «-1» ha de ser l'última entrada del camp «%s»" + +#: locale/programs/ld-collate.c:447 locale/programs/ld-collate.c:473 +#, c-format +msgid "%s: `forward' and `backward' are mutually excluding each other" +msgstr "%s: «forward» i «backward» són mútuament excloents" + +#: locale/programs/ld-collate.c:1528 +#, c-format +msgid "%s: `position' must be used for a specific level in all sections or none" +msgstr "%s: cal usar «position» per un nivell específic en totes les seccions o en cap" + +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 +#, c-format +msgid "%s: `translit_start' section does not end with `translit_end'" +msgstr "%s: la secció «translit_start» no termina amb «translit_end»" + +#: locale/programs/ld-collate.c:1136 +#, c-format +msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" +msgstr "%s: la seqüència d'octets del primer caràcter de la seqüència no és menor que la de l´últim caràcter" + +#: locale/programs/ld-collate.c:1094 +#, c-format +msgid "%s: byte sequences of first and last character must have the same length" +msgstr "%s: les seqüències d'octets del primer i l'últim caràcter han de tenir la mateixa longitud" + +#: locale/programs/ld-collate.c:3663 +#, c-format +msgid "%s: cannot have `%s' as end of ellipsis range" +msgstr "%s: «%s» no es pot trobar al final d'un rang amb el·lipsi" + +#: locale/programs/ld-collate.c:3327 +#, c-format +msgid "%s: cannot reorder after %.*s: symbol not known" +msgstr "%s: no s'ha pogut reordenar després de «%.*s»: el símbol no és conegut" + +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 +#, c-format +msgid "%s: character `%s' in charmap not representable with one byte" +msgstr "%s: el caràcter «%s» del mapa de caràcters no es pot representar amb un sol octet" + +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 +#, c-format +msgid "%s: character `%s' needed as default value not representable with one byte" +msgstr "%s: el caràcter «%s», necessari com a valor per defecte, no es pot representar amb un sol octet" + +#: locale/programs/ld-ctype.c:2907 +#, c-format +msgid "%s: character `%s' not defined in charmap while needed as default value" +msgstr "%s: el caràcter «%s», necessari com a valor per defecte, no ha estat definit en el mapa de caràcters" + +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 +#, c-format +msgid "%s: character `%s' not defined while needed as default value" +msgstr "%s: el caràcter «%s», necessari com a valor per defecte, no ha estat definit" + +#: timezone/zic.c:1933 +#, c-format +msgid "%s: command was '%s', result was %d\n" +msgstr "%s: l'ordre ha estat «%s», el resultat ha estat %d\n" + +#: locale/programs/ld-time.c:246 +#, c-format +msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" +msgstr "%s: el senyalador de direcció de la cadena %Zd del camp «era» no és ni «+» ni «-»" + +#: locale/programs/ld-time.c:258 +#, c-format +msgid "%s: direction flag in string %Zd in `era' field is not a single character" +msgstr "%s: el senyalador de direcció de la cadena %Zd del camp «era» no és un sol caràcter" + +#: locale/programs/ld-ctype.c:2729 +#, c-format +msgid "%s: duplicate `default_missing' definition" +msgstr "%s: la definició de «default_missing» és duplicada" + +#: locale/programs/ld-identification.c:431 +#, c-format +msgid "%s: duplicate category version definition" +msgstr "%s: la definició de versió de categoria és duplicada" + +#: locale/programs/ld-collate.c:2730 +#, c-format +msgid "%s: duplicate declaration of section `%s'" +msgstr "%s: la declaració de la secció «%s» és duplicada" + +#: locale/programs/ld-collate.c:2694 +#, c-format +msgid "%s: duplicate definition of `%s'" +msgstr "%s: la definició de «%s» és duplicada" + +#: locale/programs/ld-collate.c:3712 +#, c-format +msgid "%s: empty category description not allowed" +msgstr "%s: no es permet una descripció buida de la categoria" + +#: locale/programs/ld-collate.c:755 +#, c-format +msgid "%s: empty weight string not allowed" +msgstr "%s: no es permet la cadena buida com a nom de pes" + +#: locale/programs/charmap.c:836 +#, c-format +msgid "%s: error in state machine" +msgstr "%s: error en la màquina d'estats" + +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 +#, c-format +msgid "%s: field `%s' declared more than once" +msgstr "%s: el camp «%s» ha estat declarat més d'una volta" + +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 +#, c-format +msgid "%s: field `%s' does not contain exactly ten entries" +msgstr "%s: el camp «%s» no conté deu entrades exactament" + +#: locale/programs/ld-address.c:154 locale/programs/ld-address.c:205 +#: locale/programs/ld-address.c:230 locale/programs/ld-address.c:259 +#: locale/programs/ld-name.c:115 locale/programs/ld-telephone.c:117 +#, c-format +msgid "%s: field `%s' must not be empty" +msgstr "%s: el camp «%s» no ha d'estar buit" + +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 +#, c-format +msgid "%s: field `%s' not defined" +msgstr "%s: no s'ha definit el camp «%s»" + +#: locale/programs/ld-messages.c:115 locale/programs/ld-messages.c:148 +#, c-format +msgid "%s: field `%s' undefined" +msgstr "%s: no s'ha definit el camp «%s»" + +#: locale/programs/ld-time.c:279 +#, c-format +msgid "%s: garbage at end of offset value in string %Zd in `era' field" +msgstr "%s: fem al final del valor de desplaçament de la cadena %Zd del camp «era»" + +#: locale/programs/ld-time.c:339 +#, c-format +msgid "%s: garbage at end of starting date in string %Zd in `era' field " +msgstr "%s: fem al final de la data de començament de la cadena %Zd del camp «era» " + +#: locale/programs/ld-time.c:416 +#, c-format +msgid "%s: garbage at end of stopping date in string %Zd in `era' field" +msgstr "%s: fem al final de la data d'acabament de la cadena %Zd del camp «era»" + +#: posix/getopt.c:788 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: no es permet l'opció «%c»\n" + +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 +#, c-format +msgid "%s: incomplete `END' line" +msgstr "%s: la línia «END» és incompleta" + +#: locale/programs/ld-address.c:166 +#, c-format +msgid "%s: invalid escape `%%%c' sequence in field `%s'" +msgstr "%s: la seqüència d'escapada «%%%c» del camp «%s» no és vàlida" + +#: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126 +#: locale/programs/ld-telephone.c:150 +#, c-format +msgid "%s: invalid escape sequence in field `%s'" +msgstr "%s: la seqüència d'escapada del camp «%s» no és vàlida" + +#: locale/programs/ld-time.c:271 +#, c-format +msgid "%s: invalid number for offset in string %Zd in `era' field" +msgstr "%s: el número de desplaçament de la cadena %Zd del camp «era» no és vàlid" + +#: locale/programs/ld-collate.c:3162 +#, c-format +msgid "%s: invalid number of sorting rules" +msgstr "%s: el nombre de regles d'ordenació no és vàlid" + +#: posix/getopt.c:791 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: l'opció «%c» no és vàlida\n" + +#: locale/programs/ld-time.c:330 +#, c-format +msgid "%s: invalid starting date in string %Zd in `era' field" +msgstr "%s: la data de començament de la cadena %Zd del camp «era» no és vàlida" + +#: locale/programs/ld-time.c:407 +#, c-format +msgid "%s: invalid stopping date in string %Zd in `era' field" +msgstr "%s: la data d'acabament de la cadena %Zd del camp «era» no és vàlida" + +#: locale/programs/ld-measurement.c:112 +#, c-format +msgid "%s: invalid value for field `%s'" +msgstr "%s: el valor del camp «%s» no és vàlid" + +#: locale/programs/ld-address.c:242 locale/programs/ld-address.c:270 +#, c-format +msgid "%s: language abbreviation `%s' not defined" +msgstr "%s: no s'ha definit l'abreviatura de llengua «%s»" + +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 +#, c-format +msgid "%s: missing `order_end' keyword" +msgstr "%s: manca la paraula clau «order_end»" + +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 +#, c-format +msgid "%s: missing `reorder-end' keyword" +msgstr "%s: manca la paraula clau «reorder-end»" + +#: locale/programs/ld-collate.c:3731 +#, c-format +msgid "%s: missing `reorder-sections-end' keyword" +msgstr "%s: manca la paraula clau «reorder-sections-end»" + +#: locale/programs/ld-time.c:456 +#, c-format +msgid "%s: missing era format in string %Zd in `era' field" +msgstr "%s: manca el format de l'era en la cadena %Zd del camp «era»" + +#: locale/programs/ld-time.c:444 +#, c-format +msgid "%s: missing era name in string %Zd in `era' field" +msgstr "%s: manca el nom de l'era en la cadena %Zd del camp «era»" + +#: locale/programs/ld-collate.c:3138 +#, c-format +msgid "%s: multiple order definitions for section `%s'" +msgstr "%s: hi ha múltiples definicions d'ordre de la secció «%s»" + +#: locale/programs/ld-collate.c:3188 +#, c-format +msgid "%s: multiple order definitions for unnamed section" +msgstr "%s: hi ha múltiples definicions d'ordre de la secció sense nom" + +#: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:170 +#, c-format +msgid "%s: no correct regular expression for field `%s': %s" +msgstr "%s: no hi ha cap expressió regular correcta pel camp «%s»: %s" + +#: locale/programs/ld-identification.c:169 +#, c-format +msgid "%s: no identification for category `%s'" +msgstr "%s: no hi ha cap identificació per la categoria «%s»" + +#: locale/programs/ld-ctype.c:2755 +#, c-format +msgid "%s: no representable `default_missing' definition found" +msgstr "%s: no s'ha trobat cap definició representable de «default_missing»" + +#: locale/programs/ld-collate.c:591 +#, c-format +msgid "%s: not enough sorting rules" +msgstr "%s: no hi ha suficients regles d'ordenació" + +#: locale/programs/ld-address.c:295 +#, c-format +msgid "%s: numeric country code `%d' not valid" +msgstr "%s: el codi numèric de país «%d» no és vàlid" + +#: posix/getopt.c:711 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: l'opció «%c%s» no admet arguments\n" + +#: posix/getopt.c:681 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: l'opció «%s» és ambígua\n" + +#: posix/getopt.c:729 posix/getopt.c:902 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: l'opció «%s» necessita un argument\n" + +#: posix/getopt.c:706 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: l'opció «--%s» no admet arguments\n" + +#: posix/getopt.c:886 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: l'opció «-W %s» no admet arguments\n" + +#: posix/getopt.c:868 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: l'opció «-W %s» és ambígua\n" + +#: posix/getopt.c:821 posix/getopt.c:951 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opció «%c» necessita un argument\n" + +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 +#, c-format +msgid "%s: order for `%.*s' already defined at %s:%Zu" +msgstr "%s: l'ordre de «%.*s» ja ha estat definit en %s:%Zu" + +#: locale/programs/ld-collate.c:3316 +#, c-format +msgid "%s: order for collating element %.*s not yet defined" +msgstr "%s: l'ordre de l'element d'ordenació %.*s encara no ha estat definit" + +#: locale/programs/ld-collate.c:3300 +#, c-format +msgid "%s: order for collating symbol %.*s not yet defined" +msgstr "%s: l'ordre del símbol d'ordenació %.*s encara no ha estat definit" + +#: sunrpc/rpc_main.c:289 +#, c-format +msgid "%s: output would overwrite %s\n" +msgstr "%s: l'eixida sobreescriuria «%s»\n" + +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 +#, c-format +msgid "%s: panic: Invalid l_value %d\n" +msgstr "%s: pànic: El valor esquerre %d no és vàlid\n" + +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 +#: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 +#, c-format +msgid "%s: premature end of file" +msgstr "%s: fí de fitxer prematura" + +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 +#, c-format +msgid "%s: section `%.*s' not known" +msgstr "%s: la secció «%.*s» no és coneguda" + +#: locale/programs/ld-time.c:358 +#, c-format +msgid "%s: starting date is invalid in string %Zd in `era' field" +msgstr "%s: la data de començament de la cadena %Zd del camp «era» no és vàlida" + +#: locale/programs/ld-time.c:435 +#, c-format +msgid "%s: stopping date is invalid in string %Zd in `era' field" +msgstr "%s: la data d'acabament de la cadena %Zd del camp «era» no és vàlida" + +#: locale/programs/ld-collate.c:1261 +#, c-format +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" +msgstr "%s: un rang simbòlic amb el·lipsi no pot anar just davant d'«order_end»" + +#: locale/programs/ld-collate.c:1257 +#, c-format +msgid "%s: symbolic range ellipsis must not directly follow `order_start'" +msgstr "%s: un rang simbòlic amb el·lipsi no pot anar just darrere d'«order_start»" + +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 +#: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 +#, c-format +msgid "%s: syntax error" +msgstr "%s: error de sintaxi" + +#: locale/programs/ld-ctype.c:2180 +#, c-format +msgid "%s: syntax error in definition of new character class" +msgstr "%s: error de sintaxi en la definició de nova classe de caràcters" + +#: locale/programs/ld-ctype.c:2195 +#, c-format +msgid "%s: syntax error in definition of new character map" +msgstr "%s: error de sintaxi en la definició de nou mapa de caràcters" + +#: locale/programs/ld-ctype.c:3737 +#, c-format +msgid "%s: table for class \"%s\": %lu bytes\n" +msgstr "%s: taula de la classe «%s»: %lu octets\n" + +#: locale/programs/ld-ctype.c:3805 +#, c-format +msgid "%s: table for map \"%s\": %lu bytes\n" +msgstr "%s: taula del mapa «%s»: %lu octets\n" + +#: locale/programs/ld-ctype.c:3937 +#, c-format +msgid "%s: table for width: %lu bytes\n" +msgstr "%s: taula d'amplada: %lu bytes\n" + +# ivb (2001/10/28) +# ivb Pel que sembla hi ha un codi terminològic de llengua i un +# ivb codi bibliogràfic de llengua. +# ivb http://anubis.dkuug.dk/i18n/iso-639-2-dis.txt +#: locale/programs/ld-address.c:216 +#, c-format +msgid "%s: terminology language code `%s' not defined" +msgstr "%s: no s'ha definit el codi terminològic de llengua «%s»" + +#: locale/programs/ld-collate.c:1067 +#, c-format +msgid "%s: the start and the end symbol of a range must stand for characters" +msgstr "%s: els símbols inicial i final d'un rang han de representar caràcters" + +#: locale/programs/ld-time.c:485 +#, c-format +msgid "%s: third operand for value of field `%s' must not be larger than %d" +msgstr "%s: el tercer operand del valor del camp «%s» no ha de ser major que %d" + +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: manquen valors en el camp «%s»" + +#: locale/programs/ld-collate.c:555 +#, c-format +msgid "%s: too many rules; first entry only had %d" +msgstr "%s: sobren regles; la primera entrada només en tenia %d" + +#: locale/programs/ld-collate.c:906 +#, c-format +msgid "%s: too many values" +msgstr "%s: sobren valors" + +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: sobren valors en el camp «%s»" + +#: locale/programs/ld-ctype.c:3641 +#, c-format +msgid "%s: transliteration data from locale `%s' not available" +msgstr "%s: les dades de transliteració del locale «%s» no estan disponibles" + +#: sunrpc/rpc_main.c:296 +#, c-format +msgid "%s: unable to open %s: %m\n" +msgstr "%s: no s'ha pogut obrir «%s»: %m\n" + +#: locale/programs/ld-collate.c:2868 +#, c-format +msgid "%s: unknown character in collating symbol name" +msgstr "%s: el nom del símbol d'ordenació conté un caràcter desconegut" + +#: locale/programs/ld-collate.c:3000 +#, c-format +msgid "%s: unknown character in equivalent definition name" +msgstr "%s: el nom de la definició equivalent conté un caràcter desconegut" + +#: locale/programs/ld-collate.c:3013 +#, c-format +msgid "%s: unknown character in equivalent definition value" +msgstr "%s: el valor de la definició equivalent conté un caràcter desconegut" + +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 +#, c-format +msgid "%s: unknown character in field `%s'" +msgstr "%s: el camp «%s» conté un caràcter desconegut" + +#: locale/programs/ld-collate.c:3110 +#, c-format +msgid "%s: unknown section name `%s'" +msgstr "%s: el nom de secció «%s» no és conegut" + +#: locale/programs/ld-collate.c:3023 +#, c-format +msgid "%s: unknown symbol `%s' in equivalent definition" +msgstr "%s: la definició equivalent conté el símbol desconegut «%s»" + +#: posix/getopt.c:762 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: l'opció «%c%s» no és reconeguda\n" + +#: posix/getopt.c:758 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: l'opció «--%s» no és reconeguda\n" + +# ivb (2001/10/28) +# ivb Deixe algunes paraules per traduir perquè es refereixen a paraules +# ivb reservades dels fitxers amb què treballa zic. +# ivb (2001/10/28) +# ivb Sembla que la barra al final de la línia és a propòsit. +#: timezone/zic.c:449 +#, c-format +msgid "" +"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" +"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n" +msgstr "" +"%s: la forma d'ús és %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" +"\t[ -d directori ] [ -L fitxersegonsintercalars ] [ -y yearistype ] \\\n" +"\t[ fitxer ... ]\n" + +# ivb (2001/10/28) +# ivb Segons el codi, «cutoff» és un any de tall (de no-sé-què). +#: timezone/zdump.c:175 +#, c-format +msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" +msgstr "%s: la forma d'ús és %s [ -v ] [ -c anydetall ] nomzona ...\n" + +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: el valor del camp «%s» ha de ser un sol caràcter" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: el valor del camp «%s» ha d'estar en el rang %d...%d" + +#: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 +#, c-format +msgid "%s: value for field `%s' must not be an empty string" +msgstr "%s: el valor del camp «%s» no ha de ser la cadena buida" + +#: locale/programs/ld-monetary.c:250 locale/programs/ld-numeric.c:119 +#, c-format +msgid "%s: value for field `%s' must not be the empty string" +msgstr "%s: el valor del camp «%s» no ha de ser la cadena buida" + +#: locale/programs/ld-monetary.c:232 +#, c-format +msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217" +msgstr "%s: el valor del camp «int_curr_symbol» no és un nom vàlid de l'estàndard ISO 4217" + +#: locale/programs/ld-monetary.c:224 +#, c-format +msgid "%s: value of field `int_curr_symbol' has wrong length" +msgstr "%s: el valor del camp «int_curr_symbol» té una longitud incorrecta" + +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 +#, c-format +msgid "%s: values for field `%s' must be smaller than 127" +msgstr "%s: els valors del camp «%s» han de ser menors que 127" + +#: locale/programs/ld-time.c:509 +#, c-format +msgid "%s: values for field `%s' must not be larger than %d" +msgstr "%s: els valors del camp «%s» no han de ser majors que %d" + +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 +#, c-format +msgid "%s: values of field `%s' must not be larger than %d" +msgstr "%s: els valors del camp «%s» no han de ser majors que %d" + +#: locale/programs/ld-collate.c:850 +#, c-format +msgid "%s: weights must use the same ellipsis symbol as the name" +msgstr "%s: els pesos han d'usar el mateix símbol d'el·lipsi que el nom" + +#: sunrpc/rpc_main.c:308 +#, c-format +msgid "%s: while writing output %s: %m" +msgstr "%s: en escriure en l'eixida «%s»: %m" + +#: argp/argp-parse.c:170 +msgid "(PROGRAM ERROR) No version known!?" +msgstr "(ERROR DEL PROGRAMA) No es coneix cap versió!?" + +#: argp/argp-parse.c:787 +msgid "(PROGRAM ERROR) Option should have been recognized!?" +msgstr "(ERROR DEL PROGRAMA) L'opció hauria d'haver estat reconeguda!?" + +#: nis/nis_print.c:133 +msgid "(Unknown object)\n" +msgstr "(Objecte desconegut)\n" + +#: sunrpc/clnt_perr.c:132 +#, c-format +msgid "(unknown authentication error - %d)" +msgstr "(error desconegut d'autenticació - %d)" + +# ivb (2001/10/28) +# ivb Es refereix al nom d'una estació -> masculí. +#: sunrpc/rpcinfo.c:613 +msgid "(unknown)" +msgstr "(desconegut)" + +#: elf/sprof.c:570 +#, c-format +msgid "*** The file `%s' is stripped: no detailed analysis possible\n" +msgstr "*** El fitxer «%s» no conté símbols: no és possible l'anàlisi detallada\n" + +#: catgets/gencat.c:282 +msgid "*standard input*" +msgstr "*entrada estàndard*" + +# ivb (2001/11/06) +# ivb Cal mantenir-ho curt... +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", ABI del SO: %s %d.%d.%d" + +#: catgets/gencat.c:125 +msgid "" +"-o OUTPUT-FILE [INPUT-FILE]...\n" +"[OUTPUT-FILE [INPUT-FILE]...]" +msgstr "" +"-o FITXER-EIXIDA [FITXER-ENTRADA]...\n" +"[FITXER-EIXIDA [FITXER-ENTRADA]...]" + +#: stdio-common/../sysdeps/gnu/errlist.c:797 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:115 +msgid ".lib section in a.out corrupted" +msgstr "La secció .lib de l'a.out és corrupta" + +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 +#, c-format +msgid "; low version = %lu, high version = %lu" +msgstr "; versió menor = %lu, versió major = %lu" + +#: sunrpc/clnt_perr.c:125 +msgid "; why = " +msgstr "; causa = " + +#: locale/programs/charmap.c:1004 +#, c-format +msgid "<%s> and <%s> are illegal names for range" +msgstr "«%s» i «%s» no són noms de rang permesos" + +#: locale/programs/repertoire.c:448 +#, c-format +msgid "<%s> and <%s> are invalid names for range" +msgstr "«%s» i «%s» no són noms de rang vàlids" + +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 +#, c-format +msgid " character must not be in class `%s'" +msgstr "el caràcter no ha de ser en la classe «%s»" + +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 +#, c-format +msgid " character not in class `%s'" +msgstr "el caràcter no és en la classe «%s»" + +#. TRANS The experienced user will know what is wrong. +#. TRANS @c This error code is a joke. Its perror text is part of the joke. +#. TRANS @c Don't change it. +#: stdio-common/../sysdeps/gnu/errlist.c:622 +msgid "?" +msgstr "?" + +#: sysdeps/generic/siglist.h:34 +msgid "Aborted" +msgstr "Avortat" + +#: nis/nis_print.c:324 +msgid "Access Rights : " +msgstr "Drets d'accés : " + +#: stdio-common/../sysdeps/gnu/errlist.c:793 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:114 +msgid "Accessing a corrupted shared library" +msgstr "Accés una biblioteca compartida corrupta" + +#. TRANS The requested socket address is already in use. @xref{Socket Addresses}. +#: stdio-common/../sysdeps/gnu/errlist.c:367 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:155 +msgid "Address already in use" +msgstr "L'adreça ja és en ús" + +#: posix/../sysdeps/posix/gai_strerror.c:31 +msgid "Address family for hostname not supported" +msgstr "La família d'adreces del nom d'estació no és suportada" + +#. TRANS The address family specified for a socket is not supported; it is +#. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}. +#: stdio-common/../sysdeps/gnu/errlist.c:362 +msgid "Address family not supported by protocol" +msgstr "El protocol no suporta aquesta família d'adreces" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:154 +msgid "Address family not supported by protocol family" +msgstr "La família de protocols no suporta aquesta família d'adreces" + +# ivb (2001/11/08) +# ivb Segons la _meravellosa_ pàgina de manual intro(2) de Solaris2 +# ivb es pot entendre «advertise» com el fet d'exportar recurs pel +# ivb seu ús en un sistema de fitxers remot. Gràcies als amics del +# ivb de.po!! +#: stdio-common/../sysdeps/gnu/errlist.c:761 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:98 +msgid "Advertise error" +msgstr "Error d'exportació" + +#: stdio-common/../sysdeps/unix/siglist.c:40 sysdeps/generic/siglist.h:40 +msgid "Alarm clock" +msgstr "Temporitzador" + +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "S'han completat totes les peticions" + +#: malloc/memusagestat.c:57 +msgid "Also draw graph for total memory consumption" +msgstr "També mostra un gràfic del consum total de memòria" + +# ivb (2001/11/07) +# ivb Pareix que un node-a «anode» és semblant a un node-i «inode» en +# ivb determinats sistemes de fitxers, i.e. l'amigados en *BSD (adosfs). +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:83 +msgid "Anode table overflow" +msgstr "Desbordament de la taula de nodes-a" + +#: intl/tst-gettext2.c:38 +msgid "Another string for testing." +msgstr "Altra cadena de prova." + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:37 +msgid "Arg list too long" +msgstr "La llista d'arguments és massa llarga" + +#. TRANS Argument list too long; used when the arguments passed to a new program +#. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a +#. TRANS File}) occupy too much memory space. This condition never arises in the +#. TRANS GNU system. +#: stdio-common/../sysdeps/gnu/errlist.c:70 +msgid "Argument list too long" +msgstr "La llista d'arguments és massa llarga" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:63 +msgid "Argument out of domain" +msgstr "L'argument és fora del domini" + +#: nis/nis_error.c:66 +msgid "Attempt to remove a non-empty table" +msgstr "S'ha intentat eliminar una taula no-buida" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:116 +msgid "Attempting to link in more shared libraries than system limit" +msgstr "S'ha intentat enllaçar més biblioteques compartides que les permeses pel sistema" + +#: stdio-common/../sysdeps/gnu/errlist.c:801 +msgid "Attempting to link in too many shared libraries" +msgstr "S'ha intentat enllaçar massa biblioteques compartides" + +#: sunrpc/clnt_perr.c:338 +msgid "Authentication OK" +msgstr "L'autenticació és vàlida" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:562 +msgid "Authentication error" +msgstr "Error d'autenticació" + +# ivb (2001/11/01) +# ivb D'acord amb «nis/rpcsvc/nis_object.x». +#: nis/nis_print.c:109 +msgid "BOGUS OBJECT\n" +msgstr "OBJECTE NO-INICIALITZAT\n" + +#. TRANS Bad address; an invalid pointer was detected. +#. TRANS In the GNU system, this error never happens; you get a signal instead. +#: stdio-common/../sysdeps/gnu/errlist.c:115 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:44 +msgid "Bad address" +msgstr "L'adreça no és vàlida" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:80 +msgid "Bad exchange descriptor" +msgstr "El descriptor de l'intercanvi no és vàlid" + +#. TRANS Bad file descriptor; for example, I/O on a descriptor that has been +#. TRANS closed or reading from a descriptor open only for writing (or vice +#. TRANS versa). +#: stdio-common/../sysdeps/gnu/errlist.c:83 +msgid "Bad file descriptor" +msgstr "El descriptor de fitxer no és vàlid" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:39 +msgid "Bad file number" +msgstr "El número de fitxer no és vàlid" + +#: stdio-common/../sysdeps/gnu/errlist.c:749 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:87 +msgid "Bad font file format" +msgstr "El fitxer de font no té un format vàlid" + +#: stdio-common/../sysdeps/gnu/errlist.c:641 +msgid "Bad message" +msgstr "El missatge no és vàlid" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:84 +msgid "Bad request code" +msgstr "El codi de petició no és vàlid" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:81 +msgid "Bad request descriptor" +msgstr "El descriptor de petició no és vàlid" + +#: stdio-common/../sysdeps/unix/siglist.c:38 sysdeps/generic/siglist.h:63 +msgid "Bad system call" +msgstr "La crida al sistema no és vàlida" + +#: posix/../sysdeps/posix/gai_strerror.c:33 +msgid "Bad value for ai_flags" +msgstr "El valor d'«ai_flags» no és vàlid" + +#: locale/programs/localedef.c:104 +msgid "Be strictly POSIX conform" +msgstr "S'ajusta estrictament a POSIX" + +#: nis/nis_print.c:305 +msgid "Binary data\n" +msgstr "Dades binàries\n" + +#. TRANS A file that isn't a block special file was given in a situation that +#. TRANS requires one. For example, trying to mount an ordinary file as a file +#. TRANS system in Unix gives this error. +#: stdio-common/../sysdeps/gnu/errlist.c:122 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:45 +msgid "Block device required" +msgstr "Cal un dispositiu de blocs" + +# ivb (2000/10/28) +# ivb Això és que fa una difusió pura i dura enviant paquets a cada +# ivb destinació i fa __poll() per veure si algú ha respost. Si __poll +# ivb falla, mostra aquest missatge. +#: sunrpc/pmap_rmt.c:348 +msgid "Broadcast poll problem" +msgstr "Problema amb el sondeig de la difusió" + +#. TRANS Broken pipe; there is no process reading from the other end of a pipe. +#. TRANS Every library function that returns this error code also generates a +#. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled +#. TRANS or blocked. Thus, your program will never actually see @code{EPIPE} +#. TRANS unless it has handled or blocked @code{SIGPIPE}. +#: stdio-common/../sysdeps/gnu/errlist.c:235 +#: stdio-common/../sysdeps/unix/siglist.c:39 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:62 +#: sysdeps/generic/siglist.h:39 +msgid "Broken pipe" +msgstr "La canonada s'ha trencat" + +#: stdio-common/../sysdeps/unix/siglist.c:36 sysdeps/generic/siglist.h:37 +msgid "Bus error" +msgstr "Error de bus" + +#: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 +msgid "CPU time limit exceeded" +msgstr "S'ha excedit el temps límit de CPU" + +#: nis/nis_error.c:33 +msgid "Cache expired" +msgstr "La memòria cau ha expirat" + +#: stdio-common/../sysdeps/gnu/errlist.c:789 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:113 +msgid "Can not access a needed shared library" +msgstr "No s'ha pogut accedir a una biblioteca compartida necessària" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:117 +msgid "Can not exec a shared library directly" +msgstr "No es pot executar directament una biblioteca compartida" + +#: nis/ypclnt.c:794 +msgid "Can't bind to server which serves this domain" +msgstr "No s'ha pogut enllaçar amb el servidor d'aquest domini" + +#: elf/ldconfig.c:1008 +msgid "Can't chdir to /" +msgstr "No s'ha pogut canviar al directori /" + +#: nis/ypclnt.c:806 +msgid "Can't communicate with portmapper" +msgstr "No s'ha pogut comunicar amb el mapador de ports" + +#: nis/ypclnt.c:808 +msgid "Can't communicate with ypbind" +msgstr "No s'ha pogut comunicar amb «ypbind»" + +#: nis/ypclnt.c:810 +msgid "Can't communicate with ypserv" +msgstr "No s'ha pogut comunicar amb «ypserv»" + +#: elf/cache.c:394 +#, c-format +msgid "Can't create temporary cache file %s" +msgstr "No s'ha pogut crear el fitxer temporal de memòria cau «%s»" + +#: elf/ldconfig.c:512 +#, c-format +msgid "Can't find %s" +msgstr "No s'ha pogut trobar «%s»" + +#: elf/ldconfig.c:449 +#, c-format +msgid "Can't link %s to %s" +msgstr "No s'ha pogut crear un enllaç des de «%s» fins «%s»" + +#: elf/ldconfig.c:528 +#, c-format +msgid "Can't lstat %s" +msgstr "Ha fallat lstat() sobre «%s»" + +#: elf/cache.c:131 elf/ldconfig.c:1029 +#, c-format +msgid "Can't open cache file %s\n" +msgstr "No s'ha pogut obrir el fitxer «%s» de memòria cau\n" + +#: elf/ldconfig.c:1050 +#, c-format +msgid "Can't open cache file directory %s\n" +msgstr "No s'ha pogut obrir el directori «%s» de fitxers de memòria cau\n" + +#: elf/ldconfig.c:924 +#, c-format +msgid "Can't open configuration file %s" +msgstr "No s'ha pogut obrir el fitxer «%s» de configuració" + +#: elf/ldconfig.c:634 +#, c-format +msgid "Can't open directory %s" +msgstr "No s'ha pogut obrir el directori «%s»" + +#: elf/cache.c:387 +#, c-format +msgid "Can't remove old temporary cache file %s" +msgstr "No s'ha pogut eliminar el fitxer antic «%s» de memòria cau temporal" + +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "Ha fallat stat() sobre «%s»" + +#: elf/ldconfig.c:414 +#, c-format +msgid "Can't stat %s\n" +msgstr "Ha fallat stat() sobre «%s»\n" + +#: elf/ldconfig.c:443 +#, c-format +msgid "Can't unlink %s" +msgstr "No s'ha pogut desenllaçar «%s»" + +#. TRANS No memory available. The system cannot allocate more virtual memory +#. TRANS because its capacity is full. +#: stdio-common/../sysdeps/gnu/errlist.c:104 +msgid "Cannot allocate memory" +msgstr "No s'ha pogut reservar memòria" + +#. TRANS The requested socket address is not available; for example, you tried +#. TRANS to give a socket a name that doesn't match the local host name. +#. TRANS @xref{Socket Addresses}. +#: stdio-common/../sysdeps/gnu/errlist.c:374 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:156 +msgid "Cannot assign requested address" +msgstr "No s'ha pogut assignar l'adreça sol·licitada" + +#: sunrpc/pmap_rmt.c:265 +msgid "Cannot create socket for broadcast rpc" +msgstr "No s'ha pogut crear el connector per la crida rpc de difusió" + +#: stdio-common/../sysdeps/gnu/errlist.c:805 +msgid "Cannot exec a shared library directly" +msgstr "No es pot executar directament una biblioteca compartida" + +#: elf/readlib.c:99 +#, c-format +msgid "Cannot fstat file %s.\n" +msgstr "Ha fallat fstat() sobre el fitxer «%s».\n" + +#: sunrpc/rpc_main.c:1417 +msgid "Cannot have more than one file generation flag!\n" +msgstr "No es pot tenir més d'un senyalador de generació de fitxers!\n" + +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "Ha fallat lstat() sobre «%s»" + +#: elf/readlib.c:118 +#, c-format +msgid "Cannot mmap file %s.\n" +msgstr "Ha fallat mmap() sobre el fitxer «%s».\n" + +#: sunrpc/pmap_rmt.c:361 +msgid "Cannot receive reply to broadcast" +msgstr "No s'ha pogut rebre una resposta a la difusió" + +#: sunrpc/pmap_clnt.c:136 +msgid "Cannot register service" +msgstr "No s'ha pogut donar d'alta el servei" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:173 +msgid "Cannot send after socket shutdown" +msgstr "No es pot enviar després de tancar el connector" + +#. TRANS The socket has already been shut down. +#: stdio-common/../sysdeps/gnu/errlist.c:435 +msgid "Cannot send after transport endpoint shutdown" +msgstr "No es pot enviar després de tancar l'extrem de transport" + +#: sunrpc/pmap_rmt.c:323 +msgid "Cannot send broadcast packet" +msgstr "No s'ha pogut enviar el paquet de difusió" + +#: sunrpc/pmap_rmt.c:272 +msgid "Cannot set socket option SO_BROADCAST" +msgstr "No s'ha pogut establir l'opció SO_BROADCAST pel connector" + +#: sunrpc/rpc_main.c:1195 +msgid "Cannot specify more than one input file!\n" +msgstr "No es pot especificar més d'un fitxer d'entrada!\n" + +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "Ha fallat stat() sobre «%s»" + +#: sunrpc/rpc_main.c:1374 +msgid "Cannot use netid flag with inetd flag!\n" +msgstr "No es pot usar l'opció idxarxa (-n) amb l'opció inetd (-I)!\n" + +#: sunrpc/rpc_main.c:1386 +msgid "Cannot use netid flag without TIRPC!\n" +msgstr "No es pot usar l'opció idxarxa (-n) sense TIRPC!\n" + +#: sunrpc/rpc_main.c:1393 +msgid "Cannot use table flags with newstyle!\n" +msgstr "No es pot usar opcions de taula amb l'estil nou (-N)!\n" + +#: elf/ldconfig.c:126 +msgid "Change to and use ROOT as root directory" +msgstr "Canvia a i usa ARREL com a directori arrel" + +#: elf/cache.c:426 +#, c-format +msgid "Changing access rights of %s to %#o failed" +msgstr "No s'ha pogut canviar els drets d'accés de «%s» a %#o" + +#: stdio-common/../sysdeps/gnu/errlist.c:689 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 +msgid "Channel number out of range" +msgstr "El número de canal és fora de rang" + +# ivb (2000/10/28) +# ivb Açò és correcte segons nis/rpcsvc/nis_object.x, és «caràcter +# ivb separador» i no «separador de caràcters». +#: nis/nis_print.c:268 +#, c-format +msgid "Character Separator : %c\n" +msgstr "Caràcter separador : %c\n" + +#: stdio-common/../sysdeps/unix/siglist.c:46 sysdeps/generic/siglist.h:46 +msgid "Child exited" +msgstr "Un fill ha eixit" + +#: sunrpc/clnt_perr.c:357 +msgid "Client credential too weak" +msgstr "La credencial del client és massa fluixa" + +#: nis/nis_print.c:270 +msgid "Columns :\n" +msgstr "Columnes :\n" + +#: stdio-common/../sysdeps/gnu/errlist.c:769 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:100 +msgid "Communication error on send" +msgstr "Error de comunicacions en l'enviament" + +# ivb (2001/10/28) +# ivb Pose el punt final pq és la descripció curta de l'ordre. +#: locale/programs/localedef.c:112 +msgid "Compile locale specification" +msgstr "Compil·la una especificació de locale." + +# ivb (2001/11/05) +# ivb Ací qualsevol posa el que li dóna la gana, sembla! +#. TRANS Go home and have a glass of warm, dairy-fresh milk. +#: stdio-common/../sysdeps/gnu/errlist.c:632 +msgid "Computer bought the farm" +msgstr "El tio Pep se'n va a Murooo, tio Peeep" + +#: elf/ldconfig.c:136 +msgid "Configure Dynamic Linker Run Time Bindings." +msgstr "Configura els vincles en temps d'execució de l'enllaçador dinàmic." + +#. TRANS A remote host refused to allow the network connection (typically because +#. TRANS it is not running the requested service). +#: stdio-common/../sysdeps/gnu/errlist.c:452 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:176 +msgid "Connection refused" +msgstr "S'ha refusat la connexió" + +#. TRANS A network connection was closed for reasons outside the control of the +#. TRANS local host, such as by the remote machine rebooting or an unrecoverable +#. TRANS protocol violation. +#: stdio-common/../sysdeps/gnu/errlist.c:402 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:161 +msgid "Connection reset by peer" +msgstr "La màquina remota ha reiniciat la connexió" + +#. TRANS A socket operation with a specified timeout received no response during +#. TRANS the timeout period. +#: stdio-common/../sysdeps/gnu/errlist.c:446 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:175 +msgid "Connection timed out" +msgstr "La connexió ha expirat" + +#: stdio-common/../sysdeps/unix/siglist.c:45 sysdeps/generic/siglist.h:45 +msgid "Continued" +msgstr "Continuant" + +#: iconv/iconv_prog.c:73 +msgid "Convert encoding of given files from one encoding to another." +msgstr "Converteix els fitxers especificats d'una codificació a una altra." + +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 +#: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 +#: nss/getent.c:63 posix/getconf.c:904 +#, c-format +msgid "" +"Copyright (C) %s Free Software Foundation, Inc.\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +msgstr "" +"Copyright (C) %s Free Software Foundation, Inc.\n" +"Açò és programari lliure; vegeu el codi font per les condicions de còpia.\n" +"NO hi ha CAP GARANTIA; ni tan sols de COMERCIABILITAT o ADEQUACIÓ PER UN\n" +"PROPÒSIT DETERMINAT.\n" + +#: nscd/nscd_conf.c:166 +#, c-format +msgid "Could not create log file \"%s\"" +msgstr "No s'ha pogut crear el fitxer «%s» de registre" + +#: catgets/gencat.c:112 +msgid "Create C header file NAME containing symbol definitions" +msgstr "Crea un fitxer capçalera C (NOM) que conté les definicions de símbols" + +# ivb (2001/10/28) +# ivb Ostres, açò pareix una frase del M-x spook! +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Crea un fitxer de configuració de càrrega ràpida pel mòdul iconv." + +#: locale/programs/localedef.c:102 +msgid "Create old-style tables" +msgstr "Crea taules de l'estil antic" + +#: locale/programs/localedef.c:101 +msgid "Create output even if warning messages were issued" +msgstr "Crea fitxers d'eixida encara que s'hagen emés missatges d'avís" + +#: nis/nis_print.c:329 +#, c-format +msgid "Creation Time : %s" +msgstr "Data de creació : %s" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:48 +msgid "Cross-device link" +msgstr "No es pot crear un enllaç entre dispositius" + +#: malloc/memusagestat.c:67 +msgid "DATAFILE [OUTFILE]" +msgstr "FITXERDADES [FITXEREIXIDA]" + +#: nis/nss_nisplus/nisplus-publickey.c:96 +#: nis/nss_nisplus/nisplus-publickey.c:172 +#, c-format +msgid "DES entry for netname %s not unique\n" +msgstr "l'entrada DES pel nom de xarxa «%s» no és única\n" + +#: nis/nis_print.c:115 +msgid "DIRECTORY\n" +msgstr "DIRECTORI\n" + +# ivb (2001/11/05) +# ivb DST = Dynamic String Token (component cadena dinàmica) +#: elf/dl-deps.c:101 elf/dl-open.c:188 +msgid "DST not allowed in SUID/SGID programs" +msgstr "no es permeten components cadena dinàmica (DST) en programes SUID/SGID" + +#: elf/dl-error.c:71 +msgid "DYNAMIC LINKER BUG!!!" +msgstr "ERROR EN L'ENLLAÇADOR DINÀMIC!!!" + +#: nis/nis_error.c:52 +msgid "Database for table does not exist" +msgstr "La base de dades de la taula no existeix" + +#: nis/ypclnt.c:820 +msgid "Database is busy" +msgstr "La base de dades es troba ocupada" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:75 +msgid "Deadlock situation detected/avoided" +msgstr "S'ha detectat i evitat un interbloqueig" + +#: nis/nis_print.c:229 +msgid "Default Access rights :\n" +msgstr "Drets d'accés per defecte :\n" + +#. TRANS No default destination address was set for the socket. You get this +#. TRANS error when you try to transmit data over a connectionless socket, +#. TRANS without first specifying a destination for the data with @code{connect}. +#: stdio-common/../sysdeps/gnu/errlist.c:430 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:126 +msgid "Destination address required" +msgstr "Cal una adreça de destinació" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:46 +msgid "Device busy" +msgstr "El dispositiu es troba ocupat" + +#: stdio-common/../sysdeps/gnu/errlist.c:669 +msgid "Device not a stream" +msgstr "El dispositiu no és un flux" + +#. TRANS Resource busy; a system resource that can't be shared is already in use. +#. TRANS For example, if you try to delete a file that is the root of a currently +#. TRANS mounted filesystem, you get this error. +#: stdio-common/../sysdeps/gnu/errlist.c:129 +msgid "Device or resource busy" +msgstr "El dispositiu o recurs es troba ocupat" + +# ivb (2001/10/28) +# ivb Xicoteta diferència-Home de l'infern ;) +#: nis/nis_print.c:183 +#, c-format +msgid "Diffie-Hellmann (%d bits)\n" +msgstr "Diffie-Hellmann (%d bits)\n" + +#: nis/nis_print.c:321 +#, c-format +msgid "Directory : %s\n" +msgstr "Directori : %s\n" + +#. TRANS Directory not empty, where an empty directory was expected. Typically, +#. TRANS this error occurs when you are trying to delete a directory. +#: stdio-common/../sysdeps/gnu/errlist.c:481 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:123 +msgid "Directory not empty" +msgstr "El directori no és buit" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:79 +msgid "Disc quota exceeded" +msgstr "S'ha excedit la quota de disc" + +#. TRANS The user's disk quota was exceeded. +#: stdio-common/../sysdeps/gnu/errlist.c:499 +msgid "Disk quota exceeded" +msgstr "S'ha excedit la quota de disc" + +#: nscd/nscd.c:86 +msgid "Do not fork and display messages on the current tty" +msgstr "No fa fork() i mostra els missatges en el terminal actual" + +#: catgets/gencat.c:114 +msgid "Do not use existing catalog, force new output file" +msgstr "No usa el catàleg existent, i crea un nou fitxer d'eixida" + +#: nis/ypclnt.c:866 +msgid "Domain not bound" +msgstr "El domini no és vinculat" + +#: elf/ldconfig.c:124 +msgid "Don't build cache" +msgstr "No construeix la memòria cau" + +#: elf/ldconfig.c:125 +msgid "Don't generate links" +msgstr "No genera enllaços" + +# ivb (2001/11/06) +# ivb És possible que en comptes de +# ivb PC = Program Counter (comptador de programa) +# ivb es referira a +# ivb PC = Procedure Call (crides a procediment) +# ivb tot i que el codi del programa cada volta que fa referència a «pc» +# ivb o «PC» parla del «lowpc» i del «highpc», sempre en referència al +# ivb segment de text (codi) del programa. +#: debug/pcprofiledump.c:56 +msgid "Dump information generated by PC profiling." +msgstr "Bolca la informació generada en perfilar el comptador de programa." + +#: elf/dl-load.c:1293 +msgid "ELF file ABI version invalid" +msgstr "La versió de l'ABI del fitxer ELF no és vàlida" + +# ivb (2001/11(06) +# ivb ABI = Application Binary Interface (interfície binària d'aplicació) +#: elf/dl-load.c:1290 +msgid "ELF file OS ABI invalid" +msgstr "L'ABI de sistema operatiu del fitxer ELF no és vàlida" + +#: elf/dl-load.c:1299 +msgid "ELF file version does not match current one" +msgstr "La versió del fitxer ELF no concorda amb l'actual" + +#: elf/dl-load.c:1286 +msgid "ELF file version ident does not match current one" +msgstr "La identificació de la versió del fitxer ELF no concorda amb l'actual" + +# ivb (2001/11/01) +# ivb La traducció completa de «phentsize» vindria a ser: tamany d'entrada +# ivb de taula de la capçalera de programa. +#: elf/dl-load.c:1305 +msgid "ELF file's phentsize not the expected size" +msgstr "El valor de «phentsize» del fitxer ELF no és l'esperat" + +#: elf/dl-load.c:884 +msgid "ELF load command address/offset not properly aligned" +msgstr "L'adreça/desplaçament de l'ordre ELF de càrrega no està correctament alineada" + +#: elf/dl-load.c:881 +msgid "ELF load command alignment not page-aligned" +msgstr "L'alineament de l'ordre ELF de càrrega no està alineada amb la pàgina" + +#: stdio-common/../sysdeps/unix/siglist.c:33 sysdeps/generic/siglist.h:60 +msgid "EMT trap" +msgstr "Trampa EMT" + +#: nis/nis_print.c:124 +msgid "ENTRY\n" +msgstr "ENTRADA\n" + +#: nis/nis_print.c:303 +msgid "Encrypted data\n" +msgstr "Dades xifrades\n" + +#: nis/nis_error.c:53 +msgid "Entry/table type mismatch" +msgstr "Els tipus d'entrada i taula no concorden" + +#: nss/getent.c:127 nss/getent.c:292 +#, c-format +msgid "Enumeration not supported on %s\n" +msgstr "No es suporta l'enumeració sobre «%s»\n" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:30 +msgid "Error 0" +msgstr "Error 0" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:130 +msgid "Error 100" +msgstr "Error 100" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:131 +msgid "Error 101" +msgstr "Error 101" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:132 +msgid "Error 102" +msgstr "Error 102" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:133 +msgid "Error 103" +msgstr "Error 103" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:134 +msgid "Error 104" +msgstr "Error 104" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:135 +msgid "Error 105" +msgstr "Error 105" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:136 +msgid "Error 106" +msgstr "Error 106" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:137 +msgid "Error 107" +msgstr "Error 107" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:138 +msgid "Error 108" +msgstr "Error 108" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:139 +msgid "Error 109" +msgstr "Error 109" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:140 +msgid "Error 110" +msgstr "Error 110" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:141 +msgid "Error 111" +msgstr "Error 111" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:142 +msgid "Error 112" +msgstr "Error 112" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:143 +msgid "Error 113" +msgstr "Error 113" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:144 +msgid "Error 114" +msgstr "Error 114" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:145 +msgid "Error 115" +msgstr "Error 115" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:146 +msgid "Error 116" +msgstr "Error 116" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:147 +msgid "Error 117" +msgstr "Error 117" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:148 +msgid "Error 118" +msgstr "Error 118" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:149 +msgid "Error 119" +msgstr "Error 119" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:166 +msgid "Error 136" +msgstr "Error 136" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:172 +msgid "Error 142" +msgstr "Error 142" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:88 +msgid "Error 58" +msgstr "Error 58" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:89 +msgid "Error 59" +msgstr "Error 59" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:102 +msgid "Error 72" +msgstr "Error 72" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:103 +msgid "Error 73" +msgstr "Error 73" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:105 +msgid "Error 75" +msgstr "Error 75" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:106 +msgid "Error 76" +msgstr "Error 76" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:121 +msgid "Error 91" +msgstr "Error 91" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:122 +msgid "Error 92" +msgstr "Error 92" + +#: nis/nis_error.c:57 +msgid "Error in RPC subsystem" +msgstr "Error en el subsistema RPC" + +#: nis/nis_error.c:67 +msgid "Error in accessing NIS+ cold start file. Is NIS+ installed?" +msgstr "Error en accedir al fitxer d'arrencada en fred de NIS+. Heu instal·lat NIS+?" + +# ivb (2001/10/28) +# ivb Codi -> sembla que aquesta és la traducció correcta, ja que tracta +# ivb d'identificar l'error dins un vector de sistemes d'errors del mach. (?) +#: string/../sysdeps/mach/_strerror.c:58 +#: sysdeps/mach/hurd/mips/dl-machine.c:68 +msgid "Error in unknown error system: " +msgstr "Error en un sistema d'errors desconegut: " + +# ivb (2001/11/07) +# ivb Si no he entés malament, «proc» és el programa «ypxfr» -> procés +#: nis/nis_error.c:60 +msgid "Error while talking to callback proc" +msgstr "Error en parlar amb el procés de crida de retorn" + +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Error en escriure en l'eixida estàndard" + +#: inet/ruserpass.c:184 +msgid "Error: .netrc file is readable by others." +msgstr "Error: el fitxer .netrc és llegible per altres que no en són el propietari." + +#: stdio-common/../sysdeps/gnu/errlist.c:729 +msgid "Exchange full" +msgstr "L'intercanvi és ple" + +#. TRANS Invalid executable file format. This condition is detected by the +#. TRANS @code{exec} functions; see @ref{Executing a File}. +#: stdio-common/../sysdeps/gnu/errlist.c:76 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:38 +msgid "Exec format error" +msgstr "L'executable té un format erroni" + +#: locale/programs/localedef.c:190 +msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'" +msgstr "FATAL: el sistema defineix «_POSIX2_LOCALEDEF»" + +#: locale/programs/localedef.c:97 +msgid "FILE contains mapping from symbolic names to UCS4 values" +msgstr "El FITXER conté un mapa de noms simbòlics a valors UCS4" + +#: sunrpc/clnt_perr.c:365 +msgid "Failed (unspecified error)" +msgstr "Ha fallat (no s'especifica l'error)" + +#: nscd/nscd.c:400 +#, c-format +msgid "Failed to look up user '%s' to run server as" +msgstr "Ha fallat la recerca de l'usuari «%s», com a qui executar el servidor" + +#: elf/readlib.c:109 +#, c-format +msgid "File %s is too small, not checked." +msgstr "El fitxer «%s» és massa menut, no es comprova." + +#: stdio-common/../sysdeps/gnu/errlist.c:781 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:111 +msgid "File descriptor in bad state" +msgstr "El descriptor de fitxer és fet malbé" + +#. TRANS File exists; an existing file was specified in a context where it only +#. TRANS makes sense to specify a new file. +#: stdio-common/../sysdeps/gnu/errlist.c:135 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:47 +msgid "File exists" +msgstr "El fitxer ja existeix" + +#: elf/cache.c:147 elf/cache.c:157 +msgid "File is not a cache file.\n" +msgstr "El fitxer no és un fitxer de memòria cau\n" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:86 +msgid "File locking deadlock" +msgstr "Interbloqueig pel blocatge d'un fitxer" + +#: stdio-common/../sysdeps/gnu/errlist.c:745 +msgid "File locking deadlock error" +msgstr "Interbloqueig pel blocatge d'un fitxer" + +#. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for +#. TRANS Files}) or host name too long (in @code{gethostname} or +#. TRANS @code{sethostname}; @pxref{Host Identification}). +#: stdio-common/../sysdeps/gnu/errlist.c:465 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:108 +msgid "File name too long" +msgstr "El nom de fitxer és massa llarg" + +#: stdio-common/../sysdeps/unix/siglist.c:51 sysdeps/generic/siglist.h:51 +msgid "File size limit exceeded" +msgstr "S'ha excedit el tamany màxim de fitxer" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:53 +msgid "File table overflow" +msgstr "Desbordament de la taula de fitxers" + +#. TRANS File too big; the size of a file would be larger than allowed by the system. +#: stdio-common/../sysdeps/gnu/errlist.c:203 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:57 +msgid "File too large" +msgstr "El fitxer és massa gran" + +#: intl/tst-gettext2.c:37 +msgid "First string for testing." +msgstr "Primera cadena de prova." + +#: nis/nis_error.c:38 +msgid "First/next chain broken" +msgstr "S'ha trencat la cadena de primer/següent" + +#: stdio-common/../sysdeps/unix/siglist.c:34 sysdeps/generic/siglist.h:35 +msgid "Floating point exception" +msgstr "Excepció de coma flotant" + +#: elf/ldconfig.c:131 +msgid "Format to use: new, old or compat (default)" +msgstr "Format a usar: «new» (nou), «old» (antic) o «compat» (compatible, per defecte)" + +#: nis/nis_error.c:68 +msgid "Full resync required for directory" +msgstr "Cal resincronitzar completament el directori" + +#. TRANS Function not implemented. This indicates that the function called is +#. TRANS not implemented at all, either in the C library itself or in the +#. TRANS operating system. When you get this error, you can be sure that this +#. TRANS particular function will always fail with @code{ENOSYS} unless you +#. TRANS install a new version of the C library or the operating system. +#: stdio-common/../sysdeps/gnu/errlist.c:576 +msgid "Function not implemented" +msgstr "La funció no és implementada" + +#: nis/nis_print.c:118 +msgid "GROUP\n" +msgstr "GRUP\n" + +#: argp/argp-help.c:230 +#, c-format +msgid "Garbage in ARGP_HELP_FMT: %s" +msgstr "Fem en ARGP_HELP_FMT: %s" + +#: malloc/memusagestat.c:64 +msgid "Generate graphic from memory profiling data" +msgstr "Genera un gràfic amb les dades de perfilat de memòria" + +#: catgets/gencat.c:120 +msgid "" +"Generate message catalog.\\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n" +"is -, output is written to standard output.\n" +msgstr "" +"Genera un catàleg de missatges.\\vSi FITXER-ENTRADA és -, l'entrada es llig de l'entrada estàndard.\n" +"Si FITXER-EIXIDA és -, l'eixida s'escriu en l'eixida estàndard.\n" + +#: malloc/memusagestat.c:55 +msgid "Generate output linear to time (default is linear to number of function calls)" +msgstr "Genera una eixida lineal respecte el temps (per defecte és lineal respecte el nombre de crides a funció)" + +#: elf/ldconfig.c:123 +msgid "Generate verbose messages" +msgstr "Genera missatges detallats" + +#: nis/nis_error.c:37 +msgid "Generic system error" +msgstr "Error genèric del sistema" + +#: locale/programs/locale.c:86 +msgid "Get locale-specific information." +msgstr "Obté la informació específica d'un locale." + +#: argp/argp-parse.c:94 +msgid "Give a short usage message" +msgstr "Mostra un missatge breu amb la forma d'ús" + +#: argp/argp-parse.c:93 +msgid "Give this help list" +msgstr "Mostra aquest llistat d'ajuda" + +#. TRANS This error code has no purpose. +#: stdio-common/../sysdeps/gnu/errlist.c:637 +msgid "Gratuitous error" +msgstr "Error injustificat" + +#: nis/nis_print.c:323 +#, c-format +msgid "Group : %s\n" +msgstr "Grup : %s\n" + +#: nis/nis_print.c:252 +msgid "Group Flags :" +msgstr "Senyaladors del grup :" + +#: nis/nis_print_group_entry.c:115 +#, c-format +msgid "Group entry for \"%s.%s\" group:\n" +msgstr "Entrada de grup pel grup «%s.%s»:\n" + +#: argp/argp-parse.c:97 +msgid "Hang for SECS seconds (default 3600)" +msgstr "Esperar SEGONS segons (3600 per defecte)" + +#: stdio-common/../sysdeps/unix/siglist.c:27 sysdeps/generic/siglist.h:29 +msgid "Hangup" +msgstr "Penjat" + +#: nscd/grpcache.c:253 +#, c-format +msgid "Haven't found \"%d\" in group cache!" +msgstr "No s'ha trobat «%d» en la memòria cau de grups!" + +#: nscd/pwdcache.c:249 +#, c-format +msgid "Haven't found \"%d\" in password cache!" +msgstr "No s'ha trobat «%d» en la memòria cau d'usuaris!" + +#: nscd/grpcache.c:214 +#, c-format +msgid "Haven't found \"%s\" in group cache!" +msgstr "No s'ha trobat «%s» en la memòria cau de grups!" + +#: nscd/hstcache.c:299 nscd/hstcache.c:341 nscd/hstcache.c:386 +#: nscd/hstcache.c:430 +#, c-format +msgid "Haven't found \"%s\" in hosts cache!" +msgstr "No s'ha trobat «%s» en la memòria cau d'estacions!" + +#: nscd/pwdcache.c:210 +#, c-format +msgid "Haven't found \"%s\" in password cache!" +msgstr "No s'ha trobat «%s» en la memòria cau d'usuaris!" + +#. TRANS The remote host for a requested network connection is down. +#: stdio-common/../sysdeps/gnu/errlist.c:470 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:177 +msgid "Host is down" +msgstr "L'estació no està operativa" + +#: resolv/herror.c:69 +msgid "Host name lookup failure" +msgstr "La recerca del nom de l'estació ha fallat" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:35 +msgid "I/O error" +msgstr "Error d'E/S" + +# ivb (2000/10/28) +# ivb És clar, E/S significa «Entrada/Sortida», perquè «Entrada/Eixida» +# ivb queda ambigu (d'açò es diu discriminació objectiva %-P ). +#: stdio-common/../sysdeps/unix/siglist.c:49 sysdeps/generic/siglist.h:49 +msgid "I/O possible" +msgstr "L'operació d'E/S és possible" + +#: stdio-common/../sysdeps/unix/siglist.c:32 +msgid "IOT trap" +msgstr "Trampa IOT" + +#: stdio-common/../sysdeps/gnu/errlist.c:645 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 +msgid "Identifier removed" +msgstr "L'identificador ha estat eliminat" + +#: elf/ldconfig.c:535 +#, c-format +msgid "Ignored file %s since it is not a regular file." +msgstr "Es descarta el fitxer «%s» que no és un fitxer ordinari." + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:118 +msgid "Illegal byte sequence" +msgstr "La seqüència d'octets no és permesa" + +#: stdio-common/../sysdeps/unix/siglist.c:30 sysdeps/generic/siglist.h:32 +msgid "Illegal instruction" +msgstr "La instrucció no és permesa" + +#: nis/nis_error.c:62 +msgid "Illegal object type for operation" +msgstr "El tipus de l'objecte usat en l'operació no és permés" + +#. TRANS Invalid seek operation (such as on a pipe). +#: stdio-common/../sysdeps/gnu/errlist.c:214 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:59 +msgid "Illegal seek" +msgstr "No es pot moure el punter de fitxer" + +#. TRANS Inappropriate file type or format. The file was the wrong type for the +#. TRANS operation, or a data file had the wrong format. +#. TRANS +#. TRANS On some systems @code{chmod} returns this error if you try to set the +#. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}. +#: stdio-common/../sysdeps/gnu/errlist.c:557 +msgid "Inappropriate file type or format" +msgstr "El format o tipus de fitxer no és l'apropiat" + +#. TRANS Inappropriate I/O control operation, such as trying to set terminal +#. TRANS modes on an ordinary file. +#: stdio-common/../sysdeps/gnu/errlist.c:189 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:55 +msgid "Inappropriate ioctl for device" +msgstr "L'operació ioctl no és adequada pel dispositiu" + +#. TRANS In the GNU system, servers supporting the @code{term} protocol return +#. TRANS this error for certain operations when the caller is not in the +#. TRANS foreground process group of the terminal. Users do not usually see this +#. TRANS error because functions such as @code{read} and @code{write} translate +#. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control}, +#. TRANS for information on process groups and these signals. +#: stdio-common/../sysdeps/gnu/errlist.c:608 +msgid "Inappropriate operation for background process" +msgstr "L'operació no és adequada per un procés de fons" + +#: sysdeps/generic/siglist.h:69 +msgid "Information request" +msgstr "Petició d'informació" + +#: iconv/iconv_prog.c:62 +msgid "Information:" +msgstr "Informació:" + +#: locale/programs/localedef.c:92 +msgid "Input Files:" +msgstr "Fitxers d'entrada:" + +#: elf/ldconfig.c:754 elf/readlib.c:93 +#, c-format +msgid "Input file %s not found.\n" +msgstr "No s'ha trobat el fitxer d'entrada «%s».\n" + +#: iconv/iconv_prog.c:59 +msgid "Input/Output format specification:" +msgstr "Especificació de format de l'entrada/eixida:" + +#. TRANS Input/output error; usually used for physical read or write errors. +#: stdio-common/../sysdeps/gnu/errlist.c:53 +msgid "Input/output error" +msgstr "Error d'Entrada/Sortida" + +#: nis/ypclnt.c:800 +msgid "Internal NIS error" +msgstr "Error intern de NIS" + +#: nis/ypclnt.c:864 +msgid "Internal ypbind error" +msgstr "Error intern d'«ypbind»" + +#: stdio-common/../sysdeps/unix/siglist.c:28 sysdeps/generic/siglist.h:30 +msgid "Interrupt" +msgstr "Interrupció" + +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Interromput per un senyal" + +#. TRANS Interrupted function call; an asynchronous signal occurred and prevented +#. TRANS completion of the call. When this happens, you should try the call +#. TRANS again. +#. TRANS +#. TRANS You can choose to have functions resume after a signal that is handled, +#. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted +#. TRANS Primitives}. +#: stdio-common/../sysdeps/gnu/errlist.c:48 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:34 +msgid "Interrupted system call" +msgstr "La crida al sistema ha estat interrompuda" + +#: stdio-common/../sysdeps/gnu/errlist.c:685 +msgid "Interrupted system call should be restarted" +msgstr "Caldria reiniciar la crida al sistema interrompuda" + +#. TRANS Invalid argument. This is used to indicate various kinds of problems +#. TRANS with passing the wrong argument to a library function. +#: stdio-common/../sysdeps/gnu/errlist.c:165 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:52 +msgid "Invalid argument" +msgstr "L'argument passat no és vàlid" + +#: posix/regex.c:1380 +msgid "Invalid back reference" +msgstr "La referència cap enrere no és vàlida" + +#: posix/regex.c:1374 +msgid "Invalid character class name" +msgstr "El nom de la classe de caràcters no és vàlid" + +#: sunrpc/clnt_perr.c:341 +msgid "Invalid client credential" +msgstr "La credencial donada pel client no és vàlida" + +#: sunrpc/clnt_perr.c:349 +msgid "Invalid client verifier" +msgstr "El verificador del client no és vàlid" + +#: posix/regex.c:1371 +msgid "Invalid collation character" +msgstr "El caràcter d'ordenació no és vàlid" + +#: posix/regex.c:1392 +msgid "Invalid content of \\{\\}" +msgstr "El contingut de \\{\\} no és vàlid" + +#. TRANS An attempt to make an improper link across file systems was detected. +#. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but +#. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}). +#: stdio-common/../sysdeps/gnu/errlist.c:142 +msgid "Invalid cross-device link" +msgstr "No es pot crear un enllaç entre dispositius" + +#: stdio-common/../sysdeps/gnu/errlist.c:721 +msgid "Invalid exchange" +msgstr "L'intercanvi no és vàlid" + +#: nis/nis_error.c:45 +msgid "Invalid object for operation" +msgstr "L'objecte usat en l'operació no és vàlid" + +#. TRANS While decoding a multibyte character the function came along an invalid +#. TRANS or an incomplete sequence of bytes or the given wide character is invalid. +#: stdio-common/../sysdeps/gnu/errlist.c:598 +msgid "Invalid or incomplete multibyte or wide character" +msgstr "El caràcter estés o multioctet no és vàlid o complet" + +#: posix/regex.c:1401 +msgid "Invalid preceding regular expression" +msgstr "L'expressió regular precedent és incorrecta" + +#: posix/regex.c:1395 +msgid "Invalid range end" +msgstr "El final del rang no és vàlid" + +#: posix/regex.c:1368 +msgid "Invalid regular expression" +msgstr "L'expressió regular no és vàlida" + +#: stdio-common/../sysdeps/gnu/errlist.c:737 +msgid "Invalid request code" +msgstr "El codi de petició no és vàlid" + +#: stdio-common/../sysdeps/gnu/errlist.c:725 +msgid "Invalid request descriptor" +msgstr "El descriptor de petició no és vàlid" + +#: sunrpc/clnt_perr.c:361 +msgid "Invalid server verifier" +msgstr "El verificador del servidor no és vàlid" + +#: stdio-common/../sysdeps/gnu/errlist.c:741 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:85 +msgid "Invalid slot" +msgstr "La ranura no és vàlida" + +#: nscd/nscd.c:91 +msgid "Invalidate the specified cache" +msgstr "Invalida la memòria cau especificada" + +#. TRANS File is a directory; you cannot open a directory for writing, +#. TRANS or create or remove hard links to it. +#: stdio-common/../sysdeps/gnu/errlist.c:159 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:51 +msgid "Is a directory" +msgstr "És un directori" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:169 +msgid "Is a name file" +msgstr "El fitxer és d'un tipus amb nom" + +#: stdio-common/../sysdeps/gnu/errlist.c:825 +msgid "Is a named type file" +msgstr "El fitxer és d'un tipus amb nom" + +#: nis/nis_print.c:191 +msgid "Kerberos.\n" +msgstr "Kerberos.\n" + +#: stdio-common/../sysdeps/unix/siglist.c:35 sysdeps/generic/siglist.h:36 +msgid "Killed" +msgstr "Matat" + +#: nis/nis_print.c:127 +msgid "LINK\n" +msgstr "ENLLAÇ\n" + +#: nis/nis_local_names.c:126 +#, c-format +msgid "LOCAL entry for UID %d in directory %s not unique\n" +msgstr "L'entrada LOCAL de l'UID %d en el directori «%s» no és única\n" + +#: stdio-common/../sysdeps/gnu/errlist.c:717 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:74 +msgid "Level 2 halted" +msgstr "S'ha parat el nivell 2" + +#: stdio-common/../sysdeps/gnu/errlist.c:693 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:68 +msgid "Level 2 not synchronized" +msgstr "El nivell 2 no està sincronitzat" + +#: stdio-common/../sysdeps/gnu/errlist.c:697 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:69 +msgid "Level 3 halted" +msgstr "S'ha parat el nivell 3" + +#: stdio-common/../sysdeps/gnu/errlist.c:701 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:70 +msgid "Level 3 reset" +msgstr "S'ha reiniciat el nivell 3" + +#: stdio-common/../sysdeps/gnu/errlist.c:657 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:97 +msgid "Link has been severed" +msgstr "S'ha tallat l'enllaç" + +#: stdio-common/../sysdeps/gnu/errlist.c:705 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:71 +msgid "Link number out of range" +msgstr "El nombre d'enllaços és fora de rang" + +#: nis/nis_error.c:54 +msgid "Link points to illegal name" +msgstr "L'enllaç apunta a un nom no permés" + +#: nis/nis_print.c:286 +msgid "Linked Object Type : " +msgstr "Tipus de l'objecte enllaçat : " + +#: nis/nis_print.c:288 +#, c-format +msgid "Linked to : %s\n" +msgstr "Enllaçat amb : %s\n" + +#: nis/ypclnt.c:812 +msgid "Local domain name not set" +msgstr "No s'ha establert nom del domini local" + +#: nis/ypclnt.c:802 +msgid "Local resource allocation failure" +msgstr "No s'ha pogut assignar un recurs local" + +#: stdio-common/../sysdeps/gnu/errlist.c:753 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:94 +msgid "Machine is not on the network" +msgstr "La màquina no es troba en la xarxa" + +#: nis/nis_error.c:46 +msgid "Malformed name, or illegal name" +msgstr "El nom és malmés o no permés" + +#: argp/argp-help.c:1185 +msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." +msgstr "Els arguments obligatoris o opcionals per les opcions llargues també ho són per les opcions curtes corresponents." + +#: elf/ldconfig.c:130 +msgid "Manually link individual libraries." +msgstr "Per enllaçar les biblioteques manualment" + +#: nis/nis_print.c:172 +msgid "Master Server :\n" +msgstr "Servidor mestre :\n" + +#: nis/nis_error.c:76 +msgid "Master server busy, full dump rescheduled." +msgstr "El servidor mestre es troba ocupat, es replanifica el bolcat complet" + +#: posix/../sysdeps/posix/gai_strerror.c:36 +msgid "Memory allocation failure" +msgstr "No s'ha pogut reservar memòria" + +#: posix/regex.c:1398 +msgid "Memory exhausted" +msgstr "La memòria s'ha exhaurit" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:82 +msgid "Message tables full" +msgstr "Les taules de missatges són plenes" + +#. TRANS The size of a message sent on a socket was larger than the supported +#. TRANS maximum size. +#: stdio-common/../sysdeps/gnu/errlist.c:318 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:127 +msgid "Message too long" +msgstr "El missatge és massa llarg" + +#: nis/nis_error.c:58 +msgid "Missing or malformed attribute" +msgstr "L'atribut manca o és malmés" + +#: nis/nis_print.c:331 +#, c-format +msgid "Mod. Time : %s" +msgstr "Data modificació : %s" + +#: nis/nis_error.c:51 +msgid "Modification failed" +msgstr "La modificació ha fallat" + +#: nis/nis_error.c:64 +msgid "Modify operation failed" +msgstr "L'operació de modificació ha fallat" + +# ivb (2001/10/30) +# ivb Aquesta línia dóna pas a un conjunt d'opcions que modif. l'eixida. +#: locale/programs/locale.c:78 +msgid "Modify output format:" +msgstr "Modificadors del format de l'eixida:" + +#: stdio-common/../sysdeps/gnu/errlist.c:649 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:104 +msgid "Multihop attempted" +msgstr "S'ha intentat un salt múltiple" + +#: nscd/nscd_conf.c:182 +msgid "Must specify user name for server-user option" +msgstr "Cal especificar un nom d'usuari per l'opció «server-user»" + +#: catgets/gencat.c:111 catgets/gencat.c:115 locale/programs/localedef.c:115 +#: nscd/nscd.c:83 +msgid "NAME" +msgstr "NOM" + +#: locale/programs/locale.c:89 +msgid "" +"NAME\n" +"[-a|-m]" +msgstr "" +"NOM\n" +"[-a|-m]" + +#: nis/ypclnt.c:816 +msgid "NIS client/server version mismatch - can't supply service" +msgstr "Les versions de client i servidor NIS difereixen - no es pot donar servei" + +#: nis/ypclnt.c:814 +msgid "NIS map database is bad" +msgstr "La base de dades de mapes NIS és feta malbé" + +#: nis/nis_error.c:69 +msgid "NIS+ operation failed" +msgstr "L'operació NIS+ ha fallat" + +#: nis/nis_error.c:34 +msgid "NIS+ servers unreachable" +msgstr "Els servidors NIS+ són inabastables" + +#: nis/nis_error.c:70 +msgid "NIS+ service is unavailable or not installed" +msgstr "El servei NIS+ no és disponible o no està instal·lat" + +#: nis/nis_print.c:112 +msgid "NO OBJECT\n" +msgstr "CAP OBJECTE\n" + +# ivb (2001/10/30) +# ivb Es refereix al _nombre_ de fils a llançar. +#: nscd/nscd.c:87 +msgid "NUMBER" +msgstr "NOMBRE" + +#: nis/nis_print.c:166 +#, c-format +msgid "Name : `%s'\n" +msgstr "Nom : «%s»\n" + +#: nscd/nscd.c:97 +msgid "Name Service Cache Daemon." +msgstr "Dimoni de memòria cau del servei de noms." + +#: nis/nis_error.c:41 +msgid "Name not served by this server" +msgstr "El nom no és servit per aquest servidor" + +#: stdio-common/../sysdeps/gnu/errlist.c:777 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:110 +msgid "Name not unique on network" +msgstr "El nom no és únic en la xarxa" + +#: posix/../sysdeps/posix/gai_strerror.c:38 +msgid "Name or service not known" +msgstr "El nom o servei no és conegut" + +#: malloc/memusagestat.c:53 +msgid "Name output file" +msgstr "Especifica el fitxer d'eixida" + +#: nis/nis_error.c:50 +msgid "Name/entry isn't unique" +msgstr "El nom/entrada no és única" + +#: nis/nis_error.c:59 +msgid "Named object is not searchable" +msgstr "L'objecte anomenat no és cercable" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:567 +msgid "Need authenticator" +msgstr "Cal un autenticador" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:159 +msgid "Network dropped connection because of reset" +msgstr "La xarxa ha tallat la connexió per un reinici" + +#. TRANS A network connection was reset because the remote host crashed. +#: stdio-common/../sysdeps/gnu/errlist.c:390 +msgid "Network dropped connection on reset" +msgstr "La xarxa ha tallat la connexió per un reinici" + +#. TRANS A socket operation failed because the network was down. +#: stdio-common/../sysdeps/gnu/errlist.c:379 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:157 +msgid "Network is down" +msgstr "La xarxa no és activa" + +#. TRANS A socket operation failed because the subnet containing the remote host +#. TRANS was unreachable. +#: stdio-common/../sysdeps/gnu/errlist.c:385 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:158 +msgid "Network is unreachable" +msgstr "La xarxa és inabastable" + +#: stdio-common/../sysdeps/gnu/errlist.c:713 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:73 +msgid "No CSI structure available" +msgstr "No hi ha estructures CSI disponibles" + +#: stdio-common/../sysdeps/gnu/errlist.c:821 +msgid "No XENIX semaphores available" +msgstr "No hi ha semàfors XENIX disponibles" + +#: posix/../sysdeps/posix/gai_strerror.c:37 +msgid "No address associated with hostname" +msgstr "No hi ha cap adreça associada amb el nom d'estació" + +#: resolv/herror.c:71 +msgid "No address associated with name" +msgstr "No hi ha cap adreça associada amb el nom" + +#: stdio-common/../sysdeps/gnu/errlist.c:733 +msgid "No anode" +msgstr "No hi ha node-a" + +#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this +#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the +#. TRANS other from network operations. +#: stdio-common/../sysdeps/gnu/errlist.c:409 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:162 +msgid "No buffer space available" +msgstr "No hi ha memòria intermèdia disponible" + +#: locale/programs/ld-ctype.c:433 +msgid "No character set name specified in charmap" +msgstr "No s'ha especificat cap nom de joc de caràcters en el mapa de caràcters" + +#. TRANS There are no child processes. This error happens on operations that are +#. TRANS supposed to manipulate child processes, when there aren't any processes +#. TRANS to manipulate. +#: stdio-common/../sysdeps/gnu/errlist.c:90 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:40 +msgid "No child processes" +msgstr "No hi ha cap procés fill" + +#: stdio-common/../sysdeps/gnu/errlist.c:653 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:91 +msgid "No data available" +msgstr "No hi ha dades disponibles" + +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 +#: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 +#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 +#: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 +#: locale/programs/ld-telephone.c:94 locale/programs/ld-time.c:160 +#, c-format +msgid "No definition for %s category found" +msgstr "No s'ha trobat cap definició de la categoria «%s»" + +#: nis/nis_error.c:74 +msgid "No file space on server" +msgstr "No resta espai per fitxers en el servidor" + +#: elf/ldconfig.c:543 +#, c-format +msgid "No link created since soname could not be found for %s" +msgstr "No s'ha creat l'enllaç perquè no s'ha trobat el nom d'objecte compartit de «%s»" + +#. TRANS No locks available. This is used by the file locking facilities; see +#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but +#. TRANS it can result from an operation to an NFS server running another +#. TRANS operating system. +#: stdio-common/../sysdeps/gnu/errlist.c:548 +msgid "No locks available" +msgstr "No hi ha forrellats disponibles" + +#: posix/regex.c:1365 +msgid "No match" +msgstr "No hi ha cap coincidència" + +#: stdio-common/../sysdeps/gnu/errlist.c:833 +msgid "No medium found" +msgstr "No s'ha trobat el mitjà" + +#: stdio-common/../sysdeps/gnu/errlist.c:661 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:65 +msgid "No message of desired type" +msgstr "No hi ha missatges del tipus desitjat" + +#: nis/ypclnt.c:804 +msgid "No more records in map database" +msgstr "No hi ha més registres en la base de dades del mapa" + +#: posix/regex.c:7919 +msgid "No previous regular expression" +msgstr "No hi ha expressió regular prèvia" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:76 +msgid "No record locks available" +msgstr "No hi ha forrellats de registre disponibles" + +#: sunrpc/rpcinfo.c:570 +msgid "No remote programs registered.\n" +msgstr "No hi ha cap programa remot donat d'alta.\n" + +#. TRANS The remote host for a requested network connection is not reachable. +#: stdio-common/../sysdeps/gnu/errlist.c:475 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:178 +msgid "No route to host" +msgstr "No hi ha cap camí cap a l'estació" + +#. TRANS No space left on device; write operation on a file failed because the +#. TRANS disk is full. +#: stdio-common/../sysdeps/gnu/errlist.c:209 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:58 +msgid "No space left on device" +msgstr "No resta espai en el dispositiu" + +#. TRANS The wrong type of device was given to a function that expects a +#. TRANS particular sort of device. +#: stdio-common/../sysdeps/gnu/errlist.c:148 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:49 +msgid "No such device" +msgstr "El dispositiu no és vàlid" + +#. TRANS No such device or address. The system tried to use the device +#. TRANS represented by a file you specified, and it couldn't find the device. +#. TRANS This can mean that the device file was installed incorrectly, or that +#. TRANS the physical device is missing or not correctly attached to the +#. TRANS computer. +#: stdio-common/../sysdeps/gnu/errlist.c:62 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:36 +msgid "No such device or address" +msgstr "El dispositiu o adreça no existeix" + +#. TRANS No such file or directory. This is a ``file doesn't exist'' error +#. TRANS for ordinary files that are referenced in contexts where they are +#. TRANS expected to already exist. +#: stdio-common/../sysdeps/gnu/errlist.c:32 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:32 +msgid "No such file or directory" +msgstr "El fitxer o directori no existeix" + +#: nis/ypclnt.c:798 +msgid "No such key in map" +msgstr "La clau no és en el mapa" + +#: nis/ypclnt.c:796 +msgid "No such map in server's domain" +msgstr "El mapa no és en el domini del servidor" + +#. TRANS No process matches the specified process ID. +#: stdio-common/../sysdeps/gnu/errlist.c:37 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:33 +msgid "No such process" +msgstr "El procés no existeix" + +#: nis/nis_error.c:61 +msgid "Non NIS+ namespace encountered" +msgstr "S'ha trobat un espai de noms no-NIS+" + +#: posix/../sysdeps/posix/gai_strerror.c:34 +msgid "Non-recoverable failure in name resolution" +msgstr "Fallada irrecuperable en la resolució de noms" + +#: nis/nis_print.c:180 +msgid "None.\n" +msgstr "Cap.\n" + +#: stdio-common/../sysdeps/gnu/errlist.c:817 +msgid "Not a XENIX named type file" +msgstr "El fitxer no és d'un tipus XENIX amb nom" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:107 +msgid "Not a data message" +msgstr "No és un missatge de dades" + +#. TRANS A file that isn't a directory was specified when a directory is required. +#: stdio-common/../sysdeps/gnu/errlist.c:153 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:50 +msgid "Not a directory" +msgstr "No és un directori" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:167 +msgid "Not a name file" +msgstr "El fitxer no és d'un tipus amb nom" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:90 +msgid "Not a stream device" +msgstr "No és un dispositiu de flux" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:168 +msgid "Not available" +msgstr "No disponible" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:42 +msgid "Not enough space" +msgstr "No hi ha espai suficient" + +#: nis/nis_error.c:31 +msgid "Not found" +msgstr "No s'ha trobat" + +#: nis/nis_error.c:49 +msgid "Not found, no such name" +msgstr "No s'ha trobat, el nom no existeix" + +#: nis/nis_error.c:44 +msgid "Not master server for this domain" +msgstr "No és el servidor mestre d'aquest domini" + +#: nis/nis_error.c:40 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:31 +msgid "Not owner" +msgstr "No n'és propietari" + +#. TRANS Not supported. A function returns this error when certain parameter +#. TRANS values are valid, but the functionality they request is not available. +#. TRANS This can mean that the function does not implement a particular command +#. TRANS or option value or flag bit at all. For functions that operate on some +#. TRANS object given in a parameter, such as a file descriptor or a port, it +#. TRANS might instead mean that only @emph{that specific object} (file +#. TRANS descriptor, port, etc.) is unable to support the other parameters given; +#. TRANS different file descriptors might support different ranges of parameter +#. TRANS values. +#. TRANS +#. TRANS If the entire function is not available at all in the implementation, +#. TRANS it returns @code{ENOSYS} instead. +#: stdio-common/../sysdeps/gnu/errlist.c:592 +msgid "Not supported" +msgstr "No es suporta" + +#: nis/nis_print.c:267 +#, c-format +msgid "Number of Columns : %d\n" +msgstr "Nombre de columnes : %d\n" + +#: nis/nis_print.c:366 +#, c-format +msgid "Number of objects : %u\n" +msgstr "Nombre d'objectes : %u\n" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:120 +msgid "Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS" +msgstr "El nombre d'enllaços simbòlics trobats en recórrer el nom del camí excedeix MAXSYMLINKS" + +#. TRANS Domain error; used by mathematical functions when an argument value does +#. TRANS not fall into the domain over which the function is defined. +#: stdio-common/../sysdeps/gnu/errlist.c:241 +msgid "Numerical argument out of domain" +msgstr "L'argument numèric és fora del domini" + +#. TRANS Range error; used by mathematical functions when the result value is +#. TRANS not representable because of overflow or underflow. +#: stdio-common/../sysdeps/gnu/errlist.c:247 +msgid "Numerical result out of range" +msgstr "El resultat numèric és fora de rang" + +#: nis/nis_print.c:370 +#, c-format +msgid "Object #%d:\n" +msgstr "Objecte #%d:\n" + +#: nis/nis_print.c:320 +#, c-format +msgid "Object Name : %s\n" +msgstr "Nom de l'objecte : %s\n" + +#: nis/nis_print.c:332 +msgid "Object Type : " +msgstr "Tipus d'objecte : " + +#. TRANS An attempt was made to NFS-mount a remote file system with a file name that +#. TRANS already specifies an NFS-mounted file. +#. TRANS (This is an error on some operating systems, but we expect it to work +#. TRANS properly on the GNU system, making this error code impossible.) +#: stdio-common/../sysdeps/gnu/errlist.c:515 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:96 +msgid "Object is remote" +msgstr "L'objecte és remot" + +#: nis/nis_error.c:43 +msgid "Object with same name exists" +msgstr "Ja existeix un objecte amb el mateix nom" + +# ivb (2001/10/30) +# ivb Es refereix a les cometes dobles «"». +#: timezone/zic.c:2028 +msgid "Odd number of quotation marks" +msgstr "El nombre de cometes és senar" + +#: elf/ldconfig.c:129 +msgid "Only process directories specified on the command line. Don't build cache." +msgstr "Només processa els directoris especificats en la línia d'ordres. No construeix la memòria cau." + +#: nscd/nscd.c:200 nscd/nscd.c:220 nscd/nscd.c:226 +msgid "Only root is allowed to use this option!" +msgstr "Només root pot usar aquesta opció!" + +#. TRANS An operation is already in progress on an object that has non-blocking +#. TRANS mode selected. +#: stdio-common/../sysdeps/gnu/errlist.c:307 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:179 +msgid "Operation already in progress" +msgstr "L'operació ja estava en marxa" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:77 +msgid "Operation canceled" +msgstr "L'operació ha estat cancel·lada" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:119 +msgid "Operation not applicable" +msgstr "L'operació no és aplicable" + +#. TRANS Operation not permitted; only the owner of the file (or other resource) +#. TRANS or processes with special privileges can perform the operation. +#: stdio-common/../sysdeps/gnu/errlist.c:25 +msgid "Operation not permitted" +msgstr "L'operació no és permesa" + +#. TRANS The operation you requested is not supported. Some socket functions +#. TRANS don't make sense for all types of sockets, and others may not be +#. TRANS implemented for all communications protocols. In the GNU system, this +#. TRANS error can happen for many calls when the object does not support the +#. TRANS particular operation; it is a generic indication that the server knows +#. TRANS nothing to do for that call. +#: stdio-common/../sysdeps/gnu/errlist.c:351 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:78 +msgid "Operation not supported" +msgstr "L'operació no és suportada" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:152 +msgid "Operation not supported on transport endpoint" +msgstr "L'extrem de transport no suporta l'operació" + +#. TRANS An operation that cannot complete immediately was initiated on an object +#. TRANS that has non-blocking mode selected. Some functions that must always +#. TRANS block (such as @code{connect}; @pxref{Connecting}) never return +#. TRANS @code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that +#. TRANS the operation has begun and will take some time. Attempts to manipulate +#. TRANS the object before the call completes return @code{EALREADY}. You can +#. TRANS use the @code{select} function to find out when the pending operation +#. TRANS has completed; @pxref{Waiting for I/O}. +#: stdio-common/../sysdeps/gnu/errlist.c:301 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:180 +msgid "Operation now in progress" +msgstr "L'operació està en marxa" + +#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above). +#. TRANS The values are always the same, on every operating system. +#. TRANS +#. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a +#. TRANS separate error code. +#: stdio-common/../sysdeps/gnu/errlist.c:289 +msgid "Operation would block" +msgstr "L'operació quedaria blocada" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:129 +msgid "Option not supported by protocol" +msgstr "El protocol no suporta l'operació" + +# ivb (2001/10/28) +# ivb Localedef crea diversos fitxers en un directori: és plural. +# ivb Però, el prefix és un prefix d'un camí, com «/usr/local» en +# ivb «/usr/local/share/doc». +#: locale/programs/localedef.c:103 +msgid "Optional output file prefix" +msgstr "Prefix opcional dels fitxers d'eixida" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:93 +msgid "Out of stream resources" +msgstr "No resten recursos del tipus flux" + +#: stdio-common/../sysdeps/gnu/errlist.c:665 +msgid "Out of streams resources" +msgstr "No resten recursos del tipus flux" + +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 +msgid "Output control:" +msgstr "Control de l'eixida:" + +#: elf/sprof.c:72 +msgid "Output selection:" +msgstr "Selecció de l'eixida:" + +#: nis/nis_print.c:322 +#, c-format +msgid "Owner : %s\n" +msgstr "Propietari : %s\n" + +#: nis/nis_print.c:130 +msgid "PRIVATE\n" +msgstr "PRIVAT\n" + +# ivb (2001/10/30) +# ivb Objecte privat, masculí. +#: stdio-common/../sysdeps/gnu/errlist.c:757 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:95 +msgid "Package not installed" +msgstr "No s'ha instal·lat el paquet" + +#: nscd/nscd_conf.c:83 +#, c-format +msgid "Parse error: %s" +msgstr "Error d'anàlisi: %s" + +#: nis/nis_error.c:55 +msgid "Partial success" +msgstr "Èxit parcial" + +#: nis/nis_error.c:63 +msgid "Passed object is not the same object on server" +msgstr "L'objecte passat no és el mateix objecte en el servidor" + +#: elf/ldconfig.c:282 +#, c-format +msgid "Path `%s' given more than once" +msgstr "S'ha especificat el camí «%s» més d'una volta" + +#. TRANS Permission denied; the file permissions do not allow the attempted operation. +#: nis/nis_error.c:39 nis/ypclnt.c:818 +#: stdio-common/../sysdeps/gnu/errlist.c:109 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 +msgid "Permission denied" +msgstr "S'ha denegat el permís" + +#: sysdeps/generic/siglist.h:71 +msgid "Power failure" +msgstr "Fallada d'alimentació" + +#: posix/regex.c:1404 +msgid "Premature end of regular expression" +msgstr "Fí prematur de l'expressió regular" + +#: elf/ldconfig.c:122 +msgid "Print cache" +msgstr "Mostra la memòria cau" + +#: nscd/nscd.c:89 +msgid "Print current configuration statistic" +msgstr "Mostra estadístiques de la configuració actual" + +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Mostra més informació" + +#: locale/programs/localedef.c:107 +msgid "Print more messages" +msgstr "Mostra més missatges" + +#: argp/argp-parse.c:154 +msgid "Print program version" +msgstr "Mostra la versió del programa" + +#: nis/nis_error.c:30 +msgid "Probable success" +msgstr "Èxit probable" + +#: nis/nis_error.c:32 +msgid "Probably not found" +msgstr "Probablement no s'ha trobat" + +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "S'està processant la petició" + +#: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 +msgid "Profiling timer expired" +msgstr "El temps de perfilat ha expirat" + +#: stdio-common/../sysdeps/gnu/errlist.c:709 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:72 +msgid "Protocol driver not attached" +msgstr "No hi ha programa de control associat al protocol" + +#: stdio-common/../sysdeps/gnu/errlist.c:677 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:101 +msgid "Protocol error" +msgstr "Error de protocol" + +#. TRANS The socket communications protocol family you requested is not supported. +#: stdio-common/../sysdeps/gnu/errlist.c:356 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:153 +msgid "Protocol family not supported" +msgstr "La família de protocols no és suportada" + +#. TRANS You specified a socket option that doesn't make sense for the +#. TRANS particular protocol being used by the socket. @xref{Socket Options}. +#: stdio-common/../sysdeps/gnu/errlist.c:329 +msgid "Protocol not available" +msgstr "El protocol no és disponible" + +#. TRANS The socket domain does not support the requested communications protocol +#. TRANS (perhaps because the requested protocol is completely invalid). +#. TRANS @xref{Creating a Socket}. +#: stdio-common/../sysdeps/gnu/errlist.c:336 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:150 +msgid "Protocol not supported" +msgstr "El protocol no és suportat" + +#. TRANS The socket type does not support the requested communications protocol. +#: stdio-common/../sysdeps/gnu/errlist.c:323 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:128 +msgid "Protocol wrong type for socket" +msgstr "El connector no suporta aquest protocol" + +#: nis/nis_error.c:65 +msgid "Query illegal for named table" +msgstr "La consulta no és permesa per la taula anomenada" + +#: stdio-common/../sysdeps/unix/siglist.c:29 sysdeps/generic/siglist.h:31 +msgid "Quit" +msgstr "Eixir" + +#: stdio-common/../sysdeps/gnu/errlist.c:773 +msgid "RFS specific error" +msgstr "Error específic d'RFS" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:540 +msgid "RPC bad procedure for program" +msgstr "El procediment RPC no és vàlid pel programa" + +#: nis/ypclnt.c:792 +msgid "RPC failure on NIS operation" +msgstr "El procediment RPC ha fallat en una operació NIS" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:530 +msgid "RPC program not available" +msgstr "El programa RPC no és disponible" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:535 +msgid "RPC program version wrong" +msgstr "La versió del programa RPC no és correcta" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:520 +msgid "RPC struct is bad" +msgstr "L'estructura RPC és feta malbé" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:525 +msgid "RPC version wrong" +msgstr "La versió d'RPC no és correcta" + +#: sunrpc/clnt_perr.c:278 +msgid "RPC: (unknown error code)" +msgstr "RPC: (codi d'error desconegut)" + +#: sunrpc/clnt_perr.c:197 +msgid "RPC: Authentication error" +msgstr "RPC: Error d'autenticació" + +#: sunrpc/clnt_perr.c:177 +msgid "RPC: Can't decode result" +msgstr "RPC: No s'ha pogut descodificar el resultat" + +#: sunrpc/clnt_perr.c:173 +msgid "RPC: Can't encode arguments" +msgstr "RPC: No s'han pogut codificar els arguments" + +#: sunrpc/clnt_perr.c:237 +msgid "RPC: Failed (unspecified error)" +msgstr "RPC: Ha fallat (error no especificat)" + +#: sunrpc/clnt_perr.c:193 +msgid "RPC: Incompatible versions of RPC" +msgstr "RPC: Les versions d'RPC són incompatibles" + +#: sunrpc/clnt_perr.c:229 +msgid "RPC: Port mapper failure" +msgstr "RPC: Fallada del mapador de ports" + +#: sunrpc/clnt_perr.c:209 +msgid "RPC: Procedure unavailable" +msgstr "RPC: El procediment no és disponible" + +#: sunrpc/clnt_perr.c:233 +msgid "RPC: Program not registered" +msgstr "RPC: El programa s'ha donat d'alta" + +#: sunrpc/clnt_perr.c:201 +msgid "RPC: Program unavailable" +msgstr "RPC: El programa no és disponible" + +#: sunrpc/clnt_perr.c:205 +msgid "RPC: Program/version mismatch" +msgstr "RPC: No hi ha coincidència programa/versió" + +#: sunrpc/clnt_perr.c:217 +msgid "RPC: Remote system error" +msgstr "RPC: Error en el sistema remot" + +#: sunrpc/clnt_perr.c:213 +msgid "RPC: Server can't decode arguments" +msgstr "RPC: El servidor no ha pogut descodificar els arguments" + +#: sunrpc/clnt_perr.c:170 +msgid "RPC: Success" +msgstr "RPC: Èxit" + +#: sunrpc/clnt_perr.c:189 +msgid "RPC: Timed out" +msgstr "RPC: S'ha excedit el temps" + +#: sunrpc/clnt_perr.c:185 +msgid "RPC: Unable to receive" +msgstr "RPC: No s'ha pogut rebre" + +#: sunrpc/clnt_perr.c:181 +msgid "RPC: Unable to send" +msgstr "RPC: No s'ha pogut fer l'enviament" + +#: sunrpc/clnt_perr.c:221 +msgid "RPC: Unknown host" +msgstr "RPC: L'estació no és coneguda" + +#: sunrpc/clnt_perr.c:225 +msgid "RPC: Unknown protocol" +msgstr "RPC: El protocol no és conegut" + +#: nis/nis_print.c:188 +#, c-format +msgid "RSA (%d bits)\n" +msgstr "RSA (%d bits)\n" + +#: elf/dl-sym.c:72 elf/dl-sym.c:134 +msgid "RTLD_NEXT used in code not dynamically loaded" +msgstr "S'ha usat RTLD_NEXT en un codi no carregat dinàmicament" + +#: elf/sprof.c:84 +msgid "Read and display shared object profiling data" +msgstr "Llig i mostra les dades de perfilat d'un objecte compartit." + +#: nscd/nscd.c:84 +msgid "Read configuration data from NAME" +msgstr "Llig les dades de configuració de NOM" + +#. TRANS An attempt was made to modify something on a read-only file system. +#: stdio-common/../sysdeps/gnu/errlist.c:219 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:60 +msgid "Read-only file system" +msgstr "El sistema de fitxers és només de lectura" + +#: string/strsignal.c:67 +#, c-format +msgid "Real-time signal %d" +msgstr "Senyal de temps real %d" + +#: posix/regex.c:1407 +msgid "Regular expression too big" +msgstr "L'expressió regular és massa llarga" + +#: stdio-common/../sysdeps/gnu/errlist.c:829 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:170 +msgid "Remote I/O error" +msgstr "Error en una E/S remota" + +#: stdio-common/../sysdeps/gnu/errlist.c:785 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:112 +msgid "Remote address changed" +msgstr "L'adreça remota ha canviat" + +#: inet/ruserpass.c:185 +msgid "Remove password or make file unreadable by others." +msgstr "Elimineu la contrasenya o feu il·legible el fitxer per alres." + +#: elf/cache.c:431 +#, c-format +msgid "Renaming of %s to %s failed" +msgstr "No s'ha pogut reanomenar «%s» a «%s»" + +#: elf/sprof.c:532 +#, c-format +msgid "Reopening shared object `%s' failed" +msgstr "No s'ha pogut reobrir l'objecte compartit «%s»" + +# ivb (2001/10/28) +# ivb Es refereix a un servidor rèplica, no a replicar. +#: nis/nis_print.c:174 +msgid "Replicate :\n" +msgstr "Rèplica :\n" + +#: argp/argp-help.c:1639 +#, c-format +msgid "Report bugs to %s.\n" +msgstr "Informeu dels errors a %s.\n" + +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 +msgid "Report bugs using the `glibcbug' script to .\n" +msgstr "Informeu dels errors amb el guió «glibcbug» a .\n" + +#: nis/ypclnt.c:790 +msgid "Request arguments bad" +msgstr "Els arguments de la petició són incorrectes" + +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "La petició ha estat cancel·lada" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "La petició no ha estat cancel·lada" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 +msgid "Reserved for future use" +msgstr "Reservat per usos futurs" + +#: resolv/herror.c:67 +msgid "Resolver Error 0 (no error)" +msgstr "Error 0 al sistema de resolució (cap error)" + +#: resolv/herror.c:107 +msgid "Resolver internal error" +msgstr "Error intern del sistema de resolució" + +#. TRANS Deadlock avoided; allocating a system resource would have resulted in a +#. TRANS deadlock situation. The system does not guarantee that it will notice +#. TRANS all such situations. This error means you got lucky and the system +#. TRANS noticed; it might just hang. @xref{File Locks}, for an example. +#: stdio-common/../sysdeps/gnu/errlist.c:98 +msgid "Resource deadlock avoided" +msgstr "S'ha evitat un interbloqueig amb el recurs" + +# ivb (2000/10/28) +# ivb Sona més a llenguatge jurídic que a altra cosa... +#: stdio-common/../sysdeps/unix/siglist.c:55 sysdeps/generic/siglist.h:74 +msgid "Resource lost" +msgstr "S'ha perdut el recurs" + +#. TRANS Resource temporarily unavailable; the call might work if you try again +#. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN}; +#. TRANS they are always the same in the GNU C library. +#. TRANS +#. TRANS This error can happen in a few different situations: +#. TRANS +#. TRANS @itemize @bullet +#. TRANS @item +#. TRANS An operation that would block was attempted on an object that has +#. TRANS non-blocking mode selected. Trying the same operation again will block +#. TRANS until some external condition makes it possible to read, write, or +#. TRANS connect (whatever the operation). You can use @code{select} to find out +#. TRANS when the operation will be possible; @pxref{Waiting for I/O}. +#. TRANS +#. TRANS @strong{Portability Note:} In many older Unix systems, this condition +#. TRANS was indicated by @code{EWOULDBLOCK}, which was a distinct error code +#. TRANS different from @code{EAGAIN}. To make your program portable, you should +#. TRANS check for both codes and treat them the same. +#. TRANS +#. TRANS @item +#. TRANS A temporary resource shortage made an operation impossible. @code{fork} +#. TRANS can return this error. It indicates that the shortage is expected to +#. TRANS pass, so your program can try the call again later and it may succeed. +#. TRANS It is probably a good idea to delay for a few seconds before trying it +#. TRANS again, to allow time for other processes to release scarce resources. +#. TRANS Such shortages are usually fairly serious and affect the whole system, +#. TRANS so usually an interactive program should report the error to the user +#. TRANS and return to its command loop. +#. TRANS @end itemize +#: stdio-common/../sysdeps/gnu/errlist.c:280 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:41 +msgid "Resource temporarily unavailable" +msgstr "El recurs no està disponible temporalment" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:64 +msgid "Result too large" +msgstr "El resultat és massa gran" + +#: nis/nis_error.c:48 +msgid "Results sent to callback proc" +msgstr "S'han enviat els resultats al procés de crida de retorn" + +#: elf/sprof.c:87 +msgid "SHOBJ [PROFDATA]" +msgstr "OBJCOMPARTIT [DADESPERFILAT]" + +#: nis/nis_print.c:269 +#, c-format +msgid "Search Path : %s\n" +msgstr "Camí de recerca : %s\n" + +#: stdio-common/../sysdeps/unix/siglist.c:37 sysdeps/generic/siglist.h:38 +msgid "Segmentation fault" +msgstr "Violació de segment" + +#: nis/nis_error.c:36 +msgid "Server busy, try again" +msgstr "El servidor es troba ocupat, torneu a provar" + +#: nis/nis_error.c:42 +msgid "Server out of memory" +msgstr "S'ha exhaurit la memòria del servidor" + +#: sunrpc/clnt_perr.c:345 +msgid "Server rejected credential" +msgstr "El servidor ha rebutjat la credencial" + +#: sunrpc/clnt_perr.c:353 +msgid "Server rejected verifier" +msgstr "El servidor ha rebutjat el verificador" + +# ivb (2001/11/05) +# ivb Potser una traducció més concisa estaria millor. +#: posix/../sysdeps/posix/gai_strerror.c:39 +msgid "Servname not supported for ai_socktype" +msgstr "El servei no és suportat per aquest valor d'«ai_socktype»" + +#: argp/argp-parse.c:95 +msgid "Set the program name" +msgstr "Estableix el nom del programa" + +#: nscd/nscd.c:88 +msgid "Shut the server down" +msgstr "Termina el servidor" + +#: stdio-common/../sysdeps/unix/siglist.c:26 +msgid "Signal 0" +msgstr "Senyal 0" + +#. TRANS A file that isn't a socket was specified when a socket is required. +#: stdio-common/../sysdeps/gnu/errlist.c:312 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:125 +msgid "Socket operation on non-socket" +msgstr "Operació de connector sobre un fitxer no-connector" + +#. TRANS The socket type is not supported. +#: stdio-common/../sysdeps/gnu/errlist.c:341 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:151 +msgid "Socket type not supported" +msgstr "El tipus de connector no és suportat" + +#. TRANS A network connection was aborted locally. +#: stdio-common/../sysdeps/gnu/errlist.c:395 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:160 +msgid "Software caused connection abort" +msgstr "El programari ha tallat la conexió" + +#: sunrpc/rpcinfo.c:658 +msgid "Sorry. You are not root\n" +msgstr "Ho sent, no sou root\n" + +#: locale/programs/localedef.c:95 +msgid "Source definitions are found in FILE" +msgstr "Les definicions font es troben en FITXER" + +#: stdio-common/../sysdeps/gnu/errlist.c:765 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:99 +msgid "Srmount error" +msgstr "Error en «srmount»" + +#: sysdeps/generic/siglist.h:66 +msgid "Stack fault" +msgstr "Fallada de pila" + +#. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS +#. TRANS system which is due to file system rearrangements on the server host. +#. TRANS Repairing this condition usually requires unmounting and remounting +#. TRANS the NFS file system on the local host. +#: stdio-common/../sysdeps/gnu/errlist.c:507 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:181 +msgid "Stale NFS file handle" +msgstr "L'indicador del fitxer NFS és obsolet" + +#: nscd/nscd.c:87 +msgid "Start NUMBER threads" +msgstr "Llança NOMBRE fils d'exeució" + +#: nis/nis_print.c:365 +#, c-format +msgid "Status : %s\n" +msgstr "Estat : %s\n" + +#: stdio-common/../sysdeps/unix/siglist.c:44 sysdeps/generic/siglist.h:44 +msgid "Stopped" +msgstr "Parat" + +#: stdio-common/../sysdeps/unix/siglist.c:43 sysdeps/generic/siglist.h:43 +msgid "Stopped (signal)" +msgstr "Parat (senyal)" + +#: stdio-common/../sysdeps/unix/siglist.c:47 sysdeps/generic/siglist.h:47 +msgid "Stopped (tty input)" +msgstr "Parat (esperant entrada del terminal)" + +#: stdio-common/../sysdeps/unix/siglist.c:48 sysdeps/generic/siglist.h:48 +msgid "Stopped (tty output)" +msgstr "Parat (esperant escriure en el terminal)" + +#: stdio-common/../sysdeps/gnu/errlist.c:809 +msgid "Streams pipe error" +msgstr "Error en la canonada entre fluxs" + +#: stdio-common/../sysdeps/gnu/errlist.c:813 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:165 +msgid "Structure needs cleaning" +msgstr "L'estructura necessita una neteja" + +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 +#: stdio-common/../sysdeps/gnu/errlist.c:20 +msgid "Success" +msgstr "Èxit" + +#: nss/getent.c:703 +msgid "Supported databases:" +msgstr "Bases de dades suportades:" + +#: locale/programs/localedef.c:106 +msgid "Suppress warnings and information messages" +msgstr "Descarta els avisos i els missatges informatius" + +#: locale/programs/localedef.c:94 +msgid "Symbolic character names defined in FILE" +msgstr "Els noms simbòlics dels caràcters es defineixen en FITXER" + +#: posix/../sysdeps/posix/gai_strerror.c:41 +msgid "System error" +msgstr "Error del sistema" + +#: locale/programs/locale.c:73 +msgid "System information:" +msgstr "Informació del sistema:" + +#: nis/ypclnt.c:868 +msgid "System resource allocation failure" +msgstr "No s'han pogut assignar recursos del sistema" + +#: locale/programs/localedef.c:292 +#, c-format +msgid "" +"System's directory for character maps : %s\n" +" repertoire maps: %s\n" +" locale path : %s\n" +"%s" +msgstr "" +"Directori del sistema de mapes de caràcters: %s\n" +" mapes de repertori: %s\n" +" camí als locales : %s\n" +"%s" + +#: nscd/nscd.c:90 +msgid "TABLE" +msgstr "TAULA" + +#: nis/nis_print.c:121 +msgid "TABLE\n" +msgstr "TAULA\n" + +#: nscd/nscd.c:92 +msgid "TABLE,yes" +msgstr "TAULA,yes" + +#: nis/nis_print.c:266 +#, c-format +msgid "Table Type : %s\n" +msgstr "Tipus de taula : %s\n" + +#: posix/../sysdeps/posix/gai_strerror.c:32 +msgid "Temporary failure in name resolution" +msgstr "Fallada temporal en la resolució de noms" + +#: stdio-common/../sysdeps/unix/siglist.c:41 sysdeps/generic/siglist.h:41 +msgid "Terminated" +msgstr "Terminat" + +#. TRANS An attempt to execute a file that is currently open for writing, or +#. TRANS write to a file that is currently being executed. Often using a +#. TRANS debugger to run a program is considered having it open for writing and +#. TRANS will cause this error. (The name stands for ``text file busy''.) This +#. TRANS is not an error in the GNU system; the text is copied as necessary. +#: stdio-common/../sysdeps/gnu/errlist.c:198 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:56 +msgid "Text file busy" +msgstr "El fitxer de text es troba ocupat" + +#: iconv/iconv_prog.c:680 +msgid "" +"The following list contain all the coded character sets known. This does\n" +"not necessarily mean that all combinations of these names can be used for\n" +"the FROM and TO command line parameters. One coded character set can be\n" +"listed with several different names (aliases).\n" +"\n" +" " +msgstr "" +"La llista següent conté tots els jocs de caràcters codificats coneguts.\n" +"Açò no significa necessàriament que totes les combinacions d'aquests noms\n" +"siguen possibles en els paràmetres DES-DE i FINS de la línia d'ordres.\n" +"Un joc de caràcters codificat pot estar llistat amb noms diferents (àlies).\n" +"\n" +" " + +#: sunrpc/rpc_main.c:1365 +msgid "This implementation doesn't support newstyle or MT-safe code!\n" +msgstr "Aquesta implementació no suporta l'estil nou ni el codi compatible amb MT!\n" + +#: nis/nis_print.c:227 +msgid "Time to live : " +msgstr "Temps de vida : " + +#: stdio-common/../sysdeps/gnu/errlist.c:681 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:92 +msgid "Timer expired" +msgstr "El temporitzador ha expirat" + +#: malloc/memusagestat.c:54 +msgid "Title string used in output graphic" +msgstr "Cadena amb el títol a usar en el gràfic d'eixida" + +#: nis/nis_error.c:56 +msgid "Too many attributes" +msgstr "Sobren atributs" + +#. TRANS Too many levels of symbolic links were encountered in looking up a file name. +#. TRANS This often indicates a cycle of symbolic links. +#: stdio-common/../sysdeps/gnu/errlist.c:458 +msgid "Too many levels of symbolic links" +msgstr "Hi ha massa nivells d'enllaços simbòlics" + +#. TRANS Too many links; the link count of a single file would become too large. +#. TRANS @code{rename} can cause this error if the file being renamed already has +#. TRANS as many links as it can take (@pxref{Renaming Files}). +#: stdio-common/../sysdeps/gnu/errlist.c:226 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:61 +msgid "Too many links" +msgstr "El fitxer té massa enllaços" + +#. TRANS The current process has too many files open and can't open any more. +#. TRANS Duplicate descriptors do count toward this limit. +#. TRANS +#. TRANS In BSD and GNU, the number of open files is controlled by a resource +#. TRANS limit that can usually be increased. If you get this error, you might +#. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited; +#. TRANS @pxref{Limits on Resources}. +#: stdio-common/../sysdeps/gnu/errlist.c:176 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:54 +msgid "Too many open files" +msgstr "El procés té massa fitxers oberts" + +#. TRANS There are too many distinct file openings in the entire system. Note +#. TRANS that any number of linked channels count as just one file opening; see +#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system. +#: stdio-common/../sysdeps/gnu/errlist.c:183 +msgid "Too many open files in system" +msgstr "El sistema té massa fitxers oberts" + +#. TRANS This means that the per-user limit on new process would be exceeded by +#. TRANS an attempted @code{fork}. @xref{Limits on Resources}, for details on +#. TRANS the @code{RLIMIT_NPROC} limit. +#: stdio-common/../sysdeps/gnu/errlist.c:488 +msgid "Too many processes" +msgstr "L'usuari té massa processos" + +#. TRANS ??? +#: stdio-common/../sysdeps/gnu/errlist.c:440 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:174 +msgid "Too many references: cannot splice" +msgstr "Hi ha massa referències: no es poden enllaçar" + +#. TRANS The file quota system is confused because there are too many users. +#. TRANS @c This can probably happen in a GNU system when using NFS. +#: stdio-common/../sysdeps/gnu/errlist.c:494 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:124 +msgid "Too many users" +msgstr "Hi ha massa usuaris" + +#: stdio-common/../sysdeps/unix/siglist.c:31 sysdeps/generic/siglist.h:33 +msgid "Trace/breakpoint trap" +msgstr "Trampa de traçat/punt de parada" + +#: posix/regex.c:1377 +msgid "Trailing backslash" +msgstr "Hi ha una barra invertida sobrant al final" + +# ivb (2000/10/28) +# ivb Doncs que conste que jo no he sigut! +#. TRANS In the GNU system, opening a file returns this error when the file is +#. TRANS translated by a program and the translator program dies while starting +#. TRANS up, before it has connected to the file. +#: stdio-common/../sysdeps/gnu/errlist.c:615 +msgid "Translator died" +msgstr "El traductor ha mort" + +#. TRANS You tried to connect a socket that is already connected. +#. TRANS @xref{Connecting}. +#: stdio-common/../sysdeps/gnu/errlist.c:415 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:163 +msgid "Transport endpoint is already connected" +msgstr "L'extrem de transport ja és connectat" + +#. TRANS The socket is not connected to anything. You get this error when you +#. TRANS try to transmit data over a socket, without first specifying a +#. TRANS destination for the data. For a connectionless socket (for datagram +#. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead. +#: stdio-common/../sysdeps/gnu/errlist.c:423 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:164 +msgid "Transport endpoint is not connected" +msgstr "L'extrem de transport no és connectat" + +#: argp/argp-help.c:1611 +#, c-format +msgid "Try `%s --help' or `%s --usage' for more information.\n" +msgstr "Proveu «%s --help» o «%s --usage» per obtenir més informació.\n" + +#: nis/nis_print.c:167 +#, c-format +msgid "Type : %s\n" +msgstr "Tipus : %s\n" + +# ivb (2001/10/30) +# ivb Crec que es refereix a un tipus de servei de noms -> masculí. +#: nis/nis_print.c:51 +msgid "UNKNOWN" +msgstr "DESCONEGUT" + +#: nis/nis_error.c:73 +msgid "Unable to authenticate NIS+ client" +msgstr "No s'ha pogut autenticar el client NIS+" + +#: nis/nis_error.c:72 +msgid "Unable to authenticate NIS+ server" +msgstr "No s'ha pogut autenticar el servidor NIS+" + +#: nis/nis_error.c:47 +msgid "Unable to create callback" +msgstr "No s'ha pogut crear el procés de crida de retorn" + +#: nis/nis_error.c:75 +msgid "Unable to create process on server" +msgstr "No s'ha pogut crear un procés en el servidor" + +# ivb (2001/10/30) +# ivb Es refereix a una clau pública -> femení. +#: nis/nis_print.c:194 +#, c-format +msgid "Unknown (type = %d, bits = %d)\n" +msgstr "Desconeguda (tipus = %d, bits = %d)\n" + +#: inet/ruserpass.c:277 +#, c-format +msgid "Unknown .netrc keyword %s" +msgstr "La paraula clau «%s» de .netrc no és coneguda" + +#: elf/../sysdeps/generic/readelflib.c:71 +#, c-format +msgid "Unknown ELFCLASS in file %s.\n" +msgstr "La classe ELF del fitxer «%s» no és coneguda.\n" + +#: nis/ypclnt.c:822 +msgid "Unknown NIS error code" +msgstr "Codi d'error desconegut de NIS" + +# ivb (2001/11/06) +# ivb Cal mantenir-ho curt... +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "SO desconegut" + +#: nss/getent.c:771 +#, c-format +msgid "Unknown database: %s\n" +msgstr "La base de dades no és coneguda: %s\n" + +#: posix/../sysdeps/posix/gai_strerror.c:57 +msgid "Unknown error" +msgstr "Error desconegut" + +#: string/../sysdeps/generic/_strerror.c:48 +#: string/../sysdeps/mach/_strerror.c:88 +#: sysdeps/mach/hurd/mips/dl-machine.c:83 +msgid "Unknown error " +msgstr "Error desconegut " + +#: resolv/herror.c:68 +msgid "Unknown host" +msgstr "L'estació no és coneguda" + +#: nis/nis_error.c:35 +msgid "Unknown object" +msgstr "L'objecte no és conegut" + +#: nscd/nscd_conf.c:187 +#, c-format +msgid "Unknown option: %s %s %s" +msgstr "L'opció no és coneguda: %s %s %s" + +#: resolv/herror.c:110 +msgid "Unknown resolver error" +msgstr "Error desconegut del sistema de resolució" + +#: resolv/herror.c:70 +msgid "Unknown server error" +msgstr "Error desconegut del servidor" + +#: string/strsignal.c:71 +#, c-format +msgid "Unknown signal %d" +msgstr "Senyal desconegut %d" + +#: misc/error.c:113 timezone/zic.c:390 +msgid "Unknown system error" +msgstr "Error desconegut del sistema" + +#: nis/ypclnt.c:870 +msgid "Unknown ypbind error" +msgstr "Error desconegut d'«ypbind»" + +#: posix/regex.c:1386 +msgid "Unmatched ( or \\(" +msgstr "( o \\( desaparellat" + +#: posix/regex.c:1410 +msgid "Unmatched ) or \\)" +msgstr ") o \\) desaparellat" + +#: posix/regex.c:1383 +msgid "Unmatched [ or [^" +msgstr "[ o [^ desaparellat" + +#: posix/regex.c:1389 +msgid "Unmatched \\{" +msgstr "\\{ desaparellat" + +#: posix/getconf.c:1006 +#, c-format +msgid "Unrecognized variable `%s'" +msgstr "La variable «%s» no és reconeguda" + +#: stdio-common/../sysdeps/unix/siglist.c:42 sysdeps/generic/siglist.h:42 +msgid "Urgent I/O condition" +msgstr "Condició urgent d'E/S" + +#: argp/argp-help.c:1568 +msgid "Usage:" +msgstr "Forma d'ús:" + +#: posix/getconf.c:883 +#, c-format +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Forma d'ús: %s [-v especificació] nom_de_la_variable [camí]\n" + +#: sunrpc/rpcinfo.c:674 +msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" +msgstr "Forma d'ús: rpcinfo [ -n nport ] -u estació nprog [ nvers ]\n" + +#: elf/ldconfig.c:127 +msgid "Use CACHE as cache file" +msgstr "Usa CACHE com a fitxer de memòria cau" + +#: elf/ldconfig.c:128 +msgid "Use CONF as configuration file" +msgstr "Usa CONF com a fitxer de configuració" + +#: nscd/nscd.c:92 +msgid "Use separate cache for each user" +msgstr "Usa una memòria cau diferent per cada usuari" + +#: stdio-common/../sysdeps/unix/siglist.c:56 sysdeps/generic/siglist.h:55 +msgid "User defined signal 1" +msgstr "Senyal 1 definit per l'usuari" + +#: stdio-common/../sysdeps/unix/siglist.c:57 sysdeps/generic/siglist.h:56 +msgid "User defined signal 2" +msgstr "Senyal 2 definit per l'usuari" + +#: stdio-common/../sysdeps/gnu/errlist.c:673 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:109 +msgid "Value too large for defined data type" +msgstr "El valor és massa gran pel tipus de dada definit" + +#: stdio-common/../sysdeps/unix/siglist.c:52 sysdeps/generic/siglist.h:52 +msgid "Virtual timer expired" +msgstr "Ha expirat el temporitzador virtual" + +#: timezone/zic.c:1932 +msgid "Wild result from command execution" +msgstr "L'execució de l'ordre ha donat un resultat estrany" + +#: stdio-common/../sysdeps/unix/siglist.c:54 sysdeps/generic/siglist.h:54 +msgid "Window changed" +msgstr "Ha canviat el tamany de finestra" + +#: locale/programs/locale.c:77 +msgid "Write names of available charmaps" +msgstr "Mostra els noms dels mapes de caràcters disponibles" + +#: locale/programs/locale.c:75 +msgid "Write names of available locales" +msgstr "Mostra els noms dels locales disponibles" + +#: locale/programs/locale.c:79 +msgid "Write names of selected categories" +msgstr "Mostra els noms de les categories seleccionades" + +#: locale/programs/locale.c:80 +msgid "Write names of selected keywords" +msgstr "Mostra els noms de les paraules clau seleccionades" + +#: catgets/gencat.c:115 +msgid "Write output to file NAME" +msgstr "Escriu l'eixida en el fitxer NOM" + +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 +msgid "Writing of cache data failed" +msgstr "No s'han pogut escriure les dades de la memòria cau" + +#: elf/cache.c:419 +msgid "Writing of cache data failed." +msgstr "No s'han pogut escriure les dades de la memòria cau" + +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 +#: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 +#: nss/getent.c:68 posix/getconf.c:909 +#, c-format +msgid "Written by %s.\n" +msgstr "Escrit per %s.\n" + +#: stdio-common/../sysdeps/gnu/errlist.c:837 +msgid "Wrong medium type" +msgstr "El tipus de mitjà no és vàlid" + +#: nis/ypclnt.c:174 +#, c-format +msgid "YPBINDPROC_DOMAIN: %s\n" +msgstr "YPBINDPROC_DOMAIN: %s\n" + +# ivb (2001/10/20) +# ivb I de l'Univers i de Tot. ;) +#: nis/nis_error.c:71 +msgid "Yes, 42 is the meaning of life" +msgstr "Sí, 42 és el significat de la vida" + +#. TRANS You did @strong{what}? +#: stdio-common/../sysdeps/gnu/errlist.c:627 +msgid "You really blew it this time" +msgstr "Ara sí que te l'has carregat" + +#: timezone/zic.c:1094 +msgid "Zone continuation line end time is not after end time of previous line" +msgstr "El temps final de la línia de continuació de zona no ve darrere del temps final de la línia anterior" + +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr " [DIRECTORI...]" + +#: iconv/iconv_prog.c:77 +msgid "[FILE...]" +msgstr "[FITXER...]" + +#: debug/pcprofiledump.c:59 +msgid "[FILE]" +msgstr "[FITXER]" + +#: sunrpc/pmap_clnt.c:72 +msgid "__get_myaddress: ioctl (get interface configuration)" +msgstr "__get_myaddress: ioctl (obtenir configuració de la interfície)" + +#: locale/programs/ld-collate.c:417 +#, c-format +msgid "`%.*s' already defined as collating element" +msgstr "«%.*s» ja ha estat definit com a element d'ordenació" + +#: locale/programs/ld-collate.c:410 +#, c-format +msgid "`%.*s' already defined as collating symbol" +msgstr "«%.*s» ja ha estat definit com a símbol d'ordenació" + +#: locale/programs/ld-collate.c:394 +#, c-format +msgid "`%.*s' already defined in charmap" +msgstr "«%.*s» ja ha estat definit en el mapa de caràcters" + +#: locale/programs/ld-collate.c:403 +#, c-format +msgid "`%.*s' already defined in repertoire" +msgstr "«%.*s» ja ha estat definit en el repertori" + +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 +#: locale/programs/repertoire.c:314 +#, c-format +msgid "`%1$s' definition does not end with `END %1$s'" +msgstr "la definició «%1$s» no termina amb «END %1$s»" + +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 +#, c-format +msgid "`%s' and `%.*s' are no valid names for symbolic range" +msgstr "«%s» i «%.*s» no són noms vàlids de rangs simbòlics" + +#: elf/sprof.c:762 +#, c-format +msgid "`%s' is no correct profile data file for `%s'" +msgstr "«%s» no és un fitxer vàlid de perfilat de «%s»" + +#: locale/programs/ld-ctype.c:699 +msgid "`digit' category has not entries in groups of ten" +msgstr "les entrades de la categoria «digit» no estan agrupades de deu en deu" + +#: posix/../sysdeps/posix/gai_strerror.c:35 +msgid "ai_family not supported" +msgstr "El valor d'«ai_family» no és suportat" + +#: posix/../sysdeps/posix/gai_strerror.c:40 +msgid "ai_socktype not supported" +msgstr "El valor d'«ai_socktype» no és suportat" + +#: nscd/nscd.c:130 +msgid "already running" +msgstr "ja es troba en marxa" + +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 +#, c-format +msgid "argument to <%s> must be a single character" +msgstr "l'argument de «%s» ha de ser un sol caràcter" + +#: locale/programs/locfile.c:126 +#, c-format +msgid "argument to `%s' must be a single character" +msgstr "l'argument de «%s» ha de ser un sol caràcter" + +# ivb (2001/11/01) +# ivb D'acord amb un comentari del propi fitxer. +#: sunrpc/auth_unix.c:311 +msgid "auth_none.c - Fatal marshalling problem" +msgstr "auth_none.c - Error fatal de preserialització" + +#: sunrpc/auth_unix.c:106 sunrpc/auth_unix.c:112 sunrpc/auth_unix.c:142 +msgid "authunix_create: out of memory\n" +msgstr "authunix_create: no resta memòria\n" + +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 +msgid "bad argument" +msgstr "l'argument no és vàlid" + +#: inet/rcmd.c:425 +msgid "bad owner" +msgstr "el propietari no és vàlid" + +#: timezone/zic.c:1216 +msgid "blank FROM field on Link line" +msgstr "el camp DES-DE de la línia d'enllaç (Link) és buit" + +#: timezone/zic.c:1220 +msgid "blank TO field on Link line" +msgstr "el camp FINS de la línia d'enllaç (Link) és buit" + +#: malloc/mcheck.c:302 +msgid "block freed twice\n" +msgstr "s'ha alliberat el bloc dues voltes\n" + +#: malloc/mcheck.c:305 +msgid "bogus mcheck_status, library is buggy\n" +msgstr "el valor d'«mcheck_status» és estrany; la biblioteca té errors\n" + +#: sunrpc/pmap_rmt.c:186 +msgid "broadcast: ioctl (get interface configuration)" +msgstr "broadcast: ioctl (obtenir configuració de la interfície)" + +#: sunrpc/pmap_rmt.c:195 +msgid "broadcast: ioctl (get interface flags)" +msgstr "broadcast: ioctl (obtenir senyaladors de la interfície)" + +#: sunrpc/svc_udp.c:528 +msgid "cache_set: could not allocate new rpc_buffer" +msgstr "cache_set: no s'ha pogut reservar un nou rpc_buffer" + +#: sunrpc/svc_udp.c:522 +msgid "cache_set: victim alloc failed" +msgstr "cache_set: no s'ha pogut reservar la víctima" + +#: sunrpc/svc_udp.c:511 +msgid "cache_set: victim not found" +msgstr "cache_set: no s'ha trobat la víctima" + +#: timezone/zic.c:1757 +msgid "can't determine time zone abbreviation to use just after until time" +msgstr "no s'ha pogut determinar l'abreviatura de zona horària a usar just després de la data límit (until)" + +#: sunrpc/svc_simple.c:85 +#, c-format +msgid "can't reassign procedure number %ld\n" +msgstr "no s'ha pogut reassignar el procediment número %ld\n" + +#: elf/dl-reloc.c:152 +msgid "can't restore segment prot after reloc" +msgstr "no s'ha pogut restaurar la protecció del segment després de relocalitzar-lo" + +#: locale/programs/localedef.c:487 +#, c-format +msgid "cannot add already read locale `%s' a second time" +msgstr "no es pot afegir altra volta el locale ja llegit «%s»" + +#: elf/dl-deps.c:454 +msgid "cannot allocate dependency list" +msgstr "no s'ha pogut reservar la llista de dependències" + +#: elf/dl-load.c:1039 +msgid "cannot allocate memory for program header" +msgstr "no s'ha pogut reservar memòria per la capçalera del programa" + +#: elf/dl-load.c:348 +msgid "cannot allocate name record" +msgstr "no s'ha pogut reservar el registre de nom" + +#: elf/sprof.c:930 elf/sprof.c:982 +msgid "cannot allocate symbol data" +msgstr "no s'han pogut reservar les dades de símbols" + +#: elf/dl-deps.c:484 +msgid "cannot allocate symbol search list" +msgstr "no s'ha pogut reservar la llista de recerca de símbols" + +#: elf/dl-version.c:292 +msgid "cannot allocate version reference table" +msgstr "no s'ha pogut reservar la taula de referències de versions" + +#: elf/dl-load.c:1008 +msgid "cannot change memory protections" +msgstr "no s'han pogut canviar les proteccions de memòria" + +#: elf/dl-load.c:540 +msgid "cannot create RUNPATH/RPATH copy" +msgstr "no s'ha pogut crear una còpia de RUNPATH/RPATH" + +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 +msgid "cannot create cache for search path" +msgstr "no s'ha pogut crear la memòria cau dels camins de recerca" + +#: elf/sprof.c:715 elf/sprof.c:773 +msgid "cannot create internal descriptor" +msgstr "no s'ha pogut crear un descriptor intern" + +#: elf/sprof.c:413 +msgid "cannot create internal descriptors" +msgstr "no s'han pogut crear els descriptors interns" + +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "no s'ha pogut crear el fitxer d'eixida «%s» de la categoria «%s»" + +#: elf/dl-load.c:590 +msgid "cannot create search path array" +msgstr "no s'ha pogut crear el vector de camins de recerca" + +#: elf/dl-load.c:1125 +msgid "cannot create searchlist" +msgstr "no s'ha pogut crear la llista de recerca" + +#: elf/dl-load.c:830 elf/dl-load.c:1724 +msgid "cannot create shared object descriptor" +msgstr "no s'ha pogut crear el descriptor d'objecte compartit" + +#: catgets/gencat.c:1315 +msgid "cannot determine escape character" +msgstr "no s'ha pogut determinar el caràcter d'escapada" + +#: elf/dl-load.c:958 +msgid "cannot dynamically load executable" +msgstr "no s'ha pogut carregar dinàmicament l'executable" + +#: nscd/connections.c:183 +#, c-format +msgid "cannot enable socket to accept connections: %s" +msgstr "no s'ha pogut habilitar el connector per acceptar connexions: %s" + +#: elf/dl-open.c:121 +msgid "cannot extend global scope" +msgstr "no es pot estendre l'àmbit global" + +#: sunrpc/rpc_main.c:343 +#, c-format +msgid "cannot find C preprocessor: %s \n" +msgstr "no s'ha pogut trobar el preprocessador de C: %s\n" + +#: sunrpc/rpc_main.c:351 +msgid "cannot find any C preprocessor (cpp)\n" +msgstr "no s'ha pogut trobar cap preprocessador de C (cpp)\n" + +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "no s'ha pogut generar el fitxer d'eixida" + +#: nscd/connections.c:227 +#, c-format +msgid "cannot handle old request version %d; current version is %d" +msgstr "no s'ha pogut atendre la petició amb versió antiga %d; la versió actual és %d" + +#: elf/sprof.c:670 +msgid "cannot load profiling data" +msgstr "no s'han pogut carregar les dades de perfilat" + +#: elf/dl-reloc.c:62 +msgid "cannot make segment writable for relocation" +msgstr "no s'ha pogut fer d'escriptura el segment per relocalitzar-lo" + +#: elf/dl-load.c:1024 +msgid "cannot map zero-fill pages" +msgstr "no s'han pogut mapar les pàgines plenes de zeros" + +#: inet/rcmd.c:421 +msgid "cannot open" +msgstr "no s'ha pogut obrir" + +#: sysdeps/unix/sysv/linux/lddlibc4.c:64 +#, c-format +msgid "cannot open `%s'" +msgstr "no s'ha pogut obrir «%s»" + +#: debug/pcprofiledump.c:96 +msgid "cannot open input file" +msgstr "no s'ha pogut obrir el fitxer d'entrada" + +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 +#, c-format +msgid "cannot open input file `%s'" +msgstr "no s'ha pogut obrir el fitxer d'entrada «%s»" + +#: locale/programs/localedef.c:203 locale/programs/localedef.c:218 +#: locale/programs/localedef.c:513 locale/programs/localedef.c:533 +#, c-format +msgid "cannot open locale definition file `%s'" +msgstr "no s'ha pogut obrir el fitxer «%s» de definició del locale" + +#: iconv/iconv_prog.c:209 +msgid "cannot open output file" +msgstr "no s'ha pogut obrir el fitxer d'eixida" + +#: catgets/gencat.c:949 catgets/gencat.c:990 +#, c-format +msgid "cannot open output file `%s'" +msgstr "no s'ha pogut obrir el fitxer d'eixida «%s»" + +#: locale/programs/locfile.c:571 +#, c-format +msgid "cannot open output file `%s' for category `%s'" +msgstr "no s'ha pogut obrir el fitxer d'eixida «%s» de la categoria «%s»" + +#: elf/dl-load.c:1737 +msgid "cannot open shared object file" +msgstr "no s'ha pogut obrir el fitxer objecte compartit" + +#: nscd/connections.c:165 +#, c-format +msgid "cannot open socket: %s" +msgstr "no s'ha pogut obrir el connector: %s" + +# ivb (2001/10/28) +# ivb Es refereix a /dev/zero . +#: elf/dl-load.c:822 +msgid "cannot open zero fill device" +msgstr "no s'ha pogut obrir el dispositiu de zeros" + +#: locale/programs/charmap-dir.c:61 +#, c-format +msgid "cannot read character map directory `%s'" +msgstr "no s'ha pogut llegir el directori «%s» de taules de caràcters" + +#: nscd/connections.c:125 +msgid "cannot read configuration file; this is fatal" +msgstr "no s'ha pogut llegir el fitxer de configuració; açò és fatal" + +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 +msgid "cannot read file data" +msgstr "no s'han pogut llegir les dades del fitxer" + +#: debug/pcprofiledump.c:102 +msgid "cannot read header" +msgstr "no s'ha pogut llegir la capçalera" + +#: sysdeps/unix/sysv/linux/lddlibc4.c:68 +#, c-format +msgid "cannot read header from `%s'" +msgstr "no s'ha pogut llegir la capçalera de «%s»" + +#: nscd/nscd_stat.c:128 +msgid "cannot read statistics data" +msgstr "no s'han pogut llegir les dades estadístiques" + +# ivb (2001/11/05) +# ivb Apareix quan no es troba el repertori en un arbre de repertoris. +#: locale/programs/repertoire.c:331 +msgid "cannot safe new repertoire map" +msgstr "no s'ha pogut afegir el nou mapa de repertori" + +#: elf/dl-load.c:784 +msgid "cannot stat shared object" +msgstr "ha fallat stat() sobre l'objecte compartit" + +#: nscd/cache.c:150 nscd/connections.c:151 +#, c-format +msgid "cannot stat() file `%s': %s" +msgstr "ha fallat stat() sobre el fitxer «%s»: %s" + +#: locale/programs/localedef.c:230 +#, c-format +msgid "cannot write output files to `%s'" +msgstr "no s'han pogut escriure els fitxers d'eixida en «%s»" + +#: nscd/connections.c:265 nscd/connections.c:287 +#, c-format +msgid "cannot write result: %s" +msgstr "no s'ha pogut escriure el resultat: %s" + +#: nscd/nscd_stat.c:87 +#, c-format +msgid "cannot write statistics: %s" +msgstr "no s'han pogut escriure les estadístiques: %s" + +#: locale/programs/ld-ctype.c:517 +#, c-format +msgid "character '%s' in class `%s' must be in class `%s'" +msgstr "el caràcter «%s» de la classe «%s» ha de ser en la classe «%s»" + +#: locale/programs/ld-ctype.c:532 +#, c-format +msgid "character '%s' in class `%s' must not be in class `%s'" +msgstr "el caràcter «%s» de la classe «%s» no ha de ser en la classe «%s»" + +#: locale/programs/ld-ctype.c:587 +msgid "character not defined in character map" +msgstr "el caràcter no ha estat definit en la taula de caràcters" + +#: locale/programs/ld-ctype.c:461 +#, c-format +msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" +msgstr "el caràcter L«\\u%0*x» de la classe «%s» ha de ser en la classe «%s»" + +#: locale/programs/ld-ctype.c:475 +#, c-format +msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" +msgstr "el caràcter L«\\u%0*x» de la classe «%s» no ha de ser en la classe «%s»" + +#: locale/programs/ld-ctype.c:3032 +#, c-format +msgid "character `%s' not defined while needed as default value" +msgstr "el caràcter «%s», necessari com a valor per defecte, no ha estat definit" + +#: locale/programs/ld-ctype.c:1223 +#, c-format +msgid "character class `%s' already defined" +msgstr "la classe de caràcters «%s» ja ha estat definida" + +#: locale/programs/ld-ctype.c:1255 +#, c-format +msgid "character map `%s' already defined" +msgstr "el mapa de caràcters «%s» ja ha estat definit" + +#: locale/programs/charmap.c:254 +#, c-format +msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" +msgstr "el mapa de caràcters «%s» no és compatible amb ASCII, el locale no és conforme amb ISO C\n" + +#: locale/programs/charmap.c:140 +#, c-format +msgid "character map file `%s' not found" +msgstr "no s'ha trobat el fitxer «%s» de mapa de caràcters" + +#: locale/programs/charmap.c:465 +msgid "character sets with locking states are not supported" +msgstr "els jocs de caràcters amb estats blocants no són suportats" + +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "formatge" + +#: locale/programs/localedef.c:482 +msgid "circular dependencies between locale definitions" +msgstr "hi ha dependències circulars entre les definicions dels locales" + +#: sunrpc/clnt_raw.c:115 +msgid "clnt_raw.c - Fatal header serialization error." +msgstr "clnt_raw.c - Error fatal de serialització de capçaleres." + +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 +msgid "clnttcp_create: out of memory\n" +msgstr "clnttcp_create: no resta memòria\n" + +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 +msgid "clntudp_create: out of memory\n" +msgstr "clntudp_create: no resta memòria\n" + +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 +msgid "clntunix_create: out of memory\n" +msgstr "clntunix_create: no resta memòria\n" + +#: sunrpc/rpc_scan.c:116 +msgid "constant or identifier expected" +msgstr "cal una constant o un identificador" + +#: iconv/iconv_prog.c:231 +#, c-format +msgid "conversion from `%s' to `%s' not supported" +msgstr "la conversió des de «%s» fins «%s» no és suportada" + +#: catgets/gencat.c:1289 +msgid "conversion modules not available" +msgstr "els mòduls de conversió no es troben disponibles" + +#: locale/programs/ld-monetary.c:902 +msgid "conversion rate value cannot be zero" +msgstr "el valor de la taxa de conversió no pot ser zero" + +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 +msgid "conversion stopped due to problem in writing the output" +msgstr "la conversió s'ha detingut degut a un problema en escriure l'eixida" + +#: sunrpc/svc_simple.c:93 +msgid "couldn't create an rpc server\n" +msgstr "no s'ha pogut crear un servidor rpc\n" + +#: sunrpc/svc_simple.c:101 +#, c-format +msgid "couldn't register prog %ld vers %ld\n" +msgstr "no s'ha pogut donar d'alta el programa %ld amb versió %ld\n" + +#: nss/getent.c:51 +msgid "database [key ...]" +msgstr "basededades [clau ...]" + +#: locale/programs/charmap.c:197 +#, c-format +msgid "default character map file `%s' not found" +msgstr "no s'ha trobat el fitxer «%s» de mapa de caràcters per defecte" + +#: locale/programs/charmap.c:397 +#, c-format +msgid "duplicate definition of <%s>" +msgstr "la definició de «%s» és duplicada" + +#: locale/programs/ld-collate.c:3062 +#, c-format +msgid "duplicate definition of script `%s'" +msgstr "la definició de l'escriptura «%s» és duplicada" + +#: catgets/gencat.c:430 +msgid "duplicate set definition" +msgstr "la definició del joc de missatges és duplicada" + +#: timezone/zic.c:1009 +#, c-format +msgid "duplicate zone name %s (file \"%s\", line %d)" +msgstr "el nom de zona «%s» (fitxer «%s», línia %d) és duplicat" + +#: locale/programs/ld-ctype.c:2559 +#, c-format +msgid "duplicated definition for mapping `%s'" +msgstr "la definició del mapa «%s» és duplicada" + +#: catgets/gencat.c:631 +msgid "duplicated message identifier" +msgstr "l'identificador de missatge és duplicat" + +#: catgets/gencat.c:603 +msgid "duplicated message number" +msgstr "el número de missatge és duplicat" + +#: locale/programs/ld-ctype.c:2370 +msgid "ellipsis range must be marked by two operands of same type" +msgstr "el rang amb el·lipsi ha d'estar marcat per dos operands del mateix tipus" + +#: sunrpc/rpc_scan.c:383 +msgid "empty char string" +msgstr "la cadena de caràcters és buida" + +#: elf/dl-open.c:219 +msgid "empty dynamic string token substitution" +msgstr "la substitució del component cadena dinàmica és buida" + +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "la substitució del component cadena dinàmica és buida" + +#: sunrpc/svc_udp.c:454 +msgid "enablecache: cache already enabled" +msgstr "enablecache: la memòria cau ja està habilitada" + +#: sunrpc/svc_udp.c:460 +msgid "enablecache: could not allocate cache" +msgstr "enablecache: no s'ha pogut reservar espai per la memòria cau" + +#: sunrpc/svc_udp.c:468 +msgid "enablecache: could not allocate cache data" +msgstr "enablecache: no s'ha pogut reservar espai per les dades de la memòria cau" + +#: sunrpc/svc_udp.c:475 +msgid "enablecache: could not allocate cache fifo" +msgstr "enablecache: no s'ha pogut reservar la cua FIFO de la memòria cau" + +#: iconv/iconv_prog.c:61 +msgid "encoding for output" +msgstr "codificació de l'eixida" + +#: iconv/iconv_prog.c:60 +msgid "encoding of original text" +msgstr "codificació del text original" + +# ivb (2001/11/07) +# ivb El «caller» és el programa «nscd» que prova de contactar amb el +# ivb dimoni «nscd» per consultar la memòria cau o invalidar-la. Per +# ivb això faig servir «programa de control» (com «ncd» amb «named» o +# ivb «chronyc» amb «chronyd»). +#: nscd/connections.c:366 nscd/connections.c:460 +#, c-format +msgid "error getting callers id: %s" +msgstr "error en obtenir l'identificador del programa de control: %s" + +#: locale/programs/ld-collate.c:3032 +msgid "error while adding equivalent collating symbol" +msgstr "error en afegir un símbol d'ordenació equivalent" + +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 +#, c-format +msgid "error while closing input `%s'" +msgstr "error en tancar l'entrada «%s»" + +#: iconv/iconv_prog.c:330 +msgid "error while closing output file" +msgstr "error en tancar el fitxer d'eixida" + +#: elf/sprof.c:706 +msgid "error while closing the profiling data file" +msgstr "error en tancar el fitxer de dades de perfilat" + +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 +msgid "error while reading the input" +msgstr "error en llegir l'entrada" + +#: locale/programs/locfile.h:59 +msgid "expect string argument for `copy'" +msgstr "cal una cadena com a argument de «copy»" + +#: timezone/zic.c:899 +msgid "expected continuation line not found" +msgstr "cal una línia de continuació, però no es troba" + +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "hi ha un punt i coma sobrant al final" + +#: elf/sprof.c:404 +#, c-format +msgid "failed to load shared object `%s'" +msgstr "no s'ha pogut carregar l'objecte compartit «%s»" + +#: elf/sprof.c:600 +msgid "failed to load symbol data" +msgstr "no s'ha pogut carregar les dades simbòliques" + +#: elf/dl-load.c:771 +msgid "failed to map segment from shared object" +msgstr "no s'ha pogut mapar un segment de l'objecte compartit" + +#: elf/sprof.c:698 +msgid "failed to mmap the profiling data file" +msgstr "ha fallat mmap() sobre el fitxer de dades de perfilat" + +#: iconv/iconv_prog.c:235 +msgid "failed to start conversion processing" +msgstr "no s'ha pogut començar el processament de la conversió" + +#: locale/programs/locfile.c:596 +#, c-format +msgid "failure while writing data for category `%s'" +msgstr "no s'han pogut escriure les dades de la categoria «%s»" + +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "el fitxer «%s» està truncat\n" + +#. TRANS: the file will not be removed; this is an +#. TRANS: informative message. +#: sunrpc/rpc_main.c:1150 +#, c-format +msgid "file `%s' already exists and may be overwritten\n" +msgstr "el fitxer «%s» ja existeix i podria ser sobreescrit\n" + +#: elf/dl-load.c:1247 +msgid "file too short" +msgstr "el fitxer és massa curt" + +#: inet/rcmd.c:423 +msgid "fstat failed" +msgstr "ha fallat fstat()" + +#: locale/programs/linereader.c:388 +msgid "garbage at end of character code specification" +msgstr "fem al final de l'especificació de codi de caràcter" + +#: locale/programs/linereader.c:276 +msgid "garbage at end of number" +msgstr "fem al final del número" + +#: elf/sprof.c:77 +msgid "generate call graph" +msgstr "genera un gràfic de crides" + +#: elf/sprof.c:76 +msgid "generate flat profile with counts and ticks" +msgstr "genera un perfil pla amb recomptes i unitats de temps" + +#: sunrpc/get_myaddr.c:78 +msgid "get_myaddress: ioctl (get interface configuration)" +msgstr "get_myaddress: ioctl (obtenir configuració de la interfície)" + +#: nss/getent.c:702 +msgid "getent - get entries from administrative database." +msgstr "getent - obté les entrades de les bases de dades d'administració." + +#: nscd/connections.c:221 +#, c-format +msgid "handle_request: request received (Version = %d)" +msgstr "handle_request: s'ha rebut una petició (Versió = %d)" + +#: timezone/zic.c:643 +msgid "hard link failed, symbolic link used" +msgstr "no s'ha pogut crear un enllaç fort, se n'ha usat un de simbòlic" + +#: inet/rcmd.c:429 +msgid "hard linked somewhere" +msgstr "té un enllaç fort en altre lloc" + +# ivb (2001/11/05) +# ivb El rang també pot contenir dígits. El text original pot fer pensar +# ivb que _només_ s'accepten lletres majúscules. +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 +msgid "hexadecimal range format should use only capital characters" +msgstr "les lletres usades en un rang amb format hexadecimal han de ser majúscules" + +#: timezone/zic.c:1193 +msgid "illegal CORRECTION field on Leap line" +msgstr "el camp de correcció de la línia de traspàs (Leap) no és vàlid" + +#: timezone/zic.c:1197 +msgid "illegal Rolling/Stationary field on Leap line" +msgstr "el camp «Rolling/Stationary» de la línia de traspàs (Leap) no és vàlid" + +#: sunrpc/rpc_scan.c:312 +msgid "illegal character in file: " +msgstr "hi ha un caràcter no permés en el fitxer: " + +#: locale/programs/linereader.c:600 +msgid "illegal escape sequence at end of string" +msgstr "hi ha una seqüència d'escapada no permesa al final de la cadena" + +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "hi ha una seqüència d'entrada no vàlida en la posició %Zd" + +#: iconv/iconv_prog.c:469 +#, c-format +msgid "illegal input sequence at position %ld" +msgstr "hi ha una seqüència d'entrada no vàlida en la posició %ld" + +#: sunrpc/rpc_main.c:463 +#, c-format +msgid "illegal nettype :`%s'\n" +msgstr "el tipus de xarxa no és permés: «%s»\n" + +#: catgets/gencat.c:403 catgets/gencat.c:480 +msgid "illegal set number" +msgstr "el número de joc de missatges no és vàlid" + +#: locale/programs/ld-ctype.c:1229 +#, c-format +msgid "implementation limit: no more than %Zd character classes allowed" +msgstr "límit d'implementació: no es permeten més de %Zd classes de caràcters" + +#: locale/programs/ld-ctype.c:1261 +#, c-format +msgid "implementation limit: no more than %d character maps allowed" +msgstr "límit d'implementació: no es permeten més de %d taules de caràcters" + +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 +msgid "incomplete character or shift sequence at end of buffer" +msgstr "hi ha un caràcter o seqüència de desplaçament incompleta al final de la memòria intermèdia" + +#: timezone/zic.c:856 +msgid "input line of unknown type" +msgstr "la línia introduïda pertany a un tipus desconegut" + +#: elf/dl-load.c:1294 +msgid "internal error" +msgstr "error intern" + +#: iconv/iconv_prog.c:477 +msgid "internal error (illegal descriptor)" +msgstr "error intern (el descriptor no és vàlid)" + +#: timezone/zic.c:1819 +msgid "internal error - addtype called with bad isdst" +msgstr "error intern - s'ha cridat addtype() amb un valor erroni per «isdst»" + +#: timezone/zic.c:1827 +msgid "internal error - addtype called with bad ttisgmt" +msgstr "error intern - s'ha cridat addtype() amb un valor erroni per «ttisgmt»" + +#: timezone/zic.c:1823 +msgid "internal error - addtype called with bad ttisstd" +msgstr "error intern - s'ha cridat addtype() amb un valor erroni per «ttisstd»" + +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 +#, c-format +msgid "internal error in %s, line %u" +msgstr "error intern en «%s», línia %u" + +#: elf/dl-load.c:1267 +msgid "invalid ELF header" +msgstr "la capçalera ELF no és vàlida" + +#: timezone/zic.c:1065 +msgid "invalid UTC offset" +msgstr "el desplaçament d'UTC no és vàlid" + +#: timezone/zic.c:1068 +msgid "invalid abbreviation format" +msgstr "el format de l'abreviatura no és vàlid" + +#: catgets/gencat.c:688 +msgid "invalid character: message ignored" +msgstr "el caràcter no és vàlid: es descarta el missatge" + +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 +msgid "invalid day of month" +msgstr "el dia del mes no és vàlid" + +#: locale/programs/charmap.c:352 +msgid "invalid definition" +msgstr "la definició no és vàlida" + +#: locale/programs/charmap.c:547 +msgid "invalid encoding given" +msgstr "la codificació especificada no és vàlida" + +#: timezone/zic.c:1322 +msgid "invalid ending year" +msgstr "l'any d'acabament no és vàlid" + +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 +msgid "invalid escape sequence" +msgstr "la seqüència d'escapada no és vàlida" + +#: timezone/zic.c:1130 +msgid "invalid leaping year" +msgstr "l'any bixest no és vàlid" + +#: catgets/gencat.c:731 +msgid "invalid line" +msgstr "la línia no és vàlida" + +#: elf/dl-open.c:349 +msgid "invalid mode for dlopen()" +msgstr "el mode de dlopen() no és vàlid" + +#: timezone/zic.c:1145 timezone/zic.c:1248 +msgid "invalid month name" +msgstr "el nom del mes no és vàlid" + +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 +#: locale/programs/repertoire.c:418 +msgid "invalid names for character range" +msgstr "els noms del rang de caràcters no són vàlids" + +#: debug/pcprofiledump.c:166 +msgid "invalid pointer size" +msgstr "el tamany del punter no és vàlid" + +#: catgets/gencat.c:549 +msgid "invalid quote character" +msgstr "el caràcter de citació no és vàlid" + +#: timezone/zic.c:964 +msgid "invalid saved time" +msgstr "el temps estalviat no és vàlid" + +#: timezone/zic.c:1297 +msgid "invalid starting year" +msgstr "l'any de començament no és vàlid" + +#: timezone/zic.c:1174 timezone/zic.c:1277 +msgid "invalid time of day" +msgstr "l'hora del dia no és vàlida" + +#: timezone/zic.c:1375 +msgid "invalid weekday name" +msgstr "el nom del dia de la setmana no és vàlid" + +#: nscd/connections.c:479 +#, c-format +msgid "key length in request too long: %d" +msgstr "la longitud de la clau de la petició és massa gran: %d" + +#: elf/ldconfig.c:794 +#, c-format +msgid "libc4 library %s in wrong directory" +msgstr "la biblioteca «%s» per libc4 es troba en un directori incorrecte" + +#: elf/ldconfig.c:788 +#, c-format +msgid "libc5 library %s in wrong directory" +msgstr "la bibliotexa «%s» per libc5 es troba en un directori incorrecte" + +#: elf/ldconfig.c:791 +#, c-format +msgid "libc6 library %s in wrong directory" +msgstr "la biblioteca «%s» per libc6 es troba en un directori incorrecte" + +#: elf/ldconfig.c:821 +#, c-format +msgid "libraries %s and %s in directory %s have same soname but different type." +msgstr "les biblioteques «%s» i «%s» del directori «%s» tenen el mateix nom d'objecte compartit però diferent tipus." + +#: timezone/zic.c:836 +msgid "line too long" +msgstr "la línia és massa llarga" + +#: iconv/iconv_prog.c:63 +msgid "list all known coded character sets" +msgstr "llista tots els jocs de caràcters codificats coneguts" + +#: locale/programs/locfile.h:63 +msgid "locale name should consist only of portable characters" +msgstr "el nom del locale només ha de contenir caràcters portables" + +#: inet/rcmd.c:414 +msgid "lstat failed" +msgstr "ha fallat lstat()" + +#: malloc/memusagestat.c:59 +msgid "make output graphic VALUE pixel high" +msgstr "fa el gràfic d'eixida de VALOR píxels d'altura" + +#: malloc/memusagestat.c:58 +msgid "make output graphic VALUE pixel wide" +msgstr "fa el gràfic d'eixida de VALOR píxels d'amplada" + +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: no es poden gestionar més de 8 arguments\n" + +#: catgets/gencat.c:785 +msgid "malformed line ignored" +msgstr "es descarta la línia malmesa" + +#: elf/sprof.c:550 +msgid "mapping of section header string table failed" +msgstr "no s'ha pogut mapar la taula de cadenes de capçalera de secció" + +#: elf/sprof.c:540 +msgid "mapping of section headers failed" +msgstr "no s'han pogut mapar les capçaleres de secció" + +#: malloc/mcheck.c:296 +msgid "memory clobbered before allocated block\n" +msgstr "s'ha sobreescrit la memòria d'abans del bloc reservat\n" + +#: malloc/mcheck.c:299 +msgid "memory clobbered past end of allocated block\n" +msgstr "s'ha sobreescrit la memòria de després del bloc reservat\n" + +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 +msgid "memory exhausted" +msgstr "la memòria s'ha exhaurit" + +#: malloc/mcheck.c:293 +msgid "memory is consistent, library is buggy\n" +msgstr "la memòria és consistent; la biblioteca té errors\n" + +#: elf/cache.c:143 +msgid "mmap of cache file failed.\n" +msgstr "Ha fallat mmap() sobre el fitxer de memòria cau\n" + +#: elf/../sysdeps/generic/readelflib.c:110 +msgid "more than one dynamic segment\n" +msgstr "hi ha més d'un segment dinàmic\n" + +#: timezone/zic.c:959 +msgid "nameless rule" +msgstr "la regla no té nom" + +#: nis/nss_nisplus/nisplus-publickey.c:281 +#: nis/nss_nisplus/nisplus-publickey.c:287 +#: nis/nss_nisplus/nisplus-publickey.c:346 +#: nis/nss_nisplus/nisplus-publickey.c:355 +#, c-format +msgid "netname2user: (nis+ lookup): %s\n" +msgstr "netname2user: (recerca nis+): %s\n" + +#: nis/nss_nisplus/nisplus-publickey.c:300 +#, c-format +msgid "netname2user: DES entry for %s in directory %s not unique" +msgstr "netname2user: l'entrada DES de «%s» en el directori «%s» no és única" + +#: nis/nss_nisplus/nisplus-publickey.c:368 +#, c-format +msgid "netname2user: LOCAL entry for %s in directory %s not unique" +msgstr "netname2user: l'entrada LOCAL de «%s» en el directori «%s» no és única" + +#: nis/nss_nisplus/nisplus-publickey.c:207 +#, c-format +msgid "netname2user: missing group id list in `%s'." +msgstr "netname2user: manca la llista d'identificadors de grup en «%s»." + +#: nis/nss_nisplus/nisplus-publickey.c:318 +#, c-format +msgid "netname2user: principal name `%s' too long" +msgstr "netname2user: el nom principal «%s» és massa llarg" + +#: nis/nss_nisplus/nisplus-publickey.c:375 +msgid "netname2user: should not have uid 0" +msgstr "netname2user: no ha de tenir l'UID 0" + +#: sunrpc/svc_simple.c:168 +#, c-format +msgid "never registered prog %d\n" +msgstr "el programa %d mai no s'ha donat d'alta\n" + +#: locale/programs/repertoire.c:272 +msgid "no or value given" +msgstr "no s'ha especificat un valor o " + +#: timezone/zic.c:2148 +msgid "no day in month matches rule" +msgstr "cap dia del mes acompleix la regla" + +#: locale/programs/ld-collate.c:1770 +msgid "no definition of `UNDEFINED'" +msgstr "no s'ha definit «UNDEFINED»" + +#: elf/sprof.c:272 +#, c-format +msgid "no filename for profiling data given and shared object `%s' has no soname" +msgstr "no s'ha especificat un fitxer de dades de perfilat i «%s» no té nom d'objecte compartit" + +#: locale/programs/ld-ctype.c:747 +msgid "no input digits defined and none of the standard names in the charmap" +msgstr "no s'han definit dígits d'entrada i cap dels noms estàndard es troba en el mapa de caràcters" + +#: locale/programs/locfile.h:82 +msgid "no other keyword shall be specified when `copy' is used" +msgstr "no s'ha d'especificar cap altra paraula clau quan s'use «copy»" + +#: locale/programs/ld-ctype.c:3351 +msgid "no output digits defined and none of the standard names in the charmap" +msgstr "no s'han definit dígits d'eixida i cap del noms estàndard es troba en el mapa de caràcters" + +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 +msgid "no output file produced because warning were issued" +msgstr "no hi ha fitxer d'eixida perquè s'han produït avisos" + +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 +msgid "no symbolic name given" +msgstr "no s'ha especificat un nom simbòlic" + +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 +msgid "no symbolic name given for end of range" +msgstr "no s'ha especificat un nom simbòlic per la fi del rang" + +#: locale/programs/linereader.c:646 +msgid "non-symbolic character value should not be used" +msgstr "no s'han d'usar valors de caràcters no-simbòlics" + +#: locale/programs/ld-ctype.c:812 +msgid "not all characters used in `outdigit' are available in the charmap" +msgstr "no tots els caràcters usats en «outdigit» es troben en el mapa de caràcters" + +#: locale/programs/ld-ctype.c:829 +msgid "not all characters used in `outdigit' are available in the repertoire" +msgstr "no tots els caràcters usats en «outdigit» es troben en el repertori" + +# ivb (2001/10/31) +# ivb Cal tenir en compte que «ordinary» a l'anglés és cosa pler diferent ;) +#: inet/rcmd.c:416 +msgid "not regular file" +msgstr "no és un fitxer ordinari" + +#: nscd/nscd_stat.c:131 +#, c-format +msgid "" +"nscd configuration:\n" +"\n" +"%15d server debug level\n" +msgstr "" +"Configuració d'nscd:\n" +"\n" +"%15d nivell de depuració del servidor\n" + +#: nscd/nscd_stat.c:105 +msgid "nscd not running!\n" +msgstr "nscd no està en marxa!\n" + +#: elf/dl-load.c:1059 +msgid "object file has no dynamic section" +msgstr "el fitxer objecte no té secció dinàmica" + +#: iconv/iconv_prog.c:65 +msgid "omit invalid characters from output" +msgstr "omet en l'eixida els caràcters no vàlids" + +#: elf/dl-load.c:1309 +msgid "only ET_DYN and ET_EXEC can be loaded" +msgstr "només es poden carregar els tipus ET_DYN i ET_EXEC" + +#: locale/programs/charmap.c:637 +msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" +msgstr "només es permeten definicions «WIDTH» després de la definició «CHARMAP»" + +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 +#, c-format +msgid "order for `%.*s' already defined at %s:%Zu" +msgstr "l'ordre de «%.*s» ja ha estat definit en %s:%Zu" + +#: inet/ruserpass.c:170 inet/ruserpass.c:193 +msgid "out of memory" +msgstr "no resta memòria" + +#: iconv/iconv_prog.c:66 +msgid "output file" +msgstr "fitxer d'eixida" + +#: sunrpc/pm_getmaps.c:74 +msgid "pmap_getmaps rpc problem" +msgstr "problema d'RPC en pmap_getmaps" + +#: inet/rcmd.c:234 +msgid "poll: protocol failure in circuit setup\n" +msgstr "poll: fallada del protocol en configurar el circuit\n" + +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 +msgid "premature end of `translit_ignore' definition" +msgstr "fi prematura de la definició «translit_ignore»" + +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 +msgid "preprocessor error" +msgstr "error del preprocessador" + +#: locale/programs/ld-ctype.c:2733 +msgid "previous definition was here" +msgstr "la definició prèvia es troba ací" + +#: elf/sprof.c:74 +msgid "print list of count paths and their number of use" +msgstr "mostra una llista de camins de recompte i llurs nombres d'ús" + +#: iconv/iconv_prog.c:68 +msgid "print progress information" +msgstr "mostra informació del progrés" + +#: elf/sprof.c:687 +#, c-format +msgid "profiling data file `%s' does not match shared object `%s'" +msgstr "el fitxer «%s» de dades de perfilat no correspon a l'objecte compartit «%s»" + +#: sunrpc/rpcinfo.c:237 sunrpc/rpcinfo.c:383 +#, c-format +msgid "program %lu is not available\n" +msgstr "el programa %lu no és disponible\n" + +#: sunrpc/rpcinfo.c:264 sunrpc/rpcinfo.c:310 sunrpc/rpcinfo.c:333 +#: sunrpc/rpcinfo.c:407 sunrpc/rpcinfo.c:453 sunrpc/rpcinfo.c:476 +#: sunrpc/rpcinfo.c:510 +#, c-format +msgid "program %lu version %lu is not available\n" +msgstr "el programa %lu, versió %lu, no és disponible\n" + +#: sunrpc/rpcinfo.c:515 +#, c-format +msgid "program %lu version %lu ready and waiting\n" +msgstr "el programa %lu, versió %lu, és llest i esperant\n" + +#: inet/rcmd.c:271 +#, c-format +msgid "rcmd: %s: short read" +msgstr "rcmd: %s: lectura incompleta" + +#: inet/rcmd.c:231 +#, c-format +msgid "rcmd: poll (setting up stderr): %m\n" +msgstr "rcmd: poll (en preparar l'exida estàndard d'errors): %m\n" + +#: inet/rcmd.c:159 +msgid "rcmd: socket: All ports in use\n" +msgstr "rcmd: socket: Tots els ports estan sent usats\n" + +#: inet/rcmd.c:221 +#, c-format +msgid "rcmd: write (setting up stderr): %m\n" +msgstr "rcmd: write (en preparar l'eixida estàndard d'errors): %m\n" + +#: sunrpc/svc_simple.c:108 +msgid "registerrpc: out of memory\n" +msgstr "registerrpc: no resta memòria\n" + +#: timezone/zic.c:1880 +msgid "repeated leap second moment" +msgstr "el moment de segon intercalar és repetit" + +#: locale/programs/repertoire.c:342 +#, c-format +msgid "repertoire map file `%s' not found" +msgstr "no s'ha trobat el fitxer «%s» de mapa de repertori" + +#: locale/programs/charmap.c:1068 +msgid "resulting bytes for range not representable." +msgstr "els octets resultants del rang no són respresentables" + +#: sunrpc/rpc_main.c:1117 +msgid "rpcgen: arglist coding error\n" +msgstr "rpcgen: error en codificar els arguments\n" + +#: sunrpc/rpc_main.c:1105 +msgid "rpcgen: too many defines\n" +msgstr "rpcgen: hi ha massa definicions\n" + +#: sunrpc/rpcinfo.c:732 +#, c-format +msgid "rpcinfo: %s is unknown host\n" +msgstr "rpcinfo: l'estació «%s» no és coneguda\n" + +#: sunrpc/rpcinfo.c:695 +#, c-format +msgid "rpcinfo: %s is unknown service\n" +msgstr "rpcinfo: el servei «%s» no és conegut\n" + +#: sunrpc/rpcinfo.c:665 +#, c-format +msgid "rpcinfo: Could not delete registration for prog %s version %s\n" +msgstr "rpcinfo: no s'ha pogut donar de baixa el programa «%s», versió %s\n" + +#: sunrpc/rpcinfo.c:637 +#, c-format +msgid "rpcinfo: broadcast failed: %s\n" +msgstr "rpcinfo: la difusió ha fallat: %s\n" + +#: sunrpc/rpcinfo.c:556 sunrpc/rpcinfo.c:563 +msgid "rpcinfo: can't contact portmapper" +msgstr "rpcinfo: no s'ha pogut contactar amb el mapador de ports" + +#: timezone/zic.c:749 timezone/zic.c:751 +msgid "same rule name in multiple files" +msgstr "el mateix nom de regla és repetit en diversos fitxers" + +#: elf/dl-load.c:1104 +msgid "shared object cannot be dlopen()ed" +msgstr "ha fallat dlopen() sobre l'objecte compartit" + +#: elf/dl-close.c:61 +msgid "shared object not open" +msgstr "l'objecte compartit no és obert" + +#: nscd/connections.c:493 +#, c-format +msgid "short read while reading request key: %s" +msgstr "lectura incompleta en llegir la clau de la petició: %s" + +#: nscd/connections.c:443 +#, c-format +msgid "short read while reading request: %s" +msgstr "lectura incompleta en llegir la petició: %s" + +#: nscd/grpcache.c:193 nscd/hstcache.c:278 nscd/pwdcache.c:189 +#, c-format +msgid "short write in %s: %s" +msgstr "escriptura incompleta en «%s»: %s" + +#: inet/rcmd.c:261 +msgid "socket: protocol failure in circuit setup\n" +msgstr "socket: fallada del protocol en configurar el circuit\n" + +#: timezone/zic.c:820 +msgid "standard input" +msgstr "entrada estàndard" + +#: locale/programs/ld-ctype.c:1681 +msgid "start and end character sequence of range must have the same length" +msgstr "les seqüències de caràcters inicial i final del rang han de tenir la mateixa longitud" + +#: timezone/zic.c:1331 +msgid "starting year greater than ending year" +msgstr "l'any de començament és major que el d'acabament" + +#: timezone/zic.c:1303 timezone/zic.c:1328 +msgid "starting year too high to be represented" +msgstr "l'any de començament és massa alt per ser representat" + +#: timezone/zic.c:1301 timezone/zic.c:1326 +msgid "starting year too low to be represented" +msgstr "l'any de començament és massa baix per ser representat" + +#: iconv/iconv_prog.c:67 +msgid "suppress warnings" +msgstr "elimina els avisos" + +# ivb (2001/10/28) +# ivb «-» no es refereix a l'entrada estàndard. +#: sunrpc/svc_run.c:76 +msgid "svc_run: - poll failed" +msgstr "svc_run: ha fallat poll()" + +#: sunrpc/svc_tcp.c:170 +msgid "svc_tcp.c - cannot getsockname or listen" +msgstr "svc_tcp.c - ha fallat getsockname() o listen()" + +#: sunrpc/svc_tcp.c:155 +msgid "svc_tcp.c - tcp socket creation problem" +msgstr "svc_tcp.c - problemes en crear un connector TCP" + +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 +msgid "svc_tcp: makefd_xprt: out of memory\n" +msgstr "svc_tcp: makefd_xprt: no resta memòria\n" + +#: sunrpc/svc_unix.c:146 +msgid "svc_unix.c - AF_UNIX socket creation problem" +msgstr "svc_unix.c - problemes en crear un connector AF_UNIX" + +#: sunrpc/svc_unix.c:162 +msgid "svc_unix.c - cannot getsockname or listen" +msgstr "svc_unix.c - ha fallat getsockname() o listen()" + +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 +msgid "svc_unix: makefd_xprt: out of memory\n" +msgstr "svc_unix: makefd_xprt: no resta memòria\n" + +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 +msgid "svctcp_create: out of memory\n" +msgstr "svctcp_create: no resta memòria\n" + +#: sunrpc/svc_udp.c:141 +msgid "svcudp_create - cannot getsockname" +msgstr "svcudp_create: ha fallat getsockname()" + +#: sunrpc/svc_udp.c:149 sunrpc/svc_udp.c:155 sunrpc/svc_udp.c:161 +msgid "svcudp_create: out of memory\n" +msgstr "svcudp_create: no resta memòria\n" + +#: sunrpc/svc_udp.c:127 +msgid "svcudp_create: socket creation problem" +msgstr "svcudp_create: problemes en crear un connector" + +#: sunrpc/svc_udp.c:177 +msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" +msgstr "svcudp_create: «xp_pad» és massa menut per «IP_PKTINFO»\n" + +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 +msgid "svcunix_create: out of memory\n" +msgstr "svcunix_create: no resta memòria\n" + +#: locale/programs/linereader.c:750 +#, c-format +msgid "symbol `%.*s' not in charmap" +msgstr "el símbol «%.*s» no es troba en el mapa de caràcters" + +#: locale/programs/linereader.c:771 +#, c-format +msgid "symbol `%.*s' not in repertoire map" +msgstr "el símbol «%.*s» no es troba en el mapa de repertori" + +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 +#, c-format +msgid "symbol `%s'" +msgstr "el símbol «%s»" + +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 +#, c-format +msgid "symbol `%s' has the same encoding as" +msgstr "el símbol «%s» té la mateixa codificació que" + +#: locale/programs/ld-collate.c:1552 +#, c-format +msgid "symbol `%s' not defined" +msgstr "el símbol «%s» no ha estat definit" + +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 +msgid "syntax error" +msgstr "error de sintaxi" + +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 +#, c-format +msgid "syntax error in %s definition: %s" +msgstr "error de sintaxi en la definició «%s»: %s" + +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 +#: locale/programs/repertoire.c:175 +#, c-format +msgid "syntax error in prolog: %s" +msgstr "error de sintaxi en el pròleg: %s" + +#: locale/programs/repertoire.c:230 locale/programs/repertoire.c:271 +#: locale/programs/repertoire.c:296 +#, c-format +msgid "syntax error in repertoire map definition: %s" +msgstr "error de sintaxi en la definició del mapa de repertori: %s" + +#: locale/programs/locfile.c:245 +msgid "syntax error: not inside a locale definition section" +msgstr "error de sintaxi: no és a dins d'una secció de definició de locale" + +#: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 +msgid "this is the first definition" +msgstr "aquesta és la primera definició" + +#: timezone/zic.c:1163 +msgid "time before zero" +msgstr "l'hora és anterior a zero" + +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 +msgid "time overflow" +msgstr "desbordament de l'hora" + +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 +#, c-format +msgid "to-value of range is smaller than from-value " +msgstr "el valor final del rang és menor que l'inicial " + +#: locale/programs/ld-ctype.c:1688 +msgid "to-value character sequence is smaller than from-value sequence" +msgstr "la seqüència de caràcters final és menor que la seqüència inicial" + +#: locale/programs/charmap.c:556 +msgid "too few bytes in character encoding" +msgstr "manquen octets en la codificació del caràcter" + +#: locale/programs/charmap.c:558 +msgid "too many bytes in character encoding" +msgstr "sobren octets en la codificació del caràcter" + +#: timezone/zic.c:1874 +msgid "too many leap seconds" +msgstr "hi ha massa segons intercalars" + +#: timezone/zic.c:1846 +msgid "too many local time types" +msgstr "hi ha massa tipus d'hora local" + +#: timezone/zic.c:1800 +msgid "too many transitions?!" +msgstr "hi ha massa transicions?!" + +#: timezone/zic.c:2171 +msgid "too many, or too long, time zone abbreviations" +msgstr "hi ha massa abreviatures de zona horària (o són massa llargues)" + +#: locale/programs/linereader.h:160 +msgid "trailing garbage at end of line" +msgstr "fem al final de la línia" + +#: sunrpc/svc_simple.c:160 +#, c-format +msgid "trouble replying to prog %d\n" +msgstr "no s'ha pogut respondre al programa %d\n" + +#: timezone/zic.c:1338 +msgid "typed single year" +msgstr "s'ha especificat un sol any" + +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 +msgid "unable to allocate buffer for input" +msgstr "no s'ha pogut reservar memòria intermèdia per l'entrada" + +#: nis/nis_callback.c:189 +msgid "unable to free arguments" +msgstr "no s'han pogut alliberar els arguments" + +# ivb (2001/11/01) +# ivb Es refereix a variables de configuració -> femení. +#: posix/getconf.c:968 posix/getconf.c:984 +msgid "undefined" +msgstr "indefinida" + +# ivb (2001/11/01) +# ivb Es refereix al tipus de la biblioteca (libc{4,5,6}) -> masculí. +#: elf/cache.c:69 +msgid "unknown" +msgstr "desconegut" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 +#, c-format +msgid "unknown character `%s'" +msgstr "el caràcter «%s» no és conegut" + +#: catgets/gencat.c:562 +#, c-format +msgid "unknown directive `%s': line ignored" +msgstr "la directiva «%s» no és coneguda: es descarta la línia" + +#: iconv/iconv_prog.c:480 +#, c-format +msgid "unknown iconv() error %d" +msgstr "error desconegut %d en iconv()" + +#: catgets/gencat.c:508 +#, c-format +msgid "unknown set `%s'" +msgstr "el joc de missatges «%s» no és conegut" + +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "l'especificació «%s» no és coneguda" + +#: timezone/zic.c:792 +msgid "unruly zone" +msgstr "la zona no té regles" + +#: catgets/gencat.c:1174 +msgid "unterminated message" +msgstr "el missatge no és terminat" + +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 +msgid "unterminated string" +msgstr "la cadena no és terminada" + +#: sunrpc/rpc_scan.c:351 sunrpc/rpc_scan.c:377 +msgid "unterminated string constant" +msgstr "la constant cadena no és terminada" + +#: locale/programs/linereader.c:474 +msgid "unterminated symbolic name" +msgstr "el nom simbòlic no és terminat" + +#: locale/programs/charmap.c:1010 +msgid "upper limit in range is not higher then lower limit" +msgstr "el límit superior del rang no és major que l'inferior" + +#: locale/programs/repertoire.c:455 +msgid "upper limit in range is not smaller then lower limit" +msgstr "el límit superior del rang no és menor que l'inferior" + +#: sunrpc/rpc_main.c:1426 +#, c-format +msgid "usage: %s infile\n" +msgstr "Forma d'ús: %s fitxerentrada\n" + +#: timezone/zic.c:2114 +msgid "use of 2/29 in non leap-year" +msgstr "s'ha usat el dia 29 de febrer en un any no-bixest" + +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 +#, c-format +msgid "value for %s must be an integer" +msgstr "el valor de «%s» ha de ser un enter" + +#: locale/programs/charmap.c:404 +#, c-format +msgid "value for <%s> must be 1 or greater" +msgstr "el valor de «%s» ha de ser 1 o major" + +#: locale/programs/charmap.c:416 +#, c-format +msgid "value of <%s> must be greater or equal than the value of <%s>" +msgstr "el valor de «%s» ha de ser major o igual que el de «%s»" + +#: timezone/zic.c:439 +msgid "warning: " +msgstr "avís: " + +#: nscd/connections.c:432 +#, c-format +msgid "while accepting connection: %s" +msgstr "en acceptar la connexió: %s" + +#: nscd/grpcache.c:150 nscd/hstcache.c:165 nscd/pwdcache.c:143 +msgid "while allocating cache entry" +msgstr "en reservar una entrada en la memòria cau" + +#: nscd/cache.c:88 +msgid "while allocating hash table entry" +msgstr "en reservar una entrada en la taula de dispersió" + +#: nscd/grpcache.c:100 nscd/hstcache.c:108 nscd/pwdcache.c:106 +msgid "while allocating key copy" +msgstr "en reservar una còpia de la clau" + +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "en inserir en l'arbre de recerca" + +#: catgets/gencat.c:1198 +msgid "while opening old catalog file" +msgstr "en obrir el fitxer antic de catàleg" + +#: locale/programs/locale.c:353 +msgid "while preparing output" +msgstr "en preparar l'eixida" + +#: elf/sprof.c:679 +msgid "while stat'ing profiling data file" +msgstr "en cridar stat() sobre el fitxer de dades de perfilat" + +#: locale/programs/ld-ctype.c:2394 +msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" +msgstr "cal usar l'el·lipsi simbòlica hexadecimal «..» amb els valors de rang UCS" + +#: locale/programs/ld-ctype.c:2408 +msgid "with character code range values one must use the absolute ellipsis `...'" +msgstr "cal usar l'el·lispi absoluta «...» amb els valors de rang de codis de caràcters" + +#: locale/programs/ld-ctype.c:2379 +msgid "with symbolic name range values the absolute ellipsis `...' must not be used" +msgstr "no s'ha d'usar l'el·lispsi absoluta «...» amb els valors de rang de noms simbòlics" + +#: nscd/nscd_stat.c:116 +msgid "write incomplete" +msgstr "escriptura incompleta" + +#: inet/rcmd.c:427 +msgid "writeable by other than owner" +msgstr "és modificable per altres que no en són el propietari" + +#: nscd/nscd.c:123 nscd/nscd_nischeck.c:64 nss/getent.c:761 +msgid "wrong number of arguments" +msgstr "el nombre d'arguments és incorrecte" + +#: timezone/zic.c:1121 +msgid "wrong number of fields on Leap line" +msgstr "el nombre de camps de la línia de traspàs (Leap) és incorrecte" + +#: timezone/zic.c:1212 +msgid "wrong number of fields on Link line" +msgstr "el nombre de camps de la línia d'enllaç (Link) és incorrecte" + +#: timezone/zic.c:955 +msgid "wrong number of fields on Rule line" +msgstr "el nombre de camps de la línia de regla (Rule) és incorrecte" + +#: timezone/zic.c:1025 +msgid "wrong number of fields on Zone continuation line" +msgstr "el nombre de camps de la línia de continuació de zona (Zone) és incorrecte" + +#: timezone/zic.c:983 +msgid "wrong number of fields on Zone line" +msgstr "el nombre de camps de la línia de zona (Zone) és incorrecte" + +#: sunrpc/xdr_ref.c:85 +msgid "xdr_reference: out of memory\n" +msgstr "xdr_reference: no resta memòria\n" + +#: sunrpc/xdr_rec.c:151 sunrpc/xdr_rec.c:166 +msgid "xdrrec_create: out of memory\n" +msgstr "xdrrec_create: no resta memòria\n" + +#: nis/ypclnt.c:909 +msgid "yp_update: cannot convert host to netname\n" +msgstr "yp_update: no s'ha pogut convertir el nom d'estació a nom de xarxa\n" + +#: nis/ypclnt.c:921 +msgid "yp_update: cannot get server address\n" +msgstr "yp_update: no s'ha pogut obtenir l'adreça del servidor\n" Binary files glibc-2.2.4/po/da.mo and glibc-2.2.5/po/da.mo differ diff -durpN glibc-2.2.4/po/da.po glibc-2.2.5/po/da.po --- glibc-2.2.4/po/da.po Mon Jul 23 10:54:49 2001 +++ glibc-2.2.5/po/da.po Wed Aug 29 01:09:17 2001 @@ -4,82 +4,88 @@ # msgid "" msgstr "" -"Project-Id-Version: libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-05-28 19:18-04:00\n" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-28 19:18-04:00\n" "Last-Translator: Keld Simonsen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: værdier for felt '%s' skal være i området %d...%d" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tAdgangsrettigheder :" -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tAttributter :" -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM] [-Dnavn[=værdi]] [-i størrelse] [-I [-K sekunder]] [-Y søgesti] indfil\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o udfil] [indfil]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n netid]* [-o udfil] [indfil]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s nettype]* [-o udfil] [indfil]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tAdgangsrettigheder: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tIndtastningsdata af type %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNavn : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tOffentlig nøgle: " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tType : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tUniversale adresser (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNavn : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u byte] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -109,11 +115,11 @@ msgstr "" "%15ld%% træfrate for hurtigbuffer\n" "%15s tjek /etc/%s for ændringer\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\nGruppemedlemmer :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nLevetid : " @@ -141,7 +147,7 @@ msgstr " nej" msgid " yes" msgstr " ja" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Datalængde = %u\n" @@ -198,15 +204,15 @@ msgstr " program vers proto port\n" msgid " or: " msgstr " eller: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (UDELADT)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (ændret)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regel fra '%s', linie %d)" @@ -215,22 +221,22 @@ msgstr " (regel fra '%s', linie %d)" msgid " [OPTION...]" msgstr " [FLAG...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "'%s', linie %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "'Zone %s'-linie og flaget -l udelukker hinanden" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "'Zone %s'-linie og flaget -p udelukker hinanden" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "'indfil' er nødvendig for flag til at generere skabelon.\n" @@ -244,58 +250,58 @@ msgstr "%.*s: ARGP_HELP_FMT-parameteren msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Ukendt ARGP_HELP_FMT-parameter" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "'%1$s: definition slutter ikke med 'END %1$s'" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d libs fundet i hurtigbuffer '%s'\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s i zone uden regel" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s er en 32-bit ELF-fil.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s er en 64-bit ELF-fil.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s er til ukendt maskine %d.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s er ikke en kendt bibliotekstype" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s er ikke en delt objektfil (Type: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s er ikke en symbolsk lænke\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s er ikke en ELF fil - den har de forkerte signaturtegn i starten.\n" @@ -315,12 +321,12 @@ msgstr "%s%s%s:%u: %s%sUventet fejl: %s. msgid "%s%sUnknown signal %d\n" msgstr "%s%sUkendt signal %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: fortegnsudvidelsen af %d blev forkert\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: skal være større end \n" @@ -335,87 +341,82 @@ msgstr "%s: C-præprocessoren fejlede med msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: C-præprocessoren fejlede med signal %d\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: Kan ikke oprette %s: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: Kan ikke oprette filkatalog %s: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: Kan ikke oprette lænke fra %s til %s: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: Kan ikke åbne %s: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: Kan ikke fjerne %s: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: Kan ikke aflænke %s: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Fejl ved lukning af %s: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Fejl ved læsning fra %s\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: Fejl ved skrivning til " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Fejl ved skrivning til %s\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: 'Leap'-linie i fil %s som ikke er skudsekundsfil\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Lageret opbrugt: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Mere end et -L-flag specificeret\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Mere end et -d-flag specificeret\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Mere end et -l-flag specificeret\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Mere end et -p-flag specificeret\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Mere end et -y-flag specificeret\n" @@ -431,7 +432,7 @@ msgstr "%s: For mange argumenter\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: '%s' nævnt mere end én gang i definitionen af vægt %d" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: '%s' skal være et tegn" @@ -442,7 +443,7 @@ msgstr "%s: '%s' skal være et tegn" msgid "%s: `%s' value does not match `%s' value" msgstr "%s: '%s' værdi er ikke sammenlignelig med '%s' værdi" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: '-1' skal være sidste post i '%s' feltet" @@ -452,100 +453,100 @@ msgstr "%s: '-1' skal være sidste post i msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: sorteringsrækkefølgen 'forward' og 'backward' udelukker hinanden" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: 'position' skal bruges på det samme niveau i alle sektioner" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: 'translit_start'-sektionen slutter ikke med 'translit_end'" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: bytesekvensen af det første tegn i sekvensen er ikke mindre end for det sidste tegn" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: bytesekvensen for første og sidste tegn skal have samme længde" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: kan ikke have '%s' som slutning på ellipse-interval" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: kan ikke ordne efter %.*s: symbol ikke kendt" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: tegnet '%s' i tegntabel ikke repræsenterbar med én byte" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: Tegnet '%s' brugt som standardværdi er ikke repræsenterbar med én byte" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: tegnet '%s' ikke defineret, men behøves som standardværdi" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: tegnet '%s' ikke defineret, men behøves som standardværdi" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: kommandoen var '%s', resultatet blev %d\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: retningsflag i streng %Zd i 'era'-felt er ikke '+' eller '-'" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: retningsflag i streng %Zd i 'era'-felt er ikke et enkelt tegn" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: duplikeret definition af 'default_missing'" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: duplikeret definition af kategoriversion" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: duplikeret definition af sektion '%s'" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: duplikeret definition af '%s'" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: tom kategori-beskrivelse ikke tilladt" @@ -555,19 +556,27 @@ msgstr "%s: tom kategori-beskrivelse ikk msgid "%s: empty weight string not allowed" msgstr "%s: tomt vægt-streng ikke tilladt" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: fejl i tilstandsmaskinen" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: felt '%s' erklæret mere end én gang" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: felt '%s' indeholder ikke præcis 10 elementer" @@ -579,14 +588,18 @@ msgstr "%s: felt '%s' indeholder ikke pr msgid "%s: field `%s' must not be empty" msgstr "%s: felt '%s' skal være tomt" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: felt '%s' ikke defineret" @@ -596,37 +609,38 @@ msgstr "%s: felt '%s' ikke defineret" msgid "%s: field `%s' undefined" msgstr "%s: felt '%s' udefineret" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: snavs i slutningen af tillægsværdi i streng %Zd i 'era'-felt" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: snavs i slutningen af startdato i streng %Zd i 'era'-felt" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: snavs i slutningen af slutdato i streng %Zd i 'era'-felt" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: ulovligt flag -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: ufuldstændig 'END'-linie" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%s: ugyldig undvigesekvens '%%%c' i felt '%s'" @@ -636,27 +650,27 @@ msgstr "%s: ugyldig undvigesekvens '%%%c msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: ulovlig undvigetegnsekvens i felt '%s'" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: ulovligt tal for tillægsværdi i streng %Zd i 'era'-felt" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: ulovligt antal sorteringsregler" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ugyldigt flag -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: ulovlig startdato i streng %Zd i 'era'-felt" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: ulovlig slutdato i streng %Zd i 'era'-felt" @@ -671,38 +685,38 @@ msgstr "%s: ugyldig værdi for felt '%s'" msgid "%s: language abbreviation `%s' not defined" msgstr "%s: sprog-forkortelsen '%s' ikke defineret" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: manglende 'order_end' nøgleord" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: manglende 'reorder-end' nøgleord" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: manglende 'reorder-sections-end' nøgleord" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: manglende era-format i streng %Zd i 'era'-felt" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: manglende era-navn i streng %Zd i 'era'-felt" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: duplikeret definition af orden for sektion '%s'" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: duplikeret definition af orden for unavngiven sektion" @@ -717,7 +731,7 @@ msgstr "%s: intet korrekt regulært udtry msgid "%s: no identification for category `%s'" msgstr "%s: ingen identifikation for kategori '%s'" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: ingen repræsenterbar 'default_missing' definition fundet" @@ -732,52 +746,52 @@ msgstr "%s: ikke nok sorteringsregler" msgid "%s: numeric country code `%d' not valid" msgstr "%s: numerisk landekode '%d' er ugyldig" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: flaget '%c%s' tager ikke argumenter\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: flaget '%s' er flertydigt\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: flaget '%s' skal have et argument\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: flaget '--%s' tager ikke argumenter\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaget '-W %s' tager ikke argumenter\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: flaget '-W %s' er flertydigt\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaget skal have et argument -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: rækkefølge for '%.*s' allerede defineret ved %s:%Zu" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: rækkefølge for sammenligningselement '%.*s' endnu ikke defineret" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: rækkefølge for sammenligningssymbol '%.*s' endnu ikke defineret" @@ -787,84 +801,84 @@ msgstr "%s: rækkefølge for sammenligning msgid "%s: output would overwrite %s\n" msgstr "%s: udskrift ville overskrive %s\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panik: ugyldig l_value %d\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: for tidlig slut på filen" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: sektion '%.*s' ukendt" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: startdato er ugyldig i streng %d i 'era'-felt" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: slutdato er ugyldig i streng %d i 'era'-felt" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: symbolsk interval-ellipse må ikke være fulgt umiddelbart af 'order_end'" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: symbolsk interval-ellipse må ikke komme umiddelbart efter 'order_end'" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: syntaksfejl" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: syntaksfejl i definition af ny tegnklasse" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: syntaksfejl i definition af ny tegntabel" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: tabel for class \"%s\": %lu byte\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: tabel for map \"%s\": %lu byte\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: tabel for width: %lu byte\n" @@ -874,16 +888,21 @@ msgstr "%s: tabel for width: %lu byte\n" msgid "%s: terminology language code `%s' not defined" msgstr "%s: terminologi-sprogkode '%s' ikke defineret" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: start- og slut-symbolet for et interval skal stå for tegn" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: tredje operand for værdien af felt '%s' må ikke være større end %d" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: for få værdier for felt '%s'" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -894,7 +913,12 @@ msgstr "%s: for mange regler; første ind msgid "%s: too many values" msgstr "%s: For mange værdier" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: for mange værdier for felt '%s'" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: transliterationsdata fra lokale '%s' ikke tilgængelige" @@ -904,47 +928,52 @@ msgstr "%s: transliterationsdata fra lok msgid "%s: unable to open %s: %m\n" msgstr "%s: kan ikke åbne %s: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: ukendt tegn i sammenligningsymbolnavn" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: ukendt tegn i ækvivalens-definitions-navn" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: ukendt tegn i ækvivalens-definitions-værdi" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: ukendt tegn i felt '%s'" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: ukendt sektionsnavn '%s'" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: ukendt symbol '%s' i ækvivalens-definition" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ukendt flag '%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ukendt flag '--%s'\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -958,6 +987,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: brug er %s [ -v ] [ -c grænse ] zonenavn ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: værdi for felt '%s' skal være et enkelt tegn" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: værdi for felt '%s' skal være i intervallet %d...%d" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -978,17 +1017,17 @@ msgstr "%s: værdien for feltet 'int_curr msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: værdien for feltet 'int_curr_symbol' har forkert længde" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: værdier på felt '%s' skal være lavere end 127" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: værdier for felt '%s' må ikke være større end %d" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: værdier på felt '%s' må ikke være større end %d" @@ -1011,11 +1050,11 @@ msgstr "(PROGRAMFEJL) Ingen version kend msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(PROGRAMFEJL) Flag skulle have været genkendt!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Ukendt objekt)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(ukendt fejl ved autentificering - %d)" @@ -1033,6 +1072,11 @@ msgstr "*** Filen '%s' er strippet: inge msgid "*standard input*" msgstr "*standard ind*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1046,16 +1090,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr ".lib-sektion i a.out skadet" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; nedre version = %lu, øvre version = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; hvorfor = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> og <%s> er ulovlige navne for tegnområde" @@ -1065,12 +1109,12 @@ msgstr "<%s> og <%s> er ulovlige navne f msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> og <%s> er ulovlige navne for tegnområde" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr "tegnet må ikke være i klassen '%s'" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr "tegnet er ikke i klassen '%s'" @@ -1086,7 +1130,7 @@ msgstr "?" msgid "Aborted" msgstr "Afbrudt (SIGABRT)" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Adgangsrettigheder: " @@ -1124,6 +1168,10 @@ msgstr "Annonceringsfejl" msgid "Alarm clock" msgstr "Alarmen gik" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Alle forespørgsler behandlet" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Tegn også graf for totalt lagerforbrug" @@ -1132,7 +1180,7 @@ msgstr "Tegn også graf for totalt lagerf msgid "Anode table overflow" msgstr "Anode-tabel overfyldt" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "En ny streng til afprøvning." @@ -1164,7 +1212,7 @@ msgstr "Forsøger at indlænke flere delte msgid "Attempting to link in too many shared libraries" msgstr "Forsøger at indlænke for mange delte biblioteker" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Autentificering OK" @@ -1173,7 +1221,7 @@ msgstr "Autentificering OK" msgid "Authentication error" msgstr "Autentificeringsfejl" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "FALSKT OBJEKT\n" @@ -1228,7 +1276,7 @@ msgstr "Ugyldig værdi for ai_flags" msgid "Be strictly POSIX conform" msgstr "Vær strengt POSIX-konform" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Binære data\n" @@ -1260,10 +1308,6 @@ msgstr "Røret blev brudt" msgid "Bus error" msgstr "Busfejl" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Begrænsning af CPU-tid overskredet" @@ -1282,77 +1326,82 @@ msgid "Can not exec a shared library dir msgstr "Kan ikke eksekvere et delt bibliotek direkte" # nis/ypclnt.c:637+ -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Kan ikke koble til tjener for dette domæne" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "Kan ikke chdir til /" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "Kan ikke kommunikere med portmapper" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "Kan ikke kommunikere med ypbind" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "Kan ikke kommunikere med ypserv" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "Kan ikke oprette midlertidig hurtigbufferfil %s" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "Kan ikke finde %s" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "Kan ikke lænke %s til %s" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "Kan ikke lstat %s" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "Kan ikke åbne hurtigbufferfil %s\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "Kan ikke åbne hurtigbufferkatalog %s\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "Kan ikke åbne konfigurationsfil %s" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "Kan ikke åbne katalog %s" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "Kan ikke fjerne gammel midlertidig fil %s" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "Kan ikke stat() %s" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "Kan ikke stat() %s\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "Kan ikke aflænke %s" @@ -1379,16 +1428,21 @@ msgstr "Kan ikke oprette sokkel for rund msgid "Cannot exec a shared library directly" msgstr "Kan ikke eksekvere et delt bibliotek direkte" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "Kan ikke fstat() fil %s\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "Kan ikke have mere end et fil-genereringsflag!\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "Kan ikke lstat %s" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "kan ikke mmap fil %s\n" @@ -1422,33 +1476,38 @@ msgstr "Kan ikke sætte sokkel-flag SO_BR msgid "Cannot specify more than one input file!\n" msgstr "Kan ikke specifisere mere end én indfil!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "Kan ikke stat() %s" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "Kan ikke bruge netid-flag med inetd-flag!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "Kan ikke bruge netid-flag uden TIRPC!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "Kan ikke bruge tabelflag med ny stil!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Skift til og brug ROOT som rod-katalog" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "Ændring af adgangsrettigheder for %s til 0644 fejlede" +msgid "Changing access rights of %s to %#o failed" +msgstr "Ændring af adgangsrettigheder for %s til %#o fejlede" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Kanalnummer udenfor gyldigt interval" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Tegn-separator : %c\n" @@ -1457,11 +1516,11 @@ msgstr "Tegn-separator : %c\n" msgid "Child exited" msgstr "Barnet afsluttet" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Klientens troværdighed er for svag" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Kolonner :\n" @@ -1479,7 +1538,7 @@ msgstr "Kompilér lokale-specifikation" msgid "Computer bought the farm" msgstr "Datamaskinen tog på ferie" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Konfigurerer værdier til Dynamisk Lænker" @@ -1509,14 +1568,14 @@ msgstr "Opkoblingen overskred tidsgrænse msgid "Continued" msgstr "Fortsættes" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Konvertér indkodning af givne filer fra en indkodning til en anden." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1537,6 +1596,10 @@ msgstr "Kunne ikke oprette logfil '%s'" msgid "Create C header file NAME containing symbol definitions" msgstr "Opret C-headerfil NAVN som indeholder symboldefinitioner" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Opret hurtigtindlæst iconv-modul konfigurationsfil." + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Opret gammel-stil tabeller" @@ -1545,7 +1608,7 @@ msgstr "Opret gammel-stil tabeller" msgid "Create output even if warning messages were issued" msgstr "Lav uddata selv om advarsler blev givet" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Oprettelsestid: %s" @@ -1564,19 +1627,11 @@ msgstr "DATAFIL [UDFIL]" msgid "DES entry for netname %s not unique\n" msgstr "DES-indtastninger for netnavn %s er ikke unikt\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "KATALOG\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "DST er ikke tilladt i SUIT/SGID-programmer" @@ -1588,7 +1643,7 @@ msgstr "FEJL I DYNAMISK LÆNKER!!!" msgid "Database for table does not exist" msgstr "Database for tabel eksisterer ikke" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "Databasen er optaget" @@ -1596,7 +1651,7 @@ msgstr "Databasen er optaget" msgid "Deadlock situation detected/avoided" msgstr "Vranglås-situation fundet/afværget" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Forvalgte adgangsrettigheder:\n" @@ -1623,12 +1678,12 @@ msgstr "Enheden er ikke en strøm" msgid "Device or resource busy" msgstr "Enheden eller ressourcen optaget" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmannn (%d bits)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Katalog : %s\n" @@ -1657,15 +1712,15 @@ msgstr "Udspalt ikke ny proces og vis me msgid "Do not use existing catalog, force new output file" msgstr "Brug ikke eksisterende katalog, tving oprettelse af ny udfil" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "Domænet er ikke bundet" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "Byg ikke hurtigbuffer" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "Generér ikke lænker" @@ -1673,31 +1728,31 @@ msgstr "Generér ikke lænker" msgid "Dump information generated by PC profiling." msgstr "Tilstandsinformation genereret af PC-profilering" -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "ELF-filens ABI-version er ugyldig" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ELF-filens OS ABI er ugyldig" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "ELF-filens version passer ikke med den aktuelle" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "ELF-filens version-identitet passer ikke med den aktuelle" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "ELF-filens 'phentsize' er ikke den forventede størrelse" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "ELF-indlæsningskommandos adresse/tillæg er ikke tilpasset ordentligt" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "ELF-indlæsningskommandos tilpasning er ikke tilpasset siden" @@ -1705,11 +1760,11 @@ msgstr "ELF-indlæsningskommandos tilpasn msgid "EMT trap" msgstr "Emulatorfælde" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "INDGANG\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "Krypteret data\n" @@ -1863,7 +1918,11 @@ msgstr "Fejl i ukendt fejlsystem: " msgid "Error while talking to callback proc" msgstr "Fejl ved kommunikation med tilbagekaldsproces" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Fejl ved skrivning til standard ud" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Fejl: .netrc kan læses af andre." @@ -1886,7 +1945,7 @@ msgstr "FATALT: systemet definerer ikke msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "FIL indeholder mapning fra symbolske navne til UCS4-værdier" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Fejlet (uspecificeret fejl)" @@ -1895,7 +1954,7 @@ msgstr "Fejlet (uspecificeret fejl)" msgid "Failed to look up user '%s' to run server as" msgstr "Kunne ikke slå bruger '%s' op for at køre server som" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "Fil %s er for lille, ikke afprøvet." @@ -1912,7 +1971,7 @@ msgstr "Fildeskriptor i ugyldig tilstand msgid "File exists" msgstr "Filen eksisterer" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "Fil er ikke en bufferfil.\n" @@ -1946,7 +2005,7 @@ msgstr "Filtabel overfyldt" msgid "File too large" msgstr "For stor fil" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Første streng til afprøvning." @@ -1958,7 +2017,7 @@ msgstr "Første-/næstekæde brudt" msgid "Floating point exception" msgstr "Undtagelsestilfælde ved flydendetals-operation" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Format der skal bruges: ny, gammel eller kompatibel (standard)" @@ -1975,7 +2034,7 @@ msgstr "Fuld resynkronisering behøves fo msgid "Function not implemented" msgstr "Funktionen er ikke implementeret" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "GRUPPE\n" @@ -2000,7 +2059,7 @@ msgstr "" msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "Generér uddata efter tid (standard er efter antal af funktionskald)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Skriv udførlige meddelelser" @@ -2008,7 +2067,7 @@ msgstr "Skriv udførlige meddelelser" msgid "Generic system error" msgstr "Generel systemfejl" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Hent information specifik for lokalet." @@ -2025,12 +2084,12 @@ msgstr "Giv denne hjælpeliste" msgid "Gratuitous error" msgstr "Umotiveret fejl" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Gruppe : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Gruppeflag :" @@ -2095,16 +2154,12 @@ msgstr "I/O mulig" msgid "IOT trap" msgstr "IOT-fælde" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "Identifikator fjernet" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Ignorerede filen %s da den ikke er en almindelig fil." @@ -2157,7 +2212,7 @@ msgstr "Uegnet operation for baggrundspr msgid "Information request" msgstr "Informationsforespørgsel (SIGINFO)" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Information:" @@ -2165,12 +2220,12 @@ msgstr "Information:" msgid "Input Files:" msgstr "Indfiler:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "Indputfilen %s ikke fundet\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "Ind-/ud-formatspecifikation:" @@ -2179,11 +2234,11 @@ msgstr "Ind-/ud-formatspecifikation:" msgid "Input/output error" msgstr "Ind/ud-fejl" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Intern NIS-fejl" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Intern ypbind-fejl" @@ -2191,6 +2246,10 @@ msgstr "Intern ypbind-fejl" msgid "Interrupt" msgstr "Afbrudt" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Afbrudt af et signal" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2214,27 +2273,27 @@ msgstr "Afbrudt systemkald burde startes msgid "Invalid argument" msgstr "Ugyldigt argument" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Ugyldig tilbage-reference" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Ugyldigt tegnklassenavn" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Ugyldige klientreferencer" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Ugyldig klientverifikator" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Ugyldigt sammenligningstegn" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "Ugyldig brug af \\{\\}" @@ -2259,15 +2318,15 @@ msgstr "Ugyldigt objekt for operation" msgid "Invalid or incomplete multibyte or wide character" msgstr "Ugyldigt eller ufuldstændigt multibyte eller bredt tegn" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "Ugyldigt foregående regulært udtryk" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Ugyldigt intervalslut" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "Ugyldigt regulært udtryk" @@ -2279,7 +2338,7 @@ msgstr "Ugyldig adgangskode" msgid "Invalid request descriptor" msgstr "Ugyldig forespørgseldeskriptor" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Ugyldig tjenerverifikator" @@ -2307,7 +2366,7 @@ msgstr "Er en navnefil" msgid "Is a named type file" msgstr "Er en navngiven filtype" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2315,7 +2374,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Dræbt" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "LINK\n" @@ -2358,20 +2417,20 @@ msgstr "Lænkenummer udenfor gyldigt områ msgid "Link points to illegal name" msgstr "Lænke peger til ulovligt navn" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Lænket objekttype : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Lænket til : %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Lokalt domænenavn er ikke sat" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Tildelingsfejl for lokal ressource" @@ -2388,11 +2447,11 @@ msgstr "Fejlagtigt navn eller ugyldigt n msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "Obligatoriske eller frivillige argumenter til lange flag er også obligatoriske eller frivillige for tilsvarende korte flag." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Lænk manuelt individuelle biblioteker" -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Hovedtjener: \n" @@ -2404,7 +2463,7 @@ msgstr "Hovedtjener optaget, fuld lagrin msgid "Memory allocation failure" msgstr "Lagerallokeringsfejl" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Lageret opbrugt" @@ -2423,7 +2482,7 @@ msgstr "For lang meddelse" msgid "Missing or malformed attribute" msgstr "Attribut mangler eller er fejlagtig" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Ændringstid : %s" @@ -2436,7 +2495,7 @@ msgstr "Ændring fejlede" msgid "Modify operation failed" msgstr "Ændringsoperation fejlede" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Ændre format for uddata:" @@ -2454,7 +2513,7 @@ msgstr "Brugernavn skal angives for serv msgid "NAME" msgstr "NAVN" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2462,15 +2521,11 @@ msgstr "" "NAVN\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "NIS klient/tjener versionsforskel - kan ikke betjene" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "NIS' tabel-database er korrupt" @@ -2486,7 +2541,7 @@ msgstr "NIS+-tjenere er ikke tilgængelig msgid "NIS+ service is unavailable or not installed" msgstr "NIS+-tjeneste er utilgængelig eller ikke installeret" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "IKKE NOGET OBJEKT\n" @@ -2494,7 +2549,7 @@ msgstr "IKKE NOGET OBJEKT\n" msgid "NUMBER" msgstr "NUMMER" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Navn : '%s'\n" @@ -2584,7 +2639,7 @@ msgstr "Ingen anode" msgid "No buffer space available" msgstr "Ikke mere buffer-plads tilgængelig" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "Intet tegnsætsnavn angivet i tegntabel" @@ -2601,8 +2656,8 @@ msgstr "Ingen børneprocesser" msgid "No data available" msgstr "Ingen data er tilgængelige" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2615,7 +2670,7 @@ msgstr "Definition for kategori %s ikke msgid "No file space on server" msgstr "Ikke mere plads på enheden" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "Ingen lænke oprettet da .so-navn ikke kunne findes for %s" @@ -2628,7 +2683,7 @@ msgstr "Ingen lænke oprettet da .so-navn msgid "No locks available" msgstr "Ingen låse tilgængelige" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "Ingen træf" @@ -2641,11 +2696,11 @@ msgstr "Medium ikke fundet" msgid "No message of desired type" msgstr "Ingen meddelelser af ønsket type" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "Ikke flere poster i tabellen" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" @@ -2695,11 +2750,11 @@ msgstr "Ingen sådan enhed eller adresse" msgid "No such file or directory" msgstr "Ingen sådan fil eller filkatalog" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Ingen sådan nøgle i tabellen" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "Ingen sådan tabel i tjenerens domæne" @@ -2717,7 +2772,7 @@ msgstr "Stødte på navneområde som ikke t msgid "Non-recoverable failure in name resolution" msgstr "Uoverkommelig fejl i navneopslag" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Ingen.\n" @@ -2784,12 +2839,12 @@ msgstr "Ikke ejer" msgid "Not supported" msgstr "Ikke understøttet" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Antal kolonner : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Antal objekter : %u\n" @@ -2810,17 +2865,17 @@ msgstr "Numerisk argument er udenfor def msgid "Numerical result out of range" msgstr "Numerisk resultat er udenfor gyldigt område" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Objekt #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Objektnavn : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Objekttype : " @@ -2837,11 +2892,11 @@ msgstr "Er et fjernobjekt" msgid "Object with same name exists" msgstr "Objekt med samme navn eksisterer" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Ulige antal anførselstegn" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "Kun proces-kataloger angivet på kommandolinien. Bygger ikke buffer." @@ -2923,7 +2978,7 @@ msgstr "Ikke flere strøm-ressourcer" msgid "Out of streams resources" msgstr "Ikke flere strøm-ressourcer" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Udskriftskontrol:" @@ -2931,12 +2986,12 @@ msgstr "Udskriftskontrol:" msgid "Output selection:" msgstr "Udskriftsvalg:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Ejer : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "PRIVAT\n" @@ -2958,13 +3013,13 @@ msgstr "Delvis succes" msgid "Passed object is not the same object on server" msgstr "Overført objekt er ikke det samme objekt på tjeneren" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "Stien '%s' givet mere end én gang" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2974,11 +3029,11 @@ msgstr "Adgang nægtet" msgid "Power failure" msgstr "Strømmen gik" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "For tidlig afslutning på regulært udtryk" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Udskriftsbuffer" @@ -2986,6 +3041,10 @@ msgstr "Udskriftsbuffer" msgid "Print current configuration statistic" msgstr "Skriv nuværende konfigurationsstatistik ud" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Skriv mere information" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Skriv flere meddelelser" @@ -3002,6 +3061,10 @@ msgstr "Formodet succes" msgid "Probably not found" msgstr "Sandsynligvis ikke fundet" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Operationen er under udførelse" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "Profileringstiden udløb" @@ -3059,7 +3122,7 @@ msgstr "RFS-specifik fejl" msgid "RPC bad procedure for program" msgstr "RPC: ugyldig procedure for program" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "RPC-fejl ved NIS-operation" @@ -3083,88 +3146,88 @@ msgstr "RPC-strukturen er ugyldig" msgid "RPC version wrong" msgstr "forkert RPC-version" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (ukendt fejlkode)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: Fejl ved autentificering" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: Kan ikke afkode resultatet" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: Kan ikke kode argumentet" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Fejlet (uspecificeret fejl)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: Inkompatible versioner af RPC" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Fejl i portmapper" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: Procedure ikke tilgængelig" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: Programmet ikke registreret" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: Programmet utilgængeligt" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: Program/version-uoverensstemmelse" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: Systemfejl hos modtager" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: Tjener kan ikke afkode argumenterne" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: Succes" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: Tidsgrænsen overskredet" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: Kan ikke tage imod" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: Kan ikke sende" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: Ukendt værtsmaskine" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: Ukendt protokol" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bit)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "RTLD_NEXT brugt i kode som ikke er dynamisk indlæst" @@ -3187,7 +3250,7 @@ msgstr "Filsystem med kun læseadgang" msgid "Real-time signal %d" msgstr "Realtid-signal %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Regulært udtryk for stort" @@ -3201,11 +3264,11 @@ msgstr "I/O-fejl på fjern maskine" msgid "Remote address changed" msgstr "Fjernadresse ændret" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Fjern adgangskode, eller gør filen ulæsbar for andre." -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "Omdøbning af %s til %s fejlede" @@ -3215,7 +3278,7 @@ msgstr "Omdøbning af %s til %s fejlede" msgid "Reopening shared object `%s' failed" msgstr "Genåbning af delt objekt '%s' fejlede" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Replikér:\n" @@ -3224,16 +3287,24 @@ msgstr "Replikér:\n" msgid "Report bugs to %s.\n" msgstr "Rapportér fejl til %s.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "Rapportér fejl ved at bruge skriptet 'glibcbug' til .\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Argumenter for forespørgsel er ugyldige" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Forespørgsel annulleret" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Forespørgsel ikke annulleret" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Reserveret til fremtidigt brug" @@ -3304,11 +3375,7 @@ msgstr "Resultater sendt til tilbagekald msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Søgesti : %s\n" @@ -3325,11 +3392,11 @@ msgstr "Tjener optaget, prøv igen" msgid "Server out of memory" msgstr "Tjener tom for lager" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "Tjener afviste referencerne" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "Tjener afviste verifikator" @@ -3397,7 +3464,7 @@ msgstr "Forældet NFS-filhåndtag" msgid "Start NUMBER threads" msgstr "Start ANTAL tråde" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Status : %s\n" @@ -3427,7 +3494,7 @@ msgstr "Strøm-rørfejl" msgid "Structure needs cleaning" msgstr "Strukturen trænger til oprydning" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Succes" @@ -3448,11 +3515,11 @@ msgstr "Symbolske tegnnavne defineret i msgid "System error" msgstr "Systemfejl" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Systeminformation:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Kunne ikke tildele systemressource" @@ -3473,7 +3540,7 @@ msgstr "" msgid "TABLE" msgstr "TABEL" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TABEL\n" @@ -3481,7 +3548,7 @@ msgstr "TABEL\n" msgid "TABLE,yes" msgstr "TABEL,ja" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Tabeltype : %s\n" @@ -3504,7 +3571,7 @@ msgstr "Termineret" msgid "Text file busy" msgstr "Tekstfil optaget" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3520,11 +3587,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "Denne implementation understøtter ikke nystil eller MT-sikker kode!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Levetid: " @@ -3598,7 +3665,7 @@ msgstr "For mange brugere" msgid "Trace/breakpoint trap" msgstr "Sporings-/stoppunkts-fælde" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Efterfølgende backslash" @@ -3630,12 +3697,12 @@ msgstr "Transport-endepunkterne er ikke msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Prøv '%s --help' eller '%s --usage' for mere information.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Type : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "UKENDT" @@ -3655,31 +3722,35 @@ msgstr "Ikke i stand til at lave tilbage msgid "Unable to create process on server" msgstr "Ikke i stand til at oprette proces på tjeneren" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Ukendt (type = %d, bit = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Ukendt .netrc-nøgleord %s" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "Ukendt ELFCLASS i filen %s.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Ukendt NIS-fejlkode" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Ukendt OS" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Ukendt database: %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Ukendt fejl" @@ -3715,31 +3786,31 @@ msgstr "Ukendt tjener-fejl" msgid "Unknown signal %d" msgstr "Ukendt signal %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Ukendt systemfejl" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Ukendt ypbind-fejl" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "Ubalanceret ( eller \\(" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr "Ubalanceret ) eller \\)" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "Ubalanceret [ eller [^" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "Ubalanceret \\{" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Ukendt variabel '%s'" @@ -3752,20 +3823,20 @@ msgstr "Kritisk I/O-tilstand" msgid "Usage:" msgstr "Brug:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Brug: %s variabelnavn [søgesti]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Brug: %s [-v specifikation] variabelnavn [søgesti]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Brug: rpcinfo [ -n portnr ] -u vært prognr [ versnr ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Brug CACHE som bufferfil" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Brug CONF som konfigurationsfil" @@ -3790,7 +3861,7 @@ msgstr "Værdien er for stor for den defi msgid "Virtual timer expired" msgstr "Virtuel tidsgrænse overskredet" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Vildt resultat fra eksekvering af kommando" @@ -3798,19 +3869,19 @@ msgstr "Vildt resultat fra eksekvering a msgid "Window changed" msgstr "Vinduet blev ændret" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Skriv navnene til tilgængelige tegntabel" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Skriv navnene til tilgængelige lokaler" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Skriv navnene til valgte kategorier" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Skriv navnene til valgte nøgleord" @@ -3818,18 +3889,18 @@ msgstr "Skriv navnene til valgte nøgleor msgid "Write output to file NAME" msgstr "Skriv uddata til fil NAVN" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "Udskrivning af bufferdata fejlede" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "Udskrivning af bufferdata fejlede." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "Skrevet af %s.\n" @@ -3838,14 +3909,6 @@ msgstr "Skrevet af %s.\n" msgid "Wrong medium type" msgstr "Gal mediatype" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3860,11 +3923,15 @@ msgstr "Ja, 42 er meningen med livet" msgid "You really blew it this time" msgstr "Denne gang gjorde du virkelig i nælderne" -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "Sluttiden på fortsætningslinien til en zone kommer før sluttiden på foregående linie" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[KAT...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[FIL...]" @@ -3896,13 +3963,13 @@ msgstr "'%.*s' allerede defineret i tegn msgid "`%.*s' already defined in repertoire" msgstr "'%.*s' allerede defineret i repertoire" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "'%1$s' definition slutter ikke med 'END %1$s'" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "'%s' og '%.*s' er ikke gyldige navne for tegnområde" @@ -3912,7 +3979,7 @@ msgstr "'%s' og '%.*s' er ikke gyldige n msgid "`%s' is no correct profile data file for `%s'" msgstr "'%s' er ikke korrekt profildatafil for '%s'" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "'digit' kategori har ikke elementer i grupper af ti" @@ -3928,12 +3995,12 @@ msgstr "ai_socktype er ikke understøttet msgid "already running" msgstr "kører allerede" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "argument til <%s> skal være et enkelt tegn" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "argument til '%s' skal være et enkelt tegn" @@ -3946,28 +4013,28 @@ msgstr "auth_none.c - Fatal kodningsfejl msgid "authunix_create: out of memory\n" msgstr "authunix_create: ikke mere lager\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "ugyldigt argument" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "forkert ejer" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "tomt 'FROM'-felt på 'Link'-linie" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "tomt 'TO'-felt på 'Link'-linie" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "blok frigjort to gange\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "fejlagtig mcheck_status, biblioteket er fejlbehæftet\n" @@ -3991,11 +4058,11 @@ msgstr "cache_set: offer-allokering fejl msgid "cache_set: victim not found" msgstr "cache_set: offer ikke fundet" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "kan ikke afgøre tidszoneforkortelse for brug lige efter 'until'-tid" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "kan ikke omfordele procedurenummer %ld\n" @@ -4009,15 +4076,15 @@ msgstr "kan ikke genskabe segmentbeskytt msgid "cannot add already read locale `%s' a second time" msgstr "kan ikke tilføje allerede læst lokale '%s' på ny" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "kan ikke allokere afhængighedsliste" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "Kan ikke allokere lager til programhoved" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "Kan ikke allokere navnepost" @@ -4025,31 +4092,27 @@ msgstr "Kan ikke allokere navnepost" msgid "cannot allocate symbol data" msgstr "kan ikke allokere symboldata" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "kan ikke allokere symbolsøgningsliste" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "kan ikke allokere versionsreferencetabel" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "kan ikke ændre lagerbeskyttelser" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "kan ikke oprette RUNPATH/RPATH kopi" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "Kan ikke oprette buffer for søgesti" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "kan ikke oprette egenskabsliste" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "kan ikke oprette intern deskriptor" @@ -4058,23 +4121,28 @@ msgstr "kan ikke oprette intern deskript msgid "cannot create internal descriptors" msgstr "kan ikke oprette interne deskriptorer" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "kan ikke oprette udfil '%s' for kategori '%s'" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "kan ikke oprette tabel over søgestier" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "kan ikke læse søgningsliste" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "kan ikke oprette delt objektbeskriver" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "kan ikke bestemme undvigetegn" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "kan ikke indlæse udførbare dynamisk" @@ -4096,7 +4164,11 @@ msgstr "kan ikke finde C-præprocessor: % msgid "cannot find any C preprocessor (cpp)\n" msgstr "kan ikke finde nogen C-præprocessor (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "kan ikke generere udfil" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "kan ikke håndtere gammel forespørgsel af version %d. Nuværende version er %d" @@ -4105,19 +4177,15 @@ msgstr "kan ikke håndtere gammel forespø msgid "cannot load profiling data" msgstr "kan ikke indlæse profileringsdata" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "kan ikke indlæse delt objektfil" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "Kan ikke gøre segment skrivbart for omflytning" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "kan ikke mappe nulstil-sider" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "kan ikke åbne" @@ -4130,7 +4198,7 @@ msgstr "kan ikke åbne '%s'" msgid "cannot open input file" msgstr "kan ikke åbne indfil" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "kan ikke åbne indfil '%s'" @@ -4141,21 +4209,21 @@ msgstr "kan ikke åbne indfil '%s'" msgid "cannot open locale definition file `%s'" msgstr "kan ikke åbne lokaledefinitionsfil '%s'" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "kan ikke åbne udfil" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "kan ikke åbne udfil '%s'" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "kan ikke åbne udfil '%s' for kategori '%s'" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "kan ikke åbne delt objektfil" @@ -4164,7 +4232,7 @@ msgstr "kan ikke åbne delt objektfil" msgid "cannot open socket: %s" msgstr "kan ikke åbne sokkel: %s" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "kan ikke åbne nulstil-enhed" @@ -4177,7 +4245,7 @@ msgstr "kan ikke læse filkataloget for t msgid "cannot read configuration file; this is fatal" msgstr "kan ikke læse konfigurationsfil; dette er fatalt" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "kan ikke indlæse fildata" @@ -4190,11 +4258,6 @@ msgstr "kan ikke læse hoved" msgid "cannot read header from `%s'" msgstr "kan ikke læse hoved fra '%s'" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "kan ikke læse filkataloget for lokaler, '%s'" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "kan ikke læse statistikdata" @@ -4203,7 +4266,7 @@ msgstr "kan ikke læse statistikdata" msgid "cannot safe new repertoire map" msgstr "kan ikke gemme ny repertoiretabel" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "kan ikke tage status på delt objekt" @@ -4217,7 +4280,7 @@ msgstr "kan ikke udføre stat() på fil '% msgid "cannot write output files to `%s'" msgstr "kan ikke skrive udfiler til '%s'" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "kan ikke udskrive resultat: '%s'" @@ -4227,76 +4290,80 @@ msgstr "kan ikke udskrive resultat: '%s' msgid "cannot write statistics: %s" msgstr "kan ikke udskrive statistik: '%s'" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "tegnet '%s' i klassen '%s' skal være i klassen '%s'" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "tegnet '%s' i klassen '%s' må ikke være i klassen '%s'" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "tegnet ikke defineret i tegntabellen" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "tegnet L'\\u%0*x' i klassen '%s' skal være i klassen '%s'" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "tegnet L'\\u%0*x' i klassen '%s' kan ikke være i klassen '%s'" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "tegnet '%s' ikke defineret, men behøves som standardværdi" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "tegnklassen '%s' allerede defineret" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "tegntabellen '%s' allerede defineret" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "tegnsætstabel '%s' er ikke ASCII-kompatibel, lokale er ikke i overensstemmelse med ISO C\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "tegntabelfilen '%s' ikke fundet" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "tegnsæt med låsetilstande er ikke understøttet" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "ost" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "cirkulære afhængigheder mellem lokale-definitioner" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Fatal fejl ved serialisering af hoved." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "cnlttcp_create: ikke mere lager\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "cnltudp_create: ikke mere lager\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "cnlsunix_create: ikke mere lager\n" @@ -4304,28 +4371,28 @@ msgstr "cnlsunix_create: ikke mere lager msgid "constant or identifier expected" msgstr "konstant eller identifikator ventet" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "konvertering fra '%s' til '%s' ikke understøttet" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "konverteringsmoduler ikke tilgængelige" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "vekselkurs-værdi kan ikke være nul" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "konvertering stoppet på grund af problem ved skrivning af uddata" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "kunne ikke oprette en rpc-tjener\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "kunne ikke registrere prog %ld vers %ld\n" @@ -4334,17 +4401,17 @@ msgstr "kunne ikke registrere prog %ld v msgid "database [key ...]" msgstr "database [nøgle ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "standard tegntabel '%s' ikke fundet" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "duplikeret definition af <%s>" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "duplikeret definition af skript '%s'" @@ -4353,12 +4420,12 @@ msgstr "duplikeret definition af skript msgid "duplicate set definition" msgstr "duplikeret definition af sæt" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "duplikeret zonenavn %s (fil '%s', linie %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "duplikeret definition af afbildning '%s'" @@ -4371,7 +4438,7 @@ msgstr "duplikeret meddelelsesidentifika msgid "duplicated message number" msgstr "duplikeret meddelelsesnummer" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "ellipse-områder skal angives ved to operander af samme type" @@ -4379,10 +4446,14 @@ msgstr "ellipse-områder skal angives ved msgid "empty char string" msgstr "tom tegnstreng" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "tom dynamisk strengelement-erstatning" +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "tom dynamisk strengelement-erstatning" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: cache/hurtiglager allerede sluttet til" @@ -4399,29 +4470,29 @@ msgstr "enablecache: kunne ikke tildele msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: kunne ikke tildele cache/hurtiglager-fifo" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "indkodning for uddata" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "indkodning af original tekst" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "fejl ved forespørgsel på opkaldets id: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "fejl under indsætning af ækvivalens-sammenligningssymbol" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "fejl ved lukning af indput '%s'" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "fejl ved lukning af udfil" @@ -4429,7 +4500,8 @@ msgstr "fejl ved lukning af udfil" msgid "error while closing the profiling data file" msgstr "fejl ved lukning af datafilen for profilering" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "fejl under læsning af inddata" @@ -4437,10 +4509,14 @@ msgstr "fejl under læsning af inddata" msgid "expect string argument for `copy'" msgstr "forventet strengargument for 'copy'" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "forventet fortsættelseslinie ikke fundet" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "ekstra efterfølgende semikolon" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4450,7 +4526,7 @@ msgstr "klarede ikke at indlæse delt obj msgid "failed to load symbol data" msgstr "klarede ikke at indlæse symboldata" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "klarede ikke at afbilde fra delt objekt'" @@ -4458,18 +4534,19 @@ msgstr "klarede ikke at afbilde fra delt msgid "failed to mmap the profiling data file" msgstr "klarede ikke at mmap'e filen med profileringsdata" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "klarede ikke at starte konverteringsprocessering" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "fejl ved skrivning af data for kategori '%s'" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "Fil %s er afkortet\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4478,19 +4555,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "filen '%s' eksisterer allerede og kan blive overskrevet\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "For kort fil" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fstat fejlede" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "snavs i slutningen af tegnkodespecifikation" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "snavs i slutningen af tal" @@ -4510,28 +4587,28 @@ msgstr "get_myaddress: ioctl (hent græns msgid "getent - get entries from administrative database." msgstr "getent - hent indtastninger fra administrativ database." -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: forespørgsel modtaget (version = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "hård lænke fejlede, symbolsk lænke brugt" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "hårdlænket et eller andet sted" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "heksadecimalt interval-format bør bruge kun store bogstaver" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "ulovligt 'CORRECTION'-felt på 'Leap'-linie" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "ulovligt 'Rolling/Stationary'-felt på 'Leap'-linie" @@ -4539,11 +4616,16 @@ msgstr "ulovligt 'Rolling/Stationary'-fe msgid "illegal character in file: " msgstr "ulovligt tegn i fil: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "ulovlig tegnsekvens ved slutningen af streng" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "ulovlig inddatasekvens ved position %Zd" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "ulovlig inddatasekvens ved position %ld" @@ -4557,102 +4639,102 @@ msgstr "ulovlig nettype: '%s'\n" msgid "illegal set number" msgstr "ulovligt sæt-nummer" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "implementationsbegrænsning: ikke flere end %Zd tegnklasser er tilladt" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "implementationsbegrænsning: ikke flere end %d tegntabeller tilladt" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "ufuldstændig tegn- eller skifte-sekvens ved slutningen af buffer" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "inddatalinie af ukendt type" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "Intern fejl" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "intern fejl (ulovlig deskriptor)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "intern fejl - addtype kaldt med fejlagtig isdst" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "intern fejl - addtype kaldt med fejlagtig ttisgmt" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "intern fejl - addtype kaldt med fejlagtig ttisstd" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "intern fejl i %s, linie %u" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "ugyldigt ELF-hoved" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "ugyldig UTC-forskydning" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "ugyldig forkortelsesformat" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "Ugyldigt tegn: besked ignoreret" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "ugyldig dag i måneden" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "ugyldig definition" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "ugyldig indkodning angivet" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "ugyldigt slutår" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "ugyldig undtagelsessekvens" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "ugyldigt skudår" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "ugyldig linje" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "ugyldig modus for dlopen()" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "ugyldigt månedsnavn" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "ugyldige navne for tegnområde" @@ -4665,52 +4747,52 @@ msgstr "ugyldig størrelse for pegere" msgid "invalid quote character" msgstr "Ugyldigt anførselstegn" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "ugyldig lagret tid" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "ugyldigt startår" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "ugyldig tid på dagen" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "ugyldigt ugedagsnavn" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "nøglelængde i forespørgsel for lang: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "libc4-bibliotek %s i forkert katalog" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "libc5-bibliotek %s i forkert katalog" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "libc6-bibliotek %s i forkert katalog" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "bibliotekerne %s og %s i kataloget %s har samme .so-navn, men forskellig type" -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "for lang linie" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "list alle kendte kodede tegnsæt" @@ -4718,7 +4800,7 @@ msgstr "list alle kendte kodede tegnsæt" msgid "locale name should consist only of portable characters" msgstr "lokale-navn bør bestå af bare portable tegn" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "lstat fejlede" @@ -4730,7 +4812,11 @@ msgstr "gør uddata-grafik VÆRDI piksel-h msgid "make output graphic VALUE pixel wide" msgstr "gør uddata-grafik VÆRDI piksel-bred" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: véd ikke hvordan mere end 8 argumenter skal behandles\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "fejlagtig linie ignoreret" @@ -4742,39 +4828,34 @@ msgstr "mapning af tabel med sektionsove msgid "mapping of section headers failed" msgstr "mapning af sektionsoverskrifter fejlede" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "området foran tildelt lagerblok snavset til\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "området efter tildelt lagerblok snavset til\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "lageret opbrugt" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "lageret er konsistent, biblioteket er fejlbehæftet\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "mmap af bufferfil fejlede\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "mere end ét dynamisk segment\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "navnløs regel" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "hverken original- eller mål-indkodning angivet" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4807,7 +4888,7 @@ msgstr "netname2user: navn på 'principal msgid "netname2user: should not have uid 0" msgstr "netname2user: burde ikke have uid 0" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "aldrig registreret prog %d\n" @@ -4816,11 +4897,11 @@ msgstr "aldrig registreret prog %d\n" msgid "no or value given" msgstr "ingen - eller -værdi givet" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "ingen dag i måneden passer til reglen" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "ingen definition af 'UNDEFINED'" @@ -4829,7 +4910,7 @@ msgstr "ingen definition af 'UNDEFINED'" msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "ikke noget filnavn for profileringsdata givet, og delt objekt '%s' har ikke noget .so-navn" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "ingen inddata-cifre defineret, og ingen af standardnavnene i tegntabellen" @@ -4837,37 +4918,37 @@ msgstr "ingen inddata-cifre defineret, o msgid "no other keyword shall be specified when `copy' is used" msgstr "ingen andre nøgleord må angives når 'copy' bruges" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "ingen uddata-cifre defineret, og ingen af standardnavnene i tegntabellen" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "på grund af advarsler blev ingen udfil oprettet" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "ikke noget symbolsk navn givet" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "ikke noget symbolsk navn givet for slutningen på området" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "ikke-symbolske tegnværdier bør ikke bruges" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "ikke alle tegn brugt i 'outdigit' er tilstede i tegntabellen" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "ikke alle tegn brugt i 'outdigit' er tilstede i repertoiret" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "ikke en almindelig fil" @@ -4886,36 +4967,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd kører ikke!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "objektfil har ingen dynamisk sektion" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "fjern ugyldige tegn fra uddata" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "kun ET_DYN og ET_EXEC kan indlæses" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "kun definition af 'WIDTH' må komme efter definition af 'CHARMAP'" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "sorteringsorden for '%.*s' allerede defineret ved %s:%Zu" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "original indkodning ikke specificeret med '-f'" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "tom for lager" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "udfil" @@ -4923,19 +5000,19 @@ msgstr "udfil" msgid "pmap_getmaps rpc problem" msgstr "pmap_getmaps rpc-problem" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: protokolfejl i opsætning af forbindelse\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "For tidlig afslutning på 'translit_ignore' definition" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "præprocessorfejl" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "den foregående definition var her" @@ -4943,7 +5020,7 @@ msgstr "den foregående definition var he msgid "print list of count paths and their number of use" msgstr "udskriv liste med tællestier og deres brugsantal" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "skriv fremdriftsinformation" @@ -4969,30 +5046,30 @@ msgstr "program %lu version %lu er ikke msgid "program %lu version %lu ready and waiting\n" msgstr "program %lu version %lu klar og venter\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: kort indlæsning" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (opsætter stderr): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: sokkel: Alle porte i brug\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write: (opsætter standard error): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: ikke mere lager\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "repeteret skudsekundstidspunkt" @@ -5001,7 +5078,7 @@ msgstr "repeteret skudsekundstidspunkt" msgid "repertoire map file `%s' not found" msgstr "repertoiretabelfilen '%s' ikke fundet" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "de resulterende bytes for området kan ikke repræsenteres." @@ -5037,24 +5114,24 @@ msgstr "rpcinfo: rundsending fejlede: %s msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: kan ikke kontakte portmapper" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "samme regel i flere filer" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "delt objekt kan ikke åbnes med dlopen()" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "delt objekt er ikke åbent" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "afkortet læsning ved læsning af forespørgsels-nøgle: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "afkortet læsning ved læsning af forespørgsel: %s" @@ -5064,35 +5141,31 @@ msgstr "afkortet læsning ved læsning af msgid "short write in %s: %s" msgstr "afkortet skrivning i %s: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "sokkel: protokolfejl i opsætning af forbindelse\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "standard indkanal" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "standard udkanal" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "start og slut tegnsekvens for områder skal have samme længde" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "startår er højere end slutår" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "startår for højt til at blive repræsenteret" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "startår for lavt til at blive repræsenteret" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "undertryk advarsler" @@ -5100,31 +5173,31 @@ msgstr "undertryk advarsler" msgid "svc_run: - poll failed" msgstr "svc_run: - poll fejlede" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - kan ikke kalde getsockname() eller listen()" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - problem med oprettelse af tcp-sokkel" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: ikke mere lager\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - problem med oprettelse af AF_UNIX-sokkel" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - kan ikke kalde getsockname() eller listen()" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: ikke mere lager\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: ikke mere lager\n" @@ -5144,49 +5217,49 @@ msgstr "svcudp_create: problem ved opret msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad er for lille til IP_PKTINFO\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: ikke mere lager\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "symbol '%.*s' ikke i tegntabel" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "symbol '%.*s' repertoiretabel" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "symbol '%s'" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "symbol '%s' har den samme kodning som " -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "symbol '%s' ikke defineret" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "syntaksfejl" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "syntaksfejl i definition af %s: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5198,73 +5271,69 @@ msgstr "syntaksfejl i prolog: %s" msgid "syntax error in repertoire map definition: %s" msgstr "syntaksfejl i repertoiretabel-definition: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "syntaksfejl: ikke inde i en lokaledefinition" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "mål-indkodning ikke specificeret med '-t'" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "dette er den første definition" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "tid før nul" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "for stor tidsværdi" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "'to'-værdi i intervallet er mindre end 'from'-værdi " -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "'to'-værdi tegnfølgen er mindre end 'from'-værdi tegnfølgen" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "for få byte i tegnkodning" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "for mange tegn i tegnkodning" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "for mange skudsekunder" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "for mange lokale tidstyper" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "for mange overgange?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "for mange eller for lange tidszoneforkortelser" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "efterfølgende snavs på slutningen af linien" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "problem med at svare prog %d\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "satte type på bare et år" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "ikke i stand til at allokere buffer til inddata" @@ -5272,11 +5341,15 @@ msgstr "ikke i stand til at allokere buf msgid "unable to free arguments" msgstr "kan ikke frigøre argumenter" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "udefineret" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "ukendt" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "ukendt tegn '%s'" @@ -5286,7 +5359,7 @@ msgstr "ukendt tegn '%s'" msgid "unknown directive `%s': line ignored" msgstr "ukendt nøgleord '%s': linie ignoreret" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "ukendt iconv()-fejl %d" @@ -5296,15 +5369,20 @@ msgstr "ukendt iconv()-fejl %d" msgid "unknown set `%s'" msgstr "ukendt sæt '%s'" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "ukendt specifikation '%s'" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "vanskelig zone" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "uafsluttet meddelelse" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "uafsluttet streng" @@ -5312,11 +5390,11 @@ msgstr "uafsluttet streng" msgid "unterminated string constant" msgstr "uafsluttet strengkonstant" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "uafsluttet symbolsk navn" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "øvre grænse i område er ikke større end nedre grænse" @@ -5324,35 +5402,35 @@ msgstr "øvre grænse i område er ikke stø msgid "upper limit in range is not smaller then lower limit" msgstr "øvre grænse i område er ikke mindre end nedre grænse" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "brug: %s indfil\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "bruger 29/2 i ikke-skudår" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "værdien på %s skal være heltal" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "værdien på <%s> skal være 1 eller større" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "værdien på <%s> skal være større end eller lig værdien på <%s>" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "advarsel: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "under accept af forbindelse: %s" @@ -5369,11 +5447,15 @@ msgstr "under allokering af hashtabel-in msgid "while allocating key copy" msgstr "under allokering af nøglekopi" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "fejl ved indsætning i søgetræ" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "da den gamle katalogfil blev åbnet" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "da uddata blev forberedt" @@ -5381,15 +5463,15 @@ msgstr "da uddata blev forberedt" msgid "while stat'ing profiling data file" msgstr "under stat() af profileringsdatafil" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "ved UCS-interval-værdier skal man bruge heksadecimal symbolsk ellipse" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "ved tegnkode interval-værdier skal man bruge absolut ellipse '...'" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "ved symbolske interval-værdier må den absolutte ellipse '...' ikke bruges" @@ -5397,7 +5479,7 @@ msgstr "ved symbolske interval-værdier m msgid "write incomplete" msgstr "skrivning ufuldstændig" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "skrivbar af andre end ejer" @@ -5405,23 +5487,23 @@ msgstr "skrivbar af andre end ejer" msgid "wrong number of arguments" msgstr "galt antal argumenter" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "galt antal felter på 'Leap'-linie" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "galt antal felter på 'Link'-linie" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "galt antal felter på 'Rule'-linie" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "galt antal felter på 'Zone'-fortsættelseslinie" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "galt antal felter på 'Zone'-linie" @@ -5433,20 +5515,68 @@ msgstr "xdr_reference: ikke mere lager\n msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: ikke mere lager\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: kan ikke konvertere vært til netnavn\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: kan ikke hente tjeneradresse\n" +#~ msgid "%s: Error writing " +#~ msgstr "%s: Fejl ved skrivning til " + +#~ msgid "CDS" +#~ msgstr "CDS" + +#~ msgid "DNANS" +#~ msgstr "DNANS" + +#~ msgid "DNS" +#~ msgstr "DNS" + +#~ msgid "IVY" +#~ msgstr "IVY" + +#~ msgid "NIS" +#~ msgstr "NIS" + +#~ msgid "SUNYP" +#~ msgstr "SUNYP" + +#~ msgid "X500" +#~ msgstr "X500" + +#~ msgid "XCHS" +#~ msgstr "XCHS" + +#~ msgid "cannot create capability list" +#~ msgstr "kan ikke oprette egenskabsliste" + +#~ msgid "cannot load shared object file" +#~ msgstr "kan ikke indlæse delt objektfil" + +#~ msgid "cannot read locale directory `%s'" +#~ msgstr "kan ikke læse filkataloget for lokaler, '%s'" + +#~ msgid "fcntl: F_SETFD" +#~ msgstr "fcntl: F_SETFD" + +#~ msgid "neither original nor target encoding specified" +#~ msgstr "hverken original- eller mål-indkodning angivet" + +#~ msgid "original encoding not specified using `-f'" +#~ msgstr "original indkodning ikke specificeret med '-f'" + +#~ msgid "standard output" +#~ msgstr "standard udkanal" + +#~ msgid "target encoding not specified using `-t'" +#~ msgstr "mål-indkodning ikke specificeret med '-t'" + #~ msgid " done\n" #~ msgstr " færdig\n" -#~ msgid "%s: Error writing standard output " -#~ msgstr "%s: Fejl ved skrivning til standard ud " - #~ msgid "%s: cannot get modification time" #~ msgstr "%s: kan ikke finde modificeringstid" @@ -5545,9 +5675,6 @@ msgstr "yp_update: kan ikke hente tjener #~ msgid "error while inserting collation element into hash table" #~ msgstr "fejl ved indsætning af sammenligningselement i hashtabellen" - -#~ msgid "error while inserting to hash table" -#~ msgstr "fejl ved indsætning i hashtabellen" #~ msgid "field `%s' in category `%s' not defined" #~ msgstr "feltet '%s' i kategorien '%s' er ikke defineret" Binary files glibc-2.2.4/po/es.mo and glibc-2.2.5/po/es.mo differ diff -durpN glibc-2.2.4/po/es.po glibc-2.2.5/po/es.po --- glibc-2.2.4/po/es.po Mon Jul 23 10:54:51 2001 +++ glibc-2.2.5/po/es.po Mon Aug 20 06:41:23 2001 @@ -5,84 +5,91 @@ # msgid "" msgstr "" -"Project-Id-Version: GNU libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-06-19 16:04+0200\n" +"Project-Id-Version: GNU libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-20 14:00+0200\n" "Last-Translator: Santiago Vila Doncel \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: nis/nis_print.c:274 +# FIXME: Decir al autor que no use tabs. sv +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "%s: el valor para el campo `%s' debe estar en el rango %d...%d" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tDerechos de Acceso : " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tAtributos : " # Este mensaje tal vez habría que cortarlo por algún lado. sv -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dnombre[=valor]] [-i tamaño] [-I [-K segundos]] [-Y camino] fichero_de_entrada\n" # Y este también. sv -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fichero_de_salida] [fichero_de_entrada]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n netid]* [-o fichero_de_salida] [fichero_de_entrada]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s tipored]* [-o fichero_de_salida] [fichero_de_entrada]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tDerechos de acceso: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tEntrada de tipo %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNombre : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tClave Pública : " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tTipo : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tDirección universal (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNombre : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u bytes] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -112,11 +119,11 @@ msgstr "" "%15ld%% tasa de aciertos de caché\n" "%15s compruebe /etc/%s para cambios\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\nMiembros del Grupo :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nTiempo de Vida : " @@ -144,7 +151,7 @@ msgstr " no" msgid " yes" msgstr " si" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Longitud de los datos = %u\n" @@ -201,15 +208,15 @@ msgstr " programa vers proto puerto\ msgid " or: " msgstr " o: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (SALTADO)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (cambiado)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regla desde \"%s\", línea %d)" @@ -218,22 +225,22 @@ msgstr " (regla desde \"%s\", línea %d)" msgid " [OPTION...]" msgstr " [OPCIÓN...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", línea %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "la línea \"Zone %s\" y la opción -l son mutuamente excluyentes" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "la línea \"Zone %s\" y la opción -p son mutuamente excluyentes" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "" "se necesita un \"fichero_de_entrada\" para las opciones de generación\n" @@ -249,58 +256,58 @@ msgstr "%.*s: El argumento ARGP_HELP_FMT msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Parámetro ARGP_HELP_FMT desconocido" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: la definición no termina con `END %1$s'" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d bibliotecas se encontraron en la caché `%s'\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s en una zona sin reglas" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s es un fichero ELF de 32 bits.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s es un fichero ELF de 64 bits.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s es para la máquina desconocida %d.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s no es un tipo de biblioteca conocido" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s no es un fichero `shared object' (Tipo: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s no es un enlace simbólico\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s no es un fichero ELF - tiene los bytes mágicos equivocados en el comienzo.\n" @@ -336,12 +343,12 @@ msgstr "%s%s%s:%u: %s%sError inesperado: msgid "%s%sUnknown signal %d\n" msgstr "%s%sSeñal desconocida %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d no extendió el signo correctamente\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: debe ser más grande que \n" @@ -356,52 +363,47 @@ msgstr "%s: El preprocesador de C falló msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: El preprocesador de C falló con la señal %d\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: No se puede crear %s: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: No se puede crear el directorio %s: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: No se pudo crear un enlace de %s a %s: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: No se puede abrir %s: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: No se puede eliminar %s: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: No se puede borrar %s: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Error al cerrar %s: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Error al leer %s\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: Error al escribir " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Error al escribir %s\n" @@ -437,39 +439,39 @@ msgstr "%s: Error al escribir %s\n" # Segundo, según he visto en la documentación, sólo existe un fichero # de leap lines, por eso pongo 'el'... em+ # -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "" "%s: Línea de segundos intercalares en un fichero que no es el de\n" "ajuste de años bisiestos %s\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Memoria agotada: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: La opción -L se ha especificado más de una vez\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: La opción -d se ha especificado más de una vez\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: La opción -l se ha especificado más de una vez\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: La opción -p se ha especificado más de una vez\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: La opción -y se ha especificado más de una vez\n" @@ -485,7 +487,7 @@ msgstr "%s: Demasiados argumentos\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: `%s' mencionado más de una vez en la definición del peso %d" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s' debe ser un carácter" @@ -496,7 +498,7 @@ msgstr "%s: `%s' debe ser un carácter" msgid "%s: `%s' value does not match `%s' value" msgstr "%s: el valor `%s' no coincide con el valor `%s'" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1' debe ser la última entrada del campo `%s'" @@ -506,109 +508,109 @@ msgstr "%s: `-1' debe ser la última entr msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: `forward' y `backward' se excluyen mutuamente" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position' debe utilizarse para un nivel específico en todas las secciones o en ninguna" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: la sección `translit_start' no termina con `translit_end'" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "" "%s: el orden de byte del primer carácter de la sucesión no es menor que\n" "el del último carácter" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "" "%s: los órdenes de byte de los caracteres primero y último deben tener\n" "la misma longitud" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: no puede tener `%s' como final de un rango de elipsis" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: no se puede reordenar después de %.*s: símbolo desconocido" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: el carácter `%s' en la tabla de caracteres no es representable con un byte" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "" "%s: el carácter `%s' necesario como valor predeterminado no es representable\n" "con un byte" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "" "%s: el carácter `%s' no está definido en el conjundo de caracteres\n" "cuando se necesitó como valor predeterminado" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: el carácter `%s' no está definido cuando se necesitó como valor predeterminado" # FIXME: `%s' -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: la orden fue `%s', el resultado fue %d\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es '+' ni '-'" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es un único carácter" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: definición `default_missing' duplicada" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: definición duplicada de la versión de la categoría" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: definición duplicada de la sección `%s'" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: definición duplicada de `%s'" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: no se permite una descripción de categoría vacía" @@ -619,19 +621,27 @@ msgid "%s: empty weight string not allow msgstr "%s: no se permite una cadena de peso vacía" # Para entender este mensaje, pensar en Turing. -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: error en la máquina de estados" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: el campo `%s' ha sido declarado más de una vez" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: el campo `%s' no contiene exactamente diez entradas" @@ -644,14 +654,18 @@ msgid "%s: field `%s' must not be empty" msgstr "%s: el campo `%s' no debe estar vacío" # FIXME: ¿Por qué hay dos mensajes distintos para este y el siguiente? -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: el campo `%s' no está definido" @@ -662,7 +676,7 @@ msgstr "%s: el campo `%s' no está defini msgid "%s: field `%s' undefined" msgstr "%s: el campo `%s' no está definido" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "" @@ -670,36 +684,37 @@ msgstr "" "en el campo `era'" # FIXME: ¿Por qué el espacio final? sv -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "" "%s: incongruencias al final de la fecha de comienzo en la cadena %Zd\n" "en el campo `era' " -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "" "%s: incongruencias al final de la fecha de parada en la cadena %Zd\n" "en el campo `era'" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opción ilegal -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: línea `END' incompleta" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%s: secuencia de escape `%%%c' inválida en el campo `%s'" @@ -709,12 +724,12 @@ msgstr "%s: secuencia de escape `%%%c' i msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: secuencia de escape inválida en el campo `%s'" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: número de desplazamiento ilegal en la cadena %Zd en el campo `era'" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: número inválido de reglas de ordenación" @@ -733,17 +748,17 @@ msgstr "%s: número inválido de reglas de # Después de leer "1984", lo cambio. # Aquí y en todas partes. sv # -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opción inválida -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: fecha de comienzo inválida en la cadena %Zd en el campo `era'" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: fecha de parada inválida en la cadena %Zd en el campo `era'" @@ -759,38 +774,38 @@ msgstr "%s: valor inválido para el campo msgid "%s: language abbreviation `%s' not defined" msgstr "%s: la abreviatura de lenguaje `%s' no está definida" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: falta la palabra clave `order_end'" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: falta la palabra clave `reorder-end'" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: falta la palabra clave `reorder-sections-end'" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: falta el formato de era en la cadena %Zd en el campo `era'" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: falta el nombre de la era en la cadena %Zd en el campo `era'" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: hay varias definiciones de orden para la sección `%s'" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: varias definiciones de orden para la sección sin nombre" @@ -805,7 +820,7 @@ msgstr "%s: la expresión regular para el msgid "%s: no identification for category `%s'" msgstr "%s: no hay ninguna identificación para la categoría `%s'" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: no se ha encontrado ninguna definición de `default_missing' representable" @@ -820,53 +835,53 @@ msgstr "%s: no hay suficientes reglas de msgid "%s: numeric country code `%d' not valid" msgstr "%s: el código numérico de país `%d' no es válido" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: la opción `%c%s' no admite ningún argumento\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: la opción `%s' es ambigua\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: la opción `%s' requiere un argumento\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: la opción `--%s' no admite ningún argumento\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: la opción `-W %s' no admite ningún argumento\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: la opción `-W %s' es ambigua\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: la opción requiere un argumento --%c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: el orden para `%.*s' ya está definido en %s:%Zu" # FIXME: ¿Por qué este y el siguiente no son iguales? -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: el orden para el elemento de ordenación %.*s todavía no está definido" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: el orden para el símbolo de ordenación %.*s todavía no está definido" @@ -877,84 +892,84 @@ msgid "%s: output would overwrite %s\n" msgstr "%s: la salida sobreescribiría %s\n" # Ídem. 1984. -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: grave: valor_l %d inválido\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: fin de fichero no esperado" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: la sección `%.*s' es desconocida" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: la fecha de comienzo es inválida en la cadena %Zd del campo `era'" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: la fecha de final es inválida en la cadena %Zd del campo `era'" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: el rango simbólico de la elipsis no debe estar directamente seguido por `order_end'" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: el rango simbólico de la elipsis no debe seguir directamente a `order_start'" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: error de sintaxis" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: error de sintaxis en la definición de una nueva clase de caracteres" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: error de sintaxis en la definición de un nueva tabla de caracteres" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: tabla para la clase \"%s\": %lu bytes\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: tabla para la asignación \"%s\": %lu bytes\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: tabla para el ancho: %lu bytes\n" @@ -964,16 +979,21 @@ msgstr "%s: tabla para el ancho: %lu byt msgid "%s: terminology language code `%s' not defined" msgstr "%s: el código de terminología del idioma `%s' no está definido" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: los símbolos de comienzo y de final de un rango deben representar caracteres" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: el tercer operando para el valor del campo `%s' no debe ser mayor que %d" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: insuficiente número de valores para el campo `%s'" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -984,8 +1004,13 @@ msgstr "%s: demasiadas reglas; la primer msgid "%s: too many values" msgstr "%s: demasiados valores" +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: demasiados valores para el campo `%s'" + # Pregunta: ¿De verdad existe transliteración en español? sv -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: los datos de transliteración del local `%s' no están disponibles" @@ -995,48 +1020,53 @@ msgstr "%s: los datos de transliteración msgid "%s: unable to open %s: %m\n" msgstr "%s: no se pudo abrir %s: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: carácter desconocido en el nombre de un símbolo de ordenación" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: carácter desconocido en el nombre de definición equivalente" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: carácter desconocido en el valor de definición equivalente" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: carácter desconocido en el campo `%s'" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: nombre de sección desconocido `%s'" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: símbolo desconocido `%s' en la definición equivalente" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opción no reconocida `%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opción no reconocida `--%s'\n" # FIXME: Decir al autor que no use tabs. sv -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -1050,6 +1080,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: el modo de empleo es %s [ -v ] [ -c cutoff ] nombrezona ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: el valor para el campo `%s' debe ser un único carácter" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: el valor para el campo `%s' debe estar en el rango %d...%d" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -1074,17 +1114,17 @@ msgstr "" msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: el valor del campo `int_curr_symbol' tiene una longitud errónea" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: los valores para el campo `%s' deben ser menores que 127" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: los valores para el campo `%s' no deben ser mayores que %d" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: los valores para el campo `%s' no deben ser mayores que %d" @@ -1107,11 +1147,11 @@ msgstr "(ERROR DEL PROGRAMA) ¿¡No se con msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(ERRROR DEL PROGRAMA) ¿¡La opción debería haberse reconocido!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Objeto desconocido)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(error de autentificación desconocido - %d)" @@ -1136,6 +1176,11 @@ msgstr "*** El fichero `%s' está `stripp msgid "*standard input*" msgstr "*entrada estándar*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", ABI del SO: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1150,16 +1195,16 @@ msgid ".lib section in a.out corrupted" msgstr "la sección .lib en el a.out está corrompida" # FIXME: ¿¿No será major y minor?? -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; versión menor = %lu, versión mayor = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; causa = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> y <%s> son nombres no permitidos para el rango de caracteres" @@ -1169,12 +1214,12 @@ msgstr "<%s> y <%s> son nombres no permi msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> y <%s> son nombres inválidos para el rango de caracteres" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr "El carácter no debe estar en la clase `%s'" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr "El carácter no está en la clase `%s'" @@ -1190,7 +1235,7 @@ msgstr "?" msgid "Aborted" msgstr "Abortado" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Derechos de acceso : " @@ -1232,6 +1277,10 @@ msgstr "Error de anuncio" msgid "Alarm clock" msgstr "Temporizador" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Realizadas todas las peticiones" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Dibuja también una gráfica del total de memoria consumida" @@ -1241,7 +1290,7 @@ msgstr "Dibuja también una gráfica del t msgid "Anode table overflow" msgstr "Desbordamiento de tabla de ánodos" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "Otra cadena para hacer pruebas." @@ -1282,7 +1331,7 @@ msgstr "Se intentaron enlazar más biblio msgid "Attempting to link in too many shared libraries" msgstr "Se intentaron enlazar demasiadas bibliotecas compartidas" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Autentificación válida" @@ -1291,7 +1340,7 @@ msgstr "Autentificación válida" msgid "Authentication error" msgstr "Error de autentificación" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "OBJETO INVÁLIDO\n" @@ -1346,7 +1395,7 @@ msgstr "Valor erróneo para ai_flags" msgid "Be strictly POSIX conform" msgstr "Actúa estrictamente de acuerdo con la norma POSIX" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Datos binarios\n" @@ -1385,11 +1434,6 @@ msgstr "Tubería rota" msgid "Bus error" msgstr "Error del bus" -# Esto debe ser el Centro Democrático y Social :-) sv -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Rebasado el límite de tiempo de CPU" @@ -1407,77 +1451,82 @@ msgstr "No se puede acceder a una biblio msgid "Can not exec a shared library directly" msgstr "No se puede ejecutar una biblioteca compartida directamente" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Ha fallado la llamada a bind() con el servidor que sirve a este dominio" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "No se puede cambiar al directorio /" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "No se puede comunicar con el asignador de puertos" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "No se puede establecer comunicación con `ypbind'" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "No se puede establecer comunicación con `ypserv'" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "No se puede crear el fichero temporal de caché %s" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "No se encuentra %s" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "No se puede crear un enlace de %s a %s" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "No se puede efectuar `lstat' sobre %s" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "No se puede abrir el fichero de caché %s\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "No se puede leer el directorio de ficheros de caché %s\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "No se puede abrir el fichero de configuración `%s'" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "No se puede abrir el directorio %s" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "No se puede borrar el fichero de caché temporal antiguo %s" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "No se puede efectuar `stat' sobre %s" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "No se puede efectuar `stat' sobre %s\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "No se puede efectuar `unlink' sobre %s" @@ -1506,16 +1555,21 @@ msgstr "No se puede crear `socket' para msgid "Cannot exec a shared library directly" msgstr "No se puede ejecutar una biblioteca compartida directamente" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "No se puede efectuar `fstat' sobre el fichero %s.\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "No se puede tener más de una opción de generación de fichero\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "No se puede efectuar `lstat' sobre %s" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "No se puede efectuar `mmap' sobre el fichero %s.\n" @@ -1549,33 +1603,38 @@ msgstr "No se pudo especificar la opción msgid "Cannot specify more than one input file!\n" msgstr "No se puede especificar más de un fichero de entrada\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "No se puede efectuar `stat' sobre %s" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "No se puede usar la opción netid con la opción inetd\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "No se puede usar la opción netid sin TIRPC\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "No se pueden usar las opciones de la tabla con el nuevo estilo\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Cambia a ROOT y lo utiliza como directorio raíz" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "El cambio de los derechos de acceso de %s a 0644 falló" +msgid "Changing access rights of %s to %#o failed" +msgstr "El cambio de los derechos de acceso de %s a %#o falló" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Número de canal fuera de rango" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Separador de Caracteres : %c\n" @@ -1584,11 +1643,11 @@ msgstr "Separador de Caracteres : %c\n" msgid "Child exited" msgstr "El proceso hijo terminó" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Las credenciales del cliente son poco fiables" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Columnas :\n" @@ -1627,7 +1686,7 @@ msgid "Computer bought the farm" msgstr "Anda, vete a casa y tómate un vasito de leche" # FIXME: Why So Many Uppercase Letters? sv -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Configura las asociaciones de tiempo de ejecución del enlazador dinámico" @@ -1661,14 +1720,14 @@ msgstr "Expiró el tiempo de conexión" msgid "Continued" msgstr "Continúa" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Convierte la codificación de los ficheros dados de una codificación a otra." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1689,6 +1748,10 @@ msgstr "No se pudo crear el fichero de r msgid "Create C header file NAME containing symbol definitions" msgstr "Crea un fichero de cabecera C, NOMBRE, que contiene las definiciones de símbolos" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Crea un fichero de configuración de un módulo iconv de carga rápida." + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Crea tablas en estilo antiguo" @@ -1697,7 +1760,7 @@ msgstr "Crea tablas en estilo antiguo" msgid "Create output even if warning messages were issued" msgstr "Crea la salida incluso si hubo mensajes de aviso" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Fecha de creación : %s" @@ -1717,21 +1780,11 @@ msgstr "FICHERODEDATOS [FICHERODESALIDA] msgid "DES entry for netname %s not unique\n" msgstr "La entrada DES para el nombre %s no es única\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "DIRECTORIO\n" -# No sé lo que será el DNANS, pero si es como el DNS prefiero no -# traducirlo. sv -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "No se permite DST en programas SUID/SGID" @@ -1743,7 +1796,7 @@ msgstr "¡¡¡ERROR DEL ENLAZADOR DINÁMICO! msgid "Database for table does not exist" msgstr "No existe la base de datos para la tabla" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "La base de datos está ocupada" @@ -1751,7 +1804,7 @@ msgstr "La base de datos está ocupada" msgid "Deadlock situation detected/avoided" msgstr "Situación de bloqueo detectada/evitada" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Derechos de acceso predeterminados :\n" @@ -1780,12 +1833,12 @@ msgstr "El dispositivo no es un `stream' msgid "Device or resource busy" msgstr "Dispositivo o recurso ocupado" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bits)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Directorio : %s\n" @@ -1816,15 +1869,15 @@ msgid "Do not use existing catalog, forc msgstr "No utiliza el catálogo existente, crea un nuevo fichero de salida" # FUZZY -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "No se pudo conectar con el dominio" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "No crea caché" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "No genera enlaces" @@ -1833,31 +1886,31 @@ msgstr "No genera enlaces" msgid "Dump information generated by PC profiling." msgstr "Información de volcado generada mediante `PC profiling'." -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "Versión de ABI del fichero ELF inválida" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ABI del OS del fichero ELF inválida" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "La versión del fichero ELF no coincide con la actual" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "La identificación de versión del fichero ELF no encaja con la actual" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "El `phentsize' del fichero ELF no es el tamaño esperado" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "La dirección/desplazamiento de la orden de carga ELF no está bien alineada" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "El alineamiento de la orden de carga ELF no está alineada a la página" @@ -1867,11 +1920,11 @@ msgstr "El alineamiento de la orden de c msgid "EMT trap" msgstr "`trap' de EMT" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "ENTRADA\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "Datos cifrados\n" @@ -2028,8 +2081,12 @@ msgstr "Error de sistema desconocido: " msgid "Error while talking to callback proc" msgstr "Error al hablar con el proceso de `callback'" +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Error al escribir en la salida estándar" + # Supongo que se dice legible... sv -#: inet/ruserpass.c:181 +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Error: el fichero .netrc es legible por otros usuarios." @@ -2053,7 +2110,7 @@ msgstr "Error fatal: el sistema no defin msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "El FICHERO contiene una asignación de nombres simbólicos a valores UCS4" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Falló (error no especificado)" @@ -2062,7 +2119,7 @@ msgstr "Falló (error no especificado)" msgid "Failed to look up user '%s' to run server as" msgstr "Fallo al buscar el usuario '%s' para ejecutar el servidor" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "El fichero %s es demasiado pequeño, no se comprueba." @@ -2079,7 +2136,7 @@ msgstr "Descriptor de fichero en mal est msgid "File exists" msgstr "El fichero existe" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "El fichero no es un fichero de caché.\n" @@ -2116,7 +2173,7 @@ msgstr "Desbordamiento de la tabla de fi msgid "File too large" msgstr "Fichero demasiado grande" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Primera cadena para hacer pruebas." @@ -2128,7 +2185,7 @@ msgstr "Cadena primero/siguiente rota" msgid "Floating point exception" msgstr "Excepción de coma flotante" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Formato utilizado: new, old o compat (predeterminado)" @@ -2145,7 +2202,7 @@ msgstr "Se necesita una resincronización msgid "Function not implemented" msgstr "Función no implementada" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "GRUPO\n" @@ -2174,7 +2231,7 @@ msgstr "" "Genera un resultado lineal en el tiempo (por omisión es lineal en el número\n" "de llamadas a función)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Genera mensajes explicativos" @@ -2182,7 +2239,7 @@ msgstr "Genera mensajes explicativos" msgid "Generic system error" msgstr "Error del sistema genérico" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Obtiene la información específica del locale." @@ -2199,12 +2256,12 @@ msgstr "Da esta lista de ayuda" msgid "Gratuitous error" msgstr "Error injustificado" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Grupo : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Opciones de Grupo :" @@ -2284,16 +2341,12 @@ msgstr "Operación de E/S permitida" msgid "IOT trap" msgstr "`trap' de IOT" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "El identificador se ha eliminado" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Descartado el fichero %s dado que no es un fichero regular." @@ -2369,7 +2422,7 @@ msgstr "Operación no válida para un proc msgid "Information request" msgstr "Petición de información" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Información:" @@ -2377,12 +2430,12 @@ msgstr "Información:" msgid "Input Files:" msgstr "Ficheros de Entrada:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "No se encontró el fichero de entrada %s.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "Especificación de formato de Entrada/Salida:" @@ -2393,7 +2446,7 @@ msgstr "Error de entrada/salida" # Antes decía "del determinador de nombres", pero sinceramente, creo # que si pongo NIS se entenderá mejor. sv -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Error interno de NIS" @@ -2404,7 +2457,7 @@ msgstr "Error interno de NIS" # De acuerdo. # [ Antes decía ... la llamada a bind para el servicio de páginas amarillas ] # Un poco demasiado explicativo. sv -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Error interno en ypbind" @@ -2412,6 +2465,10 @@ msgstr "Error interno en ypbind" msgid "Interrupt" msgstr "Interrupción" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Interrumpido por una señal" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2436,27 +2493,27 @@ msgstr "La llamada al sistema interrumpi msgid "Invalid argument" msgstr "Argumento inválido" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Referencia hacia atrás inválida" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Nombre de clase de carácter inválido" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Credenciales del cliente inválidas" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Verificación del cliente inválida" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Carácter de unión inválido" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "Contenido de \\{\\} inválido" @@ -2482,15 +2539,15 @@ msgstr "Objeto inválido para la operació msgid "Invalid or incomplete multibyte or wide character" msgstr "El carácter multibyte o extendido está incompleto o es inválido" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "La expresión regular precedente es inválida" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Final de rango inválido" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "La expresión regular es errónea" @@ -2502,7 +2559,7 @@ msgstr "Código de petición incorrecto" msgid "Invalid request descriptor" msgstr "El descriptor de fichero solicitado es erróneo" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Verificación del servidor inválido" @@ -2537,7 +2594,7 @@ msgid "Is a named type file" msgstr "Es un fichero de tipo `named'" # Véase "Investigación y Ciencia" sv -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Cerbero.\n" @@ -2547,7 +2604,7 @@ msgstr "Cerbero.\n" msgid "Killed" msgstr "Terminado (killed)" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "ENLACE\n" @@ -2590,20 +2647,20 @@ msgstr "Número de enlace fuera de rango" msgid "Link points to illegal name" msgstr "En enlace apunta a un nombre ilegal" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Tipo de objeto enlazado : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Enlazado a : %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "No se ha establecido el nombre del dominio local" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "La asignación de recursos locales ha fallado" @@ -2622,11 +2679,11 @@ msgstr "" "Los argumentos obligatorios u opcionales para las opciones largas son\n" "también obligatorios u opcionales para las opciones cortas correspondientes." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Enlace bibliotecas individuales manualmente." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Servidor Maestro :\n" @@ -2638,7 +2695,7 @@ msgstr "El servidor maestro está ocupado msgid "Memory allocation failure" msgstr "Fallo en la asignación de memoria" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Memoria agotada" @@ -2657,7 +2714,7 @@ msgstr "Mensaje demasiado largo" msgid "Missing or malformed attribute" msgstr "Falta un atributo o está mal escrito" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Fecha de modificación: %s" @@ -2671,7 +2728,7 @@ msgstr "Fallo en la modificación" msgid "Modify operation failed" msgstr "La operación de modificación ha fallado" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Modifica el formato de salida:" @@ -2695,7 +2752,7 @@ msgstr "Debe especificar un nombre de us msgid "NAME" msgstr "NOMBRE" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2703,17 +2760,13 @@ msgstr "" "NOMBRE\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "" "Discordancia en las versiones de NIS del cliente y el servidor.\n" "No se puede suministrar el servicio." -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "La base de datos de la tabla NIS no es correcta" @@ -2729,7 +2782,7 @@ msgstr "No se puede acceder a los servid msgid "NIS+ service is unavailable or not installed" msgstr "El servicio NIS+ no está disponible o no está instalado" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "NO HAY NINGÚN OBJETO\n" @@ -2737,7 +2790,7 @@ msgstr "NO HAY NINGÚN OBJETO\n" msgid "NUMBER" msgstr "NÚMERO" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Nombre : `%s'\n" @@ -2851,7 +2904,7 @@ msgstr "No hay ningún ánodo" msgid "No buffer space available" msgstr "No queda espacio para memoria intermedia" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "" "No se ha especificado ningún nombre de conjunto de caracteres en la tabla\n" @@ -2870,8 +2923,8 @@ msgstr "No hay ningún proceso hijo" msgid "No data available" msgstr "No hay datos disponibles" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2884,7 +2937,7 @@ msgstr "No se encontró ninguna definició msgid "No file space on server" msgstr "No queda espacio de ficheros en el servidor" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "No se creó el enlace ya que no se encontró el soname para %s" @@ -2915,7 +2968,7 @@ msgstr "No se creó el enlace ya que no s msgid "No locks available" msgstr "No se pueden bloquear más ficheros" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "No hay ninguna coincidencia" @@ -2928,11 +2981,11 @@ msgstr "No se ha encontrado el medio" msgid "No message of desired type" msgstr "Ningún mensaje del tipo deseado" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "No hay más registros en la base de datos" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "No existe ninguna expresión regular anterior" @@ -2993,11 +3046,11 @@ msgstr "No existe tal dispositivo o dire msgid "No such file or directory" msgstr "No existe el fichero o el directorio" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "No existe esta clave en la tabla" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "No existe esa tabla en el dominio del servidor" @@ -3022,7 +3075,7 @@ msgstr "Se ha encontrado un nombre de es msgid "Non-recoverable failure in name resolution" msgstr "Fallo irrecuperable en la resolución del nombre" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Ninguno.\n" @@ -3089,12 +3142,12 @@ msgstr "No es el propietario" msgid "Not supported" msgstr "No soportado" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Número de Columnas : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Número de objetos : %u\n" @@ -3121,17 +3174,17 @@ msgid "Numerical result out of range" msgstr "Resultado numérico fuera de rango" # Tal vez habría que poner núm en vez de #. sv -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Objeto #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Nombre del Objeto : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Tipo del Objeto : " @@ -3148,11 +3201,11 @@ msgstr "El objeto es remoto" msgid "Object with same name exists" msgstr "Existe un objeto con el mismo nombre" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Número impar de comillas" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "" "Procesa únicamente los directorios especificados en la línea de órdenes.\n" @@ -3240,7 +3293,7 @@ msgstr "Alcanzado el límite de recursos msgid "Out of streams resources" msgstr "Alcanzado el límite de recursos de `streams'" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Control del resultado:" @@ -3248,12 +3301,12 @@ msgstr "Control del resultado:" msgid "Output selection:" msgstr "Selección del resultado:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Propietario : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "PRIVADO\n" @@ -3276,13 +3329,13 @@ msgstr "Éxito parcial" msgid "Passed object is not the same object on server" msgstr "El objeto pasado no es el mismo objeto que hay en el servidor" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "Se ha dado la ruta `%s' más de una vez" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -3292,11 +3345,11 @@ msgstr "Permiso denegado" msgid "Power failure" msgstr "Fallo de alimentación" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Fin no esperado de la expresión regular" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Muestra la caché" @@ -3304,6 +3357,10 @@ msgstr "Muestra la caché" msgid "Print current configuration statistic" msgstr "Muestra una estadística sobre la configuración actual" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Muestra más información" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Muestra más mensajes" @@ -3320,6 +3377,13 @@ msgstr "Éxito probable" msgid "Probably not found" msgstr "Probablemente no se encontró" +# Vale, pero muy poco más abajo has puesto "en curso", que me parece mejor. sv +# Creo que prefiero dejar uno de cada. Se me ocurre si no cambiar el +# de abajo también. em +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Se está procesando la petición" + # ¿No habría que traducir profile? sv # Miré los fuentes, y la última documentación de Glibc # No se me ocurre traducción para profile ( así se llamaba @@ -3393,7 +3457,7 @@ msgstr "error específico de RFS" msgid "RPC bad procedure for program" msgstr "RPC: procedimiento erróneo para el programa" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "Fallo RPC en una operación NIS" @@ -3417,11 +3481,11 @@ msgstr "la estructura RPC es incorrecta" msgid "RPC version wrong" msgstr "versión de RPC incorrecta" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (código de error desconocido)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: Error de autentificación" @@ -3431,24 +3495,24 @@ msgstr "RPC: Error de autentificación" # indiferentemente. Ya se sabe lo mal que les suena el pasado de can, # sobre todo en frases afirmativas ( que no es el caso, pero bueno ) # -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: No se pudo descodificar la respuesta" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: No se pudieron codificar los argumentos" # ??? Falló, fracasó, pinchó ;-) -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Falló (error no especificado)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: Versiones incompatibles de RPC" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Fallo del asignador de puertos" @@ -3469,35 +3533,35 @@ msgstr "RPC: Fallo del asignador de puer # # Por cierto, unavailable es NO disponible. Lo cambio. # Y quito el "rpc" sv+ -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: Procedimiento no disponible" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: Programa no registrado" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: Programa no disponible" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: La versión del programa no coincide" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: Error del sistema remoto" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: El servidor no puede descifrar los argumentos" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: Conseguido" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: El tiempo expiró" @@ -3506,29 +3570,29 @@ msgstr "RPC: El tiempo expiró" # da la impresión de que ni siquiera se intenta # A lo mejor es que ni siquiera puede intentarlo ... sv # Me suena horrible lo de "Incapaz", lo cambio. sv -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: No se puede recibir" # Sugerencia: No se puede enviar. (?) (no estoy muy seguro) sv -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: No se puede enviar" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: `Host' desconocido" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: Protocolo desconocido" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bits)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "Se ha usado RTLD_NEXT en una parte del código que no se cargó dinámicamente" @@ -3552,7 +3616,7 @@ msgstr "Sistema de ficheros de sólo lect msgid "Real-time signal %d" msgstr "Señal de tiempo real %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "La expresión regular es demasiado grande" @@ -3566,11 +3630,11 @@ msgstr "Error de E/S en la máquina remot msgid "Remote address changed" msgstr "La dirección remota ha cambiado" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Elimine la contraseña o haga el fichero no legible por otros." -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "Falló el renombramiento de %s a %s" @@ -3581,7 +3645,7 @@ msgid "Reopening shared object `%s' fail msgstr "La reapertura del objeto compartido `%s' falló" # ¿Replicate? -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Replicado :\n" @@ -3590,16 +3654,24 @@ msgstr "Replicado :\n" msgid "Report bugs to %s.\n" msgstr "Comunicar `bugs' a %s.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "Comunicar `bugs' usando el programa `glibcbug' a .\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Los argumentos de la petición son incorrectos" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Petición cancelada" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Petición no cancelada" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Reservado para uso futuro" @@ -3685,11 +3757,7 @@ msgstr "Resultados enviados al proceso d msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [DATOSPROF]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Ruta de búsqueda : %s\n" @@ -3714,11 +3782,11 @@ msgstr "El servidor está ocupado, intént msgid "Server out of memory" msgstr "Memoria agotada en el servidor" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "El servidor rechazó la credencial" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "El servidor rechazó el verificador" @@ -3805,7 +3873,7 @@ msgstr "`handle' de fichero NFS en desus msgid "Start NUMBER threads" msgstr "Comienza NÚMERO hilos" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Estado : %s\n" @@ -3847,7 +3915,7 @@ msgstr "La estructura necesita una limpi # me gustaría que hubiera otra palabra mejor. SV # Siempre me han gustado F&C ;-) # A mí también :-) sv -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Conseguido" @@ -3868,11 +3936,11 @@ msgstr "Nombres simbólicos de caracteres msgid "System error" msgstr "Error del sistema" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Información del sistema:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Fallo en la asignación de recursos del sistema" @@ -3894,7 +3962,7 @@ msgstr "" msgid "TABLE" msgstr "TABLA" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TABLA\n" @@ -3902,7 +3970,7 @@ msgstr "TABLA\n" msgid "TABLE,yes" msgstr "TABLA,sí" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Tipo de Tabla : %s\n" @@ -3926,7 +3994,7 @@ msgid "Text file busy" msgstr "El fichero de texto está ocupado" # FIXME: Espacio en blanco final. -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3944,11 +4012,11 @@ msgstr "" " " # Se admiten sugerencias para MT-safe. sv -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "¡Esta implementación no admite código de nuevo estilo o `MT-safe'!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Tiempo de vida : " @@ -4023,7 +4091,7 @@ msgstr "Demasiados usuarios" msgid "Trace/breakpoint trap" msgstr "`trap' para punto de parada/seguimiento" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Barra invertida extra al final `\\'" @@ -4067,12 +4135,12 @@ msgstr "El otro extremo de la conexión n msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Pruebe `%s --help' o `%s --usage' para más información.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Tipo : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "DESCONOCIDO" @@ -4092,31 +4160,35 @@ msgstr "No se puede crear la llamada de msgid "Unable to create process on server" msgstr "No se puede crear el proceso en el servidor" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Desconocido (tipo = %d, bits = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Palabra clave %s desconocida en .netrc" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "ELFCLASS desconocido en el fichero %s.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Error de NIS desconocido" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Sistema Operativo desconocido" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Base de datos desconocida: %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Error desconocido" @@ -4153,31 +4225,31 @@ msgstr "Error del servidor desconocido" msgid "Unknown signal %d" msgstr "Señal desconocida %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Error del sistema desconocido" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Error desconocido en la llamada a `ypbind()'" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "( ó \\( desemparejados" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr ") ó \\) desemparejados" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "[ ó ^[ desemparejados" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "\\{ desemparejado" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Variable no reconocida `%s'" @@ -4191,10 +4263,10 @@ msgstr "Condición urgente de E/S" msgid "Usage:" msgstr "Modo de empleo:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Modo de empleo: %s nombre_de_variable [ruta]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Modo de empleo: %s [-v especificación] nombre_de_variable [ruta]\n" # Sugerencia: numprogr -> numprog. sv # Sugerencia: numpuerto -> númpuerto. sv @@ -4204,11 +4276,11 @@ msgstr "Modo de empleo: %s nombre_de_var msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Modo de empleo: rpcinfo [ -n númpuerto ] -u host progrnúm [ numversión ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Utiliza CACHE como fichero de caché" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Utiliza CONF como fichero de configuración" @@ -4234,7 +4306,7 @@ msgid "Virtual timer expired" msgstr "El temporizador virtual llegó al final" # # Otra opción, resultado incongruente al ejecutar la orden em -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Resultado salvaje en la ejecución de la orden" @@ -4242,19 +4314,19 @@ msgstr "Resultado salvaje en la ejecució msgid "Window changed" msgstr "La ventana ha cambiado" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Escribe los nombres de las asignaciones de caracteres disponibles" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Escribe los nombres de los locales disponibles" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Escribe los nombres de las categorías seleccionadas" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Escribe los nombres de las palabras clave seleccionadas" @@ -4262,19 +4334,19 @@ msgstr "Escribe los nombres de las palab msgid "Write output to file NAME" msgstr "Escribe el resultado en el fichero NOMBRE" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "Falló la escritura de los datos de la caché" # FIXME. Merge with previous message (?). sv -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "Falló la escritura de los datos de la caché" -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "Escrito por %s.\n" @@ -4283,14 +4355,6 @@ msgstr "Escrito por %s.\n" msgid "Wrong medium type" msgstr "Tipo de medio erróneo" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -4324,13 +4388,17 @@ msgid "You really blew it this time" msgstr "Esta vez sí que lo has roto" # VER -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "" "La línea de continuación de la zona no está después del tiempo de final\n" "de la línea anterior" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[DIR...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[FICHERO...]" @@ -4362,13 +4430,13 @@ msgstr "`%.*s' ya está definido en la ta msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' ya está definido en el repertorio" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "La definición `%1$s' no termina con `END %1$s'" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s' y `%.*s' no son nombres válidos para el rango simbólico" @@ -4378,7 +4446,7 @@ msgstr "`%s' y `%.*s' no son nombres vál msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s' no es un fichero de datos para `profile' correcto para `%s'" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "la categoría `digit' no tiene entradas en grupos de diez" @@ -4394,12 +4462,12 @@ msgstr "No se admite ai_socktype" msgid "already running" msgstr "ya está funcionando" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "el argumento para <%s> debe ser un único carácter" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "el argumento para `%s' debe ser un único carácter" @@ -4413,30 +4481,30 @@ msgstr "auth_none.c - Problema muy grave msgid "authunix_create: out of memory\n" msgstr "authunix_create: memoria agotada\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "Argumento erróneo" # Antes decía: El propietario del fichero .rhosts no es válido -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "propietario incorrecto" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "Campo FROM vacío en la línea `Link'" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "Campo TO vacío en la línea `Link'" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "bloque liberado dos veces\n" # Revisar lo de bogus. creo que es eso. -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "valor de mcheck_status incorrecto, la biblioteca tiene un bug\n" @@ -4462,13 +4530,13 @@ msgid "cache_set: victim not found" msgstr "cache_set: no se encontró el objetivo" # FUZZY -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "" "No se puede determinar la abreviación de zona horaria que se usará justo\n" "después" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "no se puede reasignar el número de procedimiento %ld\n" @@ -4483,15 +4551,15 @@ msgstr "no se puede restaurar el `prot' msgid "cannot add already read locale `%s' a second time" msgstr "no se puede añadir el local ya leído `%s' por segunda vez" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "no se pudo asignar espacio para la lista de dependencias" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "no se puede asignar memoria para la cabecera del programa" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "no se puede asignar el registro del nombre" @@ -4499,33 +4567,29 @@ msgstr "no se puede asignar el registro msgid "cannot allocate symbol data" msgstr "no se puede asignar espacio para los datos del símbolo" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "no se puede asignar espacio para la lista de búsqueda de los símbolos" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "no se puede asignar espacio para la tabla de versiones de referencia" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "no se pueden cambiar las protecciones de memoria" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "no se puede crear una copia RUNPATH/RPATH" # He intentado mejorarlo un poco ... # -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "no se puede crear un caché para la ruta de búsqueda" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "no se puede crear la lista de capacidades" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "no se puede crear un descriptor interno" @@ -4534,23 +4598,28 @@ msgstr "no se puede crear un descriptor msgid "cannot create internal descriptors" msgstr "no se pueden crear descriptores internos" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "no se puede crear el fichero de salida `%s' para la categoría `%s'" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "no se puede crear la matriz de la ruta de búsqueda" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "no se puede crear la lista de búsqueda" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "no se puede crear el descriptor del objeto compartido" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "no se puede determinar el carácter de escape" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "no se puede cargar el ejecutable dinámicamente" @@ -4573,7 +4642,11 @@ msgstr "no se puede encontrar el preproc msgid "cannot find any C preprocessor (cpp)\n" msgstr "no se puede encontrar ningún preprocesador de C (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "no se puede generar el fichero de salida" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "" @@ -4584,19 +4657,15 @@ msgstr "" msgid "cannot load profiling data" msgstr "no se pueden cargar los datos de `profiling'" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "no se puede cargar el objeto compartido" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "no se puede hacer el segmento escribible para su relocalización" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "no se pueden asignar páginas de tipo `zero-fill'" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "no se puede abrir" @@ -4609,7 +4678,7 @@ msgstr "no se puede abrir `%s'" msgid "cannot open input file" msgstr "no se puede abrir el fichero de entrada" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "no se puede abrir el fichero de entrada `%s'" @@ -4620,21 +4689,21 @@ msgstr "no se puede abrir el fichero de msgid "cannot open locale definition file `%s'" msgstr "no se puede abrir el fichero de definición de locales `%s'" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "no se puede abrir el fichero de salida" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "no se puede abrir el fichero de salida `%s'" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "no se puede abrir el fichero de salida `%s' para la categoría `%s'" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "no se puede abrir el fichero del objeto compartido" @@ -4643,7 +4712,7 @@ msgstr "no se puede abrir el fichero del msgid "cannot open socket: %s" msgstr "no se puede abrir el `socket': %s" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "no se puede abrir el dispositivo de `zero fill'" @@ -4656,7 +4725,7 @@ msgstr "no se puede leer el directorio d msgid "cannot read configuration file; this is fatal" msgstr "no se puede leer el fichero de configuración; este error es fatal" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "no se pueden leer los datos del fichero" @@ -4669,11 +4738,6 @@ msgstr "no se puede leer la cabecera" msgid "cannot read header from `%s'" msgstr "no se puede leer la cabecera de `%s'" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "No se puede leer el directorio de locales %s" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "no se pueden leer los datos de estadística" @@ -4684,7 +4748,7 @@ msgstr "no se pueden leer los datos de e msgid "cannot safe new repertoire map" msgstr "no se puede asegurar el nuevo repertorio" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "no se puede efectuar `stat' sobre el objeto compartido" @@ -4699,7 +4763,7 @@ msgstr "no se puede ejecutar stat() sobr msgid "cannot write output files to `%s'" msgstr "no se puede escribir en el fichero de salida `%s'" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "no se puede escribir el resultado: %s" @@ -4709,78 +4773,83 @@ msgstr "no se puede escribir el resultad msgid "cannot write statistics: %s" msgstr "no se pueden escribir las estadísticas: %s" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "el carácter '%s' en la clase `%s' debe estar en la clase `%s'" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "el carácter '%s' en la clase `%s' no debe estar en la clase `%s" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "el carácter no está definido en la tabla de caracteres" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "el carácter L'\\u%0*x' en la clase `%s' debe estar en la clase `%s'" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "el carácter L'\\u%0*x' en la clase `%s' no debe estar en la clase `%s" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "el carácter `%s' no está definido cuando se necesitó como valor por defecto" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "la clase de carácter `%s' ya fue definida" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "la tabla de caracteres `%s' ya está definida" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "" "la tabla de caracteres `%s' no es compatible con ASCII, el local no cumple\n" "con ISO C\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "el fichero de tabla de caracteres `%s' no se encontró" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "los conjuntos de caracteres con estados de bloqueo no están soportados" +# ¿Qué demonios es esto? sv +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "queso" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "dependencias circulares entre definiciones de locales" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Error grave en la secuencia de cabecera." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: memoria agotada\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: memoria agotada\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: memoria agotada\n" @@ -4788,28 +4857,28 @@ msgstr "clntunix_create: memoria agotada msgid "constant or identifier expected" msgstr "se esperaba una constante o un identificador" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "no se admite la conversión de `%s' a `%s'" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "no están disponibles los módulos de conversión" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "el valor de la tasa de conversión no puede ser cero" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "la conversión se ha detenido debido a un problema al escribir el resultado" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "no se pudo crear un servidor rpc\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "no se pudo registrar el programa %ld versión %ld\n" @@ -4818,17 +4887,17 @@ msgstr "no se pudo registrar el programa msgid "database [key ...]" msgstr "basededatos [clave ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "no se encontró el fichero de tabla de caracteres predeterminado `%s'" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "definición duplicada de <%s>" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "definición duplicada de `script' `%s'" @@ -4837,12 +4906,12 @@ msgstr "definición duplicada de `script' msgid "duplicate set definition" msgstr "definición de conjunto duplicada" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "nombre de zona %s duplicado (fichero \"%s\", línea %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "definición duplicada para la asignación `%s'" @@ -4855,7 +4924,7 @@ msgstr "identificador de mensaje duplica msgid "duplicated message number" msgstr "número de mensaje duplicado" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "el rango de la elipsis debe estar marcada mediante dos operandos del mismo tipo" @@ -4863,10 +4932,15 @@ msgstr "el rango de la elipsis debe esta msgid "empty char string" msgstr "cadena de caracteres vacía" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "sustitución dinámica de un elemento por cadena vacía" +# FIXME: Es casi el mismo mensaje de antes. sv +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "sustitución dinámica de un elemento por cadena vacía" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: el caché ya estaba activado" @@ -4887,29 +4961,29 @@ msgstr "enablecache: no se pudo crear es msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: no se pudo crear espacio para la pila del caché" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "codificación para el resultado" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "codificación del texto original" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "error al obtener el id de los llamantes: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "error al añadir símbolo de ordenación equivalente" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "error al cerrar la entrada `%s'" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "error al cerrar el fichero de salida" @@ -4918,7 +4992,8 @@ msgstr "error al cerrar el fichero de sa msgid "error while closing the profiling data file" msgstr "error al cerrar el fichero de datos de `profiling'" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "error al leer la entrada" @@ -4926,10 +5001,14 @@ msgstr "error al leer la entrada" msgid "expect string argument for `copy'" msgstr "se espera un argumento de cadena de caracteres para `copy'" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "la línea de continuación esperada no se encuentra" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "sobra un punto y coma al final" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4939,7 +5018,7 @@ msgstr "fallo al cargar el objeto compar msgid "failed to load symbol data" msgstr "fallo al cargar los datos del símbolo" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "fallo al asignar un segmento del objeto compartido" @@ -4947,18 +5026,19 @@ msgstr "fallo al asignar un segmento del msgid "failed to mmap the profiling data file" msgstr "no se pudo hacer mmap con el fichero de datos de `profile'" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "fallo al comenzar el proceso de conversión" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "error al escribir los datos para la categoría `%s'" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "el fichero %s está truncado\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4967,21 +5047,21 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "el fichero `%s' ya existe y podría ser sobreescrito\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "fichero demasiado corto" # ## Sugerencia: Añadir (fstat) después de información. sv # Antes decía: No se pudo obtener información (fstat) del fichero .rhosts -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fstat ha fallado" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "inconsistencia al final de la especificación del código de caracteres" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "inconsistencias al final del número" @@ -5001,28 +5081,28 @@ msgstr "get_myaddress: ioctl (lee la con msgid "getent - get entries from administrative database." msgstr "getent - obtiene entradas de la base de datos administrativa." -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: petición recibida (Versión = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "el enlace duro falló, se usará un enlace simbólico" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "hay un enlace duro en alguna parte" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "el formato de rango hexadecimal debe usar solamente caracteres en mayúscula" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "El campo CORRECTION en la línea de año bisiesto es ilegal" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "Campo Rolling/Stationary ilegal en la línea de año bisiesto" @@ -5030,11 +5110,16 @@ msgstr "Campo Rolling/Stationary ilegal msgid "illegal character in file: " msgstr "carácter no válido en el fichero: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "secuencia de escape ilegal al final de la cadena de caracteres" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "secuencia de entrada ilegal en la posición %Zd" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "secuencia de entrada ilegal en la posición %ld" @@ -5048,102 +5133,102 @@ msgstr "tipodered ilegal :`%s'\n" msgid "illegal set number" msgstr "número de conjunto ilegal" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "límite de la implementación: no se permiten más de %Zd clases de caracteres" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "límite de la implementación: no se permiten más de %d tablas de caracteres" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "carácter o secuencia de desplazamiento incompleta al final del búfer" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "línea de entrada de tipo desconocido" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "error interno" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "error interno (descriptor ilegal)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "error interno - se llamó a `addtype' con un `isdst' erróneo" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "error interno - se llamó a `addtype' con un `ttisgmt' erróneo" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "error interno - se llamó a `addtype' con un `ttisstd' erróneo" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "error interno en %s, línea %u" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "cabecera ELF inválida" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "desplazamiento UTC inválido" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "formato de abreviatura incorrecto" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "carácter inválido: mensaje descartado" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "día del mes inválido" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "definición inválida" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "especificada una codificación inválida" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "año de final inválido" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "secuencia de escape inválida" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "año bisiesto inválido" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "línea inválida" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "modo inválido para dlopen()" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "nombre de mes incorrecto" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "nombres inválidos para el rango de caracteres" @@ -5156,52 +5241,52 @@ msgstr "tamaño de puntero inválido" msgid "invalid quote character" msgstr "carácter de cita inválido" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "la hora almacenada no es válida" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "año de comienzo inválido" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "hora del día inválida" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "nombre del día de la semana incorrecto" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "la longitud de la clave en la petición es demasiado larga: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "biblioteca libc4 %s en un directorio equivocado" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "biblioteca libc5 %s en un directorio equivocado" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "biblioteca libc6 %s en un directorio equivocado" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "las bibliotecas %s y %s en el directorio %s tienen el mismo soname pero distinto tipo." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "línea demasiado larga" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "lista todos los juegos de caracteres conocidos" @@ -5211,7 +5296,7 @@ msgstr "el nombre del local debe estar f # ## Lo mismo con lstat. sv # Antes decía: No se pudo obtener información (lstat) del fichero .rhosts -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "lstat ha fallado" @@ -5223,7 +5308,11 @@ msgstr "hace que la salida gráfica tenga msgid "make output graphic VALUE pixel wide" msgstr "hace que la salida gráfica tenga VALOR pixels de ancho" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: no sabe cómo manejar más de 8 argumentos\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "una línea incorrecta no se tendrá en cuenta" @@ -5236,39 +5325,34 @@ msgstr "falló la asignación de la tabla msgid "mapping of section headers failed" msgstr "falló la asignación de las cabeceras de sección" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "memoria alterada antes del bloque de memoria asignado\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "memoria alterada pasado el final del bloque de memoria asignado\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "memoria agotada" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "la memoria es consistente, la biblioteca tiene un bug\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "falló la operación `mmap' sobre el fichero de caché.\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "más de un segmento dinámico\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "regla sin nombre" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "no se ha especificado la codificación original ni la final" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -5301,7 +5385,7 @@ msgstr "netname2user: el nombre principa msgid "netname2user: should not have uid 0" msgstr "netname2user: no debería tener uid 0" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "el programa %d no fue registrado nunca\n" @@ -5314,11 +5398,11 @@ msgstr "no se ha dado ningún valor of range is smaller than from-value " msgstr "el valor `to' del rango es más pequeño que el valor `from' " -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "el valor `to' de la sucesión de caracteres es más pequeño que el valor `from'" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "insuficiente número de bytes en la codificación del carácter" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "demasiados bytes en la codificación del carácter" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "demasiados segundos intercalares" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "demasiados tipos de hora local" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "¡¿demasiadas transiciones?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "demasiadas abreviaturas de zona horaria, o demasiado largas" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "hay inconsistencias al final de la línea" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "dificultades para responder al programa %d\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "tecleado un único año" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "no se puede asignar espacio para el búfer de entrada" @@ -5789,11 +5861,16 @@ msgstr "no se puede asignar espacio para msgid "unable to free arguments" msgstr "no se pueden liberar los argumentos" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "sin definir" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +# FIXME: Falta ver si es niño o niña. sv +#: elf/cache.c:69 +msgid "unknown" +msgstr "desconocido/a" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "carácter desconocido `%s'" @@ -5806,7 +5883,7 @@ msgstr "carácter desconocido `%s'" msgid "unknown directive `%s': line ignored" msgstr "directiva desconocida `%s': línea pasada por alto" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "error de iconv() desconocido %d" @@ -5816,15 +5893,20 @@ msgstr "error de iconv() desconocido %d" msgid "unknown set `%s'" msgstr "conjunto `%s' desconocido" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "especificación \"%s\" desconocida" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "zona sin reglas" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "mensaje sin terminar" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "cadena de caracteres sin terminar" @@ -5832,12 +5914,12 @@ msgstr "cadena de caracteres sin termina msgid "unterminated string constant" msgstr "constante de caracteres sin terminar" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "nombre simbólico sin terminar" # FIXME: then -> than -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "el límite superior del rango no es mayor que el límite inferior" @@ -5846,7 +5928,7 @@ msgstr "el límite superior del rango no msgid "upper limit in range is not smaller then lower limit" msgstr "el límite superior del rango no es menor que el límite inferior" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "modo de empleo: %s fichero_de_entrada\n" @@ -5858,31 +5940,31 @@ msgstr "modo de empleo: %s fichero_de_en # en el fichero pondrá 2/29 em # Sugerencia: "uso de 2/29 ..." (usando sería "using") sv # Tienes razón em+ -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "uso de 2/29 en un año no bisiesto" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "el valor para %s debe ser un número entero" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "el valor para <%s> debe ser 1 o mayor" # Milagro, por una vez es más corto en español :-) sv -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "el valor de <%s> debe ser mayor o igual que el valor de <%s>" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "atención: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "al aceptar la conexión: %s" @@ -5899,11 +5981,15 @@ msgstr "al asignar espacio para la entra msgid "while allocating key copy" msgstr "al asignar espacio para la copia de la clave" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "al insertar en el árbol de búsqueda" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "al abrir el fichero de catálogo antiguo" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "al preparar la salida" @@ -5911,15 +5997,15 @@ msgstr "al preparar la salida" msgid "while stat'ing profiling data file" msgstr "al ejecutar `stat' sobre el fichero de datos de `profiling'" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "con valores de rango UCS se debe utilizar la elipsis simbólica hexadecimal `..'" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "con valores de rango código de caracteres se debe utilizar la elipsis absoluta `...'" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "con valores de rango nombre simbólico la elipsis absoluta `...' no debe usarse" @@ -5927,7 +6013,7 @@ msgstr "con valores de rango nombre simb msgid "write incomplete" msgstr "escritura incompleta" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "puede ser modificado por otros además del propietario" @@ -5945,23 +6031,23 @@ msgstr "número incorrecto de argumentos" # Si es mejor, ponlo en todos los sitios. Y si no, en ninguno. # Yo creo que es mucho mejor poner "número incorrecto ..." # Si no, queda como "al revés". sv+ -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "número incorrecto de campos en la línea de bisiesto (Leap)" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "número incorrecto de campos en la línea de enlace (Link)" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "número incorrecto de argumentos en la línea de regla (Rule)" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "número de campos incorrecto en la línea de continuación de zona (Zone)" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "número de campos incorrecto en la línea de zona (Zone)" @@ -5973,14 +6059,38 @@ msgstr "xdr_reference: memoria agotada\n msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: memoria agotada\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: no se puede convertir el nombre del `host' a nombre de red\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: no se puede encontrar la dirección del servidor\n" +#~ msgid "%s: Error writing " +#~ msgstr "%s: Error al escribir " + +#~ msgid "cannot create capability list" +#~ msgstr "no se puede crear la lista de capacidades" + +#~ msgid "cannot load shared object file" +#~ msgstr "no se puede cargar el objeto compartido" + +#~ msgid "cannot read locale directory `%s'" +#~ msgstr "No se puede leer el directorio de locales %s" + +#~ msgid "neither original nor target encoding specified" +#~ msgstr "no se ha especificado la codificación original ni la final" + +#~ msgid "original encoding not specified using `-f'" +#~ msgstr "la codificación original no se ha especificado utilizando `-f'" + +#~ msgid "standard output" +#~ msgstr "salida estándar" + +#~ msgid "target encoding not specified using `-t'" +#~ msgstr "no se ha especificado la codificación final utilizando `-t'" + #~ msgid " done\n" #~ msgstr " hecho\n" @@ -6096,9 +6206,6 @@ msgstr "yp_update: no se puede encontrar #~ msgid "error while inserting collation element into hash table" #~ msgstr "error cuando se insertaba el elemento de unión en la tabla enlazada" -#~ msgid "error while inserting to hash table" -#~ msgstr "error al insertar en la tabla enlazada" - #~ msgid "from-value of `collating-element' must be a string" #~ msgstr "el valor `from-value' del elemento de unión ha de ser una cadena de caracteres" @@ -6205,9 +6312,6 @@ msgstr "yp_update: no se puede encontrar #~ msgid "while writing database file" #~ msgstr "al escribir la base de datos" -#~ msgid "%s: Error writing standard output " -#~ msgstr "%s: Error al escribir en la salida estándar " - #~ msgid "symbol for multicharacter collating element `%.*s' duplicates other element definition" #~ msgstr "" #~ "el símbolo para el elemento de unión multicarácter `%.*s' repite la definición\n" @@ -6338,18 +6442,12 @@ msgstr "yp_update: no se puede encontrar #~ msgid "while opening UTMP file" #~ msgstr "al abrir el fichero UTMP" -#~ msgid "YPBINDPROC_DOMAIN: Internal error\n" -#~ msgstr "YPBINDPROC_DOMAIN: Error interno\n" - #~ msgid "YPBINDPROC_DOMAIN: No server for domain %s\n" #~ msgstr "YPBINDPROC_DOMAIN: No hay servidor para el dominio %s\n" #~ msgid "YPBINDPROC_DOMAIN: Resource allocation failure\n" #~ msgstr "YPBINDPROC_DOMAIN: Fallo en la asignación de recursos\n" -#~ msgid "unknown signal" -#~ msgstr "señal desconocida" - #~ msgid "yp_all: clnttcp_create failed" #~ msgstr "yp_all: ha fallado la llamada a 'clnttcp_create()'" @@ -6370,9 +6468,6 @@ msgstr "yp_update: no se puede encontrar #~ msgid "run_svc returned unexpectedly\n" #~ msgstr "run_svc terminó inesperadamente\n" - -#~ msgid "%s, line %d: " -#~ msgstr "%s, línea %d: " #~ # A los "arrays" les digo matrices. Igual en América se dice de otra forma. #~ # Creo que habría que consultarlo. SV. Binary files glibc-2.2.4/po/fr.mo and glibc-2.2.5/po/fr.mo differ diff -durpN glibc-2.2.4/po/fr.po glibc-2.2.5/po/fr.po --- glibc-2.2.4/po/fr.po Mon Aug 13 15:00:53 2001 +++ glibc-2.2.5/po/fr.po Wed Sep 19 13:10:15 2001 @@ -4,82 +4,87 @@ # msgid "" msgstr "" -"Project-Id-Version: GNU libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-08-13 08:00-0500\n" +"Project-Id-Version: GNU libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-09-19 08:00-0500\n" "Last-Translator: Michel Robitaille \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: valeur du champ `%s' doit être dans la gamme %d...%d" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tDroits d'accès : " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tAttributs : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dname[=valeur]] [-i taille] [-I [-K secondes]] [-Y chemin] fichier\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fichier_de_sortie] [fichier_d_entrée]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n id_réseau]* [-o fichier_de_sortie] [fichier_d_entrée]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s type_réseau]* [-o fichier_de_sortie] [fichier_d_entrée]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\t\tDroits d'accès : " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tDonnées entrées de type %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNom : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tClé publique : " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tType : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tAdresses universelles (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNom : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u octets] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -109,11 +114,11 @@ msgstr "" "%15ld%% taux de repérage\n" "%15s vérifier /etc/%s pour les changements\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\nMembres du groupe :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nDurée de vie : " @@ -141,7 +146,7 @@ msgstr " non" msgid " yes" msgstr " oui" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Longueur des données = %u\n" @@ -198,15 +203,15 @@ msgstr " program no_version protocole msgid " or: " msgstr " ou: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (ESCAMOTÉ)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (a été modifié)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (règles de \"%s\", ligne %d)" @@ -215,22 +220,22 @@ msgstr " (règles de \"%s\", ligne %d)" msgid " [OPTION...]" msgstr " [OPTION...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", ligne %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "La ligne \"Zone %s\" et l'option -l sont mutuellement exclusifs." -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "La ligne \"Zone %s\" et l'option -p sont mutuellement exclusifs." -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "\"fichier_d_entrée\" est requis pour la génération du gabarit des indicateurs.\n" @@ -244,55 +249,58 @@ msgstr "%.*s: le paramètre ARGP_HELP_FMT msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: paramètre ARGP_HELP_FMT inconnu" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 +#, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: la définition ne se termine pas par `END %1$s'" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d libs trouvé dans la cache `%s'\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s est dans une zone sans règle" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s est un fichier ELF 32bits.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s est un fichier ELF 64bits.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 +#, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s est pour une machine inconnue %d.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s n'est pas un type de librairie connue" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s n,est pas un fichier objet partagé (Type: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 +#, c-format msgid "%s is not a symbolic link\n" msgstr "%s n,est pas un lien symbolique\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s n'est pas un fichier de type ELF - il a le mauvais nombre d'octet au début.\n" @@ -312,12 +320,12 @@ msgstr "%s%s%s:%u: %s%s erreur imprévue: msgid "%s%sUnknown signal %d\n" msgstr "%s%ssignal inconnu %d.\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d n'a pas fait correctement l'expansion de la valeur signée\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: doit être plus grande que \n" @@ -332,89 +340,84 @@ msgstr "%s: échec du préprocesseur C -- msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: échec du préprocesseur C -- code de terminaison: %d\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: ne peut créer %s: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: ne peut créer le répertoire %s: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: ne peut établir un lien entre %s et %s: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: ne peut ouvrir %s: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: ne peut enlever %s: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: ne peut enlever le lien (unlink) %s: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: erreur lors de la fermeture de %s: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: erreur de lecture de %s\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: erreur d'écriture " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: erreur d'écriture de %s\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "" "%s: ligne de type `Leap' dans un fichier qui n'a pas\n" "de délai en secondes %s\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: mémoire épuisée: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: option -L spécifiée plus d'une fois\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: option -d spécifiée plus d'une fois\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: option -l spécifiée plus d'une fois\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: option -p spécifiée plus d'une fois\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: option -y spécifiée plus d'une fois\n" @@ -430,7 +433,8 @@ msgstr "%s: trop de paramètres\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: `%s' mentionné plus d'une fois dans la définition du poids %d" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 +#, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s' doit être un caractère" @@ -440,409 +444,485 @@ msgstr "%s: `%s' doit être un caractère" msgid "%s: `%s' value does not match `%s' value" msgstr "%s: valeur `%s' ne concorde pas avec la valeur `%s'" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 +#, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1' doit être la dernière entrée du champ `%s'" #: locale/programs/ld-collate.c:447 locale/programs/ld-collate.c:473 +#, c-format msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: `forward' et `backward' sont mutuellement exclusifs" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position' doit être utilisé pour un niveau spécifique dans toutes les sections ou aucune" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: la section `transit_start' n'est pas terminée par `translit_end'" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: séquence d'octet du 1er caractère d'une séquence est plus petit que celle du dernier caractère" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: séquences d'octets du 1er et dernier caractère doivent avoir la même longueur" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: ne peut avoir `%s' à la fin d'une plage d'ellipse" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: ne peut réordonner après %.*s: symbole inconnu" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: caractère `%s' dans la table des caractères n'est pas représentable par un seul octet" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: caractère `%s' nécessaire comme valeur par défaut N,est pas représentable par un seul octet" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 +#, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: caractère `%s' non défini dans la table des caractères alors qu'attendu comme valeur par défaut" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 +#, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: caractère `%s' non défini alors qu'attendu comme valeur par défaut" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: la commande était '%s', le résultat était %d\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 +#, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "" "%s: indicateur de direction dans la chaîne %Zd du champ `era'\n" "n'est pas un `+' ni un `-'." -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 +#, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "" "%s: indicateur de direction dans la chaîne %Zd du champ `era'\n" "n'est pas un caractère simple." -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 +#, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: double définition de `default_missing'" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 +#, c-format msgid "%s: duplicate category version definition" msgstr "%s: double définition de version de catégorie" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 +#, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: double déclaration de section `%s'" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 +#, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: double définition de `%s'" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 +#, c-format msgid "%s: empty category description not allowed" msgstr "%s: description de catégorie vide non permise" #: locale/programs/ld-collate.c:755 +#, c-format msgid "%s: empty weight string not allowed" msgstr "%s: chaîne de poids vide non permise" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 +#, c-format msgid "%s: error in state machine" msgstr "%s: erreur de l'automate à états finis" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 +#, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: champ `%s' déclaré plus d'une fois" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 +#, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: champ `%s' ne contient pas exactement 10 entrées" #: locale/programs/ld-address.c:154 locale/programs/ld-address.c:205 #: locale/programs/ld-address.c:230 locale/programs/ld-address.c:259 #: locale/programs/ld-name.c:115 locale/programs/ld-telephone.c:117 +#, c-format msgid "%s: field `%s' must not be empty" msgstr "%s: champ `%s' ne peut être vide" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 +#, c-format msgid "%s: field `%s' not defined" msgstr "%s: champ `%s' n'est pas défini" #: locale/programs/ld-messages.c:115 locale/programs/ld-messages.c:148 +#, c-format msgid "%s: field `%s' undefined" msgstr "%s: champ `%s' indéfini" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 +#, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "" "%s: rebut à la fin de la valeur du saut d'adresse dans la chaîne %Zd \n" "du champ `era'" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 +#, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: rebut à la fin de la date finale dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 +#, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: rebut à la fin de la date finale dans la chaîne %Zd du champ `era'" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: option illégale -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: ligne `END' incomplète" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%s: séquence d'échappement `%%%c' invalide dans le champ `%s'" #: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126 #: locale/programs/ld-telephone.c:150 +#, c-format msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: séquence d'échappement invalide dans le champ `%s'" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 +#, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: nombre illégal pour la valeur de saut dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: nombre invalide de règles de tri" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: option invalide -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 +#, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: date finale invalide dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 +#, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: date finale invalide dans la chaîne %Zd du champ `era'" #: locale/programs/ld-measurement.c:112 +#, c-format msgid "%s: invalid value for field `%s'" msgstr "%s: valeur invalide pour le champ `%s'" #: locale/programs/ld-address.c:242 locale/programs/ld-address.c:270 +#, c-format msgid "%s: language abbreviation `%s' not defined" msgstr "%s: abréviation de la langue `%s' n'est pas définie" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 +#, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: mot clé `order_end' manquant" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 +#, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: mot clé `reorder-end' manquant" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 +#, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: mot clé `reorder-sections-end' manquant" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 +#, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: format de type era manquant dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 +#, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: nom manquant dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 +#, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: définitions d'ordre multiple de la section `%s'" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 +#, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: définitions d'ordre multiple pour une section sans nom" #: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:170 +#, c-format msgid "%s: no correct regular expression for field `%s': %s" msgstr "%s: expression régulière incorrecte du champ `%s': %s" #: locale/programs/ld-identification.c:169 +#, c-format msgid "%s: no identification for category `%s'" msgstr "%s: pas d'identification pour la catégorie `%s'" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 +#, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: aucune définition `default_missing' pour les non représentables" #: locale/programs/ld-collate.c:591 +#, c-format msgid "%s: not enough sorting rules" msgstr "%s: pas assez de règles de tri" #: locale/programs/ld-address.c:295 +#, c-format msgid "%s: numeric country code `%d' not valid" msgstr "%s: code numérique invalide pour le pays `%d'" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: l'option `%c%s' ne permet pas de paramètre.\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: l'option `%s' est ambiguë\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: l'option `%s' requiert un paramètre\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: l'option `--%s' ne permet pas de paramètre\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: l'option `-W %s' ne permet pas de paramètre\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: l'option `-W %s' est ambiguë\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'option requiert un paramètre -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 +#, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: ordre de `%.*s' déjà défini comme %s:%Zu" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 +#, c-format msgid "%s: order for collating element %.*s not yet defined" -msgstr "%s: ordre de fusionnement d'éléments %s.*s n'est pas encore défini" +msgstr "%s: ordre de fusionnement d'éléments %.*s n'est pas encore défini" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 +#, c-format msgid "%s: order for collating symbol %.*s not yet defined" -msgstr "%s: ordre de fusionnement de symboles %s.*s n'est pas encore défini" +msgstr "%s: ordre de fusionnement de symboles %.*s n'est pas encore défini" #: sunrpc/rpc_main.c:289 #, c-format msgid "%s: output would overwrite %s\n" msgstr "%s: la sortie écraserait %s\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panique: valeur %d de type `l_value' invalide\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: fin prématurée du fichier" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: section `%.*s' inconnue" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 +#, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: date initiale invalide dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 +#, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: date finale invalide dans la chaîne %Zd du champ `era'" -#: locale/programs/ld-collate.c:1248 -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +#: locale/programs/ld-collate.c:1261 +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: plage de l'ellipse symbolique ne doit pas être suivie directement de `order_end'" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 +#, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: plage de l'ellipse symbolique ne doit pas être suivie directement de `order_start'" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: erreur de syntaxe" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 +#, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: srreur de syntaxe dans la définition d'une nouvelle classe de caractères" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 +#, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: erreur de syntaxe dans la définition d'une nouvelle table de caractères" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 +#, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: table pour la classe \"%s\": %lu octets\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 +#, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: table de cractères \"%s\": %lu octets\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 +#, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: table de largeur: %lu octets\n" #: locale/programs/ld-address.c:216 +#, c-format msgid "%s: terminology language code `%s' not defined" msgstr "%s: code de terminologie du langage `%s' non défini" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 +#, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: le symbole de départ et de fin d'une plage doit être en caractères" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 +#, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: le 3e opérande pour la valeur du champ `%s' ne peut être plus grand que %d" +#: locale/programs/ld-time.c:983 +msgid "%s: too few values for field `%s'" +msgstr "%s: trop peu de valeurs pour le champ `%s'" + #: locale/programs/ld-collate.c:555 +#, c-format msgid "%s: too many rules; first entry only had %d" msgstr "%s: trop de règles; la 1ère entrée n'en a que %d" #: locale/programs/ld-collate.c:906 +#, c-format msgid "%s: too many values" msgstr "%s: trop de valeurs" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +msgid "%s: too many values for field `%s'" +msgstr "%s: trop de valeurs pour le champ `%s'" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: la localisation `%s' n'est pas disponible pour la translitération des données" @@ -852,42 +932,53 @@ msgstr "%s: la localisation `%s' n'est p msgid "%s: unable to open %s: %m\n" msgstr "%s: incapable d'ouvrir %s: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: caractère inconnu dans le nom du symbole de collation" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 +#, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: caractère inconnu dans la définition équivalent d'un nom" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 +#, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: caractère inconnu dans la définition équivalente d'une valeur" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 +#, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: caractère inconnu dans le champ `%s'" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 +#, c-format msgid "%s: unknown section name `%s'" msgstr "%s: nom de section inconnu `%s'" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 +#, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: symbole inconnu `%s' dans une définition équivalente" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: option non reconnue `%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: option non reconnue `--%s'\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 +#, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" "\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n" @@ -900,31 +991,46 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: usage: %s [ -v ] [ -c seuil ] nom_du_fuseau_horaire ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: valeur du champ `%s' doit être un caractère simple" + +#: locale/programs/ld-monetary.c:308 +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: valeurs du champ `%s' doivent être dans la gamme %d..%d" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 +#, c-format msgid "%s: value for field `%s' must not be an empty string" msgstr "%s: valeur du champ `%s' ne doit pas être une chaîne vide." #: locale/programs/ld-monetary.c:250 locale/programs/ld-numeric.c:119 +#, c-format msgid "%s: value for field `%s' must not be the empty string" msgstr "%s: valeur du champ `%s' ne doit pas être une chaîne vide." #: locale/programs/ld-monetary.c:232 +#, c-format msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217" msgstr "%s: valeur du champ `int_curr_symbol' ne correspond pas à un nom valide de la norme ISO 4217." #: locale/programs/ld-monetary.c:224 +#, c-format msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: valeur du champ `int_curr_symbol' n'a pas la bonne longueur." -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 +#, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: valeurs du champ `%s' doivent être plus petites que 127." -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 +#, c-format msgid "%s: values for field `%s' must not be larger than %d" -msgstr "%s: valeurs du champ `%s' doivent être plus petites que 127." +msgstr "%s: valeurs du champ `%s' ne doivent pas être plus grandes que %d" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 +#, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: valeurs du champ `%s' doivent être plus petites que %d" @@ -946,11 +1052,11 @@ msgstr "(ERREUR DU PROGRAMME) Version in msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(ERREUR DU PROGRAMME) L'option aurait dûe être reconnue!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Objet inconnu)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(erreur inconnue d'authentification - %d)" @@ -968,6 +1074,11 @@ msgstr "*** Le fichier `%s' a été élagué msgid "*standard input*" msgstr "*entrée standard*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", ABI Système d'exploitation: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -981,30 +1092,31 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "La section .lib dans a.out est corrompue." -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; version basse = %lu, version haute = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; pourquoi = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> et <%s> sont des noms illégaux pour un intervalle." #: locale/programs/repertoire.c:448 +#, c-format msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> et <%s> sont des noms invalides pour un intervalle." -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr "Le caractère ne doit pas être dans la classe `%s'." -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr "Le caractère n'est pas dans la classe `%s'." @@ -1020,7 +1132,7 @@ msgstr "?" msgid "Aborted" msgstr "Abandon" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Droits d'accès :" @@ -1058,6 +1170,10 @@ msgstr "Erreur d'annonce" msgid "Alarm clock" msgstr "Minuterie d'alerte" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Toutes les requêtes exécutées" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Afficher aussi le graphe de l'utilisation totale de la mémoire" @@ -1066,7 +1182,7 @@ msgstr "Afficher aussi le graphe de l'ut msgid "Anode table overflow" msgstr "Débordement de la table de noeuds A (anode)" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "Une autre chaîne pour fins de test." @@ -1098,7 +1214,7 @@ msgstr "Tentative d'édition de liens à p msgid "Attempting to link in too many shared libraries" msgstr "Tentative d'édition de liens à partir de trop de librairies partagées" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Succès d'authentification" @@ -1107,7 +1223,7 @@ msgstr "Succès d'authentification" msgid "Authentication error" msgstr "Erreur d'authentification" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "OBJET ERRONÉ\n" @@ -1162,7 +1278,7 @@ msgstr "Mauvaise valeur pour l'indicateu msgid "Be strictly POSIX conform" msgstr "Doit se conformer de façon stricte à la norme POSIX" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Valeur binaire\n" @@ -1194,10 +1310,6 @@ msgstr "Relais brisé (pipe)" msgid "Bus error" msgstr "Erreur du bus" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Temps UCT limite expiré" @@ -1215,70 +1327,82 @@ msgstr "Ne peut accéder à la librairie p msgid "Can not exec a shared library directly" msgstr "Ne peut lancer un exec directement sur une librairie partagée" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Ne peut établir un lien avec le serveur qui dessert ce domaine" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "Ne peut se positionner (chdir) dans /" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "Ne peut communiquer avec le convertisseur de ports" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "Ne peut communiquer par ypbind" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "Ne peut communiquer par ypserv" -#: elf/cache.c:359 +#: elf/cache.c:394 +#, c-format msgid "Can't create temporary cache file %s" msgstr "Ne peut créer un fichier de cache temporaire %s" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "Ne peut repérer %s" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 +#, c-format msgid "Can't link %s to %s" msgstr "Ne peut établir un lien entre %s et %s" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "Ne peut évaluer par lstat %s" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 +#, c-format msgid "Can't open cache file %s\n" msgstr "Ne peut ouvrir le fichier de la cache %s\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 +#, c-format msgid "Can't open cache file directory %s\n" msgstr "Ne peut ouvrir le fichier de la cache des répertoires %s\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 +#, c-format msgid "Can't open configuration file %s" msgstr "Ne peut ouvrir le fichier de configuration %s" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 +#, c-format msgid "Can't open directory %s" msgstr "Ne peut ouvrir le répertoire %s" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "Ne peut enlever le vieux fichier temporaire %s" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +msgid "Can't stat %s" +msgstr "Ne peut évaluer par stat %s" + +#: elf/ldconfig.c:414 +#, c-format msgid "Can't stat %s\n" msgstr "Ne peut évaluer par stat %s\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 +#, c-format msgid "Can't unlink %s" msgstr "Ne peut enlever le lien (unlink) %s" @@ -1304,15 +1428,21 @@ msgstr "Ne peut créer un socket pour une msgid "Cannot exec a shared library directly" msgstr "Ne peut exécuter une librairie partagée directement" -#: elf/readlib.c:98 +#: elf/readlib.c:99 +#, c-format msgid "Cannot fstat file %s.\n" msgstr "Ne peut évaluer par fstat() %s\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "Ne peut avoir plus d'un fichier de génération de sémaphores!\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +msgid "Cannot lstat %s" +msgstr "Ne peut évaluer par lstat %s" + +#: elf/readlib.c:118 +#, c-format msgid "Cannot mmap file %s.\n" msgstr "Erreur de la procédure mmap du fichier %s\n" @@ -1345,33 +1475,36 @@ msgstr "Ne peut initialiser l'option `SO msgid "Cannot specify more than one input file!\n" msgstr "Ne peut spécifier plus d'un fichier d'entrée!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +msgid "Cannot stat %s" +msgstr "Ne peut évaluer par stat %s" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "Ne utiliser le sémaphore `netid' avec le sémaphore `inetd'!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "Ne peut utiliser le sémaphore `netid' sans `TIRPC'!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "Ne peut utiliser la table des sémaphores avec `newstyle'!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Positionné et utilisation de ROOT comme répertoire racine" -#: elf/cache.c:390 -#, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "ÉCHEC de modification des droits d'accès de %s à O644" +#: elf/cache.c:426 +msgid "Changing access rights of %s to %#o failed" +msgstr "ÉCHEC de modification des droits d'accès de %s à %#o" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Numéro de canal en dehors des limites" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Caractère de séparation : %c\n" @@ -1380,11 +1513,11 @@ msgstr "Caractère de séparation : %c\n" msgid "Child exited" msgstr "Le processus `enfant' a terminé." -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Identité du client peu fiable" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Colonnes :\n" @@ -1402,7 +1535,7 @@ msgstr "Compiler la spécification locale msgid "Computer bought the farm" msgstr "L'ordinateur a acheté la ferme..." -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Configuration dynamique des éditions de liens lors de l'exécution" @@ -1432,14 +1565,14 @@ msgstr "Connexion terminée par expiratio msgid "Continued" msgstr "Poursuite" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Conversion de l'encodage des fichiers d'un encodage à l'autre." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1460,6 +1593,10 @@ msgstr "Ne peut créer le journal \"%s\"" msgid "Create C header file NAME containing symbol definitions" msgstr "Création du NOM du fichier d'en-tête C contenant les définitions de symboles" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Craétion d'un module iconv de chargement rapide du fichier de configuration" + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Création des tables selon le vieux format" @@ -1468,7 +1605,7 @@ msgstr "Création des tables selon le vie msgid "Create output even if warning messages were issued" msgstr "Créer la sortie même si des messages d'avertissement sont affichées" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Date de création : %s" @@ -1487,19 +1624,11 @@ msgstr "DATAFILE [FICHIER_DE_SORTIE]" msgid "DES entry for netname %s not unique\n" msgstr "Entrée DES pour le nom de réseau %s n'est pas unique\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "RÉPERTOIRE\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "DST non permis dans un programme SUID/SGID" @@ -1511,7 +1640,7 @@ msgstr "PROBLÈME DANS LE CHARGEUR DE LIE msgid "Database for table does not exist" msgstr "La base de données de la table est inexistante" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "La base de données est occupée." @@ -1519,7 +1648,7 @@ msgstr "La base de données est occupée." msgid "Deadlock situation detected/avoided" msgstr "Situation de verrou bloquant détectée/évitée" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Droits d'accès par défaut :\n" @@ -1546,12 +1675,12 @@ msgstr "Le périphérique n'est pas de typ msgid "Device or resource busy" msgstr "Périphérique ou ressource occupé" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bits)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Répertoire : %s\n" @@ -1580,15 +1709,15 @@ msgstr "Ne pas cloner le processus par f msgid "Do not use existing catalog, force new output file" msgstr "Ne pas utiliser le catalogue existant, forcer la génération d'un nouveau fichier" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "Le domaine n'est pas délimité." -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "N'a pas construit la cache" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "N'a pas générer de liens" @@ -1596,31 +1725,31 @@ msgstr "N'a pas générer de liens" msgid "Dump information generated by PC profiling." msgstr "Vidange des informations générés par profilage PC" -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "Version du fichier ELF ABI invalide" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "Système d'exploitation du fichier ELF ABI invalide" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "Version du fichier ELF ne concorde pas avec la version courante" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "Identificateur de version du fichier ELF ne concorde pas avec la version courante" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "`Phentize' du fichier ELF ne concorde pas avec la taille prévue" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "Commande de chargement sur une adresse ELF incorrectement alignée" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "Commande de chargement sur une page ELF qui n'est pas alignée" @@ -1628,11 +1757,11 @@ msgstr "Commande de chargement sur une p msgid "EMT trap" msgstr "Trappe EMT" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "ENTRÉE\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "Données encryptées\n" @@ -1641,6 +1770,7 @@ msgid "Entry/table type mismatch" msgstr "Mauvais appariement du type entrée/table" #: nss/getent.c:127 nss/getent.c:292 +#, c-format msgid "Enumeration not supported on %s\n" msgstr "Énumération non supportée sur %s\n" @@ -1785,7 +1915,11 @@ msgstr "Erreur provenant d'une erreur sy msgid "Error while talking to callback proc" msgstr "Erreur lors d'échange par la procédure de callback()" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "ERREUR d'écriture sur la sortie standard" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Erreur: le fichier .netrc est lisible par tous les autres usagers" @@ -1808,7 +1942,7 @@ msgstr "ERREUR FATALE: le système ne peu msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "FICHIER contient la table d'adressage des noms symboliques vers les valeurs UCS4" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Échec (erreur non spécifiée)" @@ -1817,7 +1951,7 @@ msgstr "Échec (erreur non spécifiée)" msgid "Failed to look up user '%s' to run server as" msgstr "ÉCHEC de repérage de l'usager '%s' pour exécuter le serveur comme étant" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "Fichier %s trop petit, n'a pas été vérifié." @@ -1834,7 +1968,7 @@ msgstr "Le descripteur du fichier est da msgid "File exists" msgstr "Le fichier existe." -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "Le fichier n'est pas un fichier de cache.\n" @@ -1868,7 +2002,7 @@ msgstr "Débordement de la table de fichi msgid "File too large" msgstr "Fichier trop gros" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Première chaîne pour fins de test." @@ -1880,7 +2014,7 @@ msgstr "Bris de la chaîne Premier/Suivan msgid "Floating point exception" msgstr "Exception en point flottant" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Format à utiliser: nouveau, ancien ou compatible (par défaut)" @@ -1897,7 +2031,7 @@ msgstr "Resynchronisation complète est r msgid "Function not implemented" msgstr "Fonction non implantée" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "GROUPE\n" @@ -1915,14 +2049,14 @@ msgid "" "Generate message catalog.\\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n" "is -, output is written to standard output.\n" msgstr "" -"Générer le catalogue de messages.\\vSi le FICHIER_D_ENTRÉE est -, l'entrée est lue à partir de l'entrée standard. Si le FICHIER_DE_SORTIE\n" -"est -, la sortie est affichée sur la sortie standard.\n" +"Générer le catalogue de messages.\\vSi le FICHIER_D_ENTRÉE est -, l'entrée est lue à partir de l'entrée standard.\n" +"Si le FICHIER_DE_SORTIE est -, la sortie est affichée sur la sortie standard.\n" #: malloc/memusagestat.c:55 msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "Génération de sortie linéaire au temps (par défaut linéaire au nombre d'appels de fonction)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Afficher des messages en mode verbeux" @@ -1930,7 +2064,7 @@ msgstr "Afficher des messages en mode ve msgid "Generic system error" msgstr "Erreur système générique" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Trouver l'information locale spécifique" @@ -1947,12 +2081,12 @@ msgstr "Donner cette liste d'aide" msgid "Gratuitous error" msgstr "Erreur gratuite" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Groupe : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Groupe de sémaphores :" @@ -2017,16 +2151,12 @@ msgstr "E/S possible" msgid "IOT trap" msgstr "Trappe IOT" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "Identificateur éliminé" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Ignorer le fichier %s étant donné que ce n'est pas un fichier régulier" @@ -2079,7 +2209,7 @@ msgstr "Opération inappropriée pour un p msgid "Information request" msgstr "Requête d'information" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Information:" @@ -2087,11 +2217,12 @@ msgstr "Information:" msgid "Input Files:" msgstr "Fichiers d'entrée:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 +#, c-format msgid "Input file %s not found.\n" msgstr "Fichier d'entrée %s non repéré\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "Spécification des formats d'entrée/sortie:" @@ -2100,11 +2231,11 @@ msgstr "Spécification des formats d'entr msgid "Input/output error" msgstr "Erreur d'entrée/sortie" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Erreur interne de NIS" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Erreur interne de ypbind" @@ -2112,6 +2243,10 @@ msgstr "Erreur interne de ypbind" msgid "Interrupt" msgstr "Interruption" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Interrompu par un signal" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2135,27 +2270,27 @@ msgstr "Appel système interrompu, il aur msgid "Invalid argument" msgstr "Paramètre invalide" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Référence arrière invalide" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Nom de classe de caractères invalide" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Identité du client invalide" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Vérificateur du client invalide" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Caractère de fusionnement invalide" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "Contenu invalide de \\{\\}" @@ -2180,15 +2315,15 @@ msgstr "Objet invalide pour l'opération" msgid "Invalid or incomplete multibyte or wide character" msgstr "Chaîne multi-octets ou étendue de caractères invalide ou incomplète" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "Expression régulière précédente invalide" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Fin d'intervalle invalide" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "Expression régulière invalide" @@ -2200,7 +2335,7 @@ msgstr "Code de requête invalide" msgid "Invalid request descriptor" msgstr "Descripteur de requête invalide" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Vérificateur du serveur invalide" @@ -2228,7 +2363,7 @@ msgstr "est un fichier nommé (named)" msgid "Is a named type file" msgstr "est un type de fichier nommé (named)" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2236,7 +2371,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Processus arrêté" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "LIENS\n" @@ -2279,20 +2414,20 @@ msgstr "Numéro du lien hors intervalle" msgid "Link points to illegal name" msgstr "Lien pointe sur un nom illégal" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Type d'objet lié : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Liés à : %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Le nom du domaine local n'est pas initialisé." -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Échec d'allocation de ressources locales" @@ -2311,11 +2446,11 @@ msgstr "" "Les paramètres obligatoires ou optionnels pour les options de formes longues\n" "le sont aussi pour les options de forme courtes." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Lier manuellement les librairies individuelles" -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Serveur maître :\n" @@ -2327,7 +2462,7 @@ msgstr "Serveur maître occupé, vidange c msgid "Memory allocation failure" msgstr "Échec d'allocation mémoire" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Mémoire épuisée" @@ -2346,7 +2481,7 @@ msgstr "Message trop long" msgid "Missing or malformed attribute" msgstr "Attribut manquant ou mal composé" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Date de modification: %s" @@ -2359,7 +2494,7 @@ msgstr "Échec de modification" msgid "Modify operation failed" msgstr "Échec de l'opération de modification" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Format de sortie de modification:" @@ -2377,7 +2512,7 @@ msgstr "Obligation de spécifier le nom d msgid "NAME" msgstr "NOM" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2385,15 +2520,11 @@ msgstr "" "NOM\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "Non concordance de la version client/serveur NIS - ne peut fournir le service" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "La table de la base de données NIS est erronée." @@ -2409,7 +2540,7 @@ msgstr "Les serveurs NIS+ ne sont pas ac msgid "NIS+ service is unavailable or not installed" msgstr "Le service NIS+ n'est pas disponible ou installé." -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "PAS D'OBJET\n" @@ -2417,7 +2548,7 @@ msgstr "PAS D'OBJET\n" msgid "NUMBER" msgstr "NUMÉRO" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Nom : `%s'\n" @@ -2507,7 +2638,7 @@ msgstr "Aucune `anode' disponible" msgid "No buffer space available" msgstr "Aucun espace tampon disponible" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "Pas de nom de jeu caractères spéecifié dans la table des caractères" @@ -2524,12 +2655,13 @@ msgstr "Aucun processus enfant" msgid "No data available" msgstr "Aucune donnée disponible" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 #: locale/programs/ld-telephone.c:94 locale/programs/ld-time.c:160 +#, c-format msgid "No definition for %s category found" msgstr "Pas de définition pour la catégorie %s" @@ -2537,7 +2669,7 @@ msgstr "Pas de définition pour la catégo msgid "No file space on server" msgstr "Aucun espace disque disponible sur le serveur" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "Aucun lien créé étant donné qu'il n'a pas été repéré pour %s" @@ -2550,7 +2682,7 @@ msgstr "Aucun lien créé étant donné qu'i msgid "No locks available" msgstr "Aucun verrou disponible" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "Pas de concordance" @@ -2563,11 +2695,11 @@ msgstr "Aucun medium trouvé" msgid "No message of desired type" msgstr "Aucun message du type désiré" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "Aucun autre enregistrement dans la table de la base de données" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "Aucune expression régulière précédente" @@ -2617,11 +2749,11 @@ msgstr "Aucun périphérique ou adresse" msgid "No such file or directory" msgstr "Aucun fichier ou répertoire de ce type" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Cette clé n'est pas dans la table" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "Cette table n'est pas dans le domaine du serveur." @@ -2639,7 +2771,7 @@ msgstr "Espace des noms non-NIS+ rencont msgid "Non-recoverable failure in name resolution" msgstr "Échec non récupérable lors de la résolution du nom" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Aucun.\n" @@ -2706,12 +2838,12 @@ msgstr "N'est pas le propriétaire" msgid "Not supported" msgstr "Non supporté" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Nombre de colonnes : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Nombre d'objets : %u\n" @@ -2732,17 +2864,17 @@ msgstr "Le paramètre numérique est hors msgid "Numerical result out of range" msgstr "Le résultat numérique est en dehors de l'intervalle." -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Objet #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Nom de l'objet: %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Type d'objet :" @@ -2759,11 +2891,11 @@ msgstr "L'objet est télé-accessible." msgid "Object with same name exists" msgstr "Objet ayant le même nom existe" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Nombre impair de caractères apostrophe" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "Traitement uniquement des répertoires spécifiés sur le ligne de commande. N'a pas construit de cache." @@ -2845,7 +2977,7 @@ msgstr "Aucune autre ressource de type s msgid "Out of streams resources" msgstr "Aucune autre ressource de type streams disponible" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Contrôle de sortie:" @@ -2853,12 +2985,12 @@ msgstr "Contrôle de sortie:" msgid "Output selection:" msgstr "Sélection de sortie:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Propriétaire : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "PRIVÉ\n" @@ -2880,13 +3012,13 @@ msgstr "Succès partiel" msgid "Passed object is not the same object on server" msgstr "L'objet fourni n'est pas le même sur le serveur" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "Chemin `%s' donné plus d'une fois" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2896,11 +3028,11 @@ msgstr "Permission non accordée" msgid "Power failure" msgstr "Panne d'alimentation" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression régulière" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Afficher la cache" @@ -2908,6 +3040,10 @@ msgstr "Afficher la cache" msgid "Print current configuration statistic" msgstr "Afficher les statistiques de la configuration courante" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Afficher plus informations" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Afficher d'autres messages" @@ -2924,6 +3060,10 @@ msgstr "Succès probable" msgid "Probably not found" msgstr "Probablement pas repéré" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Traitement de la requête en cours" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "Expiration de la minuterie durant l'établissement du profile" @@ -2981,7 +3121,7 @@ msgstr "Erreur spécifique à `RFS'" msgid "RPC bad procedure for program" msgstr "Mauvaise procédure RPC du programme" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "Échec RPC durant l'opération NIS" @@ -3005,88 +3145,88 @@ msgstr "La déclaration struct RPC est er msgid "RPC version wrong" msgstr "Mauvaise version RPC" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (code d'erreur inconnu)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: erreur d'authentification" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: ne peut décoder le résultat" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: ne peut encoder les paramètres" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: échec (erreur non spécifiée)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: versions incompatibles de RPC" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: échec de conversion de ports" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: la procédure n'est pas disponible" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: le programme n'est pas enregistré" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: le programme n'est pas disponible" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: non concordance de programme ou de version" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: erreur système sur l'hôte cible" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: le serveur ne peut décoder les paramètres" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: succès" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: expiration du délai de la minuterie" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: incapable d'effectuer la réception" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: incapable d'effectuer la transmission" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: hôte inconnu" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: protocole inconnu" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bits)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "Le `RTLD_NEXT' utilisé dans le code n'est pas chargé dynamiquement." @@ -3109,7 +3249,7 @@ msgstr "Système de fichiers accessible e msgid "Real-time signal %d" msgstr "Signal de Temps-Réel %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Expression régulière trop grosse" @@ -3123,11 +3263,12 @@ msgstr "Erreur d'entrée/sortie sur l'hôt msgid "Remote address changed" msgstr "L'adresse de l'hôte cible a été modifiée." -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Retirer le mot de passe ou rendre les fichiers illisibles pour les autres usagers" -#: elf/cache.c:394 +#: elf/cache.c:431 +#, c-format msgid "Renaming of %s to %s failed" msgstr "ÉCHEC du changement de nom de %s vers %s" @@ -3136,7 +3277,7 @@ msgstr "ÉCHEC du changement de nom de %s msgid "Reopening shared object `%s' failed" msgstr "Échec de réouverture de l'objet partagé `%s'" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Duplication :\n" @@ -3145,16 +3286,24 @@ msgstr "Duplication :\n" msgid "Report bugs to %s.\n" msgstr "Rapporter toutes anomalies à %s.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "Rapporter toutes anomalies via le script `glibcbug' à .\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Le paramètre de la requête est invalide." +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Requête annulée" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "La requête ne peut être annulée" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Réservé pour un usage futur" @@ -3225,11 +3374,7 @@ msgstr "Résultats transmis à la procédur msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Chemin de recherche : %s\n" @@ -3246,11 +3391,11 @@ msgstr "Serveur occupé, essayer plus tar msgid "Server out of memory" msgstr "Mémoire du serveur épuisée" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "Le serveur a rejeté l'identité." -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "Le server a rejeté la vérification." @@ -3318,7 +3463,7 @@ msgstr "Panne d'accès au fichier NFS" msgid "Start NUMBER threads" msgstr "Démarrage du NOMBRE de `threads'" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Statut : %s\n" @@ -3348,7 +3493,7 @@ msgstr "Erreur de relais de type streams msgid "Structure needs cleaning" msgstr "La structure a besoin d'un nettoyage." -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Succès" @@ -3369,11 +3514,11 @@ msgstr "Les noms symboliques des caractè msgid "System error" msgstr "Erreur système" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Information système:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Échec d'allocation de ressources système" @@ -3394,7 +3539,7 @@ msgstr "" msgid "TABLE" msgstr "TABLE" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TABLE\n" @@ -3402,7 +3547,7 @@ msgstr "TABLE\n" msgid "TABLE,yes" msgstr "TABLE,oui" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Type de table : %s\n" @@ -3425,7 +3570,7 @@ msgstr "Complété" msgid "Text file busy" msgstr "Fichier texte occupé" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3441,11 +3586,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "Cette implantation ne supporte pas le nouveau style ou le code MT-safe!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Durée de vie restante : " @@ -3519,7 +3664,7 @@ msgstr "Trop d'usagers" msgid "Trace/breakpoint trap" msgstr "Trappe pour point d'arrêt et de trace" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Barre oblique inverse en suffixe" @@ -3551,12 +3696,12 @@ msgstr "Noeud final de transport n'est p msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Pour en savoir davantage, faites: `%s --help ou `%s --usage'.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Type : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "INCONNU" @@ -3576,31 +3721,35 @@ msgstr "Incapable de créer un callback() msgid "Unable to create process on server" msgstr "Incapable de créer un processus sur le serveur" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Inconnu (type = %d, bits = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Mot clé inconnu %s dans .netrc" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "ELFCLASS inconnue dans le fichier %s.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Code d'erreur NIS inconnu" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Système d'exploitation inconnu" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Base de données inconnue: `%s'\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Erreur inconnue" @@ -3636,31 +3785,31 @@ msgstr "Erreur du serveur inconnu" msgid "Unknown signal %d" msgstr "Signal inconnu %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Erreur système inconnue" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Erreur inconnue de ypbind" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "Échec du pairage de ( ou de \\(" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr "Échec du pairage de ) ou de \\)" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "Échec du pairage de [ ou de [^" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "Échec du pairage de \\{" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Variable non reconnue `%s'" @@ -3673,20 +3822,19 @@ msgstr "Condition d'E/S urgente" msgid "Usage:" msgstr "Usage:" -#: posix/getconf.c:731 -#, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Usage: %s nom_de_variable [chemin_d_accès]\n" +#: posix/getconf.c:883 +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Usage: %s [-v spécification] nom_de_variable [chemin_d_accès]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Usage: rpcinfo [ -n no_port ] -u hôte no_prog [ no_version ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Utilisation de CACHE comme ficher de cache" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Utilisation de CONF comme fichier de configuration" @@ -3711,7 +3859,7 @@ msgstr "Valeur trop grande pour le type msgid "Virtual timer expired" msgstr "Expiration de la minuterie virtuelle" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Résultat anarchique résultant de l'exécution de la commande" @@ -3719,19 +3867,19 @@ msgstr "Résultat anarchique résultant de msgid "Window changed" msgstr "La fenêtre a changée." -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Écriture des noms disponibles des tables de caractères" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Écriture des noms disponibles des localisations" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Écriture des noms sélectionnés des catégories" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Écriture des noms sélectionnés des mots clés" @@ -3739,18 +3887,18 @@ msgstr "Écriture des noms sélectionnés d msgid "Write output to file NAME" msgstr "Écriture sur la sortie dans le FICHIER" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "ÉCHEC d'écriture des données de la cache" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "ÉCHEC d'écriture des données de cache" -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "Écrits par %s.\n" @@ -3759,14 +3907,6 @@ msgstr "Écrits par %s.\n" msgid "Wrong medium type" msgstr "Mauvais type de medium" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3781,13 +3921,17 @@ msgstr "Oui, 42 est la clé du sens de la msgid "You really blew it this time" msgstr "Vous avez vraiment tout gâcher cette fois-ci." -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "" "Temps final de la ligne de continuation du fuseau horaire est antérieur\n" "au temps final de la ligne précédente." -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[RÉPERTOIRE...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[FICHIER...]" @@ -3819,13 +3963,14 @@ msgstr "`%.*s' déjà défini dans la table msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' déjà défini dans le répertoire" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "`%1$s' la définition ne se termine pas par `END %1$s'" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 +#, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s' et `%.*s' sont des noms invalides pour un intervalle symbolique." @@ -3834,7 +3979,7 @@ msgstr "`%s' et `%.*s' sont des noms inv msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s' est un fichier de profilage incorrect pour `%s'" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "catégorie `digit' n'a pas d'entrées dans les groupe des dizaines" @@ -3850,12 +3995,12 @@ msgstr "ai_socktype non supporté" msgid "already running" msgstr "déjà en exécution" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "Le paramètre de <%s> doit être un caractère simple." -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "Le paramètre de `%s' doit être un caractère simple." @@ -3868,28 +4013,28 @@ msgstr "auth_none.c - problème fatal de msgid "authunix_create: out of memory\n" msgstr "authunix_create: mémoire épuisée\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "Mauvais paramètre" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "Mauvais propriétaire" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "Champ `FROM' vide dans la ligne de type `Link'" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "Champ `TO' vide dans la ligne de type `Link'" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "Bloc libéré deux fois\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "Statut de `mcheck_status' erroné, la librarie est erronée.\n" @@ -3913,13 +4058,14 @@ msgstr "cache_set: échec d'allocation de msgid "cache_set: victim not found" msgstr "cache_set: `victim' non repéré" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "" "Ne peut déterminer l'abréviation du fuseau horaire à utiliser\n" "juste après telle date" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 +#, c-format msgid "can't reassign procedure number %ld\n" msgstr "Ne peut réassigner le numéro de procédure %ld\n" @@ -3932,15 +4078,15 @@ msgstr "Ne peut restaurer le segment pro msgid "cannot add already read locale `%s' a second time" msgstr "Ne peut ajouter une locale déjà lu `%s' une seconde fois" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "Ne peut allouer une liste de dépendances" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "Ne peut allouer de la mémoire pour une en-tête de programme" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "Ne peut allouer une nom d'enregistrement" @@ -3948,31 +4094,27 @@ msgstr "Ne peut allouer une nom d'enregi msgid "cannot allocate symbol data" msgstr "Ne peut allouer les données des symboles" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "Ne peut allouer la liste des symboles recherchées" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "Ne peut allouer une version de table de référence" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "Ne peut modifier les protections de mémoire" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "Ne peut créer une copie RUNPATH/RPATH" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "Ne peut créer une cache pour le chemin de recherche" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "Ne peut créer une liste des possibilités" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "Ne peut créer un descripteur interne" @@ -3981,23 +4123,27 @@ msgstr "Ne peut créer un descripteur int msgid "cannot create internal descriptors" msgstr "Ne peut créer les descripteurs internes" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +msgid "cannot create output file `%s' for category `%s'" +msgstr "Ne peut créer le fichier de sortie `%s' de catégorie `%s'" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "Ne peut créer un tableau des chemins de recherche" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "Ne peut créer une liste de recherche" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "Ne peut créer un objet descripteur partagé" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "Ne peut déterminer une séquence de caractère" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "Ne peut dynamiquement charger un exécutable" @@ -4019,7 +4165,11 @@ msgstr "Ne peut trouver le préprocesseur msgid "cannot find any C preprocessor (cpp)\n" msgstr "Ne peut trouver un préprocesseur C (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "Ne peut générer le fichier de sortie" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "Ne peut traiter une requête d'une vieille version %d; la version courante est %d" @@ -4028,19 +4178,15 @@ msgstr "Ne peut traiter une requête d'un msgid "cannot load profiling data" msgstr "Ne peut charger le fichier de données de profilage" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "Ne peut charger le fichier d'objet partagé" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "Ne peut rendre le segment inscritible lors d'une relocalisation" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "Ne peut adresser des pages rempliez de zéros" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "Ne peut ouvrir" @@ -4053,7 +4199,7 @@ msgstr "Ne peut ouvrir `%s'" msgid "cannot open input file" msgstr "Ne peut ouvrir le fichier d'entrée" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "Ne peut ouvrir le fichier d'entrée `%s'" @@ -4064,21 +4210,21 @@ msgstr "Ne peut ouvrir le fichier d'entr msgid "cannot open locale definition file `%s'" msgstr "Ne peut ouvrir le fichier des localisations `%s'" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "Ne peut ouvrir le fichier de sortie" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "Ne peut ouvrir le fichier de sortie `%s'" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "Ne peut ouvrir le fichier de sortie `%s' de catégorie `%s'" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "Ne peut ouvrir le fichier d'objet partagé" @@ -4087,7 +4233,7 @@ msgstr "Ne peut ouvrir le fichier d'obje msgid "cannot open socket: %s" msgstr "Ne peut ouvrir le socket: `%s'" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "Ne peut ouvrir le fichier de périphérique rempli de zéros" @@ -4100,7 +4246,7 @@ msgstr "Ne peut lire via le répertoire d msgid "cannot read configuration file; this is fatal" msgstr "Ne peut lire le fichier de configuration; cela est fatal" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "Ne peut lire le fichier de données" @@ -4113,11 +4259,6 @@ msgstr "Ne peut lire l'en-tête" msgid "cannot read header from `%s'" msgstr "Ne peut lire l'en-tête de `%s'" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "Ne peut lire via le répertoire des définitions localisées `%s'" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "Ne peut lire les données de statistiques" @@ -4126,7 +4267,7 @@ msgstr "Ne peut lire les données de stat msgid "cannot safe new repertoire map" msgstr "Ne peut sauvegarder la nouvelle table des répertoires" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "Échec évaluer par stat() l'objet partagé" @@ -4140,7 +4281,7 @@ msgstr "Ne peut évaluer par stat() le fi msgid "cannot write output files to `%s'" msgstr "Ne peut écrire dans les fichiers de sortie vers `%s'" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "Ne peut écrire les résultats: `%s'" @@ -4150,74 +4291,80 @@ msgstr "Ne peut écrire les résultats: `% msgid "cannot write statistics: %s" msgstr "Ne peut écrire les statistiques: `%s'" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "Caractère '%s' de la classe `%s' doit être dans la classe `%s'" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "Caractère '%s' de la classe `%s' ne doit pas être dans la classe `%s'" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "Caractère non défini dans la table des caractères" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 +#, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "Le caractère L'\\u%0*x' de la classe `%s' doit être dans la classe `%s'" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 +#, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "Le caractère L'\\u%0*x' de la classe `%s' ne doit pas être dans la classe `%s'" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "Caractère `%s' non défini alors qu'attendu comme valeur par défaut" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "Classe de caractères `%s' déjà définie" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "Table de caractères `%s' déjà définie" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "Table de caractères `%s' n'est pas compatblie ASCII, la locale n'est pas compatible ISO C\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "Fichier de la table des caractères `%s' non repérable" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "Les jeux de caractères avec état bloquant ne sont pas supportés" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "fromage" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "Dépendance circulaires entre les définitions locales" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Erreur fatale de sérialisation d'en-tête" -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: mémoire épuisée\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: mémoire épuisée\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: mémoire épuisée\n" @@ -4225,28 +4372,29 @@ msgstr "clntunix_create: mémoire épuisée msgid "constant or identifier expected" msgstr "Constante ou identificateur attendu" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "La conversion de `%s' vers `%s' n'est pas supportée." -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "Module de conversion 'est pas disponible" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "Le taux de conversion ne peut être zéro" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "Conversion stoppée en raison d'un problème d'écriture à la sortie" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "Ne peut créer un serveur RPC\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 +#, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "Ne peut enregistrer le programme %ld de version %ld\n" @@ -4254,16 +4402,18 @@ msgstr "Ne peut enregistrer le programme msgid "database [key ...]" msgstr "base de données [clé ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "Fichier de la table des caractères `%s' non repéré" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 +#, c-format msgid "duplicate definition of <%s>" msgstr "Double définitions de <%s>" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 +#, c-format msgid "duplicate definition of script `%s'" msgstr "Double définitions du script `%s'" @@ -4271,12 +4421,13 @@ msgstr "Double définitions du script `%s msgid "duplicate set definition" msgstr "Double définitions de jeux" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "Double noms de zone %s (fichier \"%s\", ligne %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 +#, c-format msgid "duplicated definition for mapping `%s'" msgstr "Double définitions de la table `%s'" @@ -4288,7 +4439,7 @@ msgstr "Double identificateurs de messag msgid "duplicated message number" msgstr "Double messages du numéro" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "Plage de l'ellipse doit être marqué par 2 opérandes du même type" @@ -4296,10 +4447,14 @@ msgstr "Plage de l'ellipse doit être mar msgid "empty char string" msgstr "Chaîne vide de caractères" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "La chaîne dynamique d'un jeton de substition est vide." +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "chaîne dynamique vide de jeton de substition" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: cache déjà activée" @@ -4316,29 +4471,29 @@ msgstr "enablecache: ne peut allouer une msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: ne peut allouer une cache de type fifo" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "encodage de la sortie" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "encodage du texte original" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "erreur lors de la recherche de l'identificateur de l'appelant: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "Erreur lors de l'ajout d'un symbole de collation équivalent" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "Erreur lors de la fermeture du fichier d'entrée `%s'" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "Erreur lors de la fermeture du fichier de sortie" @@ -4346,7 +4501,8 @@ msgstr "Erreur lors de la fermeture du f msgid "error while closing the profiling data file" msgstr "Erreur lors de la fermeture du fichier de données de profilage" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "Erreur lors de la lecture de l'entrée" @@ -4354,10 +4510,14 @@ msgstr "Erreur lors de la lecture de l'e msgid "expect string argument for `copy'" msgstr "Chaîne attendue pour le paramètre de `copy'" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "Ligne de continuation attendue, non repérée" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "points virgule de terminaison superflus" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4367,7 +4527,7 @@ msgstr "Échec de chargement de l'objet p msgid "failed to load symbol data" msgstr "Échec du chargement de données de symbole" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "Échec d'adressage (mapping) du segement de l'objet partagé" @@ -4375,18 +4535,19 @@ msgstr "Échec d'adressage (mapping) du s msgid "failed to mmap the profiling data file" msgstr "Échec de la procédure mmap sur le fichier de données de profilage" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "Échec de démarrage du processus de conversion" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "Échec lors de l'écriture des données de catégorie `%s'" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "fichier %s est tronqué\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4395,19 +4556,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "Le fichier '%s' existe déjà et peut avoir été écrasé.\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "Fichier trop court" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "Échec d'évaluation fstat()" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "Rebut à la fin du caractère du code de spécification" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "Rebut à la fin des chiffres" @@ -4427,28 +4588,28 @@ msgstr "get_myaddress: ioctl (a obtenu l msgid "getent - get entries from administrative database." msgstr "getent() - obtenir les entrées de la base de données administratives" -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: requête reçue (Version = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "Échec de création du lien direct, création d'un lien symbolique" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "lien direct rencontré" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "Format de la gamme hexadécimale doit être en majuscules" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "CORRECTION illégale du champ dans la ligne de type `Leap'" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "Champ `Rolling/Stationary' illégal sur la ligne de type `Leap'" @@ -4456,11 +4617,15 @@ msgstr "Champ `Rolling/Stationary' illég msgid "illegal character in file: " msgstr "Caractère illégal dans le fichier" -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "Séquence d'échappement illégale à la fin de la chaîne" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +msgid "illegal input sequence at position %Zd" +msgstr "Séquence d'échappement d'entrée illégale à la position %Zd" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "Séquence d'échappement illégale à la position %ld" @@ -4474,101 +4639,102 @@ msgstr "`nettype' illégal :'%s'\n" msgid "illegal set number" msgstr "Numéro de jeu illégal" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 +#, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "Limite d'implantation: pas plus de %Zd classes de caractères permises" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "Limite d'implantation: pas plus de %d tables de caractères sont permises" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "Caractère ou séquence de changement incomplet à la fin du tampon" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "Ligne d'entrée de type inconnu" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "Erreur interne" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "Erreur interne (descripteur illégal)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type `isdst'" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type `ttisgmt'" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "Erreur interne - addtype() appellé avec un mauvais bloc de type `ttisstd'" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "Erreur interne dans %s, ligne %u" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "En-tête ELF invalide" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "Adressage relatif GMT invalide" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "Format d'abréviation invalide" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "Caractères invalide: message ignoré" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "Jour du mois invalide" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "Définition invalide" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "Encodage fourni invalide" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "Année finale invalide" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "Séquence d'échappement invalide" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "Année bissextile invalide" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "Ligne invalide" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "mode invalide pour dlopen()" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "Nom de mois invalide" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "Nom invalide pour un intervalle de caractères" @@ -4581,51 +4747,52 @@ msgstr "Taille de pointeur invalide" msgid "invalid quote character" msgstr "Caractère de citation (quote) invalide" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "Temps sauvegardé invalide" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "Année initiale invalide" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "Heure du jour invalide" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "Nom du jour de semaine invalide" -#: nscd/connections.c:470 +#: nscd/connections.c:479 +#, c-format msgid "key length in request too long: %d" msgstr "La longueur de la clé de la requête est trop longue: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "librairie libc4 %s est dans le mauvais répertoire" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "librairie libc5 %s est dans le mauvais répertoire" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "librairie libc6 %s est dans el mauvais répertoire" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "Les librairies %s et %s du répertoire %s ont le même nom mais sont de types différents" -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "Ligne trop longue" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "Liste tous les jeux de code de caractères" @@ -4633,7 +4800,7 @@ msgstr "Liste tous les jeux de code de c msgid "locale name should consist only of portable characters" msgstr "Nom de locale doit être composé de caractères portables" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "Échec d'évaluation lstat()" @@ -4645,7 +4812,11 @@ msgstr "Générer un graphique de sortie a msgid "make output graphic VALUE pixel wide" msgstr "Générer un graphique de sortie ayant pour la largeur des pixels la VALEUR" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: ne sait pas comment traiter plus de 8 arguments\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "Ligne incorrecte ignorée" @@ -4657,39 +4828,34 @@ msgstr "Échec d'adressage de la chaîne d msgid "mapping of section headers failed" msgstr "Échec d'adressage de la section d'en-tête" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "Mémoire écrasée avant le bloc alloué\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "Mémoire écrasée après la fin du bloc alloué\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "Mémoire épuisée" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "La mémoire est consistente, la librairie est fautive.\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "ÉCHEC de la procédure mmap du fichier de cache\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "Plus d'un segment dynamique\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "Règle sans nom" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "Ni l'encodage d'origine et cible n'ont été spécifié" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4722,7 +4888,7 @@ msgstr "netname2user: nom principal `%s' msgid "netname2user: should not have uid 0" msgstr "netname2user: ne devrait pas avoir le UID 0" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "Le programme %d n'a jamais été enregistré.\n" @@ -4731,11 +4897,11 @@ msgstr "Le programme %d n'a jamais été e msgid "no or value given" msgstr "Aucune valeur ou fournie" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "Pas de jour dans les règles de concordance" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "Pas de définition de type `UNDEFINED'" @@ -4744,7 +4910,7 @@ msgstr "Pas de définition de type `UNDEF msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "Aucun fichier de données de profilage fourni et l'objet partagé `%s' n'a pas le nom donné" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "Pas de chiffre défini et aucun des noms standards dans la table des caractères" @@ -4752,37 +4918,37 @@ msgstr "Pas de chiffre défini et aucun d msgid "no other keyword shall be specified when `copy' is used" msgstr "Aucun autre mot clé ne doit être spécifié lorsque `copy' est utilisé" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "Pas de chiffre défini et aucun des noms standards dans la table des caractères" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "Aucun fichier de sortie généré en raison d'un avertissement déjà émis" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "Aucun nom symbolique fourni" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "Pas de nom symbolique fourni pour la fin de l'intervalle" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "Une valeur de caractère non-symbolique ne doit pas être utilisée" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "Pas tous les caractères utilisés dans `outdigit' sont disponibles dans la table des caractères" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "Pas tous les caractères utilisés dans `outdigit' sont disponibles dans le répertoire" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "N'est pas un fichier régulier" @@ -4801,37 +4967,34 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd n'est pas en exécution!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "Le fichier objet n'a pas de section dynamique" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "Omission de caractères invalides à la sortie" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "Seuls ET_DYN et ET_EXEC peuvent être chargés" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "" "Seules les définitions de type `WIDTH' sont permises suite\n" "à une définition de type `CHARMAP'." -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 +#, c-format msgid "order for `%.*s' already defined at %s:%Zu" -msgstr "L'ordre de `%.*s' est déjà défini dans %s:Zu" - -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "Encodage d'origine non spécifié utilisation de `-f'" +msgstr "L'ordre de `%.*s' est déjà défini dans %s:%Zu" -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "Mémoire épuisée" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "fichier de sortie" @@ -4839,19 +5002,19 @@ msgstr "fichier de sortie" msgid "pmap_getmaps rpc problem" msgstr "problème RPC avec pmap_getmaps()" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: échec du protocole dans la configuration du circuit\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "Fin prématurée de la définition de `translit_ignore'" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "Erreur du préprocesseur" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "Le définition précédente était ici" @@ -4859,7 +5022,7 @@ msgstr "Le définition précédente était i msgid "print list of count paths and their number of use" msgstr "Afficher le décompte des chemins et le nombre de leur utilisation" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "Afficher des informations de progression" @@ -4885,30 +5048,30 @@ msgstr "Le programme %lu de version %lu msgid "program %lu version %lu ready and waiting\n" msgstr "Le programme %lu de version %lu est prêt et en attente.\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: lecture écourtée" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (configuration de stderr): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: socket: tous les ports sont occupés\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: écriture (configuration de stderr): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: mémoire épuisée\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "Répétition du délai une seconde fois" @@ -4917,7 +5080,7 @@ msgstr "Répétition du délai une seconde msgid "repertoire map file `%s' not found" msgstr "Fichier de la table des caractères `%s' non repérable" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "Les octets résultants pour la plage ne sont pas représentables." @@ -4953,24 +5116,24 @@ msgstr "rpcinfo: échec de diffusion: %s\ msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: ne peut contacter l'aiguilleur de ports" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "Même nom de règle dans plusieurs fichiers" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "L'objet partagé ne peut pas être ouvert via dlopen()" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "Objet partagé non ouvert" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "Lecture écourtée lors de la lecture de la clé de requête: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "Lecture écourtée lors de la lecture de la requête: `%s'" @@ -4980,35 +5143,31 @@ msgstr "Lecture écourtée lors de la lect msgid "short write in %s: %s" msgstr "Écriture écourtée dans %s: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "socket: échec de protocole dans la configuration du circuit.\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "entrée standard" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "sortie standard" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "Début et fin de l'intervalle de la séquence de caractères doivent avoir la même longueur" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "Année initiale plus grande que l'année finale" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "Année de départ trop grande pour être représentée" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "Année de départ trop petite pour être représentée" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "Suppression des AVERTISSEMENTS" @@ -5016,31 +5175,31 @@ msgstr "Suppression des AVERTISSEMENTS" msgid "svc_run: - poll failed" msgstr "svc_run: - ÉCHEC de scrutation" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - ne peut repérer le nom du socket par getsockname() ou listen()" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - problème de création d'un socket TCP" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: mémoire épuisée\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - problème de création d'un socket `AF_UNIX'" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - ne peut repérer le nom du socket par getsockname() ou listen()" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: mémoire épuisée\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: mémoire épuisée\n" @@ -5060,46 +5219,49 @@ msgstr "svcudp_create: problème de créat msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad est trop petit pour IP_PKTINFO\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: mémoire épuisée\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 +#, c-format msgid "symbol `%.*s' not in charmap" msgstr "Symbole `%.*s' n'est pas dans la table des caractères" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 +#, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "Symbole `%.*s' n'est pas dans la table des répertoires" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "Symbole `%s'" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "Symbole `%s' a le même encodage que" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 +#, c-format msgid "symbol `%s' not defined" msgstr "Symbole `%s' n'est pas défini" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "Erreur de syntaxe" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "Erreur de syntaxe dans la définition de %s: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5111,75 +5273,70 @@ msgstr "Erreur de syntaxe du prologue: % msgid "syntax error in repertoire map definition: %s" msgstr "Erreur de syntaxe dans le répertoire de la table des définitions: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "Erreur de syntaxe: pas à l'intérieur d'une section de définition localisée" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "encodage cible non spécifiée par l'option `-t'" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "Ceci est la première définition." # time/zic.c:1120A -# mro: à investiguer dans le code source -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "Temps défini avant le zéro" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "Débordement du temps alloué" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "Valeur-finale de l'intervalle est plus petite que la valeur-départ " -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "Valeur finale de la séquence des caractères est plus petite que la valeur de départ" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "Trop peu d'octets pour l'encodage des caractères" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "Trop d'octets pour l'encodage des caractères" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "Trop de délai en secondes" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "Trop de types localisés pour la représentation du temps" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "Trop de transitions définies?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "Trop ou de trop longues abréviations de fuseaux horaires" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "Suffixe en rebut à la fin de la ligne" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "Problème à répondre au programme %d.\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "Une seule année fournie" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "incapable d'allouer un tampon pour l'entrée" @@ -5187,11 +5344,15 @@ msgstr "incapable d'allouer un tampon po msgid "unable to free arguments" msgstr "incapable de libérer des paramètres" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "indéfini" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "inconnu" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "Caractère inconnu `%s'" @@ -5201,7 +5362,7 @@ msgstr "Caractère inconnu `%s'" msgid "unknown directive `%s': line ignored" msgstr "Directive inconnue `%s': ligne ignorée" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "erreur inconnue de iconv() %d" @@ -5211,15 +5372,19 @@ msgstr "erreur inconnue de iconv() %d" msgid "unknown set `%s'" msgstr "Jeu inconnu `%s'" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +msgid "unknown specification \"%s\"" +msgstr "spécification inconnu \"%s\"" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "Zone sans règle" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "Message incomplet" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "Chaîne incomplète" @@ -5227,11 +5392,11 @@ msgstr "Chaîne incomplète" msgid "unterminated string constant" msgstr "Chaîne d'une constante incomplète" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "Nom symbolique incomplet" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "" "La limite supérieure de l'intervalle n'est pas plus grand\n" @@ -5243,33 +5408,35 @@ msgstr "" "La limite supérieure de l'intervalle n'est pas plus petite\n" "que la limite inférieure." -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "usage: %s fichier_d_entrée\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "Utiliser 2/29 pour les années non-bissextiles." -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "La valeur de %s doit être un entier." -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 +#, c-format msgid "value for <%s> must be 1 or greater" msgstr "La valeur de <%s> doit être plus grande ou égale à 1." -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 +#, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "La valeur de <%s> doit être plus grande ou égale que la valeur de <%s>" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "AVERTISSEMENT: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "lors de l'acceptation de connexion: %s" @@ -5286,11 +5453,15 @@ msgstr "lors de l'allocation d'entrées d msgid "while allocating key copy" msgstr "lors de l'allocation d'une copie de clé" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "lors d'une insertion dans un arbre de recherche" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "lors de l'ouverture du vieux fichier du catalogue" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "lors de la préparation de la sortie" @@ -5298,15 +5469,15 @@ msgstr "lors de la préparation de la sor msgid "while stat'ing profiling data file" msgstr "lors de l'évaluation par `stat' du fichier de données de profilage" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "Les valeurs d'une plage UCS doivent utiliser une ellipse symbolique en hexadécimal `..'" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "Les valeurs d'une plage de caractères doivent utiliser une ellipse absolu `...'" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "Les valeurs d'une plage de noms symboliques d'une ellipse absolue `....' ne doivent pas être utilisés" @@ -5314,7 +5485,7 @@ msgstr "Les valeurs d'une plage de noms msgid "write incomplete" msgstr "écriture incomplète" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "accessible en écriture par d'autres que le propriétaire" @@ -5322,23 +5493,23 @@ msgstr "accessible en écriture par d'aut msgid "wrong number of arguments" msgstr "Mauvais nombre de paramètres" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "Mauvais nombre de champs sur la ligne de type `Leap'" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "Mauvais nombre de champs sur la ligne de type `Link'" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "Mauvais nombre de champs sur la ligne de type `Rule'" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "Mauvais nombre de champs sur la ligne de type continuation de `Zone'" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "Mauvais nombre de champs sur la ligne de type `Zone'" @@ -5350,14 +5521,65 @@ msgstr "xdr_reference: mémoire épuisée\n msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: mémoire épuisée\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: ne peut convertir le nom de l'hôte à un nom réseau (netname)\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: ne peut obtenir l'adresse du serveur\n" +#~ msgid "%s: Error writing " +#~ msgstr "%s: erreur d'écriture " + +#~ msgid "CDS" +#~ msgstr "CDS" + +#~ msgid "DNANS" +#~ msgstr "DNANS" + +#~ msgid "DNS" +#~ msgstr "DNS" + +#~ msgid "IVY" +#~ msgstr "IVY" + +#~ msgid "NIS" +#~ msgstr "NIS" + +#~ msgid "SUNYP" +#~ msgstr "SUNYP" + +#~ msgid "X500" +#~ msgstr "X500" + +#~ msgid "XCHS" +#~ msgstr "XCHS" + +#~ msgid "cannot create capability list" +#~ msgstr "Ne peut créer une liste des possibilités" + +#~ msgid "cannot load shared object file" +#~ msgstr "Ne peut charger le fichier d'objet partagé" + +#~ msgid "cannot read locale directory `%s'" +#~ msgstr "Ne peut lire via le répertoire des définitions localisées `%s'" + +#~ msgid "fcntl: F_SETFD" +#~ msgstr "fcntl: F_SETFD" + +#~ msgid "neither original nor target encoding specified" +#~ msgstr "Ni l'encodage d'origine et cible n'ont été spécifié" + +#~ msgid "original encoding not specified using `-f'" +#~ msgstr "Encodage d'origine non spécifié utilisation de `-f'" + +#~ msgid "standard output" +#~ msgstr "sortie standard" + +#~ msgid "target encoding not specified using `-t'" +#~ msgstr "encodage cible non spécifiée par l'option `-t'" + #~ msgid " done\n" #~ msgstr " complété\n" @@ -5461,9 +5683,6 @@ msgstr "yp_update: ne peut obtenir l'adr #~ msgid "error while inserting collation element into hash table" #~ msgstr "Erreur durant l'insertion d'un élément de fusionnement dans la table de hachage" -#~ msgid "error while inserting to hash table" -#~ msgstr "Erreur lors de l'insertion dans la table de hachage" - #~ msgid "from-value of `collating-element' must be a string" #~ msgstr "La valeur de départ de `collating-element' doit être une chaîne." @@ -5565,9 +5784,6 @@ msgstr "yp_update: ne peut obtenir l'adr #~ msgid "while writing database file" #~ msgstr "lors de l'écriture du fichier de base de données" - -#~ msgid "%s: Error writing standard output " -#~ msgstr "%s: erreur d'écriture sur la sortie standard" #~ msgid "memory exhausted\n" #~ msgstr "Mémoire épuisée\n" Binary files glibc-2.2.4/po/gl.mo and glibc-2.2.5/po/gl.mo differ diff -durpN glibc-2.2.4/po/gl.po glibc-2.2.5/po/gl.po --- glibc-2.2.4/po/gl.po Mon Jul 23 10:54:53 2001 +++ glibc-2.2.5/po/gl.po Tue Aug 21 09:16:25 2001 @@ -4,82 +4,88 @@ # msgid "" msgstr "" -"Project-Id-Version: libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-07-06 16:59+0200\n" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-21 16:43+0200\n" "Last-Translator: Jacobo Tarrio \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: o valor do campo `%s' debe estar no rango %d...%d" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tDereitos de Acceso : " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tAtributos : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dnome[=valor]] [-i tamaño] [-I [-K segundos]] [-Y rota] entrada\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o saída] [entrada]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n idrede]* [-o saída] [entrada]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s tiporede]* [-o saída] [entrada]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tDereitos de Acceso: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tDatos da entrada do tipo %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNome : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tChave pública : " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tTipo : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tEnderezos universais (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNome : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u bytes] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -109,11 +115,11 @@ msgstr "" "%15ld%% tasa de acertos de caché\n" "%15s comprobe /etc/%s para ve-los cambios\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\nMembros do Grupo :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nTempo de Vida : " @@ -141,7 +147,7 @@ msgstr " non" msgid " yes" msgstr " si" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Lonxitude de Datos = %u\n" @@ -198,15 +204,15 @@ msgstr " programa vers proto porto\n" msgid " or: " msgstr " ou: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (OMITIDO)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (cambiou)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regra de \"%s\", liña %d)" @@ -215,22 +221,22 @@ msgstr " (regra de \"%s\", liña %d)" msgid " [OPTION...]" msgstr " [OPCIÓN...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", liña %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "A liña \"Zone %s\" e a opción -l son mutuamente exclusivas" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "A liña \"Zone %s\" e a opción -p son mutuamente exclusivas" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "Precísase dun ficheiro de \"entrada\" para as opcións de xeración de patróns.\n" @@ -244,58 +250,58 @@ msgstr "%.*s: O parámetro ARGP_HELP_FMT msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Parámetro ARGP_HELP_FMT descoñecido" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: a definición non remata con `END %1$s'" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d bibliotecas atopadas na caché `%s'\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s nunha zona sen regras" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s é un ficheiro ELF de 32 bits.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s é un ficheiro ELF de 64 bits.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s é para unha máquina descoñecida %d.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s non é un tipo de biblioteca coñecido" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s non é un ficheiro de obxecto compartido (Tipo: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s non é unha ligazón simbólica\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s non é un ficheiro ELF - non ten os bytes máxicos correctos ao principio.\n" @@ -315,12 +321,12 @@ msgstr "%s%s%s:%u: %s%sErro inesperado: msgid "%s%sUnknown signal %d\n" msgstr "%s%sSinal descoñecido %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d non foi estendido con signo correctamente\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: debe ser meirande ca \n" @@ -335,87 +341,82 @@ msgstr "%s: O preprocesador de C fallou msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: O preprocesador de C fallou co sinal %d\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: Non se pode crear %s: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: Non se pode crea-lo directorio %s: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: Non se pode enlazar %s con %s: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: Non se pode abrir %s: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: Non se pode borrar %s: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: Non se pode elimina-lo enlace %s: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Erro ao pechar %s: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Erro ao ler %s\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: Erro ao escribir " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Erro ao escribir %s\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: Liña de axuste no ficheiro %s, que non é de axuste de segundos\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Memoria esgotada: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Indicouse máis dunha opción -L\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Indicouse máis dunha opción -d\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Indicouse máis dunha opción -l\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Indicouse máis dunha opción -p\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Indicouse maís dunha opción -y\n" @@ -431,7 +432,7 @@ msgstr "%s: Demasiados parámetros\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: `%s' mencionouse máis dunha vez na definición do peso %d" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s' debe ser un carácter" @@ -442,7 +443,7 @@ msgstr "%s: `%s' debe ser un carácter" msgid "%s: `%s' value does not match `%s' value" msgstr "%s: o valor `%s' non coincide co valor `%s'" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1' debe se-la derradeira entrada do campo '%s'" @@ -452,100 +453,100 @@ msgstr "%s: `-1' debe se-la derradeira e msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: as direccións de ordenación `forward' e `backward' son mutuamente excluíntes" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position' débese empregar para un nivel determinado en tódalas seccións ou en ningunha" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: a sección `translit_start' non remata con `translit_end'" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: a secuencia de bytes do primeiro carácter da secuencia non é menor cá do derradeiro carácter" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: as secuencias de bytes do primeiro e derradeiro carácter deben te-la mesma lonxitude" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: non se pode ter `%s' coma final dun rango de puntos suspensivos" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: non se pode reordenar despois de %.*s: símbolo descoñecido" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: o carácter `%s' do mapa de caracteres non se pode representar cun só byte" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: o carácter `%s' que se precisa coma valor por defecto non se pode representar cun só byte" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: carácter `%s' non definido no mapa de caracteres cando facía falta por ser valor por omisión" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: carácter `%s' non definido, cando facía falta por ser valor por omisión" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: o comando foi '%s', e o resultado foi %d\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: a opción de dirección na cadea %Zd no campo `era' non é '+' nin '-'" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: a opción de dirección na cadea %Zd no campo `era' non é un único carácter" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: definición de `default_missing' duplicada" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: definición da versión da categoría duplicada" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: definición da sección `%s' duplicada" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: definición de `%s' duplicada" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: non se admite unha descrición de categoría baleira" @@ -555,19 +556,27 @@ msgstr "%s: non se admite unha descrició msgid "%s: empty weight string not allowed" msgstr "%s: non se admite unha cadea de peso baleira" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: erro na máquina de estados" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: o campo `%s' está declarado máis dunha vez" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: o campo `%s' non contén exactamente dez entradas" @@ -579,14 +588,18 @@ msgstr "%s: o campo `%s' non contén exac msgid "%s: field `%s' must not be empty" msgstr "%s: o campo `%s' non debe estar baleiro" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: campo `%s' non definido" @@ -596,37 +609,38 @@ msgstr "%s: campo `%s' non definido" msgid "%s: field `%s' undefined" msgstr "%s: campo `%s' non definido" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: lixo á fin do valor desprazamento na cadea %Zd no campo `era'" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: lixo á fin da data inicial na cadea %Zd no campo `era'" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: lixo á fin da data final na cadea %Zd no campo `era'" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opción ilegal -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: liña `END' incompleta" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%s: secuencia de escape `%%%c' non válida no campo `%s'" @@ -636,27 +650,27 @@ msgstr "%s: secuencia de escape `%%%c' n msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: secuencia de escape non válida no campo `%s'" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: número non válido para o desprazamento na cadea %Zd no campo `era'" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: número non válido de regras de ordenación" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opción incorrecta -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: data de inicio non válida na cadea %Zd no campo `era'" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: data final non válida na cadea %Zd no campo `era'" @@ -671,38 +685,38 @@ msgstr "%s: valor non válido no campo `% msgid "%s: language abbreviation `%s' not defined" msgstr "%s: abreviatura de idioma `%s' non definida" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: falla a palabra clave `order_end'" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: falla a palabra clave `reorder-end'" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: falla a palabra clave `reorder-sections-end'" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: non se atopou un formato era na cadea %Zd no campo `era'" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: non se atopou un nome era na cadea %Zd no campo `era'" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: definicións de orde múltiples na sección `%s'" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: hai varias definicións de orde para unha sección sen nome" @@ -717,7 +731,7 @@ msgstr "%s: non hai unha expresión regul msgid "%s: no identification for category `%s'" msgstr "%s: non hai unha identificación para a categoría `%s'" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: non se atopou unha definición `default_missing' representable" @@ -732,52 +746,52 @@ msgstr "%s: non hai regras de ordenación msgid "%s: numeric country code `%d' not valid" msgstr "%s: código numérico de país `%d' non válido" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: a opción `%c%s' non acepta parámetros\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: a opción `%s' é ambigua\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: a opción `%s' precisa dun parámetro\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: a opción `--%s' non acepta parámetros\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: a opción `-W %s' non acepta parámetros\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: a opción `-W %s' é ambigua\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: a opción precisa dun parámetro -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: a orde de `%.*s' xa está definida en %s:%Zu" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: a orde do elemento de ordenación %.*s non está definida" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: a orde do símbolo de ordenación %.*s non está definida" @@ -787,84 +801,84 @@ msgstr "%s: a orde do símbolo de ordenac msgid "%s: output would overwrite %s\n" msgstr "%s: a saída sobreescribiría %s\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: pánico: l_value %d incorrecto\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: fin de ficheiro prematuro" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: sección `%.*s' descoñecida" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: a data de comezo non é válida na cadea %Zd no campo `era'" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: a data de finalización non é válida na cadea %d no campo `era'" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: os puntos suspensivos do rango simbólico non deben ir seguidos directamente por `order_end'" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: os puntos suspensivos do rango simbólico non deben seguir directamente a `order_start'" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: erro de sintaxe" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: erro de sintaxe na definición da nova clase de caracteres" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: erro de sintaxe na definición dun novo mapa de caracteres" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: táboa para a clase \"%s\": %lu bytes\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: táboa para o mapa \"%s\": %lu bytes\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: táboa para o ancho: %lu bytes\n" @@ -874,16 +888,21 @@ msgstr "%s: táboa para o ancho: %lu byte msgid "%s: terminology language code `%s' not defined" msgstr "%s: o código de idioma de terminoloxía `%s' non está definido" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: os símbolos inicial e final dun rango deben corresponderse con caracteres" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: o terceiro operando do valor do campo `%s' non debe ser maior ca %d" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: demasiado poucos valores para o campo `%s'" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -894,7 +913,12 @@ msgstr "%s: demasiadas regras; a primeir msgid "%s: too many values" msgstr "%s: demasiados valores" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: demasiados valores para o campo `%s'" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: os datos de transliteración dende o locale `%s' non están dispoñibles" @@ -904,47 +928,52 @@ msgstr "%s: os datos de transliteración msgid "%s: unable to open %s: %m\n" msgstr "%s: non se pode abrir %s: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: carácter descoñecido no nome do símbolo de ordenación" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: carácter descoñecido no nome da definición de equivalentes" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: erro de sintaxe no valor da definición de equivalentes" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: carácter descoñecido no campo `%s'" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: nome de sección `%s' descoñecido" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: símbolo `%s' descoñecido na definición de equivalentes" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opción descoñecida `%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opción descoñecida `--%s'\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -958,6 +987,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: úsase %s [ -v ] [ -c corte ] nomezona ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: o valor do campo `%s' debe ser un só carácter" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: o valor do campo `%s' debe estar no rango %d...%d" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -978,17 +1017,17 @@ msgstr "%s: o valor do campo `int_curr_s msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: o valor do campo `int_curr_symbol' ten unha lonxitude incorrecta" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: os valores do campo `%s' deben ser menores que 127" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: os valores do campo `%s' deben ser menores que %d" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: os valores do campo `%s' deben ser menores que %d" @@ -1011,11 +1050,11 @@ msgstr "(ERRO DE PROGRAMA) ¿¡Non se coñe msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(ERRO DE PROGRAMA) ¿¡Deberíase coñece-la opción!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Obxecto descoñecido)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(erro de autentificación descoñecido - %d)" @@ -1033,6 +1072,11 @@ msgstr "*** O ficheiro `%s' está recorta msgid "*standard input*" msgstr "*entrada estándar*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1046,16 +1090,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "sección .lib do a.out corrompida" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; versión baixa = %lu, versión alta = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; causa = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> e <%s> son nomes incorrectos para o rango" @@ -1065,12 +1109,12 @@ msgstr "<%s> e <%s> son nomes incorrecto msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> e <%s> son nomes non válidos para o rango" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr "O carácter non debe estar na clase `%s'" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr "O carácter non está na clase `%s'" @@ -1086,7 +1130,7 @@ msgstr "?" msgid "Aborted" msgstr "Abortado" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Dereitos de Acceso : " @@ -1124,6 +1168,10 @@ msgstr "Anunciar erro" msgid "Alarm clock" msgstr "Temporizador" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Tódalas peticións completadas" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Tamén debuxar unha gráfica do consumo total de memoria" @@ -1132,7 +1180,7 @@ msgstr "Tamén debuxar unha gráfica do co msgid "Anode table overflow" msgstr "Desbordamento da táboa de anodes" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "Outra cadea para facer probas." @@ -1164,7 +1212,7 @@ msgstr "Intentouse sobrepasa-lo límite d msgid "Attempting to link in too many shared libraries" msgstr "Intentouse cargar demasiadas bibliotecas compartidas" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Autentificación correcta" @@ -1173,7 +1221,7 @@ msgstr "Autentificación correcta" msgid "Authentication error" msgstr "Erro na autentificación" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "OBXECTO FALSO\n" @@ -1228,7 +1276,7 @@ msgstr "Valor de ai_flags incorrecto" msgid "Be strictly POSIX conform" msgstr "Ser estrictamente conforme con POSIX" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Datos binarios\n" @@ -1260,10 +1308,6 @@ msgstr "Canalización rota" msgid "Bus error" msgstr "Erro no bus de datos" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Límite de tempo de CPU superado" @@ -1281,77 +1325,82 @@ msgstr "Non se pode acceder a unha bibli msgid "Can not exec a shared library directly" msgstr "Non se pode executar unha biblioteca compartida directamente" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Non se pode conectar co servidor que serve a este dominio" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "Non se pode cambiar ao directorio /" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "Non se pode comunicar co mapeador de portos" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "Non se pode comunicar con `ypbind'" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "Non se pode comunicar con ypserv" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "Non se puido crea-lo ficheiro temporal de caché %s" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "Non se pode atopar %s" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "Non se puido ligar %s a %s" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "Non se pode facer lstat sobre %s" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "Non se puido abri-lo ficheiro de caché %s\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "Non se puido abri-lo directorio de ficheiros caché %s\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "Non se puido abri-lo ficheiro de configuración %s" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "Non se puido abri-lo directorio %s" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "Non se pode elimina-lo antigo ficheiro de caché temporal %s" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "Non se puido executar `stat' sobre %s" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "Non se puido executar `stat' sobre %s\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "Non se puido borrar %s" @@ -1378,16 +1427,21 @@ msgstr "Non se pode crear un socket para msgid "Cannot exec a shared library directly" msgstr "Non se pode executar unha biblioteca compartida directamente" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "Non se puido executar fstat sobre o ficheiro %s.\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "Non se pode ter máis dunha opción de xeración de ficheiros\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "Non se pode facer lstat sobre %s" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "Non se puido executar mmap sobre o ficheiro %s.\n" @@ -1421,33 +1475,38 @@ msgstr "Non se pode activa-la opción SO_ msgid "Cannot specify more than one input file!\n" msgstr "¡Non se pode indicar máis dun ficheiro de entrada!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "Non se pode executar `stat' sobre %s" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "¡Non se pode utiliza-la opción netid coa opción inetd!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "¡Non se pode utiliza-la opción netid sen TIRPC!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "¡Non se poden utiliza-las opcións de táboa con newstyle!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Cambiar a e empregar RAÍZ coma directorio raíz" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "O cambio dos dereitos de acceso de %s a 0644 fallou" +msgid "Changing access rights of %s to %#o failed" +msgstr "O cambio dos dereitos de acceso de %s a %#o fallou" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Número de canal fóra do seu rango" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Separador de Caracteres : %c\n" @@ -1456,11 +1515,11 @@ msgstr "Separador de Caracteres : %c\n" msgid "Child exited" msgstr "O proceso fillo saíu" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "A credencial do cliente é demasiado feble" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Columnas :\n" @@ -1478,7 +1537,7 @@ msgstr "Compile a especificación do `loc msgid "Computer bought the farm" msgstr "O ordenador mercou a granxa" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Configura-las Asignacións de Tempo de Execución do Ligador Dinámico" @@ -1508,14 +1567,14 @@ msgstr "A conexión espirou" msgid "Continued" msgstr "Continuación" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Converti-los ficheiros dados dunha codificación a outra." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1535,6 +1594,10 @@ msgstr "Non se puido crea-lo ficheiro de msgid "Create C header file NAME containing symbol definitions" msgstr "Crea-lo ficheiro de cabeceira C NOME que contén as definicións de símbolos" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Crea-lo ficheiro de configuración dos módulos de iconv de carga rápida." + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Crear táboas ao estilo antigo" @@ -1543,7 +1606,7 @@ msgstr "Crear táboas ao estilo antigo" msgid "Create output even if warning messages were issued" msgstr "Crea-la saída incluso se se produciron mensaxes de aviso" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Hora de Creación : %s" @@ -1562,19 +1625,11 @@ msgstr "FICHEIRO_DATOS [FICHEIRO_SAÍDA]" msgid "DES entry for netname %s not unique\n" msgstr "A entrada DES para o nome de rede %s non é única\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "DIRECTORIO\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "Non se admite DST en programas SUID/SGID" @@ -1586,7 +1641,7 @@ msgstr "¡¡¡ERRO NO LIGADOR DINÁMICO!!!" msgid "Database for table does not exist" msgstr "A base de datos para a táboa non existe" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "A base de datos está ocupada" @@ -1594,7 +1649,7 @@ msgstr "A base de datos está ocupada" msgid "Deadlock situation detected/avoided" msgstr "Situación de interbloqueo detectada/evitada" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Dereitos de acceso por Omisión :\n" @@ -1621,12 +1676,12 @@ msgstr "O dispositivo non é de fluxo" msgid "Device or resource busy" msgstr "Dispositivo ou recurso ocupado" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bits)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Directorio : %s\n" @@ -1655,15 +1710,15 @@ msgstr "Non bifurcar e visualiza-las men msgid "Do not use existing catalog, force new output file" msgstr "Non usa-lo catálogo existente, forzar un ficheiro de saída novo" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "Non se conectou co dominio" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "Non construí-la caché" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "Non xerar ligazóns" @@ -1671,31 +1726,31 @@ msgstr "Non xerar ligazóns" msgid "Dump information generated by PC profiling." msgstr "Envorca-la información xerada polo perfilado do PC" -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "Versión do ABI do ficheiro ELF non válida" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ABI do SO do ficheiro ELF non válida" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "A versión do ficheiro ELF non coincide coa actual" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "O identificador da versión do ficheiro ELF non coincide co actual" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "O phentsize do ficheiro ELF non é o tamaño esperado" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "O enderezo/desprazamento do comando de carga ELF non está ben aliñado" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "O comando de carga ELF non está aliñado coa páxina" @@ -1703,11 +1758,11 @@ msgstr "O comando de carga ELF non está msgid "EMT trap" msgstr "Trampa de EMT" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "ENTRADA\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "Datos cifrados\n" @@ -1861,7 +1916,11 @@ msgstr "Erro no sistema de erro descoñec msgid "Error while talking to callback proc" msgstr "Erro ao falar ao procedemento de retrochamada" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Erro ao escribir na saída estándar" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Erro: o ficheiro .netrc pode ser lido por outros." @@ -1884,7 +1943,7 @@ msgstr "FATAL: o sistema non define `_PO msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "O FICHEIRO contén mapeado de nomes simbólicos a valores UCS4" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Fallo (erro non especificado)" @@ -1893,7 +1952,7 @@ msgstr "Fallo (erro non especificado)" msgid "Failed to look up user '%s' to run server as" msgstr "A busca do usuario '%s' para executa-lo servidor co seu nome fallou" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "O ficheiro %s é pequeno de máis, non se comproba." @@ -1910,7 +1969,7 @@ msgstr "Descriptor de ficheiro en mal es msgid "File exists" msgstr "O ficheiro xa existe" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "O ficheiro non é un ficheiro caché.\n" @@ -1944,7 +2003,7 @@ msgstr "Desbordamento da táboa de fichei msgid "File too large" msgstr "Ficheiro demasiado grande" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Primeira cadea para facer probas." @@ -1956,7 +2015,7 @@ msgstr "Primeira/seguinte cadea rota" msgid "Floating point exception" msgstr "Excepción de coma frotante" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Formato para empregar: new (novo), old (vello) ou compat (por defecto)" @@ -1973,7 +2032,7 @@ msgstr "Precísase unha resincronización msgid "Function not implemented" msgstr "Función non implementada" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "GRUPO\n" @@ -1999,7 +2058,7 @@ msgstr "" msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "Xerar unha saída lineal co tempo (normalmente é lineal co número de chamadas a función)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Visualizar máis mensaxes" @@ -2007,7 +2066,7 @@ msgstr "Visualizar máis mensaxes" msgid "Generic system error" msgstr "Erro de sistema xenérico" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Obter información específica do `locale'." @@ -2024,12 +2083,12 @@ msgstr "Devolver esta lista de axuda" msgid "Gratuitous error" msgstr "Erro inxustificado" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Grupo : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Opcións do Grupo :" @@ -2094,16 +2153,12 @@ msgstr "E/S posible" msgid "IOT trap" msgstr "Trampa de IOT" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "Identificador borrado" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Ignorouse o ficheiro %s porque non é un ficheiro normal" @@ -2156,7 +2211,7 @@ msgstr "Operación inapropiada para un pr msgid "Information request" msgstr "Petición de información" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Información:" @@ -2164,12 +2219,12 @@ msgstr "Información:" msgid "Input Files:" msgstr "Ficheiros de Entrada:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "Non se atopou o ficheiro de entrada %s.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "Especificación do formato de Entrada/Saída:" @@ -2178,11 +2233,11 @@ msgstr "Especificación do formato de Ent msgid "Input/output error" msgstr "Erro de Entrada/saída" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Erro interno de NIS" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Erro interno de ypbind" @@ -2190,6 +2245,10 @@ msgstr "Erro interno de ypbind" msgid "Interrupt" msgstr "Interrupción" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Interrompido por un sinal" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2213,27 +2272,27 @@ msgstr "A chamada ao sistema interrompid msgid "Invalid argument" msgstr "Parámetro incorrecto" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Referencia cara a atrás incorrecta" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Nome da clase de caracteres incorrecto" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Credencial do cliente incorrecta" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Verificador do cliente incorrecto" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Carácter de ordenación incorrecto" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "Contido de \\{\\} incorrecto" @@ -2258,15 +2317,15 @@ msgstr "Obxecto incorrecto para a operac msgid "Invalid or incomplete multibyte or wide character" msgstr "Carácter ancho ou multibyte incorrecto ou incompleto" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "Expresión regular precedente incorrecta" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Final do rango incorrecto" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "Expresión regular incorrecta" @@ -2278,7 +2337,7 @@ msgstr "Código de petición incorrecto" msgid "Invalid request descriptor" msgstr "Descriptor de petición incorrecto" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Verificador de servidor incorrecto" @@ -2306,7 +2365,7 @@ msgstr "É un ficheiro de nome" msgid "Is a named type file" msgstr "É un ficheiro de tipo con nome" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2314,7 +2373,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Matado" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "ENLACE\n" @@ -2357,20 +2416,20 @@ msgstr "Número de enlace fóra de rango" msgid "Link points to illegal name" msgstr "O enlace leva a un nome ilegal" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Tipo do Obxecto Enlazado : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Enlazado a : %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Nome de dominio local non fixado" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Fallo ao reservar recursos locais" @@ -2387,11 +2446,11 @@ msgstr "Nome mal formado, ou ilegal" msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "Os parámetros obrigatorios ou opcionais das opcións longas son tamén obrigatorios ou opcionais para calquera opción curta que se corresponda." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Ligue as bibliotecas individuais manualmente." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Servidor Mestre :\n" @@ -2403,7 +2462,7 @@ msgstr "Servidor mestre ocupado, volcado msgid "Memory allocation failure" msgstr "Fallo ao reservar memoria" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Memoria esgotada" @@ -2422,7 +2481,7 @@ msgstr "Mensaxe demasiado longa" msgid "Missing or malformed attribute" msgstr "Falta un atributo, ou está mal formado" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Hora de Modificación : %s" @@ -2435,7 +2494,7 @@ msgstr "Fallo ao modificar" msgid "Modify operation failed" msgstr "Fallo na operación de modificación" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Modifica-lo formato de saída:" @@ -2453,7 +2512,7 @@ msgstr "Débese especifica-lo nome de usu msgid "NAME" msgstr "NOME" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2461,15 +2520,11 @@ msgstr "" "NOME\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "Non coinciden as versións do cliente e o servidor NIS - non se pode dar servicio" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "A base de datos de mapas NIS está mal" @@ -2485,7 +2540,7 @@ msgstr "Non se pode chegar aos servidore msgid "NIS+ service is unavailable or not installed" msgstr "O servicio NIS+ non está dispoñible ou instalado" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "SEN OBXECTO\n" @@ -2493,7 +2548,7 @@ msgstr "SEN OBXECTO\n" msgid "NUMBER" msgstr "NÚMERO" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Nome : `%s'\n" @@ -2583,7 +2638,7 @@ msgstr "Non hai un anodo" msgid "No buffer space available" msgstr "Non hai espacio dispoñible no buffer" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "Non se especificou un nome de xogo de caracteres no mapa de caracteres" @@ -2600,8 +2655,8 @@ msgstr "Non hai procesos fillo" msgid "No data available" msgstr "Non hai datos dispoñibles" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2614,7 +2669,7 @@ msgstr "Non se atopou unha definición pa msgid "No file space on server" msgstr "Non hai espacio de ficheiros no servidor" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "Non se creou unha ligazón porque non se atopou o soname para %s" @@ -2627,7 +2682,7 @@ msgstr "Non se creou unha ligazón porque msgid "No locks available" msgstr "Non hai bloqueos dispoñibles" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "Nada coincide" @@ -2640,11 +2695,11 @@ msgstr "Non se atopou o medio" msgid "No message of desired type" msgstr "Non hai unha mensaxe do tipo desexado" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "Non hai máis rexistros na base de datos de mapas" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "Non hai unha expresión regular precedente" @@ -2694,11 +2749,11 @@ msgstr "Non hai tal dispositivo ou ender msgid "No such file or directory" msgstr "Non hai tal ficheiro ou directorio" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Non hai tal clave no mapa" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "Non hai tal mapa no dominio do servidor" @@ -2716,7 +2771,7 @@ msgstr "Non se atopou un espacio de nome msgid "Non-recoverable failure in name resolution" msgstr "Fallo non recuperable na resolución de nomes" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Ningún.\n" @@ -2783,12 +2838,12 @@ msgstr "Non é o propietario" msgid "Not supported" msgstr "Non soportado" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Número de Columnas : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Número de obxectos: %u\n" @@ -2809,17 +2864,17 @@ msgstr "Parámetro numérico fóra do domin msgid "Numerical result out of range" msgstr "Resultado numérico fóra de rango" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Obxecto nº %d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Nome do Obxecto : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Tipo do Obxecto : " @@ -2836,11 +2891,11 @@ msgstr "O obxecto é remoto" msgid "Object with same name exists" msgstr "Xa existe un obxecto co mesmo nome" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Número de comiñas impar" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "Nó se procesan os directorios especificados na liña de comando. Non se constrúen as cachés." @@ -2922,7 +2977,7 @@ msgstr "Acabáronse os recursos de fluxo" msgid "Out of streams resources" msgstr "Acabáronse os recursos de fluxo" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Control de saída:" @@ -2930,12 +2985,12 @@ msgstr "Control de saída:" msgid "Output selection:" msgstr "Selección de saída:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Propietario : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "PRIVADO\n" @@ -2957,13 +3012,13 @@ msgstr "Éxito parcial" msgid "Passed object is not the same object on server" msgstr "O obxecto pasado non é o mesmo obxecto no servidor" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "Proporcionouse a ruta `%s' máis dunha vez" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2973,11 +3028,11 @@ msgstr "Permiso denegado" msgid "Power failure" msgstr "Fallo de enerxía" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Final prematura da expresión regular" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Amosa-la caché" @@ -2985,6 +3040,10 @@ msgstr "Amosa-la caché" msgid "Print current configuration statistic" msgstr "Visualiza-la estatística da configuración actual" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Amosar máis información" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Visualizar máis mensaxes" @@ -3001,6 +3060,10 @@ msgstr "Éxito probable" msgid "Probably not found" msgstr "Probablemente non atopado" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Estase procesando a petición" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "Rematado o tempo de perfilado" @@ -3058,7 +3121,7 @@ msgstr "Erro específico de RFS" msgid "RPC bad procedure for program" msgstr "Mal procedemento RPC para o programa" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "Fallo de RPC na operación NIS" @@ -3082,88 +3145,88 @@ msgstr "A estructura RPC é incorrecta" msgid "RPC version wrong" msgstr "Versión de RPC incorrecta" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (código de erro descoñecido)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: Erro de autentificación" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: Non se pode descodifica-lo resultado" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: Non se pode codifica-los parámetros" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Fallo (erro non especificado)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: Versións de RPC incompatibles" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Fallo do portmapper" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: Procedemento non dispoñible" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: Programa non rexistrado" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: Programa non dispoñible" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: Non coinciden os programas/versións" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: Erro do sistema remoto" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: O servidor non pode descodifica-los parámetros" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: Éxito" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: Tempo esgotado" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: Non se pode recibir" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: Non se pode enviar" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: Servidor descoñecido" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: Protocolo descoñecido" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bits)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "Úsase RTLD_NEXT en código non cargado dinamicamente" @@ -3186,7 +3249,7 @@ msgstr "Sistema de ficheiros de só lectu msgid "Real-time signal %d" msgstr "Sinal de tempo real %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Expresión regular demasiado grande" @@ -3200,11 +3263,11 @@ msgstr "Erro de E/S remota" msgid "Remote address changed" msgstr "O enderezo remoto cambiou" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Elimina-lo contrasinal ou face-lo ficheiro ilexible por outros." -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "Fallou o renomeado de %s a %s" @@ -3214,7 +3277,7 @@ msgstr "Fallou o renomeado de %s a %s" msgid "Reopening shared object `%s' failed" msgstr "A apertura do obxecto compartido `%s' fallou" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Replicar :\n" @@ -3223,16 +3286,24 @@ msgstr "Replicar :\n" msgid "Report bugs to %s.\n" msgstr "Informe dos erros a %s.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "Informe dos erros usando o script `glibcbug' a .\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Parámetros da petición incorrectos" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Petición cancelada" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Petición non cancelada" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Reservado para uso futuro" @@ -3303,11 +3374,7 @@ msgstr "Resultado enviado ao procedement msgid "SHOBJ [PROFDATA]" msgstr "SOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Rota de Búsqueda : %s\n" @@ -3324,11 +3391,11 @@ msgstr "Servidor ocupado, probe outra ve msgid "Server out of memory" msgstr "Servidor sen memoria" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "O servidor rexeitou a credencial" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "O servidor rexeitou o verificador" @@ -3396,7 +3463,7 @@ msgstr "Manexador de ficheiro NFS trabuc msgid "Start NUMBER threads" msgstr "Comezar NÚMERO fíos" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Estado : %s\n" @@ -3426,7 +3493,7 @@ msgstr "Erro de canalización de fluxo" msgid "Structure needs cleaning" msgstr "A estructura precisa dunha limpeza" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Éxito" @@ -3447,11 +3514,11 @@ msgstr "Nomes de caracteres simbólicos d msgid "System error" msgstr "Erro de sistema" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Información do sistema:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Fallo ao reservar recursos do sistema" @@ -3472,7 +3539,7 @@ msgstr "" msgid "TABLE" msgstr "TÁBOA" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TÁBOA\n" @@ -3480,7 +3547,7 @@ msgstr "TÁBOA\n" msgid "TABLE,yes" msgstr "TÁBOA,si" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Tipo de Táboa : %s\n" @@ -3503,7 +3570,7 @@ msgstr "Terminado" msgid "Text file busy" msgstr "Ficheiro de texto en uso" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3519,11 +3586,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "¡Esta implementación non soporta código de novo estilo ou seguro para MT!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Tempo de vida : " @@ -3597,7 +3664,7 @@ msgstr "Demasiados usuarios" msgid "Trace/breakpoint trap" msgstr "Trampa de seguemento/punto de ruptura" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Barra invertida extra ó final" @@ -3629,12 +3696,12 @@ msgstr "O destino do transporte non está msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Escriba `%s --help' ou `%s --usage' para obter máis información.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Tipo : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "DESCOÑECIDO" @@ -3654,31 +3721,35 @@ msgstr "Non se pode crea-lo callback" msgid "Unable to create process on server" msgstr "Non se pode crear un proceso no servidor" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Descoñecido (tipo = %d, bits = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Clave %s descoñecida no .netrc" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "ELFCLASS descoñecida no ficheiro %s.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Código de erro NIS descoñecido" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Sistema operativo descoñecido" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Base de datos descoñecida: %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Erro descoñecido" @@ -3714,31 +3785,31 @@ msgstr "Erro do servidor descoñecido" msgid "Unknown signal %d" msgstr "Sinal %d descoñecida" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Erro de sistema descoñecido" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Erro de ypbind descoñecido" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "( ou \\( sen parella" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr ") ou \\) sen parella" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "[ ou [^ sen parella" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "\\{ sen parella" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Variable `%s' non recoñecida" @@ -3751,20 +3822,20 @@ msgstr "Condición de E/S urxente" msgid "Usage:" msgstr "Uso:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Uso: %s nome_variable [nome]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Uso: %s [-v especificación] nome_variable [nome]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Uso: rpcinfo [ -n numport ] -u host numprog [ numvers ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Empregar CACHÉ coma un ficheiro de caché" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Empregar CONF coma un ficheiro de configuración" @@ -3789,7 +3860,7 @@ msgstr "Valor grande de máis para o tipo msgid "Virtual timer expired" msgstr "Tempo virtual esgotado" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Resultado salvaxe da execución do comando" @@ -3797,19 +3868,19 @@ msgstr "Resultado salvaxe da execución d msgid "Window changed" msgstr "A ventá cambiou" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Escribi-los nomes dos mapas de caracteres dispoñibles" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Escribi-los nomes dos `locales' dispoñibles" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Escribi-los nomes das categorías seleccionadas" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Escribi-los nomes das claves seleccionadas" @@ -3817,18 +3888,18 @@ msgstr "Escribi-los nomes das claves sel msgid "Write output to file NAME" msgstr "Escribi-la saída no ficheiro NOME" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "A escritura dos datos da caché fallou" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "A escritura dos datos da caché fallou." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "Escrito por %s.\n" @@ -3837,14 +3908,6 @@ msgstr "Escrito por %s.\n" msgid "Wrong medium type" msgstr "Tipo de medio incorecto" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3859,11 +3922,15 @@ msgstr "Si, 42 é o significado da vida" msgid "You really blew it this time" msgstr "Si que a fastidiaches esta vez" -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "A hora final da liña de continuación de fuso horario non segue á hora final da liña anterior" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[DIR...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[FICH...]" @@ -3895,13 +3962,13 @@ msgstr "`%.*s' xa está definido no mapa msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' xa está definido no repertorio" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "A definición `%1$s' non remata con `END %1$s'" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s' e `%.*s' non son nomes válidos para o rango simbólico" @@ -3911,7 +3978,7 @@ msgstr "`%s' e `%.*s' non son nomes váli msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s' non é un ficheiro de datos de perfís correcto para `%s'" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "a categoría `digit' non ten entradas en grupos de dez" @@ -3927,12 +3994,12 @@ msgstr "ai_socktype non soportado" msgid "already running" msgstr "xa en execución" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "o parámetro de <%s> debe ser un só carácter" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "o parámetro de `%s' debe ser un só carácter" @@ -3945,28 +4012,28 @@ msgstr "auth_none.c - Problema fatal de msgid "authunix_create: out of memory\n" msgstr "authunix_create: memoria esgotada\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "parámetro incorrecto" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "propietario incorrecto" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "campo FROM baleiro na liña Link" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "campo TO baleiro na liña Link" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "bloque liberado dúas veces\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "mcheck_status falso, a librería ten erros\n" @@ -3990,11 +4057,11 @@ msgstr "cache_set: fallou a reserva de e msgid "cache_set: victim not found" msgstr "cache_set: obxectivo non atopado" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "non podo determina-la abreviatura do fuso horario a usar despois da hora" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "non se pode reasigna-lo procedemento número %ld\n" @@ -4008,15 +4075,15 @@ msgstr "non se pode restaura-la protecci msgid "cannot add already read locale `%s' a second time" msgstr "non se pode engadi-lo locale xa lido `%s' outra vez" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "non se pode localiza-la lista de dependencias" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "Non se pode reservar memoria para a cabeceira do programa" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "non se pode localiza-lo rexistro de nome" @@ -4024,31 +4091,27 @@ msgstr "non se pode localiza-lo rexistro msgid "cannot allocate symbol data" msgstr "non se poden localiza-los datos de símbolos" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "non se pode localiza-la lista de busca de símbolos" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "non se pode localiza-la táboa de referencias de versións" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "non se poden cambia-las proteccións de memoria" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "non se pode crear unha copia de RUNPATH/RPATH" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "non se pode crea-la caché para a ruta de busca" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "non se pode crea-la lista de capacidades" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "non se pode crear un descriptor interno" @@ -4057,23 +4120,28 @@ msgstr "non se pode crear un descriptor msgid "cannot create internal descriptors" msgstr "non se poden crear descriptores internos" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "non se pode crea-lo ficheiro de saída `%s' para a categoría `%s'" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "non se pode crea-lo vector de rutas de busca" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "non se pode crea-la lista de busca" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "non se pode crear un descriptor de obxecto compartido" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "non se pode determina-lo carácter de escape" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "non se pode cargar dinamicamente o executable" @@ -4095,7 +4163,11 @@ msgstr "non podo atopa-lo preprocesador msgid "cannot find any C preprocessor (cpp)\n" msgstr "non podo atopar un preprocesador de C (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "non se pode xera-lo ficheiro de saída" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "non se pode manexa-la antiga petición versión %d; a versión actual é %d" @@ -4104,19 +4176,15 @@ msgstr "non se pode manexa-la antiga pet msgid "cannot load profiling data" msgstr "non se pode carga-los datos de perfís" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "non se pode carga-lo ficheiro de obxecto compartido" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "non se pode face-lo segmento gravable para o movemento" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "non se poden mapear páxinas de recheo de ceros" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "non se pode abrir" @@ -4129,7 +4197,7 @@ msgstr "non se pode abrir `%s'" msgid "cannot open input file" msgstr "non se pode abri-lo ficheiro de entrada" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "non se pode abri-lo ficheiro de entrada `%s'" @@ -4140,21 +4208,21 @@ msgstr "non se pode abri-lo ficheiro de msgid "cannot open locale definition file `%s'" msgstr "non se pode abri-lo ficheiro de definición de locales `%s'" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "non se pode abri-lo ficheiro de saída" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "non se pode abri-lo ficheiro de saída `%s'" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "non se pode abri-lo ficheiro de saída `%s' para a categoría `%s'" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "non se pode abrir un ficheiro de obxecto compartido" @@ -4163,7 +4231,7 @@ msgstr "non se pode abrir un ficheiro de msgid "cannot open socket: %s" msgstr "non se pode abrir un socket: %s" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "non se pode abrir un dispositivo de recheo de ceros" @@ -4176,7 +4244,7 @@ msgstr "non se pode ler no directorio de msgid "cannot read configuration file; this is fatal" msgstr "non se pode le-lo ficheiro de configuración; isto é fatal" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "non se pode le-los datos do ficheiro" @@ -4189,11 +4257,6 @@ msgstr "non se pode le-la cabeceira" msgid "cannot read header from `%s'" msgstr "non se pode le-la cabeceira de `%s'" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "non se pode le-lo directorio de locales `%s'" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "non se poden le-los datos estatísticos" @@ -4202,7 +4265,7 @@ msgstr "non se poden le-los datos estatí msgid "cannot safe new repertoire map" msgstr "non se pode grava-lo novo mapa de repertorios" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "non se puido facer stat sobre o obxecto compartido" @@ -4216,7 +4279,7 @@ msgstr "non se pode facer stat() sobre o msgid "cannot write output files to `%s'" msgstr "non se poden escribi-los ficheiros de saída a `%s'" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "non se pode escribi-lo resultado: %s" @@ -4226,76 +4289,80 @@ msgstr "non se pode escribi-lo resultado msgid "cannot write statistics: %s" msgstr "non se poden escribi-las estatísticas: %s" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "o carácter '%s' na clase `%s' debe estar na clase `%s'" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "o carácter '%s' na clase `%s' non debe estar na clase `%s'" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "carácter non definido no mapa de caracteres" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "o carácter L'\\u%0*x' na clase `%s' debe estar na clase `%s'" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "o carácter L'\\u%0*x' na clase `%s' non debe estar na clase `%s'" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "carácter `%s' non definido, cando facía falta por ser valor por omisión" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "clase de caracteres `%s' xa definida" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "mapa de caracteres `%s' xa definido" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "o mapa de caracteres `%s' non é compatible con ASCII, o locale non cumpre con ISO C\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "ficheiro de mapa de caracteres `%s' non atopado" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "non se soportan os xogos de caracteres con estados bloqueantes" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "queixo" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "dependencias circulares entre definicións de locales" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Erro fatal de serialización de cabeceiras." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: memoria esgotada\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: memoria esgotada\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: memoria esgotada\n" @@ -4303,28 +4370,28 @@ msgstr "clntunix_create: memoria esgotad msgid "constant or identifier expected" msgstr "esperábase unha constante ou un identificador" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "conversión de `%s' a `%s' non soportada" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "os módulos de conversión non están dispoñibles" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "o valor da taxa de conversión non pode ser cero" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "conversión detida debido a un problema escribindo na saída" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "non se puido crear un servidor rpc\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "non se puido rexistra-lo prog %ld vers %ld\n" @@ -4333,17 +4400,17 @@ msgstr "non se puido rexistra-lo prog %l msgid "database [key ...]" msgstr "base-de-datos [clave ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "ficheiro de mapa de caracteres por defecto `%s' non atopado" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "definición de <%s> duplicada" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "definición do script `%s' duplicada" @@ -4352,12 +4419,12 @@ msgstr "definición do script `%s' duplic msgid "duplicate set definition" msgstr "definición de conxunto duplicada" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "fuso horario %s duplicado (ficheiro \"%s\", liña %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "definición do mapeado `%s' duplicada" @@ -4370,7 +4437,7 @@ msgstr "identificador de mensaxes duplic msgid "duplicated message number" msgstr "número de mensaxe duplicado" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "o rango de puntos suspensivos debe estar marcado por dous operandos do mesmo tipo" @@ -4378,10 +4445,14 @@ msgstr "o rango de puntos suspensivos de msgid "empty char string" msgstr "cadea de caracteres baleira" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "substitución de elementos da cadea dinámica baleira" +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "substitución de elementos de cadea de dinámica baleira" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: caché xa activada" @@ -4398,29 +4469,29 @@ msgstr "enablecache: non se puido reserv msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: non se puido reservar espacio para o fifo da caché" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "codificación de saída" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "codificación do texto orixinal" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "erro ao obte-lo identificador do chamante: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "erro ao engadir un símbolo de ordenación equivalente" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "erro ao pecha-la entrada `%s'" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "erro ao pecha-lo ficheiro de saída" @@ -4428,7 +4499,8 @@ msgstr "erro ao pecha-lo ficheiro de saí msgid "error while closing the profiling data file" msgstr "erro ao pecha-lo ficheiro de datos de perfís" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "erro ao ler da entrada" @@ -4436,10 +4508,14 @@ msgstr "erro ao ler da entrada" msgid "expect string argument for `copy'" msgstr "espérase un parámetro de cadea para `copy'" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "non se atopou a liña de continuación que se esperaba" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "punto e coma de sobra á final" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4449,7 +4525,7 @@ msgstr "non se puido carga-lo obxecto co msgid "failed to load symbol data" msgstr "non se puideron carga-los datos de símbolos" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "non se puido mapear un segmento dun obxecto compartido" @@ -4457,18 +4533,19 @@ msgstr "non se puido mapear un segmento msgid "failed to mmap the profiling data file" msgstr "non se puido facer mmap sobre o ficheiro de datos de perfís" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "non se puido comeza-lo procesamento de conversión" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "non se puideron escribi-los datos da categoría `%s'" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "o ficheiro %s está truncado\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4477,19 +4554,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "o ficheiro `%s' xa existe e pode ser sobreescrito\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "ficheiro pequeno de máis" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fallou a chamada a fstat" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "lixo á fin da especificación do código de caracteres" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "lixo á fin do número" @@ -4509,28 +4586,28 @@ msgstr "get_myaddress: ioctl (obte-la co msgid "getent - get entries from administrative database." msgstr "getent - obte-las entradas da base de datos administrativa." -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: petición recibida (Version = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "non se pode facer un enlace duro, úsase un enlace simbólico" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "ten un enlace duro nalgún sitio" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "o formato de rango hexadecimal só debería empregar caracteres hexadecimais" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "campo CORRECTION ilegal na liña Leap" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "campo Rolling/Stationary ilegal na liña Leap" @@ -4538,11 +4615,16 @@ msgstr "campo Rolling/Stationary ilegal msgid "illegal character in file: " msgstr "carácter ilegal no ficheiro: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "secuencia de escape ilegal á fin da cadea" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "secuencia de entrada ilegal na posición %Zd" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "secuencia de entrada ilegal na posición %ld" @@ -4556,102 +4638,102 @@ msgstr "tipo de rede ilegal :`%s'\n" msgid "illegal set number" msgstr "número de conxunto ilegal" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "límite da implementación: non se admiten máis de %Zd clases de caracteres" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "límite da implementación: non se admiten máis de %d mapas de caracteres" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "secuencia de caracteres incompleta á fin do buffer" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "liña de entrada de tipo descoñecido" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "erro interno" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "erro interno (descriptor ilegal)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "erro interno - chamouse a addtype cun isdst incorrecto" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "erro interno - chamouse a addtype cun ttisgmt incorrecto" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "erro interno - chamouse a addtype cun ttisstd incorrecto" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "erro interno en %s, liña %u" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "cabeceira ELF non válida" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "desprazamento UTC incorrecto" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "formato de abreviatura incorrecto" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "carácter non válido: mensaxe ignorada" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "día do mes incorrecto" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "definición non válida" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "codificación dada non válida" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "ano final incorecto" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "secuencia de escape non válida" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "ano bisesto incorrecto" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "liña non válida" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "modo incorrecto para dlopen()" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "nome do mes incorrecto" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "nomes non válidos para o rango de caracteres" @@ -4664,52 +4746,52 @@ msgstr "tamaño de punteiro non válido" msgid "invalid quote character" msgstr "carácter de cita non válido" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "hora gravada incorrecta" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "ano de inicio incorrecto" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "hora do día incorrecta" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "día da semana incorrecto" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "lonxitude da clave da petición demasiado grande: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "biblioteca libc4 %s nun directorio incorrecto" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "biblioteca libc5 %s nun directorio incorrecto" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "biblioteca libc6 %s nun directorio incorrecto" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "as bibliotecas %s e %s do directorio %s teñen o mesmo soname pero diferente tipo." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "liña demasiado longa" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "listar tódolos conxuntos de caracteres codificados que se coñecen" @@ -4717,7 +4799,7 @@ msgstr "listar tódolos conxuntos de cara msgid "locale name should consist only of portable characters" msgstr "o nome do locale debería consistir só en caracteres portables" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "fallou a chamada a lstat" @@ -4729,7 +4811,11 @@ msgstr "face-la gráfica de saída VALOR p msgid "make output graphic VALUE pixel wide" msgstr "face-la gráfica de saída VALOR pixels de ancho" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: non se sabe como manexar máis de 8 argumentos\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "ignórase unha liña mal formada" @@ -4741,39 +4827,34 @@ msgstr "fallou o mapeado da táboa de cad msgid "mapping of section headers failed" msgstr "fallou o mapeado das cabeceiras da sección" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "memoria alterada antes do bloque reservado\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "memoria alterada despois do bloque reservado\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "memoria esgotada" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "a memoria é consistente, a librería ten erros\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "fallou a chamada a mmap sobre o ficheiro de caché.\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "máis dun segmento dinámico\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "regra sen nome" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "non se especificou unha codificación nin do orixinal nin do destino" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4806,7 +4887,7 @@ msgstr "netname2user: nome principal `%s msgid "netname2user: should not have uid 0" msgstr "netname2user: non debería ter uid 0" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "prog %d nunca rexistrado\n" @@ -4815,11 +4896,11 @@ msgstr "prog %d nunca rexistrado\n" msgid "no or value given" msgstr "non se deu un valor ou " -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "ningún día do mes coincide coa regra" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "non hai unha definición de `UNDEFINED'" @@ -4828,7 +4909,7 @@ msgstr "non hai unha definición de `UNDE msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "non se deu un nome de ficheiro para os datos de perfil e o obxecto `%s' non ten so-nome" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "non se definiron díxitos de entrada e ningún dos nomes estándar do mapa de caracteres" @@ -4836,37 +4917,37 @@ msgstr "non se definiron díxitos de entr msgid "no other keyword shall be specified when `copy' is used" msgstr "non se debe especificar outra clave cando se usa `copy'" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "non se definiron díxitos de saída e ningún dos nomes estándar do mapa de caracteres" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "non se producíu un ficheiro de saída porque se deron avisos" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "non se deu un nome simbólico" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "non se deu un nome simbólico para a fin do rango" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "non se debería emprega-lo valor do carácter non simbólico" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "non tódolos caracteres empregados en `outdigit' están dispoñibles no mapa de caracteres" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "non tódolos caracteres empregados en `outdigit' están dispoñibles no repertorio" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "non é un ficheiro normal" @@ -4885,36 +4966,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "¡Non se está a executar nscd!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "o ficheiro obxecto non ten unha sección dinámica" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "omiti-los caracteres non válidos da saída" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "só se pode cargar ET_DYN e ET_EXEC" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "só se permiten definicións WIDTH seguindo á definición CHARMAP" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "a orde de `%.*s' xa está definida en %s:%Zu" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "a codificación orixinal non foi especificada usando `-f'" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "memoria esgotada" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "ficheiro de saída" @@ -4922,19 +4999,19 @@ msgstr "ficheiro de saída" msgid "pmap_getmaps rpc problem" msgstr "pmap_getmaps problema de rpc" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: fallo de protocolo no establecemento do circuito\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "final prematura da definición `translit_ignore'" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "erro de preprocesador" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "a definición anterior estaba aquí" @@ -4942,7 +5019,7 @@ msgstr "a definición anterior estaba aqu msgid "print list of count paths and their number of use" msgstr "visualiza-la lista de rotas de conta e o seu número de uso" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "visualiza-la información do progreso" @@ -4968,30 +5045,30 @@ msgstr "o programa %lu versión %lu non e msgid "program %lu version %lu ready and waiting\n" msgstr "programa %lu versión %lu preparado e agardando\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: lectura curta" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (configurando stderr): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmp: socket: Tódolos portos están sendo utilizados\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write (configurando stderr): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: memoria esgotada\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "momento de segundo de corrección repetido" @@ -5000,7 +5077,7 @@ msgstr "momento de segundo de corrección msgid "repertoire map file `%s' not found" msgstr "o ficheiro de mapa de repertorios `%s' non foi atopado" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "os bytes resultantes do rango non son representables" @@ -5036,24 +5113,24 @@ msgstr "rpcinfo: fallou a multidifusión: msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: non se pode contactar co portmapper" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "o mesmo nome de regra aparece en varios ficheiros" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "non se pode facer dlopen() sobre o obxecto compartido" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "o obxecto compartido non está aberto" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "lectura demasiado curta ao le-la clave de petición: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "lectura demasiado curta ao le-la petición: %s" @@ -5063,35 +5140,31 @@ msgstr "lectura demasiado curta ao le-la msgid "short write in %s: %s" msgstr "escritura demasiado curta en %s: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "socket: fallo do protocolo no establecemento do circuito\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "entrada estándar" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "saída estándar" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "as secuencias de caracteres do inicio e fin do rango deben te-la mesma lonxitude" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "o ano de comezo é maior có ano final" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "o ano de comezo é demasiado grande para ser representado" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "o ano de comezo é demasiado pequeno para ser representado" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "suprimi-los avisos" @@ -5099,31 +5172,31 @@ msgstr "suprimi-los avisos" msgid "svc_run: - poll failed" msgstr "svc_run: - a enquisa fallou" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - non se pode chamar a getsockname ou listen" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - problema ao crear un socket tcp" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: memoria esgotada\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - problema ao crear un socket AF_UNIX" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - non se pode chamar a getsockname ou listen" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: memoria esgotada\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: memoria esgotada\n" @@ -5143,49 +5216,49 @@ msgstr "svcudp_create: problema ao crear msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad é pequeno de máis para IP_PKTINFO\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: memoria esgotada\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "o símbolo `%.*s' non está no mapa de caracteres" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "o símbolo `%.*s' non está no mapa de repertorios" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "símbolo `%s'" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "o símbolo `%s' ten a mesma codificación có" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "o símbolo `%s' non está definido" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "erro de sintaxe" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "erro de sintaxe na definición %s: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5197,73 +5270,69 @@ msgstr "erro de sintaxe no prólogo: %s" msgid "syntax error in repertoire map definition: %s" msgstr "erro de sintaxe na definición do mapa de repertorio: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "erro de sintaxe: non está dentro dunha sección de definición de locale" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "a codificación do destino non foi especificada usando `-t'" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "esta é a primeira definición" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "tempo antes de cero" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "desbordamento de tempo" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "o valor-a do rango é menor có valor-dende " -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "a secuencia de caracteres do valor-a é menor cá secuencia do valor-dende" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "demasiados poucos bytes na codificación de caracteres" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "demasiados bytes na codificación de caracteres" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "demasiados segundos de compensación" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "demasiados tipos de hora local" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "!¿demasiadas transicións?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "demasiadas abreviaturas de fuso horario, ou demasiado longas" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "lixo na fin da liña" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "problemas ao respostar ao prog %d\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "ano único con tipo" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "non se pode reservar espacio para o buffer de entrada" @@ -5271,11 +5340,15 @@ msgstr "non se pode reservar espacio par msgid "unable to free arguments" msgstr "non se pode libera-los parámetros" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "non definido" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "descoñecido" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "carácter `%s' descoñecido" @@ -5285,7 +5358,7 @@ msgstr "carácter `%s' descoñecido" msgid "unknown directive `%s': line ignored" msgstr "directiva `%s' descoñecida: liña ignorada" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "erro %d de iconv() descoñecido" @@ -5295,15 +5368,20 @@ msgstr "erro %d de iconv() descoñecido" msgid "unknown set `%s'" msgstr "conxunto `%s' descoñecido" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "especificación `%s' descoñecida" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "fuso sen regras" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "mensaxe non rematada" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "cadea non rematada" @@ -5311,11 +5389,11 @@ msgstr "cadea non rematada" msgid "unterminated string constant" msgstr "constante de cadea non rematada" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "nome simbólico non rematado" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "o límite superior do rango non é maior có límite inferior" @@ -5323,35 +5401,35 @@ msgstr "o límite superior do rango non é msgid "upper limit in range is not smaller then lower limit" msgstr "o límite superior do rango non é menor có límite inferior" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "uso: %s ficheiro-de-entrada\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "uso do 29 de febreiro nun ano non bisesto" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "o valor de %s debe ser un enteiro" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "o valor de <%s> debe ser 1 ou superior" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "o valor de <%s> debe ser maior ou igual aó valor de <%s>" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "aviso: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "ao aceptar unha conexión: %s" @@ -5368,11 +5446,15 @@ msgstr "ao reservar espacio para a entra msgid "while allocating key copy" msgstr "ao reservar espacio para a copia da clave" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "ao inserir na árbore de busca" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "ao abrir un antigo ficheiro de catálogo" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "ao prepara-la saída" @@ -5380,15 +5462,15 @@ msgstr "ao prepara-la saída" msgid "while stat'ing profiling data file" msgstr "ao avalia-lo ficheiro de datos de perfís" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "débense emprega-los puntos suspensivos simbólicos hexadecimais `...' cos valores de rangos UCS" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "débense emprega-los puntos suspensivos absolutos `...' cos valores de rangos de códigos de caracteres" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "débense emprega-los puntos suspensivos absolutos `...' cos valores de rangos de nomes simbólicos" @@ -5396,7 +5478,7 @@ msgstr "débense emprega-los puntos suspe msgid "write incomplete" msgstr "escritura incompleta" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "escribible por alguén distinto do propietario" @@ -5404,23 +5486,23 @@ msgstr "escribible por alguén distinto d msgid "wrong number of arguments" msgstr "número de parámetros incorrecto" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "número de campos na liña Leap incorrecto" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "número de campos na liña Link incorrecto" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "número de campos na liña Rule incorrecto" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "número de campos na liña de continuación de Zone incorrecto" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "número de campos na liña Zone incorrecto" @@ -5432,14 +5514,62 @@ msgstr "xdr_reference: memoria esgotada\ msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: memoria esgotada\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: non se pode converti-lo servidor a nome de rede\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: non se pode obte-lo enderezo do servidor\n" +#~ msgid "%s: Error writing " +#~ msgstr "%s: Erro ao escribir " + +#~ msgid "CDS" +#~ msgstr "CDS" + +#~ msgid "DNANS" +#~ msgstr "DNANS" + +#~ msgid "DNS" +#~ msgstr "DNS" + +#~ msgid "IVY" +#~ msgstr "IVY" + +#~ msgid "NIS" +#~ msgstr "NIS" + +#~ msgid "SUNYP" +#~ msgstr "SUNYP" + +#~ msgid "X500" +#~ msgstr "X500" + +#~ msgid "XCHS" +#~ msgstr "XCHS" + +#~ msgid "cannot create capability list" +#~ msgstr "non se pode crea-la lista de capacidades" + +#~ msgid "cannot load shared object file" +#~ msgstr "non se pode carga-lo ficheiro de obxecto compartido" + +#~ msgid "cannot read locale directory `%s'" +#~ msgstr "non se pode le-lo directorio de locales `%s'" + +#~ msgid "fcntl: F_SETFD" +#~ msgstr "fcntl: F_SETFD" + +#~ msgid "neither original nor target encoding specified" +#~ msgstr "non se especificou unha codificación nin do orixinal nin do destino" + +#~ msgid "original encoding not specified using `-f'" +#~ msgstr "a codificación orixinal non foi especificada usando `-f'" + +#~ msgid "target encoding not specified using `-t'" +#~ msgstr "a codificación do destino non foi especificada usando `-t'" + #~ msgid " done\n" #~ msgstr " feito\n" @@ -5538,9 +5668,6 @@ msgstr "yp_update: non se pode obte-lo e #~ msgid "error while inserting collation element into hash table" #~ msgstr "erro ao inserta-lo elemento de ordenación na táboa hash" - -#~ msgid "error while inserting to hash table" -#~ msgstr "erro ao insertar na táboa hash" #~ msgid "from-value of `collating-element' must be a string" #~ msgstr "o valor-dende do `elemento-de-ordenación' debe ser unha cadea" Binary files glibc-2.2.4/po/it.mo and glibc-2.2.5/po/it.mo differ diff -durpN glibc-2.2.4/po/it.po glibc-2.2.5/po/it.po --- glibc-2.2.4/po/it.po Wed Feb 23 13:19:37 2000 +++ glibc-2.2.5/po/it.po Thu Aug 16 16:30:34 2001 @@ -4,82 +4,82 @@ # msgid "" msgstr "" -"Project-Id-Version: libc 2.1.3\n" -"POT-Creation-Date: 2000-02-16 10:39-0800\n" -"PO-Revision-Date: 2000-02-20 22:17+01:00\n" +"Project-Id-Version: libc 2.2.3\n" +"POT-Creation-Date: 2001-01-21 08:03-0800\n" +"PO-Revision-Date: 2001-08-17 01:18+0200\n" "Last-Translator: Marco d'Itri \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: nis/nis_print.c:273 +#: nis/nis_print.c:274 msgid "\t\tAccess Rights : " msgstr "\t\tDiritti di Accesso : " -#: nis/nis_print.c:271 +#: nis/nis_print.c:272 msgid "\t\tAttributes : " msgstr "\t\tAttributi : " -#: sunrpc/rpc_main.c:1414 +#: sunrpc/rpc_main.c:1425 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dnome[=valore]] [-i dimes] [-I [-K secondi]] [-Y path] infile\n" -#: sunrpc/rpc_main.c:1416 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" -#: sunrpc/rpc_main.c:1419 +#: sunrpc/rpc_main.c:1430 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n netid]* [-o outfile] [infile]\n" -#: sunrpc/rpc_main.c:1418 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s nettype]* [-o outfile] [infile]\n" -#: nis/nis_print.c:235 +#: nis/nis_print.c:236 msgid "\tAccess rights: " msgstr "\tDiritti di accesso: " -#: nis/nis_print.c:293 +#: nis/nis_print.c:294 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tDati della voce di tipo %s\n" -#: nis/nis_print.c:171 +#: nis/nis_print.c:172 #, c-format msgid "\tName : %s\n" msgstr "\tNome : %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:173 msgid "\tPublic Key : " msgstr "\tChiave pubblica : " -#: nis/nis_print.c:234 +#: nis/nis_print.c:235 #, c-format msgid "\tType : %s\n" msgstr "\tTipo : %s\n" -#: nis/nis_print.c:201 +#: nis/nis_print.c:202 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tIndirizzi universali (%u)\n" -#: nis/nis_print.c:269 +#: nis/nis_print.c:270 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNome : %s\n" -#: nis/nis_print.c:296 +#: nis/nis_print.c:297 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u byte] " -#: nscd/nscd_stat.c:153 +#: nscd/nscd_stat.c:154 msgid "" "\n" "%s cache:\n" @@ -109,11 +109,11 @@ msgstr "" "%15ld%% hit rate della cache\n" "%15s controlla i cambiamenti di /etc/%s\n" -#: nis/nis_print.c:251 +#: nis/nis_print.c:252 msgid "\nGroup Members :\n" msgstr "\nMembri del gruppo :\n" -#: nis/nis_print.c:322 +#: nis/nis_print.c:323 msgid "\nTime to Live : " msgstr "\nTempo da vivere: " @@ -133,60 +133,60 @@ msgstr " rpcinfo -p [ host ]\n" msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n" msgstr " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n" -#: nscd/nscd_stat.c:145 nscd/nscd_stat.c:147 +#: nscd/nscd_stat.c:146 nscd/nscd_stat.c:148 msgid " no" msgstr " no" -#: nscd/nscd_stat.c:145 nscd/nscd_stat.c:147 +#: nscd/nscd_stat.c:146 nscd/nscd_stat.c:148 msgid " yes" msgstr " si" -#: nis/nis_print.c:348 +#: nis/nis_print.c:349 #, c-format msgid " Data Length = %u\n" msgstr "Lunghezza dati = %u\n" -#: nis/nis_print_group_entry.c:121 +#: nis/nis_print_group_entry.c:123 msgid " Explicit members:\n" msgstr " Membri espliciti:\n" -#: nis/nis_print_group_entry.c:145 nis/nis_print_group_entry.c:161 +#: nis/nis_print_group_entry.c:147 nis/nis_print_group_entry.c:163 msgid " Explicit nonmembers:\n" msgstr " Non-membri espliciti:\n" -#: nis/nis_print_group_entry.c:129 +#: nis/nis_print_group_entry.c:131 msgid " Implicit members:\n" msgstr " Membri impliciti:\n" -#: nis/nis_print_group_entry.c:153 +#: nis/nis_print_group_entry.c:155 msgid " Implicit nonmembers:\n" msgstr " Non-membri impliciti:\n" -#: nis/nis_print_group_entry.c:126 +#: nis/nis_print_group_entry.c:128 msgid " No explicit members\n" msgstr " Nessun membro esplicito\n" -#: nis/nis_print_group_entry.c:150 +#: nis/nis_print_group_entry.c:152 msgid " No explicit nonmembers\n" msgstr " Nessun non-membro esplicito\n" -#: nis/nis_print_group_entry.c:134 +#: nis/nis_print_group_entry.c:136 msgid " No implicit members\n" msgstr " Nessun membro implicito\n" -#: nis/nis_print_group_entry.c:158 +#: nis/nis_print_group_entry.c:160 msgid " No implicit nonmembers\n" msgstr " Nessun non-membro implicito\n" -#: nis/nis_print_group_entry.c:142 +#: nis/nis_print_group_entry.c:144 msgid " No recursive members\n" msgstr " Nessun membro ricorsivo\n" -#: nis/nis_print_group_entry.c:166 +#: nis/nis_print_group_entry.c:168 msgid " No recursive nonmembers\n" msgstr " Nessun non-membro ricorsivo\n" -#: nis/nis_print_group_entry.c:137 +#: nis/nis_print_group_entry.c:139 msgid " Recursive members:\n" msgstr " Membri ricorsivi:\n" @@ -194,304 +194,840 @@ msgstr " Membri ricorsivi:\n" msgid " program vers proto port\n" msgstr " programma vers proto porta\n" -#: argp/argp-help.c:1573 +#: argp/argp-help.c:1572 msgid " or: " msgstr " o: " -#: timezone/zic.c:423 +#: elf/ldconfig.c:448 +msgid " (SKIPPED)\n" +msgstr " (SALTATA)\n" + +#: elf/ldconfig.c:446 +msgid " (changed)\n" +msgstr " (cambiata)\n" + +#: timezone/zic.c:421 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regola da \"%s\", riga %d)" -#: argp/argp-help.c:1585 +#: argp/argp-help.c:1584 msgid " [OPTION...]" msgstr " [OPZIONE...]" -#: locale/programs/ld-collate.c:370 locale/programs/ld-ctype.c:1476 -msgid " done\n" -msgstr " fatto\n" - -#: timezone/zic.c:420 +#: timezone/zic.c:418 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", riga %d: %s" -#: timezone/zic.c:984 +#: timezone/zic.c:983 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "La riga \"Zone %s\" e l'opzione -l sono mutuamente esclusive" -#: timezone/zic.c:992 +#: timezone/zic.c:991 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "La riga Zone %s\" e l'opzione -p sono mutuamente esclusive" -#: sunrpc/rpc_main.c:1399 +#: sunrpc/rpc_main.c:1410 msgid "\"infile\" is required for template generation flags.\n" msgstr "\"infile\" è necessario per i flag di generazione del template.\n" -#: argp/argp-help.c:210 +#: argp/argp-help.c:209 #, c-format msgid "%.*s: ARGP_HELP_FMT parameter requires a value" msgstr "%.*s: Il parametro ARGP_HELP_FMT richiede un valore" -#: argp/argp-help.c:219 +#: argp/argp-help.c:218 #, c-format msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Parametro ARGP_HELP_FMT sconosciuto" -#: timezone/zic.c:794 +#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 +#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 +#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 +#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 +#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 +#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#, c-format +msgid "%1$s: definition does not end with `END %1$s'" +msgstr "%1$s: la definizione non termina con `END %1$s'" + +#: elf/cache.c:165 elf/cache.c:175 +#, c-format +msgid "%d libs found in cache `%s'\n" +msgstr "%d librerie trovate nella cache `%s'\n" + +#: timezone/zic.c:793 #, c-format msgid "%s in ruleless zone" msgstr "%s in una zona senza regole" -#: assert/assert.c:51 +#: elf/../sysdeps/generic/readelflib.c:65 +#, c-format +msgid "%s is a 32 bit ELF file.\n" +msgstr "%s è un file ELF a 32 bit.\n" + +#: elf/../sysdeps/generic/readelflib.c:67 +#, c-format +msgid "%s is a 64 bit ELF file.\n" +msgstr "%s è un file ELF a 64 bit.\n" + +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#, c-format +msgid "%s is for unknown machine %d.\n" +msgstr "%s è per la macchina sconosciuta %d.\n" + +#: elf/ldconfig.c:329 +#, c-format +msgid "%s is not a known library type" +msgstr "%s non è un tipo di libreria conosciuto" + +#: elf/../sysdeps/generic/readelflib.c:76 +#, c-format +msgid "%s is not a shared object file (Type: %d).\n" +msgstr "%s non è il file di un oggetto condiviso (Tipo: %d).\n" + +#: elf/ldconfig.c:415 +#, c-format +msgid "%s is not a symbolic link\n" +msgstr "%s non è un link simbolico\n" + +#: elf/readlib.c:157 +#, c-format +msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" +msgstr "%s non è un file ELF - ha i byte magici all'inizio sbagliati.\n" + +#: assert/assert.c:52 #, c-format msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n" msgstr "%s%s%s:%u: %s%sAsserzione `%s' fallita.\n" -#: assert/assert-perr.c:52 +#: assert/assert-perr.c:54 #, c-format msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n" msgstr "%s%s%s:%u: %s%sErrore inatteso: %s.\n" -#: stdio-common/psignal.c:47 +#: stdio-common/psignal.c:48 #, c-format msgid "%s%sUnknown signal %d\n" msgstr "%s%sSegnale %d sconosciuto\n" -#: timezone/zic.c:2229 +#: timezone/zic.c:2228 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d non ha esteso correttamente il segno\n" -#: locale/programs/charmap.c:261 +#: locale/programs/charmap.c:326 #, c-format msgid "%s: must be greater than \n" msgstr "%s: deve essere maggiore di \n" -#: sunrpc/rpc_main.c:421 +#: sunrpc/rpc_main.c:423 #, c-format msgid "%s: C preprocessor failed with exit code %d\n" msgstr "%s: il preprocessore C ha fallito con il codice di uscita %d\n" -#: sunrpc/rpc_main.c:418 +#: sunrpc/rpc_main.c:420 #, c-format msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: il preprocessore C ha fallito con il segnale %d\n" -#: timezone/zic.c:1495 +#: timezone/zic.c:1494 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: Impossibile creare %s: %s\n" -#: timezone/zic.c:2207 +#: timezone/zic.c:2206 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: Impossibile creare la directory %s: %s\n" -#: timezone/zic.c:646 +#: timezone/zic.c:645 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: Impossibile fare un link da %s a %s: %s\n" -#: timezone/zic.c:820 +#: timezone/zic.c:819 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: Impossibile aprire %s: %s\n" -#: timezone/zic.c:1485 +#: timezone/zic.c:1484 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: Impossibile rimuovere %s: %s\n" -#: timezone/zic.c:631 +#: timezone/zic.c:630 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: Impossibile cancellare %s: %s\n" -#: timezone/zic.c:889 +#: timezone/zic.c:888 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Errore chiudendo %s: %s\n" -#: timezone/zic.c:882 +#: timezone/zic.c:881 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Errore leggendo %s\n" -#: timezone/zdump.c:266 +#: timezone/zdump.c:267 #, c-format msgid "%s: Error writing " msgstr "%s: Errore scrivendo " -#: timezone/zic.c:1561 +#: timezone/zic.c:1560 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Errore scrivendo %s\n" -#: timezone/zic.c:867 +#: timezone/zic.c:866 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: riga leap nel file non di secondi intercalari %s\n" -#: timezone/zic.c:361 +#: timezone/zic.c:359 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Memoria esaurita: %s\n" -#: timezone/zic.c:526 +#: timezone/zic.c:525 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: È stata specificata più di una opzione -L\n" -#: timezone/zic.c:486 +#: timezone/zic.c:485 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: È stata specificata più di una opzione -d\n" -#: timezone/zic.c:496 +#: timezone/zic.c:495 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: È stata specificata più di una opzione -l\n" -#: timezone/zic.c:506 +#: timezone/zic.c:505 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: È stata specificata più di una opzione -p\n" -#: timezone/zic.c:516 +#: timezone/zic.c:515 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: È stata specificata più di una opzione -y\n" -#: argp/argp-parse.c:640 +#: argp/argp-parse.c:646 #, c-format msgid "%s: Too many arguments\n" msgstr "%s: Troppi argomenti\n" -#: login/programs/database.c:129 +#: locale/programs/ld-collate.c:457 locale/programs/ld-collate.c:483 +#: locale/programs/ld-collate.c:499 #, c-format -msgid "%s: cannot get modification time" -msgstr "%s: impossibile ottenere l'orario di modifica" +msgid "%s: `%s' mentioned more than once in definition of weight %d" +msgstr "%s: `%s' menzionato più di una volta nella definizione del peso %d" -#: timezone/zic.c:1928 +#: locale/programs/ld-collate.c:1323 +#, c-format +msgid "%s: `%s' must be a character" +msgstr "%s: `%s' deve essere un carattere" + +#: locale/programs/ld-address.c:248 locale/programs/ld-address.c:276 +#: locale/programs/ld-address.c:309 locale/programs/ld-address.c:321 +#, c-format +msgid "%s: `%s' value does not match `%s' value" +msgstr "" + +#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#, c-format +msgid "%s: `-1' must be last entry in `%s' field" +msgstr "%s: `-1' deve essere l'ultima voce del campo `%s'" + +#: locale/programs/ld-collate.c:447 locale/programs/ld-collate.c:473 +#, c-format +msgid "%s: `forward' and `backward' are mutually excluding each other" +msgstr "%s: `forward' e `backward' sono mutuamente esclusivi" + +#: locale/programs/ld-collate.c:1515 +#, c-format +msgid "%s: `position' must be used for a specific level in all sections or none" +msgstr "%s: `position' deve essere usato per uno specifico livello in tutte le sezioni o nessuna" + +#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#, c-format +msgid "%s: `translit_start' section does not end with `translit_end'" +msgstr "" + +#: locale/programs/ld-collate.c:1123 +#, c-format +msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" +msgstr "" + +#: locale/programs/ld-collate.c:1081 +#, c-format +msgid "%s: byte sequences of first and last character must have the same length" +msgstr "" + +#: locale/programs/ld-collate.c:3642 +#, c-format +msgid "%s: cannot have `%s' as end of ellipsis range" +msgstr "" + +#: locale/programs/ld-collate.c:3308 +#, c-format +msgid "%s: cannot reorder after %.*s: symbol not known" +msgstr "" + +#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 +#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 +#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 +#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 +#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#, c-format +msgid "%s: character `%s' in charmap not representable with one byte" +msgstr "" + +#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#, c-format +msgid "%s: character `%s' needed as default value not representable with one byte" +msgstr "" + +#: locale/programs/ld-ctype.c:2905 +#, c-format +msgid "%s: character `%s' not defined in charmap while needed as default value" +msgstr "%s: carattere `%s' non definito nella mappa dei caratteri sebbene necessario come valore predefinito" + +#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 +#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 +#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 +#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 +#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#, c-format +msgid "%s: character `%s' not defined while needed as default value" +msgstr "%s: carattere `%s' non definito sebbene necessario come valore predefinito" + +#: timezone/zic.c:1927 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: il comando era '%s', il risultato %d\n" -#: locale/programs/charmap.c:676 locale/programs/locfile.c:1014 +#: locale/programs/ld-time.c:225 +#, c-format +msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" +msgstr "%s: il flag di direzione nella stringa %Zd nel campo `era' non è né '+' né '-'" + +#: locale/programs/ld-time.c:237 +#, c-format +msgid "%s: direction flag in string %Zd in `era' field is not a single character" +msgstr "%s: il flag di direzione nella stringa %Zd nel campo `era' non è un unico carattere" + +#: locale/programs/ld-ctype.c:2727 +#, c-format +msgid "%s: duplicate `default_missing' definition" +msgstr "%s: definizione di `default_missing' ripetuta" + +#: locale/programs/ld-identification.c:423 +#, c-format, fuzzy +msgid "%s: duplicate category version definition" +msgstr "%s: definizione d ripetuta" + +#: locale/programs/ld-collate.c:2711 +#, c-format +msgid "%s: duplicate declaration of section `%s'" +msgstr "%s: dichiarazione della sezione `%s' ripetuta" + +#: locale/programs/ld-collate.c:2675 +#, c-format +msgid "%s: duplicate definition of `%s'" +msgstr "%s: definizione di `%s' ripetuta" + +#: locale/programs/ld-collate.c:3691 +#, c-format +msgid "%s: empty category description not allowed" +msgstr "" + +#: locale/programs/ld-collate.c:755 +#, fuzzy, c-format +msgid "%s: empty weight string not allowed" +msgstr "nome del peso assente: riga ignorata" + +#: locale/programs/charmap.c:831 #, c-format msgid "%s: error in state machine" msgstr "%s: errore nella macchina a stati" -#: posix/getopt.c:788 +#: locale/programs/ld-ctype.c:2483 +#, c-format +msgid "%s: field `%s' declared more than once" +msgstr "" + +#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 +#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 +#: locale/programs/ld-ctype.c:3329 +#, c-format +msgid "%s: field `%s' does not contain exactly ten entries" +msgstr "" + +#: locale/programs/ld-address.c:154 locale/programs/ld-address.c:205 +#: locale/programs/ld-address.c:230 locale/programs/ld-address.c:259 +#: locale/programs/ld-name.c:115 locale/programs/ld-telephone.c:117 +#, c-format +msgid "%s: field `%s' must not be empty" +msgstr "%s: il campo `%s' non deve essere vuoto" + +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 +#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 +#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 +#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 +#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 +#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 +#: locale/programs/ld-telephone.c:105 +#, c-format +msgid "%s: field `%s' not defined" +msgstr "%s: il campo `%s' non è definito" + +#: locale/programs/ld-messages.c:115 locale/programs/ld-messages.c:148 +#, c-format +msgid "%s: field `%s' undefined" +msgstr "%s: il campo `%s' non è definito" + +#: locale/programs/ld-time.c:258 +#, c-format +msgid "%s: garbage at end of offset value in string %Zd in `era' field" +msgstr "%s: spazzatura alla fine del valore di scostamento nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-time.c:318 +#, c-format +msgid "%s: garbage at end of starting date in string %Zd in `era' field " +msgstr "%s: spazzatura alla fine della data di inizio nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-time.c:395 +#, c-format +msgid "%s: garbage at end of stopping date in string %Zd in `era' field" +msgstr "%s: spazzatura alla fine della data terminale nella stringa %Zd nel campo `era'" + +#: posix/getopt.c:795 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opzione non permessa -- %c\n" -#: posix/getopt.c:791 +#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 +#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 +#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 +#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 +#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 +#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#, c-format +msgid "%s: incomplete `END' line" +msgstr "%s: riga `END' incompleta" + +#: locale/programs/ld-address.c:166 +msgid "%s: invalid escape `%%%c' sequence in field `%s'" +msgstr "%s: sequenza di escape `%%%c' non valida nel campo `%s'" + +#: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126 +#: locale/programs/ld-telephone.c:150 +#, c-format +msgid "%s: invalid escape sequence in field `%s'" +msgstr "%s: sequenza di escape non valida nel campo `%s'" + +#: locale/programs/ld-time.c:250 +#, c-format +msgid "%s: invalid number for offset in string %Zd in `era' field" +msgstr "%s: numero non valido per lo scostamento nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-collate.c:3143 +#, c-format +msgid "%s: invalid number of sorting rules" +msgstr "%s: numero di regole di ordinamento non valido" + +#: posix/getopt.c:798 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opzione non valida -- %c\n" -#: posix/getopt.c:711 +#: locale/programs/ld-time.c:309 +#, fuzzy, c-format +msgid "%s: invalid starting date in string %Zd in `era' field" +msgstr "%s: data iniziale illecita nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-time.c:386 +#, c-format +msgid "%s: invalid stopping date in string %Zd in `era' field" +msgstr "%s: data finale illecita nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-measurement.c:112 +#, fuzzy, c-format +msgid "%s: invalid value for field `%s'" +msgstr "%s: panico: l_value %d non valido\n" + +#: locale/programs/ld-address.c:242 locale/programs/ld-address.c:270 +#, c-format +msgid "%s: language abbreviation `%s' not defined" +msgstr "" + +#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 +#: locale/programs/ld-collate.c:3695 +#, c-format +msgid "%s: missing `order_end' keyword" +msgstr "" + +#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#, c-format +msgid "%s: missing `reorder-end' keyword" +msgstr "" + +#: locale/programs/ld-collate.c:3710 +#, c-format +msgid "%s: missing `reorder-sections-end' keyword" +msgstr "" + +#: locale/programs/ld-time.c:435 +#, c-format +msgid "%s: missing era format in string %Zd in `era' field" +msgstr "%s: manca il formato dell'era nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-time.c:423 +#, c-format +msgid "%s: missing era name in string %Zd in `era' field" +msgstr "%s: manca il nome dell'era nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-collate.c:3119 +#, fuzzy, c-format +msgid "%s: multiple order definitions for section `%s'" +msgstr "definizione ripetuta per il carattere `%.*s'" + +#: locale/programs/ld-collate.c:3169 +#, c-format +msgid "%s: multiple order definitions for unnamed section" +msgstr "" + +#: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:170 +#, c-format +msgid "%s: no correct regular expression for field `%s': %s" +msgstr "%s: nessuna espressione regolare corretta per il campo `%s': %s" + +#: locale/programs/ld-identification.c:169 +#, fuzzy, c-format +msgid "%s: no identification for category `%s'" +msgstr "impossibile aprire il file di output `%s' per la categoria `%s'" + +#: locale/programs/ld-ctype.c:2753 +#, c-format +msgid "%s: no representable `default_missing' definition found" +msgstr "" + +#: locale/programs/ld-collate.c:591 +#, c-format +msgid "%s: not enough sorting rules" +msgstr "" + +#: locale/programs/ld-address.c:295 +#, c-format +msgid "%s: numeric country code `%d' not valid" +msgstr "" + +#: posix/getopt.c:718 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: l'opzione `%c%s' non accetta argomenti\n" -#: posix/getopt.c:681 +#: posix/getopt.c:688 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: l'opzione `%s' è ambigua\n" -#: posix/getopt.c:729 posix/getopt.c:902 +#: posix/getopt.c:736 posix/getopt.c:909 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: l'opzione `%s' richiede un argomento\n" -#: posix/getopt.c:706 +#: posix/getopt.c:713 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: l'opzione `--%s' non accetta argomenti\n" -#: posix/getopt.c:886 +#: posix/getopt.c:893 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: l'opzione `-W %s' non accetta argomenti\n" -#: posix/getopt.c:868 +#: posix/getopt.c:875 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: l'opzione `-W %s' è ambigua\n" -#: posix/getopt.c:821 posix/getopt.c:951 +#: posix/getopt.c:828 posix/getopt.c:958 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" -#: sunrpc/rpc_main.c:287 +#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#, fuzzy, c-format +msgid "%s: order for `%.*s' already defined at %s:%Zu" +msgstr "mappa di caratteri `%s' già definita" + +#: locale/programs/ld-collate.c:3297 +#, fuzzy, c-format +msgid "%s: order for collating element %.*s not yet defined" +msgstr "" +"il simbolo per l'elemento di collazione multicarattere `%.*s'\n" +"replica la definizione dell'elemento" + +#: locale/programs/ld-collate.c:3281 +#, fuzzy, c-format +msgid "%s: order for collating symbol %.*s not yet defined" +msgstr "non ha senso specificare pesi di ordinamento per il simbolo di collazione" + +#: sunrpc/rpc_main.c:289 #, c-format msgid "%s: output would overwrite %s\n" msgstr "%s: l'output sovrascriverebbe %s\n" -#: timezone/zic.c:874 timezone/zic.c:1288 timezone/zic.c:1313 +#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panico: l_value %d non valido\n" -#: locale/programs/charmap.c:683 locale/programs/repertoire.c:301 +#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 +#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 +#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 +#: locale/programs/ld-identification.c:456 +#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 +#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 +#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 +#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: fine del file prematura" -#: sunrpc/rpc_main.c:294 +#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#, c-format +msgid "%s: section `%.*s' not known" +msgstr "" + +#: locale/programs/ld-time.c:337 +#, c-format +msgid "%s: starting date is invalid in string %Zd in `era' field" +msgstr "%s: data iniziale illecita nella stringa %Zd nel campo `era'" + +#: locale/programs/ld-time.c:414 +#, c-format +msgid "%s: stopping date is invalid in string %Zd in `era' field" +msgstr "%s: la data di stop non è permessa nella stringa %Zd in campo `era'" + +#: locale/programs/ld-collate.c:1248 +#, c-format +msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgstr "" + +#: locale/programs/ld-collate.c:1244 +#, c-format +msgid "%s: symbolic range ellipsis must not directly follow `order_start'" +msgstr "" + +#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 +#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 +#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 +#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 +#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 +#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 +#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 +#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#, c-format +msgid "%s: syntax error" +msgstr "%s: errore di sintassi" + +#: locale/programs/ld-ctype.c:2178 +#, c-format +msgid "%s: syntax error in definition of new character class" +msgstr "%s: errore di sintassi nella definizione di una nuova classe di carattere" + +#: locale/programs/ld-ctype.c:2193 +#, c-format +msgid "%s: syntax error in definition of new character map" +msgstr "%s: errore di sintassi nella definizione di una nuova mappa di caratteri" + +#: locale/programs/ld-ctype.c:3735 +#, c-format +msgid "%s: table for class \"%s\": %lu bytes\n" +msgstr "" + +#: locale/programs/ld-ctype.c:3803 +#, fuzzy, c-format +msgid "%s: table for map \"%s\": %lu bytes\n" +msgstr "%s: impossibile aprire %s: %m\n" + +#: locale/programs/ld-ctype.c:3935 +#, c-format +msgid "%s: table for width: %lu bytes\n" +msgstr "" + +#: locale/programs/ld-address.c:216 +#, c-format +msgid "%s: terminology language code `%s' not defined" +msgstr "" + +#: locale/programs/ld-collate.c:1054 +#, c-format +msgid "%s: the start and the end symbol of a range must stand for characters" +msgstr "" + +#: locale/programs/ld-time.c:464 +#, c-format +msgid "%s: third operand for value of field `%s' must not be larger than %d" +msgstr "" + +#: locale/programs/ld-collate.c:555 +#, c-format +msgid "%s: too many rules; first entry only had %d" +msgstr "" + +#: locale/programs/ld-collate.c:906 +#, c-format +msgid "%s: too many values" +msgstr "%s: troppi valori" + +#: locale/programs/ld-ctype.c:3639 +#, c-format +msgid "%s: transliteration data from locale `%s' not available" +msgstr "" + +#: sunrpc/rpc_main.c:296 #, c-format msgid "%s: unable to open %s: %m\n" msgstr "%s: impossibile aprire %s: %m\n" -#: posix/getopt.c:762 +#: locale/programs/ld-collate.c:2849 +#, c-format +msgid "%s: unknown character in collating symbol name" +msgstr "" + +#: locale/programs/ld-collate.c:2981 +#, fuzzy, c-format +msgid "%s: unknown character in equivalent definition name" +msgstr "errore di sintassi nella definizione della conversione del carattere" + +#: locale/programs/ld-collate.c:2994 +#, fuzzy, c-format +msgid "%s: unknown character in equivalent definition value" +msgstr "errore di sintassi nella definizione della conversione del carattere" + +#: locale/programs/ld-time.c:1040 +#, fuzzy, c-format +msgid "%s: unknown character in field `%s'" +msgstr "carattere sconosciuto `%s'" + +#: locale/programs/ld-collate.c:3091 +#, fuzzy, c-format +msgid "%s: unknown section name `%s'" +msgstr "insieme `%s' sconosciuto" + +#: locale/programs/ld-collate.c:3004 +#, fuzzy, c-format +msgid "%s: unknown symbol `%s' in equivalent definition" +msgstr "simbolo `%.*s' sconosciuto: riga ignorata" + +#: posix/getopt.c:769 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opzione `%c%s' non riconosciuta\n" -#: posix/getopt.c:758 +#: posix/getopt.c:765 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opzione `--%s' non riconosciuta\n" -#: timezone/zic.c:445 +#: timezone/zic.c:443 #, c-format msgid "" -"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ]\n" -"\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n" +"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" +"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n" msgstr "" -"%s: l'uso è %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ]\n" +"%s: l'uso è %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" "\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ nomefile ... ]\n" -#: timezone/zdump.c:174 +#: timezone/zdump.c:175 #, c-format msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: l'uso è %s [ -v ] [ -c cutoff ] nomezona ...\n" -#: sunrpc/rpc_main.c:306 +#: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 +#, c-format +msgid "%s: value for field `%s' must not be an empty string" +msgstr "%s: il valore per il campo `%s' non deve essere una stringa vuota" + +#: locale/programs/ld-monetary.c:250 locale/programs/ld-numeric.c:119 +#, c-format +msgid "%s: value for field `%s' must not be the empty string" +msgstr "%s: il valore per il campo `%s' non deve essere una stringa vuota" + +#: locale/programs/ld-monetary.c:232 +#, fuzzy, c-format +msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217" +msgstr "" +"il valore del campo `int_curr_symbol' della categoria `LC_MONETARY'\n" +"non corriposnde ad un nome ISO 4217 valido" + +#: locale/programs/ld-monetary.c:224 +#, fuzzy, c-format +msgid "%s: value of field `int_curr_symbol' has wrong length" +msgstr "" +"il valore del campo `int_curr_symbol' della categoria `LC_MONETARY'\n" +"è di lunghezza errata" + +#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#, fuzzy, c-format +msgid "%s: values for field `%s' must be smaller than 127" +msgstr "" +"i valori dei campi `%s' della categoria `%s' devono essere\n" +"inferiori a 127" + +#: locale/programs/ld-time.c:488 +#, fuzzy, c-format +msgid "%s: values for field `%s' must not be larger than %d" +msgstr "" +"i valori dei campi `%s' della categoria `%s' devono essere\n" +"inferiori a 127" + +#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#, fuzzy, c-format +msgid "%s: values of field `%s' must not be larger than %d" +msgstr "" +"i valori dei campi `%s' della categoria `%s' devono essere\n" +"inferiori a 127" + +#: locale/programs/ld-collate.c:850 +#, c-format +msgid "%s: weights must use the same ellipsis symbol as the name" +msgstr "" + +#: sunrpc/rpc_main.c:308 #, c-format msgid "%s: while writing output %s: %m" msgstr "%s: scrivendo l'output %s: %m" -#: argp/argp-parse.c:164 +#: argp/argp-parse.c:170 msgid "(PROGRAM ERROR) No version known!?" msgstr "(ERRORE DEL PROGRAMMA) Nessuna versione conosciuta!?" -#: argp/argp-parse.c:781 +#: argp/argp-parse.c:787 msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(PROGRAM ERROR) L'opzione avrebbe dovuto essere riconosciuta!?" -#: nis/nis_print.c:129 +#: nis/nis_print.c:130 msgid "(Unknown object)\n" msgstr "(Oggetto sconosciuto)\n" -#: sunrpc/clnt_perr.c:124 +#: sunrpc/clnt_perr.c:125 #, c-format msgid "(unknown authentication error - %d)" msgstr "(errore di autenticazione sconosciuto - %d)" @@ -505,11 +1041,11 @@ msgstr "(sconosciuto)" msgid "*** The file `%s' is stripped: no detailed analysis possible\n" msgstr "*** Il file `%s' è stripped: impossibile fare l'analisi dettagliata\n" -#: catgets/gencat.c:267 +#: catgets/gencat.c:282 msgid "*standard input*" msgstr "*standard input*" -#: catgets/gencat.c:121 +#: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" "[OUTPUT-FILE [INPUT-FILE]...]" @@ -517,31 +1053,36 @@ msgstr "" "-o FILE-OUTPUT [FILE-INPUT]...\n" "[FILE-OUTPUT [FILE-INPUT]...]" -#: stdio-common/../sysdeps/gnu/errlist.c:796 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:114 +#: stdio-common/../sysdeps/gnu/errlist.c:797 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:115 msgid ".lib section in a.out corrupted" msgstr "sezione .lib nell'a.out danneggiata" -#: sunrpc/clnt_perr.c:110 sunrpc/clnt_perr.c:131 +#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; low version = %lu, high version = %lu" -#: sunrpc/clnt_perr.c:117 +#: sunrpc/clnt_perr.c:118 msgid "; why = " msgstr "; motivo = " -#: locale/programs/charset.c:98 +#: locale/programs/charmap.c:999 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> e <%s> non sono nomi leciti per l'intervallo" -#: locale/programs/ld-ctype.c:428 +#: locale/programs/repertoire.c:448 +#, c-format +msgid "<%s> and <%s> are invalid names for range" +msgstr "<%s> e <%s> non sono nomi validi per l'intervallo" + +#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 #, c-format msgid " character must not be in class `%s'" msgstr "Il carattere non deve essere nella classe `%s'" -#: locale/programs/ld-ctype.c:416 +#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 #, c-format msgid " character not in class `%s'" msgstr "Il carattere non è nella classe `%s'" @@ -549,58 +1090,65 @@ msgstr "Il carattere non è nella cl #. TRANS The experienced user will know what is wrong. #. TRANS @c This error code is a joke. Its perror text is part of the joke. #. TRANS @c Don't change it. -#: stdio-common/../sysdeps/gnu/errlist.c:621 +#: stdio-common/../sysdeps/gnu/errlist.c:622 msgid "?" msgstr "?" -#: sysdeps/generic/siglist.h:34 sysdeps/gnu/siglist.h:28 +#: sysdeps/generic/siglist.h:34 msgid "Aborted" msgstr "Abortito" -#: nis/nis_print.c:320 +#: nis/nis_print.c:321 msgid "Access Rights : " msgstr "Diritti di Accesso : " -#: stdio-common/../sysdeps/gnu/errlist.c:792 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:113 +#: stdio-common/../sysdeps/gnu/errlist.c:793 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:114 msgid "Accessing a corrupted shared library" msgstr "Accesso ad una libreria condivisa danneggiata" #. TRANS The requested socket address is already in use. @xref{Socket Addresses}. -#: stdio-common/../sysdeps/gnu/errlist.c:366 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:154 +#: stdio-common/../sysdeps/gnu/errlist.c:367 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:155 msgid "Address already in use" msgstr "Indirizzo già in uso" -#: posix/../sysdeps/posix/gai_strerror.c:30 +#: posix/../sysdeps/posix/gai_strerror.c:31 msgid "Address family for hostname not supported" msgstr "Famiglia dell'indirizzo non gestita per l'hostname" #. TRANS The address family specified for a socket is not supported; it is #. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}. -#: stdio-common/../sysdeps/gnu/errlist.c:361 +#: stdio-common/../sysdeps/gnu/errlist.c:362 msgid "Address family not supported by protocol" msgstr "Famiglia dell'indirizzo non gestita dal protocollo" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:153 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:154 msgid "Address family not supported by protocol family" msgstr "Famiglia dell'indirizzo non gestita dalla famiglia del protocollo" -#: stdio-common/../sysdeps/gnu/errlist.c:760 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:97 +#: stdio-common/../sysdeps/gnu/errlist.c:761 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:98 msgid "Advertise error" msgstr "Advertise error" -#: stdio-common/../sysdeps/unix/siglist.c:39 sysdeps/generic/siglist.h:40 -#: sysdeps/gnu/siglist.h:34 +#: stdio-common/../sysdeps/unix/siglist.c:40 sysdeps/generic/siglist.h:40 msgid "Alarm clock" msgstr "Alarm clock" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:82 +#: malloc/memusagestat.c:57 +msgid "Also draw graph for total memory consumption" +msgstr "Disegna anche un grafico dell'occupazione complessiva della memoria" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:83 msgid "Anode table overflow" msgstr "Overflow della tabella degli anode" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:36 +#: intl/tst-gettext2.c:37 +msgid "Another string for testing." +msgstr "Un'altra stringa da provare." + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:37 msgid "Arg list too long" msgstr "Lista degli argomenti troppo lunga" @@ -608,104 +1156,103 @@ msgstr "Lista degli argomenti troppo lun #. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a #. TRANS File}) occupy too much memory space. This condition never arises in the #. TRANS GNU system. -#: stdio-common/../sysdeps/gnu/errlist.c:69 +#: stdio-common/../sysdeps/gnu/errlist.c:70 msgid "Argument list too long" msgstr "Lista degli argomenti troppo lunga" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:62 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:63 msgid "Argument out of domain" msgstr "Argomento fuori dal dominio" -#: nis/nis_error.c:65 +#: nis/nis_error.c:66 msgid "Attempt to remove a non-empty table" msgstr "Si è tentato di rimuovere una tabella non vuota" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:115 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:116 msgid "Attempting to link in more shared libraries than system limit" msgstr "Si è tentato di linkare più librerie condivise del limite di sistema" -#: stdio-common/../sysdeps/gnu/errlist.c:800 +#: stdio-common/../sysdeps/gnu/errlist.c:801 msgid "Attempting to link in too many shared libraries" msgstr "Si è tentato di linkare troppe librerie condivise" -#: sunrpc/clnt_perr.c:328 +#: sunrpc/clnt_perr.c:329 msgid "Authentication OK" msgstr "Autenticazione OK" #. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:561 +#: stdio-common/../sysdeps/gnu/errlist.c:562 msgid "Authentication error" msgstr "Errore di autenticazione" -#: nis/nis_print.c:105 +#: nis/nis_print.c:106 msgid "BOGUS OBJECT\n" msgstr "BOGUS OBJECT\n" #. TRANS Bad address; an invalid pointer was detected. #. TRANS In the GNU system, this error never happens; you get a signal instead. -#: stdio-common/../sysdeps/gnu/errlist.c:114 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 +#: stdio-common/../sysdeps/gnu/errlist.c:115 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:44 msgid "Bad address" msgstr "Indirizzo non valido" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:79 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:80 msgid "Bad exchange descriptor" msgstr "Descrittore di scambio non valido" #. TRANS Bad file descriptor; for example, I/O on a descriptor that has been #. TRANS closed or reading from a descriptor open only for writing (or vice #. TRANS versa). -#: stdio-common/../sysdeps/gnu/errlist.c:82 +#: stdio-common/../sysdeps/gnu/errlist.c:83 msgid "Bad file descriptor" msgstr "Descrittore di file non valido" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:38 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:39 msgid "Bad file number" msgstr "Descrittore di file non valido" -#: stdio-common/../sysdeps/gnu/errlist.c:748 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:86 +#: stdio-common/../sysdeps/gnu/errlist.c:749 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:87 msgid "Bad font file format" msgstr "Formato del file di font non valido" -#: stdio-common/../sysdeps/gnu/errlist.c:640 +#: stdio-common/../sysdeps/gnu/errlist.c:641 msgid "Bad message" msgstr "Messaggio non valido" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:83 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:84 msgid "Bad request code" msgstr "Codice di richiesta non valido" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:80 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:81 msgid "Bad request descriptor" msgstr "Descrittore di richiesta non valido" -#: stdio-common/../sysdeps/unix/siglist.c:37 sysdeps/generic/siglist.h:63 -#: sysdeps/gnu/siglist.h:57 +#: stdio-common/../sysdeps/unix/siglist.c:38 sysdeps/generic/siglist.h:63 msgid "Bad system call" msgstr "Chiamata di sistema non valida" -#: posix/../sysdeps/posix/gai_strerror.c:32 +#: posix/../sysdeps/posix/gai_strerror.c:33 msgid "Bad value for ai_flags" msgstr "Valore di ai_flags non valido" -#: locale/programs/localedef.c:101 +#: locale/programs/localedef.c:104 msgid "Be strictly POSIX conform" msgstr "Conformità POSIX rigorosa" -#: nis/nis_print.c:301 +#: nis/nis_print.c:302 msgid "Binary data\n" msgstr "Dati binari\n" #. TRANS A file that isn't a block special file was given in a situation that #. TRANS requires one. For example, trying to mount an ordinary file as a file #. TRANS system in Unix gives this error. -#: stdio-common/../sysdeps/gnu/errlist.c:121 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:44 +#: stdio-common/../sysdeps/gnu/errlist.c:122 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:45 msgid "Block device required" msgstr "È necessario un dispositivo a blocchi" -#: sunrpc/pmap_rmt.c:347 +#: sunrpc/pmap_rmt.c:348 msgid "Broadcast poll problem" msgstr "Problema di poll del broadcast" @@ -714,211 +1261,273 @@ msgstr "Problema di poll del broadcast" #. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled #. TRANS or blocked. Thus, your program will never actually see @code{EPIPE} #. TRANS unless it has handled or blocked @code{SIGPIPE}. -#: stdio-common/../sysdeps/gnu/errlist.c:234 -#: stdio-common/../sysdeps/unix/siglist.c:38 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:61 -#: sysdeps/generic/siglist.h:39 sysdeps/gnu/siglist.h:33 +#: stdio-common/../sysdeps/gnu/errlist.c:235 +#: stdio-common/../sysdeps/unix/siglist.c:39 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:62 +#: sysdeps/generic/siglist.h:39 msgid "Broken pipe" msgstr "Pipe rotta" -#: stdio-common/../sysdeps/unix/siglist.c:35 sysdeps/generic/siglist.h:37 -#: sysdeps/gnu/siglist.h:31 +#: stdio-common/../sysdeps/unix/siglist.c:36 sysdeps/generic/siglist.h:37 msgid "Bus error" msgstr "Bus error" -#: nis/nis_print.c:45 +#: nis/nis_print.c:46 msgid "CDS" msgstr "CDS" -#: stdio-common/../sysdeps/unix/siglist.c:49 sysdeps/generic/siglist.h:50 -#: sysdeps/gnu/siglist.h:44 +#: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Superato il limite del tempo di CPU" -#: nis/nis_error.c:32 +#: nis/nis_error.c:33 msgid "Cache expired" msgstr "Cache scaduta" -#: stdio-common/../sysdeps/gnu/errlist.c:788 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:112 +#: stdio-common/../sysdeps/gnu/errlist.c:789 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:113 msgid "Can not access a needed shared library" msgstr "Impossibile accedere ad una libreria condivisa necessaria" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:116 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:117 msgid "Can not exec a shared library directly" msgstr "Impossibile eseguire direttamente una libreria condivisa" -#: nis/ypclnt.c:779 +#: nis/ypclnt.c:792 msgid "Can't bind to server which serves this domain" msgstr "Impossibile fare il bind al server che serve questo dominio" -#: nis/ypclnt.c:791 +#: elf/ldconfig.c:934 +msgid "Can't chdir to /" +msgstr "Impossibile fare chdir a /" + +#: nis/ypclnt.c:804 msgid "Can't communicate with portmapper" msgstr "Impossibile comunicare con il portmapper" -#: nis/ypclnt.c:793 +#: nis/ypclnt.c:806 msgid "Can't communicate with ypbind" msgstr "Impossibile comunicare con ypbind" -#: nis/ypclnt.c:795 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypserv" msgstr "Impossibile comunicare con ypserv" +#: elf/cache.c:359 +#, c-format +msgid "Can't create temporary cache file %s" +msgstr "Impossibile creare il file temporaneo di cache %s" + +#: elf/ldconfig.c:502 +#, c-format +msgid "Can't find %s" +msgstr "Impossibile trovare %s" + +#: elf/ldconfig.c:440 +#, c-format +msgid "Can't link %s to %s" +msgstr "Impossibile fare un link da %s a %s" + +#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#, c-format +msgid "Can't lstat %s" +msgstr "Impossibile fare lstat di %s" + +#: elf/cache.c:108 elf/ldconfig.c:955 +#, c-format +msgid "Can't open cache file %s\n" +msgstr "Impossibile aprire il file di cache %s\n" + +#: elf/ldconfig.c:976 +#, c-format +msgid "Can't open cache file directory %s\n" +msgstr "Impossibile aprire la directory del file di cache %s\n" + +#: elf/ldconfig.c:865 +#, c-format +msgid "Can't open configuration file %s" +msgstr "Impossibile aprire il file di configurazione %s" + +#: elf/ldconfig.c:621 +#, c-format +msgid "Can't open directory %s" +msgstr "Impossibile aprire la directory %s" + +#: elf/cache.c:353 +#, c-format +msgid "Can't remove old temporary cache file %s" +msgstr "Impossibile rimuovere il vecchio file temporaneo di cache %s" + +#: elf/ldconfig.c:405 +#, c-format +msgid "Can't stat %s\n" +msgstr "Impossibile fare stat di %s\n" + +#: elf/ldconfig.c:434 +#, c-format +msgid "Can't unlink %s" +msgstr "Impossibile cancellare %s" + #. TRANS No memory available. The system cannot allocate more virtual memory #. TRANS because its capacity is full. -#: stdio-common/../sysdeps/gnu/errlist.c:103 +#: stdio-common/../sysdeps/gnu/errlist.c:104 msgid "Cannot allocate memory" -msgstr "Impossibile allocare memoria" +msgstr "Impossibile allocare della memoria" #. TRANS The requested socket address is not available; for example, you tried #. TRANS to give a socket a name that doesn't match the local host name. #. TRANS @xref{Socket Addresses}. -#: stdio-common/../sysdeps/gnu/errlist.c:373 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:155 +#: stdio-common/../sysdeps/gnu/errlist.c:374 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:156 msgid "Cannot assign requested address" msgstr "Impossibile assegnare l'indirizzo richiesto" -#: sunrpc/pmap_rmt.c:264 +#: sunrpc/pmap_rmt.c:265 msgid "Cannot create socket for broadcast rpc" msgstr "Impossibile creare il socket per l'rpc broadcast" -#: stdio-common/../sysdeps/gnu/errlist.c:804 +#: stdio-common/../sysdeps/gnu/errlist.c:805 msgid "Cannot exec a shared library directly" msgstr "Impossibile eseguire direttamente una libreria condivisa" -#: sunrpc/rpc_main.c:1404 +#: elf/readlib.c:98 +#, c-format +msgid "Cannot fstat file %s.\n" +msgstr "Impossibile fare fstat di %s.\n" + +#: sunrpc/rpc_main.c:1415 msgid "Cannot have more than one file generation flag!\n" msgstr "Impossibile avere più di un flag di generazione del file!\n" -#: sunrpc/pmap_rmt.c:360 +#: elf/readlib.c:117 +#, c-format +msgid "Cannot mmap file %s.\n" +msgstr "Impossibile fare mmap del file %s\n" + +#: sunrpc/pmap_rmt.c:361 msgid "Cannot receive reply to broadcast" msgstr "Impossibile ricevere una risposta al broadcast" -#: sunrpc/pmap_clnt.c:133 +#: sunrpc/pmap_clnt.c:136 msgid "Cannot register service" msgstr "Impossibile registrare il servizio" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:172 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:173 msgid "Cannot send after socket shutdown" msgstr "Impossibile inviare dopo lo shutdown del socket" #. TRANS The socket has already been shut down. -#: stdio-common/../sysdeps/gnu/errlist.c:434 +#: stdio-common/../sysdeps/gnu/errlist.c:435 msgid "Cannot send after transport endpoint shutdown" msgstr "Impossibile inviare dopo lo shutdown dell'estremità del trasporto" -#: sunrpc/pmap_rmt.c:322 +#: sunrpc/pmap_rmt.c:323 msgid "Cannot send broadcast packet" msgstr "Impossibile inviare il pacchetto broadcast" -#: sunrpc/pmap_rmt.c:271 +#: sunrpc/pmap_rmt.c:272 msgid "Cannot set socket option SO_BROADCAST" msgstr "Impossibile impostare l'opzione del socket SO_BROADCAST" -#: sunrpc/rpc_main.c:1191 +#: sunrpc/rpc_main.c:1195 msgid "Cannot specify more than one input file!\n" msgstr "Impossibile specificare più di un file di input!\n" -#: sunrpc/rpc_main.c:1361 +#: sunrpc/rpc_main.c:1372 msgid "Cannot use netid flag with inetd flag!\n" msgstr "Impossibile usare il flag netid con il flag inetd!\n" -#: sunrpc/rpc_main.c:1373 +#: sunrpc/rpc_main.c:1384 msgid "Cannot use netid flag without TIRPC!\n" msgstr "Impossibile usare il flag netid senza TIRPC!\n" -#: sunrpc/rpc_main.c:1380 +#: sunrpc/rpc_main.c:1391 msgid "Cannot use table flags with newstyle!\n" msgstr "Impossibile usare il flag della tabella con il nuovo stile!\n" -#: stdio-common/../sysdeps/gnu/errlist.c:688 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 +#: elf/ldconfig.c:131 +msgid "Change to and use ROOT as root directory" +msgstr "Vai in ROOT e usala come directory di root" + +#: elf/cache.c:390 +#, c-format +msgid "Changing access rights of %s to 0644 failed" +msgstr "Modifica a 0644 dei diritti di accesso di %s fallita" + +#: stdio-common/../sysdeps/gnu/errlist.c:689 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Numero del canale fuori dall'intervallo" -#: nis/nis_print.c:264 +#: nis/nis_print.c:265 #, c-format msgid "Character Separator : %c\n" msgstr "Separatore dei caratteri: %c\n" -#: stdio-common/../sysdeps/unix/siglist.c:45 sysdeps/generic/siglist.h:46 -#: sysdeps/gnu/siglist.h:40 +#: stdio-common/../sysdeps/unix/siglist.c:46 sysdeps/generic/siglist.h:46 msgid "Child exited" msgstr "Il figlio è uscito" -#: sunrpc/clnt_perr.c:347 +#: sunrpc/clnt_perr.c:348 msgid "Client credential too weak" msgstr "Credenziale del client troppo debole" -#: nis/nis_print.c:266 +#: nis/nis_print.c:267 msgid "Columns :\n" msgstr "Colonne: :\n" -#: stdio-common/../sysdeps/gnu/errlist.c:768 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:99 +#: stdio-common/../sysdeps/gnu/errlist.c:769 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:100 msgid "Communication error on send" msgstr "Errore di comunicazione durante send" -#: locale/programs/localedef.c:109 +#: locale/programs/localedef.c:112 msgid "Compile locale specification" msgstr "Compila la specifica di localizzazione" #. TRANS Go home and have a glass of warm, dairy-fresh milk. -#: stdio-common/../sysdeps/gnu/errlist.c:631 +#: stdio-common/../sysdeps/gnu/errlist.c:632 msgid "Computer bought the farm" msgstr "Il computer ha tirato le cuoia" -#: locale/programs/ld-ctype.c:1438 -msgid "Computing table size for character classes might take a while..." -msgstr "" -"Calcolo le dimensioni della tabella per le classi di caratteri.\n" -"Può essere una cosa lunga..." - -#: locale/programs/ld-collate.c:336 -msgid "Computing table size for collation information might take a while..." -msgstr "" -"Calcolo le dimensioni della tabella per le informazioni di collazione.\n" -"Può essere una cosa lunga..." +#: elf/ldconfig.c:141 +msgid "Configure Dynamic Linker Run Time Bindings." +msgstr "Configura i binding a run time del linker dinamico." #. TRANS A remote host refused to allow the network connection (typically because #. TRANS it is not running the requested service). -#: stdio-common/../sysdeps/gnu/errlist.c:451 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:175 +#: stdio-common/../sysdeps/gnu/errlist.c:452 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:176 msgid "Connection refused" msgstr "Connessione rifiutata" #. TRANS A network connection was closed for reasons outside the control of the #. TRANS local host, such as by the remote machine rebooting or an unrecoverable #. TRANS protocol violation. -#: stdio-common/../sysdeps/gnu/errlist.c:401 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:160 +#: stdio-common/../sysdeps/gnu/errlist.c:402 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:161 msgid "Connection reset by peer" msgstr "Connessione abbattuta dal corrispondente" #. TRANS A socket operation with a specified timeout received no response during #. TRANS the timeout period. -#: stdio-common/../sysdeps/gnu/errlist.c:445 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:174 +#: stdio-common/../sysdeps/gnu/errlist.c:446 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:175 msgid "Connection timed out" msgstr "Timeout della connessione" -#: stdio-common/../sysdeps/unix/siglist.c:44 sysdeps/generic/siglist.h:45 -#: sysdeps/gnu/siglist.h:39 +#: stdio-common/../sysdeps/unix/siglist.c:45 sysdeps/generic/siglist.h:45 msgid "Continued" msgstr "Continuato" -#: iconv/iconv_prog.c:66 +#: iconv/iconv_prog.c:69 msgid "Convert encoding of given files from one encoding to another." msgstr "Converte in un'altra codifica la codifica dei file indicati." -#: db2/makedb.c:58 -msgid "Convert key to lower case" -msgstr "Converte la chiave in minuscolo" - -#: catgets/gencat.c:237 db2/makedb.c:242 elf/sprof.c:355 -#: iconv/iconv_prog.c:294 locale/programs/locale.c:267 -#: locale/programs/localedef.c:400 nscd/nscd.c:277 nscd/nscd_nischeck.c:90 -#: nss/getent.c:66 posix/getconf.c:624 +#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 +#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 +#: nss/getent.c:63 posix/getconf.c:751 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -932,385 +1541,443 @@ msgstr "" "NON c'è alcuna garanzia; neppure di COMMERCIABILITÀ o IDONEITÀ AD UN\n" "PARTICOLARE SCOPO.\n" -#: nscd/nscd_conf.c:165 +#: nscd/nscd_conf.c:166 #, c-format msgid "Could not create log file \"%s\"" msgstr "impossibile creare il file di log \"%s\"" -#: catgets/gencat.c:108 +#: catgets/gencat.c:112 msgid "Create C header file NAME containing symbol definitions" msgstr "Crea un header C NOME contenente le definizioni dei simboli" -#: locale/programs/localedef.c:100 +#: locale/programs/localedef.c:102 +msgid "Create old-style tables" +msgstr "Crea le tabelle vecchio stile" + +#: locale/programs/localedef.c:101 msgid "Create output even if warning messages were issued" msgstr "Crea l'output anche se sono stati emessi messaggi di avvertimento" -#: db2/makedb.c:68 -msgid "Create simple DB database from textual input." -msgstr "Crea un semplice database DB dall'input testuale." - -#: nis/nis_print.c:325 +#: nis/nis_print.c:326 #, c-format msgid "Creation Time : %s" msgstr "Orario di creazione : %s" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:47 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:48 msgid "Cross-device link" msgstr "Link tra dispositivi" -#: nis/nss_nisplus/nisplus-publickey.c:95 -#: nis/nss_nisplus/nisplus-publickey.c:171 +#: malloc/memusagestat.c:67 +msgid "DATAFILE [OUTFILE]" +msgstr "FILEDATI [FILEOUTPUT]" + +#: nis/nss_nisplus/nisplus-publickey.c:96 +#: nis/nss_nisplus/nisplus-publickey.c:172 #, c-format msgid "DES entry for netname %s not unique\n" msgstr "La voce DES per il netname %s non è unica\n" -#: nis/nis_print.c:111 +#: nis/nis_print.c:112 msgid "DIRECTORY\n" msgstr "DIRECTORY\n" -#: nis/nis_print.c:41 +#: nis/nis_print.c:42 msgid "DNANS" msgstr "DNANS" -#: nis/nis_print.c:37 +#: nis/nis_print.c:38 msgid "DNS" msgstr "DNS" -#: nis/nis_error.c:51 +#: elf/dl-open.c:189 +msgid "DST not allowed in SUID/SGID programs" +msgstr "DST non è permesso nei programmi SUID/SGID" + +#: elf/dl-error.c:71 +msgid "DYNAMIC LINKER BUG!!!" +msgstr "BUG DEL LINKER DINAMICO!!!" + +#: nis/nis_error.c:52 msgid "Database for table does not exist" msgstr "Non esiste un database per la tabella" -#: nis/ypclnt.c:805 +#: nis/ypclnt.c:818 msgid "Database is busy" msgstr "Il database è occupato" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:74 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:75 msgid "Deadlock situation detected/avoided" msgstr "Individuata/evitata una situazione di deadlock" -#: nis/nis_print.c:225 +#: nis/nis_print.c:226 msgid "Default Access rights :\n" msgstr "Diritti di accesso predefiniti:\n" #. TRANS No default destination address was set for the socket. You get this #. TRANS error when you try to transmit data over a connectionless socket, #. TRANS without first specifying a destination for the data with @code{connect}. -#: stdio-common/../sysdeps/gnu/errlist.c:429 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:125 +#: stdio-common/../sysdeps/gnu/errlist.c:430 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:126 msgid "Destination address required" msgstr "È necessario l'indirizzo di destinazione" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:45 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:46 msgid "Device busy" msgstr "Dispositivo occupato" -#: stdio-common/../sysdeps/gnu/errlist.c:668 +#: stdio-common/../sysdeps/gnu/errlist.c:669 msgid "Device not a stream" msgstr "Il dispositivo non è uno stream" -#. TRANS No such device or address. The system tried to use the device -#. TRANS represented by a file you specified, and it couldn't find the device. -#. TRANS This can mean that the device file was installed incorrectly, or that -#. TRANS the physical device is missing or not correctly attached to the -#. TRANS computer. -#: stdio-common/../sysdeps/gnu/errlist.c:61 -msgid "Device not configured" -msgstr "Dispositivo non configurato" - #. TRANS Resource busy; a system resource that can't be shared is already in use. #. TRANS For example, if you try to delete a file that is the root of a currently #. TRANS mounted filesystem, you get this error. -#: stdio-common/../sysdeps/gnu/errlist.c:128 +#: stdio-common/../sysdeps/gnu/errlist.c:129 msgid "Device or resource busy" msgstr "Dispositivo o risorsa occupata" -#: nis/nis_print.c:179 +#: nis/nis_print.c:180 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bit)\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:318 #, c-format msgid "Directory : %s\n" msgstr "Directory : %s\n" #. TRANS Directory not empty, where an empty directory was expected. Typically, #. TRANS this error occurs when you are trying to delete a directory. -#: stdio-common/../sysdeps/gnu/errlist.c:480 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:122 +#: stdio-common/../sysdeps/gnu/errlist.c:481 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:123 msgid "Directory not empty" msgstr "La directory non è vuota" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:78 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:79 msgid "Disc quota exceeded" msgstr "Superata la quota di disco" #. TRANS The user's disk quota was exceeded. -#: stdio-common/../sysdeps/gnu/errlist.c:498 +#: stdio-common/../sysdeps/gnu/errlist.c:499 msgid "Disk quota exceeded" msgstr "Superata la quota di disco" -#: nscd/nscd.c:83 +#: nscd/nscd.c:86 msgid "Do not fork and display messages on the current tty" msgstr "Non fa fork e stampa i messaggi sul tty corrente" -#: db2/makedb.c:61 -msgid "Do not print messages while building database" -msgstr "Non stampa messaggi mentre crea il database" - -#: catgets/gencat.c:110 +#: catgets/gencat.c:114 msgid "Do not use existing catalog, force new output file" msgstr "Non usa il catalogo esistente, forza un nuovo file di output" -#: nis/ypclnt.c:851 +#: nis/ypclnt.c:864 msgid "Domain not bound" msgstr "Dominio non collegato" -#: stdio-common/../sysdeps/unix/siglist.c:32 sysdeps/generic/siglist.h:60 -#: sysdeps/gnu/siglist.h:54 +#: elf/ldconfig.c:129 +msgid "Don't build cache" +msgstr "Non crea la cache" + +#: elf/ldconfig.c:130 +msgid "Don't generate links" +msgstr "Non genera i link" + +#: debug/pcprofiledump.c:56 +msgid "Dump information generated by PC profiling." +msgstr "" + +#: elf/dl-load.c:1290 +msgid "ELF file ABI version invalid" +msgstr "Versione dell'ABI del file ELF non valida" + +#: elf/dl-load.c:1287 +msgid "ELF file OS ABI invalid" +msgstr "OS dell'ABI del file ELF non valido" + +#: elf/dl-load.c:1296 +msgid "ELF file version does not match current one" +msgstr "La versione del file ELF non corrisponde a quella attuale" + +#: elf/dl-load.c:1283 +msgid "ELF file version ident does not match current one" +msgstr "L'identificatore della versione del file ELF non corrisponde a quello attuale" + +#: elf/dl-load.c:1307 +msgid "ELF file's phentsize not the expected size" +msgstr "La phentsize del file ELF non corrisponde a quella attesa" + +#: elf/dl-load.c:876 +msgid "ELF load command address/offset not properly aligned" +msgstr "" + +#: elf/dl-load.c:873 +msgid "ELF load command alignment not page-aligned" +msgstr "" + +#: stdio-common/../sysdeps/unix/siglist.c:33 sysdeps/generic/siglist.h:60 msgid "EMT trap" msgstr "trap EMT" -#: nis/nis_print.c:120 +#: nis/nis_print.c:121 msgid "ENTRY\n" msgstr "ENTRY\n" -#: nis/nis_print.c:299 +#: nis/nis_print.c:300 msgid "Encrypted data\n" msgstr "Dati cifrati\n" -#: nis/nis_error.c:52 +#: nis/nis_error.c:53 msgid "Entry/table type mismatch" msgstr "I tipi di voce/tabella non coincidono" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:29 +#: nss/getent.c:127 nss/getent.c:292 +#, c-format +msgid "Enumeration not supported on %s\n" +msgstr "Enumerazione su %s non gestita\n" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:30 msgid "Error 0" msgstr "Errore 0" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:129 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:130 msgid "Error 100" msgstr "Errore 100" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:130 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:131 msgid "Error 101" msgstr "Errore 101" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:131 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:132 msgid "Error 102" msgstr "Errore 102" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:132 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:133 msgid "Error 103" msgstr "Errore 103" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:133 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:134 msgid "Error 104" msgstr "Errore 104" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:134 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:135 msgid "Error 105" msgstr "Errore 105" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:135 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:136 msgid "Error 106" msgstr "Errore 106" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:136 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:137 msgid "Error 107" msgstr "Errore 107" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:137 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:138 msgid "Error 108" msgstr "Errore 108" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:138 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:139 msgid "Error 109" msgstr "Errore 108" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:139 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:140 msgid "Error 110" msgstr "Errore 110" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:140 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:141 msgid "Error 111" msgstr "Errore 111" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:141 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:142 msgid "Error 112" msgstr "Errore 112" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:142 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:143 msgid "Error 113" msgstr "Errore 113" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:143 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:144 msgid "Error 114" msgstr "Errore 114" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:144 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:145 msgid "Error 115" msgstr "Errore 115" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:145 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:146 msgid "Error 116" msgstr "Errore 116" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:146 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:147 msgid "Error 117" msgstr "Errore 117" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:147 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:148 msgid "Error 118" msgstr "Errore 118" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:148 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:149 msgid "Error 119" msgstr "Errore 119" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:165 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:166 msgid "Error 136" msgstr "Errore 136" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:172 msgid "Error 142" msgstr "Errore 142" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:87 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:88 msgid "Error 58" msgstr "Errore 58" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:88 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:89 msgid "Error 59" msgstr "Errore 59" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:101 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:102 msgid "Error 72" msgstr "Errore 72" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:102 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:103 msgid "Error 73" msgstr "Errore 73" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:104 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:105 msgid "Error 75" msgstr "Errore 75" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:105 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:106 msgid "Error 76" msgstr "Errore 76" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:120 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:121 msgid "Error 91" msgstr "Errore 91" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:121 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:122 msgid "Error 92" msgstr "Errore 92" -#: nis/nis_error.c:56 +#: nis/nis_error.c:57 msgid "Error in RPC subsystem" msgstr "Errore nel sottosistema RPC" -#: nis/nis_error.c:66 +#: nis/nis_error.c:67 msgid "Error in accessing NIS+ cold start file. Is NIS+ installed?" msgstr "" "Errore nell'accesso al file per la partenza a freddo di NIS+.\n" "NIS+ è installato?" -#: string/../sysdeps/mach/_strerror.c:57 -#: sysdeps/mach/hurd/mips/dl-machine.c:67 +#: string/../sysdeps/mach/_strerror.c:58 +#: sysdeps/mach/hurd/mips/dl-machine.c:68 msgid "Error in unknown error system: " msgstr "Errore in un sistema di errore sconosciuto: " -#: nis/nis_error.c:59 +#: nis/nis_error.c:60 msgid "Error while talking to callback proc" msgstr "Errore parlando alla procedura di callback" -#: inet/ruserpass.c:176 +#: inet/ruserpass.c:181 msgid "Error: .netrc file is readable by others." msgstr "Errore: il file .netrc è leggibile da altri." -#: stdio-common/../sysdeps/gnu/errlist.c:728 +#: stdio-common/../sysdeps/gnu/errlist.c:729 msgid "Exchange full" msgstr "Scambio pieno" #. TRANS Invalid executable file format. This condition is detected by the #. TRANS @code{exec} functions; see @ref{Executing a File}. -#: stdio-common/../sysdeps/gnu/errlist.c:75 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:37 +#: stdio-common/../sysdeps/gnu/errlist.c:76 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:38 msgid "Exec format error" msgstr "Errore di formato di exec" -#: locale/programs/localedef.c:187 +#: locale/programs/localedef.c:190 msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'" msgstr "FATALE: il sistema non definisce `_POSIX2_LOCALEDEF'" -#: locale/programs/localedef.c:91 locale/programs/localedef.c:93 -#: locale/programs/localedef.c:95 -msgid "FILE" -msgstr "FILE" - -#: locale/programs/localedef.c:96 +#: locale/programs/localedef.c:97 msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "FILE contiene la mappatura dai nomi simbolici ai valori UCS4" -#: sunrpc/clnt_perr.c:355 +#: sunrpc/clnt_perr.c:356 msgid "Failed (unspecified error)" msgstr "Fallito (errore non specificato)" -#: stdio-common/../sysdeps/gnu/errlist.c:780 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:110 +#: nscd/nscd.c:400 +#, c-format +msgid "Failed to look up user '%s' to run server as" +msgstr "Non è stato possibile trovare l'utente '%s' con cui eseguire il server" + +#: elf/readlib.c:108 +#, c-format +msgid "File %s is too small, not checked." +msgstr "Il file %s è troppo piccolo e non viene controllato." + +#: stdio-common/../sysdeps/gnu/errlist.c:781 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:111 msgid "File descriptor in bad state" msgstr "Il descrittore di file è in uno stato non valido" #. TRANS File exists; an existing file was specified in a context where it only #. TRANS makes sense to specify a new file. -#: stdio-common/../sysdeps/gnu/errlist.c:134 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:46 +#: stdio-common/../sysdeps/gnu/errlist.c:135 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:47 msgid "File exists" msgstr "Il file esiste" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:85 +#: elf/cache.c:124 elf/cache.c:134 +msgid "File is not a cache file.\n" +msgstr "Il file non è un file di cache.\n" + +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:86 msgid "File locking deadlock" msgstr "Deadlock durante il locking del file" -#: stdio-common/../sysdeps/gnu/errlist.c:744 +#: stdio-common/../sysdeps/gnu/errlist.c:745 msgid "File locking deadlock error" msgstr "Errore di deadlock durante il locking del file" #. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for #. TRANS Files}) or host name too long (in @code{gethostname} or #. TRANS @code{sethostname}; @pxref{Host Identification}). -#: stdio-common/../sysdeps/gnu/errlist.c:464 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:107 +#: stdio-common/../sysdeps/gnu/errlist.c:465 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:108 msgid "File name too long" msgstr "Nome del file troppo lungo" -#: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:51 -#: sysdeps/gnu/siglist.h:45 +#: stdio-common/../sysdeps/unix/siglist.c:51 sysdeps/generic/siglist.h:51 msgid "File size limit exceeded" msgstr "Superato il limite di dimensione del file" -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:52 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:53 msgid "File table overflow" msgstr "Overflow della tabella dei file" #. TRANS File too big; the size of a file would be larger than allowed by the system. -#: stdio-common/../sysdeps/gnu/errlist.c:202 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:56 +#: stdio-common/../sysdeps/gnu/errlist.c:203 +#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:57 msgid "File too large" msgstr "File troppo grande" -#: nis/nis_error.c:37 +#: intl/tst-gettext2.c:36 +msgid "First string for testing." +msgstr "Prima stringa di prova." + +#: nis/nis_error.c:38 msgid "First/next chain broken" msgstr "La prima/prossima catena è rotta" -#: stdio-common/../sysdeps/unix/siglist.c:33 sysdeps/generic/siglist.h:35 -#: sysdeps/gnu/siglist.h:29 +#: stdio-common/../sysdeps/unix/siglist.c:34 sysdeps/generic/siglist.h:35 msgid "Floating point exception" msgstr "Errore di virgola mobile" -#: nis/nis_error.c:67 +#: elf/ldconfig.c:136 +msgid "Format to use: new, old or compat (default)" +msgstr "Formato da usare: nuovo, vecchio o compatibile (default)" + +#: nis/nis_error.c:68 msgid "Full resync required for directory" msgstr "È necessario un resync completo per la directory" @@ -1319,20 +1986,24 @@ msgstr "È necessario un resync completo #. TRANS operating system. When you get this error, you can be sure that this #. TRANS particular function will always fail with @code{ENOSYS} unless you #. TRANS install a new version of the C library or the operating system. -#: stdio-common/../sysdeps/gnu/errlist.c:575 +#: stdio-common/../sysdeps/gnu/errlist.c:576 msgid "Function not implemented" msgstr "Funzione non implementata" -#: nis/nis_print.c:114 +#: nis/nis_print.c:115 msgid "GROUP\n" msgstr "GRUPPO\n" -#: argp/argp-help.c:231 +#: argp/argp-help.c:230 #, c-format msgid "Garbage in ARGP_HELP_FMT: %s" msgstr "Spazzatura in ARGP_HELP_FMT: %s" -#: catgets/gencat.c:116 +#: malloc/memusagestat.c:64 +msgid "Generate graphic from memory profiling data" +msgstr "Genera un grafico dei dati di profiling della memoria" + +#: catgets/gencat.c:120 msgid "" "Generate message catalog.\\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n" "is -, output is written to standard output.\n" @@ -1340,51 +2011,58 @@ msgstr "" "Genera un catalogo di messaggi.\\vSe INPUT-FILE è -, l'input è letto dallo standard input. Se OUTPUT-FILE\n" "è -, l'output è scritto sullo standard output.\n" -#: nis/nis_error.c:36 +#: malloc/memusagestat.c:55 +msgid "Generate output linear to time (default is linear to number of function calls)" +msgstr "Genera un output lineare al tempo (predefinito: lineare al numero di chiamate di funzione)" + +#: elf/ldconfig.c:128 +msgid "Generate verbose messages" +msgstr "Genera messaggi prolissi" + +#: nis/nis_error.c:37 msgid "Generic system error" msgstr "Errore di sistema generico" -#: locale/programs/locale.c:75 +#: locale/programs/locale.c:77 msgid "Get locale-specific information." msgstr "Legge le informazioni specifiche alla localizzazione." -#: argp/argp-parse.c:88 +#: argp/argp-parse.c:94 msgid "Give a short usage message" msgstr "Dà un breve messaggio di istruzioni" -#: argp/argp-parse.c:87 +#: argp/argp-parse.c:93 msgid "Give this help list" msgstr "Dà questa lista di aiuto" #. TRANS This error code has no purpose. -#: stdio-common/../sysdeps/gnu/errlist.c:636 +#: stdio-common/../sysdeps/gnu/errlist.c:637 msgid "Gratuitous error" msgstr "Errore gratuito" -#: nis/nis_print.c:319 +#: nis/nis_print.c:320 #, c-format msgid "Group : %s\n" msgstr "Gruppo : %s\n" -#: nis/nis_print.c:248 +#: nis/nis_print.c:249 msgid "Group Flags :" msgstr "Flag del gruppo: " -#: nis/nis_print_group_entry.c:113 +#: nis/nis_print_group_entry.c:115 #, c-format msgid "Group entry for \"%s.%s\" group:\n" msgstr "Voce del gruppo per il gruppo \"%s.%s\":\n" -#: argp/argp-parse.c:91 +#: argp/argp-parse.c:97 msgid "Hang for SECS seconds (default 3600)" msgstr "Si blocca per SECS secondi (predefiniti 3600)" -#: stdio-common/../sysdeps/unix/siglist.c:26 sysdeps/generic/siglist.h:29 -#: sysdeps/gnu/siglist.h:23 +#: stdio-common/../sysdeps/unix/siglist.c:27 sysdeps/generic/siglist.h:29 msgid "Hangup" msgstr "Hangup" -#: nscd/grpcache.c:251 +#: nscd/grpcache.c:253 #, c-format msgid "Haven't found \"%d\" in group cache!" msgstr "Non ho trovato \"%d\" nella cache dei gruppi!" @@ -1394,13 +2072,13 @@ msgstr "Non ho trovato \"%d\" nella cach msgid "Haven't found \"%d\" in password cache!" msgstr "Non ho trovato \"%d\" nella cache delle password!" -#: nscd/grpcache.c:212 +#: nscd/grpcache.c:214 #, c-format msgid "Haven't found \"%s\" in group cache!" msgstr "Non ho trovato \"%s\" nella cache dei gruppi!" -#: nscd/hstcache.c:291 nscd/hstcache.c:333 nscd/hstcache.c:378 -#: nscd/hstcache.c:422 +#: nscd/hstcache.c:299 nscd/hstcache.c:341 nscd/hstcache.c:386 +#: nscd/hstcache.c:430 #, c-format msgid "Haven't found \"%s\" in hosts cache!" msgstr "Non ho trovato \"%s\" nella cache degli host!" @@ -1409,3351 +2087,3 @@ msgstr "Non ho trovato \"%s\" nella cach #, c-format msgid "Haven't found \"%s\" in password cache!" msgstr "Non ho trovato \"%s\" nella cache delle password!" - -#. TRANS The remote host for a requested network connection is down. -#: stdio-common/../sysdeps/gnu/errlist.c:469 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:176 -msgid "Host is down" -msgstr "L'host è giù" - -#: resolv/herror.c:75 -msgid "Host name lookup failure" -msgstr "Errore durante la ricerca del nome dell'host" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:34 -msgid "I/O error" -msgstr "Errore di I/O" - -#: stdio-common/../sysdeps/unix/siglist.c:48 sysdeps/generic/siglist.h:49 -#: sysdeps/gnu/siglist.h:43 -msgid "I/O possible" -msgstr "I/O possibile" - -#: db2/makedb.c:71 -msgid "" -"INPUT-FILE OUTPUT-FILE\n" -"-o OUTPUT-FILE INPUT-FILE\n" -"-u INPUT-FILE" -msgstr "" -"INPUT-FILE OUTPUT-FILE\n" -"-o OUTPUT-FILE INPUT-FILE\n" -"-u INPUT-FILE" - -#: stdio-common/../sysdeps/unix/siglist.c:31 -msgid "IOT trap" -msgstr "trap IOT" - -#: nis/nis_print.c:35 -msgid "IVY" -msgstr "IVY" - -#: stdio-common/../sysdeps/gnu/errlist.c:644 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:65 -msgid "Identifier removed" -msgstr "Identificatore rimosso" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:117 -msgid "Illegal byte sequence" -msgstr "Sequenza di byte illecita" - -#: stdio-common/../sysdeps/unix/siglist.c:29 sysdeps/generic/siglist.h:32 -#: sysdeps/gnu/siglist.h:26 -msgid "Illegal instruction" -msgstr "Istruzione illecita" - -#: nis/nis_error.c:61 -msgid "Illegal object type for operation" -msgstr "Tipo di oggetto illecito per l'operazione" - -#. TRANS Invalid seek operation (such as on a pipe). -#: stdio-common/../sysdeps/gnu/errlist.c:213 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:58 -msgid "Illegal seek" -msgstr "Seek illecito" - -#. TRANS Inappropriate file type or format. The file was the wrong type for the -#. TRANS operation, or a data file had the wrong format. -#. TRANS -#. TRANS On some systems @code{chmod} returns this error if you try to set the -#. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}. -#: stdio-common/../sysdeps/gnu/errlist.c:556 -msgid "Inappropriate file type or format" -msgstr "Tipo di file o formato non appropriato" - -#. TRANS Inappropriate I/O control operation, such as trying to set terminal -#. TRANS modes on an ordinary file. -#: stdio-common/../sysdeps/gnu/errlist.c:188 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:54 -msgid "Inappropriate ioctl for device" -msgstr "IOCTL non appropriata per il dispositivo" - -#. TRANS In the GNU system, servers supporting the @code{term} protocol return -#. TRANS this error for certain operations when the caller is not in the -#. TRANS foreground process group of the terminal. Users do not usually see this -#. TRANS error because functions such as @code{read} and @code{write} translate -#. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control}, -#. TRANS for information on process groups and these signals. -#: stdio-common/../sysdeps/gnu/errlist.c:607 -msgid "Inappropriate operation for background process" -msgstr "Operazione non appropriata per un processo sullo sfondo" - -#: sysdeps/generic/siglist.h:69 sysdeps/gnu/siglist.h:63 -msgid "Information request" -msgstr "Richiesta di informazioni" - -#: iconv/iconv_prog.c:57 -msgid "Information:" -msgstr "Informazioni: " - -#: locale/programs/localedef.c:90 -msgid "Input Files:" -msgstr "File di input:" - -#: iconv/iconv_prog.c:54 -msgid "Input/Output format specification:" -msgstr "Specifiche del formato di input/output:" - -#. TRANS Input/output error; usually used for physical read or write errors. -#: stdio-common/../sysdeps/gnu/errlist.c:52 -msgid "Input/output error" -msgstr "Errore di input/output" - -#: nis/ypclnt.c:785 -msgid "Internal NIS error" -msgstr "Errore interno di NIS" - -#: nis/ypclnt.c:849 -msgid "Internal ypbind error" -msgstr "Errore interno di ypbind" - -#: stdio-common/../sysdeps/unix/siglist.c:27 sysdeps/generic/siglist.h:30 -#: sysdeps/gnu/siglist.h:24 -msgid "Interrupt" -msgstr "Interruzione" - -#. TRANS Interrupted function call; an asynchronous signal occurred and prevented -#. TRANS completion of the call. When this happens, you should try the call -#. TRANS again. -#. TRANS -#. TRANS You can choose to have functions resume after a signal that is handled, -#. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted -#. TRANS Primitives}. -#: stdio-common/../sysdeps/gnu/errlist.c:47 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:33 -msgid "Interrupted system call" -msgstr "Chiamata di sistema interrotta" - -#: stdio-common/../sysdeps/gnu/errlist.c:684 -msgid "Interrupted system call should be restarted" -msgstr "La chiamata di sistema interrotta deve essere ricominciata" - -#. TRANS Invalid argument. This is used to indicate various kinds of problems -#. TRANS with passing the wrong argument to a library function. -#: stdio-common/../sysdeps/gnu/errlist.c:164 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:51 -msgid "Invalid argument" -msgstr "Argomento non valido" - -#: posix/regex.c:1034 -msgid "Invalid back reference" -msgstr "Riferimento all'indietro non valido" - -#: posix/regex.c:1028 -msgid "Invalid character class name" -msgstr "Nome della classe di caratteri non valido" - -#: sunrpc/clnt_perr.c:331 -msgid "Invalid client credential" -msgstr "Credenziali del client non valide" - -#: sunrpc/clnt_perr.c:339 -msgid "Invalid client verifier" -msgstr "Verificatore del client non valido" - -#: posix/regex.c:1025 -msgid "Invalid collation character" -msgstr "Carattere di collazione non valido" - -#: posix/regex.c:1046 -msgid "Invalid content of \\{\\}" -msgstr "Contenuto di \\{\\} non valido" - -#. TRANS An attempt to make an improper link across file systems was detected. -#. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but -#. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}). -#: stdio-common/../sysdeps/gnu/errlist.c:141 -msgid "Invalid cross-device link" -msgstr "Link tra dispositivi non valido" - -#: stdio-common/../sysdeps/gnu/errlist.c:720 -msgid "Invalid exchange" -msgstr "Scambio non valido" - -#: nis/nis_error.c:44 -msgid "Invalid object for operation" -msgstr "Oggetto non valido per l'operazione" - -#. TRANS While decoding a multibyte character the function came along an invalid -#. TRANS or an incomplete sequence of bytes or the given wide character is invalid. -#: stdio-common/../sysdeps/gnu/errlist.c:597 -msgid "Invalid or incomplete multibyte or wide character" -msgstr "Carattere largo o multibyte non valido o incompleto" - -#: posix/regex.c:1055 -msgid "Invalid preceding regular expression" -msgstr "Espressione regolare precedente non valida" - -#: posix/regex.c:1049 -msgid "Invalid range end" -msgstr "Fine dell'intervallo non valida" - -#: posix/regex.c:1022 -msgid "Invalid regular expression" -msgstr "Espressione regolare non valida" - -#: stdio-common/../sysdeps/gnu/errlist.c:736 -msgid "Invalid request code" -msgstr "Codice di richiesta non valido" - -#: stdio-common/../sysdeps/gnu/errlist.c:724 -msgid "Invalid request descriptor" -msgstr "Descrittore di richiesta non valido" - -#: sunrpc/clnt_perr.c:351 -msgid "Invalid server verifier" -msgstr "Verificatore di server non valido" - -#: stdio-common/../sysdeps/gnu/errlist.c:740 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:84 -msgid "Invalid slot" -msgstr "Slot non valido" - -#: nscd/nscd.c:88 -msgid "Invalidate the specified cache" -msgstr "Invalida la cache indicata" - -#. TRANS File is a directory; you cannot open a directory for writing, -#. TRANS or create or remove hard links to it. -#: stdio-common/../sysdeps/gnu/errlist.c:158 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:50 -msgid "Is a directory" -msgstr "È una directory" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:168 -msgid "Is a name file" -msgstr "È un file con nome" - -#: stdio-common/../sysdeps/gnu/errlist.c:824 -msgid "Is a named type file" -msgstr "È un tipo di file con nome" - -#: nis/nis_print.c:187 -msgid "Kerberos.\n" -msgstr "Kerberos.\n" - -#: stdio-common/../sysdeps/unix/siglist.c:34 sysdeps/generic/siglist.h:36 -#: sysdeps/gnu/siglist.h:30 -msgid "Killed" -msgstr "Ucciso" - -#: nis/nis_print.c:123 -msgid "LINK\n" -msgstr "LINK\n" - -#: nis/nis_local_names.c:125 -#, c-format -msgid "LOCAL entry for UID %d in directory %s not unique\n" -msgstr "La voce LOCAL per l'UID %d nella directory %s non è unica\n" - -#: stdio-common/../sysdeps/gnu/errlist.c:716 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:73 -msgid "Level 2 halted" -msgstr "Livello 2 fermato" - -#: stdio-common/../sysdeps/gnu/errlist.c:692 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 -msgid "Level 2 not synchronized" -msgstr "Livello 2 non sincronizzato" - -#: stdio-common/../sysdeps/gnu/errlist.c:696 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:68 -msgid "Level 3 halted" -msgstr "Livello 3 fermato" - -#: stdio-common/../sysdeps/gnu/errlist.c:700 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:69 -msgid "Level 3 reset" -msgstr "Livello 3 reinizializzato" - -#: stdio-common/../sysdeps/gnu/errlist.c:656 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:96 -msgid "Link has been severed" -msgstr "Il link è stato tagliato" - -#: stdio-common/../sysdeps/gnu/errlist.c:704 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:70 -msgid "Link number out of range" -msgstr "Numero del link fuori dall'intervallo" - -#: nis/nis_error.c:53 -msgid "Link points to illegal name" -msgstr "Il link punta a un nome illecito" - -#: nis/nis_print.c:282 -msgid "Linked Object Type : " -msgstr "Tipo di oggetto collegato : " - -#: nis/nis_print.c:284 -#, c-format -msgid "Linked to : %s\n" -msgstr "Collegato a : %s\n" - -#: nis/ypclnt.c:797 -msgid "Local domain name not set" -msgstr "Il nome del dominio locale non è stato impostato" - -#: nis/ypclnt.c:787 -msgid "Local resource allocation failure" -msgstr "Errore di allocazione delle risorse locali" - -#: stdio-common/../sysdeps/gnu/errlist.c:752 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:93 -msgid "Machine is not on the network" -msgstr "La macchina non è in rete" - -#: nis/nis_error.c:45 -msgid "Malformed name, or illegal name" -msgstr "Nome malformato o illecito" - -#: argp/argp-help.c:1186 -msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." -msgstr "" -"Gli argomenti obbligatori o opzionali delle opzioni lunghe lo sono anche\n" -"per le corrispondenti opzioni corte." - -#: nis/nis_print.c:168 -msgid "Master Server :\n" -msgstr "Master Server :\n" - -#: nis/nis_error.c:75 -msgid "Master server busy, full dump rescheduled." -msgstr "Il master server è occupato, dump integrale rimandato." - -#: posix/../sysdeps/posix/gai_strerror.c:35 -msgid "Memory allocation failure" -msgstr "Errore di allocazione della memoria" - -#: posix/regex.c:1052 -msgid "Memory exhausted" -msgstr "Memoria esaurita" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:81 -msgid "Message tables full" -msgstr "Tabelle dei messaggi piene" - -#. TRANS The size of a message sent on a socket was larger than the supported -#. TRANS maximum size. -#: stdio-common/../sysdeps/gnu/errlist.c:317 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:126 -msgid "Message too long" -msgstr "Messaggio troppo lungo" - -#: nis/nis_error.c:57 -msgid "Missing or malformed attribute" -msgstr "Attributo mancante o malformato" - -#: nis/nis_print.c:327 -#, c-format -msgid "Mod. Time : %s" -msgstr "Orario di modifica: %s" - -#: nis/nis_error.c:50 -msgid "Modification failed" -msgstr "Modifica fallita" - -#: nis/nis_error.c:63 -msgid "Modify operation failed" -msgstr "Operazione di modifica fallita" - -#: locale/programs/locale.c:68 -msgid "Modify output format:" -msgstr "Modifica il formato di output:" - -#: stdio-common/../sysdeps/gnu/errlist.c:648 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:103 -msgid "Multihop attempted" -msgstr "Tentato un multihop" - -#: catgets/gencat.c:107 catgets/gencat.c:111 db2/makedb.c:59 -#: locale/programs/localedef.c:112 nscd/nscd.c:80 -msgid "NAME" -msgstr "NOME" - -#: locale/programs/locale.c:78 -msgid "" -"NAME\n" -"[-a|-m]" -msgstr "" -"NOME\n" -"[-a|-m]" - -#: nis/nis_print.c:31 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:801 -msgid "NIS client/server version mismatch - can't supply service" -msgstr "versioni di client/server NIS incompatibili - non si può fornire il servizio" - -#: nis/ypclnt.c:799 -msgid "NIS map database is bad" -msgstr "Il database della mappa NIS non è valido" - -#: nis/nis_error.c:68 -msgid "NIS+ operation failed" -msgstr "Operazione NIS+ fallita" - -#: nis/nis_error.c:33 -msgid "NIS+ servers unreachable" -msgstr "Server NIS+ non raggiungibile" - -#: nis/nis_error.c:69 -msgid "NIS+ service is unavailable or not installed" -msgstr "Il servizio NIS+ non è disponibile o non è installato" - -#: nis/nis_print.c:108 -msgid "NO OBJECT\n" -msgstr "OGGETTO MANCANTE\n" - -#: nscd/nscd.c:84 -msgid "NUMBER" -msgstr "NUMERO" - -#: nis/nis_print.c:162 -#, c-format -msgid "Name : `%s'\n" -msgstr "Nome : `%s'\n" - -#: nscd/nscd.c:94 -msgid "Name Service Cache Daemon." -msgstr "Demone di caching del servizio dei nomi." - -#: nis/nis_error.c:40 -msgid "Name not served by this server" -msgstr "Nome non servito da questo server" - -#: stdio-common/../sysdeps/gnu/errlist.c:776 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:109 -msgid "Name not unique on network" -msgstr "Il nome non è unico sulla rete" - -#: posix/../sysdeps/posix/gai_strerror.c:37 -msgid "Name or service not known" -msgstr "Nome o servizio sconosciuto" - -#: nis/nis_error.c:49 -msgid "Name/entry isn't unique" -msgstr "Il nome/voce non è unico" - -#: nis/nis_error.c:58 -msgid "Named object is not searchable" -msgstr "L'oggetto indicato non è ricercabile" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:566 -msgid "Need authenticator" -msgstr "Serve un autenticatore" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:158 -msgid "Network dropped connection because of reset" -msgstr "La rete ha lasciato cadere la connessione per il reset" - -#. TRANS A network connection was reset because the remote host crashed. -#: stdio-common/../sysdeps/gnu/errlist.c:389 -msgid "Network dropped connection on reset" -msgstr "La rete ha lasciato cadere la connessione per il reset" - -#. TRANS A socket operation failed because the network was down. -#: stdio-common/../sysdeps/gnu/errlist.c:378 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:156 -msgid "Network is down" -msgstr "La rete è giù" - -#. TRANS A socket operation failed because the subnet containing the remote host -#. TRANS was unreachable. -#: stdio-common/../sysdeps/gnu/errlist.c:384 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:157 -msgid "Network is unreachable" -msgstr "La rete non è raggiungibile" - -#: stdio-common/../sysdeps/gnu/errlist.c:712 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:72 -msgid "No CSI structure available" -msgstr "La struttura CSI non è disponibile" - -#: stdio-common/../sysdeps/gnu/errlist.c:820 -msgid "No XENIX semaphores available" -msgstr "Non ci sono semafori XENIX disponibili" - -#: posix/../sysdeps/posix/gai_strerror.c:36 -msgid "No address associated with hostname" -msgstr "Non ci sono indirizzi associati al nome dell'host" - -#: resolv/herror.c:77 -msgid "No address associated with name" -msgstr "Non ci sono indirizzi associati al nome" - -#: stdio-common/../sysdeps/gnu/errlist.c:732 -msgid "No anode" -msgstr "Manca l'anode" - -#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this -#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the -#. TRANS other from network operations. -#: stdio-common/../sysdeps/gnu/errlist.c:408 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:161 -msgid "No buffer space available" -msgstr "Non c'è spazio di buffer disponibile" - -#. TRANS There are no child processes. This error happens on operations that are -#. TRANS supposed to manipulate child processes, when there aren't any processes -#. TRANS to manipulate. -#: stdio-common/../sysdeps/gnu/errlist.c:89 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:39 -msgid "No child processes" -msgstr "Non ci sono processi figli" - -#: stdio-common/../sysdeps/gnu/errlist.c:652 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:90 -msgid "No data available" -msgstr "Non ci sono dati disponibili" - -#: nis/nis_error.c:73 -msgid "No file space on server" -msgstr "Non c'è spazio per file sul server" - -#. TRANS No locks available. This is used by the file locking facilities; see -#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but -#. TRANS it can result from an operation to an NFS server running another -#. TRANS operating system. -#: stdio-common/../sysdeps/gnu/errlist.c:547 -msgid "No locks available" -msgstr "Non ci sono lock disponibili" - -#: posix/regex.c:1019 -msgid "No match" -msgstr "Nessuna corrispondenza" - -#: stdio-common/../sysdeps/gnu/errlist.c:832 -msgid "No medium found" -msgstr "Non è stato trovato un medium" - -#: stdio-common/../sysdeps/gnu/errlist.c:660 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:64 -msgid "No message of desired type" -msgstr "Non ci sono messaggi del tipo desiderato" - -#: nis/ypclnt.c:789 -msgid "No more records in map database" -msgstr "Non ci sono altri record nel database della mappa" - -#: posix/regex.c:5569 -msgid "No previous regular expression" -msgstr "Manca una precedente espressione regolare" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:75 -msgid "No record locks available" -msgstr "Non ci sono lock di record disponibili" - -#: sunrpc/rpcinfo.c:570 -msgid "No remote programs registered.\n" -msgstr "Nessun programma remoto registrato.\n" - -#. TRANS The remote host for a requested network connection is not reachable. -#: stdio-common/../sysdeps/gnu/errlist.c:474 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:177 -msgid "No route to host" -msgstr "Non c'è una route verso l'host" - -#. TRANS No space left on device; write operation on a file failed because the -#. TRANS disk is full. -#: stdio-common/../sysdeps/gnu/errlist.c:208 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:57 -msgid "No space left on device" -msgstr "Non è rimasto spazio sul dispositivo" - -#. TRANS The wrong type of device was given to a function that expects a -#. TRANS particular sort of device. -#: stdio-common/../sysdeps/gnu/errlist.c:147 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:48 -msgid "No such device" -msgstr "Dispositivo inesistente" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:35 -msgid "No such device or address" -msgstr "Dispositivo o indirizzo inesistente" - -#. TRANS No such file or directory. This is a ``file doesn't exist'' error -#. TRANS for ordinary files that are referenced in contexts where they are -#. TRANS expected to already exist. -#: stdio-common/../sysdeps/gnu/errlist.c:31 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:31 -msgid "No such file or directory" -msgstr "File o directory inesistente" - -#: nis/ypclnt.c:783 -msgid "No such key in map" -msgstr "La chiave non è nella mappa" - -#: nis/ypclnt.c:781 -msgid "No such map in server's domain" -msgstr "La mappa non è nel dominio del server" - -#. TRANS No process matches the specified process ID. -#: stdio-common/../sysdeps/gnu/errlist.c:36 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:32 -msgid "No such process" -msgstr "Processo inesistente" - -#: nis/nis_error.c:60 -msgid "Non NIS+ namespace encountered" -msgstr "Incontrato un namespace non di NIS+" - -#: posix/../sysdeps/posix/gai_strerror.c:33 -msgid "Non-recoverable failure in name resolution" -msgstr "Errore irreparabile nella risoluzione dei nomi" - -#: nis/nis_print.c:176 -msgid "None.\n" -msgstr "Nessuno.\n" - -#: stdio-common/../sysdeps/gnu/errlist.c:816 -msgid "Not a XENIX named type file" -msgstr "Non è un file con nome di XENIX" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:106 -msgid "Not a data message" -msgstr "Non è un messaggio di dati" - -#. TRANS A file that isn't a directory was specified when a directory is required. -#: stdio-common/../sysdeps/gnu/errlist.c:152 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:49 -msgid "Not a directory" -msgstr "Non è una directory" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:166 -msgid "Not a name file" -msgstr "Non è un file con nome" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:89 -msgid "Not a stream device" -msgstr "Non è un dispositivo stream" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:167 -msgid "Not available" -msgstr "Non disponibile" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:41 -msgid "Not enough space" -msgstr "Non c'è abbastanza spazio" - -#: nis/nis_error.c:30 -msgid "Not found" -msgstr "Non trovato" - -#: nis/nis_error.c:48 -msgid "Not found, no such name" -msgstr "Non trovato, nome inesistente" - -#: nis/nis_error.c:43 -msgid "Not master server for this domain" -msgstr "Non è un server master per questo dominio" - -#: nis/nis_error.c:39 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:30 -msgid "Not owner" -msgstr "Non è il proprietario" - -#. TRANS Not supported. A function returns this error when certain parameter -#. TRANS values are valid, but the functionality they request is not available. -#. TRANS This can mean that the function does not implement a particular command -#. TRANS or option value or flag bit at all. For functions that operate on some -#. TRANS object given in a parameter, such as a file descriptor or a port, it -#. TRANS might instead mean that only @emph{that specific object} (file -#. TRANS descriptor, port, etc.) is unable to support the other parameters given; -#. TRANS different file descriptors might support different ranges of parameter -#. TRANS values. -#. TRANS -#. TRANS If the entire function is not available at all in the implementation, -#. TRANS it returns @code{ENOSYS} instead. -#: stdio-common/../sysdeps/gnu/errlist.c:591 -msgid "Not supported" -msgstr "Non gestito" - -#: nis/nis_print.c:263 -#, c-format -msgid "Number of Columns : %d\n" -msgstr "Numero di Colonne : %d\n" - -#: nis/nis_print.c:362 -#, c-format -msgid "Number of objects : %u\n" -msgstr "Numero di oggetti : %u\n" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:119 -msgid "Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS" -msgstr "Il numero di link simbolici incontrati durante l'attraversamento del percorso eccede MAXSYMLINKS" - -#. TRANS Domain error; used by mathematical functions when an argument value does -#. TRANS not fall into the domain over which the function is defined. -#: stdio-common/../sysdeps/gnu/errlist.c:240 -msgid "Numerical argument out of domain" -msgstr "Argomento numerico fuori dal dominio" - -#. TRANS Range error; used by mathematical functions when the result value is -#. TRANS not representable because of overflow or underflow. -#: stdio-common/../sysdeps/gnu/errlist.c:246 -msgid "Numerical result out of range" -msgstr "Risultato numerico fuori scala" - -#: nis/nis_print.c:366 -#, c-format -msgid "Object #%d:\n" -msgstr "Oggetto #%d:\n" - -#: nis/nis_print.c:316 -#, c-format -msgid "Object Name : %s\n" -msgstr "Nome dell'oggetto: %s\n" - -#: nis/nis_print.c:328 -msgid "Object Type : " -msgstr "Tipo dell'oggetto: " - -#. TRANS An attempt was made to NFS-mount a remote file system with a file name that -#. TRANS already specifies an NFS-mounted file. -#. TRANS (This is an error on some operating systems, but we expect it to work -#. TRANS properly on the GNU system, making this error code impossible.) -#: stdio-common/../sysdeps/gnu/errlist.c:514 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:95 -msgid "Object is remote" -msgstr "L'oggetto è remoto" - -#: nis/nis_error.c:42 -msgid "Object with same name exists" -msgstr "Esiste un oggetto con lo stesso nome" - -#: timezone/zic.c:2023 -msgid "Odd number of quotation marks" -msgstr "Numero dispari di virgolette" - -#: nscd/nscd.c:191 nscd/nscd.c:211 nscd/nscd.c:217 -msgid "Only root is allowed to use this option!" -msgstr "Solo root puo` usare questa opzione!" - -#. TRANS An operation is already in progress on an object that has non-blocking -#. TRANS mode selected. -#: stdio-common/../sysdeps/gnu/errlist.c:306 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:178 -msgid "Operation already in progress" -msgstr "Operazione già in corso" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:76 -msgid "Operation canceled" -msgstr "Operazione cancellata" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:118 -msgid "Operation not applicable" -msgstr "Operazione non applicabile" - -#. TRANS Operation not permitted; only the owner of the file (or other resource) -#. TRANS or processes with special privileges can perform the operation. -#: stdio-common/../sysdeps/gnu/errlist.c:24 -msgid "Operation not permitted" -msgstr "Operazione non permessa" - -#. TRANS The operation you requested is not supported. Some socket functions -#. TRANS don't make sense for all types of sockets, and others may not be -#. TRANS implemented for all communications protocols. In the GNU system, this -#. TRANS error can happen for many calls when the object does not support the -#. TRANS particular operation; it is a generic indication that the server knows -#. TRANS nothing to do for that call. -#: stdio-common/../sysdeps/gnu/errlist.c:350 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:77 -msgid "Operation not supported" -msgstr "Operazione non gestita" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:151 -msgid "Operation not supported on transport endpoint" -msgstr "Operazione non gestita dall'estremità del trasporto" - -#. TRANS An operation that cannot complete immediately was initiated on an object -#. TRANS that has non-blocking mode selected. Some functions that must always -#. TRANS block (such as @code{connect}; @pxref{Connecting}) never return -#. TRANS @code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that -#. TRANS the operation has begun and will take some time. Attempts to manipulate -#. TRANS the object before the call completes return @code{EALREADY}. You can -#. TRANS use the @code{select} function to find out when the pending operation -#. TRANS has completed; @pxref{Waiting for I/O}. -#: stdio-common/../sysdeps/gnu/errlist.c:300 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:179 -msgid "Operation now in progress" -msgstr "L'operazione ora è in corso" - -#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above). -#. TRANS The values are always the same, on every operating system. -#. TRANS -#. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a -#. TRANS separate error code. -#: stdio-common/../sysdeps/gnu/errlist.c:288 -msgid "Operation would block" -msgstr "L'operazione si bloccherebbe" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:128 -msgid "Option not supported by protocol" -msgstr "Opzione non gestita dal protocollo" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:92 -msgid "Out of stream resources" -msgstr "Risorse degli streams esaurite" - -#: stdio-common/../sysdeps/gnu/errlist.c:664 -msgid "Out of streams resources" -msgstr "Risorse degli streams esaurite" - -#: iconv/iconv_prog.c:59 locale/programs/localedef.c:98 -msgid "Output control:" -msgstr "Controllo dell'output:" - -#: elf/sprof.c:72 -msgid "Output selection:" -msgstr "Selezione dell'output:" - -#: nis/nis_print.c:318 -#, c-format -msgid "Owner : %s\n" -msgstr "Proprietario : %s\n" - -#: nis/nis_print.c:126 -msgid "PRIVATE\n" -msgstr "PRIVATO\n" - -#: stdio-common/../sysdeps/gnu/errlist.c:756 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:94 -msgid "Package not installed" -msgstr "Pacchetto non installato" - -#: nscd/nscd_conf.c:82 -#, c-format -msgid "Parse error: %s" -msgstr "Errore di parsing: %s" - -#: nis/nis_error.c:54 -msgid "Partial success" -msgstr "Successo parziale" - -#: nis/nis_error.c:62 -msgid "Passed object is not the same object on server" -msgstr "L'oggetto passato non è lo stesso oggetto sul server" - -#. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:38 nis/ypclnt.c:803 -#: stdio-common/../sysdeps/gnu/errlist.c:108 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:42 -msgid "Permission denied" -msgstr "Permesso negato" - -#: sysdeps/generic/siglist.h:71 sysdeps/gnu/siglist.h:65 -msgid "Power failure" -msgstr "Manca la corrente" - -#: posix/regex.c:1058 -msgid "Premature end of regular expression" -msgstr "Fine prematura dell'espressione regolare" - -#: db2/makedb.c:63 -msgid "Print content of database file, one entry a line" -msgstr "Stampa il contenuto del file del database, una voce per riga" - -#: nscd/nscd.c:86 -msgid "Print current configuration statistic" -msgstr "Stampa le statistiche della configurazione attuale" - -#: locale/programs/localedef.c:104 -msgid "Print more messages" -msgstr "Stampa altri messaggi" - -#: argp/argp-parse.c:148 -msgid "Print program version" -msgstr "Stampa la versione del programma" - -#: nis/nis_error.c:29 -msgid "Probable success" -msgstr "Probabile successo" - -#: nis/nis_error.c:31 -msgid "Probably not found" -msgstr "Probabilmente non trovato" - -#: stdio-common/../sysdeps/unix/siglist.c:52 sysdeps/generic/siglist.h:53 -#: sysdeps/gnu/siglist.h:47 -msgid "Profiling timer expired" -msgstr "Timer di profiling scaduto" - -#: stdio-common/../sysdeps/gnu/errlist.c:708 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:71 -msgid "Protocol driver not attached" -msgstr "Driver del protocollo non collegato" - -#: stdio-common/../sysdeps/gnu/errlist.c:676 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:100 -msgid "Protocol error" -msgstr "Errore di protocollo" - -#. TRANS The socket communications protocol family you requested is not supported. -#: stdio-common/../sysdeps/gnu/errlist.c:355 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:152 -msgid "Protocol family not supported" -msgstr "Famiglia del protocollo non gestita" - -#. TRANS You specified a socket option that doesn't make sense for the -#. TRANS particular protocol being used by the socket. @xref{Socket Options}. -#: stdio-common/../sysdeps/gnu/errlist.c:328 -msgid "Protocol not available" -msgstr "Protocollo non disponibile" - -#. TRANS The socket domain does not support the requested communications protocol -#. TRANS (perhaps because the requested protocol is completely invalid). -#. TRANS @xref{Creating a Socket}. -#: stdio-common/../sysdeps/gnu/errlist.c:335 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:149 -msgid "Protocol not supported" -msgstr "Protocollo non gestito" - -#. TRANS The socket type does not support the requested communications protocol. -#: stdio-common/../sysdeps/gnu/errlist.c:322 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:127 -msgid "Protocol wrong type for socket" -msgstr "Tipo di protocollo sbagliato per il socket" - -#: nis/nis_error.c:64 -msgid "Query illegal for named table" -msgstr "Query illecita per la tabella indicata" - -#: stdio-common/../sysdeps/unix/siglist.c:28 sysdeps/generic/siglist.h:31 -#: sysdeps/gnu/siglist.h:25 -msgid "Quit" -msgstr "Quit" - -#: stdio-common/../sysdeps/gnu/errlist.c:772 -msgid "RFS specific error" -msgstr "Errore specifico di RFS" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:539 -msgid "RPC bad procedure for program" -msgstr "Procedura RPC non valida per il programma" - -#: nis/ypclnt.c:777 -msgid "RPC failure on NIS operation" -msgstr "Errore di RPC su una operazione NIS" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:529 -msgid "RPC program not available" -msgstr "Programma RPC non disponibile" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:534 -msgid "RPC program version wrong" -msgstr "Versione sbagliata del programma RPC" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:519 -msgid "RPC struct is bad" -msgstr "La struct RPC non è valida" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:524 -msgid "RPC version wrong" -msgstr "Versione di RPC sbagliata" - -#: sunrpc/clnt_perr.c:270 -msgid "RPC: (unknown error code)" -msgstr "RPC: (codice di errore sconosciuto)" - -#: sunrpc/clnt_perr.c:189 -msgid "RPC: Authentication error" -msgstr "RPC: Errore di autenticazione" - -#: sunrpc/clnt_perr.c:169 -msgid "RPC: Can't decode result" -msgstr "RPC: Impossibile decodificare il risultato" - -#: sunrpc/clnt_perr.c:165 -msgid "RPC: Can't encode arguments" -msgstr "RPC: Impossibile codificare gli argomenti" - -#: sunrpc/clnt_perr.c:229 -msgid "RPC: Failed (unspecified error)" -msgstr "RPC: Fallito (errore non specificato)" - -#: sunrpc/clnt_perr.c:185 -msgid "RPC: Incompatible versions of RPC" -msgstr "RPC: Versioni di RPC incompatibili" - -#: sunrpc/clnt_perr.c:221 -msgid "RPC: Port mapper failure" -msgstr "RPC: Errore del portmapper" - -#: sunrpc/clnt_perr.c:201 -msgid "RPC: Procedure unavailable" -msgstr "RPC: Procedura non disponibile" - -#: sunrpc/clnt_perr.c:225 -msgid "RPC: Program not registered" -msgstr "RPC: Programma non registrato" - -#: sunrpc/clnt_perr.c:193 -msgid "RPC: Program unavailable" -msgstr "RPC: Programma non disponibile" - -#: sunrpc/clnt_perr.c:197 -msgid "RPC: Program/version mismatch" -msgstr "RPC: Programma/versione non corrispondenti" - -#: sunrpc/clnt_perr.c:209 -msgid "RPC: Remote system error" -msgstr "RPC: Errore del sistema remoto" - -#: sunrpc/clnt_perr.c:205 -msgid "RPC: Server can't decode arguments" -msgstr "RPC: Il server non può decodificare gli argomenti" - -#: sunrpc/clnt_perr.c:162 -msgid "RPC: Success" -msgstr "RPC: Successo" - -#: sunrpc/clnt_perr.c:181 -msgid "RPC: Timed out" -msgstr "RPC: Tempo scaduto" - -#: sunrpc/clnt_perr.c:177 -msgid "RPC: Unable to receive" -msgstr "RPC: Impossibile ricevere" - -#: sunrpc/clnt_perr.c:173 -msgid "RPC: Unable to send" -msgstr "RPC: Impossibile inviare" - -#: sunrpc/clnt_perr.c:213 -msgid "RPC: Unknown host" -msgstr "RPC: Host sconosciuto" - -#: sunrpc/clnt_perr.c:217 -msgid "RPC: Unknown protocol" -msgstr "RPC: Protocollo sconosciuto" - -#: nis/nis_print.c:184 -#, c-format -msgid "RSA (%d bits)\n" -msgstr "RSA (%d bit)\n" - -#: elf/dlsym.c:59 elf/dlvsym.c:62 -msgid "RTLD_NEXT used in code not dynamically loaded" -msgstr "RTLD_NEXT usato in codice non caricato dinamicamente" - -#: elf/sprof.c:84 -msgid "Read and display shared object profiling data" -msgstr "Legge e mostra i dati di profilazione degli oggetti condivisi" - -#: nscd/nscd.c:81 -msgid "Read configuration data from NAME" -msgstr "Legge i dati di configurazione da NOME" - -#. TRANS An attempt was made to modify something on a read-only file system. -#: stdio-common/../sysdeps/gnu/errlist.c:218 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:59 -msgid "Read-only file system" -msgstr "File system di sola lettura" - -#: string/strsignal.c:66 -#, c-format -msgid "Real-time signal %d" -msgstr "Segnale real-time %d" - -#: posix/regex.c:1061 -msgid "Regular expression too big" -msgstr "Espressione regolare troppo grande" - -#: stdio-common/../sysdeps/gnu/errlist.c:828 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:169 -msgid "Remote I/O error" -msgstr "Errore di I/O remoto" - -#: stdio-common/../sysdeps/gnu/errlist.c:784 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:111 -msgid "Remote address changed" -msgstr "È cambiato l'indirizzo del remoto" - -#: inet/ruserpass.c:177 -msgid "Remove password or make file unreadable by others." -msgstr "Rimuovere la password o rendere il file illeggibile dagli altri." - -#: elf/sprof.c:533 -#, c-format -msgid "Reopening shared object `%s' failed" -msgstr "Fallita la riapertura dell'oggetto condiviso `%s'" - -#: nis/nis_print.c:170 -msgid "Replicate :\n" -msgstr "Replica :\n" - -#: argp/argp-help.c:1640 -#, c-format -msgid "Report bugs to %s.\n" -msgstr "Segnalare i bug a %s.\n" - -#: catgets/gencat.c:224 db2/makedb.c:229 iconv/iconv_prog.c:280 -#: locale/programs/locale.c:254 locale/programs/localedef.c:386 -msgid "Report bugs using the `glibcbug' script to .\n" -msgstr "Segnalare i bug a usando lo script `glibcbug'.\n" - -#: nis/ypclnt.c:775 -msgid "Request arguments bad" -msgstr "Argomenti della richiesta non validi" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:170 -msgid "Reserved for future use" -msgstr "Riservato per usi futuri" - -#: resolv/herror.c:73 -msgid "Resolver Error 0 (no error)" -msgstr "Errore 0 del resolver (nessun errore)" - -#: resolv/herror.c:117 -msgid "Resolver internal error" -msgstr "Errore interno del resolver" - -#. TRANS Deadlock avoided; allocating a system resource would have resulted in a -#. TRANS deadlock situation. The system does not guarantee that it will notice -#. TRANS all such situations. This error means you got lucky and the system -#. TRANS noticed; it might just hang. @xref{File Locks}, for an example. -#: stdio-common/../sysdeps/gnu/errlist.c:97 -msgid "Resource deadlock avoided" -msgstr "Evitato un deadlock sulle risorse" - -#: stdio-common/../sysdeps/unix/siglist.c:54 sysdeps/generic/siglist.h:74 -#: sysdeps/gnu/siglist.h:68 -msgid "Resource lost" -msgstr "Risorsa persa" - -#. TRANS Resource temporarily unavailable; the call might work if you try again -#. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN}; -#. TRANS they are always the same in the GNU C library. -#. TRANS -#. TRANS This error can happen in a few different situations: -#. TRANS -#. TRANS @itemize @bullet -#. TRANS @item -#. TRANS An operation that would block was attempted on an object that has -#. TRANS non-blocking mode selected. Trying the same operation again will block -#. TRANS until some external condition makes it possible to read, write, or -#. TRANS connect (whatever the operation). You can use @code{select} to find out -#. TRANS when the operation will be possible; @pxref{Waiting for I/O}. -#. TRANS -#. TRANS @strong{Portability Note:} In many older Unix systems, this condition -#. TRANS was indicated by @code{EWOULDBLOCK}, which was a distinct error code -#. TRANS different from @code{EAGAIN}. To make your program portable, you should -#. TRANS check for both codes and treat them the same. -#. TRANS -#. TRANS @item -#. TRANS A temporary resource shortage made an operation impossible. @code{fork} -#. TRANS can return this error. It indicates that the shortage is expected to -#. TRANS pass, so your program can try the call again later and it may succeed. -#. TRANS It is probably a good idea to delay for a few seconds before trying it -#. TRANS again, to allow time for other processes to release scarce resources. -#. TRANS Such shortages are usually fairly serious and affect the whole system, -#. TRANS so usually an interactive program should report the error to the user -#. TRANS and return to its command loop. -#. TRANS @end itemize -#: stdio-common/../sysdeps/gnu/errlist.c:279 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:40 -msgid "Resource temporarily unavailable" -msgstr "Risorsa temporaneamente non disponibile" - -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:63 -msgid "Result too large" -msgstr "Risultato troppo grande" - -#: nis/nis_error.c:47 -msgid "Results sent to callback proc" -msgstr "Risultati inviati alla procedura di callback" - -#: elf/sprof.c:87 -msgid "SHOBJ [PROFDATA]" -msgstr "SHOBJ [PROFDATA]" - -#: nis/nis_print.c:33 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:265 -#, c-format -msgid "Search Path : %s\n" -msgstr "Percorso di ricerca : %s\n" - -#: stdio-common/../sysdeps/unix/siglist.c:36 sysdeps/generic/siglist.h:38 -#: sysdeps/gnu/siglist.h:32 -msgid "Segmentation fault" -msgstr "Segmentation fault" - -#: nis/nis_error.c:35 -msgid "Server busy, try again" -msgstr "Server occupato, riprovare" - -#: nis/nis_error.c:41 -msgid "Server out of memory" -msgstr "Il server ha esaurito la memoria" - -#: sunrpc/clnt_perr.c:335 -msgid "Server rejected credential" -msgstr "Il server ha rifiutato le credenziali" - -#: sunrpc/clnt_perr.c:343 -msgid "Server rejected verifier" -msgstr "Il server ha rifiutato il verificatore" - -#: posix/../sysdeps/posix/gai_strerror.c:38 -msgid "Servname not supported for ai_socktype" -msgstr "Servname non gestito per ai_socktype" - -#: argp/argp-parse.c:89 -msgid "Set the program name" -msgstr "Imposta il nome del programma" - -#: nscd/nscd.c:85 -msgid "Shut the server down" -msgstr "Disattiva il server" - -#: stdio-common/../sysdeps/unix/siglist.c:25 -msgid "Signal 0" -msgstr "Segnale 0" - -#. TRANS A file that isn't a socket was specified when a socket is required. -#: stdio-common/../sysdeps/gnu/errlist.c:311 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:124 -msgid "Socket operation on non-socket" -msgstr "Operazione per socket su un non socket" - -#. TRANS The socket type is not supported. -#: stdio-common/../sysdeps/gnu/errlist.c:340 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:150 -msgid "Socket type not supported" -msgstr "Tipo di socket non gestito" - -#. TRANS A network connection was aborted locally. -#: stdio-common/../sysdeps/gnu/errlist.c:394 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:159 -msgid "Software caused connection abort" -msgstr "Il programma ha causato la fine della connessione" - -#: sunrpc/rpcinfo.c:658 -msgid "Sorry. You are not root\n" -msgstr "Spiacente, non sei root\n" - -#: locale/programs/localedef.c:94 -msgid "Source definitions are found in FILE" -msgstr "Le definizioni sorgente sono nel FILE" - -#: stdio-common/../sysdeps/gnu/errlist.c:764 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:98 -msgid "Srmount error" -msgstr "Errore di srmount" - -#: sysdeps/generic/siglist.h:66 sysdeps/gnu/siglist.h:60 -msgid "Stack fault" -msgstr "Stack fault" - -#. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS -#. TRANS system which is due to file system rearrangements on the server host. -#. TRANS Repairing this condition usually requires unmounting and remounting -#. TRANS the NFS file system on the local host. -#: stdio-common/../sysdeps/gnu/errlist.c:506 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:180 -msgid "Stale NFS file handle" -msgstr "Vecchio file handle NFS" - -#: nscd/nscd.c:84 -msgid "Start NUMBER threads" -msgstr "Lancia NUMERO thread" - -#: nis/nis_print.c:361 -#, c-format -msgid "Status : %s\n" -msgstr "Stato : %s\n" - -#: stdio-common/../sysdeps/unix/siglist.c:43 sysdeps/generic/siglist.h:44 -#: sysdeps/gnu/siglist.h:38 -msgid "Stopped" -msgstr "Fermato" - -#: stdio-common/../sysdeps/unix/siglist.c:42 sysdeps/generic/siglist.h:43 -#: sysdeps/gnu/siglist.h:37 -msgid "Stopped (signal)" -msgstr "Fermato (segnale)" - -#: stdio-common/../sysdeps/unix/siglist.c:46 sysdeps/generic/siglist.h:47 -#: sysdeps/gnu/siglist.h:41 -msgid "Stopped (tty input)" -msgstr "Fermato (input da tty)" - -#: stdio-common/../sysdeps/unix/siglist.c:47 sysdeps/generic/siglist.h:48 -#: sysdeps/gnu/siglist.h:42 -msgid "Stopped (tty output)" -msgstr "Fermato (output da tty)" - -#: stdio-common/../sysdeps/gnu/errlist.c:808 -msgid "Streams pipe error" -msgstr "Errore di pipe di streams" - -#: stdio-common/../sysdeps/gnu/errlist.c:812 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:164 -msgid "Structure needs cleaning" -msgstr "La struttura ha bisogno di essere pulita" - -#: nis/nis_error.c:28 nis/ypclnt.c:773 nis/ypclnt.c:847 posix/regex.c:1016 -#: stdio-common/../sysdeps/gnu/errlist.c:19 -msgid "Success" -msgstr "Successo" - -#: locale/programs/localedef.c:103 -msgid "Suppress warnings and information messages" -msgstr "Sopprime messaggi di avvertimento e informazione" - -#: locale/programs/localedef.c:92 -msgid "Symbolic character names defined in FILE" -msgstr "Nomi simbolici dei caratteri definiti in FILE" - -#: posix/../sysdeps/posix/gai_strerror.c:40 -msgid "System error" -msgstr "Errore di sistema" - -#: locale/programs/locale.c:63 -msgid "System information:" -msgstr "Informazioni sul sistema:" - -#: nis/ypclnt.c:853 -msgid "System resource allocation failure" -msgstr "Errore di allocazione delle risorse di sistema" - -#: locale/programs/localedef.c:381 -#, c-format -msgid "" -"System's directory for character maps : %s\n" -" repertoire maps: %s\n" -" locale path : %s\n" -"%s" -msgstr "" -"Directory di sistema per le mappe dei caratteri: %s\n" -" repertoire maps : %s\n" -" percorso di localizzazione: %s\n" -"%s" - -#: nscd/nscd.c:87 -msgid "TABLE" -msgstr "TABELLA" - -#: nis/nis_print.c:117 -msgid "TABLE\n" -msgstr "TABELLA\n" - -#: nscd/nscd.c:89 -msgid "TABLE,yes" -msgstr "TABELLA,si" - -#: nis/nis_print.c:262 -#, c-format -msgid "Table Type : %s\n" -msgstr "Tipo di tabella : %s\n" - -#: posix/../sysdeps/posix/gai_strerror.c:31 -msgid "Temporary failure in name resolution" -msgstr "Errore temporaneo durante la risoluzione del nome" - -#: stdio-common/../sysdeps/unix/siglist.c:40 sysdeps/generic/siglist.h:41 -#: sysdeps/gnu/siglist.h:35 -msgid "Terminated" -msgstr "Terminato" - -#. TRANS An attempt to execute a file that is currently open for writing, or -#. TRANS write to a file that is currently being executed. Often using a -#. TRANS debugger to run a program is considered having it open for writing and -#. TRANS will cause this error. (The name stands for ``text file busy''.) This -#. TRANS is not an error in the GNU system; the text is copied as necessary. -#: stdio-common/../sysdeps/gnu/errlist.c:197 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:55 -msgid "Text file busy" -msgstr "File text occupato" - -#: iconv/iconv_prog.c:578 -msgid "" -"The following list contain all the coded character sets known. This does\n" -"not necessarily mean that all combinations of these names can be used for\n" -"the FROM and TO command line parameters. One coded character set can be\n" -"listed with several different names (aliases).\n" -" Some of the names are no plain strings but instead regular expressions and\n" -"they match a variety of names which can be given as parameters to the\n" -"program.\n" -"\n" -" " -msgstr "" -"La seguente lista contiene tutti i set di caratteri codificati noti. Questo\n" -"non significa necessariamente che tutte le combinazioni di questi nomi possono\n" -"essere usate per i parametri di linea di comando FROM e TO. Un set di\n" -"caratteri codificato può essere elencato con diversi nomi diversi (alias).\n" -"Alcuni nomi non sono semplici stringhe ma espressioni regolari e corrispondono\n" -"a una varietà di nomi che possono essere dati come parametri al programma.\n" -"\n" -" " - -#: nis/nis_print.c:223 -msgid "Time to live : " -msgstr "Tempo di vita: " - -#: stdio-common/../sysdeps/gnu/errlist.c:680 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:91 -msgid "Timer expired" -msgstr "Timer scaduto" - -#: nis/nis_error.c:55 -msgid "Too many attributes" -msgstr "Troppi attributi" - -#. TRANS Too many levels of symbolic links were encountered in looking up a file name. -#. TRANS This often indicates a cycle of symbolic links. -#: stdio-common/../sysdeps/gnu/errlist.c:457 -msgid "Too many levels of symbolic links" -msgstr "Troppi livelli di link simbolici" - -#. TRANS Too many links; the link count of a single file would become too large. -#. TRANS @code{rename} can cause this error if the file being renamed already has -#. TRANS as many links as it can take (@pxref{Renaming Files}). -#: stdio-common/../sysdeps/gnu/errlist.c:225 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:60 -msgid "Too many links" -msgstr "Troppi link" - -#. TRANS The current process has too many files open and can't open any more. -#. TRANS Duplicate descriptors do count toward this limit. -#. TRANS -#. TRANS In BSD and GNU, the number of open files is controlled by a resource -#. TRANS limit that can usually be increased. If you get this error, you might -#. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited; -#. TRANS @pxref{Limits on Resources}. -#: stdio-common/../sysdeps/gnu/errlist.c:175 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:53 -msgid "Too many open files" -msgstr "Troppi file aperti" - -#. TRANS There are too many distinct file openings in the entire system. Note -#. TRANS that any number of linked channels count as just one file opening; see -#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system. -#: stdio-common/../sysdeps/gnu/errlist.c:182 -msgid "Too many open files in system" -msgstr "Troppi file aperti nel sistema" - -#. TRANS This means that the per-user limit on new process would be exceeded by -#. TRANS an attempted @code{fork}. @xref{Limits on Resources}, for details on -#. TRANS the @code{RLIMIT_NPROC} limit. -#: stdio-common/../sysdeps/gnu/errlist.c:487 -msgid "Too many processes" -msgstr "Troppi processi" - -#. TRANS ??? -#: stdio-common/../sysdeps/gnu/errlist.c:439 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:173 -msgid "Too many references: cannot splice" -msgstr "Troppi riferimenti: impossibile dividere" - -#. TRANS The file quota system is confused because there are too many users. -#. TRANS @c This can probably happen in a GNU system when using NFS. -#: stdio-common/../sysdeps/gnu/errlist.c:493 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:123 -msgid "Too many users" -msgstr "Troppi utenti" - -#: stdio-common/../sysdeps/unix/siglist.c:30 sysdeps/generic/siglist.h:33 -#: sysdeps/gnu/siglist.h:27 -msgid "Trace/breakpoint trap" -msgstr "Trap di trace/breakpoint" - -#: posix/regex.c:1031 -msgid "Trailing backslash" -msgstr "Backslash finale" - -#. TRANS In the GNU system, opening a file returns this error when the file is -#. TRANS translated by a program and the translator program dies while starting -#. TRANS up, before it has connected to the file. -#: stdio-common/../sysdeps/gnu/errlist.c:614 -msgid "Translator died" -msgstr "Il traduttore è morto" - -#. TRANS You tried to connect a socket that is already connected. -#. TRANS @xref{Connecting}. -#: stdio-common/../sysdeps/gnu/errlist.c:414 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:162 -msgid "Transport endpoint is already connected" -msgstr "Estremità del trasporto già connesso" - -#. TRANS The socket is not connected to anything. You get this error when you -#. TRANS try to transmit data over a socket, without first specifying a -#. TRANS destination for the data. For a connectionless socket (for datagram -#. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead. -#: stdio-common/../sysdeps/gnu/errlist.c:422 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:163 -msgid "Transport endpoint is not connected" -msgstr "Estremità del trasporto non connesso" - -#: argp/argp-help.c:1612 -#, c-format -msgid "Try `%s --help' or `%s --usage' for more information.\n" -msgstr "Usare `%s --help' o `%s --usage' per ulteriori informazioni.\n" - -#: inet/rcmd.c:150 -#, c-format -msgid "Trying %s...\n" -msgstr "Proviamo %s...\n" - -#: nis/nis_print.c:163 -#, c-format -msgid "Type : %s\n" -msgstr "Tipo : %s\n" - -#: nis/nis_print.c:47 -msgid "UNKNOWN" -msgstr "SCONOSCIUTO" - -#: nis/nis_error.c:72 -msgid "Unable to authenticate NIS+ client" -msgstr "Impossibile autenticare il client NIS+" - -#: nis/nis_error.c:71 -msgid "Unable to authenticate NIS+ server" -msgstr "Impossibile autenticare il server NIS+" - -#: nis/nis_error.c:46 -msgid "Unable to create callback" -msgstr "Impossibile creare il callback" - -#: nis/nis_error.c:74 -msgid "Unable to create process on server" -msgstr "Impossibile creare il processo sul server" - -#: nis/nis_print.c:190 -#, c-format -msgid "Unknown (type = %d, bits = %d)\n" -msgstr "Sconosciuto (tipo = %d, bit = %d)\n" - -#: inet/ruserpass.c:263 -#, c-format -msgid "Unknown .netrc keyword %s" -msgstr "Parola chiave di .netrc sconosciuta %s" - -#: nis/ypclnt.c:807 -msgid "Unknown NIS error code" -msgstr "Codice di errore di NIS sconosciuto" - -#: nss/getent.c:512 -#, c-format -msgid "Unknown database: %s\n" -msgstr "Databae sconosciuto: %s\n" - -#: posix/../sysdeps/posix/gai_strerror.c:51 -msgid "Unknown error" -msgstr "Errore sconosciuto" - -#: string/../sysdeps/generic/_strerror.c:48 -#: string/../sysdeps/mach/_strerror.c:87 -#: sysdeps/mach/hurd/mips/dl-machine.c:82 -msgid "Unknown error " -msgstr "Errore sconosciuto " - -#: resolv/herror.c:74 -msgid "Unknown host" -msgstr "Host sconosciuto" - -#: nis/nis_error.c:34 -msgid "Unknown object" -msgstr "Oggetto sconosciuto" - -#: nscd/nscd_conf.c:179 -#, c-format -msgid "Unknown option: %s %s %s" -msgstr "Opzione sconosciuta: %s %s %s" - -#: resolv/herror.c:120 -msgid "Unknown resolver error" -msgstr "Errore conosciuto del resolver" - -#: resolv/herror.c:76 -msgid "Unknown server error" -msgstr "Errore sconosciuto del server" - -#: string/strsignal.c:70 -#, c-format -msgid "Unknown signal %d" -msgstr "Segnale %d sconosciuto" - -#: misc/error.c:107 timezone/zic.c:386 -msgid "Unknown system error" -msgstr "Errore di sistema sconosciuto" - -#: nis/ypclnt.c:855 -msgid "Unknown ypbind error" -msgstr "Errore sconosciuto di ypbind" - -#: posix/regex.c:1040 -msgid "Unmatched ( or \\(" -msgstr "( o \\( sbilanciato" - -#: posix/regex.c:1064 -msgid "Unmatched ) or \\)" -msgstr ") o \\) sbilanciato" - -#: posix/regex.c:1037 -msgid "Unmatched [ or [^" -msgstr "[ o [^ sbilanciato" - -#: posix/regex.c:1043 -msgid "Unmatched \\{" -msgstr "\\{ sbilanciato" - -#: posix/getconf.c:692 -#, c-format -msgid "Unrecognized variable `%s'" -msgstr "Variabile `%s' non riconosciuta" - -#: stdio-common/../sysdeps/unix/siglist.c:41 sysdeps/generic/siglist.h:42 -#: sysdeps/gnu/siglist.h:36 -msgid "Urgent I/O condition" -msgstr "Condizione di I/O urgente" - -#: argp/argp-help.c:1569 -msgid "Usage:" -msgstr "Uso:" - -#: posix/getconf.c:604 -#, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Uso: %s nome_variabile [percorso]\n" - -#: sunrpc/rpcinfo.c:674 -msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" -msgstr "Uso: rpcinfo [ -n numporta ] -u host numprog [ numvers ]\n" - -#: nscd/nscd.c:89 -msgid "Use separate cache for each user" -msgstr "Usa una cache separata per ogni utente" - -#: stdio-common/../sysdeps/unix/siglist.c:55 sysdeps/generic/siglist.h:55 -#: sysdeps/gnu/siglist.h:49 -msgid "User defined signal 1" -msgstr "Segnale 1 definito dall'utente" - -#: stdio-common/../sysdeps/unix/siglist.c:56 sysdeps/generic/siglist.h:56 -#: sysdeps/gnu/siglist.h:50 -msgid "User defined signal 2" -msgstr "Segnale 2 definito dall'utente" - -#: stdio-common/../sysdeps/gnu/errlist.c:672 -#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:108 -msgid "Value too large for defined data type" -msgstr "Valore troppo grande per il tipo di dato definito" - -#: stdio-common/../sysdeps/unix/siglist.c:51 sysdeps/generic/siglist.h:52 -#: sysdeps/gnu/siglist.h:46 -msgid "Virtual timer expired" -msgstr "Virtual timer expired" - -#: timezone/zic.c:1927 -msgid "Wild result from command execution" -msgstr "Risultato assurdo dall'esecuzione del comando" - -#: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:54 -#: sysdeps/gnu/siglist.h:48 -msgid "Window changed" -msgstr "Finestra cambiata" - -#: locale/programs/locale.c:67 -msgid "Write names of available charmaps" -msgstr "Scrive i nomi delle mappe di caratteri disponibili" - -#: locale/programs/locale.c:65 -msgid "Write names of available locales" -msgstr "Scrive i nomi delle localizzazioni disponibili" - -#: locale/programs/locale.c:69 -msgid "Write names of selected categories" -msgstr "Scrive i nomi delle categorie selezionate" - -#: locale/programs/locale.c:70 -msgid "Write names of selected keywords" -msgstr "Scrive i nomi delle parole chiave selezionate" - -#: catgets/gencat.c:111 db2/makedb.c:59 -msgid "Write output to file NAME" -msgstr "Scrive l'output nel file NOME" - -#: catgets/gencat.c:242 db2/makedb.c:247 elf/sprof.c:361 -#: iconv/iconv_prog.c:299 locale/programs/locale.c:272 -#: locale/programs/localedef.c:405 nscd/nscd.c:282 nscd/nscd_nischeck.c:95 -#: nss/getent.c:71 posix/getconf.c:629 -#, c-format -msgid "Written by %s.\n" -msgstr "Scritto da %s.\n" - -#: stdio-common/../sysdeps/gnu/errlist.c:836 -msgid "Wrong medium type" -msgstr "Tipo di medium errato" - -#: nis/nis_print.c:39 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:43 -msgid "XCHS" -msgstr "XCHS" - -#: nis/ypclnt.c:171 -#, c-format -msgid "YPBINDPROC_DOMAIN: %s\n" -msgstr "YPBINDPROC_DOMAIN: %s\n" - -#: nis/nis_error.c:70 -msgid "Yes, 42 is the meaning of life" -msgstr "Sì, 42 è il significato della vita" - -#. TRANS You did @strong{what}? -#: stdio-common/../sysdeps/gnu/errlist.c:626 -msgid "You really blew it this time" -msgstr "Questa volta hai davvero combinato un pasticcio" - -#: timezone/zic.c:1089 -msgid "Zone continuation line end time is not after end time of previous line" -msgstr "" -"Il tempo finale della riga di continuazione della zona\n" -"non è successivo al tempo finale della riga precedente" - -#: iconv/iconv_prog.c:70 -msgid "[FILE...]" -msgstr "[FILE...]" - -#: sunrpc/pmap_clnt.c:71 -msgid "__get_myaddress: ioctl (get interface configuration)" -msgstr "__get_myaddress: ioctl (ottiene la configurazione dell'interfaccia)" - -#: locale/programs/charmap.c:480 locale/programs/locfile.c:477 -#: locale/programs/repertoire.c:290 -#, c-format -msgid "`%1$s' definition does not end with `END %1$s'" -msgstr "la definizione `%1$s' non finisce con `END %1$s'" - -#: elf/sprof.c:762 -#, c-format -msgid "`%s' is no correct profile data file for `%s'" -msgstr "`%s' non è un file con i dati di profilazione corretti per `%s'" - -#: locale/programs/ld-monetary.c:369 locale/programs/ld-numeric.c:193 -#, c-format -msgid "`-1' must be last entry in `%s' field in `%s' category" -msgstr "`-1' deve essere l'ultima voce del campo `%s' nella categoria `%s'" - -#: locale/programs/ld-collate.c:1670 -msgid "`...' must only be used in `...' and `UNDEFINED' entries" -msgstr "`...' deve essere usata solo nelle voci `...' e `UNDEFINED'" - -#: locale/programs/locfile.c:674 -msgid "`from' expected after first argument to `collating-element'" -msgstr "manca `from' dopo il primo argomento a `collating-element'" - -#: locale/programs/ld-collate.c:1122 -msgid "`from' string in collation element declaration contains unknown character" -msgstr "" -"la stringa `from' nella dichiarazione dell'elemento di collazione\n" -"contiene un carattere sconosciuto" - -#: posix/../sysdeps/posix/gai_strerror.c:34 -msgid "ai_family not supported" -msgstr "ai_family non gestita" - -#: posix/../sysdeps/posix/gai_strerror.c:39 -msgid "ai_socktype not supported" -msgstr "ai_socktype non gestito" - -#: nscd/nscd.c:127 -msgid "already running" -msgstr "già in esecuzione" - -#: locale/programs/charmap.c:352 locale/programs/repertoire.c:164 -#, c-format -msgid "argument to <%s> must be a single character" -msgstr "l'argomento di <%s> deve essere un unico carattere" - -#: locale/programs/locfile.c:240 -#, c-format -msgid "argument to `%s' must be a single character" -msgstr "l'argomento di `%s' deve essere un unico carattere" - -#: sunrpc/auth_unix.c:310 -msgid "auth_none.c - Fatal marshalling problem" -msgstr "auth_none.c - Problema fatale di marshalling" - -#: sunrpc/auth_unix.c:105 sunrpc/auth_unix.c:111 sunrpc/auth_unix.c:141 -msgid "authunix_create: out of memory\n" -msgstr "authunix_create: memoria esaurita\n" - -#: locale/programs/charmap.c:297 locale/programs/locfile.c:234 -#: locale/programs/locfile.c:261 locale/programs/repertoire.c:156 -msgid "bad argument" -msgstr "argomenti non validi" - -#: inet/rcmd.c:326 -msgid "bad owner" -msgstr "proprietario non valido" - -#: timezone/zic.c:1211 -msgid "blank FROM field on Link line" -msgstr "campo FROM vuoto in una riga di Link" - -#: timezone/zic.c:1215 -msgid "blank TO field on Link line" -msgstr "campo TO vuoto in una riga di Link" - -#: malloc/mcheck.c:208 -msgid "block freed twice\n" -msgstr "blocco liberato due volte\n" - -#: malloc/mcheck.c:211 -msgid "bogus mcheck_status, library is buggy\n" -msgstr "mcheck_status insensato, la libreria è bacata\n" - -#: sunrpc/pmap_rmt.c:185 -msgid "broadcast: ioctl (get interface configuration)" -msgstr "broadcast: ioctl (leggi la configurazione dell'interfaccia)" - -#: sunrpc/pmap_rmt.c:194 -msgid "broadcast: ioctl (get interface flags)" -msgstr "broadcast: ioctl (leggi i flag dell'interfaccia)" - -#: login/programs/request.c:167 -msgid "buffer overflow" -msgstr "overflow del buffer" - -#: sunrpc/svc_udp.c:446 -msgid "cache_set: could not allocate new rpc_buffer" -msgstr "cache_set: impossibile allocare un nuovo rpc_buffer" - -#: sunrpc/svc_udp.c:440 -msgid "cache_set: victim alloc failed" -msgstr "cache_set: fallita l'allocazione della vittima" - -#: sunrpc/svc_udp.c:429 -msgid "cache_set: victim not found" -msgstr "cache_set: vittima non trovata" - -#: timezone/zic.c:1752 -msgid "can't determine time zone abbreviation to use just after until time" -msgstr "" -"impossibile determinare l'abbreviazione del fuso orario\n" -"da usare subito dopo il tempo finale" - -#: sunrpc/svc_simple.c:75 -#, c-format -msgid "can't reassign procedure number %d\n" -msgstr "impossibile riassegnare il numero di procedura %d\n" - -#: locale/programs/localedef.c:276 -#, c-format -msgid "cannot `stat' locale file `%s'" -msgstr "impossibile fare `stat' sul file di localizzazione `%s'" - -#: elf/sprof.c:931 elf/sprof.c:983 -msgid "cannot allocate symbol data" -msgstr "impossibile allocare i dati dei simboli" - -#: elf/sprof.c:715 elf/sprof.c:773 -msgid "cannot create internal descriptor" -msgstr "impossibile creare il descrittore interno" - -#: elf/sprof.c:413 -msgid "cannot create internal descriptors" -msgstr "impossibile creare i descrittori interni" - -#: nscd/connections.c:183 -#, c-format -msgid "cannot enable socket to accept connections: %s" -msgstr "impossibile abilitare il socket ad accettare connessioni: %s" - -#: sunrpc/rpc_main.c:341 -#, c-format -msgid "cannot find C preprocessor: %s \n" -msgstr "impossibile trovare il preprocessore C: %s\n" - -#: sunrpc/rpc_main.c:349 -msgid "cannot find any C preprocessor (cpp)\n" -msgstr "impossibile trovare un preprocessore C\n" - -#: nscd/connections.c:224 -#, c-format -msgid "cannot handle old request version %d; current version is %d" -msgstr "" -"impossibile gestire una vecchia richiesta di versione %d;\n" -"la versione attuale è %d" - -#: locale/programs/ld-collate.c:1328 -#, c-format -msgid "cannot insert collation element `%.*s'" -msgstr "impossibile inserire l'elemento di collazione `%.*s'" - -#: locale/programs/ld-collate.c:1507 locale/programs/ld-collate.c:1514 -msgid "cannot insert into result table" -msgstr "impossibile l'inserimento nella tabella dei risultati" - -#: locale/programs/ld-collate.c:1179 locale/programs/ld-collate.c:1222 -#, c-format -msgid "cannot insert new collating symbol definition: %s" -msgstr "impossibile inserire la nuova definizione di simbolo di collazione: %s" - -#: elf/sprof.c:670 -msgid "cannot load profiling data" -msgstr "impossibile leggere i dati di profilazione" - -#: inet/rcmd.c:322 -msgid "cannot open" -msgstr "impossibile aprire" - -#: sysdeps/unix/sysv/linux/lddlibc4.c:64 -#, c-format -msgid "cannot open `%s'" -msgstr "impossibile aprire `%s'" - -#: db2/makedb.c:146 -#, c-format -msgid "cannot open database file `%s': %s" -msgstr "impossibile aprire il file del database `%s': %s" - -#: catgets/gencat.c:273 db2/makedb.c:167 iconv/iconv_prog.c:177 -#, c-format -msgid "cannot open input file `%s'" -msgstr "impossibile aprire il file di input `%s'" - -#: locale/programs/localedef.c:195 -#, c-format -msgid "cannot open locale definition file `%s'" -msgstr "impossibile aprire il file di definizione della localizzazione `%s'" - -#: iconv/iconv_prog.c:155 -msgid "cannot open output file" -msgstr "impossibile aprire il file di output" - -#: catgets/gencat.c:780 catgets/gencat.c:821 db2/makedb.c:181 -#, c-format -msgid "cannot open output file `%s'" -msgstr "impossibile aprire il file di output `%s'" - -#: locale/programs/locfile.c:1135 -#, c-format -msgid "cannot open output file `%s' for category `%s'" -msgstr "impossibile aprire il file di output `%s' per la categoria `%s'" - -#: nscd/connections.c:165 -#, c-format -msgid "cannot open socket: %s" -msgstr "impossibile aprire il socket `%s'" - -#: locale/programs/ld-collate.c:1374 -msgid "cannot process order specification" -msgstr "impossibile elaborare le specifiche di ordine" - -#: locale/programs/locale.c:449 -#, c-format -msgid "cannot read character map directory `%s'" -msgstr "impossibile leggere la directory delle mappe di caratteri `%s'" - -#: nscd/connections.c:125 -msgid "cannot read configuration file; this is fatal" -msgstr "impossibile leggere il file di configurazione. Questo è fatale" - -#: login/programs/request.c:91 -msgid "cannot read from client" -msgstr "impossibile leggere dal client" - -#: sysdeps/unix/sysv/linux/lddlibc4.c:68 -#, c-format -msgid "cannot read header from `%s'" -msgstr "impossibile leggere l'header da `%s'" - -#: locale/programs/locale.c:306 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "impossibile leggere la directory di localizzazione `%s'" - -#: locale/programs/localedef.c:300 -#, c-format -msgid "cannot read locale file `%s'" -msgstr "impossibile leggere il file di localizzazione `%s'" - -#: locale/programs/locfile.c:289 locale/programs/locfile.c:308 -#: locale/programs/locfile.c:327 locale/programs/locfile.c:346 -#: locale/programs/locfile.c:365 locale/programs/locfile.c:384 -#, c-format -msgid "cannot read repertoire map `%s'" -msgstr "impossibile leggere la repertoire map `%s'" - -#: nscd/nscd_stat.c:127 -msgid "cannot read statistics data" -msgstr "impossibile leggere i dati statistici" - -#: nscd/cache.c:150 nscd/connections.c:151 -#, c-format -msgid "cannot stat() file `%s': %s" -msgstr "impossibile fare stat() sul file `%s': %s" - -#: locale/programs/localedef.c:325 -#, c-format -msgid "cannot write output files to `%s'" -msgstr "impossibile scrivere i file di output su `%s'" - -#: nscd/connections.c:260 nscd/connections.c:281 -#, c-format -msgid "cannot write result: %s" -msgstr "impossibile scrivere i risultati: %s" - -#: nscd/nscd_stat.c:86 -#, c-format -msgid "cannot write statistics: %s" -msgstr "impossibile scrivere le statistiche: %s" - -#: login/programs/request.c:120 -msgid "cannot write to client" -msgstr "impossibile scrivere sul client" - -#: locale/programs/localedef.c:439 -msgid "category data requested more than once: should not happen" -msgstr "dati di categoria richiesti più di una volta: non dovrebbe succedere" - -#: locale/programs/ld-ctype.c:278 -#, c-format -msgid "character '%s' in class `%s' must be in class `%s'" -msgstr "il carattere '%s' nella classe `%s' deve essere nella classe `%s'" - -#: locale/programs/ld-ctype.c:303 -#, c-format -msgid "character '%s' in class `%s' must not be in class `%s'" -msgstr "il carattere '%s' nella classe `%s' non deve essere nella classe `%s'" - -#: locale/programs/ld-ctype.c:405 -msgid "character not defined in character map" -msgstr "carattere non definito nella mappa di caratteri" - -#: locale/programs/ld-ctype.c:355 -#, c-format -msgid "character L'%s' (index %Zd) in class `%s' must be in class `%s'" -msgstr "il carattere L'%s' (indice %Zd) nella classe `%s' deve essere nella classe `%s'" - -#: locale/programs/ld-ctype.c:380 -#, c-format -msgid "character L'%s' (index %Zd) in class `%s' must not be in class `%s'" -msgstr "il carattere L'%s' (indice %Zd) nella classe `%s' non deve essere nella classe `%s'" - -#: locale/programs/ld-ctype.c:1107 locale/programs/ld-ctype.c:1183 -#: locale/programs/ld-ctype.c:1196 locale/programs/ld-ctype.c:1209 -#: locale/programs/ld-ctype.c:1222 locale/programs/ld-ctype.c:1235 -#: locale/programs/ld-ctype.c:1248 locale/programs/ld-ctype.c:1279 -#: locale/programs/ld-ctype.c:1292 locale/programs/ld-ctype.c:1343 -#: locale/programs/ld-ctype.c:1374 locale/programs/ld-ctype.c:1386 -#, c-format -msgid "character `%s' not defined while needed as default value" -msgstr "carattere `%s' non definito sebbene necessario come valore predefinito" - -#: locale/programs/ld-ctype.c:967 -#, c-format -msgid "character class `%s' already defined" -msgstr "classe di caratteri `%s' già definita" - -#: locale/programs/ld-ctype.c:999 -#, c-format -msgid "character map `%s' already defined" -msgstr "mappa di caratteri `%s' già definita" - -#: locale/programs/charmap.c:83 -#, c-format -msgid "character map file `%s' not found" -msgstr "file di mappa di caratteri `%s' non trovato" - -#: sunrpc/clnt_raw.c:110 -msgid "clnt_raw.c - Fatal header serialization error." -msgstr "clnt_raw.c - Errore fatale di serializzazione dell'header" - -#: sunrpc/clnt_tcp.c:125 sunrpc/clnt_tcp.c:133 -msgid "clnttcp_create: out of memory\n" -msgstr "clnttcp_create: memoria esaurita\n" - -#: sunrpc/clnt_udp.c:125 sunrpc/clnt_udp.c:135 -msgid "clntudp_create: out of memory\n" -msgstr "clntudp_create: memoria esaurita\n" - -#: sunrpc/clnt_unix.c:123 sunrpc/clnt_unix.c:131 -msgid "clntunix_create: out of memory\n" -msgstr "clntunix_create: memoria esaurita\n" - -#: locale/programs/ld-collate.c:1343 -#, c-format -msgid "collation element `%.*s' appears more than once: ignore line" -msgstr "l'elemento di collazione `%.*s' appare più di una volta: riga ignorata" - -#: locale/programs/ld-collate.c:1361 -#, c-format -msgid "collation symbol `%.*s' appears more than once: ignore line" -msgstr "il simbolo di collazione `%.*s' appare più di una volta: riga ignorata" - -#: locale/programs/locfile.c:658 -#, c-format -msgid "collation symbol expected after `%s'" -msgstr "simbolo di collazione non trovato dopo `%s'" - -#: inet/rcmd.c:143 -#, c-format -msgid "connect to address %s: " -msgstr "connessione all'indirizzo %s: " - -#: sunrpc/rpc_scan.c:115 -msgid "constant or identifier expected" -msgstr "attesa una costante o un identificatore" - -#: iconv/iconv_prog.c:144 -#, c-format -msgid "conversion from `%s' to `%s' not supported" -msgstr "conversione da `%s' a `%s' non gestita" - -#: iconv/iconv_prog.c:328 iconv/iconv_prog.c:353 -msgid "conversion stopped due to problem in writing the output" -msgstr "conversione fermata a causa di un problema durante la scrittura dell'output" - -#: sunrpc/svc_simple.c:83 -msgid "couldn't create an rpc server\n" -msgstr "impossibile creare un server rpc\n" - -#: sunrpc/svc_simple.c:91 -#, c-format -msgid "couldn't register prog %d vers %d\n" -msgstr "impossibile registrare il programma %d vers %d\n" - -#: nss/getent.c:50 -msgid "database [key ...]" -msgstr "database [chiave ...]" - -#: locale/programs/charmap.c:170 -#, c-format -msgid "default character map file `%s' not found" -msgstr "file di mappa di caratteri `%s' predefinito non trovato" - -#: locale/programs/ld-time.c:163 -#, c-format -msgid "direction flag in string %d in `era' field in category `%s' is not '+' nor '-'" -msgstr "" -"il flag di direzione nella stringa %d, nel campo `era'\n" -"della categoria `%s', non è né '+' né '-'" - -#: locale/programs/ld-time.c:174 -#, c-format -msgid "direction flag in string %d in `era' field in category `%s' is not a single character" -msgstr "" -"il flag di direzione nella stringa %d, nel campo `era'\n" -"della categoria `%s', non è un unico carattere" - -#: locale/programs/charset.c:64 locale/programs/charset.c:118 -#, c-format -msgid "duplicate character name `%s'" -msgstr "nome di carattere `%s' ripetuto" - -#: locale/programs/ld-collate.c:1154 -msgid "duplicate collating element definition" -msgstr "definizione di eleento di collazione ripetuta" - -#: locale/programs/ld-collate.c:1301 -#, c-format -msgid "duplicate definition for character `%.*s'" -msgstr "definizione ripetuta per il carattere `%.*s'" - -#: db2/makedb.c:328 -msgid "duplicate key" -msgstr "chiave ripetuta" - -#: catgets/gencat.c:389 -msgid "duplicate set definition" -msgstr "definizione di insieme ripetuta" - -#: timezone/zic.c:1004 -#, c-format -msgid "duplicate zone name %s (file \"%s\", line %d)" -msgstr "nome di zona %s duplicato (file \"%s\", riga %d)" - -#: catgets/gencat.c:556 -msgid "duplicated message identifier" -msgstr "identificatore del messaggio doppio" - -#: catgets/gencat.c:528 -msgid "duplicated message number" -msgstr "numero del messaggio doppio" - -#: sunrpc/rpc_scan.c:382 -msgid "empty char string" -msgstr "stringa di caratteri vuota" - -#: locale/programs/ld-collate.c:1714 -msgid "empty weight name: line ignored" -msgstr "nome del peso assente: riga ignorata" - -#: sunrpc/svc_udp.c:372 -msgid "enablecache: cache already enabled" -msgstr "enablecache: cache già abilitata" - -#: sunrpc/svc_udp.c:378 -msgid "enablecache: could not allocate cache" -msgstr "enablecache: impossibile allocare la cache" - -#: sunrpc/svc_udp.c:386 -msgid "enablecache: could not allocate cache data" -msgstr "enablecache: impossibile allocare i dati della cache" - -#: sunrpc/svc_udp.c:393 -msgid "enablecache: could not allocate cache fifo" -msgstr "enablecache: impossibile allocare il fifo della cache" - -#: iconv/iconv_prog.c:56 -msgid "encoding for output" -msgstr "codifica per l'output" - -#: iconv/iconv_prog.c:55 -msgid "encoding of original text" -msgstr "codifica del testo originale" - -#: locale/programs/ld-collate.c:1433 -msgid "end point of ellipsis range is bigger then start" -msgstr "punto terminale dell'intervallo dei puntini maggiore dell'inizio" - -#: nscd/connections.c:357 nscd/connections.c:444 -#, c-format -msgid "error getting callers id: %s" -msgstr "errore ottenendo l'id dei chiamanti: %s" - -#: iconv/iconv_prog.c:193 -#, c-format -msgid "error while closing input `%s'" -msgstr "errore chiudendo l'input `%s'" - -#: iconv/iconv_prog.c:239 -msgid "error while closing output file" -msgstr "errore chiudendo il file di output" - -#: elf/sprof.c:706 -msgid "error while closing the profiling data file" -msgstr "errore chiudendo il file con i dati di profilazione" - -#: locale/programs/ld-collate.c:1162 -msgid "error while inserting collation element into hash table" -msgstr "errore di inserimento dell'elemento di collazione nellatabella hash" - -#: locale/programs/ld-collate.c:1174 -msgid "error while inserting to hash table" -msgstr "errore di inserimento nella tabella hash" - -#: iconv/iconv_prog.c:417 iconv/iconv_prog.c:448 -msgid "error while reading the input" -msgstr "errore leggendo l'output" - -#: locale/programs/locfile.c:601 -msgid "expect string argument for `copy'" -msgstr "manca un argomento stringa per `copy'" - -#: timezone/zic.c:894 -msgid "expected continuation line not found" -msgstr "manca la riga di continuazione" - -#: elf/sprof.c:404 -#, c-format -msgid "failed to load shared object `%s'" -msgstr "impossibile caricare l'oggetto condiviso `%s'" - -#: elf/sprof.c:600 -msgid "failed to load symbol data" -msgstr "impossibile caricare i dati dei simboli" - -#: elf/sprof.c:698 -msgid "failed to mmap the profiling data file" -msgstr "impossibile fare mmap del file con i dati di profilazione" - -#: iconv/iconv_prog.c:147 -msgid "failed to start conversion processing" -msgstr "impossibile iniziare il processo di conversione" - -#: locale/programs/locfile.c:1160 -#, c-format -msgid "failure while writing data for category `%s'" -msgstr "errore di scrittura dei dati per la categoria `%s'" - -#: nis/nis_call.c:155 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" - -#: locale/programs/ld-messages.c:86 locale/programs/ld-messages.c:110 -#: locale/programs/ld-monetary.c:163 locale/programs/ld-numeric.c:98 -#, c-format -msgid "field `%s' in category `%s' undefined" -msgstr "il campo `%s' nella categoria `%s' non è definito" - -#: sunrpc/rpc_main.c:1146 -#, c-format -msgid "file `%s' already exists and may be overwritten\n" -msgstr "il file `%s' esiste già e potrebbe essere sovrascritto\n" - -#: locale/programs/locfile.c:683 -msgid "from-value of `collating-element' must be a string" -msgstr "il valore di partenza di `collating-element' deve essere una stringa" - -#: inet/rcmd.c:324 -msgid "fstat failed" -msgstr "fstat fallito" - -#: locale/programs/linereader.c:333 -msgid "garbage at end of character code specification" -msgstr "spazzatura alla fine della specifica del codice di carattere" - -#: locale/programs/linereader.c:219 -msgid "garbage at end of number" -msgstr "spazzatura alla fine del numero" - -#: locale/programs/ld-time.c:195 -#, c-format -msgid "garbage at end of offset value in string %d in `era' field in category `%s'" -msgstr "" -"spazzatura alla fine del valore di scostamento nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: locale/programs/ld-time.c:252 -#, c-format -msgid "garbage at end of starting date in string %d in `era' field in category `%s'" -msgstr "" -"spazzatura alla fine della data di inizio nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: locale/programs/ld-time.c:328 -#, c-format -msgid "garbage at end of stopping date in string %d in `era' field in category `%s'" -msgstr "" -"spazzatura alla fine della data terminale nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: elf/sprof.c:77 -msgid "generate call graph" -msgstr "genera il grafico delle chiamate" - -#: elf/sprof.c:76 -msgid "generate flat profile with counts and ticks" -msgstr "genera un profilo piatto con totali e tick" - -#: sunrpc/get_myaddr.c:77 -msgid "get_myaddress: ioctl (get interface configuration)" -msgstr "get_myaddress: ioctl (leggi la configurazione dell'interfaccia)" - -#: nss/getent.c:54 -msgid "getent - get entries from administrative database." -msgstr "getent - legge voci dal database amministrativo." - -#: nscd/connections.c:219 -#, c-format -msgid "handle_request: request received (Version = %d)" -msgstr "handle_request: ricevuta una richiesta (Versione = %d)" - -#: timezone/zic.c:638 -msgid "hard link failed, symbolic link used" -msgstr "hard link fallito, usato un link simbolico" - -#: inet/rcmd.c:330 -msgid "hard linked somewhere" -msgstr "ha un hard link da qualche parte" - -#: timezone/zic.c:1188 -msgid "illegal CORRECTION field on Leap line" -msgstr "campo CORRECTION illecito in una riga Leap" - -#: timezone/zic.c:1192 -msgid "illegal Rolling/Stationary field on Leap line" -msgstr "campo Rolling/Stationary illecito in una riga Leap" - -#: locale/programs/ld-collate.c:1786 -msgid "illegal character constant in string" -msgstr "costante carattere illecita nella stringa" - -#: sunrpc/rpc_scan.c:311 -msgid "illegal character in file: " -msgstr "carattere illecito nel file: " - -#: locale/programs/ld-collate.c:1129 -msgid "illegal collation element" -msgstr "elemento di collazione illecito" - -#: locale/programs/charmap.c:281 -msgid "illegal definition" -msgstr "definizione illecita" - -#: locale/programs/charmap.c:434 -msgid "illegal encoding given" -msgstr "codifica ottenuta illecita" - -#: locale/programs/linereader.c:551 -msgid "illegal escape sequence at end of string" -msgstr "sequenza di escape illecita a fine stringa" - -#: iconv/iconv_prog.c:370 -#, c-format -msgid "illegal input sequence at position %ld" -msgstr "sequenza di escape illecita alla posizione %ld" - -#: locale/programs/charset.c:78 -msgid "illegal names for character range" -msgstr "nomi illeciti per l'intervallo di caratteri" - -#: sunrpc/rpc_main.c:461 -#, c-format -msgid "illegal nettype :`%s'\n" -msgstr "nettype illecito:`%s'\n" - -#: locale/programs/ld-time.c:187 -#, c-format -msgid "illegal number for offset in string %d in `era' field in category `%s'" -msgstr "" -"numero illecito per lo scostamento nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: catgets/gencat.c:362 catgets/gencat.c:439 -msgid "illegal set number" -msgstr "numero dell'insieme illecito" - -#: locale/programs/ld-time.c:243 -#, c-format -msgid "illegal starting date in string %d in `era' field in category `%s'" -msgstr "" -"data iniziale illecita nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: locale/programs/ld-time.c:319 -#, c-format -msgid "illegal stopping date in string %d in `era' field in category `%s'" -msgstr "" -"data finale illecita nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: locale/programs/ld-ctype.c:973 -#, c-format -msgid "implementation limit: no more than %d character classes allowed" -msgstr "limite di implementazione: permesse al piu` %d classi di caratteri" - -#: locale/programs/ld-ctype.c:1005 -#, c-format -msgid "implementation limit: no more than %d character maps allowed" -msgstr "limite di implementazione: permesse al piu` %d mappe di caratteri" - -#: iconv/iconv_prog.c:374 -msgid "incomplete character or shift sequence at end of buffer" -msgstr "carattere o sequenza di shift incompleti alla fine del buffer" - -#: db2/makedb.c:148 -msgid "incorrectly formatted file" -msgstr "file formattato non correttamente" - -#: timezone/zic.c:851 -msgid "input line of unknown type" -msgstr "linea di input di tipo sconosciuto" - -#: iconv/iconv_prog.c:378 -msgid "internal error (illegal descriptor)" -msgstr "errore interno (descrittore illecito)" - -#: timezone/zic.c:1814 -msgid "internal error - addtype called with bad isdst" -msgstr "errore interno - addtype chiamata con isdst errato" - -#: timezone/zic.c:1822 -msgid "internal error - addtype called with bad ttisgmt" -msgstr "errore interno - addtype chiamata con ttisgmt errato" - -#: timezone/zic.c:1818 -msgid "internal error - addtype called with bad ttisstd" -msgstr "errore interno - addtype chiamata con ttisstd errato" - -#: locale/programs/ld-ctype.c:315 locale/programs/ld-ctype.c:392 -#, c-format -msgid "internal error in %s, line %u" -msgstr "errore interno in %s, riga %u" - -#: timezone/zic.c:1060 -msgid "invalid UTC offset" -msgstr "scostamento UTC non valido" - -#: timezone/zic.c:1063 -msgid "invalid abbreviation format" -msgstr "formato di abbreviazione non ammesso" - -#: timezone/zic.c:1153 timezone/zic.c:1365 timezone/zic.c:1379 -msgid "invalid day of month" -msgstr "giorno del mese errato" - -#: timezone/zic.c:1317 -msgid "invalid ending year" -msgstr "anno finale errato" - -#: timezone/zic.c:1125 -msgid "invalid leaping year" -msgstr "anno bisestile errato" - -#: elf/dl-open.c:223 -msgid "invalid mode for dlopen()" -msgstr "modo di dlopen() non valido" - -#: timezone/zic.c:1140 timezone/zic.c:1243 -msgid "invalid month name" -msgstr "nome del meso errato" - -#: timezone/zic.c:959 -msgid "invalid saved time" -msgstr "orario salvato errato" - -#: timezone/zic.c:1292 -msgid "invalid starting year" -msgstr "anno iniziale errato" - -#: timezone/zic.c:1169 timezone/zic.c:1272 -msgid "invalid time of day" -msgstr "ora del giorno errata" - -#: timezone/zic.c:1370 -msgid "invalid weekday name" -msgstr "giorno della settimana errato" - -#: nscd/connections.c:460 -#, c-format -msgid "key length in request too long: %Zd" -msgstr "lunghezza della chiave troppo lunga nella richiesta: %Zd" - -#: locale/programs/ld-collate.c:1426 -msgid "line after ellipsis must contain character definition" -msgstr "la riga dopo i puntini deve contenere una definizione di carattere" - -#: locale/programs/ld-collate.c:1405 -msgid "line before ellipsis does not contain definition for character constant" -msgstr "la riga prima dei puntini deve contenere una definizione di carattere" - -#: timezone/zic.c:831 -msgid "line too long" -msgstr "riga troppo lunga" - -#: iconv/iconv_prog.c:58 -msgid "list all known coded character sets" -msgstr "elenca tutti i set di caratteri codificati noti" - -#: locale/programs/localedef.c:270 -#, c-format -msgid "locale file `%s', used in `copy' statement, not found" -msgstr "file di localizzazione `%s', usato nell'istruzione `copy', non trovato" - -#: inet/rcmd.c:315 -msgid "lstat failed" -msgstr "lstat fallito" - -#: catgets/gencat.c:625 -msgid "malformed line ignored" -msgstr "riga malformata ignorata" - -#: elf/sprof.c:550 -msgid "mapping of section header string table failed" -msgstr "fallita la mappatura della tabella delle stringhe degli header di sezione" - -#: elf/sprof.c:540 -msgid "mapping of section headers failed" -msgstr "fallita la mappatura degli header di sezione" - -#: malloc/mcheck.c:202 -msgid "memory clobbered before allocated block\n" -msgstr "memoria sovrascritta prima del blocco allocato\n" - -#: malloc/mcheck.c:205 -msgid "memory clobbered past end of allocated block\n" -msgstr "memoria sovrascritta dopo la fine del blocco allocato\n" - -#: locale/programs/ld-collate.c:170 locale/programs/ld-collate.c:176 -#: locale/programs/ld-collate.c:180 locale/programs/ld-collate.c:1453 -#: locale/programs/ld-collate.c:1482 locale/programs/locfile.c:1088 -#: locale/programs/xmalloc.c:70 login/programs/database.c:62 -#: login/programs/database.c:79 login/programs/database.c:95 -#: malloc/obstack.c:471 posix/getconf.c:682 -msgid "memory exhausted" -msgstr "memoria esaurita" - -#: malloc/mcheck.c:199 -msgid "memory is consistent, library is buggy\n" -msgstr "la memoria è coerente, la libreria è bacata\n" - -#: locale/programs/ld-time.c:373 -#, c-format -msgid "missing era format in string %d in `era' field in category `%s'" -msgstr "" -"manca il formato dell'era nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: locale/programs/ld-time.c:358 -#, c-format -msgid "missing era name in string %d in `era' field in category `%s'" -msgstr "" -"manca il nome dell'era nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: timezone/zic.c:954 -msgid "nameless rule" -msgstr "regola anonima" - -#: iconv/iconv_prog.c:133 -msgid "neither original nor target encoding specified" -msgstr "non sono state specificate nè la codifica originale nè quella di destinazione" - -#: nis/nss_nisplus/nisplus-publickey.c:280 -#: nis/nss_nisplus/nisplus-publickey.c:286 -#: nis/nss_nisplus/nisplus-publickey.c:345 -#: nis/nss_nisplus/nisplus-publickey.c:354 -#, c-format -msgid "netname2user: (nis+ lookup): %s\n" -msgstr "netname2user: (nis+ lookup): %s\n" - -#: nis/nss_nisplus/nisplus-publickey.c:299 -#, c-format -msgid "netname2user: DES entry for %s in directory %s not unique" -msgstr "netname2user: la voce DES di %s nella directory %s non è unica" - -#: nis/nss_nisplus/nisplus-publickey.c:367 -#, c-format -msgid "netname2user: LOCAL entry for %s in directory %s not unique" -msgstr "netname2user: la voce LOCAL di %s nella directory %s non è unica" - -#: nis/nss_nisplus/nisplus-publickey.c:206 -#, c-format -msgid "netname2user: missing group id list in `%s'." -msgstr "netname2user: manca la lista dei group id in `%s'." - -#: nis/nss_nisplus/nisplus-publickey.c:317 -#, c-format -msgid "netname2user: principal name `%s' too long" -msgstr "netname2user: nome principale `%s' troppo lungo" - -#: nis/nss_nisplus/nisplus-publickey.c:374 -msgid "netname2user: should not have uid 0" -msgstr "netname2user: non deve avere uid 0" - -#: sunrpc/svc_simple.c:158 -#, c-format -msgid "never registered prog %d\n" -msgstr "il programma %d non è mai stato registrato\n" - -#: locale/programs/repertoire.c:250 -msgid "no or value given" -msgstr "non è stato dato un valore tipo o " - -#: locale/programs/ld-messages.c:101 locale/programs/ld-messages.c:125 -#, c-format -msgid "no correct regular expression for field `%s' in category `%s': %s" -msgstr "" -"nessuna espressione regolare corretta per il campo `%s'\n" -"della categoria `%s': %s" - -#: timezone/zic.c:2143 -msgid "no day in month matches rule" -msgstr "nessun giorno del mese corrisponde alla regola" - -#: locale/programs/ld-collate.c:267 -msgid "no definition of `UNDEFINED'" -msgstr "nessuna definizione di `UNDEFINED'" - -#: elf/sprof.c:272 -#, c-format -msgid "no filename for profiling data given and shared object `%s' has no soname" -msgstr "" -"non è stato indicato il nome del file per i dati di profilazione e l'oggetto\n" -"condiviso `%s' non ha un soname" - -#: locale/programs/locfile.c:615 -msgid "no other keyword shall be specified when `copy' is used" -msgstr "nessun'altra parola chiave va specificata quando si usa `copy'" - -#: locale/programs/localedef.c:331 -msgid "no output file produced because warning were issued" -msgstr "nessun file di uscita prodotto a causa degli avvertimenti" - -#: locale/programs/locfile.c:283 locale/programs/locfile.c:302 -#: locale/programs/locfile.c:321 locale/programs/locfile.c:340 -#: locale/programs/locfile.c:359 locale/programs/locfile.c:378 -msgid "no repertoire map specified: cannot proceed" -msgstr "non è stata indicata la repertoire map: impossibile procedere" - -#: locale/programs/charmap.c:400 locale/programs/charmap.c:549 -#: locale/programs/charmap.c:628 locale/programs/repertoire.c:211 -msgid "no symbolic name given" -msgstr "nessun nome simbolico fornito" - -#: locale/programs/charmap.c:464 locale/programs/charmap.c:595 -#: locale/programs/charmap.c:661 locale/programs/repertoire.c:273 -msgid "no symbolic name given for end of range" -msgstr "nessun nome simbolico fornito per la fine dell'intervallo" - -#: locale/programs/ld-collate.c:249 -#, c-format -msgid "no weight defined for symbol `%s'" -msgstr "nessun peso definito per il simbolo `%s'" - -#: inet/rcmd.c:317 -msgid "not regular file" -msgstr "non è un file regolare" - -#: nscd/nscd_stat.c:130 -#, c-format -msgid "" -"nscd configuration:\n" -"\n" -"%15d server debug level\n" -msgstr "" -"configurazione di nscd:\n" -"\n" -"%15d livello di debug del server\n" - -#: nscd/nscd_stat.c:104 -msgid "nscd not running!\n" -msgstr "nscd non è in esecuzione!\n" - -#: locale/programs/charmap.c:513 -msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" -msgstr "una definizione CHARMAP può essere seguita solo da definizioni WIDTH" - -#: iconv/iconv_prog.c:135 -msgid "original encoding not specified using `-f'" -msgstr "non è stata specificata con `-f' la codifica originale" - -#: iconv/iconv_prog.c:60 -msgid "output file" -msgstr "file di output" - -#: sunrpc/pm_getmaps.c:73 -msgid "pmap_getmaps rpc problem" -msgstr "problema rpc di pmap_getmaps" - -#: inet/rcmd.c:186 -msgid "poll: protocol failure in circuit setup\n" -msgstr "poll: problema di protocollo impostando il circuito\n" - -#: sunrpc/rpc_scan.c:523 sunrpc/rpc_scan.c:533 -msgid "preprocessor error" -msgstr "errore del preprocessore" - -#: elf/sprof.c:74 -msgid "print list of count paths and their number of use" -msgstr "stampa la lista dei count path e il loro numero d'uso" - -#: iconv/iconv_prog.c:61 -msgid "print progress information" -msgstr "stampa informazioni sui progressi" - -#: db2/makedb.c:345 -#, c-format -msgid "problems while reading `%s'" -msgstr "problemi leggendo `%s'" - -#: elf/sprof.c:687 -#, c-format -msgid "profiling data file `%s' does not match shared object `%s'" -msgstr "" -"Il file con i dati di profilazione `%s' non corrisponde all'oggetto\n" -"condiviso `%s'" - -#: sunrpc/rpcinfo.c:237 sunrpc/rpcinfo.c:383 -#, c-format -msgid "program %lu is not available\n" -msgstr "il programma %lu non è disponibile\n" - -#: sunrpc/rpcinfo.c:264 sunrpc/rpcinfo.c:310 sunrpc/rpcinfo.c:333 -#: sunrpc/rpcinfo.c:407 sunrpc/rpcinfo.c:453 sunrpc/rpcinfo.c:476 -#: sunrpc/rpcinfo.c:510 -#, c-format -msgid "program %lu version %lu is not available\n" -msgstr "la versione %2$lu del programma %1$lu non è disponibile\n" - -#: sunrpc/rpcinfo.c:515 -#, c-format -msgid "program %lu version %lu ready and waiting\n" -msgstr "la versione %2$lu del programma %1$lu è pronta e in attesa\n" - -#: inet/rcmd.c:183 -#, c-format -msgid "rcmd: poll (setting up stderr): %m\n" -msgstr "rcmd: poll (impostazione di stderr): %m\n" - -#: inet/rcmd.c:117 -msgid "rcmd: socket: All ports in use\n" -msgstr "rcmd: socket: tutte le porte sono in uso\n" - -#: inet/rcmd.c:173 -#, c-format -msgid "rcmd: write (setting up stderr): %m\n" -msgstr "rcmd: write (impostazione di stderr): %m\n" - -#: sunrpc/svc_simple.c:98 -msgid "registerrpc: out of memory\n" -msgstr "registerrpc: memoria esaurita\n" - -#: timezone/zic.c:1875 -msgid "repeated leap second moment" -msgstr "momento del secondo intercalare ripetuto" - -#: locale/programs/repertoire.c:107 -#, c-format -msgid "repertoire map file `%s' not found" -msgstr "repertoire map file `%s' non trovato" - -#: sunrpc/rpc_main.c:1115 -msgid "rpcgen: arglist coding error\n" -msgstr "rpcgen: errore di codifica della arglist\n" - -#: sunrpc/rpc_main.c:1103 -msgid "rpcgen: too many defines\n" -msgstr "rpcgen: troppi define\n" - -#: sunrpc/rpcinfo.c:732 -#, c-format -msgid "rpcinfo: %s is unknown host\n" -msgstr "rpcinfo: %s è l'host sconosciuto\n" - -#: sunrpc/rpcinfo.c:695 -#, c-format -msgid "rpcinfo: %s is unknown service\n" -msgstr "rpcinfo: %s è il servizio sconosciuto\n" - -#: sunrpc/rpcinfo.c:665 -#, c-format -msgid "rpcinfo: Could not delete registration for prog %s version %s\n" -msgstr "" -"rpcinfo: impossibile cancellare la registrazione per la versione %2$s\n" -"del programma %1$s\n" - -#: sunrpc/rpcinfo.c:637 -#, c-format -msgid "rpcinfo: broadcast failed: %s\n" -msgstr "rpcinfo: broadcast fallito: %s\n" - -#: sunrpc/rpcinfo.c:556 sunrpc/rpcinfo.c:563 -msgid "rpcinfo: can't contact portmapper" -msgstr "rpcinfo: impossibile contattare il portmapper" - -#: timezone/zic.c:744 timezone/zic.c:746 -msgid "same rule name in multiple files" -msgstr "stesso nome di regola in più file" - -#: nscd/connections.c:472 -#, c-format -msgid "short read while reading request key: %s" -msgstr "lettura troppo corta leggendo la chiave di richiesta: %s" - -#: nscd/connections.c:430 -#, c-format -msgid "short read while reading request: %s" -msgstr "lettura troppo corta leggendo la richiesta: %s" - -#: nscd/grpcache.c:191 nscd/hstcache.c:270 nscd/pwdcache.c:189 -#, c-format -msgid "short write in %s: %s" -msgstr "scrittura troppo corta in %s: %s" - -#: inet/rcmd.c:204 -msgid "socket: protocol failure in circuit setup\n" -msgstr "socket: problema di protocollo impostando il circuito\n" - -#: locale/programs/locfile.c:736 -msgid "sorting order `forward' and `backward' are mutually exclusive" -msgstr "gli ordinamenti `forward' e `backward' sono mutuamente esclusivi" - -#: locale/programs/ld-collate.c:1586 locale/programs/ld-collate.c:1632 -msgid "specification of sorting weight for collation symbol does not make sense" -msgstr "non ha senso specificare pesi di ordinamento per il simbolo di collazione" - -#: timezone/zic.c:815 -msgid "standard input" -msgstr "standard input" - -#: timezone/zdump.c:268 -msgid "standard output" -msgstr "standard output" - -#: locale/programs/ld-time.c:272 -#, c-format -msgid "starting date is illegal in string %d in `era' field in category `%s'" -msgstr "" -"data iniziale illecita nella stringa %d,\n" -"nel campo `era' della categoria `%s'" - -#: timezone/zic.c:1326 -msgid "starting year greater than ending year" -msgstr "anno iniziale maggiore dell'anno finale" - -#: timezone/zic.c:1298 timezone/zic.c:1323 -msgid "starting year too high to be represented" -msgstr "anno iniziale troppo grande per essere rappresentato" - -#: timezone/zic.c:1296 timezone/zic.c:1321 -msgid "starting year too low to be represented" -msgstr "anno iniziale troppo piccolo per essere rappresentato" - -#: locale/programs/ld-time.c:348 -#, c-format -msgid "stopping date is illegal in string %d in `era' field in category `%s'" -msgstr "" -"la data di stop non è permessa nella stringa %d in campo `era' della\n" -"categoria `%s'" - -#: sunrpc/svc_run.c:81 -msgid "svc_run: - select failed" -msgstr "svc_run: - select fallita" - -#: sunrpc/svc_tcp.c:160 -msgid "svc_tcp.c - cannot getsockname or listen" -msgstr "svc_tcp.c - impossibile fare getsockname o listen" - -#: sunrpc/svc_tcp.c:145 -msgid "svc_tcp.c - tcp socket creation problem" -msgstr "svc_tcp.c - problema di creazione del socket tcp" - -#: sunrpc/svc_tcp.c:209 sunrpc/svc_tcp.c:215 -msgid "svc_tcp: makefd_xprt: out of memory\n" -msgstr "svc_tcp: makefd_xprt: memoria esaurita\n" - -#: sunrpc/svc_unix.c:135 -msgid "svc_unix.c - AF_UNIX socket creation problem" -msgstr "svc_unix.c - problema di creazione del socket AF_UNIX" - -#: sunrpc/svc_unix.c:151 -msgid "svc_unix.c - cannot getsockname or listen" -msgstr "svc_unix.c - impossibile fare getsockname o listen" - -#: sunrpc/svc_unix.c:201 sunrpc/svc_unix.c:207 -msgid "svc_unix: makefd_xprt: out of memory\n" -msgstr "svc_unix: makefd_xprt: memoria esaurita\n" - -#: sunrpc/svc_tcp.c:168 sunrpc/svc_tcp.c:176 -msgid "svctcp_create: out of memory\n" -msgstr "svctcp_create: memoria esaurita\n" - -#: sunrpc/svc_udp.c:135 -msgid "svcudp_create - cannot getsockname" -msgstr "svcudp_create - impossibile fare getsockname" - -#: sunrpc/svc_udp.c:143 sunrpc/svc_udp.c:149 sunrpc/svc_udp.c:155 -msgid "svcudp_create: out of memory\n" -msgstr "svcudp_create: memoria esaurita\n" - -#: sunrpc/svc_udp.c:121 -msgid "svcudp_create: socket creation problem" -msgstr "svcudp_create: problema di creazione del socket" - -#: sunrpc/svc_unix.c:160 sunrpc/svc_unix.c:168 -msgid "svcunix_create: out of memory\n" -msgstr "svcunix_create: memoria esaurita\n" - -#: locale/programs/ld-collate.c:1077 locale/programs/ld-collate.c:1205 -#, c-format -msgid "symbol for multicharacter collating element `%.*s' duplicates element definition" -msgstr "" -"il simbolo per l'elemento di collazione multicarattere `%.*s'\n" -"replica la definizione dell'elemento" - -#: locale/programs/ld-collate.c:1214 -#, c-format -msgid "symbol for multicharacter collating element `%.*s' duplicates other symbol definition" -msgstr "" -"il simbolo per l'elemento di collazione multicarattere `%.*s'\n" -"replica la definizione di un altro simbolo" - -#: locale/programs/ld-collate.c:1086 -#, c-format -msgid "symbol for multicharacter collating element `%.*s' duplicates symbol definition" -msgstr "" -"il simbolo per l'elemento di collazione multicarattere `%.*s'\n" -"replica la definizione del simbolo" - -#: locale/programs/ld-collate.c:1068 locale/programs/ld-collate.c:1196 -#, c-format -msgid "symbol for multicharacter collating element `%.*s' duplicates symbolic name in charset" -msgstr "" -"il simbolo per l'elemento di collazione multicarattere `%.*s'\n" -"replica il nome simbolico" - -#: locale/programs/charmap.c:399 locale/programs/charmap.c:433 -#: locale/programs/charmap.c:462 locale/programs/charmap.c:548 -#: locale/programs/charmap.c:594 locale/programs/charmap.c:627 -#: locale/programs/charmap.c:659 -#, c-format -msgid "syntax error in %s definition: %s" -msgstr "errore di sintassi nella definizione di %s: %s" - -#: locale/programs/locfile.c:756 -msgid "syntax error in `order_start' directive" -msgstr "errore di sintassi nella direttiva `order_start'" - -#: locale/programs/locfile.c:498 -msgid "syntax error in character class definition" -msgstr "errore di sintassi nella definizione della classe del carattere" - -#: locale/programs/locfile.c:556 -msgid "syntax error in character conversion definition" -msgstr "errore di sintassi nella definizione della conversione del carattere" - -#: locale/programs/locfile.c:798 -msgid "syntax error in collating order definition" -msgstr "errore di sintassi nella definizione dell'ordine di collazione" - -#: locale/programs/locfile.c:648 -msgid "syntax error in collation definition" -msgstr "errore di sintassi nella definizione della collazione" - -#: locale/programs/locfile.c:471 -msgid "syntax error in definition of LC_CTYPE category" -msgstr "errore di sintassi nella categoria di LC_TYPE" - -#: locale/programs/locfile.c:414 -msgid "syntax error in definition of new character class" -msgstr "errore di sintassi nella definizione di una nuova classe di caratteri" - -#: locale/programs/locfile.c:424 -msgid "syntax error in definition of new character map" -msgstr "errore di sintassi nella definizione di una nuova mappa di caratteri" - -#: locale/programs/locfile.c:1009 -msgid "syntax error in message locale definition" -msgstr "errore di sintassi nella definizione dalla localizzazione del messaggio" - -#: locale/programs/locfile.c:920 -msgid "syntax error in monetary locale definition" -msgstr "errore di sintassi nella definizione dalla localizzazione monetaria" - -#: locale/programs/locfile.c:947 -msgid "syntax error in numeric locale definition" -msgstr "errore di sintassi nella definizione dalla localizzazione numerica" - -#: locale/programs/locfile.c:858 -msgid "syntax error in order specification" -msgstr "errore di sintassi nella specifica di ordinamento" - -#: locale/programs/charmap.c:280 locale/programs/charmap.c:296 -#: locale/programs/repertoire.c:155 -#, c-format -msgid "syntax error in prolog: %s" -msgstr "errore di sintassi nel prologo: %s" - -#: locale/programs/repertoire.c:210 locale/programs/repertoire.c:249 -#: locale/programs/repertoire.c:272 -#, c-format -msgid "syntax error in repertoire map definition: %s" -msgstr "errore di sintassi nella definizione della repertoire map: %s" - -#: locale/programs/locfile.c:985 -msgid "syntax error in time locale definition" -msgstr "errore di sintassi nella definizione della localizzazione del tempo" - -#: locale/programs/locfile.c:391 -msgid "syntax error: not inside a locale definition section" -msgstr "errore di sintassi: fuori da una sezione di definizione di localizzazione" - -#: iconv/iconv_prog.c:137 -msgid "target encoding not specified using `-t'" -msgstr "non è stata specificata con `-t' la codifica di destinazione" - -#: catgets/gencat.c:391 catgets/gencat.c:530 catgets/gencat.c:559 -msgid "this is the first definition" -msgstr "questa è la prima definizione" - -#: timezone/zic.c:1158 -msgid "time before zero" -msgstr "tempo precedente a zero" - -#: timezone/zic.c:1166 timezone/zic.c:2043 timezone/zic.c:2062 -msgid "time overflow" -msgstr "overflow del tempo" - -#: locale/programs/charmap.c:443 -msgid "too few bytes in character encoding" -msgstr "troppo pochi byte nella codifica di carattere" - -#: locale/programs/charmap.c:445 -msgid "too many bytes in character encoding" -msgstr "troppi byte nella codifica di carattere" - -#: locale/programs/locales.h:92 -msgid "too many character classes defined" -msgstr "definite troppe classi di carattere" - -#: timezone/zic.c:1869 -msgid "too many leap seconds" -msgstr "troppi secondi intercalari" - -#: timezone/zic.c:1841 -msgid "too many local time types" -msgstr "troppi tipi di tempi locali" - -#: timezone/zic.c:1795 -msgid "too many transitions?!" -msgstr "troppe transizioni?!" - -#: locale/programs/ld-collate.c:1641 -msgid "too many weights" -msgstr "troppi pesi" - -#: timezone/zic.c:2166 -msgid "too many, or too long, time zone abbreviations" -msgstr "troppe o troppo lunghe abbreviazioni di fuso orario" - -#: locale/programs/linereader.h:146 -msgid "trailing garbage at end of line" -msgstr "spazzatura alla fine della riga" - -#: sunrpc/svc_simple.c:150 -#, c-format -msgid "trouble replying to prog %d\n" -msgstr "problema rispondendo al programma %d\n" - -#: locale/programs/ld-collate.c:1397 -msgid "two lines in a row containing `...' are not allowed" -msgstr "non sono permesse due righe di seguito contenenti `...'" - -#: timezone/zic.c:1333 -msgid "typed single year" -msgstr "digitato un solo anno" - -#: iconv/iconv_prog.c:434 -msgid "unable to allocate buffer for input" -msgstr "impossibile allocare il buffer per l'input" - -#: nis/nis_callback.c:187 -msgid "unable to free arguments" -msgstr "impossibile liberare gli argomenti" - -#: posix/getconf.c:654 posix/getconf.c:670 -msgid "undefined" -msgstr "non definito" - -#: locale/programs/charmap.c:700 locale/programs/charmap.c:711 -#, c-format -msgid "unknown character `%s'" -msgstr "carattere sconosciuto `%s'" - -#: locale/programs/ld-messages.c:202 locale/programs/ld-messages.c:213 -#: locale/programs/ld-messages.c:224 locale/programs/ld-messages.c:235 -#: locale/programs/ld-time.c:700 -#, c-format -msgid "unknown character in field `%s' of category `%s'" -msgstr "carattere sconosciuto nel campo `%s' della categoria `%s'" - -#: locale/programs/locfile.c:721 -msgid "unknown collation directive" -msgstr "direttiva di collazione sconosciuta" - -#: catgets/gencat.c:488 -#, c-format -msgid "unknown directive `%s': line ignored" -msgstr "direttiva `%s' sconosciuta: riga ignorata" - -#: iconv/iconv_prog.c:381 -#, c-format -msgid "unknown iconv() error %d" -msgstr "errore di iconv() sconosciuto %d" - -#: catgets/gencat.c:467 -#, c-format -msgid "unknown set `%s'" -msgstr "insieme `%s' sconosciuto" - -#: locale/programs/ld-collate.c:1381 locale/programs/ld-collate.c:1576 -#: locale/programs/ld-collate.c:1751 -#, c-format -msgid "unknown symbol `%.*s': line ignored" -msgstr "simbolo `%.*s' sconosciuto: riga ignorata" - -#: timezone/zic.c:787 -msgid "unruly zone" -msgstr "zona senza regole" - -#: catgets/gencat.c:977 -msgid "unterminated message" -msgstr "messaggio non terminato" - -#: locale/programs/linereader.c:520 locale/programs/linereader.c:555 -msgid "unterminated string" -msgstr "stringa non terminata" - -#: sunrpc/rpc_scan.c:350 sunrpc/rpc_scan.c:376 -msgid "unterminated string constant" -msgstr "costante stringa non terminata" - -#: locale/programs/linereader.c:390 -msgid "unterminated symbolic name" -msgstr "nome simbolico non terminato" - -#: locale/programs/ld-collate.c:1703 -msgid "unterminated weight name" -msgstr "nome di peso non terminato" - -#: locale/programs/charset.c:104 -msgid "upper limit in range is not smaller then lower limit" -msgstr "limite superiore dell'intervallo non minore del limite inferiore" - -#: sunrpc/rpc_main.c:1413 -#, c-format -msgid "usage: %s infile\n" -msgstr "uso: %s infile\n" - -#: timezone/zic.c:2109 -msgid "use of 2/29 in non leap-year" -msgstr "uso del 29/2 in anno non bisestile" - -#: locale/programs/charmap.c:521 locale/programs/charmap.c:575 -#, c-format -msgid "value for %s must be an integer" -msgstr "il valore di %s deve essere intero" - -#: locale/programs/charmap.c:318 -#, c-format -msgid "value for <%s> must lie between 1 and 4" -msgstr "il valore di <%s> deve essere compreso fra 1 e 4" - -#: locale/programs/ld-monetary.c:157 locale/programs/ld-numeric.c:92 -#, c-format -msgid "value for field `%s' in category `%s' must not be the empty string" -msgstr "" -"il valore per il campo `%s' della categoria `%s'\n" -"non deve essere la stringa vuota" - -#: locale/programs/charmap.c:330 -msgid "value of must be greater than the value of " -msgstr "il valore di deve essere maggiore del valore di " - -#: locale/programs/ld-monetary.c:147 -msgid "value of field `int_curr_symbol' in category `LC_MONETARY' does not correspond to a valid name in ISO 4217" -msgstr "" -"il valore del campo `int_curr_symbol' della categoria `LC_MONETARY'\n" -"non corriposnde ad un nome ISO 4217 valido" - -#: locale/programs/ld-monetary.c:139 -msgid "value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length" -msgstr "" -"il valore del campo `int_curr_symbol' della categoria `LC_MONETARY'\n" -"è di lunghezza errata" - -#: locale/programs/ld-monetary.c:383 locale/programs/ld-numeric.c:207 -#, c-format -msgid "values for field `%s' in category `%s' must be smaller than 127" -msgstr "" -"i valori dei campi `%s' della categoria `%s' devono essere\n" -"inferiori a 127" - -#: timezone/zic.c:435 -msgid "warning: " -msgstr "attenzione: " - -#: nscd/connections.c:421 -#, c-format -msgid "while accepting connection: %s" -msgstr "accettando la connessione: %s" - -#: nscd/grpcache.c:149 nscd/hstcache.c:168 nscd/pwdcache.c:143 -msgid "while allocating cache entry" -msgstr "allocando la voce di cache" - -#: nscd/cache.c:88 -msgid "while allocating hash table entry" -msgstr "allocando voce della tabella hash" - -#: nscd/grpcache.c:99 nscd/hstcache.c:111 nscd/pwdcache.c:106 -msgid "while allocating key copy" -msgstr "allocando la copia della chiave" - -#: catgets/gencat.c:1007 -msgid "while opening old catalog file" -msgstr "aprendo il file del vecchio catalogo" - -#: locale/programs/locale.c:346 -msgid "while preparing output" -msgstr "preparando l'output" - -#: db2/makedb.c:365 db2/makedb.c:382 -msgid "while reading database" -msgstr "leggendo il database" - -#: elf/sprof.c:679 -msgid "while stat'ing profiling data file" -msgstr "facendo stat del database di profilazione" - -#: db2/makedb.c:334 -msgid "while writing database file" -msgstr "scrivendo il file del database" - -#: nscd/nscd_stat.c:115 -msgid "write incomplete" -msgstr "write incompleta" - -#: inet/rcmd.c:328 -msgid "writeable by other than owner" -msgstr "scrivibile da altri oltre il proprietario" - -#: db2/makedb.c:124 nscd/nscd.c:120 nscd/nscd_nischeck.c:64 nss/getent.c:399 -msgid "wrong number of arguments" -msgstr "numero di argomenti sbagliato" - -#: timezone/zic.c:1116 -msgid "wrong number of fields on Leap line" -msgstr "numero di campi errato su una riga Leap" - -#: timezone/zic.c:1207 -msgid "wrong number of fields on Link line" -msgstr "numero di campi errato su una riga Link" - -#: timezone/zic.c:950 -msgid "wrong number of fields on Rule line" -msgstr "numero di campi errato su una riga Rule" - -#: timezone/zic.c:1020 -msgid "wrong number of fields on Zone continuation line" -msgstr "numero di campi errato su una riga Zone di continuazione" - -#: timezone/zic.c:978 -msgid "wrong number of fields on Zone line" -msgstr "numero di campi errato su una riga Zone" - -#: sunrpc/xdr_ref.c:84 -msgid "xdr_reference: out of memory\n" -msgstr "xdr_reference: memoria esaurita\n" - -#: sunrpc/xdr_rec.c:150 sunrpc/xdr_rec.c:165 -msgid "xdrrec_create: out of memory\n" -msgstr "xdrrec_create: memoria esaurita\n" - -#: nis/ypclnt.c:894 -msgid "yp_update: cannot convert host to netname\n" -msgstr "yp_update: impossibile convertire l'host in netname\n" - -#: nis/ypclnt.c:906 -msgid "yp_update: cannot get server address\n" -msgstr "yp_update: impossibile ottenere l'indirizzo del server\n" Binary files glibc-2.2.4/po/ja.mo and glibc-2.2.5/po/ja.mo differ diff -durpN glibc-2.2.4/po/ja.po glibc-2.2.5/po/ja.po --- glibc-2.2.4/po/ja.po Mon Jul 23 10:54:54 2001 +++ glibc-2.2.5/po/ja.po Thu Aug 23 09:26:26 2001 @@ -4,82 +4,88 @@ # msgid "" msgstr "" -"Project-Id-Version: libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-06-16 00:45+09:00\n" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-24 00:31+09:00\n" "Last-Translator: GOTO Masanori \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=EUC-JP\n" "Content-Transfer-Encoding: 8bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÎÃÍ¤Ï %d...%d ¤ÎÈϰϤˤʤ±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\t¥¢¥¯¥»¥¹¸¢¸Â : " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\t°À­ : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-D̾Á°[=ÃÍ]] [-i ¥µ¥¤¥º] [-I [-K Éÿô]] [-Y ¥Ñ¥¹] ÆþÎÏ¥Õ¥¡¥¤¥ë\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o ½ÐÎÏ¥Õ¥¡¥¤¥ë] [ÆþÎÏ¥Õ¥¡¥¤¥ë]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n netid]* [-o ½ÐÎÏ¥Õ¥¡¥¤¥ë] [ÆþÎÏ¥Õ¥¡¥¤¥ë]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s ¥Í¥Ã¥È¥¿¥¤¥×]* [-o ½ÐÎÏ¥Õ¥¡¥¤¥ë] [ÆþÎÏ¥Õ¥¡¥¤¥ë]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\t¥¢¥¯¥»¥¹¸¢¸Â : " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\t¥¨¥ó¥È¥ê¥Ç¡¼¥¿¤Î·¿ %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\t̾Á° : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\t¸ø³«¸° : " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\t·¿ : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\t¥æ¥Ë¥Ð¡¼¥µ¥ë¥¢¥É¥ì¥¹ (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\t̾Á° : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u¥Ð¥¤¥È] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -109,11 +115,11 @@ msgstr "" "%15ld%% ¥­¥ã¥Ã¥·¥å¤Î¥Ò¥Ã¥ÈΨ\n" "%15s /etc/%s¤ÎÊѹ¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\n¥°¥ë¡¼¥×¥á¥ó¥Ð :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nÀ¸Â¸»þ´Ö : " @@ -141,7 +147,7 @@ msgstr " ¤¤¤¤¤¨" msgid " yes" msgstr " ¤Ï¤¤" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " ¥Ç¡¼¥¿Ä¹ = %u\n" @@ -198,15 +204,15 @@ msgstr " ¥×¥í¥°¥é¥à ¥Ð¡¼¥¸¥ç¥ó ¥×¥í¥È¥ msgid " or: " msgstr " Ëô¤Ï: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (¥¹¥­¥Ã¥×)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (Êѹ¹)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (\"%s\"¤«¤é¤Îµ¬Â§, %d¹Ô)" @@ -215,22 +221,22 @@ msgstr " (\"%s\"¤«¤é¤Îµ¬Â§, %d¹Ô)" msgid " [OPTION...]" msgstr " [¥ª¥×¥·¥ç¥ó...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", %d¹Ô: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "\"Zone %s\"¹Ô¤È -l ¥ª¥×¥·¥ç¥ó¤ÏƱ»þ»ØÄê¤Ç¤­¤Þ¤»¤ó" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "\"Zone %s\"¹Ô¤È -p ¥ª¥×¥·¥ç¥ó¤ÏƱ»þ»ØÄê¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "¥Æ¥ó¥×¥ì¡¼¥ÈÀ¸À®¥Õ¥é¥°¤Ë¤Ï\"ÆþÎÏ¥Õ¥¡¥¤¥ë\"¤¬É¬ÍפǤ¹.\n" @@ -244,58 +250,58 @@ msgstr "%.*s: ARGP_HELP_FMT ¥Ñ¥é¥á¡¼¥¿¤Ë msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: ÉÔÌÀ¤Ê ARGP_HELP_FMT ¥Ñ¥é¥á¡¼¥¿" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: ÄêµÁ¤¬ `END %1$s' ¤Ç½ª¤Ã¤Æ¤¤¤Þ¤»¤ó" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d ¥é¥¤¥Ö¥é¥ê¤¬¥­¥ã¥Ã¥·¥å `%s ¤Ç¸«¤Ä¤«¤ê¤Þ¤·¤¿\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s in ruleless zone" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s ¤Ï32¥Ó¥Ã¥ÈELF¥Õ¥¡¥¤¥ë¤Ç¤¹.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s ¤Ï64¥Ó¥Ã¥ÈELF¥Õ¥¡¥¤¥ë¤Ç¤¹.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s ¤Ï̤ÃΤΥޥ·¥ó %d ¤ËÂФ¹¤ë¤â¤Î¤Ç¤¹.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s ¤Ï̤ÃΤΥ饤¥Ö¥é¥ê¥¿¥¤¥×¤Ç¤¹" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s ¤Ï¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó (¥¿¥¤¥×: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s ¤Ï¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s ¤ÏELF¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó - ´Ö°ã¤Ã¤¿magic¥Ð¥¤¥È¤ò¥Õ¥¡¥¤¥ë¤ÎÀèÆ¬¤Ë»ý¤Ã¤Æ¤¤¤Þ¤¹.\n" @@ -315,12 +321,12 @@ msgstr "%s%s%s:%u: %s%sͽ´ü¤·¤Ê¤¤¥¨¥é¡¼: msgid "%s%sUnknown signal %d\n" msgstr "%s%s̤ÃΤΥ·¥°¥Ê¥ë %d ¤Ç¤¹\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d ¤ÏÀµ¤·¤¯µ­¹æ¤ò³ÈÄ¥¤·¤Þ¤»¤ó¤Ç¤·¤¿\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: ¤Ï¤è¤êÂ礭¤¯¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó\n" @@ -335,87 +341,82 @@ msgstr "%s: C ¥×¥ê¥×¥í¥»¥Ã¥µ¤Ï½ªÎ»¥³¡¼¥É msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: C ¥×¥ê¥×¥í¥»¥Ã¥µ¤Ï¥·¥°¥Ê¥ë %d ¤Ç¼ºÇÔ¤·¤Þ¤·¤¿\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: %s¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: ¥Ç¥£¥ì¥¯¥È¥ê%s¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: %s¤«¤é%s¤Ø¥ê¥ó¥¯¤òÄ¥¤ì¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: %s¤ò³«¤±¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: %s¤òºï½ü¤Ç¤­¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: %s¤ò¥¢¥ó¥ê¥ó¥¯¤Ç¤­¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: %s¤ò¥¯¥í¡¼¥ºÃæ¤Ë¥¨¥é¡¼: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: %s¤ÎÆÉ¤ß¹þ¤ß¥¨¥é¡¼\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: ½ñ¤­¹þ¤ß¥¨¥é¡¼ " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: %s¤Î½ñ¤­¹þ¤ß¥¨¥é¡¼¤Ç¤¹\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: ±¼ÉÃ¥Õ¥¡¥¤¥ë¤Ç¤Ê¤¤¥Õ¥¡¥¤¥ë %s ¤Ë Leap ¹Ô¤¬¤¢¤ê¤Þ¤¹\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: -L ¥ª¥×¥·¥ç¥ó¤¬Ê£¿ô»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: -d ¥ª¥×¥·¥ç¥ó¤¬Ê£¿ô»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: -l ¥ª¥×¥·¥ç¥ó¤¬Ê£¿ô»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: -p ¥ª¥×¥·¥ç¥ó¤¬Ê£¿ô»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: -y ¥ª¥×¥·¥ç¥ó¤¬Ê£¿ô»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹\n" @@ -431,7 +432,7 @@ msgstr "%s: °ú¿ô¤¬Â¿¤¹¤®¤Þ¤¹\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: `%s'¤Ï½Å¤ßÄêµÁ %d Ãæ¤ÇÊ£¿ô²ó»È¤ï¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s'¤Ïñ°ì¤Î¥­¥ã¥é¥¯¥¿¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" @@ -442,7 +443,7 @@ msgstr "%s: `%s'¤Ïñ°ì¤Î¥­¥ã¥é¥¯¥¿¤Ç¤Ê¤± msgid "%s: `%s' value does not match `%s' value" msgstr "%s: `%s'ÃͤÏ`%s'¤ÎÃͤ˥ޥåÁ¤·¤Þ¤»¤ó" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1'¤Ï`%s'¥Õ¥£¡¼¥ë¥É¤Î¡¢ºÇ¸å¤Î¹àÌܤǤʤ±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" @@ -452,100 +453,100 @@ msgstr "%s: `-1'¤Ï`%s'¥Õ¥£¡¼¥ë¥É¤Î¡¢ºÇ¸å msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: `forward' ¤È `backward' ¤ÏÇÓ¾Ū¤Ç¤¹" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position'¤ÏÆÃÄê¥ì¥Ù¥ë¤ËÂФ·¡¢Á´¥»¥¯¥·¥ç¥ó¤Ç»ÈÍѤ«Ì¤»ÈÍѤ«¤Î¤É¤Á¤é¤«¤Ç¤¹" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: `translit_start' ¥»¥¯¥·¥ç¥ó¤¬ `translit_end' ¤Ç½ª¤Ã¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: ¥·¡¼¥±¥ó¥¹Ãæ¤ÎºÇ½é¤Îʸ»ú¤Î¥Ð¥¤¥È¥·¡¼¥±¥ó¥¹¤ÏºÇ¸å¤Îʸ»ú¤Î¤è¤ê¤âlower¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: ºÇ½é¤ÈºÇ¸å¤Îʸ»ú¤Î¥Ð¥¤¥È¥·¡¼¥±¥ó¥¹¤ÏƱ°ìĹ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: ¾Êάµ­¹æ¤ÎÈϰϤνª¤ï¤ê¤Ë`%s'¤¬¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: %.*s¤Î¸å¤ÇºÆÊ¤ÓÂØ¤¨¤¬¤Ç¤­¤Þ¤»¤ó: ̤ÃΤΥ·¥ó¥Ü¥ë¤Ç¤¹" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: ¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×Ãæ¤Îʸ»ú`%s'¤Ï1¥Ð¥¤¥È¤Çɽ¸½¤Ç¤­¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: ¥Ç¥Õ¥©¥ë¥ÈÃͤȤ·¤ÆÉ¬Íפʥ­¥ã¥é¥¯¥¿`%s'¤Ï1¥Ð¥¤¥È¤Çɽ¸½¤Ç¤­¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: ¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×Ãæ¤Çʸ»ú`%s'¤¬Ì¤ÄêµÁ¤Ç¤¹¤¬¥Ç¥Õ¥©¥ë¥ÈÃͤȤ·¤ÆÉ¬ÍפǤ¹" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: ¥­¥ã¥é¥¯¥¿`%s'¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¥Ç¥Õ¥©¥ë¥ÈÃͤȤ·¤ÆÉ¬ÍפǤ¹" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: ¥³¥Þ¥ó¥É¤Ï'%s', ·ë²Ì¤Ï %d¤Ç¤·¤¿\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÃæ¤Îʸ»úÎó %Zd Æâ¤ÎÊý¸þ¥Õ¥é¥°¤¬'+'¤Ç¤â'-'¤Ç¤â¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÆâ¤Îʸ»úÎó %Zd ¤ÎÊý¸þ¥Õ¥é¥°¤¬Ã±°ìʸ»ú¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: `default_missing'ÄêµÁ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: ¥«¥Æ¥´¥ê¥Ð¡¼¥¸¥ç¥ó¤ÎÄêµÁ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: ¥»¥¯¥·¥ç¥ó`%s'¤Îµ­½Ò¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: `%s'¤ÎÄêµÁ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: ¶õ¤Î¥«¥Æ¥´¥êµ­½Ò¤Ïµö¤µ¤ì¤Æ¤Þ¤»¤ó" @@ -555,19 +556,27 @@ msgstr "%s: ¶õ¤Î¥«¥Æ¥´¥êµ­½Ò¤Ïµö¤µ¤ì¤Æ¤Þ msgid "%s: empty weight string not allowed" msgstr "%s: ¶õ¤Î½Å¤ßʸ»úÎó¤Ïµö¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: ¾õÂÖµ¡³£Ãæ¤Ç¥¨¥é¡¼" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤¬Ê£¿ô²óÀë¸À¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤Ï¤­¤Ã¤«¤ê10¹àÌÜʬ´Þ¤ó¤Ç¤¤¤Þ¤»¤ó" @@ -579,14 +588,18 @@ msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤Ï¤­¤Ã¤«¤ê10¹à msgid "%s: field `%s' must not be empty" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤Ï¶õ¤Ç¤Ï¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -596,39 +609,40 @@ msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÏÄêµÁ¤µ¤ì¤Æ¤¤ msgid "%s: field `%s' undefined" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤Ï̤ÄêµÁ¤Ç¤¹" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÃæ¤Îʸ»úÎó %Zd Æâ¤Î¥ª¥Õ¥»¥Ã¥ÈÃͤκǸå¤Ë¥´¥ß¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÃæ¤Îʸ»úÎó %Zd Æâ¤Î³«»ÏÆüÉդκǸå¤Ë¥´¥ß¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÃæ¤Îʸ»úÎó %Zd Æâ¤Î½ªÎ»ÆüÉդκǸå¤Ë¥´¥ß¤¬¤¢¤ê¤Þ¤¹" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó¤Ç¤¹ -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: ÉÔ´°Á´¤Ê`END'¹Ô¤Ç¤¹" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" -msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'Ãæ¤ÇÉÔÀµ¤Ê¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹`%%%c'¤Ç¤¹" +msgstr "%s: ÉÔÀµ¤Ê¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹`%%%c'¤¬¥Õ¥£¡¼¥ë¥É`%s'Ãæ¤Ë¤¢¤ê¤Þ¤¹" #: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126 #: locale/programs/ld-telephone.c:150 @@ -636,27 +650,27 @@ msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'Ãæ¤ÇÉÔÀµ¤Ê¥¨¥¹ msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'Ãæ¤ÎÉÔÀµ¤Ê¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤Ç¤¹" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÆâ¤Îʸ»úÎó %Zd Æâ¤Î¥ª¥Õ¥»¥Ã¥È¤ËÂФ¹¤ëÈֹ椬ÉÔÀµ¤Ç¤¹" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: ʤÓÂØ¤¨µ¬Â§¤ÎÈֹ椬ÉÔÀµ¤Ç¤¹" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó¤¬°ã¤¤¤Þ¤¹ -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥ÉÃæ¤Ë¤¢¤ëʸ»úÎó %Zd Æâ¤Î³«»ÏÆüÉÕ¤¬ÉÔÀµ¤Ç¤¹" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥É¤Ë¤¢¤ëʸ»úÎó %Zd Æâ¤Î½ªÎ»ÆüÉÕ¤¬ÉÔÀµ¤Ç¤¹" @@ -671,38 +685,38 @@ msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ËÂФ¹¤ëÉÔÀµ¤Ê msgid "%s: language abbreviation `%s' not defined" msgstr "%s: ¸À¸ì̾¾Êά·Á `%s'¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: `order_end'¥­¡¼¥ï¡¼¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: `reorder-end'¥­¡¼¥ï¡¼¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: `reorder-sections-end'¥­¡¼¥ï¡¼¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥É¤Ë¤¢¤ëʸ»úÎó %Zd Æâ¤Îera¥Õ¥©¡¼¥Þ¥Ã¥È¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥É¤Ë¤¢¤ëʸ»úÎó %Zd Æâ¤Îera̾¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: ¥»¥¯¥·¥ç¥ó`%s'¤ËÂФ¹¤ëʤÓÂØ¤¨ÄêµÁ¤¬Ê£¿ô¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: ̾Á°¤Î¤Ê¤¤¥»¥¯¥·¥ç¥ó¤ËÂФ¹¤ëʤÓÂØ¤¨ÄêµÁ¤¬Ê£¿ô¤¢¤ê¤Þ¤¹" @@ -717,7 +731,7 @@ msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ËÂФ¹¤ëÀµµ¬É½ msgid "%s: no identification for category `%s'" msgstr "%s: ¥«¥Æ¥´¥ê`%s'¤ËÂФ¹¤ëidentification¤¬¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: ɽ¸½²Äǽ¤Ê`default_missing'ÄêµÁ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" @@ -732,52 +746,52 @@ msgstr "%s: ʤÓÂØ¤¨µ¬Â§¤¬ÉÔ½½Ê¬¤Ç¤¹" msgid "%s: numeric country code `%d' not valid" msgstr "%s: ¹ñ¥³¡¼¥ÉÈÖ¹æ`%d'¤ÏÉÔÀµ¤Ç¤¹" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó`%c%s'¤Ï°ú¿ô¤ò¤È¤ê¤Þ¤»¤ó\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó`%s'¤ÏÛ£Ëæ¤Ç¤¹\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó`%s'¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó`--%s'¤Ï°ú¿ô¤ò¤È¤ê¤Þ¤»¤ó\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó`-W %s'¤Ï°ú¿ô¤ò¤È¤ê¤Þ¤»¤ó\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤¬Û£Ëæ¤Ç¤¹\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: ¥ª¥×¥·¥ç¥ó¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹ -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: `%.*s'¤ËÂФ¹¤ëʤÙÂØ¤¨¤Ï¤¹¤Ç¤Ë %s:%Zu ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: ¾È¹çÍ×ÁÇ %.*s ¤ËÂФ¹¤ëʤÙÂØ¤¨¤¬¤Þ¤ÀÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: ¾È¹ç¥·¥ó¥Ü¥ë %.*s ¤ËÂФ¹¤ëʤÙÂØ¤¨¤¬¤Þ¤ÀÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -787,84 +801,84 @@ msgstr "%s: ¾È¹ç¥·¥ó¥Ü¥ë %.*s ¤ËÂФ¹¤ëÊ msgid "%s: output would overwrite %s\n" msgstr "%s: ½ÐÎÏ¤Ï %s ¤ò¾å½ñ¤­¤·¤Æ¤·¤Þ¤¦¤«¤â¤·¤ì¤Þ¤»¤ó\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: ¥Ñ¥Ë¥Ã¥¯: ÉÔÅö¤Ê l_value(%d)¤Ç¤¹\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s ¥Õ¥¡¥¤¥ë½ªÃ¼¤¬Á᤹¤®¤Þ¤¹" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: ¥»¥¯¥·¥ç¥ó`%.*s'¤Ï̤ÃΤǤ¹" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥É¤Ë¤¢¤ëʸ»úÎó %Zd Ãæ¤Î³«»ÏÆü¤ÏÉÔÀµ¤Ç¤¹" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: `era'¥Õ¥£¡¼¥ë¥É¤Ë¤¢¤ëʸ»úÎó %Zd Ãæ¤Î½ªÎ»Ç¯¤ÏÉÔÀµ¤Ç¤¹" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" -msgstr "%s: ¥·¥ó¥Ü¥ë¤ÎÈϰϤξÊά¤Ï`order_end'¤Î¤¹¤°¸å¤Ë³¤¤¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" +msgstr "%s: ¥·¥ó¥Ü¥ëÈϰϾÊάµ­¹æ¤Ï`order_end'¤Î¤¹¤°¸å¤Ë³¤¤¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: ¥·¥ó¥Ü¥ë¤ÎÈϰϤξÊά¤Ï`order_start'¤Î¤¹¤°¸å¤ËÃÖ¤¤¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: ʸˡ¥¨¥é¡¼" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: ¿·¤·¤¤¥­¥ã¥é¥¯¥¿¥¯¥é¥¹¤ÎÄêµÁÃæ¤Ëʸˡ¥¨¥é¡¼¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: ¿·¤·¤¤¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¤ÎÄêµÁÃæ¤Ëʸˡ¥¨¥é¡¼¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: ¥¯¥é¥¹ \"%s\" ¤ËÂФ¹¤ë¥Æ¡¼¥Ö¥ë: %lu ¥Ð¥¤¥È\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: ¥Þ¥Ã¥× \"%s\" ¤ËÂФ¹¤ë¥Æ¡¼¥Ö¥ë: %lu ¥Ð¥¤¥È\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: width ¤ËÂФ¹¤ë¥Æ¡¼¥Ö¥ë: %lu ¥Ð¥¤¥È\n" @@ -874,16 +888,21 @@ msgstr "%s: width ¤ËÂФ¹¤ë¥Æ¡¼¥Ö¥ë: %lu msgid "%s: terminology language code `%s' not defined" msgstr "%s: terminology¸À¸ì¥³¡¼¥É`%s'¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: ¤¢¤ëÈϰϤγ«»Ï¡¦½ªÎ»¥·¥ó¥Ü¥ë¤Ï¥­¥ã¥é¥¯¥¿¤Ë´ð¤Å¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÎÃͤËÂФ¹¤ë£³ÈÖÌܤΥª¥Ú¥é¥ó¥É¤Ï %d ¤è¤ê¤âÂ礭¤¯¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ËÂФ·¤Æ¾¯¤Ê¤¹¤®¤ëÃͤǤ¹" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -894,7 +913,12 @@ msgstr "%s: µ¬Â§¤¬Â¿¤¹¤®¤Þ¤¹; ºÇ½é¤Î¥¨¥ó msgid "%s: too many values" msgstr "%s: °ú¿ô¤¬Â¿¤¹¤®¤Þ¤¹" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ËÂФ·¤ÆÂ¿¤¹¤®¤ëÃͤǤ¹" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: ¥í¥±¡¼¥ë`%s'¤Ç¤Îtransliteration¥Ç¡¼¥¿¤ÏÍøÍѲÄǽ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" @@ -904,47 +928,52 @@ msgstr "%s: ¥í¥±¡¼¥ë`%s'¤Ç¤Îtransliterat msgid "%s: unable to open %s: %m\n" msgstr "%s: %s ¤ò³«¤±¤Þ¤»¤ó: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: ¾È¹ç¥·¥ó¥Ü¥ëÌ¾Ãæ¤Ë̤ÃΤÎʸ»ú¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: Åù²Á¤ÊÄêµÁÌ¾Ãæ¤Ë̤ÃΤÎʸ»ú¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: Åù²Á¤ÊÄêµÁÃÍÃæ¤Ë̤ÃΤÎʸ»ú¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'Ãæ¤Ë̤ÃΤÎʸ»ú¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: ̤ÃΤΥ»¥¯¥·¥ç¥ó̾`%s'¤Ç¤¹" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: Åù²Á¤ÊÄêµÁÃæ¤Ç̤ÃΤΥ·¥ó¥Ü¥ë`%s'¤¬¤¢¤ê¤Þ¤·¤¿" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó`%c%s'¤Ç¤¹\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó`--%s'¤Ç¤¹\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -958,6 +987,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: »ÈÍÑË¡ %s [ -v ] [ -c ¥«¥Ã¥È¥ª¥Õ ] ¥¾¡¼¥ó̾ ¡Å¡Å\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÎÃͤϥ·¥ó¥°¥ë¥­¥ã¥é¥¯¥¿¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÎÃÍ¤Ï %d...%d ¤ÎÈϰϤˤʤ±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -978,17 +1017,17 @@ msgstr "%s: ¥Õ¥£¡¼¥ë¥É`int_curr_symbol'¤ msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`int_curr_symbol'¤ÎÃͤÎŤµ¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ËÂФ¹¤ëÃͤÏ127°Ê²¼¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÎÃÍ¤Ï %d °Ê¾å¤Ç¤¢¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: ¥Õ¥£¡¼¥ë¥É`%s'¤ÎÃÍ¤Ï %d °Ê¾å¤Ç¤¢¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" @@ -1011,11 +1050,11 @@ msgstr "(¥×¥í¥°¥é¥à¥¨¥é¡¼) ̤ÃΤΥС¼¥¸¥ msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(¥×¥í¥°¥é¥à¥¨¥é¡¼) ¥ª¥×¥·¥ç¥ó¤Ïǧ¼±¤µ¤ì¤Æ¤¤¤ë¤Ù¤­¤Ç¤¹!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(ÉÔÌÀ¤Ê¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(ÉÔÌÀ¤Êǧ¾Ú¥¨¥é¡¼ - %d)" @@ -1033,6 +1072,11 @@ msgstr "*** ¥Õ¥¡¥¤¥ë `%s' ¤Ï strip ¤µ¤ì¤ msgid "*standard input*" msgstr "*ɸ½àÆþÎÏ*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1046,16 +1090,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "a.out Ãæ¤Î .lib ¥»¥¯¥·¥ç¥ó¤¬²õ¤ì¤Æ¤¤¤Þ¤¹" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; low ¥Ð¡¼¥¸¥ç¥ó = %lu, high ¥Ð¡¼¥¸¥ç¥ó = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; Íýͳ = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> ¤È <%s> ¤ÏÈϰϤȤ·¤ÆÉÔÀµ¤Ê̾Á°¤Ç¤¹" @@ -1065,12 +1109,12 @@ msgstr "<%s> ¤È <%s> ¤ÏÈϰϤȤ·¤ÆÉÔÀµ¤ÊÌ msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> ¤È <%s> ¤ÏÈϰϤȤ·¤ÆÉÔÀµ¤Ê̾Á°¤Ç¤¹" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr " ʸ»ú¤Ï¥¯¥é¥¹ `%s' ¤Ë¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr " ʸ»ú¤Ï¥¯¥é¥¹ `%s' ¤Ë¤¢¤ê¤Þ¤»¤ó" @@ -1086,7 +1130,7 @@ msgstr "?" msgid "Aborted" msgstr "¥¢¥Ü¡¼¥È¤·¤Þ¤·¤¿" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "¥¢¥¯¥»¥¹¸¢¸Â : " @@ -1124,6 +1168,10 @@ msgstr "Advertise¥¨¥é¡¼" msgid "Alarm clock" msgstr "¥¢¥é¡¼¥à¥¯¥í¥Ã¥¯" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Á´¤Æ¤ÎÍ×µá¤Ï´°Î»¤·¤Þ¤·¤¿" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "¥È¡¼¥¿¥ë¥á¥â¥ê¤Î¾ÃÈñ¤ËÂФ¹¤ë¥°¥é¥Õ¤âÉÁ¤­¤Þ¤¹" @@ -1132,7 +1180,7 @@ msgstr "¥È¡¼¥¿¥ë¥á¥â¥ê¤Î¾ÃÈñ¤ËÂФ¹¤ë¥°¥é msgid "Anode table overflow" msgstr "¥¢¥Î¡¼¥É¥Æ¡¼¥Ö¥ë¥ª¡¼¥Ð¡¼¥Õ¥í¡¼" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "¥Æ¥¹¥È¤Î¤¿¤á¤Î¾¤Îʸ»úÎó." @@ -1164,7 +1212,7 @@ msgstr "¥·¥¹¥Æ¥à¤ÎÀ©¸Â°Ê¾å¤Î¶¦Í­¥é¥¤¥Ö¥é msgid "Attempting to link in too many shared libraries" msgstr "¤¢¤Þ¤ê¤Ë¿²á¤®¤ë¶¦Í­¥é¥¤¥Ö¥é¥ê¤Ø¥ê¥ó¥¯¤·¤è¤¦¤È¤·¤Æ¤¤¤Þ¤¹" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "ǧ¾Ú OK" @@ -1173,7 +1221,7 @@ msgstr "ǧ¾Ú OK" msgid "Authentication error" msgstr "ǧ¾Ú¥¨¥é¡¼¤Ç¤¹" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "BOGUS OBJECT\n" @@ -1228,7 +1276,7 @@ msgstr "ai_flags ¤ÎÃͤ¬ÉÔÀµ¤Ç¤¹" msgid "Be strictly POSIX conform" msgstr "¸·Ì©¤ËPOSIXµ¬³Ê¤Ë½¾¤¦" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "¥Ð¥¤¥Ê¥ê¥Ç¡¼¥¿\n" @@ -1260,10 +1308,6 @@ msgstr "¥Ñ¥¤¥×¤¬ÀÚÃǤµ¤ì¤Þ¤·¤¿" msgid "Bus error" msgstr "¥Ð¥¹¥¨¥é¡¼" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "CPU»þ´ÖÀ©¸Â¤òĶ²á¤·¤Þ¤·¤¿" @@ -1281,77 +1325,82 @@ msgstr "ɬÍפʶ¦Í­¥é¥¤¥Ö¥é¥ê¤Ë¥¢¥¯¥»¥¹¤Ç msgid "Can not exec a shared library directly" msgstr "¶¦Í­¥é¥¤¥Ö¥é¥ê¤ÏľÀܼ¹ԤǤ­¤Þ¤»¤ó" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "¤³¤Î¥É¥á¥¤¥ó¤ò°·¤¦¥µ¡¼¥Ð¤Ø¥Ð¥¤¥ó¥É¤Ç¤­¤Þ¤»¤ó" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "/ ¤Ëchdir¤Ç¤­¤Þ¤»¤ó" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "¥Ý¡¼¥È¥Þ¥Ã¥Ñ¡¼¤ÈÄÌ¿®¤Ç¤­¤Þ¤»¤ó" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "ypbind¤ÈÄÌ¿®¤Ç¤­¤Þ¤»¤ó" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "ypserv¤ÈÄÌ¿®¤Ç¤­¤Þ¤»¤ó" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "¥Æ¥ó¥Ý¥é¥ê¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë %s ¤¬ºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "%s ¤ò¸«¤Ä¤±¤é¤ì¤Þ¤»¤ó" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "%s ¤«¤é %s ¤Ø¥ê¥ó¥¯¤òÄ¥¤ì¤Þ¤»¤ó" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "lstat %s ¤Ç¤­¤Þ¤»¤ó" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¥Ç¥£¥ì¥¯¥È¥ê %s ¤ò³«¤±¤Þ¤»¤ó\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "ÀßÄê¥Õ¥¡¥¤¥ë %s ¤ò³«¤±¤Þ¤»¤ó" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "¥Ç¥£¥ì¥¯¥È¥ê %s ¤ò³«¤±¤Þ¤»¤ó" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "¸Å¤¤¥Æ¥ó¥Ý¥é¥ê¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë %s ¤òºï½ü¤Ç¤­¤Þ¤»¤ó" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "stat %s ¤¬¤Ç¤­¤Þ¤»¤ó" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "stat %s ¤¬¤Ç¤­¤Þ¤»¤ó\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "%s ¤ò¥¢¥ó¥ê¥ó¥¯¤Ç¤­¤Þ¤»¤ó" @@ -1378,16 +1427,21 @@ msgstr "¥Ö¥í¡¼¥É¥­¥ã¥¹¥ÈRPC¤Î¤¿¤á¤Î¥½¥±¥ msgid "Cannot exec a shared library directly" msgstr "¶¦Í­¥é¥¤¥Ö¥é¥ê¤ÏľÀܼ¹ԤǤ­¤Þ¤»¤ó" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "¥Õ¥¡¥¤¥ë %s ¤ò fstat ¤Ç¤­¤Þ¤»¤ó.\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "¥Õ¥¡¥¤¥ëÀ¸À®¥Õ¥é¥°¤ÏÊ£¿ô»ØÄê¤Ç¤­¤Þ¤»¤ó!\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "lstat %s ¤Ç¤­¤Þ¤»¤ó" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "¥Õ¥¡¥¤¥ë %s ¤òmmap¤Ç¤­¤Þ¤»¤ó.\n" @@ -1421,33 +1475,38 @@ msgstr "¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó SO_BROADCAST msgid "Cannot specify more than one input file!\n" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë¤òÊ£¿ô»ØÄê¤Ç¤­¤Þ¤»¤ó!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "stat %s ¤¬¤Ç¤­¤Þ¤»¤ó" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "inetd ¥Õ¥é¥°¤È¤È¤â¤Ë netid ¥Õ¥é¥°¤Ï»È¤¨¤Þ¤»¤ó!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "TIRPC ¤Ê¤·¤Ë netid ¥Õ¥é¥°¤Ï»È¤¨¤Þ¤»¤ó!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "¿··Á¼°¤ò¤â¤Ä¥Æ¡¼¥Ö¥ë¥Õ¥é¥°¤Ï»È¤¨¤Þ¤»¤ó!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "¥ë¡¼¥È¥Ç¥£¥ì¥¯¥È¥ê¤È¤·¤ÆROOT¤ò»ÈÍѤ·¡¢¤½¤³¤ØÊѹ¹¤·¤Þ¤¹" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "%s ¤Î¥¢¥¯¥»¥¹¸¢¸Â¤ò 0644 ¤ØÊѹ¹¤¹¤ë¤Î¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" +msgid "Changing access rights of %s to %#o failed" +msgstr "%s ¤Î¥¢¥¯¥»¥¹¸¢¸Â¤ò %#o ¤ØÊѹ¹¤¹¤ë¤Î¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "¥Á¥ã¥ó¥Í¥ëÈֹ椬Èϰϳ°¤Ç¤¹" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "ʸ»ú¥»¥Ñ¥ì¡¼¥¿ : %c\n" @@ -1456,11 +1515,11 @@ msgstr "ʸ»ú¥»¥Ñ¥ì¡¼¥¿ : %c\n" msgid "Child exited" msgstr "»Ò¥×¥í¥»¥¹¤¬½ªÎ»¤·¤Þ¤·¤¿" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "¥¯¥é¥¤¥¢¥ó¥È¤Î¿®Ç¤¤¬¼å¤¹¤®¤Þ¤¹" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "¥«¥é¥à :\n" @@ -1478,7 +1537,7 @@ msgstr "¥í¥±¡¼¥ë»ÅÍͤò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë" msgid "Computer bought the farm" msgstr "¥³¥ó¥Ô¥å¡¼¥¿¤¬¡ÖÀï»à¡×¤·¤Þ¤·¤¿" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "¥À¥¤¥Ê¥ß¥Ã¥¯¥ê¥ó¥«¤Î¥é¥ó¥¿¥¤¥à¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀßÄꤷ¤Þ¤¹." @@ -1508,14 +1567,14 @@ msgstr "Àܳ¥¿¥¤¥à¥¢¥¦¥È¤Ç¤¹" msgid "Continued" msgstr "·Ñ³" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Í¿¤¨¤é¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤òÊÑ´¹¤¹¤ë." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1537,6 +1596,10 @@ msgstr "¥í¥°¥Õ¥¡¥¤¥ë\"%s\"¤òºîÀ®¤Ç¤­¤Þ¤» msgid "Create C header file NAME containing symbol definitions" msgstr "¥·¥ó¥Ü¥ëÄêµÁ¤ò´Þ¤ó¤À C ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë NAME ¤òºîÀ®" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "¹â®ÆÉ¹þ¤ßÍÑ iconv ¥â¥¸¥å¡¼¥ëÀßÄê¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹." + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "¸Å¤¤·Á¼°¤Î¥Æ¡¼¥Ö¥ë¤òºîÀ®" @@ -1545,7 +1608,7 @@ msgstr "¸Å¤¤·Á¼°¤Î¥Æ¡¼¥Ö¥ë¤òºîÀ®" msgid "Create output even if warning messages were issued" msgstr "·Ù¹ð¥á¥Ã¥»¡¼¥¸¤¬¤¢¤Ã¤Æ¤â½ÐÎϤòºîÀ®" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "ºîÀ®Æü»þ : %s" @@ -1564,19 +1627,11 @@ msgstr "¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë [½ÐÎÏ¥Õ¥¡¥¤¥ë]" msgid "DES entry for netname %s not unique\n" msgstr "¥Í¥Ã¥È̾ %s ¤Î DES ¥¨¥ó¥È¥ê¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "¥Ç¥£¥ì¥¯¥È¥ê\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "DST¤ÏSUID/SGID¥×¥í¥°¥é¥àÃæ¤Ç¤Ïµö¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -1588,7 +1643,7 @@ msgstr "¥À¥¤¥Ê¥ß¥Ã¥¯¥ê¥ó¥«¤Î¥Ð¥°!!!" msgid "Database for table does not exist" msgstr "¥Æ¡¼¥Ö¥ë¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Â¸ºß¤·¤Þ¤»¤ó" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹" @@ -1596,7 +1651,7 @@ msgstr "¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹" msgid "Deadlock situation detected/avoided" msgstr "¥Ç¥Ã¥É¥í¥Ã¥¯¾õÂÖ¤ò¸¡ÃÎ/²óÈò¤·¤Þ¤·¤¿" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "¥Ç¥Õ¥©¥ë¥È¥¢¥¯¥»¥¹¸¢¸Â :\n" @@ -1623,12 +1678,12 @@ msgstr "¥Ç¥Ð¥¤¥¹¤Ï¥¹¥È¥ê¡¼¥à·¿¤Ç¤Ï¤¢¤ê¤Þ msgid "Device or resource busy" msgstr "¥Ç¥Ð¥¤¥¹¤â¤·¤¯¤Ï¥ê¥½¡¼¥¹¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d ¥Ó¥Ã¥È)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "¥Ç¥£¥ì¥¯¥È¥ê : %s\n" @@ -1657,15 +1712,15 @@ msgstr "¥Õ¥©¡¼¥¯¤·¤Ê¤¤¤Ç¸½ºß¤Îtty¤Ë¥á¥Ã¥ msgid "Do not use existing catalog, force new output file" msgstr "´û¸¤Î¥«¥¿¥í¥°¤ò»ÈÍѤ»¤º¡¢¶¯À©Åª¤Ë¿·¤·¤¤½ÐÎÏ¥Õ¥¡¥¤¥ë¤Ë¤·¤Þ¤¹" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "¥É¥á¥¤¥ó¤Ï¥Ð¥¤¥ó¥É¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "¥­¥ã¥Ã¥·¥å¤Î¹½ÃÛ¤ò¹Ô¤ï¤Ê¤¤" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "¥ê¥ó¥¯¤òÀ¸À®¤·¤Ê¤¤" @@ -1673,31 +1728,31 @@ msgstr "¥ê¥ó¥¯¤òÀ¸À®¤·¤Ê¤¤" msgid "Dump information generated by PC profiling." msgstr "PC¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤ë¾ðÊó¤ò¥À¥ó¥×." -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "ELF¥Õ¥¡¥¤¥ë¤ÎABI¥Ð¡¼¥¸¥ç¥ó¤¬ÉÔÀµ¤Ç¤¹." -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ELF¥Õ¥¡¥¤¥ë¤ÎOS ABI¤¬ÉÔÀµ¤Ç¤¹." -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "ELF¥Õ¥¡¥¤¥ë¤Î¥Ð¡¼¥¸¥ç¥óÈֹ椬¸½ºß¤Î¥Õ¥¡¥¤¥ë¤Ë°ìÃפ·¤Æ¤¤¤Þ¤»¤ó" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "ELF¥Õ¥¡¥¤¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¼±Ê̻Ҥϸ½ºß¤Î¥Õ¥¡¥¤¥ë¤Ë°ìÃפ·¤Æ¤¤¤Þ¤»¤ó" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "ELF¥Õ¥¡¥¤¥ë¤Îphentsize¤Ï´üÂÔ¤µ¤ì¤ë¥µ¥¤¥º¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "ELF¥í¡¼¥É¥³¥Þ¥ó¥É¤Î¥¢¥É¥ì¥¹/¥ª¥Õ¥»¥Ã¥È¤ÏŬÀڤ˥¢¥é¥¤¥ó¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "ELF¥í¡¼¥É¥³¥Þ¥ó¥É¤Î¥¢¥é¥¤¥ó¥á¥ó¥È¤Ï¥Ú¡¼¥¸¥¢¥é¥¤¥ó¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -1705,11 +1760,11 @@ msgstr "ELF¥í¡¼¥É¥³¥Þ¥ó¥É¤Î¥¢¥é¥¤¥ó¥á¥ó¥ msgid "EMT trap" msgstr "EMT ¥È¥é¥Ã¥×" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "¥¨¥ó¥È¥ê\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "°Å¹æ²½¥Ç¡¼¥¿\n" @@ -1863,7 +1918,11 @@ msgstr "ÉÔÌÀ¤Ê¥¨¥é¡¼¥·¥¹¥Æ¥à¤Ç¤Î¥¨¥é¡¼:" msgid "Error while talking to callback proc" msgstr "¥³¡¼¥ë¥Ð¥Ã¥¯¥×¥í¥·¡¼¥¸¥ã¤ÈÄÌ¿®Ãæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "¥¨¥é¡¼¤òɸ½à½ÐÎϤ˽ñ¤­½Ð¤·Ãæ" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "¥¨¥é¡¼: ¥Õ¥¡¥¤¥ë.netrc¤¬Â¾¼Ô¤Ë¤è¤Ã¤ÆÆÉ¤ß¹þ¤ßµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤¹" @@ -1886,7 +1945,7 @@ msgstr "Ã×̿Ū¥¨¥é¡¼: ¥·¥¹¥Æ¥à¤Ï`_POSIX2 msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "¥Õ¥¡¥¤¥ë¤Ï¥·¥ó¥Ü¥ë̾¤«¤éUCS4ÃͤؤΥޥåԥ󥰤ò´Þ¤ó¤Ç¤¤¤Þ¤¹" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "¼ºÇÔ¤·¤Þ¤·¤¿(¸¶°øÉÔÆÃÄê¤Î¥¨¥é¡¼)" @@ -1895,7 +1954,7 @@ msgstr "¼ºÇÔ¤·¤Þ¤·¤¿(¸¶°øÉÔÆÃÄê¤Î¥¨¥é¡¼) msgid "Failed to look up user '%s' to run server as" msgstr "¥µ¡¼¥Ð¡¼¤ò¼Â¹Ô¤µ¤»¤ë¤¿¤á¤Î¥æ¡¼¥¶'%s'¤Î¸¡º÷¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "¥Õ¥¡¥¤¥ë %s ¤Ï¾®¤µ¤¹¤®¤Þ¤¹, ¥Á¥§¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤»¤ó." @@ -1912,7 +1971,7 @@ msgstr "¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤¬ÉÔÀµ¤Î¾õÂ֤ˤ¢¤ê msgid "File exists" msgstr "¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤¹" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "¥Õ¥¡¥¤¥ë¤Ï¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó.\n" @@ -1946,7 +2005,7 @@ msgstr "¥Õ¥¡¥¤¥ë¥Æ¡¼¥Ö¥ë¥ª¡¼¥Ð¡¼¥Õ¥í¡¼" msgid "File too large" msgstr "¥Õ¥¡¥¤¥ë¤¬Â礭¤¹¤®¤Þ¤¹" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "¥Æ¥¹¥È¤Î¤¿¤á¤ÎºÇ½é¤Îʸ»úÎó." @@ -1958,7 +2017,7 @@ msgstr "ºÇ½é/¼¡¤Î¥Á¥§¥¤¥ó¤¬²õ¤ì¤Æ¤¤¤Þ¤¹" msgid "Floating point exception" msgstr "ÉâÆ°¾®¿ôÅÀ±é»»Îã³°¤Ç¤¹" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "»ÈÍÑ¥Õ¥©¡¼¥Þ¥Ã¥È: ¿·, µì, ¸ß´¹ (¥Ç¥Õ¥©¥ë¥È)" @@ -1975,7 +2034,7 @@ msgstr "¥Ç¥£¥ì¥¯¥È¥ê¤ËÂФ¹¤ë´°Á´ºÆsync¤¬ msgid "Function not implemented" msgstr "´Ø¿ô¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "¥°¥ë¡¼¥×\n" @@ -2000,7 +2059,7 @@ msgstr "" msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "»þ¹ï½ç¤Ë½ÐÎϤòÀ¸À® (¥Ç¥Õ¥©¥ë¥È¤Ï´Ø¿ô¸Æ¤Ó½Ð¤·¤ÎÃͽç)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "¾ÜºÙ¤Ê¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨" @@ -2008,7 +2067,7 @@ msgstr "¾ÜºÙ¤Ê¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨" msgid "Generic system error" msgstr "°ìÈÌŪ¤Ê¥·¥¹¥Æ¥à¥¨¥é¡¼" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "¥í¥±¡¼¥ë¸ÇÍ­¾ðÊó¤òÆÀ¤ë." @@ -2025,12 +2084,12 @@ msgstr "¤³¤Î¥Ø¥ë¥×¤Îɽ¼¨" msgid "Gratuitous error" msgstr "ÉÔɬÍפʥ¨¥é¡¼" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "¥°¥ë¡¼¥× : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "¥°¥ë¡¼¥×¥Õ¥é¥°:" @@ -2095,16 +2154,12 @@ msgstr "I/O²Äǽ¤Ç¤¹" msgid "IOT trap" msgstr "IOT¥È¥é¥Ã¥×" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "¼±Ê̻Ҥò½üµî¤·¤Þ¤·¤¿" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Àµµ¬¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¤¤¿¤á¥Õ¥¡¥¤¥ë %s ¤ò̵»ë¤·¤Þ¤¹" @@ -2157,7 +2212,7 @@ msgstr "¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤ËÂФ¹¤ë msgid "Information request" msgstr "¾ðÊóÍ×µá" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "¾ðÊó:" @@ -2165,12 +2220,12 @@ msgstr "¾ðÊó:" msgid "Input Files:" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë %s ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "ÆþÎÏ/½ÐÎÏ¥Õ¥©¡¼¥Þ¥Ã¥È¤Î»ÅÍÍ:" @@ -2179,11 +2234,11 @@ msgstr "ÆþÎÏ/½ÐÎÏ¥Õ¥©¡¼¥Þ¥Ã¥È¤Î»ÅÍÍ:" msgid "Input/output error" msgstr "ÆþÎÏ/½ÐÎÏ¥¨¥é¡¼¤Ç¤¹" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "NISÆâÉô¥¨¥é¡¼" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "ypbindÆâÉô¥¨¥é¡¼" @@ -2191,6 +2246,10 @@ msgstr "ypbindÆâÉô¥¨¥é¡¼" msgid "Interrupt" msgstr "³ä¤ê¹þ¤ß" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "¥·¥°¥Ê¥ë¤Ë¤è¤ë³ä¤ê¹þ¤ß" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2214,27 +2273,27 @@ msgstr "³ä¤ê¹þ¤Þ¤ì¤¿¥·¥¹¥Æ¥à¥³¡¼¥ë¤ÏºÆ¥¹ msgid "Invalid argument" msgstr "̵¸ú¤Ê°ú¿ô¤Ç¤¹" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "̵¸ú¤Ê¸åÊý»²¾È¤Ç¤¹" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "̵¸ú¤Ê¥­¥ã¥é¥¯¥¿¥¯¥é¥¹Ì¾¤Ç¤¹" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "̵¸ú¤Ê¥¯¥é¥¤¥¢¥ó¥È¤Î¿®Ç¤¤Ç¤¹" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "̵¸ú¤Ê¥¯¥é¥¤¥¢¥ó¥È³Îǧ¤Ç¤¹" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "̵¸ú¤Ê¾È¹çʸ»ú¤Ç¤¹" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "̵¸ú¤Ê \\{\\} ¤ÎÆâÍÆ¤Ç¤¹" @@ -2259,15 +2318,15 @@ msgstr "Áàºî¤ËÂФ¹¤ë̵¸ú¤Ê¥ª¥Ö¥¸¥§¥¯¥È¤Ç msgid "Invalid or incomplete multibyte or wide character" msgstr "̵¸ú¤Þ¤¿¤ÏÉÔ´°Á´¤Ê¥Þ¥ë¥Á¥Ð¥¤¥È¤Þ¤¿¤Ï¥ï¥¤¥Éʸ»ú¤Ç¤¹" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "̵¸ú¤ÊÁ°½Ò¤ÎÀµµ¬É½¸½¤Ç¤¹" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "̵¸ú¤Ê½ªÃ¼ÈϰϤǤ¹" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "̵¸ú¤ÊÀµµ¬É½¸½¤Ç¤¹" @@ -2279,7 +2338,7 @@ msgstr "̵¸ú¤Ê¥ê¥¯¥¨¥¹¥È¥³¡¼¥É¤Ç¤¹" msgid "Invalid request descriptor" msgstr "̵¸ú¤Ê¥ê¥¯¥¨¥¹¥Èµ­½Ò»Ò¤Ç¤¹" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "̵¸ú¤Ê¥µ¡¼¥Ð¡¼Ç§¾Ú¼Ô¤Ç¤¹" @@ -2307,7 +2366,7 @@ msgstr "̾Á°¥Õ¥¡¥¤¥ë¤Ç¤¹" msgid "Is a named type file" msgstr "̾Á°ÉÕ¤­¥Õ¥¡¥¤¥ë¤Ç¤¹" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2315,7 +2374,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "¶¯À©½ªÎ»" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "LINK\n" @@ -2358,20 +2417,20 @@ msgstr "¥ê¥ó¥¯¿ô¤¬Èϰϳ°¤Ç¤¹" msgid "Link points to illegal name" msgstr "¥ê¥ó¥¯¤¬ÉÔÀµ¤Ê̾Á°¤ò»Ø¤·¤Æ¤¤¤Þ¤¹" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "¥ê¥ó¥¯¤µ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È·¿ : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "¥ê¥ó¥¯Àè : %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "¥í¡¼¥«¥ë¥É¥á¥¤¥ó̾¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "¥í¡¼¥«¥ë¥ê¥½¡¼¥¹³ÎÊݤμºÇÔ¤·¤Þ¤·¤¿" @@ -2388,11 +2447,11 @@ msgstr "ÉÔÅö, ¤Þ¤¿¤ÏÉÔÀµ¤Ê̾Á°¤Ç¤¹" msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "¥í¥ó¥°¥ª¥×¥·¥ç¥ó¤Çɬ¿Ü¤Þ¤¿¤ÏǤ°Õ¤Î°ú¿ô¤Ï¡¢¤½¤ì¤ËÂбþ¤¹¤ë¥·¥ç¡¼¥È¥ª¥×¥·¥ç¥ó¤Ç¤âɬ¿Ü¤Þ¤¿¤ÏǤ°Õ¤Ç¤¹." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "¸Ä¡¹¤Î¥é¥¤¥Ö¥é¥ê¤Ë¼êư¤Ç¥ê¥ó¥¯¤·¤Æ¤¯¤À¤µ¤¤." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð:\n" @@ -2404,7 +2463,7 @@ msgstr "¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤¬¥Ó¥¸¡¼¤Ç¤¹, ¥Õ¥ë msgid "Memory allocation failure" msgstr "¥á¥â¥ê³ÎÊݤ˼ºÇÔ¤·¤Þ¤·¤¿" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "¥á¥â¥ê¤ò»È¤¤¿Ô¤·¤Þ¤·¤¿" @@ -2423,7 +2482,7 @@ msgstr "¥á¥Ã¥»¡¼¥¸¤¬Ä¹¤¹¤®¤Þ¤¹" msgid "Missing or malformed attribute" msgstr "°À­¤¬¸«Åö¤¿¤é¤Ê¤¤¤«ÉÔÅö¤Ç¤¹" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "¹¹¿·»þ¹ï : %s" @@ -2436,7 +2495,7 @@ msgstr "¹¹¿·¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" msgid "Modify operation failed" msgstr "¹¹¿·Áàºî¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "½ÐÎÏ·Á¼°¤Î¹¹¿·:" @@ -2454,7 +2513,7 @@ msgstr "¥µ¡¼¥Ð¥æ¡¼¥¶¥ª¥×¥·¥ç¥ó¤ËÂФ·¤Æ¥æ msgid "NAME" msgstr "̾Á°" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2462,15 +2521,11 @@ msgstr "" "̾Á°\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "NIS¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Î¥Ð¡¼¥¸¥ç¥ó¤¬°ìÃפ·¤Þ¤»¤ó - ¥µ¡¼¥Ó¥¹¤òÄ󶡤Ǥ­¤Þ¤»¤ó" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "NIS¥Þ¥Ã¥×¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ÉÔÀµ¤Ç¤¹" @@ -2486,7 +2541,7 @@ msgstr "NIS+ ¥µ¡¼¥Ð¤ËÆÏ¤­¤Þ¤»¤ó" msgid "NIS+ service is unavailable or not installed" msgstr "NIS+ ¥µ¡¼¥Ó¥¹¤¬ÍøÍÑÉÔǽ¤«¡¢¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ê¤Þ¤»¤ó\n" @@ -2494,7 +2549,7 @@ msgstr "¥ª¥Ö¥¸¥§¥¯¥È¤¬¤¢¤ê¤Þ¤»¤ó\n" msgid "NUMBER" msgstr "ÈÖ¹æ" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "̾Á° : `%s'\n" @@ -2584,7 +2639,7 @@ msgstr "¥¢¥Î¡¼¥É¤¬¤¢¤ê¤Þ¤»¤ó" msgid "No buffer space available" msgstr "ÍøÍѲÄǽ¤Ê¶õ¤­¥Ð¥Ã¥Õ¥¡¤¬¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×Ãæ¤Çʸ»ú½¸¹ç̾¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -2601,8 +2656,8 @@ msgstr "»Ò¥×¥í¥»¥¹¤¬¤¢¤ê¤Þ¤»¤ó" msgid "No data available" msgstr "ÍøÍѲÄǽ¤Ê¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2615,7 +2670,7 @@ msgstr "%s ¥«¥Æ¥´¥ê¤ËÂФ¹¤ëÄêµÁ¤¬¸«¤Ä¤«¤ msgid "No file space on server" msgstr "¥µ¡¼¥Ð¤Ë¥Õ¥¡¥¤¥ë¤ÎÎΰ褬¤¢¤ê¤Þ¤»¤ó" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "%s ¤ËÂФ¹¤ë soname ¤¬¸«¤Ä¤«¤é¤Ê¤¤¤¿¤á¥ê¥ó¥¯¤¬ºîÀ®¤µ¤ì¤Þ¤»¤ó" @@ -2628,7 +2683,7 @@ msgstr "%s ¤ËÂФ¹¤ë soname ¤¬¸«¤Ä¤«¤é¤Ê¤ msgid "No locks available" msgstr "¥í¥Ã¥¯¤¬ÍøÍѤǤ­¤Þ¤»¤ó" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "°ìÃפ·¤Þ¤»¤ó" @@ -2641,11 +2696,11 @@ msgstr "¥á¥Ç¥£¥¢¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" msgid "No message of desired type" msgstr "Í׵ᤷ¤¿·Á¼°¤Î¥á¥Ã¥»¡¼¥¸¤Ï¤¢¤ê¤Þ¤»¤ó" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "¥Þ¥Ã¥×¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤³¤ì°Ê¾åµ­Ï¿¤¬¤¢¤ê¤Þ¤»¤ó" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "°ÊÁ°¤ËÀµµ¬É½¸½¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -2695,11 +2750,11 @@ msgstr "¤½¤Î¤è¤¦¤Ê¥Ç¥Ð¥¤¥¹¤ä¥¢¥É¥ì¥¹¤Ï¤¢ msgid "No such file or directory" msgstr "¤½¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤ä¥Ç¥£¥ì¥¯¥È¥ê¤Ï¤¢¤ê¤Þ¤»¤ó" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "¥Þ¥Ã¥×¤Ë¤½¤Î¤è¤¦¤Ê¥­¡¼¤Ï¤¢¤ê¤Þ¤»¤ó" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "¥µ¡¼¥Ð¥É¥á¥¤¥ó¤Ë¤½¤Î¤è¤¦¤Ê¥Þ¥Ã¥×¤Ï¤¢¤ê¤Þ¤»¤ó" @@ -2717,7 +2772,7 @@ msgstr "NIS+ ̾Á°¶õ´Ö¤ËÁø¶ø¤·¤Æ¤¤¤Þ¤»¤ó" msgid "Non-recoverable failure in name resolution" msgstr "̾Á°¤Î²ò·è»þ¤Ë²óÉüÉÔ²Äǽ¤Ê¼ºÇÔ" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "½ªÎ».\n" @@ -2784,12 +2839,12 @@ msgstr "½êÍ­¼Ô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" msgid "Not supported" msgstr "¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "¥«¥é¥à¿ô : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "¥ª¥Ö¥¸¥§¥¯¥È¿ô : %u\n" @@ -2810,17 +2865,17 @@ msgstr "¿ôÃͤΰú¿ô¤Ï¥É¥á¥¤¥ó³°¤Ç¤¹" msgid "Numerical result out of range" msgstr "·×»»·ë²Ì¤ÏÈϰϳ°¤ÎÃͤǤ¹" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "¥ª¥Ö¥¸¥§¥¯¥È #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "¥ª¥Ö¥¸¥§¥¯¥È̾: %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "¥ª¥Ö¥¸¥§¥¯¥È·¿: " @@ -2837,11 +2892,11 @@ msgstr "¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥ê¥â¡¼¥È¤Ë¤¢¤ê¤Þ¤¹ msgid "Object with same name exists" msgstr "Ʊ¤¸Ì¾Á°¤ò»ý¤Ä¥ª¥Ö¥¸¥§¥¯¥È¤¬Â¸ºß¤·¤Þ¤¹" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "¥¯¥©¡¼¥È¤¹¤ë¥Þ¡¼¥¯¤¬´ñ¿ô¸Äʬ¤·¤«¤¢¤ê¤Þ¤»¤ó" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ë»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î¤ß½èÍý¤·¤Þ¤¹. ¥­¥ã¥Ã¥·¥å¤ò¹½ÃÛ¤·¤Þ¤»¤ó." @@ -2923,7 +2978,7 @@ msgstr "¥¹¥È¥ê¡¼¥à¥ê¥½¡¼¥¹³°¤Ç¤¹" msgid "Out of streams resources" msgstr "¥¹¥È¥ê¡¼¥à¥ê¥½¡¼¥¹³°¤Ç¤¹" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "½ÐÎÏÀ©¸æ:" @@ -2931,12 +2986,12 @@ msgstr "½ÐÎÏÀ©¸æ:" msgid "Output selection:" msgstr "½ÐÎÏÁªÂò:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "½êÍ­¼Ô : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "PRIVATE\n" @@ -2958,13 +3013,13 @@ msgstr "ÉôʬŪ¤ËÀ®¸ù" msgid "Passed object is not the same object on server" msgstr "¥Ñ¥¹¤µ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥µ¡¼¥Ð¾å¤Î¤½¤ì¤ÈƱ°ì¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "1²ó°Ê¾åÍ¿¤¨¤é¤ì¤¿¥Ñ¥¹`%s'" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2974,11 +3029,11 @@ msgstr "µö²Ä¤¬¤¢¤ê¤Þ¤»¤ó" msgid "Power failure" msgstr "ÅŸ»¸Î¾ã" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Àµµ¬É½¸½¤Î½ªÃ¼¤¬Á᤹¤®¤Þ¤¹" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "¥­¥ã¥Ã¥·¥å¤Îɽ¼¨" @@ -2986,6 +3041,10 @@ msgstr "¥­¥ã¥Ã¥·¥å¤Îɽ¼¨" msgid "Print current configuration statistic" msgstr "¸½ºß¤Î¥³¥ó¥Õ¥£¥®¥å¥ì¡¼¥·¥ç¥ó¤ÎÅý·×¤òɽ¼¨¤¹¤ë" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "¾ÜºÙ¾ðÊó¤Îɽ¼¨" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "¾ÜºÙ¤Ê¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨" @@ -3002,6 +3061,10 @@ msgstr "¤ª¤½¤é¤¯À®¸ù" msgid "Probably not found" msgstr "¤ª¤½¤é¤¯¸«¤Ä¤«¤ê¤Þ¤»¤ó" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Í×µá¤Ï¤¹¤Ç¤Ë½èÍýÃæ¤Ç¤¹" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¥¿¥¤¥Þ¤¬ÇË´þ¤µ¤ì¤Þ¤·¤¿" @@ -3059,7 +3122,7 @@ msgstr "RFSÆÃÄꥨ¥é¡¼" msgid "RPC bad procedure for program" msgstr "¥×¥í¥°¥é¥à¤ËÂФ·¤ÆÉÔÀµ¤ÊRPC¤Î¼ê³¤­¤Ç¤¹" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "NISÁàºî¤Ë¤ª¤±¤ëRPC¤Î¼ºÇԤǤ¹" @@ -3083,88 +3146,88 @@ msgstr "RPC¹½Â¤¤¬ÉÔÀµ¤Ç¤¹" msgid "RPC version wrong" msgstr "RPC¥Ð¡¼¥¸¥ç¥ó¤¬°ã¤¤¤Þ¤¹" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (̤ÃΤΥ¨¥é¡¼¥³¡¼¥É)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: ǧ¾Ú¥¨¥é¡¼" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: ¥Ç¥³¡¼¥É¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: °ú¿ô¤ò¥¨¥ó¥³¡¼¥É¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: ¼ºÇÔ¤·¤Þ¤·¤¿ (¸¶°øÉÔÆÃÄê¤Î¥¨¥é¡¼)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: RPC¤Î¥Ð¡¼¥¸¥ç¥ó¤¬Èó¸ß´¹¤Ç¤¹" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: ¥Ý¡¼¥È¥Þ¥Ã¥Ñ¡¼¤Î¼ºÇԤǤ¹" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: ¼ê³¤­¤¬ÍøÍѤǤ­¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: ¥×¥í¥°¥é¥à¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: ¥×¥í¥°¥é¥à¤ÏÍøÍѤǤ­¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: ¥×¥í¥°¥é¥à¤È¥Ð¡¼¥¸¥ç¥ó¤¬°ìÃפ·¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: ±ó³Ö¥·¥¹¥Æ¥à¥¨¥é¡¼" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: ¥µ¡¼¥Ð¤¬°ú¿ô¤ò¥Ç¥³¡¼¥É¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: À®¸ù¤Ç¤¹" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: ¥¿¥¤¥à¥¢¥¦¥È¤·¤Þ¤·¤¿" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: ¼õ¤±¼è¤ì¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: Á÷¿®¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: ÉÔÌÀ¤Ê¥Û¥¹¥È¤Ç¤¹" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: ÉÔÌÀ¤Ê¥×¥í¥È¥³¥ë¤Ç¤¹" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d ¥Ó¥Ã¥È)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "¥³¡¼¥ÉÃæ¤Ç»È¤ï¤ì¤Æ¤¤¤ëRTLD_NEXT¤òưŪ¤ËÆÉ¤ß¹þ¤á¤Þ¤»¤ó" @@ -3187,7 +3250,7 @@ msgstr "ÆÉ¤ß¹þ¤ßÀìÍÑ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤¹ msgid "Real-time signal %d" msgstr "¥ê¥¢¥ë¥¿¥¤¥à¥·¥°¥Ê¥ë %d ¤Ç¤¹" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Àµµ¬É½¸½¤¬Ä¹¤¹¤®¤Þ¤¹" @@ -3201,11 +3264,11 @@ msgstr "±ó³ÖI/O¥¨¥é¡¼¤Ç¤¹" msgid "Remote address changed" msgstr "±ó³Ö¥¢¥É¥ì¥¹¤¬Êѹ¹¤µ¤ì¤Þ¤·¤¿" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "¥Ñ¥¹¥ï¡¼¥É¤¬ºï½ü, ¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë¤¬Âè»°¼Ô¤Ë¤è¤Ã¤ÆÆÉ¤ß¹þ¤ß¤Ç¤­¤Þ¤»¤ó" -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "%s ¤«¤é %s ¤Ø¤Î̾Á°Êѹ¹¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" @@ -3215,7 +3278,7 @@ msgstr "%s ¤«¤é %s ¤Ø¤Î̾Á°Êѹ¹¤Ë¼ºÇÔ¤·¤ msgid "Reopening shared object `%s' failed" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È`%s'¤ÎºÆ¥ª¡¼¥×¥ó¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Ê£À½ :\n" @@ -3224,16 +3287,24 @@ msgstr "Ê£À½ :\n" msgid "Report bugs to %s.\n" msgstr "¥Ð¥°¤òȯ¸«¤·¤¿¤é %s °¸¤ËÊó¹ð¤·¤Æ²¼¤µ¤¤.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "¥Ð¥°¤Ï¥¹¥¯¥ê¥×¥È`glibcbug'¤òÍѤ¤¤Æ¤Þ¤ÇÊó¹ð¤·¤Æ¤¯¤À¤µ¤¤.\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Í×µá°ú¿ô¤¬ÉÔÀµ¤Ç¤¹" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Í×µá¤ÏÃæÃǤµ¤ì¤Þ¤·¤¿" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Í×µá¤ÏÃæÃǤµ¤ì¤Þ¤»¤ó¤Ç¤·¤¿" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "¾­Íè¤Î¤¿¤á¤ËͽÌóºÑ¤ß" @@ -3304,11 +3375,7 @@ msgstr "¥³¡¼¥ë¥Ð¥Ã¥¯¥×¥í¥·¡¼¥¸¥ã¤Ë·ë²Ì¤ò msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "¸¡º÷¥Ñ¥¹ : %s\n" @@ -3325,11 +3392,11 @@ msgstr "¥µ¡¼¥Ð¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹, ºÆ»î¹Ô¤· msgid "Server out of memory" msgstr "¥µ¡¼¥Ð¤Î¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "¥µ¡¼¥Ð¤¬¾ÚÌÀ¤òµñÈݤ·¤Þ¤·¤¿" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "¥µ¡¼¥Ð¤¬³Îǧ¤òµñÈݤ·¤Þ¤·¤¿" @@ -3397,7 +3464,7 @@ msgstr "¼Â¸úÀ­¤Î¤Ê¤¤NFS¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤ msgid "Start NUMBER threads" msgstr "NUMBER¥¹¥ì¥Ã¥É¤Çµ¯Æ°¤¹¤ë" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "¥¹¥Æ¡¼¥¿¥¹ : %s\n" @@ -3427,7 +3494,7 @@ msgstr "¥¹¥È¥ê¡¼¥à¥Ñ¥¤¥×¥¨¥é¡¼" msgid "Structure needs cleaning" msgstr "¹½Â¤ÂΤòÆâÍÆ¾Ãµî¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "À®¸ù¤Ç¤¹" @@ -3448,11 +3515,11 @@ msgstr "¥·¥ó¥Ü¥ë¥­¥ã¥é¥¯¥¿Ì¾¤Ï FILE Ãæ¤Ç msgid "System error" msgstr "¥·¥¹¥Æ¥à¥¨¥é¡¼" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "¥·¥¹¥Æ¥à¾ðÊó:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "¥·¥¹¥Æ¥à¥ê¥½¡¼¥¹¤Î³ÎÊݤ˼ºÇÔ" @@ -3473,7 +3540,7 @@ msgstr "" msgid "TABLE" msgstr "¥Æ¡¼¥Ö¥ë" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "¥Æ¡¼¥Ö¥ë\n" @@ -3481,7 +3548,7 @@ msgstr "¥Æ¡¼¥Ö¥ë\n" msgid "TABLE,yes" msgstr "¥Æ¡¼¥Ö¥ë,¤Ï¤¤" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "¥Æ¡¼¥Ö¥ë·¿ : %s\n" @@ -3504,7 +3571,7 @@ msgstr "½ªÎ»¤·¤Þ¤·¤¿" msgid "Text file busy" msgstr "¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤¬¥Ó¥¸¡¼¾õÂ֤Ǥ¹" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3520,11 +3587,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "¤³¤Î¼ÂÁõ¤Ï¿··Á¼°¤Þ¤¿¤ÏMT¥»¡¼¥Õ¤Ê¥³¡¼¥É¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "À¸Â¸»þ´Ö : " @@ -3598,9 +3665,9 @@ msgstr "¥æ¡¼¥¶¤¬Â¿¤¹¤®¤Þ¤¹" msgid "Trace/breakpoint trap" msgstr "¥È¥ì¡¼¥¹/¥Ö¥ì¥¤¥¯¥Ý¥¤¥ó¥È ¥È¥é¥Ã¥×" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" -msgstr "¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤ò°ú¤­¤º¤Ã¤Æ¤¤¤ë" +msgstr "¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬»Ä¤Ã¤Æ¤¤¤Þ¤¹" #. TRANS In the GNU system, opening a file returns this error when the file is #. TRANS translated by a program and the translator program dies while starting @@ -3630,12 +3697,12 @@ msgstr "žÁ÷À褬Àܳ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "¾ÜºÙ¤Ï`%s --help'¤Þ¤¿¤Ï`%s --usage'¤ò¼Â¹Ô¤·¤Æ²¼¤µ¤¤.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "·¿ : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "̤ÃÎ" @@ -3655,31 +3722,35 @@ msgstr "¥³¡¼¥ë¥Ð¥Ã¥¯¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" msgid "Unable to create process on server" msgstr "¥µ¡¼¥Ð¾å¤Ë¥×¥í¥»¥¹¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "̤ÃÎ (·¿ = %d, ¥Ó¥Ã¥È = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "̤ÃΤΠ.netrc ¥­¡¼¥ï¡¼¥É %s" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "¥Õ¥¡¥¤¥ë %s Ãæ¤Ç̤ÃΤÎELFCLASS.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "̤ÃΤÎNIS¥¨¥é¡¼¥³¡¼¥É" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "̤ÃΤÎOS" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "̤ÃΤΥǡ¼¥¿¥Ù¡¼¥¹: %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "̤ÃΤΥ¨¥é¡¼" @@ -3715,31 +3786,31 @@ msgstr "ÉÔÌÀ¤Ê¥µ¡¼¥Ð¥¨¥é¡¼" msgid "Unknown signal %d" msgstr "̤ÃΤΥ·¥°¥Ê¥ë(%d)" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "̤ÃΤΥ·¥¹¥Æ¥à¥¨¥é¡¼" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "ÉÔÌÀ¤Êypbind¥¨¥é¡¼" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "( ¤â¤·¤¯¤Ï \\( ¤¬°ìÃפ·¤Þ¤»¤ó" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr ") ¤â¤·¤¯¤Ï \\) ¤¬°ìÃפ·¤Þ¤»¤ó" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "[ ¤â¤·¤¯¤Ï [^ ¤¬°ìÃפ·¤Þ¤»¤ó" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "\\{ ¤¬°ìÃפ·¤Þ¤»¤ó" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "ÊÑ¿ô`%s'¤òǧ¼±¤Ç¤­¤Þ¤»¤ó" @@ -3752,10 +3823,10 @@ msgstr "¶ÛµÞ¤ÎI/O¾õ¶·¤Ç¤¹" msgid "Usage:" msgstr "»ÈÍÑË¡:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "»ÈÍÑË¡: %s ÊÑ¿ô̾ [¥Ñ¥¹Ì¾]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "»ÈÍÑË¡: %s [-v »ÅÍÍ] ÊÑ¿ô̾ [¥Ñ¥¹Ì¾]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" @@ -3763,11 +3834,11 @@ msgstr "" "»ÈÍÑË¡: rpcinfo [ -n ¥Ý¡¼¥ÈÈÖ¹æ ] -u ¥Û¥¹¥È\n" " ¥×¥í¥°¥é¥àÈÖ¹æ [ ¥Ð¡¼¥¸¥ç¥óÈÖ¹æ ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤È¤·¤Æ CACHE ¤ò»ÈÍѤ·¤Þ¤¹" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "ÀßÄê¥Õ¥¡¥¤¥ë¤È¤·¤Æ CONF ¤ò»ÈÍѤ·¤Þ¤¹" @@ -3792,7 +3863,7 @@ msgstr "ÄêµÁ¤µ¤ì¤¿¥Ç¡¼¥¿·¿¤ËÂФ·¤ÆÃͤ¬Âç msgid "Virtual timer expired" msgstr "²¾ÁÛ¥¿¥¤¥Þ¤¬½ªÎ»¤·¤Þ¤·¤¿" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "¥³¥Þ¥ó¥É¼Â¹Ô¤«¤é¤ÎÁƤ¤·ë²Ì" @@ -3800,19 +3871,19 @@ msgstr "¥³¥Þ¥ó¥É¼Â¹Ô¤«¤é¤ÎÁƤ¤·ë²Ì" msgid "Window changed" msgstr "¥¦¥£¥ó¥É¥¦¤¬Êѹ¹¤µ¤ì¤Þ¤·¤¿" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "ÍøÍѲÄǽ¤Ê¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×̾¤Î½ÐÎÏ" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "ÍøÍѲÄǽ¤Ê¥í¥±¡¼¥ë̾¤Î½ÐÎÏ" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "ÁªÂò¤·¤¿¥«¥Æ¥´¥ê̾¤Î½ÐÎÏ" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "ÁªÂò¤·¤¿¥­¡¼¥ï¡¼¥É̾¤Î½ÐÎÏ" @@ -3820,18 +3891,18 @@ msgstr "ÁªÂò¤·¤¿¥­¡¼¥ï¡¼¥É̾¤Î½ÐÎÏ" msgid "Write output to file NAME" msgstr "¥Õ¥¡¥¤¥ë NAME ¤Ø½ÐÎϤò½ñ¤­¹þ¤à" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "¥­¥ã¥Ã¥·¥å¥Ç¡¼¥¿¤Î½ñ¹þ¤ß¤Ë¼ºÇÔ" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "¥­¥ã¥Ã¥·¥å¥Ç¡¼¥¿¤Î½ñ¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "%s¤Ë¤è¤ë½ñ¤­¹þ¤ß.\n" @@ -3840,14 +3911,6 @@ msgstr "%s¤Ë¤è¤ë½ñ¤­¹þ¤ß.\n" msgid "Wrong medium type" msgstr "ÉÔÀµ¤Ê¥á¥Ç¥£¥¢·Á¼°¤Ç¤¹" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3862,11 +3925,15 @@ msgstr "¤Ï¤¤¡¢42¤Ï¿ÍÀ¸¤ÎÊ¿¶Ñ¤Ç¤¹" msgid "You really blew it this time" msgstr "You really blew it this time" -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "¥¾¡¼¥óϢ³¹Ô end time ¤ÏÁ°¤Î¹Ô¤Î end time ¤è¤ê¤â¸å¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[¥Ç¥£¥ì¥¯¥È¥ê...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[¥Õ¥¡¥¤¥ë...]" @@ -3898,13 +3965,13 @@ msgstr "`%.*s'¤Ï´û¤Ë charmap Ãæ¤ÇÄêµÁ¤µ¤ msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' ¤Ï´û¤Ë¥ì¥Ñ¡¼¥È¥êÃæ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "ÄêµÁ`%1$s' ¤¬ `END %1$s' ¤Ç½ª¤Ã¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s' ¤È `%.*s' ¤Ï¥·¥ó¥Ü¥ë¤ÎÈϰϤȤ·¤ÆÉÔÀµ¤Ê̾Á°¤Ç¤¹" @@ -3914,7 +3981,7 @@ msgstr "`%s' ¤È `%.*s' ¤Ï¥·¥ó¥Ü¥ë¤ÎÈϰϤ msgid "`%s' is no correct profile data file for `%s'" msgstr "%s'¤Ï`%s'¤ËÂФ¹¤ëÀµ¤·¤¤¥×¥í¥Õ¥¡¥¤¥ë¥Ç¡¼¥¿¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "`digit' ¥«¥Æ¥´¥ê¤Ï¥°¥ë¡¼¥×Ãæ¤Ë10¸Ä¤Î¥¨¥ó¥È¥ê¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó" @@ -3930,12 +3997,12 @@ msgstr "ai_socktype ¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤» msgid "already running" msgstr "´û¤Ëµ¯Æ°¤·¤Æ¤¤¤Þ¤¹" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "°ú¿ô <%s> ¤Ï¥·¥ó¥°¥ë¥­¥ã¥é¥¯¥¿¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "°ú¿ô `%s' ¤Ï¥·¥ó¥°¥ë¥­¥ã¥é¥¯¥¿¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" @@ -3948,28 +4015,28 @@ msgstr "auth_none.c - Ã×̿Ū¤ÊÀ°Îó¤ÎÌäÂê msgid "authunix_create: out of memory\n" msgstr "authunix_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "ÉÔÀµ¤Ê°ú¿ô¤Ç¤¹" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "ÉÔÀµ¤Ê½êÍ­¼Ô¤Ç¤¹" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "Link ¹Ô¤Î FROM ¥Õ¥£¡¼¥ë¥É¤¬¶õÍó¤Ç¤¹" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "Link ¹Ô¤Î TO ¥Õ¥£¡¼¥ë¥É¤¬¶õÍó¤Ç¤¹" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "¥Ö¥í¥Ã¥¯¤Î²òÊü¤¬2ÅÙ¹Ô¤ï¤ì¤Þ¤·¤¿\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "mcheck_status ¤¬¤¢¤¤¤Þ¤¤¤Ç¤¹¡£¥é¥¤¥Ö¥é¥ê¤Î¥Ð¥°¤Ç¤¹¡£\n" @@ -3993,11 +4060,11 @@ msgstr "cache_set: µ¾À·Îΰè³ÎÊݤ˼ºÇÔ¤·¤ msgid "cache_set: victim not found" msgstr "cache_set: µ¾À·Îΰ褬¤ß¤Ä¤«¤ê¤Þ¤»¤ó" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "¤Á¤ç¤¦¤É¤½¤Î»þ¹ï¤ò»ÈÍѤ¹¤ë¥¿¥¤¥à¥¾¡¼¥ó¤Î¾Êά·Á¤ò·èÄê¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "¼ê³¤­ÈÖ¹æ %ld ¤òºÆ³ä¤êÅö¤Æ¤Ç¤­¤Þ¤»¤ó\n" @@ -4011,15 +4078,15 @@ msgstr "ºÆ³ÎÊݸå¤Ë¥»¥°¥á¥ó¥Èprot¤òºÆ³ÊǼ msgid "cannot add already read locale `%s' a second time" msgstr "ÆÉ¹þºÑ¤ß¤Î¥í¥±¡¼¥ë`%s'¤Ï2²ó¤âÄɲäǤ­¤Þ¤»¤ó" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "°Í¸¥ê¥¹¥È¤ò³ÎÊݤǤ­¤Þ¤»¤ó" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "¥×¥í¥°¥é¥à¥Ø¥Ã¥À¤ËÂФ¹¤ë¥á¥â¥ê¤ò³ÎÊݤǤ­¤Þ¤»¤ó" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "̾Á°¥ì¥³¡¼¥É¤ò³ÎÊݤǤ­¤Þ¤»¤ó" @@ -4027,31 +4094,27 @@ msgstr "̾Á°¥ì¥³¡¼¥É¤ò³ÎÊݤǤ­¤Þ¤»¤ó" msgid "cannot allocate symbol data" msgstr "¥·¥ó¥Ü¥ë¾ðÊó¤ò³ÎÊݤǤ­¤Þ¤»¤ó" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "¥·¥ó¥Ü¥ëõº÷¥ê¥¹¥È¤ò³ÎÊݤǤ­¤Þ¤»¤ó" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "¥Ð¡¼¥¸¥ç¥ó»²¾È¥ê¥¹¥È¤ò³ÎÊݤǤ­¤Þ¤»¤ó" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "¥á¥â¥êÊݸî¤òÊѹ¹¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "RUNPATH/RPATH¤Î¥³¥Ô¡¼¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "¥µ¡¼¥Á¥Ñ¥¹¤ËÂФ¹¤ë¥­¥ã¥Ã¥·¥å¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¥ê¥¹¥È¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "ÆâÉôµ­½Ò»Ò¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" @@ -4060,23 +4123,28 @@ msgstr "ÆâÉôµ­½Ò»Ò¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" msgid "cannot create internal descriptors" msgstr "ÆâÉôµ­½Ò»Ò¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "¥«¥Æ¥´¥ê`%2$s'ÍѤνÐÎÏ¥Õ¥¡¥¤¥ë`%1$s'¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "¥µ¡¼¥Á¥Ñ¥¹¥¢¥ì¥¤¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "¥µ¡¼¥Á¥ê¥¹¥È¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥Èµ­½Ò»Ò¤òºîÀ®¤Ç¤­¤Þ¤»¤ó" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "¥¨¥¹¥±¡¼¥×¥­¥ã¥é¥¯¥¿¤ò·èÄê¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "¼Â¹Ô¥Õ¥¡¥¤¥ë¤òưŪ¤Ë¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó" @@ -4098,7 +4166,11 @@ msgstr "C ¥×¥ê¥×¥í¥»¥Ã¥µ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó msgid "cannot find any C preprocessor (cpp)\n" msgstr "¤É¤Î¤è¤¦¤Ê C ¥×¥ê¥×¥í¥»¥Ã¥µ¤â¸«¤Ä¤«¤ê¤Þ¤»¤ó (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë¤òÀ¸À®¤Ç¤­¤Þ¤»¤ó" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "Í׵ᤵ¤ì¤¿¸Å¤¤¥Ð¡¼¥¸¥ç¥ó %d ¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¸½ºß¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï %d ¤Ç¤¹" @@ -4107,19 +4179,15 @@ msgstr "Í׵ᤵ¤ì¤¿¸Å¤¤¥Ð¡¼¥¸¥ç¥ó %d ¤ò°· msgid "cannot load profiling data" msgstr "¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¥Ç¡¼¥¿¤ò¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "ºÆ³ÎÊÝÍѤΥ»¥°¥á¥ó¥È¤ò½ñ¹þ¤ß²Äǽ¤Ë¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "¥¼¥í¤ÇËä¤á¤é¤ì¤¿¥Ú¡¼¥¸¤ò¥Þ¥Ã¥×¤Ç¤­¤Þ¤»¤ó" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "³«¤±¤Þ¤»¤ó" @@ -4132,7 +4200,7 @@ msgstr "`%s'¤ò³«¤±¤Þ¤»¤ó" msgid "cannot open input file" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë`%s'¤ò³«¤±¤Þ¤»¤ó" @@ -4143,21 +4211,21 @@ msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë`%s'¤ò³«¤±¤Þ¤»¤ó" msgid "cannot open locale definition file `%s'" msgstr "¥í¥±¡¼¥ëÄêµÁ¥Õ¥¡¥¤¥ë`%s'¤ò³«¤±¤Þ¤»¤ó" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë`%s'¤ò³«¤±¤Þ¤»¤ó" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "¥«¥Æ¥´¥ê`%2$s'ÍѤνÐÎÏ¥Õ¥¡¥¤¥ë`%1$s'¤ò³«¤±¤Þ¤»¤ó" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó" @@ -4166,7 +4234,7 @@ msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ msgid "cannot open socket: %s" msgstr "¥½¥±¥Ã¥È¤ò³«¤±¤Þ¤»¤ó: %s" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "¥¼¥í¤ÇËä¤á¤é¤ì¤¿¥Ç¥Ð¥¤¥¹¤ò³«¤±¤Þ¤»¤ó" @@ -4179,7 +4247,7 @@ msgstr "¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¥Ç¥£¥ì¥¯¥È¥ê`%s' msgid "cannot read configuration file; this is fatal" msgstr "ÀßÄê¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤á¤Þ¤»¤ó¡£¤³¤ì¤ÏÃ×̿Ū¤Ç¤¹" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "¥Õ¥¡¥¤¥ë¥Ç¡¼¥¿¤¬ÆÉ¤á¤Þ¤»¤ó" @@ -4192,11 +4260,6 @@ msgstr "¥Ø¥Ã¥À¤¬ÆÉ¤á¤Þ¤»¤ó" msgid "cannot read header from `%s'" msgstr "`%s'¤Î¥Ø¥Ã¥À¤òÆÉ¤á¤Þ¤»¤ó" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "¥í¥±¡¼¥ë¥Ç¥£¥ì¥¯¥È¥ê`%s'¤òÆÉ¤ß¹þ¤á¤Þ¤»¤ó" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "Åý·×¾ðÊó¤òÆÉ¤ß¹þ¤á¤Þ¤»¤ó" @@ -4205,7 +4268,7 @@ msgstr "Åý·×¾ðÊó¤òÆÉ¤ß¹þ¤á¤Þ¤»¤ó" msgid "cannot safe new repertoire map" msgstr "¿·¤·¤¤¥ì¥Ñ¡¼¥È¥ê¥Þ¥Ã¥×¤Ï°ÂÁ´¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¤òstat¤Ç¤­¤Þ¤»¤ó" @@ -4219,7 +4282,7 @@ msgstr "¥Õ¥¡¥¤¥ë`%s'¤¬ stat() ¤Ç¤­¤Þ¤»¤ó msgid "cannot write output files to `%s'" msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë`%s'¤Ø½ñ¤­¹þ¤á¤Þ¤»¤ó" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "·ë²Ì¤ò½ñ¤­¹þ¤á¤Þ¤»¤ó: %s" @@ -4229,76 +4292,80 @@ msgstr "·ë²Ì¤ò½ñ¤­¹þ¤á¤Þ¤»¤ó: %s" msgid "cannot write statistics: %s" msgstr "Åý·×¤ò½ñ¤­¹þ¤á¤Þ¤»¤ó: %s" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "¥¯¥é¥¹`%2$s'¤Îʸ»ú`%1$s'¤Ï¥¯¥é¥¹`%3$s'¤Ë¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "¥¯¥é¥¹`%2$s'¤Îʸ»ú`%1$s'¤Ï¥¯¥é¥¹`%3$s'¤Ë¤¢¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "ʸ»ú ¤¬¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "ʸ»ú L'\\u%0*x' (¥¯¥é¥¹`%s'Æâ) ¤Ï¥¯¥é¥¹`%s'¤Ë¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "ʸ»ú L'\\u%0*x' (¥¯¥é¥¹`%s'Æâ) ¤Ï¥¯¥é¥¹`%s'¤Ë¤¢¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "¥Ç¥Õ¥©¥ë¥ÈÃͤȤ·¤ÆÉ¬Íפʥ­¥ã¥é¥¯¥¿`%s'¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "¥­¥ã¥é¥¯¥¿¥¯¥é¥¹`%s'¤Ï¤¹¤Ç¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×`%s'¤Ï¤¹¤Ç¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥× `%s' ¤Ï ASCII ¸ß´¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó, ¥í¥±¡¼¥ë¤Ï ISO C ¤Ë½¾¤Ã¤Æ¤¤¤Þ¤»¤ó\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë `%s' ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "¥í¥Ã¥¯¾õÂÖ¤ò»ý¤Ä¥­¥ã¥é¥¯¥¿½¸¹ç¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "cheese" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "¥í¥±¡¼¥ëÄêµÁÃæ¤Ç°Í¸´Ø·¸¤Î¥ë¡¼¥×¤¬¤¢¤ê¤Þ¤¹" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - ¥Ø¥Ã¥À¤ÎľÎ󲽤ÇÃ×̿Ū¥¨¥é¡¼." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" @@ -4306,28 +4373,28 @@ msgstr "clntunix_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤ msgid "constant or identifier expected" msgstr "Äê¿ô¤Þ¤¿¤Ï¼±Ê̻Ҥ¬Å¬Åö¤Ç¤¹" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "`%s'¤«¤é`%s'¤Ø¤ÎÊÑ´¹¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "ÊÑ´¹¥â¥¸¥å¡¼¥ë¤¬ÍøÍѤǤ­¤Þ¤»¤ó" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "ÊÑ´¹¥ì¡¼¥ÈÃͤϥ¼¥í¤Ë¤Ï¤Ç¤­¤Þ¤»¤ó" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "½ÐÎϽñ¤­½Ð¤·Ãæ¤ËÌäÂ꤬¤¢¤Ã¤¿¤¿¤áÊÑ´¹¤òÃæ»ß¤·¤Þ¤·¤¿" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "RPC¥µ¡¼¥Ð¤òºîÀ®¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "¥×¥í¥°¥é¥à %ld ¥Ð¡¼¥¸¥ç¥ó %ld ¤òÅÐÏ¿¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿\n" @@ -4336,17 +4403,17 @@ msgstr "¥×¥í¥°¥é¥à %ld ¥Ð¡¼¥¸¥ç¥ó %ld ¤ò msgid "database [key ...]" msgstr "¥Ç¡¼¥¿¥Ù¡¼¥¹ [¥­¡¼ ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "ɸ½à¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë`%s'¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "<%s> ¤ÎÄêµÁ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "¥¹¥¯¥ê¥×¥È `%s' ¤ÎÄêµÁ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" @@ -4355,12 +4422,12 @@ msgstr "¥¹¥¯¥ê¥×¥È `%s' ¤ÎÄêµÁ¤¬½ÅÊ£¤·¤Æ msgid "duplicate set definition" msgstr "ÀßÄê¤ÎÄêµÁ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "¥¾¡¼¥ó̾ %s ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹(¥Õ¥¡¥¤¥ë\"%s\", %d ¹Ô)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "½ÅÊ£¤·¤¿¥Þ¥Ã¥Ô¥ó¥° `%s' ¤ÎÄêµÁ" @@ -4373,7 +4440,7 @@ msgstr "½ÅÊ£¤·¤¿¥á¥Ã¥»¡¼¥¸¼±ÊÌ»Ò" msgid "duplicated message number" msgstr "½ÅÊ£¤·¤¿¥á¥Ã¥»¡¼¥¸ÈÖ¹æ" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "¾Êά¤ÎÈÏ°Ï¤ÏÆ±¤¸·¿¤Î2¤Ä¤Î¥ª¥Ú¥é¥ó¥É¤Ë¤è¤Ã¤Æ¥Þ¡¼¥¯¤Å¤±¤µ¤ì¤Æ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" @@ -4381,10 +4448,14 @@ msgstr "¾Êά¤ÎÈÏ°Ï¤ÏÆ±¤¸·¿¤Î2¤Ä¤Î¥ª¥Ú¥é¥ msgid "empty char string" msgstr "¶õ¤Î char ʸ»úÎó" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "¶õ¤ÊưŪʸ»úÎó¥È¡¼¥¯¥ó¤ÎÂåÆþ" +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "¶õ¤ÊưŪʸ»úÎó¥È¡¼¥¯¥ó¤ÎÂåÆþ" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: ¥­¥ã¥Ã¥·¥å¤Ï´û¤ËÍ­¸ú¤Ç¤¹" @@ -4401,29 +4472,29 @@ msgstr "enablecache: ¥­¥ã¥Ã¥·¥å¥Ç¡¼¥¿¤ò³ msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: ¥­¥ã¥Ã¥·¥åfifo¤ò³ÎÊݤǤ­¤Þ¤»¤ó¤Ç¤·¤¿" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "½ÐÎÏ»þ¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "¸µ¤Î¥Æ¥­¥¹¥È¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "¸Æ¤Ó½Ð¤·ID¤Î¼èÆÀ¤Ç¥¨¥é¡¼: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "Åù²Á¤Ê¾È¹ç¥·¥ó¥Ü¥ëÄɲÃÃæ¤Ç¥¨¥é¡¼" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë `%s' ¤òÊĤ¸¤Æ¤¤¤ë´Ö¤Î¥¨¥é¡¼" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë¤òÊĤ¸¤Æ¤¤¤ë´Ö¤Î¥¨¥é¡¼" @@ -4431,7 +4502,8 @@ msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë¤òÊĤ¸¤Æ¤¤¤ë´Ö¤Î¥¨¥é msgid "error while closing the profiling data file" msgstr "¥×¥í¥Õ¥¡¥¤¥ë¾ðÊó¥Õ¥¡¥¤¥ë¤òÊĤ¸¤Æ¤¤¤ë´Ö¤Î¥¨¥é¡¼" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "ÆþÎÏÆÉ¤ß¹þ¤ßÃæ¤Î¥¨¥é¡¼" @@ -4439,10 +4511,14 @@ msgstr "ÆþÎÏÆÉ¤ß¹þ¤ßÃæ¤Î¥¨¥é¡¼" msgid "expect string argument for `copy'" msgstr "`copy'¤Ë¤Ïʸ»úÎó°ú¿ô¤¬´üÂÔ¤µ¤ì¤Þ¤¹" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "·Ñ³¹Ô¤¬´üÂÔ¤µ¤ì¤Þ¤·¤¿¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr ";·×¤Ê¥»¥ß¥³¥í¥ó¤¬»Ä¤Ã¤Æ¤¤¤Þ¤¹" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4452,7 +4528,7 @@ msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È`%s' ¤ÎÆÉ¤ß¹þ¤ß¤ msgid "failed to load symbol data" msgstr "¥·¥ó¥Ü¥ë¾ðÊó¤ÎÆÉ¤ß¹þ¤ß¤Ë¼ºÇÔ" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¤Î¥»¥°¥á¥ó¥È¤ò¥Þ¥Ã¥×¤¹¤ë¤Î¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" @@ -4460,18 +4536,19 @@ msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¤Î¥»¥°¥á¥ó¥È¤ò¥Þ msgid "failed to mmap the profiling data file" msgstr "¥×¥í¥Õ¥¡¥¤¥ë¾ðÊó¥Õ¥¡¥¤¥ë¤Îmmap¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "ÊÑ´¹½èÍý¤Î³«»Ï¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "¥«¥Æ¥´¥ê`%s'¤Î¥Ç¡¼¥¿¤ò½ñ¤­¹þ¤ßÃæ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "¥Õ¥¡¥¤¥ë %s ¤Ï¥È¥é¥ó¥±¡¼¥È(û¤¯)¤µ¤ì¤Þ¤·¤¿\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4480,19 +4557,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "¥Õ¥¡¥¤¥ë`%s'¤Ï´û¤Ë¸ºß¤·¤Þ¤¹¡£¾å½ñ¤­¤µ¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "¥Õ¥¡¥¤¥ë¤¬¾®¤µ¤¹¤®¤Þ¤¹" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fstat¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "¥­¥ã¥é¥¯¥¿¥³¡¼¥É»ØÄê¤Î½ª¤ï¤ê¤Ë¥´¥ß¤¬¤¢¤ê¤Þ¤¹" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "¿ô»ú¤Î½ª¤ï¤ê¤Ë¥´¥ß¤¬¤¢¤ê¤Þ¤¹" @@ -4512,28 +4589,28 @@ msgstr "get_myaddress: ioctl (¥¤¥ó¥¿¡¼¥Õ msgid "getent - get entries from administrative database." msgstr "getent - ´ÉÍý¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¥¨¥ó¥È¥ê¤òÆÀ¤ë" -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: Í׵᤬ÅþÃ夷¤Þ¤·¤¿ (¥Ð¡¼¥¸¥ç¥ó = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "¥Ï¡¼¥É¥ê¥ó¥¯¤Ë¼ºÇÔ¤·¤¿¤¿¤á¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤ò»È¤¤¤Þ¤¹" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "¤É¤³¤«¤Ç¥Ï¡¼¥É¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "16¿Ê¿ô¤ÎÈϰϥե©¡¼¥Þ¥Ã¥È¤Ï±ÑÂçʸ»ú¤Ç¤Î¤ß»ÈÍѤ¹¤Ù¤­¤Ç¤¹" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "Leap ¹Ô¤ËÉÔÀµ¤Ê CORRECTION ¥Õ¥£¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤¹" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "Leap ¹Ô¤ËÉÔÀµ¤Ê Rolling/Stationary ¥Õ¥£¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤¹" @@ -4541,11 +4618,16 @@ msgstr "Leap ¹Ô¤ËÉÔÀµ¤Ê Rolling/Stationa msgid "illegal character in file: " msgstr "¥Õ¥¡¥¤¥ëÃæ¤ËÉÔÀµ¤Ê¥­¥ã¥é¥¯¥¿¤¬¤¢¤ê¤Þ¤¹: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "ʸ»úÎó¤Î½ª¤ï¤ê¤ËÉÔÀµ¤Ê¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤¬¤¢¤ê¤Þ¤·¤¿" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "°ÌÃÖ %Zd ¤ÇÉÔÀµ¤ÊÆþÎÏ¥·¡¼¥±¥ó¥¹¤¬¤¢¤ê¤Þ¤·¤¿" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "°ÌÃÖ %ld ¤ÇÉÔÀµ¤ÊÆþÎÏ¥·¡¼¥±¥ó¥¹¤¬¤¢¤ê¤Þ¤·¤¿" @@ -4559,102 +4641,102 @@ msgstr "ÉÔÀµ¤Ê nettype ¤Ç¤¹:`%s'\n" msgid "illegal set number" msgstr "ÉÔÀµ¤ÊÀßÄêÃͤǤ¹" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "¼ÂÁõ¾å¤ÎÀ©¸Â: %Zd °Ê¾å¤Î¥­¥ã¥é¥¯¥¿¥¯¥é¥¹¤Ïµö¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "¼ÂÁõ¾å¤ÎÀ©¸Â: %d °Ê¾å¤Î¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¤Ïµö¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "¥Ð¥Ã¥Õ¥¡¤ÎºÇ¸å¤Ç¤Î°ìÃפ·¤Ê¤¤Ê¸»ú¤Þ¤¿¤Ï¥·¥Õ¥È¥·¡¼¥±¥ó¥¹¤Ç¤¹" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "ÉÔÌÀ¤Ê·Á¼°¤ÎÆþÎϥ饤¥ó¹Ô¤Ç¤¹" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "ÆâÉô¥¨¥é¡¼" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "ÆâÉô¥¨¥é¡¼ (ÉÔÀµ¤Êµ­½Ò»Ò¤Ç¤¹)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "ÆâÉô¥¨¥é¡¼ - ´Ö°ã¤Ã¤¿ isdst ¤È¤È¤â¤Ë addtype ¤¬¸Æ¤Ð¤ì¤Þ¤·¤¿" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "ÆâÉô¥¨¥é¡¼ - ´Ö°ã¤Ã¤¿ ttisgmt ¤È¤È¤â¤Ë addtype ¤¬¸Æ¤Ð¤ì¤Þ¤·¤¿" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "ÆâÉô¥¨¥é¡¼ - ´Ö°ã¤Ã¤¿ ttisstd ¤È¤È¤â¤Ë addtype ¤¬¸Æ¤Ð¤ì¤Þ¤·¤¿" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "%sÃæ(%u¹Ô)¤Ç¡¢ÆâÉô¥¨¥é¡¼¤¬µ¯¤³¤ê¤Þ¤·¤¿" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "ÉÔÅö¤ÊELF¥Ø¥Ã¥À" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "ÉÔÅö¤ÊUTC¥ª¥Õ¥»¥Ã¥È" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "ÉÔÅö¤Ê¾Êά·Á" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "̵¸ú¤Ê¥­¥ã¥é¥¯¥¿: ¥á¥Ã¥»¡¼¥¸¤ò̵»ë¤·¤Þ¤¹" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "ÉÔÅö¤Ê1¥ö·îÃæ¤ÎÆü¤Ë¤Á¤Ç¤¹" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "ÉÔÀµ¤ÊÄêµÁ¤Ç¤¹" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "ÉÔÀµ¤Ê¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬Í¿¤¨¤é¤ì¤Þ¤·¤¿" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "ÉÔÅö¤Ê½ªÎ»Ç¯" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "ÉÔÅö¤ÊÊݸ»þ¹ï¤Ç¤¹" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "ÉÔÅö¤Ê¤¦¤ë¤¦Ç¯¤Ç¤¹" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "ÉÔÅö¤Ê¹Ô¤Ç¤¹" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "dlopen()¤ËÂФ¹¤ëÉÔÀµ¤Ê¥â¡¼¥É¤Ç¤¹" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "ÉÔÅö¤Ê·î̾¤Ç¤¹" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "¥­¥ã¥é¥¯¥¿ÈϰϤȤ·¤ÆÉÔÀµ¤Ê̾Á°" @@ -4667,52 +4749,52 @@ msgstr "ÉÔÀµ¤Ê¥Ý¥¤¥ó¥¿¥µ¥¤¥º" msgid "invalid quote character" msgstr "ÉÔÀµ¤Ê¥¯¥©¡¼¥È¥­¥ã¥é¥¯¥¿¤Ç¤¹" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "ÉÔÀµ¤ÊÊݸ»þ¹ï" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "ÉÔÅö¤Ê³«»Ïǯ" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "1ÆüÊÕ¤ê¤Î»þ´Ö¤¬ÉÔÀµ" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "¤ª¤«¤·¤ÊÍËÆü̾" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "Í׵ᤵ¤ì¤¿¥­¡¼Ä¹¤ÏŤ¹¤®¤Þ¤¹: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "¸í¤Ã¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Îlibc4¥é¥¤¥Ö¥é¥ê %s " -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "¸í¤Ã¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Îlibc5¥é¥¤¥Ö¥é¥ê %s" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "¸í¤Ã¤¿¥Ç¥£¥ì¥¯¥È¥êÆâ¤Îlibc6¥é¥¤¥Ö¥é¥ê %s" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "¥Ç¥£¥ì¥¯¥È¥ê %3$s Æâ¤Ë¤¢¤ë¥é¥¤¥Ö¥é¥ê %1$s ¤È %2$s ¤ÏƱ°ì¤Î soname ¤Ç¤¹¤¬°Û¤Ê¤Ã¤¿¥¿¥¤¥×¤Ç¤¹." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "¹Ô¤¬Ä¹¤¹¤®¤Þ¤¹" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "´ûÃΤÎÁ´¥­¥ã¥é¥¯¥¿¥»¥Ã¥È¤òɽ¼¨¤¹¤ë" @@ -4720,7 +4802,7 @@ msgstr "´ûÃΤÎÁ´¥­¥ã¥é¥¯¥¿¥»¥Ã¥È¤òɽ¼¨¤¹ msgid "locale name should consist only of portable characters" msgstr "¥í¥±¡¼¥ë̾¤Ï¥Ý¡¼¥¿¥Ö¥ëʸ»ú¤À¤±¤Ç¹½À®¤¹¤Ù¤­¤Ç¤¹" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "lstat¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" @@ -4732,7 +4814,11 @@ msgstr "½ÐÎÏ¥°¥é¥Õ¥£¥Ã¥¯ÃͤΥԥ¯¥»¥ë¤ò¹â msgid "make output graphic VALUE pixel wide" msgstr "½ÐÎÏ¥°¥é¥Õ¥£¥Ã¥¯ÃͤΥԥ¯¥»¥ë¤ò¹­¤¯¤·¤Þ¤¹" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: 8°ú¿ô°Ê¾å¤ò°·¤¦ÊýË¡¤¬¤ï¤«¤ê¤Þ¤»¤ó\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "ÉÔÅö¤Ê¹Ô¤ò̵»ë¤·¤Þ¤·¤¿" @@ -4744,39 +4830,34 @@ msgstr "¥»¥¯¥·¥ç¥ó¥Ø¥Ã¥À¤Îʸ»úÎ󥯡¼¥Ö¥ë msgid "mapping of section headers failed" msgstr "¥»¥¯¥·¥ç¥ó¥Ø¥Ã¥À¤Î¥Þ¥Ã¥Ô¥ó¥°¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "¥Ö¥í¥Ã¥¯³ÎÊÝÁ°¤Ë¥á¥â¥ê¤òÍøÍѤ·¤Þ¤·¤¿\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "¥Ö¥í¥Ã¥¯³ÎÊݤκǸå¤è¤ê°Ê¸å¤Ë¥á¥â¥ê¤òÍøÍѤ·¤Þ¤·¤¿\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "¥á¥â¥ê¤ò»È¤¤²Ì¤¿¤·¤Þ¤·¤¿" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "¥á¥â¥ê¤Ï°ì´ÓÀ­¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¢¥é¥¤¥Ö¥é¥ê¤¬¥Ð¥®¡¼¤Ç¤¹\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "¥­¥ã¥Ã¥·¥å¥Õ¥¡¥¤¥ë¤Îmmap¤Ë¼ºÇÔ¤·¤Þ¤·¤¿.\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "Ê£¿ô¤ÎưŪ¥»¥°¥á¥ó¥È\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "̾Á°¤¬¤Ê¤¤¥ë¡¼¥ë¤Ç¤¹" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "¥ª¥ê¥¸¥Ê¥ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤â¥¿¡¼¥²¥Ã¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤â»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4809,7 +4890,7 @@ msgstr "netname2user: principal̾ `%s' ¤ msgid "netname2user: should not have uid 0" msgstr "netname2user: uid 0 ¤ò»È¤Ã¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "¥×¥í¥°¥é¥à %d ¤ÏÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤»¤ó\n" @@ -4818,11 +4899,11 @@ msgstr "¥×¥í¥°¥é¥à %d ¤ÏÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤» msgid "no or value given" msgstr " ¤Þ¤¿¤Ï Ãͤ¬Í¿¤¨¤é¤ì¤Þ¤»¤ó¤Ç¤·¤¿" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "·î¤ÎÃæ¤ÎÆü¤Ë¤Á¤Ï¥ë¡¼¥ë¤Ë¥Þ¥Ã¥Á¤·¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "`UNDEFINED'¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" @@ -4831,7 +4912,7 @@ msgstr "`UNDEFINED'¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¥Ç¡¼¥¿¤Î¥Õ¥¡¥¤¥ë̾¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤¤«¡¢¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È`%s' ¤¬soname¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "ÆþÎϷ夬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×Ãæ¤Ëɸ½à̾¤¬¤¢¤ê¤Þ¤»¤ó" @@ -4839,37 +4920,37 @@ msgstr "ÆþÎϷ夬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢¥­¥ã msgid "no other keyword shall be specified when `copy' is used" msgstr "`copy' ¤ò»ÈÍѤ·¤¿¤È¤­¤Ë¾¤Î¤¤¤«¤Ê¤ë¥­¡¼¥ï¡¼¥É¤â»ØÄꤵ¤ì¤Þ¤»¤ó¤Ç¤·¤¿" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "½ÐÎϷ夬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×Ãæ¤Ëɸ½à̾¤¬¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "·Ù¹ð¤¬½Ð¤µ¤ì¤¿¤¿¤á¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤµ¤ì¤Þ¤»¤ó¤Ç¤·¤¿" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "¥·¥ó¥Ü¥ë̾¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "Îΰè¤ÎºÇ¸å¤Ë¥·¥ó¥Ü¥ë̾¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "Èó¥·¥ó¥Ü¥ë¥­¥ã¥é¥¯¥¿ÃͤϻÈÍѤ¹¤Ù¤­¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "`outdigit'¤Ç»ÈÍÑÃæ¤Îʸ»ú¤Î°ìÉô¤Ï¥­¥ã¥é¥¯¥¿¥Þ¥Ã¥×¤ÇÍøÍѲÄǽ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "`outdigit'¤Ç»ÈÍÑÃæ¤Îʸ»ú¤Î°ìÉô¤Ï¥ì¥Ñ¡¼¥È¥ê¥Þ¥Ã¥×¤ÇÍøÍѲÄǽ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "Ä̾ï¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" @@ -4888,36 +4969,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd¤Ïµ¯Æ°¤·¤Æ¤¤¤Þ¤»¤ó!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤ÏưŪ¥»¥¯¥·¥ç¥ó¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "½ÐÎϤ«¤éÉÔÀµ¤Êʸ»ú¤òÈ´¤«¤·¤Þ¤·¤¿" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "ET_DYN ¤È ET_EXEC ¤À¤±¤¬¥í¡¼¥É¤Ç¤­¤Þ¤·¤¿" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "WIDTH ÄêµÁ¤Ï CHARMAP ÄêµÁ¤Ë½¾¤¦¤³¤È¤Î¤ßµö¤µ¤ì¤Þ¤¹" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "`%.*s'¤ËÂФ¹¤ë¥ª¡¼¥À¡¼¤Ï %s:%Zu ¤Ç´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "¥ª¥ê¥¸¥Ê¥ë¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ï`-f'¤ò»È¤Ã¤Æ»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "¥á¥â¥êÉÔ­" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë" @@ -4925,19 +5002,19 @@ msgstr "½ÐÎÏ¥Õ¥¡¥¤¥ë" msgid "pmap_getmaps rpc problem" msgstr "pmap_getmaps rpc ¤¬ÌäÂê¤Ç¤¹" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: ²óÀþ¤Î¥»¥Ã¥È¥¢¥Ã¥×Ãæ¤Ç¥×¥í¥È¥³¥ë¤¬¼ºÇÔ¤·¤Þ¤·¤¿\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "`translit_ignore'ÄêµÁ¤Î½ªÃ¼¤¬Á᤹¤®¤Þ¤¹" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "¥×¥ê¥×¥í¥»¥Ã¥µ¥¨¥é¡¼" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "Á°¤ÎÄêµÁ¤¬¤³¤³¤Ë¤¢¤ê¤Þ¤·¤¿" @@ -4945,7 +5022,7 @@ msgstr "Á°¤ÎÄêµÁ¤¬¤³¤³¤Ë¤¢¤ê¤Þ¤·¤¿" msgid "print list of count paths and their number of use" msgstr "¥«¥¦¥ó¥È¤·¤¿·ÐÏ©¤È¤½¤ì¤é¤Î»ÈÍÑ¿ô¤Î¥ê¥¹¥È¤òɽ¼¨" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "·Ð²á¾ðÊó¤Îɽ¼¨" @@ -4971,30 +5048,30 @@ msgstr "¥×¥í¥°¥é¥à%lu¥Ð¡¼¥¸¥ç¥ó%lu¤ÏÍøÍÑ msgid "program %lu version %lu ready and waiting\n" msgstr "¥×¥í¥°¥é¥à %lu ¥Ð¡¼¥¸¥ç¥ó %lu ¤Î½àÈ÷¤¬´°Î»¤·ÂÔµ¡Ãæ¤Ç¤¹\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: û¤¤ÆÉ¹þ¤ß" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (stderr ¤òÀßÄêÃæ¤Ç¤¹): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: socket: Á´¥Ý¡¼¥È¤¬»ÈÍÑÃæ¤Ç¤¹\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write (stderr ¤òÀßÄêÃæ¤Ç¤¹): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "½Û´Ä±¼ÉäνִÖ" @@ -5003,7 +5080,7 @@ msgstr "½Û´Ä±¼ÉäνִÖ" msgid "repertoire map file `%s' not found" msgstr "¥ì¥Ñ¡¼¥È¥ê¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë`%s'¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "ÈÏ°ÏÆâ¤Î·ë²Ì¥Ð¥¤¥È¤Ïɽ¸½²Äǽ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó." @@ -5039,24 +5116,24 @@ msgstr "rpcinfo: ¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤Ë¼ºÇÔ¤ msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: ¥Ý¡¼¥È¥Þ¥Ã¥Ñ¤ÈÀܳ¤Ç¤­¤Þ¤»¤ó" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "Ê£¿ô¥Õ¥¡¥¤¥ë¤ËƱ¤¸¥ë¡¼¥ë̾¤¬¤¢¤ê¤Þ¤¹" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¤Ï dlopen() ¤Ç¤­¤Þ¤»¤ó" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "¶¦Í­¥ª¥Ö¥¸¥§¥¯¥È¤¬³«¤±¤Þ¤»¤ó" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "¥ê¥¯¥¨¥¹¥È¥­¡¼: %s ¤òÆÉ¹þ¤ßÃæ¤Îû¤¤ÆÉ¹þ¤ß¤Ç¤¹" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "¥ê¥¯¥¨¥¹¥È: %s ¤òÆÉ¹þ¤ßÃæ¤Îû¤¤ÆÉ¹þ¤ß¤Ç¤¹" @@ -5066,35 +5143,31 @@ msgstr "¥ê¥¯¥¨¥¹¥È: %s ¤òÆÉ¹þ¤ßÃæ¤Îû¤¤Æ msgid "short write in %s: %s" msgstr "%s ¤Ç¤Îû¤¤½ñ¤­¹þ¤ß: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "socket: ²óÀþ¤Î¥»¥Ã¥È¥¢¥Ã¥×Ãæ¤Ç¥×¥í¥È¥³¥ë¤¬¼ºÇÔ¤·¤Þ¤·¤¿\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "ɸ½àÆþÎÏ" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "ɸ½à½ÐÎÏ" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "ÈÏ°ÏÆâ¤Î³«»Ï½ªÎ»¥­¥ã¥é¥¯¥¿¥·¡¼¥±¥ó¥¹¤ÏƱ°ìĹ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "³«»Ïǯ¤¬½ªÎ»Ç¯¤è¤êÂ礭¤¯¤Ê¤Ã¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "³«»Ïǯ¤ÎÃͤ¬Â礭¤¹¤®¤ë¤¿¤áɽ¸½¤Ç¤­¤Þ¤»¤ó" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "³«»Ïǯ¤ÎÃͤ¬¾®¤µ¤¹¤®¤ë¤¿¤áɽ¸½¤Ç¤­¤Þ¤»¤ó" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "·Ù¹ð¤ÎÍÞÀ©" @@ -5102,31 +5175,31 @@ msgstr "·Ù¹ð¤ÎÍÞÀ©" msgid "svc_run: - poll failed" msgstr "svc_run: - poll¤Ë¼ºÇÔ¤·¤Þ¤·¤¿" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - getsockname¤â¤·¤¯¤Ïlisten¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - tcp¥½¥±¥Ã¥ÈºîÀ®¤ËÌäÂ꤬¤¢¤ê¤Þ¤¹" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - AF_UNIX¥½¥±¥Ã¥ÈºîÀ®¤ËÌäÂ꤬¤¢¤ê¤Þ¤¹" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - getsockname¤â¤·¤¯¤Ïlisten¤Ç¤­¤Þ¤»¤ó" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" @@ -5146,49 +5219,49 @@ msgstr "svcudp_create: ¥½¥±¥Ã¥È¤ÎºîÀ®¤ËÌ msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad¤ÏIP_PKTINFO¤ËÂФ·¤Æ¾®¤µ¤¹¤®¤Þ¤¹\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "ÉÔÌÀ¤Ê¥·¥ó¥Ü¥ë`%.*s'¤¬¤¢¤ê¤Þ¤·¤¿: ¤³¤Î¹Ô¤Ï̵»ë¤·¤Þ¤¹" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "¥·¥ó¥Ü¥ë `%.*s' ¤¬¥ì¥Ñ¡¼¥È¥ê¥Þ¥Ã¥×Ãæ¤Ë¤¢¤ê¤Þ¤»¤ó" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "¥·¥ó¥Ü¥ë `%s'" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "¥·¥ó¥Ü¥ë `%s' ¤Ï°Ê²¼¤ÈƱ¤¸¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "¥·¥ó¥Ü¥ë`%s'¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "ʸˡ¥¨¥é¡¼" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "%s¤ÎÄêµÁÃæ¤Ëʸˡ¥¨¥é¡¼¤¬¤¢¤ê¤Þ¤¹: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5200,73 +5273,69 @@ msgstr "prolog Ãæ¤Çʸˡ¥¨¥é¡¼¤Ç¤¹: %s" msgid "syntax error in repertoire map definition: %s" msgstr "¥ì¥Ñ¡¼¥È¥ê¥Þ¥Ã¥×¤ÎÄêµÁÃæ¤Ëʸˡ¥¨¥é¡¼¤¬¤¢¤ê¤Þ¤¹: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "ʸˡ¥¨¥é¡¼: ¥í¥±¡¼¥ëÄêµÁ¥»¥¯¥·¥ç¥óÆâÉô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "¥¿¡¼¥²¥Ã¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬`-t'¤ò»È¤Ã¤Æ»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "¤³¤ì¤¬ºÇ½é¤ÎÄêµÁ¤Ç¤¹" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "¥¼¥íÁ°¤Î»þ¹ï" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "»þ´Ö¥ª¡¼¥Ð¡¼¥Õ¥í¡¼" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "ÈÏ°ÏÆâ¤Îto¤ÎÃÍ ¤Ïfrom¤ÎÃÍ ¤è¤ê¤â¾®¤µ¤¹¤®¤Þ¤¹" -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "toÃͤÎʸ»ú¥·¡¼¥±¥ó¥¹¤ÏfromÃͤÎʸ»ú¥·¡¼¥±¥ó¥¹¤è¤ê¤â¾®¤µ¤¹¤®¤Þ¤¹" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "ʸ»ú¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°Ãæ¤Ç¤Î¥Ð¥¤¥È¿ô¤¬¾¯¤Ê¤¹¤®¤Þ¤¹" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "ʸ»ú¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°Ãæ¤Ç¤Î¥Ð¥¤¥È¿ô¤¬Â¿¤¹¤®¤Þ¤¹" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "¤¦¤ë¤¦Éä¬Â礭¤¹¤®¤Þ¤¹" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "¥í¡¼¥«¥ë»þ´Ö·Á¼°¤¬Â¿¤¹¤®¤Þ¤¹" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "Á«°ÜÀ褬¿¤¹¤®¤Þ¤¹?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "¥¿¥¤¥à¥¾¡¼¥ó¤Î¾Êά̾¤¬Â¿¤¹¤®¤ë¤«Ä¹¤¹¤®¤Þ¤¹" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "¹ÔËö¤Ë¥´¥ß¤¬»Ä¤Ã¤Æ¤¤¤Þ¤¹" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "¥×¥í¥°¥é¥à %d ¤Ø¤Î±þÅúÃæ¤ËÌäÂ꤬µ¯¤­¤Þ¤·¤¿\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "typed single year" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "ÆþÎÏÍѥХåե¡¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó" @@ -5274,11 +5343,15 @@ msgstr "ÆþÎÏÍѥХåե¡¤ò³ä¤êÅö¤Æ¤ë¤³¤È¤¬ msgid "unable to free arguments" msgstr "°ú¿ô¤ò²òÊü¤Ç¤­¤Þ¤»¤ó" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "̤ÄêµÁ" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "ÉÔÌÀ" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "ÉÔÌÀ¤Êʸ»ú`%s'" @@ -5288,7 +5361,7 @@ msgstr "ÉÔÌÀ¤Êʸ»ú`%s'" msgid "unknown directive `%s': line ignored" msgstr "ÉÔÌÀ¤Ê»Ø¼¨`%s'¤¬¤¢¤ê¤Þ¤·¤¿: ¤³¤Î¹Ô¤Ï̵»ë¤·¤Þ¤¹" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "ÉÔÌÀ¤Ê iconv() ¥¨¥é¡¼ %d" @@ -5298,15 +5371,20 @@ msgstr "ÉÔÌÀ¤Ê iconv() ¥¨¥é¡¼ %d" msgid "unknown set `%s'" msgstr "ÉÔÌÀ¤Ê¥»¥Ã¥È`%s'¤Ç¤¹" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "̤ÃΤλÅÍÍ \"%s\" ¤Ç¤¹" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "unruly zone" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "¥á¥Ã¥»¡¼¥¸¤¬½ªÎ»¤·¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "ʸ»úÎ󤬽ªÎ»¤·¤Æ¤¤¤Þ¤»¤ó" @@ -5314,11 +5392,11 @@ msgstr "ʸ»úÎ󤬽ªÎ»¤·¤Æ¤¤¤Þ¤»¤ó" msgid "unterminated string constant" msgstr "ʸ»úÎóÄê¿ô¤¬½ªÎ»¤·¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "¥·¥ó¥Ü¥ë̾¤¬½ªÎ»¤·¤Æ¤¤¤Þ¤»¤ó" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "ÈÏ°ÏÆâ¤Î¾å¸Â¤Ï²¼¸Â¤è¤êÂ礭¤¯¤¢¤ê¤Þ¤»¤ó" @@ -5326,35 +5404,35 @@ msgstr "ÈÏ°ÏÆâ¤Î¾å¸Â¤Ï²¼¸Â¤è¤êÂ礭¤¯¤¢¤ê msgid "upper limit in range is not smaller then lower limit" msgstr "ÈÏ°ÏÆâ¤Î¾å¸Â¤Ï²¼¸Â¤è¤ê¾®¤µ¤¯¤¢¤ê¤Þ¤»¤ó" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "»ÈÍÑË¡: %s ÆþÎÏ¥Õ¥¡¥¤¥ë\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "±¼Ç¯¤Ç¤Ï¤Ê¤¤¤Î¤Ë2/29¤ò»È¤Ã¤Æ¤¤¤Þ¤¹" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "%s¤ÎÃͤÏÀ°¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "<%s> ¤ÎÃͤÏ1°Ê¾å¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "<%s> ¤ÎÃÍ¤Ï <%s> ¤ÎÃͰʾå¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "·Ù¹ð: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "¼õÉÕ¥³¥Í¥¯¥·¥ç¥óÃæ: %s" @@ -5371,11 +5449,15 @@ msgstr "¥Ï¥Ã¥·¥å¥Æ¡¼¥Ö¥ë¥¨¥ó¥È¥ê³ä¤êÅö¤Æ msgid "while allocating key copy" msgstr "¥­¡¼¥³¥Ô¡¼³ä¤êÅö¤ÆÃæ" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "¸¡º÷ÌÚ¤ØÁÞÆþÃæ¤Ç¤¹" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "¸Å¤¤¥«¥¿¥í¥°¥Õ¥¡¥¤¥ë¥ª¡¼¥×¥óÃæ" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "Á°½èÍý½ÐÎÏÃæ" @@ -5383,15 +5465,15 @@ msgstr "Á°½èÍý½ÐÎÏÃæ" msgid "while stat'ing profiling data file" msgstr "¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë½ñ¤­¹þ¤ßÃæ" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "UCS ¤ÎÃͤÎÈϰϤȤ·¤Æ16¿Ê¥·¥ó¥Ü¥ë¾Êά `..' ¤ò»ÈÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "ʸ»ú¥³¡¼¥É¤ÎÃͤÎÈϰϤȤ·¤ÆÀäÂоÊά `...' ¤ò»ÈÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "¥·¥ó¥Ü¥ë̾¤ÎÃͤÎÈϰϤȤ·¤ÆÀäÂоÊά `...' ¤Ï»ÈÍѤ·¤Æ¤Ï¤¤¤±¤Þ¤»¤ó" @@ -5399,7 +5481,7 @@ msgstr "¥·¥ó¥Ü¥ë̾¤ÎÃͤÎÈϰϤȤ·¤ÆÀäÂÐ¾Ê msgid "write incomplete" msgstr "½ñ¹þ¤ß¤¬ÉÔ´°Á´¤Ç¤¹" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "½êÍ­¼Ô°Ê³°¤¬½ñ¤­¹þ¤ß¤¬²Äǽ¤Ç¤¹" @@ -5407,23 +5489,23 @@ msgstr "½êÍ­¼Ô°Ê³°¤¬½ñ¤­¹þ¤ß¤¬²Äǽ¤Ç¤¹" msgid "wrong number of arguments" msgstr "°ú¿ô¤Î¿ô¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "Leap¹Ô¤Î¥Õ¥£¡¼¥ë¥É¿ô¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "Link¹Ô¤Î¥Õ¥£¡¼¥ë¥É¿ô¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "Rule¹Ô¤Î¥Õ¥£¡¼¥ë¥É¿ô¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "Zone continuation¹Ô¤Î¥Õ¥£¡¼¥ë¥É¿ô¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "Zone¹Ô¤Î¥Õ¥£¡¼¥ë¥É¿ô¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" @@ -5435,31 +5517,10 @@ msgstr "xdr_reference: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: ¥á¥â¥ê¤¬Â­¤ê¤Þ¤»¤ó\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: ¥Û¥¹¥È¤ò¥Í¥Ã¥È̾¤ØÊÑ´¹¤Ç¤­¤Þ¤»¤ó\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: ¥µ¡¼¥Ð¥¢¥É¥ì¥¹¤òÆÀ¤é¤ì¤Þ¤»¤ó\n" - -#~ msgid "%s: only one `include' instruction allowed" -#~ msgstr "%d ¤Ï̤ÃΤΥޥ·¥ó %d ¤ËÂФ¹¤ë¤â¤Î¤Ç¤¹.\n" - -#~ msgid "Can't chroot to %s" -#~ msgstr "%s ¤Ëchroot¤Ç¤­¤Þ¤»¤ó" - -#~ msgid "Device not configured" -#~ msgstr "¥Ç¥Ð¥¤¥¹¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó" - -#~ msgid "ELF file class not 32-bit" -#~ msgstr "ELF¥Õ¥¡¥¤¥ë¥¯¥é¥¹¤Ï32-bit¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" - -#~ msgid "ELF file class not 64-bit" -#~ msgstr "ELF¥Õ¥¡¥¤¥ë¥¯¥é¥¹¤Ï64-bit¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" - -#~ msgid "ELF file machine architecture does not match" -#~ msgstr "ELF¥Õ¥¡¥¤¥ë¤Î¥Þ¥·¥ó¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ï°ìÃפ·¤Æ¤¤¤Þ¤»¤ó" - -#~ msgid "buffer for snprintf too small for %s/%s--file is ignored\n" -#~ msgstr "snprintf¤ËÂФ¹¤ë¥Ð¥Ã¥Õ¥¡¤Ï %s/%s ¤ËÂФ·¤Æ¾®¤µ¤¹¤®¤Þ¤¹ -- ¥Õ¥¡¥¤¥ë¤ò̵»ë¤·¤Þ¤¹\n" Binary files glibc-2.2.4/po/ko.mo and glibc-2.2.5/po/ko.mo differ diff -durpN glibc-2.2.4/po/ko.po glibc-2.2.5/po/ko.po --- glibc-2.2.4/po/ko.po Mon Jul 23 10:54:55 2001 +++ glibc-2.2.5/po/ko.po Sun Aug 19 23:22:50 2001 @@ -4,82 +4,88 @@ # msgid "" msgstr "" -"Project-Id-Version: GNU libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-06-07 02:20+0900\n" +"Project-Id-Version: GNU libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-20 15:03+0900\n" "Last-Translator: Changwoo Ryu \n" "Language-Team: Korean \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=EUC-KR\n" "Content-Transfer-Encoding: 8-bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: `%s' ÇʵåÀÇ °ªÀº %d...%d »çÀÌ¿¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tÁ¢±Ù ±ÇÇÑ : " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\t¼Ó¼º : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-DÀ̸§[=°ª]] [-i Å©±â] [-I [-K ÃÊ]] [-Y °æ·Î] ÀÔ·ÂÆÄÀÏ\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o Ãâ·ÂÆÄÀÏ] [ÀÔ·ÂÆÄÀÏ]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n ³×Æ®id]* [-o Ãâ·ÂÆÄÀÏ] [ÀÔ·ÂÆÄÀÏ]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s ³×ƮŸÀÔ]* [-o Ãâ·ÂÆÄÀÏ] [ÀÔ·ÂÆÄÀÏ]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tÁ¢±Ù ±ÇÇÑ: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tŸÀÔ %sÀÇ entry µ¥ÀÌŸ\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tÀ̸§ : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\t°ø¿ë Ű : " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tŸÀÔ : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tº¸Æí ÁÖ¼Ò (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tÀ̸§ : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u ¹ÙÀÌÆ®] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -109,11 +115,11 @@ msgstr "" "%15ld%% ij½¬ È÷Æ®À²\n" "%15s check /etc/%s for changes\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\n±×·ì ¸â¹ö :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nÀ¯Áö ½Ã°£ : " @@ -141,7 +147,7 @@ msgstr " ¾Æ´Ï¿À" msgid " yes" msgstr " ¿¹" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " µ¥ÀÌŸ ±æÀÌ = %u\n" @@ -198,15 +204,15 @@ msgstr " ÇÁ·Î±×·¥ ¹öÀü ¿øÇü Æ÷Æ®\n" msgid " or: " msgstr " ȤÀº: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (Áö³ªÄ§)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (º¯°æµÊ)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (\"%s\"¿¡ ÀÖ´Â ±ÔÄ¢, Çà %d)" @@ -215,22 +221,22 @@ msgstr " (\"%s\"¿¡ ÀÖ´Â ±ÔÄ¢, Çà %d)" msgid " [OPTION...]" msgstr "[<¿É¼Ç>...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", Çà %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "\"Áö¿ª %s\" Çà°ú -l ¿É¼ÇÀº »óÈ£ ¹èŸÀûÀÔ´Ï´Ù" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "\"Áö¿ª %s\" Çà°ú -p ¿É¼ÇÀº »óÈ£ ¹èŸÀûÀÔ´Ï´Ù" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "ÅÛÇø´ »ý¼º Ç÷¡±×¸¦ À§Çؼ­´Â \"ÀÔ·ÂÆÄÀÏ\"ÀÌ ÇÊ¿äÇÕ´Ï´Ù\n" @@ -244,58 +250,58 @@ msgstr "%.*s: ARGP_HELP_FMT Àμö´Â °ªÀÌ msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: ¾Ë¼ö ¾ø´Â ARGP_HELP_FMT ÀÎÀÚ" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: Á¤Àǰ¡ `END %1$s'·Î ³¡³ªÁö ¾Ê½À´Ï´Ù" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%2$s ij½¬¿¡ %1$d°³ÀÇ ¶óÀ̺귯¸®°¡ ¹ß°ßµÇ¾ú½À´Ï´Ù\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "±ÔÄ¢¾ø´Â Áö¿ª¿¡ %s°¡ ÀÖÀ½" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%sÀº(´Â) 32ºñÆ® ELF ÆÄÀÏÀÔ´Ï´Ù.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%sÀº(´Â) 64ºñÆ® ELF ÆÄÀÏÀÔ´Ï´Ù.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%sÀº(´Â) ¾Ë·ÁÁöÁö ¾ÊÀº ±â°è %dÀ»(¸¦) À§ÇÑ °ÍÀÔ´Ï´Ù.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%sÀº(´Â) ¾Ë·ÁÁø ¶óÀ̺귯¸® ŸÀÔÀÌ ¾Æ´Õ´Ï´Ù" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%sÀº(´Â) µ¿Àû ¿ÀºêÁ§Æ® ÆÄÀÏÀÌ ¾Æ´Õ´Ï´Ù (ŸÀÔ: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%sÀº(´Â) ½Éº¼¸¯ ¸µÅ©°¡ ¾Æ´Õ´Ï´Ù\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%sÀº(´Â) ELF ÆÄÀÏÀÌ ¾Æ´Õ´Ï´Ù - ½ÃÀۺκÐÀÇ ¸ÅÁ÷ ¹ÙÀÌÆ®°¡ Ʋ·È½À´Ï´Ù.\n" @@ -315,12 +321,12 @@ msgstr "%s%s%s:%u: %s%s¿¹±âÄ¡ ¸øÇÑ ¿À·ù: msgid "%s%sUnknown signal %d\n" msgstr "%s%s¾Ë ¼ö ¾ø´Â ½ÅÈ£ %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d´Â ºÎÈ£ È®ÀåÀÌ Á¦´ë·Î µÇÁö ¾Ê¾Ò½À´Ï´Ù\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: ´Â º¸´Ù Ä¿¾ß ÇÕ´Ï´Ù\n" @@ -335,87 +341,82 @@ msgstr "%s: C Àü󸮱Ⱑ Á¾·á ÄÚµå %d·Î msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: C Àü󷯱Ⱑ ½Ã±×³¯ %d·Î ½ÇÆÐÇÏ¿´½À´Ï´Ù\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: %s¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: %s µð·ºÅ丮¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: %s¸¦ %s·Î ¸µÅ©ÇÒ ¼ö ¾ø½À´Ï´Ù: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: %s¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: %sÀ»(¸¦) Áö¿ï ¼ö ¾ø½À´Ï´Ù: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: %sÀ»(¸¦) Áö¿ï ¼ö ¾ø½À´Ï´Ù: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: %sÀ»(¸¦) ´Ý´Â µµÁß ¿À·ù ¹ß»ý: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: %sÀ»(¸¦) Àд µµÁß ¿À·ù ¹ß»ý\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: ¾²´Â µµÁß ¿À·ù ¹ß»ý" - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: %sÀ»(¸¦) ¾²´Â µµÁß ¿À·ù ¹ß»ý\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: À±ÃÊ ÆÄÀÏÀÌ ¾Æ´Ñ %s ÆÄÀÏ¿¡ Leap ÁÙÀÌ ÀÖÀ½\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: ¸Þ¸ð¸®°¡ ¹Ù´Ú³²: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -L ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -d ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -l ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -p ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Çϳª ÀÌ»óÀÇ -y ¿É¼ÇÀÌ ÁöÁ¤µÇ¾úÀ½\n" @@ -431,7 +432,7 @@ msgstr "%s: ÀÎÀÚ°¡ ³Ê¹« ¸¹À½\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%1$s: ¹«°Ô %3$dÀÇ Á¤ÀÇ¿¡¼­ `%2$s'ÀÌ(°¡) ¿©·¯ ¹ø ³ªÅ¸³µ½À´Ï´Ù" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s'Àº(´Â) ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù" @@ -442,7 +443,7 @@ msgstr "%s: `%s'Àº(´Â) ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´ msgid "%s: `%s' value does not match `%s' value" msgstr "%s: `%s'ÀÇ °ªÀº `%s'ÀÇ °ª°ú ¸ÂÁö ¾Ê½À´Ï´Ù" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1'Àº `%2$s' ¹üÁÖÀÇ `%s' ÇʵåÀÇ ¸¶Áö¸· Ç׸ñÀ̾î¾ß ÇÕ´Ï´Ù" @@ -452,101 +453,101 @@ msgstr "%s: `-1'Àº `%2$s' ¹üÁÖÀÇ `%s' ÇÊ msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: Á¤·Ä ¼ø¼­ `forward'¿Í `backward'´Â ¼­·Î ¹èŸÀûÀÔ´Ï´Ù" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position'Àº ¸ðµç ¼½¼ÇÀÇ Æ¯Á¤ ´Ü°è¿¡¼­¸¸ »ç¿ëµÇ°Å³ª ¾Æ¿¹ »ç¿ëµÇÁö ¸»¾Æ¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: `translit_start' ¼½¼ÇÀÌ `translit_end'·Î ³¡³ªÁö ¾Ê½À´Ï´Ù." -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: ¼ø¼­¿­ÀÇ Ã¹¹øÂ° ¹®ÀÚÀÇ ¹ÙÀÌÆ® ¼ø¼­°¡ ¸¶Áö¸· ¹®ÀÚÀÇ ¹ÙÀÌÆ® ¼ø¼­º¸´Ù ÀÛÁö ¾Ê½À´Ï´Ù" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: ù¹øÂ° ¹®ÀÚ¿Í ¸¶Áö¸· ¹®ÀÚÀÇ ¹ÙÀÌÆ® ¼ø¼­´Â ±æÀ̰¡ °°¾Æ¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: ¸»ÁÙÀÓÇ¥ ¹üÀ§ÀÇ ³¡¿¡ `%s'À»(¸¦) µÑ ¼ö ¾ø½À´Ï´Ù" # ???? -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: %.*s µÚ¿¡ ¼ø¼­¸¦ ¹Ù²Ü ¼ö ¾ø½À´Ï´Ù: ±âÈ£¸¦ ¾Ë ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: ¹®ÀÚÁöµµÀÇ `%s' ¹®ÀÚ´Â ÇÑ ¹ÙÀÌÆ®·Î Ç¥ÇöÇÒ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: ±âº»°ª `%s' ¹®ÀÚ´Â ÇÑ ¹ÙÀÌÆ®·Î Ç¥ÇöÇÒ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: ¹®ÀÚ `%s'´Â ±âº»°ªÀ¸·Î ÇÊ¿äÇÏÁö¸¸ ¹®Àڸʿ¡ Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: ¹®ÀÚ `%s'´Â ±âº»°ªÀ¸·Î ÇÊ¿äÇÏÁö¸¸ Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: ¸í·ÉÀº '%s'¿´°í, °á°ú´Â %d¿´½À´Ï´Ù\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ `%Zd'ÀÇ ¹æÇâ Ç÷¡±×°¡ '+'µµ '-'µµ ¾Æ´Õ´Ï´Ù" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ `%d'ÀÇ ¹æÇâ Ç÷¡±×°¡ ´ÜÀÏ ¹®ÀÚ°¡ ¾Æ´Õ´Ï´Ù" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: `default_missing' Á¤Àǰ¡ Áߺ¹µÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: ¹üÁÖ ¹öÀü Á¤Àǰ¡ Áߺ¹µÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: ¼½¼Ç `%s'ÀÇ ¼±¾ðÀÌ Áߺ¹µÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: `%s'ÀÇ Á¤Àǰ¡ Áߺ¹µÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: ºó ¹üÀ§ ±â¼úÀÚ¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù" @@ -556,19 +557,27 @@ msgstr "%s: ºó ¹üÀ§ ±â¼úÀÚ¸¦ ¾µ ¼ö ¾ø½À´ msgid "%s: empty weight string not allowed" msgstr "%s: ºó weight ¹®ÀÚ¿­Àº Çã¿ëµÇÁö ¾Ê½À´Ï´Ù" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: »óÅ ±â°è¿¡ ¿À·ù ¹ß»ý" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: `%s' Çʵ尡 ¿©·¯ ¹ø ¼±¾ðµÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: `%s' Çʵ忡 µé¾î ÀÖ´Â Ç׸ñÀÌ 10°³°¡ ¾Æ´Õ´Ï´Ù" @@ -580,14 +589,18 @@ msgstr "%s: `%s' Çʵ忡 µé¾î ÀÖ´Â Ç׸ñÀÌ msgid "%s: field `%s' must not be empty" msgstr "%s: `%s' Çʵå´Â ºñ¾î ÀÖÀ¸¸é ¾È µË´Ï´Ù" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: `%s' Çʵ尡 Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" @@ -597,37 +610,38 @@ msgstr "%s: `%s' Çʵ尡 Á¤ÀǵÇÁö ¾Ê¾Ò½À´ msgid "%s: field `%s' undefined" msgstr "%s: `%s' Çʵ尡 Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡¼­ ¿ÀÇÁ¼Â °ªÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡¼­ ½ÃÀÛ ³¯Â¥ °ªÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡¼­ ¸ØÃã ³¯Â¥ °ªÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖ½À´Ï´Ù" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: À߸øµÈ ¿É¼Ç -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: ºÒ¿ÏÀüÇÑ `END' ÁÙ" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%1$s: `%3$s' Çʵ忡 À߸øµÈ À̽ºÄÉÀÌÇÁ `%%%2$c' ¼ø¼­¿­" @@ -637,27 +651,27 @@ msgstr "%1$s: `%3$s' Çʵ忡 À߸øµÈ À̽ºÄ msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: `%s' Çʵ忡 À߸øµÈ À̽ºÄÉÀÌÇÁ ¼ø¼­¿­ÀÌ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %ZdÀÇ ¿ÀÇÁ¼Â¿¡ À߸øµÈ ¼ýÀÚ°¡ ÀÖ½À´Ï´Ù " -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: Á¤·Ä ±ÔÄ¢ÀÇ °¹¼ö°¡ À߸øµÇ¾ú½À´Ï´Ù" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ºÎÀûÀýÇÑ ¿É¼Ç -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %ZdÀÇ ¿ÀÇÁ¼Â¿¡ À߸øµÈ ½ÃÀÛ ³¯Â¥°¡ ÀÖ½À´Ï´Ù " -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %ZdÀÇ ¿ÀÇÁ¼Â¿¡ À߸øµÈ Á¤Áö ³¯Â¥°¡ ÀÖ½À´Ï´Ù " @@ -672,38 +686,38 @@ msgstr "%s: `%s' ÇʵåÀÇ °ªÀÌ À߸øµÇ¾ú½À´ msgid "%s: language abbreviation `%s' not defined" msgstr "%s: ¾ð¾î ÁÙÀÓ¸» `%s'ÀÌ(°¡) Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: `order_end' Ű¿öµå°¡ ºüÁ³½À´Ï´Ù" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: `reorder-end' Ű¿öµå°¡ ºüÁ³½À´Ï´Ù" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: `reorder-sections-end' Ű¿öµå°¡ ºüÁ³½À´Ï´Ù" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: era Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡ era Çü½ÄÀÌ ¾ø½À´Ï´Ù" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: era Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡ era À̸§ÀÌ ¾ø½À´Ï´Ù" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: `%s' ¼½¼ÇÀÇ ¼ø¼­ Á¤Àǰ¡ Áߺ¹µÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: À̸§¾ø´Â ¼½¼Ç¿¡ ¼ø¼­ Á¤Àǰ¡ ¿©·¯¹ø ³ªÅ¸³µ½À´Ï´Ù" @@ -720,7 +734,7 @@ msgid "%s: no identification for categor msgstr "%s: `%s' ¹üÁÖ¿¡ ¿Ã¹Ù¸¥ identificationÀÌ ¾ø½À´Ï´Ù" # ¹ø¿ª: representableÀÌ ¿©±â¼­?? -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: Ç¥½ÃÇÒ ¼ö ÀÖ´Â `default_missing' Á¤Àǰ¡ ¾ø½À´Ï´Ù" @@ -735,52 +749,52 @@ msgstr "%s: Á¤·Ä ±ÔÄ¢ÀÌ ÃæºÐÇÏÁö ¾Ê½À´Ï´ msgid "%s: numeric country code `%d' not valid" msgstr "%s: ¼ýÀÚ·Î µÈ ±¹°¡ ÄÚµå `%d'´Â ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: `%c%s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: `%s'´Â ¸ðÈ£ÇÑ ¿É¼ÇÀÔ´Ï´Ù\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: `%s' ¿É¼ÇÀº Àμö°¡ ÇÊ¿äÇÕ´Ï´Ù\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: `--%s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: `-W %s' ¿É¼ÇÀº Àμö¸¦ Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: `-W %s'´Â ¸ðÈ£ÇÑ ¿É¼ÇÀÔ´Ï´Ù\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: ÀÌ ¿É¼ÇÀº Àμö°¡ ÇÊ¿äÇÕ´Ï´Ù -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: `%.*s'¿¡ ´ëÇÑ ¼ø¼­´Â ÀÌ¹Ì %s:%Zu¿¡ Á¤ÀǵǾú½À´Ï´Ù" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: »çÀü¼ø¼­ ¿ä¼Ò `%.*s'ÀÇ ¼ø¼­´Â ¾ÆÁ÷ Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: »çÀü¼ø¼­ ½Éº¼ `%.*s'ÀÇ ¼ø¼­´Â ¾ÆÁ÷ Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" @@ -790,84 +804,84 @@ msgstr "%s: »çÀü¼ø¼­ ½Éº¼ `%.*s'ÀÇ ¼ø¼­´ msgid "%s: output would overwrite %s\n" msgstr "%s: Ãâ·ÂÀÌ %s¸¦ µ¤¾î¾µ °ÍÀÔ´Ï´Ù\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panic: ºÎÀûÀýÇÑ ÁÂÇ×°ª %d\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: ÆÄÀÏÀÌ ¿Ï°áµÇÁö ¾ÊÀº ä ³¡³²" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: `%.*s' ¼½¼ÇÀ» ¾Ë ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡¼­ ½ÃÀÛ ³¯Â¥°¡ À߸øµÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: `era' Çʵ忡 ÀÖ´Â ¹®ÀÚ¿­ %Zd¿¡¼­ Á¤Áö ³¯Â¥°¡ À߸øµÇ¾ú½À´Ï´Ù" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: ±âÈ£ ¹üÀ§ ¸»ÁÙÀÓÇ¥´Â `order_end' ¹Ù·Î µÚ¿¡ ³ª¿Í¼­´Â ¾È µË´Ï´Ù" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: ±âÈ£ ¹üÀ§ ¸»ÁÙÀÓÇ¥´Â `order_start' ¹Ù·Î µÚ¿¡ ³ª¿Í¼­´Â ¾È µË´Ï´Ù" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: ¹®¹ý ¿À·ù" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: »õ·Î¿î ¹®ÀÚ Å¬·¡½º Á¤ÀÇ¿¡ ¹®¹ý ¿À·ù°¡ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: »õ·Î¿î ¹®ÀÚ ¸Ê Á¤ÀÇ¿¡ ¹®¹ý ¿À·ù°¡ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: \"%s\" Ŭ·¡½º¿¡ ´ëÇÑ Å×À̺í: %lu ¹ÙÀÌÆ®\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: \"%s\" ¸Ê¿¡ ´ëÇÑ Å×À̺í: %lu ¹ÙÀÌÆ®\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: Æø¿¡ ´ëÇÑ Å×À̺í: %lu bytes\n" @@ -878,16 +892,21 @@ msgstr "%s: Æø¿¡ ´ëÇÑ Å×À̺í: %lu bytes\ msgid "%s: terminology language code `%s' not defined" msgstr "%s: terminology ¾ð¾îÄÚµå `%s'ÀÌ(°¡) Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: ¹üÀ§ÀÇ ½ÃÀÛ ±âÈ£¿Í ³¡ ½Éº¼Àº ¹®ÀÚ¸¦ ³ªÅ¸³»¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: Çʵå `%s'ÀÇ °ªÀÇ ¼¼ ¹øÂ° ÇÇ¿¬»êÀÚ´Â %dº¸´Ù Ä¿¼­´Â ¾È µË´Ï´Ù" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: `%s' ÇʵåÀÇ °ªÀÌ ³Ê¹« Àû½À´Ï´Ù" + # ¹ø¿ª: ???? had??? #: locale/programs/ld-collate.c:555 #, c-format @@ -899,8 +918,13 @@ msgstr "%s: ±ÔÄ¢ÀÌ ³Ê¹« ¸¹À½; ù ¹øÂ° Ç× msgid "%s: too many values" msgstr "%s: °ªÀÌ ³Ê¹« ¸¹½À´Ï´Ù" +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: `%s' ÇʵåÀÇ °ªÀÌ ³Ê¹« ¸¹½À´Ï´Ù" + # transliteration: °íÃľ¸, À½¿ª -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: ·ÎÄÉÀÏ `%s'ÀÇ °íÃľ¸ µ¥ÀÌŸ°¡ ¾ø½À´Ï´Ù" @@ -910,49 +934,54 @@ msgstr "%s: ·ÎÄÉÀÏ `%s'ÀÇ °íÃľ¸ µ¥ÀÌŸ° msgid "%s: unable to open %s: %m\n" msgstr "%s: %sÀ»(¸¦) ¿­ ¼ö ¾øÀ½: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: »çÀü¼ø¼­ ±âÈ£ À̸§¿¡ ¾Ë ¼ö ¾ø´Â ¹®ÀÚ" # ¹ø¿ª: equivalent definition?? -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: ´ëÀÀ ¹®ÀÚ Á¤ÀÇ À̸§¿¡ ¾Ë·ÁÁöÁö ¾ÊÀº ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: ´ëÀÀ ¹®ÀÚ Á¤ÀÇ °ª¿¡ ¾Ë·ÁÁöÁö ¾ÊÀº ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: `%s' Çʵ忡 ¾Ë·ÁÁöÁö ¾ÊÀº ¹®ÀÚ°¡ ÀÖ½À´Ï´Ù" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: ¾Ë ¼ö ¾ø´Â ¼½¼Ç À̸§ `%s'" # ¹ø¿ª: equivalent definition?? -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: ´ëÀÀ¹®ÀÚ Á¤ÀÇ¿¡ ¾Ë ¼ö ¾ø´Â ±âÈ£ `%s'" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ÀνÄÇÒ ¼ö ¾ø´Â ¿É¼Ç `%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ÀνÄÇÒ ¼ö ¾ø´Â ¿É¼Ç `--%s'\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -966,6 +995,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: »ç¿ë¹ýÀº %s [ -v ] [ -c Àý´Ü ] Áö¿ª¸í ... ÀÔ´Ï´Ù\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: `%s' Çʵ忡 ´ëÇÑ °ªÀº ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: `%s' ÇʵåÀÇ °ªÀº %d...%d »çÀÌ¿¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -986,17 +1025,17 @@ msgstr "%s: `int_curr_symbol' ÇʵåÀÇ °ªÀ msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: curr_symbol' ÇʵåÀÇ °ªÀÇ ±æÀ̰¡ Ʋ·È½À´Ï´Ù" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: `%s' ÇʵåÀÇ °ªÀº 127º¸´Ù ÀÛ¾Æ¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: `%s' ÇʵåÀÇ °ªÀº %dº¸´Ù Å©¸é ¾È µË´Ï´Ù" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: `%s' ÇʵåÀÇ °ªÀº %dº¸´Ù Å©¸é ¾È µË´Ï´Ù" @@ -1019,11 +1058,11 @@ msgstr "(ÇÁ·Î±×·¥ ¿À·ù) ¹öÀüÀ» ¾Ë ¼ö ¾ø½ msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(ÇÁ·Î±×·¥ ¿À·ù) ¿É¼ÇÀ» ¾Ë¼ö ÀÖ¾î¾ß ÇÕ´Ï´Ù!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(¾Ë ¼ö ¾ø´Â ¿ÀºêÁ§Æ®)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(¾Ë ¼ö ¾ø´Â ÀÎÁõ ¿À·ù - %d)" @@ -1041,6 +1080,11 @@ msgstr "*** `%s' ÆÄÀÏÀº µð¹ö±ëÁ¤º¸°¡ Á¦° msgid "*standard input*" msgstr "*Ç¥ÁØ ÀÔ·Â*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1054,16 +1098,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "a.outÀÇ .lib ÀýÀÌ ¼Õ»óµÇ¾úÀ½" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; ³·Àº ¹öÀü = %lu, ³ôÀº ¹öÀü = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; ÀÌÀ¯ = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "¹®ÀÚÀÇ ¹üÀ§·Î À߸øµÈ À̸§ <%s>¿Í <%s>" @@ -1073,12 +1117,12 @@ msgstr "¹®ÀÚÀÇ ¹üÀ§·Î À߸øµÈ À̸§ <%s>¿Í msgid "<%s> and <%s> are invalid names for range" msgstr "<%s>°ú(¿Í) <%s>Àº(´Â) ¹®ÀÚÀÇ ¹üÀ§·Î À߸øµÈ À̸§ÀÔ´Ï´Ù" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr " ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ ÀÖÀ¸¸é ¾ÈµË´Ï´Ù" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr " ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ ¾øÀ½" @@ -1094,7 +1138,7 @@ msgstr "?" msgid "Aborted" msgstr "ÁßÁöµÊ" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Á¢±Ù ±ÇÇÑ : " @@ -1133,6 +1177,10 @@ msgstr "±¤°í ¿À·ù" msgid "Alarm clock" msgstr "ÀÚ¸íÁ¾ ½Ã°è" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "¸ðµç ¿äûÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Àüü ¸Þ¸ð¸® ¼Ò¸ð¿¡ ´ëÇÑ ±×·¡ÇÁµµ ±×¸³´Ï´Ù" @@ -1141,7 +1189,7 @@ msgstr "Àüü ¸Þ¸ð¸® ¼Ò¸ð¿¡ ´ëÇÑ ±×·¡ÇÁµµ msgid "Anode table overflow" msgstr "Anode Å×À̺í Èê·¯ ³Ñħ" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "Å×½ºÆ®ÇÒ ¶Ç ´Ù¸¥ ¹®ÀÚ¿­." @@ -1173,7 +1221,7 @@ msgstr "½Ã½ºÅÛÀÇ Á¦ÇѺ¸´Ù ¸¹Àº µ¿Àû ¶óÀÌ msgid "Attempting to link in too many shared libraries" msgstr "³Ê¹« ¸¹Àº µ¿Àû ¶óÀ̺귯¸®¿Í ¸µÅ©ÇÏ·Á°í ½ÃµµÇÏ¿´À½" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "ÀÎÁõ ¼º°ø" @@ -1182,7 +1230,7 @@ msgstr "ÀÎÁõ ¼º°ø" msgid "Authentication error" msgstr "ÀÎÁõ ¿À·ù" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "¾ûÅ͸® ¿ÀºêÁ§Æ®\n" @@ -1238,7 +1286,7 @@ msgstr "À߸øµÈ ai_flagsÀÇ °ª" msgid "Be strictly POSIX conform" msgstr "¾ö°ÝÇÏ°Ô POSIX¸¦ µû¸§" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "ÀÌÁø µ¥ÀÌŸ\n" @@ -1270,10 +1318,6 @@ msgstr "ÆÄÀÌÇÁ°¡ ±ú¾îÁü" msgid "Bus error" msgstr "¹ö½º ¿À·ù" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "CPU ½Ã°£ Á¦ÇÑ ÃʰúÇÔ" @@ -1291,77 +1335,82 @@ msgstr "ÇÊ¿äÇÑ °øÀ¯ ¶óÀ̺귯¸®¿¡ Á¢±ÙÇÒ msgid "Can not exec a shared library directly" msgstr "°øÀ¯ ¶óÀ̺귯¸®¸¦ Á÷Á¢ ½ÇÇàÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "ÀÌ µµ¸ÞÀÎÀ» Á¦°øÇÏ´Â ¼­¹ö¿¡ ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "/·Î µð·ºÅ丮¸¦ À̵¿ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "rpcinfo: Æ÷Æ®¸ÅÆÛ¿Í Åë½ÅÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "ypbind¿Í Åë½ÅÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "ypserv¿Í Åë½ÅÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "Àӽà ij½¬ ÆÄÀÏ %sÀ»(¸¦) ¿­ ¼ö ¾ø½À´Ï´Ù" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "%sÀ»(¸¦) ãÀ» ¼ö ¾ø½À´Ï´Ù" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "%s¸¦ %s·Î ¸µÅ©ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "%s¿¡ lstat()ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "ij½¬ ÆÄÀÏ `%s'À»(¸¦) ¿­ ¼ö ¾ø½À´Ï´Ù\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "ij½¬ ÆÄÀÏ µð·ºÅ丮 `%s'À»(¸¦) ¿­ ¼ö ¾ø½À´Ï´Ù\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "¼³Á¤ ÆÄÀÏ `%s'À»(¸¦) ¿­ ¼ö ¾ø½À´Ï´Ù" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "µð·ºÅ丮 %sÀ»(¸¦) ¿­ ¼ö ¾ø½À´Ï´Ù" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "¿À·¡µÈ Àӽà ij½¬ ÆÄÀÏ %sÀ»(¸¦) Áö¿ï ¼ö ¾ø½À´Ï´Ù" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "%s¿¡ stat()ÇÒ ¼ö ¾ø½À´Ï´Ù" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "%s¿¡ stat()ÇÒ ¼ö ¾ø½À´Ï´Ù\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "%sÀ»(¸¦) Áö¿ï ¼ö ¾ø½À´Ï´Ù" @@ -1388,16 +1437,21 @@ msgstr "ºê·Îµåij½ºÆ® rpc¸¦ À§ÇÑ ¼ÒÄÏÀ» ¸ msgid "Cannot exec a shared library directly" msgstr "°øÀ¯ ¶óÀ̺귯¸®¸¦ Á÷Á¢ ½ÇÇàÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "`%s'ÆÄÀÏ¿¡ fstat()À» ÇÒ ¼ö ¾ø½À´Ï´Ù\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "ÇѰ³ ÀÌ»óÀÇ ÆÄÀÏ »ý¼º Ç÷¡±×¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "%s¿¡ lstat()ÇÒ ¼ö ¾ø½À´Ï´Ù" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "ÆÄÀÏ `%s'¿¡ mmap()ÇÒ ¼ö ¾ø½À´Ï´Ù\n" @@ -1431,33 +1485,38 @@ msgstr "¼ÒÄÏ ¿É¼Ç SO_BROADCAST¸¦ ¼³Á¤ÇÒ msgid "Cannot specify more than one input file!\n" msgstr "ÇѰ³ ÀÌ»óÀÇ ÀÔ·Â ÆÄÀÏÀ» ÁöÁ¤ÇÒ ¼ö ¾ø½À´Ï´Ù!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "%s¿¡ stat()ÇÒ ¼ö ¾ø½À´Ï´Ù" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "³×Æ®id Ç÷¡±×¸¦ inetd Ç÷¡±×¿Í ÇÔ²² ¾µ ¼ö ¾ø½À´Ï´Ù!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "³×Æ®id Ç÷¡±×¸¦ TIRPC¿Í ÇÔ²² ¾µ ¼ö ¾ø½À´Ï´Ù!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "»õ·Î¿î ½ºÅ¸ÀÏ¿¡¼­´Â Å×À̺í Ç÷¡±×¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "<·çÆ®>·Î À̵¿ÇÑ ´ÙÀ½ <·çÆ®>¸¦ ·çÆ® µð·ºÅ丮·Î »ç¿ëÇÕ´Ï´Ù" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "%sÀÇ Á¢±Ù±ÇÇÑÀ» to 0644·Î ¹Ù²Ù´Â µ¥ ½ÇÆÐÇß½À´Ï´Ù" +msgid "Changing access rights of %s to %#o failed" +msgstr "%sÀÇ Á¢±Ù±ÇÇÑÀ» to %#o·Î(À¸·Î) ¹Ù²Ù´Â µ¥ ½ÇÆÐÇß½À´Ï´Ù" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "¹üÀ§¸¦ ¹þ¾î³­ ä³Î ¹øÈ£" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "¹®ÀÚ ±¸ºÐÀÚ : %c\n" @@ -1466,11 +1525,11 @@ msgstr "¹®ÀÚ ±¸ºÐÀÚ : %c\n" msgid "Child exited" msgstr "ÀÚ½ÄÀÌ Á¾·áµÊ" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Ŭ¶óÀÌ¾ðÆ® ÀÚ°Ý ºÎ¿©°¡ ³Ê¹« ¾àÇÔ" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "¿­ :\n" @@ -1488,7 +1547,7 @@ msgstr "·ÎÄÉÀÏ ¸í¼¼¸¦ ÄÄÆÄÀÏ" msgid "Computer bought the farm" msgstr "ÄÄÇ»ÅͰ¡ ³óÀåÀ» »ò½À´Ï´Ù" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "µ¿Àû ¸µÄ¿ÀÇ ·±Å¸ÀÓ ¹ÙÀεùÀ» ¼³Á¤" @@ -1518,14 +1577,14 @@ msgstr "¿¬°á ½Ã°£ Ãʰú" msgid "Continued" msgstr "°è¼ÓµÊ" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "ÁÖ¾îÁø ÆÄÀÏÀÇ ÀÎÄÚµùÀ» ÇÑ ÀÎÄÚµù¿¡¼­ ¶Ç´Ù¸¥ ÀÎÄÚµùÀ¸·Î º¯È¯ÇÔ." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1545,6 +1604,10 @@ msgstr "±â·Ï ÆÄÀÏ `%s'¸¦ ¸¸µé ¼ö ¾ø½À´Ï´ msgid "Create C header file NAME containing symbol definitions" msgstr "±âÈ£ Á¤ÀǸ¦ ´ã°í ÀÖ´Â C Çì´õ ÆÄÀÏ NAMEÀ» ¸¸µê" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "°í¼Ó·Îµù iconv ¸ðµâ ¼³Á¤ ÆÄÀÏÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù" + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "°ú°Å ½ºÅ¸ÀÏÀÇ Å×À̺íÀ» ¸¸µì´Ï´Ù" @@ -1553,7 +1616,7 @@ msgstr "°ú°Å ½ºÅ¸ÀÏÀÇ Å×À̺íÀ» ¸¸µì´Ï´Ù" msgid "Create output even if warning messages were issued" msgstr "°æ°í ¸Þ¼¼Áö°¡ ³ª¿Ã °æ¿ì¿¡µµ Ãâ·ÂÇÔ" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "¸¸µé¾îÁø ½Ã°¢ : %s" @@ -1572,19 +1635,11 @@ msgstr "<µ¥ÀÌŸÆÄÀÏ> [<Ãâ·ÂÆÄÀÏ>]" msgid "DES entry for netname %s not unique\n" msgstr "³×Æ®name %s¿¡ ´ëÇÑ DES entry°¡ À¯ÀÏÇÏÁö ¾Ê½À´Ï´Ù\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "µð·ºÅ丮\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "SUID/SGID ÇÁ·Î±×·¥¿¡ DST´Â »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù" @@ -1596,7 +1651,7 @@ msgstr "µ¿Àû ¸µÄ¿ ¹ö±×!!!" msgid "Database for table does not exist" msgstr "Å×ÀÌºí¿¡ ´ëÇÑ µ¥ÀÌŸº£À̽º°¡ ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "µ¥ÀÌÅͺ£À̽º°¡ ÀÛ¾÷ ÁßÀÔ´Ï´Ù" @@ -1604,7 +1659,7 @@ msgstr "µ¥ÀÌÅͺ£À̽º°¡ ÀÛ¾÷ ÁßÀÔ´Ï´Ù" msgid "Deadlock situation detected/avoided" msgstr "±³Âø»óŰ¡ ¹ß°ßµÇ¾ú°Å³ª ȸÇÇÇÕ´Ï´Ù" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "±âº» Á¢±Ù ±ÇÇÑ :\n" @@ -1631,12 +1686,12 @@ msgstr "ÀåÄ¡°¡ ½ºÆ®¸²ÀÌ ¾Æ´Ô" msgid "Device or resource busy" msgstr "ÀåÄ¡³ª ÀÚ¿øÀÌ µ¿ÀÛ Áß" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellman (%d ºñÆ®)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "µð·ºÅ丮 : %s\n" @@ -1665,15 +1720,15 @@ msgstr "forkÇÏÁö ¾Ê°í ÇöÀç tty¿¡ ¸Þ¼¼Áö¸ msgid "Do not use existing catalog, force new output file" msgstr "ÀÌ¹Ì Á¸ÀçÇÏ´Â ¸ñ·ÏÀ» »ç¿ëÇÏÁö ¾Ê°í, »õ·Î¿î ÆÄÀÏ¿¡ Ãâ·ÂÇÔ" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "µµ¸ÞÀÎÀÌ ¹Ù¿îµåµÇÁö ¾ÊÀ½" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "ij½¬¸¦ ¸¸µéÁö ¾ÊÀ½" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "¸µÅ©¸¦ ¸¸µéÁö ¾ÊÀ½" @@ -1681,31 +1736,31 @@ msgstr "¸µÅ©¸¦ ¸¸µéÁö ¾ÊÀ½" msgid "Dump information generated by PC profiling." msgstr "PC ÇÁ·ÎÆÄÀϸµÀ¸·Î ¸¸µé¾îÁø Á¤º¸¸¦ ´ýÇÁÇÕ´Ï´Ù." -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "ELF ÆÄÀÏ ABI ¹öÀüÀÌ À߸øµÇ¾ú½À´Ï´Ù" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ELF ÆÄÀÏ OS ABI°¡ À߸øµÇ¾ú½À´Ï´Ù" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "ELF ÆÄÀÏ ¹öÀüÀÌ ÇöÀç ¹öÀü°ú ¸ÂÁö ¾Ê½À´Ï´Ù" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "ELF ÆÄÀÏ ¹öÀü ident°¡ ÇöÀç ident¿Í ¸ÂÁö ¾Ê½À´Ï´Ù" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "ELF ÆÄÀÏÀÇ phentsize°¡ ¿¹»ó°ú ¸ÂÁö ¾Ê½À´Ï´Ù" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "ELF ·Îµå ¸í·ÉÀÇ ÁÖ¼Ò/¿ÀÇÁ¼ÂÀÌ ¿Ã¹Ù¸£°Ô alignµÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "ELF ·Îµå ¸í·ÉÀÇÀÇ alignÀÌ ÆäÀÌÁö¿¡ alignµÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù" @@ -1713,11 +1768,11 @@ msgstr "ELF ·Îµå ¸í·ÉÀÇÀÇ alignÀÌ ÆäÀÌÁö msgid "EMT trap" msgstr "EMT Æ®·¦" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "ENTRY\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "¾ÏȣȭµÈ µ¥ÀÌŸ\n" @@ -1871,7 +1926,11 @@ msgstr "¾Ë ¼ö ¾ø´Â ¿À·ù ½Ã½ºÅÛ¿¡ ¿À·ù: " msgid "Error while talking to callback proc" msgstr "Äݹé ÇÁ·Î½ÃÀú¸¦ »ç¿ëÇÏ´Â µ¥ ¿À·ù" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Ç¥ÁØ Ãâ·Â¿¡ ¾²´Â µ¥ ¿À·ù" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "¿À·ù: .netrc ÆÄÀÏÀ» ´Ù¸¥ »ç¶÷ÀÌ ÀÐÀ» ¼ö ÀÖ½À´Ï´Ù." @@ -1894,7 +1953,7 @@ msgstr "Áß¿ä: ½Ã½ºÅÛ¿¡ `_POSIX2_LOCALEDE msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "<ÆÄÀÏ>Àº ±âÈ£·Î Ç¥½ÃµÈ À̸§¿¡¼­ UCS4 °ªÀ¸·ÎÀÇ ¸ÅÇÎÀ» °®°í ÀÖ½À´Ï´Ù" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "½ÇÆÐ (ÁöÁ¤µÇÁö ¾ÊÀº ¿À·ù)" @@ -1903,7 +1962,7 @@ msgstr "½ÇÆÐ (ÁöÁ¤µÇÁö ¾ÊÀº ¿À·ù)" msgid "Failed to look up user '%s' to run server as" msgstr "´ÙÀ½À¸·Î ¼­¹ö¸¦ ½ÇÇàÇÏ·Á°í, »ç¿ëÀÚ '%s'À»(¸¦) ã´Âµ¥ ½ÇÆÐ:" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "ÆÄÀÏ %sÀÌ(°¡) ³Ê¹« À۾Ƽ­, üũÇÏÁö ¾Ê½À´Ï´Ù." @@ -1920,7 +1979,7 @@ msgstr "ÆÄÀÏ ±â¼úÀÚ°¡ À߸øµÈ »óÅ¿¡ ÀÖÀ½ msgid "File exists" msgstr "ÆÄÀÏÀÌ Á¸ÀçÇÕ´Ï´Ù" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "ÆÄÀÏÀÌ Ä³½¬ ÆÄÀÏÀÌ ¾Æ´Õ´Ï´Ù.\n" @@ -1954,7 +2013,7 @@ msgstr "ÆÄÀÏ Å×À̺í Èê·¯ ³Ñħ" msgid "File too large" msgstr "ÆÄÀÏÀÌ ³Ê¹« Å®´Ï´Ù" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Å×½ºÆ®ÇÒ Ã¹ ¹øÂ° ¹®ÀÚ¿­." @@ -1966,7 +2025,7 @@ msgstr "First/next ¿¬°áÀÌ ²÷¾îÁü" msgid "Floating point exception" msgstr "ºÎµ¿ ¼Ò¼öÁ¡ ¿¹¿Ü" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "ÀÌ¿ëÇÒ Çü½Ä: new, old ȤÀº compat (±âº»°ª)" @@ -1983,7 +2042,7 @@ msgstr "µð·ºÅ丮¿¡ ´ëÇØ ¿ÏÀüÇÑ resync°¡ msgid "Function not implemented" msgstr "ÇÔ¼ö°¡ ±¸ÇöµÇÁö ¾Ê¾ÒÀ½" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "±×·ì\n" @@ -2006,7 +2065,7 @@ msgstr "¸Þ¼¼Áö ¸ñ·ÏÀ» ¸¸µì´Ï´Ù\\v<ÀÔ·Â-Æ msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "½Ã°£¿¡ ºñ·ÊÇÏ´Â Ãâ·ÂÀ» ¸¸µì´Ï´Ù (±âº»°ªÀº ÇÔ¼ö È£Ãâ Ƚ¼ö¿¡ ºñ·ÊÇÕ´Ï´Ù)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "´õ ¸¹Àº ¸Þ½ÃÁö Ç¥½Ã" @@ -2014,7 +2073,7 @@ msgstr "´õ ¸¹Àº ¸Þ½ÃÁö Ç¥½Ã" msgid "Generic system error" msgstr "ÀÏ¹Ý ½Ã½ºÅÛ ¿À·ù" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "ƯÁ¤ ·ÎÄÉÀÏ °ü·Ã Á¤º¸¸¦ ¾òÀ½" @@ -2031,12 +2090,12 @@ msgstr "ÀÌ µµ¿ò¸» ¸®½ºÆ®¸¦ Ç¥½ÃÇÔ" msgid "Gratuitous error" msgstr "ÀÌÀ¯¾ø´Â ¿À·ù" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "±×·ì : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "±×·ì Ç÷¡±× :" @@ -2101,16 +2160,12 @@ msgstr "ÀÔÃâ·Â °¡´É" msgid "IOT trap" msgstr "IOT Æ®·¦" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "½Äº°ÀÚ Á¦°ÅµÊ" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "ÀÏ¹Ý ÆÄÀÏÀÌ ¾Æ´Ï¹Ç·Î %s ÆÄÀÏÀ» ¹«½ÃÇÕ´Ï´Ù." @@ -2163,7 +2218,7 @@ msgstr "¹è°æ ÇÁ·Î¼¼½º·Î ºÎÀûÇÕÇÑ µ¿ÀÛ" msgid "Information request" msgstr "Á¤º¸ ¿äû" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Á¤º¸:" @@ -2171,12 +2226,12 @@ msgstr "Á¤º¸:" msgid "Input Files:" msgstr "ÀÔ·Â ÆÄÀÏ:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "ÀÔ·Â ÆÄÀÏ %sÀ»(¸¦) ãÁö ¸øÇß½À´Ï´Ù.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "ÀÔ/Ãâ·Â Çü½Ä ÁöÁ¤:" @@ -2185,11 +2240,11 @@ msgstr "ÀÔ/Ãâ·Â Çü½Ä ÁöÁ¤:" msgid "Input/output error" msgstr "ÀÔ·Â/Ãâ·Â ¿À·ù" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "³»ºÎ NIS ¿À·ù" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "³»ºÎ ypbind ¿À·ù" @@ -2197,6 +2252,10 @@ msgstr "³»ºÎ ypbind ¿À·ù" msgid "Interrupt" msgstr "ÀÎÅÍ·´Æ®" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "½Ã±×³Î¿¡ ÀÇÇØ ÁߴܵÊ" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2220,27 +2279,27 @@ msgstr "Áß´ÜµÈ ½Ã½ºÅÛ È£ÃâÀº Àç½ÃÀÛµÇ¾î¾ msgid "Invalid argument" msgstr "ºÎÀûÀýÇÑ Àμö" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "ºÎÀûÀýÇÑ ÈĹæ ÂüÁ¶" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "ºÎÀûÀýÇÑ ¹®ÀÚ Å¬·¡½º À̸§" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "ºÎÀûÀýÇÑ Å¬¶óÀÌ¾ðÆ® ÀÚ°Ý ºÎ¿©" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "ºÎÀûÀýÇÑ Å¬¶óÀÌ¾ðÆ® °ËÁõ±â" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "ºÎÀûÀýÇÑ ´ëÁ¶ ¹®ÀÚ" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "\\{\\}¿¡ ºÎÀûÀýÇÑ ³»¿ë¹°ÀÌ ÀÖÀ½" @@ -2265,15 +2324,15 @@ msgstr "ÀÛ¾÷ÇÏ´Â µ¥ À߸øµÈ ¿ÀºêÁ§Æ®" msgid "Invalid or incomplete multibyte or wide character" msgstr "ºÎÀûÀýÇϰųª ºÒ¿ÏÀüÇÑ ´ÙÁß¹ÙÀÌÆ® ¶Ç´Â ±¤¿ª ¹®ÀÚ" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "¾Õ¼± Á¤±Ô½ÄÀÌ ºÎÀûÀýÇÔ" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "ºÎÀûÀýÇÑ ¹üÀ§ ³¡" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "ºÎÀûÀýÇÑ Á¤±Ô½Ä" @@ -2285,7 +2344,7 @@ msgstr "ºÎÀûÀýÇÑ ¿äû ÄÚµå" msgid "Invalid request descriptor" msgstr "À߸øµÈ ¿äû ±â¼úÀÚ" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "ºÎÀûÀýÇÑ ¼­¹ö °ËÁõ±â" @@ -2313,7 +2372,7 @@ msgstr "name ÆÄÀÏÀÔ´Ï´Ù" msgid "Is a named type file" msgstr "named ŸÀÔ ÆÄÀÏÀÔ´Ï´Ù" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2321,7 +2380,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Á×¾úÀ½" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "¿¬°á\n" @@ -2364,20 +2423,20 @@ msgstr "¹üÀ§¸¦ ¹þ¾î³­ ¸µÅ© ¹øÈ£" msgid "Link points to illegal name" msgstr "¸µÅ©°¡ À߸øµÈ À̸§À» °¡¸®Å´" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "¿¬°áµÈ ¿ÀºêÁ§Æ® ŸÀÔ : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "%s¿Í ¿¬°á\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Áö¿ª µµ¸ÞÀθíÀÌ ¼³Á¤µÇÁö ¾Ê¾ÒÀ½" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Áö¿ª ÀÚ¿ø ÇÒ´ç ½ÇÆÐ" @@ -2394,11 +2453,11 @@ msgstr "À߸øµÈ Çü½ÄÀÇ À̸§, ȤÀº ¾µ ¼ö ¾ msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "±ä ¿É¼Ç¿¡¼­ ´ëÇØ ²À ÇÊ¿äÇϰųª ¼±ÅÃÀûÀÎ ÀÎÀÚ´Â ±× ±ä ¿É¼Ç¿¡ ÇØ´çÇϴ ªÀº ¿É¼Ç¿¡¼­µµ ²À ÇÊ¿äÇϰųª ¼±ÅÃÀûÀÔ´Ï´Ù." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "¼öµ¿À¸·Î °¢°¢ÀÇ ¶óÀ̺귯¸®¸¦ ¸µÅ©ÇϽʽÿÀ." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "ÁÖ ¼­¹ö :\n" @@ -2410,7 +2469,7 @@ msgstr "ÁÖ ¼­¹ö°¡ ÀÛ¾÷ÁßÀ̹ǷÎ, ¿ÏÀüÇÑ ´ msgid "Memory allocation failure" msgstr "¸Þ¸ð¸® ÇÒ´ç ½ÇÆÐ" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "¸Þ¸ð¸®°¡ ¹Ù´Ú³²" @@ -2429,7 +2488,7 @@ msgstr "¸Þ½ÃÁö°¡ ³Ê¹« ±é´Ï´Ù" msgid "Missing or malformed attribute" msgstr "¼Ó¼ºÀÌ ¾ø°Å³ª Çü½ÄÀÌ Æ²·ÈÀ½" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "º¯°æ ½Ã°¢ : %s" @@ -2442,7 +2501,7 @@ msgstr "¼öÁ¤ÇÏ´Â µ¥ ½ÇÆÐ" msgid "Modify operation failed" msgstr "¼öÁ¤ ÀÛ¾÷ÀÌ ½ÇÆÐÇÏ¿´À½" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Ãâ·Â Çü½Ä ¼öÁ¤:" @@ -2460,7 +2519,7 @@ msgstr "server-user ¿É¼Ç¿¡¼­ »ç¿ëÀÚÀ̸§À msgid "NAME" msgstr "<À̸§>" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2468,15 +2527,11 @@ msgstr "" "<À̸§>\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "NIS Ŭ¶óÀ̾ðÆ®/¼­¹ö ¹öÀü ºÒÀÏÄ¡ - ¼­ºñ½º¸¦ Á¦°øÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "NIS Áöµµ µ¥ÀÌÅͺ£À̽º°¡ À߸øµÇ¾ú½À´Ï´Ù" @@ -2492,7 +2547,7 @@ msgstr "NIS+ ¼­¹ö¿¡ Á¢±ÙÇÒ ¼ö ¾ø½À´Ï´Ù" msgid "NIS+ service is unavailable or not installed" msgstr "NIS+ ¼­ºñ½º¸¦ »ç¿ëÇÒ ¼ö ¾ø°Å³ª NIS+ ¼­ºñ½º°¡ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "¿ÀºêÁ§Æ®°¡ ¾øÀ½\n" @@ -2500,7 +2555,7 @@ msgstr "¿ÀºêÁ§Æ®°¡ ¾øÀ½\n" msgid "NUMBER" msgstr "¼ýÀÚ" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "À̸§ : `%s'\n" @@ -2591,7 +2646,7 @@ msgstr "anode°¡ ¾øÀ½" msgid "No buffer space available" msgstr "»ç¿ë °¡´ÉÇÑ ¹öÆÛ °ø°£ÀÌ ¾øÀ½" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "¹®ÀÚ Áöµµ¿¡¼­ ¹®Àڼ À̸§ÀÌ ÁöÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù" @@ -2608,8 +2663,8 @@ msgstr "ÀÚ½Ä ÇÁ·Î¼¼½º°¡ ¾øÀ½" msgid "No data available" msgstr "»ç¿ë °¡´ÉÇÑ ÀÚ·á°¡ ¾øÀ½" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2622,7 +2677,7 @@ msgstr "%s ¹üÁÖ¿¡ ´ëÇÑ Á¤Àǰ¡ ¾ø½À´Ï´Ù" msgid "No file space on server" msgstr "¼­¹ö¿¡ ³²Àº °ø°£ÀÌ ¾øÀ½" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "%s¿¡ ´ëÇÑ sonameÀ» ãÀ» ¼ö ¾øÀ¸¹Ç·Î ¸µÅ©¸¦ ¸¸µéÁö ¾Ê½À´Ï´Ù" @@ -2635,7 +2690,7 @@ msgstr "%s¿¡ ´ëÇÑ sonameÀ» ãÀ» ¼ö ¾øÀ¸¹ msgid "No locks available" msgstr "»ç¿ë°¡´ÉÇÑ Àá±ÝÀåÄ¡°¡ ¾øÀ½" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "¸Â´Â ¦ ¾øÀ½" @@ -2648,11 +2703,11 @@ msgstr "¸Å°³¹°ÀÌ ¾øÀ½" msgid "No message of desired type" msgstr "Àû´çÇÑ ÇüÀ» °¡Áø ¸Þ½ÃÁö°¡ ¾øÀ½" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "Áöµµ µ¥ÀÌÅͺ£À̽º¿¡ ´õ ÀÌ»óÀÇ ±â·ÏÀÌ ¾øÀ½" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "ÀÌÀüÀÇ Á¤±Ô½ÄÀÌ ¾øÀ½" @@ -2703,11 +2758,11 @@ msgstr "±×·± ÀåÄ¡ ȤÀº ÁÖ¼Ò°¡ ¾øÀ½" msgid "No such file or directory" msgstr "±×·± ÆÄÀÏÀ̳ª µð·ºÅ丮°¡ ¾øÀ½" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Áöµµ¿¡ ±×·± ۰¡ ¾øÀ½" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "¼­¹öÀÇ µµ¸ÞÀο¡ ±×·± Áöµµ°¡ ¾øÀ½" @@ -2725,7 +2780,7 @@ msgstr "NIS+°¡ ¾Æ´Ñ namespace ¹ß°ß" msgid "Non-recoverable failure in name resolution" msgstr "name resolution¿¡¼­ º¹±¸ÇÒ ¼ö ¾ø´Â ½ÇÆÐ" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "¾øÀ½.\n" @@ -2794,12 +2849,12 @@ msgstr "¼ÒÀ¯ÀÚ°¡ ¾Æ´Ô" msgid "Not supported" msgstr "Áö¿øµÇÁö ¾ÊÀ½" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "¿­ÀÇ ¼ö : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "¿ÀºêÁ§Æ®ÀÇ ¼ö : %u\n" @@ -2820,17 +2875,17 @@ msgstr "¿µ¿ªÀ» ¹þ¾î³­ ¼öÄ¡ Àμö" msgid "Numerical result out of range" msgstr "¹üÀ§¸¦ ¹þ¾î³­ ¼öÄ¡ °á°ú" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "¿ÀºêÁ§Æ® #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "¿ÀºêÁ§Æ® À̸§ : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "¿ÀºêÁ§Æ® ŸÀÔ : " @@ -2847,11 +2902,11 @@ msgstr "¿ø°Ý °³Ã¼ÀÔ´Ï´Ù" msgid "Object with same name exists" msgstr "°°Àº À̸§ÀÇ ¿ÀºêÁ§Æ®°¡ Á¸ÀçÇÕ´Ï´Ù" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "µû¿ÈÇ¥°¡ Ȧ¼ö °³ÀÔ´Ï´Ù" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "¸í·ÉÇà¿¡ ÁöÁ¤µÈ µð·ºÅ丮¸¸ ó¸®ÇÕ´Ï´Ù. ij½¬¸¦ ¸¸µéÁö ¾Ê½À´Ï´Ù." @@ -2934,7 +2989,7 @@ msgstr "½ºÆ®¸² ÀÚ¿ø ºÎÁ·" msgid "Out of streams resources" msgstr "½ºÆ®¸² ÀÚ¿ø ºÎÁ·" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Ãâ·Â Á¶Á¤:" @@ -2942,12 +2997,12 @@ msgstr "Ãâ·Â Á¶Á¤:" msgid "Output selection:" msgstr "Ãâ·Â ¼±ÅÃ:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "¼ÒÀ¯ÀÚ : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "°³ÀÎ\n" @@ -2969,13 +3024,13 @@ msgstr "ºÎºÐÀûÀÎ ¼º°ø" msgid "Passed object is not the same object on server" msgstr "Åë°úµÈ ¿ÀºêÁ§Æ®´Â ¼­¹öÀÇ °°Àº ¿ÀºêÁ§Æ®°¡ ¾Æ´Õ´Ï´Ù" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "`%s' °æ·Î°¡ ¿©·¯¹ø ÁÖ¾îÁ³½À´Ï´Ù" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2985,11 +3040,11 @@ msgstr "Çã°¡ °ÅºÎµÊ" msgid "Power failure" msgstr "Àü·ÂÀÌ ²÷¾îÁü" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Á¤±Ô½ÄÀÌ ¿Ï°áµÇÁö ¾ÊÀº ä ³¡³²" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "ij½¬ Ç¥½Ã" @@ -2997,6 +3052,10 @@ msgstr "ij½¬ Ç¥½Ã" msgid "Print current configuration statistic" msgstr "ÇöÀç ¼³Á¤ »óŸ¦ Ç¥½ÃÇÔ" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "´õ ¸¹Àº Á¤º¸¸¦ Ç¥½Ã" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "´õ ¸¹Àº ¸Þ½ÃÁö Ç¥½Ã" @@ -3013,6 +3072,10 @@ msgstr "¾Æ¸¶µµ ¼º°ø" msgid "Probably not found" msgstr "¾Æ¸¶µµ ¾øÀ½" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "ÁøÇàÁßÀÎ ¿äûÀ» ¼öÇàÁßÀÔ´Ï´Ù" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "ÇÁ·ÎÆÄÀϸµ ŸÀ̸ÓÀÇ ½Ã°£ÀÌ ÃʰúµÊ" @@ -3070,7 +3133,7 @@ msgstr "RFS¿¡ ±¹ÇÑµÈ ¿À·ù" msgid "RPC bad procedure for program" msgstr "RPC ÇÁ·Î±×·¥ÀÇ ÇÁ·Î½ÃÁ®°¡ À߸øµÊ" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "NIS ¿¬»ê Áß RPC ½ÇÆÐÇÔ" @@ -3094,88 +3157,88 @@ msgstr "RPC ±¸Á¶°¡ À߸øµÇ¾ú½À´Ï´Ù" msgid "RPC version wrong" msgstr "RPC ¹öÀüÀÌ À߸øµÊ" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (¾Ë ¼ö ¾ø´Â ¿À·ù ÄÚµå)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: ÀÎÁõ ¿À·ù" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: °á°ú¸¦ ÇØµ¶ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: Àμö¸¦ ºÎȣȭÇÒ ¼ö ¾ø½À´Ï´Ù" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: ½ÇÆÐ (ÁöÁ¤µÇÁö ¾ÊÀº ¿À·ù)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: ȣȯµÇÁö ¾Ê´Â RPC ¹öÀü" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Æ÷Æ® ¸ÊÆÛ ½ÇÆÐ" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: ÇÁ·Î½ÃÁ® »ç¿ë ºÒ°¡´É" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: ÇÁ·Î±×·¥ÀÌ µî·ÏµÇÁö ¾ÊÀ½" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: ÇÁ·Î±×·¥ »ç¿ë ºÒ°¡´É" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: ÇÁ·Î±×·¥/¹öÀü ºÒÀÏÄ¡" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: ¿ø°Ý ½Ã½ºÅÛ ¿À·ù" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: ¼­¹ö°¡ Àμö¸¦ ÇØµ¶ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: ¼º°ø" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: ½Ã°£ Ãʰú" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: ¹ÞÀ» ¼ö ¾øÀ½" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: º¸³¾ ¼ö ¾øÀ½" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: ¾Ë ¼ö ¾ø´Â È£½ºÆ®" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: ¾Ë ¼ö ¾ø´Â ±Ô¾à" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d ºñÆ®)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "µ¿ÀûÀ¸·Î ÀûÀçµÇÁö ¾ÊÀº Äڵ忡 RTLD_NEXT°¡ »ç¿ëµÊ" @@ -3198,7 +3261,7 @@ msgstr "ÀбâÀü¿ë ÆÄÀÏ ½Ã½ºÅÛ" msgid "Real-time signal %d" msgstr "½Ç-½Ã°¢ ½Ã±×³¯ %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Á¤±Ô½ÄÀÌ ³Ê¹« Å®´Ï´Ù" @@ -3212,11 +3275,11 @@ msgstr "¿ø°Ý ÀÔÃâ·Â ¿À·ù" msgid "Remote address changed" msgstr "¿ø°Ý ÁÖ¼Ò°¡ ¹Ù²î¾úÀ½" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "¾ÏÈ£¸¦ Áö¿ì°Å³ª ´Ù¸¥ »ç¶÷ÀÌ ÀÐÀ» ¼ö ¾ø´Â ÆÄÀÏÀ» ¸¸µì´Ï´Ù." -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "%s¿¡¼­ %sÀ¸·Î(·Î) À̸§À» ¹Ù²Ù´Â µ¥ ½ÇÆÐÇß½À´Ï´Ù" @@ -3226,7 +3289,7 @@ msgstr "%s¿¡¼­ %sÀ¸·Î(·Î) À̸§À» ¹Ù²Ù´Â msgid "Reopening shared object `%s' failed" msgstr "µ¿Àû ¿ÀºêÁ§Æ® `%s'¸¦ ´Ù½Ã ¿©´Â µ¥ ½ÇÆÐÇÔ" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Áߺ¹µÊ :\n" @@ -3235,16 +3298,24 @@ msgstr "Áߺ¹µÊ :\n" msgid "Report bugs to %s.\n" msgstr "¹ö±×¸¦ %s·Î ¾Ë·ÁÁֽʽÿÀ.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "¹ö±×´Â `glibcbug' ½ºÅ©¸³Æ®¸¦ ÀÌ¿ëÇØ ¿¡ º¸°íÇϽʽÿÀ.\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "¿äûµÈ Àμö°¡ À߸øµÊ" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "¿äûÀÌ Ãë¼ÒµÇ¾úÀ½" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "¿äûÀÌ Ãë¼ÒµÇÁö ¾Ê¾ÒÀ½" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "¹Ì·¡¿¡ »ç¿ëÇϱâ À§ÇØ ¿¹¾àµÊ" @@ -3315,11 +3386,7 @@ msgstr "°á°ú¸¦ Äݹé ÇÁ·Î½ÃÀú·Î º¸³ÂÀ½" msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "ã±â °æ·Î : %s\n" @@ -3336,11 +3403,11 @@ msgstr "¼­¹ö°¡ ´Ù¸¥ ÀÏÀ» Çϰí ÀÖ½À´Ï´Ù, msgid "Server out of memory" msgstr "¼­¹ö ¸Þ¸ð¸® ºÎÁ·" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "¼­¹ö°¡ ÀÚ°Ý ºÎ¿©¸¦ °ÅºÎÇß½À´Ï´Ù" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "¼­¹ö°¡ °ËÁõ±â¸¦ °ÅºÎÇß½À´Ï´Ù" @@ -3408,7 +3475,7 @@ msgstr "²÷¾îÁø NFS ÆÄÀÏ ÇÚµé" msgid "Start NUMBER threads" msgstr "`¼ýÀÚ'°³ÀÇ ¾²·¹µå¸¦ ½ÃÀÛÇÔ" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "»óÅ : %s\n" @@ -3438,7 +3505,7 @@ msgstr "½ºÆ®¸² ÆÄÀÌÇÁ ¿À·ù" msgid "Structure needs cleaning" msgstr "±¸Á¶¿¡ û¼Ò°¡ ÇÊ¿äÇÕ´Ï´Ù" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "¼º°ø" @@ -3459,11 +3526,11 @@ msgstr "<ÆÄÀÏ>¿¡ ±âÈ£·Î Ç¥½ÃµÈ ¹®ÀÚ À̸§ msgid "System error" msgstr "½Ã½ºÅÛ ¿À·ù" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "½Ã½ºÅÛ Á¤º¸:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "½Ã½ºÅÛ ÀÚ¿ø ÇÒ´ç ½ÇÆÐ" @@ -3484,7 +3551,7 @@ msgstr "" msgid "TABLE" msgstr "Å×À̺í" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "Å×À̺í\n" @@ -3493,7 +3560,7 @@ msgstr "Å×À̺í\n" msgid "TABLE,yes" msgstr "Å×À̺í,¿¹" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Å×À̺í ŸÀÔ : %s\n" @@ -3516,7 +3583,7 @@ msgstr "Á¾·áµÊ" msgid "Text file busy" msgstr "½ÇÇà ÆÄÀÏ »ç¿ë Áß" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3532,11 +3599,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "ÀÌ ±¸Çö¹°Àº newstyleÀ̳ª MT-safe Äڵ带 Áö¿øÇÏÁö ¾Ê½À´Ï´Ù!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "À¯ÁöµÇ´Â ½Ã°£ : " @@ -3610,7 +3677,7 @@ msgstr "»ç¿ëÀÚ°¡ ³Ê¹« ¸¹À½" msgid "Trace/breakpoint trap" msgstr "ÃßÀû/Áß´ÜÁ¡ ÇÔÁ¤" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "µû¶óºÙ´Â ¿ª½½·¡½¬" @@ -3642,12 +3709,12 @@ msgstr "Àü¼Û Á¾·áÁöÁ¡ÀÌ ¿¬°áµÇ¾î ÀÖÁö ¾Ê msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "´õ ¸¹Àº Á¤º¸¸¦ º¸·Á¸é `%s --help' ȤÀº `%s --usage' ÇϽʽÿÀ.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "ŸÀÔ : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "¾Ë¼ö¾øÀ½" @@ -3667,31 +3734,35 @@ msgstr "ÄݹéÀ» ¸¸µé ¼ö ¾øÀ½" msgid "Unable to create process on server" msgstr "¼­¹ö¿¡¼­ ÇÁ·Î¼¼½º¸¦ ¸¸µé ¼ö ¾øÀ½" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "¾Ë¼ö¾øÀ½ (ŸÀÔ = %d, ºñÆ®¼ö = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "¾Ë ¼ö ¾ø´Â .netrc Ű¿öµå %s" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "%s ÆÄÀÏÀÌ ¾Ë·ÁÁöÁö ¾ÊÀº ELFCLASS.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "¾Ë ¼ö ¾ø´Â NIS ¿À·ù ÄÚµå" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "¾Ë ¼ö ¾ø´Â ¿î¿µÃ¼Á¦" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "¾Ë ¼ö ¾ø´Â µ¥ÀÌŸº£À̽º: `%s'\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "¾Ë ¼ö ¾ø´Â ¿À·ù" @@ -3727,31 +3798,31 @@ msgstr "¾Ë ¼ö ¾ø´Â ¼­¹ö ¿À·ù" msgid "Unknown signal %d" msgstr "¾Ë ¼ö ¾ø´Â ½ÅÈ£ %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "¾Ë ¼ö ¾ø´Â ½Ã½ºÅÛ ¿À·ù" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "¾Ë ¼ö ¾ø´Â ypbind ¿À·ù" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â ( ¶Ç´Â \\(" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â ) ¶Ç´Â \\)" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â [ ¶Ç´Â [^" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "¦ÀÌ ¸ÂÁö ¾Ê´Â \\{" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "ÀνÄÇÒ ¼ö ¾ø´Â º¯¼ö `%s'" @@ -3764,20 +3835,20 @@ msgstr "½Ã±ÞÇÑ ÀÔÃâ·Â »óȲ" msgid "Usage:" msgstr "»ç¿ë¹ý:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "»ç¿ë¹ý: %s º¯¼ö¸í [°æ·Î¸í]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "»ç¿ë¹ý: %s [-v <½ºÆå>] <º¯¼ö¸í> [<°æ·Î¸í>]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" -msgstr "»ç¿ë¹ý: rpcinfo [ -n Æ÷Æ®¹øÈ£ ] -u È£½ºÆ® ÇÁ·Î±×·¥¹øÈ£ [ ¹öÀü¹øÈ£ ]\n" +msgstr "»ç¿ë¹ý: rpcinfo [ -n <Æ÷Æ®¹øÈ£> ] -u <È£½ºÆ®> <ÇÁ·Î±×·¥¹øÈ£> [ <¹öÀü¹øÈ£> ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "ij½¬ ÆÄÀÏ·Î <ij½¬>¸¦ »ç¿ëÇÕ´Ï´Ù" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "¼³Á¤ ÆÄÀÏ·Î <¼³Á¤>À» »ç¿ëÇÕ´Ï´Ù" @@ -3802,7 +3873,7 @@ msgstr "Á¤ÀÇµÈ ÀÚ·áÇüÀ¸·Î ¾²±â¿£ ³Ê¹« Å« msgid "Virtual timer expired" msgstr "°¡»ó ŸÀÌ¸Ó ½Ã°£ Ãʰú" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "¸í·É ½ÇÇà¿¡¼­ Á¦ ¸Ú´ë·ÎÀÇ °á°ú°¡ ³ª¿ÔÀ½" @@ -3810,19 +3881,19 @@ msgstr "¸í·É ½ÇÇà¿¡¼­ Á¦ ¸Ú´ë·ÎÀÇ °á°ú°¡ msgid "Window changed" msgstr "À©µµ¿ì º¯°æµÊ" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "»ç¿ë °¡´ÉÇÑ ¹®ÀÚÁöµµÀÇ À̸§µéÀ» Ãâ·ÂÇÔ" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "»ç¿ë °¡´ÉÇÑ ·ÎÄÉÀÏÀÇ À̸§À» Ç¥½ÃÇÔ" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "»ç¿ë °¡´ÉÇÑ ¹üÁÖÀÇ À̸§À» Ç¥½ÃÇÔ" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "¼±ÅÃµÈ Å°¿öµåÀÇ À̸§À» Ç¥½ÃÇÔ" @@ -3830,18 +3901,18 @@ msgstr "¼±ÅÃµÈ Å°¿öµåÀÇ À̸§À» Ç¥½ÃÇÔ" msgid "Write output to file NAME" msgstr "`À̸§' ÆÄÀÏ·Î Ãâ·ÂÇÔ" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "ij½¬ µ¥ÀÌŸ ¾²±â°¡ ½ÇÆÐ" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "ij½¬ µ¥ÀÌŸ ¾²±â°¡ ½ÇÆÐÇß½À´Ï´Ù." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "%sÀÌ ¸¸µé¾ú½À´Ï´Ù.\n" @@ -3850,14 +3921,6 @@ msgstr "%sÀÌ ¸¸µé¾ú½À´Ï´Ù.\n" msgid "Wrong medium type" msgstr "À߸øµÈ ¸Å°³Ã¼ ŸÀÔ" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3872,11 +3935,15 @@ msgstr "¿¹, 42´Â Á¤»óÀûÀ¸·Î µ¿ÀÛÇÑ´Ù´Â ¶ msgid "You really blew it this time" msgstr "À̹ø¿£ Á¤¸»·Î ³¯·Á¹ö·È½À´Ï´Ù" -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "°è¼ÓµÇ´Â Zone ÁÙ¿¡ ÀÖ´Â ³¡ ½Ã°¢ÀÌ À­ ÁÙ¿¡ ÀÖ´Â ³¡½Ã°¢º¸´Ù ´ÊÀº ½Ã°¢ÀÌ ¾Æ´Õ´Ï´Ù" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[<µð·ºÅ丮>...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[<ÆÄÀÏ>...]" @@ -3908,13 +3975,13 @@ msgstr "`%.*s'Àº(´Â) ¹®ÀÚÁöµµ¿¡ ÀÌ¹Ì Á¤À msgid "`%.*s' already defined in repertoire" msgstr "`%.*s'Àº(´Â) ·¹ÆÄÅ丮¿¡ ÀÌ¹Ì Á¤ÀǵǾî ÀÖ½À´Ï´Ù" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "`%1$s' Á¤Àǰ¡ `END %1$s'·Î ³¡³ªÁö ¾Ê½À´Ï´Ù" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s'°ú(¿Í) `%.*s'Àº(´Â) ±âÈ£ ¹üÀ§·Î »ç¿ë°¡´ÉÇÑ À̸§ÀÌ ¾Æ´Õ´Ï´Ù" @@ -3924,7 +3991,7 @@ msgstr "`%s'°ú(¿Í) `%.*s'Àº(´Â) ±âÈ£ ¹üÀ msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s'´Â `%s'¿¡ ¸Â´Â ÇÁ·ÎÆÄÀÏ µ¥ÀÌŸ ÆÄÀÏÀÌ ¾Æ´Õ´Ï´Ù" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "`digit' ¹üÁÖ°¡ 10ÀÇ ¹è¼öÀÇ Ç׸ñÀ» °¡ÁöÁö ¾Ê¾Ò½À´Ï´Ù" @@ -3940,12 +4007,12 @@ msgstr "ai_socktypeÀÌ Áö¿øµÇÁö ¾Ê½À´Ï´Ù" msgid "already running" msgstr "ÀÌ¹Ì ½ÇÇàÁß" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "<%s>¿¡ ´ëÇÑ Àμö´Â ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "`%s'¿¡ ´ëÇÑ Àμö´Â ´ÜÀÏ ¹®ÀÚ¿©¾ß ÇÕ´Ï´Ù" @@ -3958,28 +4025,28 @@ msgstr "auto_none.c - Ä¡¸íÀûÀÎ Á¤·Ä(mars msgid "authunix_create: out of memory\n" msgstr "authunix_create: ¸Þ¸ð¸® ºÎÁ·\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "À߸øµÈ Àμö" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "À߸øµÈ ¼ÒÀ¯ÀÚ" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "Link ÁÙ¿¡ FROM Çʵ尡 ¾øÀ½" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "Link ÁÙ¿¡ TO Çʵ尡 ¾øÀ½" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "ºí·°ÀÌ µÎ¹ø ºñ¿öÁ³À½\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "¾ûÅ͸® mcheck_status, ¶óÀ̺귯¸®´Â ¹ö±×°¡ ÀÖ½À´Ï´Ù\n" @@ -4003,11 +4070,11 @@ msgstr "cache_set: ¹ö¸±°ÍÀ» ÇÒ´çÇÏÁö ¸øÇ msgid "cache_set: victim not found" msgstr "cache_set: ¹ö¸±°ÍÀ» ãÁö ¸øÇßÀ½" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "´ÜÁö Á¾·á½Ã°¢ ÀÌÈÄ¿¡ »ç¿ëÇϱâ À§ÇÑ ½Ã°£´ë ¾à¾î¸¦ °áÁ¤ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "ÇÁ·Î½ÃÁ® ¹øÈ£ %ld¸¦ ÀçÁöÁ¤ÇÒ ¼ö ¾ø½À´Ï´Ù\n" @@ -4021,15 +4088,15 @@ msgstr "reloc ÈÄ¿¡ prot ¼¼±×¸ÕÆ®¸¦ º¹±¸Ç msgid "cannot add already read locale `%s' a second time" msgstr "ÀÌ¹Ì ÀоîµéÀÎ `%s' ·ÎÄÉÀÏÀ» µÎ ¹ø Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "ÀÇÁ¸¼º ¸®½ºÆ®¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "ÇÁ·Î±×·¥ Çì´õ¿¡ ´ëÇÑ ¸Þ¸ð¸®¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "³×ÀÓ ·¹Äڵ带 ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" @@ -4037,33 +4104,27 @@ msgstr "³×ÀÓ ·¹Äڵ带 ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù msgid "cannot allocate symbol data" msgstr "±âÈ£ µ¥ÀÌŸ¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "±âÈ£ ã±â ¸®½ºÆ®¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "¹öÀü ÂüÁ¶ Å×À̺íÀ» ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "¸Þ¸ð¸® º¸È£¸¦ ¹Ù²Ü ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "RUNPATH/RPATH Ä«ÇǸ¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "ã±â °æ·Î¿¡ ´ëÇÑ Ä³½¬¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" -# ¹ø¿ª: capability´Â DB¿¡¼­ authenticationÀ» ÁÙÀ̱â À§ÇØ ¾²´Â °Í.. -# °¡±î¿î DBÃ¥ ÂüÁ¶. -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "ÄÉÀÌÆÛºô¸®Æ¼ ¸®½ºÆ®¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "³»ºÎÀû ±â¼úÀÚ¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" @@ -4072,23 +4133,28 @@ msgstr "³»ºÎÀû ±â¼úÀÚ¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù msgid "cannot create internal descriptors" msgstr "³»ºÎÀû ±â¼úÀÚ¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "Ãâ·Â ÆÄÀÏ `%s'¸¦ ¹üÁÖ `%s'¿¡ ´ëÇØ ¸¸µé ¼ö ¾ø½À´Ï´Ù" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "ã±â °æ·Î ¹è¿­À» ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "ã±â¸®½ºÆ®¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "°øÀ¯ ¿ÀºêÁ§Æ® ±â¼úÀÚ¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "À̽ºÄÉÀÌÇÁ ¹®ÀÚ¸¦ °áÁ¤ÇÒ ¼ö°¡ ¾ø½À´Ï´Ù" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "µ¿ÀûÀ¸·Î ½ÇÇàÆÄÀÏÀ» ·ÎµåÇÒ ¼ö ¾ø½À´Ï´Ù" @@ -4110,7 +4176,11 @@ msgstr "C Àü󸮱⸦ ãÀ» ¼ö ¾ø½À´Ï´Ù: % msgid "cannot find any C preprocessor (cpp)\n" msgstr "¾î¶² C Àü󸮱⵵ (cpp) ãÀ» ¼ö ¾ø½À´Ï´Ù\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "Ãâ·Â ÆÄÀÏÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "°ú°ÅÀÇ ¿äû ¹öÀü %d¸¦ ó¸®ÇÒ ¼ö ¾ø½À´Ï´Ù; ÇöÀç ¹öÀüÀº %dÀÔ´Ï´Ù" @@ -4119,19 +4189,15 @@ msgstr "°ú°ÅÀÇ ¿äû ¹öÀü %d¸¦ ó¸®ÇÒ ¼ö msgid "cannot load profiling data" msgstr "ÇÁ·ÎÆÄÀϸµ µ¥ÀÌŸ¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "µ¿Àû ¿ÀºêÁ§Æ® ÆÄÀÏÀ» ÀоîµéÀÏ ¼ö ¾ø½À´Ï´Ù" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "¸®·ÎÄÉÀ̼ÇÀ» À§ÇØ ¼¼±×¸ÕÆ®¸¦ ¾²±â °¡´ÉÇϵµ·Ï ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "0À¸·Î ä¿î ÆäÀÌÁö¸¦ ¸ÅÇÎÇÒ ¼ö ¾ø½À´Ï´Ù" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "¿­ ¼ö ¾ø½À´Ï´Ù" @@ -4144,7 +4210,7 @@ msgstr "`%s'¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" msgid "cannot open input file" msgstr "ÀÔ·Â ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "ÀÔ·Â ÆÄÀÏ `%s'¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" @@ -4155,21 +4221,21 @@ msgstr "ÀÔ·Â ÆÄÀÏ `%s'¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" msgid "cannot open locale definition file `%s'" msgstr "·ÎÄÉÀÏ Á¤ÀÇ ÆÄÀÏ `%s'¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "Ãâ·Â ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "Ãâ·Â ÆÄÀÏ `%s'¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "Ãâ·Â ÆÄÀÏ `%s'¸¦ ¹üÁÖ `%s'¿¡ ´ëÇØ ¿­ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "µ¿Àû ¿ÀºêÁ§Æ® ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù" @@ -4178,7 +4244,7 @@ msgstr "µ¿Àû ¿ÀºêÁ§Æ® ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´ msgid "cannot open socket: %s" msgstr "¼ÒÄÏ `%s'¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "0À¸·Î ä¿î ÀåÄ¡¸¦ ¿­ ¼ö ¾ø½À´Ï´Ù" @@ -4191,7 +4257,7 @@ msgstr "¹®ÀÚ Áöµµ µð·ºÅ丮 `%s'¸¦ ÀÐÀ» ¼ msgid "cannot read configuration file; this is fatal" msgstr "¼³Á¤ ÆÄÀÏÀ» ÀÐÀ» ¼ö ¾ø½À´Ï´Ù; Ä¡¸íÀûÀÓ" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "ÆÄÀÏ µ¥ÀÌŸ¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" @@ -4204,11 +4270,6 @@ msgstr "Çì´õ¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" msgid "cannot read header from `%s'" msgstr "`%s'¿¡¼­ Çì´õ¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "·ÎÄÉÀÏ µð·ºÅ丮 `%s'¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "Åë°è µ¥ÀÌŸ¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" @@ -4218,7 +4279,7 @@ msgstr "Åë°è µ¥ÀÌŸ¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" msgid "cannot safe new repertoire map" msgstr "»õ·Î¿î ·¹ÆÄÅ丮 Áöµµ ÆÄÀÏÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "µ¿Àû ¿ÀºêÁ§Æ®¿¡ ´ëÇØ stat()ÀÌ ½ÇÆÐÇß½À´Ï´Ù" @@ -4232,7 +4293,7 @@ msgstr "`%s'ÆÄÀÏ¿¡ stat()À» ÇÒ ¼ö ¾ø½À´Ï msgid "cannot write output files to `%s'" msgstr "Ãâ·Â ÆÄÀÏÀ» `%s'¿¡ ±â·ÏÇÒ ¼ö ¾ø½À´Ï´Ù" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "°á°ú¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù: %s" @@ -4242,78 +4303,83 @@ msgstr "°á°ú¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù: %s" msgid "cannot write statistics: %s" msgstr "Åë°è¸¦ ¾µ ¼ö ¾ø½À´Ï´Ù: %s" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "`%2$s' Ŭ·¡½ºÀÇ '%1$s' ¹®ÀÚ´Â `%3$s' Ŭ·¡½º¿¡ µé¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "`%2$s' Ŭ·¡½ºÀÇ '%1$s' ¹®ÀÚ´Â `%3$s' Ŭ·¡½º¿¡ µé¾î ÀÖÀ¸¸é ¾È µË´Ï´Ù" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "¹®ÀÚ °¡ ¹®ÀÚ Áöµµ¿¡¼­ Á¤ÀǵÇÁö ¾Ê¾ÒÀ½" # %0*x ¿¡ positionalÀ» ¾î¶»°Ô Áý¾î ³ÖÀ»±î? %1$0*x, %0*1$x ¸ðµÎ ½ÇÆÐ. -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "L'\\u%0*x' ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ µé¾î ÀÖÁö¸¸ `%s' Ŭ·¡½º¿¡ µé¾î ÀÖ¾î¾ß ÇÕ´Ï´Ù" # %0*x ¿¡ positionalÀ» ¾î¶»°Ô Áý¾î ³ÖÀ»±î? %1$0*x, %0*1$x ¸ðµÎ ½ÇÆÐ. -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "L'\\u%0*x' ¹®ÀÚ´Â `%s' Ŭ·¡½º¿¡ µé¾î ÀÖÁö¸¸ `%s' Ŭ·¡½º¿¡ µé¾î ÀÖÀ¸¸é ¾È µË´Ï´Ù" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "¹®ÀÚ `%s'´Â ³»Á¤Ä¡·Î ÇÊ¿äÇÏÁö¸¸ Á¤ÀǵÇÁö ¾Ê¾ÒÀ½" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "¹®ÀÚ Å¬·¡½º `%s'´Â ÀÌ¹Ì Á¤ÀǵǾúÀ½" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "¹®ÀÚ Áöµµ `%s'´Â ÀÌ¹Ì Á¤ÀǵǾúÀ½" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "¹®ÀÚ Áöµµ `%s'Àº(´Â) ASCII¿¡ ȣȯµÇÁö ¾Ê½À´Ï´Ù. ·ÎÄÉÀÏÀÌ ISO C¿¡ ¸ÂÁö ¾Ê½À´Ï´Ù\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "¹®ÀÚ Áöµµ ÆÄÀÏ `%s'¸¦ ãÁö ¸øÇßÀ½" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "Àá±Ý»óÅÂÀÇ ¹®ÀÚ¼ÂÀº Áö¿øµÇÁö ¾Ê½À´Ï´Ù" +# ??? ¿Ø Ä¡Áî? +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "Ä¡Áî" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "·ÎÄÉÀÏ Á¤ÀÇµé »çÀÌ¿¡ »óÈ£ ÀÇÁ¸¼º" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Ä¡¸íÀûÀÎ Çì´õ ¿¬¼ÓÈ­ ¿À·ù." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: ¸Þ¸ð¸® ºÎÁ·\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: ¸Þ¸ð¸® ºÎÁ·\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: ¸Þ¸ð¸® ºÎÁ·\n" @@ -4321,28 +4387,28 @@ msgstr "clntunix_create: ¸Þ¸ð¸® ºÎÁ·\n" msgid "constant or identifier expected" msgstr "»ó¼ö ȤÀº ½Äº°ÀÚ°¡ ¿Í¾ß ÇÔ" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "`%s'¿¡¼­ `%s'·ÎÀÇ º¯È¯Àº Áö¿øµÇÁö ¾Ê½À´Ï´Ù" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "º¯È¯ ¸ðµâÀÌ »ç¿ë ºÒ°¡´ÉÇÕ´Ï´Ù" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "º¯È¯ ºñÀ²ÀÇ °ªÀº 0ÀÌ µÉ ¼ö ¾ø½À´Ï´Ù" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "Ãâ·ÂÆÄÀÏ¿¡ ¾µ¶§ ¹ß»ýÇÑ ¹®Á¦·Î º¯È¯ÀÛ¾÷ÀÌ ÁߴܵǾú½À´Ï´Ù" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "rpc ¼­¹ö¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "ÇÁ·Î±×·¥ %ld ¹öÀü %ld¸¦ µî·ÏÇÒ ¼ö ¾ø½À´Ï´Ù\n" @@ -4351,17 +4417,17 @@ msgstr "ÇÁ·Î±×·¥ %ld ¹öÀü %ld¸¦ µî·ÏÇÒ ¼ msgid "database [key ...]" msgstr "µ¥ÀÌŸº£À̽º [Ű...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "±âº» ¹®ÀÚ Áöµµ ÆÄÀÏ `%s'¸¦ ãÁö ¸øÇßÀ½" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "<%s>ÀÌ(°¡) Áߺ¹ Á¤ÀǵǾî ÀÖ½À´Ï´Ù" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "½ºÅ©¸³Æ® `%s'°¡ Áߺ¹ Á¤ÀǵǾî ÀÖ½À´Ï´Ù" @@ -4370,12 +4436,12 @@ msgstr "½ºÅ©¸³Æ® `%s'°¡ Áߺ¹ Á¤ÀǵǾî ÀÖ msgid "duplicate set definition" msgstr "ÁýÇÕ Á¤Àǰ¡ Áߺ¹µÇ¾î ÀÖ½À´Ï´Ù" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "Áö¿ª¸í %s (ÆÄÀÏ \"%s\", Çà %d) Áߺ¹µÇ¾î ÀÖ½À´Ï´Ù" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "¸ÅÇÎ `%s'ÀÌ(°¡) Áߺ¹ Á¤ÀǵǾî ÀÖ½À´Ï´Ù" @@ -4388,7 +4454,7 @@ msgstr "Áߺ¹µÈ ¸Þ½ÃÁö ½Äº°ÀÚ" msgid "duplicated message number" msgstr "Áߺ¹µÈ ¸Þ½ÃÁö ¹øÈ£" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "¸»ÁÙÀÓÇ¥ ¹üÀ§´Â °°Àº ŸÀÔÀÇ µÎ °³ÀÇ ÇÇ¿¬»êÀڷΠǥ½ÃÇØ¾ß ÇÕ´Ï´Ù" @@ -4397,10 +4463,15 @@ msgid "empty char string" msgstr "ºó ¹®ÀÚ¿­" # ¹ø¿ª: ¹º ¼Ò¸®¾ß? -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "ºñ¾î ÀÖ´Â µ¿Àû ¹®ÀÚ¿­ ÅäÅ« ġȯ" +# ¹ø¿ª: ¹º ¼Ò¸®¾ß? +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "ºñ¾î ÀÖ´Â µ¿Àû ¹®ÀÚ¿­ ÅäÅ« ġȯ" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: ij½¬°¡ ÀÌ¹Ì È°¼ºÈ­µÇ¾î ÀÖÀ½" @@ -4417,29 +4488,29 @@ msgstr "enablecache: ij½¬ ÀڷḦ ÇÒ´çÇÒ msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: ij½¬ fifo¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "Ãâ·Â ÀÎÄÚµù" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "¿ø ¹®¼­ ÀÎÄÚµù" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "È£ÃâÀÚÀÇ ID¸¦ ¾ò´Âµ¥ ¿À·ù: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "´ëÀÀµÇ´Â »çÀü ±âÈ£¸¦ Ãß°¡ÇÏ´Â µ¥ ¿À·ù" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "ÀÔ·Â `%s'¸¦ ´Ý´Â µµÁß ¿À·ù ¹ß»ý" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "Ãâ·Â ÆÄÀÏÀ» ´Ý´Â µµÁß ¿À·ù ¹ß»ý" @@ -4447,7 +4518,8 @@ msgstr "Ãâ·Â ÆÄÀÏÀ» ´Ý´Â µµÁß ¿À·ù ¹ß»ý" msgid "error while closing the profiling data file" msgstr "ÇÁ·ÎÆÄÀϸµ µ¥ÀÌŸ ÆÄÀÏÀ¸ ´Ý´Â µµÁß ¿À·ù ¹ß»ý" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "ÀÔ·ÂÀ» Àд µµÁß¿¡ ¿À·ù ¹ß»ý" @@ -4455,10 +4527,14 @@ msgstr "ÀÔ·ÂÀ» Àд µµÁß¿¡ ¿À·ù ¹ß»ý" msgid "expect string argument for `copy'" msgstr "`copy'¿¡ ´ëÇÑ ¹®ÀÚ¿­ Àμö°¡ ÇÊ¿äÇÔ" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "¿¹»óÇß´ø ¿¬¼Ó ÇàÀ» ãÁö ¸øÇßÀ½" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "¼¼¹ÌÄÝ·ÐÀÌ ´õ ºÙ¾î ÀÖÀ½" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4468,7 +4544,7 @@ msgstr "µ¿Àû ¿ÀºêÁ§Æ® `%s'¸¦ Àдµ¥ ½ÇÆÐ msgid "failed to load symbol data" msgstr "±âÈ£ µ¥ÀÌŸ¸¦ Àд µ¥ ½ÇÆÐ" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "µ¿Àû ¿ÀºêÁ§Æ®ÀÇ ¼¼±×¸ÕÆ®¸¦ ¸ÅÇÎÇÏ´Â ½ÇÆÐ" @@ -4476,18 +4552,19 @@ msgstr "µ¿Àû ¿ÀºêÁ§Æ®ÀÇ ¼¼±×¸ÕÆ®¸¦ ¸ÅÇÎÇ msgid "failed to mmap the profiling data file" msgstr "ÇÁ·ÎÆÄÀϸµ µ¥ÀÌŸ ÆÄÀÏÀ» mmapÇÏ´Â µ¥ ½ÇÆÐ" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "º¯È¯ÀÛ¾÷À» ½ÃÀÛÇϴµ¥ ½ÇÆÐ" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "¹üÁÖ `%s'ÀÇ ÀڷḦ ¾²´Â µ¥ ½ÇÆÐÇß½À´Ï´Ù" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "%s ÆÄÀÏÀÌ Àß¶óÁ³½À´Ï´Ù\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4496,19 +4573,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "`%s' ÆÄÀÏÀÌ ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù. µ¤¾î ¾µ¼öµµ ÀÖ½À´Ï´Ù\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "ÆÄÀÏÀÌ ³Ê¹« ª½À´Ï´Ù" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fstat ½ÇÆÐ" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "¹®ÀÚ ÄÚµå ¸í¼¼ÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖÀ½" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "¼ýÀÚÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ÀÖÀ½" @@ -4528,28 +4605,28 @@ msgstr "get_myaddress: ioctl (ÀÎÅÍÆäÀ̽º msgid "getent - get entries from administrative database." msgstr "getent - °ü¸® µ¥ÀÌŸº£À̽º¿¡¼­ entry¸¦ ¾òÀ½." -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: ¿äûÀ» ¹Þ¾ÒÀ½ (¹öÀü = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "ÇÏµå ¸µÅ© ½ÇÆÐ, ½Éº¼¸¯ ¸µÅ©°¡ »ç¿ëµË´Ï´Ù" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "¾îµò°¡¿¡ ÇÏµå ¸µÅ©µÊ" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "16Áø¼ö ¹üÀ§ Æ÷¸ËÀº ´ë¹®ÀÚ¸¸À» »ç¿ëÇØ¾ß ÇÕ´Ï´Ù" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "Leap ÁÙ¿¡ À߸øµÈ CORRECTION Çʵå" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "Leap ÁÙ¿¡ À߸øµÈ Rolling/Stationary Çʵå" @@ -4557,11 +4634,16 @@ msgstr "Leap ÁÙ¿¡ À߸øµÈ Rolling/Station msgid "illegal character in file: " msgstr "ÆÄÀÏ¿¡ À߸øµÈ ¹®ÀÚ°¡ ÀÖÀ½" -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "¹®ÀÚ¿­ ³¡¿¡ À߸øµÈ À̽ºÄÉÀÌÇÁ ¼ø¼­¿­ÀÌ ÀÖÀ½" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "%Zd À§Ä¡¿¡ À߸øµÈ ÀÔ·Â ¼ø¼­¿­ÀÌ ÀÖÀ½" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "%ld À§Ä¡¿¡ À߸øµÈ ÀÔ·Â ¼ø¼­¿­ÀÌ ÀÖÀ½" @@ -4575,102 +4657,102 @@ msgstr "À߸øµÈ ³×ƮŸÀÔ :`%s'\n" msgid "illegal set number" msgstr "ÁýÇÕ ¹øÈ£°¡ À߸øµÇ¾úÀ½" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "±¸Çö»óÀÇ Á¦ÇÑ: %Zd°³ ¹®ÀÚº¸´Ù Å« Ŭ·¡½º´Â Çã¿ëµÇÁö ¾Ê½À´Ï´Ù" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "±¸Çö»óÀÇ Á¦ÇÑ: %d °³ ÀÌ»óÀÇ ¹®ÀÚ Áöµµ´Â Çã¿ëµÇÁö ¾Ê½À´Ï´Ù" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "¹öÆÛÀÇ ³¡¿¡ ºÒ¿ÏÀüÇÑ ¹®ÀÚ È¤Àº ½¬ÇÁÆ® ¿¬¼Ó" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "¾Ë ¼ö ¾ø´Â ÇüÅÂÀÇ ÀÔ·ÂÇà" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "³»ºÎ ¿À·ù" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "³»ºÎ ¿À·ù (À߸øµÈ ±â¼úÀÚ)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "³»ºÎ ¿À·ù - Ʋ¸° isdst·Î addtypeÀ» È£ÃâÇßÀ½" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "³»ºÎ ¿À·ù - Ʋ¸° ttisgmt·Î addtypeÀ» È£ÃâÇßÀ½" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "³»ºÎ ¿À·ù - Ʋ¸° ttisstd·Î addtypeÀ» È£ÃâÇßÀ½" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "%s, Çà %u¿¡ ³»ºÎ ¿À·ù ¹ß»ý" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "À߸øµÈ ELF Çì´õ" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "UTC ¿É¼ÂÀÌ ºÎÀûÀýÇÔ" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "¾à¾î Çü½ÄÀÌ ºÎÀûÀýÇÔ" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "À߸øµÈ ¹®ÀÚ: ¸Þ¼¼Áö´Â ¹«½ÃµË´Ï´Ù" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "´ÞÀÇ ³¯Â¥ ¼ö°¡ ºÎÀûÀýÇÔ" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "Á¤Àǰ¡ À߸øµÇ¾úÀ½" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "À߸øµÈ ºÎȣȭ°¡ ÁÖ¾îÁü" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "³¡³ª´Â ÇØ°¡ ºÎÀûÀýÇÔ" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "À߸øµÈ À̽ºÄÉÀÌÇÁ ¼ø¼­¿­" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "ºÎÀûÀýÇÑ À±³â" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "ºÎÀûÀýÇÑ ÁÙ" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "dlopen()¿¡ À߸øµÈ ¸ðµå" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "´Þ À̸§ÀÌ ºÎÀûÀýÇÔ" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "¹®ÀÚÀÇ ¹üÀ§·Î À߸øµÈ À̸§" @@ -4683,52 +4765,52 @@ msgstr "À߸øµÈ Æ÷ÀÎÅÍ Å©±â" msgid "invalid quote character" msgstr "À߸øµÈ Àο빮ÀÚ" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "Àý¾à ½Ã°£ÀÌ ºÎÀûÀýÇÔ" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "½ÃÀÛÇÏ´Â ÇØ°¡ ºÎÀûÀýÇÔ" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "ºÎÀûÀýÇÑ ÇÏ·çÁß ½Ã°¢" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "ºÎÀûÀýÇÑ ¿äÀÏ À̸§" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "¿äûµÈ ŰÀÇ ±æÀ̰¡ ³Ê¹« ±è: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "libc4 library %sÀÌ(°¡) À߸øµÈ µð·ºÅ丮¿¡ ÀÖ½À´Ï´Ù" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "libc5 library %sÀÌ(°¡) À߸øµÈ µð·ºÅ丮¿¡ ÀÖ½À´Ï´Ù" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "libc6 library %sÀÌ(°¡) À߸øµÈ µð·ºÅ丮¿¡ ÀÖ½À´Ï´Ù" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "µð·ºÅ丮 %sÀÇ ¶óÀ̺귯¸® %s°ú(¿Í) %sÀÌ(°¡) °°Àº sonameÀ» °¡Áö°í ÀÖÁö¸¸ ŸÀÔÀÌ ´Ù¸¨´Ï´Ù." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "ÇàÀÌ ³Ê¹« ±é´Ï´Ù" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "¾Ë·ÁÁø ¸ðµç ¹®Àڼ Äڵ带 ¿­°ÅÇÔ" @@ -4736,7 +4818,7 @@ msgstr "¾Ë·ÁÁø ¸ðµç ¹®Àڼ Äڵ带 ¿­°ÅÇÔ msgid "locale name should consist only of portable characters" msgstr "·ÎÄÉÀÏ À̸§Àº Æ÷ÅͺíÇÑ ¹®ÀÚ·Î ±¸¼ºµÇ¾î¾ß ÇÕ´Ï´Ù" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "lstat ½ÇÆÐ" @@ -4748,7 +4830,11 @@ msgstr "Ãâ·Â ±×·¡ÇÈ Çȼ¿°ªÀ» ³ô°Ô ÇÕ´Ï´Ù msgid "make output graphic VALUE pixel wide" msgstr "Ãâ·Â ±×·¡ÇÈ Çȼ¿°ªÀ» ³Ð°Ô ÇÕ´Ï´Ù" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: 8°³º¸´Ù ¸¹Àº ÀÎÀÚ¸¦ ¾î¶»°Ô ó¸®ÇÒ Áö ¾Ë ¼ö ¾ø½À´Ï´Ù\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "À߸øµÈ ÇüŸ¦ °¡Áø ÇàÀº ¹«½ÃµÊ" @@ -4760,39 +4846,34 @@ msgstr "¼½¼Ç Çì´õÀÇ ¹®ÀÚ¿­ Å×À̺íÀ» ¸ÅÇÎ msgid "mapping of section headers failed" msgstr "¼½¼Ç Çì´õ¸¦ ¸ÅÇÎÇÏ´Â µ¥ ½ÇÆÐ" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "ºí·°À» ÇÒ´çÇϱâ Àü¿¡ ¸Þ¸ð¸®°¡ ÈѼյÊ\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "ºí·°À» ÇÒ´çÀÌ ³¡³ª±â Àü¿¡ ¸Þ¸ð¸®°¡ ÈѼյÊ\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "¸Þ¸ð¸®°¡ ¹Ù´Ú³²" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "¸Þ¸ð¸®´Â °ß°íÇÏÁö¸¸, ¶óÀ̺귯¸®´Â ¹ö±×°¡ ¸¹½À´Ï´Ù\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "ij½¬ ÆÄÀÏÀ» mmapÇÏ´Â µ¥ ½ÇÆÐ\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "¿©·¯ °³ÀÇ µ¿Àû ¼¼±×¸ÕÆ®\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "À̸§¾ø´Â ±ÔÄ¢" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "¿ø ÀÎÄÚµù°ú Ãâ·Â ÀÎÄÚµù ¸ðµÎ ÁöÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4825,7 +4906,7 @@ msgstr "netname2user: ÁÖ¿ä À̸§ `%s'Àº ³ msgid "netname2user: should not have uid 0" msgstr "netname2user: uid¸¦ 0À¸·Î ÇÒ ¼ö ¾ø½À´Ï´Ù" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "°áÄÚ µî·ÏµÇÁö ¾ÊÀº ÇÁ·Î±×·¥ %d\n" @@ -4834,11 +4915,11 @@ msgstr "°áÄÚ µî·ÏµÇÁö ¾ÊÀº ÇÁ·Î±×·¥ %d\n msgid "no or value given" msgstr " ȤÀº °ªÀÌ ÁÖ¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "±ÔÄ¢¿¡ ºÎÇյǴ ³¯ÀÌ ´Þ ¾È¿¡ ¾øÀ½" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "`UNDEFINED'ÀÇ Á¤Àǰ¡ ¾øÀ½" @@ -4847,7 +4928,7 @@ msgstr "`UNDEFINED'ÀÇ Á¤Àǰ¡ ¾øÀ½" msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "ÇÁ·ÎÆÄÀϸµ µ¥ÀÌŸÀÇ ÆÄÀÏ À̸§ÀÌ ¾ø°í, µ¿Àû ¿ÀºêÁ§Æ® `%s'´Â sonameÀÌ ¾øÀ½" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "ÀÔ·Â ¼ýÀÚ°¡ Á¤ÀǵÇÁö ¾Ê¾Ò°í ¹®ÀÚÁöµµ¿¡ Ç¥ÁØ À̸§ÀÌ ¾ø½À´Ï´Ù" @@ -4855,37 +4936,37 @@ msgstr "ÀÔ·Â ¼ýÀÚ°¡ Á¤ÀǵÇÁö ¾Ê¾Ò°í ¹®ÀÚ msgid "no other keyword shall be specified when `copy' is used" msgstr "`copy'°¡ »ç¿ëµÉ ¶© ´Ù¸¥ Ű¿öµå¸¦ ÁöÁ¤ÇÏ¸é ¾È µË´Ï´Ù" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "Ãâ·Â ¼ýÀÚ°¡ Á¤ÀǵÇÁö ¾Ê¾Ò°í ¹®ÀÚÁöµµ¿¡ Ç¥ÁØ À̸§ÀÌ ¾ø½À´Ï´Ù" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "°æ°í°¡ Á¦±âµÇ¾ú±â ¶§¹®¿¡ Ãâ·Â ÆÄÀÏÀÌ ¸¸µé¾îÁöÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "±âÈ£¸íÀÌ ÁÖ¾îÁöÁö ¾ÊÀ½" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "¹üÀ§ÀÇ ³¡±îÁö ±âÈ£ À̸§ÀÌ ¾ø½À´Ï´Ù" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "±âÈ£ ¹®ÀÚ°¡ ¾Æ´Ñ °ªÀº »ç¿ëµÇÁö ¸»¾Æ¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "¹®ÀÚÁöµµÀÇ `outdigit'¿¡ »ç¿ëµÈ ¹®ÀÚÀÇ ÀüºÎ°¡ »ç¿ë °¡´ÉÇÑ °ÍÀÌ ¾Æ´Õ´Ï´Ù" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "·¹ÆÄÅ丮ÀÇ `outdigit'¿¡ »ç¿ëµÈ ¹®ÀÚÀÇ ÀüºÎ°¡ »ç¿ë °¡´ÉÇÑ °ÍÀÌ ¾Æ´Õ´Ï´Ù" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "ÀÏ¹Ý ÆÄÀÏÀÌ ¾Æ´Ô" @@ -4904,36 +4985,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd°¡ ½ÇÇàµÇÁö ¾Ê¾Ò½À´Ï´Ù!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "¿ÀºêÁ§Æ® ÆÄÀÏ¿¡ µ¿Àû ¼½¼ÇÀÌ ¾ø½À´Ï´Ù" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "Ãâ·Â¿¡¼­ À߸øµÈ ¹®ÀÚ¸¦ Á¦¿ÜÇÕ´Ï´Ù" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "ET_DYN°ú ET_EXEC¸¸À» ÀоîµéÀÏ ¼ö ÀÖ½À´Ï´Ù" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "CHARMAP Á¤ÀÇ ¹Ù·Î ´ÙÀ½¿¡´Â WIDTH Á¤ÀǸ¸ÀÌ °¡´ÉÇÕ´Ï´Ù" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "`%.*s'ÀÇ ¼ø¼­´Â ÀÌ¹Ì %s:%Zu¿¡ Á¤ÀǵǾî ÀÖ½À´Ï´Ù" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "`-f'¸¦ »ç¿ëÇÑ ¿ø ÀÎÄÚµùÀÌ ÁöÁ¤µÇÁö ¾Ê¾ÒÀ½" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "¸Þ¸ð¸® ºÎÁ·" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "Ãâ·Â ÆÄÀÏ" @@ -4941,19 +5018,19 @@ msgstr "Ãâ·Â ÆÄÀÏ" msgid "pmap_getmaps rpc problem" msgstr "pmap_genmaps rcp ¹®Á¦" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: ȸ·Î ¼³Á¤Áß ±Ô¾àÀÌ ºÒÀÌÇàµÊ\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "`translit_ignore' Á¤Àǰ¡ ¿Ï°áµÇÁö ¾ÊÀº ä ³¡³µ½À´Ï´Ù" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "Àü󸮱⠿À·ù" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "ÀÌÀü Á¤Àǰ¡ ¿©±â ÀÖ½À´Ï´Ù" @@ -4961,7 +5038,7 @@ msgstr "ÀÌÀü Á¤Àǰ¡ ¿©±â ÀÖ½À´Ï´Ù" msgid "print list of count paths and their number of use" msgstr "´Ü°èÀÇ ¸ñ·Ï°ú ±× °¢ ´Ü°èÀÇ »ç¿ë Ƚ¼ö¸¦ Ç¥½Ã" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "ÁøÇà Á¤º¸¸¦ Ç¥½Ã" @@ -4987,30 +5064,30 @@ msgstr "ÇÁ·Î±×·¥ %lu ¹öÀü %lu´Â »ç¿ë ºÒ° msgid "program %lu version %lu ready and waiting\n" msgstr "ÇÁ·Î±×·¥ %lu ¹öÀü %lu´Â ÁغñµÇ¾î ±â´Ù¸®°í ÀÖ½À´Ï´Ù\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: ÀбⰡ ²÷°åÀ½" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (Ç¥ÁØ¿À·ù ¼³Á¤): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: socket: ¸ðµç Æ÷Æ®°¡ »ç¿ëÁß\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write (Ç¥ÁØ¿À·ù ¼³Á¤): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: ¸Þ¸ð¸® ºÎÁ·\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "À±ÃÊÀÇ Å©±â°¡ Áߺ¹µÇ¾úÀ½" @@ -5019,7 +5096,7 @@ msgstr "À±ÃÊÀÇ Å©±â°¡ Áߺ¹µÇ¾úÀ½" msgid "repertoire map file `%s' not found" msgstr "·¹ÆÄÅ丮 Áöµµ ÆÄÀÏ `%s'¸¦ ãÁö ¸øÇßÀ½" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "¹üÀ§ÀÇ ÃÖÁ¾ ¹ÙÀÌÆ®¼ö¸¦ Ç¥½ÃÇÒ ¼ö ¾ø½À´Ï´Ù." @@ -5055,24 +5132,24 @@ msgstr "rpcinfo: ºê·Îµåij½ºÆ® ½ÇÆÐÇÔ: %s msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: Æ÷Æ®¸ÅÆÛ¿¡ ¿¬°áÇÒ ¼ö ¾ø½À´Ï´Ù" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "¿©·¯ ÆÄÀÏ¿¡ °°Àº À̸§ÀÇ ±ÔÄ¢ÀÌ ÀÖÀ½" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "µ¿Àû ¿ÀºêÁ§Æ®´Â dlopen()µÉ ¼ö ¾ø½À´Ï´Ù" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "°øÀ¯ ¿ÀºêÁ§Æ®°¡ ¿­¸®Áö ¾Ê¾Ò½À´Ï´Ù" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "¿äûÇÑ Å°¸¦ ´Ù ÀÐÁö ¸øÇßÀ½: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "¿ä±¸»çÇ×À» ´Ù ÀÐÁö ¸øÇßÀ½: %s" @@ -5082,35 +5159,31 @@ msgstr "¿ä±¸»çÇ×À» ´Ù ÀÐÁö ¸øÇßÀ½: %s" msgid "short write in %s: %s" msgstr "%s¸¦ ´Ù ¾²Áö ¸øÇßÀ½: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "socket: ȸ·Î ¼³Á¤Áß ±Ô¾àÀÌ ºÒÀÌÇàµÊ\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "Ç¥ÁØ ÀÔ·Â" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "Ç¥ÁØ Ãâ·Â" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "¹üÀ§ÀÇ ½ÃÀÛ ¹®ÀÚ ¼ø¼­¿­°ú ³¡ ¹®ÀÚ ¼ø¼­¿­Àº ±æÀ̰¡ °°¾Æ¾ß ÇÕ´Ï´Ù" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "½ÃÀÛÇÏ´Â ÇØ°¡ ³¡³ª´Â ÇØº¸´Ù Å®´Ï´Ù" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "½ÃÀÛ ¿¬µµ°¡ ³Ê¹« ³ôÀº ¼ö¶ó¼­ Ç¥½ÃÇÒ ¼ö ¾ø½À´Ï´Ù" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "½ÃÀÛ ¿¬µµ°¡ ³Ê¹« ³·Àº ¼ö¶ó¼­ Ç¥½ÃÇÒ ¼ö ¾ø½À´Ï´Ù" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "°æ°í¸¦ Ç¥½ÃÇÏÁö ¾Ê½À´Ï´Ù" @@ -5118,31 +5191,31 @@ msgstr "°æ°í¸¦ Ç¥½ÃÇÏÁö ¾Ê½À´Ï´Ù" msgid "svc_run: - poll failed" msgstr "svc_run: - poll ½ÇÆÐ" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - getsockname ȤÀº listen ºÒ°¡´É" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp_c - tcp ¼ÒÄÏ »ý¼º ¹®Á¦" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: ¸Þ¸ð¸® ºÎÁ·\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - AF_UNIX ¼ÒÄÏ »ý¼º ¹®Á¦" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - getsockname ȤÀº listen ºÒ°¡´É" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefc_xprt: ¸Þ¸ð¸® ºÎÁ·\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: ¸Þ¸ð¸® ºÎÁ·\n" @@ -5162,49 +5235,49 @@ msgstr "svcudp_create: ¼ÒÄÏ »ý¼º ¹®Á¦" msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad°¡ IP_PKTINFO¿¡ ´ëÇÏ¿© ³Ê¹« ÀÛ½À´Ï´Ù\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: ¸Þ¸ð¸® ºÎÁ·\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "`%.*s' ±âÈ£´Â ¹®ÀÚ Áöµµ¿¡ ¾ø½À´Ï´Ù" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "`%.*s' ±âÈ£´Â ·¹ÆÄÅ丮 Áöµµ¿¡ ¾ø½À´Ï´Ù" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "±âÈ£ `%s'" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "±âÈ£ `%s'ÀÌ(°¡) °°Àº ´ÙÀ½°ú ÀÎÄÚµùÀÔ´Ï´Ù:" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "`%s' ½Éº¼Àº Á¤ÀǵÇÁö ¾Ê¾Ò½À´Ï´Ù" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "¹®¹ý ¿À·ù" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "%s Á¤ÀǺο¡ ¹®¹ý ¿À·ù ÀÖÀ½: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5216,73 +5289,69 @@ msgstr "¸Ó¸´¸»¿¡ ¹®¹ý ¾Ö·¯: %s" msgid "syntax error in repertoire map definition: %s" msgstr "·¹ÆÄÅ丮 Áöµµ Á¤ÀÇ¿¡ ¹®¹ý ¿À·ù: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "¹®¹ý ¾Ö·¯: ·ÎÄÉÀÏ Á¤ÀÇ ºÎºÐÀÌ ¾Æ´Õ´Ï´Ù" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "`-t'¸¦ »ç¿ëÇÑ Ãâ·Â ÀÎÄÚµù ÁöÁ¤ÀÌ ¾ø½À´Ï´Ù" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "À̰ÍÀº ù¹øÂ° Á¤ÀÇÀÔ´Ï´Ù" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "0 ÀÌÀüÀÇ ½Ã°£" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "½Ã°£ Èê·¯ ³Ñħ" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "¹üÀ§ÀÇ to-value ÀÌ(°¡) from-value º¸´Ù ÀÛ½À´Ï´Ù" -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "to-value ¹®ÀÚ ¼ø¼­¿­ÀÌ from-value ¼ø¼­¿­º¸´Ù ÀÛ½À´Ï´Ù" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "¹®ÀÚ ºÎȣȭ¿¡ ÇÊ¿äÇÑ ¹ÙÀÌÆ®°¡ ³Ê¹« ÀûÀ½" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "¹®ÀÚ ºÎȣȭ¿¡ ÇÊ¿äÇÑ ¹ÙÀÌÆ®°¡ ³Ê¹« ¸¹À½" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "À±Ãʰ¡ ³Ê¹« ¸¹À½" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "Áö¿ª½ÃÀÇ Á¾·ù°¡ ³Ê¹« ¸¹À½" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "³Ê¹« ¸¹Àº ÀüÀÌ?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "³Ê¹« ¸¹°Å³ª ³Ê¹« ±ä ½Ã°£´ë ¾à¾î" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "ÆÄÀÏÀÇ ³¡¿¡ ¾µ¸ð¾ø´Â °ÍÀÌ ºÙ¾î ÀÖÀ½" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "ÇÁ·Î±×·¥ %d¿¡ ÀÀ´äÇÏ´Â µ¥ ¹®Á¦°¡ ÀÖÀ½\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "ÇѰ³ÀÇ ¿¬µµ°¡ ŸÀÌÇÁµÇ¾ú½À´Ï´Ù" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "ÀÔ·ÂÀ» À§ÇÑ ¹öÆÛ¸¦ ÇÒ´çÇÒ ¼ö ¾ø½À´Ï´Ù" @@ -5290,11 +5359,15 @@ msgstr "ÀÔ·ÂÀ» À§ÇÑ ¹öÆÛ¸¦ ÇÒ´çÇÒ ¼ö ¾ø½ msgid "unable to free arguments" msgstr "ÀÎÀÚ¸¦ ºñ¿ï ¼ö ¾ø½À´Ï´Ù" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "Á¤ÀǵÇÁö ¾ÊÀ½" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "¾Ë ¼ö ¾øÀ½" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "¾Ë ¼ö ¾ø´Â ¹®ÀÚ `%s'" @@ -5304,7 +5377,7 @@ msgstr "¾Ë ¼ö ¾ø´Â ¹®ÀÚ `%s'" msgid "unknown directive `%s': line ignored" msgstr "¾Ë ¼ö ¾ø´Â Áö½ÃÀÚ `%s': Çà ¹«½ÃµÊ" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "¾Ë ¼ö ¾ø´Â iconv() ¿À·ù %d" @@ -5314,15 +5387,20 @@ msgstr "¾Ë ¼ö ¾ø´Â iconv() ¿À·ù %d" msgid "unknown set `%s'" msgstr "¾Ë ¼ö ¾ø´Â ¼³Á¤ `%s'" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "¾Ë ¼ö ¾ø´Â ½ºÆå \"%s\"" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "±ÔÄ¢¾ø´Â Áö¿ª" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "Á¾·áµÇÁö ¾ÊÀº ¸Þ½ÃÁö" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "Á¾·áµÇÁö ¾ÊÀº ¹®ÀÚ¿­" @@ -5330,11 +5408,11 @@ msgstr "Á¾·áµÇÁö ¾ÊÀº ¹®ÀÚ¿­" msgid "unterminated string constant" msgstr "Á¾·áµÇÁö ¾ÊÀº ¹®ÀÚ¿­ »ó¼ö" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "Á¾·áµÇÁö ¾ÊÀº ±âÈ£ À̸§" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "¹üÀ§ÀÇ »óÇÑÀÌ ÇÏÇѺ¸´Ù Å©Áö ¾Ê½À´Ï´Ù" @@ -5342,35 +5420,35 @@ msgstr "¹üÀ§ÀÇ »óÇÑÀÌ ÇÏÇѺ¸´Ù Å©Áö ¾Ê½À msgid "upper limit in range is not smaller then lower limit" msgstr "¹üÀ§ÀÇ »óÇÑÀÌ ÇÏÇѺ¸´Ù ÀÛÁö ¾Ê½À´Ï´Ù" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "»ç¿ë¹ý: %s ÀÔ·ÂÆÄÀÏ\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "Æò³â¿¡ 2¿ù 29ÀÏÀ» »ç¿ëÇÔ" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "%s¿¡ ´ëÇÑ °ªÀº Á¤¼ö¿©¾ß ÇÕ´Ï´Ù" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "%s¿¡ ´ëÇÑ °ªÀº 1 ÀÌ»óÀ̾î¾ß ÇÕ´Ï´Ù" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "<%s>¿¡ ´ëÇÑ °ªÀº <%s>ÀÇ °ªº¸´Ù °°°Å³ª Ä¿¾ß ÇÕ´Ï´Ù" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "°æ°í: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "¿¬°áÀ» ¹Þ¾ÆµéÀÌ´Â µµÁß: %s" @@ -5387,11 +5465,15 @@ msgstr "ÇØ½¬ Å×ÀÌºí¿¡ entry¸¦ ÇÒ´çÇÏ´Â µ msgid "while allocating key copy" msgstr "Ű º¹»ç¸¦ ÇÒ´çÇÏ´Â µ¿¾È" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "ã±â Æ®¸®¿¡ Ãß°¡ÇÏ´Â µ¿¾È" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "¿À·¡µÈ ¸ñ·Ï ÆÄÀÏÀ» ¿©´Â µ¿¾È" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "Ãâ·ÂÀ» ÁغñÇÏ´Â µ¿¾È" @@ -5400,16 +5482,16 @@ msgid "while stat'ing profiling data fil msgstr "ÇÁ·ÎÆÄÀϸµ µ¥ÀÌŸ ÆÄÀÏÀ» ¾²´Â µ¿¾È" # ¹ø¿ª: ¹º¼Ò¸®¾ß? -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "UCS ¹üÀ§ °ª¿¡¼­´Â 16Áø¼ö ±âÈ£ ¸»ÁÙÀÓÇ¥ `..'À» ½á¾ß ÇÕ´Ï´Ù" # ¹ø¿ª: ¹º ¼Ò¸®¾ß? -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "¹®ÀÚÄÚµå ¹üÀ§ °ª¿¡¼­´Â Àý´ë ¸»ÁÙÀÓÇ¥ `..'À» ½á¾ß ÇÕ´Ï´Ù" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "±âÈ£À̸§ ¹üÀ§ °ª¿¡¼­´Â Àý´ë ¸»ÁÙÀÓÇ¥ `..'À» ¾²Áö ¸»¾Æ¾ß ÇÕ´Ï´Ù" @@ -5417,7 +5499,7 @@ msgstr "±âÈ£À̸§ ¹üÀ§ °ª¿¡¼­´Â Àý´ë ¸»ÁÙ msgid "write incomplete" msgstr "¿ÏÀüÈ÷ ¾²Áö ¸øÇß½À´Ï´Ù" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "¼ÒÀ¯ÀÚ°¡ ¾Æ´Ñ »ç¶÷ÀÌ º¯°æÇÒ ¼ö ÀÖÀ½" @@ -5425,23 +5507,23 @@ msgstr "¼ÒÀ¯ÀÚ°¡ ¾Æ´Ñ »ç¶÷ÀÌ º¯°æÇÒ ¼ö À msgid "wrong number of arguments" msgstr "ÀμöÀÇ °³¼ö°¡ À߸øµÇ¾úÀ½" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "Leap ÁÙ¿¡ ÇʵåÀÇ °³¼ö°¡ À߸øµÇ¾úÀ½" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "Link ÁÙ¿¡ ÇʵåÀÇ °³¼ö°¡ À߸øµÇ¾úÀ½" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "Rule ÁÙ¿¡ ÇʵåÀÇ °³¼ö°¡ À߸øµÇ¾úÀ½" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "Zone continuation ÁÙ¿¡ ÇʵåÀÇ °³¼ö°¡ À߸øµÇ¾úÀ½" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "Zone ÁÙ¿¡ ÇʵåÀÇ °¹¼ö°¡ À߸øµÇ¾úÀ½" @@ -5453,10 +5535,60 @@ msgstr "xdr_reference: ¸Þ¸ð¸® ºÎÁ·\n" msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: ¸Þ¸ð¸® ºÎÁ·\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: È£½ºÆ®¸¦ ³×Æ®À̸§À¸·Î ¹Ù²Ü ¼ö ¾ø½À´Ï´Ù\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: ¼­¹ö ÁÖ¼Ò¸¦ ¾òÀ» ¼ö ¾ø½À´Ï´Ù\n" + +#~ msgid "%s: Error writing " +#~ msgstr "%s: ¾²´Â µµÁß ¿À·ù ¹ß»ý" + +#~ msgid "CDS" +#~ msgstr "CDS" + +#~ msgid "DNANS" +#~ msgstr "DNANS" + +#~ msgid "DNS" +#~ msgstr "DNS" + +#~ msgid "IVY" +#~ msgstr "IVY" + +#~ msgid "NIS" +#~ msgstr "NIS" + +#~ msgid "SUNYP" +#~ msgstr "SUNYP" + +#~ msgid "X500" +#~ msgstr "X500" + +#~ msgid "XCHS" +#~ msgstr "XCHS" + +#~ # ¹ø¿ª: capability´Â DB¿¡¼­ authenticationÀ» ÁÙÀ̱â À§ÇØ ¾²´Â °Í.. +#~ # °¡±î¿î DBÃ¥ ÂüÁ¶. +#~ msgid "cannot create capability list" +#~ msgstr "ÄÉÀÌÆÛºô¸®Æ¼ ¸®½ºÆ®¸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù" + +#~ msgid "cannot load shared object file" +#~ msgstr "µ¿Àû ¿ÀºêÁ§Æ® ÆÄÀÏÀ» ÀоîµéÀÏ ¼ö ¾ø½À´Ï´Ù" + +#~ msgid "cannot read locale directory `%s'" +#~ msgstr "·ÎÄÉÀÏ µð·ºÅ丮 `%s'¸¦ ÀÐÀ» ¼ö ¾ø½À´Ï´Ù" + +#~ msgid "fcntl: F_SETFD" +#~ msgstr "fcntl: F_SETFD" + +#~ msgid "neither original nor target encoding specified" +#~ msgstr "¿ø ÀÎÄÚµù°ú Ãâ·Â ÀÎÄÚµù ¸ðµÎ ÁöÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù" + +#~ msgid "original encoding not specified using `-f'" +#~ msgstr "`-f'¸¦ »ç¿ëÇÑ ¿ø ÀÎÄÚµùÀÌ ÁöÁ¤µÇÁö ¾Ê¾ÒÀ½" + +#~ msgid "target encoding not specified using `-t'" +#~ msgstr "`-t'¸¦ »ç¿ëÇÑ Ãâ·Â ÀÎÄÚµù ÁöÁ¤ÀÌ ¾ø½À´Ï´Ù" diff -durpN glibc-2.2.4/po/libc.pot glibc-2.2.5/po/libc.pot --- glibc-2.2.4/po/libc.pot Wed Aug 15 18:50:11 2001 +++ glibc-2.2.5/po/libc.pot Fri Aug 17 13:03:49 2001 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: libc 2.2.4\n" -"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"POT-Creation-Date: 2001-08-17 13:03-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+DIST\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -300,17 +300,17 @@ msgstr "" msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "" -#: assert/assert.c:52 +#: assert/assert.c:54 #, c-format msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n" msgstr "" -#: assert/assert-perr.c:54 +#: assert/assert-perr.c:56 #, c-format msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n" msgstr "" -#: stdio-common/psignal.c:48 +#: stdio-common/psignal.c:62 #, c-format msgid "%s%sUnknown signal %d\n" msgstr "" @@ -624,7 +624,7 @@ msgstr "" msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "" -#: posix/getopt.c:788 +#: posix/getopt.c:887 posix/getopt.c:890 #, c-format msgid "%s: illegal option -- %c\n" msgstr "" @@ -660,7 +660,7 @@ msgstr "" msgid "%s: invalid number of sorting rules" msgstr "" -#: posix/getopt.c:791 +#: posix/getopt.c:896 posix/getopt.c:899 #, c-format msgid "%s: invalid option -- %c\n" msgstr "" @@ -685,6 +685,46 @@ msgstr "" msgid "%s: language abbreviation `%s' not defined" msgstr "" +#: resolv/res_hconf.c:366 +#, c-format +msgid "%s: line %d: bad command `%s'\n" +msgstr "" + +#: resolv/res_hconf.c:165 +#, c-format +msgid "%s: line %d: cannot specify more than %d services" +msgstr "" + +#: resolv/res_hconf.c:231 +#, c-format +msgid "%s: line %d: cannot specify more than %d trim domains" +msgstr "" + +#: resolv/res_hconf.c:319 +#, c-format +msgid "%s: line %d: expected `on' or `off', found `%s'\n" +msgstr "" + +#: resolv/res_hconf.c:147 +#, c-format +msgid "%s: line %d: expected service, found `%s'\n" +msgstr "" + +#: resolv/res_hconf.c:395 +#, c-format +msgid "%s: line %d: ignoring trailing garbage `%s'\n" +msgstr "" + +#: resolv/res_hconf.c:256 +#, c-format +msgid "%s: line %d: list delimiter not followed by domain" +msgstr "" + +#: resolv/res_hconf.c:191 +#, c-format +msgid "%s: line %d: list delimiter not followed by keyword" +msgstr "" + #: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 #: locale/programs/ld-collate.c:3716 #, c-format @@ -746,37 +786,39 @@ msgstr "" msgid "%s: numeric country code `%d' not valid" msgstr "" -#: posix/getopt.c:711 +#: posix/getopt.c:743 posix/getopt.c:748 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "" -#: posix/getopt.c:681 +#: posix/getopt.c:688 posix/getopt.c:698 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "" -#: posix/getopt.c:729 posix/getopt.c:902 +#: posix/getopt.c:782 posix/getopt.c:793 posix/getopt.c:1070 +#: posix/getopt.c:1082 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "" -#: posix/getopt.c:706 +#: posix/getopt.c:730 posix/getopt.c:734 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "" -#: posix/getopt.c:886 +#: posix/getopt.c:1038 posix/getopt.c:1049 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "" -#: posix/getopt.c:868 +#: posix/getopt.c:1004 posix/getopt.c:1014 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "" -#: posix/getopt.c:821 posix/getopt.c:951 +#: posix/getopt.c:942 posix/getopt.c:952 posix/getopt.c:1136 +#: posix/getopt.c:1147 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "" @@ -964,12 +1006,12 @@ msgstr "" msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "" -#: posix/getopt.c:762 +#: posix/getopt.c:841 posix/getopt.c:844 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "" -#: posix/getopt.c:758 +#: posix/getopt.c:830 posix/getopt.c:833 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "" @@ -1055,7 +1097,7 @@ msgstr "" msgid "(Unknown object)\n" msgstr "" -#: sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:133 #, c-format msgid "(unknown authentication error - %d)" msgstr "" @@ -1089,12 +1131,12 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "" -#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 +#: sunrpc/clnt_perr.c:119 sunrpc/clnt_perr.c:140 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:126 msgid "; why = " msgstr "" @@ -1211,7 +1253,7 @@ msgstr "" msgid "Attempting to link in too many shared libraries" msgstr "" -#: sunrpc/clnt_perr.c:338 +#: sunrpc/clnt_perr.c:354 msgid "Authentication OK" msgstr "" @@ -1514,7 +1556,7 @@ msgstr "" msgid "Child exited" msgstr "" -#: sunrpc/clnt_perr.c:357 +#: sunrpc/clnt_perr.c:373 msgid "Client credential too weak" msgstr "" @@ -1939,7 +1981,7 @@ msgstr "" msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "" -#: sunrpc/clnt_perr.c:365 +#: sunrpc/clnt_perr.c:381 msgid "Failed (unspecified error)" msgstr "" @@ -2268,27 +2310,27 @@ msgstr "" msgid "Invalid argument" msgstr "" -#: posix/regex.c:1380 +#: posix/regex.c:1384 msgid "Invalid back reference" msgstr "" -#: posix/regex.c:1374 +#: posix/regex.c:1378 msgid "Invalid character class name" msgstr "" -#: sunrpc/clnt_perr.c:341 +#: sunrpc/clnt_perr.c:357 msgid "Invalid client credential" msgstr "" -#: sunrpc/clnt_perr.c:349 +#: sunrpc/clnt_perr.c:365 msgid "Invalid client verifier" msgstr "" -#: posix/regex.c:1371 +#: posix/regex.c:1375 msgid "Invalid collation character" msgstr "" -#: posix/regex.c:1392 +#: posix/regex.c:1396 msgid "Invalid content of \\{\\}" msgstr "" @@ -2313,15 +2355,15 @@ msgstr "" msgid "Invalid or incomplete multibyte or wide character" msgstr "" -#: posix/regex.c:1401 +#: posix/regex.c:1405 msgid "Invalid preceding regular expression" msgstr "" -#: posix/regex.c:1395 +#: posix/regex.c:1399 msgid "Invalid range end" msgstr "" -#: posix/regex.c:1368 +#: posix/regex.c:1372 msgid "Invalid regular expression" msgstr "" @@ -2333,7 +2375,7 @@ msgstr "" msgid "Invalid request descriptor" msgstr "" -#: sunrpc/clnt_perr.c:361 +#: sunrpc/clnt_perr.c:377 msgid "Invalid server verifier" msgstr "" @@ -2460,7 +2502,7 @@ msgstr "" msgid "Memory allocation failure" msgstr "" -#: posix/regex.c:1398 +#: posix/regex.c:1402 msgid "Memory exhausted" msgstr "" @@ -2678,7 +2720,7 @@ msgstr "" msgid "No locks available" msgstr "" -#: posix/regex.c:1365 +#: posix/regex.c:1369 msgid "No match" msgstr "" @@ -2695,7 +2737,7 @@ msgstr "" msgid "No more records in map database" msgstr "" -#: posix/regex.c:7919 +#: posix/regex.c:7956 msgid "No previous regular expression" msgstr "" @@ -3027,7 +3069,7 @@ msgstr "" msgid "Power failure" msgstr "" -#: posix/regex.c:1404 +#: posix/regex.c:1408 msgid "Premature end of regular expression" msgstr "" @@ -3144,79 +3186,79 @@ msgstr "" msgid "RPC version wrong" msgstr "" -#: sunrpc/clnt_perr.c:278 +#: sunrpc/clnt_perr.c:284 msgid "RPC: (unknown error code)" msgstr "" -#: sunrpc/clnt_perr.c:197 +#: sunrpc/clnt_perr.c:203 msgid "RPC: Authentication error" msgstr "" -#: sunrpc/clnt_perr.c:177 +#: sunrpc/clnt_perr.c:183 msgid "RPC: Can't decode result" msgstr "" -#: sunrpc/clnt_perr.c:173 +#: sunrpc/clnt_perr.c:179 msgid "RPC: Can't encode arguments" msgstr "" -#: sunrpc/clnt_perr.c:237 +#: sunrpc/clnt_perr.c:243 msgid "RPC: Failed (unspecified error)" msgstr "" -#: sunrpc/clnt_perr.c:193 +#: sunrpc/clnt_perr.c:199 msgid "RPC: Incompatible versions of RPC" msgstr "" -#: sunrpc/clnt_perr.c:229 +#: sunrpc/clnt_perr.c:235 msgid "RPC: Port mapper failure" msgstr "" -#: sunrpc/clnt_perr.c:209 +#: sunrpc/clnt_perr.c:215 msgid "RPC: Procedure unavailable" msgstr "" -#: sunrpc/clnt_perr.c:233 +#: sunrpc/clnt_perr.c:239 msgid "RPC: Program not registered" msgstr "" -#: sunrpc/clnt_perr.c:201 +#: sunrpc/clnt_perr.c:207 msgid "RPC: Program unavailable" msgstr "" -#: sunrpc/clnt_perr.c:205 +#: sunrpc/clnt_perr.c:211 msgid "RPC: Program/version mismatch" msgstr "" -#: sunrpc/clnt_perr.c:217 +#: sunrpc/clnt_perr.c:223 msgid "RPC: Remote system error" msgstr "" -#: sunrpc/clnt_perr.c:213 +#: sunrpc/clnt_perr.c:219 msgid "RPC: Server can't decode arguments" msgstr "" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:176 msgid "RPC: Success" msgstr "" -#: sunrpc/clnt_perr.c:189 +#: sunrpc/clnt_perr.c:195 msgid "RPC: Timed out" msgstr "" -#: sunrpc/clnt_perr.c:185 +#: sunrpc/clnt_perr.c:191 msgid "RPC: Unable to receive" msgstr "" -#: sunrpc/clnt_perr.c:181 +#: sunrpc/clnt_perr.c:187 msgid "RPC: Unable to send" msgstr "" -#: sunrpc/clnt_perr.c:221 +#: sunrpc/clnt_perr.c:227 msgid "RPC: Unknown host" msgstr "" -#: sunrpc/clnt_perr.c:225 +#: sunrpc/clnt_perr.c:231 msgid "RPC: Unknown protocol" msgstr "" @@ -3248,7 +3290,7 @@ msgstr "" msgid "Real-time signal %d" msgstr "" -#: posix/regex.c:1407 +#: posix/regex.c:1411 msgid "Regular expression too big" msgstr "" @@ -3390,11 +3432,11 @@ msgstr "" msgid "Server out of memory" msgstr "" -#: sunrpc/clnt_perr.c:345 +#: sunrpc/clnt_perr.c:361 msgid "Server rejected credential" msgstr "" -#: sunrpc/clnt_perr.c:353 +#: sunrpc/clnt_perr.c:369 msgid "Server rejected verifier" msgstr "" @@ -3492,7 +3534,7 @@ msgstr "" msgid "Structure needs cleaning" msgstr "" -#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1366 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "" @@ -3653,7 +3695,7 @@ msgstr "" msgid "Trace/breakpoint trap" msgstr "" -#: posix/regex.c:1377 +#: posix/regex.c:1381 msgid "Trailing backslash" msgstr "" @@ -3685,6 +3727,11 @@ msgstr "" msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "" +#: inet/rcmd.c:223 +#, c-format +msgid "Trying %s...\n" +msgstr "" + #: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" @@ -3774,7 +3821,7 @@ msgstr "" msgid "Unknown signal %d" msgstr "" -#: misc/error.c:113 timezone/zic.c:390 +#: misc/error.c:117 timezone/zic.c:390 msgid "Unknown system error" msgstr "" @@ -3782,19 +3829,19 @@ msgstr "" msgid "Unknown ypbind error" msgstr "" -#: posix/regex.c:1386 +#: posix/regex.c:1390 msgid "Unmatched ( or \\(" msgstr "" -#: posix/regex.c:1410 +#: posix/regex.c:1414 msgid "Unmatched ) or \\)" msgstr "" -#: posix/regex.c:1383 +#: posix/regex.c:1387 msgid "Unmatched [ or [^" msgstr "" -#: posix/regex.c:1389 +#: posix/regex.c:1393 msgid "Unmatched \\{" msgstr "" @@ -3993,11 +4040,12 @@ msgstr "" msgid "argument to `%s' must be a single character" msgstr "" -#: sunrpc/auth_unix.c:311 +#: sunrpc/auth_unix.c:322 msgid "auth_none.c - Fatal marshalling problem" msgstr "" -#: sunrpc/auth_unix.c:106 sunrpc/auth_unix.c:112 sunrpc/auth_unix.c:142 +#: sunrpc/auth_unix.c:114 sunrpc/auth_unix.c:117 sunrpc/auth_unix.c:150 +#: sunrpc/auth_unix.c:153 msgid "authunix_create: out of memory\n" msgstr "" @@ -4006,7 +4054,7 @@ msgstr "" msgid "bad argument" msgstr "" -#: inet/rcmd.c:425 +#: inet/rcmd.c:514 msgid "bad owner" msgstr "" @@ -4034,15 +4082,15 @@ msgstr "" msgid "broadcast: ioctl (get interface flags)" msgstr "" -#: sunrpc/svc_udp.c:528 +#: sunrpc/svc_udp.c:541 msgid "cache_set: could not allocate new rpc_buffer" msgstr "" -#: sunrpc/svc_udp.c:522 +#: sunrpc/svc_udp.c:535 msgid "cache_set: victim alloc failed" msgstr "" -#: sunrpc/svc_udp.c:511 +#: sunrpc/svc_udp.c:524 msgid "cache_set: victim not found" msgstr "" @@ -4050,7 +4098,7 @@ msgstr "" msgid "can't determine time zone abbreviation to use just after until time" msgstr "" -#: sunrpc/svc_simple.c:85 +#: sunrpc/svc_simple.c:88 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "" @@ -4173,7 +4221,7 @@ msgstr "" msgid "cannot map zero-fill pages" msgstr "" -#: inet/rcmd.c:421 +#: inet/rcmd.c:510 msgid "cannot open" msgstr "" @@ -4344,18 +4392,23 @@ msgstr "" msgid "clnt_raw.c - Fatal header serialization error." msgstr "" -#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 +#: sunrpc/clnt_tcp.c:134 sunrpc/clnt_tcp.c:137 msgid "clnttcp_create: out of memory\n" msgstr "" -#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 +#: sunrpc/clnt_udp.c:141 sunrpc/clnt_udp.c:144 msgid "clntudp_create: out of memory\n" msgstr "" -#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 +#: sunrpc/clnt_unix.c:131 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "" +#: inet/rcmd.c:209 +#, c-format +msgid "connect to address %s: " +msgstr "" + #: sunrpc/rpc_scan.c:116 msgid "constant or identifier expected" msgstr "" @@ -4377,11 +4430,11 @@ msgstr "" msgid "conversion stopped due to problem in writing the output" msgstr "" -#: sunrpc/svc_simple.c:93 +#: sunrpc/svc_simple.c:97 msgid "couldn't create an rpc server\n" msgstr "" -#: sunrpc/svc_simple.c:101 +#: sunrpc/svc_simple.c:105 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "" @@ -4443,19 +4496,19 @@ msgstr "" msgid "empty dynamics string token substitution" msgstr "" -#: sunrpc/svc_udp.c:454 +#: sunrpc/svc_udp.c:467 msgid "enablecache: cache already enabled" msgstr "" -#: sunrpc/svc_udp.c:460 +#: sunrpc/svc_udp.c:473 msgid "enablecache: could not allocate cache" msgstr "" -#: sunrpc/svc_udp.c:468 +#: sunrpc/svc_udp.c:481 msgid "enablecache: could not allocate cache data" msgstr "" -#: sunrpc/svc_udp.c:475 +#: sunrpc/svc_udp.c:488 msgid "enablecache: could not allocate cache fifo" msgstr "" @@ -4548,7 +4601,7 @@ msgstr "" msgid "file too short" msgstr "" -#: inet/rcmd.c:423 +#: inet/rcmd.c:512 msgid "fstat failed" msgstr "" @@ -4585,7 +4638,7 @@ msgstr "" msgid "hard link failed, symbolic link used" msgstr "" -#: inet/rcmd.c:429 +#: inet/rcmd.c:518 msgid "hard linked somewhere" msgstr "" @@ -4790,7 +4843,7 @@ msgstr "" msgid "locale name should consist only of portable characters" msgstr "" -#: inet/rcmd.c:414 +#: inet/rcmd.c:503 msgid "lstat failed" msgstr "" @@ -4826,7 +4879,8 @@ msgstr "" msgid "memory clobbered past end of allocated block\n" msgstr "" -#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:489 malloc/obstack.c:493 +#: posix/getconf.c:996 msgid "memory exhausted" msgstr "" @@ -4878,7 +4932,7 @@ msgstr "" msgid "netname2user: should not have uid 0" msgstr "" -#: sunrpc/svc_simple.c:168 +#: sunrpc/svc_simple.c:183 #, c-format msgid "never registered prog %d\n" msgstr "" @@ -4939,7 +4993,7 @@ msgstr "" msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "" -#: inet/rcmd.c:416 +#: inet/rcmd.c:505 msgid "not regular file" msgstr "" @@ -4984,11 +5038,15 @@ msgstr "" msgid "output file" msgstr "" +#: posix/../sysdeps/generic/wordexp.c:1801 +msgid "parameter null or not set" +msgstr "" + #: sunrpc/pm_getmaps.c:74 msgid "pmap_getmaps rpc problem" msgstr "" -#: inet/rcmd.c:234 +#: inet/rcmd.c:293 msgid "poll: protocol failure in circuit setup\n" msgstr "" @@ -5034,26 +5092,26 @@ msgstr "" msgid "program %lu version %lu ready and waiting\n" msgstr "" -#: inet/rcmd.c:271 +#: inet/rcmd.c:354 #, c-format msgid "rcmd: %s: short read" msgstr "" -#: inet/rcmd.c:231 +#: inet/rcmd.c:290 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "" -#: inet/rcmd.c:159 +#: inet/rcmd.c:172 inet/rcmd.c:175 msgid "rcmd: socket: All ports in use\n" msgstr "" -#: inet/rcmd.c:221 +#: inet/rcmd.c:270 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "" -#: sunrpc/svc_simple.c:108 +#: sunrpc/svc_simple.c:112 msgid "registerrpc: out of memory\n" msgstr "" @@ -5129,7 +5187,7 @@ msgstr "" msgid "short write in %s: %s" msgstr "" -#: inet/rcmd.c:261 +#: inet/rcmd.c:335 msgid "socket: protocol failure in circuit setup\n" msgstr "" @@ -5161,51 +5219,51 @@ msgstr "" msgid "svc_run: - poll failed" msgstr "" -#: sunrpc/svc_tcp.c:170 +#: sunrpc/svc_tcp.c:171 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "" -#: sunrpc/svc_tcp.c:155 +#: sunrpc/svc_tcp.c:156 msgid "svc_tcp.c - tcp socket creation problem" msgstr "" -#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 +#: sunrpc/svc_tcp.c:224 sunrpc/svc_tcp.c:227 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "" -#: sunrpc/svc_unix.c:146 +#: sunrpc/svc_unix.c:150 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "" -#: sunrpc/svc_unix.c:162 +#: sunrpc/svc_unix.c:166 msgid "svc_unix.c - cannot getsockname or listen" msgstr "" -#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 +#: sunrpc/svc_unix.c:220 sunrpc/svc_unix.c:223 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "" -#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 +#: sunrpc/svc_tcp.c:182 sunrpc/svc_tcp.c:185 msgid "svctcp_create: out of memory\n" msgstr "" -#: sunrpc/svc_udp.c:141 +#: sunrpc/svc_udp.c:143 msgid "svcudp_create - cannot getsockname" msgstr "" -#: sunrpc/svc_udp.c:149 sunrpc/svc_udp.c:155 sunrpc/svc_udp.c:161 +#: sunrpc/svc_udp.c:155 sunrpc/svc_udp.c:158 msgid "svcudp_create: out of memory\n" msgstr "" -#: sunrpc/svc_udp.c:127 +#: sunrpc/svc_udp.c:129 msgid "svcudp_create: socket creation problem" msgstr "" -#: sunrpc/svc_udp.c:177 +#: sunrpc/svc_udp.c:179 sunrpc/svc_udp.c:182 msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "" -#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 +#: sunrpc/svc_unix.c:178 sunrpc/svc_unix.c:181 msgid "svcunix_create: out of memory\n" msgstr "" @@ -5312,7 +5370,7 @@ msgstr "" msgid "trailing garbage at end of line" msgstr "" -#: sunrpc/svc_simple.c:160 +#: sunrpc/svc_simple.c:175 #, c-format msgid "trouble replying to prog %d\n" msgstr "" @@ -5470,7 +5528,7 @@ msgstr "" msgid "write incomplete" msgstr "" -#: inet/rcmd.c:427 +#: inet/rcmd.c:516 msgid "writeable by other than owner" msgstr "" @@ -5498,11 +5556,23 @@ msgstr "" msgid "wrong number of fields on Zone line" msgstr "" -#: sunrpc/xdr_ref.c:85 +#: sunrpc/xdr_array.c:106 sunrpc/xdr_array.c:109 +msgid "xdr_array: out of memory\n" +msgstr "" + +#: sunrpc/xdr.c:558 sunrpc/xdr.c:561 +msgid "xdr_bytes: out of memory\n" +msgstr "" + +#: sunrpc/xdr_ref.c:89 sunrpc/xdr_ref.c:92 msgid "xdr_reference: out of memory\n" msgstr "" -#: sunrpc/xdr_rec.c:151 sunrpc/xdr_rec.c:166 +#: sunrpc/xdr.c:710 sunrpc/xdr.c:713 +msgid "xdr_string: out of memory\n" +msgstr "" + +#: sunrpc/xdr_rec.c:155 sunrpc/xdr_rec.c:158 msgid "xdrrec_create: out of memory\n" msgstr "" Binary files glibc-2.2.4/po/sk.mo and glibc-2.2.5/po/sk.mo differ diff -durpN glibc-2.2.4/po/sk.po glibc-2.2.5/po/sk.po --- glibc-2.2.4/po/sk.po Mon Jul 23 10:54:58 2001 +++ glibc-2.2.5/po/sk.po Sun Oct 21 10:33:45 2001 @@ -1,85 +1,91 @@ # Slovak translation of the GNU-libc-messages. # Copyright (C) 1998 Free Software Foundation, Inc. -# Stanislav Meduna , 1998. +# Stanislav Meduna , 1998-2001. # msgid "" msgstr "" -"Project-Id-Version: libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-06-05 17:57+02:00\n" -"Last-Translator: Stanislav Meduna \n" -"Language-Team: Slovak \n" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-10-21 18:00+02:00\n" +"Last-Translator: Stanislav Meduna \n" +"Language-Team: Slovak \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: hodnoty poµa `%s' musia by» z rozsahu %d...%d" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tPrístupové práva : " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tAtribúty : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dnázov[=hodnota]] [-i veµkos»] [-I [-K sekundy]] [-Y cesta] vst_súbor\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o výst_súbor] [vst_súbor]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n netid]* [-o výst_súbor] [vst_súbor]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s nettype]* [-o výst_súbor] [vst_súbor]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tPrístupové práva: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tVstupné údaje typu %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNázov : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tVerejný kµúè : " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tTyp : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tUniverzálne adresy (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNázov : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u bajtov] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -109,11 +115,11 @@ msgstr "" "%15ld%% úspe¹nos» cache\n" "%15s skontrolujte /etc/%s na zmeny\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\nÈlenovia skupín :\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\n®ivotnos» : " @@ -141,7 +147,7 @@ msgstr " nie" msgid " yes" msgstr " áno" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Då¾ka údajov = %u\n" @@ -198,15 +204,15 @@ msgstr " program verz proto port\n" msgid " or: " msgstr " alebo: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (VYNECHANÉ)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (zmenené)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (pravidlo z \"%s\", riadok %d)" @@ -215,22 +221,22 @@ msgstr " (pravidlo z \"%s\", riadok %d)" msgid " [OPTION...]" msgstr " [VO¥BA...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", riadok %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "Riadok \"Zone %s\" a voµba -l sa navzájom vyluèujú" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "Riadok \"Zone %s\" a voµba -p sa navzájom vyluèujú" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "\"vst_súbor\" je vy¾adovaný pri pou¾ití príznakov tvorby vzoru.\n" @@ -244,58 +250,58 @@ msgstr "%.*s: Parameter ARGP_HELP_FMT vy msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Neznámy parameter ARGP_HELP_FMT" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: Definícia nekonèí `END %1$s'" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d kni¾níc nájdených v cache `%s'\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s v zóne bez pravidiel" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s je 32-bitový ELF súbor.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s je 64-bitový ELF súbor.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s je pre neznámy stroj %d.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s nie je známy typ kni¾nice" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s nie je zdieµaný objektový súbor (Typ: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s nie je symbolický odkaz\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s nie je ELF súbor - na zaèiatku obsahujé chybné magické bajty.\n" @@ -315,12 +321,12 @@ msgstr "%s%s%s:%u: %s%sNeoèakávaná chyba msgid "%s%sUnknown signal %d\n" msgstr "%s%sNeznámy signál %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: nesprávne roz¹írenie znamienka pre %d\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: musí by» väè¹ie ako \n" @@ -335,87 +341,82 @@ msgstr "%s: C preprocesor zlyhal s výstu msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: C preprocesor zlyhal so signálom %d\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: Nie je mo¾né vytvori» %s: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: Nie je mo¾né vytvori» adresár %s: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: Nie je mo¾né vytvori» prepojenie z %s na %s: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: Nie je mo¾né otvori» %s: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: Nie je mo¾né odstráni» %s: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: Nie je mo¾né zmaza» %s: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Chyba pri uzatváraní %s: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Chyba pri èítaní %s\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: Chyba pri zápise " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Chyba pri zápise %s\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: Priestupný riadok v súbore nepriestupných sekúnd %s\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Nedostatok pamäti: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Voµba -L zadaná viac ako raz\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Voµba -d zadaná viac ako raz\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Voµba -l zadaná viac ako raz\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Voµba -p zadaná viac ako raz\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Voµba -y zadaná viac ako raz\n" @@ -431,7 +432,7 @@ msgstr "%s: Priveµa argumentov\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: `%s' spomenuté viac ako raz v definícii váhy %d" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s' musí by» znak" @@ -442,7 +443,7 @@ msgstr "%s: `%s' musí by» znak" msgid "%s: `%s' value does not match `%s' value" msgstr "%s: hodnota `%s' nezodpovedá hodnote `%s'" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `-1' musí by» posledným záznamom v poli `%s'" @@ -452,100 +453,100 @@ msgstr "%s: `-1' musí by» posledným zázn msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: `forward' a `backward' sa navzájom vyluèujú" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position' musí by» pre danú úroveò pou¾itá vo v¹etkých sekciách, alebo v ¾iadnej" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: sekcia `translit_start' nekonèí `translit_end'" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: poradie bajtu prvého znaku sekvencie nie je men¹ie ako posledného" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: bajtové sekvencie prvého a posledného znaku musia ma» rovnakú då¾ku" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: `%s' nemô¾e by» koncovým znakom rozsahu pokraèovania" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: nie je mo¾né preradi» za %.*s: neznámy symbol" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: znak `%s' v znakovej mape nie je vyjadriteµný jedným bajtom" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: znak `%s' je potrebný ako prednastavená hodnota nevyjadriteµná jedným bajtom" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: znak `%s' nie je definovaný v mape znakov a je potrebný ako implicitná hodnota" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: znak `%s' nie je definovaný a je potrebný ako implicitná hodnota" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: príkaz bol '%s', výsledok bol %d\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: príznak smeru v re»azci %Zd poµa `era' nie je '+' ani '-'" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: príznak smeru v re»azci %Zd poµa `era' nie je jeden znak" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: duplicitná definícia `default_missing'" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: duplicitná definícia verzie kategórie" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: duplicitná deklarácia sekcie `%s'" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: duplicitná definícia `%s'" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: prázdny popis kategórie nie je povolený" @@ -555,19 +556,27 @@ msgstr "%s: prázdny popis kategórie nie msgid "%s: empty weight string not allowed" msgstr "%s: prázdny re»azec váhy nie je povolený" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: chyba v stavovom automate" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: pole `%s' deklarované viac ako raz" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: pole `%s' neobsahuje presne desa» polo¾iek" @@ -579,14 +588,18 @@ msgstr "%s: pole `%s' neobsahuje presne msgid "%s: field `%s' must not be empty" msgstr "%s: pole `%s' nesmie by» prázdne" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: pole `%s' nie je definované" @@ -596,39 +609,40 @@ msgstr "%s: pole `%s' nie je definované" msgid "%s: field `%s' undefined" msgstr "%s: pole `%s' nedefinované" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: smetie za koncom hodnoty posunutia v re»azci %Zd poµa `era'" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: smetie za koncom poèiatoèného dátumu v re»azci %Zd poµa `era' " -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: smetie za koncom koncového dátumu v re»azci %Zd poµa `era'" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: neprípustná voµba -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: nekompletný riadok `END'" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" -msgstr "%s: neprípustná escape `%%%x' sekvencia v poli `%s'" +msgstr "%s: neprípustná escape `%%%c' sekvencia v poli `%s'" #: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126 #: locale/programs/ld-telephone.c:150 @@ -636,27 +650,27 @@ msgstr "%s: neprípustná escape `%%%x' se msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: chybná escape-sekvencia v poli `%s'" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: neprípustné èíslo pre posunutie v re»azci %Zd poµa `era'" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: chybný poèet pravidiel triedenia" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: chybná voµba -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: neprípustný poèiatoèný dátum v re»azci %Zd poµa `era'" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: neprípustný koncový dátum v re»azci %d poµa `era'" @@ -671,38 +685,38 @@ msgstr "%s: neprípustná hodnota poµa `%s msgid "%s: language abbreviation `%s' not defined" msgstr "%s: skratka jazyka `%s' nie je definovaná" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: chýbajúce kµúèové slovo `order_end'" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: chýbajúce kµúèové slovo `reorder-end'" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: chýbajúce kµúèové slovo `reorder-sections-end'" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: chýba formát éry v re»azci %Zd v poli `era'" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: chýba meno éry v re»azci %Zd v poli `era'" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: viacnásobná definícia poradia pre sekciu `%s'" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: viacnásobná definícia poradia pre sekciu bez mena" @@ -717,7 +731,7 @@ msgstr "%s: pre pole `%s' neexistuje kor msgid "%s: no identification for category `%s'" msgstr "%s: kategória `%s' nemá identifikáciu" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: nenájdená zobraziteµná definícia `default_missing'" @@ -732,52 +746,52 @@ msgstr "%s: nedostatoèný poèet pravidiel msgid "%s: numeric country code `%d' not valid" msgstr "%s: èíselný kód krajiny `%d' nie je platný" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: voµba `%c%s' nedovoµuje pou¾i» argument\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: voµba `%s' nie je jednoznaèná\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: voµba `%s' vy¾aduje argument\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: voµba `--%s' nedovoµuje pou¾i» argument\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: voµba `-W %s' nedovoµuje pou»i» argument\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: voµba `-W %s' nie je jednoznaèná\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: voµba vy¾aduje argument -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: poradie pre `%.*s' je u¾ definované na %s:%Zu" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: poradie pre element triedenia `%.*s' e¹te nebolo definované" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: poradie pre symbol triedenia `%.*s' e¹te nebolo definované" @@ -787,84 +801,84 @@ msgstr "%s: poradie pre symbol triedenia msgid "%s: output would overwrite %s\n" msgstr "%s: výstup by prepísal %s\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: fatálna chyba: Neprípustná l_hodnota %d\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: predèasný koniec súboru" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: neznáma sekcia `%.*s'" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: neprípustný poèiatoèný dátum v re»azci %Zd v poli `era'" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: neprípustný koncový dátum v re»azci %d v poli `era'" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: pokraèovanie symbolického rozsahu nesmie by» priamo nasledované `order_end'" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: pokraèovanie symbolického rozsahu nesmie priamo nasledo» `order_start'" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: chyba syntaxe" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: chyba syntaxe v definícii novej triedy znakov" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: chyba syntaxe v definícii novej znakovej mapy" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: tabuµka triedy \"%s\": %lu bajtov\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: tabuµka mapy \"%s\": %lu bajtov\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: tabuµka ¹írky: %lu bajtov\n" @@ -874,16 +888,21 @@ msgstr "%s: tabuµka ¹írky: %lu bajtov\n" msgid "%s: terminology language code `%s' not defined" msgstr "%s: kód jazyka terminológie `%s' nie je definovaný" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: poèiatoèný a koncový symbol rozsahu musia zastupova» znaky" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: tretí operand hodnoty poµa `%s' nesmie by» väè¹í ako %d" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: príli¹ málo hodnôt poµa `%s'" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -894,7 +913,12 @@ msgstr "%s: priveµa pravidiel; prvý zázn msgid "%s: too many values" msgstr "%s: priveµa hodnôt" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: priveµa hodnôt poµa `%s'" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: transliteraèné údaje prostredia `%s' nie sú dostupné" @@ -904,47 +928,52 @@ msgstr "%s: transliteraèné údaje prostre msgid "%s: unable to open %s: %m\n" msgstr "%s: nie je mo¾né otvori» %s: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: neznámy znak v názve symbolu triedenia" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: neznámy znak v názve ekvivalentnej definície" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: neznámy znak v hodnote ekvivalentnej definície" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: neznámy znak v poli `%s'" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: neznámy názov sekcie `%s'" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: neznámy symbol `%s' v ekvivalentnej definícii" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: nerozpoznaná voµba `%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: nerozpoznaná voµba `--%s'\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -958,6 +987,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: Pou¾itie: %s [ -v ] [ -c limit ] meno_zóny ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: hodnota poµa `%s' musí by» jeden znak" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: hodnota poµa `%s' musí by» z rozsahu %d...%d" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -978,17 +1017,17 @@ msgstr "%s: hodnota poµa `int_curr_symbo msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: hodnota poµa `int_curr_symbol' má chybnú då¾ku" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: hodnoty poµa `%s' musia by» men¹ie ako 127" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: hodnoty poµa `%s' nesmú by» väè¹ie ako %d" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: hodnoty poµa `%s' nesmú by» väè¹ie ako %d" @@ -1011,11 +1050,11 @@ msgstr "(CHYBA PROGRAMU) Verzia neznáma! msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(CHYBA PROGRAMU) Voµba by mala by» rozpoznaná!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Neznámy objekt)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(neznáma chyba pri overovaní toto¾nosti - %d)" @@ -1033,6 +1072,11 @@ msgstr "*** Zo súboru `%s' boli odstráne msgid "*standard input*" msgstr "*¹tandardný vstup*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1046,16 +1090,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "Po¹kodená sekcia .lib v a.out" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; ni¾¹ia verzia = %lu, vy¹¹ia verzia = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; dôvod = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> and <%s> sú neprípustné názvy pre rozsah" @@ -1065,12 +1109,12 @@ msgstr "<%s> and <%s> sú neprípustné náz msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> a <%s> sú neprípustné názvy pre rozsah" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr " znak nesmie by» v triede `%s'" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr " znak nie je v triede `%s'" @@ -1086,7 +1130,7 @@ msgstr "?" msgid "Aborted" msgstr "Zru¹ené" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Prístupové práva : " @@ -1124,6 +1168,10 @@ msgstr "Chyba pri zverejnení" msgid "Alarm clock" msgstr "Budík" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "V¹etky po¾iadavky vykonané" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Vykreslí aj graf celkovej spotreby pamäti" @@ -1132,7 +1180,7 @@ msgstr "Vykreslí aj graf celkovej spotre msgid "Anode table overflow" msgstr "Preteèenie tabuµky anode" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "Iný re»azec pre testovanie." @@ -1164,7 +1212,7 @@ msgstr "Pokus o pou¾itie viac zdieµaných msgid "Attempting to link in too many shared libraries" msgstr "Pokus o pou¾itie priveµa zdieµaných kni¾níc" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Overenie práv úspe¹né" @@ -1173,7 +1221,7 @@ msgstr "Overenie práv úspe¹né" msgid "Authentication error" msgstr "Overenie práv neúspe¹né" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "POCHYBNÝ OBJEKT\n" @@ -1228,7 +1276,7 @@ msgstr "Chybná hodnota ai_flags" msgid "Be strictly POSIX conform" msgstr "Presný súlad s POSIX" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Binárne údaje\n" @@ -1260,10 +1308,6 @@ msgstr "Preru¹ená rúra" msgid "Bus error" msgstr "Chyba na zbernici" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Prekroèený èasový limit pre procesor" @@ -1281,77 +1325,82 @@ msgstr "Prístup k potrebnej zdieµanej kn msgid "Can not exec a shared library directly" msgstr "Nie je mo¾né priamo spusti» zdieµanú kni¾nicu" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Pripojenie k serveru obsluhujúcemu túto doménu nie je mo¾né" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "Nie je mo¾né zmeni» adresár na /" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "Komunikácia s portmapperom nie je mo¾ná" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "Komunikácia s ypbind nie je mo¾ná" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "Komunikácia s ypserv nie je mo¾ná" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "Nie je mo¾né vytvori» doèasný cache súbor %s" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "Nie je mo¾né nájs» %s" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "Nie je mo¾né vytvori» odkaz %s na %s" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "Zlyhal lstat %s" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "Nie je mo¾né otvori» cache súbor %s\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "Nie je mo¾né otvori» adresár cache súboru %s\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "Nie je mo¾né otvori» konfiguraèný súbor %s" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "Nie je mo¾né otvori» adresár %s" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "Nie je mo¾né zmaza» doèasný cache súbor %s" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "Zlyhal stat %s" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "Zlyhal stat %s\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "Nie je mo¾né odstráni» %s" @@ -1378,16 +1427,21 @@ msgstr "Nie je mo¾né vytvori» zásuvku pr msgid "Cannot exec a shared library directly" msgstr "Nie je mo¾né priamo spusti» zdieµanú kni¾nicu" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "Nie je mo¾né vykona» fstat() súboru %s.\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "Nie je mo¾né pou¾i» viac ako jeden príznak tvorby súboru!\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "Zlyhal lstat %s" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "Nie je mo¾né mmap-ova» súbor %s.\n" @@ -1421,33 +1475,38 @@ msgstr "Nie je mo¾né nastavi» pre socket msgid "Cannot specify more than one input file!\n" msgstr "Nie je mo¾né zada» viac ako jeden vstupný súbor!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "Zlyhal stat %s" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "Príznaky netid a inetd nie je mo¾né pou¾i» súèasne!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "Nie je mo¾né pou¾i» príznak netid bez TIRPC!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "Pri pou¾ití nového ¹týlu nie je mo¾né pou¾i» príznaky tabuµky!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Zmeni» adresár na ROOT a pou¾i» ho ako koreòový adresár" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "Zmena prístupových práv %s na 0644 zlyhala" +msgid "Changing access rights of %s to %#o failed" +msgstr "Zmena prístupových práv %s na %#o zlyhala" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Èíslo kanálu mimo povoleného rozsahu" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Oddeµovaè znakov : %c\n" @@ -1456,11 +1515,11 @@ msgstr "Oddeµovaè znakov : %c\n" msgid "Child exited" msgstr "Detský proces skonèil" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Oprávnenia klienta sú nepostaèujúce" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Ståpce :\n" @@ -1478,7 +1537,7 @@ msgstr "Kompilácia ¹pecifikácie národnéh msgid "Computer bought the farm" msgstr "Poèítaè kúpil farmu" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Konfigurácia runtime väzieb dynamického linkera." @@ -1508,14 +1567,14 @@ msgstr "Èasový limit pre spojenie vypr¹a msgid "Continued" msgstr "Pokraèovanie" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Konverzia kódovania zadaných súborov na iné." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1535,6 +1594,10 @@ msgstr "Nie je mo¾né vytvori» ¾urnálový msgid "Create C header file NAME containing symbol definitions" msgstr "Vytvori» C hlavièkový súbor NÁZOV obsahujúci definície symbolov" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Nie je mo¾né rýchlo naèíta» konfiguraèný súbor iconv modulu." + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Vytvori» tabuµky na starý spôsob" @@ -1543,7 +1606,7 @@ msgstr "Vytvori» tabuµky na starý spôsob msgid "Create output even if warning messages were issued" msgstr "Vytvori» výstupný súbor aj pri výskyte varovaní" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Èas vytvorenia : %s" @@ -1562,19 +1625,11 @@ msgstr "DÁTOVÝ_SÚBOR [VÝSTUPNÝ_SÚBOR]" msgid "DES entry for netname %s not unique\n" msgstr "DES záznam pre sie»ový názov %s nie je jednoznaèný\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "ADRESÁR\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "DST nie je pre SUID/SGID programy povolené" @@ -1586,7 +1641,7 @@ msgstr "CHYBA V DYNAMICKOM LINKERI!!!" msgid "Database for table does not exist" msgstr "Databáza pre tabuµku neexistuje" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "Databáza je pou¾ívaná" @@ -1594,7 +1649,7 @@ msgstr "Databáza je pou¾ívaná" msgid "Deadlock situation detected/avoided" msgstr "Bol detekovaný a znemo¾nený deadlock" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Implicitné príst. práva :\n" @@ -1621,12 +1676,12 @@ msgstr "Zariadenie nie je prúd" msgid "Device or resource busy" msgstr "Zariadenie alebo iný zdroj je pou¾ívané" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bitov)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Adresár : %s\n" @@ -1655,15 +1710,15 @@ msgstr "Nespú¹»a» samostatný proces a zo msgid "Do not use existing catalog, force new output file" msgstr "Nepou¾íva» existujúci katalóg, vnúti» nový výstupný súbor" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "Doména nie je pripojená" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "Nevytvori» cache" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "Negenerova» odkazy" @@ -1671,31 +1726,31 @@ msgstr "Negenerova» odkazy" msgid "Dump information generated by PC profiling." msgstr "Vypísa» informáciu získanú profilovaním PC." -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "Neplatná verzia ABI ELF súboru" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "Neplatný OS ABI ELF súboru" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "Verzia súboru ELF sa nezhoduje s aktuálnou" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "Identifikácia verzie ELF súboru sa nezhoduje s aktuálnou" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "phentsize ELF súboru nie je oèakávaná" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "ELF zavádzacia adresa/posunutie nie je správne zarovnaná" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "ELF zarovnanie príkazu nie je zarovnané na stránku" @@ -1703,11 +1758,11 @@ msgstr "ELF zarovnanie príkazu nie je za msgid "EMT trap" msgstr "EMT preru¹enie" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "ZÁZNAM\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "©ifrované údaje\n" @@ -1861,7 +1916,11 @@ msgstr "Chyba v neznámom chybovom systém msgid "Error while talking to callback proc" msgstr "Chyba poèas komunikácie s procedúrou spätného volania" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Chyba pri zápise na ¹tandardný výstup" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Chyba: súbor .netrc je èitateµný pre ostatných." @@ -1884,7 +1943,7 @@ msgstr "FATÁLNA CHYBA: systém nedefinuje msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "SÚBOR obsahuje mapovanie symbolických názvov na UCS4 hodnoty" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Zlyhalo (ne¹pecifikovaná chyba)" @@ -1893,7 +1952,7 @@ msgstr "Zlyhalo (ne¹pecifikovaná chyba)" msgid "Failed to look up user '%s' to run server as" msgstr "Nepodarilo sa vyhµada» pou¾ívateµa '%s', pod ktorým má server be¾a»" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "Súbor %s je príli¹ krátky, neskontrolovaný." @@ -1910,7 +1969,7 @@ msgstr "Deskriptor súboru v chybnom stav msgid "File exists" msgstr "Súbor existuje" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "Súbor nie je cache súborom.\n" @@ -1944,7 +2003,7 @@ msgstr "Preteèenie tabuµky súborov" msgid "File too large" msgstr "Súbor je príli¹ veµký" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Prvý testovací re»azec." @@ -1956,7 +2015,7 @@ msgstr "Preru¹ené zre»azenie prvý/ïal¹í" msgid "Floating point exception" msgstr "Výnimka pohyblivej rádovej èiarky" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Pou¾i» formát: nový (new), starý (old) alebo kompatibilný (compat - prednastavené)" @@ -1973,7 +2032,7 @@ msgstr "Adresár vy¾aduje úplnú resynchro msgid "Function not implemented" msgstr "Funkcia nie je implementovaná" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "SKUPINA\n" @@ -1998,7 +2057,7 @@ msgstr "" msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "Generova» výstup lineárny s èasom (prednastavený je lineárne k poètu volaní funkcií)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Vypísova» podrobnej¹ie správy" @@ -2006,7 +2065,7 @@ msgstr "Vypísova» podrobnej¹ie správy" msgid "Generic system error" msgstr "V¹eobecná chyba systému" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Získa» informáciu ¹pecifickú pre národné prostredie." @@ -2023,12 +2082,12 @@ msgstr "Vypísa» túto pomoc" msgid "Gratuitous error" msgstr "Vïaèná chyba" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Skupina : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Príznaky skupiny :" @@ -2093,16 +2152,12 @@ msgstr "V/V mo¾ný" msgid "IOT trap" msgstr "IOT preru¹enie" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "Identifikátor odstránený" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Súbor %s ignorovaný, keï¾e nie je regulérnym súborom." @@ -2155,7 +2210,7 @@ msgstr "Nevhodná operácia pre proces v p msgid "Information request" msgstr "®iados» o informáciu" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Informácia:" @@ -2163,12 +2218,12 @@ msgstr "Informácia:" msgid "Input Files:" msgstr "Vstupné súbory:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "Vstupný súbor %s nebol nájdený.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "©pecifikácia vstupno/výstupného formátu:" @@ -2177,11 +2232,11 @@ msgstr "©pecifikácia vstupno/výstupného msgid "Input/output error" msgstr "Chyba vstupu/výstupu" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Interná chyba NIS" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Interná chyba ypbind" @@ -2189,6 +2244,10 @@ msgstr "Interná chyba ypbind" msgid "Interrupt" msgstr "Preru¹enie" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Preru¹ené signálom" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2212,27 +2271,27 @@ msgstr "Preru¹ené volanie systému by mal msgid "Invalid argument" msgstr "Neprípustný argument" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Neprípustný spätný odkaz" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Neprípustný názov triedy znakov" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Neplatné oprávnenie klienta" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Neplatné overenie klienta" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Neprípustný znak triedenia" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "Neprípustný obsah \\{\\}" @@ -2257,15 +2316,15 @@ msgstr "Neplatný objekt pre operáciu" msgid "Invalid or incomplete multibyte or wide character" msgstr "Neprípustný alebo nekompletný viacbajtový alebo ¹iroký znak" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "Neprípustný predchádzajúci regulérny výraz" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Neprípustný koniec rozsahu" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "Neprípustný regulérny výraz" @@ -2277,7 +2336,7 @@ msgstr "Neprípustný kód ¾iadosti" msgid "Invalid request descriptor" msgstr "Neprípustný deskriptor ¾iadosti" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Neplatné overenie servera" @@ -2305,7 +2364,7 @@ msgstr "Je súbor názvu" msgid "Is a named type file" msgstr "Je pomenovaný súbor typu" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2313,7 +2372,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Zabitý" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "ODKAZ\n" @@ -2356,20 +2415,20 @@ msgstr "Èíslo odkazu mimo rozsahu" msgid "Link points to illegal name" msgstr "Odkaz odkazuje na neprípustný názov" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Typ odkazovaného objektu : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Odkazuje na : %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Meno miestnej domény nie je nastavené" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Chyba pri pridelení miestnych zdrojov" @@ -2386,11 +2445,11 @@ msgstr "Chybne formovaný alebo neprípust msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "Povinné alebo voliteµné argumenty dlhých tvarov volieb sú povinné alebo voliteµné pre µubovoµné zodpovedajúce krátke voµby." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Ruène linkova» jednotlivé kni¾nice." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Hlavný server :\n" @@ -2402,7 +2461,7 @@ msgstr "Hlavný server zaneprázdnený, úpl msgid "Memory allocation failure" msgstr "Pridelenie pamäti zlyhalo" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Pamä» vyèerpaná" @@ -2421,7 +2480,7 @@ msgstr "Príli¹ dlhá správa" msgid "Missing or malformed attribute" msgstr "Chýbajúci alebo chybne formovaný atribút" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Èas zmeny :%s" @@ -2434,7 +2493,7 @@ msgstr "Modifikácia zlyhala" msgid "Modify operation failed" msgstr "Operácia zmeny zlyhala" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Modifikova» výstupný formát:" @@ -2452,7 +2511,7 @@ msgstr "Pre server-user voµbu je potrebn msgid "NAME" msgstr "NÁZOV" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2460,15 +2519,11 @@ msgstr "" "NÁZOV\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "Rozdielne verzie NIS klienta a serveru - nie je mo¾né poskytnú» slu¾bu" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "Databáza máp NIS je chybná" @@ -2484,7 +2539,7 @@ msgstr "NIS+ server nie je dostupný" msgid "NIS+ service is unavailable or not installed" msgstr "Slu¾ba NIS+ nie je dostupná alebo nain¹talovaná" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "®IADNY OBJEKT\n" @@ -2492,7 +2547,7 @@ msgstr "®IADNY OBJEKT\n" msgid "NUMBER" msgstr "POÈET" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Názov : `%s'\n" @@ -2582,7 +2637,7 @@ msgstr "®iadny anode" msgid "No buffer space available" msgstr "Nie je mo¾né prideli» pamä» pre V/V operácie" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "V znakovej mape nie je zadaný názov znakovej sady" @@ -2599,8 +2654,8 @@ msgstr "Detské procesy neexistujú" msgid "No data available" msgstr "Dáta nie sú k dispozícii" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2613,7 +2668,7 @@ msgstr "Nebola nájdená definícia kategór msgid "No file space on server" msgstr "Na serveri u¾ nie je ¾iadne miesto pre súbory" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "Odkaz nebol vytvorený, keï¾e pre %s nebolo mo¾né nájs» soname" @@ -2626,7 +2681,7 @@ msgstr "Odkaz nebol vytvorený, keï¾e pre msgid "No locks available" msgstr "Zámky nie sú k dispozícii" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "®iadna zhoda" @@ -2639,11 +2694,11 @@ msgstr "Nenájdené ¾iadne médium" msgid "No message of desired type" msgstr "®iadna správa ¾elaného typu" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "®iadne ïal¹ie záznamy v databáze" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "®iadny predchádzajúci regulérny výraz" @@ -2693,11 +2748,11 @@ msgstr "Také zariadenie alebo adresa nee msgid "No such file or directory" msgstr "Adresár alebo súbor neexistuje" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Tento kµúè v databáze neexistuje" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "Táto mapa sa v doméne servera nenachádza" @@ -2715,7 +2770,7 @@ msgstr "Zaznamenaný priestor názvov mimo msgid "Non-recoverable failure in name resolution" msgstr "Neopraviteµná chyba pri rie¹ení názvu" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "®iadne.\n" @@ -2782,12 +2837,12 @@ msgstr "Nie je vlastníkom" msgid "Not supported" msgstr "Nie je podporovaný" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Poèet ståpcov : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Poèet objektov : %u\n" @@ -2808,17 +2863,17 @@ msgstr "Èíselný rozsah mimo domény defin msgid "Numerical result out of range" msgstr "Èíselný výsledok mimo povoleného rozsahu" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Objekt #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Názov objektu : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Typ objektu : " @@ -2835,11 +2890,11 @@ msgstr "Objekt je vzdialený" msgid "Object with same name exists" msgstr "Existuje objekt s rovnakým názvom" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Nepárny poèet úvodzoviek" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "Na príkazovom riadku sú zadané iba adresáre procesov. Nevytvára» cache." @@ -2921,7 +2976,7 @@ msgstr "Prúdové zdroje vyèerpané" msgid "Out of streams resources" msgstr "Prúdové zdroje vyèerpané" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Riadenie výstupu:" @@ -2929,12 +2984,12 @@ msgstr "Riadenie výstupu:" msgid "Output selection:" msgstr "Výber výstupu:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Vlastník : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "SÚKROMNÝ\n" @@ -2956,13 +3011,13 @@ msgstr "Èiastoèný úspech" msgid "Passed object is not the same object on server" msgstr "Odovzdaný objekt nie je na serveri tým istým objektom" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "Cesta `%s' bola zadaná viac ako raz" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2972,11 +3027,11 @@ msgstr "Prístup odmietnutý" msgid "Power failure" msgstr "Výpadok napájania" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Predèasný koniec regulérneho výrazu" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Vypísa» cache" @@ -2984,6 +3039,10 @@ msgstr "Vypísa» cache" msgid "Print current configuration statistic" msgstr "Vypísa» ¹tatistiku aktuálnej konfigurácie" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Vypisova» viac informácií" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Vypísa» viac správ" @@ -3000,6 +3059,10 @@ msgstr "Pravdepodobný úspech" msgid "Probably not found" msgstr "Pravdepodobne nenájdené" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Po¾iadavka na spracovanie je u¾ rozpracovaná" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "Profilovací èasovaè vypr¹al" @@ -3057,7 +3120,7 @@ msgstr "RFS-¹pecifická chyba" msgid "RPC bad procedure for program" msgstr "Chybná RPC procedúra pre program" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "Zlyhal RPC pri NIS operácii" @@ -3081,88 +3144,88 @@ msgstr "RPC ¹truktúra je chybná" msgid "RPC version wrong" msgstr "Chybná verzia RPC" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (neznámny chybový kód)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: Chyba pri overení práv" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: Nie je mo¾né dekódova» výsledok" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: Nie je mo¾né zakódova» argumenty" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Zlyhalo (ne¹pecifikovaná chyba)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: Nekompatibilné verzie RPC" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Chyba portmappera" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: Procedúra nie je k dispozícii" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: Program nie je registrovaný" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: Program nie je k dispozícii" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: Nesúhlasí program alebo verzia" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: Chyba vzdialeného systému" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: Server nemô¾e dekódova» argumenty" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: Úspech" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: Èasovaè vypr¹al" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: Nie je mo¾né prijíma»" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: Nie je mo¾né vysiela»" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: Neznámy poèítaè" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: Neznámy protokol" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bitov)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "RTLD_NEXT je pou¾ité pre kód, ktorý nie je dynamicky zavedený" @@ -3185,7 +3248,7 @@ msgstr "Súborový systém dovoµuje len èít msgid "Real-time signal %d" msgstr "Signál reálneho èasu %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Regulérny výraz príli¹ veµký" @@ -3199,11 +3262,11 @@ msgstr "Vzdialená V/V chyba" msgid "Remote address changed" msgstr "Vzdialená adresa sa zmenila" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Odstráòte heslo alebo zaká¾te èítanie súboru ostatnými." -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "Premenovanie %s na %s zlyhalo" @@ -3213,7 +3276,7 @@ msgstr "Premenovanie %s na %s zlyhalo" msgid "Reopening shared object `%s' failed" msgstr "Znovuotvorenie zdieµaného objektu `%s' zlyhalo" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Replika :\n" @@ -3222,16 +3285,24 @@ msgstr "Replika :\n" msgid "Report bugs to %s.\n" msgstr "Chyby hláste na adrese %s.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "Chyby hláste na adrese - pou¾ite skript `glibcbug'.\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Chybné argumenty ¾iadosti" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Po¾iadavka zru¹ená" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Po¾iadavka nebola zru¹ená" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Rezervované pre budúce pou¾itie" @@ -3302,11 +3373,7 @@ msgstr "Výsledky poslané procedúre spätn msgid "SHOBJ [PROFDATA]" msgstr "ZDIE¥_OBJEKT [PROF_ÚDAJE]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Prehµadávaná cesta : %s\n" @@ -3323,11 +3390,11 @@ msgstr "Server zaneprázdnený, skúste zno msgid "Server out of memory" msgstr "Vyèerpaná pamä» servera" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "Server odmietol oprávnenie" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "Server odmietol overenie" @@ -3395,7 +3462,7 @@ msgstr "Zastaralý odkaz na NFS súbor" msgid "Start NUMBER threads" msgstr "Spusti» POÈET vlákien" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Stav : %s\n" @@ -3425,7 +3492,7 @@ msgstr "Chyba rúry prúdov" msgid "Structure needs cleaning" msgstr "©truktúra potrebuje opravu" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Úspech" @@ -3446,11 +3513,11 @@ msgstr "Symbolické názvy znakov sú defin msgid "System error" msgstr "Chyba systému" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Systémové informácie:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Pridelenie systémových zdrojov zlyhalo" @@ -3471,7 +3538,7 @@ msgstr "" msgid "TABLE" msgstr "TABU¥KA" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TABU¥KA\n" @@ -3479,7 +3546,7 @@ msgstr "TABU¥KA\n" msgid "TABLE,yes" msgstr "TABU¥KA,áno" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Typ tabuµky : %s\n" @@ -3502,7 +3569,7 @@ msgstr "Ukonèené" msgid "Text file busy" msgstr "Spustiteµný súbor je pou¾ívaný" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3517,11 +3584,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "Táto implementácia nepodporuje nový ¹týl alebo MT-bezpeèný kód!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "®ivotnos» : " @@ -3595,7 +3662,7 @@ msgstr "Priveµa pou¾ívateµov" msgid "Trace/breakpoint trap" msgstr "Trasovacie/ladiace preru¹enie" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Koncové spätné lomítko" @@ -3627,12 +3694,12 @@ msgstr "Koncový komunikaèný bod nie je s msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Pou¾ite `%s --help' alebo `%s --usage' pre viac informácií.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Typ : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "NEZNAMY" @@ -3652,31 +3719,35 @@ msgstr "Nie je mo¾né vytvori» spätné vol msgid "Unable to create process on server" msgstr "Nie je mo¾né vytvori» proces na serveri" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Neznáme (typ = %d, bitov = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Neznáme kµúèové slovo v .netrc: %s" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "Neznáma ELFCLASS v súbore %s.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Neznámy chybový kód NIS" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Neznámy OS" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Neznáma databáza %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Neznáma chyba" @@ -3712,31 +3783,31 @@ msgstr "Neznáma chyba servera" msgid "Unknown signal %d" msgstr "Neznámy signál %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Neznáma chyba systému" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Neznáma chyba ypbind" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "Nepárová ( or \\(" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr "Nepárová ) or \\)" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "Nepárová [ or [^" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "Nepárová \\{" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Nerozpoznaná premenná `%s'" @@ -3749,20 +3820,20 @@ msgstr "Urgentný V/V stav" msgid "Usage:" msgstr "Pou¾itie:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Pou¾itie: %s meno_premennej [cesta]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Pou¾itie: %s [-v ¹pecifikácia] meno_premennej [cesta]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Pou¾itie: rpcinfo [ -n èíslo_portu ] -u poèítaè èíslo_programu [ èíslo_verzie ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Pou¾i» CACHE ako cache súbor" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Pou¾i» CONF ako konfiguraèný súbor" @@ -3787,7 +3858,7 @@ msgstr "Hodnota je pre daný dátový typ p msgid "Virtual timer expired" msgstr "Vypr¹al virtuálny èasovaè" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Èudný výsledok vykonania programu" @@ -3795,19 +3866,19 @@ msgstr "Èudný výsledok vykonania program msgid "Window changed" msgstr "Okno sa zmenilo" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Vypísa» názvy dostupných znakových sád" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Vypísa» názvy dostupných národných prostredí" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Vypísa» názvy vybraných kategórií" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Vypísa» názvy vybraných kµúèových slov" @@ -3815,18 +3886,18 @@ msgstr "Vypísa» názvy vybraných kµúèovýc msgid "Write output to file NAME" msgstr "Zapísa» výstup do súboru SÚBOR" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "Zápi údajov do cache zlyhal" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "Zápi údajov do cache zlyhal." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "Autor: %s.\n" @@ -3835,14 +3906,6 @@ msgstr "Autor: %s.\n" msgid "Wrong medium type" msgstr "Chybný typ média" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3857,11 +3920,15 @@ msgstr "Áno, 42 je význam ¾ivota" msgid "You really blew it this time" msgstr "Tentokrát si to skutoène poondial" -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "Koncový èas pokraèovacieho riadku zóny nie je väè¹í ako koncový èas predchádzajúceho riadku" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[ADRESÁR...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[SÚBOR...]" @@ -3893,13 +3960,13 @@ msgstr "`%.*s' bol u¾ definovaný v znako msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' bol u¾ definovaný v repertoári" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "Definícia `%1$s' nekonèí `END %1$s'" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s' a `%.*s' sú neprípustné názvy pre symbolický rozsah" @@ -3909,7 +3976,7 @@ msgstr "`%s' a `%.*s' sú neprípustné náz msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s' nie sú správne profilovacie údaje pre `%s'" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "kategória `digit' neobsahuje záznamy v skupinách po desiatich" @@ -3925,12 +3992,12 @@ msgstr "ai_socktype nie je podporovaný" msgid "already running" msgstr "u¾ be¾í" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "argument pre <%s> musí by» jeden znak" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "argument pre `%s' musí by» jeden znak" @@ -3943,28 +4010,28 @@ msgstr "auth_none.c - Fatálna chyba mars msgid "authunix_create: out of memory\n" msgstr "authunix_create: nedostatok pamäti\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "chybný argument" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "chybný vlastník" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "prázdne pole OD v riadku Link" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "prázdne pole DO v riadku Link" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "blok uvoµnený dvakrát\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "pochybný mcheck_status, kni¾nica má chyby\n" @@ -3988,11 +4055,11 @@ msgstr "cache_set: obe» nenájdená" msgid "cache_set: victim not found" msgstr "cache_set: obe» nenájdená" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "nie je mo¾né nájs» skratku èasovej zóny pre pou¾itie hneï po koncovom èase" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "nie je mo¾né znovu prideli» èíslo procedúry %ld\n" @@ -4006,15 +4073,15 @@ msgstr "nie je mo¾né obnovi» segment pro msgid "cannot add already read locale `%s' a second time" msgstr "nie je mo¾né znovu prida» u¾ naèítané prostredie `%s'" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "nie je mo¾né prideli» pamä» pre zoznam závislostí" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "nie je mo¾né prideli» pamä» pre hlavièku programu" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "nie je mo¾né prideli» pamä» pre záznam názvu" @@ -4022,31 +4089,27 @@ msgstr "nie je mo¾né prideli» pamä» pre msgid "cannot allocate symbol data" msgstr "nie je mo¾né prideli» pamä» pre symbolické údaje" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "nie je mo¾né prideli» pamä» pre vyhµadávací zoznam symbolov" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "nie je mo¾né prideli» pamä» pre referenènú tabuµku verzií" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "nie je mo¾né zmeni» ochranu pamäti" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "nie je mo¾né vytvori» kópiu RUNPATH/RPATH" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "Nie je mo¾né vytvori» cache pre hµadanie v ceste" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "nie je mo¾né vytvori» zoznam schopností" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "nie je mo¾né vytvori» interný deskriptor" @@ -4055,23 +4118,28 @@ msgstr "nie je mo¾né vytvori» interný de msgid "cannot create internal descriptors" msgstr "nie je mo¾né vytvori» interné deskriptory" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "nie je mo¾né vytvori» výstupný súbor `%s' pre kategóriu `%s'" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "nie je mo¾né vytvori» pole ciest" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "nie je mo¾né vytvori» vyhµadávací zoznam" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "nie je mo¾né vytvori» deskriptor zdieµaného objektu" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "nie je mo¾né urèi» znak escape" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "nie je mo¾né dynamicky naèíta» spustiteµný súbor" @@ -4093,7 +4161,11 @@ msgstr "nie je mo¾né nájs» preprocesor: msgid "cannot find any C preprocessor (cpp)\n" msgstr "nie je mo¾né nájs» ¾iadny C preprocesor (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "nie je mo¾né vygenerova» výstupný súbor" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "nie je mo¾né spracova» starú verziu ¾iadosti %d; aktuálna verzia je %d" @@ -4102,19 +4174,15 @@ msgstr "nie je mo¾né spracova» starú ver msgid "cannot load profiling data" msgstr "nie je mo¾né naèíta» profilovacie údaje" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "nepodarilo sa naèíta» súbor zdieµaného objektu" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "nie je mo¾né zmeni» segment na zapisovateµný pre relokáciu" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "nie je mo¾né namapova» stránky vyplnené nulami" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "nie je mo¾né otvori»" @@ -4127,7 +4195,7 @@ msgstr "nie je mo¾né otvori» `%s'" msgid "cannot open input file" msgstr "nie je mo¾né otvori» vstupný súbor" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "nie je mo¾né otvori» vstupný súbor `%s'" @@ -4138,21 +4206,21 @@ msgstr "nie je mo¾né otvori» vstupný súb msgid "cannot open locale definition file `%s'" msgstr "nie je mo¾né otvori» súbor definície národného prostredia `%s'" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "nie je mo¾né otvori» výstupný súbor" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "nie je mo¾né otvori» výstupný súbor `%s'" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "nie je mo¾né otvori» výstupný súbor `%s' pre kategóriu `%s'" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "nie je mo¾né otvori» súbor zdieµaného objektu" @@ -4161,7 +4229,7 @@ msgstr "nie je mo¾né otvori» súbor zdieµ msgid "cannot open socket: %s" msgstr "nie je mo¾né otvori» socket `%s'" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "nie je mo¾né otvori» zariadenie pre naplnenie nulami" @@ -4174,7 +4242,7 @@ msgstr "nie je mo¾né naèíta» adresár zna msgid "cannot read configuration file; this is fatal" msgstr "nie je mo¾né naèíta» konfiguraèný súbor; to je fatálne" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "nie je mo¾né naèíta» údaje súboru" @@ -4187,11 +4255,6 @@ msgstr "nie je mo¾né preèíta» hlavièku" msgid "cannot read header from `%s'" msgstr "nie je mo¾né preèíta» hlavièku z `%s'" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "nie je mo¾né naèíta» adresár národných prostredí `%s'" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "nie je mo¾né naèíta» ¹tatistické údaje" @@ -4200,7 +4263,7 @@ msgstr "nie je mo¾né naèíta» ¹tatistické msgid "cannot safe new repertoire map" msgstr "nie je mo¾né uchova» mapu repertoáru" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "nepodarilo sa zisti» stav zdieµaného objektu" @@ -4214,7 +4277,7 @@ msgstr "nie je mo¾né vykona» stat() súbo msgid "cannot write output files to `%s'" msgstr "nie je mo¾né zapísa» výstupné súbory do `%s'" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "nie je mo¾né zapísa» výsledok: %s" @@ -4224,76 +4287,80 @@ msgstr "nie je mo¾né zapísa» výsledok: % msgid "cannot write statistics: %s" msgstr "nie je mo¾né zapísa» ¹tatistiku: `%s'" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "znak '%s' v triede `%s' musí by» v triede `%s'" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "znak '%s' v triede `%s' nesmie by» v triede `%s'" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "znak nie je definovaný v znakovej sade" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "znak L'\\u%0*x' v triede `%s' musí by» v triede `%s'" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "znak L'\\u%0*x' v triede `%s' nesmie by» v triede `%s'" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "znak `%s' nie je definovaný a je potrebný ako implicitná hodnota" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "trieda znakov `%s' je u¾ definovaná" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "znaková sada `%s' je u¾ definovaná" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "znaková mapa `%s' nie je kompatibilná s ASCII, prostredie nevyhovuje ISO C\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "súbor znakovej sady `%s' nebol nájdený" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "znakové sady so zamykacími stavmi nie sú podporované" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "syr" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "kruhová závislos» medzi definíciami prostredí" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Fatálna chyba pri serializácii hlavièky." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: nedostatok pamäti\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: nedostatok pamäti\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: nedostatok pamäti\n" @@ -4301,28 +4368,28 @@ msgstr "clntunix_create: nedostatok pamä msgid "constant or identifier expected" msgstr "oèakávaná kon¹tanta alebo identifikátor" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "konverzia z `%s' do `%s' nie je podporovaná" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "moduly konverzie nie sú dostupné" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "konverzný pomer nemô¾e by» nula" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "konverzia zastavená kvôli problému pri zápise výstupu" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "nebolo mo¾né vytvori» rpc server\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "nebolo mo¾né zaregistrova» program %ld verzie %ld\n" @@ -4331,17 +4398,17 @@ msgstr "nebolo mo¾né zaregistrova» progr msgid "database [key ...]" msgstr "databáza [kµúè ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "implicitný súbor znakovej sady `%s' nebol nájdený" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "duplicitná definícia <%s>" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "duplicitná definícia skriptu `%s'" @@ -4350,12 +4417,12 @@ msgstr "duplicitná definícia skriptu `%s msgid "duplicate set definition" msgstr "duplicitná definícia sady" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "duplicitné meno zóny %s (súbor \"%s\", riadok %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "duplicitná definícia mapovania `%s'" @@ -4368,7 +4435,7 @@ msgstr "duplicitný identifikátor správy" msgid "duplicated message number" msgstr "duplicitné èíslo správy" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "rozsah pokraèovania musí by» oznaèený dvomi operandami rovnakého typu" @@ -4376,10 +4443,14 @@ msgstr "rozsah pokraèovania musí by» ozn msgid "empty char string" msgstr "prázdny znakový re»azec" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "prázdna substitúcia tokenu dynamického re»azca" +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "prázdna substitúcia tokenu re»azca dynamiky" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: vyrovnávacia pamä» je u¾ povolená" @@ -4396,29 +4467,29 @@ msgstr "enablecache: nebolo mo¾né pridel msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: nebolo mo¾né prideli» frontu pre vyrovnávaciu pamä»" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "kódovanie výstupu" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "kódovanie pôvodného textu" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "chyba pri získaní id volajúceho: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "chyba pri pridávaní ekvivalentného symbolu triedenia" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "chyba poèas zatvárania vstupu `%s'" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "chyba poèas zatvárania výstupného súboru" @@ -4426,7 +4497,8 @@ msgstr "chyba poèas zatvárania výstupnéh msgid "error while closing the profiling data file" msgstr "chyba poèas zatvárania súboru profilovacích údajov" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "poèas èítania vstupu" @@ -4434,10 +4506,14 @@ msgstr "poèas èítania vstupu" msgid "expect string argument for `copy'" msgstr "pre `copy' je oèakávaný re»azcový argyment" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "oèakávaný pokraèovací riadok nebol nájdený" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "prebytoèná koncová bodkoèiarka" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4447,7 +4523,7 @@ msgstr "nepodarilo sa naèíta» zdieµaný o msgid "failed to load symbol data" msgstr "nepodarilo sa naèíta» symbolické údaje" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "nepodarilo sa namapova» segment zo zdieµaného objektu" @@ -4455,18 +4531,19 @@ msgstr "nepodarilo sa namapova» segment msgid "failed to mmap the profiling data file" msgstr "nepodarilo sa mmap-ova» súbor profilovacích údajov" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "nepodarilo sa od¹tartova» konverziu" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "chyba poèas zápisu údajov kategórie `%s'" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "súbor %s je skrátený\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4475,19 +4552,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "súbor `%s' u¾ existuje a mô¾e by» prepísaný\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "súbor je príli¹ krátky" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fstat sa nepodaril" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "smetie za koncom ¹pecifikácie kódu znaku" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "smetie za koncom èísla" @@ -4507,28 +4584,28 @@ msgstr "get_myaddress: ioctl (získanie k msgid "getent - get entries from administrative database." msgstr "getent - získa» záznamy z administratívnej databázy." -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: ¾iados» prijatá (verzia = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "pevný odkaz zlyhal, pou¾itý symbolický" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "niekde existuje pevný odkaz" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "hexadecimálny formát rozsahu by mal pou¾íva» iba veµké písmená" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "neprípustné pole CORRECTION v riadku Leap" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "neprípustné pole Rolling/Stationary v riadku Leap" @@ -4536,11 +4613,16 @@ msgstr "neprípustné pole Rolling/Station msgid "illegal character in file: " msgstr "neprípustný znak v súbore: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "chybná escape-sekvencia na konci re»azca" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "neprípustná vstupná sekvencia na pozícii %Zd" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "neprípustná vstupná sekvencia na pozícii %ld" @@ -4554,102 +4636,102 @@ msgstr "chybný nettype :`%s'\n" msgid "illegal set number" msgstr "neprípustné èíslo sady" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "limit implementácie: maximálne mno¾stvo tried znakov je %Zd" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "limit implementácie: maximálne mno¾stvo sád znakov je %d" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "nekompletný znak alebo preraïovacia sekvencia na konci vyrovnávacej pamäti" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "vstupný riadok neznámeho typu" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "interná chyba" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "vnútorná chyba (nesprávny deskriptor)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "vnútorná chyba - addtype zavolaný s chybným isdst" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "vnútorná chyba - addtype zavolaný s chybným ttisgmt" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "vnútorná chyba - addtype zavolaný s chybným ttisstd" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "vnútorná chyba %s na riadku %u" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "neprípustná ELF hlavièka" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "neprípustné posunutie voèi UTC" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "neprípustný formát skratky" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "neprípustný znak: správa ignorovaná" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "neprípustný deò mesiaca" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "neprípustná definícia" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "zadané neprípustné kódovanie" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "neprípustný koncový rok" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "neprípustná escape-sekvencia" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "neprípustný priestupný rok" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "neprípustný riadok" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "neprípustný mód pre dlopen()" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "neprípustný názov mesiaca" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "neprípustné mená pre rozsah znakov" @@ -4662,52 +4744,52 @@ msgstr "neprípustná veµkost» ukazovateµa msgid "invalid quote character" msgstr "neprípustný znak citácie" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "neprípustný ulo¾ený èas" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "neprípustný poèiatoèný rok" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "neprípustný èas v dni" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "neprípustný názov dòa" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "då¾ka kµúèa v ¾iadosti príli¹ dlhá: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "libc4 kni¾nica %s je v nesprávnom adresári" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "libc5 kni¾nica %s je v nesprávnom adresári" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "libc6 kni¾nica %s je v nesprávnom adresári" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "kni¾nice %s a %s v adresári %s majú rovnaké soname, ale odli¹ný typ." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "pridlhý riadok" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "vypí¹ v¹etky známe znakové sady" @@ -4715,7 +4797,7 @@ msgstr "vypí¹ v¹etky známe znakové sady" msgid "locale name should consist only of portable characters" msgstr "názov prostredia by malo obsahova» iba prenositeµné znaky" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "lstat zlyhal" @@ -4727,7 +4809,11 @@ msgstr "výstupný graf bude VALUE pixlov msgid "make output graphic VALUE pixel wide" msgstr "výstupný graf bude VALUE pixlov ¹iroký" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: nevie ako má spracova» viac ako 8 argumentov\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "nesprávny riadok ignorovaný" @@ -4739,39 +4825,34 @@ msgstr "zlyhalo mapovanie tabuµky re»azc msgid "mapping of section headers failed" msgstr "zlyhalo mapovanie hlavièiek sekcie" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "pamä» pred prideleným blokom prepísaná\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "pamä» za koncom prideleného bloku prepísaná\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "nedostatok pamäti" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "pamä» je konzistentná, kni¾nica je chybná\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "zlyhalo mapovanie cache súboru\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "viac ako jeden dynamický segment\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "bezmenné pravidlo" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "nie je ¹pecifikované pôvodné ani cieµové kódovanie" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4804,7 +4885,7 @@ msgstr "netname2user: názov principála ` msgid "netname2user: should not have uid 0" msgstr "netname2user: nemal by ma» uid 0" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "program %d nebol nikdy registrovaný\n" @@ -4813,11 +4894,11 @@ msgstr "program %d nebol nikdy registrov msgid "no or value given" msgstr "nezadaná alebo hodnota" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "s pravidlom sa nezhoduje ¾iadny deò v mesiaci" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "neexistuje definícia pre `UNDEFINED'" @@ -4826,7 +4907,7 @@ msgstr "neexistuje definícia pre `UNDEFI msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "nebol zadaný názov súboru pre profilovacie údaje a zdieµaný objekt `%s' nemá soname" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "neboli definované ¾iadne vstupné èíslice a v znakovej mape nie je ¾iadne zo ¹tandardných mien" @@ -4834,37 +4915,37 @@ msgstr "neboli definované ¾iadne vstupné msgid "no other keyword shall be specified when `copy' is used" msgstr "pri pou¾ití `copy' nemá by» zadané ¾iadne iné kµúèové slovo" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "neboli definované ¾iadne výstupné èíslice a v znakovej mape nie je ¾iadne zo ¹tandardných mien" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "výstupný súbor nebol vytvorený kvôli výskytu varovaní" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "nebolo zadané ¾iadne symbolické meno" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "nebolo zadané ¾iadne symbolické meno pre koniec rozsahu" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "nesymbolické hodnoty znakov by nemali by» pou¾ívané" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "nie v¹etky znaky pou¾ité v `outdigit' sú dostupné v znakovej mape" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "nie v¹etky znaky pou¾ité v `outdigit' sú dostupné v repertoári" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "nie je regulérny súbor" @@ -4883,36 +4964,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd nebe¾í!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "objektový súbor neobsahuje ¾iadnu dynamickú sekciu" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "vynecha» z výstupu neplatné znaky" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "iba ET_DYN a ET_EXEC mô¾u by» naèítané" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "po definícii CHARMAP mô¾u nasledova» iba definície WIDTH" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "poradie pre `%.*s' je u¾ definované na %s:%Zu" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "pôvodné kódovanie nebolo zadané pomocou `-f'" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "nedostatok pamäti" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "výstupný súbor" @@ -4920,19 +4997,19 @@ msgstr "výstupný súbor" msgid "pmap_getmaps rpc problem" msgstr "pmap_getmaps rpc problém" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: chyba protokolu poèas prípravy okruhu\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "predèasný koniec definície `translit_ignore'" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "chyba preprocesora" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "predchádzajúca definícia bola tu" @@ -4940,7 +5017,7 @@ msgstr "predchádzajúca definícia bola tu msgid "print list of count paths and their number of use" msgstr "vypísa» zoznam ciest poètov a poèet ich pou¾ití" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "vypisova» informáciu o postupe" @@ -4966,30 +5043,30 @@ msgstr "program %lu verzie %lu nie je do msgid "program %lu version %lu ready and waiting\n" msgstr "program %lu verzie %lu pripravený a èakajúci\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: krátke èítanie" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (nastavenie stderr): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: socket: V¹etky porty sú pou¾ité\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write (nastavenie stderr): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: nedostatok pamäti\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "opakovaný moment priestupnej sekundy" @@ -4998,7 +5075,7 @@ msgstr "opakovaný moment priestupnej sek msgid "repertoire map file `%s' not found" msgstr "súbor mapy repertoáru `%s' nebol nájdený" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "výsledné bajty rozsahu nie sú zobraziteµné" @@ -5034,24 +5111,24 @@ msgstr "rpcinfo: broadcast zlyhal: %s\n" msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: nie je mo¾né spoji» sa s portmapperom" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "rovnaké meno pravidla vo viacerých súboroch" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "zdieµaný objekt nemô¾e by» otvorený pomocou dlopen()" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "zdieµaný objekt nie je otvorený" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "neúplné èítanie kµúèa ¾iadosti: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "neúplné èítanie ¾iadosti: `%s'" @@ -5061,35 +5138,31 @@ msgstr "neúplné èítanie ¾iadosti: `%s'" msgid "short write in %s: %s" msgstr "neúplný zápis v %s: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "socket: chyba protokolu pri príprave okruhu\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "¹tandardný vstup" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "¹tandardný výstup" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "úvodná a koncová znaková sekvencia rozsahu musia ma» rovnakú då¾ku" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "poèiatoèný rok väè¹í ako koncový" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "poèiatoèný rok priveµký pre zobrazenie" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "poèiatoèný rok primalý pre zobrazenie" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "potlaèi» varovania" @@ -5097,31 +5170,31 @@ msgstr "potlaèi» varovania" msgid "svc_run: - poll failed" msgstr "svc_run: - poll zlyhal" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - nie je mo¾né vykona» getsockname alebo listen" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - problém pri vytváraní tcp socketu" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: nedostatok pamäti\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - problém pri vytváraní AF_UNIX socketu" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - nemô¾em vykona» getsockname alebo listen" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: nedostatok pamäti\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: nedostatok pamäti\n" @@ -5147,49 +5220,49 @@ msgstr "svcudp_create: problém pri vytvá msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad je príli¹ malý pre IP_PKTINFO\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: nedostatok pamäti\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "symbol `%.*s' nie je v mape znakov" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "symbol `%.*s' nie je v mape repertoáru" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "symbol `%s'" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "symbol `%s' má rovnaké kódovanie ako" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "symbol `%s' nie je definovaný" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "chyba syntaxe" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "chyba syntaxe v definícii %s: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5201,73 +5274,69 @@ msgstr "chyba syntaxe v prológu: %s" msgid "syntax error in repertoire map definition: %s" msgstr "chyba syntaxe v definícii mapy repertoáru: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "chyba syntaxe: nie je vnútri sekcie definície národného prostredia" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "kódovanie cieµa nebolo zadané pomocou `-t'" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "toto je prvá definícia" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "èas men¹í ako nula" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "preteèenie èasu" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "to-value rozsahu je men¹ia ako from-value " -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "to-value sekvencia znakov je men¹ia ako sekvencia from-value" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "primálo bajtov v kódovaní znaku" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "priveµa bajtov v kódovaní znaku" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "priveµa priestupných sekúnd" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "priveµa lokálnych typov èasu" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "priveµa prechodov?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "príli¹ veµa alebo príli¹ dlhé skratku èasovej zóny" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "smetie na konci riadku" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "problémy pri odpovedi programu %d\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "zadaný jeden rok" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "nie je mo¾né prideli» vyrovnávaciu pamä» pre vstup" @@ -5275,11 +5344,15 @@ msgstr "nie je mo¾né prideli» vyrovnávac msgid "unable to free arguments" msgstr "nie je mo¾né uvoµni» argumenty" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "nedefinované" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "neznámy" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "neznámy znak `%s'" @@ -5289,7 +5362,7 @@ msgstr "neznámy znak `%s'" msgid "unknown directive `%s': line ignored" msgstr "neznáma direktíva `%s' - riadok ignorovaný" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "neznáma iconv() chyba %d" @@ -5299,15 +5372,20 @@ msgstr "neznáma iconv() chyba %d" msgid "unknown set `%s'" msgstr "neznáma sada `%s'" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "neznáma ¹pecifikácia \"%s\"" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "zóna bez pravidiel" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "neukonèená správa" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "neukonèený re»azec" @@ -5315,11 +5393,11 @@ msgstr "neukonèený re»azec" msgid "unterminated string constant" msgstr "neukonèená re»azcová kon¹tanta" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "neukonèené symbolické meno" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "horný limit rozsahu nie je väè¹í ako dolný" @@ -5327,35 +5405,35 @@ msgstr "horný limit rozsahu nie je väè¹í msgid "upper limit in range is not smaller then lower limit" msgstr "horný limit rozsahu je men¹í ako dolný" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "pou¾itie: %s vstupný_súbor\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "29. február pou¾itý v nepriestupnom roku" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "hodnota pre %s musí by» celé èíslo" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "hodnota pre <%s> musí by» 1 alebo viac" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "hodnota <%s> musí by» väè¹ia alebo rovná hodnote <%s>" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "varovanie: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "poèas prijatia spojenia: %s" @@ -5372,11 +5450,15 @@ msgstr "poèas pridelenia záznamu hash-ta msgid "while allocating key copy" msgstr "poèas pridelenia kópie kµúèa" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "poèas vkladania do vyhµadávacieho stromu" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "poèas otvárania starého katalógu" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "poèas prípravy výstupu" @@ -5384,15 +5466,15 @@ msgstr "poèas prípravy výstupu" msgid "while stat'ing profiling data file" msgstr "poèas stat-u súboru profilovacích informácií" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "v rozsahu hodnôt UCS treba pou¾i» hexadecimálne symbolické pokraèovanie `..'" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "v rozsahu hodnôt kódov znakov treba pou¾i» absolútne pokraèovanie `...'" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "v symbolickom rozsahu hodnôt nesmie by» pou¾ité absolútne pokraèovanie `...'" @@ -5400,7 +5482,7 @@ msgstr "v symbolickom rozsahu hodnôt nes msgid "write incomplete" msgstr "neúplný zápis" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "zapisovateµný nielen pre vlastníka" @@ -5408,23 +5490,23 @@ msgstr "zapisovateµný nielen pre vlastní msgid "wrong number of arguments" msgstr "chybný poèet argumentov" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "chybný poèet polí v riadku Leap" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "chybný poèet polí v riadku Link" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "chybný poè¹t polí v riadku Rule" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "chybný poèet polí v pokraèovacom riadku Zone" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "chybný poèet polí v riadku Zone" @@ -5436,10 +5518,58 @@ msgstr "xdr_reference: nedostatok pamäti msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: nedostatok pamäti\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: nie je mo¾né konvertova» meno poèítaèa na meno siete\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: nie je mo¾né zísti» adresu servera\n" + +#~ msgid "%s: Error writing " +#~ msgstr "%s: Chyba pri zápise " + +#~ msgid "CDS" +#~ msgstr "CDS" + +#~ msgid "DNANS" +#~ msgstr "DNANS" + +#~ msgid "DNS" +#~ msgstr "DNS" + +#~ msgid "IVY" +#~ msgstr "IVY" + +#~ msgid "NIS" +#~ msgstr "NIS" + +#~ msgid "SUNYP" +#~ msgstr "SUNYP" + +#~ msgid "X500" +#~ msgstr "X500" + +#~ msgid "XCHS" +#~ msgstr "XCHS" + +#~ msgid "cannot create capability list" +#~ msgstr "nie je mo¾né vytvori» zoznam schopností" + +#~ msgid "cannot load shared object file" +#~ msgstr "nepodarilo sa naèíta» súbor zdieµaného objektu" + +#~ msgid "cannot read locale directory `%s'" +#~ msgstr "nie je mo¾né naèíta» adresár národných prostredí `%s'" + +#~ msgid "fcntl: F_SETFD" +#~ msgstr "fcntl: F_SETFD" + +#~ msgid "neither original nor target encoding specified" +#~ msgstr "nie je ¹pecifikované pôvodné ani cieµové kódovanie" + +#~ msgid "original encoding not specified using `-f'" +#~ msgstr "pôvodné kódovanie nebolo zadané pomocou `-f'" + +#~ msgid "target encoding not specified using `-t'" +#~ msgstr "kódovanie cieµa nebolo zadané pomocou `-t'" Binary files glibc-2.2.4/po/sv.mo and glibc-2.2.5/po/sv.mo differ diff -durpN glibc-2.2.4/po/sv.po glibc-2.2.5/po/sv.po --- glibc-2.2.4/po/sv.po Mon Jul 23 10:54:58 2001 +++ glibc-2.2.5/po/sv.po Wed Aug 29 00:54:26 2001 @@ -1,86 +1,92 @@ # GNU libc message catalog for swedish # Copyright © 1996, 1998, 2001 Free Software Foundation, Inc. # Jan Djärv , 1996, 1998, 2001. -# Revision: 1.29 +# Revision: 1.32 # msgid "" msgstr "" -"Project-Id-Version: libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-05-22 18:58+0200\n" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-24 21:50+0200\n" "Last-Translator: Jan Djärv \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: värden för fält \"%s\" måste vara i intervallet %d...%d" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tÅtkomsträttigheter: " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tAttribut : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Dnamn[=värde]] [-i storlek] [-I [-K sekunder]] [-Y sökväg] infil\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o utfil] [infil]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n nätid]* [-o utfil] [infil]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s nättyp]* [-o utfil] [infil]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tÅtkomsträttigheter: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\tPostdata av typ %s\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tNamn : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tPublik nyckel: " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tTyp : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tUniversella adresser (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tNamn : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u byte] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -110,11 +116,11 @@ msgstr "" "%15ld%% cache träffprocent\n" "%15s kontrollera /etc/%s för ändringar\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\nGuppmedlemmar:\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nLivslängd : " @@ -142,7 +148,7 @@ msgstr " nej" msgid " yes" msgstr " ja" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Datalängd = %u\n" @@ -199,15 +205,15 @@ msgstr " program vers proto port\n" msgid " or: " msgstr " eller: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (HOPPAR ÖVER)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (ändrad)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (regel från \"%s\", rad %d)" @@ -216,22 +222,22 @@ msgstr " (regel från \"%s\", rad %d)" msgid " [OPTION...]" msgstr " [FLAGGA...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", rad %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "\"Zone %s\"-rad och flaggan -l är ömsesidigt uteslutande" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "\"Zone %s\"-rad och flaggan -p är ömsesidigt uteslutande" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "\"infil\" är obligatorisk för mallgenereringsflaggor.\n" @@ -245,58 +251,58 @@ msgstr "%.*s: parameter till ARGP_HELP_F msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: Parameter till ARGP_HELP_FMT okänd" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: definition slutar inte med \"END %1$s\"" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d bibliotek hittades i cache \"%s\"\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s i zon utan regler" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s är en 32-bitars ELF-fil.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s är en 64-bitars ELF-fil.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s är för en okänd maskin %d.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s är inte en känd bibliotekstyp" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s är inte en delad objektfil (typ: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s är inte en symbolisk länk\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s är inte en ELF-fil, den har inte rätt magiskt tal i början.\n" @@ -316,12 +322,12 @@ msgstr "%s%s%s:%u: %s%sOväntat fel: %s.\ msgid "%s%sUnknown signal %d\n" msgstr "%s%sOkänd signal %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d teckenexpanderades inte korrekt\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: måste vara större än \n" @@ -336,87 +342,82 @@ msgstr "%s: C preprocessorn avslutades m msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: C preprocessorn avslutades med signal %d\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: Kan inte skapa %s: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: Kan inte skapa katalog %s: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: Kan inte länka från %s till %s: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: Kan inte öppna %s: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: Kan inte ta bort %s: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: Kan inte ta bort (unlink) %s: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: Fel vid stängning av %s: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: Fel vid läsning från %s\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: Fel vid skrivning " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: Fel vid skrivning till %s\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: \"Leap\"-rad i fil %s som inte är skottsekundsfil\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Minnet slut: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Flaggan -L given mer än en gång\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Flaggan -d given mer än en gång\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Flaggan -l given mer än en gång\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Flaggan -p given mer än en gång\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Flaggan -y given mer än en gång\n" @@ -432,7 +433,7 @@ msgstr "%s: För många argument\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s: \"%s\" är nämnd fler än en gång i definitionen av vikt %d" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: \"%s\" måste vara ett enskilt tecken" @@ -443,7 +444,7 @@ msgstr "%s: \"%s\" måste vara ett enskil msgid "%s: `%s' value does not match `%s' value" msgstr "%s: värdet på \"%s\" stämmer inte med värdet på \"%s\"" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: \"-1\" måste vara sista post i fält \"%s\"" @@ -453,100 +454,100 @@ msgstr "%s: \"-1\" måste vara sista post msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: sorteringsordning \"forward\" och \"backward\" är ömsesidigt uteslutande" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: \"position\" måste användas för en given nivå i alla sektioner eller inte alls" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: sektion \"translit_start\" avslutas inte med \"translit_end\"" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: bytesekvens för första tecknet är inte mindre än den för sista tecknet" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: bytesekvens för första och sista tecknet måste ha samma längd" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: kan inte ha \"%s\" som ändpunkt på ellips" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: kan inte byta ordning efter %.*s: okänd symbol" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: tecken \"%s\" i teckenuppsättning kan inte representeras med en byte" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: tecken \"%s\" som behövs som standardvärde kan inte representeras med en byte" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: tecken \"%s\" inte definierat i teckenuppsättningen men behövs som standardvärde" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: tecken \"%s\" inte definierat men behövs som standardvärde" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: kommandot var \"%s\", resultatet blev %d\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: riktningsflagga i sträng %Zd i \"era\"-fält är varken \"+\" eller \"-\"" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: riktningsflagga i sträng %Zd i \"era\"-fält är inte ett enskilt tecken" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: dubbla definitioner av \"default_missing\"" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s: dubbla definitioner av kategori" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: dubbla deklarationer för sektion \"%s\"" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: dubbla definitioner av \"%s\"" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: tom kategoribeskrivning är inte tillåtet" @@ -556,19 +557,27 @@ msgstr "%s: tom kategoribeskrivning är i msgid "%s: empty weight string not allowed" msgstr "%s: tomt viktnamn är inte tillåtet" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: fel i tillståndsmaskin" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: fält \"%s\" är deklarerad mer än en gång" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: fält \"%s\" innehåller inte exakt tio poster" @@ -580,14 +589,18 @@ msgstr "%s: fält \"%s\" innehåller inte msgid "%s: field `%s' must not be empty" msgstr "%s: fält \"%s\" kan inte vara tomt" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: fält \"%s\" är inte definierat" @@ -597,37 +610,38 @@ msgstr "%s: fält \"%s\" är inte definier msgid "%s: field `%s' undefined" msgstr "%s: fält \"%s\" är odefinierat" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: skräp i slutet av tilläggsvärde i sträng %Zd i \"era\"-fält" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: skräp i slutet av startdatum i sträng %Zd i \"era\"-fält" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: skräp i slutet av slutdatum i sträng %Zd i \"era\"-fält" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: otillåten flagga -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: ofullständig \"END\"-rad" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" msgstr "%s: ogiltig kontrollsekvens \"%%%c\" i fält \"%s\" " @@ -637,27 +651,27 @@ msgstr "%s: ogiltig kontrollsekvens \"%% msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: ogiltig kontrollsekvens i fält \"%s\"" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: ogiltigt tal för tilläggsvärde i sträng %Zd i \"era\"-fält" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: ogiltigt antal sorteringsregler" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ogiltig flagga -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: ogiltigt startdatum i sträng %Zd i \"era\"-fält" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: ogiltigt slutdatum i sträng %Zd i \"era\"-fält" @@ -672,38 +686,38 @@ msgstr "%s: ogiltigt värde för fält \"%s msgid "%s: language abbreviation `%s' not defined" msgstr "%s: språkförkortning \"%s\" inte definierad" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: nyckelord \"order_end\" saknas" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: nyckelord \"reorder-end\" saknas" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: nyckelord \"reorder-sections-end\" saknas" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: eraformat i sträng %Zd i \"era\"-fält saknas" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: eranamn i sträng %Zd i \"era\"-fält saknas" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: dubbla definitioner av ordningsföljd i sektion \"%s\"" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: flera definitioner av ordningsföljd i namnlös sektion" @@ -718,7 +732,7 @@ msgstr "%s: felaktigt reguljärt uttryck msgid "%s: no identification for category `%s'" msgstr "%s: ingen idenitifikation för kategori \"%s\"" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: ingen representerbar definition av \"default_missing\" hittades" @@ -733,52 +747,52 @@ msgstr "%s: inte tillräckligt med sorter msgid "%s: numeric country code `%d' not valid" msgstr "%s: numerisk landkod \"%d\" är inte giltig" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: flaggan \"%c%s\" tar inget argument\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: flaggan \"%s\" är tvetydig\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: flaggan \"%s\" behöver ett argument\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: flaggan \"--%s\" tar inget argument\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaggan \"-W %s\" tar inget argument\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: flaggan \"-W %s\" är tvetydig\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan behöver ett argument -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: ordningsföljd för \"%.*s\" redan definierad i %s:%Zu" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: ordningsföljd för kollationselement %.*s är inte definierad ännu" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: ordningsföljd för kollationssymbol %.*s är inte definierad ännu" @@ -788,84 +802,84 @@ msgstr "%s: ordningsföljd för kollations msgid "%s: output would overwrite %s\n" msgstr "%s: utdata skulle skriva över %s\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panik: ogiltigt l_value %d\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: för tidigt filslut" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: sektion \"%.*s\" okänd" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: startdatum är ogiltigt i sträng %Zd i \"era\"-fält" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: slutdatum är ogiltigt i sträng %Zd i \"era\"-fält" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: symboliskt intervall kan inte omedelbart följas av \"order_end\"" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: symboliskt intervall kan inte vara omedelbart efter \"order_start\"" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: syntaxfel" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: syntaxfel i definition av ny teckenklass" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: syntaxfel i definition av ny teckenuppsättning" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: tabell för klass \"%s\": %lu byte\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: tabell för \"%s\": %lu byte\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: tabell för teckenstorlek: %lu byte\n" @@ -875,16 +889,21 @@ msgstr "%s: tabell för teckenstorlek: %l msgid "%s: terminology language code `%s' not defined" msgstr "%s: terminologilandskod \"%s\" inte definierad" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: start- och slut-symbol i ett intervall måste representera tecken" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: tredje operanden för värdet av fält \"%s\" kan inte vara större än %d" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: för få värden för fält \"%s\"" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -895,7 +914,12 @@ msgstr "%s: för många regler, första del msgid "%s: too many values" msgstr "%s: för många värden" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: för många värden för fält \"%s\"" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: transkriberingsdata för lokal \"%s\" är inte tillgänglig" @@ -905,47 +929,52 @@ msgstr "%s: transkriberingsdata för loka msgid "%s: unable to open %s: %m\n" msgstr "%s: kan inte öppna %s: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: okänt tecken i namn för kollationssymbol" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: okänt tecken i namnet i ekvivalensdefinitionen" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: okänt tecken i värdet i ekvivalensdefinitionen" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: okänt tecken i fält \"%s\"" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: okänt sektionsnamn \"%s\"" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: okänd symbol \"%s\" i ekvivalensdefinition" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: okänd flagga \"%c%s\"\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: okänd flagga \"--%s\"\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -959,6 +988,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: användning är %s [ -v ] [ -c gräns ] zonnamn ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: värdet för fält \"%s\" måste vara ett enskilt tecken" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: värden på fält \"%s\" måste vara i intervallet %d...%d" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -979,17 +1018,17 @@ msgstr "%s: värdet på fält \"int_curr_sy msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: värdet på fält \"int_curr_symbol\" har fel längd" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: värden på fält \"%s\" måste vara mindre än 127" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: värden på fält \"%s\" får inte vara större än %d" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: värden på fält \"%s\" får inte vara större än %d" @@ -1012,11 +1051,11 @@ msgstr "(PROGRAMFEL) Ingen version känd! msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(PROGRAMFEL) Flagga skulle känts igen!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Okänt objekt)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(okänt fel vid äkthetskontroll - %d)" @@ -1034,6 +1073,11 @@ msgstr "*** Filen \"%s\" är strippad: in msgid "*standard input*" msgstr "*standard in*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1047,16 +1091,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr ".lib-sektion i a.out korrupt" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; undre version = %lu, övre version = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; varför = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> och <%s> är otillåtna namn för intervall" @@ -1066,12 +1110,12 @@ msgstr "<%s> och <%s> är otillåtna namn msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> och <%s> är ogiltiga namn för intervall" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr "-tecknet får inte vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr "-tecknet är inte i klass \"%s\"" @@ -1087,7 +1131,7 @@ msgstr "?" msgid "Aborted" msgstr "Avbruten (SIGABRT)" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Åtkomsträttigheter: " @@ -1125,6 +1169,10 @@ msgstr "Annonseringsfel" msgid "Alarm clock" msgstr "Alarmklocka" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Alla begäran utförda" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Visa också en graf av totala minnesåtgången" @@ -1133,7 +1181,7 @@ msgstr "Visa också en graf av totala min msgid "Anode table overflow" msgstr "\"Anode\"-tabell flödar över" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "En till sträng för test." @@ -1165,7 +1213,7 @@ msgstr "Försök att länka in fler delade msgid "Attempting to link in too many shared libraries" msgstr "Försöker att länka in för många delade bibliotek" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Äkthetskontroll OK" @@ -1174,7 +1222,7 @@ msgstr "Äkthetskontroll OK" msgid "Authentication error" msgstr "Äkthetskontroll misslyckades" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "SKENOBJEKT\n" @@ -1229,7 +1277,7 @@ msgstr "Otillåtet värde för ai_flags" msgid "Be strictly POSIX conform" msgstr "Var strikt POSIX-konform" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Binärdata\n" @@ -1261,10 +1309,6 @@ msgstr "Brutet rör" msgid "Bus error" msgstr "Bussfel" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "Begränsning av CPU-tid överskriden" @@ -1282,77 +1326,82 @@ msgstr "Kan inte komma åt ett nödvändigt msgid "Can not exec a shared library directly" msgstr "Kan inte köra ett delat bibliotek direkt" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Kan inte ansluta till servern som betjänar denna domän" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "Kan inte byta katalog till /" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "Kan inte kommunicera med portmapper" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "Kan inte kommunicera med ypbind" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "Kan inte kommunicera med ypserv" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "Kan inte skapa temporär cache-fil \"%s\"" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "Kan inte hitta %s" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "Kan inte länka %s till %s" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" -msgstr "Kan inte ta status (lstat) på %s" +msgstr "Kan inte ta länkstatus på %s" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "Kan inte öppna cache-fil \"%s\"\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "Kan inte läsa cache-filkatalog \"%s\"\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "Kan inte öppna konfigurationsfil \"%s\"" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "Kan inte öppna katalog %s" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "Kan inte ta bort gammal temporär cache-fil %s" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "Kan inte ta status på %s" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "Kan inte ta status på %s\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "Kan inte ta bort (unlink) %s" @@ -1379,16 +1428,21 @@ msgstr "Kan inte skapa uttag (socket) fö msgid "Cannot exec a shared library directly" msgstr "Kan inte köra ett delat bibliotek direkt" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "Kan inte ta status (fstat) på fil %s.\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "Kan inte ha mer än en filgenereringsflagga!\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "Kan inte ta status (lstat) på %s" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "Kan inte minnesmappa (mmap) fil %s.\n" @@ -1422,33 +1476,38 @@ msgstr "Kan inte sätta uttagsflaggan (so msgid "Cannot specify more than one input file!\n" msgstr "Kan inte ange mer än en infil!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "Kan inte ta status på %s" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "Kan inte ange netid-flaggan tillsammans med inetd-flaggan!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "Kan inte ange netid-flaggan utan TIRPC!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "Kan inte ange tabellflaggor med ny stil\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Byt till och använd ROOT som rotkatalog" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "Misslyckades med att byta åtkomsträttigheter för %s till 0644" +msgid "Changing access rights of %s to %#o failed" +msgstr "Misslyckades med att byta åtkomsträttigheter för %s till %#o" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Kanalnummer utanför giltigt intervall" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Teckenseparator: %c\n" @@ -1457,11 +1516,11 @@ msgstr "Teckenseparator: %c\n" msgid "Child exited" msgstr "Barnprocess avslutad" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Klientens referenser är för svaga" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Kolumner :\n" @@ -1479,7 +1538,7 @@ msgstr "Kompilera lokalspecifikation" msgid "Computer bought the farm" msgstr "Datorn packade ihop" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Konfigurera bindningar för den dynamiska länkaren." @@ -1509,14 +1568,14 @@ msgstr "Förbindelsen dog ut (timeout)" msgid "Continued" msgstr "Återupptagen" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Konvertera kodning i angivna infiler från en kodning till en annan." -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1537,6 +1596,10 @@ msgstr "Kunde inte skapa loggfil \"%s\"" msgid "Create C header file NAME containing symbol definitions" msgstr "Skapa C-huvudfil NAMN innehållande symboldefinitioner" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Skapa en konfigurationsfil för snabbladdning av modul \"iconv\"" + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Skapa tabeller i gammal stil" @@ -1545,7 +1608,7 @@ msgstr "Skapa tabeller i gammal stil" msgid "Create output even if warning messages were issued" msgstr "Skapa utfil även om varningsmeddelanden genererades" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Skapad: %s" @@ -1564,19 +1627,11 @@ msgstr "DATAFIL [UTFIL]" msgid "DES entry for netname %s not unique\n" msgstr "DES-post för nätnamn %s är inte unikt\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "KATALOG\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "DST inte tillåten i SUID/SGID-program" @@ -1588,7 +1643,7 @@ msgstr "FEL I DYNAMISK LÄNKARE!!!" msgid "Database for table does not exist" msgstr "Databas för tabell existerar inte" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "Databasen är upptagen" @@ -1596,7 +1651,7 @@ msgstr "Databasen är upptagen" msgid "Deadlock situation detected/avoided" msgstr "Undvek/upptäckte dödlägessituation" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Standard åtkomsträttigheter:\n" @@ -1623,12 +1678,12 @@ msgstr "Enheten är inte en stream" msgid "Device or resource busy" msgstr "Enhet eller resurs upptagen" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bitar)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Katalog : %s\n" @@ -1657,15 +1712,15 @@ msgstr "Skapa inte barnprocess, visa med msgid "Do not use existing catalog, force new output file" msgstr "Använd inte existerande katalog, gör en ny utfil" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "Domän inte bunden" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "Bygg inte cache" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "Generera inte länkar" @@ -1673,31 +1728,31 @@ msgstr "Generera inte länkar" msgid "Dump information generated by PC profiling." msgstr "Visa information genererad av PC-profilering." -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "ELF-fil har felaktig version på ABI" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ELF-fil har felaktig version på OS-ABI" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "ELF-filens version stämmer inte med nuvarande" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "ELF-filens versionsidentitet stämmer inte med nuvarande" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "ELF-filens värde på \"phentsize\" är inte den förväntade" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "Address/position för ELF-laddkommando är inte på rätt bytegräns" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "ELF-laddkommando är inte på sidgräns" @@ -1705,11 +1760,11 @@ msgstr "ELF-laddkommando är inte på sidg msgid "EMT trap" msgstr "Emulatorfälla" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "POST\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "Krypterat data\n" @@ -1863,7 +1918,11 @@ msgstr "Fel i okänt felsystem: " msgid "Error while talking to callback proc" msgstr "Fel vid kommunikation till återanropsprocess" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Fel vid skrivning till standard ut" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Fel: .netrc kan läsas av andra." @@ -1886,7 +1945,7 @@ msgstr "FATALT: systemet definierar inte msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "FIL innehåller avbildning från symboliska namn till UCS4-värden" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Misslyckades (ospecificerat fel)" @@ -1895,7 +1954,7 @@ msgstr "Misslyckades (ospecificerat fel) msgid "Failed to look up user '%s' to run server as" msgstr "Kunde inte hitta användaren \"%s\" att köra servern som" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "Fil %s är för liten, inte kontrollerad." @@ -1912,7 +1971,7 @@ msgstr "Filidentifierare i felaktigt til msgid "File exists" msgstr "Filen existerar" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "Filen är inte en cache-fil.\n" @@ -1946,7 +2005,7 @@ msgstr "Filtabell flödade över" msgid "File too large" msgstr "Fil för stor" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Första strängen för test." @@ -1958,7 +2017,7 @@ msgstr "Första/Nästa-kedja bruten" msgid "Floating point exception" msgstr "Aritmetiskt fel" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Format att använda: \"new\", \"old\" eller \"compat\" (standardvärde)" @@ -1975,7 +2034,7 @@ msgstr "Fullständig resynkronisering krä msgid "Function not implemented" msgstr "Funktion inte implementerad" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "GRUPP\n" @@ -2000,7 +2059,7 @@ msgstr "" msgid "Generate output linear to time (default is linear to number of function calls)" msgstr "Generera utdata linjär i tiden (standardvärde är linjär mot anta funktionsanrop)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Använd utförligare meddelanden" @@ -2008,7 +2067,7 @@ msgstr "Använd utförligare meddelanden" msgid "Generic system error" msgstr "Generiskt systemfel" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Hämta lokal-specifik information" @@ -2025,12 +2084,12 @@ msgstr "Skriv denna hjälplista" msgid "Gratuitous error" msgstr "Omotiverat fel" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Grupp : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Gruppflaggor: " @@ -2095,16 +2154,12 @@ msgstr "I/O möjligt" msgid "IOT trap" msgstr "IOT-fälla" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "Identifierare borttagen" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Ignorerar fil %s eftersom den inte är en vanlig fil" @@ -2157,7 +2212,7 @@ msgstr "Operation för bakgrundsprocess o msgid "Information request" msgstr "Informationsbegäran" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Information:" @@ -2165,12 +2220,12 @@ msgstr "Information:" msgid "Input Files:" msgstr "Infiler:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "Hittar inte infil %s.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "In/ut formatspecifikation:" @@ -2179,11 +2234,11 @@ msgstr "In/ut formatspecifikation:" msgid "Input/output error" msgstr "In/ut-fel" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Internt NIS-fel" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Internt ypbind-fel" @@ -2191,6 +2246,10 @@ msgstr "Internt ypbind-fel" msgid "Interrupt" msgstr "Avbruten (SIGINT)" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Avbruten av en signal" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2214,27 +2273,27 @@ msgstr "Avbrutet systemanrop borde omsta msgid "Invalid argument" msgstr "Ogiltigt argument" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Ogiltig bakåtreferens" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Ogiltigt teckenklassnamn" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Ogiltiga klientreferenser" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Ogiltig klientverifierare" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Ogiltigt kollationeringstecken" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "Ogiltigt innehåll i \\{\\}" @@ -2259,15 +2318,15 @@ msgstr "Ogiltigt objekt för operationen" msgid "Invalid or incomplete multibyte or wide character" msgstr "Ogiltig eller inte komplett flerbyte- eller brett tecken" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "Ogiltigt föregående reguljärt uttryck" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Ogiltigt intervallslut" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "Ogiltigt reguljärt uttryck" @@ -2279,7 +2338,7 @@ msgstr "Ogiltig åtkomstkod" msgid "Invalid request descriptor" msgstr "Ogiltig frågedeskriptor" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Ogiltig serververifierare" @@ -2307,7 +2366,7 @@ msgstr "Är en namnfil" msgid "Is a named type file" msgstr "Är av typ namnfil" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2315,7 +2374,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Dödad" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "LÄNK\n" @@ -2358,20 +2417,20 @@ msgstr "Länkantal utanför giltigt område msgid "Link points to illegal name" msgstr "Länk pekar på ett otillåtet namn" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Länkad objekttyp: " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Länkad till: %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Lokalt domännamn inte satt" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Allokeringsfel för lokal resurs" @@ -2388,11 +2447,11 @@ msgstr "Felaktigt namn eller otillåtet n msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "Obligatoriska respektive valfria argument för långa flaggor är obligatoriska repektive valfria även för korta." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Länka enskilda bibliotek manuellt." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Huvudserver:\n" @@ -2404,7 +2463,7 @@ msgstr "Huvudserver är upptagen, full du msgid "Memory allocation failure" msgstr "Minnesallokeringsfel" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Minnet slut" @@ -2423,7 +2482,7 @@ msgstr "Meddelandet för långt" msgid "Missing or malformed attribute" msgstr "Saknat eller felaktigt attribut" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Ändr. tid : %s" @@ -2436,7 +2495,7 @@ msgstr "Ändring misslyckades" msgid "Modify operation failed" msgstr "Ändringsoperation misslyckades" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Ändra utdataformat:" @@ -2454,7 +2513,7 @@ msgstr "Användarnamn krävs för \"server- msgid "NAME" msgstr "NAMN" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2462,15 +2521,11 @@ msgstr "" "NAMN\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "NIS versionsskillnad klient/server - kan inte betjäna" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "NIS tabelldatabas är felaktig" @@ -2486,7 +2541,7 @@ msgstr "NIS+ servers kan inte nås" msgid "NIS+ service is unavailable or not installed" msgstr "NIS+ service är otillgänglig eller inte installerad" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "INGET OBJEKT\n" @@ -2494,7 +2549,7 @@ msgstr "INGET OBJEKT\n" msgid "NUMBER" msgstr "ANTAL" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Namn: \"%s\"\n" @@ -2584,7 +2639,7 @@ msgstr "Ingen anod" msgid "No buffer space available" msgstr "Ingen buffertplats tillgänglig" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "Inget namn definierat i teckenuppsättning" @@ -2601,8 +2656,8 @@ msgstr "Inga barnprocesser" msgid "No data available" msgstr "Inga data tillgängliga" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2615,7 +2670,7 @@ msgstr "Hittade ingen definition för kat msgid "No file space on server" msgstr "Inget filutrymme hos servern" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "Ingen länk skapad eftersom \"soname\" inte hittades för %s" @@ -2628,7 +2683,7 @@ msgstr "Ingen länk skapad eftersom \"son msgid "No locks available" msgstr "Inga lås tillgängliga" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "Ingen träff" @@ -2641,11 +2696,11 @@ msgstr "Inget medium funnet" msgid "No message of desired type" msgstr "Inget meddelande av önskad typ" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "Inga fler poster i tabelldatabasen" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "Inget föregående reguljärt uttryck" @@ -2695,11 +2750,11 @@ msgstr "Enheten eller adressen finns int msgid "No such file or directory" msgstr "Filen eller katalogen finns inte" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Ingen sådan nyckel i tabellen" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "Ingen sådan tabell i serverns domän" @@ -2717,7 +2772,7 @@ msgstr "Icke-NIS+ namnrymd påträffad" msgid "Non-recoverable failure in name resolution" msgstr "Oreparerbart fel i namnuppslagning" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Ingen.\n" @@ -2784,12 +2839,12 @@ msgstr "Inte ägare" msgid "Not supported" msgstr "Stöds ej" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Antal kolumner : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Antal objekt : %u\n" @@ -2810,17 +2865,17 @@ msgstr "Numeriskt argument är utanför om msgid "Numerical result out of range" msgstr "Numeriskt resultat är utanför giltigt område" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Objekt #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Objektnamn : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Objekttyp : " @@ -2837,11 +2892,11 @@ msgstr "Är ett fjärrobjekt" msgid "Object with same name exists" msgstr "Objekt med samma namn existerar" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Ojämnt antal citationstecken" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "Behandla endast kataloger givna som argument. Bygg inte cache." @@ -2923,7 +2978,7 @@ msgstr "Stream-resurserna är slut" msgid "Out of streams resources" msgstr "Stream-resurserna är slut" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Styr utdata:" @@ -2931,12 +2986,12 @@ msgstr "Styr utdata:" msgid "Output selection:" msgstr "Välj utdata:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Ägare : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "PRIVAT\n" @@ -2958,13 +3013,13 @@ msgstr "Delvis lyckat" msgid "Passed object is not the same object on server" msgstr "Skickat objekt är inte samma objekt hos servern" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "Sökväg \"%s\" given mer än en gång" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2974,11 +3029,11 @@ msgstr "Åtkomst nekas" msgid "Power failure" msgstr "Strömavbrott" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "För tidigt slut på reguljärt uttryck" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Visa cache" @@ -2986,6 +3041,10 @@ msgstr "Visa cache" msgid "Print current configuration statistic" msgstr "Skriv ut nuvarande konfigurationsstatistik" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Skriv mer information" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Skriv mer meddelanden" @@ -3002,6 +3061,10 @@ msgstr "Troligtvis lyckat" msgid "Probably not found" msgstr "Förmodligen inte funnen" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Behandling av begäran pågår" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "Profileringsklocka" @@ -3059,7 +3122,7 @@ msgstr "RFS-specifikt fel" msgid "RPC bad procedure for program" msgstr "RPC dålig procedur för program" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "RPC-fel vid NIS-operation" @@ -3083,88 +3146,88 @@ msgstr "RPC-struktur dålig" msgid "RPC version wrong" msgstr "RPC-version fel" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (okänd felkod)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: Fel vid äkthetskontroll" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: Kan inte avkoda resultatet" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: Kan inte koda argumentet" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Misslyckades (ospecificerat fel)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: Inkompatibla versioner av RPC" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Fel i portöversättare" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: Procedur inte tillgänglig" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: Programmet inte registrerat" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: Programmet otillgängligt" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: Program/version-inkompatibilitet" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: Fjärrsystemsfel" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: Server kan inte avkoda argumenten" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: Lyckat" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: Tiden löpte ut" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: Kan inte ta emot" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: Kan inte skicka" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: Okänd värdmaskin" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: Okänt protokoll" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bitar)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "RTLD_NEXT används i kod som inte är dynamiskt laddad" @@ -3187,7 +3250,7 @@ msgstr "Filsystemet endast läsbart" msgid "Real-time signal %d" msgstr "Realtidssignal %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Reguljärt uttryck för stort" @@ -3201,11 +3264,11 @@ msgstr "I/O-fel på fjärrmaskin" msgid "Remote address changed" msgstr "Fjärradress ändrades" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Ta bort lösenord eller gör filen oläsbar för andra" -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "Namnbyte på %s till %s misslyckades" @@ -3215,7 +3278,7 @@ msgstr "Namnbyte på %s till %s misslycka msgid "Reopening shared object `%s' failed" msgstr "Öppna delat object \"%s\" igen misslyckades" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Replikerad:\n" @@ -3224,18 +3287,26 @@ msgstr "Replikerad:\n" msgid "Report bugs to %s.\n" msgstr "Rapportera fel till %s.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "" "Rapportera fel med programmet \"glibcbug\" till .\n" "Rapportera fel på översättningen till .\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Argument för förfrågan felaktiga" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Begäran avbruten" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Begäran inte avbruten" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Reserverad för framtida användning" @@ -3306,11 +3377,7 @@ msgstr "Resultat är skickade till återan msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Sökväg : %s\n" @@ -3327,11 +3394,11 @@ msgstr "Server upptagen, försök igen" msgid "Server out of memory" msgstr "Server har slut på minne" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "Server förkastade kreditiv" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "Server förkastade verifierare" @@ -3399,7 +3466,7 @@ msgstr "Förlegat NFS-filhandtag" msgid "Start NUMBER threads" msgstr "Starta ANTAL trådar" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Status : %s\n" @@ -3429,7 +3496,7 @@ msgstr "Streams-rörfel" msgid "Structure needs cleaning" msgstr "Strukturen behöver städas" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Lyckat" @@ -3450,11 +3517,11 @@ msgstr "Symboliska teckennamn definierad msgid "System error" msgstr "Systemfel" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Systeminformation:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Allokeringsfel för systemresurs" @@ -3475,7 +3542,7 @@ msgstr "" msgid "TABLE" msgstr "TABELL" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TABELL\n" @@ -3483,7 +3550,7 @@ msgstr "TABELL\n" msgid "TABLE,yes" msgstr "TABELL,yes" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Tabelltyp : %s\n" @@ -3506,7 +3573,7 @@ msgstr "Avslutad" msgid "Text file busy" msgstr "Kodfil upptagen" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3522,11 +3589,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "Denna implementation stödjer inte \"newstyle\" eller trådsäker kod!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Livslängd: " @@ -3600,7 +3667,7 @@ msgstr "För många användare" msgid "Trace/breakpoint trap" msgstr "Spårningsfälla" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Avslutande omvänt snedstreck" @@ -3632,12 +3699,12 @@ msgstr "Transportslutpunkten är inte för msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Försök med \"%s --help\" eller \"%s --usage\" för mer information\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Typ: %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "OKÄND" @@ -3657,31 +3724,35 @@ msgstr "Kan inte skapa återanrop" msgid "Unable to create process on server" msgstr "Kan inte skapa process hos server" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Okänd (typ = %d, bitar = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Okänt .netrc-nyckelord %s" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "Okänd ELFCLASS in fil %s.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Okänd NIS-felkod" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Okänt OS" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Okänd databas: %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Okänt fel" @@ -3717,31 +3788,31 @@ msgstr "Okänt fel hos server" msgid "Unknown signal %d" msgstr "Okänd signal %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Okänt systemfel" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Okänt ypbind-fel" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "Obalanserade ( eller \\(" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr "Obalanserade ) eller \\)" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "Obalanserade [ eller [^" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "Obalanserad \\{" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Okänd variabel \"%s\"" @@ -3754,20 +3825,20 @@ msgstr "Akut I/O-tillstånd" msgid "Usage:" msgstr "Användning:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Användning: %s variabelnamn [sökväg]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Användning: %s [-v specifikation] variabelnamn [sökväg]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Användning: rpcinfo [ -n portnr ] -u värd prognr [ versnr ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Använd CACHE som cache-fil" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Använd CONF som konfigurationsfil" @@ -3792,7 +3863,7 @@ msgstr "Värdet för stort för definierad msgid "Virtual timer expired" msgstr "Alarmklocka - virtuell tid" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Vilt resultat från kommandokörning" @@ -3800,19 +3871,19 @@ msgstr "Vilt resultat från kommandokörni msgid "Window changed" msgstr "Ändrat fönster" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Skriv namn på tillgängliga teckenuppsättningar" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Skriv namn på tillgängliga lokaler" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Skriv namn på valda kategorier" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Skriv namn på valda nyckelord" @@ -3820,18 +3891,18 @@ msgstr "Skriv namn på valda nyckelord" msgid "Write output to file NAME" msgstr "Skriv resultatet till NAMN" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "Skrivning av cache-data misslyckades" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "Skrivning av cache-data misslyckades." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "Skriven av %s.\n" @@ -3840,14 +3911,6 @@ msgstr "Skriven av %s.\n" msgid "Wrong medium type" msgstr "Fel typ på mediet" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3862,11 +3925,15 @@ msgstr "Ja, meningen med livet är 42" msgid "You really blew it this time" msgstr "Du strulade till det den här gången" -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "Zon-fortsättningsradens sluttid är inte efter sluttiden på föregående rad" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[KATALOG...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[FIL...]" @@ -3898,13 +3965,13 @@ msgstr "\"%.*s\" redan definerad i tecke msgid "`%.*s' already defined in repertoire" msgstr "\"%.*s\" redan definierad i repertoar" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "definition av \"%1$s\" slutar inte med \"END %1$s\"" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "\"%s\" och \"%.*s\" är otillåtna namn för symboliskt intervall" @@ -3914,7 +3981,7 @@ msgstr "\"%s\" och \"%.*s\" är otillåtna msgid "`%s' is no correct profile data file for `%s'" msgstr "\"%s\" är inte en korrekt profildatafil för \"%s\"" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "\"digit\"-kategori har inte poster i grupper av tio" @@ -3930,12 +3997,12 @@ msgstr "ai_socktype stöds ej" msgid "already running" msgstr "kör redan" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "argumentet till <%s> måste vara ett enskilt tecken" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "argumentet till \"%s\" måste vara ett enskilt tecken" @@ -3948,28 +4015,28 @@ msgstr "auth_none.c - Fatalt kodningspro msgid "authunix_create: out of memory\n" msgstr "authunix_create: minnet slut\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "dåligt argument" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "olämplig ägare" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "tomt \"FROM\"-fält på \"Link\"-rad" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "tomt \"TO\"-fält på \"Link\"-rad" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "block frigjort två gånger\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "felaktig mcheck_status, biblioteket är felaktigt\n" @@ -3993,11 +4060,11 @@ msgstr "cache_set: offerallokering missl msgid "cache_set: victim not found" msgstr "cache_set: offer hittades inte" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "kan inte avgöra tidszonsförkortning att använda just efter \"until\"-tid" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "kan inte ändra procedurnummer %ld\n" @@ -4011,15 +4078,15 @@ msgstr "kan inte återställa segmenträtti msgid "cannot add already read locale `%s' a second time" msgstr "kan inte lägga till en redan inläst lokal \"%s\" en andra gång" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "kan inte allokera beroendelista" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "Kan inte allokera minne för programhuvud" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "kan inte allokera namnpost" @@ -4027,31 +4094,27 @@ msgstr "kan inte allokera namnpost" msgid "cannot allocate symbol data" msgstr "kan inte allokera symboldata" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "kan inte allokera söklista för symboler" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "kan inte allokera tabell för versionsreferenser" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "kan inte ändra minnesskydd" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "kan inte skapa kopia av RUNPATH/RPATH" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "kan inte skapa cache för sökväg" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "kan inte skapa kapabilitetslista" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "kan inte skapa intern deskriptor" @@ -4060,23 +4123,28 @@ msgstr "kan inte skapa intern deskriptor msgid "cannot create internal descriptors" msgstr "kan inte skapa interna deskriptorer" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "kan inte skapa utfil \"%s\" för kategori \"%s\"" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "kan inte skapa säkvägslista" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "kan inte skapa söklista" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "kan inte skapa delad objektdeskriptor" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "kan inte avgöra kontrolltecken" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "kan inte ladda exekverbar fil dynamiskt" @@ -4098,7 +4166,11 @@ msgstr "kan inte hitta C preprocessor: % msgid "cannot find any C preprocessor (cpp)\n" msgstr "kan inte hitta någon C preprocessor (cpp)\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "kan inte generera utfil" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "Kan inte hantera äldre förfrågansversion %d, nuvarande version är %d" @@ -4107,19 +4179,15 @@ msgstr "Kan inte hantera äldre förfrågan msgid "cannot load profiling data" msgstr "kan inte läsa profildata" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "kan inte ladda delat objekt" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "kan inte göra segment skrivbart för relokering" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "kan inte mappa nollfyllda sidor" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "kan inte öppna" @@ -4132,7 +4200,7 @@ msgstr "kan inte öppna \"%s\"" msgid "cannot open input file" msgstr "kan inte öppna infil" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "kan inte öppna infil \"%s\"" @@ -4143,21 +4211,21 @@ msgstr "kan inte öppna infil \"%s\"" msgid "cannot open locale definition file `%s'" msgstr "kan inte öppna lokaldefinitionsfil \"%s\"" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "kan inte öppna utfil" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "kan inte öppna utfil \"%s\"" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "kan inte öppna utfil \"%s\" för kategori \"%s\"" -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "kan inte öppna delad objektfil" @@ -4166,7 +4234,7 @@ msgstr "kan inte öppna delad objektfil" msgid "cannot open socket: %s" msgstr "kan inte öppna uttag (socket): %s" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "kan inte öppna nollfyllnadsenhet" @@ -4179,7 +4247,7 @@ msgstr "kan inte läsa teckenuppsättnings msgid "cannot read configuration file; this is fatal" msgstr "kan inte läsa konfigurationsdata, detta är fatalt" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "kan inte läsa fildata" @@ -4192,11 +4260,6 @@ msgstr "kan inte läsa huvud" msgid "cannot read header from `%s'" msgstr "kan inte läsa huvud från \"%s\"" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "kan inte läsa lokalkatalog \"%s\"" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "kan inte läsa statistikdata" @@ -4205,7 +4268,7 @@ msgstr "kan inte läsa statistikdata" msgid "cannot safe new repertoire map" msgstr "kan inte säkra repertoartabell" -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "kan inte ta status på delat objekt" @@ -4219,7 +4282,7 @@ msgstr "kan inte ta status på fil \"%s\" msgid "cannot write output files to `%s'" msgstr "kan inte skriva utfiler till \"%s\"" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "kan inte skriva resultat: %s" @@ -4229,76 +4292,80 @@ msgstr "kan inte skriva resultat: %s" msgid "cannot write statistics: %s" msgstr "kan inte skriva statistik: %s" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "tecken \"%s\" i klass \"%s\" måste vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "tecken \"%s\" i klass \"%s\" får inte vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr "tecken inte definierat i teckenuppsättning" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "tecken L\"\\u%0*x\" i klass \"%s\" måste vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "tecken L\"\\u%0*x\" i klass \"%s\" får inte vara i klass \"%s\"" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "tecken \"%s\" inte definierat men behövs som standardvärde" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "teckenklass \"%s\" redan definierad" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "teckenuppsättning \"%s\" redan definierad" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "teckenuppsättning \"%s\" är inte ASCII-kompatibel, lokal är inte ISO C-kompatibel\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "teckenuppsättningsfil \"%s\" finns inte" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "teckenuppsättningar med låsta tillstånd stöds ej" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "ost" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "cirkulärt beroende mellan lokaldefinitioner" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Fatalt fel vid serialisering" -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: minnet slut\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: minnet slut\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: minnet slut\n" @@ -4306,28 +4373,28 @@ msgstr "clntunix_create: minnet slut\n" msgid "constant or identifier expected" msgstr "konstant eller identifierare förväntad" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "konvertering från \"%s\" till \"%s\" stöds ej" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "konverteringsmoduler inte tillgängliga" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "omvandlingsvärde kan inte vara noll" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "konvertering avslutades på grund av problem med att skriva resultatet" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "kunde inte skapa en rpc-server\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "kunde inte registrera prog %ld vers %ld\n" @@ -4336,17 +4403,17 @@ msgstr "kunde inte registrera prog %ld v msgid "database [key ...]" msgstr "databas [nyckel ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "standardteckenuppsättningsfil \"%s\" inte hittad" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "dubblerad definition av <%s>" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "dubblerad definition för skript \"%s\"" @@ -4355,12 +4422,12 @@ msgstr "dubblerad definition för skript msgid "duplicate set definition" msgstr "dubblerad definition av mängd" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "dubblerat zonnamn %s (fil \"%s\", rad %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "dubblerad definition för mappning \"%s\"" @@ -4373,7 +4440,7 @@ msgstr "dubblerad meddelandeidentifierar msgid "duplicated message number" msgstr "dubblerat meddelandenummer" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "intervall måste markeras med två operander av samma typ" @@ -4381,9 +4448,13 @@ msgstr "intervall måste markeras med två msgid "empty char string" msgstr "tom teckensträng" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" -msgstr "\"dynamic string token\" byttes mot tom sträng" +msgstr "substitution av \"dynamic string token\" är tom" + +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "substitution av \"dynamic string token\" är tom" #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" @@ -4401,29 +4472,29 @@ msgstr "enablecache: kunde inte allokera msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: kunde inte allokera cache-fifo" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "kodning för resultatet" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "kodning av originaltexten" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "kunde inte hämta anropandes identitet: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "fel när ekvivalent kollationssymbol lades till" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "fel vid stängning av indata \"%s\"" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "fel vid stängning av utfilen" @@ -4431,7 +4502,8 @@ msgstr "fel vid stängning av utfilen" msgid "error while closing the profiling data file" msgstr "fel vid stängning av profildatafilen" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "fel när indata lästes" @@ -4439,10 +4511,14 @@ msgstr "fel när indata lästes" msgid "expect string argument for `copy'" msgstr "förväntar strängargument för \"copy\"" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "förväntad fortsättningsrad inte funnen" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "extra avslutande semikolon" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4452,7 +4528,7 @@ msgstr "misslyckades med att ladda delat msgid "failed to load symbol data" msgstr "misslyckades att ladda symboldata" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "misslyckades att mappa segment från delat objekt" @@ -4460,18 +4536,19 @@ msgstr "misslyckades att mappa segment f msgid "failed to mmap the profiling data file" msgstr "misslyckades att mappa (mmap) profildatafilen" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "misslyckades att starta konverteringsprocessen" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "misslyckades skriva data för kategori \"%s\"" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl_ F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "fil %s är trunkerad\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4480,19 +4557,19 @@ msgstr "fcntl_ F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "fil \"%s\" finns redan och kan bli överskriven\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "fil för kort" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "misslyckades ta status (fstat)" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "skräp i slutet av teckenkodsspecifikation" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "skräp i slutet av nummer" @@ -4512,28 +4589,28 @@ msgstr "get_myaddress: ioctl (hämta grän msgid "getent - get entries from administrative database." msgstr "getent - hämta poster från administrativ databas" -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: begäran mottagen (version = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "hård länk misslyckades, använder symbolisk länk" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "hårdlänkad någonstans" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "hexadecimalt intervallformat bör endast använda versaler" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "otillåtet \"CORRECTION\"-fält på \"Leap\"-rad" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "otillåtet \"Rolling/Stationary\"-fält på \"Leap\"-rad" @@ -4541,11 +4618,16 @@ msgstr "otillåtet \"Rolling/Stationary\" msgid "illegal character in file: " msgstr "otillåtet tecken i fil: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "otillåten teckensekvens vid strängslut" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "otillåten indatasekvens vid position %Zd" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" msgstr "otillåten indatasekvens vid position %ld" @@ -4559,102 +4641,102 @@ msgstr "otillåten nättyp: \"%s\"\n" msgid "illegal set number" msgstr "otillåtet tal för mängd" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "implementationsbegränsning: inte fler än %Zd teckenklasser tillåtna" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "implementationsbegränsning: inte fler än %d teckenuppsättningar tillåtet" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "ofullständigt tecken eller skift-sekvens i slutet på buffert" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "inrad av okänd typ" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "internt fel" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "internt fel (otillåten deskriptor)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "internt fel - addtype anropad med felaktig isdst" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "internt fel - addtype anropad med felaktig ttisgmt" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "internt fel - addtype anropad med felaktig ttisstd" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "internt fel i %s, rad %u" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "ogiltigt ELF-huvud" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "ogiltigt UTC-tillägg" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "ogiltigt förkortningsformat" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "ogiltigt tecken: meddelandet ignorerat" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "ogiltig dag i månaden" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "ogiltig definition" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "ogiltig kodning given" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "ogiltigt slutår" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "ogiltig kontrollsekvens" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "ogiltigt skottår" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "ogiltig rad" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "ogiltiga flaggor för dlopen()" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "ogiltigt månadsnamn" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "ogiltiga namn för teckenintervall" @@ -4667,52 +4749,52 @@ msgstr "ogiltig pekarstorlek" msgid "invalid quote character" msgstr "ogiltigt citattecken" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "ogiltigt sparad tid" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "ogiltigt startår" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "ogiltig tid på dagen" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "ogiltigt veckodagsnamn" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "nyckellängd i begäran för lång: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "libc4-bibliotek %s i fel katalog" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "libc5-bibliotek %s i fel katalog" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "libc6-bibliotek %s i fel katalog" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "bibliotek %s och %s i katalog %s har samma \"soname\" men olika typ." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "för lång rad" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "visa alla kända teckenuppsättningar" @@ -4720,7 +4802,7 @@ msgstr "visa alla kända teckenuppsättnin msgid "locale name should consist only of portable characters" msgstr "lokalnamn får endast bestå av portabla tecken" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "misslyckades ta status (lstat)" @@ -4732,7 +4814,11 @@ msgstr "gör resultatgrafiken VALUE pixla msgid "make output graphic VALUE pixel wide" msgstr "gör resultatgrafiken VALUE pixlar bred" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: kan inte hantera mer än 8 argument\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "felaktig rad ignorerad" @@ -4744,39 +4830,34 @@ msgstr "mappning av sektionshuvuds strän msgid "mapping of section headers failed" msgstr "mappning av sektionshuvud misslyckades" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "minnet förstört före allokerat block\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "minnet förstört efter slutet på allokerat block\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "minne slut" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "minnet är konsistent, biblioteket är felaktigt\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "minnesmappning av cache-fil misslyckades.\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "fler än ett dynamiskt segment\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "namnlös regel" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "varken original- eller målkodning angvet" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4809,7 +4890,7 @@ msgstr "netname2user: principalnamn \"%s msgid "netname2user: should not have uid 0" msgstr "netname2user: borde inte ha uid 0" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "aldrig registrerat prog %d\n" @@ -4818,11 +4899,11 @@ msgstr "aldrig registrerat prog %d\n" msgid "no or value given" msgstr "inget eller värde angivet" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "ingen dag i månaden matchar regeln" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "ingen definition av \"UNDEFINED\"" @@ -4831,7 +4912,7 @@ msgstr "ingen definition av \"UNDEFINED\ msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "inget filnam för profildata angivet och delat objekt \"%s\" saknar \"soname\"" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "inga siffror för indata definierade och inga standardnamn finns i teckenuppsättningen" @@ -4839,37 +4920,37 @@ msgstr "inga siffror för indata definier msgid "no other keyword shall be specified when `copy' is used" msgstr "inget annat nyckelord får anges när \"copy\" används" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "inga siffror för utdata definierade och inga standardnamn finns i teckenuppsättningen" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "ingen utfil skapad på grund av varningar" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "inget symboliskt namn givet" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "inget symboliskt namn givet för slutet av intervallet" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "icke-symboliskt teckenvärde bör inte användas" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "alla tecken i \"outdigit\" är inte tillgängliga i teckenuppsättningen" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "alla tecken i \"outdigit\" är inte tillgängliga i repertoaren" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "inte en normal fil" @@ -4888,36 +4969,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd kör inte!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "objektfilen har ingen dynamisk sektion" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "visa inte ogiltiga tecken i utdata" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "bara ET_DYN och ET_EXEC kan laddas" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "endast definition av \"WIDTH\" får följa definitionen av \"CHARMAP\"" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "ordningsföljd för \"%.*s\" redan definierad vid %s:%Zu" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "originalkodning inte angiven med \"-f\"" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "slut på minne" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "resultatfil" @@ -4925,19 +5002,19 @@ msgstr "resultatfil" msgid "pmap_getmaps rpc problem" msgstr "pmap_getmaps rpc problem" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: protokollfel i förbindelseuppsättning\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "för tidigt slut på definition för \"translit_ignore\"" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "preprocessorfel" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "föregående definition var här" @@ -4945,7 +5022,7 @@ msgstr "föregående definition var här" msgid "print list of count paths and their number of use" msgstr "skriv lista med räknade vägar och antal användningar" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "skriv information om körning" @@ -4971,30 +5048,30 @@ msgstr "program %lu version %lu är inte msgid "program %lu version %lu ready and waiting\n" msgstr "program %lu version %lu redo och väntar\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: läsning gav för lite data" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (sätter upp standard fel): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: uttag (socket): Alla portar används\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write: (sätter upp standard fel): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: minnet slut\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "upprepat skottsekundstillfälle" @@ -5003,7 +5080,7 @@ msgstr "upprepat skottsekundstillfälle" msgid "repertoire map file `%s' not found" msgstr "hittar inte repertoartabell \"%s\"" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "resulterande byte för intervall är inte representerbara." @@ -5039,24 +5116,24 @@ msgstr "rpcinfo: utsändning misslyckades msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: kan inte kontakta portmapper" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "samma regel i flera filer" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "delat objekt kan inte göras dlopen() på" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "delat objekt är inte öppnat" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "fattas data vid läsning av begäransnyckel: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "fattas data vid läsning av begäran: %s" @@ -5066,35 +5143,31 @@ msgstr "fattas data vid läsning av begär msgid "short write in %s: %s" msgstr "ofullständig skrivning i %s: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "uttag (socket): protokollfel i förbindelseuppsättning\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "standard in" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "standard ut" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "start- och slutteckensekvens för intervall måste ha samma längd" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "startår är större än slutår" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "startår för stort för att kunna representeras" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "startår för litet för att kunna representeras" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "utelämna varningar" @@ -5102,31 +5175,31 @@ msgstr "utelämna varningar" msgid "svc_run: - poll failed" msgstr "svc_run: - poll misslyckades" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - kan inte anropa getsockname eller listen" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - problem att skapa tcp-uttag (socket)" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: minnet slut\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - problem att skapa AF_UNIX uttag (socket)" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - kan inte anropa getsockname eller listen" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: minnet slut\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: minnet slut\n" @@ -5146,49 +5219,49 @@ msgstr "svcudp_create: problem att skapa msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: xp_pad är för liten för IP_PKTINFO\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: minnet slut\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "symbol \"%.*s\" finns inte i teckenuppsättning" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "symbol \"%.*s\" finns inte i repertoartabell" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "symbol \"%s\"" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "symbol \"%s\" har samma värde som" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "symbol \"%s\" inte definierad" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "syntaxfel" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "syntaxfel i definition av %s: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5200,73 +5273,69 @@ msgstr "syntaxfel i prolog: %s" msgid "syntax error in repertoire map definition: %s" msgstr "syntaxfel i repertoartabellsdefinition: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "syntaxfel: inte inne i en lokaldefinition" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "målkodning inte angivet med flagga \"-t\"" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "detta är den första definitionen" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "tid före noll" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "för stort tidsvärde" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "tillvärdet i intervallet är mindre än frånvärdet " -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "tillvärdets teckensekvens är mindre än frånvärdets sekvens" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "för få byte i teckenkodning" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "för många tecken i teckenkodning" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "för många skottsekunder" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "för många lokala tidstyper" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "för många övergångar?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "för många eller för långa tidszonförkortningar" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "avslutande skräp vid radslutet" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "problem att svara till prog %d\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "satte typ på endast ett år" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "kan inte allokera buffert för indata" @@ -5274,11 +5343,15 @@ msgstr "kan inte allokera buffert för in msgid "unable to free arguments" msgstr "kan inte avallokera argument" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "odefinierad" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "okänt" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "okänt tecken \"%s\"" @@ -5288,7 +5361,7 @@ msgstr "okänt tecken \"%s\"" msgid "unknown directive `%s': line ignored" msgstr "okänt direktiv \"%s\": rad ignorerad" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "okänt fel från iconv() %d" @@ -5298,15 +5371,20 @@ msgstr "okänt fel från iconv() %d" msgid "unknown set `%s'" msgstr "okänd mängd \"%s\"" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "okänd specifikation \"%s\"" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "besvärlig zon" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "oavslutat meddelande" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "oavslutad sträng" @@ -5314,11 +5392,11 @@ msgstr "oavslutad sträng" msgid "unterminated string constant" msgstr "oavslutad strängkonstant" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "oavslutat symboliskt namn" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "övre gräns i intervall är inte större än undre gräns" @@ -5326,35 +5404,35 @@ msgstr "övre gräns i intervall är inte s msgid "upper limit in range is not smaller then lower limit" msgstr "övre gräns i intervall är inte mindre än undre gräns" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "användning: %s infil\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "använder 29/2 i icke-skottår" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "värdet på %s måste vara heltal" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "värdet på <%s> måste vara 1 eller större" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "värdet på <%s> måste vara större eller lika med värdet på <%s>" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "varning: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "när förbindelse accepterades: %s" @@ -5371,11 +5449,15 @@ msgstr "när hashtabellspost allokerades" msgid "while allocating key copy" msgstr "när nyckelkopia allokerades" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "vid insättning i sökträd" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "när gammal katalogfil öppnades" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "när utdata förbereddes" @@ -5383,15 +5465,15 @@ msgstr "när utdata förbereddes" msgid "while stat'ing profiling data file" msgstr "när status togs på profildatafilen" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "med UCS som intervallvärden måste man använda symboliska hexadecimala intervallet \"..\"" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "med teckenkoder som intervallvärden måste man använda absoluta intervallet \"...\"" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "med symboliska namn som intervallvärden kan inte absoluta intervallet \"...\" användas" @@ -5399,7 +5481,7 @@ msgstr "med symboliska namn som interval msgid "write incomplete" msgstr "ofullständing skrivning" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "skrivbar för andra än ägaren" @@ -5407,23 +5489,23 @@ msgstr "skrivbar för andra än ägaren" msgid "wrong number of arguments" msgstr "fel antal argument" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "fel antal fält på \"Leap\"-rad" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "fel antal fält på \"Link\"-rad" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "fel antal fält på \"Rule\"-rad" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "fel antal fält på \"Zone\"-fortsättningsrad" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "fel antal fält på \"Zone\"-rad" @@ -5435,10 +5517,10 @@ msgstr "xdr_reference: minnet slut\n" msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: minnet slut\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: kan inte omvandla värd till nätnamn\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: kan inte hämta serveradress\n" Binary files glibc-2.2.4/po/tr.mo and glibc-2.2.5/po/tr.mo differ diff -durpN glibc-2.2.4/po/tr.po glibc-2.2.5/po/tr.po --- glibc-2.2.4/po/tr.po Tue Jun 5 06:19:36 2001 +++ glibc-2.2.5/po/tr.po Sat Aug 25 13:25:55 2001 @@ -5,83 +5,89 @@ # msgid "" msgstr "" -"Project-Id-Version: libc 2.2.3\n" -"POT-Creation-Date: 2001-01-21 08:03-0800\n" -"PO-Revision-Date: 2001-06-04 18:10+300\n" +"Project-Id-Version: libc 2.2.4\n" +"POT-Creation-Date: 2001-08-13 15:08-0700\n" +"PO-Revision-Date: 2001-08-25 22:34+300\n" "Last-Translator: Nilgün Belma Bugüner \n" -"Language-Team: Turkish \n" +"Language-Team: Turkish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-9\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 0.9.2alpha\n" +"X-Generator: KBabel 0.9.5\n" -#: nis/nis_print.c:274 +#: locale/programs/ld-monetary.c:278 +#, c-format +msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d" +msgstr "\t\t\t\t\t\t\t %s: `%s' alanýndaki deðer %d ...%d aralýðýnda olmalý" + +#: nis/nis_print.c:277 msgid "\t\tAccess Rights : " msgstr "\t\tEriþim Haklarý: " -#: nis/nis_print.c:272 +#: nis/nis_print.c:275 msgid "\t\tAttributes : " msgstr "\t\tNiteleyiciler : " -#: sunrpc/rpc_main.c:1425 +#: sunrpc/rpc_main.c:1427 #, c-format msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n" msgstr "\t%s [-abkCLNTM][-Disim[=deðer]] [-i boyut] [-I [-K saniye]] [-Y dosyaYolu] girdiDosyasý\n" -#: sunrpc/rpc_main.c:1427 +#: sunrpc/rpc_main.c:1429 #, c-format msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n" msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o çýktýDosyasý] [girdiDosyasý]\n" -#: sunrpc/rpc_main.c:1430 +#: sunrpc/rpc_main.c:1432 #, c-format msgid "\t%s [-n netid]* [-o outfile] [infile]\n" msgstr "\t%s [-n aðKimlik]* [-o çýktýDosyasý] [girdiDosyasý]\n" -#: sunrpc/rpc_main.c:1429 +#: sunrpc/rpc_main.c:1431 #, c-format msgid "\t%s [-s nettype]* [-o outfile] [infile]\n" msgstr "\t%s [-s aðTürü]* [-o çýktýDosyasý] [girdiDosyasý]\n" -#: nis/nis_print.c:236 +#: nis/nis_print.c:239 msgid "\tAccess rights: " msgstr "\tEriþim haklarý: " -#: nis/nis_print.c:294 +#: nis/nis_print.c:297 #, c-format msgid "\tEntry data of type %s\n" msgstr "\t %s türü girdi verisi\n" -#: nis/nis_print.c:172 +#: nis/nis_print.c:175 #, c-format msgid "\tName : %s\n" msgstr "\tÝsim : %s\n" -#: nis/nis_print.c:173 +#: nis/nis_print.c:176 msgid "\tPublic Key : " msgstr "\tGenel Anahtar: " -#: nis/nis_print.c:235 +#: nis/nis_print.c:238 #, c-format msgid "\tType : %s\n" msgstr "\tTürü : %s\n" -#: nis/nis_print.c:202 +#: nis/nis_print.c:205 #, c-format msgid "\tUniversal addresses (%u)\n" msgstr "\tEvrensel adresler (%u)\n" -#: nis/nis_print.c:270 +#: nis/nis_print.c:273 #, c-format msgid "\t[%d]\tName : %s\n" msgstr "\t[%d]\tÝsim : %s\n" -#: nis/nis_print.c:297 +#: nis/nis_print.c:300 #, c-format msgid "\t[%u] - [%u bytes] " msgstr "\t[%u] - [%u bayt] " #: nscd/nscd_stat.c:154 +#, c-format msgid "" "\n" "%s cache:\n" @@ -111,11 +117,11 @@ msgstr "" "%15ld%% arabellekleme oraný\n" " /etc/%s'deki deðiþiklikler için %15s kontrol uygulandý\n" -#: nis/nis_print.c:252 +#: nis/nis_print.c:255 msgid "\nGroup Members :\n" msgstr "\n Grup Üyeleri:\n" -#: nis/nis_print.c:323 +#: nis/nis_print.c:326 msgid "\nTime to Live : " msgstr "\nYaþam süresi : " @@ -143,7 +149,7 @@ msgstr " hayýr" msgid " yes" msgstr " evet" -#: nis/nis_print.c:349 +#: nis/nis_print.c:352 #, c-format msgid " Data Length = %u\n" msgstr " Veri uzunluðu = %u\n" @@ -200,15 +206,15 @@ msgstr " program sürüm proto port\n" msgid " or: " msgstr " veya: " -#: elf/ldconfig.c:448 +#: elf/ldconfig.c:457 msgid " (SKIPPED)\n" msgstr " (ATLANDI)\n" -#: elf/ldconfig.c:446 +#: elf/ldconfig.c:455 msgid " (changed)\n" msgstr " (deðiþti)\n" -#: timezone/zic.c:421 +#: timezone/zic.c:427 #, c-format msgid " (rule from \"%s\", line %d)" msgstr " (\"%s\", %d satýrýndan kural)" @@ -217,22 +223,22 @@ msgstr " (\"%s\", %d satýrýndan kural)" msgid " [OPTION...]" msgstr " [SEÇENEK...]" -#: timezone/zic.c:418 +#: timezone/zic.c:424 #, c-format msgid "\"%s\", line %d: %s" msgstr "\"%s\", satýr %d: %s" -#: timezone/zic.c:983 +#: timezone/zic.c:989 #, c-format msgid "\"Zone %s\" line and -l option are mutually exclusive" msgstr "\"Zone %s\" satýrý ve -l seçeneði çeliþiyor" -#: timezone/zic.c:991 +#: timezone/zic.c:997 #, c-format msgid "\"Zone %s\" line and -p option are mutually exclusive" msgstr "\"Zone %s\" satýrý ve -p seçeneði çeliþiyor" -#: sunrpc/rpc_main.c:1410 +#: sunrpc/rpc_main.c:1412 msgid "\"infile\" is required for template generation flags.\n" msgstr "\"girdiDosyasý\" þablon üretim flamalarý için gerekli.\n" @@ -246,58 +252,58 @@ msgstr "%.*s: ARGP_HELP_FMT parametresi msgid "%.*s: Unknown ARGP_HELP_FMT parameter" msgstr "%.*s: ARGP_HELP_FMT parametresi bilinmiyor" -#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593 -#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110 -#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440 -#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326 -#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300 -#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233 -#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172 +#: locale/programs/ld-address.c:581 locale/programs/ld-collate.c:2612 +#: locale/programs/ld-collate.c:3740 locale/programs/ld-ctype.c:2112 +#: locale/programs/ld-ctype.c:2849 locale/programs/ld-identification.c:448 +#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331 +#: locale/programs/ld-monetary.c:936 locale/programs/ld-name.c:305 +#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:238 +#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1199 #, c-format msgid "%1$s: definition does not end with `END %1$s'" msgstr "%1$s: taným `END %1$s' ile bitmiyor" -#: elf/cache.c:165 elf/cache.c:175 +#: elf/cache.c:190 elf/cache.c:200 #, c-format msgid "%d libs found in cache `%s'\n" msgstr "%d kitaplýk, `%s' arabelleðinde bulundu\n" -#: timezone/zic.c:793 +#: timezone/zic.c:799 #, c-format msgid "%s in ruleless zone" msgstr "%s kuralsýz zaman diliminde" -#: elf/../sysdeps/generic/readelflib.c:65 +#: elf/../sysdeps/generic/readelflib.c:67 #, c-format msgid "%s is a 32 bit ELF file.\n" msgstr "%s 32 bitlik bir ELF dosyasýdýr.\n" -#: elf/../sysdeps/generic/readelflib.c:67 +#: elf/../sysdeps/generic/readelflib.c:69 #, c-format msgid "%s is a 64 bit ELF file.\n" msgstr "%s 64 bitlik bir ELF dosyasýdýr.\n" -#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48 +#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49 #, c-format msgid "%s is for unknown machine %d.\n" msgstr "%s bilinmeyen makina %d içindir.\n" -#: elf/ldconfig.c:329 +#: elf/ldconfig.c:326 #, c-format msgid "%s is not a known library type" msgstr "%s bilinen bir kitaplýk türü deðil" -#: elf/../sysdeps/generic/readelflib.c:76 +#: elf/../sysdeps/generic/readelflib.c:78 #, c-format msgid "%s is not a shared object file (Type: %d).\n" msgstr "%s paylaþýmlý nesne dosyasý deðil (Tür: %d).\n" -#: elf/ldconfig.c:415 +#: elf/ldconfig.c:424 #, c-format msgid "%s is not a symbolic link\n" msgstr "%s bir sembolik bað deðil\n" -#: elf/readlib.c:157 +#: elf/readlib.c:155 #, c-format msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n" msgstr "%s bir ELF dosyasý deðil - Baþlangýcýndaki dosya tanýmý hatalý.\n" @@ -317,12 +323,12 @@ msgstr "%s%s%s:%u: %s%sUmulmadýk hata: % msgid "%s%sUnknown signal %d\n" msgstr "%s%sBilinmeyen sinyal %d\n" -#: timezone/zic.c:2228 +#: timezone/zic.c:2234 #, c-format msgid "%s: %d did not sign extend correctly\n" msgstr "%s: %d ölçüyü tutturamadý\n" -#: locale/programs/charmap.c:326 +#: locale/programs/charmap.c:331 #, c-format msgid "%s: must be greater than \n" msgstr "%s: , den daha büyük olmalý\n" @@ -337,87 +343,82 @@ msgstr "%s: C öniþlemcisi %d çýkýþ kodu msgid "%s: C preprocessor failed with signal %d\n" msgstr "%s: C öniþlemcisi %d sinyali vererek baþarýsýz oldu\n" -#: timezone/zic.c:1494 +#: timezone/zic.c:1500 #, c-format msgid "%s: Can't create %s: %s\n" msgstr "%s: %s oluþturulamýyor: %s\n" -#: timezone/zic.c:2206 +#: timezone/zic.c:2212 #, c-format msgid "%s: Can't create directory %s: %s\n" msgstr "%s: %s dizini oluþturulamýyor: %s\n" -#: timezone/zic.c:645 +#: timezone/zic.c:651 #, c-format msgid "%s: Can't link from %s to %s: %s\n" msgstr "%s: %s den %s e bað kurulamýyor: %s\n" -#: timezone/zic.c:819 +#: timezone/zic.c:825 #, c-format msgid "%s: Can't open %s: %s\n" msgstr "%s: %s açýlamýyor: %s\n" -#: timezone/zic.c:1484 +#: timezone/zic.c:1490 #, c-format msgid "%s: Can't remove %s: %s\n" msgstr "%s: %s silinemiyor: %s\n" -#: timezone/zic.c:630 +#: timezone/zic.c:636 #, c-format msgid "%s: Can't unlink %s: %s\n" msgstr "%s: %s baðý kaldýrýlamýyor: %s\n" -#: timezone/zic.c:888 +#: timezone/zic.c:894 #, c-format msgid "%s: Error closing %s: %s\n" msgstr "%s: %s kapatýlýrken hata: %s\n" -#: timezone/zic.c:881 +#: timezone/zic.c:887 #, c-format msgid "%s: Error reading %s\n" msgstr "%s: %s okunurken hata\n" -#: timezone/zdump.c:267 -#, c-format -msgid "%s: Error writing " -msgstr "%s: Yazmada hata: " - -#: timezone/zic.c:1560 +#: timezone/zic.c:1566 #, c-format msgid "%s: Error writing %s\n" msgstr "%s: %s yazýlýrken hata oluþtu\n" -#: timezone/zic.c:866 +#: timezone/zic.c:872 #, c-format msgid "%s: Leap line in non leap seconds file %s\n" msgstr "%s: artýk saniyeler olmayan %s dosyasýnda `Leap' satýrý\n" -#: timezone/zic.c:359 +#: timezone/zic.c:365 #, c-format msgid "%s: Memory exhausted: %s\n" msgstr "%s: Bellek tükendi: %s\n" -#: timezone/zic.c:525 +#: timezone/zic.c:531 #, c-format msgid "%s: More than one -L option specified\n" msgstr "%s: Birden fazla -L seçeneði belirtilmiþ\n" -#: timezone/zic.c:485 +#: timezone/zic.c:491 #, c-format msgid "%s: More than one -d option specified\n" msgstr "%s: Birden fazla -d seçeneði belirtilmiþ\n" -#: timezone/zic.c:495 +#: timezone/zic.c:501 #, c-format msgid "%s: More than one -l option specified\n" msgstr "%s: Birden fazla -l seçeneði belirtilmiþ\n" -#: timezone/zic.c:505 +#: timezone/zic.c:511 #, c-format msgid "%s: More than one -p option specified\n" msgstr "%s: Birden fazla -p seçeneði belirtilmiþ\n" -#: timezone/zic.c:515 +#: timezone/zic.c:521 #, c-format msgid "%s: More than one -y option specified\n" msgstr "%s: Birden fazla -y seçeneði belirtilmiþ\n" @@ -433,7 +434,7 @@ msgstr "%s: Çok fazla argüman var\n" msgid "%s: `%s' mentioned more than once in definition of weight %d" msgstr "%s:`%s' %d aðýrlýklý tanýmda bir kereden fazla anýldý" -#: locale/programs/ld-collate.c:1323 +#: locale/programs/ld-collate.c:1336 #, c-format msgid "%s: `%s' must be a character" msgstr "%s: `%s' bir karakter olmalý" @@ -444,7 +445,7 @@ msgstr "%s: `%s' bir karakter olmalý" msgid "%s: `%s' value does not match `%s' value" msgstr "%s: `%s' deðeri `%s' deðeriyle eþleþmiyor" -#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313 +#: locale/programs/ld-monetary.c:837 locale/programs/ld-numeric.c:318 #, c-format msgid "%s: `-1' must be last entry in `%s' field" msgstr "%s: `%s' alanýnda `-1' son girdi olmalý" @@ -454,100 +455,100 @@ msgstr "%s: `%s' alanýnda `-1' son girdi msgid "%s: `forward' and `backward' are mutually excluding each other" msgstr "%s: `forward' ve `backward' karþýlýklý olarak bir diðerini dýþlar" -#: locale/programs/ld-collate.c:1515 +#: locale/programs/ld-collate.c:1528 #, c-format msgid "%s: `position' must be used for a specific level in all sections or none" msgstr "%s: `position' tüm alt bölümlerde özel bir düzey için kullanýlmýþ olmalý ya da hiç bulunmamalý" -#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775 +#: locale/programs/ld-ctype.c:2637 locale/programs/ld-ctype.c:2777 #, c-format msgid "%s: `translit_start' section does not end with `translit_end'" msgstr "%s: `translit_start' bölümü `translit_end' ile bitmiyor" -#: locale/programs/ld-collate.c:1123 +#: locale/programs/ld-collate.c:1136 #, c-format msgid "%s: byte sequence of first character of sequence is not lower than that of the last character" msgstr "%s: serinin ilk karakterinin bayt serisi son karakterininkinden daha az deðildir" -#: locale/programs/ld-collate.c:1081 +#: locale/programs/ld-collate.c:1094 #, c-format msgid "%s: byte sequences of first and last character must have the same length" msgstr "%s: ilk ve son karakterin bayt serisi ayný uzunlukta olmalý" -#: locale/programs/ld-collate.c:3642 +#: locale/programs/ld-collate.c:3663 #, c-format msgid "%s: cannot have `%s' as end of ellipsis range" msgstr "%s: `%s' elips kapsamýnýn sonu olamýyor" -#: locale/programs/ld-collate.c:3308 +#: locale/programs/ld-collate.c:3327 #, c-format msgid "%s: cannot reorder after %.*s: symbol not known" msgstr "%s: %.*s sembolünden sonra tekrar sýralanamýyor: sembol bilinmiyor" -#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994 -#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035 -#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077 -#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138 -#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226 +#: locale/programs/ld-ctype.c:2912 locale/programs/ld-ctype.c:2996 +#: locale/programs/ld-ctype.c:3016 locale/programs/ld-ctype.c:3037 +#: locale/programs/ld-ctype.c:3058 locale/programs/ld-ctype.c:3079 +#: locale/programs/ld-ctype.c:3100 locale/programs/ld-ctype.c:3140 +#: locale/programs/ld-ctype.c:3161 locale/programs/ld-ctype.c:3228 #, c-format msgid "%s: character `%s' in charmap not representable with one byte" msgstr "%s: karakter eþlem listesinde `%s' karakteri bir bayt ile temsil edilemez" -#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295 +#: locale/programs/ld-ctype.c:3272 locale/programs/ld-ctype.c:3297 #, c-format msgid "%s: character `%s' needed as default value not representable with one byte" msgstr "%s: öntanýmlý deðer olarak gerekli olan `%s' karakteri tek bayt ile temsil edilemez" -#: locale/programs/ld-ctype.c:2905 +#: locale/programs/ld-ctype.c:2907 #, c-format msgid "%s: character `%s' not defined in charmap while needed as default value" msgstr "%s: karakter eþlem listesinde öntanýmlý deðer olarak gerekli olmasýna raðmen `%s' karakteri atanmamýþ" -#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009 -#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072 -#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133 -#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221 -#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288 +#: locale/programs/ld-ctype.c:2991 locale/programs/ld-ctype.c:3011 +#: locale/programs/ld-ctype.c:3053 locale/programs/ld-ctype.c:3074 +#: locale/programs/ld-ctype.c:3095 locale/programs/ld-ctype.c:3135 +#: locale/programs/ld-ctype.c:3156 locale/programs/ld-ctype.c:3223 +#: locale/programs/ld-ctype.c:3265 locale/programs/ld-ctype.c:3290 #, c-format msgid "%s: character `%s' not defined while needed as default value" msgstr "%s: öntanýmlý deðer olarak gerekli olmasýna raðmen `%s' karakteri atanmamýþ" -#: timezone/zic.c:1927 +#: timezone/zic.c:1933 #, c-format msgid "%s: command was '%s', result was %d\n" msgstr "%s: komut `%s' idi, sonuç %d oldu\n" -#: locale/programs/ld-time.c:225 +#: locale/programs/ld-time.c:246 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'" msgstr "%s: `era' alanýndaki %Zd dizgesinin yön flamasý '+' ya da '-' deðil" -#: locale/programs/ld-time.c:237 +#: locale/programs/ld-time.c:258 #, c-format msgid "%s: direction flag in string %Zd in `era' field is not a single character" msgstr "%s: `era' alanýndaki %Zd dizgesinin yön flamasý tek karakter deðil" -#: locale/programs/ld-ctype.c:2727 +#: locale/programs/ld-ctype.c:2729 #, c-format msgid "%s: duplicate `default_missing' definition" msgstr "%s: `default_missing' tanýmý tekrarlanmýþ" -#: locale/programs/ld-identification.c:423 +#: locale/programs/ld-identification.c:431 #, c-format msgid "%s: duplicate category version definition" msgstr "%s kategori sürümü tanýmý tekrarlanmýþ" -#: locale/programs/ld-collate.c:2711 +#: locale/programs/ld-collate.c:2730 #, c-format msgid "%s: duplicate declaration of section `%s'" msgstr "%s: `%s' bölüm bildirimi tekrarlanmýþ" -#: locale/programs/ld-collate.c:2675 +#: locale/programs/ld-collate.c:2694 #, c-format msgid "%s: duplicate definition of `%s'" msgstr "%s: `%s' tanýmý tekrarlanmýþ" -#: locale/programs/ld-collate.c:3691 +#: locale/programs/ld-collate.c:3712 #, c-format msgid "%s: empty category description not allowed" msgstr "%s: boþ kategori açýklamasýna izin verilmez" @@ -557,19 +558,27 @@ msgstr "%s: boþ kategori açýklamasýna iz msgid "%s: empty weight string not allowed" msgstr "%s: boþ aðýrlýk dizgesine izin verilmez" -#: locale/programs/charmap.c:831 +#: locale/programs/charmap.c:836 #, c-format msgid "%s: error in state machine" msgstr "%s: durum motorunda hata" -#: locale/programs/ld-ctype.c:2483 +#: locale/programs/ld-address.c:489 locale/programs/ld-address.c:526 +#: locale/programs/ld-address.c:564 locale/programs/ld-ctype.c:2485 +#: locale/programs/ld-identification.c:360 +#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300 +#: locale/programs/ld-monetary.c:694 locale/programs/ld-monetary.c:729 +#: locale/programs/ld-monetary.c:770 locale/programs/ld-name.c:278 +#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:221 +#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1104 +#: locale/programs/ld-time.c:1146 #, c-format msgid "%s: field `%s' declared more than once" msgstr "%s: `%s' alaný bir kereden fazla bildirilmiþ" -#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650 -#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346 -#: locale/programs/ld-ctype.c:3329 +#: locale/programs/ld-ctype.c:1526 locale/programs/ld-ctype.c:1651 +#: locale/programs/ld-ctype.c:1757 locale/programs/ld-ctype.c:2348 +#: locale/programs/ld-ctype.c:3331 #, c-format msgid "%s: field `%s' does not contain exactly ten entries" msgstr "%s: `%s' alaný tamý tamýna 10 girdi içeremez" @@ -581,14 +590,18 @@ msgstr "%s: `%s' alaný tamý tamýna 10 gi msgid "%s: field `%s' must not be empty" msgstr "%s: `%s' alaný boþ olmamalý" -#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197 -#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284 -#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315 -#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244 -#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104 -#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127 -#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109 -#: locale/programs/ld-telephone.c:105 +#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:180 +#: locale/programs/ld-address.c:197 locale/programs/ld-address.c:224 +#: locale/programs/ld-address.c:284 locale/programs/ld-address.c:303 +#: locale/programs/ld-address.c:315 locale/programs/ld-identification.c:145 +#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:206 +#: locale/programs/ld-monetary.c:244 locale/programs/ld-monetary.c:260 +#: locale/programs/ld-monetary.c:272 locale/programs/ld-name.c:104 +#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:113 +#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:101 +#: locale/programs/ld-paper.c:109 locale/programs/ld-telephone.c:105 +#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:175 +#: locale/programs/ld-time.c:195 #, c-format msgid "%s: field `%s' not defined" msgstr "%s: `%s' alaný tanýmlý deðil" @@ -598,39 +611,40 @@ msgstr "%s: `%s' alaný tanýmlý deðil" msgid "%s: field `%s' undefined" msgstr "%s: `%s' alaný tanýmsýz" -#: locale/programs/ld-time.c:258 +#: locale/programs/ld-time.c:279 #, c-format msgid "%s: garbage at end of offset value in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinin dengeleme deðerinin sonunda bozulma saptandý" -#: locale/programs/ld-time.c:318 +#: locale/programs/ld-time.c:339 #, c-format msgid "%s: garbage at end of starting date in string %Zd in `era' field " msgstr "%s: `era' alanýndaki %Zd dizgesinde baþlangýç tarihinin sonunda bozulma saptandý" -#: locale/programs/ld-time.c:395 +#: locale/programs/ld-time.c:416 #, c-format msgid "%s: garbage at end of stopping date in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde bitiþ tarihinin sonunda bozulma saptandý" -#: posix/getopt.c:795 +#: posix/getopt.c:788 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: kuraldýþý seçenek -- %c\n" -#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717 -#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437 -#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324 -#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298 -#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231 -#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170 +#: locale/programs/ld-address.c:578 locale/programs/ld-collate.c:3738 +#: locale/programs/ld-ctype.c:2846 locale/programs/ld-identification.c:445 +#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329 +#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:303 +#: locale/programs/ld-numeric.c:373 locale/programs/ld-paper.c:236 +#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1197 #, c-format msgid "%s: incomplete `END' line" msgstr "%s: tamamlanmamýþ `END' satýrý" #: locale/programs/ld-address.c:166 +#, c-format msgid "%s: invalid escape `%%%c' sequence in field `%s'" -msgstr "%s: `%s' alanýnda geçersiz önceleme dizisi: `%%%c'" +msgstr "%s: `%%%c' önceleme dizisi `%s' alanýnda geçersiz" #: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126 #: locale/programs/ld-telephone.c:150 @@ -638,27 +652,27 @@ msgstr "%s: `%s' alanýnda geçersiz öncel msgid "%s: invalid escape sequence in field `%s'" msgstr "%s: `%s' alanýnda geçersiz önceleme dizisi" -#: locale/programs/ld-time.c:250 +#: locale/programs/ld-time.c:271 #, c-format msgid "%s: invalid number for offset in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde dengeleme deðeri olarak geçersiz sayý" -#: locale/programs/ld-collate.c:3143 +#: locale/programs/ld-collate.c:3162 #, c-format msgid "%s: invalid number of sorting rules" msgstr "%s: sýralama kurallarýnýn sayýsý geçersiz" -#: posix/getopt.c:798 +#: posix/getopt.c:791 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: geçersiz seçenek -- %c\n" -#: locale/programs/ld-time.c:309 +#: locale/programs/ld-time.c:330 #, c-format msgid "%s: invalid starting date in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde baþlangýç tarihi geçersiz" -#: locale/programs/ld-time.c:386 +#: locale/programs/ld-time.c:407 #, c-format msgid "%s: invalid stopping date in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde bitiþ tarihi geçersiz" @@ -673,38 +687,38 @@ msgstr "%s: `%s' alanýndaki deðer geçers msgid "%s: language abbreviation `%s' not defined" msgstr "%s: dil kýsaltmasý `%s' atanmamýþ" -#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346 -#: locale/programs/ld-collate.c:3695 +#: locale/programs/ld-collate.c:3242 locale/programs/ld-collate.c:3365 +#: locale/programs/ld-collate.c:3716 #, c-format msgid "%s: missing `order_end' keyword" msgstr "%s: `order_end' anahtar-sözcüðü kayýp" -#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707 +#: locale/programs/ld-collate.c:3379 locale/programs/ld-collate.c:3728 #, c-format msgid "%s: missing `reorder-end' keyword" msgstr "%s: `reorder_end' anahtar-sözcüðü kayýp" -#: locale/programs/ld-collate.c:3710 +#: locale/programs/ld-collate.c:3731 #, c-format msgid "%s: missing `reorder-sections-end' keyword" msgstr "%s: `reorder_section_end' anahtar-sözcüðü kayýp" -#: locale/programs/ld-time.c:435 +#: locale/programs/ld-time.c:456 #, c-format msgid "%s: missing era format in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde dönemsellik biçemi eksik" -#: locale/programs/ld-time.c:423 +#: locale/programs/ld-time.c:444 #, c-format msgid "%s: missing era name in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde dönem ismi eksik" -#: locale/programs/ld-collate.c:3119 +#: locale/programs/ld-collate.c:3138 #, c-format msgid "%s: multiple order definitions for section `%s'" msgstr "%s: `%s' alt bölümünde çok sayýda sýralama tanýmý" -#: locale/programs/ld-collate.c:3169 +#: locale/programs/ld-collate.c:3188 #, c-format msgid "%s: multiple order definitions for unnamed section" msgstr "%s: isimsiz alt bölümde çok sayýda sýralama tanýmý" @@ -719,7 +733,7 @@ msgstr "%s: `%s' alanýnda doðru bir düze msgid "%s: no identification for category `%s'" msgstr "%s: `%s' kategorisi için hiç identification satýrý yok" -#: locale/programs/ld-ctype.c:2753 +#: locale/programs/ld-ctype.c:2755 #, c-format msgid "%s: no representable `default_missing' definition found" msgstr "%s: temsil edilebilir `default_missing' atamasý bulunamadý" @@ -734,52 +748,52 @@ msgstr "%s: sýralama kurallarý yetersiz" msgid "%s: numeric country code `%d' not valid" msgstr "%s: sayýsal ülke kodu `%d' geçersiz" -#: posix/getopt.c:718 +#: posix/getopt.c:711 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: `%c%s' seçeneði argümansýz kullanýlýr\n" -#: posix/getopt.c:688 +#: posix/getopt.c:681 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: `%s' seçeneði burada belirsiz\n" -#: posix/getopt.c:736 posix/getopt.c:909 +#: posix/getopt.c:729 posix/getopt.c:902 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: `%s' seçeneði bir argümanla kullanýlýr\n" -#: posix/getopt.c:713 +#: posix/getopt.c:706 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: `--%s' seçeneði argümansýz kullanýlýr\n" -#: posix/getopt.c:893 +#: posix/getopt.c:886 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: `-W %s' seçeneði argümansýz kullanýlýr\n" -#: posix/getopt.c:875 +#: posix/getopt.c:868 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: `-W %s' seçeneði burada belirsiz\n" -#: posix/getopt.c:828 posix/getopt.c:958 +#: posix/getopt.c:821 posix/getopt.c:951 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: seçenek bir argümanla kullanýlýr -- %c\n" -#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654 +#: locale/programs/ld-collate.c:1327 locale/programs/ld-collate.c:3675 #, c-format msgid "%s: order for `%.*s' already defined at %s:%Zu" msgstr "%s: `%.*s' için abecesel sýra zaten %s:%Zu içinde atanmýþ" -#: locale/programs/ld-collate.c:3297 +#: locale/programs/ld-collate.c:3316 #, c-format msgid "%s: order for collating element %.*s not yet defined" msgstr "%s: karþýlaþtýrma elemaný %.*s için abecesel sýra henüz atanmamýþ" -#: locale/programs/ld-collate.c:3281 +#: locale/programs/ld-collate.c:3300 #, c-format msgid "%s: order for collating symbol %.*s not yet defined" msgstr "%s: karþýlaþtýrma sembolü %.*s için abecesel sýra henüz atanmamýþ" @@ -789,84 +803,84 @@ msgstr "%s: karþýlaþtýrma sembolü %.*s i msgid "%s: output would overwrite %s\n" msgstr "%s: çýktý %s üzerine yazacak\n" -#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312 +#: timezone/zic.c:879 timezone/zic.c:1293 timezone/zic.c:1318 #, c-format msgid "%s: panic: Invalid l_value %d\n" msgstr "%s: panik: sol deðer (l_value) %d geçersiz\n" -#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592 -#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735 -#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864 -#: locale/programs/ld-identification.c:456 -#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342 -#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316 -#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249 -#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188 +#: locale/programs/charmap.c:843 locale/programs/ld-address.c:597 +#: locale/programs/ld-collate.c:2609 locale/programs/ld-collate.c:3756 +#: locale/programs/ld-ctype.c:2109 locale/programs/ld-ctype.c:2866 +#: locale/programs/ld-identification.c:464 +#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347 +#: locale/programs/ld-monetary.c:952 locale/programs/ld-name.c:321 +#: locale/programs/ld-numeric.c:391 locale/programs/ld-paper.c:254 +#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1215 #: locale/programs/locfile.h:103 locale/programs/repertoire.c:325 #, c-format msgid "%s: premature end of file" msgstr "%s: dosya sonu erken geldi" -#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580 +#: locale/programs/ld-collate.c:3413 locale/programs/ld-collate.c:3601 #, c-format msgid "%s: section `%.*s' not known" msgstr "%s: `%.*s' alt bölümü bilinmiyor" -#: locale/programs/ld-time.c:337 +#: locale/programs/ld-time.c:358 #, c-format msgid "%s: starting date is invalid in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde baþlangýç tarihi geçersiz" -#: locale/programs/ld-time.c:414 +#: locale/programs/ld-time.c:435 #, c-format msgid "%s: stopping date is invalid in string %Zd in `era' field" msgstr "%s: `era' alanýndaki %Zd dizgesinde bitiþ tarihi geçersiz" -#: locale/programs/ld-collate.c:1248 +#: locale/programs/ld-collate.c:1261 #, c-format -msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'" +msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'" msgstr "%s: sembolik kapsam elipslerinin hemen ardýndan `order_end' gelmemelidir" -#: locale/programs/ld-collate.c:1244 +#: locale/programs/ld-collate.c:1257 #, c-format msgid "%s: symbolic range ellipsis must not directly follow `order_start'" msgstr "%s: sembolik kapsam elipsleri `order_start' ýn hemen ardýndan gelmemelidir" -#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518 +#: locale/programs/ld-address.c:588 locale/programs/ld-collate.c:518 #: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865 -#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581 -#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840 -#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673 -#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447 -#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333 -#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307 -#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240 -#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179 +#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2599 +#: locale/programs/ld-collate.c:3747 locale/programs/ld-ctype.c:1841 +#: locale/programs/ld-ctype.c:2099 locale/programs/ld-ctype.c:2675 +#: locale/programs/ld-ctype.c:2857 locale/programs/ld-identification.c:455 +#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338 +#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:312 +#: locale/programs/ld-numeric.c:382 locale/programs/ld-paper.c:245 +#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1206 #, c-format msgid "%s: syntax error" msgstr "%s: sözdizimi hatasý" -#: locale/programs/ld-ctype.c:2178 +#: locale/programs/ld-ctype.c:2180 #, c-format msgid "%s: syntax error in definition of new character class" msgstr "%s: yeni karakter sýnýfýnýn tanýmýnda sözdizimi hatasý" -#: locale/programs/ld-ctype.c:2193 +#: locale/programs/ld-ctype.c:2195 #, c-format msgid "%s: syntax error in definition of new character map" msgstr "%s: yeni karakter eþlemleri tanýmýnda sözdizimi hatasý" -#: locale/programs/ld-ctype.c:3735 +#: locale/programs/ld-ctype.c:3737 #, c-format msgid "%s: table for class \"%s\": %lu bytes\n" msgstr "%s: \"%s\" sýnýfýnýn tablosu: %lu bayt\n" -#: locale/programs/ld-ctype.c:3803 +#: locale/programs/ld-ctype.c:3805 #, c-format msgid "%s: table for map \"%s\": %lu bytes\n" msgstr "%s: \"%s\" eþlemlerinin tablosu: %lu bayt\n" -#: locale/programs/ld-ctype.c:3935 +#: locale/programs/ld-ctype.c:3937 #, c-format msgid "%s: table for width: %lu bytes\n" msgstr "%s: geniþlik için tablo: %lu bayt\n" @@ -876,16 +890,21 @@ msgstr "%s: geniþlik için tablo: %lu bay msgid "%s: terminology language code `%s' not defined" msgstr "%s: terminoloji dil kodu `%s' atanmamýþ" -#: locale/programs/ld-collate.c:1054 +#: locale/programs/ld-collate.c:1067 #, c-format msgid "%s: the start and the end symbol of a range must stand for characters" msgstr "%s: bir kapsamýn baþlangýç ve bitiþ sembolleri, karakterleri temsil etmelidir" -#: locale/programs/ld-time.c:464 +#: locale/programs/ld-time.c:485 #, c-format msgid "%s: third operand for value of field `%s' must not be larger than %d" msgstr "%s: `%s' alanýnýn deðerindeki üçüncü veri öðesi en fazla %d olabilir" +#: locale/programs/ld-time.c:983 +#, c-format +msgid "%s: too few values for field `%s'" +msgstr "%s: `%s' alanýndaki deðerler çok az" + #: locale/programs/ld-collate.c:555 #, c-format msgid "%s: too many rules; first entry only had %d" @@ -896,7 +915,12 @@ msgstr "%s: çok fazla kural var; sadece msgid "%s: too many values" msgstr "%s: çok fazla deðer var" -#: locale/programs/ld-ctype.c:3639 +#: locale/programs/ld-time.c:1030 +#, c-format +msgid "%s: too many values for field `%s'" +msgstr "%s: `%s' alanýndaki deðerler çok fazla" + +#: locale/programs/ld-ctype.c:3641 #, c-format msgid "%s: transliteration data from locale `%s' not available" msgstr "%s: `%s' yerelinden baþka bir dilin alfabesinde yazma verisi yok" @@ -906,47 +930,52 @@ msgstr "%s: `%s' yerelinden baþka bir di msgid "%s: unable to open %s: %m\n" msgstr "%s: %s dosyasýný açmak mümkün deðil: %m\n" -#: locale/programs/ld-collate.c:2849 +#: locale/programs/ld-collate.c:2868 #, c-format msgid "%s: unknown character in collating symbol name" msgstr "%s: karþýlaþtýrma sembolü isminde bilinmeyen karakter" -#: locale/programs/ld-collate.c:2981 +#: locale/programs/ld-collate.c:3000 #, c-format msgid "%s: unknown character in equivalent definition name" msgstr "%s: eþdeðer tanýmlama isminde bilinmeyen karakter" -#: locale/programs/ld-collate.c:2994 +#: locale/programs/ld-collate.c:3013 #, c-format msgid "%s: unknown character in equivalent definition value" msgstr "%s: eþdeðer tanýmlama deðerinde bilinmeyen karakter" -#: locale/programs/ld-time.c:1040 +#: locale/programs/ld-address.c:493 locale/programs/ld-address.c:531 +#: locale/programs/ld-identification.c:364 locale/programs/ld-messages.c:310 +#: locale/programs/ld-monetary.c:698 locale/programs/ld-monetary.c:733 +#: locale/programs/ld-name.c:282 locale/programs/ld-numeric.c:267 +#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:999 +#: locale/programs/ld-time.c:1067 locale/programs/ld-time.c:1109 #, c-format msgid "%s: unknown character in field `%s'" msgstr "%s: `%s' alanýnda bilinmeyen karakter" -#: locale/programs/ld-collate.c:3091 +#: locale/programs/ld-collate.c:3110 #, c-format msgid "%s: unknown section name `%s'" msgstr "%s: bölüm ismi `%s' bilinmiyor" -#: locale/programs/ld-collate.c:3004 +#: locale/programs/ld-collate.c:3023 #, c-format msgid "%s: unknown symbol `%s' in equivalent definition" msgstr "%s: eþdeðer tanýmlamada bilinmeyen sembol: `%s'" -#: posix/getopt.c:769 +#: posix/getopt.c:762 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: tanýnmayan seçenek: `%c%s'\n" -#: posix/getopt.c:765 +#: posix/getopt.c:758 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: tanýnmayan seçenek `--%s'\n" -#: timezone/zic.c:443 +#: timezone/zic.c:449 #, c-format msgid "" "%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n" @@ -960,6 +989,16 @@ msgstr "" msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n" msgstr "%s: kullanýmý: %s [ -v ] [ -c kesimZamaný ] zamanDilimiÝsmi ...\n" +#: locale/programs/ld-monetary.c:740 locale/programs/ld-numeric.c:274 +#, c-format +msgid "%s: value for field `%s' must be a single character" +msgstr "%s: `%s' alanýndaki deðer tek karakter olmalý" + +#: locale/programs/ld-monetary.c:308 +#, c-format +msgid "%s: value for field `%s' must be in range %d...%d" +msgstr "%s: `%s' alanýndaki deðer %d...%d aralýðýnda olmalý" + #: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154 #, c-format msgid "%s: value for field `%s' must not be an empty string" @@ -980,17 +1019,17 @@ msgstr "%s: `int_curr_symbol' alanýnýn d msgid "%s: value of field `int_curr_symbol' has wrong length" msgstr "%s: `int_curr_symbol' alanýndaki deðer yanlýþ uzunlukta" -#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334 +#: locale/programs/ld-monetary.c:859 locale/programs/ld-numeric.c:339 #, c-format msgid "%s: values for field `%s' must be smaller than 127" msgstr "%s: `%s' alanýndaki deðer 127 den küçük olmalý" -#: locale/programs/ld-time.c:488 +#: locale/programs/ld-time.c:509 #, c-format msgid "%s: values for field `%s' must not be larger than %d" msgstr "%s: `%s' alanýndaki deðer %d den büyük olmalý" -#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480 +#: locale/programs/ld-time.c:493 locale/programs/ld-time.c:501 #, c-format msgid "%s: values of field `%s' must not be larger than %d" msgstr "%s: `%s' alanýndaki deðer %d den büyük olmamalý" @@ -1013,11 +1052,11 @@ msgstr "(PROGRAM HATASI) Bilinen bir sür msgid "(PROGRAM ERROR) Option should have been recognized!?" msgstr "(PROGRAM HATASI) Bu tanýnan bir seçenek olmalýydý!?" -#: nis/nis_print.c:130 +#: nis/nis_print.c:133 msgid "(Unknown object)\n" msgstr "(Bilinmeyen nesne)\n" -#: sunrpc/clnt_perr.c:125 +#: sunrpc/clnt_perr.c:132 #, c-format msgid "(unknown authentication error - %d)" msgstr "(bilinmeyen kanýtlama hatasý - %d)" @@ -1035,6 +1074,11 @@ msgstr "*** `%s' dosyasý lime lime edild msgid "*standard input*" msgstr "*standart girdi*" +#: elf/cache.c:105 +#, c-format +msgid ", OS ABI: %s %d.%d.%d" +msgstr ", OS ABI: %s %d.%d.%d" + #: catgets/gencat.c:125 msgid "" "-o OUTPUT-FILE [INPUT-FILE]...\n" @@ -1048,16 +1092,16 @@ msgstr "" msgid ".lib section in a.out corrupted" msgstr "a.out içindeki .lib bölümü bozulmuþ" -#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132 +#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139 #, c-format msgid "; low version = %lu, high version = %lu" msgstr "; alt sürüm = %lu, üst sürüm = %lu" -#: sunrpc/clnt_perr.c:118 +#: sunrpc/clnt_perr.c:125 msgid "; why = " msgstr "; neden = " -#: locale/programs/charmap.c:999 +#: locale/programs/charmap.c:1004 #, c-format msgid "<%s> and <%s> are illegal names for range" msgstr "<%s> ve <%s> kapsam için uygun isimler deðil" @@ -1067,12 +1111,12 @@ msgstr "<%s> ve <%s> kapsam için uygun i msgid "<%s> and <%s> are invalid names for range" msgstr "<%s> ve <%s> kapsam için geçersiz isimler" -#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600 +#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:608 #, c-format msgid " character must not be in class `%s'" msgstr " karakteri `%s' sýnýfýnda olmamalý" -#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589 +#: locale/programs/ld-ctype.c:561 locale/programs/ld-ctype.c:597 #, c-format msgid " character not in class `%s'" msgstr " karakteri `%s' sýnýfýnda deðil" @@ -1088,7 +1132,7 @@ msgstr "?" msgid "Aborted" msgstr "Ýptal edildi" -#: nis/nis_print.c:321 +#: nis/nis_print.c:324 msgid "Access Rights : " msgstr "Eriþim Haklarý: " @@ -1126,6 +1170,10 @@ msgstr "Tanýtým hatasý" msgid "Alarm clock" msgstr "Alarm saati" +#: posix/../sysdeps/posix/gai_strerror.c:45 +msgid "All requests done" +msgstr "Tüm istekler yerine getirildi" + #: malloc/memusagestat.c:57 msgid "Also draw graph for total memory consumption" msgstr "Üstelik toplam bellek tüketimi grafiðini çizerken" @@ -1134,7 +1182,7 @@ msgstr "Üstelik toplam bellek tüketimi g msgid "Anode table overflow" msgstr "A-düðüm tablosu taþtý" -#: intl/tst-gettext2.c:37 +#: intl/tst-gettext2.c:38 msgid "Another string for testing." msgstr "Test edilecek diðer dizge." @@ -1166,7 +1214,7 @@ msgstr "Sistem sýnýrlarýndan daha fazla msgid "Attempting to link in too many shared libraries" msgstr "Çok fazla sayýdaki paylaþýmlý kitaplýkta bað kurulmaya çalýþýlýyor" -#: sunrpc/clnt_perr.c:329 +#: sunrpc/clnt_perr.c:338 msgid "Authentication OK" msgstr "Kimlik kanýtlama TAMAM" @@ -1175,7 +1223,7 @@ msgstr "Kimlik kanýtlama TAMAM" msgid "Authentication error" msgstr "Kanýtlama hatasý" -#: nis/nis_print.c:106 +#: nis/nis_print.c:109 msgid "BOGUS OBJECT\n" msgstr "SAHTE NESNE\n" @@ -1230,7 +1278,7 @@ msgstr "ai_flags için deðer hatalý" msgid "Be strictly POSIX conform" msgstr "Kesinlikle POSIX-uygun olur" -#: nis/nis_print.c:302 +#: nis/nis_print.c:305 msgid "Binary data\n" msgstr "Ýkilik veri\n" @@ -1262,10 +1310,6 @@ msgstr "Veri alýnamýyor" msgid "Bus error" msgstr "Veri yolu hatasý" -#: nis/nis_print.c:46 -msgid "CDS" -msgstr "CDS" - #: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50 msgid "CPU time limit exceeded" msgstr "CPU zaman sýnýrý aþýldý" @@ -1283,77 +1327,82 @@ msgstr "Gereken paylaþýmlý kitaplýða eri msgid "Can not exec a shared library directly" msgstr "Bir paylaþýmlý kitaplýk doðrudan icra edilemez" -#: nis/ypclnt.c:792 +#: nis/ypclnt.c:794 msgid "Can't bind to server which serves this domain" msgstr "Bu alana hizmet veren sunucuya baðlantý kurulamadý" -#: elf/ldconfig.c:934 +#: elf/ldconfig.c:1008 msgid "Can't chdir to /" msgstr "/ dizinine geçilemiyor" -#: nis/ypclnt.c:804 +#: nis/ypclnt.c:806 msgid "Can't communicate with portmapper" msgstr "portmapper ile haberleþilemiyor" -#: nis/ypclnt.c:806 +#: nis/ypclnt.c:808 msgid "Can't communicate with ypbind" msgstr "ypbind ile haberleþilemiyor" -#: nis/ypclnt.c:808 +#: nis/ypclnt.c:810 msgid "Can't communicate with ypserv" msgstr "ypserv ile haberleþilemiyor" -#: elf/cache.c:359 +#: elf/cache.c:394 #, c-format msgid "Can't create temporary cache file %s" msgstr "Geçici arabellek dosyasý %s oluþturulamýyor" -#: elf/ldconfig.c:502 +#: elf/ldconfig.c:512 #, c-format msgid "Can't find %s" msgstr "%s bulunamýyor" -#: elf/ldconfig.c:440 +#: elf/ldconfig.c:449 #, c-format msgid "Can't link %s to %s" msgstr "%s den %s'e bað yapýlamýyor" -#: elf/ldconfig.c:518 elf/ldconfig.c:672 +#: elf/ldconfig.c:528 #, c-format msgid "Can't lstat %s" msgstr "lstat %s yapýlamýyor" -#: elf/cache.c:108 elf/ldconfig.c:955 +#: elf/cache.c:131 elf/ldconfig.c:1029 #, c-format msgid "Can't open cache file %s\n" msgstr "Arabellek dosyasý %s açýlamýyor\n" -#: elf/ldconfig.c:976 +#: elf/ldconfig.c:1050 #, c-format msgid "Can't open cache file directory %s\n" msgstr "Arabellek dosyasýnýn dizini %s açýlamýyor\n" -#: elf/ldconfig.c:865 +#: elf/ldconfig.c:924 #, c-format msgid "Can't open configuration file %s" msgstr "Yapýlandýrma dosyasý %s açýlamýyor" -#: elf/ldconfig.c:621 +#: elf/ldconfig.c:634 #, c-format msgid "Can't open directory %s" msgstr "%s dizini açýlamýyor" -#: elf/cache.c:353 +#: elf/cache.c:387 #, c-format msgid "Can't remove old temporary cache file %s" msgstr "eski geçici arabellek dosyasý %s silinemiyor" -#: elf/ldconfig.c:405 +#: elf/ldconfig.c:344 +#, c-format +msgid "Can't stat %s" +msgstr "stat %s yapýlamýyor" + +#: elf/ldconfig.c:414 #, c-format msgid "Can't stat %s\n" msgstr "stat %s yapýlamýyor\n" -#: elf/ldconfig.c:434 +#: elf/ldconfig.c:443 #, c-format msgid "Can't unlink %s" msgstr "%s baðý kaldýrýlamadý" @@ -1380,16 +1429,21 @@ msgstr "Yayýnlanmýþ rpc için soket oluþt msgid "Cannot exec a shared library directly" msgstr "Bir paylaþýmlý kitaplýk doðrudan çalýþtýrýlamaz" -#: elf/readlib.c:98 +#: elf/readlib.c:99 #, c-format msgid "Cannot fstat file %s.\n" msgstr "%s dosyasý fstat yapýlamýyor.\n" -#: sunrpc/rpc_main.c:1415 +#: sunrpc/rpc_main.c:1417 msgid "Cannot have more than one file generation flag!\n" msgstr "Birden fazla dosya üretim flamasý olamaz!?\n" -#: elf/readlib.c:117 +#: elf/ldconfig.c:689 elf/ldconfig.c:732 +#, c-format +msgid "Cannot lstat %s" +msgstr "lstat %s yapýlamýyor" + +#: elf/readlib.c:118 #, c-format msgid "Cannot mmap file %s.\n" msgstr "%s dosyasý mmap yapýlamýyor.\n" @@ -1423,33 +1477,38 @@ msgstr "Soket SO_BROADCAST seçeneðine ay msgid "Cannot specify more than one input file!\n" msgstr "Bir girdi dosyasýndan fazlasý belirtilemez!\n" -#: sunrpc/rpc_main.c:1372 +#: elf/ldconfig.c:701 +#, c-format +msgid "Cannot stat %s" +msgstr "stat %s yapýlamýyor" + +#: sunrpc/rpc_main.c:1374 msgid "Cannot use netid flag with inetd flag!\n" msgstr "AðKimlik flamasý inetd flamasý ile kullanýlamaz!\n" -#: sunrpc/rpc_main.c:1384 +#: sunrpc/rpc_main.c:1386 msgid "Cannot use netid flag without TIRPC!\n" msgstr "AðKimlik flamasý TIRPC olmaksýzýn kullanýlamaz!\n" -#: sunrpc/rpc_main.c:1391 +#: sunrpc/rpc_main.c:1393 msgid "Cannot use table flags with newstyle!\n" msgstr "Tablo flamalarý yenibiçimle kullanýlamaz!\n" -#: elf/ldconfig.c:131 +#: elf/ldconfig.c:126 msgid "Change to and use ROOT as root directory" msgstr "Dizine geçilir ve kök dizin olarak ROOT kullanýr" -#: elf/cache.c:390 +#: elf/cache.c:426 #, c-format -msgid "Changing access rights of %s to 0644 failed" -msgstr "%s eriþim haklarý 0644 olarak deðiþtirilemedi" +msgid "Changing access rights of %s to %#o failed" +msgstr "%s eriþim haklarý %#o olarak deðiþtirilemedi" #: stdio-common/../sysdeps/gnu/errlist.c:689 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67 msgid "Channel number out of range" msgstr "Kanal numarasý kapsam dýþý" -#: nis/nis_print.c:265 +#: nis/nis_print.c:268 #, c-format msgid "Character Separator : %c\n" msgstr "Karakter Ayracý: %c\n" @@ -1458,11 +1517,11 @@ msgstr "Karakter Ayracý: %c\n" msgid "Child exited" msgstr "Ast çýktý" -#: sunrpc/clnt_perr.c:348 +#: sunrpc/clnt_perr.c:357 msgid "Client credential too weak" msgstr "Ýstemci güven belgesi çok zayýf" -#: nis/nis_print.c:267 +#: nis/nis_print.c:270 msgid "Columns :\n" msgstr "Sütun :\n" @@ -1480,7 +1539,7 @@ msgstr "Dil karakteristiklerini derler" msgid "Computer bought the farm" msgstr "Yatarken sütünü içtin mi?" -#: elf/ldconfig.c:141 +#: elf/ldconfig.c:136 msgid "Configure Dynamic Linker Run Time Bindings." msgstr "Dinamik Baðlayýcýnýn Ýcra Zamaný Baðýntýlarýný Yapýlandýrýr." @@ -1510,14 +1569,14 @@ msgstr "Baðlantýda zaman aþýmý" msgid "Continued" msgstr "Devam ediliyor" -#: iconv/iconv_prog.c:69 +#: iconv/iconv_prog.c:73 msgid "Convert encoding of given files from one encoding to another." msgstr "Verilen dosyalarýn kodlamasýný dönüþtürür" -#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355 -#: iconv/iconv_prog.c:351 locale/programs/locale.c:269 +#: catgets/gencat.c:246 elf/ldconfig.c:259 elf/sprof.c:355 +#: iconv/iconv_prog.c:393 iconv/iconvconfig.c:335 locale/programs/locale.c:281 #: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90 -#: nss/getent.c:63 posix/getconf.c:751 +#: nss/getent.c:63 posix/getconf.c:904 #, c-format msgid "" "Copyright (C) %s Free Software Foundation, Inc.\n" @@ -1538,6 +1597,10 @@ msgstr "\"%s\" günlük dosyasý oluþturula msgid "Create C header file NAME containing symbol definitions" msgstr "Sembol tanýmlarýný içeren C baþlýk dosyasý ÝSÝM'i oluþturur" +#: iconv/iconvconfig.c:110 +msgid "Create fastloading iconv module configuration file." +msgstr "Hýzlý yükleme iconv modülü yapýlandýrma dosyasý oluþturulur." + #: locale/programs/localedef.c:102 msgid "Create old-style tables" msgstr "Eski tarz tablolar oluþturur" @@ -1546,7 +1609,7 @@ msgstr "Eski tarz tablolar oluþturur" msgid "Create output even if warning messages were issued" msgstr "Uyarý iletileri yayýnlansa bile çýktý dosyasýný oluþturur" -#: nis/nis_print.c:326 +#: nis/nis_print.c:329 #, c-format msgid "Creation Time : %s" msgstr "Oluþturma Zamaný: %s" @@ -1565,19 +1628,11 @@ msgstr "VERÝDOSYASI [ÇIKTIDOSYASI]" msgid "DES entry for netname %s not unique\n" msgstr "Að ismi %s için DES giriþi eþsiz deðil\n" -#: nis/nis_print.c:112 +#: nis/nis_print.c:115 msgid "DIRECTORY\n" msgstr "DÝZÝN\n" -#: nis/nis_print.c:42 -msgid "DNANS" -msgstr "DNANS" - -#: nis/nis_print.c:38 -msgid "DNS" -msgstr "DNS" - -#: elf/dl-open.c:189 +#: elf/dl-deps.c:101 elf/dl-open.c:188 msgid "DST not allowed in SUID/SGID programs" msgstr "SUID/SGID programlarda DST'ye izin verilmez" @@ -1589,7 +1644,7 @@ msgstr "DÝNAMÝK BAÐLAYICI HATASI!!!" msgid "Database for table does not exist" msgstr "Tablo için veritabaný yok" -#: nis/ypclnt.c:818 +#: nis/ypclnt.c:820 msgid "Database is busy" msgstr "Veritabaný meþgul" @@ -1597,7 +1652,7 @@ msgstr "Veritabaný meþgul" msgid "Deadlock situation detected/avoided" msgstr "ÖlüKilit konumu saptandý/engellendi" -#: nis/nis_print.c:226 +#: nis/nis_print.c:229 msgid "Default Access rights :\n" msgstr "Öntanýmlý Eriþim haklarý:\n" @@ -1624,12 +1679,12 @@ msgstr "Aygýt veri alýþveriþine uygun de msgid "Device or resource busy" msgstr "Aygýt ya da özkaynak meþgul" -#: nis/nis_print.c:180 +#: nis/nis_print.c:183 #, c-format msgid "Diffie-Hellmann (%d bits)\n" msgstr "Diffie-Hellmann (%d bit)\n" -#: nis/nis_print.c:318 +#: nis/nis_print.c:321 #, c-format msgid "Directory : %s\n" msgstr "Dizin : %s\n" @@ -1658,15 +1713,15 @@ msgstr "Üzerinde çalýþýlan tty de iletil msgid "Do not use existing catalog, force new output file" msgstr "Mevcut kataloðu kullanmaz, yeni çýktý dosyasýný zorlar" -#: nis/ypclnt.c:864 +#: nis/ypclnt.c:866 msgid "Domain not bound" msgstr "Alan baðýntýsý yapýlamadý" -#: elf/ldconfig.c:129 +#: elf/ldconfig.c:124 msgid "Don't build cache" msgstr "Arabellek oluþturulamýyor" -#: elf/ldconfig.c:130 +#: elf/ldconfig.c:125 msgid "Don't generate links" msgstr "Baðlar üretilemiyor" @@ -1674,31 +1729,31 @@ msgstr "Baðlar üretilemiyor" msgid "Dump information generated by PC profiling." msgstr "Üretilen PC profilini yazar." -#: elf/dl-load.c:1290 +#: elf/dl-load.c:1293 msgid "ELF file ABI version invalid" msgstr "ELF dosyasý ABI sürümü geçersiz" -#: elf/dl-load.c:1287 +#: elf/dl-load.c:1290 msgid "ELF file OS ABI invalid" msgstr "ELF dosyasý OS ABI geçersiz" -#: elf/dl-load.c:1296 +#: elf/dl-load.c:1299 msgid "ELF file version does not match current one" msgstr "ELF dosyasý sürümü mevcut biriyle eþleþmiyor" -#: elf/dl-load.c:1283 +#: elf/dl-load.c:1286 msgid "ELF file version ident does not match current one" msgstr "ELF dosyasý sürüm kimliði mevcut biriyle eþleþmiyor" -#: elf/dl-load.c:1307 +#: elf/dl-load.c:1305 msgid "ELF file's phentsize not the expected size" msgstr "ELF dosyasýnýn phent uzunluðu beklenen uzunlukta deðil" -#: elf/dl-load.c:876 +#: elf/dl-load.c:884 msgid "ELF load command address/offset not properly aligned" msgstr "ELF yükleme komutu adresi/baþvurusu gereði gibi hizalanamýyor" -#: elf/dl-load.c:873 +#: elf/dl-load.c:881 msgid "ELF load command alignment not page-aligned" msgstr "ELF yükleme komutu hizalamasý sayfa-hizalamalý deðil" @@ -1706,11 +1761,11 @@ msgstr "ELF yükleme komutu hizalamasý sa msgid "EMT trap" msgstr "EMT tuzaðý" -#: nis/nis_print.c:121 +#: nis/nis_print.c:124 msgid "ENTRY\n" msgstr "GÝRÝÞ\n" -#: nis/nis_print.c:300 +#: nis/nis_print.c:303 msgid "Encrypted data\n" msgstr "Þifreli veri\n" @@ -1864,7 +1919,11 @@ msgstr "Bilinmeyen hata sisteminde hata: msgid "Error while talking to callback proc" msgstr "callback proc haberleþme hatasý" -#: inet/ruserpass.c:181 +#: timezone/zdump.c:268 +msgid "Error writing standard output" +msgstr "Standart çýktýya yazarken hata" + +#: inet/ruserpass.c:184 msgid "Error: .netrc file is readable by others." msgstr "Hata: .netrc dosyasý baþkalarý tarafýndan okunabilir." @@ -1887,7 +1946,7 @@ msgstr "ÖLÜMCÜL: sistem `_POSIX2_LOCALED msgid "FILE contains mapping from symbolic names to UCS4 values" msgstr "DOSYA sembolik isimlerden UCS4 deðerlere eþlemler içerir" -#: sunrpc/clnt_perr.c:356 +#: sunrpc/clnt_perr.c:365 msgid "Failed (unspecified error)" msgstr "Baþarýlamadý (belirlenmemiþ hata)" @@ -1896,7 +1955,7 @@ msgstr "Baþarýlamadý (belirlenmemiþ hata msgid "Failed to look up user '%s' to run server as" msgstr "Sunucuyu adýyla çalýþtýrmak için '%s' kullanýcýsýna bakýlýrken hata oluþtu" -#: elf/readlib.c:108 +#: elf/readlib.c:109 #, c-format msgid "File %s is too small, not checked." msgstr "%s dosyasý çok küçük, kontrol edilemedi." @@ -1913,7 +1972,7 @@ msgstr "Dosya betimleyici hatalý durumda msgid "File exists" msgstr "Dosya var" -#: elf/cache.c:124 elf/cache.c:134 +#: elf/cache.c:147 elf/cache.c:157 msgid "File is not a cache file.\n" msgstr "Bir arabellek dosyasý deðil.\n" @@ -1947,7 +2006,7 @@ msgstr "Dosya tablosu taþtý" msgid "File too large" msgstr "Dosya çok büyük" -#: intl/tst-gettext2.c:36 +#: intl/tst-gettext2.c:37 msgid "First string for testing." msgstr "Test edilecek ilk dizge." @@ -1959,7 +2018,7 @@ msgstr "Ýlk/sonraki zinciri kopuk" msgid "Floating point exception" msgstr "Gerçel sayý istisnasý" -#: elf/ldconfig.c:136 +#: elf/ldconfig.c:131 msgid "Format to use: new, old or compat (default)" msgstr "Kullanýlacak biçem: new, old ya da compat (öntanýmlý)" @@ -1976,7 +2035,7 @@ msgstr "Dizin için tam bir yeniden eþzam msgid "Function not implemented" msgstr "Ýþlev bulunamadý (Bir güncelleme gerekebilir)" -#: nis/nis_print.c:115 +#: nis/nis_print.c:118 msgid "GROUP\n" msgstr "GRUP\n" @@ -2003,7 +2062,7 @@ msgstr "" "Zamanla düzgün deðiþen çýktý üretilir. \n" "(iþlev çaðrýlarýnýn sayýsýyla düzgün deðiþen çýktý üretimi öntanýmlýdýr)" -#: elf/ldconfig.c:128 +#: elf/ldconfig.c:123 msgid "Generate verbose messages" msgstr "Çok detaylý iletiler üretilir" @@ -2011,7 +2070,7 @@ msgstr "Çok detaylý iletiler üretilir" msgid "Generic system error" msgstr "Genel sistem hatasý" -#: locale/programs/locale.c:77 +#: locale/programs/locale.c:86 msgid "Get locale-specific information." msgstr "Dile özel bilgiler alýnýr" @@ -2028,12 +2087,12 @@ msgstr "Bu yardým iletisi verilir" msgid "Gratuitous error" msgstr "Bu hata lotodan çýktý" -#: nis/nis_print.c:320 +#: nis/nis_print.c:323 #, c-format msgid "Group : %s\n" msgstr "Grup : %s\n" -#: nis/nis_print.c:249 +#: nis/nis_print.c:252 msgid "Group Flags :" msgstr "Grup Flamalarý:" @@ -2098,16 +2157,12 @@ msgstr "G/Ç mümkün" msgid "IOT trap" msgstr "IOT tuzaðý" -#: nis/nis_print.c:36 -msgid "IVY" -msgstr "IVY" - #: stdio-common/../sysdeps/gnu/errlist.c:645 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66 msgid "Identifier removed" msgstr "Tanýtýcý kaldýrýldý" -#: elf/ldconfig.c:525 +#: elf/ldconfig.c:535 #, c-format msgid "Ignored file %s since it is not a regular file." msgstr "Normal bir dosya olmadýðýndan %s dosyasý yoksayýldý" @@ -2160,7 +2215,7 @@ msgstr "Artalan süreç için iþlem uygun d msgid "Information request" msgstr "Bilgi isteði" -#: iconv/iconv_prog.c:58 +#: iconv/iconv_prog.c:62 msgid "Information:" msgstr "Bilgi:" @@ -2168,12 +2223,12 @@ msgstr "Bilgi:" msgid "Input Files:" msgstr "Girdi Dosyalarý:" -#: elf/ldconfig.c:698 elf/readlib.c:92 +#: elf/ldconfig.c:754 elf/readlib.c:93 #, c-format msgid "Input file %s not found.\n" msgstr "Girdi dosyasý %s bulunamadý.\n" -#: iconv/iconv_prog.c:55 +#: iconv/iconv_prog.c:59 msgid "Input/Output format specification:" msgstr "Girdi/Çýktý biçem özellikleri:" @@ -2182,11 +2237,11 @@ msgstr "Girdi/Çýktý biçem özellikleri:" msgid "Input/output error" msgstr "Girdi/Çýktý hatasý" -#: nis/ypclnt.c:798 +#: nis/ypclnt.c:800 msgid "Internal NIS error" msgstr "Ýçsel NIS hatasý" -#: nis/ypclnt.c:862 +#: nis/ypclnt.c:864 msgid "Internal ypbind error" msgstr "Ýçsel ypbind hatasý" @@ -2194,6 +2249,10 @@ msgstr "Ýçsel ypbind hatasý" msgid "Interrupt" msgstr "Sistem kesmesi" +#: posix/../sysdeps/posix/gai_strerror.c:46 +msgid "Interrupted by a signal" +msgstr "Bir sinyal ile engellendi" + #. TRANS Interrupted function call; an asynchronous signal occurred and prevented #. TRANS completion of the call. When this happens, you should try the call #. TRANS again. @@ -2217,27 +2276,27 @@ msgstr "Kesme ile engellenen sistem çaðr msgid "Invalid argument" msgstr "Geçersiz argüman" -#: posix/regex.c:1102 +#: posix/regex.c:1380 msgid "Invalid back reference" msgstr "Geriye baþvuru geçersiz" -#: posix/regex.c:1096 +#: posix/regex.c:1374 msgid "Invalid character class name" msgstr "Geçersiz karakter sýnýfý ismi" -#: sunrpc/clnt_perr.c:332 +#: sunrpc/clnt_perr.c:341 msgid "Invalid client credential" msgstr "Ýstemci güven belgesi geçersiz" -#: sunrpc/clnt_perr.c:340 +#: sunrpc/clnt_perr.c:349 msgid "Invalid client verifier" msgstr "Ýstemci doðrulamasý geçersiz" -#: posix/regex.c:1093 +#: posix/regex.c:1371 msgid "Invalid collation character" msgstr "Karþýlaþtýrma karakteri geçersiz" -#: posix/regex.c:1114 +#: posix/regex.c:1392 msgid "Invalid content of \\{\\}" msgstr "\\{\\} içeriði geçersiz" @@ -2262,15 +2321,15 @@ msgstr "Ýþlem için nesne geçersiz" msgid "Invalid or incomplete multibyte or wide character" msgstr "Çokbaytlý/geniþ karakter geçersiz veya tamamlanmamýþ" -#: posix/regex.c:1123 +#: posix/regex.c:1401 msgid "Invalid preceding regular expression" msgstr "Önceleme düzenli ifadesi geçersiz" -#: posix/regex.c:1117 +#: posix/regex.c:1395 msgid "Invalid range end" msgstr "Geçersiz kapsam sonu" -#: posix/regex.c:1090 +#: posix/regex.c:1368 msgid "Invalid regular expression" msgstr "Düzenli ifade geçersiz" @@ -2282,7 +2341,7 @@ msgstr "Ýstem kodu geçersiz" msgid "Invalid request descriptor" msgstr "Ýstem betimleyici geçersiz" -#: sunrpc/clnt_perr.c:352 +#: sunrpc/clnt_perr.c:361 msgid "Invalid server verifier" msgstr "Sunucu doðrulamasý geçersiz" @@ -2310,7 +2369,7 @@ msgstr "Bir \"name\" dosyasý" msgid "Is a named type file" msgstr "Bir \"named\" türü dosya" -#: nis/nis_print.c:188 +#: nis/nis_print.c:191 msgid "Kerberos.\n" msgstr "Kerberos.\n" @@ -2318,7 +2377,7 @@ msgstr "Kerberos.\n" msgid "Killed" msgstr "Süreç durduruldu" -#: nis/nis_print.c:124 +#: nis/nis_print.c:127 msgid "LINK\n" msgstr "BAÐ\n" @@ -2361,20 +2420,20 @@ msgstr "Bað numarasý kapsam dýþý" msgid "Link points to illegal name" msgstr "Kuraldýþý isme bað" -#: nis/nis_print.c:283 +#: nis/nis_print.c:286 msgid "Linked Object Type : " msgstr "Baðlý Nesne Türü : " -#: nis/nis_print.c:285 +#: nis/nis_print.c:288 #, c-format msgid "Linked to : %s\n" msgstr "Bað hedefi: %s\n" -#: nis/ypclnt.c:810 +#: nis/ypclnt.c:812 msgid "Local domain name not set" msgstr "Yerel alan ismi ayarlanmamýþ" -#: nis/ypclnt.c:800 +#: nis/ypclnt.c:802 msgid "Local resource allocation failure" msgstr "Yerel çözüm tahsisi baþarýsýz" @@ -2391,11 +2450,11 @@ msgstr "Bozulmuþ ya da kuraldýþý isim" msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options." msgstr "Uzun seçeneklerdeki argümanlar zorunlu olsun olmasýn kýsa seçeneklerde de geçerlidir." -#: elf/ldconfig.c:135 +#: elf/ldconfig.c:130 msgid "Manually link individual libraries." msgstr "Her bir kitaplýðý kendiniz baðlayýn." -#: nis/nis_print.c:169 +#: nis/nis_print.c:172 msgid "Master Server :\n" msgstr "Ana Sunucu :\n" @@ -2407,7 +2466,7 @@ msgstr "Ana sunucu meþgul, aktarmanýn ta msgid "Memory allocation failure" msgstr "Bellek tahsisi baþarýsýz" -#: posix/regex.c:1120 +#: posix/regex.c:1398 msgid "Memory exhausted" msgstr "Bellek tükendi" @@ -2426,7 +2485,7 @@ msgstr "Ýleti aktarým için çok uzun" msgid "Missing or malformed attribute" msgstr "Kayýp ya da bozulmuþ öznitelik" -#: nis/nis_print.c:328 +#: nis/nis_print.c:331 #, c-format msgid "Mod. Time : %s" msgstr "Deðiþ. Zamaný : %s" @@ -2439,7 +2498,7 @@ msgstr "Deðiþiklik baþarýsýz" msgid "Modify operation failed" msgstr "Deðiþtirme iþlemi baþarýsýz oldu" -#: locale/programs/locale.c:70 +#: locale/programs/locale.c:78 msgid "Modify output format:" msgstr "Deðiþtirme çýktý biçemi:" @@ -2457,7 +2516,7 @@ msgstr "Sunucu-kullanýcý seçeneði için k msgid "NAME" msgstr "ÝSÝM" -#: locale/programs/locale.c:80 +#: locale/programs/locale.c:89 msgid "" "NAME\n" "[-a|-m]" @@ -2465,15 +2524,11 @@ msgstr "" "ÝSÝM\n" "[-a|-m]" -#: nis/nis_print.c:32 -msgid "NIS" -msgstr "NIS" - -#: nis/ypclnt.c:814 +#: nis/ypclnt.c:816 msgid "NIS client/server version mismatch - can't supply service" msgstr "NIS istemci/sunucu sürümü eþleþmiyor - servis saðlanamaz" -#: nis/ypclnt.c:812 +#: nis/ypclnt.c:814 msgid "NIS map database is bad" msgstr "NIS eþleþme veritabaný hatalý" @@ -2489,7 +2544,7 @@ msgstr "NIS+ sunucularý eriþilemez durum msgid "NIS+ service is unavailable or not installed" msgstr "NIS+ servisi iþe yaramaz durumda ya da yüklenmemiþ" -#: nis/nis_print.c:109 +#: nis/nis_print.c:112 msgid "NO OBJECT\n" msgstr "NESNE YOK\n" @@ -2497,7 +2552,7 @@ msgstr "NESNE YOK\n" msgid "NUMBER" msgstr "SAYI" -#: nis/nis_print.c:163 +#: nis/nis_print.c:166 #, c-format msgid "Name : `%s'\n" msgstr "Ýsim : `%s'\n" @@ -2587,7 +2642,7 @@ msgstr "Anot yok" msgid "No buffer space available" msgstr "G/Ç önbelleklerinin hepsi kullanýmda" -#: locale/programs/ld-ctype.c:425 +#: locale/programs/ld-ctype.c:433 msgid "No character set name specified in charmap" msgstr "Karakter eþleþme listesinde karakter kümesi ismi belirtilmemiþ" @@ -2604,8 +2659,8 @@ msgstr "Bir alt süreç yok " msgid "No data available" msgstr "Veri yok" -#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500 -#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132 +#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1513 +#: locale/programs/ld-ctype.c:415 locale/programs/ld-identification.c:132 #: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98 #: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94 #: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91 @@ -2618,7 +2673,7 @@ msgstr "%s kategorisi için atama bulunam msgid "No file space on server" msgstr "Sunucuda dosya alaný yok" -#: elf/ldconfig.c:532 +#: elf/ldconfig.c:543 #, c-format msgid "No link created since soname could not be found for %s" msgstr "%s için kitaplýk ismi bulunamadýðýndan bað oluþturulmadý" @@ -2631,7 +2686,7 @@ msgstr "%s için kitaplýk ismi bulunamadý msgid "No locks available" msgstr "iþe yarar kilit yok" -#: posix/regex.c:1087 +#: posix/regex.c:1365 msgid "No match" msgstr "Eþleþme yok" @@ -2644,11 +2699,11 @@ msgstr "medium yok" msgid "No message of desired type" msgstr "Arzulanan türde ileti yok" -#: nis/ypclnt.c:802 +#: nis/ypclnt.c:804 msgid "No more records in map database" msgstr "Artýk kayýtlar eþlem veritabanýnda" -#: posix/regex.c:5955 +#: posix/regex.c:7919 msgid "No previous regular expression" msgstr "Önceki düzenli ifade yok" @@ -2698,11 +2753,11 @@ msgstr "Böyle bir aygýt ya da adres yok" msgid "No such file or directory" msgstr "Böyle bir dosya ya da dizin yok" -#: nis/ypclnt.c:796 +#: nis/ypclnt.c:798 msgid "No such key in map" msgstr "Eþlemde böyle bir tuþ yok" -#: nis/ypclnt.c:794 +#: nis/ypclnt.c:796 msgid "No such map in server's domain" msgstr "Sunucu sahasýnda böyle bir eþlem yok" @@ -2720,7 +2775,7 @@ msgstr "NIS+ olmayan isim alaný ile karþ msgid "Non-recoverable failure in name resolution" msgstr "Ýsim çözümlemesinde düzeltilebilir olmayan bozukluk" -#: nis/nis_print.c:177 +#: nis/nis_print.c:180 msgid "None.\n" msgstr "Yok.\n" @@ -2787,12 +2842,12 @@ msgstr "Sahibi deðil" msgid "Not supported" msgstr "Desteklenmiyor" -#: nis/nis_print.c:264 +#: nis/nis_print.c:267 #, c-format msgid "Number of Columns : %d\n" msgstr "Sütun sayýsý : %d\n" -#: nis/nis_print.c:363 +#: nis/nis_print.c:366 #, c-format msgid "Number of objects : %u\n" msgstr "Nesne sayýsý : %u\n" @@ -2813,17 +2868,17 @@ msgstr "Sayýsal argüman saha dýþý" msgid "Numerical result out of range" msgstr "Sayýsal sonuç kapsam dýþý" -#: nis/nis_print.c:367 +#: nis/nis_print.c:370 #, c-format msgid "Object #%d:\n" msgstr "Nesne #%d:\n" -#: nis/nis_print.c:317 +#: nis/nis_print.c:320 #, c-format msgid "Object Name : %s\n" msgstr "Nesne Ýsmi : %s\n" -#: nis/nis_print.c:329 +#: nis/nis_print.c:332 msgid "Object Type : " msgstr "Nesne Türü : " @@ -2840,11 +2895,11 @@ msgstr "Nesne uzakta" msgid "Object with same name exists" msgstr "Ayný isimde nesne var" -#: timezone/zic.c:2022 +#: timezone/zic.c:2028 msgid "Odd number of quotation marks" msgstr "Týrnak iþaretleri tek sayýda" -#: elf/ldconfig.c:134 +#: elf/ldconfig.c:129 msgid "Only process directories specified on the command line. Don't build cache." msgstr "Komut satýrýnda sadece süreç dizinleri belirtilmiþ. Önbellek oluþturulamadý." @@ -2926,7 +2981,7 @@ msgstr "Veri akýmý özkaynaklarý yetersiz msgid "Out of streams resources" msgstr "Veri akýmlarý kaynaklarý yetersiz" -#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99 +#: iconv/iconv_prog.c:64 locale/programs/localedef.c:99 msgid "Output control:" msgstr "Çýktý kontrolu:" @@ -2934,12 +2989,12 @@ msgstr "Çýktý kontrolu:" msgid "Output selection:" msgstr "Çýktý seçimi:" -#: nis/nis_print.c:319 +#: nis/nis_print.c:322 #, c-format msgid "Owner : %s\n" msgstr "Sahibi : %s\n" -#: nis/nis_print.c:127 +#: nis/nis_print.c:130 msgid "PRIVATE\n" msgstr "ÖZEL\n" @@ -2961,13 +3016,13 @@ msgstr "Kýsmen iyi" msgid "Passed object is not the same object on server" msgstr "Geçen nesne sunucudaki ayný nesne deðil" -#: elf/ldconfig.c:287 +#: elf/ldconfig.c:282 #, c-format msgid "Path `%s' given more than once" msgstr "`%s' dosya yolu birden fazla verilmiþ" #. TRANS Permission denied; the file permissions do not allow the attempted operation. -#: nis/nis_error.c:39 nis/ypclnt.c:816 +#: nis/nis_error.c:39 nis/ypclnt.c:818 #: stdio-common/../sysdeps/gnu/errlist.c:109 #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43 msgid "Permission denied" @@ -2977,11 +3032,11 @@ msgstr "Eriþim engellendi" msgid "Power failure" msgstr "Güç kesilmesi" -#: posix/regex.c:1126 +#: posix/regex.c:1404 msgid "Premature end of regular expression" msgstr "Düzenli ifadenin sonu eksik" -#: elf/ldconfig.c:127 +#: elf/ldconfig.c:122 msgid "Print cache" msgstr "Yazýcý ön belleði" @@ -2989,6 +3044,10 @@ msgstr "Yazýcý ön belleði" msgid "Print current configuration statistic" msgstr "Þu anki yapýlandýrma istatistiklerini basar" +#: locale/programs/locale.c:81 +msgid "Print more information" +msgstr "Daha fazla ileti basar" + #: locale/programs/localedef.c:107 msgid "Print more messages" msgstr "Daha fazla ileti basar" @@ -3005,6 +3064,10 @@ msgstr "Büyük olasýlýkla iyi" msgid "Probably not found" msgstr "Galiba bulunamadý" +#: posix/../sysdeps/posix/gai_strerror.c:42 +msgid "Processing request in progress" +msgstr "Ýþlem zaten süreç dahilinde" + #: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53 msgid "Profiling timer expired" msgstr "Tanýtým süreölçerde zamanaþýmý" @@ -3062,7 +3125,7 @@ msgstr "RFS-özgü hata" msgid "RPC bad procedure for program" msgstr "RPC program için uygun altyordam deðil" -#: nis/ypclnt.c:790 +#: nis/ypclnt.c:792 msgid "RPC failure on NIS operation" msgstr "NIS iþleminde RPC baþarýsýz" @@ -3086,88 +3149,88 @@ msgstr "RPC yapýsý hatalý" msgid "RPC version wrong" msgstr "RPC sürümü yanlýþ" -#: sunrpc/clnt_perr.c:271 +#: sunrpc/clnt_perr.c:278 msgid "RPC: (unknown error code)" msgstr "RPC: (bilinmeyen hata kodu)" -#: sunrpc/clnt_perr.c:190 +#: sunrpc/clnt_perr.c:197 msgid "RPC: Authentication error" msgstr "RPC: Kanýtlama hatasý" -#: sunrpc/clnt_perr.c:170 +#: sunrpc/clnt_perr.c:177 msgid "RPC: Can't decode result" msgstr "RPC: sonuç çözümlenemedi" -#: sunrpc/clnt_perr.c:166 +#: sunrpc/clnt_perr.c:173 msgid "RPC: Can't encode arguments" msgstr "RPC: argümanlar kodlanamadý" -#: sunrpc/clnt_perr.c:230 +#: sunrpc/clnt_perr.c:237 msgid "RPC: Failed (unspecified error)" msgstr "RPC: Baþarýsýz (belirtilmemiþ hata)" -#: sunrpc/clnt_perr.c:186 +#: sunrpc/clnt_perr.c:193 msgid "RPC: Incompatible versions of RPC" msgstr "RPC: RPC sürümleri eksik" -#: sunrpc/clnt_perr.c:222 +#: sunrpc/clnt_perr.c:229 msgid "RPC: Port mapper failure" msgstr "RPC: Port eþlemci baþarýsýz" -#: sunrpc/clnt_perr.c:202 +#: sunrpc/clnt_perr.c:209 msgid "RPC: Procedure unavailable" msgstr "RPC: Altyordam kullanýþsýz" -#: sunrpc/clnt_perr.c:226 +#: sunrpc/clnt_perr.c:233 msgid "RPC: Program not registered" msgstr "RPC: Program kayýtlý deðil" -#: sunrpc/clnt_perr.c:194 +#: sunrpc/clnt_perr.c:201 msgid "RPC: Program unavailable" msgstr "RPC: Uygulama kullanýþsýz" -#: sunrpc/clnt_perr.c:198 +#: sunrpc/clnt_perr.c:205 msgid "RPC: Program/version mismatch" msgstr "RPC: Uygulama/sürüm çeliþiyor" -#: sunrpc/clnt_perr.c:210 +#: sunrpc/clnt_perr.c:217 msgid "RPC: Remote system error" msgstr "RPC: Uzak sistem hatasý" -#: sunrpc/clnt_perr.c:206 +#: sunrpc/clnt_perr.c:213 msgid "RPC: Server can't decode arguments" msgstr "RPC: Sunucu argümanlarý çözümleyemedi" -#: sunrpc/clnt_perr.c:163 +#: sunrpc/clnt_perr.c:170 msgid "RPC: Success" msgstr "RPC: Baþarýlý" -#: sunrpc/clnt_perr.c:182 +#: sunrpc/clnt_perr.c:189 msgid "RPC: Timed out" msgstr "RPC: Zaman aþýmý" -#: sunrpc/clnt_perr.c:178 +#: sunrpc/clnt_perr.c:185 msgid "RPC: Unable to receive" msgstr "RPC: Alýnamadý" -#: sunrpc/clnt_perr.c:174 +#: sunrpc/clnt_perr.c:181 msgid "RPC: Unable to send" msgstr "RPC: Gönderilemedi" -#: sunrpc/clnt_perr.c:214 +#: sunrpc/clnt_perr.c:221 msgid "RPC: Unknown host" msgstr "RPC: Bilinmeyen makina" -#: sunrpc/clnt_perr.c:218 +#: sunrpc/clnt_perr.c:225 msgid "RPC: Unknown protocol" msgstr "RPC: Bilinmeyen protokol" -#: nis/nis_print.c:185 +#: nis/nis_print.c:188 #, c-format msgid "RSA (%d bits)\n" msgstr "RSA (%d bit)\n" -#: elf/dl-sym.c:68 elf/dl-sym.c:125 +#: elf/dl-sym.c:72 elf/dl-sym.c:134 msgid "RTLD_NEXT used in code not dynamically loaded" msgstr "RTLD_NEXT kullanýlan kod dinamik olarak yüklenmedi" @@ -3190,7 +3253,7 @@ msgstr "Salt-okunur dosya sistemi" msgid "Real-time signal %d" msgstr "Gerçek-zamanlý sinyal %d" -#: posix/regex.c:1129 +#: posix/regex.c:1407 msgid "Regular expression too big" msgstr "Düzenli ifade çok büyük" @@ -3204,11 +3267,11 @@ msgstr "Uzak G/Ç hatasý" msgid "Remote address changed" msgstr "Uzak adres deðiþti" -#: inet/ruserpass.c:182 +#: inet/ruserpass.c:185 msgid "Remove password or make file unreadable by others." msgstr "Parolayý kaldýrýr ya da dosyayý diðerleri tarafýndan okunamaz yapar." -#: elf/cache.c:394 +#: elf/cache.c:431 #, c-format msgid "Renaming of %s to %s failed" msgstr "%s'in ismi %s olarak deðiþtirilemedi" @@ -3218,27 +3281,38 @@ msgstr "%s'in ismi %s olarak deðiþtirile msgid "Reopening shared object `%s' failed" msgstr "`%s' paylaþýmlý nesnesinin yeniden açýlmasý baþarýsýz" -#: nis/nis_print.c:171 +#: nis/nis_print.c:174 msgid "Replicate :\n" msgstr "Örnekleme :\n" #: argp/argp-help.c:1639 #, c-format msgid "Report bugs to %s.\n" -msgstr "Hatalarý %s adresine bildiriniz.\n" +msgstr "" +"Yazýlým hatalarýný %s adresine\n" +"çeviri hatalarýný adresine bildiriniz.\n" -#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337 -#: locale/programs/locale.c:256 locale/programs/localedef.c:297 -#: malloc/memusagestat.c:602 +#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:379 +#: iconv/iconvconfig.c:321 locale/programs/locale.c:268 +#: locale/programs/localedef.c:297 malloc/memusagestat.c:602 msgid "Report bugs using the `glibcbug' script to .\n" msgstr "" -"`glibcbug' betiðini kullanarak oluþturacaðýnýz hata raporunu\n" -" adresine gönderiniz.\n" +"Çeviri hatalarýný adresine, diðerlerini\n" +"ise `glibcbug' betiðini kullanarak oluþturacaðýnýz hata raporuyla\n" +" adresine bildiriniz.\n" -#: nis/ypclnt.c:788 +#: nis/ypclnt.c:790 msgid "Request arguments bad" msgstr "Ýstem argümanlarý hatalý" +#: posix/../sysdeps/posix/gai_strerror.c:43 +msgid "Request canceled" +msgstr "Ýstem iptal edildi" + +#: posix/../sysdeps/posix/gai_strerror.c:44 +msgid "Request not canceled" +msgstr "Ýstem iptal edilmedi" + #: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171 msgid "Reserved for future use" msgstr "Ýlerde kullanmak üzere ayrýldý" @@ -3309,11 +3383,7 @@ msgstr "Sonuçlar geri baþvuru iþlevine g msgid "SHOBJ [PROFDATA]" msgstr "SHOBJ [PROFDATA]" -#: nis/nis_print.c:34 -msgid "SUNYP" -msgstr "SUNYP" - -#: nis/nis_print.c:266 +#: nis/nis_print.c:269 #, c-format msgid "Search Path : %s\n" msgstr "Dosya arama yolu : %s\n" @@ -3330,11 +3400,11 @@ msgstr "Sunucu meþgul, tekrar deneyin" msgid "Server out of memory" msgstr "Sunucuda bellek yetersiz" -#: sunrpc/clnt_perr.c:336 +#: sunrpc/clnt_perr.c:345 msgid "Server rejected credential" msgstr "Sunucu güven belgesini reddetti" -#: sunrpc/clnt_perr.c:344 +#: sunrpc/clnt_perr.c:353 msgid "Server rejected verifier" msgstr "Sunucu doðrulayýcýyý reddetti" @@ -3402,7 +3472,7 @@ msgstr "NFS dosya tanýtýcý geçersiz" msgid "Start NUMBER threads" msgstr "SAYIlý baþlýklarý baþlatýr" -#: nis/nis_print.c:362 +#: nis/nis_print.c:365 #, c-format msgid "Status : %s\n" msgstr "Durum : %s\n" @@ -3432,7 +3502,7 @@ msgstr "Veri hattý hatasý" msgid "Structure needs cleaning" msgstr "Veri aðacý temizlenmek ister" -#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084 +#: nis/nis_error.c:29 nis/ypclnt.c:788 nis/ypclnt.c:862 posix/regex.c:1362 #: stdio-common/../sysdeps/gnu/errlist.c:20 msgid "Success" msgstr "Baþarýlý" @@ -3453,11 +3523,11 @@ msgstr "Sembolik karakter isimleri DOSYA msgid "System error" msgstr "Sistem hatasý" -#: locale/programs/locale.c:65 +#: locale/programs/locale.c:73 msgid "System information:" msgstr "Sistem bilgileri:" -#: nis/ypclnt.c:866 +#: nis/ypclnt.c:868 msgid "System resource allocation failure" msgstr "Sistem öz kaynaklarýnýn ayrýlmasý baþarýsýz" @@ -3478,7 +3548,7 @@ msgstr "" msgid "TABLE" msgstr "TABLO" -#: nis/nis_print.c:118 +#: nis/nis_print.c:121 msgid "TABLE\n" msgstr "TABLO\n" @@ -3486,7 +3556,7 @@ msgstr "TABLO\n" msgid "TABLE,yes" msgstr "TABLO,evet" -#: nis/nis_print.c:263 +#: nis/nis_print.c:266 #, c-format msgid "Table Type : %s\n" msgstr "Tablo Türü : %s\n" @@ -3509,7 +3579,7 @@ msgstr "Sonlandýrýldý" msgid "Text file busy" msgstr "Metin dosyasý meþgul" -#: iconv/iconv_prog.c:627 +#: iconv/iconv_prog.c:680 msgid "" "The following list contain all the coded character sets known. This does\n" "not necessarily mean that all combinations of these names can be used for\n" @@ -3525,11 +3595,11 @@ msgstr "" "\n" " " -#: sunrpc/rpc_main.c:1364 +#: sunrpc/rpc_main.c:1365 msgid "This implementation doesn't support newstyle or MT-safe code!\n" msgstr "Bu tamamlama yenibiçimi ya da MT-safe kodu desteklemez!\n" -#: nis/nis_print.c:224 +#: nis/nis_print.c:227 msgid "Time to live : " msgstr "Yaþam süresi(ttl): " @@ -3603,7 +3673,7 @@ msgstr "Çok fazla kullanýcý var" msgid "Trace/breakpoint trap" msgstr "Ýzleme/kesme noktasý yakalayýcý" -#: posix/regex.c:1099 +#: posix/regex.c:1377 msgid "Trailing backslash" msgstr "Ýzleyen tersbölü" @@ -3635,12 +3705,12 @@ msgstr "Diðer uç aktarým için baðlý deði msgid "Try `%s --help' or `%s --usage' for more information.\n" msgstr "Daha fazla bilgi için `%s --help' veya `%s --usage' yazýnýz.\n" -#: nis/nis_print.c:164 +#: nis/nis_print.c:167 #, c-format msgid "Type : %s\n" msgstr "Türü : %s\n" -#: nis/nis_print.c:48 +#: nis/nis_print.c:51 msgid "UNKNOWN" msgstr "BÝLÝNMEYEN" @@ -3660,31 +3730,35 @@ msgstr "Geriye baþvuru oluþturulamadý" msgid "Unable to create process on server" msgstr "Sunucuda süreç oluþturulamadý" -#: nis/nis_print.c:191 +#: nis/nis_print.c:194 #, c-format msgid "Unknown (type = %d, bits = %d)\n" msgstr "Bilinmeyen (tür = %d, bit = %d)\n" -#: inet/ruserpass.c:274 +#: inet/ruserpass.c:277 #, c-format msgid "Unknown .netrc keyword %s" msgstr "Bilinmeyen .netrc anahtar kelimesi %s" -#: elf/../sysdeps/generic/readelflib.c:69 +#: elf/../sysdeps/generic/readelflib.c:71 #, c-format msgid "Unknown ELFCLASS in file %s.\n" msgstr "%s dosyasýnda bilinmeyen ELFCLASS.\n" -#: nis/ypclnt.c:820 +#: nis/ypclnt.c:822 msgid "Unknown NIS error code" msgstr "Bilinmeyen NIS hata kodu" +#: elf/cache.c:101 +msgid "Unknown OS" +msgstr "Bilinmeyen iþletim sistemi" + #: nss/getent.c:771 #, c-format msgid "Unknown database: %s\n" msgstr "Bilinmeyen veritabaný: %s\n" -#: posix/../sysdeps/posix/gai_strerror.c:52 +#: posix/../sysdeps/posix/gai_strerror.c:57 msgid "Unknown error" msgstr "Bilinmeyen hata" @@ -3720,31 +3794,31 @@ msgstr "Bilinmeyen sunucu hatasý" msgid "Unknown signal %d" msgstr "Bilinmeyen sinyal %d" -#: misc/error.c:114 timezone/zic.c:384 +#: misc/error.c:113 timezone/zic.c:390 msgid "Unknown system error" msgstr "Bilinmeyen sistem hatasý" -#: nis/ypclnt.c:868 +#: nis/ypclnt.c:870 msgid "Unknown ypbind error" msgstr "Bilinmeyen ypbind hatasý" -#: posix/regex.c:1108 +#: posix/regex.c:1386 msgid "Unmatched ( or \\(" msgstr "( ya da \\( eþleþmiyor" -#: posix/regex.c:1132 +#: posix/regex.c:1410 msgid "Unmatched ) or \\)" msgstr ") ya da \\) eþleþmiyor" -#: posix/regex.c:1105 +#: posix/regex.c:1383 msgid "Unmatched [ or [^" msgstr "[ ya da [^ eþleþmiyor" -#: posix/regex.c:1111 +#: posix/regex.c:1389 msgid "Unmatched \\{" msgstr "\\{ eþleþmiyor" -#: posix/getconf.c:819 +#: posix/getconf.c:1006 #, c-format msgid "Unrecognized variable `%s'" msgstr "Tanýnmayan deðiþken `%s'" @@ -3757,20 +3831,20 @@ msgstr "Acil G/Ç koþulu" msgid "Usage:" msgstr "Kullanýmý:" -#: posix/getconf.c:731 +#: posix/getconf.c:883 #, c-format -msgid "Usage: %s variable_name [pathname]\n" -msgstr "Kullanýmý: %s deðiþken_ismi [dosyayolu_ismi]\n" +msgid "Usage: %s [-v specification] variable_name [pathname]\n" +msgstr "Kullanýmý: %s [-v özellik] deðiþken_ismi [dosyayolu_ismi]\n" #: sunrpc/rpcinfo.c:674 msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n" msgstr "Kullanýmý: rpcinfo [ -n portnum ] -u makina prognum [ sürümnum ]\n" -#: elf/ldconfig.c:132 +#: elf/ldconfig.c:127 msgid "Use CACHE as cache file" msgstr "Arabellek dosyasý olarak ARABELLEK kullanýlýr" -#: elf/ldconfig.c:133 +#: elf/ldconfig.c:128 msgid "Use CONF as configuration file" msgstr "Yapýlandýrma dosyasý olarak YAPD kullanýlýr" @@ -3795,7 +3869,7 @@ msgstr "Atanan veri türü için deðer çok msgid "Virtual timer expired" msgstr "Sanal süreölçer zaman aþýmý" -#: timezone/zic.c:1926 +#: timezone/zic.c:1932 msgid "Wild result from command execution" msgstr "Komut icrasýndan alýnan sonuç garip" @@ -3803,19 +3877,19 @@ msgstr "Komut icrasýndan alýnan sonuç ga msgid "Window changed" msgstr "Pencere deðiþtirildi" -#: locale/programs/locale.c:69 +#: locale/programs/locale.c:77 msgid "Write names of available charmaps" msgstr "Mevcut karakter eþlemlerin isimlerini yazar" -#: locale/programs/locale.c:67 +#: locale/programs/locale.c:75 msgid "Write names of available locales" msgstr "Mevcut yerellerin isimlerini yazar" -#: locale/programs/locale.c:71 +#: locale/programs/locale.c:79 msgid "Write names of selected categories" msgstr "Seçilmiþ kategorilerin isimlerini yazar" -#: locale/programs/locale.c:72 +#: locale/programs/locale.c:80 msgid "Write names of selected keywords" msgstr "Seçilmiþ anahtar kelimelerin isimlerini yazar" @@ -3823,18 +3897,18 @@ msgstr "Seçilmiþ anahtar kelimelerin isi msgid "Write output to file NAME" msgstr "Çýktýyý ÝSÝM dosyasýna yazar" -#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379 +#: elf/cache.c:402 elf/cache.c:411 elf/cache.c:415 msgid "Writing of cache data failed" msgstr "Arabellek verisini yazmada hata" -#: elf/cache.c:383 +#: elf/cache.c:419 msgid "Writing of cache data failed." msgstr "Arabellek verisi yazýlamadý." -#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361 -#: iconv/iconv_prog.c:356 locale/programs/locale.c:274 +#: catgets/gencat.c:251 elf/ldconfig.c:264 elf/sprof.c:361 +#: iconv/iconv_prog.c:398 iconv/iconvconfig.c:340 locale/programs/locale.c:286 #: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95 -#: nss/getent.c:68 posix/getconf.c:756 +#: nss/getent.c:68 posix/getconf.c:909 #, c-format msgid "Written by %s.\n" msgstr "%s tarafýndan yazýldý.\n" @@ -3843,14 +3917,6 @@ msgstr "%s tarafýndan yazýldý.\n" msgid "Wrong medium type" msgstr "Yanlýþ ortam türü" -#: nis/nis_print.c:40 -msgid "X500" -msgstr "X500" - -#: nis/nis_print.c:44 -msgid "XCHS" -msgstr "XCHS" - #: nis/ypclnt.c:174 #, c-format msgid "YPBINDPROC_DOMAIN: %s\n" @@ -3865,11 +3931,15 @@ msgstr " " msgid "You really blew it this time" msgstr " " -#: timezone/zic.c:1088 +#: timezone/zic.c:1094 msgid "Zone continuation line end time is not after end time of previous line" msgstr "`Zone' devamlýlýk satýrýnýn bitiþ zamaný önceki satýrýn bitiþ zamanýndan sonra deðil" -#: iconv/iconv_prog.c:73 +#: iconv/iconvconfig.c:114 +msgid "[DIR...]" +msgstr "[DÝZÝN...]" + +#: iconv/iconv_prog.c:77 msgid "[FILE...]" msgstr "[DOSYA...]" @@ -3901,13 +3971,13 @@ msgstr "`%.*s' karakter eþlem olarak zat msgid "`%.*s' already defined in repertoire" msgstr "`%.*s' repertuvar olarak zaten atanmýþ" -#: locale/programs/charmap.c:599 locale/programs/locfile.h:96 +#: locale/programs/charmap.c:604 locale/programs/locfile.h:96 #: locale/programs/repertoire.c:314 #, c-format msgid "`%1$s' definition does not end with `END %1$s'" msgstr "`%1$s' tanýmý `END %1$s' ile bitmiyor" -#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454 +#: locale/programs/ld-collate.c:1281 locale/programs/ld-ctype.c:1455 #, c-format msgid "`%s' and `%.*s' are no valid names for symbolic range" msgstr "`%s' ve `%.*s' sembolik kapsam için geçerli isimler deðil" @@ -3917,7 +3987,7 @@ msgstr "`%s' ve `%.*s' sembolik kapsam i msgid "`%s' is no correct profile data file for `%s'" msgstr "`%s' `%s' için doðru olmayan þekillendirici verisi dosyasý" -#: locale/programs/ld-ctype.c:691 +#: locale/programs/ld-ctype.c:699 msgid "`digit' category has not entries in groups of ten" msgstr "`digit' kategorisi 10 gruptan hiç birinde girdiye sahip deðil" @@ -3933,12 +4003,12 @@ msgstr "ai_socktype desteklenmiyor" msgid "already running" msgstr "Zaten çalýþýyor" -#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184 +#: locale/programs/charmap.c:439 locale/programs/repertoire.c:184 #, c-format msgid "argument to <%s> must be a single character" msgstr "<%s>in argümaný bir tek karakter olmalý" -#: locale/programs/locfile.c:124 +#: locale/programs/locfile.c:126 #, c-format msgid "argument to `%s' must be a single character" msgstr "%s'in argümaný bir tek karakter olmalý" @@ -3951,28 +4021,28 @@ msgstr "auth_none.c - Ölümcül dizme soru msgid "authunix_create: out of memory\n" msgstr "authunix_create: bellek yetersiz\n" -#: locale/programs/charmap.c:364 locale/programs/locfile.c:118 -#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176 +#: locale/programs/charmap.c:369 locale/programs/locfile.c:120 +#: locale/programs/locfile.c:147 locale/programs/repertoire.c:176 msgid "bad argument" msgstr "argüman hatalý" -#: inet/rcmd.c:424 +#: inet/rcmd.c:425 msgid "bad owner" msgstr "Sahip hatalý" -#: timezone/zic.c:1210 +#: timezone/zic.c:1216 msgid "blank FROM field on Link line" msgstr "`Link' satýrýnda FROM alaný boþ" -#: timezone/zic.c:1214 +#: timezone/zic.c:1220 msgid "blank TO field on Link line" msgstr "`Link' satýrýnda TO alaný boþ" -#: malloc/mcheck.c:291 +#: malloc/mcheck.c:302 msgid "block freed twice\n" msgstr "blok iki kere serbest býrakýldý\n" -#: malloc/mcheck.c:294 +#: malloc/mcheck.c:305 msgid "bogus mcheck_status, library is buggy\n" msgstr "mcheck_status sahte, kitaplýk hatalý\n" @@ -3996,11 +4066,11 @@ msgstr "cache_set: kurban ayrýlamadý" msgid "cache_set: victim not found" msgstr "cache_set: kurban bulunamadý" -#: timezone/zic.c:1751 +#: timezone/zic.c:1757 msgid "can't determine time zone abbreviation to use just after until time" msgstr "süreye deðinden hemen sonra kullanýlacak zaman dilimi kýsaltmasý saptanamadý" -#: sunrpc/svc_simple.c:76 +#: sunrpc/svc_simple.c:85 #, c-format msgid "can't reassign procedure number %ld\n" msgstr "%ld altyordam numarasý tekrar verilemez\n" @@ -4014,15 +4084,15 @@ msgstr "bölüm prototipi yer deðiþtirmede msgid "cannot add already read locale `%s' a second time" msgstr "Zaten okunan `%s' dil karakteristikleri ikinci bir kez eklenemez" -#: elf/dl-deps.c:470 +#: elf/dl-deps.c:454 msgid "cannot allocate dependency list" msgstr "baðýmlýlýk listesi ayrýlamadý" -#: elf/dl-load.c:1031 +#: elf/dl-load.c:1039 msgid "cannot allocate memory for program header" msgstr "uygulama baþlýðý için bellek ayrýlamadý" -#: elf/dl-load.c:339 +#: elf/dl-load.c:348 msgid "cannot allocate name record" msgstr "isim kaydý ayrýlamadý" @@ -4030,31 +4100,27 @@ msgstr "isim kaydý ayrýlamadý" msgid "cannot allocate symbol data" msgstr "sembol verisi ayrýlamadý" -#: elf/dl-deps.c:501 +#: elf/dl-deps.c:484 msgid "cannot allocate symbol search list" msgstr "sembol arama listesi ayrýlamadý" -#: elf/dl-version.c:291 +#: elf/dl-version.c:292 msgid "cannot allocate version reference table" msgstr "sürüm baþvuru tablosu ayrýlamadý" -#: elf/dl-load.c:1000 +#: elf/dl-load.c:1008 msgid "cannot change memory protections" msgstr "bellek korumalarý deðiþtirilemiyor" -#: elf/dl-load.c:533 +#: elf/dl-load.c:540 msgid "cannot create RUNPATH/RPATH copy" msgstr "RUNPATH/RPATH kopyasý oluþturulamýyor" -#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593 -#: elf/dl-load.c:685 +#: elf/dl-load.c:456 elf/dl-load.c:525 elf/dl-load.c:553 elf/dl-load.c:600 +#: elf/dl-load.c:693 msgid "cannot create cache for search path" msgstr "dosya arama yolu için arabellek oluþturulamýyor" -#: elf/dl-support.c:191 -msgid "cannot create capability list" -msgstr "yetenek listesi oluþturulamýyor" - #: elf/sprof.c:715 elf/sprof.c:773 msgid "cannot create internal descriptor" msgstr "iç tanýtýcý oluþturulamýyor" @@ -4063,23 +4129,28 @@ msgstr "iç tanýtýcý oluþturulamýyor" msgid "cannot create internal descriptors" msgstr "iç tanýtýcýlar oluþturulamýyor" -#: elf/dl-load.c:583 +#: locale/programs/locfile.c:693 +#, c-format +msgid "cannot create output file `%s' for category `%s'" +msgstr "çýktý dosyasý `%s' `%s' kategorisi için oluþturulamýyor" + +#: elf/dl-load.c:590 msgid "cannot create search path array" msgstr "dosya arama yolu dizisi oluþturulamýyor" -#: elf/dl-load.c:1137 +#: elf/dl-load.c:1125 msgid "cannot create searchlist" msgstr "arama listesi oluþturulamýyor" -#: elf/dl-load.c:822 elf/dl-load.c:1682 +#: elf/dl-load.c:830 elf/dl-load.c:1724 msgid "cannot create shared object descriptor" msgstr "paylaþýmlý nesne tanýmlayýcý oluþturulamýyor" -#: catgets/gencat.c:1316 +#: catgets/gencat.c:1315 msgid "cannot determine escape character" msgstr "öncelem karakteri saptanamýyor" -#: elf/dl-load.c:950 +#: elf/dl-load.c:958 msgid "cannot dynamically load executable" msgstr "çalýþtýrýlabilir dosya dinamik olarak yüklenemiyor" @@ -4101,7 +4172,11 @@ msgstr "C ön iþlemci bulunamýyor: %s \n" msgid "cannot find any C preprocessor (cpp)\n" msgstr "hiç C ön iþlemci (cpp) bulunamadý\n" -#: nscd/connections.c:225 +#: iconv/iconvconfig.c:1159 +msgid "cannot generate output file" +msgstr "çýktý dosyasý üretilemiyor" + +#: nscd/connections.c:227 #, c-format msgid "cannot handle old request version %d; current version is %d" msgstr "eski istem sürümü %d elde edilemedi; mevcut sürüm %d" @@ -4110,19 +4185,15 @@ msgstr "eski istem sürümü %d elde edilem msgid "cannot load profiling data" msgstr "þekillendirici verisi yüklenemiyor" -#: elf/dl-deps.c:586 -msgid "cannot load shared object file" -msgstr "paylaþýmlý nesne dosyasý yüklenemiyor" - -#: elf/dl-reloc.c:63 +#: elf/dl-reloc.c:62 msgid "cannot make segment writable for relocation" msgstr "yeniden konumlama için parça yazýlabilir yapýlamýyor" -#: elf/dl-load.c:1016 +#: elf/dl-load.c:1024 msgid "cannot map zero-fill pages" msgstr "sýfýrlar içeren sayfalar eþleþtirilemez" -#: inet/rcmd.c:420 +#: inet/rcmd.c:421 msgid "cannot open" msgstr "açýlamýyor" @@ -4135,7 +4206,7 @@ msgstr "`%s' açýlamýyor" msgid "cannot open input file" msgstr "girdi dosyasý açýlamýyor" -#: catgets/gencat.c:288 iconv/iconv_prog.c:225 +#: catgets/gencat.c:288 iconv/iconv_charmap.c:159 iconv/iconv_prog.c:265 #, c-format msgid "cannot open input file `%s'" msgstr "`%s' girdi dosyasý açýlamýyor" @@ -4146,21 +4217,21 @@ msgstr "`%s' girdi dosyasý açýlamýyor" msgid "cannot open locale definition file `%s'" msgstr "Dil karakteristikleri tanýmlama dosyasý `%s' açýlamýyor" -#: iconv/iconv_prog.c:194 +#: iconv/iconv_prog.c:209 msgid "cannot open output file" msgstr "çýktý dosyasý açýlamýyor" -#: catgets/gencat.c:944 catgets/gencat.c:985 +#: catgets/gencat.c:949 catgets/gencat.c:990 #, c-format msgid "cannot open output file `%s'" msgstr "`%s' çýktý dosyasý açýlamýyor" -#: locale/programs/locfile.c:381 +#: locale/programs/locfile.c:571 #, c-format msgid "cannot open output file `%s' for category `%s'" msgstr "çýktý dosyasý `%s' açýlamadý; `%s' kategorisi için." -#: elf/dl-load.c:1695 +#: elf/dl-load.c:1737 msgid "cannot open shared object file" msgstr "paylaþýmlý nesne dosyasý açýlamýyor" @@ -4169,7 +4240,7 @@ msgstr "paylaþýmlý nesne dosyasý açýlamý msgid "cannot open socket: %s" msgstr "soket açýlamýyor: %s" -#: elf/dl-load.c:814 +#: elf/dl-load.c:822 msgid "cannot open zero fill device" msgstr "sýfýrlar içeren aygýt açýlamaz" @@ -4182,7 +4253,7 @@ msgstr "karakter eþlem dizini `%s' okuna msgid "cannot read configuration file; this is fatal" msgstr "yapýlandýrma dosyasý açýlamýyor; bu ölümcül bir hata" -#: elf/dl-load.c:838 elf/dl-load.c:1244 +#: elf/dl-load.c:846 elf/dl-load.c:1247 elf/dl-load.c:1319 elf/dl-load.c:1333 msgid "cannot read file data" msgstr "dosya verisi okunamýyor" @@ -4195,11 +4266,6 @@ msgstr "baþlýk okunamýyor" msgid "cannot read header from `%s'" msgstr "baþlýk `%s'den okunamýyor" -#: locale/programs/locale.c:308 -#, c-format -msgid "cannot read locale directory `%s'" -msgstr "dil karakteristikleri dizini `%s' okunamýyor" - #: nscd/nscd_stat.c:128 msgid "cannot read statistics data" msgstr "istatistik verileri okunamýyor" @@ -4208,7 +4274,7 @@ msgstr "istatistik verileri okunamýyor" msgid "cannot safe new repertoire map" msgstr "yeni repertuvar eþlemin doðruluðundan emin olunamaz " -#: elf/dl-load.c:776 +#: elf/dl-load.c:784 msgid "cannot stat shared object" msgstr "paylaþýmlý nesne durumlanamýyor" @@ -4222,7 +4288,7 @@ msgstr "`%s' dosyasý stat() olamýyor: %s msgid "cannot write output files to `%s'" msgstr "çýktý dosyalarý `%s' dizinine yazýlamýyor" -#: nscd/connections.c:261 nscd/connections.c:282 +#: nscd/connections.c:265 nscd/connections.c:287 #, c-format msgid "cannot write result: %s" msgstr "sonuç yazýlamýyor: %s" @@ -4232,76 +4298,80 @@ msgstr "sonuç yazýlamýyor: %s" msgid "cannot write statistics: %s" msgstr "istatistikler yazýlamýyor: %s" -#: locale/programs/ld-ctype.c:509 +#: locale/programs/ld-ctype.c:517 #, c-format msgid "character '%s' in class `%s' must be in class `%s'" msgstr "`%s' karakteri `%s' sýnýfý yerine `%s' sýnýfýnda olmalý" -#: locale/programs/ld-ctype.c:524 +#: locale/programs/ld-ctype.c:532 #, c-format msgid "character '%s' in class `%s' must not be in class `%s'" msgstr "`%s' karakteri `%s' sýnýfýnda ama `%s' sýnýfýnda olmamalý" -#: locale/programs/ld-ctype.c:579 +#: locale/programs/ld-ctype.c:587 msgid "character not defined in character map" msgstr " karakteri karakter eþlemde atanmamýþ" -#: locale/programs/ld-ctype.c:453 +#: locale/programs/ld-ctype.c:461 #, c-format msgid "character L'\\u%0*x' in class `%s' must be in class `%s'" msgstr "L'\\u%0*x' karakteri `%s' sýnýfýnda, `%s' sýnýfýnda olmalý" -#: locale/programs/ld-ctype.c:467 +#: locale/programs/ld-ctype.c:475 #, c-format msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'" msgstr "L'\\u%0*x' karakteri `%s' sýnýfýnda, `%s' sýnýfýnda olmamalý" -#: locale/programs/ld-ctype.c:3030 +#: locale/programs/ld-ctype.c:3032 #, c-format msgid "character `%s' not defined while needed as default value" msgstr "Öntanýmlý deðer olmasý gereken `%s' karakteri atanmamýþ" -#: locale/programs/ld-ctype.c:1215 +#: locale/programs/ld-ctype.c:1223 #, c-format msgid "character class `%s' already defined" msgstr "`%s' karakter sýnýfý zaten atanmýþ" -#: locale/programs/ld-ctype.c:1247 +#: locale/programs/ld-ctype.c:1255 #, c-format msgid "character map `%s' already defined" msgstr "`%s' karakter eþlem zaten atanmýþ" -#: locale/programs/charmap.c:249 +#: locale/programs/charmap.c:254 #, c-format msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n" msgstr "`%s' karakter eþlemi ASCII uyumlu deðil, yerel de ISO C uyumlu deðil\n" -#: locale/programs/charmap.c:135 +#: locale/programs/charmap.c:140 #, c-format msgid "character map file `%s' not found" msgstr "`%s' karakter eþlem dosyasý bulunamadý" -#: locale/programs/charmap.c:460 +#: locale/programs/charmap.c:465 msgid "character sets with locking states are not supported" msgstr "tuþ kilitlemeli karakter kümeleri desteklenmiyor" +#: intl/tst-codeset.c:40 intl/tst-codeset.c:50 +msgid "cheese" +msgstr "mükemmel" + #: locale/programs/localedef.c:482 msgid "circular dependencies between locale definitions" msgstr "Dil karakteristikleri tanýmlarý arasýnda baðýmlýlýklar kýsýr döngülü" -#: sunrpc/clnt_raw.c:111 +#: sunrpc/clnt_raw.c:115 msgid "clnt_raw.c - Fatal header serialization error." msgstr "clnt_raw.c - Ölümcül baþlýk sýralama hatasý." -#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134 +#: sunrpc/clnt_tcp.c:127 sunrpc/clnt_tcp.c:136 msgid "clnttcp_create: out of memory\n" msgstr "clnttcp_create: bellek yetersiz\n" -#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141 +#: sunrpc/clnt_udp.c:132 sunrpc/clnt_udp.c:143 msgid "clntudp_create: out of memory\n" msgstr "clntudp_create: bellek yetersiz\n" -#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132 +#: sunrpc/clnt_unix.c:125 sunrpc/clnt_unix.c:134 msgid "clntunix_create: out of memory\n" msgstr "clntunix_create: bellek yetersiz\n" @@ -4309,28 +4379,28 @@ msgstr "clntunix_create: bellek yetersiz msgid "constant or identifier expected" msgstr "sabit ya da tanýmlayýcý gerekli" -#: iconv/iconv_prog.c:182 +#: iconv/iconv_prog.c:231 #, c-format msgid "conversion from `%s' to `%s' not supported" msgstr "`%s' den `%s' e dönüþüm desteklenmiyor" -#: catgets/gencat.c:1290 +#: catgets/gencat.c:1289 msgid "conversion modules not available" msgstr "dönüþüm modülleri yok" -#: locale/programs/ld-monetary.c:900 +#: locale/programs/ld-monetary.c:902 msgid "conversion rate value cannot be zero" msgstr "dönüþtürme oraný sýfýr olamaz" -#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410 +#: iconv/iconv_prog.c:427 iconv/iconv_prog.c:452 msgid "conversion stopped due to problem in writing the output" msgstr "çýktýyý yazarken bir problemden dolayý dönüþtürme durdu" -#: sunrpc/svc_simple.c:84 +#: sunrpc/svc_simple.c:93 msgid "couldn't create an rpc server\n" msgstr "bir rpc sunucu oluþturulamadý\n" -#: sunrpc/svc_simple.c:92 +#: sunrpc/svc_simple.c:101 #, c-format msgid "couldn't register prog %ld vers %ld\n" msgstr "uygulama %ld sürüm %ld sicil kaydý yapýlamadý\n" @@ -4339,17 +4409,17 @@ msgstr "uygulama %ld sürüm %ld sicil kay msgid "database [key ...]" msgstr "veritabaný [tuþ ...]" -#: locale/programs/charmap.c:192 +#: locale/programs/charmap.c:197 #, c-format msgid "default character map file `%s' not found" msgstr "öntanýmlý karakter eþlem dosyasý `%s' bulunamadý" -#: locale/programs/charmap.c:392 +#: locale/programs/charmap.c:397 #, c-format msgid "duplicate definition of <%s>" msgstr "<%s> tanýmý tekrarlanmýþ" -#: locale/programs/ld-collate.c:3043 +#: locale/programs/ld-collate.c:3062 #, c-format msgid "duplicate definition of script `%s'" msgstr "`%s' betiðinin atamasý tekrarlanmýþ" @@ -4358,12 +4428,12 @@ msgstr "`%s' betiðinin atamasý tekrarlan msgid "duplicate set definition" msgstr "küme atamasý tekrarlanmýþ" -#: timezone/zic.c:1003 +#: timezone/zic.c:1009 #, c-format msgid "duplicate zone name %s (file \"%s\", line %d)" msgstr "dilim ismi %s tekrarlanmýþ (dosya \"%s\", satýr %d)" -#: locale/programs/ld-ctype.c:2557 +#: locale/programs/ld-ctype.c:2559 #, c-format msgid "duplicated definition for mapping `%s'" msgstr "`%s' eþlemi için atama tekrarlanmýþ" @@ -4376,7 +4446,7 @@ msgstr "ileti tanýtýcý tekrarlanmýþ" msgid "duplicated message number" msgstr "tekrarlanmýþ ileti numarasý" -#: locale/programs/ld-ctype.c:2368 +#: locale/programs/ld-ctype.c:2370 msgid "ellipsis range must be marked by two operands of same type" msgstr "elips kapsamý ayný türde iki veri öðesi ile sýnýrlanmýþ olmalýdýr" @@ -4384,10 +4454,14 @@ msgstr "elips kapsamý ayný türde iki ver msgid "empty char string" msgstr "boþ karakter dizgesi" -#: elf/dl-open.c:223 +#: elf/dl-open.c:219 msgid "empty dynamic string token substitution" msgstr "boþ dinamik dizge simge ikamesi" +#: elf/dl-deps.c:113 +msgid "empty dynamics string token substitution" +msgstr "boþ dinamik dizge simge ikamesi" + #: sunrpc/svc_udp.c:454 msgid "enablecache: cache already enabled" msgstr "enablecache: arabellek zaten etkin" @@ -4404,29 +4478,29 @@ msgstr "enablecache: arabellek verisi ay msgid "enablecache: could not allocate cache fifo" msgstr "enablecache: arabellek g/ç'larý ayrýlamadý" -#: iconv/iconv_prog.c:57 +#: iconv/iconv_prog.c:61 msgid "encoding for output" msgstr "çýktý için kodlama" -#: iconv/iconv_prog.c:56 +#: iconv/iconv_prog.c:60 msgid "encoding of original text" msgstr "özgün metin kodlamasý" -#: nscd/connections.c:361 nscd/connections.c:453 +#: nscd/connections.c:366 nscd/connections.c:460 #, c-format msgid "error getting callers id: %s" msgstr "çaðrýcý kimliði alýnýrken hata: %s" -#: locale/programs/ld-collate.c:3013 +#: locale/programs/ld-collate.c:3032 msgid "error while adding equivalent collating symbol" msgstr "eþdeðer karþýlaþtýrma sembolünü eklerken hata" -#: iconv/iconv_prog.c:242 +#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:283 #, c-format msgid "error while closing input `%s'" msgstr "`%s' girdisi kapatýlýrken hata" -#: iconv/iconv_prog.c:288 +#: iconv/iconv_prog.c:330 msgid "error while closing output file" msgstr "çýktý dosyasý kapatýlýrken hata" @@ -4434,7 +4508,8 @@ msgstr "çýktý dosyasý kapatýlýrken hata" msgid "error while closing the profiling data file" msgstr "þekillendirici verisi dosyasý kapatýlýrken hata" -#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505 +#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:538 iconv/iconv_prog.c:516 +#: iconv/iconv_prog.c:547 msgid "error while reading the input" msgstr "girdi okunurken hata" @@ -4442,10 +4517,14 @@ msgstr "girdi okunurken hata" msgid "expect string argument for `copy'" msgstr "`copy' için dizge argüman gerekli" -#: timezone/zic.c:893 +#: timezone/zic.c:899 msgid "expected continuation line not found" msgstr "gereken süreklilik satýrý bulunamadý" +#: locale/programs/ld-time.c:1027 +msgid "extra trailing semicolon" +msgstr "fazladan ; var" + #: elf/sprof.c:404 #, c-format msgid "failed to load shared object `%s'" @@ -4455,7 +4534,7 @@ msgstr "paylaþýmlý nesne `%s' yüklenemed msgid "failed to load symbol data" msgstr "sembol verisi yüklenemedi" -#: elf/dl-load.c:763 +#: elf/dl-load.c:771 msgid "failed to map segment from shared object" msgstr "parça paylaþýmlý nesneden eþleþtirilemedi" @@ -4463,18 +4542,19 @@ msgstr "parça paylaþýmlý nesneden eþleþt msgid "failed to mmap the profiling data file" msgstr "þekillendirme verisi dosyasý mmap olamadý" -#: iconv/iconv_prog.c:186 +#: iconv/iconv_prog.c:235 msgid "failed to start conversion processing" msgstr "dönüþüm iþlemi baþlatýlamadý" -#: locale/programs/locfile.c:406 +#: locale/programs/locfile.c:596 #, c-format msgid "failure while writing data for category `%s'" msgstr "`%s' kategorisi için veri yazýlýrken hata oluþtu" -#: nis/nis_call.c:156 -msgid "fcntl: F_SETFD" -msgstr "fcntl: F_SETFD" +#: elf/../sysdeps/generic/readelflib.c:35 +#, c-format +msgid "file %s is truncated\n" +msgstr "%s dosyasý kýrpýlmýþ\n" #. TRANS: the file will not be removed; this is an #. TRANS: informative message. @@ -4483,19 +4563,19 @@ msgstr "fcntl: F_SETFD" msgid "file `%s' already exists and may be overwritten\n" msgstr "`%s' dosyasý zaten var ve üzerine yazýlabilir\n" -#: elf/dl-load.c:1244 +#: elf/dl-load.c:1247 msgid "file too short" msgstr "dosya çok küçük" -#: inet/rcmd.c:422 +#: inet/rcmd.c:423 msgid "fstat failed" msgstr "fstat baþarýsýz" -#: locale/programs/linereader.c:383 +#: locale/programs/linereader.c:388 msgid "garbage at end of character code specification" msgstr "karakter kodu özelliklerinin sonunda bozulma" -#: locale/programs/linereader.c:271 +#: locale/programs/linereader.c:276 msgid "garbage at end of number" msgstr "numaranýn sonunda bozulma" @@ -4515,28 +4595,28 @@ msgstr "get_myaddress: ioctl (arayüz yap msgid "getent - get entries from administrative database." msgstr "getent - yönetim veritabanýndan girdiler alýnýyor." -#: nscd/connections.c:220 +#: nscd/connections.c:221 #, c-format msgid "handle_request: request received (Version = %d)" msgstr "handle_request: istek alýndý (Sürüm = %d)" -#: timezone/zic.c:637 +#: timezone/zic.c:643 msgid "hard link failed, symbolic link used" msgstr "sabit bað baþarýsýz, sembolik bað kullanýldý" -#: inet/rcmd.c:428 +#: inet/rcmd.c:429 msgid "hard linked somewhere" msgstr "bir yere sabit baðlý" -#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430 +#: locale/programs/charmap.c:986 locale/programs/repertoire.c:430 msgid "hexadecimal range format should use only capital characters" msgstr "onaltýlýk kapsam biçimi sadece büyük harfleri kullanacaktýr" -#: timezone/zic.c:1187 +#: timezone/zic.c:1193 msgid "illegal CORRECTION field on Leap line" msgstr "`Leap' satýrýnda kuraldýþý CORRECTION alaný" -#: timezone/zic.c:1191 +#: timezone/zic.c:1197 msgid "illegal Rolling/Stationary field on Leap line" msgstr "`Leap' satýrýnda kuraldýþý Rolling/Stationary alaný" @@ -4544,14 +4624,19 @@ msgstr "`Leap' satýrýnda kuraldýþý Rolli msgid "illegal character in file: " msgstr "dosyada kuraldýþý karakter: " -#: locale/programs/linereader.c:595 +#: locale/programs/linereader.c:600 msgid "illegal escape sequence at end of string" msgstr "karakter dizisinin sonunda uygun olmayan escape dizisi" -#: iconv/iconv_prog.c:427 +#: iconv/iconv_charmap.c:443 +#, c-format +msgid "illegal input sequence at position %Zd" +msgstr "%Zd konumunda uygun olmayan girdi dizgesi" + +#: iconv/iconv_prog.c:469 #, c-format msgid "illegal input sequence at position %ld" -msgstr "%ld pozisyonunda uygun olmayan girdi zinciri" +msgstr "%ld konumunda uygun olmayan girdi dizgesi" #: sunrpc/rpc_main.c:463 #, c-format @@ -4562,102 +4647,102 @@ msgstr "kuraldýþý að türü: `%s'\n" msgid "illegal set number" msgstr "küme sayýsý kuraldýþý" -#: locale/programs/ld-ctype.c:1221 +#: locale/programs/ld-ctype.c:1229 #, c-format msgid "implementation limit: no more than %Zd character classes allowed" msgstr "tamamlama sýnýrý: %Zd karakterden fazla olmayan sýnýflara izin verilmedi" -#: locale/programs/ld-ctype.c:1253 +#: locale/programs/ld-ctype.c:1261 #, c-format msgid "implementation limit: no more than %d character maps allowed" msgstr "tamamlama sýnýrý: %d karakterden fazla olmayan karakter eþleþme listesine izin verilmedi" -#: iconv/iconv_prog.c:431 +#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:473 msgid "incomplete character or shift sequence at end of buffer" msgstr "tampon bellek sonunda eksik karakter ya da shift dizisi" -#: timezone/zic.c:850 +#: timezone/zic.c:856 msgid "input line of unknown type" msgstr "girdi satýrýnýn türü bilinmiyor" -#: elf/dl-load.c:1291 +#: elf/dl-load.c:1294 msgid "internal error" msgstr "iç hata" -#: iconv/iconv_prog.c:435 +#: iconv/iconv_prog.c:477 msgid "internal error (illegal descriptor)" msgstr "iç hata (kuraldýþý tanýmlayýcý)" -#: timezone/zic.c:1813 +#: timezone/zic.c:1819 msgid "internal error - addtype called with bad isdst" msgstr "iç hata -- addtype hatalý isdst ile çaðrýldý" -#: timezone/zic.c:1821 +#: timezone/zic.c:1827 msgid "internal error - addtype called with bad ttisgmt" msgstr "iç hata -- addtype hatalý ttisgmt ile çaðrýldý" -#: timezone/zic.c:1817 +#: timezone/zic.c:1823 msgid "internal error - addtype called with bad ttisstd" msgstr "iç hata -- addtype hatalý ttisstd ile çaðrýldý" -#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536 +#: locale/programs/ld-ctype.c:488 locale/programs/ld-ctype.c:544 #, c-format msgid "internal error in %s, line %u" msgstr "%s, %u satýrýnda içsel hata" -#: elf/dl-load.c:1264 +#: elf/dl-load.c:1267 msgid "invalid ELF header" msgstr "ELF baþlýðý geçersiz" -#: timezone/zic.c:1059 +#: timezone/zic.c:1065 msgid "invalid UTC offset" msgstr "UTC offset geçersiz" -#: timezone/zic.c:1062 +#: timezone/zic.c:1068 msgid "invalid abbreviation format" msgstr "kýsaltma biçemi geçersiz" -#: catgets/gencat.c:687 +#: catgets/gencat.c:688 msgid "invalid character: message ignored" msgstr "geçersiz karakter: ileti yoksayýldý" -#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378 +#: timezone/zic.c:1158 timezone/zic.c:1370 timezone/zic.c:1384 msgid "invalid day of month" msgstr "ayýn günü geçersiz" -#: locale/programs/charmap.c:347 +#: locale/programs/charmap.c:352 msgid "invalid definition" msgstr "geçersiz atama" -#: locale/programs/charmap.c:542 +#: locale/programs/charmap.c:547 msgid "invalid encoding given" msgstr "geçersiz kodlama verilmiþ" -#: timezone/zic.c:1316 +#: timezone/zic.c:1322 msgid "invalid ending year" msgstr "bitiþ yýlý geçersiz" -#: catgets/gencat.c:1147 locale/programs/linereader.c:533 +#: catgets/gencat.c:1152 locale/programs/linereader.c:538 msgid "invalid escape sequence" msgstr "geçersiz escape dizisi" -#: timezone/zic.c:1124 +#: timezone/zic.c:1130 msgid "invalid leaping year" msgstr "artýk yýl geçersiz" -#: catgets/gencat.c:726 +#: catgets/gencat.c:731 msgid "invalid line" msgstr "satýr geçersiz" -#: elf/dl-open.c:371 +#: elf/dl-open.c:349 msgid "invalid mode for dlopen()" msgstr "dlopen() için kip geçersiz" -#: timezone/zic.c:1139 timezone/zic.c:1242 +#: timezone/zic.c:1145 timezone/zic.c:1248 msgid "invalid month name" msgstr "ay ismi geçersiz" -#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869 +#: locale/programs/charmap.c:974 locale/programs/ld-collate.c:2888 #: locale/programs/repertoire.c:418 msgid "invalid names for character range" msgstr "karakter kapsamý için geçersiz isimler" @@ -4670,52 +4755,52 @@ msgstr "imleyici uzunluðu geçersiz" msgid "invalid quote character" msgstr "týrnak iþareti geçersiz" -#: timezone/zic.c:958 +#: timezone/zic.c:964 msgid "invalid saved time" msgstr "kazanýlmýþ zaman geçersiz" -#: timezone/zic.c:1291 +#: timezone/zic.c:1297 msgid "invalid starting year" msgstr "baþlangýç yýlý geçersiz" -#: timezone/zic.c:1168 timezone/zic.c:1271 +#: timezone/zic.c:1174 timezone/zic.c:1277 msgid "invalid time of day" msgstr "günün tarihi geçersiz" -#: timezone/zic.c:1369 +#: timezone/zic.c:1375 msgid "invalid weekday name" msgstr "gün ismi geçersiz" -#: nscd/connections.c:470 +#: nscd/connections.c:479 #, c-format msgid "key length in request too long: %d" msgstr "istenen anahtar uzunluðu fazla: %d" -#: elf/ldconfig.c:738 +#: elf/ldconfig.c:794 #, c-format msgid "libc4 library %s in wrong directory" msgstr "libc4 kitaplýðý %s yanlýþ dizinde" -#: elf/ldconfig.c:732 +#: elf/ldconfig.c:788 #, c-format msgid "libc5 library %s in wrong directory" msgstr "libc5 kitaplýðý %s yanlýþ dizinde" -#: elf/ldconfig.c:735 +#: elf/ldconfig.c:791 #, c-format msgid "libc6 library %s in wrong directory" msgstr "libc6 kitaplýðý %s yanlýþ dizinde" -#: elf/ldconfig.c:765 +#: elf/ldconfig.c:821 #, c-format msgid "libraries %s and %s in directory %s have same soname but different type." msgstr "%s ve %s kitaplýklarý %s dizininde ve ayný isme sahip olduklarý halde farklý türde." -#: timezone/zic.c:830 +#: timezone/zic.c:836 msgid "line too long" msgstr "satýr çok uzun" -#: iconv/iconv_prog.c:59 +#: iconv/iconv_prog.c:63 msgid "list all known coded character sets" msgstr "tüm bilinen kodlu karakter kümelerini listeler" @@ -4723,7 +4808,7 @@ msgstr "tüm bilinen kodlu karakter kümel msgid "locale name should consist only of portable characters" msgstr "yer isimlerinin karakterleri ascii 127 içinden seçilmiþ olmalý" -#: inet/rcmd.c:413 +#: inet/rcmd.c:414 msgid "lstat failed" msgstr "lstat baþarýsýz" @@ -4735,7 +4820,11 @@ msgstr "çýktý grafik DEÐERini piksel yük msgid "make output graphic VALUE pixel wide" msgstr "çýktý grafik DEÐERini piksel geniþliði yapar" -#: catgets/gencat.c:780 +#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63 +msgid "makecontext: does not know how to handle more than 8 arguments\n" +msgstr "makecontext: 8 argümandan fazlasýnýn nasýl elde edileceði bilinmiyor\n" + +#: catgets/gencat.c:785 msgid "malformed line ignored" msgstr "hatalý satýr yoksayýldý" @@ -4747,39 +4836,34 @@ msgstr "bölüm baþlýk dizgeleri tablosunu msgid "mapping of section headers failed" msgstr "bölüm baþlýklarý eþlemi baþarýsýz" -#: malloc/mcheck.c:285 +#: malloc/mcheck.c:296 msgid "memory clobbered before allocated block\n" msgstr "bellek ayrýlmýþ bloðun öncesine taþtý\n" -#: malloc/mcheck.c:288 +#: malloc/mcheck.c:299 msgid "memory clobbered past end of allocated block\n" msgstr "bellek ayrýlmýþ bloðun sonrasýna taþtý\n" -#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70 -#: malloc/obstack.c:477 posix/getconf.c:809 +#: locale/programs/xmalloc.c:70 malloc/obstack.c:484 posix/getconf.c:996 msgid "memory exhausted" msgstr "bellek tükendi" -#: malloc/mcheck.c:282 +#: malloc/mcheck.c:293 msgid "memory is consistent, library is buggy\n" msgstr "bellek tutarlý, kitaplýk hatalý\n" -#: elf/cache.c:120 +#: elf/cache.c:143 msgid "mmap of cache file failed.\n" msgstr "arabellek dosyasýnýn mmap'lenmesi baþarýsýz\n" -#: elf/../sysdeps/generic/readelflib.c:108 +#: elf/../sysdeps/generic/readelflib.c:110 msgid "more than one dynamic segment\n" msgstr "bir dinamik parçadan fazla\n" -#: timezone/zic.c:953 +#: timezone/zic.c:959 msgid "nameless rule" msgstr "adsýz kural" -#: iconv/iconv_prog.c:139 -msgid "neither original nor target encoding specified" -msgstr "ne özgün ne de hedef kodlama belirtilmiþ" - #: nis/nss_nisplus/nisplus-publickey.c:281 #: nis/nss_nisplus/nisplus-publickey.c:287 #: nis/nss_nisplus/nisplus-publickey.c:346 @@ -4812,7 +4896,7 @@ msgstr "netname2user: `%s' ismi çok uzun msgid "netname2user: should not have uid 0" msgstr "netname2user: kullanýcý kimliði 0 olmamalýydý" -#: sunrpc/svc_simple.c:159 +#: sunrpc/svc_simple.c:168 #, c-format msgid "never registered prog %d\n" msgstr "prog %d hiç kaydedilmemiþ\n" @@ -4821,11 +4905,11 @@ msgstr "prog %d hiç kaydedilmemiþ\n" msgid "no or value given" msgstr " ya da deðeri verilmeliydi" -#: timezone/zic.c:2142 +#: timezone/zic.c:2148 msgid "no day in month matches rule" msgstr "ay içinde kurala uyan gün yok" -#: locale/programs/ld-collate.c:1757 +#: locale/programs/ld-collate.c:1770 msgid "no definition of `UNDEFINED'" msgstr "`UNDEFINED' tanýmý yok" @@ -4834,7 +4918,7 @@ msgstr "`UNDEFINED' tanýmý yok" msgid "no filename for profiling data given and shared object `%s' has no soname" msgstr "þekillendirici veri için dosya ismi verilmemiþ ve `%s' paylaþýmlý nesnesi için bir kitaplýk dosya ismi yok" -#: locale/programs/ld-ctype.c:739 +#: locale/programs/ld-ctype.c:747 msgid "no input digits defined and none of the standard names in the charmap" msgstr "karakter eþleþme listesinde standart isimlerin hiç biri ve atanmýþ girdi rakamlarý yok" @@ -4842,37 +4926,37 @@ msgstr "karakter eþleþme listesinde stan msgid "no other keyword shall be specified when `copy' is used" msgstr "`copy' kullanýldýðýnda belirtilmiþ olacak diðer anahtar kelime yok" -#: locale/programs/ld-ctype.c:3349 +#: locale/programs/ld-ctype.c:3351 msgid "no output digits defined and none of the standard names in the charmap" msgstr "karakter eþleþme listesinde standart isimlerin hiç biri ve atanmýþ çýktý rakamlarý yok" -#: locale/programs/localedef.c:236 +#: iconv/iconvconfig.c:308 locale/programs/localedef.c:236 msgid "no output file produced because warning were issued" msgstr "uyarý yayýnlandýðýndan üretilen bir çýktý dosyasý yok" -#: locale/programs/charmap.c:488 locale/programs/charmap.c:668 -#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231 +#: locale/programs/charmap.c:493 locale/programs/charmap.c:673 +#: locale/programs/charmap.c:769 locale/programs/repertoire.c:231 msgid "no symbolic name given" msgstr "sembolik isim verilmemiþ" -#: locale/programs/charmap.c:575 locale/programs/charmap.c:723 -#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297 +#: locale/programs/charmap.c:580 locale/programs/charmap.c:728 +#: locale/programs/charmap.c:811 locale/programs/repertoire.c:297 msgid "no symbolic name given for end of range" msgstr "kapsam sonu için sembolik isim verilmemiþ" -#: locale/programs/linereader.c:641 +#: locale/programs/linereader.c:646 msgid "non-symbolic character value should not be used" msgstr "sembolik olmayan karakter deðeri kullanýlmýþ olmayacaktý" -#: locale/programs/ld-ctype.c:804 +#: locale/programs/ld-ctype.c:812 msgid "not all characters used in `outdigit' are available in the charmap" msgstr "`outdigit' içinde kullanýlan karakterlerin bir kýsmý karakter eþleþme listesinde mevcut" -#: locale/programs/ld-ctype.c:821 +#: locale/programs/ld-ctype.c:829 msgid "not all characters used in `outdigit' are available in the repertoire" msgstr "`outdigit' içinde kullanýlan karakterlerin bir kýsmý repertuvarda mevcut" -#: inet/rcmd.c:415 +#: inet/rcmd.c:416 msgid "not regular file" msgstr "düzenli dosya deðil" @@ -4891,36 +4975,32 @@ msgstr "" msgid "nscd not running!\n" msgstr "nscd çalýþmýyor!\n" -#: elf/dl-load.c:1051 +#: elf/dl-load.c:1059 msgid "object file has no dynamic section" msgstr "nesne dosyasýnýn dinamik bölümü yok" -#: iconv/iconv_prog.c:61 +#: iconv/iconv_prog.c:65 msgid "omit invalid characters from output" msgstr "geçersiz karakterleri çýktýya yazmaz" -#: elf/dl-load.c:1311 +#: elf/dl-load.c:1309 msgid "only ET_DYN and ET_EXEC can be loaded" msgstr "sadece ET_DYN ve ET_EXEC yüklü olabilir" -#: locale/programs/charmap.c:632 +#: locale/programs/charmap.c:637 msgid "only WIDTH definitions are allowed to follow the CHARMAP definition" msgstr "CHARMAP tanýmýný sadece geniþlik tanýmlarý izleyebilir" -#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175 +#: locale/programs/ld-collate.c:1018 locale/programs/ld-collate.c:1188 #, c-format msgid "order for `%.*s' already defined at %s:%Zu" msgstr "`%.*s' için sýralama zaten %s:%Zu içinde atanmýþ" -#: iconv/iconv_prog.c:141 -msgid "original encoding not specified using `-f'" -msgstr "özgün kodlama `-f' kullanarak belirtilmemiþ" - -#: inet/ruserpass.c:167 inet/ruserpass.c:190 +#: inet/ruserpass.c:170 inet/ruserpass.c:193 msgid "out of memory" msgstr "bellek yetersiz" -#: iconv/iconv_prog.c:62 +#: iconv/iconv_prog.c:66 msgid "output file" msgstr "çýktý dosyasý" @@ -4928,19 +5008,19 @@ msgstr "çýktý dosyasý" msgid "pmap_getmaps rpc problem" msgstr "pmap_getmaps rpc problem" -#: inet/rcmd.c:233 +#: inet/rcmd.c:234 msgid "poll: protocol failure in circuit setup\n" msgstr "poll: devre ayarýnda protokol hatasý\n" -#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000 +#: locale/programs/ld-ctype.c:1950 locale/programs/ld-ctype.c:2001 msgid "premature end of `translit_ignore' definition" msgstr "`translit_ignore' tanýmýnýn sonu eksik" -#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534 +#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535 msgid "preprocessor error" msgstr "ön iþlemci hatasý" -#: locale/programs/ld-ctype.c:2731 +#: locale/programs/ld-ctype.c:2733 msgid "previous definition was here" msgstr "önceki taným burasýydý" @@ -4948,7 +5028,7 @@ msgstr "önceki taným burasýydý" msgid "print list of count paths and their number of use" msgstr "sayým yollarýnýn listesini ve kullanýmdaki miktarýný basar" -#: iconv/iconv_prog.c:64 +#: iconv/iconv_prog.c:68 msgid "print progress information" msgstr "geliþim bilgisi gösterir" @@ -4974,30 +5054,30 @@ msgstr "%lu uygulamasýnýn %lu sürümü yok msgid "program %lu version %lu ready and waiting\n" msgstr "%lu uygulamasýnýn %lu sürümü hazýr ve bekliyor\n" -#: inet/rcmd.c:270 +#: inet/rcmd.c:271 #, c-format msgid "rcmd: %s: short read" msgstr "rcmd: %s: kýsa okuma" -#: inet/rcmd.c:230 +#: inet/rcmd.c:231 #, c-format msgid "rcmd: poll (setting up stderr): %m\n" msgstr "rcmd: poll (stderr ayarlamasý): %m\n" -#: inet/rcmd.c:158 +#: inet/rcmd.c:159 msgid "rcmd: socket: All ports in use\n" msgstr "rcmd: soket: Tüm portlar kullanýmda\n" -#: inet/rcmd.c:220 +#: inet/rcmd.c:221 #, c-format msgid "rcmd: write (setting up stderr): %m\n" msgstr "rcmd: write (stderr ayarlamasý): %m\n" -#: sunrpc/svc_simple.c:99 +#: sunrpc/svc_simple.c:108 msgid "registerrpc: out of memory\n" msgstr "registerrpc: bellek yetersiz\n" -#: timezone/zic.c:1874 +#: timezone/zic.c:1880 msgid "repeated leap second moment" msgstr "tekrarlanan artýk saniye aný" @@ -5006,7 +5086,7 @@ msgstr "tekrarlanan artýk saniye aný" msgid "repertoire map file `%s' not found" msgstr "`%s' repertuar eþlem dosyasý bulunamadý" -#: locale/programs/charmap.c:1063 +#: locale/programs/charmap.c:1068 msgid "resulting bytes for range not representable." msgstr "sonuçlanan baytlar kapsam için gösterilebilir deðil." @@ -5042,24 +5122,24 @@ msgstr "rpcinfo: haberleþme baþarýsýz: % msgid "rpcinfo: can't contact portmapper" msgstr "rpcinfo: portmapper baðlanamýyor" -#: timezone/zic.c:743 timezone/zic.c:745 +#: timezone/zic.c:749 timezone/zic.c:751 msgid "same rule name in multiple files" msgstr "bir çok dosyada ayný kural ismi var" -#: elf/dl-load.c:1116 +#: elf/dl-load.c:1104 msgid "shared object cannot be dlopen()ed" msgstr "paylaþýmlý nesne dlopen()'lanamýyor" -#: elf/dl-close.c:63 +#: elf/dl-close.c:61 msgid "shared object not open" msgstr "paylaþýmlý nesne açýk deðil" -#: nscd/connections.c:482 +#: nscd/connections.c:493 #, c-format msgid "short read while reading request key: %s" msgstr "istenen tuþ okunurken kýsa okuma: %s" -#: nscd/connections.c:436 +#: nscd/connections.c:443 #, c-format msgid "short read while reading request: %s" msgstr "istenen okuma kýsa: %s" @@ -5069,35 +5149,31 @@ msgstr "istenen okuma kýsa: %s" msgid "short write in %s: %s" msgstr "%s içinde kýsa yazma: %s" -#: inet/rcmd.c:260 +#: inet/rcmd.c:261 msgid "socket: protocol failure in circuit setup\n" msgstr "soket: devre ayarýnda protokol hatasý\n" -#: timezone/zic.c:814 +#: timezone/zic.c:820 msgid "standard input" msgstr "standart girdi" -#: timezone/zdump.c:269 -msgid "standard output" -msgstr "standart çýktý" - -#: locale/programs/ld-ctype.c:1680 +#: locale/programs/ld-ctype.c:1681 msgid "start and end character sequence of range must have the same length" msgstr "kapsamýn baþlangýç ve bitiþ karakter zincirleri ayný uzunlukta olmalý" -#: timezone/zic.c:1325 +#: timezone/zic.c:1331 msgid "starting year greater than ending year" msgstr "baþlangýç yýlý bitiþ yýlýndan büyük" -#: timezone/zic.c:1297 timezone/zic.c:1322 +#: timezone/zic.c:1303 timezone/zic.c:1328 msgid "starting year too high to be represented" msgstr "baþlangýç yýlý gösterilemeyecek kadar büyük" -#: timezone/zic.c:1295 timezone/zic.c:1320 +#: timezone/zic.c:1301 timezone/zic.c:1326 msgid "starting year too low to be represented" msgstr "baþlangýç yýlý gösterilemeyecek kadar küçük" -#: iconv/iconv_prog.c:63 +#: iconv/iconv_prog.c:67 msgid "suppress warnings" msgstr "uyarýlarý engeller" @@ -5105,31 +5181,31 @@ msgstr "uyarýlarý engeller" msgid "svc_run: - poll failed" msgstr "svc_run: - poll baþarýsýz" -#: sunrpc/svc_tcp.c:161 +#: sunrpc/svc_tcp.c:170 msgid "svc_tcp.c - cannot getsockname or listen" msgstr "svc_tcp.c - getsockname yapýlamýyor veya dinlenemiyor" -#: sunrpc/svc_tcp.c:146 +#: sunrpc/svc_tcp.c:155 msgid "svc_tcp.c - tcp socket creation problem" msgstr "svc_tcp.c - tcp soketi oluþturma sorunu" -#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216 +#: sunrpc/svc_tcp.c:219 sunrpc/svc_tcp.c:225 msgid "svc_tcp: makefd_xprt: out of memory\n" msgstr "svc_tcp: makefd_xprt: bellek yetersiz\n" -#: sunrpc/svc_unix.c:137 +#: sunrpc/svc_unix.c:146 msgid "svc_unix.c - AF_UNIX socket creation problem" msgstr "svc_unix.c - AF_UNIX soketi oluþturma sorunu" -#: sunrpc/svc_unix.c:153 +#: sunrpc/svc_unix.c:162 msgid "svc_unix.c - cannot getsockname or listen" msgstr "svc_unix.c - getsockname yapýlamýyor veya dinlenemiyor" -#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209 +#: sunrpc/svc_unix.c:212 sunrpc/svc_unix.c:218 msgid "svc_unix: makefd_xprt: out of memory\n" msgstr "svc_unix: makefd_xprt: bellek yetersiz\n" -#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177 +#: sunrpc/svc_tcp.c:178 sunrpc/svc_tcp.c:186 msgid "svctcp_create: out of memory\n" msgstr "svctcp_create: bellek yetersiz\n" @@ -5149,49 +5225,49 @@ msgstr "svcudp_create: soket oluþturma s msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n" msgstr "svcudp_create: IP_PKTINFO için xp_pad çok küçük\n" -#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170 +#: sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:179 msgid "svcunix_create: out of memory\n" msgstr "svcunix_create: bellek yetersiz\n" -#: locale/programs/linereader.c:745 +#: locale/programs/linereader.c:750 #, c-format msgid "symbol `%.*s' not in charmap" msgstr "`%.*s' sembolü CHARMAP içinde deðil" -#: locale/programs/linereader.c:766 +#: locale/programs/linereader.c:771 #, c-format msgid "symbol `%.*s' not in repertoire map" msgstr "`%.*s' sembolü repertuar eþlem içinde deðil" -#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716 +#: locale/programs/ld-collate.c:1630 locale/programs/ld-collate.c:1729 #, c-format msgid "symbol `%s'" msgstr "`%s' sembolü" -#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713 +#: locale/programs/ld-collate.c:1627 locale/programs/ld-collate.c:1726 #, c-format msgid "symbol `%s' has the same encoding as" msgstr "`%s' sembolü bununla ayný kodlamaya sahip:" -#: locale/programs/ld-collate.c:1539 +#: locale/programs/ld-collate.c:1552 #, c-format msgid "symbol `%s' not defined" msgstr "`%s' sembolü atanmamýþ" -#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006 -#: locale/programs/ld-ctype.c:2048 +#: locale/programs/ld-ctype.c:1956 locale/programs/ld-ctype.c:2007 +#: locale/programs/ld-ctype.c:2049 msgid "syntax error" msgstr "sözdizimi hatasý" -#: locale/programs/charmap.c:487 locale/programs/charmap.c:541 -#: locale/programs/charmap.c:573 locale/programs/charmap.c:667 -#: locale/programs/charmap.c:722 locale/programs/charmap.c:763 -#: locale/programs/charmap.c:804 +#: locale/programs/charmap.c:492 locale/programs/charmap.c:546 +#: locale/programs/charmap.c:578 locale/programs/charmap.c:672 +#: locale/programs/charmap.c:727 locale/programs/charmap.c:768 +#: locale/programs/charmap.c:809 #, c-format msgid "syntax error in %s definition: %s" msgstr "%s tanýmýnda sözdizimi hatasý: %s" -#: locale/programs/charmap.c:346 locale/programs/charmap.c:363 +#: locale/programs/charmap.c:351 locale/programs/charmap.c:368 #: locale/programs/repertoire.c:175 #, c-format msgid "syntax error in prolog: %s" @@ -5203,73 +5279,69 @@ msgstr "prolog içinde sözdizimi hatasý: msgid "syntax error in repertoire map definition: %s" msgstr "repertuar eþlem tanýmý içinde sözdizimi hatasý: %s" -#: locale/programs/locfile.c:243 +#: locale/programs/locfile.c:245 msgid "syntax error: not inside a locale definition section" msgstr "sözdizimi hatasý: bir yerel tanýmlama bölümü içinde deðil" -#: iconv/iconv_prog.c:143 -msgid "target encoding not specified using `-t'" -msgstr "`-t' kullanýlarak hedef kodlama belirtilmemiþ" - #: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634 msgid "this is the first definition" msgstr "bu ilk taným" -#: timezone/zic.c:1157 +#: timezone/zic.c:1163 msgid "time before zero" msgstr "sýfýrdan önceki zaman" -#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061 +#: timezone/zic.c:1171 timezone/zic.c:2048 timezone/zic.c:2067 msgid "time overflow" msgstr "zaman taþmasý" -#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029 +#: locale/programs/ld-ctype.c:1554 locale/programs/ld-ctype.c:2030 #, c-format msgid "to-value of range is smaller than from-value " msgstr "kapsamdaki `to' deðeri `from' deðerinden daha küçük" -#: locale/programs/ld-ctype.c:1687 +#: locale/programs/ld-ctype.c:1688 msgid "to-value character sequence is smaller than from-value sequence" msgstr "karakter dizisindeki `to' deðeri `from' deðerinden daha küçük" -#: locale/programs/charmap.c:551 +#: locale/programs/charmap.c:556 msgid "too few bytes in character encoding" msgstr "karakter kodlamada bayt sayýsý çok az" -#: locale/programs/charmap.c:553 +#: locale/programs/charmap.c:558 msgid "too many bytes in character encoding" msgstr "karakter kodlamada bayt sayýsý çok fazla" -#: timezone/zic.c:1868 +#: timezone/zic.c:1874 msgid "too many leap seconds" msgstr "çok fazla artýk saniye" -#: timezone/zic.c:1840 +#: timezone/zic.c:1846 msgid "too many local time types" msgstr "yerel zaman türleri çok fazla" -#: timezone/zic.c:1794 +#: timezone/zic.c:1800 msgid "too many transitions?!" msgstr "çok fazla geçiþ?!" -#: timezone/zic.c:2165 +#: timezone/zic.c:2171 msgid "too many, or too long, time zone abbreviations" msgstr "çok fazla ya da çok uzun zaman dilimi kýsaltmalarý" -#: locale/programs/linereader.h:157 +#: locale/programs/linereader.h:160 msgid "trailing garbage at end of line" msgstr "satýr sonu bozuk" -#: sunrpc/svc_simple.c:151 +#: sunrpc/svc_simple.c:160 #, c-format msgid "trouble replying to prog %d\n" msgstr "%d uygulamasýna yanýt vermede sorun\n" -#: timezone/zic.c:1332 +#: timezone/zic.c:1338 msgid "typed single year" msgstr "türünde tek yýl" -#: iconv/iconv_prog.c:491 +#: iconv/iconv_charmap.c:524 iconv/iconv_prog.c:533 msgid "unable to allocate buffer for input" msgstr "girdi için tampon ayrýlamadý" @@ -5277,11 +5349,15 @@ msgstr "girdi için tampon ayrýlamadý" msgid "unable to free arguments" msgstr "argümanlar serbest býrakýlamadý" -#: posix/getconf.c:781 posix/getconf.c:797 +#: posix/getconf.c:968 posix/getconf.c:984 msgid "undefined" msgstr "atanmamýþ" -#: locale/programs/charmap.c:856 locale/programs/charmap.c:867 +#: elf/cache.c:69 +msgid "unknown" +msgstr "bilinmiyor" + +#: locale/programs/charmap.c:861 locale/programs/charmap.c:872 #, c-format msgid "unknown character `%s'" msgstr "`%s' karakteri bilinmiyor" @@ -5291,7 +5367,7 @@ msgstr "`%s' karakteri bilinmiyor" msgid "unknown directive `%s': line ignored" msgstr "bilinmeyen `%s' yönergesi: satýr yoksayýldý" -#: iconv/iconv_prog.c:438 +#: iconv/iconv_prog.c:480 #, c-format msgid "unknown iconv() error %d" msgstr "bilinmeyen iconv() hatasý %d" @@ -5301,15 +5377,20 @@ msgstr "bilinmeyen iconv() hatasý %d" msgid "unknown set `%s'" msgstr "`%s' kümesi bilinmiyor" -#: timezone/zic.c:786 +#: posix/getconf.c:941 +#, c-format +msgid "unknown specification \"%s\"" +msgstr "Özellik \"%s\" bilinmiyor" + +#: timezone/zic.c:792 msgid "unruly zone" msgstr "kuralsýz dilim" -#: catgets/gencat.c:1169 +#: catgets/gencat.c:1174 msgid "unterminated message" msgstr "sonlandýrýlmamýþ ileti" -#: locale/programs/linereader.c:599 locale/programs/linereader.c:784 +#: locale/programs/linereader.c:604 locale/programs/linereader.c:789 msgid "unterminated string" msgstr "sonlandýrýlmamýþ dizge" @@ -5317,11 +5398,11 @@ msgstr "sonlandýrýlmamýþ dizge" msgid "unterminated string constant" msgstr "sonlandýrýlmamýþ dizge sabiti" -#: locale/programs/linereader.c:469 +#: locale/programs/linereader.c:474 msgid "unterminated symbolic name" msgstr "sonlandýrýlmamýþ sembolik isim" -#: locale/programs/charmap.c:1005 +#: locale/programs/charmap.c:1010 msgid "upper limit in range is not higher then lower limit" msgstr "kapsamdaki üst sýnýr alt sýnýrdan büyük deðil" @@ -5329,35 +5410,35 @@ msgstr "kapsamdaki üst sýnýr alt sýnýrda msgid "upper limit in range is not smaller then lower limit" msgstr "kapsamdaki üst sýnýr alt sýnýrdan küçük deðil" -#: sunrpc/rpc_main.c:1424 +#: sunrpc/rpc_main.c:1426 #, c-format msgid "usage: %s infile\n" msgstr "kullanýmý: %s girdi-dosyasý\n" -#: timezone/zic.c:2108 +#: timezone/zic.c:2114 msgid "use of 2/29 in non leap-year" msgstr "artýk olmayan yýl içinde 2/29 kullanýmý" -#: locale/programs/charmap.c:640 locale/programs/charmap.c:703 +#: locale/programs/charmap.c:645 locale/programs/charmap.c:708 #, c-format msgid "value for %s must be an integer" msgstr "%s için deðer bir tamsayý olmalý" -#: locale/programs/charmap.c:399 +#: locale/programs/charmap.c:404 #, c-format msgid "value for <%s> must be 1 or greater" msgstr "<%s> için deðer 1 ya da daha büyük olmalý" -#: locale/programs/charmap.c:411 +#: locale/programs/charmap.c:416 #, c-format msgid "value of <%s> must be greater or equal than the value of <%s>" msgstr "<%s> deðeri <%s> deðerinden daha büyük ya da eþit olmalý" -#: timezone/zic.c:433 +#: timezone/zic.c:439 msgid "warning: " msgstr "uyarý: " -#: nscd/connections.c:427 +#: nscd/connections.c:432 #, c-format msgid "while accepting connection: %s" msgstr "baðlantý kabul edilirken: %s" @@ -5374,11 +5455,15 @@ msgstr "arama (hash) tablosu girdisi ayr msgid "while allocating key copy" msgstr "tuþ kopyasý ayrýlýrken" -#: catgets/gencat.c:1199 +#: iconv/iconvconfig.c:369 +msgid "while inserting in search tree" +msgstr "arama aðacýna eklenirken" + +#: catgets/gencat.c:1198 msgid "while opening old catalog file" msgstr "eski katalog dosyasý açýlýrken" -#: locale/programs/locale.c:361 +#: locale/programs/locale.c:353 msgid "while preparing output" msgstr "çýktýyý hazýrlarken" @@ -5386,15 +5471,15 @@ msgstr "çýktýyý hazýrlarken" msgid "while stat'ing profiling data file" msgstr "þekillendirici veri dosyasý durumlanýrken" -#: locale/programs/ld-ctype.c:2392 +#: locale/programs/ld-ctype.c:2394 msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'" msgstr "onaltýlýk sembolik elips `..' UCS kapsam deðerlerinden biriyle kullanýlmalý" -#: locale/programs/ld-ctype.c:2406 +#: locale/programs/ld-ctype.c:2408 msgid "with character code range values one must use the absolute ellipsis `...'" msgstr "mutlak elips `...' karakter kod deðerlerinden biriyle kullanýlmalý" -#: locale/programs/ld-ctype.c:2377 +#: locale/programs/ld-ctype.c:2379 msgid "with symbolic name range values the absolute ellipsis `...' must not be used" msgstr "mutlak elips `...' sembolik isim kapsamýndaki deðerlerle kullanýlmamalý" @@ -5402,7 +5487,7 @@ msgstr "mutlak elips `...' sembolik isim msgid "write incomplete" msgstr "yazma tamamlanamýyor" -#: inet/rcmd.c:426 +#: inet/rcmd.c:427 msgid "writeable by other than owner" msgstr "sahibinden baþkasý yazabilir" @@ -5410,23 +5495,23 @@ msgstr "sahibinden baþkasý yazabilir" msgid "wrong number of arguments" msgstr "argüman sayýsý hatalý" -#: timezone/zic.c:1115 +#: timezone/zic.c:1121 msgid "wrong number of fields on Leap line" msgstr "`Leap' satýrýnýn alanlarý eksik ya da fazla" -#: timezone/zic.c:1206 +#: timezone/zic.c:1212 msgid "wrong number of fields on Link line" msgstr "`Link' satýrýnýn alanlarý eksik ya da fazla" -#: timezone/zic.c:949 +#: timezone/zic.c:955 msgid "wrong number of fields on Rule line" msgstr "`Rule' satýrýnýn alanlarý eksik ya da fazla" -#: timezone/zic.c:1019 +#: timezone/zic.c:1025 msgid "wrong number of fields on Zone continuation line" msgstr "`Zone' devam satýrýnýn alanlarý eksik ya da fazla" -#: timezone/zic.c:977 +#: timezone/zic.c:983 msgid "wrong number of fields on Zone line" msgstr "`Zone' satýrýnýn alanlarý eksik ya da fazla" @@ -5438,10 +5523,10 @@ msgstr "xdr_reference: bellek yetersiz\n msgid "xdrrec_create: out of memory\n" msgstr "xdrrec_create: bellek yetersiz\n" -#: nis/ypclnt.c:907 +#: nis/ypclnt.c:909 msgid "yp_update: cannot convert host to netname\n" msgstr "yp_update: makina ismi að ismine dönüþtürülemiyor\n" -#: nis/ypclnt.c:919 +#: nis/ypclnt.c:921 msgid "yp_update: cannot get server address\n" msgstr "yp_update: sunucu adresi alýnamýyor\n" Binary files glibc-2.2.4/po/zh_TW.mo and glibc-2.2.5/po/zh_TW.mo differ diff -durpN glibc-2.2.4/po/zh_TW.po glibc-2.2.5/po/zh_TW.po --- glibc-2.2.4/po/zh_TW.po Thu Apr 26 20:07:08 2001 +++ glibc-2.2.5/po/zh_TW.po Sat Sep 8 10:52:45 2001 @@ -1578,7 +1578,7 @@ msgid "" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" msgstr "" "ª©Åv (C) %s ¦Û¥Ñ³nÅé°òª÷·|\n" -"³o¬O¤@­Ó¦Û¥Ñ³nÅé¡F½Ð¨£·½©l½Xªº±ÂÅv±ø´Ú¡C³oùبS¦³¾á«O¡F¬Æ¦Ü¤]¨S¦³±M¬°¾P\n" +"³o¬O¤@­Ó¦Û¥Ñ³nÅé¡F½Ð¨£·½©l½Xªº±ÂÅv±ø´Ú¡C³o¨S¦³¾á«O¡F¬Æ¦Ü¤]¨S¦³±M¬°¾P\n" "°â©ÎªÌ¾A¦X¬Y¨Ç¯S®í¥Øªº¡C\n" #: nscd/nscd_conf.c:166 diff -durpN glibc-2.2.4/posix/Makefile glibc-2.2.5/posix/Makefile --- glibc-2.2.4/posix/Makefile Fri Aug 10 12:11:51 2001 +++ glibc-2.2.5/posix/Makefile Wed Sep 12 11:47:22 2001 @@ -150,6 +150,7 @@ $(objpfx)annexc.out: $(objpfx)annexc -$(dir $<)$(notdir $<) '$(CC)' \ '-I../include -I.. $(+sysdep-includes) $(sysincludes)' > $@ +annexc-CFLAGS = -O $(objpfx)annexc: annexc.c $(native-compile) diff -durpN glibc-2.2.4/posix/execl.c glibc-2.2.5/posix/execl.c --- glibc-2.2.4/posix/execl.c Mon Jul 23 10:54:59 2001 +++ glibc-2.2.5/posix/execl.c Fri Sep 14 03:14:51 2001 @@ -52,7 +52,8 @@ execl (const char *path, const char *arg if ((char *) nptr + argv_max == (char *) argv) { /* Stack grows down. */ - argv = (const char **) memcpy (nptr, argv, i); + argv = (const char **) memcpy (nptr, argv, + i * sizeof (const char *)); argv_max += i; } else @@ -64,7 +65,8 @@ execl (const char *path, const char *arg else #endif /* We have a hole in the stack. */ - argv = (const char **) memcpy (nptr, argv, i); + argv = (const char **) memcpy (nptr, argv, + i * sizeof (const char *)); } argv[i] = va_arg (args, const char *); diff -durpN glibc-2.2.4/posix/execlp.c glibc-2.2.5/posix/execlp.c --- glibc-2.2.4/posix/execlp.c Mon Jul 23 10:54:59 2001 +++ glibc-2.2.5/posix/execlp.c Fri Sep 14 03:14:51 2001 @@ -49,7 +49,8 @@ execlp (const char *file, const char *ar if ((char *) nptr + argv_max == (char *) argv) { /* Stack grows down. */ - argv = (const char **) memcpy (nptr, argv, i); + argv = (const char **) memcpy (nptr, argv, + i * sizeof (const char *)); argv_max += i; } else @@ -61,7 +62,8 @@ execlp (const char *file, const char *ar else #endif /* We have a hole in the stack. */ - argv = (const char **) memcpy (nptr, argv, i); + argv = (const char **) memcpy (nptr, argv, + i * sizeof (const char *)); } argv[i] = va_arg (args, const char *); diff -durpN glibc-2.2.4/posix/fnmatch_loop.c glibc-2.2.5/posix/fnmatch_loop.c --- glibc-2.2.4/posix/fnmatch_loop.c Fri Aug 10 12:11:51 2001 +++ glibc-2.2.5/posix/fnmatch_loop.c Fri Oct 26 17:37:40 2001 @@ -592,7 +592,8 @@ FCT (pattern, string, string_end, no_lea /* We have to handling the symbols differently in ranges since then the collation sequence is important. */ - is_range = *p == L('-') && p[1] != L('\0'); + is_range = (*p == L('-') && p[1] != L('\0') + && p[1] != L(']')); if (!is_range && c == fn) goto matched; diff -durpN glibc-2.2.4/posix/getconf.c glibc-2.2.5/posix/getconf.c --- glibc-2.2.4/posix/getconf.c Mon Jul 23 10:54:59 2001 +++ glibc-2.2.5/posix/getconf.c Sun Jan 20 19:21:58 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 1995-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 1995-2001, 2002 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 @@ -905,7 +905,7 @@ main (int argc, char *argv[]) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2001"); +"), "2002"); fprintf (stderr, gettext ("Written by %s.\n"), "Roland McGrath"); return 0; } diff -durpN glibc-2.2.4/posix/getopt.c glibc-2.2.5/posix/getopt.c --- glibc-2.2.4/posix/getopt.c Mon Aug 13 15:00:53 2001 +++ glibc-2.2.5/posix/getopt.c Fri Oct 26 16:53:13 2001 @@ -78,7 +78,7 @@ #ifndef _ /* This is for other GNU distributions with internationalized messages. */ -# if defined HAVE_LIBINTL_H || defined _LIBC +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifndef _ # define _(msgid) gettext (msgid) @@ -86,6 +86,9 @@ # else # define _(msgid) (msgid) # endif +# if defined _LIBC && defined USE_IN_LIBIO +# include +# endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' @@ -678,8 +681,24 @@ _getopt_internal (argc, argv, optstring, if (ambig && !exact) { if (print_errors) - fprintf (stderr, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]); + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } nextchar += strlen (nextchar); optind++; optopt = 0; @@ -700,16 +719,46 @@ _getopt_internal (argc, argv, optstring, { if (print_errors) { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - _("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } else - /* +option or -option */ - fprintf (stderr, - _("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif } nextchar += strlen (nextchar); @@ -725,9 +774,26 @@ _getopt_internal (argc, argv, optstring, else { if (print_errors) - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; @@ -753,14 +819,41 @@ _getopt_internal (argc, argv, optstring, { if (print_errors) { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + if (argv[optind][1] == '-') - /* --option */ - fprintf (stderr, _("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#endif + } else - /* +option or -option */ - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif } nextchar = (char *) ""; optind++; @@ -783,13 +876,38 @@ _getopt_internal (argc, argv, optstring, { if (print_errors) { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: illegal option -- %c\n"), - argv[0], c); + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); +#endif + } else - fprintf (stderr, _("%s: invalid option -- %c\n"), - argv[0], c); + { +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif } optopt = c; return '?'; @@ -818,8 +936,22 @@ _getopt_internal (argc, argv, optstring, if (print_errors) { /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); +#endif } optopt = c; if (optstring[0] == ':') @@ -865,8 +997,24 @@ _getopt_internal (argc, argv, optstring, if (ambig && !exact) { if (print_errors) - fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), - argv[0], argv[optind]); + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } nextchar += strlen (nextchar); optind++; return '?'; @@ -883,9 +1031,26 @@ _getopt_internal (argc, argv, optstring, else { if (print_errors) - fprintf (stderr, _("\ + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ %s: option `-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); + argv[0], pfound->name); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } nextchar += strlen (nextchar); return '?'; @@ -898,9 +1063,26 @@ _getopt_internal (argc, argv, optstring, else { if (print_errors) - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } @@ -947,9 +1129,24 @@ _getopt_internal (argc, argv, optstring, if (print_errors) { /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); +#endif } optopt = c; if (optstring[0] == ':') diff -durpN glibc-2.2.4/posix/getopt.h glibc-2.2.5/posix/getopt.h --- glibc-2.2.4/posix/getopt.h Mon Jul 23 10:54:59 2001 +++ glibc-2.2.5/posix/getopt.h Wed Aug 22 15:24:05 2001 @@ -142,20 +142,21 @@ struct option /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int getopt (int __argc, char *const *__argv, const char *__shortopts); +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt -extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, +extern int getopt_long (int ___argc, char *const *___argv, + const char *__shortopts, const struct option *__longopts, int *__longind); -extern int getopt_long_only (int __argc, char *const *__argv, +extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int __argc, char *const *__argv, +extern int _getopt_internal (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); diff -durpN glibc-2.2.4/posix/globtest.sh glibc-2.2.5/posix/globtest.sh --- glibc-2.2.4/posix/globtest.sh Fri Aug 10 12:11:51 2001 +++ glibc-2.2.5/posix/globtest.sh Mon Dec 10 15:53:20 2001 @@ -146,6 +146,32 @@ if test $failed -ne 0; then result=1 fi +failed=0 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ +${common_objpfx}posix/globtest -b "$testdir" "{file{1,2},-file3}" | +sort > $testout +cat <<"EOF" | cmp - $testout >> $logfile || failed=1 +`-file3' +`file1' +`file2' +EOF +if test $failed -ne 0; then + echo "Braces test 2 failed" >> $logfile + result=1 +fi + +failed=0 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ +${common_objpfx}posix/globtest -b "$testdir" "{" | +sort > $testout +cat <<"EOF" | cmp - $testout >> $logfile || failed=1 +GLOB_NOMATCH +EOF +if test $failed -ne 0; then + echo "Braces test 3 failed" >> $logfile + result=1 +fi + # Test NOCHECK failed=0 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ @@ -533,9 +559,7 @@ ${elf_objpfx}${rtld_installed_name} --li ${common_objpfx}posix/globtest -c "$testdir" "*/blahblah" | sort > $testout cat <<"EOF" | cmp - $testout >> $logfile || failed=1 -`dir1/blahblah' -`dir2/blahblah' -`noread/blahblah' +`*/blahblah' EOF if test $failed -ne 0; then echo "No check2 test failed" >> $logfile diff -durpN glibc-2.2.4/posix/regex.c glibc-2.2.5/posix/regex.c --- glibc-2.2.4/posix/regex.c Fri Aug 10 12:11:51 2001 +++ glibc-2.2.5/posix/regex.c Thu Nov 15 10:26:05 2001 @@ -91,7 +91,7 @@ # endif /* This is for other GNU distributions with internationalized messages. */ -# if HAVE_LIBINTL_H || defined _LIBC +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext @@ -297,7 +297,7 @@ init_syntax_once () # endif /* emacs */ /* Integer type for pointers. */ -# if !defined _LIBC +# if !defined _LIBC && !defined HAVE_UINTPTR_T typedef unsigned long int uintptr_t; # endif @@ -1284,7 +1284,11 @@ convert_mbs_to_wcs (dest, src, len, offs for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed, psrc += consumed) { +#ifdef _LIBC + consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs); +#else consumed = mbrtowc (pdest, psrc, mb_remain, &mbs); +#endif if (consumed <= 0) /* failed to convert. maybe src contains binary data. @@ -4623,9 +4627,16 @@ static unsigned char truncate_wchar (c) CHAR_T c; { - unsigned char buf[MB_LEN_MAX]; - int retval = wctomb(buf, c); - return retval > 0 ? buf[0] : (unsigned char)c; + unsigned char buf[MB_CUR_MAX]; + mbstate_t state; + int retval; + memset (&state, '\0', sizeof (state)); +# ifdef _LIBC + retval = __wcrtomb (buf, c, &state); +# else + retval = wcrtomb (buf, c, &state); +# endif + return retval > 0 ? buf[0] : (unsigned char) c; } #endif /* WCHAR */ @@ -6333,8 +6344,13 @@ byte_re_match_2_internal (bufp, string1, & ~(uintptr_t)(__alignof__(wctype_t) - 1); wctype = *((wctype_t*)alignedp); workp += CHAR_CLASS_SIZE; +# ifdef _LIBC + if (__iswctype((wint_t)c, wctype)) + goto char_set_matched; +# else if (iswctype((wint_t)c, wctype)) goto char_set_matched; +# endif } /* match with collating_symbol? */ @@ -6370,12 +6386,20 @@ byte_re_match_2_internal (bufp, string1, for (workp2 = workp + coll_symbol_length ; workp < workp2 ;) { const CHAR_T *backup_d = d, *backup_dend = dend; - length = wcslen(workp); +# ifdef _LIBC + length = __wcslen (workp); +# else + length = wcslen (workp); +# endif /* If wcscoll(the collating symbol, whole string) > 0, any substring of the string never match with the collating symbol. */ - if (wcscoll(workp, d) > 0) +# ifdef _LIBC + if (__wcscoll (workp, d) > 0) +# else + if (wcscoll (workp, d) > 0) +# endif { workp += length + 1; continue; @@ -6400,7 +6424,11 @@ byte_re_match_2_internal (bufp, string1, str_buf[i] = TRANSLATE(*d); str_buf[i+1] = '\0'; - match = wcscoll(workp, str_buf); +# ifdef _LIBC + match = __wcscoll (workp, str_buf); +# else + match = wcscoll (workp, str_buf); +# endif if (match == 0) goto char_set_matched; @@ -6511,12 +6539,20 @@ byte_re_match_2_internal (bufp, string1, for (workp2 = workp + equiv_class_length ; workp < workp2 ;) { const CHAR_T *backup_d = d, *backup_dend = dend; - length = wcslen(workp); +# ifdef _LIBC + length = __wcslen (workp); +# else + length = wcslen (workp); +# endif /* If wcscoll(the collating symbol, whole string) > 0, any substring of the string never match with the collating symbol. */ - if (wcscoll(workp, d) > 0) +# ifdef _LIBC + if (__wcscoll (workp, d) > 0) +# else + if (wcscoll (workp, d) > 0) +# endif { workp += length + 1; break; @@ -6541,7 +6577,11 @@ byte_re_match_2_internal (bufp, string1, str_buf[i] = TRANSLATE(*d); str_buf[i+1] = '\0'; - match = wcscoll(workp, str_buf); +# ifdef _LIBC + match = __wcscoll (workp, str_buf); +# else + match = wcscoll (workp, str_buf); +# endif if (match == 0) goto char_set_matched; @@ -6564,7 +6604,7 @@ byte_re_match_2_internal (bufp, string1, } /* match with char_range? */ -#ifdef _LIBC +# ifdef _LIBC if (nrules != 0) { uint32_t collseqval; @@ -6587,7 +6627,7 @@ byte_re_match_2_internal (bufp, string1, } } else -#endif +# endif { /* We set range_start_char at str_buf[0], range_end_char at str_buf[4], and compared char at str_buf[2]. */ @@ -6623,9 +6663,13 @@ byte_re_match_2_internal (bufp, string1, range_end_char = str_buf + 4; } - if (wcscoll(range_start_char, str_buf+2) <= 0 && - wcscoll(str_buf+2, range_end_char) <= 0) - +# ifdef _LIBC + if (__wcscoll (range_start_char, str_buf+2) <= 0 + && __wcscoll (str_buf+2, range_end_char) <= 0) +# else + if (wcscoll (range_start_char, str_buf+2) <= 0 + && wcscoll (str_buf+2, range_end_char) <= 0) +# endif goto char_set_matched; } } diff -durpN glibc-2.2.4/posix/tst-fnmatch.input glibc-2.2.5/posix/tst-fnmatch.input --- glibc-2.2.4/posix/tst-fnmatch.input Mon Jul 23 10:55:00 2001 +++ glibc-2.2.5/posix/tst-fnmatch.input Fri Oct 26 19:37:27 2001 @@ -381,6 +381,14 @@ C "a" "a/" NOMATCH C "a/" "a" NOMATCH PATHNAME C "//a" "/a" NOMATCH PATHNAME C "/a" "//a" NOMATCH PATHNAME +C "az" "[a-]z" 0 +C "bz" "[ab-]z" 0 +C "cz" "[ab-]z" NOMATCH +C "-z" "[ab-]z" 0 +C "az" "[-a]z" 0 +C "bz" "[-ab]z" 0 +C "cz" "[-ab]z" NOMATCH +C "-z" "[-ab]z" 0 # Following are tests outside the scope of IEEE 2003.2 since they are using # locales other than the C locale. The main focus of the tests is on the diff -durpN glibc-2.2.4/resolv/gethnamaddr.c glibc-2.2.5/resolv/gethnamaddr.c --- glibc-2.2.4/resolv/gethnamaddr.c Wed Aug 15 18:50:11 2001 +++ glibc-2.2.5/resolv/gethnamaddr.c Fri Oct 26 16:49:48 2001 @@ -51,7 +51,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; -static char rcsid[] = "$Id: gethnamaddr.c,v 1.35 2001/08/14 23:27:04 drepper Exp $"; +static char rcsid[] = "$Id: gethnamaddr.c,v 1.37 2001/10/26 23:49:48 drepper Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -441,7 +441,7 @@ getanswer(answer, anslen, qname, qtype) cp += n; continue; } - bcopy(cp, *hap++ = bp, n); + memmove(*hap++ = bp, cp, n); bp += n; buflen -= n; cp += n; @@ -690,7 +690,7 @@ gethostbyaddr(addr, len, af) uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf)); } - strcpy(qp, "ip6.int"); + strcpy(qp, "ip6.arpa"); break; default: abort(); @@ -738,7 +738,7 @@ gethostbyaddr(addr, len, af) #endif /*SUNSECURITY*/ hp->h_addrtype = af; hp->h_length = len; - bcopy(addr, host_addr, len); + memmove(host_addr, addr, len); h_addr_ptrs[0] = (char *)host_addr; h_addr_ptrs[1] = NULL; if (af == AF_INET && (_res.options & RES_USE_INET6)) { @@ -899,14 +899,14 @@ map_v4v6_address(src, dst) int i; /* Stash a temporary copy so our caller can update in place. */ - bcopy(src, tmp, INADDRSZ); + memcpy(tmp, src, INADDRSZ); /* Mark this ipv6 addr as a mapped ipv4. */ for (i = 0; i < 10; i++) *p++ = 0x00; *p++ = 0xff; *p++ = 0xff; /* Retrieve the saved copy and we're done. */ - bcopy(tmp, (void*)p, INADDRSZ); + memcpy((void*)p, tmp, INADDRSZ); } static void diff -durpN glibc-2.2.4/resolv/nss_dns/dns-host.c glibc-2.2.5/resolv/nss_dns/dns-host.c --- glibc-2.2.4/resolv/nss_dns/dns-host.c Wed Aug 15 18:50:11 2001 +++ glibc-2.2.5/resolv/nss_dns/dns-host.c Tue Dec 11 23:33:39 2001 @@ -282,7 +282,7 @@ _nss_dns_gethostbyaddr_r (const void *ad qp = qbuf; for (n = IN6ADDRSZ - 1; n >= 0; n--) qp += sprintf (qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf); - strcpy (qp, "ip6.int"); + strcpy (qp, "ip6.arpa"); break; default: /* Cannot happen. */ @@ -387,10 +387,9 @@ getanswer_r (const querybuf *answer, int { char *aliases[MAX_NR_ALIASES]; unsigned char host_addr[16]; /* IPv4 or IPv6 */ - char *h_addr_ptrs[MAX_NR_ADDRS + 1]; - char linebuffer[0]; + char *h_addr_ptrs[0]; } *host_data = (struct host_data *) buffer; - int linebuflen = buflen - offsetof (struct host_data, linebuffer); + int linebuflen = buflen - sizeof (struct host_data); register const HEADER *hp; const u_char *end_of_message, *cp; int n, ancount, qdcount; @@ -432,7 +431,6 @@ getanswer_r (const querybuf *answer, int * find first satisfactory answer */ hp = &answer->hdr; - bp = host_data->linebuffer; ancount = ntohs (hp->ancount); qdcount = ntohs (hp->qdcount); cp = answer->buf + HFIXEDSZ; @@ -442,6 +440,10 @@ getanswer_r (const querybuf *answer, int *errnop = ENOENT; return NSS_STATUS_UNAVAIL; } + if (sizeof (struct host_data) + (ancount + 1) * sizeof (char *) >= buflen) + goto too_small; + bp = (char *) &host_data->h_addr_ptrs[ancount + 1]; + linebuflen -= (ancount + 1) * sizeof (char *); n = __ns_name_unpack (answer->buf, end_of_message, cp, packtmp, sizeof packtmp); @@ -701,11 +703,6 @@ getanswer_r (const querybuf *answer, int if (__builtin_expect (n > linebuflen, 0)) goto too_small; - if (hap >= &host_data->h_addr_ptrs[MAX_NR_ADDRS-1]) - { - cp += n; - continue; - } bp = __mempcpy (*hap++ = bp, cp, n); cp += n; linebuflen -= n; diff -durpN glibc-2.2.4/resolv/res_hconf.c glibc-2.2.5/resolv/res_hconf.c --- glibc-2.2.4/resolv/res_hconf.c Mon Jul 23 10:55:03 2001 +++ glibc-2.2.5/resolv/res_hconf.c Thu Aug 16 23:53:50 2001 @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -43,6 +44,9 @@ #include #include "ifreq.h" #include "res_hconf.h" +#ifdef USE_IN_LIBIO +# include +#endif #define _PATH_HOSTCONF "/etc/host.conf" @@ -138,14 +142,37 @@ arg_service_list (const char *fname, int } if (service == SERVICE_NONE) { - fprintf (stderr, "%s: line %d: expected service, found `%s'\n", - fname, line_num, start); + char *buf; + + __asprintf (&buf, _("%s: line %d: expected service, found `%s'\n"), + fname, line_num, start); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return 0; } if (_res_hconf.num_services >= SERVICE_MAX) { - fprintf (stderr, "%s: line %d: cannot specify more than %d services", - fname, line_num, SERVICE_MAX); + char *buf; + + __asprintf (&buf, + _("%s: line %d: cannot specify more than %d services"), + fname, line_num, SERVICE_MAX); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return 0; } _res_hconf.service[_res_hconf.num_services++] = service; @@ -159,9 +186,20 @@ arg_service_list (const char *fname, int args = skip_ws (++args); if (!*args || *args == '#') { - fprintf (stderr, - "%s: line %d: list delimiter not followed by keyword", - fname, line_num); + char *buf; + + __asprintf (&buf, _("\ +%s: line %d: list delimiter not followed by keyword"), + fname, line_num); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return 0; } default: @@ -188,9 +226,20 @@ arg_trimdomain_list (const char *fname, if (_res_hconf.num_trimdomains >= TRIMDOMAINS_MAX) { - fprintf (stderr, - "%s: line %d: cannot specify more than %d trim domains", - fname, line_num, TRIMDOMAINS_MAX); + char *buf; + + __asprintf (&buf, _("\ +%s: line %d: cannot specify more than %d trim domains"), + fname, line_num, TRIMDOMAINS_MAX); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return 0; } _res_hconf.trimdomain[_res_hconf.num_trimdomains++] = @@ -202,9 +251,20 @@ arg_trimdomain_list (const char *fname, args = skip_ws (++args); if (!*args || *args == '#') { - fprintf (stderr, - "%s: line %d: list delimiter not followed by domain", - fname, line_num); + char *buf; + + __asprintf (&buf, _("\ +%s: line %d: list delimiter not followed by domain"), + fname, line_num); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return 0; } default: @@ -253,8 +313,20 @@ arg_bool (const char *fname, int line_nu } else { - fprintf (stderr, "%s: line %d: expected `on' or `off', found `%s'\n", - fname, line_num, args); + char *buf; + + __asprintf (&buf, + _("%s: line %d: expected `on' or `off', found `%s'\n"), + fname, line_num, args); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return 0; } return args; @@ -289,8 +361,19 @@ parse_line (const char *fname, int line_ } if (c == NULL) { - fprintf (stderr, "%s: line %d: bad command `%s'\n", - fname, line_num, start); + char *buf; + + __asprintf (&buf, _("%s: line %d: bad command `%s'\n"), + fname, line_num, start); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); return; } @@ -305,8 +388,22 @@ parse_line (const char *fname, int line_ { if (!isspace (*str)) { if (*str != '#') - fprintf (stderr, "%s: line %d: ignoring trailing garbage `%s'\n", - fname, line_num, str); + { + char *buf; + + __asprintf (&buf, + _("%s: line %d: ignoring trailing garbage `%s'\n"), + fname, line_num, str); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + + free (buf); + } break; } ++str; diff -durpN glibc-2.2.4/rt/tst-aio4.c glibc-2.2.5/rt/tst-aio4.c --- glibc-2.2.4/rt/tst-aio4.c Mon Jul 23 10:55:05 2001 +++ glibc-2.2.5/rt/tst-aio4.c Thu Aug 23 22:07:21 2001 @@ -55,6 +55,10 @@ wait_flag (void) return 0; } +#ifndef SIGRTMIN +# define SIGRTMIN -1 +# define SIGRTMAX -1 +#endif static int do_test (int argc, char *argv[]) diff -durpN glibc-2.2.4/scripts/cpp glibc-2.2.5/scripts/cpp --- glibc-2.2.4/scripts/cpp Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/scripts/cpp Thu Nov 1 18:07:18 2001 @@ -0,0 +1,21 @@ +#! /bin/sh +cpp=`which cpp 2>/dev/null` +if test $? -ne 0; then + cpp=`type cpp 2>/dev/null | awk '{ print $NF }'` + if test $? -ne 0; then + cpp=`gcc -print-file-name=cpp 2>/dev/null` + if test $? -ne 0; then + if test -x /lib/cpp; then + cpp=/lib/cpp + else + echo "cpp not found" 1>&2 + exit 1 + fi + fi + fi +fi + +exec $cpp $* +Local Variables: +mode: sh +End: diff -durpN glibc-2.2.4/scripts/versions.awk glibc-2.2.5/scripts/versions.awk --- glibc-2.2.4/scripts/versions.awk Tue Mar 28 11:05:38 2000 +++ glibc-2.2.5/scripts/versions.awk Thu Dec 6 00:09:23 2001 @@ -61,7 +61,10 @@ BEGIN { # current library. This is the only place where we print something to # the intermediate file. /^ / { - printf("%s %s %s\n", actlib, actver, $0) | sort; + sortver=actver + # Ensure GLIBC_ versions come always first + sub(/^GLIBC_/," GLIBC_",sortver) + printf("%s %s %s\n", actlib, sortver, $0) | sort; } diff -durpN glibc-2.2.4/shlib-versions glibc-2.2.5/shlib-versions --- glibc-2.2.4/shlib-versions Mon Jul 23 10:53:35 2001 +++ glibc-2.2.5/shlib-versions Mon Dec 10 21:06:54 2001 @@ -23,11 +23,12 @@ s390x-.*-linux.* DEFAULT GLIBC_2.2 cris-.*-linux.* DEFAULT GLIBC_2.2 +x86_64-.*-linux.* DEFAULT GLIBC_2.2.5 %if defined(USE_IN_LIBIO) && !defined(GLIBC_OLDEST_ABI) // If you use configure --enable-libio --enable-oldest-abi=2.0 then we // won't rename the old version sets and all the libraries except libc // itself ought to be binary compatible with the libc.so.0.2 ABI. -.*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.4 +.*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.5 %endif # Configuration Library=version Earliest symbol set (optional) @@ -79,6 +80,7 @@ mips.*-.*-linux.* ld=ld.so.1 GLIBC_2.0 hppa.*-.*-.* ld=ld.so.1 GLIBC_2.2 s390x-.*-linux.* ld=ld64.so.1 GLIBC_2.2 cris-.*-linux.* ld=ld.so.1 GLIBC_2.2 +x86_64-.*-linux.* ld=ld-linux-x86-64.so.2 GLIBC_2.2.5 # We use the ELF ABI standard name for the default. .*-.*-.* ld=ld.so.1 diff -durpN glibc-2.2.4/stdio-common/Makefile glibc-2.2.5/stdio-common/Makefile --- glibc-2.2.4/stdio-common/Makefile Mon Jul 23 10:55:10 2001 +++ glibc-2.2.5/stdio-common/Makefile Wed Aug 15 22:20:07 2001 @@ -55,7 +55,7 @@ tests := tstscanf test_rdwr test-popen t tfformat tiformat tllformat tstdiomisc tst-printfsz tst-wc-printf \ scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \ scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf tst-swprintf \ - tst-fseek tst-fmemopen test-vfprintf tst-gets + tst-fseek tst-fmemopen test-vfprintf tst-gets tst-perror test-srcs = tst-unbputc tst-printf diff -durpN glibc-2.2.4/stdio-common/perror.c glibc-2.2.5/stdio-common/perror.c --- glibc-2.2.4/stdio-common/perror.c Wed Aug 15 18:50:12 2001 +++ glibc-2.2.5/stdio-common/perror.c Fri Aug 31 22:33:01 2001 @@ -19,16 +19,16 @@ #include #include #include +#include #include +#ifdef USE_IN_LIBIO +# include "libioP.h" +#endif -/* Print a line on stderr consisting of the text in S, a colon, a space, - a message describing the meaning of the contents of `errno' and a newline. - If S is NULL or "", the colon and space are omitted. */ -void -perror (const char *s) +static void +perror_internal (FILE *fp, const char *s, int errnum) { char buf[1024]; - int errnum = errno; const char *colon; const char *errstring; @@ -40,9 +40,53 @@ perror (const char *s) errstring = __strerror_r (errnum, buf, sizeof buf); #ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s%s%s\n", s, colon, errstring); + if (_IO_fwide (fp, 0) > 0) + (void) __fwprintf (fp, L"%s%s%s\n", s, colon, errstring); else #endif - (void) fprintf (stderr, "%s%s%s\n", s, colon, errstring); + (void) fprintf (fp, "%s%s%s\n", s, colon, errstring); +} + + +/* Print a line on stderr consisting of the text in S, a colon, a space, + a message describing the meaning of the contents of `errno' and a newline. + If S is NULL or "", the colon and space are omitted. */ +void +perror (const char *s) +{ + int errnum = errno; +#ifdef USE_IN_LIBIO + FILE *fp; + int fd = -1; + + + /* The standard says that 'perror' must not change the orientation + of the stream. What is supposed to happen when the stream isn't + oriented yet? In this case we'll create a new stream which is + using the same underlying file descriptor. */ + if (__builtin_expect (_IO_fwide (stderr, 0) != 0, 1) + || fileno_unlocked (stderr) == -1 + || (fd = __dup (fileno_unlocked (stderr))) == -1 + || (fp = fdopen (fd, "w+")) == NULL) + { + if (__builtin_expect (fd != -1, 0)) + __close (fd); + + /* Use standard error as is. */ + perror_internal (stderr, s, errnum); + } + else + { + /* We don't have to do any special hacks regarding the file + position. Since the stderr stream wasn't used so far we just + write to the descriptor. */ + perror_internal (fp, s, errnum); + /* Close the stream. */ + fclose (fp); + + ((_IO_FILE *) stderr)->_offset = _IO_pos_BAD; + } +#else + perror_internal (stderr, s, errnum); +#endif } diff -durpN glibc-2.2.4/stdio-common/psignal.c glibc-2.2.5/stdio-common/psignal.c --- glibc-2.2.4/stdio-common/psignal.c Mon Jul 23 10:55:11 2001 +++ glibc-2.2.5/stdio-common/psignal.c Thu Aug 16 21:48:22 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995,1996,1997,2001 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 @@ -18,7 +18,11 @@ #include #include +#include #include +#ifdef USE_IN_LIBIO +# include +#endif #ifndef HAVE_GNU_LD @@ -43,7 +47,27 @@ psignal (int sig, const char *s) colon = ": "; if (sig >= 0 && sig < NSIG && (desc = _sys_siglist[sig]) != NULL) - (void) fprintf (stderr, "%s%s%s\n", s, colon, _(desc)); + { +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s%s%s\n", s, colon, _(desc)); + else +#endif + (void) fprintf (stderr, "%s%s%s\n", s, colon, _(desc)); + } else - (void) fprintf (stderr, _("%s%sUnknown signal %d\n"), s, colon, sig); + { + char *buf; + + (void) __asprintf (&buf, _("%s%sUnknown signal %d\n"), s, colon, sig); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", buf); + else +#endif + (void) fputs (buf, stderr); + + free (buf); + } } diff -durpN glibc-2.2.4/stdio-common/tmpfile.c glibc-2.2.5/stdio-common/tmpfile.c --- glibc-2.2.4/stdio-common/tmpfile.c Mon Jul 23 10:55:12 2001 +++ glibc-2.2.5/stdio-common/tmpfile.c Wed Dec 31 16:00:00 1969 @@ -1,59 +0,0 @@ -/* Copyright (C) 1991,93,96,97,98,99,2000 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -#ifdef USE_IN_LIBIO -# include -# define __fdopen _IO_fdopen -# define tmpfile __new_tmpfile -#endif - -/* This returns a new stream opened on a temporary file (generated - by tmpnam). The file is opened with mode "w+b" (binary read/write). - If we couldn't generate a unique filename or the file couldn't - be opened, NULL is returned. */ -FILE * -tmpfile (void) -{ - char buf[FILENAME_MAX]; - int fd; - FILE *f; - - if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0)) - return NULL; - fd = __gen_tempname (buf, __GT_FILE); - if (fd < 0) - return NULL; - - /* Note that this relies on the Unix semantics that - a file is not really removed until it is closed. */ - (void) remove (buf); - - if ((f = __fdopen (fd, "w+b")) == NULL) - __close (fd); - - return f; -} - -#ifdef USE_IN_LIBIO -# undef tmpfile -# include -versioned_symbol (libc, __new_tmpfile, tmpfile, GLIBC_2_1); -#endif diff -durpN glibc-2.2.4/stdio-common/tst-fseek.c glibc-2.2.5/stdio-common/tst-fseek.c --- glibc-2.2.4/stdio-common/tst-fseek.c Mon Jul 23 10:55:12 2001 +++ glibc-2.2.5/stdio-common/tst-fseek.c Wed Aug 22 15:23:59 2001 @@ -1,5 +1,5 @@ /* Tests of fseek and fseeko. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2000. @@ -24,6 +24,7 @@ #include #include #include +#include #include diff -durpN glibc-2.2.4/stdio-common/tst-perror.c glibc-2.2.5/stdio-common/tst-perror.c --- glibc-2.2.4/stdio-common/tst-perror.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/stdio-common/tst-perror.c Wed Aug 15 22:19:49 2001 @@ -0,0 +1,154 @@ +/* Test of perror. + Contributed by Ulrich Drepper , 2001. + To be used only for testing glibc. */ + +#include +#include +#include +#include +#include +#include +#include + + +#define MB_EXP \ + "null mode test 1: Invalid or incomplete multibyte or wide character\n" \ + "multibyte string\n" \ + "<0 mode test: Invalid argument\n" +#define MB_EXP_LEN (sizeof (MB_EXP) - 1) + +#define WC_EXP \ + "null mode test 2: Invalid or incomplete multibyte or wide character\n" \ + "wide string\n" \ + ">0 mode test: Invalid argument\n" +#define WC_EXP_LEN (sizeof (WC_EXP) - 1) + + +int +main (void) +{ + int fd; + char fname[] = "/tmp/tst-perror.XXXXXX"; + int result = 0; + char buf[200]; + ssize_t n; + + fd = mkstemp (fname); + if (fd == -1) + error (EXIT_FAILURE, errno, "cannot create temporary file"); + + /* Make sure the file gets removed. */ + unlink (fname); + + fclose (stderr); + + if (dup2 (fd, 2) == -1) + { + printf ("cannot create file descriptor 2: %m\n"); + exit (EXIT_FAILURE); + } + + stderr = fdopen (2, "w"); + if (stderr == NULL) + { + printf ("fdopen failed: %m\n"); + exit (EXIT_FAILURE); + } + + if (fwide (stderr, 0) != 0) + { + printf ("stderr not initially in mode 0\n"); + exit (EXIT_FAILURE); + } + + errno = EILSEQ; + perror ("null mode test 1"); + + if (fwide (stderr, 0) != 0) + { + puts ("perror changed the mode from 0"); + result = 1; + } + + fputs ("multibyte string\n", stderr); + + if (fwide (stderr, 0) >= 0) + { + puts ("fputs didn't set orientation to narrow"); + result = 1; + } + + errno = EINVAL; + perror ("<0 mode test"); + + fclose (stderr); + + lseek (fd, 0, SEEK_SET); + n = read (fd, buf, sizeof (buf)); + if (n != MB_EXP_LEN || memcmp (buf, MB_EXP, MB_EXP_LEN) != 0) + { + printf ("multibyte test failed. Expected:\n%s\nGot:\n%.*s\n", + MB_EXP, (int) n, buf); + result = 1; + } + else + puts ("multibyte test succeeded"); + + lseek (fd, 0, SEEK_SET); + ftruncate (fd, 0); + + if (dup2 (fd, 2) == -1) + { + printf ("cannot create file descriptor 2: %m\n"); + exit (EXIT_FAILURE); + } + stderr = fdopen (2, "w"); + if (stderr == NULL) + { + printf ("fdopen failed: %m\n"); + exit (EXIT_FAILURE); + } + + if (fwide (stderr, 0) != 0) + { + printf ("stderr not initially in mode 0\n"); + exit (EXIT_FAILURE); + } + + errno = EILSEQ; + perror ("null mode test 2"); + + if (fwide (stderr, 0) != 0) + { + puts ("perror changed the mode from 0"); + result = 1; + } + + fputws (L"wide string\n", stderr); + + if (fwide (stderr, 0) <= 0) + { + puts ("fputws didn't set orientation to wide"); + result = 1; + } + + errno = EINVAL; + perror (">0 mode test"); + + fclose (stderr); + + lseek (fd, 0, SEEK_SET); + n = read (fd, buf, sizeof (buf)); + if (n != WC_EXP_LEN || memcmp (buf, WC_EXP, WC_EXP_LEN) != 0) + { + printf ("wide test failed. Expected:\n%s\nGot:\n%.*s\n", + WC_EXP, (int) n, buf); + result = 1; + } + else + puts ("wide test succeeded"); + + close (fd); + + return result; +} diff -durpN glibc-2.2.4/stdio-common/vfprintf.c glibc-2.2.5/stdio-common/vfprintf.c --- glibc-2.2.4/stdio-common/vfprintf.c Sat Aug 11 18:28:50 2001 +++ glibc-2.2.5/stdio-common/vfprintf.c Thu Dec 13 23:15:10 2001 @@ -1195,7 +1195,7 @@ vfprintf (FILE *s, const CHAR_T *format, \ memset (&mbstate, '\0', sizeof (mbstate_t)); \ \ - if (prec > 0) \ + if (prec >= 0) \ { \ /* The string `s2' might not be NUL terminated. */ \ if (prec < 32768 \ @@ -1296,10 +1296,10 @@ vfprintf (FILE *s, const CHAR_T *format, /* Lock stream. */ #ifdef USE_IN_LIBIO - __libc_cleanup_region_start ((void (*) (void *)) &_IO_funlockfile, s); + __libc_cleanup_region_start (1, (void (*) (void *)) &_IO_funlockfile, s); _IO_flockfile (s); #else - __libc_cleanup_region_start ((void (*) (void *)) &__funlockfile, s); + __libc_cleanup_region_start (1, (void (*) (void *)) &__funlockfile, s); __flockfile (s); #endif @@ -2086,7 +2086,7 @@ buffered_vfprintf (register _IO_FILE *s, result = vfprintf (hp, format, args); /* Lock stream. */ - __libc_cleanup_region_start ((void (*) (void *)) &_IO_funlockfile, s); + __libc_cleanup_region_start (1, (void (*) (void *)) &_IO_funlockfile, s); _IO_flockfile (s); /* Now flush anything from the helper to the S. */ @@ -2182,7 +2182,8 @@ __wprintf_pad (FILE *s, wchar_t pad, siz # ifdef strong_alias /* This is for glibc. */ # ifdef COMPILE_WPRINTF -strong_alias (_IO_vfwprintf, vfwprintf); +strong_alias (_IO_vfwprintf, __vfwprintf); +weak_alias (_IO_vfwprintf, vfwprintf); # else strong_alias (_IO_vfprintf, vfprintf); # endif diff -durpN glibc-2.2.4/stdio-common/vfscanf.c glibc-2.2.5/stdio-common/vfscanf.c --- glibc-2.2.4/stdio-common/vfscanf.c Fri Aug 10 12:11:52 2001 +++ glibc-2.2.5/stdio-common/vfscanf.c Mon Nov 26 19:24:56 2001 @@ -168,7 +168,7 @@ } \ } while (0) # define LOCK_STREAM(S) \ - __libc_cleanup_region_start ((void (*) (void *)) &_IO_funlockfile, (S)); \ + __libc_cleanup_region_start (1, (void (*) (void *)) &_IO_funlockfile, (S)); \ _IO_flockfile (S) # define UNLOCK_STREAM(S) \ _IO_funlockfile (S); \ @@ -1596,7 +1596,8 @@ __vfscanf (FILE *s, const char *format, if (width == 0 || inchar () == EOF) /* EOF is only an input error before we read any chars. */ conv_error (); - if (! ISDIGIT (c) && TOLOWER (c) != L_('i')) + if (! ISDIGIT (c) && TOLOWER (c) != L_('i') + && TOLOWER (c) != L_('n')) { #ifdef COMPILE_WSCANF if (c != decimal) @@ -1654,12 +1655,12 @@ __vfscanf (FILE *s, const char *format, /* Maybe "nan". */ ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('a')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); @@ -1671,12 +1672,12 @@ __vfscanf (FILE *s, const char *format, /* Maybe "inf" or "infinity". */ ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('f')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); @@ -1691,25 +1692,25 @@ __vfscanf (FILE *s, const char *format, ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('n')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('i')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('t')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); if (width == 0 || inchar () == EOF || TOLOWER (c) != L_('y')) - input_error (); + conv_error (); if (width > 0) --width; ADDW (c); @@ -2090,18 +2091,17 @@ __vfscanf (FILE *s, const char *format, size_t n; /* Convert it into a wide character. */ - n = __mbrtowc (wstr, buf, cnt, &cstate); + buf[0] = c; + n = __mbrtowc (wstr, buf, 1, &cstate); if (n == (size_t) -2) { /* Possibly correct character, just not enough input. */ + ++cnt; assert (cnt < MB_CUR_MAX); continue; } - - if (n != cnt) - encode_error (); ++wstr; if ((flags & MALLOC) diff -durpN glibc-2.2.4/stdlib/Makefile glibc-2.2.5/stdlib/Makefile --- glibc-2.2.4/stdlib/Makefile Mon Jul 23 10:55:14 2001 +++ glibc-2.2.5/stdlib/Makefile Thu Oct 25 03:20:23 2001 @@ -59,7 +59,7 @@ test-srcs := tst-fmtmsg tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ test-canon test-canon2 tst-strtoll tst-environ \ tst-xpg-basename tst-random tst-bsearch tst-limits \ - tst-rand48 bug-strtod tst-setcontext + tst-rand48 bug-strtod tst-setcontext test-a64l # Several mpn functions from GNU MP are used by the strtod function. @@ -160,6 +160,7 @@ $(objpfx)isomac.out: $(objpfx)isomac $(dir $<)$(notdir $<) '$(CC)' \ '-I../include -I.. $(+sysdep-includes) $(sysincludes)' > $<.out +isomac-CFLAGS = -O $(objpfx)isomac: isomac.c $(native-compile) diff -durpN glibc-2.2.4/stdlib/a64l.c glibc-2.2.5/stdlib/a64l.c --- glibc-2.2.4/stdlib/a64l.c Mon Jul 23 10:55:14 2001 +++ glibc-2.2.5/stdlib/a64l.c Thu Oct 25 03:20:29 2001 @@ -43,6 +43,7 @@ a64l (string) const char *ptr = string; unsigned long int result = 0ul; const char *end = ptr + 6; + int shift = 0; do { @@ -55,9 +56,9 @@ a64l (string) value = (int) a64l_table[index]; if (value == (int) XX) break; - result <<= 6; ++ptr; - result |= value; + result |= value << shift; + shift += 6; } while (ptr != end); diff -durpN glibc-2.2.4/stdlib/fmtmsg.c glibc-2.2.5/stdlib/fmtmsg.c --- glibc-2.2.4/stdlib/fmtmsg.c Mon Jul 23 10:55:14 2001 +++ glibc-2.2.5/stdlib/fmtmsg.c Thu Aug 16 21:48:26 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -23,6 +23,9 @@ #include #include #include +#ifdef USE_IN_LIBIO +# include +#endif /* We have global data, protect the modification. */ @@ -143,20 +146,42 @@ fmtmsg (long int classification, const c int do_action = (print & action_mask) && action != MM_NULLACT; int do_tag = (print & tag_mask) && tag != MM_NULLTAG; - if (fprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n", - do_label ? label : "", - do_label && (do_severity | do_text | do_action | do_tag) - ? ": " : "", - do_severity ? severity_rec->string : "", - do_severity && (do_text | do_action | do_tag) ? ": " : "", - do_text ? text : "", - do_text && (do_action | do_tag) ? "\n" : "", - do_action ? "TO FIX: " : "", - do_action ? action : "", - do_action && do_tag ? " " : "", - do_tag ? tag : "") == EOF) - /* Oh, oh. An error occurred during the output. */ - result = MM_NOMSG; +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + { + if (__fwprintf (stderr, L"%s%s%s%s%s%s%s%s%s%s\n", + do_label ? label : "", + do_label + && (do_severity | do_text | do_action | do_tag) + ? ": " : "", + do_severity ? severity_rec->string : "", + do_severity && (do_text | do_action | do_tag) + ? ": " : "", + do_text ? text : "", + do_text && (do_action | do_tag) ? "\n" : "", + do_action ? "TO FIX: " : "", + do_action ? action : "", + do_action && do_tag ? " " : "", + do_tag ? tag : "") == WEOF) + /* Oh, oh. An error occurred during the output. */ + result = MM_NOMSG; + } + else +#endif + if (fprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n", + do_label ? label : "", + do_label && (do_severity | do_text | do_action | do_tag) + ? ": " : "", + do_severity ? severity_rec->string : "", + do_severity && (do_text | do_action | do_tag) ? ": " : "", + do_text ? text : "", + do_text && (do_action | do_tag) ? "\n" : "", + do_action ? "TO FIX: " : "", + do_action ? action : "", + do_action && do_tag ? " " : "", + do_tag ? tag : "") == EOF) + /* Oh, oh. An error occurred during the output. */ + result = MM_NOMSG; } if (classification & MM_CONSOLE) diff -durpN glibc-2.2.4/stdlib/l64a.c glibc-2.2.5/stdlib/l64a.c --- glibc-2.2.4/stdlib/l64a.c Mon Jul 23 10:55:15 2001 +++ glibc-2.2.5/stdlib/l64a.c Thu Oct 25 03:20:35 2001 @@ -47,13 +47,12 @@ l64a (n) /* The value for N == 0 is defined to be the empty string. */ return (char *) ""; - result[6] = '\0'; - - for (cnt = 5; m > 0ul; --cnt) + for (cnt = 0; m > 0ul; ++cnt) { result[cnt] = conv_table[m & 0x3f]; m >>= 6; } + result[cnt] = '\0'; - return &result[cnt + 1]; + return result; } diff -durpN glibc-2.2.4/stdlib/test-a64l.c glibc-2.2.5/stdlib/test-a64l.c --- glibc-2.2.4/stdlib/test-a64l.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/stdlib/test-a64l.c Thu Oct 25 03:20:40 2001 @@ -0,0 +1,75 @@ +/* Test program for the l64a and a64l functions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Prototype for our test function. */ +extern int do_test (int argc, char *argv[]); +#include + +struct a64l_test +{ + const char *base64; + long int value; +}; + +static const struct a64l_test tests[] = + { + { "./", 64 }, + { "", 0 }, + { "/", 1 }, + { "FT", 2001 }, + { NULL, 0 } + }; + +int +do_test (int argc, char ** argv) +{ + const struct a64l_test *at; + long int l; + const char *s; + int status = 0; + + for (at = tests; at->base64 != NULL; ++at) + { + printf ("a64l (\"%s\")", at->base64); + l = a64l (at->base64); + if (l == at->value) + puts ("\tOK"); + else + { + printf ("\tBAD\n returns %ld, expected %ld\n", l, at->value); + status = 1; + } + printf ("l64a (%ld)", at->value); + s = l64a (at->value); + if (strcmp (s, at->base64) == 0) + puts ("\tOK"); + else + { + printf ("\tBAD\n returns \"%s\", expected \"%s\"\n", s, at->base64); + status = 1; + } + } + + return status ? EXIT_FAILURE : EXIT_SUCCESS; +} diff -durpN glibc-2.2.4/stdlib/tst-random.c glibc-2.2.5/stdlib/tst-random.c --- glibc-2.2.4/stdlib/tst-random.c Sat Jan 6 20:35:29 2001 +++ glibc-2.2.5/stdlib/tst-random.c Thu Aug 23 15:35:09 2001 @@ -101,7 +101,7 @@ main (void) { char *oldstate = (char *) setstate (state[s]); if (oldstate != state[(s + nseq - 1) % nseq]) - fail ("bad setstate() return value", i, s); + fail ("bad setstate() return value", s, i); if (rnd[s][i] != random ()) fail ("bad value generated in interleave test", s, i); } diff -durpN glibc-2.2.4/string/argz-stringify.c glibc-2.2.5/string/argz-stringify.c --- glibc-2.2.4/string/argz-stringify.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/argz-stringify.c Thu Aug 30 16:21:12 2001 @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995,96,97,2000 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader @@ -29,7 +29,7 @@ __argz_stringify (char *argz, size_t len if (len > 0) while (1) { - size_t part_len = strnlen (argz, len); + size_t part_len = __strnlen (argz, len); argz += part_len; len -= part_len; if (len-- <= 1) /* includes final '\0' we want to stop at */ diff -durpN glibc-2.2.4/string/bits/string2.h glibc-2.2.5/string/bits/string2.h --- glibc-2.2.4/string/bits/string2.h Mon Jul 23 10:55:17 2001 +++ glibc-2.2.5/string/bits/string2.h Sat Nov 3 01:03:47 2001 @@ -196,24 +196,28 @@ __STRING2_COPY_TYPE (8); /* Copy N bytes from SRC to DEST, returning pointer to byte following the last copied. */ #ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ +# if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_mempcpy +# define __mempcpy(dest, src, n) \ (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ && __string2_1bptr_p (src) && n <= 8 \ ? __mempcpy_small (dest, __mempcpy_args (src), n) \ : __mempcpy (dest, src, n))) /* In glibc we use this function frequently but for namespace reasons we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) +# define mempcpy(dest, src, n) __mempcpy (dest, src, n) +# endif # if _STRING_ARCH_unaligned -# define __mempcpy_args(src) \ +# ifndef _FORCE_INLINES +# define __mempcpy_args(src) \ ((__const char *) (src))[0], ((__const char *) (src))[2], \ ((__const char *) (src))[4], ((__const char *) (src))[6], \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) +# endif __STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); @@ -280,7 +284,8 @@ __mempcpy_small (void *__dest1, return (void *) __u; } # else -# define __mempcpy_args(src) \ +# ifndef _FORCE_INLINES +# define __mempcpy_args(src) \ ((__const char *) (src))[0], \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ @@ -308,6 +313,7 @@ __mempcpy_small (void *__dest1, ((__const char *) (src))[2], ((__const char *) (src))[3], \ ((__const char *) (src))[4], ((__const char *) (src))[5], \ ((__const char *) (src))[6], ((__const char *) (src))[7] } }) +# endif __STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, @@ -377,21 +383,25 @@ extern void *__rawmemchr (const void *__ /* Copy SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ +#if !defined _HAVE_STRING_ARCH_strcpy || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_strcpy +# define strcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ ? __strcpy_small (dest, __strcpy_args (src), \ strlen (src) + 1) \ : (char *) memcpy (dest, src, strlen (src) + 1)) \ : strcpy (dest, src))) +# endif # if _STRING_ARCH_unaligned -# define __strcpy_args(src) \ +# ifndef _FORCE_INLINES +# define __strcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) +# endif __STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); __STRING_INLINE char * @@ -447,7 +457,8 @@ __strcpy_small (char *__dest, return __dest; } # else -# define __strcpy_args(src) \ +# ifndef _FORCE_INLINES +# define __strcpy_args(src) \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((__const char *) (src))[0], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR3) \ @@ -474,6 +485,7 @@ __strcpy_small (char *__dest, ((__const char *) (src))[2], ((__const char *) (src))[3], \ ((__const char *) (src))[4], ((__const char *) (src))[5], \ ((__const char *) (src))[6], '\0' } }) +# endif __STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, @@ -533,8 +545,9 @@ __strcpy_small (char *__dest, /* Copy SRC to DEST, returning pointer to final NUL byte. */ #ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ +# if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_stpcpy +# define __stpcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ ? __stpcpy_small (dest, __stpcpy_args (src), \ @@ -543,14 +556,17 @@ __strcpy_small (char *__dest, : __stpcpy (dest, src))) /* In glibc we use this function frequently but for namespace reasons we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) +# define stpcpy(dest, src) __stpcpy (dest, src) +# endif # if _STRING_ARCH_unaligned -# define __stpcpy_args(src) \ +# ifndef _FORCE_INLINES +# define __stpcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) +# endif __STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); __STRING_INLINE char * @@ -611,7 +627,8 @@ __stpcpy_small (char *__dest, return &__u->__c; } # else -# define __stpcpy_args(src) \ +# ifndef _FORCE_INLINES +# define __stpcpy_args(src) \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((__const char *) (src))[0], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR3) \ @@ -638,6 +655,7 @@ __stpcpy_small (char *__dest, ((__const char *) (src))[2], ((__const char *) (src))[3], \ ((__const char *) (src))[4], ((__const char *) (src))[5], \ ((__const char *) (src))[6], '\0' } }) +# endif __STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, @@ -854,8 +872,9 @@ __stpcpy_small (char *__dest, /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ -#ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ +#if !defined _HAVE_STRING_ARCH_strcspn || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_strcspn +# define strcspn(s, reject) \ __extension__ \ ({ char __r0, __r1, __r2; \ (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ @@ -869,10 +888,11 @@ __stpcpy_small (char *__dest, ? __strcspn_c3 (s, __r0, __r1, __r2) \ : strcspn (s, reject))))) \ : strcspn (s, reject)); }) +# endif -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, char __reject); +__STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject); __STRING_INLINE size_t -__strcspn_c1 (__const char *__s, char __reject) +__strcspn_c1 (__const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) @@ -880,10 +900,10 @@ __strcspn_c1 (__const char *__s, char __ return __result; } -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, char __reject1, - char __reject2); +__STRING_INLINE size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); __STRING_INLINE size_t -__strcspn_c2 (__const char *__s, char __reject1, char __reject2) +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 @@ -892,11 +912,11 @@ __strcspn_c2 (__const char *__s, char __ return __result; } -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, char __reject1, - char __reject2, char __reject3); +__STRING_INLINE size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); __STRING_INLINE size_t -__strcspn_c3 (__const char *__s, char __reject1, char __reject2, - char __reject3) +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 @@ -909,8 +929,9 @@ __strcspn_c3 (__const char *__s, char __ /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ +#if !defined _HAVE_STRING_ARCH_strspn || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_strspn +# define strspn(s, accept) \ __extension__ \ ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ @@ -924,10 +945,11 @@ __strcspn_c3 (__const char *__s, char __ ? __strspn_c3 (s, __a0, __a1, __a2) \ : strspn (s, accept))))) \ : strspn (s, accept)); }) +# endif -__STRING_INLINE size_t __strspn_c1 (__const char *__s, char __accept); +__STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept); __STRING_INLINE size_t -__strspn_c1 (__const char *__s, char __accept) +__strspn_c1 (__const char *__s, int __accept) { register size_t __result = 0; /* Please note that __accept never can be '\0'. */ @@ -936,10 +958,10 @@ __strspn_c1 (__const char *__s, char __a return __result; } -__STRING_INLINE size_t __strspn_c2 (__const char *__s, char __accept1, - char __accept2); +__STRING_INLINE size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); __STRING_INLINE size_t -__strspn_c2 (__const char *__s, char __accept1, char __accept2) +__strspn_c2 (__const char *__s, int __accept1, int __accept2) { register size_t __result = 0; /* Please note that __accept1 and __accept2 never can be '\0'. */ @@ -948,10 +970,10 @@ __strspn_c2 (__const char *__s, char __a return __result; } -__STRING_INLINE size_t __strspn_c3 (__const char *__s, char __accept1, - char __accept2, char __accept3); +__STRING_INLINE size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); __STRING_INLINE size_t -__strspn_c3 (__const char *__s, char __accept1, char __accept2, char __accept3) +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; /* Please note that __accept1 to __accept3 never can be '\0'. */ @@ -964,8 +986,9 @@ __strspn_c3 (__const char *__s, char __a /* Find the first occurrence in S of any character in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ +#if !defined _HAVE_STRING_ARCH_strpbrk || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_strpbrk +# define strpbrk(s, accept) \ __extension__ \ ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ @@ -979,6 +1002,7 @@ __strspn_c3 (__const char *__s, char __a ? __strpbrk_c3 (s, __a0, __a1, __a2) \ : strpbrk (s, accept))))) \ : strpbrk (s, accept)); }) +# endif __STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, int __accept2); @@ -1021,26 +1045,16 @@ __strpbrk_c3 (__const char *__s, int __a #endif -#if defined __USE_GNU && !defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strnlen -__STRING_INLINE size_t -strnlen (__const char *__string, size_t __maxlen) -{ - __const char *__end = (__const char *) memchr (__string, '\0', __maxlen); - return __end ? (size_t) (__end - __string) : __maxlen; -} -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ +#if !defined _HAVE_STRING_ARCH_strtok_r || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_strtok_r +# define __strtok_r(s, sep, nextp) \ (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ ? (((__const char *) (sep))[0] != '\0' \ && ((__const char *) (sep))[1] == '\0' \ ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ : __strtok_r (s, sep, nextp)) \ : __strtok_r (s, sep, nextp))) +# endif __STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); __STRING_INLINE char * @@ -1051,32 +1065,31 @@ __strtok_r_1c (char *__s, char __sep, ch __s = *__nextp; while (*__s == __sep) ++__s; - if (*__s == '\0') - __result = NULL; - else + __result = NULL; + if (*__s != '\0') { - __result = __s; - while (*__s != '\0' && *__s != __sep) - ++__s; - if (*__s == '\0') - *__nextp = __s; - else - { - *__s = '\0'; - *__nextp = __s + 1; - } + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + *__nextp = __s; } return __result; } # if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r ((s), (sep), (nextp)) +# define strtok_r(s, sep, nextp) __strtok_r (s, sep, nextp) # endif #endif -#ifndef _HAVE_STRING_ARCH_strsep +#if !defined _HAVE_STRING_ARCH_strsep || defined _FORCE_INLINES +# ifndef _HAVE_STRING_ARCH_strsep -# define __strsep(s, reject) \ +extern char *__strsep_g (char **__stringp, __const char *__delim); +# define __strsep(s, reject) \ __extension__ \ ({ char __r0, __r1, __r2; \ (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ @@ -1091,21 +1104,15 @@ __strtok_r_1c (char *__s, char __sep, ch ? __strsep_3c (s, __r0, __r1, __r2) \ : __strsep_g (s, reject)))) \ : __strsep_g (s, reject)); }) +# endif __STRING_INLINE char *__strsep_1c (char **__s, char __reject); __STRING_INLINE char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject) + if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL) *(*__s)++ = '\0'; - else - if ((*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - else - *__s = NULL; return __retval; } @@ -1114,22 +1121,24 @@ __STRING_INLINE char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2) - *(*__s)++ = '\0'; - else + if (__retval != NULL) { register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2) - ++__cp; - if (*__cp != '\0') + while (1) { - *__s = __cp; - *(*__s)++ = '\0'; + if (*__cp == '\0') + { + __cp = NULL; + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; } - else - *__s = NULL; + *__s = __cp; } return __retval; } @@ -1140,41 +1149,29 @@ __STRING_INLINE char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2 - || *__retval == __reject3) - *(*__s)++ = '\0'; - else + if (__retval != NULL) { register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2 - && *__cp != __reject3) - ++__cp; - if (*__cp != '\0') + while (1) { - *__s = __cp; - *(*__s)++ = '\0'; + if (*__cp == '\0') + { + __cp = NULL; + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; } - else - *__s = NULL; + *__s = __cp; } return __retval; } - -__STRING_INLINE char *__strsep_g (char **__s, __const char *__reject); -__STRING_INLINE char * -__strsep_g (char **__s, __const char *__reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return NULL; - if ((*__s = strpbrk (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} # ifdef __USE_BSD -# define strsep(s, reject) __strsep ((s), (reject)) +# define strsep(s, reject) __strsep (s, reject) # endif #endif @@ -1219,7 +1216,7 @@ extern char *__strndup (__const char *__ size_t __n = (n); \ char *__retval; \ if (__n < __len) \ - __len = __n; \ + __len = __n + 1; \ __retval = (char *) malloc (__len); \ if (__retval != NULL) \ { \ @@ -1228,10 +1225,10 @@ extern char *__strndup (__const char *__ __len - 1); \ } \ __retval; })) \ - : __strndup ((s), (n)))) + : __strndup (s, n))) # ifdef __USE_GNU -# define strndup(s, n) __strndup ((s), (n)) +# define strndup(s, n) __strndup (s, n) # endif # endif diff -durpN glibc-2.2.4/string/envz.c glibc-2.2.5/string/envz.c --- glibc-2.2.4/string/envz.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/envz.c Sun Aug 19 23:26:01 2001 @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated environment vectors - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader @@ -104,9 +104,9 @@ envz_add (char **envz, size_t *envz_len, if (new_envz) { - bcopy (name, new_envz + old_envz_len, name_len); + memcpy (new_envz + old_envz_len, name, name_len); new_envz[old_envz_len + name_len] = SEP; - bcopy (value, new_envz + old_envz_len + name_len + 1, value_len); + memcpy (new_envz + old_envz_len + name_len + 1, value, value_len); new_envz[new_envz_len - 1] = 0; *envz = new_envz; @@ -163,7 +163,7 @@ envz_strip (char **envz, size_t *envz_le left -= entry_len; if (! index (entry, SEP)) /* Null entry. */ - bcopy (entry, entry + entry_len, left); + memmove (entry + entry_len, entry, left); else entry += entry_len; } diff -durpN glibc-2.2.4/string/stratcliff.c glibc-2.2.5/string/stratcliff.c --- glibc-2.2.4/string/stratcliff.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/stratcliff.c Wed Aug 22 18:10:57 2001 @@ -1,5 +1,5 @@ /* Test for string function add boundaries of usable memory. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -186,6 +186,33 @@ main (int argc, char *argv[]) printf ("strcpy flunked for outer = %d, inner = %d\n", outer, inner); result = 1; + } + + adr[inner] = 'T'; + } + } + + /* strncpy test */ + for (outer = size - 1; outer >= MAX (0, size - 128); --outer) + { + for (inner = MAX (outer, size - 64); inner < size; ++inner) + { + size_t len; + + adr[inner] = '\0'; + + for (len = 0; len < size - outer + 64; ++len) + { + if (strncpy (dest, &adr[outer], len) != dest + || memcmp (dest, &adr[outer], + MIN (inner - outer, len)) != 0 + || (inner - outer < len + && strlen (dest) != (inner - outer))) + { + printf ("strncpy flunked for outer = %d, inner = %d, len = %Zd\n", + outer, inner, len); + result = 1; + } } adr[inner] = 'T'; diff -durpN glibc-2.2.4/string/strcoll.c glibc-2.2.5/string/strcoll.c --- glibc-2.2.4/string/strcoll.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/strcoll.c Sun Sep 16 22:48:10 2001 @@ -60,7 +60,7 @@ STRCOLL (s1, s2, l) { #ifdef USE_IN_EXTENDED_LOCALE_MODEL struct locale_data *current = l->__locales[LC_COLLATE]; - uint_fast32_t nrules = *((const uint32_t *) current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].string); + uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; #else uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); #endif diff -durpN glibc-2.2.4/string/string.h glibc-2.2.5/string/string.h --- glibc-2.2.4/string/string.h Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/string.h Wed Oct 31 00:45:37 2001 @@ -157,7 +157,7 @@ extern char *strchr (__const char *__s, extern char *strrchr (__const char *__s, int __c) __THROW __attribute_pure__; #ifdef __USE_GNU -/* This funciton is similar to `strchr'. But it returns a pointer to +/* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ extern char *strchrnul (__const char *__s, int __c) __THROW __attribute_pure__; #endif diff -durpN glibc-2.2.4/string/strndup.c glibc-2.2.5/string/strndup.c --- glibc-2.2.4/string/strndup.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/strndup.c Thu Aug 30 16:17:41 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2001 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 @@ -42,8 +42,8 @@ __strndup (s, n) const char *s; size_t n; { - size_t len = strnlen (s, n); - char *new = malloc (len + 1); + size_t len = __strnlen (s, n); + char *new = (char *) malloc (len + 1); if (new == NULL) return NULL; diff -durpN glibc-2.2.4/string/strnlen.c glibc-2.2.5/string/strnlen.c --- glibc-2.2.4/string/strnlen.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/strnlen.c Wed Dec 31 16:00:00 1969 @@ -1,31 +0,0 @@ -/* Find the length of STRING, but scan at most MAXLEN characters. - Copyright (C) 1996, 1997, 1998, 2000 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -/* Find the length of STRING, but scan at most MAXLEN characters. - If no '\0' terminator is found in that many characters, return MAXLEN. */ - -size_t -__strnlen (const char *string, size_t maxlen) -{ - const char *end = memchr (string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} -weak_alias (__strnlen, strnlen) diff -durpN glibc-2.2.4/string/strxfrm.c glibc-2.2.5/string/strxfrm.c --- glibc-2.2.4/string/strxfrm.c Mon Jul 23 10:55:16 2001 +++ glibc-2.2.5/string/strxfrm.c Fri Oct 26 17:16:51 2001 @@ -96,7 +96,7 @@ STRXFRM (STRING_TYPE *dest, const STRING { #ifdef USE_IN_EXTENDED_LOCALE_MODEL struct locale_data *current = l->__locales[LC_COLLATE]; - uint_fast32_t nrules = *((const uint32_t *) current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].string); + uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; #else uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); #endif diff -durpN glibc-2.2.4/string/tester.c glibc-2.2.5/string/tester.c --- glibc-2.2.4/string/tester.c Mon Jul 23 10:55:17 2001 +++ glibc-2.2.5/string/tester.c Sat Nov 3 01:04:20 2001 @@ -1257,6 +1257,30 @@ test_bzero (void) } static void +test_strndup (void) +{ + char *p, *q; + it = "strndup"; + p = strndup("abcdef", 12); + check(p != NULL, 1); + if (p != NULL) + { + equal(p, "abcdef", 2); + q = strndup(p + 1, 2); + check(q != NULL, 3); + if (q != NULL) + equal(q, "bc", 4); + free (q); + } + free (p); + p = strndup("abc def", 3); + check(p != NULL, 5); + if (p != NULL) + equal(p, "abc", 6); + free (p); +} + +static void test_bcmp (void) { it = "bcmp"; @@ -1272,11 +1296,10 @@ test_bcmp (void) static void test_strerror (void) { - int f; it = "strerror"; - f = __open("/", O_WRONLY); /* Should always fail. */ - check(f < 0 && errno > 0 && errno < _sys_nerr, 1); - equal(strerror(errno), _sys_errlist[errno], 2); + check(strerror(EDOM) != 0, 1); + check(strerror(ERANGE) != 0, 2); + check(strerror(ENOENT) != 0, 3); } int @@ -1382,6 +1405,9 @@ main (void) /* bcmp - somewhat like memcmp. */ test_bcmp (); + + /* strndup. */ + test_strndup (); /* strerror - VERY system-dependent. */ test_strerror (); diff -durpN glibc-2.2.4/string/tst-strlen.c glibc-2.2.5/string/tst-strlen.c --- glibc-2.2.4/string/tst-strlen.c Sat Jul 4 14:32:37 1998 +++ glibc-2.2.5/string/tst-strlen.c Mon Aug 27 21:24:49 2001 @@ -31,7 +31,8 @@ main(int argc, char *argv[]) buf[words * 4 + 3] = (last & 8) != 0 ? 'e' : '\0'; buf[words * 4 + 4] = '\0'; - if (strlen (buf) != words * 4 + lens[last]) + if (strlen (buf) != words * 4 + lens[last] + || strnlen (buf, -1) != words * 4 + lens[last]) { printf ("failed for base=%Zu, words=%Zu, and last=%Zu\n", base, words, last); diff -durpN glibc-2.2.4/string/tst-strxfrm.c glibc-2.2.5/string/tst-strxfrm.c --- glibc-2.2.4/string/tst-strxfrm.c Mon Mar 19 13:38:04 2001 +++ glibc-2.2.5/string/tst-strxfrm.c Fri Oct 26 19:41:13 2001 @@ -15,6 +15,7 @@ test (const char *locale) size_t r; size_t l; char *buf; + __locale_t loc; int result = 0; if (setlocale (LC_COLLATE, locale) == NULL) @@ -37,6 +38,20 @@ test (const char *locale) locale, r, l); result = 1; } + + loc = __newlocale (1 << LC_ALL, locale, NULL); + + r = __strxfrm_l (buf, string, bufsize, loc); + l = strlen (buf); + if (r != l) + { + printf ("locale \"%s\": strxfrm_l returned %zu, strlen returned %zu\n", + locale, r, l); + result = 1; + } + + __freelocale (loc); + free (buf); return result; diff -durpN glibc-2.2.4/sunrpc/Makefile glibc-2.2.5/sunrpc/Makefile --- glibc-2.2.4/sunrpc/Makefile Mon Jul 23 10:55:17 2001 +++ glibc-2.2.5/sunrpc/Makefile Thu Nov 1 18:07:50 2001 @@ -126,8 +126,7 @@ $(objpfx)rpcgen: $(addprefix $(objpfx),$ $(+link) # Tell rpcgen where to find the C preprocessor. -rpcgen-cmd = $(built-program-cmd) -Y `$(CC) -print-file-name=cpp | \ - sed 's|/cpp$$||'` +rpcgen-cmd = $(built-program-cmd) -Y ../scripts # Install the rpc data base file. $(inst_sysconfdir)/rpc: etc.rpc $(+force) diff -durpN glibc-2.2.4/sunrpc/auth_unix.c glibc-2.2.5/sunrpc/auth_unix.c --- glibc-2.2.4/sunrpc/auth_unix.c Sat Jun 19 09:40:28 1999 +++ glibc-2.2.5/sunrpc/auth_unix.c Wed Aug 22 09:58:57 2001 @@ -50,6 +50,10 @@ #include #include +#ifdef USE_IN_LIBIO +# include +#endif + /* * Unix authenticator operations vector */ @@ -101,15 +105,19 @@ authunix_create (char *machname, uid_t u * Allocate and set up auth handle */ auth = (AUTH *) mem_alloc (sizeof (*auth)); - if (auth == NULL) - { - (void) fprintf (stderr, _("authunix_create: out of memory\n")); - return NULL; - } au = (struct audata *) mem_alloc (sizeof (*au)); - if (au == NULL) + if (auth == NULL || au == NULL) { - (void) fprintf (stderr, _("authunix_create: out of memory\n")); +no_memory: +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("authunix_create: out of memory\n")); + else +#endif + (void) fputs (_("authunix_create: out of memory\n"), stderr); + mem_free (auth, sizeof (*auth)); + mem_free (au, sizeof (*au)); return NULL; } auth->ah_ops = &auth_unix_ops; @@ -138,10 +146,7 @@ authunix_create (char *machname, uid_t u au->au_origcred.oa_flavor = AUTH_UNIX; au->au_origcred.oa_base = mem_alloc ((u_int) len); if (au->au_origcred.oa_base == NULL) - { - (void) fputs (_("authunix_create: out of memory\n"), stderr); - return NULL; - } + goto no_memory; memcpy(au->au_origcred.oa_base, mymem, (u_int) len); /* diff -durpN glibc-2.2.4/sunrpc/clnt_gen.c glibc-2.2.5/sunrpc/clnt_gen.c --- glibc-2.2.4/sunrpc/clnt_gen.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/clnt_gen.c Sun Aug 19 23:27:16 2001 @@ -110,7 +110,7 @@ clnt_create (const char *hostname, u_lon sin.sin_family = h->h_addrtype; sin.sin_port = 0; __bzero (sin.sin_zero, sizeof (sin.sin_zero)); - bcopy (h->h_addr, (char *) &sin.sin_addr, h->h_length); + memcpy ((char *) &sin.sin_addr, h->h_addr, h->h_length); prtbuflen = 1024; prttmpbuf = __alloca (prtbuflen); diff -durpN glibc-2.2.4/sunrpc/clnt_perr.c glibc-2.2.5/sunrpc/clnt_perr.c --- glibc-2.2.4/sunrpc/clnt_perr.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/clnt_perr.c Thu Aug 16 21:48:31 2001 @@ -43,6 +43,7 @@ static char sccsid[] = "@(#)clnt_perror. #include #ifdef USE_IN_LIBIO +# include # include # define fputs(s, f) _IO_fputs (s, f) #endif @@ -154,7 +155,12 @@ clnt_sperror (CLIENT * rpch, const char void clnt_perror (CLIENT * rpch, const char *msg) { - (void) fputs (clnt_sperror (rpch, msg), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", clnt_sperror (rpch, msg)); + else +#endif + (void) fputs (clnt_sperror (rpch, msg), stderr); } @@ -281,7 +287,12 @@ clnt_sperrno (enum clnt_stat stat) void clnt_perrno (enum clnt_stat num) { - (void) fputs (clnt_sperrno (num), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", clnt_sperrno (num)); + else +#endif + (void) fputs (clnt_sperrno (num), stderr); } @@ -323,7 +334,12 @@ clnt_spcreateerror (const char *msg) void clnt_pcreateerror (const char *msg) { - (void) fputs (clnt_spcreateerror (msg), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", clnt_spcreateerror (msg)); + else +#endif + (void) fputs (clnt_spcreateerror (msg), stderr); } struct auth_errtab diff -durpN glibc-2.2.4/sunrpc/clnt_simp.c glibc-2.2.5/sunrpc/clnt_simp.c --- glibc-2.2.4/sunrpc/clnt_simp.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/clnt_simp.c Sun Aug 19 23:28:21 2001 @@ -122,7 +122,7 @@ callrpc (const char *host, u_long prognu timeout.tv_usec = 0; timeout.tv_sec = 5; - bcopy (hp->h_addr, (char *) &server_addr.sin_addr, hp->h_length); + memcpy ((char *) &server_addr.sin_addr, hp->h_addr, hp->h_length); server_addr.sin_family = AF_INET; server_addr.sin_port = 0; if ((crp->client = clntudp_create (&server_addr, (u_long) prognum, diff -durpN glibc-2.2.4/sunrpc/clnt_tcp.c glibc-2.2.5/sunrpc/clnt_tcp.c --- glibc-2.2.4/sunrpc/clnt_tcp.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/clnt_tcp.c Thu Aug 16 21:48:31 2001 @@ -59,6 +59,9 @@ static char sccsid[] = "@(#)clnt_tcp.c 1 #include #include #include +#ifdef USE_IN_LIBIO +# include +#endif extern u_long _create_xid (void); @@ -117,25 +120,23 @@ clnttcp_create (struct sockaddr_in *radd int *sockp, u_int sendsz, u_int recvsz) { CLIENT *h; - struct ct_data *ct = (struct ct_data *) mem_alloc (sizeof (*ct)); + struct ct_data *ct; struct rpc_msg call_msg; h = (CLIENT *) mem_alloc (sizeof (*h)); - if (h == NULL) - { - struct rpc_createerr *ce = &get_rpc_createerr (); - (void) fprintf (stderr, _("clnttcp_create: out of memory\n")); - ce->cf_stat = RPC_SYSTEMERROR; - ce->cf_error.re_errno = errno; - goto fooy; - } - /* ct = (struct ct_data *) mem_alloc (sizeof (*ct)); */ - if (ct == NULL) + ct = (struct ct_data *) mem_alloc (sizeof (*ct)); + if (h == NULL || ct == NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); - (void) fprintf (stderr, _("clnttcp_create: out of memory\n")); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("clnttcp_create: out of memory\n")); + else +#endif + (void) fputs (_("clnttcp_create: out of memory\n"), stderr); ce->cf_stat = RPC_SYSTEMERROR; - ce->cf_error.re_errno = errno; + ce->cf_error.re_errno = ENOMEM; goto fooy; } diff -durpN glibc-2.2.4/sunrpc/clnt_udp.c glibc-2.2.5/sunrpc/clnt_udp.c --- glibc-2.2.4/sunrpc/clnt_udp.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/clnt_udp.c Thu Aug 16 21:48:31 2001 @@ -50,6 +50,9 @@ static char sccsid[] = "@(#)clnt_udp.c 1 #include #include #include +#ifdef USE_IN_LIBIO +# include +#endif #ifdef IP_RECVERR #include @@ -126,23 +129,21 @@ clntudp_bufcreate (struct sockaddr_in *r struct rpc_msg call_msg; cl = (CLIENT *) mem_alloc (sizeof (CLIENT)); - if (cl == NULL) - { - struct rpc_createerr *ce = &get_rpc_createerr (); - (void) fprintf (stderr, _("clntudp_create: out of memory\n")); - ce->cf_stat = RPC_SYSTEMERROR; - ce->cf_error.re_errno = errno; - goto fooy; - } sendsz = ((sendsz + 3) / 4) * 4; recvsz = ((recvsz + 3) / 4) * 4; cu = (struct cu_data *) mem_alloc (sizeof (*cu) + sendsz + recvsz); - if (cu == NULL) + if (cl == NULL || cu == NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); - (void) fprintf (stderr, _("clntudp_create: out of memory\n")); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("clntudp_create: out of memory\n")); + else +#endif + (void) fputs (_("clntudp_create: out of memory\n"), stderr); ce->cf_stat = RPC_SYSTEMERROR; - ce->cf_error.re_errno = errno; + ce->cf_error.re_errno = ENOMEM; goto fooy; } cu->cu_outbuf = &cu->cu_inbuf[recvsz]; diff -durpN glibc-2.2.4/sunrpc/clnt_unix.c glibc-2.2.5/sunrpc/clnt_unix.c --- glibc-2.2.4/sunrpc/clnt_unix.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/clnt_unix.c Thu Aug 16 21:48:31 2001 @@ -56,6 +56,9 @@ #include #include #include +#ifdef USE_IN_LIBIO +# include +#endif extern u_long _create_xid (void); @@ -119,21 +122,18 @@ clntunix_create (struct sockaddr_un *rad int len; h = (CLIENT *) mem_alloc (sizeof (*h)); - if (h == NULL) - { - struct rpc_createerr *ce = &get_rpc_createerr (); - (void) fputs (_("clntunix_create: out of memory\n"), stderr); - ce->cf_stat = RPC_SYSTEMERROR; - ce->cf_error.re_errno = errno; - goto fooy; - } - /* ct = (struct ct_data *) mem_alloc (sizeof (*ct)); */ - if (ct == NULL) + if (h == NULL || ct == NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); - (void) fputs (_("clntunix_create: out of memory\n"), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("clntunix_create: out of memory\n")); + else +#endif + (void) fputs (_("clntunix_create: out of memory\n"), stderr); ce->cf_stat = RPC_SYSTEMERROR; - ce->cf_error.re_errno = errno; + ce->cf_error.re_errno = ENOMEM; goto fooy; } diff -durpN glibc-2.2.4/sunrpc/etc.rpc glibc-2.2.5/sunrpc/etc.rpc --- glibc-2.2.4/sunrpc/etc.rpc Mon May 17 09:54:36 1999 +++ glibc-2.2.5/sunrpc/etc.rpc Thu Aug 30 01:27:23 2001 @@ -64,5 +64,6 @@ nispasswd 100303 rpc.nispasswdd ufsd 100233 ufsd pcnfsd 150001 pcnfs amd 300019 amq +sgi_fam 391002 fam bwnfsd 545580417 fypxfrd 600100069 freebsd-ypxfrd diff -durpN glibc-2.2.4/sunrpc/getrpcport.c glibc-2.2.5/sunrpc/getrpcport.c --- glibc-2.2.4/sunrpc/getrpcport.c Wed Jun 30 17:40:03 1999 +++ glibc-2.2.5/sunrpc/getrpcport.c Sun Aug 19 23:29:27 2001 @@ -67,7 +67,7 @@ getrpcport (const char *host, u_long pro buffer = __alloca (buflen); } - bcopy (hp->h_addr, (char *) &addr.sin_addr, hp->h_length); + memcpy ((char *) &addr.sin_addr, hp->h_addr, hp->h_length); addr.sin_family = AF_INET; addr.sin_port = 0; return pmap_getport (&addr, prognum, versnum, proto); diff -durpN glibc-2.2.4/sunrpc/rpc_cmsg.c glibc-2.2.5/sunrpc/rpc_cmsg.c --- glibc-2.2.4/sunrpc/rpc_cmsg.c Thu Apr 15 11:02:20 1999 +++ glibc-2.2.5/sunrpc/rpc_cmsg.c Sun Aug 19 23:31:54 2001 @@ -82,7 +82,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg * IXDR_PUT_INT32 (buf, oa->oa_length); if (oa->oa_length) { - bcopy (oa->oa_base, (caddr_t) buf, oa->oa_length); + memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length); buf = (int32_t *) ((char *) buf + RNDUP (oa->oa_length)); } oa = &cmsg->rm_call.cb_verf; @@ -90,7 +90,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg * IXDR_PUT_INT32 (buf, oa->oa_length); if (oa->oa_length) { - bcopy (oa->oa_base, (caddr_t) buf, oa->oa_length); + memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length); /* no real need.... buf = (long *) ((char *) buf + RNDUP(oa->oa_length)); */ @@ -138,8 +138,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg * } else { - bcopy ((caddr_t) buf, oa->oa_base, - oa->oa_length); + memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length); /* no real need.... buf = (long *) ((char *) buf + RNDUP(oa->oa_length)); @@ -179,8 +178,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg * } else { - bcopy ((caddr_t) buf, oa->oa_base, - oa->oa_length); + memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length); /* no real need... buf = (long *) ((char *) buf + RNDUP(oa->oa_length)); diff -durpN glibc-2.2.4/sunrpc/rpc_cout.c glibc-2.2.5/sunrpc/rpc_cout.c --- glibc-2.2.4/sunrpc/rpc_cout.c Sat Jan 6 20:35:29 2001 +++ glibc-2.2.5/sunrpc/rpc_cout.c Tue Sep 4 17:07:01 2001 @@ -32,7 +32,7 @@ * From: @(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI */ char cout_rcsid[] = -"$Id: rpc_cout.c,v 1.12 2000/12/28 10:22:08 aj Exp $"; +"$Id: rpc_cout.c,v 1.13 2001/09/05 00:07:01 drepper Exp $"; /* * rpc_cout.c, XDR routine outputter for the RPC protocol compiler @@ -801,7 +801,7 @@ static char * upcase (const char *str) { char *ptr, *hptr; - ptr = malloc (strlen (str)); + ptr = malloc (strlen (str) + 1); if (ptr == NULL) { f_print (stderr, "malloc failed\n"); diff -durpN glibc-2.2.4/sunrpc/rpc_hout.c glibc-2.2.5/sunrpc/rpc_hout.c --- glibc-2.2.4/sunrpc/rpc_hout.c Sat Jan 6 20:35:29 2001 +++ glibc-2.2.5/sunrpc/rpc_hout.c Tue Aug 28 02:17:24 2001 @@ -32,7 +32,7 @@ * From: @(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI */ char hout_rcsid[] = - "$Id: rpc_hout.c,v 1.6 2000/12/31 15:43:33 aj Exp $"; + "$Id: rpc_hout.c,v 1.7 2001/08/28 09:17:24 drepper Exp $"; /* * rpc_hout.c, Header file outputter for the RPC protocol compiler @@ -190,7 +190,7 @@ pargdef (definition * def) } f_print (fout, "};\n"); f_print (fout, "typedef struct %s %s;\n", name, name); - storexdrfuncdecl (name, 0); + storexdrfuncdecl (name, 1); f_print (fout, "\n"); } } diff -durpN glibc-2.2.4/sunrpc/rpc_main.c glibc-2.2.5/sunrpc/rpc_main.c --- glibc-2.2.4/sunrpc/rpc_main.c Thu Apr 12 14:02:07 2001 +++ glibc-2.2.5/sunrpc/rpc_main.c Thu Nov 1 18:15:17 2001 @@ -32,7 +32,7 @@ * From @(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI; */ const char main_rcsid[] = - "$Id: rpc_main.c,v 1.21 2001/04/11 05:42:12 drepper Exp $"; + "$Id: rpc_main.c,v 1.22 2001/11/02 02:15:17 drepper Exp $"; /* * rpc_main.c, Top level of the RPC protocol compiler. @@ -80,9 +80,9 @@ static const char *cmdname; #define SUNOS_CPP "/lib/cpp" static const char *svcclosetime = "120"; -static int cppDefined = 0; /* explicit path for C preprocessor */ +static int cppDefined; /* explicit path for C preprocessor */ static const char *CPP = SUNOS_CPP; -static char CPPFLAGS[] = "-C"; +static const char CPPFLAGS[] = "-C"; static char *pathbuf; static int cpp_pid; static const char *allv[] = @@ -167,17 +167,17 @@ int newstyle; /* newstyle of passing a #ifdef __GNU_LIBRARY__ int Cflag = 1; /* ANSI C syntax */ #else -int Cflag = 0; /* ANSI C/C++ syntax */ +int Cflag; /* ANSI C/C++ syntax */ #endif -int CCflag = 0; /* C++ files */ +int CCflag; /* C++ files */ static int allfiles; /* generate all files */ #ifdef __GNU_LIBRARY__ -int tirpcflag = 0; /* generating code for tirpc, by default */ +int tirpcflag; /* generating code for tirpc, by default */ #else int tirpcflag = 1; /* generating code for tirpc, by default */ #endif -xdrfunc *xdrfunc_head = NULL; /* xdr function list */ -xdrfunc *xdrfunc_tail = NULL; /* xdr function list */ +xdrfunc *xdrfunc_head; /* xdr function list */ +xdrfunc *xdrfunc_tail; /* xdr function list */ int __attribute__ ((noreturn)) diff -durpN glibc-2.2.4/sunrpc/rpcinfo.c glibc-2.2.5/sunrpc/rpcinfo.c --- glibc-2.2.4/sunrpc/rpcinfo.c Sat Jan 6 20:35:29 2001 +++ glibc-2.2.5/sunrpc/rpcinfo.c Tue Sep 18 20:05:41 2001 @@ -542,8 +542,8 @@ pmapdump (argc, argv) bzero ((char *) &server_addr, sizeof server_addr); server_addr.sin_family = AF_INET; if ((hp = gethostbyname ("localhost")) != NULL) - bcopy (hp->h_addr, (caddr_t) & server_addr.sin_addr, - hp->h_length); + memcpy ((caddr_t) & server_addr.sin_addr, hp->h_addr, + hp->h_length); else server_addr.sin_addr.s_addr = inet_addr ("0.0.0.0"); } @@ -733,7 +733,7 @@ get_inet_address (addr, host) host); exit (1); } - bcopy (hp->h_addr, (char *) &addr->sin_addr, hp->h_length); + memmove ((char *) &addr->sin_addr, hp->h_addr, hp->h_length); } addr->sin_family = AF_INET; } diff -durpN glibc-2.2.4/sunrpc/svc_authux.c glibc-2.2.5/sunrpc/svc_authux.c --- glibc-2.2.4/sunrpc/svc_authux.c Thu Apr 15 11:02:20 1999 +++ glibc-2.2.5/sunrpc/svc_authux.c Sun Aug 19 23:33:15 2001 @@ -80,7 +80,7 @@ _svcauth_unix (struct svc_req *rqst, str stat = AUTH_BADCRED; goto done; } - bcopy ((caddr_t) buf, aup->aup_machname, (u_int) str_len); + memcpy (aup->aup_machname, (caddr_t) buf, (u_int) str_len); aup->aup_machname[str_len] = 0; str_len = RNDUP (str_len); buf = (int32_t *) ((char *) buf + str_len); diff -durpN glibc-2.2.4/sunrpc/svc_simple.c glibc-2.2.5/sunrpc/svc_simple.c --- glibc-2.2.4/sunrpc/svc_simple.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/svc_simple.c Fri Aug 17 00:16:04 2001 @@ -41,12 +41,14 @@ static char sccsid[] = "@(#)svc_simple.c #include #include #include +#include #include #include #include #include #ifdef USE_IN_LIBIO +# include # include # define fputs(s, f) _IO_fputs (s, f) #endif @@ -78,35 +80,37 @@ registerrpc (u_long prognum, u_long vers char *(*progname) (char *), xdrproc_t inproc, xdrproc_t outproc) { struct proglst_ *pl; + char *buf; if (procnum == NULLPROC) { - (void) fprintf (stderr, - _("can't reassign procedure number %ld\n"), NULLPROC); - return -1; + + (void) __asprintf (&buf, _("can't reassign procedure number %ld\n"), + NULLPROC); + goto err_out; } if (transp == 0) { transp = svcudp_create (RPC_ANYSOCK); if (transp == NULL) { - (void) fputs (_("couldn't create an rpc server\n"), stderr); - return -1; + buf = strdup (_("couldn't create an rpc server\n")); + goto err_out; } } (void) pmap_unset ((u_long) prognum, (u_long) versnum); if (!svc_register (transp, (u_long) prognum, (u_long) versnum, universal, IPPROTO_UDP)) { - (void) fprintf (stderr, _("couldn't register prog %ld vers %ld\n"), - prognum, versnum); - return -1; + (void) __asprintf (&buf, _("couldn't register prog %ld vers %ld\n"), + prognum, versnum); + goto err_out; } pl = (struct proglst_ *) malloc (sizeof (struct proglst_)); if (pl == NULL) { - (void) fprintf (stderr, _("registerrpc: out of memory\n")); - return -1; + buf = strdup (_("registerrpc: out of memory\n")); + goto err_out; } pl->p_progname = progname; pl->p_prognum = prognum; @@ -116,6 +120,16 @@ registerrpc (u_long prognum, u_long vers pl->p_nxt = proglst; proglst = pl; return 0; + + err_out: +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", buf); + else +#endif + (void) fputs (buf, stderr); + free (buf); + return -1; } static void @@ -125,6 +139,7 @@ universal (struct svc_req *rqstp, SVCXPR char *outdata; char xdrbuf[UDPMSGSIZE]; struct proglst_ *pl; + char *buf = NULL; /* * enforce "procnum 0 is echo" convention @@ -133,7 +148,7 @@ universal (struct svc_req *rqstp, SVCXPR { if (svc_sendreply (transp_l, (xdrproc_t)xdr_void, (char *) NULL) == FALSE) { - (void) fprintf (stderr, "xxx\n"); + __write (STDERR_FILENO, "xxx\n", 4); exit (1); } return; @@ -156,15 +171,22 @@ universal (struct svc_req *rqstp, SVCXPR return; if (!svc_sendreply (transp_l, pl->p_outproc, outdata)) { - (void) fprintf (stderr, - _ ("trouble replying to prog %d\n"), - pl->p_prognum); + (void) __asprintf (&buf, + _("trouble replying to prog %d\n"), + pl->p_prognum); exit (1); } /* free the decoded arguments */ (void) svc_freeargs (transp_l, pl->p_inproc, xdrbuf); return; } - (void) fprintf (stderr, _ ("never registered prog %d\n"), prog); + (void) __asprintf (&buf, _("never registered prog %d\n"), prog); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else +#endif + fputs (buf, stderr); + free (buf); exit (1); } diff -durpN glibc-2.2.4/sunrpc/svc_tcp.c glibc-2.2.5/sunrpc/svc_tcp.c --- glibc-2.2.4/sunrpc/svc_tcp.c Fri Jul 27 23:13:20 2001 +++ glibc-2.2.5/sunrpc/svc_tcp.c Wed Aug 22 09:58:57 2001 @@ -52,6 +52,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1. #include #ifdef USE_IN_LIBIO +# include # include # define fputs(s, f) _IO_fputs (s, f) #endif @@ -173,19 +174,21 @@ svctcp_create (int sock, u_int sendsize, return (SVCXPRT *) NULL; } r = (struct tcp_rendezvous *) mem_alloc (sizeof (*r)); - if (r == NULL) + xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); + if (r == NULL || xprt == NULL) { - (void) fputs (_("svctcp_create: out of memory\n"), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", _("svctcp_create: out of memory\n")); + else +#endif + (void) fputs (_("svctcp_create: out of memory\n"), stderr); + mem_free (r, sizeof (*r)); + mem_free (xprt, sizeof (SVCXPRT)); return NULL; } r->sendsize = sendsize; r->recvsize = recvsize; - xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); - if (xprt == NULL) - { - (void) fputs (_("svctcp_create: out of memory\n"), stderr); - return NULL; - } xprt->xp_p2 = NULL; xprt->xp_p1 = (caddr_t) r; xprt->xp_verf = _null_auth; @@ -214,18 +217,19 @@ makefd_xprt (int fd, u_int sendsize, u_i struct tcp_conn *cd; xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); - if (xprt == (SVCXPRT *) NULL) - { - (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr); - goto done; - } cd = (struct tcp_conn *) mem_alloc (sizeof (struct tcp_conn)); - if (cd == (struct tcp_conn *) NULL) + if (xprt == (SVCXPRT *) NULL || cd == NULL) { - (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr); - mem_free ((char *) xprt, sizeof (SVCXPRT)); - xprt = (SVCXPRT *) NULL; - goto done; +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("svc_tcp: makefd_xprt: out of memory\n")); + else +#endif + (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr); + mem_free (xprt, sizeof (SVCXPRT)); + mem_free (cd, sizeof (struct tcp_conn)); + return NULL; } cd->strm_stat = XPRT_IDLE; xdrrec_create (&(cd->xdrs), sendsize, recvsize, @@ -238,7 +242,6 @@ makefd_xprt (int fd, u_int sendsize, u_i xprt->xp_port = 0; /* this is a connection, not a rendezvouser */ xprt->xp_sock = fd; xprt_register (xprt); -done: return xprt; } diff -durpN glibc-2.2.4/sunrpc/svc_udp.c glibc-2.2.5/sunrpc/svc_udp.c --- glibc-2.2.4/sunrpc/svc_udp.c Sun Oct 8 17:05:05 2000 +++ glibc-2.2.5/sunrpc/svc_udp.c Wed Aug 22 09:58:57 2001 @@ -52,6 +52,7 @@ static char sccsid[] = "@(#)svc_udp.c 1. #endif #ifdef USE_IN_LIBIO +# include # include # define fputs(s, f) _IO_fputs (s, f) #endif @@ -118,7 +119,8 @@ svcudp_bufcreate (sock, sendsz, recvsz) struct svcudp_data *su; struct sockaddr_in addr; socklen_t len = sizeof (struct sockaddr_in); - int pad; + int pad; + void *buf; if (sock == RPC_ANYSOCK) { @@ -144,23 +146,23 @@ svcudp_bufcreate (sock, sendsz, recvsz) return (SVCXPRT *) NULL; } xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); - if (xprt == NULL) - { - (void) fputs (_("svcudp_create: out of memory\n"), stderr); - return NULL; - } su = (struct svcudp_data *) mem_alloc (sizeof (*su)); - if (su == NULL) + buf = mem_alloc (((MAX (sendsz, recvsz) + 3) / 4) * 4); + if (xprt == NULL || su == NULL || buf == NULL) { - (void) fputs (_("svcudp_create: out of memory\n"), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", _("svcudp_create: out of memory\n")); + else +#endif + (void) fputs (_("svcudp_create: out of memory\n"), stderr); + mem_free (xprt, sizeof (SVCXPRT)); + mem_free (su, sizeof (*su)); + mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4); return NULL; } su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4; - if ((rpc_buffer (xprt) = mem_alloc (su->su_iosz)) == NULL) - { - (void) fputs (_("svcudp_create: out of memory\n"), stderr); - return NULL; - } + rpc_buffer (xprt) = buf; xdrmem_create (&(su->su_xdrs), rpc_buffer (xprt), su->su_iosz, XDR_DECODE); su->su_cache = NULL; xprt->xp_p2 = (caddr_t) su; @@ -174,8 +176,14 @@ svcudp_bufcreate (sock, sendsz, recvsz) + sizeof(struct cmsghdr) + sizeof (struct in_pktinfo)) > sizeof (xprt->xp_pad)) { - (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"), - stderr); +# ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("svcudp_create: xp_pad is too small for IP_PKTINFO\n")); + else +# endif + (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"), + stderr); return NULL; } pad = 1; @@ -380,8 +388,16 @@ svcudp_destroy (xprt) #define SPARSENESS 4 /* 75% sparse */ -#define CACHE_PERROR(msg) \ +#ifdef USE_IN_LIBIO +# define CACHE_PERROR(msg) \ + if (_IO_fwide (stderr, 0) > 0) \ + (void) __fwprintf(stderr, L"%s\n", msg); \ + else \ + (void) fprintf(stderr, "%s\n", msg) +#else +# define CACHE_PERROR(msg) \ (void) fprintf(stderr,"%s\n", msg) +#endif #define ALLOC(type, size) \ (type *) mem_alloc((unsigned) (sizeof(type) * (size))) diff -durpN glibc-2.2.4/sunrpc/svc_unix.c glibc-2.2.5/sunrpc/svc_unix.c --- glibc-2.2.4/sunrpc/svc_unix.c Fri Jul 27 23:13:20 2001 +++ glibc-2.2.5/sunrpc/svc_unix.c Wed Aug 22 09:58:57 2001 @@ -49,6 +49,10 @@ #include #include +#ifdef USE_IN_LIBIO +# include +#endif + /* * Ops vector for AF_UNIX based rpc service handle */ @@ -166,19 +170,21 @@ svcunix_create (int sock, u_int sendsize } r = (struct unix_rendezvous *) mem_alloc (sizeof (*r)); - if (r == NULL) + xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); + if (r == NULL || xprt == NULL) { - fputs (_("svcunix_create: out of memory\n"), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", _("svcunix_create: out of memory\n")); + else +#endif + fputs (_("svcunix_create: out of memory\n"), stderr); + mem_free (r, sizeof (*r)); + mem_free (xprt, sizeof (SVCXPRT)); return NULL; } r->sendsize = sendsize; r->recvsize = recvsize; - xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); - if (xprt == NULL) - { - fputs (_("svcunix_create: out of memory\n"), stderr); - return NULL; - } xprt->xp_p2 = NULL; xprt->xp_p1 = (caddr_t) r; xprt->xp_verf = _null_auth; @@ -207,18 +213,19 @@ makefd_xprt (int fd, u_int sendsize, u_i struct unix_conn *cd; xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); - if (xprt == (SVCXPRT *) NULL) - { - (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr); - goto done; - } cd = (struct unix_conn *) mem_alloc (sizeof (struct unix_conn)); - if (cd == (struct unix_conn *) NULL) + if (xprt == (SVCXPRT *) NULL || cd == (struct unix_conn *) NULL) { - (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr); - mem_free ((char *) xprt, sizeof (SVCXPRT)); - xprt = (SVCXPRT *) NULL; - goto done; +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("svc_unix: makefd_xprt: out of memory\n")); + else +#endif + (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr); + mem_free (xprt, sizeof (SVCXPRT)); + mem_free (cd, sizeof (struct unix_conn)); + return NULL; } cd->strm_stat = XPRT_IDLE; xdrrec_create (&(cd->xdrs), sendsize, recvsize, @@ -231,7 +238,6 @@ makefd_xprt (int fd, u_int sendsize, u_i xprt->xp_port = 0; /* this is a connection, not a rendezvouser */ xprt->xp_sock = fd; xprt_register (xprt); -done: return xprt; } diff -durpN glibc-2.2.4/sunrpc/svcauth_des.c glibc-2.2.5/sunrpc/svcauth_des.c --- glibc-2.2.4/sunrpc/svcauth_des.c Mon Mar 26 20:53:09 2001 +++ glibc-2.2.5/sunrpc/svcauth_des.c Sun Aug 19 23:37:09 2001 @@ -150,7 +150,7 @@ _svcauth_des (register struct svc_req *r return AUTH_BADCRED; } cred->adc_fullname.name = area->area_netname; - bcopy ((char *) ixdr, cred->adc_fullname.name, namelen); + memcpy (cred->adc_fullname.name, (char *) ixdr, namelen); cred->adc_fullname.name[namelen] = 0; ixdr += (RNDUP (namelen) / BYTES_PER_XDR_UNIT); cred->adc_fullname.key.key.high = *ixdr++; diff -durpN glibc-2.2.4/sunrpc/xdr.c glibc-2.2.5/sunrpc/xdr.c --- glibc-2.2.4/sunrpc/xdr.c Tue Jan 23 14:07:19 2001 +++ glibc-2.2.5/sunrpc/xdr.c Thu Aug 16 21:48:31 2001 @@ -44,10 +44,15 @@ static char sccsid[] = "@(#)xdr.c 1.35 8 #include #include #include +#include #include #include +#ifdef USE_IN_LIBIO +# include +#endif + /* * constants specific to the xdr "protocol" */ @@ -548,7 +553,12 @@ xdr_bytes (xdrs, cpp, sizep, maxsize) } if (sp == NULL) { - (void) fprintf (stderr, "xdr_bytes: out of memory\n"); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", _("xdr_bytes: out of memory\n")); + else +#endif + (void) fputs (_("xdr_bytes: out of memory\n"), stderr); return FALSE; } /* fall into ... */ @@ -694,7 +704,13 @@ xdr_string (xdrs, cpp, maxsize) *cpp = sp = (char *) mem_alloc (nodesize); if (sp == NULL) { - (void) fprintf (stderr, "xdr_string: out of memory\n"); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("xdr_string: out of memory\n")); + else +#endif + (void) fputs (_("xdr_string: out of memory\n"), stderr); return FALSE; } sp[size] = 0; diff -durpN glibc-2.2.4/sunrpc/xdr_array.c glibc-2.2.5/sunrpc/xdr_array.c --- glibc-2.2.4/sunrpc/xdr_array.c Wed Jul 15 14:01:44 1998 +++ glibc-2.2.5/sunrpc/xdr_array.c Thu Aug 16 21:48:31 2001 @@ -44,6 +44,11 @@ static char sccsid[] = "@(#)xdr_array.c #include #include #include +#include + +#ifdef USE_IN_LIBIO +# include +#endif #define LASTUNSIGNED ((u_int)0-1) @@ -95,8 +100,13 @@ xdr_array (xdrs, addrp, sizep, maxsize, *addrp = target = mem_alloc (nodesize); if (target == NULL) { - (void) fprintf (stderr, - "xdr_array: out of memory\n"); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("xdr_array: out of memory\n")); + else +#endif + (void) fputs (_("xdr_array: out of memory\n"), stderr); return FALSE; } __bzero (target, nodesize); diff -durpN glibc-2.2.4/sunrpc/xdr_mem.c glibc-2.2.5/sunrpc/xdr_mem.c --- glibc-2.2.4/sunrpc/xdr_mem.c Thu Apr 15 11:02:20 1999 +++ glibc-2.2.5/sunrpc/xdr_mem.c Sun Aug 19 23:34:36 2001 @@ -132,7 +132,7 @@ xdrmem_getbytes (XDR *xdrs, caddr_t addr { if ((xdrs->x_handy -= len) < 0) return FALSE; - bcopy (xdrs->x_private, addr, len); + memcpy (addr, xdrs->x_private, len); xdrs->x_private += len; return TRUE; } @@ -146,7 +146,7 @@ xdrmem_putbytes (XDR *xdrs, const char * { if ((xdrs->x_handy -= len) < 0) return FALSE; - bcopy (addr, xdrs->x_private, len); + memcpy (xdrs->x_private, addr, len); xdrs->x_private += len; return TRUE; } diff -durpN glibc-2.2.4/sunrpc/xdr_rec.c glibc-2.2.5/sunrpc/xdr_rec.c --- glibc-2.2.4/sunrpc/xdr_rec.c Fri Feb 9 10:04:23 2001 +++ glibc-2.2.5/sunrpc/xdr_rec.c Wed Aug 22 09:58:11 2001 @@ -51,6 +51,7 @@ #include #ifdef USE_IN_LIBIO +# include # include # define fputs(s, f) _IO_fputs (s, f) #endif @@ -145,10 +146,22 @@ xdrrec_create (XDR *xdrs, u_int sendsize { RECSTREAM *rstrm = (RECSTREAM *) mem_alloc (sizeof (RECSTREAM)); caddr_t tmp; + char *buf; - if (rstrm == NULL) + sendsize = fix_buf_size (sendsize); + recvsize = fix_buf_size (recvsize); + buf = mem_alloc (sendsize + recvsize + BYTES_PER_XDR_UNIT); + + if (rstrm == NULL || buf == NULL) { - (void) fputs (_("xdrrec_create: out of memory\n"), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", _("xdrrec_create: out of memory\n")); + else +#endif + (void) fputs (_("xdrrec_create: out of memory\n"), stderr); + mem_free (rstrm, sizeof (RECSTREAM)); + mem_free (buf, sendsize + recvsize + BYTES_PER_XDR_UNIT); /* * This is bad. Should rework xdrrec_create to * return a handle, and in this case return NULL @@ -158,14 +171,9 @@ xdrrec_create (XDR *xdrs, u_int sendsize /* * adjust sizes and allocate buffer quad byte aligned */ - rstrm->sendsize = sendsize = fix_buf_size (sendsize); - rstrm->recvsize = recvsize = fix_buf_size (recvsize); - rstrm->the_buffer = mem_alloc (sendsize + recvsize + BYTES_PER_XDR_UNIT); - if (rstrm->the_buffer == NULL) - { - (void) fputs (_("xdrrec_create: out of memory\n"), stderr); - return; - } + rstrm->sendsize = sendsize; + rstrm->recvsize = recvsize; + rstrm->the_buffer = buf; tmp = rstrm->the_buffer; if ((size_t)tmp % BYTES_PER_XDR_UNIT) tmp += BYTES_PER_XDR_UNIT - (size_t)tmp % BYTES_PER_XDR_UNIT; @@ -284,7 +292,7 @@ xdrrec_putbytes (XDR *xdrs, const char * { current = rstrm->out_boundry - rstrm->out_finger; current = (len < current) ? len : current; - bcopy (addr, rstrm->out_finger, current); + memcpy (rstrm->out_finger, addr, current); rstrm->out_finger += current; addr += current; len -= current; @@ -586,7 +594,7 @@ get_input_bytes (RECSTREAM *rstrm, caddr continue; } current = (len < current) ? len : current; - bcopy (rstrm->in_finger, addr, current); + memcpy (addr, rstrm->in_finger, current); rstrm->in_finger += current; addr += current; len -= current; diff -durpN glibc-2.2.4/sunrpc/xdr_ref.c glibc-2.2.5/sunrpc/xdr_ref.c --- glibc-2.2.4/sunrpc/xdr_ref.c Sat Jun 19 09:40:29 1999 +++ glibc-2.2.5/sunrpc/xdr_ref.c Thu Aug 16 21:48:31 2001 @@ -47,6 +47,7 @@ static char sccsid[] = "@(#)xdr_referenc #include #ifdef USE_IN_LIBIO +# include # include # define fputs(s, f) _IO_fputs (s, f) #endif @@ -82,7 +83,13 @@ xdr_reference (xdrs, pp, size, proc) *pp = loc = (caddr_t) mem_alloc (size); if (loc == NULL) { - (void) fputs (_("xdr_reference: out of memory\n"), stderr); +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + (void) __fwprintf (stderr, L"%s", + _("xdr_reference: out of memory\n")); + else +#endif + (void) fputs (_("xdr_reference: out of memory\n"), stderr); return FALSE; } __bzero (loc, (int) size); diff -durpN glibc-2.2.4/sysdeps/alpha/dl-machine.h glibc-2.2.5/sysdeps/alpha/dl-machine.h --- glibc-2.2.4/sysdeps/alpha/dl-machine.h Mon Jul 23 10:55:19 2001 +++ glibc-2.2.5/sysdeps/alpha/dl-machine.h Sat Sep 22 14:32:57 2001 @@ -70,16 +70,20 @@ elf_machine_load_address (void) Elf64_Addr dot; long int zero_disp; - asm("br %0, 1f\n\t" - ".weak __load_address_undefined\n\t" - "br $0, __load_address_undefined\n" - "1:" + asm("br %0, 1f\n" + "0:\n\t" + "br $0, 2f\n" + "1:\n\t" + ".data\n" + "2:\n\t" + ".quad 0b\n\t" + ".previous" : "=r"(dot)); - zero_disp = *(int *)dot; + zero_disp = *(int *) dot; zero_disp = (zero_disp << 43) >> 41; - return dot + 4 + zero_disp; + return dot - *(Elf64_Addr *) (dot + 4 + zero_disp); } /* Set up the loaded object described by L so its unrelocated PLT @@ -351,13 +355,13 @@ $fixup_stack: #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT) - -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc, which we don't use. */ -#define elf_machine_lookup_noexec_p(type) (0) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc, which we don't + use. */ +#define elf_machine_type_class(type) \ + (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT @@ -468,7 +472,7 @@ elf_machine_rela (struct link_map *map, { unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info); -#ifndef RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) @@ -480,12 +484,13 @@ elf_machine_rela (struct link_map *map, /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ - if (r_type == R_ALPHA_RELATIVE) +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0)) { -#ifndef RTLD_BOOTSTRAP +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* Already done in dynamic linker. */ if (map != &_dl_rtld_map) -#endif +# endif { /* XXX Make some timings. Maybe it's preverable to test for unaligned access and only do it the complex way if necessary. */ @@ -500,11 +505,12 @@ elf_machine_rela (struct link_map *map, memcpy (reloc_addr_1, &reloc_addr_val, 8); } } -#ifndef RTLD_BOOTSTRAP - else if (r_type == R_ALPHA_NONE) +# ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_ALPHA_NONE, 0)) return; -#endif +# endif else +#endif { Elf64_Addr loadbase, sym_value; @@ -520,24 +526,7 @@ elf_machine_rela (struct link_map *map, else if (r_type == R_ALPHA_REFQUAD) { void *reloc_addr_1 = reloc_addr; - Elf64_Addr reloc_addr_val; - /* Load value without causing unaligned trap. */ - memcpy (&reloc_addr_val, reloc_addr_1, 8); - sym_value += reloc_addr_val; - if (map == &_dl_rtld_map) - { - /* Undo the relocation done here during bootstrapping. - Now we will relocate anew, possibly using a binding - found in the user program or a loaded library rather - than the dynamic linker's built-in definitions used - while loading those libraries. */ - const Elf64_Sym *const dlsymtab - = (void *) D_PTR (map, l_info[DT_SYMTAB]); - sym_value -= map->l_addr; - sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value; - sym_value -= reloc->r_addend; - } /* Store value without causing unaligned trap. */ memcpy (reloc_addr_1, &sym_value, 8); } @@ -545,6 +534,23 @@ elf_machine_rela (struct link_map *map, else _dl_reloc_bad_type (map, r_type, 0); } +} + +static inline void +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + Elf64_Addr *const reloc_addr) +{ + /* XXX Make some timings. Maybe it's preverable to test for + unaligned access and only do it the complex way if necessary. */ + void *reloc_addr_1 = reloc_addr; + Elf64_Addr reloc_addr_val; + + /* Load value without causing unaligned trap. */ + memcpy (&reloc_addr_val, reloc_addr_1, 8); + reloc_addr_val += l_addr; + + /* Store value without causing unaligned trap. */ + memcpy (reloc_addr_1, &reloc_addr_val, 8); } static inline void diff -durpN glibc-2.2.4/sysdeps/alpha/elf/Dist glibc-2.2.5/sysdeps/alpha/elf/Dist --- glibc-2.2.4/sysdeps/alpha/elf/Dist Tue Nov 26 22:09:11 1996 +++ glibc-2.2.5/sysdeps/alpha/elf/Dist Wed Dec 31 16:00:00 1969 @@ -1,2 +0,0 @@ -crtbegin.S -crtend.S diff -durpN glibc-2.2.4/sysdeps/alpha/elf/Makefile glibc-2.2.5/sysdeps/alpha/elf/Makefile --- glibc-2.2.4/sysdeps/alpha/elf/Makefile Wed Nov 27 20:15:27 1996 +++ glibc-2.2.5/sysdeps/alpha/elf/Makefile Wed Dec 31 16:00:00 1969 @@ -1,4 +0,0 @@ -ifeq ($(subdir), csu) -extra-objs += crtbegin.o crtend.o -install-lib += crtbegin.o crtend.o -endif diff -durpN glibc-2.2.4/sysdeps/alpha/elf/crtbegin.S glibc-2.2.5/sysdeps/alpha/elf/crtbegin.S --- glibc-2.2.4/sysdeps/alpha/elf/crtbegin.S Mon Jul 23 10:55:21 2001 +++ glibc-2.2.5/sysdeps/alpha/elf/crtbegin.S Wed Dec 31 16:00:00 1969 @@ -1,92 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson (rth@tamu.edu) - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -/* - * Heads of the constructor/destructor lists. - */ - -/* The __*TOR_LIST__ symbols are not global because when this file is used - in a shared library, we do not want the symbol to fall over to the - application's lists. */ - -.section .ctors,"aw" - - .align 3 -__CTOR_LIST__: - .quad -1 - -.section .dtors,"aw" - - .align 3 -__DTOR_LIST__: - .quad -1 - - -/* - * Fragment of the ELF _fini routine that invokes our dtor cleanup. - */ - -.section .fini,"ax" - - /* Since the bits of the _fini function are spread across many - object files, each potentially with its own GP, we must - assume we need to load ours. Further, our .fini section - can easily be more than 4MB away from our .text bits so we - can't use bsr. */ - - br $gp,1f -1: ldgp $gp,0($gp) - jsr $26,__do_global_dtors_aux - - /* Must match the alignment we got from crti.o else we get - zero-filled holes in our _fini function and then SIGILL. */ - .align 3 - -/* - * Invoke our destructors in order. - */ - -.text - - .align 3 - .ent __do_global_dtors_aux - -__do_global_dtors_aux: - .frame $sp,16,$26,0 - /* GP already loaded in .fini */ - lda $sp,-16($sp) - stq $9,8($sp) - stq $26,0($sp) - .mask (1<<26)|(1<<9), -16 - .prologue 0 - - lda $9,__DTOR_LIST__ - br 1f -0: jsr $26,($27) -1: ldq $27,8($9) - addq $9,8,$9 - bne $27,0b - - ldq $26,0($sp) - ldq $9,8($sp) - lda $sp,16($sp) - ret - - .end __do_global_dtors_aux diff -durpN glibc-2.2.4/sysdeps/alpha/elf/crtend.S glibc-2.2.5/sysdeps/alpha/elf/crtend.S --- glibc-2.2.4/sysdeps/alpha/elf/crtend.S Mon Jul 23 10:55:21 2001 +++ glibc-2.2.5/sysdeps/alpha/elf/crtend.S Wed Dec 31 16:00:00 1969 @@ -1,93 +0,0 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson (rth@tamu.edu) - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -/* - * Tails of the constructor/destructor lists. - */ - -/* The __*TOR_END__ symbols are not global because when this file is used - in a shared library, we do not want the symbol to fall over to the - application's lists. */ - -.section .ctors,"aw" - - .align 3 -__CTOR_END__: - .quad 0 - -.section .dtors,"aw" - - .align 3 -__DTOR_END__: - .quad 0 - - -/* - * Fragment of the ELF _init routine that invokes our ctor startup - */ - -.section .init,"ax" - - /* Since the bits of the _init function are spread across many - object files, each potentially with its own GP, we must - assume we need to load ours. Further, our .init section - can easily be more than 4MB away from our .text bits so we - can't use bsr. */ - - br $gp,1f -1: ldgp $gp,0($gp) - jsr $26,__do_global_ctors_aux - - /* Must match the alignment we got from crti.o else we get - zero-filled holes in our _init function and thense SIGILL. */ - .align 3 - -/* - * Invoke our destructors in order. - */ - -.text - - .align 3 - .ent __do_global_ctors_aux - -__do_global_ctors_aux: - .frame $sp,16,$26,0 - /* GP already loaded in .init. */ - lda $sp,-16($sp) - stq $9,8($sp) - stq $26,0($sp) - .mask (1<<26)|(1<<9), -16 - .prologue 0 - - lda $9,__CTOR_END__ - br 1f -0: jsr $26,($27) -1: ldq $27,-8($9) - subq $9,8,$9 - not $27,$0 - bne $0,0b - - ldq $26,0($sp) - ldq $9,8($sp) - lda $sp,16($sp) - ret - - .end __do_global_ctors_aux diff -durpN glibc-2.2.4/sysdeps/alpha/elf/initfini.c glibc-2.2.5/sysdeps/alpha/elf/initfini.c --- glibc-2.2.4/sysdeps/alpha/elf/initfini.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/alpha/elf/initfini.c Sat Sep 1 12:24:46 2001 @@ -0,0 +1,98 @@ +/* Special .init and .fini section support for Alpha. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * 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. + + * crtn.s puts the corresponding function epilogues in the .init and .fini + sections. + + This differs from what would be generated by the generic code in that + we save and restore the GP within the function. In order for linker + relaxation to work, the value in the GP register on exit from a function + must be valid for the function entry point. Normally, a function is + contained within one object file and this is not an issue, provided + that the function reloads the gp after making any function calls. + However, _init and _fini are constructed from pieces of many object + files, all of which may have different GP values. So we must reload + the GP value from crti.o in crtn.o. */ + +__asm__ (" + +#include \"defs.h\" + +/*@HEADER_ENDS*/ + +/*@_init_PROLOG_BEGINS*/ + .section .init, \"ax\", @progbits + .globl _init + .ent _init +_init: + ldgp $29, 0($27) + subq $30, 16, $30 + lda $27, __gmon_start__ + stq $26, 0($30) + stq $29, 8($30) + .prologue 1 + beq $27, 1f + jsr $26, ($27), __gmon_start__ + ldq $29, 8($30) +1: + .align 3 + .end _init + .size _init, 0 +/*@_init_PROLOG_ENDS*/ + +/*@_init_EPILOG_BEGINS*/ + .section .init, \"ax\", @progbits + ldq $26, 0($30) + ldq $29, 8($30) + addq $30, 16, $30 + ret +/*@_init_EPILOG_ENDS*/ + +/*@_fini_PROLOG_BEGINS*/ + .section .fini, \"ax\", @progbits + .globl _fini + .ent _fini +_fini: + ldgp $29, 0($27) + subq $30, 16, $30 + stq $26, 0($30) + stq $29, 8($30) + .prologue 1 + .align 3 + .end _fini + .size _fini, 0 +/*@_fini_PROLOG_ENDS*/ + +/*@_fini_EPILOG_BEGINS*/ + .section .fini, \"ax\", @progbits + ldq $26, 0($30) + ldq $29, 8($30) + addq $30, 16, $30 + ret +/*@_fini_EPILOG_ENDS*/ + +/*@TRAILER_BEGINS*/ +"); diff -durpN glibc-2.2.4/sysdeps/alpha/fpu/e_sqrt.c glibc-2.2.5/sysdeps/alpha/fpu/e_sqrt.c --- glibc-2.2.4/sysdeps/alpha/fpu/e_sqrt.c Mon Jul 23 10:55:21 2001 +++ glibc-2.2.5/sysdeps/alpha/fpu/e_sqrt.c Sun Jan 20 19:23:10 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include #if !defined(_IEEE_FP_INEXACT) @@ -53,110 +54,110 @@ const static struct sqrt_data_struct { }; asm ("\ - /* Define offsets into the structure defined in C above. */ - $DN = 0*8 - $UP = 1*8 - $HALF = 2*8 - $ALMOST_THREE_HALF = 3*8 - $NAN = 7*8 - $T2 = 8*8 - - /* Stack variables. */ - $K = 0 - $Y = 8 - - .text - .align 5 - .globl __ieee754_sqrt - .ent __ieee754_sqrt -__ieee754_sqrt: - ldgp $29, 0($27) - subq $sp, 16, $sp + /* Define offsets into the structure defined in C above. */ \n\ + $DN = 0*8 \n\ + $UP = 1*8 \n\ + $HALF = 2*8 \n\ + $ALMOST_THREE_HALF = 3*8 \n\ + $NAN = 7*8 \n\ + $T2 = 8*8 \n\ + \n\ + /* Stack variables. */ \n\ + $K = 0 \n\ + $Y = 8 \n\ + \n\ + .text \n\ + .align 5 \n\ + .globl __ieee754_sqrt \n\ + .ent __ieee754_sqrt \n\ +__ieee754_sqrt: \n\ + ldgp $29, 0($27) \n\ + subq $sp, 16, $sp \n\ .frame $sp, 16, $26, 0\n" #ifdef PROF -" lda $28, _mcount +" lda $28, _mcount \n\ jsr $28, ($28), _mcount\n" #endif -" .prologue 1 - - .align 4 - stt $f16, $K($sp) # e0 : - mult $f31, $f31, $f31 # .. fm : - lda $4, sqrt_data # e0 : - fblt $f16, $fixup # .. fa : - - ldah $2, 0x5fe8 # e0 : - ldq $3, $K($sp) # .. e1 : - ldt $f12, $HALF($4) # e0 : - ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : - - sll $3, 52, $5 # e0 : - lda $6, 0x7fd # .. e1 : - fnop # .. fa : - fnop # .. fm : - - subq $5, 1, $5 # e1 : - srl $3, 33, $1 # .. e0 : - cmpule $5, $6, $5 # e0 : - beq $5, $fixup # .. e1 : - - mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 - subl $2, $1, $2 # .. e0 : - addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 - srl $2, 12, $1 # e0 : - - and $1, 0xfc, $1 # e0 : - addq $1, $4, $1 # e1 : - ldl $1, $T2($1) # e0 : - addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 - - subl $2, $1, $2 # e0 : - ldt $f14, $DN($4) # .. e1 : - sll $2, 32, $2 # e0 : - stq $2, $Y($sp) # e0 : - - ldt $f13, $Y($sp) # e0 : - mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y - mult $f10, $f13, $f10 # fm 4: $f10 = ((x * 0.5) * y) * y - subt $f15, $f10, $f1 # fa 4: $f1 = (1.5 - 0.5*x*y*y) - - mult $f13, $f1, $f13 # fm 4: yp = y*(1.5 - 0.5*x*y*y) - mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp - mult $f1, $f13, $f11 # fm 4: $f11 = (x * 0.5 * yp) * yp - subt $f18, $f11, $f1 # fa 4: $f1= (1.5-2^-30) - 0.5*x*yp*yp - - mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 - subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) - ldt $f15, $UP($4) # .. e0 : - mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp - - mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp - mult $f10, $f12, $f12 # fm : $f12 = z*0.5 - subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp - mult $f12, $f1, $f12 # fm 4: $f12 = z*0.5*(1 - z*ypp) - - addt $f10, $f12, $f0 # fa 4: zp=res= z + z*0.5*(1 - z*ypp) - mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN - mult/c $f0, $f15, $f11 # fm : zpl = zp * UP - mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi - - mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl - subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x - subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x - fcmovge $f13, $f12, $f0 # fa 3: res = (y1 >= 0) ? zmi : res - - fcmovlt $f14, $f11, $f0 # fa 4: res = (y2 < 0) ? zpl : res - addq $sp, 16, $sp # .. e0 : - ret # .. e1 : - - .align 4 -$fixup: - addq $sp, 16, $sp - br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng - +" .prologue 1 \n\ + \n\ + .align 4 \n\ + stt $f16, $K($sp) # e0 : \n\ + mult $f31, $f31, $f31 # .. fm : \n\ + lda $4, sqrt_data # e0 : \n\ + fblt $f16, $fixup # .. fa : \n\ + \n\ + ldah $2, 0x5fe8 # e0 : \n\ + ldq $3, $K($sp) # .. e1 : \n\ + ldt $f12, $HALF($4) # e0 : \n\ + ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : \n\ + \n\ + sll $3, 52, $5 # e0 : \n\ + lda $6, 0x7fd # .. e1 : \n\ + fnop # .. fa : \n\ + fnop # .. fm : \n\ + \n\ + subq $5, 1, $5 # e1 : \n\ + srl $3, 33, $1 # .. e0 : \n\ + cmpule $5, $6, $5 # e0 : \n\ + beq $5, $fixup # .. e1 : \n\ + \n\ + mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 \n\ + subl $2, $1, $2 # .. e0 : \n\ + addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 \n\ + srl $2, 12, $1 # e0 : \n\ + \n\ + and $1, 0xfc, $1 # e0 : \n\ + addq $1, $4, $1 # e1 : \n\ + ldl $1, $T2($1) # e0 : \n\ + addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 \n\ + \n\ + subl $2, $1, $2 # e0 : \n\ + ldt $f14, $DN($4) # .. e1 : \n\ + sll $2, 32, $2 # e0 : \n\ + stq $2, $Y($sp) # e0 : \n\ + \n\ + ldt $f13, $Y($sp) # e0 : \n\ + mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y \n\ + mult $f10, $f13, $f10 # fm 4: $f10 = ((x*0.5)*y)*y \n\ + subt $f15, $f10, $f1 # fa 4: $f1 = (1.5-0.5*x*y*y) \n\ + \n\ + mult $f13, $f1, $f13 # fm 4: yp = y*(1.5-0.5*x*y^2)\n\ + mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp \n\ + mult $f1, $f13, $f11 # fm 4: $f11 = (x*0.5*yp)*yp \n\ + subt $f18, $f11, $f1 # fa 4: $f1=(1.5-2^-30)-x/2*yp^2\n\ + \n\ + mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 \n\ + subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) \n\ + ldt $f15, $UP($4) # .. e0 : \n\ + mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp \n\ + \n\ + mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp \n\ + mult $f10, $f12, $f12 # fm : $f12 = z*0.5 \n\ + subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp \n\ + mult $f12, $f1, $f12 # fm 4: $f12 = z/2*(1 - z*ypp)\n\ + \n\ + addt $f10, $f12, $f0 # fa 4: zp=res= z+z/2*(1-z*ypp)\n\ + mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN \n\ + mult/c $f0, $f15, $f11 # fm : zpl = zp * UP \n\ + mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi \n\ + \n\ + mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl \n\ + subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x \n\ + subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x \n\ + fcmovge $f13, $f12, $f0 # fa 3: res = (y1>=0)?zmi:res \n\ + \n\ + fcmovlt $f14, $f11, $f0 # fa 4: res = (y2<0)?zpl:res \n\ + addq $sp, 16, $sp # .. e0 : \n\ + ret # .. e1 : \n\ + \n\ + .align 4 \n\ +$fixup: \n\ + addq $sp, 16, $sp \n\ + br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng \n\ + \n\ .end __ieee754_sqrt"); -static double __full_ieee754_sqrt(double) __attribute__((unused)); +static double __full_ieee754_sqrt(double) __attribute_used__; #define __ieee754_sqrt __full_ieee754_sqrt #endif /* _IEEE_FP_INEXACT */ diff -durpN glibc-2.2.4/sysdeps/alpha/fpu/libm-test-ulps glibc-2.2.5/sysdeps/alpha/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/alpha/fpu/libm-test-ulps Mon Jul 23 10:55:22 2001 +++ glibc-2.2.5/sysdeps/alpha/fpu/libm-test-ulps Thu Aug 30 13:22:48 2001 @@ -448,6 +448,16 @@ ifloat: 1 Test "j0 (2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +float: 1 +ifloat: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +float: 1 +ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 diff -durpN glibc-2.2.4/sysdeps/alpha/gccframe.h glibc-2.2.5/sysdeps/alpha/gccframe.h --- glibc-2.2.4/sysdeps/alpha/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/alpha/gccframe.h Thu Nov 15 17:06:40 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. alpha version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define FIRST_PSEUDO_REGISTER 64 + +#include diff -durpN glibc-2.2.4/sysdeps/alpha/hp-timing.h glibc-2.2.5/sysdeps/alpha/hp-timing.h --- glibc-2.2.4/sysdeps/alpha/hp-timing.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/alpha/hp-timing.h Fri Aug 31 23:08:44 2001 @@ -0,0 +1,118 @@ +/* High precision, low overhead timing functions. Alpha version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Richard Henderson , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _HP_TIMING_H +#define _HP_TIMING_H 1 + +#include +#include +#include + +/* The macros defined here use the timestamp counter in IA-64. They + provide a very accurate way to measure the time with very little + overhead. The time values themself have no real meaning, only + differences are interesting. + + The list of macros we need includes the following: + + - HP_TIMING_AVAIL: test for availability. + + - HP_TIMING_INLINE: this macro is non-zero if the functionality is not + implemented using function calls but instead uses some inlined code + which might simply consist of a few assembler instructions. We have to + know this since we might want to use the macros here in places where we + cannot make function calls. + + - hp_timing_t: This is the type for variables used to store the time + values. + + - HP_TIMING_ZERO: clear `hp_timing_t' object. + + - HP_TIMING_NOW: place timestamp for current time in variable given as + parameter. + + - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the + HP_TIMING_DIFF macro. + + - HP_TIMING_DIFF: compute difference between two times and store it + in a third. Source and destination might overlap. + + - HP_TIMING_ACCUM: add time difference to another variable. This might + be a bit more complicated to implement for some platforms as the + operation should be thread-safe and 64bit arithmetic on 32bit platforms + is not. + + - HP_TIMING_ACCUM_NT: this is the variant for situations where we know + there are no threads involved. + + - HP_TIMING_PRINT: write decimal representation of the timing value into + the given string. This operation need not be inline even though + HP_TIMING_INLINE is specified. +*/ + +/* We always have the timestamp register, but it's got only a 4 second + range. Use it for ld.so profiling only. */ +#define HP_TIMING_AVAIL (0) +#define HP_SMALL_TIMING_AVAIL (1) + +/* We indeed have inlined functions. */ +#define HP_TIMING_INLINE (1) + +/* We use 32 bit values for the times. */ +typedef unsigned int hp_timing_t; + +/* Set timestamp value to zero. */ +#define HP_TIMING_ZERO(VAR) (VAR) = (0) + +/* The "rpcc" instruction returns a 32-bit counting half and a 32-bit + "virtual cycle counter displacement". Subtracting the two gives us + a virtual cycle count. */ +#define HP_TIMING_NOW(VAR) \ + do { \ + unsigned long int x_; \ + asm volatile ("rpcc %0" : "=r"(x_)); \ + (VAR) = (int) (x_) - (int) (x_ >> 32); \ + } while (0) + +/* ??? Two rpcc instructions can be scheduled simultaneously. */ +#define HP_TIMING_DIFF_INIT() do { } while (0) + +/* It's simple arithmetic for us. */ +#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start)) + +/* ??? Don't bother, since we're only used for ld.so. */ +#define HP_TIMING_ACCUM(Sum, Diff) not implemented + +/* No threads, no extra work. */ +#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff) + +/* Print the time value. */ +#define HP_TIMING_PRINT(Buf, Len, Val) \ + do { \ + char __buf[20]; \ + char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0); \ + int __len = (Len); \ + char *__dest = (Buf); \ + while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \ + *__dest++ = *__cp++; \ + memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles"))); \ + } while (0) + +#endif /* hp-timing.h */ diff -durpN glibc-2.2.4/sysdeps/arm/dl-machine.h glibc-2.2.5/sysdeps/arm/dl-machine.h --- glibc-2.2.4/sysdeps/arm/dl-machine.h Sat Aug 11 18:28:50 2001 +++ glibc-2.2.5/sysdeps/arm/dl-machine.h Sat Sep 8 14:31:40 2001 @@ -323,13 +323,13 @@ _dl_start_user: .previous\n\ "); -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_ARM_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JUMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT @@ -412,21 +412,27 @@ elf_machine_rel (struct link_map *map, c const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { - if (ELF32_R_TYPE (reloc->r_info) == R_ARM_RELATIVE) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_ARM_RELATIVE, 0)) { #ifndef RTLD_BOOTSTRAP if (map != &_dl_rtld_map) /* Already done in rtld itself. */ #endif *reloc_addr += map->l_addr; } - else if (ELF32_R_TYPE (reloc->r_info) != R_ARM_NONE) +#ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_ARM_NONE, 0)) + return; +#endif + else { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { case R_ARM_COPY: if (sym == NULL) @@ -495,7 +501,7 @@ elf_machine_rel (struct link_map *map, c topbits = newvalue & 0xfe000000; if (topbits != 0xfe000000 && topbits != 0x00000000) { - _dl_signal_error (0, map->l_name, + _dl_signal_error (0, map->l_name, NULL, "R_ARM_PC24 relocation out of range"); } } @@ -505,22 +511,30 @@ elf_machine_rel (struct link_map *map, c } break; default: - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } } static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr += l_addr; +} + +static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rel *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); /* Check for unexpected PLT reloc type. */ - if (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT) + if (__builtin_expect (r_type == R_ARM_JUMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff -durpN glibc-2.2.4/sysdeps/arm/gccframe.h glibc-2.2.5/sysdeps/arm/gccframe.h --- glibc-2.2.4/sysdeps/arm/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/arm/gccframe.h Thu Nov 15 17:07:20 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. arm version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define FIRST_PSEUDO_REGISTER 27 + +#include diff -durpN glibc-2.2.4/sysdeps/cris/dl-machine.h glibc-2.2.5/sysdeps/cris/dl-machine.h --- glibc-2.2.4/sysdeps/cris/dl-machine.h Mon Jul 23 10:55:24 2001 +++ glibc-2.2.5/sysdeps/cris/dl-machine.h Sun Aug 26 15:26:34 2001 @@ -228,13 +228,13 @@ _dl_start_user: .size _dl_start_user, . - _dl_start_user .previous"); -/* Nonzero iff TYPE describes a relocation that should - skip the executable when looking up the symbol value. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_CRIS_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_CRIS_JUMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_CRIS_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_CRIS_JUMP_SLOT @@ -284,40 +284,28 @@ elf_machine_rela (struct link_map *map, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { -#ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static libc.a; make the - reference weak so static programs can still link. This declaration - cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) - because rtld.c contains the common defn for _dl_rtld_map, which is - incompatible with a weak decl in the same file. */ - weak_extern (_dl_rtld_map); -#endif + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); - if (ELF32_R_TYPE (reloc->r_info) == R_CRIS_RELATIVE) - { -#ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ -#endif - *reloc_addr = map->l_addr + reloc->r_addend; - } + if (__builtin_expect (r_type == R_CRIS_RELATIVE, 0)) + *reloc_addr = map->l_addr + reloc->r_addend; else { #ifndef RTLD_BOOTSTRAP const Elf32_Sym *const refsym = sym; #endif Elf32_Addr value; - if (sym->st_shndx != SHN_UNDEF && - ELF32_ST_BIND (sym->st_info) == STB_LOCAL) + if (sym->st_shndx != SHN_UNDEF + && ELF32_ST_BIND (sym->st_info) == STB_LOCAL) value = map->l_addr; else { - value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; } value += reloc->r_addend; /* Assume copy relocs have zero addend. */ - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { #ifndef RTLD_BOOTSTRAP case R_CRIS_COPY: @@ -370,7 +358,7 @@ elf_machine_rela (struct link_map *map, break; #if !defined RTLD_BOOTSTRAP || defined _NDEBUG default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; #endif } @@ -378,15 +366,22 @@ elf_machine_rela (struct link_map *map, } static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} + +static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); - if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_CRIS_JUMP_SLOT) - == R_CRIS_JUMP_SLOT) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + if (__builtin_expect (r_type == R_CRIS_JUMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff -durpN glibc-2.2.4/sysdeps/generic/abort.c glibc-2.2.5/sysdeps/generic/abort.c --- glibc-2.2.4/sysdeps/generic/abort.c Mon Jul 23 10:55:24 2001 +++ glibc-2.2.5/sysdeps/generic/abort.c Wed Nov 28 15:37:01 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991, 93, 95, 96, 97, 98, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ #ifdef USE_IN_LIBIO # include -# define fflush(s) _IO_fflush (s) +# define fflush(s) _IO_flush_all_lockp (0) #endif /* We must avoid to run in circles. Therefore we remember how far we diff -durpN glibc-2.2.4/sysdeps/generic/bits/byteswap.h glibc-2.2.5/sysdeps/generic/bits/byteswap.h --- glibc-2.2.4/sysdeps/generic/bits/byteswap.h Mon Jul 23 10:55:36 2001 +++ glibc-2.2.5/sysdeps/generic/bits/byteswap.h Tue Jan 8 02:20:27 2002 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. */ #ifdef __GNUC__ # define __bswap_16(x) \ @@ -77,3 +80,5 @@ __bswap_32 (unsigned int __bsx) } \ __r.__ll; })) #endif + +#endif /* _BITS_BYTESWAP_H */ diff -durpN glibc-2.2.4/sysdeps/generic/bits/dlfcn.h glibc-2.2.5/sysdeps/generic/bits/dlfcn.h --- glibc-2.2.4/sysdeps/generic/bits/dlfcn.h Mon Jul 23 10:55:36 2001 +++ glibc-2.2.5/sysdeps/generic/bits/dlfcn.h Fri Oct 26 17:03:32 2001 @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -52,8 +52,13 @@ foo = DL_CALL_FCT (fctp, (arg1, arg2)); */ # define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) + (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args) + +__BEGIN_DECLS /* This function calls the profiling functions. */ extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; + +__END_DECLS + #endif diff -durpN glibc-2.2.4/sysdeps/generic/bits/libc-lock.h glibc-2.2.5/sysdeps/generic/bits/libc-lock.h --- glibc-2.2.4/sysdeps/generic/bits/libc-lock.h Mon Jul 23 10:55:36 2001 +++ glibc-2.2.5/sysdeps/generic/bits/libc-lock.h Thu Aug 23 20:24:30 2001 @@ -1,5 +1,5 @@ /* libc-internal interface for mutex locks. Stub version. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,97,99,2000,01 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,6 +29,7 @@ begins with a `*'), because its storage size will not be known outside of libc. */ #define __libc_lock_define(CLASS,NAME) +#define __libc_lock_define_recursive(CLASS,NAME) #define __libc_rwlock_define(CLASS,NAME) /* Define an initialized lock variable NAME with storage class CLASS. */ @@ -93,14 +94,23 @@ } while (0) -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(FCT, ARG) +/* Start a critical region with a cleanup function */ +#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ +{ \ + typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \ + typeof (ARG) __save_ARG = ARG; \ + /* close brace is in __libc_cleanup_region_end below. */ -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) +/* End a critical region started with __libc_cleanup_region_start. */ +#define __libc_cleanup_region_end(DOIT) \ + if ((DOIT) && __save_FCT != 0) \ + (*__save_FCT)(__save_ARG); \ +} /* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) +#define __libc_cleanup_end(DOIT) \ + if ((DOIT) && __save_FCT != 0) \ + (*__save_FCT)(__save_ARG); \ /* We need portable names for some of the functions. */ diff -durpN glibc-2.2.4/sysdeps/generic/bits/poll.h glibc-2.2.5/sysdeps/generic/bits/poll.h --- glibc-2.2.4/sysdeps/generic/bits/poll.h Sat Aug 4 12:31:50 2001 +++ glibc-2.2.5/sysdeps/generic/bits/poll.h Wed Aug 22 21:34:46 2001 @@ -27,10 +27,13 @@ #define POLLPRI 02 /* There is urgent data to read. */ #define POLLOUT 04 /* Writing now will not block. */ -/* Some aliases. */ -#define POLLWRNORM POLLOUT -#define POLLRDNORM POLLIN -#define POLLRDBAND POLLPRI +#ifdef __USE_XOPEN +/* These values are defined in XPG4.2. */ +# define POLLRDNORM POLLIN /* Normal data may be read. */ +# define POLLRDBAND POLLPRI /* Priority data may be read. */ +# define POLLWRNORM POLLOUT /* Writing now will not block. */ +# define POLLWRBAND POLLOUT /* Priority data may be written. */ +#endif /* Event types always implicitly polled for. These bits need not be set in `events', but they will appear in `revents' to indicate the status of diff -durpN glibc-2.2.4/sysdeps/generic/bits/sigaction.h glibc-2.2.5/sysdeps/generic/bits/sigaction.h --- glibc-2.2.4/sysdeps/generic/bits/sigaction.h Mon Jul 23 10:55:36 2001 +++ glibc-2.2.5/sysdeps/generic/bits/sigaction.h Wed Aug 22 20:07:50 2001 @@ -30,12 +30,20 @@ struct sigaction { /* Signal handler. */ - union { - __sighandler_t sa_handler; - void (*sa_sigaction) (int, siginfo_t *, void *); - } __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction +#ifdef __USE_POSIX199309 + union + { + /* Used if SA_SIGINFO is not set. */ + __sighandler_t sa_handler; + /* Used if SA_SIGINFO is set. */ + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +# define sa_handler __sigaction_handler.sa_handler +# define sa_sigaction __sigaction_handler.sa_sigaction +#else + __sighandler_t sa_handler; +#endif /* Additional set of signals to be blocked. */ __sigset_t sa_mask; diff -durpN glibc-2.2.4/sysdeps/generic/bits/stdio-lock.h glibc-2.2.5/sysdeps/generic/bits/stdio-lock.h --- glibc-2.2.4/sysdeps/generic/bits/stdio-lock.h Fri Jul 27 23:13:22 2001 +++ glibc-2.2.5/sysdeps/generic/bits/stdio-lock.h Thu Aug 23 20:20:56 2001 @@ -1,4 +1,4 @@ -/* Thread package specific definitions of stream lock type. Stub version. +/* Thread package specific definitions of stream lock type. Generic version. Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,27 +22,27 @@ #include -__libc_lock_define (typedef, _IO_lock_t) +__libc_lock_define_recursive (typedef, _IO_lock_t) /* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer ... -#error libio needs recursive mutexes for _IO_MTSAFE_IO +#ifdef _LIBC_LOCK_RECURSIVE_INITIALIZER +# define _IO_lock_initializer _LIBC_LOCK_RECURSIVE_INITIALIZER +#elif _IO_MTSAFE_IO + #error libio needs recursive mutexes for _IO_MTSAFE_IO +#endif + +#define _IO_lock_init(_name) __libc_lock_init_recursive (_name) +#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name) +#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name) +#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name) #define _IO_cleanup_region_start(_fct, _fp) \ - __libc_cleanup_region_start (_fct, _fp) + __libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp) #define _IO_cleanup_region_start_noarg(_fct) \ - __libc_cleanup_region_start (_fct, NULL) + __libc_cleanup_region_start (1, _fct, NULL) #define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#define _IO_lock_init(_name) \ - __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) \ - __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) \ - __libc_lock_lock (_name) -#define _IO_lock_unlock(_name) \ - __libc_lock_unlock (_name) + __libc_cleanup_region_end (_doit) #endif /* bits/stdio-lock.h */ diff -durpN glibc-2.2.4/sysdeps/generic/dl-cache.c glibc-2.2.5/sysdeps/generic/dl-cache.c --- glibc-2.2.4/sysdeps/generic/dl-cache.c Mon Jul 23 10:55:25 2001 +++ glibc-2.2.5/sysdeps/generic/dl-cache.c Wed Nov 7 17:47:26 2001 @@ -44,98 +44,98 @@ static size_t cachesize; binaries. */ int _dl_correct_cache_id = _DL_CACHE_DEFAULT_ID; -#define SEARCH_CACHE(cache) \ -/* We use binary search since the table is sorted in the cache file. \ - The first matching entry in the table is returned. \ - It is important to use the same algorithm as used while generating \ - the cache file. */ \ -do \ - { \ - left = 0; \ - right = cache->nlibs - 1; \ - middle = (left + right) / 2; \ - cmpres = 1; \ - \ - while (left <= right) \ - { \ - /* Make sure string table indices are not bogus before using \ - them. */ \ - if (! _dl_cache_verify_ptr (cache->libs[middle].key)) \ - { \ - cmpres = 1; \ - break; \ - } \ - \ - /* Actually compare the entry with the key. */ \ - cmpres = _dl_cache_libcmp (name, \ - cache_data + cache->libs[middle].key); \ - if (cmpres == 0) \ - /* Found it. */ \ - break; \ - \ - if (cmpres < 0) \ - left = middle + 1; \ - else \ - right = middle - 1; \ - \ - middle = (left + right) / 2; \ - } \ - \ - if (cmpres == 0) \ - { \ - /* LEFT now marks the last entry for which we know the name is \ - correct. */ \ - left = middle; \ - \ - /* There might be entries with this name before the one we \ - found. So we have to find the beginning. */ \ - while (middle > 0 \ - /* Make sure string table indices are not bogus before \ - using them. */ \ - && _dl_cache_verify_ptr (cache->libs[middle - 1].key) \ - /* Actually compare the entry. */ \ - && (_dl_cache_libcmp (name, \ - cache_data \ - + cache->libs[middle - 1].key) \ - == 0)) \ - --middle; \ - \ - do \ - { \ - int flags; \ - \ - /* Only perform the name test if necessary. */ \ - if (middle > left \ - /* We haven't seen this string so far. Test whether the \ - index is ok and whether the name matches. Otherwise \ - we are done. */ \ - && (! _dl_cache_verify_ptr (cache->libs[middle].key) \ - || (_dl_cache_libcmp (name, \ - cache_data \ - + cache->libs[middle].key) \ - != 0))) \ - break; \ - \ - flags = cache->libs[middle].flags; \ - if (_dl_cache_check_flags (flags) \ - && _dl_cache_verify_ptr (cache->libs[middle].value)) \ - { \ - if (best == NULL || flags == _dl_correct_cache_id) \ - { \ - HWCAP_CHECK; \ - best = cache_data + cache->libs[middle].value; \ - \ - if (flags == _dl_correct_cache_id) \ - /* We've found an exact match for the shared \ - object and no general `ELF' release. Stop \ - searching. */ \ - break; \ - } \ - } \ - } \ - while (++middle <= right); \ - } \ - } \ +#define SEARCH_CACHE(cache) \ +/* We use binary search since the table is sorted in the cache file. \ + The first matching entry in the table is returned. \ + It is important to use the same algorithm as used while generating \ + the cache file. */ \ +do \ + { \ + left = 0; \ + right = cache->nlibs - 1; \ + \ + while (left <= right) \ + { \ + __typeof__ (cache->libs[0].key) key; \ + \ + middle = (left + right) / 2; \ + \ + key = cache->libs[middle].key; \ + \ + /* Make sure string table indices are not bogus before using \ + them. */ \ + if (! _dl_cache_verify_ptr (key)) \ + { \ + cmpres = 1; \ + break; \ + } \ + \ + /* Actually compare the entry with the key. */ \ + cmpres = _dl_cache_libcmp (name, cache_data + key); \ + if (__builtin_expect (cmpres == 0, 0)) \ + { \ + /* Found it. LEFT now marks the last entry for which we \ + know the name is correct. */ \ + left = middle; \ + \ + /* There might be entries with this name before the one we \ + found. So we have to find the beginning. */ \ + while (middle > 0) \ + { \ + __typeof__ (cache->libs[0].key) key; \ + \ + key = cache->libs[middle - 1].key; \ + /* Make sure string table indices are not bogus before \ + using them. */ \ + if (! _dl_cache_verify_ptr (key) \ + /* Actually compare the entry. */ \ + || _dl_cache_libcmp (name, cache_data + key) != 0) \ + break; \ + --middle; \ + } \ + \ + do \ + { \ + int flags; \ + __typeof__ (cache->libs[0]) *lib = &cache->libs[middle]; \ + \ + /* Only perform the name test if necessary. */ \ + if (middle > left \ + /* We haven't seen this string so far. Test whether the \ + index is ok and whether the name matches. Otherwise \ + we are done. */ \ + && (! _dl_cache_verify_ptr (lib->key) \ + || (_dl_cache_libcmp (name, cache_data + lib->key) \ + != 0))) \ + break; \ + \ + flags = lib->flags; \ + if (_dl_cache_check_flags (flags) \ + && _dl_cache_verify_ptr (lib->value)) \ + { \ + if (best == NULL || flags == _dl_correct_cache_id) \ + { \ + HWCAP_CHECK; \ + best = cache_data + lib->value; \ + \ + if (flags == _dl_correct_cache_id) \ + /* We've found an exact match for the shared \ + object and no general `ELF' release. Stop \ + searching. */ \ + break; \ + } \ + } \ + } \ + while (++middle <= right); \ + break; \ + } \ + \ + if (cmpres < 0) \ + left = middle + 1; \ + else \ + right = middle - 1; \ + } \ + } \ while (0) @@ -168,7 +168,7 @@ _dl_load_cache_lookup (const char *name) - the old format with the new format in it - only the new format The following checks if the cache contains any of these formats. */ - if (file != NULL && cachesize > sizeof *cache + if (file != MAP_FAILED && cachesize > sizeof *cache && memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1) == 0) { size_t offset; @@ -185,7 +185,7 @@ _dl_load_cache_lookup (const char *name) sizeof CACHEMAGIC_VERSION_NEW - 1) != 0) cache_new = (void *) -1; } - else if (file != NULL && cachesize > sizeof *cache_new + else if (file != MAP_FAILED && cachesize > sizeof *cache_new && memcmp (file, CACHEMAGIC_VERSION_NEW, sizeof CACHEMAGIC_VERSION_NEW - 1) == 0) { @@ -194,7 +194,7 @@ _dl_load_cache_lookup (const char *name) } else { - if (file != NULL) + if (file != MAP_FAILED) __munmap (file, cachesize); cache = (void *) -1; } @@ -227,16 +227,15 @@ _dl_load_cache_lookup (const char *name) platform = 1ULL << platform; /* Only accept hwcap if it's for the right platform. */ -#define HWCAP_CHECK \ - if (_dl_osversion && cache_new->libs[middle].osversion > _dl_osversion) \ - continue; \ - if (_DL_PLATFORMS_COUNT && platform != -1 \ - && (cache_new->libs[middle].hwcap & _DL_HWCAP_PLATFORM) != 0 \ - && (cache_new->libs[middle].hwcap & _DL_HWCAP_PLATFORM) != platform) \ - continue; \ - if (hwcap \ - && ((cache_new->libs[middle].hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) \ - > *hwcap)) \ +#define HWCAP_CHECK \ + if (_dl_osversion && cache_new->libs[middle].osversion > _dl_osversion) \ + continue; \ + if (_DL_PLATFORMS_COUNT && platform != -1 \ + && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \ + && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \ + continue; \ + if (hwcap \ + && ((lib->hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) > *hwcap)) \ continue SEARCH_CACHE (cache_new); } diff -durpN glibc-2.2.4/sysdeps/generic/dl-environ.c glibc-2.2.5/sysdeps/generic/dl-environ.c --- glibc-2.2.4/sysdeps/generic/dl-environ.c Sat Aug 11 18:28:50 2001 +++ glibc-2.2.5/sysdeps/generic/dl-environ.c Wed Aug 22 17:51:01 2001 @@ -18,11 +18,10 @@ 02111-1307 USA. */ #include +#include +#include #include -extern char **_environ; -extern void unsetenv (const char *name); - /* Walk through the environment of the process and return all entries starting with `LD_'. */ char * @@ -51,13 +50,13 @@ _dl_next_ld_env_entry (char ***position) return result; } -void +int unsetenv (const char *name) { const size_t len = strlen (name); char **ep; - ep = _environ; + ep = __environ; while (*ep != NULL) if (!strncmp (*ep, name, len) && (*ep)[len] == '=') { @@ -71,4 +70,6 @@ unsetenv (const char *name) } else ++ep; + + return 0; } diff -durpN glibc-2.2.4/sysdeps/generic/dl-machine.h glibc-2.2.5/sysdeps/generic/dl-machine.h --- glibc-2.2.4/sysdeps/generic/dl-machine.h Mon Jul 23 10:55:25 2001 +++ glibc-2.2.5/sysdeps/generic/dl-machine.h Sat Sep 8 10:16:43 2001 @@ -95,7 +95,7 @@ elf_machine_rela (Elf32_Addr loadaddr, E int noplt)) { _dl_signal_error (0, "Elf32_Rela relocation requested -- unused on " - ELF_MACHINE_NAME); + NULL, ELF_MACHINE_NAME); } diff -durpN glibc-2.2.4/sysdeps/generic/dl-sysdep.c glibc-2.2.5/sysdeps/generic/dl-sysdep.c --- glibc-2.2.4/sysdeps/generic/dl-sysdep.c Mon Jul 23 10:55:25 2001 +++ glibc-2.2.5/sysdeps/generic/dl-sysdep.c Mon Nov 5 14:39:14 2001 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -62,7 +63,7 @@ void *__libc_stack_end; static ElfW(auxv_t) *_dl_auxv; unsigned long int _dl_hwcap_mask = HWCAP_IMPORTANT; #if HP_TIMING_AVAIL -hp_timing_t _dl_cpuclock_offset = 0; +hp_timing_t _dl_cpuclock_offset; #endif #ifndef DL_FIND_ARG_COMPONENTS @@ -309,7 +310,8 @@ _dl_important_hwcaps (const char *platfo if (result == NULL) { no_memory: - _dl_signal_error (ENOMEM, NULL, "cannot create capability list"); + _dl_signal_error (ENOMEM, NULL, NULL, + N_("cannot create capability list")); } result[0].str = (char *) result; /* Does not really matter. */ diff -durpN glibc-2.2.4/sysdeps/generic/dwarf2.h glibc-2.2.5/sysdeps/generic/dwarf2.h --- glibc-2.2.4/sysdeps/generic/dwarf2.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/dwarf2.h Thu Nov 15 17:15:55 2001 @@ -0,0 +1,585 @@ +/* Declarations and definitions of codes relating to the DWARF2 symbolic + debugging information format. + Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000 + Free Software Foundation, Inc. + Contributed by Gary Funck (gary@intrepid.com). Derived from the + DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com). + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* This file is derived from the DWARF specification (a public document) + Revision 2.0.0 (July 27, 1993) developed by the UNIX International + Programming Languages Special Interest Group (UI/PLSIG) and distributed + by UNIX International. Copies of this specification are available from + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. */ + +/* This file is shared between GCC and GDB, and should not contain + prototypes. */ + +/* Tag names and codes. */ + +enum dwarf_tag + { + DW_TAG_padding = 0x00, + DW_TAG_array_type = 0x01, + DW_TAG_class_type = 0x02, + DW_TAG_entry_point = 0x03, + DW_TAG_enumeration_type = 0x04, + DW_TAG_formal_parameter = 0x05, + DW_TAG_imported_declaration = 0x08, + DW_TAG_label = 0x0a, + DW_TAG_lexical_block = 0x0b, + DW_TAG_member = 0x0d, + DW_TAG_pointer_type = 0x0f, + DW_TAG_reference_type = 0x10, + DW_TAG_compile_unit = 0x11, + DW_TAG_string_type = 0x12, + DW_TAG_structure_type = 0x13, + DW_TAG_subroutine_type = 0x15, + DW_TAG_typedef = 0x16, + DW_TAG_union_type = 0x17, + DW_TAG_unspecified_parameters = 0x18, + DW_TAG_variant = 0x19, + DW_TAG_common_block = 0x1a, + DW_TAG_common_inclusion = 0x1b, + DW_TAG_inheritance = 0x1c, + DW_TAG_inlined_subroutine = 0x1d, + DW_TAG_module = 0x1e, + DW_TAG_ptr_to_member_type = 0x1f, + DW_TAG_set_type = 0x20, + DW_TAG_subrange_type = 0x21, + DW_TAG_with_stmt = 0x22, + DW_TAG_access_declaration = 0x23, + DW_TAG_base_type = 0x24, + DW_TAG_catch_block = 0x25, + DW_TAG_const_type = 0x26, + DW_TAG_constant = 0x27, + DW_TAG_enumerator = 0x28, + DW_TAG_file_type = 0x29, + DW_TAG_friend = 0x2a, + DW_TAG_namelist = 0x2b, + DW_TAG_namelist_item = 0x2c, + DW_TAG_packed_type = 0x2d, + DW_TAG_subprogram = 0x2e, + DW_TAG_template_type_param = 0x2f, + DW_TAG_template_value_param = 0x30, + DW_TAG_thrown_type = 0x31, + DW_TAG_try_block = 0x32, + DW_TAG_variant_part = 0x33, + DW_TAG_variable = 0x34, + DW_TAG_volatile_type = 0x35, + /* SGI/MIPS Extensions */ + DW_TAG_MIPS_loop = 0x4081, + /* GNU extensions */ + DW_TAG_format_label = 0x4101, /* for FORTRAN 77 and Fortran 90 */ + DW_TAG_function_template = 0x4102, /* for C++ */ + DW_TAG_class_template = 0x4103, /* for C++ */ + DW_TAG_GNU_BINCL = 0x4104, + DW_TAG_GNU_EINCL = 0x4105 + }; + +#define DW_TAG_lo_user 0x4080 +#define DW_TAG_hi_user 0xffff + +/* flag that tells whether entry has a child or not */ +#define DW_children_no 0 +#define DW_children_yes 1 + +/* Form names and codes. */ +enum dwarf_form + { + DW_FORM_addr = 0x01, + DW_FORM_block2 = 0x03, + DW_FORM_block4 = 0x04, + DW_FORM_data2 = 0x05, + DW_FORM_data4 = 0x06, + DW_FORM_data8 = 0x07, + DW_FORM_string = 0x08, + DW_FORM_block = 0x09, + DW_FORM_block1 = 0x0a, + DW_FORM_data1 = 0x0b, + DW_FORM_flag = 0x0c, + DW_FORM_sdata = 0x0d, + DW_FORM_strp = 0x0e, + DW_FORM_udata = 0x0f, + DW_FORM_ref_addr = 0x10, + DW_FORM_ref1 = 0x11, + DW_FORM_ref2 = 0x12, + DW_FORM_ref4 = 0x13, + DW_FORM_ref8 = 0x14, + DW_FORM_ref_udata = 0x15, + DW_FORM_indirect = 0x16 + }; + +/* Attribute names and codes. */ + +enum dwarf_attribute + { + DW_AT_sibling = 0x01, + DW_AT_location = 0x02, + DW_AT_name = 0x03, + DW_AT_ordering = 0x09, + DW_AT_subscr_data = 0x0a, + DW_AT_byte_size = 0x0b, + DW_AT_bit_offset = 0x0c, + DW_AT_bit_size = 0x0d, + DW_AT_element_list = 0x0f, + DW_AT_stmt_list = 0x10, + DW_AT_low_pc = 0x11, + DW_AT_high_pc = 0x12, + DW_AT_language = 0x13, + DW_AT_member = 0x14, + DW_AT_discr = 0x15, + DW_AT_discr_value = 0x16, + DW_AT_visibility = 0x17, + DW_AT_import = 0x18, + DW_AT_string_length = 0x19, + DW_AT_common_reference = 0x1a, + DW_AT_comp_dir = 0x1b, + DW_AT_const_value = 0x1c, + DW_AT_containing_type = 0x1d, + DW_AT_default_value = 0x1e, + DW_AT_inline = 0x20, + DW_AT_is_optional = 0x21, + DW_AT_lower_bound = 0x22, + DW_AT_producer = 0x25, + DW_AT_prototyped = 0x27, + DW_AT_return_addr = 0x2a, + DW_AT_start_scope = 0x2c, + DW_AT_stride_size = 0x2e, + DW_AT_upper_bound = 0x2f, + DW_AT_abstract_origin = 0x31, + DW_AT_accessibility = 0x32, + DW_AT_address_class = 0x33, + DW_AT_artificial = 0x34, + DW_AT_base_types = 0x35, + DW_AT_calling_convention = 0x36, + DW_AT_count = 0x37, + DW_AT_data_member_location = 0x38, + DW_AT_decl_column = 0x39, + DW_AT_decl_file = 0x3a, + DW_AT_decl_line = 0x3b, + DW_AT_declaration = 0x3c, + DW_AT_discr_list = 0x3d, + DW_AT_encoding = 0x3e, + DW_AT_external = 0x3f, + DW_AT_frame_base = 0x40, + DW_AT_friend = 0x41, + DW_AT_identifier_case = 0x42, + DW_AT_macro_info = 0x43, + DW_AT_namelist_items = 0x44, + DW_AT_priority = 0x45, + DW_AT_segment = 0x46, + DW_AT_specification = 0x47, + DW_AT_static_link = 0x48, + DW_AT_type = 0x49, + DW_AT_use_location = 0x4a, + DW_AT_variable_parameter = 0x4b, + DW_AT_virtuality = 0x4c, + DW_AT_vtable_elem_location = 0x4d, + /* SGI/MIPS Extensions */ + DW_AT_MIPS_fde = 0x2001, + DW_AT_MIPS_loop_begin = 0x2002, + DW_AT_MIPS_tail_loop_begin = 0x2003, + DW_AT_MIPS_epilog_begin = 0x2004, + DW_AT_MIPS_loop_unroll_factor = 0x2005, + DW_AT_MIPS_software_pipeline_depth = 0x2006, + DW_AT_MIPS_linkage_name = 0x2007, + DW_AT_MIPS_stride = 0x2008, + DW_AT_MIPS_abstract_name = 0x2009, + DW_AT_MIPS_clone_origin = 0x200a, + DW_AT_MIPS_has_inlines = 0x200b, + /* GNU extensions. */ + DW_AT_sf_names = 0x2101, + DW_AT_src_info = 0x2102, + DW_AT_mac_info = 0x2103, + DW_AT_src_coords = 0x2104, + DW_AT_body_begin = 0x2105, + DW_AT_body_end = 0x2106 + }; + +#define DW_AT_lo_user 0x2000 /* implementation-defined range start */ +#define DW_AT_hi_user 0x3ff0 /* implementation-defined range end */ + +/* Location atom names and codes. */ + +enum dwarf_location_atom + { + DW_OP_addr = 0x03, + DW_OP_deref = 0x06, + DW_OP_const1u = 0x08, + DW_OP_const1s = 0x09, + DW_OP_const2u = 0x0a, + DW_OP_const2s = 0x0b, + DW_OP_const4u = 0x0c, + DW_OP_const4s = 0x0d, + DW_OP_const8u = 0x0e, + DW_OP_const8s = 0x0f, + DW_OP_constu = 0x10, + DW_OP_consts = 0x11, + DW_OP_dup = 0x12, + DW_OP_drop = 0x13, + DW_OP_over = 0x14, + DW_OP_pick = 0x15, + DW_OP_swap = 0x16, + DW_OP_rot = 0x17, + DW_OP_xderef = 0x18, + DW_OP_abs = 0x19, + DW_OP_and = 0x1a, + DW_OP_div = 0x1b, + DW_OP_minus = 0x1c, + DW_OP_mod = 0x1d, + DW_OP_mul = 0x1e, + DW_OP_neg = 0x1f, + DW_OP_not = 0x20, + DW_OP_or = 0x21, + DW_OP_plus = 0x22, + DW_OP_plus_uconst = 0x23, + DW_OP_shl = 0x24, + DW_OP_shr = 0x25, + DW_OP_shra = 0x26, + DW_OP_xor = 0x27, + DW_OP_bra = 0x28, + DW_OP_eq = 0x29, + DW_OP_ge = 0x2a, + DW_OP_gt = 0x2b, + DW_OP_le = 0x2c, + DW_OP_lt = 0x2d, + DW_OP_ne = 0x2e, + DW_OP_skip = 0x2f, + DW_OP_lit0 = 0x30, + DW_OP_lit1 = 0x31, + DW_OP_lit2 = 0x32, + DW_OP_lit3 = 0x33, + DW_OP_lit4 = 0x34, + DW_OP_lit5 = 0x35, + DW_OP_lit6 = 0x36, + DW_OP_lit7 = 0x37, + DW_OP_lit8 = 0x38, + DW_OP_lit9 = 0x39, + DW_OP_lit10 = 0x3a, + DW_OP_lit11 = 0x3b, + DW_OP_lit12 = 0x3c, + DW_OP_lit13 = 0x3d, + DW_OP_lit14 = 0x3e, + DW_OP_lit15 = 0x3f, + DW_OP_lit16 = 0x40, + DW_OP_lit17 = 0x41, + DW_OP_lit18 = 0x42, + DW_OP_lit19 = 0x43, + DW_OP_lit20 = 0x44, + DW_OP_lit21 = 0x45, + DW_OP_lit22 = 0x46, + DW_OP_lit23 = 0x47, + DW_OP_lit24 = 0x48, + DW_OP_lit25 = 0x49, + DW_OP_lit26 = 0x4a, + DW_OP_lit27 = 0x4b, + DW_OP_lit28 = 0x4c, + DW_OP_lit29 = 0x4d, + DW_OP_lit30 = 0x4e, + DW_OP_lit31 = 0x4f, + DW_OP_reg0 = 0x50, + DW_OP_reg1 = 0x51, + DW_OP_reg2 = 0x52, + DW_OP_reg3 = 0x53, + DW_OP_reg4 = 0x54, + DW_OP_reg5 = 0x55, + DW_OP_reg6 = 0x56, + DW_OP_reg7 = 0x57, + DW_OP_reg8 = 0x58, + DW_OP_reg9 = 0x59, + DW_OP_reg10 = 0x5a, + DW_OP_reg11 = 0x5b, + DW_OP_reg12 = 0x5c, + DW_OP_reg13 = 0x5d, + DW_OP_reg14 = 0x5e, + DW_OP_reg15 = 0x5f, + DW_OP_reg16 = 0x60, + DW_OP_reg17 = 0x61, + DW_OP_reg18 = 0x62, + DW_OP_reg19 = 0x63, + DW_OP_reg20 = 0x64, + DW_OP_reg21 = 0x65, + DW_OP_reg22 = 0x66, + DW_OP_reg23 = 0x67, + DW_OP_reg24 = 0x68, + DW_OP_reg25 = 0x69, + DW_OP_reg26 = 0x6a, + DW_OP_reg27 = 0x6b, + DW_OP_reg28 = 0x6c, + DW_OP_reg29 = 0x6d, + DW_OP_reg30 = 0x6e, + DW_OP_reg31 = 0x6f, + DW_OP_breg0 = 0x70, + DW_OP_breg1 = 0x71, + DW_OP_breg2 = 0x72, + DW_OP_breg3 = 0x73, + DW_OP_breg4 = 0x74, + DW_OP_breg5 = 0x75, + DW_OP_breg6 = 0x76, + DW_OP_breg7 = 0x77, + DW_OP_breg8 = 0x78, + DW_OP_breg9 = 0x79, + DW_OP_breg10 = 0x7a, + DW_OP_breg11 = 0x7b, + DW_OP_breg12 = 0x7c, + DW_OP_breg13 = 0x7d, + DW_OP_breg14 = 0x7e, + DW_OP_breg15 = 0x7f, + DW_OP_breg16 = 0x80, + DW_OP_breg17 = 0x81, + DW_OP_breg18 = 0x82, + DW_OP_breg19 = 0x83, + DW_OP_breg20 = 0x84, + DW_OP_breg21 = 0x85, + DW_OP_breg22 = 0x86, + DW_OP_breg23 = 0x87, + DW_OP_breg24 = 0x88, + DW_OP_breg25 = 0x89, + DW_OP_breg26 = 0x8a, + DW_OP_breg27 = 0x8b, + DW_OP_breg28 = 0x8c, + DW_OP_breg29 = 0x8d, + DW_OP_breg30 = 0x8e, + DW_OP_breg31 = 0x8f, + DW_OP_regx = 0x90, + DW_OP_fbreg = 0x91, + DW_OP_bregx = 0x92, + DW_OP_piece = 0x93, + DW_OP_deref_size = 0x94, + DW_OP_xderef_size = 0x95, + DW_OP_nop = 0x96 + }; + +#define DW_OP_lo_user 0x80 /* implementation-defined range start */ +#define DW_OP_hi_user 0xff /* implementation-defined range end */ + +/* Type encodings. */ + +enum dwarf_type + { + DW_ATE_void = 0x0, + DW_ATE_address = 0x1, + DW_ATE_boolean = 0x2, + DW_ATE_complex_float = 0x3, + DW_ATE_float = 0x4, + DW_ATE_signed = 0x5, + DW_ATE_signed_char = 0x6, + DW_ATE_unsigned = 0x7, + DW_ATE_unsigned_char = 0x8 + }; + +#define DW_ATE_lo_user 0x80 +#define DW_ATE_hi_user 0xff + +/* Array ordering names and codes. */ +enum dwarf_array_dim_ordering + { + DW_ORD_row_major = 0, + DW_ORD_col_major = 1 + }; + +/* access attribute */ +enum dwarf_access_attribute + { + DW_ACCESS_public = 1, + DW_ACCESS_protected = 2, + DW_ACCESS_private = 3 + }; + +/* visibility */ +enum dwarf_visibility_attribute + { + DW_VIS_local = 1, + DW_VIS_exported = 2, + DW_VIS_qualified = 3 + }; + +/* virtuality */ +enum dwarf_virtuality_attribute + { + DW_VIRTUALITY_none = 0, + DW_VIRTUALITY_virtual = 1, + DW_VIRTUALITY_pure_virtual = 2 + }; + +/* case sensitivity */ +enum dwarf_id_case + { + DW_ID_case_sensitive = 0, + DW_ID_up_case = 1, + DW_ID_down_case = 2, + DW_ID_case_insensitive = 3 + }; + +/* calling convention */ +enum dwarf_calling_convention + { + DW_CC_normal = 0x1, + DW_CC_program = 0x2, + DW_CC_nocall = 0x3 + }; + +#define DW_CC_lo_user 0x40 +#define DW_CC_hi_user 0xff + +/* inline attribute */ +enum dwarf_inline_attribute + { + DW_INL_not_inlined = 0, + DW_INL_inlined = 1, + DW_INL_declared_not_inlined = 2, + DW_INL_declared_inlined = 3 + }; + +/* discriminant lists */ +enum dwarf_discrim_list + { + DW_DSC_label = 0, + DW_DSC_range = 1 + }; + +/* line number opcodes */ +enum dwarf_line_number_ops + { + DW_LNS_extended_op = 0, + DW_LNS_copy = 1, + DW_LNS_advance_pc = 2, + DW_LNS_advance_line = 3, + DW_LNS_set_file = 4, + DW_LNS_set_column = 5, + DW_LNS_negate_stmt = 6, + DW_LNS_set_basic_block = 7, + DW_LNS_const_add_pc = 8, + DW_LNS_fixed_advance_pc = 9 + }; + +/* line number extended opcodes */ +enum dwarf_line_number_x_ops + { + DW_LNE_end_sequence = 1, + DW_LNE_set_address = 2, + DW_LNE_define_file = 3 + }; + +/* call frame information */ +enum dwarf_call_frame_info + { + DW_CFA_advance_loc = 0x40, + DW_CFA_offset = 0x80, + DW_CFA_restore = 0xc0, + DW_CFA_nop = 0x00, + DW_CFA_set_loc = 0x01, + DW_CFA_advance_loc1 = 0x02, + DW_CFA_advance_loc2 = 0x03, + DW_CFA_advance_loc4 = 0x04, + DW_CFA_offset_extended = 0x05, + DW_CFA_restore_extended = 0x06, + DW_CFA_undefined = 0x07, + DW_CFA_same_value = 0x08, + DW_CFA_register = 0x09, + DW_CFA_remember_state = 0x0a, + DW_CFA_restore_state = 0x0b, + DW_CFA_def_cfa = 0x0c, + DW_CFA_def_cfa_register = 0x0d, + DW_CFA_def_cfa_offset = 0x0e, + DW_CFA_def_cfa_expression = 0x0f, + DW_CFA_expression = 0x10, + /* Dwarf 2.1 */ + DW_CFA_offset_extended_sf = 0x11, + DW_CFA_def_cfa_sf = 0x12, + DW_CFA_def_cfa_offset_sf = 0x13, + + /* SGI/MIPS specific */ + DW_CFA_MIPS_advance_loc8 = 0x1d, + + /* GNU extensions */ + DW_CFA_GNU_window_save = 0x2d, + DW_CFA_GNU_args_size = 0x2e, + DW_CFA_GNU_negative_offset_extended = 0x2f + }; + +#define DW_CIE_ID 0xffffffff +#define DW_CIE_VERSION 1 + +#define DW_CFA_extended 0 +#define DW_CFA_low_user 0x1c +#define DW_CFA_high_user 0x3f + +#define DW_CHILDREN_no 0x00 +#define DW_CHILDREN_yes 0x01 + +#define DW_ADDR_none 0 + +/* Source language names and codes. */ + +enum dwarf_source_language + { + DW_LANG_C89 = 0x0001, + DW_LANG_C = 0x0002, + DW_LANG_Ada83 = 0x0003, + DW_LANG_C_plus_plus = 0x0004, + DW_LANG_Cobol74 = 0x0005, + DW_LANG_Cobol85 = 0x0006, + DW_LANG_Fortran77 = 0x0007, + DW_LANG_Fortran90 = 0x0008, + DW_LANG_Pascal83 = 0x0009, + DW_LANG_Modula2 = 0x000a, + DW_LANG_Java = 0x000b, + DW_LANG_Mips_Assembler = 0x8001 + }; + + +#define DW_LANG_lo_user 0x8000 /* implementation-defined range start */ +#define DW_LANG_hi_user 0xffff /* implementation-defined range start */ + +/* Names and codes for macro information. */ + +enum dwarf_macinfo_record_type + { + DW_MACINFO_define = 1, + DW_MACINFO_undef = 2, + DW_MACINFO_start_file = 3, + DW_MACINFO_end_file = 4, + DW_MACINFO_vendor_ext = 255 + }; + + +/* @@@ For use with GNU frame unwind information. */ + +#define DW_EH_PE_absptr 0x00 +#define DW_EH_PE_omit 0xff + +#define DW_EH_PE_uleb128 0x01 +#define DW_EH_PE_udata2 0x02 +#define DW_EH_PE_udata4 0x03 +#define DW_EH_PE_udata8 0x04 +#define DW_EH_PE_sleb128 0x09 +#define DW_EH_PE_sdata2 0x0A +#define DW_EH_PE_sdata4 0x0B +#define DW_EH_PE_sdata8 0x0C +#define DW_EH_PE_signed 0x08 + +#define DW_EH_PE_pcrel 0x10 +#define DW_EH_PE_textrel 0x20 +#define DW_EH_PE_datarel 0x30 +#define DW_EH_PE_funcrel 0x40 +#define DW_EH_PE_aligned 0x50 + +#define DW_EH_PE_indirect 0x80 diff -durpN glibc-2.2.4/sysdeps/generic/framestate.c glibc-2.2.5/sysdeps/generic/framestate.c --- glibc-2.2.4/sysdeps/generic/framestate.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/framestate.c Thu Nov 15 17:16:54 2001 @@ -0,0 +1,47 @@ +/* __frame_state_for unwinder helper function wrapper. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#define __frame_state_for fallback_frame_state_for +#include +#undef __frame_state_for + +typedef struct frame_state * (*framesf)(void *pc, struct frame_state *); +struct frame_state *__frame_state_for (void *pc, + struct frame_state *frame_state); + +struct frame_state * +__frame_state_for (void *pc, struct frame_state *frame_state) +{ + static framesf frame_state_for; + + if (frame_state_for == NULL) + { + void *handle = __libc_dlopen ("libgcc_s.so.1"); + + if (handle == NULL + || (frame_state_for + = (framesf) __libc_dlsym (handle, "__frame_state_for")) == NULL) + frame_state_for = fallback_frame_state_for; + } + + return frame_state_for (pc, frame_state); +} diff -durpN glibc-2.2.4/sysdeps/generic/gccframe.h glibc-2.2.5/sysdeps/generic/gccframe.h --- glibc-2.2.4/sysdeps/generic/gccframe.h Mon Jul 23 10:55:26 2001 +++ glibc-2.2.5/sysdeps/generic/gccframe.h Thu Nov 15 17:17:29 2001 @@ -1,5 +1,5 @@ /* Definition of object in frame unwind info. Generic version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 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,14 +17,34 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -/* This must match what's in frame.h in gcc. */ +#include + +struct dwarf_fde; +struct fde_vector; struct object { void *pc_begin; - void *pc_end; - void *fde_begin; - void *fde_array; - __SIZE_TYPE__ count; + void *tbase; + void *dbase; + union { + struct dwarf_fde *single; + struct dwarf_fde **array; + struct fde_vector *sort; + } u; + + union { + struct { + unsigned long sorted : 1; + unsigned long from_array : 1; + unsigned long mixed_encoding : 1; + unsigned long encoding : 8; + /* ??? Wish there was an easy way to detect a 64-bit host here; + we've got 32 bits left to play with... */ + unsigned long count : 21; + } b; + size_t i; + } s; + struct object *next; }; diff -durpN glibc-2.2.4/sysdeps/generic/glob.c glibc-2.2.5/sysdeps/generic/glob.c --- glibc-2.2.4/sysdeps/generic/glob.c Mon Jul 23 10:55:26 2001 +++ glibc-2.2.5/sysdeps/generic/glob.c Mon Dec 10 15:54:18 2001 @@ -355,42 +355,14 @@ static inline #endif const char * -next_brace_sub (begin) - const char *begin; +next_brace_sub (cp) + const char *cp; { unsigned int depth = 0; - const char *cp = begin; - - while (1) - { - if (depth == 0) - { - if (*cp != ',' && *cp != '}' && *cp != '\0') - { - if (*cp == '{') - ++depth; - ++cp; - continue; - } - } - else - { - while (*cp != '\0' && (*cp != '}' || depth > 0)) - { - if (*cp == '}') - --depth; - ++cp; - } - if (*cp == '\0') - /* An incorrectly terminated brace expression. */ - return NULL; - - continue; - } - break; - } - - return cp; + while (*cp != '\0' && (*cp != '}' || depth--) && (*cp != ',' || depth)) + if (*cp++ == '{') + depth++; + return *cp != '\0' ? cp : NULL; } #endif /* !GLOB_ONLY_P */ @@ -981,18 +953,11 @@ glob (pattern, flags, errfunc, pglob) /* No matches. */ if (flags & GLOB_NOCHECK) { - size_t filename_len = strlen (filename) + 1; - char **new_pathv; int newcount = pglob->gl_pathc + pglob->gl_offs; - struct stat st; -#ifdef HAVE_STAT64 - struct stat64 st64; -#endif - /* This is an pessimistic guess about the size. */ pglob->gl_pathv = (char **) realloc (pglob->gl_pathv, - (newcount + dirs.gl_pathc + 1) + (newcount + 2) * sizeof (char *)); if (pglob->gl_pathv == NULL) { @@ -1000,53 +965,19 @@ glob (pattern, flags, errfunc, pglob) return GLOB_NOSPACE; } - for (i = 0; i < dirs.gl_pathc; ++i) + pglob->gl_pathv[newcount] = __strdup (pattern); + if (pglob->gl_pathv[newcount] == NULL) { - const char *dir = dirs.gl_pathv[i]; - size_t dir_len = strlen (dir); - - /* First check whether this really is a directory. */ - if (((flags & GLOB_ALTDIRFUNC) - ? ((*pglob->gl_stat) (dir, &st) != 0 - || !S_ISDIR (st.st_mode)) - : (__stat64 (dir, &st64) != 0 - || !S_ISDIR (st64.st_mode)))) - /* No directory, ignore this entry. */ - continue; - - pglob->gl_pathv[newcount] = malloc (dir_len + 1 - + filename_len); - if (pglob->gl_pathv[newcount] == NULL) - { - globfree (&dirs); - globfree (pglob); - return GLOB_NOSPACE; - } - -#ifdef HAVE_MEMPCPY - mempcpy (mempcpy (mempcpy (pglob->gl_pathv[newcount], - dir, dir_len), - "/", 1), - filename, filename_len); -#else - memcpy (pglob->gl_pathv[newcount], dir, dir_len); - pglob->gl_pathv[newcount][dir_len] = '/'; - memcpy (&pglob->gl_pathv[newcount][dir_len + 1], - filename, filename_len); -#endif - ++pglob->gl_pathc; - ++newcount; + globfree (&dirs); + globfree (pglob); + return GLOB_NOSPACE; } + ++pglob->gl_pathc; + ++newcount; + pglob->gl_pathv[newcount] = NULL; pglob->gl_flags = flags; - - /* Now we know how large the gl_pathv vector must be. */ - new_pathv = (char **) realloc (pglob->gl_pathv, - ((newcount + 1) - * sizeof (char *))); - if (new_pathv != NULL) - pglob->gl_pathv = new_pathv; } else { diff -durpN glibc-2.2.4/sysdeps/generic/group_member.c glibc-2.2.5/sysdeps/generic/group_member.c --- glibc-2.2.4/sysdeps/generic/group_member.c Mon Jul 23 10:55:26 2001 +++ glibc-2.2.5/sysdeps/generic/group_member.c Sun Jan 20 19:23:21 2002 @@ -1,5 +1,5 @@ /* `group_member' -- test if process is in a given group. - Copyright (C) 1995, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -41,7 +41,7 @@ __group_member (gid) size *= 2; } while (n == size / 2); - while (n > 0) + while (n >= 0) if (groups[n--] == gid) return 1; diff -durpN glibc-2.2.4/sysdeps/generic/initfini.c glibc-2.2.5/sysdeps/generic/initfini.c --- glibc-2.2.4/sysdeps/generic/initfini.c Mon Jul 23 10:55:26 2001 +++ glibc-2.2.5/sysdeps/generic/initfini.c Tue Sep 18 05:27:37 2001 @@ -7,6 +7,15 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + 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 diff -durpN glibc-2.2.4/sysdeps/generic/inttypes.h glibc-2.2.5/sysdeps/generic/inttypes.h --- glibc-2.2.4/sysdeps/generic/inttypes.h Mon Jul 23 10:55:26 2001 +++ glibc-2.2.5/sysdeps/generic/inttypes.h Sun Oct 7 13:17:19 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,6 +27,20 @@ /* Get the type definitions. */ #include +/* Get a definition for wchar_t. But we must not define wchar_t itself. */ +#ifndef ____gwchar_t_defined +# ifdef __cplusplus +# define __gwchar_t wchar_t +# elif defined __WCHAR_TYPE__ +typedef __WCHAR_TYPE__ __gwchar_t; +# else +# define __need_wchar_t +# include +typedef wchar_t __gwchar_t; +# endif +# define ____gwchar_t_defined 1 +#endif + /* The ISO C99 standard specifies that these macros must only be defined if explicitly requested. */ @@ -292,16 +306,18 @@ extern intmax_t strtoimax (__const char char **__restrict __endptr, int __base) __THROW; /* Like `strtoul' but convert to `uintmax_t'. */ -extern uintmax_t strtoumax (__const char * __restrict __nptr, +extern uintmax_t strtoumax (__const char *__restrict __nptr, char ** __restrict __endptr, int __base) __THROW; /* Like `wcstol' but convert to `intmax_t'. */ -extern intmax_t wcstoimax (__const wchar_t * __restrict __nptr, - wchar_t **__restrict __endptr, int __base) __THROW; +extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __THROW; /* Like `wcstoul' but convert to `uintmax_t'. */ -extern uintmax_t wcstoumax (__const wchar_t * __restrict __nptr, - wchar_t ** __restrict __endptr, int __base) __THROW; +extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __THROW; #ifdef __USE_EXTERN_INLINES @@ -338,13 +354,13 @@ strtoumax (__const char *__restrict nptr /* Like `wcstol' but convert to `intmax_t'. */ # ifndef __wcstol_internal_defined -extern long int __wcstol_internal (__const wchar_t * __restrict __nptr, - wchar_t **__restrict __endptr, +extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr, + __gwchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstol_internal_defined 1 # endif extern __inline intmax_t -wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) __THROW { return __wcstol_internal (nptr, endptr, base, 0); @@ -353,15 +369,15 @@ wcstoimax (__const wchar_t *__restrict n /* Like `wcstoul' but convert to `uintmax_t'. */ # ifndef __wcstoul_internal_defined -extern unsigned long int __wcstoul_internal (__const wchar_t * +extern unsigned long int __wcstoul_internal (__const __gwchar_t * __restrict __nptr, - wchar_t ** + __gwchar_t ** __restrict __endptr, int __base, int __group) __THROW; # define __wcstoul_internal_defined 1 # endif extern __inline uintmax_t -wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) __THROW { return __wcstoul_internal (nptr, endptr, base, 0); @@ -405,14 +421,14 @@ strtoumax (__const char *__restrict nptr /* Like `wcstol' but convert to `intmax_t'. */ # ifndef __wcstoll_internal_defined __extension__ -extern long long int __wcstoll_internal (__const wchar_t * +extern long long int __wcstoll_internal (__const __gwchar_t * __restrict __nptr, - wchar_t **__restrict __endptr, + __gwchar_t **__restrict __endptr, int __base, int __group) __THROW; # define __wcstoll_internal_defined 1 # endif extern __inline intmax_t -wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) __THROW { return __wcstoll_internal (nptr, endptr, base, 0); @@ -422,16 +438,16 @@ wcstoimax (__const wchar_t *__restrict n /* Like `wcstoul' but convert to `uintmax_t'. */ # ifndef __wcstoull_internal_defined __extension__ -extern unsigned long long int __wcstoull_internal (__const wchar_t * +extern unsigned long long int __wcstoull_internal (__const __gwchar_t * __restrict __nptr, - wchar_t ** + __gwchar_t ** __restrict __endptr, int __base, int __group) __THROW; # define __wcstoull_internal_defined 1 # endif extern __inline uintmax_t -wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, +wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) __THROW { return __wcstoull_internal (nptr, endptr, base, 0); diff -durpN glibc-2.2.4/sysdeps/generic/ldsodefs.h glibc-2.2.5/sysdeps/generic/ldsodefs.h --- glibc-2.2.4/sysdeps/generic/ldsodefs.h Mon Jul 23 10:55:27 2001 +++ glibc-2.2.5/sysdeps/generic/ldsodefs.h Sat Nov 10 14:44:52 2001 @@ -31,6 +31,7 @@ #include #include #include +#include __BEGIN_DECLS @@ -87,6 +88,27 @@ typedef ElfW(Addr) lookup_t; # define DL_STATIC_INIT(map) #endif +/* Reloc type classes as returned by elf_machine_type_class(). + ELF_RTYPE_CLASS_PLT means this reloc should not be satisfied by + some PLT symbol, ELF_RTYPE_CLASS_COPY means this reloc should not be + satisfied by any symbol in the executable. */ +#define ELF_RTYPE_CLASS_PLT 1 +#define ELF_RTYPE_CLASS_COPY 2 + +/* ELF uses the PF_x macros to specify the segment permissions, mmap + uses PROT_xxx. In most cases the three macros have the values 1, 2, + and 3 but not in a matching order. The following macros allows + converting from the PF_x values to PROT_xxx values. */ +#define PF_TO_PROT \ + ((PROT_READ << (PF_R * 4)) \ + | (PROT_WRITE << (PF_W * 4)) \ + | (PROT_EXEC << (PF_X * 4)) \ + | ((PROT_READ | PROT_WRITE) << ((PF_R | PF_W) * 4)) \ + | ((PROT_READ | PROT_EXEC) << ((PF_R | PF_X) * 4)) \ + | ((PROT_WRITE | PROT_EXEC) << (PF_W | PF_X) * 4) \ + | ((PROT_READ | PROT_WRITE | PROT_EXEC) << ((PF_R | PF_W | PF_X) * 4))) + + /* For the version handling we need an array with only names and their hash values. */ struct r_found_version @@ -196,6 +218,8 @@ extern int _dl_debug_mask; #define DL_DEBUG_RELOC (1 << 5) #define DL_DEBUG_FILES (1 << 6) #define DL_DEBUG_STATISTICS (1 << 7) +/* This one is used only internally. */ +#define DL_DEBUG_HELP (1 << 8) /* Expect cache ID. */ extern int _dl_correct_cache_id; @@ -229,6 +253,16 @@ extern struct r_search_path_elem *_dl_in extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */ +/* During the program run we must not modify the global data of + loaded shared object simultanously in two threads. Therefore we + protect `_dl_open' and `_dl_close' in dl-close.c. + + This must be a recursive lock since the initializer function of + the loaded object might as well require a call to this function. + At this time it is not anymore a problem to modify the tables. */ +__libc_lock_define_recursive (extern, _dl_load_lock) + + /* Write message on the debug file descriptor. The parameters are interpreted as for a `printf' call. All the lines start with a tag showing the PID. */ @@ -274,15 +308,14 @@ extern void _dl_dprintf (int fd, const c it is a general problem; ERRSTRING is a string describing the specific problem. */ extern void _dl_signal_error (int errcode, const char *object, - const char *errstring) + const char *occurred, const char *errstring) internal_function __attribute__ ((__noreturn__)); /* Like _dl_signal_error, but may return when called in the context of _dl_receive_error. */ -extern void _dl_signal_cerror (int errcode, - const char *object, - const char *errstring) +extern void _dl_signal_cerror (int errcode, const char *object, + const char *occation, const char *errstring) internal_function; /* Call OPERATE, receiving errors from `dl_signal_cerror'. Unlike @@ -325,14 +358,12 @@ extern void _dl_setup_hash (struct link_ l_searchlist (i.e. the segment of the dependency tree starting at that object) is searched in turn. REFERENCE_NAME should name the object containing the reference; it is used in error messages. - RELOC_TYPE is a machine-dependent reloc type, which is passed to - the `elf_machine_lookup_*_p' macros in dl-machine.h to affect which - symbols can be chosen. */ + TYPE_CLASS describes the type of symbol we are looking for. */ extern lookup_t _dl_lookup_symbol (const char *undef, struct link_map *undef_map, const ElfW(Sym) **sym, struct r_scope_elem *symbol_scope[], - int reloc_type, int explicit) + int type_class, int explicit) internal_function; /* Lookup versioned symbol. */ @@ -341,7 +372,7 @@ extern lookup_t _dl_lookup_versioned_sym const ElfW(Sym) **sym, struct r_scope_elem *symbol_scope[], const struct r_found_version *version, - int reloc_type, int explicit) + int type_class, int explicit) internal_function; /* For handling RTLD_NEXT we must be able to skip shared objects. */ @@ -401,9 +432,8 @@ extern void _dl_relocate_object (struct TYPE is the result of ELFW(R_TYPE) (r_info), i.e. an R__* value. PLT is nonzero if this was a PLT reloc; it just affects the message. */ extern void _dl_reloc_bad_type (struct link_map *map, - uint_fast8_t type, int plt) - internal_function - __attribute__ ((__noreturn__)); + unsigned int type, int plt) + internal_function __attribute__ ((__noreturn__)); /* Check the version dependencies of all objects available through MAP. If VERBOSE print some more diagnostics. */ @@ -479,8 +509,9 @@ extern const char *_dl_load_cache_lookup once needed. */ extern void _dl_unload_cache (void); -/* System-dependent function to read a file's whole contents - in the most convenient manner available. */ +/* System-dependent function to read a file's whole contents in the + most convenient manner available. *SIZEP gets the size of the + file. On error MAP_FAILED is returned. */ extern void *_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot) internal_function; diff -durpN glibc-2.2.4/sysdeps/generic/stdint.h glibc-2.2.5/sysdeps/generic/stdint.h --- glibc-2.2.4/sysdeps/generic/stdint.h Mon Jul 23 10:55:32 2001 +++ glibc-2.2.5/sysdeps/generic/stdint.h Sat Aug 18 15:15:39 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 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 @@ -24,8 +24,6 @@ #define _STDINT_H 1 #include -#define __need_wchar_t -#include #include #include diff -durpN glibc-2.2.4/sysdeps/generic/strnlen.c glibc-2.2.5/sysdeps/generic/strnlen.c --- glibc-2.2.4/sysdeps/generic/strnlen.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/strnlen.c Mon Aug 27 21:25:27 2001 @@ -0,0 +1,160 @@ +/* Find the length of STRING, but scan at most MAXLEN characters. + Copyright (C) 1991, 1993, 1997, 2000, 2001 Free Software Foundation, Inc. + Contributed by Jakub Jelinek . + + Based on strlen written by Torbjorn Granlund (tege@sics.se), + with help from Dan Sahlin (dan@sics.se); + commentary by Jim Blandy (jimb@ai.mit.edu). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +/* Find the length of S, but scan at most MAXLEN characters. If no + '\0' terminator is found in that many characters, return MAXLEN. */ +size_t +__strnlen (const char *str, size_t maxlen) +{ + const char *char_ptr, *end_ptr = str + maxlen; + const unsigned long int *longword_ptr; + unsigned long int longword, magic_bits, himagic, lomagic; + + if (maxlen == 0) + return 0; + + if (__builtin_expect (end_ptr < str, 0)) + end_ptr = (const char *) ~0UL; + + /* Handle the first few characters by reading one character at a time. + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = str; ((unsigned long int) char_ptr + & (sizeof (longword) - 1)) != 0; + ++char_ptr) + if (*char_ptr == '\0') + { + if (char_ptr > end_ptr) + char_ptr = end_ptr; + return char_ptr - str; + } + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to 8-byte longwords. */ + + longword_ptr = (unsigned long int *) char_ptr; + + /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits + the "holes." Note that there is a hole just to the left of + each byte, with an extra at the end: + + bits: 01111110 11111110 11111110 11111111 + bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ + magic_bits = 0x7efefeffL; + himagic = 0x80808080L; + lomagic = 0x01010101L; + if (sizeof (longword) > 4) + { + /* 64-bit version of the magic. */ + /* Do the shift in two steps to avoid a warning if long has 32 bits. */ + magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; + himagic = ((himagic << 16) << 16) | himagic; + lomagic = ((lomagic << 16) << 16) | lomagic; + } + if (sizeof (longword) > 8) + abort (); + + /* Instead of the traditional loop which tests each character, + we will test a longword at a time. The tricky part is testing + if *any of the four* bytes in the longword in question are zero. */ + while (longword_ptr < (unsigned long int *) end_ptr) + { + /* We tentatively exit the loop if adding MAGIC_BITS to + LONGWORD fails to change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-30 is set, there will be a carry + into bit 31, so all of the hole bits will be changed. + + The one misfire occurs when bits 24-30 are clear and bit + 31 is set; in this case, the hole at bit 31 is not + changed. If we had access to the processor carry flag, + we could close this loophole by putting the fourth hole + at bit 32! + + So it ignores everything except 128's, when they're aligned + properly. */ + + longword = *longword_ptr++; + + if ((longword - lomagic) & himagic) + { + /* Which of the bytes was the zero? If none of them were, it was + a misfire; continue the search. */ + + const char *cp = (const char *) (longword_ptr - 1); + + char_ptr = cp; + if (cp[0] == 0) + break; + char_ptr = cp + 1; + if (cp[1] == 0) + break; + char_ptr = cp + 2; + if (cp[2] == 0) + break; + char_ptr = cp + 3; + if (cp[3] == 0) + break; + if (sizeof (longword) > 4) + { + char_ptr = cp + 4; + if (cp[4] == 0) + break; + char_ptr = cp + 5; + if (cp[5] == 0) + break; + char_ptr = cp + 6; + if (cp[6] == 0) + break; + char_ptr = cp + 7; + if (cp[7] == 0) + break; + } + } + char_ptr = end_ptr; + } + + if (char_ptr > end_ptr) + char_ptr = end_ptr; + return char_ptr - str; +} +weak_alias (__strnlen, strnlen) diff -durpN glibc-2.2.4/sysdeps/generic/strsep.c glibc-2.2.5/sysdeps/generic/strsep.c --- glibc-2.2.4/sysdeps/generic/strsep.c Mon Jul 23 10:55:33 2001 +++ glibc-2.2.5/sysdeps/generic/strsep.c Sun Oct 7 13:13:35 2001 @@ -66,3 +66,4 @@ __strsep (char **stringp, const char *de return begin; } weak_alias (__strsep, strsep) +strong_alias (__strsep, __strsep_g) diff -durpN glibc-2.2.4/sysdeps/generic/strtol.c glibc-2.2.5/sysdeps/generic/strtol.c --- glibc-2.2.4/sysdeps/generic/strtol.c Mon Jul 23 10:55:33 2001 +++ glibc-2.2.5/sysdeps/generic/strtol.c Sat Aug 18 20:52:19 2001 @@ -263,7 +263,7 @@ INTERNAL (strtol) (nptr, endptr, base, g in the format described in . */ const char *grouping; - if (group) + if (__builtin_expect (group, 0)) { grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); if (*grouping <= 0 || *grouping == CHAR_MAX) @@ -305,22 +305,18 @@ INTERNAL (strtol) (nptr, endptr, base, g /* Skip white space. */ while (ISSPACE (*s)) ++s; - if (*s == L_('\0')) + if (__builtin_expect (*s == L_('\0'), 0)) goto noconv; /* Check for a sign. */ + negative = 0; if (*s == L_('-')) { negative = 1; ++s; } else if (*s == L_('+')) - { - negative = 0; - ++s; - } - else - negative = 0; + ++s; /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ if (*s == L_('0')) @@ -343,7 +339,7 @@ INTERNAL (strtol) (nptr, endptr, base, g if (base != 10) grouping = NULL; - if (grouping) + if (__builtin_expect (grouping != NULL, 0)) { # ifndef USE_WIDE_CHAR thousands_len = strlen (thousands); @@ -506,7 +502,7 @@ INTERNAL (strtol) (nptr, endptr, base, g overflow = 1; #endif - if (overflow) + if (__builtin_expect (overflow, 0)) { __set_errno (ERANGE); #if UNSIGNED diff -durpN glibc-2.2.4/sysdeps/generic/sys/ucontext.h glibc-2.2.5/sysdeps/generic/sys/ucontext.h --- glibc-2.2.4/sysdeps/generic/sys/ucontext.h Mon Jul 23 10:55:37 2001 +++ glibc-2.2.5/sysdeps/generic/sys/ucontext.h Sun Oct 28 20:38:48 2001 @@ -1,4 +1,5 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Data structures for user-level context switching. Generic version. + Copyright (C) 1997,98,99,2001 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 @@ -16,9 +17,29 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +/* This file's definitions suffice for any platform where all + the machine-specific state is described in `struct sigcontext'. */ + #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 -#error "No system dependent context structure definitions" +#include +#include + +/* We need the signal context definitions even if they are not used + included in . */ +#include + +typedef struct sigcontext mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; #endif /* sys/ucontext.h */ diff -durpN glibc-2.2.4/sysdeps/generic/tmpfile.c glibc-2.2.5/sysdeps/generic/tmpfile.c --- glibc-2.2.4/sysdeps/generic/tmpfile.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/tmpfile.c Tue Nov 13 02:06:35 2001 @@ -0,0 +1,60 @@ +/* Open a stdio stream on an anonymous temporary file. Generic/POSIX version. + Copyright (C) 1991,93,96,97,98,99,2000 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#ifdef USE_IN_LIBIO +# include +# define __fdopen _IO_fdopen +# define tmpfile __new_tmpfile +#endif + +/* This returns a new stream opened on a temporary file (generated + by tmpnam). The file is opened with mode "w+b" (binary read/write). + If we couldn't generate a unique filename or the file couldn't + be opened, NULL is returned. */ +FILE * +tmpfile (void) +{ + char buf[FILENAME_MAX]; + int fd; + FILE *f; + + if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0)) + return NULL; + fd = __gen_tempname (buf, __GT_FILE); + if (fd < 0) + return NULL; + + /* Note that this relies on the Unix semantics that + a file is not really removed until it is closed. */ + (void) remove (buf); + + if ((f = __fdopen (fd, "w+b")) == NULL) + __close (fd); + + return f; +} + +#ifdef USE_IN_LIBIO +# undef tmpfile +# include +versioned_symbol (libc, __new_tmpfile, tmpfile, GLIBC_2_1); +#endif diff -durpN glibc-2.2.4/sysdeps/generic/unsecvars.h glibc-2.2.5/sysdeps/generic/unsecvars.h --- glibc-2.2.4/sysdeps/generic/unsecvars.h Wed Jan 10 15:54:42 2001 +++ glibc-2.2.5/sysdeps/generic/unsecvars.h Mon Nov 5 16:13:43 2001 @@ -1,12 +1,19 @@ -/* Environment variable to be removed for SUID programs. */ +/* Environment variable to be removed for SUID programs. The names are + all stuffed in a single string which means they have to be terminated + with a '\0' explicitly. */ #define UNSECURE_ENVVARS \ - "GCONV_PATH", \ - "HOSTALIASES", \ - "LOCALDOMAIN", \ - "LOCPATH", \ - "MALLOC_TRACE", \ - "NLSPATH", \ - "RESOLV_HOST_CONF", \ - "RES_OPTIONS", \ - "TMPDIR", \ - "TZDIR" + "LD_PRELOAD\0" \ + "LD_LIBRARY_PATH\0" \ + "LD_ORIGIN_PATH\0" \ + "LD_DEBUG_OUTPUT\0" \ + "LD_PROFILE\0" \ + "GCONV_PATH\0" \ + "HOSTALIASES\0" \ + "LOCALDOMAIN\0" \ + "LOCPATH\0" \ + "MALLOC_TRACE\0" \ + "NLSPATH\0" \ + "RESOLV_HOST_CONF\0" \ + "RES_OPTIONS\0" \ + "TMPDIR\0" \ + "TZDIR\0" diff -durpN glibc-2.2.4/sysdeps/generic/unwind-dw2-fde-glibc.c glibc-2.2.5/sysdeps/generic/unwind-dw2-fde-glibc.c --- glibc-2.2.4/sysdeps/generic/unwind-dw2-fde-glibc.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/unwind-dw2-fde-glibc.c Mon Jan 7 22:29:53 2002 @@ -0,0 +1,279 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + Contributed by Jakub Jelinek . + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + +/* Locate the FDE entry for a given address, using PT_GNU_EH_FRAME ELF + segment and dl_iterate_phdr to avoid register/deregister calls at + DSO load/unload. */ + +#ifdef _LIBC +# include +#endif + +#if !defined _LIBC || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_5) + +#include +#include + +#define _Unwind_Find_FDE _Unwind_Find_registered_FDE + +#include + +#undef _Unwind_Find_FDE + +fde * _Unwind_Find_registered_FDE (void *pc, struct dwarf_eh_bases *bases); + +struct unw_eh_callback_data +{ + _Unwind_Ptr pc; + void *tbase; + void *dbase; + void *func; + fde *ret; +}; + +struct unw_eh_frame_hdr +{ + unsigned char version; + unsigned char eh_frame_ptr_enc; + unsigned char fde_count_enc; + unsigned char table_enc; +}; + +/* Like base_of_encoded_value, but take the base from a struct object + instead of an _Unwind_Context. */ + +static _Unwind_Ptr +base_from_cb_data (unsigned char encoding, struct unw_eh_callback_data *data) +{ + if (encoding == DW_EH_PE_omit) + return 0; + + switch (encoding & 0x70) + { + case DW_EH_PE_absptr: + case DW_EH_PE_pcrel: + case DW_EH_PE_aligned: + return 0; + + case DW_EH_PE_textrel: + return (_Unwind_Ptr) data->tbase; + case DW_EH_PE_datarel: + return (_Unwind_Ptr) data->dbase; + } + abort (); +} + +static int +_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) +{ + struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr; + const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic; + long n, match; + _Unwind_Ptr load_base; + const unsigned char *p; + const struct unw_eh_frame_hdr *hdr; + _Unwind_Ptr eh_frame; + struct object ob; + + /* Make sure struct dl_phdr_info is at least as big as we need. */ + if (size < offsetof (struct dl_phdr_info, dlpi_phnum) + + sizeof (info->dlpi_phnum)) + return -1; + + match = 0; + phdr = info->dlpi_phdr; + load_base = info->dlpi_addr; + p_eh_frame_hdr = NULL; + p_dynamic = NULL; + + /* See if PC falls into one of the loaded segments. Find the eh_frame + segment at the same time. */ + for (n = info->dlpi_phnum; --n >= 0; phdr++) + { + if (phdr->p_type == PT_LOAD) + { + _Unwind_Ptr vaddr = phdr->p_vaddr + load_base; + if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz) + match = 1; + } + else if (phdr->p_type == PT_GNU_EH_FRAME) + p_eh_frame_hdr = phdr; + else if (phdr->p_type == PT_DYNAMIC) + p_dynamic = phdr; + } + if (!match || !p_eh_frame_hdr) + return 0; + + /* Read .eh_frame_hdr header. */ + hdr = (const struct unw_eh_frame_hdr *) + (p_eh_frame_hdr->p_vaddr + load_base); + if (hdr->version != 1) + return 1; + +#ifdef CRT_GET_RFIB_DATA +# ifdef __i386__ + data->dbase = NULL; + if (p_dynamic) + { + /* For dynamicly linked executables and shared libraries, + DT_PLTGOT is the gp value for that object. */ + ElfW(Dyn) *dyn = (ElfW(Dyn) *)(p_dynamic->p_vaddr + load_base); + for (; dyn->d_tag != DT_NULL ; dyn++) + if (dyn->d_tag == DT_PLTGOT) + { + /* On IA-32, _DYNAMIC is writable and GLIBC has relocated it. */ + data->dbase = (void *) dyn->d_un.d_ptr; + break; + } + } +# else +# error What is DW_EH_PE_datarel base on this platform? +# endif +#endif +#ifdef CRT_GET_RFIB_TEXT +# error What is DW_EH_PE_textrel base on this platform? +#endif + + p = read_encoded_value_with_base (hdr->eh_frame_ptr_enc, + base_from_cb_data (hdr->eh_frame_ptr_enc, + data), + (const unsigned char *) (hdr + 1), + &eh_frame); + + /* We require here specific table encoding to speed things up. + Also, DW_EH_PE_datarel here means using PT_GNU_EH_FRAME start + as base, not the processor specific DW_EH_PE_datarel. */ + if (hdr->fde_count_enc != DW_EH_PE_omit + && hdr->table_enc == (DW_EH_PE_datarel | DW_EH_PE_sdata4)) + { + _Unwind_Ptr fde_count; + + p = read_encoded_value_with_base (hdr->fde_count_enc, + base_from_cb_data (hdr->fde_count_enc, + data), + p, &fde_count); + /* Shouldn't happen. */ + if (fde_count == 0) + return 1; + if ((((_Unwind_Ptr) p) & 3) == 0) + { + struct fde_table { + signed initial_loc __attribute__ ((mode (SI))); + signed fde __attribute__ ((mode (SI))); + }; + const struct fde_table *table = (const struct fde_table *) p; + size_t lo, hi, mid; + _Unwind_Ptr data_base = (_Unwind_Ptr) hdr; + fde *f; + unsigned int f_enc, f_enc_size; + _Unwind_Ptr range; + + mid = fde_count - 1; + if (data->pc < table[0].initial_loc + data_base) + return 1; + else if (data->pc < table[mid].initial_loc + data_base) + { + lo = 0; + hi = mid; + + while (lo < hi) + { + mid = (lo + hi) / 2; + if (data->pc < table[mid].initial_loc + data_base) + hi = mid; + else if (data->pc >= table[mid + 1].initial_loc + data_base) + lo = mid + 1; + else + break; + } + + if (lo >= hi) + __gxx_abort (); + } + + f = (fde *) (table[mid].fde + data_base); + f_enc = get_fde_encoding (f); + f_enc_size = size_of_encoded_value (f_enc); + read_encoded_value_with_base (f_enc & 0x0f, 0, + &f->pc_begin[f_enc_size], &range); + if (data->pc < table[mid].initial_loc + data_base + range) + data->ret = f; + data->func = (void *) (table[mid].initial_loc + data_base); + return 1; + } + } + + /* We have no sorted search table, so need to go the slow way. + As soon as GLIBC will provide API so to notify that a library has been + removed, we could cache this (and thus use search_object). */ + ob.pc_begin = NULL; + ob.tbase = data->tbase; + ob.dbase = data->dbase; + ob.u.single = (fde *) eh_frame; + ob.s.i = 0; + ob.s.b.mixed_encoding = 1; /* Need to assume worst case. */ + data->ret = linear_search_fdes (&ob, (fde *) eh_frame, (void *) data->pc); + if (data->ret != NULL) + { + unsigned int encoding = get_fde_encoding (data->ret); + read_encoded_value_with_base (encoding, + base_from_cb_data (encoding, data), + data->ret->pc_begin, + (_Unwind_Ptr *)&data->func); + } + return 1; +} + +fde * +_Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) +{ + struct unw_eh_callback_data data; + fde *ret; + + ret = _Unwind_Find_registered_FDE (pc, bases); + if (ret != NULL) + return ret; + + data.pc = (_Unwind_Ptr) pc; + data.tbase = NULL; + data.dbase = NULL; + data.func = NULL; + data.ret = NULL; + + if (dl_iterate_phdr (_Unwind_IteratePhdrCallback, &data) < 0) + return NULL; + + if (data.ret) + { + bases->tbase = data.tbase; + bases->dbase = data.dbase; + bases->func = data.func; + } + return data.ret; +} + +#endif diff -durpN glibc-2.2.4/sysdeps/generic/unwind-dw2-fde.c glibc-2.2.5/sysdeps/generic/unwind-dw2-fde.c --- glibc-2.2.4/sysdeps/generic/unwind-dw2-fde.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/unwind-dw2-fde.c Mon Jan 7 22:30:23 2002 @@ -0,0 +1,1037 @@ +/* Subroutines needed for unwinding stack frames for exception handling. */ +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Contributed by Jason Merrill . + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file into combinations with other programs, +and to distribute those combinations without any restriction coming +from the use of this file. (The General Public License restrictions +do apply in other respects; for example, they cover modification of +the file, and distribution when not linked into a combine +executable.) + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifdef _LIBC +# include +#endif + +#if !defined _LIBC || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_5) + +#ifdef _LIBC +#include +#include +#include +#include +#include +#define NO_BASE_OF_ENCODED_VALUE +#include +#include +#else +#include "tconfig.h" +#include "tsystem.h" +#include "dwarf2.h" +#include "unwind.h" +#define NO_BASE_OF_ENCODED_VALUE +#include "unwind-pe.h" +#include "unwind-dw2-fde.h" +#include "gthr.h" +#endif + +/* The unseen_objects list contains objects that have been registered + but not yet categorized in any way. The seen_objects list has had + it's pc_begin and count fields initialized at minimum, and is sorted + by decreasing value of pc_begin. */ +static struct object *unseen_objects; +static struct object *seen_objects; + +#ifdef _LIBC + +__libc_lock_define_initialized (static, object_mutex) +#define init_object_mutex_once() +#define __gthread_mutex_lock(m) __libc_lock_lock (*(m)) +#define __gthread_mutex_unlock(m) __libc_lock_unlock (*(m)) + +#else + +#ifdef __GTHREAD_MUTEX_INIT +static __gthread_mutex_t object_mutex = __GTHREAD_MUTEX_INIT; +#else +static __gthread_mutex_t object_mutex; +#endif + +#ifdef __GTHREAD_MUTEX_INIT_FUNCTION +static void +init_object_mutex (void) +{ + __GTHREAD_MUTEX_INIT_FUNCTION (&object_mutex); +} + +static void +init_object_mutex_once (void) +{ + static __gthread_once_t once = __GTHREAD_ONCE_INIT; + __gthread_once (&once, init_object_mutex); +} +#else +#define init_object_mutex_once() +#endif + +#endif /* _LIBC */ + +/* Called from crtbegin.o to register the unwind info for an object. */ + +void +__register_frame_info_bases (void *begin, struct object *ob, + void *tbase, void *dbase) +{ + /* If .eh_frame is empty, don't register at all. */ + if (*(uword *)begin == 0) + return; + + ob->pc_begin = (void *)-1; + ob->tbase = tbase; + ob->dbase = dbase; + ob->u.single = begin; + ob->s.i = 0; + ob->s.b.encoding = DW_EH_PE_omit; + + init_object_mutex_once (); + __gthread_mutex_lock (&object_mutex); + + ob->next = unseen_objects; + unseen_objects = ob; + + __gthread_mutex_unlock (&object_mutex); +} + +void +__register_frame_info (void *begin, struct object *ob) +{ + __register_frame_info_bases (begin, ob, 0, 0); +} + +void +__register_frame (void *begin) +{ + struct object *ob; + + /* If .eh_frame is empty, don't register at all. */ + if (*(uword *)begin == 0) + return; + + ob = (struct object *) malloc (sizeof (struct object)); + __register_frame_info (begin, ob); +} + +/* Similar, but BEGIN is actually a pointer to a table of unwind entries + for different translation units. Called from the file generated by + collect2. */ + +void +__register_frame_info_table_bases (void *begin, struct object *ob, + void *tbase, void *dbase) +{ + ob->pc_begin = (void *)-1; + ob->tbase = tbase; + ob->dbase = dbase; + ob->u.array = begin; + ob->s.i = 0; + ob->s.b.from_array = 1; + ob->s.b.encoding = DW_EH_PE_omit; + + init_object_mutex_once (); + __gthread_mutex_lock (&object_mutex); + + ob->next = unseen_objects; + unseen_objects = ob; + + __gthread_mutex_unlock (&object_mutex); +} + +void +__register_frame_info_table (void *begin, struct object *ob) +{ + __register_frame_info_table_bases (begin, ob, 0, 0); +} + +void +__register_frame_table (void *begin) +{ + struct object *ob = (struct object *) malloc (sizeof (struct object)); + __register_frame_info_table (begin, ob); +} + +/* Called from crtbegin.o to deregister the unwind info for an object. */ +/* ??? Glibc has for a while now exported __register_frame_info and + __deregister_frame_info. If we call __register_frame_info_bases + from crtbegin (wherein it is declared weak), and this object does + not get pulled from libgcc.a for other reasons, then the + invocation of __deregister_frame_info will be resolved from glibc. + Since the registration did not happen there, we'll abort. + + Therefore, declare a new deregistration entry point that does the + exact same thing, but will resolve to the same library as + implements __register_frame_info_bases. */ + +void * +__deregister_frame_info_bases (void *begin) +{ + struct object **p; + struct object *ob = 0; + + /* If .eh_frame is empty, we haven't registered. */ + if (*(uword *)begin == 0) + return ob; + + init_object_mutex_once (); + __gthread_mutex_lock (&object_mutex); + + for (p = &unseen_objects; *p ; p = &(*p)->next) + if ((*p)->u.single == begin) + { + ob = *p; + *p = ob->next; + goto out; + } + + for (p = &seen_objects; *p ; p = &(*p)->next) + if ((*p)->s.b.sorted) + { + if ((*p)->u.sort->orig_data == begin) + { + ob = *p; + *p = ob->next; + free (ob->u.sort); + goto out; + } + } + else + { + if ((*p)->u.single == begin) + { + ob = *p; + *p = ob->next; + goto out; + } + } + + __gthread_mutex_unlock (&object_mutex); + abort (); + + out: + __gthread_mutex_unlock (&object_mutex); + return (void *) ob; +} + +void * +__deregister_frame_info (void *begin) +{ + return __deregister_frame_info_bases (begin); +} + +void +__deregister_frame (void *begin) +{ + /* If .eh_frame is empty, we haven't registered. */ + if (*(uword *)begin != 0) + free (__deregister_frame_info (begin)); +} + + +/* Like base_of_encoded_value, but take the base from a struct object + instead of an _Unwind_Context. */ + +static _Unwind_Ptr +base_from_object (unsigned char encoding, struct object *ob) +{ + if (encoding == DW_EH_PE_omit) + return 0; + + switch (encoding & 0x70) + { + case DW_EH_PE_absptr: + case DW_EH_PE_pcrel: + case DW_EH_PE_aligned: + return 0; + + case DW_EH_PE_textrel: + return (_Unwind_Ptr) ob->tbase; + case DW_EH_PE_datarel: + return (_Unwind_Ptr) ob->dbase; + } + abort (); +} + +/* Return the FDE pointer encoding from the CIE. */ +/* ??? This is a subset of extract_cie_info from unwind-dw2.c. */ + +static int +get_cie_encoding (struct dwarf_cie *cie) +{ + const unsigned char *aug, *p; + _Unwind_Ptr dummy; + + aug = cie->augmentation; + if (aug[0] != 'z') + return DW_EH_PE_absptr; + + p = aug + strlen (aug) + 1; /* Skip the augmentation string. */ + p = read_uleb128 (p, &dummy); /* Skip code alignment. */ + p = read_sleb128 (p, &dummy); /* Skip data alignment. */ + p++; /* Skip return address column. */ + + aug++; /* Skip 'z' */ + p = read_uleb128 (p, &dummy); /* Skip augmentation length. */ + while (1) + { + /* This is what we're looking for. */ + if (*aug == 'R') + return *p; + /* Personality encoding and pointer. */ + else if (*aug == 'P') + { + /* ??? Avoid dereferencing indirect pointers, since we're + faking the base address. Gotta keep DW_EH_PE_aligned + intact, however. */ + p = read_encoded_value_with_base (*p & 0x7F, 0, p + 1, &dummy); + } + /* LSDA encoding. */ + else if (*aug == 'L') + p++; + /* Otherwise end of string, or unknown augmentation. */ + else + return DW_EH_PE_absptr; + aug++; + } +} + +static inline int +get_fde_encoding (struct dwarf_fde *f) +{ + return get_cie_encoding (get_cie (f)); +} + + +/* Sorting an array of FDEs by address. + (Ideally we would have the linker sort the FDEs so we don't have to do + it at run time. But the linkers are not yet prepared for this.) */ + +/* Comparison routines. Three variants of increasing complexity. */ + +static saddr +fde_unencoded_compare (struct object *ob __attribute__((unused)), + fde *x, fde *y) +{ + return *(saddr *)x->pc_begin - *(saddr *)y->pc_begin; +} + +static saddr +fde_single_encoding_compare (struct object *ob, fde *x, fde *y) +{ + _Unwind_Ptr base, x_ptr, y_ptr; + + base = base_from_object (ob->s.b.encoding, ob); + read_encoded_value_with_base (ob->s.b.encoding, base, x->pc_begin, &x_ptr); + read_encoded_value_with_base (ob->s.b.encoding, base, y->pc_begin, &y_ptr); + + return x_ptr - y_ptr; +} + +static saddr +fde_mixed_encoding_compare (struct object *ob, fde *x, fde *y) +{ + int x_encoding, y_encoding; + _Unwind_Ptr x_ptr, y_ptr; + + x_encoding = get_fde_encoding (x); + read_encoded_value_with_base (x_encoding, base_from_object (x_encoding, ob), + x->pc_begin, &x_ptr); + + y_encoding = get_fde_encoding (y); + read_encoded_value_with_base (y_encoding, base_from_object (y_encoding, ob), + y->pc_begin, &y_ptr); + + return x_ptr - y_ptr; +} + +typedef saddr (*fde_compare_t) (struct object *, fde *, fde *); + + +/* This is a special mix of insertion sort and heap sort, optimized for + the data sets that actually occur. They look like + 101 102 103 127 128 105 108 110 190 111 115 119 125 160 126 129 130. + I.e. a linearly increasing sequence (coming from functions in the text + section), with additionally a few unordered elements (coming from functions + in gnu_linkonce sections) whose values are higher than the values in the + surrounding linear sequence (but not necessarily higher than the values + at the end of the linear sequence!). + The worst-case total run time is O(N) + O(n log (n)), where N is the + total number of FDEs and n is the number of erratic ones. */ + +struct fde_accumulator +{ + struct fde_vector *linear; + struct fde_vector *erratic; +}; + +static inline int +start_fde_sort (struct fde_accumulator *accu, size_t count) +{ + size_t size; + if (! count) + return 0; + + size = sizeof (struct fde_vector) + sizeof (fde *) * count; + if ((accu->linear = (struct fde_vector *) malloc (size))) + { + accu->linear->count = 0; + if ((accu->erratic = (struct fde_vector *) malloc (size))) + accu->erratic->count = 0; + return 1; + } + else + return 0; +} + +static inline void +fde_insert (struct fde_accumulator *accu, fde *this_fde) +{ + if (accu->linear) + accu->linear->array[accu->linear->count++] = this_fde; +} + +/* Split LINEAR into a linear sequence with low values and an erratic + sequence with high values, put the linear one (of longest possible + length) into LINEAR and the erratic one into ERRATIC. This is O(N). + + Because the longest linear sequence we are trying to locate within the + incoming LINEAR array can be interspersed with (high valued) erratic + entries. We construct a chain indicating the sequenced entries. + To avoid having to allocate this chain, we overlay it onto the space of + the ERRATIC array during construction. A final pass iterates over the + chain to determine what should be placed in the ERRATIC array, and + what is the linear sequence. This overlay is safe from aliasing. */ + +static inline void +fde_split (struct object *ob, fde_compare_t fde_compare, + struct fde_vector *linear, struct fde_vector *erratic) +{ + static fde *marker; + size_t count = linear->count; + fde **chain_end = ▮ + size_t i, j, k; + + /* This should optimize out, but it is wise to make sure this assumption + is correct. Should these have different sizes, we cannot cast between + them and the overlaying onto ERRATIC will not work. */ + if (sizeof (fde *) != sizeof (fde **)) + abort (); + + for (i = 0; i < count; i++) + { + fde **probe; + + for (probe = chain_end; + probe != &marker && fde_compare (ob, linear->array[i], *probe) < 0; + probe = chain_end) + { + chain_end = (fde **)erratic->array[probe - linear->array]; + erratic->array[probe - linear->array] = NULL; + } + erratic->array[i] = (fde *)chain_end; + chain_end = &linear->array[i]; + } + + /* Each entry in LINEAR which is part of the linear sequence we have + discovered will correspond to a non-NULL entry in the chain we built in + the ERRATIC array. */ + for (i = j = k = 0; i < count; i++) + if (erratic->array[i]) + linear->array[j++] = linear->array[i]; + else + erratic->array[k++] = linear->array[i]; + linear->count = j; + erratic->count = k; +} + +/* This is O(n log(n)). BSD/OS defines heapsort in stdlib.h, so we must + use a name that does not conflict. */ + +static void +frame_heapsort (struct object *ob, fde_compare_t fde_compare, + struct fde_vector *erratic) +{ + /* For a description of this algorithm, see: + Samuel P. Harbison, Guy L. Steele Jr.: C, a reference manual, 2nd ed., + p. 60-61. */ + fde ** a = erratic->array; + /* A portion of the array is called a "heap" if for all i>=0: + If i and 2i+1 are valid indices, then a[i] >= a[2i+1]. + If i and 2i+2 are valid indices, then a[i] >= a[2i+2]. */ +#define SWAP(x,y) do { fde * tmp = x; x = y; y = tmp; } while (0) + size_t n = erratic->count; + size_t m = n; + size_t i; + + while (m > 0) + { + /* Invariant: a[m..n-1] is a heap. */ + m--; + for (i = m; 2*i+1 < n; ) + { + if (2*i+2 < n + && fde_compare (ob, a[2*i+2], a[2*i+1]) > 0 + && fde_compare (ob, a[2*i+2], a[i]) > 0) + { + SWAP (a[i], a[2*i+2]); + i = 2*i+2; + } + else if (fde_compare (ob, a[2*i+1], a[i]) > 0) + { + SWAP (a[i], a[2*i+1]); + i = 2*i+1; + } + else + break; + } + } + while (n > 1) + { + /* Invariant: a[0..n-1] is a heap. */ + n--; + SWAP (a[0], a[n]); + for (i = 0; 2*i+1 < n; ) + { + if (2*i+2 < n + && fde_compare (ob, a[2*i+2], a[2*i+1]) > 0 + && fde_compare (ob, a[2*i+2], a[i]) > 0) + { + SWAP (a[i], a[2*i+2]); + i = 2*i+2; + } + else if (fde_compare (ob, a[2*i+1], a[i]) > 0) + { + SWAP (a[i], a[2*i+1]); + i = 2*i+1; + } + else + break; + } + } +#undef SWAP +} + +/* Merge V1 and V2, both sorted, and put the result into V1. */ +static inline void +fde_merge (struct object *ob, fde_compare_t fde_compare, + struct fde_vector *v1, struct fde_vector *v2) +{ + size_t i1, i2; + fde * fde2; + + i2 = v2->count; + if (i2 > 0) + { + i1 = v1->count; + do { + i2--; + fde2 = v2->array[i2]; + while (i1 > 0 && fde_compare (ob, v1->array[i1-1], fde2) > 0) + { + v1->array[i1+i2] = v1->array[i1-1]; + i1--; + } + v1->array[i1+i2] = fde2; + } while (i2 > 0); + v1->count += v2->count; + } +} + +static inline void +end_fde_sort (struct object *ob, struct fde_accumulator *accu, size_t count) +{ + fde_compare_t fde_compare; + + if (accu->linear && accu->linear->count != count) + abort (); + + if (ob->s.b.mixed_encoding) + fde_compare = fde_mixed_encoding_compare; + else if (ob->s.b.encoding == DW_EH_PE_absptr) + fde_compare = fde_unencoded_compare; + else + fde_compare = fde_single_encoding_compare; + + if (accu->erratic) + { + fde_split (ob, fde_compare, accu->linear, accu->erratic); + if (accu->linear->count + accu->erratic->count != count) + abort (); + frame_heapsort (ob, fde_compare, accu->erratic); + fde_merge (ob, fde_compare, accu->linear, accu->erratic); + free (accu->erratic); + } + else + { + /* We've not managed to malloc an erratic array, + so heap sort in the linear one. */ + frame_heapsort (ob, fde_compare, accu->linear); + } +} + + +/* Update encoding, mixed_encoding, and pc_begin for OB for the + fde array beginning at THIS_FDE. Return the number of fdes + encountered along the way. */ + +static size_t +classify_object_over_fdes (struct object *ob, fde *this_fde) +{ + struct dwarf_cie *last_cie = 0; + size_t count = 0; + int encoding = DW_EH_PE_absptr; + _Unwind_Ptr base = 0; + + for (; this_fde->length != 0; this_fde = next_fde (this_fde)) + { + struct dwarf_cie *this_cie; + _Unwind_Ptr mask, pc_begin; + + /* Skip CIEs. */ + if (this_fde->CIE_delta == 0) + continue; + + /* Determine the encoding for this FDE. Note mixed encoded + objects for later. */ + this_cie = get_cie (this_fde); + if (this_cie != last_cie) + { + last_cie = this_cie; + encoding = get_cie_encoding (this_cie); + base = base_from_object (encoding, ob); + if (ob->s.b.encoding == DW_EH_PE_omit) + ob->s.b.encoding = encoding; + else if (ob->s.b.encoding != encoding) + ob->s.b.mixed_encoding = 1; + } + + read_encoded_value_with_base (encoding, base, this_fde->pc_begin, + &pc_begin); + + /* Take care to ignore link-once functions that were removed. + In these cases, the function address will be NULL, but if + the encoding is smaller than a pointer a true NULL may not + be representable. Assume 0 in the representable bits is NULL. */ + mask = size_of_encoded_value (encoding); + if (mask < sizeof (void *)) + mask = (1L << (mask << 3)) - 1; + else + mask = -1; + + if ((pc_begin & mask) == 0) + continue; + + count += 1; + if ((void *)pc_begin < ob->pc_begin) + ob->pc_begin = (void *)pc_begin; + } + + return count; +} + +static void +add_fdes (struct object *ob, struct fde_accumulator *accu, fde *this_fde) +{ + struct dwarf_cie *last_cie = 0; + int encoding = ob->s.b.encoding; + _Unwind_Ptr base = base_from_object (ob->s.b.encoding, ob); + + for (; this_fde->length != 0; this_fde = next_fde (this_fde)) + { + struct dwarf_cie *this_cie; + + /* Skip CIEs. */ + if (this_fde->CIE_delta == 0) + continue; + + if (ob->s.b.mixed_encoding) + { + /* Determine the encoding for this FDE. Note mixed encoded + objects for later. */ + this_cie = get_cie (this_fde); + if (this_cie != last_cie) + { + last_cie = this_cie; + encoding = get_cie_encoding (this_cie); + base = base_from_object (encoding, ob); + } + } + + if (encoding == DW_EH_PE_absptr) + { + if (*(_Unwind_Ptr *)this_fde->pc_begin == 0) + continue; + } + else + { + _Unwind_Ptr pc_begin, mask; + + read_encoded_value_with_base (encoding, base, this_fde->pc_begin, + &pc_begin); + + /* Take care to ignore link-once functions that were removed. + In these cases, the function address will be NULL, but if + the encoding is smaller than a pointer a true NULL may not + be representable. Assume 0 in the representable bits is NULL. */ + mask = size_of_encoded_value (encoding); + if (mask < sizeof (void *)) + mask = (1L << (mask << 3)) - 1; + else + mask = -1; + + if ((pc_begin & mask) == 0) + continue; + } + + fde_insert (accu, this_fde); + } +} + +/* Set up a sorted array of pointers to FDEs for a loaded object. We + count up the entries before allocating the array because it's likely to + be faster. We can be called multiple times, should we have failed to + allocate a sorted fde array on a previous occasion. */ + +static inline void +init_object (struct object* ob) +{ + struct fde_accumulator accu; + size_t count; + + count = ob->s.b.count; + if (count == 0) + { + if (ob->s.b.from_array) + { + fde **p = ob->u.array; + for (count = 0; *p; ++p) + count += classify_object_over_fdes (ob, *p); + } + else + count = classify_object_over_fdes (ob, ob->u.single); + + /* The count field we have in the main struct object is somewhat + limited, but should suffice for virtually all cases. If the + counted value doesn't fit, re-write a zero. The worst that + happens is that we re-count next time -- admittedly non-trivial + in that this implies some 2M fdes, but at least we function. */ + ob->s.b.count = count; + if (ob->s.b.count != count) + ob->s.b.count = 0; + } + + if (!start_fde_sort (&accu, count)) + return; + + if (ob->s.b.from_array) + { + fde **p; + for (p = ob->u.array; *p; ++p) + add_fdes (ob, &accu, *p); + } + else + add_fdes (ob, &accu, ob->u.single); + + end_fde_sort (ob, &accu, count); + + /* Save the original fde pointer, since this is the key by which the + DSO will deregister the object. */ + accu.linear->orig_data = ob->u.single; + ob->u.sort = accu.linear; + + ob->s.b.sorted = 1; +} + +/* A linear search through a set of FDEs for the given PC. This is + used when there was insufficient memory to allocate and sort an + array. */ + +static fde * +linear_search_fdes (struct object *ob, fde *this_fde, void *pc) +{ + struct dwarf_cie *last_cie = 0; + int encoding = ob->s.b.encoding; + _Unwind_Ptr base = base_from_object (ob->s.b.encoding, ob); + + for (; this_fde->length != 0; this_fde = next_fde (this_fde)) + { + struct dwarf_cie *this_cie; + _Unwind_Ptr pc_begin, pc_range; + + /* Skip CIEs. */ + if (this_fde->CIE_delta == 0) + continue; + + if (ob->s.b.mixed_encoding) + { + /* Determine the encoding for this FDE. Note mixed encoded + objects for later. */ + this_cie = get_cie (this_fde); + if (this_cie != last_cie) + { + last_cie = this_cie; + encoding = get_cie_encoding (this_cie); + base = base_from_object (encoding, ob); + } + } + + if (encoding == DW_EH_PE_absptr) + { + pc_begin = ((_Unwind_Ptr *)this_fde->pc_begin)[0]; + pc_range = ((_Unwind_Ptr *)this_fde->pc_begin)[1]; + if (pc_begin == 0) + continue; + } + else + { + _Unwind_Ptr mask; + const char *p; + + p = read_encoded_value_with_base (encoding, base, + this_fde->pc_begin, &pc_begin); + read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range); + + /* Take care to ignore link-once functions that were removed. + In these cases, the function address will be NULL, but if + the encoding is smaller than a pointer a true NULL may not + be representable. Assume 0 in the representable bits is NULL. */ + mask = size_of_encoded_value (encoding); + if (mask < sizeof (void *)) + mask = (1L << (mask << 3)) - 1; + else + mask = -1; + + if ((pc_begin & mask) == 0) + continue; + } + + if ((_Unwind_Ptr)pc - pc_begin < pc_range) + return this_fde; + } + + return NULL; +} + +/* Binary search for an FDE containing the given PC. Here are three + implementations of increasing complexity. */ + +static inline fde * +binary_search_unencoded_fdes (struct object *ob, void *pc) +{ + struct fde_vector *vec = ob->u.sort; + size_t lo, hi; + + for (lo = 0, hi = vec->count; lo < hi; ) + { + size_t i = (lo + hi) / 2; + fde *f = vec->array[i]; + void *pc_begin; + uaddr pc_range; + + pc_begin = ((void **)f->pc_begin)[0]; + pc_range = ((uaddr *)f->pc_begin)[1]; + + if (pc < pc_begin) + hi = i; + else if (pc >= pc_begin + pc_range) + lo = i + 1; + else + return f; + } + + return NULL; +} + +static inline fde * +binary_search_single_encoding_fdes (struct object *ob, void *pc) +{ + struct fde_vector *vec = ob->u.sort; + int encoding = ob->s.b.encoding; + _Unwind_Ptr base = base_from_object (encoding, ob); + size_t lo, hi; + + for (lo = 0, hi = vec->count; lo < hi; ) + { + size_t i = (lo + hi) / 2; + fde *f = vec->array[i]; + _Unwind_Ptr pc_begin, pc_range; + const char *p; + + p = read_encoded_value_with_base (encoding, base, f->pc_begin, + &pc_begin); + read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range); + + if ((_Unwind_Ptr)pc < pc_begin) + hi = i; + else if ((_Unwind_Ptr)pc >= pc_begin + pc_range) + lo = i + 1; + else + return f; + } + + return NULL; +} + +static inline fde * +binary_search_mixed_encoding_fdes (struct object *ob, void *pc) +{ + struct fde_vector *vec = ob->u.sort; + size_t lo, hi; + + for (lo = 0, hi = vec->count; lo < hi; ) + { + size_t i = (lo + hi) / 2; + fde *f = vec->array[i]; + _Unwind_Ptr pc_begin, pc_range; + const char *p; + int encoding; + + encoding = get_fde_encoding (f); + p = read_encoded_value_with_base (encoding, + base_from_object (encoding, ob), + f->pc_begin, &pc_begin); + read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range); + + if ((_Unwind_Ptr)pc < pc_begin) + hi = i; + else if ((_Unwind_Ptr)pc >= pc_begin + pc_range) + lo = i + 1; + else + return f; + } + + return NULL; +} + +static fde * +search_object (struct object* ob, void *pc) +{ + /* If the data hasn't been sorted, try to do this now. We may have + more memory available than last time we tried. */ + if (! ob->s.b.sorted) + { + init_object (ob); + + /* Despite the above comment, the normal reason to get here is + that we've not processed this object before. A quick range + check is in order. */ + if (pc < ob->pc_begin) + return NULL; + } + + if (ob->s.b.sorted) + { + if (ob->s.b.mixed_encoding) + return binary_search_mixed_encoding_fdes (ob, pc); + else if (ob->s.b.encoding == DW_EH_PE_absptr) + return binary_search_unencoded_fdes (ob, pc); + else + return binary_search_single_encoding_fdes (ob, pc); + } + else + { + /* Long slow labourious linear search, cos we've no memory. */ + if (ob->s.b.from_array) + { + fde **p; + for (p = ob->u.array; *p ; p++) + { + fde *f = linear_search_fdes (ob, *p, pc); + if (f) + return f; + } + return NULL; + } + else + return linear_search_fdes (ob, ob->u.single, pc); + } +} + +fde * +_Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) +{ + struct object *ob; + fde *f = NULL; + + init_object_mutex_once (); + __gthread_mutex_lock (&object_mutex); + + /* Linear search through the classified objects, to find the one + containing the pc. Note that pc_begin is sorted descending, and + we expect objects to be non-overlapping. */ + for (ob = seen_objects; ob; ob = ob->next) + if (pc >= ob->pc_begin) + { + f = search_object (ob, pc); + if (f) + goto fini; + break; + } + + /* Classify and search the objects we've not yet processed. */ + while ((ob = unseen_objects)) + { + struct object **p; + + unseen_objects = ob->next; + f = search_object (ob, pc); + + /* Insert the object into the classified list. */ + for (p = &seen_objects; *p ; p = &(*p)->next) + if ((*p)->pc_begin < ob->pc_begin) + break; + ob->next = *p; + *p = ob; + + if (f) + goto fini; + } + + fini: + __gthread_mutex_unlock (&object_mutex); + + if (f) + { + int encoding; + + bases->tbase = ob->tbase; + bases->dbase = ob->dbase; + + encoding = ob->s.b.encoding; + if (ob->s.b.mixed_encoding) + encoding = get_fde_encoding (f); + read_encoded_value_with_base (encoding, base_from_object (encoding, ob), + f->pc_begin, (_Unwind_Ptr *)&bases->func); + } + + return f; +} + +#endif diff -durpN glibc-2.2.4/sysdeps/generic/unwind-dw2-fde.h glibc-2.2.5/sysdeps/generic/unwind-dw2-fde.h --- glibc-2.2.4/sysdeps/generic/unwind-dw2-fde.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/unwind-dw2-fde.h Thu Nov 15 17:18:18 2001 @@ -0,0 +1,165 @@ +/* Subroutines needed for unwinding stack frames for exception handling. */ +/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Contributed by Jason Merrill . + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file into combinations with other programs, +and to distribute those combinations without any restriction coming +from the use of this file. (The General Public License restrictions +do apply in other respects; for example, they cover modification of +the file, and distribution when not linked into a combine +executable.) + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + + +struct fde_vector +{ + void *orig_data; + size_t count; + struct dwarf_fde *array __flexarr; +}; + +#ifdef _LIBC +#include +#else +struct object +{ + void *pc_begin; + void *tbase; + void *dbase; + union { + struct dwarf_fde *single; + struct dwarf_fde **array; + struct fde_vector *sort; + } u; + + union { + struct { + unsigned long sorted : 1; + unsigned long from_array : 1; + unsigned long mixed_encoding : 1; + unsigned long encoding : 8; + /* ??? Wish there was an easy way to detect a 64-bit host here; + we've got 32 bits left to play with... */ + unsigned long count : 21; + } b; + size_t i; + } s; + + struct object *next; +}; +#endif + +/* This is the original definition of struct object. While the struct + itself was opaque to users, they did know how large it was, and + allocate one statically in crtbegin for each DSO. Keep this around + so that we're aware of the static size limitations for the new struct. */ +struct old_object +{ + void *pc_begin; + void *pc_end; + struct dwarf_fde *fde_begin; + struct dwarf_fde **fde_array; + size_t count; + struct old_object *next; +}; + +struct dwarf_eh_bases +{ + void *tbase; + void *dbase; + void *func; +}; + + +extern void __register_frame_info_bases (void *, struct object *, + void *, void *); +extern void __register_frame_info (void *, struct object *); +extern void __register_frame (void *); +extern void __register_frame_info_table_bases (void *, struct object *, + void *, void *); +extern void __register_frame_info_table (void *, struct object *); +extern void __register_frame_table (void *); +extern void *__deregister_frame_info (void *); +extern void *__deregister_frame_info_bases (void *); +extern void __deregister_frame (void *); + + +typedef int sword __attribute__ ((mode (SI))); +typedef unsigned int uword __attribute__ ((mode (SI))); +typedef unsigned int uaddr __attribute__ ((mode (pointer))); +typedef int saddr __attribute__ ((mode (pointer))); +typedef unsigned char ubyte; + +/* Terminology: + CIE - Common Information Element + FDE - Frame Descriptor Element + + There is one per function, and it describes where the function code + is located, and what the register lifetimes and stack layout are + within the function. + + The data structures are defined in the DWARF specfication, although + not in a very readable way (see LITERATURE). + + Every time an exception is thrown, the code needs to locate the FDE + for the current function, and starts to look for exception regions + from that FDE. This works in a two-level search: + a) in a linear search, find the shared image (i.e. DLL) containing + the PC + b) using the FDE table for that shared object, locate the FDE using + binary search (which requires the sorting). */ + +/* The first few fields of a CIE. The CIE_id field is 0 for a CIE, + to distinguish it from a valid FDE. FDEs are aligned to an addressing + unit boundary, but the fields within are unaligned. */ +struct dwarf_cie +{ + uword length; + sword CIE_id; + ubyte version; + unsigned char augmentation __flexarr; +} __attribute__ ((packed, aligned (__alignof__ (void *)))); + +/* The first few fields of an FDE. */ +struct dwarf_fde +{ + uword length; + sword CIE_delta; + unsigned char pc_begin __flexarr; +} __attribute__ ((packed, aligned (__alignof__ (void *)))); + +typedef struct dwarf_fde fde; + +/* Locate the CIE for a given FDE. */ + +static inline struct dwarf_cie * +get_cie (struct dwarf_fde *f) +{ + return (void *)&f->CIE_delta - f->CIE_delta; +} + +static inline fde * +next_fde (fde *f) +{ + return (fde *)((char *)f + f->length + sizeof (f->length)); +} + +extern fde * _Unwind_Find_FDE (void *, struct dwarf_eh_bases *); diff -durpN glibc-2.2.4/sysdeps/generic/unwind-dw2.c glibc-2.2.5/sysdeps/generic/unwind-dw2.c --- glibc-2.2.4/sysdeps/generic/unwind-dw2.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/unwind-dw2.c Mon Jan 7 22:30:43 2002 @@ -0,0 +1,1207 @@ +/* DWARF2 exception handling and frame unwind runtime interface routines. + Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef _LIBC +#include +#include +#include +#include +#include +#include +#include +#include +#else +#include "tconfig.h" +#include "tsystem.h" +#include "dwarf2.h" +#include "unwind.h" +#include "unwind-pe.h" +#include "unwind-dw2-fde.h" +#include "gthr.h" +#endif + +#if !USING_SJLJ_EXCEPTIONS + +#ifndef STACK_GROWS_DOWNWARD +#define STACK_GROWS_DOWNWARD 0 +#else +#undef STACK_GROWS_DOWNWARD +#define STACK_GROWS_DOWNWARD 1 +#endif + +/* A target can override (perhaps for backward compatibility) how + many dwarf2 columns are unwound. */ +#ifndef DWARF_FRAME_REGISTERS +#define DWARF_FRAME_REGISTERS FIRST_PSEUDO_REGISTER +#endif + +/* This is the register and unwind state for a particular frame. */ +struct _Unwind_Context +{ + void *reg[DWARF_FRAME_REGISTERS+1]; + void *cfa; + void *ra; + void *lsda; + struct dwarf_eh_bases bases; + _Unwind_Word args_size; +}; + +#ifndef _LIBC +/* Byte size of every register managed by these routines. */ +static unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS]; +#endif + + +/* The result of interpreting the frame unwind info for a frame. + This is all symbolic at this point, as none of the values can + be resolved until the target pc is located. */ +typedef struct +{ + /* Each register save state can be described in terms of a CFA slot, + another register, or a location expression. */ + struct frame_state_reg_info + { + struct { + union { + unsigned int reg; + _Unwind_Sword offset; + const unsigned char *exp; + } loc; + enum { + REG_UNSAVED, + REG_SAVED_OFFSET, + REG_SAVED_REG, + REG_SAVED_EXP, + } how; + } reg[DWARF_FRAME_REGISTERS+1]; + + /* Used to implement DW_CFA_remember_state. */ + struct frame_state_reg_info *prev; + } regs; + + /* The CFA can be described in terms of a reg+offset or a + location expression. */ + _Unwind_Sword cfa_offset; + _Unwind_Word cfa_reg; + const unsigned char *cfa_exp; + enum { + CFA_UNSET, + CFA_REG_OFFSET, + CFA_EXP, + } cfa_how; + + /* The PC described by the current frame state. */ + void *pc; + + /* The information we care about from the CIE/FDE. */ + _Unwind_Personality_Fn personality; + signed int data_align; + unsigned int code_align; + unsigned char retaddr_column; + unsigned char fde_encoding; + unsigned char lsda_encoding; + unsigned char saw_z; + void *eh_ptr; +} _Unwind_FrameState; + +/* Read unaligned data from the instruction buffer. */ + +union unaligned +{ + void *p; + unsigned u2 __attribute__ ((mode (HI))); + unsigned u4 __attribute__ ((mode (SI))); + unsigned u8 __attribute__ ((mode (DI))); + signed s2 __attribute__ ((mode (HI))); + signed s4 __attribute__ ((mode (SI))); + signed s8 __attribute__ ((mode (DI))); +} __attribute__ ((packed)); + +static inline void * +read_pointer (const void *p) { const union unaligned *up = p; return up->p; } + +static inline int +read_1u (const void *p) { return *(const unsigned char *)p; } + +static inline int +read_1s (const void *p) { return *(const signed char *)p; } + +static inline int +read_2u (const void *p) { const union unaligned *up = p; return up->u2; } + +static inline int +read_2s (const void *p) { const union unaligned *up = p; return up->s2; } + +static inline unsigned int +read_4u (const void *p) { const union unaligned *up = p; return up->u4; } + +static inline int +read_4s (const void *p) { const union unaligned *up = p; return up->s4; } + +static inline unsigned long +read_8u (const void *p) { const union unaligned *up = p; return up->u8; } + +static inline unsigned long +read_8s (const void *p) { const union unaligned *up = p; return up->s8; } + +/* Get the value of register REG as saved in CONTEXT. */ + +inline _Unwind_Word +_Unwind_GetGR (struct _Unwind_Context *context, int index) +{ + /* This will segfault if the register hasn't been saved. */ + return * (_Unwind_Word *) context->reg[index]; +} + +/* Overwrite the saved value for register REG in CONTEXT with VAL. */ + +inline void +_Unwind_SetGR (struct _Unwind_Context *context, int index, _Unwind_Word val) +{ + * (_Unwind_Word *) context->reg[index] = val; +} + +/* Retrieve the return address for CONTEXT. */ + +inline _Unwind_Ptr +_Unwind_GetIP (struct _Unwind_Context *context) +{ + return (_Unwind_Ptr) context->ra; +} + +/* Overwrite the return address for CONTEXT with VAL. */ + +inline void +_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val) +{ + context->ra = (void *) val; +} + +void * +_Unwind_GetLanguageSpecificData (struct _Unwind_Context *context) +{ + return context->lsda; +} + +_Unwind_Ptr +_Unwind_GetRegionStart (struct _Unwind_Context *context) +{ + return (_Unwind_Ptr) context->bases.func; +} + +#ifndef __ia64__ +_Unwind_Ptr +_Unwind_GetDataRelBase (struct _Unwind_Context *context) +{ + return (_Unwind_Ptr) context->bases.dbase; +} + +_Unwind_Ptr +_Unwind_GetTextRelBase (struct _Unwind_Context *context) +{ + return (_Unwind_Ptr) context->bases.tbase; +} +#endif + +/* Extract any interesting information from the CIE for the translation + unit F belongs to. Return a pointer to the byte after the augmentation, + or NULL if we encountered an undecipherable augmentation. */ + +static const unsigned char * +extract_cie_info (struct dwarf_cie *cie, struct _Unwind_Context *context, + _Unwind_FrameState *fs) +{ + const unsigned char *aug = cie->augmentation; + const unsigned char *p = aug + strlen (aug) + 1; + const unsigned char *ret = NULL; + _Unwind_Ptr tmp; + + /* g++ v2 "eh" has pointer immediately following augmentation string, + so it must be handled first. */ + if (aug[0] == 'e' && aug[1] == 'h') + { + fs->eh_ptr = read_pointer (p); + p += sizeof (void *); + aug += 2; + } + + /* Immediately following the augmentation are the code and + data alignment and return address column. */ + p = read_uleb128 (p, &tmp); fs->code_align = tmp; + p = read_sleb128 (p, &tmp); fs->data_align = (saddr) tmp; + fs->retaddr_column = *p++; + fs->lsda_encoding = DW_EH_PE_omit; + + /* If the augmentation starts with 'z', then a uleb128 immediately + follows containing the length of the augmentation field following + the size. */ + if (*aug == 'z') + { + p = read_uleb128 (p, &tmp); + ret = p + tmp; + + fs->saw_z = 1; + ++aug; + } + + /* Iterate over recognized augmentation subsequences. */ + while (*aug != '\0') + { + /* "L" indicates a byte showing how the LSDA pointer is encoded. */ + if (aug[0] == 'L') + { + fs->lsda_encoding = *p++; + aug += 1; + } + + /* "R" indicates a byte indicating how FDE addresses are encoded. */ + else if (aug[0] == 'R') + { + fs->fde_encoding = *p++; + aug += 1; + } + + /* "P" indicates a personality routine in the CIE augmentation. */ + else if (aug[0] == 'P') + { + p = read_encoded_value (context, *p, p + 1, + (_Unwind_Ptr *) &fs->personality); + aug += 1; + } + + /* Otherwise we have an unknown augmentation string. + Bail unless we saw a 'z' prefix. */ + else + return ret; + } + + return ret ? ret : p; +} + +#ifndef _LIBC +/* Decode a DW_OP stack program. Return the top of stack. Push INITIAL + onto the stack to start. */ + +static _Unwind_Word +execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end, + struct _Unwind_Context *context, _Unwind_Word initial) +{ + _Unwind_Word stack[64]; /* ??? Assume this is enough. */ + int stack_elt; + + stack[0] = initial; + stack_elt = 1; + + while (op_ptr < op_end) + { + enum dwarf_location_atom op = *op_ptr++; + _Unwind_Word result = 0, reg; + _Unwind_Sword offset; + _Unwind_Ptr ptrtmp; + + switch (op) + { + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + result = op - DW_OP_lit0; + break; + + case DW_OP_addr: + result = (_Unwind_Word) (_Unwind_Ptr) read_pointer (op_ptr); + op_ptr += sizeof (void *); + break; + + case DW_OP_const1u: + result = read_1u (op_ptr); + op_ptr += 1; + break; + case DW_OP_const1s: + result = read_1s (op_ptr); + op_ptr += 1; + break; + case DW_OP_const2u: + result = read_2u (op_ptr); + op_ptr += 2; + break; + case DW_OP_const2s: + result = read_2s (op_ptr); + op_ptr += 2; + break; + case DW_OP_const4u: + result = read_4u (op_ptr); + op_ptr += 4; + break; + case DW_OP_const4s: + result = read_4s (op_ptr); + op_ptr += 4; + break; + case DW_OP_const8u: + result = read_8u (op_ptr); + op_ptr += 8; + break; + case DW_OP_const8s: + result = read_8s (op_ptr); + op_ptr += 8; + break; + case DW_OP_constu: + op_ptr = read_uleb128 (op_ptr, &ptrtmp); + result = ptrtmp; + break; + case DW_OP_consts: + op_ptr = read_sleb128 (op_ptr, &ptrtmp); + result = (saddr)ptrtmp; + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + result = _Unwind_GetGR (context, op - DW_OP_reg0); + break; + case DW_OP_regx: + op_ptr = read_uleb128 (op_ptr, &ptrtmp); reg = ptrtmp; + result = _Unwind_GetGR (context, reg); + break; + + case DW_OP_breg0: + case DW_OP_breg1: + case DW_OP_breg2: + case DW_OP_breg3: + case DW_OP_breg4: + case DW_OP_breg5: + case DW_OP_breg6: + case DW_OP_breg7: + case DW_OP_breg8: + case DW_OP_breg9: + case DW_OP_breg10: + case DW_OP_breg11: + case DW_OP_breg12: + case DW_OP_breg13: + case DW_OP_breg14: + case DW_OP_breg15: + case DW_OP_breg16: + case DW_OP_breg17: + case DW_OP_breg18: + case DW_OP_breg19: + case DW_OP_breg20: + case DW_OP_breg21: + case DW_OP_breg22: + case DW_OP_breg23: + case DW_OP_breg24: + case DW_OP_breg25: + case DW_OP_breg26: + case DW_OP_breg27: + case DW_OP_breg28: + case DW_OP_breg29: + case DW_OP_breg30: + case DW_OP_breg31: + op_ptr = read_sleb128 (op_ptr, &ptrtmp); offset = (saddr)ptrtmp; + result = _Unwind_GetGR (context, op - DW_OP_breg0) + offset; + break; + case DW_OP_bregx: + op_ptr = read_uleb128 (op_ptr, &ptrtmp); reg = ptrtmp; + op_ptr = read_sleb128 (op_ptr, &ptrtmp); offset = (saddr)ptrtmp; + result = _Unwind_GetGR (context, reg) + offset; + break; + + case DW_OP_dup: + if (stack_elt < 1) + abort (); + result = stack[stack_elt - 1]; + break; + + case DW_OP_drop: + if (--stack_elt < 0) + abort (); + goto no_push; + + case DW_OP_pick: + offset = *op_ptr++; + if (offset >= stack_elt - 1) + abort (); + result = stack[stack_elt - 1 - offset]; + break; + + case DW_OP_over: + if (stack_elt < 2) + abort (); + result = stack[stack_elt - 2]; + break; + + case DW_OP_rot: + { + _Unwind_Word t1, t2, t3; + + if (stack_elt < 3) + abort (); + t1 = stack[stack_elt - 1]; + t2 = stack[stack_elt - 2]; + t3 = stack[stack_elt - 3]; + stack[stack_elt - 1] = t2; + stack[stack_elt - 2] = t3; + stack[stack_elt - 3] = t1; + goto no_push; + } + + case DW_OP_deref: + case DW_OP_deref_size: + case DW_OP_abs: + case DW_OP_neg: + case DW_OP_not: + case DW_OP_plus_uconst: + /* Unary operations. */ + if (--stack_elt < 0) + abort (); + result = stack[stack_elt]; + + switch (op) + { + case DW_OP_deref: + { + void *ptr = (void *)(_Unwind_Ptr) result; + result = (_Unwind_Ptr) read_pointer (ptr); + } + break; + + case DW_OP_deref_size: + { + void *ptr = (void *)(_Unwind_Ptr) result; + switch (*op_ptr++) + { + case 1: + result = read_1u (ptr); + break; + case 2: + result = read_2u (ptr); + break; + case 4: + result = read_4u (ptr); + break; + case 8: + result = read_8u (ptr); + break; + default: + abort (); + } + } + break; + + case DW_OP_abs: + if ((_Unwind_Sword) result < 0) + result = -result; + break; + case DW_OP_neg: + result = -result; + break; + case DW_OP_not: + result = ~result; + break; + case DW_OP_plus_uconst: + op_ptr = read_uleb128 (op_ptr, &ptrtmp); reg = ptrtmp; + result += reg; + break; + /* Avoid warnings. */ + default: + break; + } + break; + + case DW_OP_and: + case DW_OP_div: + case DW_OP_minus: + case DW_OP_mod: + case DW_OP_mul: + case DW_OP_or: + case DW_OP_plus: + case DW_OP_le: + case DW_OP_ge: + case DW_OP_eq: + case DW_OP_lt: + case DW_OP_gt: + case DW_OP_ne: + { + /* Binary operations. */ + _Unwind_Word first, second; + if ((stack_elt -= 2) < 0) + abort (); + second = stack[stack_elt]; + first = stack[stack_elt + 1]; + + switch (op) + { + case DW_OP_and: + result = second & first; + break; + case DW_OP_div: + result = (_Unwind_Sword)second / (_Unwind_Sword)first; + break; + case DW_OP_minus: + result = second - first; + break; + case DW_OP_mod: + result = (_Unwind_Sword)second % (_Unwind_Sword)first; + break; + case DW_OP_mul: + result = second * first; + break; + case DW_OP_or: + result = second | first; + break; + case DW_OP_plus: + result = second + first; + break; + case DW_OP_shl: + result = second << first; + break; + case DW_OP_shr: + result = second >> first; + break; + case DW_OP_shra: + result = (_Unwind_Sword)second >> first; + break; + case DW_OP_xor: + result = second ^ first; + break; + case DW_OP_le: + result = (_Unwind_Sword)first <= (_Unwind_Sword)second; + break; + case DW_OP_ge: + result = (_Unwind_Sword)first >= (_Unwind_Sword)second; + break; + case DW_OP_eq: + result = (_Unwind_Sword)first == (_Unwind_Sword)second; + break; + case DW_OP_lt: + result = (_Unwind_Sword)first < (_Unwind_Sword)second; + break; + case DW_OP_gt: + result = (_Unwind_Sword)first > (_Unwind_Sword)second; + break; + case DW_OP_ne: + result = (_Unwind_Sword)first != (_Unwind_Sword)second; + break; + default: + /* Avoid warnings. */ + break; + } + } + break; + + case DW_OP_skip: + offset = read_2s (op_ptr); + op_ptr += 2; + op_ptr += offset; + goto no_push; + + case DW_OP_bra: + if (--stack_elt < 0) + abort (); + offset = read_2s (op_ptr); + op_ptr += 2; + if (stack[stack_elt] != 0) + op_ptr += offset; + goto no_push; + + case DW_OP_nop: + goto no_push; + + default: + abort (); + } + + /* Most things push a result value. */ + if ((size_t) stack_elt >= sizeof(stack)/sizeof(*stack)) + abort (); + stack[++stack_elt] = result; + no_push:; + } + + /* We were executing this program to get a value. It should be + at top of stack. */ + if (--stack_elt < 0) + abort (); + return stack[stack_elt]; +} +#endif + +/* Decode DWARF 2 call frame information. Takes pointers the + instruction sequence to decode, current register information and + CIE info, and the PC range to evaluate. */ + +static void +execute_cfa_program (const unsigned char *insn_ptr, + const unsigned char *insn_end, + struct _Unwind_Context *context, + _Unwind_FrameState *fs) +{ + struct frame_state_reg_info *unused_rs = NULL; + + /* Don't allow remember/restore between CIE and FDE programs. */ + fs->regs.prev = NULL; + + while (insn_ptr < insn_end && fs->pc < context->ra) + { + unsigned char insn = *insn_ptr++; + _Unwind_Word reg; + _Unwind_Sword offset; + _Unwind_Ptr ptrtmp; + + if ((insn & 0xc0) == DW_CFA_advance_loc) + fs->pc += (insn & 0x3f) * fs->code_align; + else if ((insn & 0xc0) == DW_CFA_offset) + { + reg = insn & 0x3f; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + offset = ptrtmp * fs->data_align; + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + } + else if ((insn & 0xc0) == DW_CFA_restore) + { + reg = insn & 0x3f; + fs->regs.reg[reg].how = REG_UNSAVED; + } + else switch (insn) + { + case DW_CFA_set_loc: + insn_ptr = read_encoded_value (context, fs->fde_encoding, + insn_ptr, (_Unwind_Ptr *) &fs->pc); + break; + + case DW_CFA_advance_loc1: + fs->pc += read_1u (insn_ptr) * fs->code_align; + insn_ptr += 1; + break; + case DW_CFA_advance_loc2: + fs->pc += read_2u (insn_ptr) * fs->code_align; + insn_ptr += 2; + break; + case DW_CFA_advance_loc4: + fs->pc += read_4u (insn_ptr) * fs->code_align; + insn_ptr += 4; + break; + + case DW_CFA_offset_extended: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg = ptrtmp; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + offset = ptrtmp * fs->data_align; + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + break; + + case DW_CFA_restore_extended: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg = ptrtmp; + fs->regs.reg[reg].how = REG_UNSAVED; + break; + + case DW_CFA_undefined: + case DW_CFA_same_value: + case DW_CFA_nop: + break; + + case DW_CFA_register: + { + _Unwind_Word reg2; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg = ptrtmp; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg2 = ptrtmp; + fs->regs.reg[reg].how = REG_SAVED_REG; + fs->regs.reg[reg].loc.reg = reg2; + } + break; + + case DW_CFA_remember_state: + { + struct frame_state_reg_info *new_rs; + if (unused_rs) + { + new_rs = unused_rs; + unused_rs = unused_rs->prev; + } + else + new_rs = alloca (sizeof (struct frame_state_reg_info)); + + *new_rs = fs->regs; + fs->regs.prev = new_rs; + } + break; + + case DW_CFA_restore_state: + { + struct frame_state_reg_info *old_rs = fs->regs.prev; + fs->regs = *old_rs; + old_rs->prev = unused_rs; + unused_rs = old_rs; + } + break; + + case DW_CFA_def_cfa: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_reg = ptrtmp; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_offset = ptrtmp; + fs->cfa_how = CFA_REG_OFFSET; + break; + + case DW_CFA_def_cfa_register: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_reg = ptrtmp; + fs->cfa_how = CFA_REG_OFFSET; + break; + + case DW_CFA_def_cfa_offset: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_offset = ptrtmp; + /* cfa_how deliberately not set. */ + break; + + case DW_CFA_def_cfa_expression: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_exp = insn_ptr; + fs->cfa_how = CFA_EXP; + insn_ptr += ptrtmp; + break; + + case DW_CFA_expression: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg = ptrtmp; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->regs.reg[reg].how = REG_SAVED_EXP; + fs->regs.reg[reg].loc.exp = insn_ptr; + insn_ptr += ptrtmp; + break; + + /* From the 2.1 draft. */ + case DW_CFA_offset_extended_sf: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg = ptrtmp; + insn_ptr = read_sleb128 (insn_ptr, &ptrtmp); + offset = (saddr)ptrtmp * fs->data_align; + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + break; + + case DW_CFA_def_cfa_sf: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_reg = ptrtmp; + insn_ptr = read_sleb128 (insn_ptr, &ptrtmp); + fs->cfa_offset = (saddr)ptrtmp; + fs->cfa_how = CFA_REG_OFFSET; + break; + + case DW_CFA_def_cfa_offset_sf: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + fs->cfa_offset = ptrtmp; + /* cfa_how deliberately not set. */ + break; + + case DW_CFA_GNU_window_save: + /* ??? Hardcoded for SPARC register window configuration. */ + for (reg = 16; reg < 32; ++reg) + { + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *); + } + break; + + case DW_CFA_GNU_args_size: + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + context->args_size = ptrtmp; + break; + + case DW_CFA_GNU_negative_offset_extended: + /* Obsoleted by DW_CFA_offset_extended_sf, but used by + older PowerPC code. */ + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); reg = ptrtmp; + insn_ptr = read_uleb128 (insn_ptr, &ptrtmp); + offset = ptrtmp * fs->data_align; + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = -offset; + break; + + default: + abort (); + } + } +} + +static _Unwind_Reason_Code +uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs) +{ + struct dwarf_fde *fde; + struct dwarf_cie *cie; + const unsigned char *aug, *insn, *end; + + memset (fs, 0, sizeof (*fs)); + context->args_size = 0; + context->lsda = 0; + + fde = _Unwind_Find_FDE (context->ra - 1, &context->bases); + if (fde == NULL) + { + /* Couldn't find frame unwind info for this function. Try a + target-specific fallback mechanism. This will necessarily + not profide a personality routine or LSDA. */ +#ifdef MD_FALLBACK_FRAME_STATE_FOR + MD_FALLBACK_FRAME_STATE_FOR (context, fs, success); + return _URC_END_OF_STACK; + success: + return _URC_NO_REASON; +#else + return _URC_END_OF_STACK; +#endif + } + + fs->pc = context->bases.func; + + cie = get_cie (fde); + insn = extract_cie_info (cie, context, fs); + if (insn == NULL) + /* CIE contained unknown augmentation. */ + return _URC_FATAL_PHASE1_ERROR; + + /* First decode all the insns in the CIE. */ + end = (unsigned char *) next_fde ((struct dwarf_fde *) cie); + execute_cfa_program (insn, end, context, fs); + + /* Locate augmentation for the fde. */ + aug = (unsigned char *)fde + sizeof (*fde); + aug += 2 * size_of_encoded_value (fs->fde_encoding); + insn = NULL; + if (fs->saw_z) + { + _Unwind_Ptr i; + aug = read_uleb128 (aug, &i); + insn = aug + i; + } + if (fs->lsda_encoding != DW_EH_PE_omit) + aug = read_encoded_value (context, fs->lsda_encoding, aug, + (_Unwind_Ptr *) &context->lsda); + + /* Then the insns in the FDE up to our target PC. */ + if (insn == NULL) + insn = aug; + end = (unsigned char *) next_fde (fde); + execute_cfa_program (insn, end, context, fs); + + return _URC_NO_REASON; +} + +typedef struct frame_state +{ + void *cfa; + void *eh_ptr; + long cfa_offset; + long args_size; + long reg_or_offset[DWARF_FRAME_REGISTERS+1]; + unsigned short cfa_reg; + unsigned short retaddr_column; + char saved[DWARF_FRAME_REGISTERS+1]; +} frame_state; + +struct frame_state * __frame_state_for (void *, struct frame_state *); + +/* Called from pre-G++ 3.0 __throw to find the registers to restore for + a given PC_TARGET. The caller should allocate a local variable of + `struct frame_state' and pass its address to STATE_IN. */ + +struct frame_state * +__frame_state_for (void *pc_target, struct frame_state *state_in) +{ + struct _Unwind_Context context; + _Unwind_FrameState fs; + int reg; + + memset (&context, 0, sizeof (struct _Unwind_Context)); + context.ra = pc_target + 1; + + if (uw_frame_state_for (&context, &fs) != _URC_NO_REASON) + return 0; + + /* We have no way to pass a location expression for the CFA to our + caller. It wouldn't understand it anyway. */ + if (fs.cfa_how == CFA_EXP) + return 0; + + for (reg = 0; reg < DWARF_FRAME_REGISTERS + 1; reg++) + { + state_in->saved[reg] = fs.regs.reg[reg].how; + switch (state_in->saved[reg]) + { + case REG_SAVED_REG: + state_in->reg_or_offset[reg] = fs.regs.reg[reg].loc.reg; + break; + case REG_SAVED_OFFSET: + state_in->reg_or_offset[reg] = fs.regs.reg[reg].loc.offset; + break; + default: + state_in->reg_or_offset[reg] = 0; + break; + } + } + + state_in->cfa_offset = fs.cfa_offset; + state_in->cfa_reg = fs.cfa_reg; + state_in->retaddr_column = fs.retaddr_column; + state_in->args_size = context.args_size; + state_in->eh_ptr = fs.eh_ptr; + + return state_in; +} + +#ifndef _LIBC + +static void +uw_update_context_1 (struct _Unwind_Context *context, _Unwind_FrameState *fs) +{ + struct _Unwind_Context orig_context = *context; + void *cfa; + long i; + + /* Compute this frame's CFA. */ + switch (fs->cfa_how) + { + case CFA_REG_OFFSET: + /* Special handling here: Many machines do not use a frame pointer, + and track the CFA only through offsets from the stack pointer from + one frame to the next. In this case, the stack pointer is never + stored, so it has no saved address in the context. What we do + have is the CFA from the previous stack frame. */ + if (context->reg[fs->cfa_reg] == NULL) + cfa = context->cfa; + else + cfa = (void *) (_Unwind_Ptr) _Unwind_GetGR (context, fs->cfa_reg); + cfa += fs->cfa_offset; + break; + + case CFA_EXP: + /* ??? No way of knowing what register number is the stack pointer + to do the same sort of handling as above. Assume that if the + CFA calculation is so complicated as to require a stack program + that this will not be a problem. */ + { + const unsigned char *exp = fs->cfa_exp; + _Unwind_Ptr len; + + exp = read_uleb128 (exp, &len); + cfa = (void *) (_Unwind_Ptr) + execute_stack_op (exp, exp + len, context, 0); + break; + } + + default: + abort (); + } + context->cfa = cfa; + + /* Compute the addresses of all registers saved in this frame. */ + for (i = 0; i < DWARF_FRAME_REGISTERS + 1; ++i) + switch (fs->regs.reg[i].how) + { + case REG_UNSAVED: + break; + case REG_SAVED_OFFSET: + context->reg[i] = cfa + fs->regs.reg[i].loc.offset; + break; + case REG_SAVED_REG: + context->reg[i] = orig_context.reg[fs->regs.reg[i].loc.reg]; + break; + case REG_SAVED_EXP: + { + const unsigned char *exp = fs->regs.reg[i].loc.exp; + _Unwind_Ptr len; + _Unwind_Ptr val; + + exp = read_uleb128 (exp, &len); + val = execute_stack_op (exp, exp + len, &orig_context, + (_Unwind_Ptr) cfa); + context->reg[i] = (void *) val; + } + break; + } +} + +static void +uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs) +{ + uw_update_context_1 (context, fs); + + /* Compute the return address now, since the return address column + can change from frame to frame. */ + context->ra = __builtin_extract_return_addr + ((void *) (_Unwind_Ptr) _Unwind_GetGR (context, fs->retaddr_column)); +} + +/* Fill in CONTEXT for top-of-stack. The only valid registers at this + level will be the return address and the CFA. */ + +#define uw_init_context(CONTEXT) \ +do { \ + /* Do any necessary initialization to access arbitrary stack frames. \ + On the SPARC, this means flushing the register windows. */ \ + __builtin_unwind_init (); \ + uw_init_context_1 (CONTEXT, __builtin_dwarf_cfa (), \ + __builtin_return_address (0)); \ +} while (0) + +static void +uw_init_context_1 (struct _Unwind_Context *context, + void *outer_cfa, void *outer_ra) +{ + void *ra = __builtin_extract_return_addr (__builtin_return_address (0)); + _Unwind_FrameState fs; + + memset (context, 0, sizeof (struct _Unwind_Context)); + context->ra = ra; + + if (uw_frame_state_for (context, &fs) != _URC_NO_REASON) + abort (); + + /* Force the frame state to use the known cfa value. */ + context->cfa = outer_cfa; + fs.cfa_how = CFA_REG_OFFSET; + fs.cfa_reg = 0; + fs.cfa_offset = 0; + + uw_update_context_1 (context, &fs); + + /* If the return address column was saved in a register in the + initialization context, then we can't see it in the given + call frame data. So have the initialization context tell us. */ + context->ra = __builtin_extract_return_addr (outer_ra); +} + + +/* Install TARGET into CURRENT so that we can return to it. This is a + macro because __builtin_eh_return must be invoked in the context of + our caller. */ + +#define uw_install_context(CURRENT, TARGET) \ +do { \ + long offset = uw_install_context_1 ((CURRENT), (TARGET)); \ + void *handler = __builtin_frob_return_addr ((TARGET)->ra); \ + __builtin_eh_return (offset, handler); \ +} while (0) + +static inline void +init_dwarf_reg_size_table (void) +{ + __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table); +} + +static long +uw_install_context_1 (struct _Unwind_Context *current, + struct _Unwind_Context *target) +{ + long i; + +#if __GTHREADS + { + static __gthread_once_t once_regsizes = __GTHREAD_ONCE_INIT; + if (__gthread_once (&once_regsizes, init_dwarf_reg_size_table) != 0 + || dwarf_reg_size_table[0] == 0) + init_dwarf_reg_size_table (); + } +#else + if (dwarf_reg_size_table[0] == 0) + init_dwarf_reg_size_table (); +#endif + + for (i = 0; i < DWARF_FRAME_REGISTERS; ++i) + { + void *c = current->reg[i]; + void *t = target->reg[i]; + if (t && c && t != c) + memcpy (c, t, dwarf_reg_size_table[i]); + } + + /* We adjust SP by the difference between CURRENT and TARGET's CFA. */ + if (STACK_GROWS_DOWNWARD) + return target->cfa - current->cfa + target->args_size; + else + return current->cfa - target->cfa - target->args_size; +} + +static inline _Unwind_Ptr +uw_identify_context (struct _Unwind_Context *context) +{ + return _Unwind_GetIP (context); +} + + +#include "unwind.inc" + +#endif /* _LIBC */ +#endif /* !USING_SJLJ_EXCEPTIONS */ diff -durpN glibc-2.2.4/sysdeps/generic/unwind-pe.h glibc-2.2.5/sysdeps/generic/unwind-pe.h --- glibc-2.2.4/sysdeps/generic/unwind-pe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/unwind-pe.h Thu Nov 15 17:19:30 2001 @@ -0,0 +1,272 @@ +/* Exception handling and frame unwind runtime interface routines. + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* @@@ Really this should be out of line, but this also causes link + compatibility problems with the base ABI. This is slightly better + than duplicating code, however. */ + +/* If using C++, references to abort have to be qualified with std::. */ +#if __cplusplus +#define __gxx_abort std::abort +#else +#define __gxx_abort abort +#endif + +/* Pointer encodings, from dwarf2.h. */ +#define DW_EH_PE_absptr 0x00 +#define DW_EH_PE_omit 0xff + +#define DW_EH_PE_uleb128 0x01 +#define DW_EH_PE_udata2 0x02 +#define DW_EH_PE_udata4 0x03 +#define DW_EH_PE_udata8 0x04 +#define DW_EH_PE_sleb128 0x09 +#define DW_EH_PE_sdata2 0x0A +#define DW_EH_PE_sdata4 0x0B +#define DW_EH_PE_sdata8 0x0C +#define DW_EH_PE_signed 0x08 + +#define DW_EH_PE_pcrel 0x10 +#define DW_EH_PE_textrel 0x20 +#define DW_EH_PE_datarel 0x30 +#define DW_EH_PE_funcrel 0x40 +#define DW_EH_PE_aligned 0x50 + +#define DW_EH_PE_indirect 0x80 + + +/* Given an encoding, return the number of bytes the format occupies. + This is only defined for fixed-size encodings, and so does not + include leb128. */ + +#ifndef _LIBC +static +#endif +unsigned int +size_of_encoded_value (unsigned char encoding) +#if defined(_LIBC) && !defined(NO_BASE_OF_ENCODED_VALUE) +; +#else +{ + if (encoding == DW_EH_PE_omit) + return 0; + + switch (encoding & 0x07) + { + case DW_EH_PE_absptr: + return sizeof (void *); + case DW_EH_PE_udata2: + return 2; + case DW_EH_PE_udata4: + return 4; + case DW_EH_PE_udata8: + return 8; + } + __gxx_abort (); +} +#endif + +#ifndef NO_BASE_OF_ENCODED_VALUE + +/* Given an encoding and an _Unwind_Context, return the base to which + the encoding is relative. This base may then be passed to + read_encoded_value_with_base for use when the _Unwind_Context is + not available. */ + +static _Unwind_Ptr +base_of_encoded_value (unsigned char encoding, struct _Unwind_Context *context) +{ + if (encoding == DW_EH_PE_omit) + return 0; + + switch (encoding & 0x70) + { + case DW_EH_PE_absptr: + case DW_EH_PE_pcrel: + case DW_EH_PE_aligned: + return 0; + + case DW_EH_PE_textrel: + return _Unwind_GetTextRelBase (context); + case DW_EH_PE_datarel: + return _Unwind_GetDataRelBase (context); + case DW_EH_PE_funcrel: + return _Unwind_GetRegionStart (context); + } + __gxx_abort (); +} + +#endif + +/* Load an encoded value from memory at P. The value is returned in VAL; + The function returns P incremented past the value. BASE is as given + by base_of_encoded_value for this encoding in the appropriate context. */ + +#ifndef _LIBC +static +#endif +const unsigned char * +read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base, + const unsigned char *p, _Unwind_Ptr *val) +#if defined(_LIBC) && !defined(NO_BASE_OF_ENCODED_VALUE) +; +#else +{ + union unaligned + { + void *ptr; + unsigned u2 __attribute__ ((mode (HI))); + unsigned u4 __attribute__ ((mode (SI))); + unsigned u8 __attribute__ ((mode (DI))); + signed s2 __attribute__ ((mode (HI))); + signed s4 __attribute__ ((mode (SI))); + signed s8 __attribute__ ((mode (DI))); + } __attribute__((__packed__)); + + union unaligned *u = (union unaligned *) p; + _Unwind_Ptr result; + + if (encoding == DW_EH_PE_aligned) + { + _Unwind_Ptr a = (_Unwind_Ptr)p; + a = (a + sizeof (void *) - 1) & - sizeof(void *); + result = *(_Unwind_Ptr *) a; + p = (const unsigned char *)(a + sizeof (void *)); + } + else + { + switch (encoding & 0x0f) + { + case DW_EH_PE_absptr: + result = (_Unwind_Ptr) u->ptr; + p += sizeof (void *); + break; + + case DW_EH_PE_uleb128: + { + unsigned int shift = 0; + unsigned char byte; + + result = 0; + do + { + byte = *p++; + result |= (_Unwind_Ptr)(byte & 0x7f) << shift; + shift += 7; + } + while (byte & 0x80); + } + break; + + case DW_EH_PE_sleb128: + { + unsigned int shift = 0; + unsigned char byte; + + result = 0; + do + { + byte = *p++; + result |= (_Unwind_Ptr)(byte & 0x7f) << shift; + shift += 7; + } + while (byte & 0x80); + + if (shift < 8 * sizeof(result) && (byte & 0x40) != 0) + result |= -(1L << shift); + } + break; + + case DW_EH_PE_udata2: + result = u->u2; + p += 2; + break; + case DW_EH_PE_udata4: + result = u->u4; + p += 4; + break; + case DW_EH_PE_udata8: + result = u->u8; + p += 8; + break; + + case DW_EH_PE_sdata2: + result = u->s2; + p += 2; + break; + case DW_EH_PE_sdata4: + result = u->s4; + p += 4; + break; + case DW_EH_PE_sdata8: + result = u->s8; + p += 8; + break; + + default: + __gxx_abort (); + } + + if (result != 0) + { + result += ((encoding & 0x70) == DW_EH_PE_pcrel + ? (_Unwind_Ptr)u : base); + if (encoding & DW_EH_PE_indirect) + result = *(_Unwind_Ptr *)result; + } + } + + *val = result; + return p; +} +#endif + +#ifndef NO_BASE_OF_ENCODED_VALUE + +/* Like read_encoded_value_with_base, but get the base from the context + rather than providing it directly. */ + +static inline const unsigned char * +read_encoded_value (struct _Unwind_Context *context, unsigned char encoding, + const unsigned char *p, _Unwind_Ptr *val) +{ + return read_encoded_value_with_base (encoding, + base_of_encoded_value (encoding, context), + p, val); +} + +#endif + +/* Read an unsigned leb128 value from P, store the value in VAL, return + P incremented past the value. */ + +static inline const unsigned char * +read_uleb128 (const unsigned char *p, _Unwind_Ptr *val) +{ + return read_encoded_value_with_base (DW_EH_PE_uleb128, 0, p, val); +} + +/* Similar, but read a signed leb128 value. */ + +static inline const unsigned char * +read_sleb128 (const unsigned char *p, _Unwind_Ptr *val) +{ + return read_encoded_value_with_base (DW_EH_PE_sleb128, 0, p, val); +} diff -durpN glibc-2.2.4/sysdeps/generic/unwind.h glibc-2.2.5/sysdeps/generic/unwind.h --- glibc-2.2.4/sysdeps/generic/unwind.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/generic/unwind.h Thu Nov 15 17:19:53 2001 @@ -0,0 +1,191 @@ +/* Exception handling and frame unwind runtime interface routines. + Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This is derived from the C++ ABI for IA-64. Where we diverge + for cross-architecture compatibility are noted with "@@@". */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Level 1: Base ABI */ + +/* @@@ The IA-64 ABI uses uint64 throughout. Most places this is + inefficient for 32-bit and smaller machines. */ +typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); +typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); +typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); + +/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and + consumer of an exception. We'll go along with this for now even on + 32-bit machines. We'll need to provide some other option for + 16-bit machines and for machines with > 8 bits per byte. */ +typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); + +/* The unwind interface uses reason codes in several contexts to + identify the reasons for failures or other actions. */ +typedef enum +{ + _URC_NO_REASON = 0, + _URC_FOREIGN_EXCEPTION_CAUGHT = 1, + _URC_FATAL_PHASE2_ERROR = 2, + _URC_FATAL_PHASE1_ERROR = 3, + _URC_NORMAL_STOP = 4, + _URC_END_OF_STACK = 5, + _URC_HANDLER_FOUND = 6, + _URC_INSTALL_CONTEXT = 7, + _URC_CONTINUE_UNWIND = 8 +} _Unwind_Reason_Code; + + +/* The unwind interface uses a pointer to an exception header object + as its representation of an exception being thrown. In general, the + full representation of an exception object is language- and + implementation-specific, but it will be prefixed by a header + understood by the unwind interface. */ + +struct _Unwind_Exception; + +typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, + struct _Unwind_Exception *); + +struct _Unwind_Exception +{ + _Unwind_Exception_Class exception_class; + _Unwind_Exception_Cleanup_Fn exception_cleanup; + _Unwind_Word private_1; + _Unwind_Word private_2; + + /* @@@ The IA-64 ABI says that this structure must be double-word aligned. + Taking that literally does not make much sense generically. Instead we + provide the maximum alignment required by any type for the machine. */ +} __attribute__((__aligned__)); + + +/* The ACTIONS argument to the personality routine is a bitwise OR of one + or more of the following constants. */ +typedef int _Unwind_Action; + +#define _UA_SEARCH_PHASE 1 +#define _UA_CLEANUP_PHASE 2 +#define _UA_HANDLER_FRAME 4 +#define _UA_FORCE_UNWIND 8 + +/* This is an opaque type used to refer to a system-specific data + structure used by the system unwinder. This context is created and + destroyed by the system, and passed to the personality routine + during unwinding. */ +struct _Unwind_Context; + +/* Raise an exception, passing along the given exception object. */ +extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); + +/* Raise an exception for forced unwinding. */ + +typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) + (int, _Unwind_Action, _Unwind_Exception_Class, + struct _Unwind_Exception *, struct _Unwind_Context *, void *); + +extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, + _Unwind_Stop_Fn, + void *); + +/* Helper to invoke the exception_cleanup routine. */ +extern void _Unwind_DeleteException (struct _Unwind_Exception *); + +/* Resume propagation of an existing exception. This is used after + e.g. executing cleanup code, and not to implement rethrowing. */ +extern void _Unwind_Resume (struct _Unwind_Exception *); + +/* These functions are used for communicating information about the unwind + context (i.e. the unwind descriptors and the user register state) between + the unwind library and the personality routine and landing pad. Only + selected registers maybe manipulated. */ + +extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int); +extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word); + +extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); +extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr); + +extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *); + +extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *); + + +/* The personality routine is the function in the C++ (or other language) + runtime library which serves as an interface between the system unwind + library and language-specific exception handling semantics. It is + specific to the code fragment described by an unwind info block, and + it is always referenced via the pointer in the unwind info block, and + hence it has no ABI-specified name. + + Note that this implies that two different C++ implementations can + use different names, and have different contents in the language + specific data area. Moreover, that the language specific data + area contains no version info because name of the function invoked + provides more effective versioning by detecting at link time the + lack of code to handle the different data format. */ + +typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn) + (int, _Unwind_Action, _Unwind_Exception_Class, + struct _Unwind_Exception *, struct _Unwind_Context *); + +/* @@@ The following alternate entry points are for setjmp/longjmp + based unwinding. */ + +struct SjLj_Function_Context; +extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *); +extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *); + +extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException + (struct _Unwind_Exception *); +extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind + (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); +extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *); + +/* @@@ The following provide access to the base addresses for text + and data-relative addressing in the LDSA. In order to stay link + compatible with the standard ABI for IA-64, we inline these. */ + +#ifdef __ia64__ +#include + +static inline _Unwind_Ptr +_Unwind_GetDataRelBase (struct _Unwind_Context *_C) +{ + /* The GP is stored in R1. */ + return _Unwind_GetGR (_C, 1); +} + +static inline _Unwind_Ptr +_Unwind_GetTextRelBase (struct _Unwind_Context *_C) +{ + abort (); + return 0; +} +#else +extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); +extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); +#endif + +#ifdef __cplusplus +} +#endif diff -durpN glibc-2.2.4/sysdeps/generic/wordexp.c glibc-2.2.5/sysdeps/generic/wordexp.c --- glibc-2.2.4/sysdeps/generic/wordexp.c Mon Jul 23 10:55:36 2001 +++ glibc-2.2.5/sysdeps/generic/wordexp.c Thu Aug 16 23:31:42 2001 @@ -18,25 +18,29 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include -#include #include -#include -#include +#include +#include #include #include +#include #include #include -#include -#include -#include -#include -#include -#include -#include +#ifdef USE_IN_LIBIO +# include +#endif +#include #include @@ -1789,12 +1793,19 @@ envsubst: if (!colon_seen && value) /* Substitute NULL */ ; - else if (*pattern) - fprintf (stderr, "%s: %s\n", env, pattern); else { - fprintf (stderr, "%s: parameter null or not set\n", env); - error = WRDE_BADVAL; + const char *str = pattern; + + if (str[0] == '\0') + str = _("parameter null or not set"); + +#ifdef USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s: %s\n", env, str); + else +#endif + fprintf (stderr, "%s: %s\n", env, str); } if (free_value) diff -durpN glibc-2.2.4/sysdeps/gnu/Dist glibc-2.2.5/sysdeps/gnu/Dist --- glibc-2.2.4/sysdeps/gnu/Dist Mon Jul 26 08:32:52 1999 +++ glibc-2.2.5/sysdeps/gnu/Dist Fri Sep 21 08:43:06 2001 @@ -1,5 +1,4 @@ errlist.awk -eval.c utmpx.h bits/utmpx.h netinet/tcp.h diff -durpN glibc-2.2.4/sysdeps/gnu/eval.c glibc-2.2.5/sysdeps/gnu/eval.c --- glibc-2.2.4/sysdeps/gnu/eval.c Mon Jul 23 10:55:37 2001 +++ glibc-2.2.5/sysdeps/gnu/eval.c Wed Dec 31 16:00:00 1969 @@ -1,138 +0,0 @@ -/* You don't really want to know what this hack is for. - 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include -#include -#include -#include - -static void *funcall (char **stringp); -static void *eval (char **stringp); - -static void * -funcall (char **stringp) -{ - void *args[strlen (*stringp)], **ap = args; - void *argcookie = &args[1]; - - do - { - /* Evaluate the next token. */ - *ap++ = eval (stringp); - - /* Whitespace is irrelevant. */ - while (isspace (**stringp)) - ++*stringp; - - /* Terminate at closing paren or end of line. */ - } while (**stringp != '\0' && **stringp != ')'); - if (**stringp != '\0') - /* Swallow closing paren. */ - ++*stringp; - - if (args[0] == NULL) - { - static const char unknown[] = "Unknown function\n"; - write (1, unknown, sizeof unknown - 1); - return NULL; - } - - /* Do it to it. */ - __builtin_return (__builtin_apply (args[0], - &argcookie, - (char *) ap - (char *) &args[1])); -} - -static void * -eval (char **stringp) -{ - void *value; - char *p = *stringp, c; - - /* Whitespace is irrelevant. */ - while (isspace (*p)) - ++p; - - switch (*p) - { - case '"': - /* String constant. */ - value = ++p; - do - if (*p == '\\') - { - switch (*strcpy (p, p + 1)) - { - case 't': - *p = '\t'; - break; - case 'n': - *p = '\n'; - break; - } - ++p; - } - while (*p != '\0' && *p++ != '"'); - if (p[-1] == '"') - p[-1] = '\0'; - break; - - case '(': - *stringp = ++p; - return funcall (stringp); - - default: - /* Try to parse it as a number. */ - value = (void *) strtol (p, stringp, 0); - if (*stringp != p) - return value; - - /* Anything else is a symbol that produces its address. */ - value = p; - do - ++p; - while (*p != '\0' && !isspace (*p) && (!ispunct (*p) || *p == '_')); - c = *p; - *p = '\0'; - value = dlsym (NULL, value); - *p = c; - break; - } - - *stringp = p; - return value; -} - - -void -_start (void) -{ - char *buf = NULL; - size_t bufsz = 0; - - while (__getdelim (&buf, &bufsz, '\n', stdin) > 0) - { - char *p = buf; - eval (&p); - } - - exit (0); -} diff -durpN glibc-2.2.4/sysdeps/hppa/dl-fptr.c glibc-2.2.5/sysdeps/hppa/dl-fptr.c --- glibc-2.2.4/sysdeps/hppa/dl-fptr.c Mon Jul 23 10:55:38 2001 +++ glibc-2.2.5/sysdeps/hppa/dl-fptr.c Sat Sep 8 10:16:44 2001 @@ -101,7 +101,7 @@ __hppa_make_fptr (const struct link_map if (_dl_zerofd == -1) { __close (fd); - _dl_signal_error (errno, NULL, + _dl_signal_error (errno, NULL, NULL, "cannot open zero fill device"); } } @@ -110,7 +110,7 @@ __hppa_make_fptr (const struct link_map __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, ANONFD, 0); if (__fptr_next == MAP_FAILED) - _dl_signal_error(errno, NULL, "cannot map page for fptr"); + _dl_signal_error(errno, NULL, NULL, "cannot map page for fptr"); __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr); } f = __fptr_next++; diff -durpN glibc-2.2.4/sysdeps/hppa/dl-lookupcfg.h glibc-2.2.5/sysdeps/hppa/dl-lookupcfg.h --- glibc-2.2.4/sysdeps/hppa/dl-lookupcfg.h Mon Jul 23 10:55:38 2001 +++ glibc-2.2.5/sysdeps/hppa/dl-lookupcfg.h Sat Sep 8 10:13:52 2001 @@ -23,6 +23,9 @@ #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL +/* Forward declaration. */ +struct link_map; + void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref); #define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref) diff -durpN glibc-2.2.4/sysdeps/hppa/dl-machine.h glibc-2.2.5/sysdeps/hppa/dl-machine.h --- glibc-2.2.4/sysdeps/hppa/dl-machine.h Mon Jul 23 10:55:38 2001 +++ glibc-2.2.5/sysdeps/hppa/dl-machine.h Sun Aug 26 15:26:34 2001 @@ -454,14 +454,14 @@ asm ( \ #endif -/* Nonzero iff TYPE describes a relocation that should - skip the executable when looking up the symbol value. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_PARISC_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_PARISC_IPLT \ - || (type) == R_PARISC_EPLT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \ + * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY)) /* Used by ld.so for ... something ... */ #define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT @@ -626,6 +626,13 @@ elf_machine_rela (struct link_map *map, } *reloc_addr = value; +} + +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + /* XXX Nothing to do. There is no relative relocation, right? */ } static inline void diff -durpN glibc-2.2.4/sysdeps/hppa/gccframe.h glibc-2.2.5/sysdeps/hppa/gccframe.h --- glibc-2.2.4/sysdeps/hppa/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/hppa/gccframe.h Thu Nov 15 17:07:57 2001 @@ -0,0 +1,23 @@ +/* Definition of object in frame unwind info. hppa version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* Note: For hppa64 this is 61 */ +#define DWARF_FRAME_REGISTERS 89 + +#include diff -durpN glibc-2.2.4/sysdeps/i386/bits/byteswap.h glibc-2.2.5/sysdeps/i386/bits/byteswap.h --- glibc-2.2.4/sysdeps/i386/bits/byteswap.h Mon Jul 23 10:55:41 2001 +++ glibc-2.2.5/sysdeps/i386/bits/byteswap.h Tue Jan 8 02:20:27 2002 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. */ #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) @@ -108,3 +111,5 @@ } \ __r.__ll; })) #endif + +#endif /* _BITS_BYTESWAP_H */ diff -durpN glibc-2.2.4/sysdeps/i386/dl-machine.h glibc-2.2.5/sysdeps/i386/dl-machine.h --- glibc-2.2.4/sysdeps/i386/dl-machine.h Mon Jul 23 10:55:41 2001 +++ glibc-2.2.5/sysdeps/i386/dl-machine.h Thu Aug 30 16:09:10 2001 @@ -247,13 +247,13 @@ _dl_start_user:\n\ #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_386_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_386_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_386_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_386_JMP_SLOT @@ -303,9 +303,12 @@ elf_machine_rel (struct link_map *map, c const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { - if (ELF32_R_TYPE (reloc->r_info) == R_386_RELATIVE) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_386_RELATIVE, 0)) { -#ifndef RTLD_BOOTSTRAP +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c @@ -314,25 +317,33 @@ elf_machine_rel (struct link_map *map, c weak decl in the same file. */ weak_extern (_dl_rtld_map); if (map != &_dl_rtld_map) /* Already done in rtld itself. */ -#endif +# endif *reloc_addr += map->l_addr; } - else if (ELF32_R_TYPE (reloc->r_info) != R_386_NONE) +# ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_386_NONE, 0)) + return; +# endif + else +#endif { #ifndef RTLD_BOOTSTRAP const Elf32_Sym *const refsym = sym; #endif - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; - switch (ELF32_R_TYPE (reloc->r_info)) +#ifdef RTLD_BOOTSTRAP + assert (r_type == R_386_GLOB_DAT || r_type == R_386_JMP_SLOT); + *reloc_addr = value; +#else + switch (r_type) { case R_386_GLOB_DAT: case R_386_JMP_SLOT: *reloc_addr = value; break; -#ifndef RTLD_BOOTSTRAP case R_386_32: *reloc_addr += value; break; @@ -346,7 +357,7 @@ elf_machine_rel (struct link_map *map, c break; if (__builtin_expect (sym->st_size > refsym->st_size, 0) || (__builtin_expect (sym->st_size < refsym->st_size, 0) - && __builtin_expect (_dl_verbose, 0))) + && _dl_verbose)) { const char *strtab; @@ -359,29 +370,33 @@ elf_machine_rel (struct link_map *map, c memcpy (reloc_addr, (void *) value, MIN (sym->st_size, refsym->st_size)); break; -#endif -#if !defined RTLD_BOOTSTRAP || defined _NDEBUG default: - /* We add these checks in the version to relocate ld.so only - if we are still debugging. */ - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; -#endif } +#endif } } static inline void +elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, + Elf32_Addr *const reloc_addr) +{ + assert (ELF32_R_TYPE (reloc->r_info) == R_386_RELATIVE); + *reloc_addr += l_addr; +} + +static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rel *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); /* Check for unexpected PLT reloc type. */ - if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_386_JMP_SLOT) - == R_386_JMP_SLOT) + if (__builtin_expect (r_type == R_386_JMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff -durpN glibc-2.2.4/sysdeps/i386/elf/start.S glibc-2.2.5/sysdeps/i386/elf/start.S --- glibc-2.2.4/sysdeps/i386/elf/start.S Mon Jul 23 10:55:41 2001 +++ glibc-2.2.5/sysdeps/i386/elf/start.S Thu Oct 18 19:11:06 2001 @@ -88,6 +88,7 @@ _start: .globl _fp_hw _fp_hw: .long 3 .size _fp_hw, 4 + .type _fp_hw,@object /* Define a symbol for the first piece of initialized data. */ .data diff -durpN glibc-2.2.4/sysdeps/i386/fpu/libm-test-ulps glibc-2.2.5/sysdeps/i386/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/i386/fpu/libm-test-ulps Mon Jul 23 10:55:43 2001 +++ glibc-2.2.5/sysdeps/i386/fpu/libm-test-ulps Mon Aug 27 06:55:13 2001 @@ -681,6 +681,21 @@ ifloat: 1 Test "j0 (10.0) == -0.24593576445134833520": double: 2 idouble: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + # j1 Test "j1 (10.0) == 0.043472746168861436670": @@ -1500,6 +1515,8 @@ float: 1 ifloat: 1 double: 2 idouble: 2 +ldouble: 1 +ildouble: 1 Function: "j1": double: 2 diff -durpN glibc-2.2.4/sysdeps/i386/fpu/s_logbl.S glibc-2.2.5/sysdeps/i386/fpu/s_logbl.S --- glibc-2.2.4/sysdeps/i386/fpu/s_logbl.S Tue Jul 13 16:35:34 1999 +++ glibc-2.2.5/sysdeps/i386/fpu/s_logbl.S Wed Dec 31 16:00:00 1969 @@ -1,17 +0,0 @@ -/* - * Written by J.T. Conklin . - * Changes for long double by Ulrich Drepper - * Public domain. - */ - -#include - -RCSID("$NetBSD: $") - -ENTRY(__logbl) - fldt 4(%esp) - fxtract - fstp %st - ret -END (__logbl) -weak_alias (__logbl, logbl) diff -durpN glibc-2.2.4/sysdeps/i386/fpu/s_logbl.c glibc-2.2.5/sysdeps/i386/fpu/s_logbl.c --- glibc-2.2.4/sysdeps/i386/fpu/s_logbl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/i386/fpu/s_logbl.c Tue Sep 18 07:13:02 2001 @@ -0,0 +1,19 @@ +/* + * Written by J.T. Conklin . + * Changes for long double by Ulrich Drepper + * Public domain. + */ + +#include + +long double +__logbl (long double x) +{ + long double res; + + asm ("fxtract\n" + "fstp %%st" : "=t" (res) : "0" (x)); + return res; +} + +weak_alias (__logbl, logbl) diff -durpN glibc-2.2.4/sysdeps/i386/fpu/s_rintl.S glibc-2.2.5/sysdeps/i386/fpu/s_rintl.S --- glibc-2.2.4/sysdeps/i386/fpu/s_rintl.S Tue Jul 13 16:36:18 1999 +++ glibc-2.2.5/sysdeps/i386/fpu/s_rintl.S Wed Dec 31 16:00:00 1969 @@ -1,16 +0,0 @@ -/* - * Written by J.T. Conklin . - * Changes for long double by Ulrich Drepper - * Public domain. - */ - -#include - -RCSID("$NetBSD: $") - -ENTRY(__rintl) - fldt 4(%esp) - frndint - ret -END (__rintl) -weak_alias (__rintl, rintl) diff -durpN glibc-2.2.4/sysdeps/i386/fpu/s_rintl.c glibc-2.2.5/sysdeps/i386/fpu/s_rintl.c --- glibc-2.2.4/sysdeps/i386/fpu/s_rintl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/i386/fpu/s_rintl.c Tue Sep 18 07:13:02 2001 @@ -0,0 +1,18 @@ +/* + * Written by J.T. Conklin . + * Changes for long double by Ulrich Drepper + * Public domain. + */ + +#include + +long double +__rintl (long double x) +{ + long double res; + + asm ("frndint" : "=t" (res) : "0" (x)); + return res; +} + +weak_alias (__rintl, rintl) diff -durpN glibc-2.2.4/sysdeps/i386/fpu/s_significandl.S glibc-2.2.5/sysdeps/i386/fpu/s_significandl.S --- glibc-2.2.4/sysdeps/i386/fpu/s_significandl.S Tue Jul 13 16:36:42 1999 +++ glibc-2.2.5/sysdeps/i386/fpu/s_significandl.S Wed Dec 31 16:00:00 1969 @@ -1,17 +0,0 @@ -/* - * Written by J.T. Conklin . - * Changes for long double by Ulrich Drepper - * Public domain. - */ - -#include - -RCSID("$NetBSD: $") - -ENTRY(__significandl) - fldt 4(%esp) - fxtract - fstp %st(0) - ret -END (__significandl) -weak_alias (__significandl, significandl) diff -durpN glibc-2.2.4/sysdeps/i386/fpu/s_significandl.c glibc-2.2.5/sysdeps/i386/fpu/s_significandl.c --- glibc-2.2.4/sysdeps/i386/fpu/s_significandl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/i386/fpu/s_significandl.c Tue Sep 18 07:13:02 2001 @@ -0,0 +1,19 @@ +/* + * Written by J.T. Conklin . + * Changes for long double by Ulrich Drepper + * Public domain. + */ + +#include + +long double +__significandl (long double x) +{ + long double res; + + asm ("fxtract\n" + "fstp %%st(0)" : "=t" (res) : "0" (x)); + return res; +} + +weak_alias (__significandl, significandl) diff -durpN glibc-2.2.4/sysdeps/i386/gccframe.h glibc-2.2.5/sysdeps/i386/gccframe.h --- glibc-2.2.4/sysdeps/i386/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/i386/gccframe.h Thu Nov 15 17:10:31 2001 @@ -0,0 +1,28 @@ +/* Definition of object in frame unwind info. i386 version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define DWARF_FRAME_REGISTERS 17 + +#define CRT_GET_RFIB_DATA(BASE) \ + { \ + register void *__ebx __asm__("ebx");\ + BASE = __ebx; \ + } + +#include diff -durpN glibc-2.2.4/sysdeps/i386/i486/bits/string.h glibc-2.2.5/sysdeps/i386/i486/bits/string.h --- glibc-2.2.4/sysdeps/i386/i486/bits/string.h Mon Jul 23 10:55:45 2001 +++ glibc-2.2.5/sysdeps/i386/i486/bits/string.h Mon Sep 24 18:39:10 2001 @@ -1,5 +1,5 @@ /* Optimized, inlined string functions. i486 version. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001 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 @@ -545,13 +545,13 @@ __strlen_g (__const char *__str) #define strcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (sizeof ((src)[0]) == 1 && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, src, strlen (src) + 1) \ + ? __strcpy_a_small (dest, src, strlen (src) + 1) \ : (char *) memcpy ((char *) dest, \ (__const char *) src, \ strlen (src) + 1)) \ : __strcpy_g (dest, src))) -#define __strcpy_small(dest, src, srclen) \ +#define __strcpy_a_small(dest, src, srclen) \ (__extension__ ({ char *__dest = (dest); \ union { \ unsigned int __ui; \ @@ -629,7 +629,7 @@ __strcpy_g (char *__dest, __const char * # define __stpcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, src, strlen (src) + 1) \ + ? __stpcpy_a_small (dest, src, strlen (src) + 1) \ : __stpcpy_c (dest, src, strlen (src) + 1)) \ : __stpcpy_g (dest, src))) # define __stpcpy_c(dest, src, srclen) \ @@ -642,7 +642,7 @@ __strcpy_g (char *__dest, __const char * /* In glibc itself we use this symbol for namespace reasons. */ # define stpcpy(dest, src) __stpcpy (dest, src) -# define __stpcpy_small(dest, src, srclen) \ +# define __stpcpy_a_small(dest, src, srclen) \ (__extension__ ({ union { \ unsigned int __ui; \ unsigned short int __usi; \ @@ -1441,6 +1441,7 @@ __strrchr_g (__const char *__s, int __c) __STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject); +#ifndef _FORCE_INLINES __STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject) { @@ -1460,6 +1461,7 @@ __strcspn_c1 (__const char *__s, int __r : "cc"); return (__res - 1) - __s; } +#endif __STRING_INLINE size_t __strcspn_cg (__const char *__s, __const char __reject[], size_t __reject_len); @@ -1556,6 +1558,7 @@ __strcspn_g (__const char *__s, __const : __strspn_cg (s, accept, strlen (accept)))) \ : __strspn_g (s, accept))) +#ifndef _FORCE_INLINES __STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept); __STRING_INLINE size_t @@ -1575,6 +1578,7 @@ __strspn_c1 (__const char *__s, int __ac : "cc"); return (__res - 1) - __s; } +#endif __STRING_INLINE size_t __strspn_cg (__const char *__s, __const char __accept[], size_t __accept_len); diff -durpN glibc-2.2.4/sysdeps/ia64/bits/byteswap.h glibc-2.2.5/sysdeps/ia64/bits/byteswap.h --- glibc-2.2.4/sysdeps/ia64/bits/byteswap.h Mon Jul 23 10:55:48 2001 +++ glibc-2.2.5/sysdeps/ia64/bits/byteswap.h Tue Jan 8 02:20:28 2002 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. */ #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) @@ -91,3 +94,5 @@ #else # define __bswap_64(x) __bswap_constant_64 (x) #endif + +#endif /* _BITS_BYTESWAP_H */ diff -durpN glibc-2.2.4/sysdeps/ia64/dl-fptr.c glibc-2.2.5/sysdeps/ia64/dl-fptr.c --- glibc-2.2.4/sysdeps/ia64/dl-fptr.c Fri Jul 27 23:13:23 2001 +++ glibc-2.2.5/sysdeps/ia64/dl-fptr.c Sat Sep 8 10:16:44 2001 @@ -109,7 +109,7 @@ new_fdesc_table (struct local *l) new_table = __mmap (0, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); if (new_table == MAP_FAILED) - _dl_signal_error (errno, NULL, "cannot map pages for fdesc table"); + _dl_signal_error (errno, NULL, NULL, "cannot map pages for fdesc table"); new_table->len = (size - sizeof (*new_table)) / sizeof (struct ia64_fdesc); fdesc = &new_table->fdesc[0]; @@ -182,7 +182,7 @@ make_fptr_table (struct link_map *map) fptr_table = __mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); if (fptr_table == MAP_FAILED) - _dl_signal_error (errno, NULL, "cannot map pages for fptr table"); + _dl_signal_error (errno, NULL, NULL, "cannot map pages for fptr table"); map->l_mach.fptr_table_len = len; map->l_mach.fptr_table = fptr_table; @@ -203,7 +203,7 @@ __ia64_make_fptr (struct link_map *map, symidx = sym - symtab; if (symidx >= map->l_mach.fptr_table_len) - _dl_signal_error (0, NULL, + _dl_signal_error (0, NULL, NULL, "internal error: symidx out of range of fptr table"); if (!ftab[symidx]) diff -durpN glibc-2.2.4/sysdeps/ia64/dl-lookupcfg.h glibc-2.2.5/sysdeps/ia64/dl-lookupcfg.h --- glibc-2.2.4/sysdeps/ia64/dl-lookupcfg.h Fri Jul 27 23:13:23 2001 +++ glibc-2.2.5/sysdeps/ia64/dl-lookupcfg.h Sun Aug 26 17:59:13 2001 @@ -1,5 +1,5 @@ /* Configuration of lookup functions. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 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,9 @@ #define DL_LOOKUP_RETURNS_MAP #define ELF_FUNCTION_PTR_IS_SPECIAL #define DL_UNMAP_IS_SPECIAL + +/* Forward declaration. */ +struct link_map; extern void *_dl_symbol_address (const struct link_map *map, const Elf64_Sym *ref); diff -durpN glibc-2.2.4/sysdeps/ia64/dl-machine.h glibc-2.2.5/sysdeps/ia64/dl-machine.h --- glibc-2.2.4/sysdeps/ia64/dl-machine.h Fri Jul 27 23:13:23 2001 +++ glibc-2.2.5/sysdeps/ia64/dl-machine.h Thu Aug 30 16:09:10 2001 @@ -434,14 +434,14 @@ elf_machine_runtime_setup (struct link_m #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc, which we don't + use. */ /* ??? Ignore IPLTMSB for now. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_IA64_IPLTLSB) - -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc, which we don't use. */ -#define elf_machine_lookup_noexec_p(type) (0) +#define elf_machine_type_class(type) \ + (((type) == R_IA64_IPLTLSB) * ELF_RTYPE_CLASS_PLT) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_IA64_IPLTLSB @@ -508,7 +508,7 @@ elf_machine_rela (struct link_map *map, const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info); Elf64_Addr value; -#ifndef RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) @@ -520,24 +520,28 @@ elf_machine_rela (struct link_map *map, /* We cannot use a switch here because we cannot locate the switch jump table until we've self-relocated. */ - if (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB)) +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB), + 0)) { + assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB); value = *reloc_addr; -#ifndef RTLD_BOOTSTRAP +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* Already done in dynamic linker. */ if (map != &_dl_rtld_map) -#endif +# endif value += map->l_addr; } +# ifndef RTLD_BOOTSTRAP else if (r_type == R_IA64_NONE) return; +# endif else +#endif { struct link_map *sym_map; - /* - * RESOLVE_MAP() will return NULL if it fail to locate the symbol - */ + /* RESOLVE_MAP() will return NULL if it fail to locate the symbol. */ if ((sym_map = RESOLVE_MAP (&sym, version, r_type))) { value = sym ? sym_map->l_addr + sym->st_value : 0; @@ -575,6 +579,15 @@ elf_machine_rela (struct link_map *map, assert (! "unexpected dynamic reloc format"); } +static inline void +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + Elf64_Addr *const reloc_addr) +{ + /* ??? Ignore MSB and Instruction format for now. */ + assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB); + + *reloc_addr += l_addr; +} /* Perform a RELATIVE reloc on the .got entry that transfers to the .plt. */ static inline void diff -durpN glibc-2.2.4/sysdeps/ia64/fpu/libm-test-ulps glibc-2.2.5/sysdeps/ia64/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/ia64/fpu/libm-test-ulps Mon Jul 23 10:55:49 2001 +++ glibc-2.2.5/sysdeps/ia64/fpu/libm-test-ulps Wed Aug 29 15:46:05 2001 @@ -1,33 +1,14 @@ # Begin of automatic generation -# acosh -Test "acosh (7) == 2.633915793849633417250092694615937": -ldouble: 1 -ildouble: 1 - # asin Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 idouble: 1 -ldouble: 1 -ildouble: 1 # asinh Test "asinh (0.7) == 0.652666566082355786": -ildouble: 656 -ldouble: 656 - -# atan -#Test "atan (0.7) == 0.61072596438920861654375887649023613": -#ildouble: 549 -#ldouble: 549 - -# atanh -Test "atanh (0.7) == 0.8673005276940531944": -double: 1 -idouble: 1 -ildouble: 1605 -ldouble: 1605 +ildouble: 14 +ldouble: 14 # cabs Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": @@ -45,29 +26,25 @@ ifloat: 1 Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -ildouble: 560 -ldouble: 560 +ildouble: 1 +ldouble: 1 Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 # cacos -Test "Real part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": -Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 151 -ldouble: 151 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": float: 2 ifloat: 2 -ildouble: 329 -ldouble: 329 +ildouble: 1 +ldouble: 1 # cacosh Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": @@ -79,39 +56,27 @@ ildouble: 7 ldouble: 7 Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": double: 1 -float: 4 idouble: 1 -ifloat: 4 ildouble: 1 ldouble: 1 Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": -float: 1 -ifloat: 1 double: 1 idouble: 1 -ildouble: 328 -ldouble: 328 Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": -ildouble: 151 -ldouble: 151 - -# casin -Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": -Test "Imaginary part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": ildouble: 1 ldouble: 1 + +# casin Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 603 -ldouble: 603 Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 2 ifloat: 2 -ildouble: 329 -ldouble: 329 +ildouble: 1 +ldouble: 1 # casinh Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": @@ -119,77 +84,45 @@ double: 5 float: 1 idouble: 5 ifloat: 1 -ildouble: 6 -ldouble: 6 +ildouble: 5 +ldouble: 5 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 3 float: 6 idouble: 3 ifloat: 6 -ildouble: 6 -ldouble: 6 -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": -double: 1 -idouble: 1 -ildouble: 892 -ldouble: 892 +ildouble: 5 +ldouble: 5 Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 1 ifloat: 1 -double: 1 -idouble: 1 -ildouble: 12 -ldouble: 12 +ildouble: 2 +ldouble: 2 # catan -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": -float: 3 -ifloat: 3 Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 7 -ldouble: 7 Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -float: 4 -ifloat: 4 -ildouble: 251 -ldouble: 251 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 474 -ldouble: 474 +ifloat: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 1 -ifloat: 1 double: 4 idouble: 4 -ildouble: 6 -ldouble: 6 -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -float: 4 -ifloat: 4 +ildouble: 1 +ldouble: 1 Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -float: 6 -ifloat: 6 -double: 1 -idouble: 1 -ildouble: 66 -ldouble: 66 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -float: 6 -ifloat: 6 -double: 1 -idouble: 1 -ildouble: 447 -ldouble: 447 +ildouble: 1 +ldouble: 1 # cbrt Test "cbrt (0.7) == 0.8879040017426007084": @@ -197,7 +130,6 @@ double: 1 idouble: 1 # ccos -Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": float: 1 ifloat: 1 @@ -208,18 +140,11 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 5 -ldouble: 5 Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": double: 1 idouble: 1 -ildouble: 1901 -ldouble: 1901 # ccosh -Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": -float: 1 -ifloat: 1 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": double: 1 float: 1 @@ -232,114 +157,78 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1467 -ldouble: 1467 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": -double: 1 -idouble: 1 -ildouble: 1183 -ldouble: 1183 +ildouble: 1 +ldouble: 1 # cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": -ildouble: 4 -ldouble: 4 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -ildouble: 18 -ldouble: 18 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": -float: 1 -ifloat: 1 double: 1 -idouble: 1 -ildouble: 940 -ldouble: 940 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 1 -ifloat: 1 -ildouble: 1067 -ldouble: 1067 - -# clog -Test "Real part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -float: 3 -ifloat: 3 -double: 1 idouble: 1 -ildouble: 1 -ldouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 # clog10 -Test "Real part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": -float: 5 -ifloat: 5 double: 1 idouble: 1 ildouble: 1 ldouble: 1 -Test "Real part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": double: 1 idouble: 1 -Test "Real part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": double: 1 float: 1 @@ -350,32 +239,28 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 1403 -ldouble: 1403 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": double: 1 idouble: 1 -ildouble: 186 -ldouble: 186 -Test "Real part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +ildouble: 2 +ldouble: 2 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Real part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": double: 1 float: 1 @@ -384,12 +269,8 @@ ifloat: 1 # cos Test "cos (0.7) == 0.76484218728448842625585999019186495": -float: 1 -ifloat: 1 double: 1 idouble: 1 -ildouble: 529 -ldouble: 529 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 float: 0.5 @@ -407,8 +288,8 @@ double: 0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 -ildouble: 0.25 -ldouble: 0.25 +ildouble: 0.2314 +ldouble: 0.2314 # cosh Test "cosh (0.7) == 1.255169005630943018": @@ -416,41 +297,33 @@ ildouble: 2 ldouble: 2 # cpow +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 1 +ldouble: 1 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": double: 1 float: 5 idouble: 1 ifloat: 5 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": float: 2 ifloat: 2 ildouble: 4 ldouble: 4 -Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 1.104 +double: 1.1031 float: 2.5333 -idouble: 1.104 +idouble: 1.1031 ifloat: 2.5333 -ildouble: 1 -ldouble: 1 -Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": -ldouble: 1 -ildouble: 1 +ildouble: 0.9254 +ldouble: 0.9254 # csin -Test "Real part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": -float: 1 -ifloat: 1 -ildouble: 966 -ldouble: 966 Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": -float: 1 -ifloat: 1 -ildouble: 168 -ldouble: 168 +ildouble: 1 +ldouble: 1 # csinh Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": @@ -468,113 +341,83 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 413 -ldouble: 413 -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": -float: 1 -ifloat: 1 -ildouble: 477 -ldouble: 477 +ildouble: 2 +ldouble: 2 # csqrt Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 -Test "Imaginary part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 237 -ldouble: 237 +ifloat: 1 Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 -ildouble: 128 -ldouble: 128 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": double: 1 idouble: 1 -ildouble: 437 -ldouble: 437 +ildouble: 436 +ldouble: 436 Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 690 -ldouble: 690 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": -float: 1 -ifloat: 1 double: 1 idouble: 1 -ildouble: 367 -ldouble: 367 +ildouble: 1 +ldouble: 1 # ctanh Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": -float: 2 -ifloat: 2 -double: 2 -idouble: 2 -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": float: 1 ifloat: 1 ildouble: 24 ldouble: 24 -Test "Real part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": float: 1 ifloat: 1 -double: 0.5 -idouble: 0.5 Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": float: 1 ifloat: 1 -double: 2 -idouble: 2 -ildouble: 286 -ldouble: 286 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": -float: 1 -ifloat: 1 -double: 2 -idouble: 2 -ildouble: 3074 -ldouble: 3074 +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 # erfc Test "erfc (0.7) == 0.32219880616258152702": double: 1 idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "erfc (1.2) == 0.089686021770364619762": -float: 2 double: 1 +float: 2 idouble: 1 ifloat: 2 -ldouble: 2 ildouble: 2 +ldouble: 2 Test "erfc (2.0) == 0.0046777349810472658379": double: 1 idouble: 1 @@ -583,50 +426,30 @@ double: 24 float: 12 idouble: 24 ifloat: 12 -ldouble: 12 ildouble: 12 - -# exp -Test "exp (0.7) == 2.0137527074704765216": -ildouble: 412 -ldouble: 412 +ldouble: 12 # exp10 Test "exp10 (-1) == 0.1": -float: 1 -ifloat: 1 double: 2 +float: 1 idouble: 2 -ildouble: 818 -ldouble: 818 +ifloat: 1 Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 -double: 1 -idouble: 1 -ildouble: 1182 -ldouble: 1182 Test "exp10 (3) == 1000": -float: 2 -ifloat: 2 double: 6 +float: 2 idouble: 6 -ildouble: 8 -ldouble: 8 - -# exp2 -Test "exp2 (0.7) == 1.6245047927124710452": -ildouble: 462 -ldouble: 462 +ifloat: 2 +ildouble: 3 +ldouble: 3 # expm1 Test "expm1 (1) == M_El - 1.0": -float: 1 -ifloat: 1 -double: 1 -idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 # fmod Test "fmod (-6.5, -2.3) == -1.9": @@ -634,215 +457,180 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Test "fmod (-6.5, 2.3) == -1.9": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Test "fmod (6.5, -2.3) == 1.9": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Test "fmod (6.5, 2.3) == 1.9": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 # gamma Test "gamma (-0.5) == log(2*sqrt(pi))": -double: 1 -idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 # hypot Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -ildouble: 560 -ldouble: 560 +ildouble: 1 +ldouble: 1 Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -ildouble: 406 -ldouble: 406 # j0 -Test "j0 (10.0) == -0.24593576445134833520": +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Test "j0 (2.0) == 0.22389077914123566805": +ildouble: 2 +ldouble: 2 +Test "j0 (10.0) == -0.24593576445134833520": +double: 2 float: 1 +idouble: 2 ifloat: 1 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": double: 1 +float: 1 idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 -Test "j0 (10.0) == -0.24593576445134833520": -double: 2 -idouble: 2 # j1 Test "j1 (10.0) == 0.043472746168861436670": float: 2 ifloat: 2 -double: 2 -idouble: 2 Test "j1 (2.0) == 0.57672480775687338720": double: 1 idouble: 1 Test "j1 (8.0) == 0.23463634685391462438": -float: 1 -ifloat: 1 double: 1 idouble: 1 # jn Test "jn (0, 10.0) == -0.24593576445134833520": -float: 1 -ifloat: 1 double: 2 -idouble: 2 -Test "jn (0, 2.0) == 0.22389077914123566805": float: 1 +idouble: 2 ifloat: 1 -double: 1 -idouble: 1 Test "jn (0, 8.0) == 0.17165080713755390609": float: 1 ifloat: 1 Test "jn (1, 10.0) == 0.043472746168861436670": float: 2 ifloat: 2 -double: 2 -idouble: 2 Test "jn (1, 2.0) == 0.57672480775687338720": double: 1 idouble: 1 Test "jn (1, 8.0) == 0.23463634685391462438": -float: 1 -ifloat: 1 double: 1 idouble: 1 Test "jn (10, -1.0) == 0.26306151236874532070e-9": -float: 1 -ifloat: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "jn (10, 0.1) == 0.26905328954342155795e-19": -float: 4 -ifloat: 4 double: 6 +float: 4 idouble: 6 -ldouble: 1 +ifloat: 4 ildouble: 1 +ldouble: 1 Test "jn (10, 0.7) == 0.75175911502153953928e-11": -double: 4 +double: 3 float: 1 -idouble: 4 +idouble: 3 ifloat: 1 -ldouble: 2 ildouble: 2 +ldouble: 2 Test "jn (10, 1.0) == 0.26306151236874532070e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 10.0) == 0.20748610663335885770": float: 1 ifloat: 1 -ldouble: 1 -ildouble: 1 +ildouble: 2 +ldouble: 2 Test "jn (10, 2.0) == 0.25153862827167367096e-6": float: 3 ifloat: 3 -double: 2 -idouble: 2 +ildouble: 1 ldouble: 1 +Test "jn (3, -1.0) == -0.019563353982668405919": ildouble: 1 -Test "jn (10, 10.0) == 0.20748610663335885770": -float: 2 -ifloat: 2 -double: 4 -idouble: 4 -ldouble: 2 -ildouble: 2 +ldouble: 1 Test "jn (3, 0.1) == 0.000020820315754756261429": double: 1 idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "jn (3, 0.7) == 0.0069296548267508408077": float: 1 ifloat: 1 -double: 2 -idouble: 2 -Test "jn (3, 2.0) == 0.12894324947440205110": -float: 1 -ifloat: 1 -double: 1 -idouble: 1 +Test "jn (3, 1.0) == 0.019563353982668405919": +ildouble: 1 +ldouble: 1 Test "jn (3, 10.0) == 0.058379379305186812343": -float: 1 -ifloat: 1 double: 3 +float: 1 idouble: 3 -ldouble: 1 -ildouble: 1 -Test "jn (3, -1.0) == -0.019563353982668405919": -ldouble: 1 +ifloat: 1 ildouble: 1 -Test "jn (3, 1.0) == 0.019563353982668405919": ldouble: 1 -ildouble: 1 +Test "jn (3, 2.0) == 0.12894324947440205110": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # lgamma Test "lgamma (-0.5) == log(2*sqrt(pi))": -double: 1 -idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "lgamma (0.7) == 0.26086724653166651439": double: 1 float: 1 @@ -853,8 +641,8 @@ double: 1 float: 2 idouble: 1 ifloat: 2 -ldouble: 1 ildouble: 1 +ldouble: 1 # log Test "log (0.7) == -0.35667494393873237891263871124118447": @@ -862,20 +650,16 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2341 -ldouble: 2341 +ildouble: 1 +ldouble: 1 Test "log (e) == 1": float: 0.5 ifloat: 0.5 # log10 Test "log10 (0.7) == -0.15490195998574316929": -float: 1 -ifloat: 1 double: 1 idouble: 1 -ildouble: 2033 -ldouble: 2033 Test "log10 (e) == log10(e)": float: 1 ifloat: 1 @@ -888,8 +672,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 585 -ldouble: 585 +ildouble: 1 +ldouble: 1 # log2 Test "log2 (0.7) == -0.51457317282975824043": @@ -897,13 +681,11 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1688 -ldouble: 1688 # pow Test "pow (0.7, 1.2) == 0.65180494056638638188": -ildouble: 725 -ldouble: 725 +ildouble: 1 +ldouble: 1 # sin Test "sin (0.7) == 0.64421768723769105367261435139872014": @@ -912,8 +694,8 @@ ldouble: 1 # sincos Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367261435139872014 in sin_res": -ldouble: 1 ildouble: 1 +ldouble: 1 Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": double: 1 idouble: 1 @@ -934,62 +716,48 @@ double: 0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 -ildouble: 0.25 -ldouble: 0.25 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": -float: 1 -ifloat: 1 - +ildouble: 0.2314 +ldouble: 0.2314 # sinh Test "sinh (0.7) == 0.75858370183953350346": float: 1 ifloat: 1 -double: 1 -idouble: 1 -ildouble: 1028 -ldouble: 1029 - -# sqrt -Test "sqrt (0.7) == 0.83666002653407554798": -ildouble: 489 -ldouble: 489 -Test "sqrt (15239.9025) == 123.45": -ildouble: 325 -ldouble: 325 +ildouble: 1 +ldouble: 1 # tan Test "tan (0.7) == 0.84228838046307944812813500221293775": -ildouble: 1401 -ldouble: 1401 +ildouble: 1 +ldouble: 1 Test "tan (pi/4) == 1": double: 0.5 idouble: 0.5 # tanh -Test "tanh (0.7) == 0.60436777711716349631": -float: 1 -ifloat: 1 -double: 1 -idouble: 1 -ildouble: 521 -ldouble: 521 Test "tanh (-0.7) == -0.60436777711716349631": +double: 1 float: 1 +idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "tanh (0.7) == 0.60436777711716349631": double: 1 +float: 1 idouble: 1 -ildouble: 521 -ldouble: 521 +ifloat: 1 +ildouble: 1 +ldouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": -double: 2 +double: 1 float: 1 -idouble: 2 +idouble: 1 ifloat: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "tgamma (0.5) == sqrt (pi)": float: 1 ifloat: 1 @@ -1000,322 +768,251 @@ idouble: 1 ifloat: 1 # y0 -Test "y0 (0.1) == -1.5342386513503668441": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "y0 (0.7) == -0.19066492933739506743": -float: 1 -ifloat: 1 double: 2 idouble: 2 -ldouble: 2 ildouble: 2 +ldouble: 2 Test "y0 (1.0) == 0.088256964215676957983": double: 2 float: 1 idouble: 2 ifloat: 1 Test "y0 (1.5) == 0.38244892379775884396": -float: 1 -ifloat: 1 double: 2 +float: 1 idouble: 2 -Test "y0 (2.0) == 0.51037567264974511960": -double: 1 -idouble: 1 +ifloat: 1 Test "y0 (10.0) == 0.055671167283599391424": +double: 1 float: 1 +idouble: 1 ifloat: 1 -double: 2 -idouble: 2 +Test "y0 (2.0) == 0.51037567264974511960": +double: 1 +idouble: 1 Test "y0 (8.0) == 0.22352148938756622053": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ldouble: 1 +ifloat: 1 ildouble: 1 +ldouble: 1 # y1 Test "y1 (0.1) == -6.4589510947020269877": double: 1 -float: 1 idouble: 1 -ifloat: 1 Test "y1 (0.7) == -1.1032498719076333697": -float: 1 -ifloat: 1 -double: 1 -idouble: 1 -Test "y1 (1.0) == -0.78121282130028871655": double: 1 -idouble: 1 -Test "y1 (1.5) == -0.41230862697391129595": float: 1 +idouble: 1 ifloat: 1 Test "y1 (10.0) == 0.24901542420695388392": double: 3 -float: 2 +float: 1 idouble: 3 -ifloat: 2 +ifloat: 1 Test "y1 (2.0) == -0.10703243154093754689": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 -ldouble: 1 +ifloat: 1 ildouble: 1 +ldouble: 1 Test "y1 (8.0) == -0.15806046173124749426": -float: 2 -ifloat: 2 double: 1 +float: 2 idouble: 1 -ldouble: 1 +ifloat: 2 ildouble: 1 +ldouble: 1 # yn -Test "yn (0, 0.1) == -1.5342386513503668441": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "yn (0, 0.7) == -0.19066492933739506743": -float: 1 -ifloat: 1 double: 2 idouble: 2 -ldouble: 2 ildouble: 2 +ldouble: 2 Test "yn (0, 1.0) == 0.088256964215676957983": double: 2 float: 1 idouble: 2 ifloat: 1 Test "yn (0, 1.5) == 0.38244892379775884396": -float: 1 -ifloat: 1 double: 2 -idouble: 2 -Test "yn (0, 2.0) == 0.51037567264974511960": -double: 1 -idouble: 1 -Test "yn (0, 10.0) == 0.055671167283599391424": float: 1 -ifloat: 1 -double: 2 idouble: 2 -Test "yn (0, 8.0) == 0.22352148938756622053": +ifloat: 1 +Test "yn (0, 10.0) == 0.055671167283599391424": +double: 1 float: 1 +idouble: 1 ifloat: 1 +Test "yn (0, 2.0) == 0.51037567264974511960": double: 1 idouble: 1 -ldouble: 2 -ildouble: 2 -Test "yn (1, 0.1) == -6.4589510947020269877": +Test "yn (0, 8.0) == 0.22352148938756622053": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (1, 0.7) == -1.1032498719076333697": -float: 1 -ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": double: 1 idouble: 1 -Test "yn (1, 1.0) == -0.78121282130028871655": +Test "yn (1, 0.7) == -1.1032498719076333697": double: 1 -idouble: 1 -Test "yn (1, 1.5) == -0.41230862697391129595": float: 1 +idouble: 1 ifloat: 1 Test "yn (1, 10.0) == 0.24901542420695388392": double: 3 -float: 2 +float: 1 idouble: 3 -ifloat: 2 +ifloat: 1 Test "yn (1, 2.0) == -0.10703243154093754689": double: 1 -float: 2 +float: 1 idouble: 1 -ifloat: 2 -ldouble: 2 -ildouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "yn (1, 8.0) == -0.15806046173124749426": -float: 2 -ifloat: 2 double: 1 +float: 2 idouble: 1 -ldouble: 2 -ildouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 Test "yn (10, 0.1) == -0.11831335132045197885e19": -double: 2 float: 1 -idouble: 2 ifloat: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Test "yn (10, 0.7) == -0.42447194260703866924e10": -double: 6 -float: 3 -idouble: 6 -ifloat: 3 -ldouble: 7 +double: 1 +idouble: 1 ildouble: 7 +ldouble: 7 Test "yn (10, 1.0) == -0.12161801427868918929e9": float: 2 ifloat: 2 -double: 1 -idouble: 1 Test "yn (10, 10.0) == -0.35981415218340272205": double: 2 -float: 1 idouble: 2 -ifloat: 1 Test "yn (10, 2.0) == -129184.54220803928264": -float: 1 -ifloat: 1 double: 3 +float: 1 idouble: 3 -ldouble: 1 +ifloat: 1 ildouble: 1 -Test "yn (3, 0.1) == -5099.3323786129048894": +ldouble: 1 +Test "yn (3, 0.7) == -15.819479052819633505": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "yn (3, 0.7) == -15.819479052819633505": -float: 1 -ifloat: 1 -double: 2 -idouble: 2 -ldouble: 3 ildouble: 3 -Test "yn (3, 2.0) == -1.1277837768404277861": -float: 1 -ifloat: 1 -double: 1 -idouble: 1 +ldouble: 3 Test "yn (3, 10.0) == -0.25136265718383732978": double: 1 float: 1 idouble: 1 ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +double: 1 +idouble: 1 # Maximal error of functions: Function: "asin": double: 1 idouble: 1 -ldouble: 1 -ildouble: 1 Function: "asinh": -double: 1 -idouble: 1 -ildouble: 656 -ldouble: 656 - -Function: "atanh": -double: 1 -idouble: 1 -ildouble: 1605 -ldouble: 1605 +ildouble: 14 +ldouble: 14 Function: "cabs": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 560 -ldouble: 560 +ildouble: 1 +ldouble: 1 Function: Real part of "cacos": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 151 -ldouble: 151 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "cacos": float: 2 ifloat: 2 -ildouble: 329 -ldouble: 329 +ildouble: 1 +ldouble: 1 Function: Real part of "cacosh": -float: 7 -ifloat: 7 double: 1 +float: 7 idouble: 1 -ildouble: 328 -ldouble: 328 +ifloat: 7 +ildouble: 7 +ldouble: 7 Function: Imaginary part of "cacosh": -float: 3 -ifloat: 3 double: 1 idouble: 1 -ildouble: 151 -ldouble: 151 +ildouble: 1 +ldouble: 1 Function: Real part of "casin": double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 603 -ldouble: 603 Function: Imaginary part of "casin": float: 2 ifloat: 2 -ildouble: 329 -ldouble: 329 +ildouble: 1 +ldouble: 1 Function: Real part of "casinh": double: 5 float: 1 idouble: 5 ifloat: 1 -ildouble: 892 -ldouble: 892 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "casinh": double: 3 float: 6 idouble: 3 ifloat: 6 -ildouble: 12 -ldouble: 12 +ildouble: 5 +ldouble: 5 Function: Real part of "catan": -float: 4 -ifloat: 4 -ildouble: 251 -ldouble: 251 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "catan": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 474 -ldouble: 474 +ifloat: 1 Function: Real part of "catanh": double: 4 idouble: 4 -ildouble: 66 -ldouble: 66 - -Function: Imaginary part of "catanh": -float: 6 -ifloat: 6 -double: 1 -idouble: 1 -ildouble: 447 -ldouble: 447 +ildouble: 1 +ldouble: 1 Function: "cbrt": double: 1 @@ -1326,80 +1023,66 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 5 -ldouble: 5 Function: Imaginary part of "ccos": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1901 -ldouble: 1901 +ildouble: 1 +ldouble: 1 Function: Real part of "ccosh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1467 -ldouble: 1467 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ccosh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1183 -ldouble: 1183 +ildouble: 1 +ldouble: 1 Function: Real part of "cexp": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 940 -ldouble: 940 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "cexp": float: 1 ifloat: 1 -ildouble: 1067 -ldouble: 1067 - -Function: Real part of "clog": - -Function: Imaginary part of "clog": -float: 3 -ifloat: 3 -double: 1 -idouble: 1 -ildouble: 1 -ldouble: 1 Function: Real part of "clog10": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 1402 -ldouble: 1402 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "clog10": -float: 5 -ifloat: 5 double: 1 +float: 1 idouble: 1 -ildouble: 186 -ldouble: 186 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: "cos": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 529 -ldouble: 529 +ildouble: 0.5 +ldouble: 0.5 Function: "cosh": ildouble: 2 @@ -1410,277 +1093,243 @@ double: 1 float: 5 idouble: 1 ifloat: 5 -ldouble: 1 ildouble: 1 +ldouble: 1 Function: Imaginary part of "cpow": -double: 1.104 +double: 1.1031 float: 2.5333 -idouble: 1.104 +idouble: 1.1031 ifloat: 2.5333 ildouble: 4 ldouble: 4 -Function: Real part of "csin": -float: 1 -ifloat: 1 -ildouble: 966 -ldouble: 966 - Function: Imaginary part of "csin": -float: 1 -ifloat: 1 -ildouble: 168 -ldouble: 168 +ildouble: 1 +ldouble: 1 Function: Real part of "csinh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 413 -ldouble: 413 +ildouble: 2 +ldouble: 2 Function: Imaginary part of "csinh": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 477 -ldouble: 477 +ildouble: 2 +ldouble: 2 Function: Real part of "csqrt": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 237 -ldouble: 237 +ifloat: 1 Function: Imaginary part of "csqrt": -float: 2 -ifloat: 2 -ildouble: 128 -ldouble: 128 +float: 1 +ifloat: 1 Function: Real part of "ctan": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 690 -ldouble: 690 +ildouble: 436 +ldouble: 436 Function: Imaginary part of "ctan": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 367 -ldouble: 367 +ildouble: 1 +ldouble: 1 Function: Real part of "ctanh": -float: 2 -ifloat: 2 -double: 2 -idouble: 2 -ildouble: 286 -ldouble: 286 +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "ctanh": -float: 2 -ifloat: 2 -double: 2 -idouble: 2 -ildouble: 3074 -ldouble: 3074 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 24 +ldouble: 24 Function: "erfc": double: 24 float: 12 idouble: 24 ifloat: 12 -ldouble: 12 ildouble: 12 - -Function: "exp": -ildouble: 412 -ldouble: 412 +ldouble: 12 Function: "exp10": -float: 2 -ifloat: 2 double: 6 +float: 2 idouble: 6 -ildouble: 1182 -ldouble: 1182 - -Function: "exp2": -ildouble: 462 -ldouble: 462 +ifloat: 2 +ildouble: 3 +ldouble: 3 Function: "expm1": -float: 1 -ifloat: 1 -double: 1 -idouble: 1 -ildouble: 825 -ldouble: 825 +ildouble: 1 +ldouble: 1 Function: "fmod": double: 2 float: 1 idouble: 2 ifloat: 1 -ildouble: 4096 -ldouble: 4096 +ildouble: 1 +ldouble: 1 Function: "gamma": -double: 1 -idouble: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Function: "hypot": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 560 -ldouble: 560 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "j0": -float: 1 -ifloat: 1 double: 2 +float: 1 idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 Function: "j1": +double: 1 float: 2 +idouble: 1 ifloat: 2 -double: 2 -idouble: 2 Function: "jn": -float: 4 -ifloat: 4 double: 6 +float: 4 idouble: 6 -ldouble: 2 +ifloat: 4 ildouble: 2 +ldouble: 2 Function: "lgamma": double: 1 float: 2 idouble: 1 ifloat: 2 -ldouble: 1 ildouble: 1 +ldouble: 1 Function: "log": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2341 -ldouble: 2341 +ildouble: 1 +ldouble: 1 Function: "log10": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 2033 -ldouble: 2033 +ildouble: 1 +ldouble: 1 Function: "log1p": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 585 -ldouble: 585 +ildouble: 1 +ldouble: 1 Function: "log2": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 1688 -ldouble: 1688 Function: "pow": -ildouble: 725 -ldouble: 725 +ildouble: 1 +ldouble: 1 Function: "sin": -ildouble: 627 -ldouble: 627 +ildouble: 1 +ldouble: 1 Function: "sincos": double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 627 -ldouble: 627 +ildouble: 1 +ldouble: 1 Function: "sinh": float: 1 ifloat: 1 -double: 1 -idouble: 1 -ildouble: 1028 -ldouble: 1029 - -Function: "sqrt": -ildouble: 489 -ldouble: 489 +ildouble: 1 +ldouble: 1 Function: "tan": double: 0.5 idouble: 0.5 -ildouble: 1401 -ldouble: 1401 +ildouble: 1 +ldouble: 1 Function: "tanh": -float: 1 -ifloat: 1 double: 1 +float: 1 idouble: 1 -ildouble: 521 -ldouble: 521 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "tgamma": -double: 2 +double: 1 float: 1 -idouble: 2 +idouble: 1 ifloat: 1 -ldouble: 1 ildouble: 1 +ldouble: 1 Function: "y0": double: 2 float: 1 idouble: 2 ifloat: 1 -ldouble: 2 ildouble: 2 +ldouble: 2 Function: "y1": double: 3 float: 2 idouble: 3 ifloat: 2 -ldouble: 1 ildouble: 1 +ldouble: 1 Function: "yn": -double: 6 -float: 3 -idouble: 6 -ifloat: 3 -ldouble: 7 +double: 3 +float: 2 +idouble: 3 +ifloat: 2 ildouble: 7 +ldouble: 7 # end of automatic generation diff -durpN glibc-2.2.4/sysdeps/ia64/strncpy.S glibc-2.2.5/sysdeps/ia64/strncpy.S --- glibc-2.2.4/sysdeps/ia64/strncpy.S Mon Jul 23 10:55:48 2001 +++ glibc-2.2.5/sysdeps/ia64/strncpy.S Wed Aug 22 18:18:43 2001 @@ -1,7 +1,8 @@ /* Optimized version of the standard strncpy() function. This file is part of the GNU C Library. Copyright (C) 2000, 2001 Free Software Foundation, Inc. - Contributed by Dan Pop . + Contributed by Dan Pop + and Jakub Jelinek . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -21,80 +22,202 @@ /* Return: dest Inputs: - in0: dest - in1: src - in2: char count - - If n >= 24, do a memcpy(dest, src, min(strnlen(src, n)+1, n)), followed by a - memset(dest + strlen(src, n), 0, n - strlen(src, n) - 1) if necessary. + in0: dest + in1: src + in2: len - Otherwise, copy characters one by one and fill with nulls if necessary. */ + In this form, it assumes little endian mode. + */ #include #undef ret -#define saved_b0 loc0 -#define saved_pfs loc1 -#define saved_pr loc2 -#define saved_lc loc3 -#define tmp loc4 -#define len loc5 +#define saved_lc r15 +#define saved_pr r16 +#define thresh r17 +#define dest r18 +#define dest2 r19 +#define src r20 +#define len r21 +#define asrc r22 +#define tmp r23 +#define pos r24 +#define w0 r25 +#define w1 r26 +#define c r27 +#define sh2 r28 +#define sh1 r29 +#define loopcnt r30 +#define value r31 -#define dest in0 -#define src in1 -#define n in2 +ENTRY(strncpy) + .prologue + alloc r2 = ar.pfs, 3, 0, 29, 32 -#define rc ret0 +#define MEMLAT 2 + .rotr r[MEMLAT + 2] + .rotp p[MEMLAT + 1] -ENTRY(strncpy) - .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3) - alloc saved_pfs = ar.pfs, 3, 6, 3, 0 - mov saved_b0 = b0 + mov ret0 = in0 // return value = dest .save pr, saved_pr - mov saved_pr = pr + mov saved_pr = pr // save the predicate registers .save ar.lc, saved_lc - mov saved_lc = ar.lc + mov saved_lc = ar.lc // save the loop counter .body - cmp.gtu p6, p0 = 24, n -(p6) br.cond.spnt .cpyfew - mov out0 = src - mov out1 = n - mov tmp = gp - br.call.sptk.many b0 = strnlen# ;; // rc = strnlen(src, n); - add len = 1, rc // include the null in len - mov gp = tmp - mov out0 = dest ;; - cmp.ltu p4, p5 = len, n - mov out1 = src ;; -(p4) mov out2 = len -(p5) mov out2 = n - br.call.sptk.many b0 = memcpy# ;; // memcpy(dest, src, min(len, n)); - mov gp = tmp -(p4) add out0 = dest, len -(p4) mov out1 = r0 -(p4) sub out2 = n, len -(p4) br.call.sptk.many b0 = memset# ;; // fill the rest with nulls -(p4) mov gp = tmp - mov rc = dest - mov b0 = saved_b0 - mov ar.pfs = saved_pfs - mov pr = saved_pr, -1 - br.ret.sptk.many b0 -.cpyfew: - mov rc = dest - cmp.eq p6, p0 = n, r0 - adds n = -1, n -(p6) br.cond.spnt .restore_and_exit ;; // do nothing if n == 0 - mov ar.lc = n - cmp.eq p6, p0 = r0, r0 ;; // set p6 -.loop: -(p6) ld1 tmp = [src],1 + cmp.geu p6, p5 = 24, in2 +(p6) br.cond.spnt .short_len + sub tmp = r0, in0 ;; // tmp = -dest + mov len = in2 // len + mov dest = in0 // dest + mov src = in1 // src + and tmp = 7, tmp ;; // loopcnt = -dest % 8 + cmp.eq p6, p7 = tmp, r0 + adds loopcnt = -1, tmp // --loopcnt +(p6) br.cond.sptk .dest_aligned ;; + sub len = len, tmp // len -= -dest % 8 + mov ar.lc = loopcnt +.l1: // copy -dest % 8 bytes +(p5) ld1 c = [src], 1 // c = *src++ ;; - st1 [dest] = tmp, 1 -(p6) cmp.ne p6, p0 = tmp, r0 // clear p6 after encountering the - br.cloop.dptk .loop ;; // null character in src + st1 [dest] = c, 1 // *dest++ = c + cmp.ne p5, p7 = c, r0 + br.cloop.dptk .l1 ;; +(p7) br.cond.dpnt .found0_align + +.dest_aligned: // p7 should be cleared here + shr.u c = len, 3 // c = len / 8 + and sh1 = 7, src // sh1 = src % 8 + and asrc = -8, src ;; // asrc = src & -OPSIZ -- align src + adds c = (MEMLAT-1), c // c = (len / 8) + MEMLAT - 1 + sub thresh = 8, sh1 + mov pr.rot = 1 << 16 // set rotating predicates + shl sh1 = sh1, 3 ;; // sh1 = 8 * (src % 8) + mov ar.lc = c // "infinite" loop + sub sh2 = 64, sh1 // sh2 = 64 - sh1 + cmp.eq p6, p0 = sh1, r0 // is the src aligned? +(p6) br.cond.sptk .src_aligned + adds c = -(MEMLAT-1), c ;; // c = (len / 8) + ld8 r[1] = [asrc],8 + mov ar.lc = c ;; + + .align 32 +.l2: +(p6) st8 [dest] = value, 8 // store val to dest + ld8.s r[0] = [asrc], 8 + shr.u value = r[1], sh1 ;; // value = w0 >> sh1 + czx1.r pos = value ;; // do we have an "early" zero + cmp.lt p7, p0 = pos, thresh // in w0 >> sh1? + adds len = -8, len // len -= 8 +(p7) br.cond.dpnt .nonalign_found0 + chk.s r[0], .recovery2 // it is safe to do that only +.back2: // after the previous test + shl tmp = r[0], sh2 // tmp = w1 << sh2 + ;; + or value = value, tmp ;; // value |= tmp + czx1.r pos = value ;; + cmp.ne p7, p6 = 8, pos +(p7) br.cond.dpnt .nonalign_found0 + br.ctop.dptk .l2 ;; + adds len = 8, len + br.cond.sptk .not_found0 ;; +.nonalign_found0: + cmp.gtu p6, p0 = -8, len +(p6) br.cond.dptk .found0 + adds len = 8, len + br.cond.sptk .not_found0 ;; + + .align 32 +.src_aligned: +.l3: +(p[0]) ld8.s r[0] = [src], 8 +(p[MEMLAT]) chk.s r[MEMLAT], .recovery3 +.back3: +(p[MEMLAT]) mov value = r[MEMLAT] +(p[MEMLAT]) czx1.r pos = r[MEMLAT] ;; +(p[MEMLAT]) cmp.ne p7, p0 = 8, pos +(p[MEMLAT]) adds len = -8, len // len -= 8 +(p7) br.cond.dpnt .found0 +(p[MEMLAT]) st8 [dest] = r[MEMLAT], 8 + br.ctop.dptk .l3 ;; + + chk.s r[MEMLAT-1], .recovery4 +.back4: + mov value = r[MEMLAT-1] + +.not_found0: + cmp.eq p5, p6 = len, r0 + adds len = -1, len +(p5) br.cond.dptk .restore_and_exit ;; + mov ar.lc = len +.l4: +(p6) extr.u c = value, 0, 8 // c = value & 0xff +(p6) shr.u value = value, 8 ;; + st1 [dest] = c, 1 + cmp.ne p6, p0 = c, r0 + br.cloop.dptk .l4 + br.cond.sptk .restore_and_exit + +.found0_align: + mov pos = 0 + adds len = -8, len + mov value = 0 ;; +.found0: + shl tmp = pos, 3 + shr.u loopcnt = len, 4 // loopcnt = len / 16 + mov c = -1 ;; + cmp.eq p6, p0 = loopcnt, r0 + adds loopcnt = -1, loopcnt + shl c = c, tmp ;; + and len = 0xf, len + andcm value = value, c + mov ar.lc = loopcnt ;; + cmp.le p7, p0 = 8, len + adds dest2 = 16, dest + st8 [dest] = value, 8 + and len = 0x7, len +(p6) br.cond.dpnt .l6 ;; +.l5: + st8 [dest] = r0, 16 + st8 [dest2] = r0, 16 + br.cloop.dptk .l5 ;; +.l6: +(p7) st8 [dest] = r0, 8 + cmp.eq p5, p0 = len, r0 + adds len = -1, len +(p5) br.cond.dptk .restore_and_exit ;; + mov ar.lc = len ;; +.l7: + st1 [dest] = r0, 1 + br.cloop.dptk .l7 ;; .restore_and_exit: - mov ar.lc = saved_lc - mov ar.pfs = saved_pfs + mov ar.lc = saved_lc // restore the loop counter + mov pr = saved_pr, -1 // restore the predicate registers br.ret.sptk.many b0 + +.short_len: + cmp.eq p5, p0 = in2, r0 + adds loopcnt = -1, in2 +(p5) br.cond.spnt .restore_and_exit ;; + mov ar.lc = loopcnt // p6 should be set when we get here +.l8: +(p6) ld1 c = [in1], 1 // c = *src++ + ;; + st1 [in0] = c, 1 // *dest++ = c +(p6) cmp.ne p6, p0 = c, r0 + br.cloop.dptk .l8 + mov ar.lc = saved_lc // restore the loop counter + mov pr = saved_pr, -1 // restore the predicate registers + br.ret.sptk.many b0 +.recovery2: + add tmp = -8, asrc ;; + ld8 r[0] = [tmp] + br.cond.sptk .back2 +.recovery3: + add tmp = -(MEMLAT + 1) * 8, src ;; + ld8 r[MEMLAT] = [tmp] + br.cond.sptk .back3 +.recovery4: + add tmp = -(MEMLAT + 1) * 8, src ;; + ld8 r[MEMLAT] = [tmp] + br.cond.sptk .back4 END(strncpy) diff -durpN glibc-2.2.4/sysdeps/ieee754/dbl-64/e_remainder.c glibc-2.2.5/sysdeps/ieee754/dbl-64/e_remainder.c --- glibc-2.2.4/sysdeps/ieee754/dbl-64/e_remainder.c Mon Jul 23 10:55:50 2001 +++ glibc-2.2.5/sysdeps/ieee754/dbl-64/e_remainder.c Wed Dec 5 10:53:42 2001 @@ -55,8 +55,8 @@ double __ieee754_remainder(double x, dou kx=u.i[HIGH_HALF]&0x7fffffff; /* no sign for x*/ t.i[HIGH_HALF]&=0x7fffffff; /*no sign for y */ ky=t.i[HIGH_HALF]; - /*------ |x| < 2^1024 and 2^-970 < |y| < 2^1024 ------------------*/ - if (kx<0x7ff00000 && ky<0x7ff00000 && ky>=0x03500000) { + /*------ |x| < 2^1023 and 2^-970 < |y| < 2^1024 ------------------*/ + if (kx<0x7fe00000 && ky<0x7ff00000 && ky>=0x03500000) { if (kx+0x00100000=0x03500000) */ + } /* (kx<0x7fe00000&&ky<0x7ff00000&&ky>=0x03500000) */ else { - if (kx<0x7ff00000&&ky<0x7ff00000&&(ky>0||t.i[LOW_HALF]!=0)) { + if (kx<0x7fe00000&&ky<0x7ff00000&&(ky>0||t.i[LOW_HALF]!=0)) { y=ABS(y)*t128.x; z=__ieee754_remainder(x,y)*t128.x; z=__ieee754_remainder(z,y)*tm128.x; return z; } + else { + if ((kx&0x7ff00000)==0x7fe00000&&ky<0x7ff00000&&(ky>0||t.i[LOW_HALF]!=0)) { + y=ABS(y); + z=2.0*__ieee754_remainder(0.5*x,y); + d = ABS(z); + if (d <= ABS(d-y)) return z; + else return (z>0)?z-y:z+y; + } else { /* if x is too big */ if (kx == 0x7ff00000 && u.i[LOW_HALF] == 0 && y == 1.0) return x / x; @@ -116,5 +124,6 @@ double __ieee754_remainder(double x, dou return (u.i[HIGH_HALF]&0x80000000)?nNAN.x:NAN.x; else return x; } + } } } diff -durpN glibc-2.2.4/sysdeps/ieee754/dbl-64/mpa.h glibc-2.2.5/sysdeps/ieee754/dbl-64/mpa.h --- glibc-2.2.4/sysdeps/ieee754/dbl-64/mpa.h Mon Mar 12 12:02:45 2001 +++ glibc-2.2.5/sysdeps/ieee754/dbl-64/mpa.h Mon Oct 29 09:24:17 2001 @@ -76,3 +76,10 @@ void __sub(const mp_no *, const mp_no *, void __mul(const mp_no *, const mp_no *, mp_no *, int); void __inv(const mp_no *, mp_no *, int); void __dvd(const mp_no *, const mp_no *, mp_no *, int); + +extern void __mpatan (mp_no *, mp_no *, int); +extern void __mpatan2 (mp_no *, mp_no *, mp_no *, int); +extern void __mpsqrt (mp_no *, mp_no *, int); +extern void __mpexp (mp_no *, mp_no *__y, int); +extern void __c32 (mp_no *, mp_no *, mp_no *, int); +extern int __mpranred (double, mp_no *, int); diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_coshl.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_coshl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_coshl.c Mon Jun 11 05:22:55 2001 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_coshl.c Mon Nov 26 04:44:35 2001 @@ -55,7 +55,6 @@ __ieee754_coshl (x) { long double t, w; int32_t ex; - u_int32_t mx, lx; ieee854_long_double_shape_type u; u.value = x; @@ -73,7 +72,7 @@ __ieee754_coshl (x) { t = __expm1l (u.value); w = one + t; - if (ex < 0x3fc60000) /* |x| < 2^-57 */ + if (ex < 0x3fb80000) /* |x| < 2^-116 */ return w; /* cosh(tiny) = 1 */ return one + (t * t) / (w + w); diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_j0l.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_j0l.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_j0l.c Sat Aug 11 09:57:23 2001 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_j0l.c Mon Nov 26 04:44:35 2001 @@ -81,16 +81,16 @@ #include "math_private.h" /* 1 / sqrt(pi) */ -static long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L; +static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L; /* 2 / pi */ -static long double TWOOPI = 6.3661977236758134307553505349005744813784E-1L; -static long double zero = 0.0L; +static const long double TWOOPI = 6.3661977236758134307553505349005744813784E-1L; +static const long double zero = 0.0L; /* J0(x) = 1 - x^2/4 + x^2 x^2 R(x^2) Peak relative error 3.4e-37 0 <= x <= 2 */ #define NJ0_2N 6 -static long double J0_2N[NJ0_2N + 1] = { +static const long double J0_2N[NJ0_2N + 1] = { 3.133239376997663645548490085151484674892E16L, -5.479944965767990821079467311839107722107E14L, 6.290828903904724265980249871997551894090E12L, @@ -100,7 +100,7 @@ static long double J0_2N[NJ0_2N + 1] = { 1.562826808020631846245296572935547005859E2L, }; #define NJ0_2D 6 -static long double J0_2D[NJ0_2D + 1] = { +static const long double J0_2D[NJ0_2D + 1] = { 2.005273201278504733151033654496928968261E18L, 2.063038558793221244373123294054149790864E16L, 1.053350447931127971406896594022010524994E14L, @@ -115,7 +115,7 @@ static long double J0_2D[NJ0_2D + 1] = { 0 <= 1/x <= .0625 Peak relative error 3.3e-36 */ #define NP16_IN 9 -static long double P16_IN[NP16_IN + 1] = { +static const long double P16_IN[NP16_IN + 1] = { -1.901689868258117463979611259731176301065E-16L, -1.798743043824071514483008340803573980931E-13L, -6.481746687115262291873324132944647438959E-11L, @@ -128,7 +128,7 @@ static long double P16_IN[NP16_IN + 1] = -1.271468546258855781530458854476627766233E-1L, }; #define NP16_ID 9 -static long double P16_ID[NP16_ID + 1] = { +static const long double P16_ID[NP16_ID + 1] = { 2.704625590411544837659891569420764475007E-15L, 2.562526347676857624104306349421985403573E-12L, 9.259137589952741054108665570122085036246E-10L, @@ -146,7 +146,7 @@ static long double P16_ID[NP16_ID + 1] = 0.0625 <= 1/x <= 0.125 Peak relative error 2.4e-35 */ #define NP8_16N 10 -static long double P8_16N[NP8_16N + 1] = { +static const long double P8_16N[NP8_16N + 1] = { -2.335166846111159458466553806683579003632E-15L, -1.382763674252402720401020004169367089975E-12L, -3.192160804534716696058987967592784857907E-10L, @@ -160,7 +160,7 @@ static long double P8_16N[NP8_16N + 1] = -1.670703190068873186016102289227646035035E-1L, }; #define NP8_16D 10 -static long double P8_16D[NP8_16D + 1] = { +static const long double P8_16D[NP8_16D + 1] = { 3.321126181135871232648331450082662856743E-14L, 1.971894594837650840586859228510007703641E-11L, 4.571144364787008285981633719513897281690E-9L, @@ -179,7 +179,7 @@ static long double P8_16D[NP8_16D + 1] = 0.125 <= 1/x <= 0.1875 Peak relative error 2.7e-35 */ #define NP5_8N 10 -static long double P5_8N[NP5_8N + 1] = { +static const long double P5_8N[NP5_8N + 1] = { -1.270478335089770355749591358934012019596E-12L, -4.007588712145412921057254992155810347245E-10L, -4.815187822989597568124520080486652009281E-8L, @@ -193,7 +193,7 @@ static long double P5_8N[NP5_8N + 1] = { -8.920026499909994671248893388013790366712E-3L, }; #define NP5_8D 9 -static long double P5_8D[NP5_8D + 1] = { +static const long double P5_8D[NP5_8D + 1] = { 1.806902521016705225778045904631543990314E-11L, 5.728502760243502431663549179135868966031E-9L, 6.938168504826004255287618819550667978450E-7L, @@ -211,7 +211,7 @@ static long double P5_8D[NP5_8D + 1] = { Peak relative error 3.5e-35 0.1875 <= 1/x <= 0.25 */ #define NP4_5N 9 -static long double P4_5N[NP4_5N + 1] = { +static const long double P4_5N[NP4_5N + 1] = { -9.791405771694098960254468859195175708252E-10L, -1.917193059944531970421626610188102836352E-7L, -1.393597539508855262243816152893982002084E-5L, @@ -224,7 +224,7 @@ static long double P4_5N[NP4_5N + 1] = { -2.251804386252969656586810309252357233320E-1L, }; #define NP4_5D 9 -static long double P4_5D[NP4_5D + 1] = { +static const long double P4_5D[NP4_5D + 1] = { 1.392555487577717669739688337895791213139E-8L, 2.748886559120659027172816051276451376854E-6L, 2.024717710644378047477189849678576659290E-4L, @@ -242,7 +242,7 @@ static long double P4_5D[NP4_5D + 1] = { Peak relative error 2.3e-36 0.25 <= 1/x <= 0.3125 */ #define NP3r2_4N 9 -static long double P3r2_4N[NP3r2_4N + 1] = { +static const long double P3r2_4N[NP3r2_4N + 1] = { -2.589155123706348361249809342508270121788E-8L, -3.746254369796115441118148490849195516593E-6L, -1.985595497390808544622893738135529701062E-4L, @@ -255,7 +255,7 @@ static long double P3r2_4N[NP3r2_4N + 1] -2.518966692256192789269859830255724429375E-1L, }; #define NP3r2_4D 9 -static long double P3r2_4D[NP3r2_4D + 1] = { +static const long double P3r2_4D[NP3r2_4D + 1] = { 3.682353957237979993646169732962573930237E-7L, 5.386741661883067824698973455566332102029E-5L, 2.906881154171822780345134853794241037053E-3L, @@ -273,7 +273,7 @@ static long double P3r2_4D[NP3r2_4D + 1] Peak relative error 1.0e-35 0.3125 <= 1/x <= 0.375 */ #define NP2r7_3r2N 9 -static long double P2r7_3r2N[NP2r7_3r2N + 1] = { +static const long double P2r7_3r2N[NP2r7_3r2N + 1] = { -1.917322340814391131073820537027234322550E-7L, -1.966595744473227183846019639723259011906E-5L, -7.177081163619679403212623526632690465290E-4L, @@ -286,7 +286,7 @@ static long double P2r7_3r2N[NP2r7_3r2N -4.098025357743657347681137871388402849581E-3L, }; #define NP2r7_3r2D 8 -static long double P2r7_3r2D[NP2r7_3r2D + 1] = { +static const long double P2r7_3r2D[NP2r7_3r2D + 1] = { 2.726858489303036441686496086962545034018E-6L, 2.840430827557109238386808968234848081424E-4L, 1.063826772041781947891481054529454088832E-2L, @@ -303,7 +303,7 @@ static long double P2r7_3r2D[NP2r7_3r2D Peak relative error 1.3e-36 0.3125 <= 1/x <= 0.4375 */ #define NP2r3_2r7N 9 -static long double P2r3_2r7N[NP2r3_2r7N + 1] = { +static const long double P2r3_2r7N[NP2r3_2r7N + 1] = { -1.594642785584856746358609622003310312622E-6L, -1.323238196302221554194031733595194539794E-4L, -3.856087818696874802689922536987100372345E-3L, @@ -316,7 +316,7 @@ static long double P2r3_2r7N[NP2r3_2r7N -3.246859189246653459359775001466924610236E-3L, }; #define NP2r3_2r7D 8 -static long double P2r3_2r7D[NP2r3_2r7D + 1] = { +static const long double P2r3_2r7D[NP2r3_2r7D + 1] = { 2.267936634217251403663034189684284173018E-5L, 1.918112982168673386858072491437971732237E-3L, 5.771704085468423159125856786653868219522E-2L, @@ -333,7 +333,7 @@ static long double P2r3_2r7D[NP2r3_2r7D Peak relative error 1.2e-35 0.4375 <= 1/x <= 0.5 */ #define NP2_2r3N 8 -static long double P2_2r3N[NP2_2r3N + 1] = { +static const long double P2_2r3N[NP2_2r3N + 1] = { -1.001042324337684297465071506097365389123E-4L, -6.289034524673365824853547252689991418981E-3L, -1.346527918018624234373664526930736205806E-1L, @@ -345,7 +345,7 @@ static long double P2_2r3N[NP2_2r3N + 1] -3.000348318524471807839934764596331810608E-1L, }; #define NP2_2r3D 8 -static long double P2_2r3D[NP2_2r3D + 1] = { +static const long double P2_2r3D[NP2_2r3D + 1] = { 1.423705538269770974803901422532055612980E-3L, 9.171476630091439978533535167485230575894E-2L, 2.049776318166637248868444600215942828537E0L, @@ -363,7 +363,7 @@ static long double P2_2r3D[NP2_2r3D + 1] Peak relative error 2.2e-35 0 <= 1/x <= .0625 */ #define NQ16_IN 10 -static long double Q16_IN[NQ16_IN + 1] = { +static const long double Q16_IN[NQ16_IN + 1] = { 2.343640834407975740545326632205999437469E-18L, 2.667978112927811452221176781536278257448E-15L, 1.178415018484555397390098879501969116536E-12L, @@ -377,7 +377,7 @@ static long double Q16_IN[NQ16_IN + 1] = 1.107891967702173292405380993183694932208E-2L, }; #define NQ16_ID 9 -static long double Q16_ID[NQ16_ID + 1] = { +static const long double Q16_ID[NQ16_ID + 1] = { 3.199850952578356211091219295199301766718E-17L, 3.652601488020654842194486058637953363918E-14L, 1.620179741394865258354608590461839031281E-11L, @@ -396,7 +396,7 @@ static long double Q16_ID[NQ16_ID + 1] = Peak relative error 5.1e-36 0.0625 <= 1/x <= 0.125 */ #define NQ8_16N 11 -static long double Q8_16N[NQ8_16N + 1] = { +static const long double Q8_16N[NQ8_16N + 1] = { 1.001954266485599464105669390693597125904E-17L, 7.545499865295034556206475956620160007849E-15L, 2.267838684785673931024792538193202559922E-12L, @@ -411,7 +411,7 @@ static long double Q8_16N[NQ8_16N + 1] = 7.598886310387075708640370806458926458301E-2L, }; #define NQ8_16D 11 -static long double Q8_16D[NQ8_16D + 1] = { +static const long double Q8_16D[NQ8_16D + 1] = { 1.368001558508338469503329967729951830843E-16L, 1.034454121857542147020549303317348297289E-13L, 3.128109209247090744354764050629381674436E-11L, @@ -432,7 +432,7 @@ static long double Q8_16D[NQ8_16D + 1] = Peak relative error 3.9e-35 0.125 <= 1/x <= 0.1875 */ #define NQ5_8N 10 -static long double Q5_8N[NQ5_8N + 1] = { +static const long double Q5_8N[NQ5_8N + 1] = { 1.750399094021293722243426623211733898747E-13L, 6.483426211748008735242909236490115050294E-11L, 9.279430665656575457141747875716899958373E-9L, @@ -446,7 +446,7 @@ static long double Q5_8N[NQ5_8N + 1] = { 8.383984859679804095463699702165659216831E-2L, }; #define NQ5_8D 10 -static long double Q5_8D[NQ5_8D + 1] = { +static const long double Q5_8D[NQ5_8D + 1] = { 2.389878229704327939008104855942987615715E-12L, 8.926142817142546018703814194987786425099E-10L, 1.294065862406745901206588525833274399038E-7L, @@ -466,7 +466,7 @@ static long double Q5_8D[NQ5_8D + 1] = { Peak relative error 3.2e-35 0.1875 <= 1/x <= 0.25 */ #define NQ4_5N 10 -static long double Q4_5N[NQ4_5N + 1] = { +static const long double Q4_5N[NQ4_5N + 1] = { 2.233870042925895644234072357400122854086E-11L, 5.146223225761993222808463878999151699792E-9L, 4.459114531468296461688753521109797474523E-7L, @@ -480,7 +480,7 @@ static long double Q4_5N[NQ4_5N + 1] = { 1.941595365256460232175236758506411486667E-3L, }; #define NQ4_5D 9 -static long double Q4_5D[NQ4_5D + 1] = { +static const long double Q4_5D[NQ4_5D + 1] = { 3.049977232266999249626430127217988047453E-10L, 7.120883230531035857746096928889676144099E-8L, 6.301786064753734446784637919554359588859E-6L, @@ -499,7 +499,7 @@ static long double Q4_5D[NQ4_5D + 1] = { Peak relative error 1.4e-36 0.25 <= 1/x <= 0.3125 */ #define NQ3r2_4N 10 -static long double Q3r2_4N[NQ3r2_4N + 1] = { +static const long double Q3r2_4N[NQ3r2_4N + 1] = { 6.126167301024815034423262653066023684411E-10L, 1.043969327113173261820028225053598975128E-7L, 6.592927270288697027757438170153763220190E-6L, @@ -513,7 +513,7 @@ static long double Q3r2_4N[NQ3r2_4N + 1] 1.229509543620976530030153018986910810747E-3L, }; #define NQ3r2_4D 9 -static long double Q3r2_4D[NQ3r2_4D + 1] = { +static const long double Q3r2_4D[NQ3r2_4D + 1] = { 8.364260446128475461539941389210166156568E-9L, 1.451301850638956578622154585560759862764E-6L, 9.431830010924603664244578867057141839463E-5L, @@ -532,7 +532,7 @@ static long double Q3r2_4D[NQ3r2_4D + 1] Peak relative error 3.8e-36 0.3125 <= 1/x <= 0.375 */ #define NQ2r7_3r2N 9 -static long double Q2r7_3r2N[NQ2r7_3r2N + 1] = { +static const long double Q2r7_3r2N[NQ2r7_3r2N + 1] = { 7.584861620402450302063691901886141875454E-8L, 9.300939338814216296064659459966041794591E-6L, 4.112108906197521696032158235392604947895E-4L, @@ -545,7 +545,7 @@ static long double Q2r7_3r2N[NQ2r7_3r2N 9.805848115375053300608712721986235900715E-2L, }; #define NQ2r7_3r2D 9 -static long double Q2r7_3r2D[NQ2r7_3r2D + 1] = { +static const long double Q2r7_3r2D[NQ2r7_3r2D + 1] = { 1.035586492113036586458163971239438078160E-6L, 1.301999337731768381683593636500979713689E-4L, 5.993695702564527062553071126719088859654E-3L, @@ -564,7 +564,7 @@ static long double Q2r7_3r2D[NQ2r7_3r2D Peak relative error 2.2e-35 0.375 <= 1/x <= 0.4375 */ #define NQ2r3_2r7N 9 -static long double Q2r3_2r7N[NQ2r3_2r7N + 1] = { +static const long double Q2r3_2r7N[NQ2r3_2r7N + 1] = { 4.455027774980750211349941766420190722088E-7L, 4.031998274578520170631601850866780366466E-5L, 1.273987274325947007856695677491340636339E-3L, @@ -577,7 +577,7 @@ static long double Q2r3_2r7N[NQ2r3_2r7N 7.261345286655345047417257611469066147561E-4L, }; #define NQ2r3_2r7D 8 -static long double Q2r3_2r7D[NQ2r3_2r7D + 1] = { +static const long double Q2r3_2r7D[NQ2r3_2r7D + 1] = { 6.082600739680555266312417978064954793142E-6L, 5.693622538165494742945717226571441747567E-4L, 1.901625907009092204458328768129666975975E-2L, @@ -595,7 +595,7 @@ static long double Q2r3_2r7D[NQ2r3_2r7D Peak relative error 3.1e-36 0.4375 <= 1/x <= 0.5 */ #define NQ2_2r3N 9 -static long double Q2_2r3N[NQ2_2r3N + 1] = { +static const long double Q2_2r3N[NQ2_2r3N + 1] = { 2.817566786579768804844367382809101929314E-6L, 2.122772176396691634147024348373539744935E-4L, 5.501378031780457828919593905395747517585E-3L, @@ -608,7 +608,7 @@ static long double Q2_2r3N[NQ2_2r3N + 1] 5.317668723070450235320878117210807236375E-4L, }; #define NQ2_2r3D 8 -static long double Q2_2r3D[NQ2_2r3D + 1] = { +static const long double Q2_2r3D[NQ2_2r3D + 1] = { 3.846924354014260866793741072933159380158E-5L, 3.017562820057704325510067178327449946763E-3L, 8.356305620686867949798885808540444210935E-2L, @@ -625,7 +625,7 @@ static long double Q2_2r3D[NQ2_2r3D + 1] /* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */ static long double -neval (long double x, long double *p, int n) +neval (long double x, const long double *p, int n) { long double y; @@ -643,7 +643,7 @@ neval (long double x, long double *p, in /* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */ static long double -deval (long double x, long double *p, int n) +deval (long double x, const long double *p, int n) { long double y; @@ -754,16 +754,16 @@ __ieee754_j0l (long double x) = 1/sqrt(2) * (sin(x) - cos(x)) sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x)) cf. Fdlibm. */ - c = cosl (x); - s = sinl (x); + c = cosl (xx); + s = sinl (xx); ss = s - c; cc = s + c; - z = -cosl (x + x); + z = -cosl (xx + xx); if ((s * c) < 0) cc = z / ss; else ss = z / cc; - z = ONEOSQPI * (p * cc - q * ss) / sqrtl (x); + z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); return z; } diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_j1l.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_j1l.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_j1l.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_j1l.c Mon Nov 26 04:44:35 2001 @@ -0,0 +1,915 @@ +/* j1l.c + * + * Bessel function of order one + * + * + * + * SYNOPSIS: + * + * long double x, y, j1l(); + * + * y = j1l( x ); + * + * + * + * DESCRIPTION: + * + * Returns Bessel function of first kind, order one of the argument. + * + * The domain is divided into two major intervals [0, 2] and + * (2, infinity). In the first interval the rational approximation is + * J1(x) = .5x + x x^2 R(x^2) + * + * The second interval is further partitioned into eight equal segments + * of 1/x. + * J1(x) = sqrt(2/(pi x)) (P1(x) cos(X) - Q1(x) sin(X)), + * X = x - 3 pi / 4, + * + * and the auxiliary functions are given by + * + * J1(x)cos(X) + Y1(x)sin(X) = sqrt( 2/(pi x)) P1(x), + * P1(x) = 1 + 1/x^2 R(1/x^2) + * + * Y1(x)cos(X) - J1(x)sin(X) = sqrt( 2/(pi x)) Q1(x), + * Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)). + * + * + * + * ACCURACY: + * + * Absolute error: + * arithmetic domain # trials peak rms + * IEEE 0, 30 100000 2.8e-34 2.7e-35 + * + * + */ + +/* y1l.c + * + * Bessel function of the second kind, order one + * + * + * + * SYNOPSIS: + * + * double x, y, y1l(); + * + * y = y1l( x ); + * + * + * + * DESCRIPTION: + * + * Returns Bessel function of the second kind, of order + * one, of the argument. + * + * The domain is divided into two major intervals [0, 2] and + * (2, infinity). In the first interval the rational approximation is + * Y1(x) = 2/pi * (log(x) * J1(x) - 1/x) + x R(x^2) . + * In the second interval the approximation is the same as for J1(x), and + * Y1(x) = sqrt(2/(pi x)) (P1(x) sin(X) + Q1(x) cos(X)), + * X = x - 3 pi / 4. + * + * ACCURACY: + * + * Absolute error, when y0(x) < 1; else relative error: + * + * arithmetic domain # trials peak rms + * IEEE 0, 30 100000 2.7e-34 2.9e-35 + * + */ + +/* Copyright 2001 by Stephen L. Moshier (moshier@na-net.onrl.gov). */ + +#include "math.h" +#include "math_private.h" + +/* 1 / sqrt(pi) */ +static const long double ONEOSQPI = 5.6418958354775628694807945156077258584405E-1L; +/* 2 / pi */ +static const long double TWOOPI = 6.3661977236758134307553505349005744813784E-1L; +static const long double zero = 0.0L; + +/* J1(x) = .5x + x x^2 R(x^2) + Peak relative error 1.9e-35 + 0 <= x <= 2 */ +#define NJ0_2N 6 +static const long double J0_2N[NJ0_2N + 1] = { + -5.943799577386942855938508697619735179660E16L, + 1.812087021305009192259946997014044074711E15L, + -2.761698314264509665075127515729146460895E13L, + 2.091089497823600978949389109350658815972E11L, + -8.546413231387036372945453565654130054307E8L, + 1.797229225249742247475464052741320612261E6L, + -1.559552840946694171346552770008812083969E3L +}; +#define NJ0_2D 6 +static const long double J0_2D[NJ0_2D + 1] = { + 9.510079323819108569501613916191477479397E17L, + 1.063193817503280529676423936545854693915E16L, + 5.934143516050192600795972192791775226920E13L, + 2.168000911950620999091479265214368352883E11L, + 5.673775894803172808323058205986256928794E8L, + 1.080329960080981204840966206372671147224E6L, + 1.411951256636576283942477881535283304912E3L, + /* 1.000000000000000000000000000000000000000E0L */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + 0 <= 1/x <= .0625 + Peak relative error 3.6e-36 */ +#define NP16_IN 9 +static const long double P16_IN[NP16_IN + 1] = { + 5.143674369359646114999545149085139822905E-16L, + 4.836645664124562546056389268546233577376E-13L, + 1.730945562285804805325011561498453013673E-10L, + 3.047976856147077889834905908605310585810E-8L, + 2.855227609107969710407464739188141162386E-6L, + 1.439362407936705484122143713643023998457E-4L, + 3.774489768532936551500999699815873422073E-3L, + 4.723962172984642566142399678920790598426E-2L, + 2.359289678988743939925017240478818248735E-1L, + 3.032580002220628812728954785118117124520E-1L, +}; +#define NP16_ID 9 +static const long double P16_ID[NP16_ID + 1] = { + 4.389268795186898018132945193912677177553E-15L, + 4.132671824807454334388868363256830961655E-12L, + 1.482133328179508835835963635130894413136E-9L, + 2.618941412861122118906353737117067376236E-7L, + 2.467854246740858470815714426201888034270E-5L, + 1.257192927368839847825938545925340230490E-3L, + 3.362739031941574274949719324644120720341E-2L, + 4.384458231338934105875343439265370178858E-1L, + 2.412830809841095249170909628197264854651E0L, + 4.176078204111348059102962617368214856874E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + 0.0625 <= 1/x <= 0.125 + Peak relative error 1.9e-36 */ +#define NP8_16N 11 +static const long double P8_16N[NP8_16N + 1] = { + 2.984612480763362345647303274082071598135E-16L, + 1.923651877544126103941232173085475682334E-13L, + 4.881258879388869396043760693256024307743E-11L, + 6.368866572475045408480898921866869811889E-9L, + 4.684818344104910450523906967821090796737E-7L, + 2.005177298271593587095982211091300382796E-5L, + 4.979808067163957634120681477207147536182E-4L, + 6.946005761642579085284689047091173581127E-3L, + 5.074601112955765012750207555985299026204E-2L, + 1.698599455896180893191766195194231825379E-1L, + 1.957536905259237627737222775573623779638E-1L, + 2.991314703282528370270179989044994319374E-2L, +}; +#define NP8_16D 10 +static const long double P8_16D[NP8_16D + 1] = { + 2.546869316918069202079580939942463010937E-15L, + 1.644650111942455804019788382157745229955E-12L, + 4.185430770291694079925607420808011147173E-10L, + 5.485331966975218025368698195861074143153E-8L, + 4.062884421686912042335466327098932678905E-6L, + 1.758139661060905948870523641319556816772E-4L, + 4.445143889306356207566032244985607493096E-3L, + 6.391901016293512632765621532571159071158E-2L, + 4.933040207519900471177016015718145795434E-1L, + 1.839144086168947712971630337250761842976E0L, + 2.715120873995490920415616716916149586579E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + 0.125 <= 1/x <= 0.1875 + Peak relative error 1.3e-36 */ +#define NP5_8N 10 +static const long double P5_8N[NP5_8N + 1] = { + 2.837678373978003452653763806968237227234E-12L, + 9.726641165590364928442128579282742354806E-10L, + 1.284408003604131382028112171490633956539E-7L, + 8.524624695868291291250573339272194285008E-6L, + 3.111516908953172249853673787748841282846E-4L, + 6.423175156126364104172801983096596409176E-3L, + 7.430220589989104581004416356260692450652E-2L, + 4.608315409833682489016656279567605536619E-1L, + 1.396870223510964882676225042258855977512E0L, + 1.718500293904122365894630460672081526236E0L, + 5.465927698800862172307352821870223855365E-1L +}; +#define NP5_8D 10 +static const long double P5_8D[NP5_8D + 1] = { + 2.421485545794616609951168511612060482715E-11L, + 8.329862750896452929030058039752327232310E-9L, + 1.106137992233383429630592081375289010720E-6L, + 7.405786153760681090127497796448503306939E-5L, + 2.740364785433195322492093333127633465227E-3L, + 5.781246470403095224872243564165254652198E-2L, + 6.927711353039742469918754111511109983546E-1L, + 4.558679283460430281188304515922826156690E0L, + 1.534468499844879487013168065728837900009E1L, + 2.313927430889218597919624843161569422745E1L, + 1.194506341319498844336768473218382828637E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + Peak relative error 1.4e-36 + 0.1875 <= 1/x <= 0.25 */ +#define NP4_5N 10 +static const long double P4_5N[NP4_5N + 1] = { + 1.846029078268368685834261260420933914621E-10L, + 3.916295939611376119377869680335444207768E-8L, + 3.122158792018920627984597530935323997312E-6L, + 1.218073444893078303994045653603392272450E-4L, + 2.536420827983485448140477159977981844883E-3L, + 2.883011322006690823959367922241169171315E-2L, + 1.755255190734902907438042414495469810830E-1L, + 5.379317079922628599870898285488723736599E-1L, + 7.284904050194300773890303361501726561938E-1L, + 3.270110346613085348094396323925000362813E-1L, + 1.804473805689725610052078464951722064757E-2L, +}; +#define NP4_5D 9 +static const long double P4_5D[NP4_5D + 1] = { + 1.575278146806816970152174364308980863569E-9L, + 3.361289173657099516191331123405675054321E-7L, + 2.704692281550877810424745289838790693708E-5L, + 1.070854930483999749316546199273521063543E-3L, + 2.282373093495295842598097265627962125411E-2L, + 2.692025460665354148328762368240343249830E-1L, + 1.739892942593664447220951225734811133759E0L, + 5.890727576752230385342377570386657229324E0L, + 9.517442287057841500750256954117735128153E0L, + 6.100616353935338240775363403030137736013E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + Peak relative error 3.0e-36 + 0.25 <= 1/x <= 0.3125 */ +#define NP3r2_4N 9 +static const long double P3r2_4N[NP3r2_4N + 1] = { + 8.240803130988044478595580300846665863782E-8L, + 1.179418958381961224222969866406483744580E-5L, + 6.179787320956386624336959112503824397755E-4L, + 1.540270833608687596420595830747166658383E-2L, + 1.983904219491512618376375619598837355076E-1L, + 1.341465722692038870390470651608301155565E0L, + 4.617865326696612898792238245990854646057E0L, + 7.435574801812346424460233180412308000587E0L, + 4.671327027414635292514599201278557680420E0L, + 7.299530852495776936690976966995187714739E-1L, +}; +#define NP3r2_4D 9 +static const long double P3r2_4D[NP3r2_4D + 1] = { + 7.032152009675729604487575753279187576521E-7L, + 1.015090352324577615777511269928856742848E-4L, + 5.394262184808448484302067955186308730620E-3L, + 1.375291438480256110455809354836988584325E-1L, + 1.836247144461106304788160919310404376670E0L, + 1.314378564254376655001094503090935880349E1L, + 4.957184590465712006934452500894672343488E1L, + 9.287394244300647738855415178790263465398E1L, + 7.652563275535900609085229286020552768399E1L, + 2.147042473003074533150718117770093209096E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + Peak relative error 1.0e-35 + 0.3125 <= 1/x <= 0.375 */ +#define NP2r7_3r2N 9 +static const long double P2r7_3r2N[NP2r7_3r2N + 1] = { + 4.599033469240421554219816935160627085991E-7L, + 4.665724440345003914596647144630893997284E-5L, + 1.684348845667764271596142716944374892756E-3L, + 2.802446446884455707845985913454440176223E-2L, + 2.321937586453963310008279956042545173930E-1L, + 9.640277413988055668692438709376437553804E-1L, + 1.911021064710270904508663334033003246028E0L, + 1.600811610164341450262992138893970224971E0L, + 4.266299218652587901171386591543457861138E-1L, + 1.316470424456061252962568223251247207325E-2L, +}; +#define NP2r7_3r2D 8 +static const long double P2r7_3r2D[NP2r7_3r2D + 1] = { + 3.924508608545520758883457108453520099610E-6L, + 4.029707889408829273226495756222078039823E-4L, + 1.484629715787703260797886463307469600219E-2L, + 2.553136379967180865331706538897231588685E-1L, + 2.229457223891676394409880026887106228740E0L, + 1.005708903856384091956550845198392117318E1L, + 2.277082659664386953166629360352385889558E1L, + 2.384726835193630788249826630376533988245E1L, + 9.700989749041320895890113781610939632410E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + Peak relative error 1.7e-36 + 0.3125 <= 1/x <= 0.4375 */ +#define NP2r3_2r7N 9 +static const long double P2r3_2r7N[NP2r3_2r7N + 1] = { + 3.916766777108274628543759603786857387402E-6L, + 3.212176636756546217390661984304645137013E-4L, + 9.255768488524816445220126081207248947118E-3L, + 1.214853146369078277453080641911700735354E-1L, + 7.855163309847214136198449861311404633665E-1L, + 2.520058073282978403655488662066019816540E0L, + 3.825136484837545257209234285382183711466E0L, + 2.432569427554248006229715163865569506873E0L, + 4.877934835018231178495030117729800489743E-1L, + 1.109902737860249670981355149101343427885E-2L, +}; +#define NP2r3_2r7D 8 +static const long double P2r3_2r7D[NP2r3_2r7D + 1] = { + 3.342307880794065640312646341190547184461E-5L, + 2.782182891138893201544978009012096558265E-3L, + 8.221304931614200702142049236141249929207E-2L, + 1.123728246291165812392918571987858010949E0L, + 7.740482453652715577233858317133423434590E0L, + 2.737624677567945952953322566311201919139E1L, + 4.837181477096062403118304137851260715475E1L, + 3.941098643468580791437772701093795299274E1L, + 1.245821247166544627558323920382547533630E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* J1(x)cosX + Y1(x)sinX = sqrt( 2/(pi x)) P1(x), P1(x) = 1 + 1/x^2 R(1/x^2), + Peak relative error 1.7e-35 + 0.4375 <= 1/x <= 0.5 */ +#define NP2_2r3N 8 +static const long double P2_2r3N[NP2_2r3N + 1] = { + 3.397930802851248553545191160608731940751E-4L, + 2.104020902735482418784312825637833698217E-2L, + 4.442291771608095963935342749477836181939E-1L, + 4.131797328716583282869183304291833754967E0L, + 1.819920169779026500146134832455189917589E1L, + 3.781779616522937565300309684282401791291E1L, + 3.459605449728864218972931220783543410347E1L, + 1.173594248397603882049066603238568316561E1L, + 9.455702270242780642835086549285560316461E-1L, +}; +#define NP2_2r3D 8 +static const long double P2_2r3D[NP2_2r3D + 1] = { + 2.899568897241432883079888249845707400614E-3L, + 1.831107138190848460767699919531132426356E-1L, + 3.999350044057883839080258832758908825165E0L, + 3.929041535867957938340569419874195303712E1L, + 1.884245613422523323068802689915538908291E2L, + 4.461469948819229734353852978424629815929E2L, + 5.004998753999796821224085972610636347903E2L, + 2.386342520092608513170837883757163414100E2L, + 3.791322528149347975999851588922424189957E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 8.0e-36 + 0 <= 1/x <= .0625 */ +#define NQ16_IN 10 +static const long double Q16_IN[NQ16_IN + 1] = { + -3.917420835712508001321875734030357393421E-18L, + -4.440311387483014485304387406538069930457E-15L, + -1.951635424076926487780929645954007139616E-12L, + -4.318256438421012555040546775651612810513E-10L, + -5.231244131926180765270446557146989238020E-8L, + -3.540072702902043752460711989234732357653E-6L, + -1.311017536555269966928228052917534882984E-4L, + -2.495184669674631806622008769674827575088E-3L, + -2.141868222987209028118086708697998506716E-2L, + -6.184031415202148901863605871197272650090E-2L, + -1.922298704033332356899546792898156493887E-2L, +}; +#define NQ16_ID 9 +static const long double Q16_ID[NQ16_ID + 1] = { + 3.820418034066293517479619763498400162314E-17L, + 4.340702810799239909648911373329149354911E-14L, + 1.914985356383416140706179933075303538524E-11L, + 4.262333682610888819476498617261895474330E-9L, + 5.213481314722233980346462747902942182792E-7L, + 3.585741697694069399299005316809954590558E-5L, + 1.366513429642842006385029778105539457546E-3L, + 2.745282599850704662726337474371355160594E-2L, + 2.637644521611867647651200098449903330074E-1L, + 1.006953426110765984590782655598680488746E0L, + /* 1.000000000000000000000000000000000000000E0 */ + }; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 1.9e-36 + 0.0625 <= 1/x <= 0.125 */ +#define NQ8_16N 11 +static const long double Q8_16N[NQ8_16N + 1] = { + -2.028630366670228670781362543615221542291E-17L, + -1.519634620380959966438130374006858864624E-14L, + -4.540596528116104986388796594639405114524E-12L, + -7.085151756671466559280490913558388648274E-10L, + -6.351062671323970823761883833531546885452E-8L, + -3.390817171111032905297982523519503522491E-6L, + -1.082340897018886970282138836861233213972E-4L, + -2.020120801187226444822977006648252379508E-3L, + -2.093169910981725694937457070649605557555E-2L, + -1.092176538874275712359269481414448063393E-1L, + -2.374790947854765809203590474789108718733E-1L, + -1.365364204556573800719985118029601401323E-1L, +}; +#define NQ8_16D 11 +static const long double Q8_16D[NQ8_16D + 1] = { + 1.978397614733632533581207058069628242280E-16L, + 1.487361156806202736877009608336766720560E-13L, + 4.468041406888412086042576067133365913456E-11L, + 7.027822074821007443672290507210594648877E-9L, + 6.375740580686101224127290062867976007374E-7L, + 3.466887658320002225888644977076410421940E-5L, + 1.138625640905289601186353909213719596986E-3L, + 2.224470799470414663443449818235008486439E-2L, + 2.487052928527244907490589787691478482358E-1L, + 1.483927406564349124649083853892380899217E0L, + 4.182773513276056975777258788903489507705E0L, + 4.419665392573449746043880892524360870944E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 1.5e-35 + 0.125 <= 1/x <= 0.1875 */ +#define NQ5_8N 10 +static const long double Q5_8N[NQ5_8N + 1] = { + -3.656082407740970534915918390488336879763E-13L, + -1.344660308497244804752334556734121771023E-10L, + -1.909765035234071738548629788698150760791E-8L, + -1.366668038160120210269389551283666716453E-6L, + -5.392327355984269366895210704976314135683E-5L, + -1.206268245713024564674432357634540343884E-3L, + -1.515456784370354374066417703736088291287E-2L, + -1.022454301137286306933217746545237098518E-1L, + -3.373438906472495080504907858424251082240E-1L, + -4.510782522110845697262323973549178453405E-1L, + -1.549000892545288676809660828213589804884E-1L, +}; +#define NQ5_8D 10 +static const long double Q5_8D[NQ5_8D + 1] = { + 3.565550843359501079050699598913828460036E-12L, + 1.321016015556560621591847454285330528045E-9L, + 1.897542728662346479999969679234270605975E-7L, + 1.381720283068706710298734234287456219474E-5L, + 5.599248147286524662305325795203422873725E-4L, + 1.305442352653121436697064782499122164843E-2L, + 1.750234079626943298160445750078631894985E-1L, + 1.311420542073436520965439883806946678491E0L, + 5.162757689856842406744504211089724926650E0L, + 9.527760296384704425618556332087850581308E0L, + 6.604648207463236667912921642545100248584E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 1.3e-35 + 0.1875 <= 1/x <= 0.25 */ +#define NQ4_5N 10 +static const long double Q4_5N[NQ4_5N + 1] = { + -4.079513568708891749424783046520200903755E-11L, + -9.326548104106791766891812583019664893311E-9L, + -8.016795121318423066292906123815687003356E-7L, + -3.372350544043594415609295225664186750995E-5L, + -7.566238665947967882207277686375417983917E-4L, + -9.248861580055565402130441618521591282617E-3L, + -6.033106131055851432267702948850231270338E-2L, + -1.966908754799996793730369265431584303447E-1L, + -2.791062741179964150755788226623462207560E-1L, + -1.255478605849190549914610121863534191666E-1L, + -4.320429862021265463213168186061696944062E-3L, +}; +#define NQ4_5D 9 +static const long double Q4_5D[NQ4_5D + 1] = { + 3.978497042580921479003851216297330701056E-10L, + 9.203304163828145809278568906420772246666E-8L, + 8.059685467088175644915010485174545743798E-6L, + 3.490187375993956409171098277561669167446E-4L, + 8.189109654456872150100501732073810028829E-3L, + 1.072572867311023640958725265762483033769E-1L, + 7.790606862409960053675717185714576937994E-1L, + 3.016049768232011196434185423512777656328E0L, + 5.722963851442769787733717162314477949360E0L, + 4.510527838428473279647251350931380867663E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 2.1e-35 + 0.25 <= 1/x <= 0.3125 */ +#define NQ3r2_4N 9 +static const long double Q3r2_4N[NQ3r2_4N + 1] = { + -1.087480809271383885936921889040388133627E-8L, + -1.690067828697463740906962973479310170932E-6L, + -9.608064416995105532790745641974762550982E-5L, + -2.594198839156517191858208513873961837410E-3L, + -3.610954144421543968160459863048062977822E-2L, + -2.629866798251843212210482269563961685666E-1L, + -9.709186825881775885917984975685752956660E-1L, + -1.667521829918185121727268867619982417317E0L, + -1.109255082925540057138766105229900943501E0L, + -1.812932453006641348145049323713469043328E-1L, +}; +#define NQ3r2_4D 9 +static const long double Q3r2_4D[NQ3r2_4D + 1] = { + 1.060552717496912381388763753841473407026E-7L, + 1.676928002024920520786883649102388708024E-5L, + 9.803481712245420839301400601140812255737E-4L, + 2.765559874262309494758505158089249012930E-2L, + 4.117921827792571791298862613287549140706E-1L, + 3.323769515244751267093378361930279161413E0L, + 1.436602494405814164724810151689705353670E1L, + 3.163087869617098638064881410646782408297E1L, + 3.198181264977021649489103980298349589419E1L, + 1.203649258862068431199471076202897823272E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 1.6e-36 + 0.3125 <= 1/x <= 0.375 */ +#define NQ2r7_3r2N 9 +static const long double Q2r7_3r2N[NQ2r7_3r2N + 1] = { + -1.723405393982209853244278760171643219530E-7L, + -2.090508758514655456365709712333460087442E-5L, + -9.140104013370974823232873472192719263019E-4L, + -1.871349499990714843332742160292474780128E-2L, + -1.948930738119938669637865956162512983416E-1L, + -1.048764684978978127908439526343174139788E0L, + -2.827714929925679500237476105843643064698E0L, + -3.508761569156476114276988181329773987314E0L, + -1.669332202790211090973255098624488308989E0L, + -1.930796319299022954013840684651016077770E-1L, +}; +#define NQ2r7_3r2D 9 +static const long double Q2r7_3r2D[NQ2r7_3r2D + 1] = { + 1.680730662300831976234547482334347983474E-6L, + 2.084241442440551016475972218719621841120E-4L, + 9.445316642108367479043541702688736295579E-3L, + 2.044637889456631896650179477133252184672E-1L, + 2.316091982244297350829522534435350078205E0L, + 1.412031891783015085196708811890448488865E1L, + 4.583830154673223384837091077279595496149E1L, + 7.549520609270909439885998474045974122261E1L, + 5.697605832808113367197494052388203310638E1L, + 1.601496240876192444526383314589371686234E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 9.5e-36 + 0.375 <= 1/x <= 0.4375 */ +#define NQ2r3_2r7N 9 +static const long double Q2r3_2r7N[NQ2r3_2r7N + 1] = { + -8.603042076329122085722385914954878953775E-7L, + -7.701746260451647874214968882605186675720E-5L, + -2.407932004380727587382493696877569654271E-3L, + -3.403434217607634279028110636919987224188E-2L, + -2.348707332185238159192422084985713102877E-1L, + -7.957498841538254916147095255700637463207E-1L, + -1.258469078442635106431098063707934348577E0L, + -8.162415474676345812459353639449971369890E-1L, + -1.581783890269379690141513949609572806898E-1L, + -1.890595651683552228232308756569450822905E-3L, +}; +#define NQ2r3_2r7D 8 +static const long double Q2r3_2r7D[NQ2r3_2r7D + 1] = { + 8.390017524798316921170710533381568175665E-6L, + 7.738148683730826286477254659973968763659E-4L, + 2.541480810958665794368759558791634341779E-2L, + 3.878879789711276799058486068562386244873E-1L, + 3.003783779325811292142957336802456109333E0L, + 1.206480374773322029883039064575464497400E1L, + 2.458414064785315978408974662900438351782E1L, + 2.367237826273668567199042088835448715228E1L, + 9.231451197519171090875569102116321676763E0L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + +/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x), + Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)), + Peak relative error 1.4e-36 + 0.4375 <= 1/x <= 0.5 */ +#define NQ2_2r3N 9 +static const long double Q2_2r3N[NQ2_2r3N + 1] = { + -5.552507516089087822166822364590806076174E-6L, + -4.135067659799500521040944087433752970297E-4L, + -1.059928728869218962607068840646564457980E-2L, + -1.212070036005832342565792241385459023801E-1L, + -6.688350110633603958684302153362735625156E-1L, + -1.793587878197360221340277951304429821582E0L, + -2.225407682237197485644647380483725045326E0L, + -1.123402135458940189438898496348239744403E0L, + -1.679187241566347077204805190763597299805E-1L, + -1.458550613639093752909985189067233504148E-3L, +}; +#define NQ2_2r3D 8 +static const long double Q2_2r3D[NQ2_2r3D + 1] = { + 5.415024336507980465169023996403597916115E-5L, + 4.179246497380453022046357404266022870788E-3L, + 1.136306384261959483095442402929502368598E-1L, + 1.422640343719842213484515445393284072830E0L, + 8.968786703393158374728850922289204805764E0L, + 2.914542473339246127533384118781216495934E1L, + 4.781605421020380669870197378210457054685E1L, + 3.693865837171883152382820584714795072937E1L, + 1.153220502744204904763115556224395893076E1L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + + +/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +neval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +deval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = x + *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +/* Bessel function of the first kind, order one. */ + +long double +__ieee754_j1l (long double x) +{ + long double xx, xinv, z, p, q, c, s, cc, ss; + + if (! finitel (x)) + { + if (x != x) + return x; + else + return 0.0L; + } + if (x == 0.0L) + return x; + xx = fabsl (x); + if (xx <= 2.0L) + { + /* 0 <= x <= 2 */ + z = xx * xx; + p = xx * z * neval (z, J0_2N, NJ0_2N) / deval (z, J0_2D, NJ0_2D); + p += 0.5L * xx; + if (x < 0) + p = -p; + return p; + } + + xinv = 1.0L / xx; + z = xinv * xinv; + if (xinv <= 0.25) + { + if (xinv <= 0.125) + { + if (xinv <= 0.0625) + { + p = neval (z, P16_IN, NP16_IN) / deval (z, P16_ID, NP16_ID); + q = neval (z, Q16_IN, NQ16_IN) / deval (z, Q16_ID, NQ16_ID); + } + else + { + p = neval (z, P8_16N, NP8_16N) / deval (z, P8_16D, NP8_16D); + q = neval (z, Q8_16N, NQ8_16N) / deval (z, Q8_16D, NQ8_16D); + } + } + else if (xinv <= 0.1875) + { + p = neval (z, P5_8N, NP5_8N) / deval (z, P5_8D, NP5_8D); + q = neval (z, Q5_8N, NQ5_8N) / deval (z, Q5_8D, NQ5_8D); + } + else + { + p = neval (z, P4_5N, NP4_5N) / deval (z, P4_5D, NP4_5D); + q = neval (z, Q4_5N, NQ4_5N) / deval (z, Q4_5D, NQ4_5D); + } + } /* .25 */ + else /* if (xinv <= 0.5) */ + { + if (xinv <= 0.375) + { + if (xinv <= 0.3125) + { + p = neval (z, P3r2_4N, NP3r2_4N) / deval (z, P3r2_4D, NP3r2_4D); + q = neval (z, Q3r2_4N, NQ3r2_4N) / deval (z, Q3r2_4D, NQ3r2_4D); + } + else + { + p = neval (z, P2r7_3r2N, NP2r7_3r2N) + / deval (z, P2r7_3r2D, NP2r7_3r2D); + q = neval (z, Q2r7_3r2N, NQ2r7_3r2N) + / deval (z, Q2r7_3r2D, NQ2r7_3r2D); + } + } + else if (xinv <= 0.4375) + { + p = neval (z, P2r3_2r7N, NP2r3_2r7N) + / deval (z, P2r3_2r7D, NP2r3_2r7D); + q = neval (z, Q2r3_2r7N, NQ2r3_2r7N) + / deval (z, Q2r3_2r7D, NQ2r3_2r7D); + } + else + { + p = neval (z, P2_2r3N, NP2_2r3N) / deval (z, P2_2r3D, NP2_2r3D); + q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D); + } + } + p = 1.0L + z * p; + q = z * q; + q = q * xinv + 0.375L * xinv; + /* X = x - 3 pi/4 + cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4) + = 1/sqrt(2) * (-cos(x) + sin(x)) + sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) + = -1/sqrt(2) * (sin(x) + cos(x)) + cf. Fdlibm. */ + c = cosl (xx); + s = sinl (xx); + ss = -s - c; + cc = s - c; + z = cosl (xx + xx); + if ((s * c) > 0) + cc = z / ss; + else + ss = z / cc; + z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx); + if (x < 0) + z = -z; + return z; +} + + +/* Y1(x) = 2/pi * (log(x) * J1(x) - 1/x) + x R(x^2) + Peak relative error 6.2e-38 + 0 <= x <= 2 */ +#define NY0_2N 7 +static long double Y0_2N[NY0_2N + 1] = { + -6.804415404830253804408698161694720833249E19L, + 1.805450517967019908027153056150465849237E19L, + -8.065747497063694098810419456383006737312E17L, + 1.401336667383028259295830955439028236299E16L, + -1.171654432898137585000399489686629680230E14L, + 5.061267920943853732895341125243428129150E11L, + -1.096677850566094204586208610960870217970E9L, + 9.541172044989995856117187515882879304461E5L, +}; +#define NY0_2D 7 +static long double Y0_2D[NY0_2D + 1] = { + 3.470629591820267059538637461549677594549E20L, + 4.120796439009916326855848107545425217219E18L, + 2.477653371652018249749350657387030814542E16L, + 9.954678543353888958177169349272167762797E13L, + 2.957927997613630118216218290262851197754E11L, + 6.748421382188864486018861197614025972118E8L, + 1.173453425218010888004562071020305709319E6L, + 1.450335662961034949894009554536003377187E3L, + /* 1.000000000000000000000000000000000000000E0 */ +}; + + +/* Bessel function of the second kind, order one. */ + +long double +__ieee754_y1l (long double x) +{ + long double xx, xinv, z, p, q, c, s, cc, ss; + + if (! finitel (x)) + { + if (x != x) + return x; + else + return 0.0L; + } + if (x <= 0.0L) + { + if (x < 0.0L) + return (zero / zero); + return -1.0L / zero; + } + xx = fabsl (x); + if (xx <= 2.0L) + { + /* 0 <= x <= 2 */ + z = xx * xx; + p = xx * neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D); + p = -TWOOPI / xx + p; + p = TWOOPI * logl(x) * __ieee754_j1l (x) + p; + return p; + } + + xinv = 1.0L / xx; + z = xinv * xinv; + if (xinv <= 0.25) + { + if (xinv <= 0.125) + { + if (xinv <= 0.0625) + { + p = neval (z, P16_IN, NP16_IN) / deval (z, P16_ID, NP16_ID); + q = neval (z, Q16_IN, NQ16_IN) / deval (z, Q16_ID, NQ16_ID); + } + else + { + p = neval (z, P8_16N, NP8_16N) / deval (z, P8_16D, NP8_16D); + q = neval (z, Q8_16N, NQ8_16N) / deval (z, Q8_16D, NQ8_16D); + } + } + else if (xinv <= 0.1875) + { + p = neval (z, P5_8N, NP5_8N) / deval (z, P5_8D, NP5_8D); + q = neval (z, Q5_8N, NQ5_8N) / deval (z, Q5_8D, NQ5_8D); + } + else + { + p = neval (z, P4_5N, NP4_5N) / deval (z, P4_5D, NP4_5D); + q = neval (z, Q4_5N, NQ4_5N) / deval (z, Q4_5D, NQ4_5D); + } + } /* .25 */ + else /* if (xinv <= 0.5) */ + { + if (xinv <= 0.375) + { + if (xinv <= 0.3125) + { + p = neval (z, P3r2_4N, NP3r2_4N) / deval (z, P3r2_4D, NP3r2_4D); + q = neval (z, Q3r2_4N, NQ3r2_4N) / deval (z, Q3r2_4D, NQ3r2_4D); + } + else + { + p = neval (z, P2r7_3r2N, NP2r7_3r2N) + / deval (z, P2r7_3r2D, NP2r7_3r2D); + q = neval (z, Q2r7_3r2N, NQ2r7_3r2N) + / deval (z, Q2r7_3r2D, NQ2r7_3r2D); + } + } + else if (xinv <= 0.4375) + { + p = neval (z, P2r3_2r7N, NP2r3_2r7N) + / deval (z, P2r3_2r7D, NP2r3_2r7D); + q = neval (z, Q2r3_2r7N, NQ2r3_2r7N) + / deval (z, Q2r3_2r7D, NQ2r3_2r7D); + } + else + { + p = neval (z, P2_2r3N, NP2_2r3N) / deval (z, P2_2r3D, NP2_2r3D); + q = neval (z, Q2_2r3N, NQ2_2r3N) / deval (z, Q2_2r3D, NQ2_2r3D); + } + } + p = 1.0L + z * p; + q = z * q; + q = q * xinv + 0.375L * xinv; + /* X = x - 3 pi/4 + cos(X) = cos(x) cos(3 pi/4) + sin(x) sin(3 pi/4) + = 1/sqrt(2) * (-cos(x) + sin(x)) + sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4) + = -1/sqrt(2) * (sin(x) + cos(x)) + cf. Fdlibm. */ + c = cosl (xx); + s = sinl (xx); + ss = -s - c; + cc = s - c; + z = cosl (xx + xx); + if ((s * c) > 0) + cc = z / ss; + else + ss = z / cc; + z = ONEOSQPI * (p * ss + q * cc) / sqrtl (xx); + return z; +} diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_jnl.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_jnl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_jnl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_jnl.c Thu Aug 30 04:16:00 2001 @@ -0,0 +1,382 @@ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* Modifications for 128-bit long double contributed by + Stephen L. Moshier */ + +/* + * __ieee754_jn(n, x), __ieee754_yn(n, x) + * floating point Bessel's function of the 1st and 2nd kind + * of order n + * + * Special cases: + * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal; + * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal. + * Note 2. About jn(n,x), yn(n,x) + * For n=0, j0(x) is called, + * for n=1, j1(x) is called, + * for nx, a continued fraction approximation to + * j(n,x)/j(n-1,x) is evaluated and then backward + * recursion is used starting from a supposed value + * for j(n,x). The resulting value of j(0,x) is + * compared with the actual value to correct the + * supposed value of j(n,x). + * + * yn(n,x) is similar in all respects, except + * that forward recursion is used for all + * values of n>1. + * + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ +static const long double +#else +static long double +#endif + invsqrtpi = 5.6418958354775628694807945156077258584405E-1L, + two = 2.0e0L, + one = 1.0e0L, + zero = 0.0L; + + +#ifdef __STDC__ +long double +__ieee754_jnl (int n, long double x) +#else +long double +__ieee754_jnl (n, x) + int n; + long double x; +#endif +{ + u_int32_t se; + int32_t i, ix, sgn; + long double a, b, temp, di; + long double z, w; + ieee854_long_double_shape_type u; + + + /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x) + * Thus, J(-n,x) = J(n,-x) + */ + + u.value = x; + se = u.parts32.w0; + ix = se & 0x7fffffff; + + /* if J(n,NaN) is NaN */ + if (ix >= 0x7fff0000) + { + if ((u.parts32.w0 & 0xffff) | u.parts32.w1 | u.parts32.w2 | u.parts32.w3) + return x + x; + } + + if (n < 0) + { + n = -n; + x = -x; + se ^= 0x80000000; + } + if (n == 0) + return (__ieee754_j0l (x)); + if (n == 1) + return (__ieee754_j1l (x)); + sgn = (n & 1) & (se >> 31); /* even n -- 0, odd n -- sign(x) */ + x = fabsl (x); + + if (x == 0.0L || ix >= 0x7fff0000) /* if x is 0 or inf */ + b = zero; + else if ((long double) n <= x) + { + /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */ + if (ix >= 0x412D0000) + { /* x > 2**302 */ + + /* ??? Could use an expansion for large x here. */ + + /* (x >> n**2) + * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi) + * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi) + * Let s=sin(x), c=cos(x), + * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then + * + * n sin(xn)*sqt2 cos(xn)*sqt2 + * ---------------------------------- + * 0 s-c c+s + * 1 -s-c -c+s + * 2 -s+c -c-s + * 3 s+c c-s + */ + long double s; + long double c; + __sincosl (x, &s, &c); + switch (n & 3) + { + case 0: + temp = c + s; + break; + case 1: + temp = -c + s; + break; + case 2: + temp = -c - s; + break; + case 3: + temp = c - s; + break; + } + b = invsqrtpi * temp / __ieee754_sqrtl (x); + } + else + { + a = __ieee754_j0l (x); + b = __ieee754_j1l (x); + for (i = 1; i < n; i++) + { + temp = b; + b = b * ((long double) (i + i) / x) - a; /* avoid underflow */ + a = temp; + } + } + } + else + { + if (ix < 0x3fc60000) + { /* x < 2**-57 */ + /* x is tiny, return the first Taylor expansion of J(n,x) + * J(n,x) = 1/n!*(x/2)^n - ... + */ + if (n >= 400) /* underflow, result < 10^-4952 */ + b = zero; + else + { + temp = x * 0.5; + b = temp; + for (a = one, i = 2; i <= n; i++) + { + a *= (long double) i; /* a = n! */ + b *= temp; /* b = (x/2)^n */ + } + b = b / a; + } + } + else + { + /* use backward recurrence */ + /* x x^2 x^2 + * J(n,x)/J(n-1,x) = ---- ------ ------ ..... + * 2n - 2(n+1) - 2(n+2) + * + * 1 1 1 + * (for large x) = ---- ------ ------ ..... + * 2n 2(n+1) 2(n+2) + * -- - ------ - ------ - + * x x x + * + * Let w = 2n/x and h=2/x, then the above quotient + * is equal to the continued fraction: + * 1 + * = ----------------------- + * 1 + * w - ----------------- + * 1 + * w+h - --------- + * w+2h - ... + * + * To determine how many terms needed, let + * Q(0) = w, Q(1) = w(w+h) - 1, + * Q(k) = (w+k*h)*Q(k-1) - Q(k-2), + * When Q(k) > 1e4 good for single + * When Q(k) > 1e9 good for double + * When Q(k) > 1e17 good for quadruple + */ + /* determine k */ + long double t, v; + long double q0, q1, h, tmp; + int32_t k, m; + w = (n + n) / (long double) x; + h = 2.0L / (long double) x; + q0 = w; + z = w + h; + q1 = w * z - 1.0L; + k = 1; + while (q1 < 1.0e17L) + { + k += 1; + z += h; + tmp = z * q1 - q0; + q0 = q1; + q1 = tmp; + } + m = n + n; + for (t = zero, i = 2 * (n + k); i >= m; i -= 2) + t = one / (i / x - t); + a = t; + b = one; + /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n) + * Hence, if n*(log(2n/x)) > ... + * single 8.8722839355e+01 + * double 7.09782712893383973096e+02 + * long double 1.1356523406294143949491931077970765006170e+04 + * then recurrent value may overflow and the result is + * likely underflow to zero + */ + tmp = n; + v = two / x; + tmp = tmp * __ieee754_logl (fabsl (v * tmp)); + + if (tmp < 1.1356523406294143949491931077970765006170e+04L) + { + for (i = n - 1, di = (long double) (i + i); i > 0; i--) + { + temp = b; + b *= di; + b = b / x - a; + a = temp; + di -= two; + } + } + else + { + for (i = n - 1, di = (long double) (i + i); i > 0; i--) + { + temp = b; + b *= di; + b = b / x - a; + a = temp; + di -= two; + /* scale b to avoid spurious overflow */ + if (b > 1e100L) + { + a /= b; + t /= b; + b = one; + } + } + } + b = (t * __ieee754_j0l (x) / b); + } + } + if (sgn == 1) + return -b; + else + return b; +} + +#ifdef __STDC__ +long double +__ieee754_ynl (int n, long double x) +#else +long double +__ieee754_ynl (n, x) + int n; + long double x; +#endif +{ + u_int32_t se; + int32_t i, ix; + int32_t sign; + long double a, b, temp; + ieee854_long_double_shape_type u; + + u.value = x; + se = u.parts32.w0; + ix = se & 0x7fffffff; + + /* if Y(n,NaN) is NaN */ + if (ix >= 0x7fff0000) + { + if ((u.parts32.w0 & 0xffff) | u.parts32.w1 | u.parts32.w2 | u.parts32.w3) + return x + x; + } + if (x <= 0.0L) + { + if (x == 0.0L) + return -one / zero; + if (se & 0x80000000) + return zero / zero; + } + sign = 1; + if (n < 0) + { + n = -n; + sign = 1 - ((n & 1) << 1); + } + if (n == 0) + return (__ieee754_y0l (x)); + if (n == 1) + return (sign * __ieee754_y1l (x)); + if (ix >= 0x7fff0000) + return zero; + if (ix >= 0x412D0000) + { /* x > 2**302 */ + + /* ??? See comment above on the possible futility of this. */ + + /* (x >> n**2) + * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi) + * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi) + * Let s=sin(x), c=cos(x), + * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then + * + * n sin(xn)*sqt2 cos(xn)*sqt2 + * ---------------------------------- + * 0 s-c c+s + * 1 -s-c -c+s + * 2 -s+c -c-s + * 3 s+c c-s + */ + long double s; + long double c; + __sincosl (x, &s, &c); + switch (n & 3) + { + case 0: + temp = s - c; + break; + case 1: + temp = -s - c; + break; + case 2: + temp = -s + c; + break; + case 3: + temp = s + c; + break; + } + b = invsqrtpi * temp / __ieee754_sqrtl (x); + } + else + { + a = __ieee754_y0l (x); + b = __ieee754_y1l (x); + /* quit if b is -inf */ + u.value = b; + se = u.parts32.w0 & 0xffff0000; + for (i = 1; i < n && se != 0xffff0000; i++) + { + temp = b; + b = ((long double) (i + i) / x) * b - a; + u.value = b; + se = u.parts32.w0 & 0xffff0000; + a = temp; + } + } + if (sign > 0) + return b; + else + return -b; +} diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_lgammal_r.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_lgammal_r.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_lgammal_r.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_lgammal_r.c Mon Nov 26 04:44:35 2001 @@ -0,0 +1,1018 @@ +/* lgammal + * + * Natural logarithm of gamma function + * + * + * + * SYNOPSIS: + * + * long double x, y, lgammal(); + * extern int sgngam; + * + * y = lgammal(x); + * + * + * + * DESCRIPTION: + * + * Returns the base e (2.718...) logarithm of the absolute + * value of the gamma function of the argument. + * The sign (+1 or -1) of the gamma function is returned in a + * global (extern) variable named sgngam. + * + * The positive domain is partitioned into numerous segments for approximation. + * For x > 10, + * log gamma(x) = (x - 0.5) log(x) - x + log sqrt(2 pi) + 1/x R(1/x^2) + * Near the minimum at x = x0 = 1.46... the approximation is + * log gamma(x0 + z) = log gamma(x0) + z^2 P(z)/Q(z) + * for small z. + * Elsewhere between 0 and 10, + * log gamma(n + z) = log gamma(n) + z P(z)/Q(z) + * for various selected n and small z. + * + * The cosecant reflection formula is employed for negative arguments. + * + * + * + * ACCURACY: + * + * + * arithmetic domain # trials peak rms + * Relative error: + * IEEE 10, 30 100000 3.9e-34 9.8e-35 + * IEEE 0, 10 100000 3.8e-34 5.3e-35 + * Absolute error: + * IEEE -10, 0 100000 8.0e-34 8.0e-35 + * IEEE -30, -10 100000 4.4e-34 1.0e-34 + * IEEE -100, 100 100000 1.0e-34 + * + * The absolute error criterion is the same as relative error + * when the function magnitude is greater than one but it is absolute + * when the magnitude is less than one. + * + */ + +/* Copyright 2001 by Stephen L. Moshier */ + +#include "math.h" +#include "math_private.h" + +static const long double PIL = 3.1415926535897932384626433832795028841972E0L; +static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L; +static const long double one = 1.0L; +static const long double zero = 0.0L; +static const long double huge = 1.0e4000L; + +/* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2) + 1/x <= 0.0741 (x >= 13.495...) + Peak relative error 1.5e-36 */ +static const long double ls2pi = 9.1893853320467274178032973640561763986140E-1L; +#define NRASY 12 +static const long double RASY[NRASY + 1] = +{ + 8.333333333333333333333333333310437112111E-2L, + -2.777777777777777777777774789556228296902E-3L, + 7.936507936507936507795933938448586499183E-4L, + -5.952380952380952041799269756378148574045E-4L, + 8.417508417507928904209891117498524452523E-4L, + -1.917526917481263997778542329739806086290E-3L, + 6.410256381217852504446848671499409919280E-3L, + -2.955064066900961649768101034477363301626E-2L, + 1.796402955865634243663453415388336954675E-1L, + -1.391522089007758553455753477688592767741E0L, + 1.326130089598399157988112385013829305510E1L, + -1.420412699593782497803472576479997819149E2L, + 1.218058922427762808938869872528846787020E3L +}; + + +/* log gamma(x+13) = log gamma(13) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 12.5 <= x+13 <= 13.5 + Peak relative error 1.1e-36 */ +static const long double lgam13a = 1.9987213134765625E1L; +static const long double lgam13b = 1.3608962611495173623870550785125024484248E-6L; +#define NRN13 7 +static const long double RN13[NRN13 + 1] = +{ + 8.591478354823578150238226576156275285700E11L, + 2.347931159756482741018258864137297157668E11L, + 2.555408396679352028680662433943000804616E10L, + 1.408581709264464345480765758902967123937E9L, + 4.126759849752613822953004114044451046321E7L, + 6.133298899622688505854211579222889943778E5L, + 3.929248056293651597987893340755876578072E3L, + 6.850783280018706668924952057996075215223E0L +}; +#define NRD13 6 +static const long double RD13[NRD13 + 1] = +{ + 3.401225382297342302296607039352935541669E11L, + 8.756765276918037910363513243563234551784E10L, + 8.873913342866613213078554180987647243903E9L, + 4.483797255342763263361893016049310017973E8L, + 1.178186288833066430952276702931512870676E7L, + 1.519928623743264797939103740132278337476E5L, + 7.989298844938119228411117593338850892311E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+12) = log gamma(12) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 11.5 <= x+12 <= 12.5 + Peak relative error 4.1e-36 */ +static const long double lgam12a = 1.75023040771484375E1L; +static const long double lgam12b = 3.7687254483392876529072161996717039575982E-6L; +#define NRN12 7 +static const long double RN12[NRN12 + 1] = +{ + 4.709859662695606986110997348630997559137E11L, + 1.398713878079497115037857470168777995230E11L, + 1.654654931821564315970930093932954900867E10L, + 9.916279414876676861193649489207282144036E8L, + 3.159604070526036074112008954113411389879E7L, + 5.109099197547205212294747623977502492861E5L, + 3.563054878276102790183396740969279826988E3L, + 6.769610657004672719224614163196946862747E0L +}; +#define NRD12 6 +static const long double RD12[NRD12 + 1] = +{ + 1.928167007860968063912467318985802726613E11L, + 5.383198282277806237247492369072266389233E10L, + 5.915693215338294477444809323037871058363E9L, + 3.241438287570196713148310560147925781342E8L, + 9.236680081763754597872713592701048455890E6L, + 1.292246897881650919242713651166596478850E5L, + 7.366532445427159272584194816076600211171E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+11) = log gamma(11) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 10.5 <= x+11 <= 11.5 + Peak relative error 1.8e-35 */ +static const long double lgam11a = 1.5104400634765625E1L; +static const long double lgam11b = 1.1938309890295225709329251070371882250744E-5L; +#define NRN11 7 +static const long double RN11[NRN11 + 1] = +{ + 2.446960438029415837384622675816736622795E11L, + 7.955444974446413315803799763901729640350E10L, + 1.030555327949159293591618473447420338444E10L, + 6.765022131195302709153994345470493334946E8L, + 2.361892792609204855279723576041468347494E7L, + 4.186623629779479136428005806072176490125E5L, + 3.202506022088912768601325534149383594049E3L, + 6.681356101133728289358838690666225691363E0L +}; +#define NRD11 6 +static const long double RD11[NRD11 + 1] = +{ + 1.040483786179428590683912396379079477432E11L, + 3.172251138489229497223696648369823779729E10L, + 3.806961885984850433709295832245848084614E9L, + 2.278070344022934913730015420611609620171E8L, + 7.089478198662651683977290023829391596481E6L, + 1.083246385105903533237139380509590158658E5L, + 6.744420991491385145885727942219463243597E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+10) = log gamma(10) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 9.5 <= x+10 <= 10.5 + Peak relative error 5.4e-37 */ +static const long double lgam10a = 1.280181884765625E1L; +static const long double lgam10b = 8.6324252196112077178745667061642811492557E-6L; +#define NRN10 7 +static const long double RN10[NRN10 + 1] = +{ + -1.239059737177249934158597996648808363783E14L, + -4.725899566371458992365624673357356908719E13L, + -7.283906268647083312042059082837754850808E12L, + -5.802855515464011422171165179767478794637E11L, + -2.532349691157548788382820303182745897298E10L, + -5.884260178023777312587193693477072061820E8L, + -6.437774864512125749845840472131829114906E6L, + -2.350975266781548931856017239843273049384E4L +}; +#define NRD10 7 +static const long double RD10[NRD10 + 1] = +{ + -5.502645997581822567468347817182347679552E13L, + -1.970266640239849804162284805400136473801E13L, + -2.819677689615038489384974042561531409392E12L, + -2.056105863694742752589691183194061265094E11L, + -8.053670086493258693186307810815819662078E9L, + -1.632090155573373286153427982504851867131E8L, + -1.483575879240631280658077826889223634921E6L, + -4.002806669713232271615885826373550502510E3L + /* 1.0E0L */ +}; + + +/* log gamma(x+9) = log gamma(9) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 8.5 <= x+9 <= 9.5 + Peak relative error 3.6e-36 */ +static const long double lgam9a = 1.06045989990234375E1L; +static const long double lgam9b = 3.9037218127284172274007216547549861681400E-6L; +#define NRN9 7 +static const long double RN9[NRN9 + 1] = +{ + -4.936332264202687973364500998984608306189E13L, + -2.101372682623700967335206138517766274855E13L, + -3.615893404644823888655732817505129444195E12L, + -3.217104993800878891194322691860075472926E11L, + -1.568465330337375725685439173603032921399E10L, + -4.073317518162025744377629219101510217761E8L, + -4.983232096406156139324846656819246974500E6L, + -2.036280038903695980912289722995505277253E4L +}; +#define NRD9 7 +static const long double RD9[NRD9 + 1] = +{ + -2.306006080437656357167128541231915480393E13L, + -9.183606842453274924895648863832233799950E12L, + -1.461857965935942962087907301194381010380E12L, + -1.185728254682789754150068652663124298303E11L, + -5.166285094703468567389566085480783070037E9L, + -1.164573656694603024184768200787835094317E8L, + -1.177343939483908678474886454113163527909E6L, + -3.529391059783109732159524500029157638736E3L + /* 1.0E0L */ +}; + + +/* log gamma(x+8) = log gamma(8) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 7.5 <= x+8 <= 8.5 + Peak relative error 2.4e-37 */ +static const long double lgam8a = 8.525146484375E0L; +static const long double lgam8b = 1.4876690414300165531036347125050759667737E-5L; +#define NRN8 8 +static const long double RN8[NRN8 + 1] = +{ + 6.600775438203423546565361176829139703289E11L, + 3.406361267593790705240802723914281025800E11L, + 7.222460928505293914746983300555538432830E10L, + 8.102984106025088123058747466840656458342E9L, + 5.157620015986282905232150979772409345927E8L, + 1.851445288272645829028129389609068641517E7L, + 3.489261702223124354745894067468953756656E5L, + 2.892095396706665774434217489775617756014E3L, + 6.596977510622195827183948478627058738034E0L +}; +#define NRD8 7 +static const long double RD8[NRD8 + 1] = +{ + 3.274776546520735414638114828622673016920E11L, + 1.581811207929065544043963828487733970107E11L, + 3.108725655667825188135393076860104546416E10L, + 3.193055010502912617128480163681842165730E9L, + 1.830871482669835106357529710116211541839E8L, + 5.790862854275238129848491555068073485086E6L, + 9.305213264307921522842678835618803553589E4L, + 6.216974105861848386918949336819572333622E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+7) = log gamma(7) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 6.5 <= x+7 <= 7.5 + Peak relative error 3.2e-36 */ +static const long double lgam7a = 6.5792388916015625E0L; +static const long double lgam7b = 1.2320408538495060178292903945321122583007E-5L; +#define NRN7 8 +static const long double RN7[NRN7 + 1] = +{ + 2.065019306969459407636744543358209942213E11L, + 1.226919919023736909889724951708796532847E11L, + 2.996157990374348596472241776917953749106E10L, + 3.873001919306801037344727168434909521030E9L, + 2.841575255593761593270885753992732145094E8L, + 1.176342515359431913664715324652399565551E7L, + 2.558097039684188723597519300356028511547E5L, + 2.448525238332609439023786244782810774702E3L, + 6.460280377802030953041566617300902020435E0L +}; +#define NRD7 7 +static const long double RD7[NRD7 + 1] = +{ + 1.102646614598516998880874785339049304483E11L, + 6.099297512712715445879759589407189290040E10L, + 1.372898136289611312713283201112060238351E10L, + 1.615306270420293159907951633566635172343E9L, + 1.061114435798489135996614242842561967459E8L, + 3.845638971184305248268608902030718674691E6L, + 7.081730675423444975703917836972720495507E4L, + 5.423122582741398226693137276201344096370E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+6) = log gamma(6) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 5.5 <= x+6 <= 6.5 + Peak relative error 6.2e-37 */ +static const long double lgam6a = 4.7874908447265625E0L; +static const long double lgam6b = 8.9805548349424770093452324304839959231517E-7L; +#define NRN6 8 +static const long double RN6[NRN6 + 1] = +{ + -3.538412754670746879119162116819571823643E13L, + -2.613432593406849155765698121483394257148E13L, + -8.020670732770461579558867891923784753062E12L, + -1.322227822931250045347591780332435433420E12L, + -1.262809382777272476572558806855377129513E11L, + -7.015006277027660872284922325741197022467E9L, + -2.149320689089020841076532186783055727299E8L, + -3.167210585700002703820077565539658995316E6L, + -1.576834867378554185210279285358586385266E4L +}; +#define NRD6 8 +static const long double RD6[NRD6 + 1] = +{ + -2.073955870771283609792355579558899389085E13L, + -1.421592856111673959642750863283919318175E13L, + -4.012134994918353924219048850264207074949E12L, + -6.013361045800992316498238470888523722431E11L, + -5.145382510136622274784240527039643430628E10L, + -2.510575820013409711678540476918249524123E9L, + -6.564058379709759600836745035871373240904E7L, + -7.861511116647120540275354855221373571536E5L, + -2.821943442729620524365661338459579270561E3L + /* 1.0E0L */ +}; + + +/* log gamma(x+5) = log gamma(5) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 4.5 <= x+5 <= 5.5 + Peak relative error 3.4e-37 */ +static const long double lgam5a = 3.17803955078125E0L; +static const long double lgam5b = 1.4279566695619646941601297055408873990961E-5L; +#define NRN5 9 +static const long double RN5[NRN5 + 1] = +{ + 2.010952885441805899580403215533972172098E11L, + 1.916132681242540921354921906708215338584E11L, + 7.679102403710581712903937970163206882492E10L, + 1.680514903671382470108010973615268125169E10L, + 2.181011222911537259440775283277711588410E9L, + 1.705361119398837808244780667539728356096E8L, + 7.792391565652481864976147945997033946360E6L, + 1.910741381027985291688667214472560023819E5L, + 2.088138241893612679762260077783794329559E3L, + 6.330318119566998299106803922739066556550E0L +}; +#define NRD5 8 +static const long double RD5[NRD5 + 1] = +{ + 1.335189758138651840605141370223112376176E11L, + 1.174130445739492885895466097516530211283E11L, + 4.308006619274572338118732154886328519910E10L, + 8.547402888692578655814445003283720677468E9L, + 9.934628078575618309542580800421370730906E8L, + 6.847107420092173812998096295422311820672E7L, + 2.698552646016599923609773122139463150403E6L, + 5.526516251532464176412113632726150253215E4L, + 4.772343321713697385780533022595450486932E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+4) = log gamma(4) + x P(x)/Q(x) + -0.5 <= x <= 0.5 + 3.5 <= x+4 <= 4.5 + Peak relative error 6.7e-37 */ +static const long double lgam4a = 1.791748046875E0L; +static const long double lgam4b = 1.1422353055000812477358380702272722990692E-5L; +#define NRN4 9 +static const long double RN4[NRN4 + 1] = +{ + -1.026583408246155508572442242188887829208E13L, + -1.306476685384622809290193031208776258809E13L, + -7.051088602207062164232806511992978915508E12L, + -2.100849457735620004967624442027793656108E12L, + -3.767473790774546963588549871673843260569E11L, + -4.156387497364909963498394522336575984206E10L, + -2.764021460668011732047778992419118757746E9L, + -1.036617204107109779944986471142938641399E8L, + -1.895730886640349026257780896972598305443E6L, + -1.180509051468390914200720003907727988201E4L +}; +#define NRD4 9 +static const long double RD4[NRD4 + 1] = +{ + -8.172669122056002077809119378047536240889E12L, + -9.477592426087986751343695251801814226960E12L, + -4.629448850139318158743900253637212801682E12L, + -1.237965465892012573255370078308035272942E12L, + -1.971624313506929845158062177061297598956E11L, + -1.905434843346570533229942397763361493610E10L, + -1.089409357680461419743730978512856675984E9L, + -3.416703082301143192939774401370222822430E7L, + -4.981791914177103793218433195857635265295E5L, + -2.192507743896742751483055798411231453733E3L + /* 1.0E0L */ +}; + + +/* log gamma(x+3) = log gamma(3) + x P(x)/Q(x) + -0.25 <= x <= 0.5 + 2.75 <= x+3 <= 3.5 + Peak relative error 6.0e-37 */ +static const long double lgam3a = 6.93145751953125E-1L; +static const long double lgam3b = 1.4286068203094172321214581765680755001344E-6L; + +#define NRN3 9 +static const long double RN3[NRN3 + 1] = +{ + -4.813901815114776281494823863935820876670E11L, + -8.425592975288250400493910291066881992620E11L, + -6.228685507402467503655405482985516909157E11L, + -2.531972054436786351403749276956707260499E11L, + -6.170200796658926701311867484296426831687E10L, + -9.211477458528156048231908798456365081135E9L, + -8.251806236175037114064561038908691305583E8L, + -4.147886355917831049939930101151160447495E7L, + -1.010851868928346082547075956946476932162E6L, + -8.333374463411801009783402800801201603736E3L +}; +#define NRD3 9 +static const long double RD3[NRD3 + 1] = +{ + -5.216713843111675050627304523368029262450E11L, + -8.014292925418308759369583419234079164391E11L, + -5.180106858220030014546267824392678611990E11L, + -1.830406975497439003897734969120997840011E11L, + -3.845274631904879621945745960119924118925E10L, + -4.891033385370523863288908070309417710903E9L, + -3.670172254411328640353855768698287474282E8L, + -1.505316381525727713026364396635522516989E7L, + -2.856327162923716881454613540575964890347E5L, + -1.622140448015769906847567212766206894547E3L + /* 1.0E0L */ +}; + + +/* log gamma(x+2.5) = log gamma(2.5) + x P(x)/Q(x) + -0.125 <= x <= 0.25 + 2.375 <= x+2.5 <= 2.75 */ +static const long double lgam2r5a = 2.8466796875E-1L; +static const long double lgam2r5b = 1.4901722919159632494669682701924320137696E-5L; +#define NRN2r5 8 +static const long double RN2r5[NRN2r5 + 1] = +{ + -4.676454313888335499356699817678862233205E9L, + -9.361888347911187924389905984624216340639E9L, + -7.695353600835685037920815799526540237703E9L, + -3.364370100981509060441853085968900734521E9L, + -8.449902011848163568670361316804900559863E8L, + -1.225249050950801905108001246436783022179E8L, + -9.732972931077110161639900388121650470926E6L, + -3.695711763932153505623248207576425983573E5L, + -4.717341584067827676530426007495274711306E3L +}; +#define NRD2r5 8 +static const long double RD2r5[NRD2r5 + 1] = +{ + -6.650657966618993679456019224416926875619E9L, + -1.099511409330635807899718829033488771623E10L, + -7.482546968307837168164311101447116903148E9L, + -2.702967190056506495988922973755870557217E9L, + -5.570008176482922704972943389590409280950E8L, + -6.536934032192792470926310043166993233231E7L, + -4.101991193844953082400035444146067511725E6L, + -1.174082735875715802334430481065526664020E5L, + -9.932840389994157592102947657277692978511E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+2) = x P(x)/Q(x) + -0.125 <= x <= +0.375 + 1.875 <= x+2 <= 2.375 + Peak relative error 4.6e-36 */ +#define NRN2 9 +static const long double RN2[NRN2 + 1] = +{ + -3.716661929737318153526921358113793421524E9L, + -1.138816715030710406922819131397532331321E10L, + -1.421017419363526524544402598734013569950E10L, + -9.510432842542519665483662502132010331451E9L, + -3.747528562099410197957514973274474767329E9L, + -8.923565763363912474488712255317033616626E8L, + -1.261396653700237624185350402781338231697E8L, + -9.918402520255661797735331317081425749014E6L, + -3.753996255897143855113273724233104768831E5L, + -4.778761333044147141559311805999540765612E3L +}; +#define NRD2 9 +static const long double RD2[NRD2 + 1] = +{ + -8.790916836764308497770359421351673950111E9L, + -2.023108608053212516399197678553737477486E10L, + -1.958067901852022239294231785363504458367E10L, + -1.035515043621003101254252481625188704529E10L, + -3.253884432621336737640841276619272224476E9L, + -6.186383531162456814954947669274235815544E8L, + -6.932557847749518463038934953605969951466E7L, + -4.240731768287359608773351626528479703758E6L, + -1.197343995089189188078944689846348116630E5L, + -1.004622911670588064824904487064114090920E3L +/* 1.0E0 */ +}; + + +/* log gamma(x+1.75) = log gamma(1.75) + x P(x)/Q(x) + -0.125 <= x <= +0.125 + 1.625 <= x+1.75 <= 1.875 + Peak relative error 9.2e-37 */ +static const long double lgam1r75a = -8.441162109375E-2L; +static const long double lgam1r75b = 1.0500073264444042213965868602268256157604E-5L; +#define NRN1r75 8 +static const long double RN1r75[NRN1r75 + 1] = +{ + -5.221061693929833937710891646275798251513E7L, + -2.052466337474314812817883030472496436993E8L, + -2.952718275974940270675670705084125640069E8L, + -2.132294039648116684922965964126389017840E8L, + -8.554103077186505960591321962207519908489E7L, + -1.940250901348870867323943119132071960050E7L, + -2.379394147112756860769336400290402208435E6L, + -1.384060879999526222029386539622255797389E5L, + -2.698453601378319296159355612094598695530E3L +}; +#define NRD1r75 8 +static const long double RD1r75[NRD1r75 + 1] = +{ + -2.109754689501705828789976311354395393605E8L, + -5.036651829232895725959911504899241062286E8L, + -4.954234699418689764943486770327295098084E8L, + -2.589558042412676610775157783898195339410E8L, + -7.731476117252958268044969614034776883031E7L, + -1.316721702252481296030801191240867486965E7L, + -1.201296501404876774861190604303728810836E6L, + -5.007966406976106636109459072523610273928E4L, + -6.155817990560743422008969155276229018209E2L + /* 1.0E0L */ +}; + + +/* log gamma(x+x0) = y0 + x^2 P(x)/Q(x) + -0.0867 <= x <= +0.1634 + 1.374932... <= x+x0 <= 1.625032... + Peak relative error 4.0e-36 */ +static const long double x0a = 1.4616241455078125L; +static const long double x0b = 7.9994605498412626595423257213002588621246E-6L; +static const long double y0a = -1.21490478515625E-1L; +static const long double y0b = 4.1879797753919044854428223084178486438269E-6L; +#define NRN1r5 8 +static const long double RN1r5[NRN1r5 + 1] = +{ + 6.827103657233705798067415468881313128066E5L, + 1.910041815932269464714909706705242148108E6L, + 2.194344176925978377083808566251427771951E6L, + 1.332921400100891472195055269688876427962E6L, + 4.589080973377307211815655093824787123508E5L, + 8.900334161263456942727083580232613796141E4L, + 9.053840838306019753209127312097612455236E3L, + 4.053367147553353374151852319743594873771E2L, + 5.040631576303952022968949605613514584950E0L +}; +#define NRD1r5 8 +static const long double RD1r5[NRD1r5 + 1] = +{ + 1.411036368843183477558773688484699813355E6L, + 4.378121767236251950226362443134306184849E6L, + 5.682322855631723455425929877581697918168E6L, + 3.999065731556977782435009349967042222375E6L, + 1.653651390456781293163585493620758410333E6L, + 4.067774359067489605179546964969435858311E5L, + 5.741463295366557346748361781768833633256E4L, + 4.226404539738182992856094681115746692030E3L, + 1.316980975410327975566999780608618774469E2L, + /* 1.0E0L */ +}; + + +/* log gamma(x+1.25) = log gamma(1.25) + x P(x)/Q(x) + -.125 <= x <= +.125 + 1.125 <= x+1.25 <= 1.375 + Peak relative error = 4.9e-36 */ +static const long double lgam1r25a = -9.82818603515625E-2L; +static const long double lgam1r25b = 1.0023929749338536146197303364159774377296E-5L; +#define NRN1r25 9 +static const long double RN1r25[NRN1r25 + 1] = +{ + -9.054787275312026472896002240379580536760E4L, + -8.685076892989927640126560802094680794471E4L, + 2.797898965448019916967849727279076547109E5L, + 6.175520827134342734546868356396008898299E5L, + 5.179626599589134831538516906517372619641E5L, + 2.253076616239043944538380039205558242161E5L, + 5.312653119599957228630544772499197307195E4L, + 6.434329437514083776052669599834938898255E3L, + 3.385414416983114598582554037612347549220E2L, + 4.907821957946273805080625052510832015792E0L +}; +#define NRD1r25 8 +static const long double RD1r25[NRD1r25 + 1] = +{ + 3.980939377333448005389084785896660309000E5L, + 1.429634893085231519692365775184490465542E6L, + 2.145438946455476062850151428438668234336E6L, + 1.743786661358280837020848127465970357893E6L, + 8.316364251289743923178092656080441655273E5L, + 2.355732939106812496699621491135458324294E5L, + 3.822267399625696880571810137601310855419E4L, + 3.228463206479133236028576845538387620856E3L, + 1.152133170470059555646301189220117965514E2L + /* 1.0E0L */ +}; + + +/* log gamma(x + 1) = x P(x)/Q(x) + 0.0 <= x <= +0.125 + 1.0 <= x+1 <= 1.125 + Peak relative error 1.1e-35 */ +#define NRN1 8 +static const long double RN1[NRN1 + 1] = +{ + -9.987560186094800756471055681088744738818E3L, + -2.506039379419574361949680225279376329742E4L, + -1.386770737662176516403363873617457652991E4L, + 1.439445846078103202928677244188837130744E4L, + 2.159612048879650471489449668295139990693E4L, + 1.047439813638144485276023138173676047079E4L, + 2.250316398054332592560412486630769139961E3L, + 1.958510425467720733041971651126443864041E2L, + 4.516830313569454663374271993200291219855E0L +}; +#define NRD1 7 +static const long double RD1[NRD1 + 1] = +{ + 1.730299573175751778863269333703788214547E4L, + 6.807080914851328611903744668028014678148E4L, + 1.090071629101496938655806063184092302439E5L, + 9.124354356415154289343303999616003884080E4L, + 4.262071638655772404431164427024003253954E4L, + 1.096981664067373953673982635805821283581E4L, + 1.431229503796575892151252708527595787588E3L, + 7.734110684303689320830401788262295992921E1L + /* 1.0E0 */ +}; + + +/* log gamma(x + 1) = x P(x)/Q(x) + -0.125 <= x <= 0 + 0.875 <= x+1 <= 1.0 + Peak relative error 7.0e-37 */ +#define NRNr9 8 +static const long double RNr9[NRNr9 + 1] = +{ + 4.441379198241760069548832023257571176884E5L, + 1.273072988367176540909122090089580368732E6L, + 9.732422305818501557502584486510048387724E5L, + -5.040539994443998275271644292272870348684E5L, + -1.208719055525609446357448132109723786736E6L, + -7.434275365370936547146540554419058907156E5L, + -2.075642969983377738209203358199008185741E5L, + -2.565534860781128618589288075109372218042E4L, + -1.032901669542994124131223797515913955938E3L, +}; +#define NRDr9 8 +static const long double RDr9[NRDr9 + 1] = +{ + -7.694488331323118759486182246005193998007E5L, + -3.301918855321234414232308938454112213751E6L, + -5.856830900232338906742924836032279404702E6L, + -5.540672519616151584486240871424021377540E6L, + -3.006530901041386626148342989181721176919E6L, + -9.350378280513062139466966374330795935163E5L, + -1.566179100031063346901755685375732739511E5L, + -1.205016539620260779274902967231510804992E4L, + -2.724583156305709733221564484006088794284E2L +/* 1.0E0 */ +}; + + +/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +neval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +deval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = x + *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +#ifdef __STDC__ +long double +__ieee754_lgammal_r (long double x, int *signgamp) +#else +long double +__ieee754_lgammal_r (x, signgamp) + long double x; + int *signgamp; +#endif +{ + long double p, q, w, z, nx; + int i, nn; + + *signgamp = 1; + + if (! __finitel (x)) + return x * x; + + if (x < 0.0L) + { + q = -x; + w = __ieee754_lgammal_r (q, &i); + p = __floorl (q); + if (p == q) + return (one / zero); + i = p; + if ((i & 1) == 0) + *signgamp = -1; + else + *signgamp = 1; + z = q - p; + if (z > 0.5L) + { + p += 1.0L; + z = p - q; + } + z = q * __sinl (PIL * z); + if (z == 0.0L) + return (*signgamp * huge * huge); + z = __logl (PIL / z) - w; + return (z); + } + + if (x < 13.5L) + { + p = 0.0L; + nx = __floorl (x + 0.5L); + nn = nx; + switch (nn) + { + case 0: + /* log gamma (x + 1) = log(x) + log gamma(x) */ + if (x <= 0.125) + { + p = x * neval (x, RN1, NRN1) / deval (x, RD1, NRD1); + } + else if (x <= 0.375) + { + z = x - 0.25L; + p = z * neval (z, RN1r25, NRN1r25) / deval (z, RD1r25, NRD1r25); + p += lgam1r25b; + p += lgam1r25a; + } + else if (x <= 0.625) + { + z = x + (1.0L - x0a); + z = z - x0b; + p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5); + p = p * z * z; + p = p + y0b; + p = p + y0a; + } + else if (x <= 0.875) + { + z = x - 0.75L; + p = z * neval (z, RN1r75, NRN1r75) / deval (z, RD1r75, NRD1r75); + p += lgam1r75b; + p += lgam1r75a; + } + else + { + z = x - 1.0L; + p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2); + } + p = p - __logl (x); + break; + + case 1: + if (x < 0.875L) + { + if (x <= 0.625) + { + z = x + (1.0L - x0a); + z = z - x0b; + p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5); + p = p * z * z; + p = p + y0b; + p = p + y0a; + } + else if (x <= 0.875) + { + z = x - 0.75L; + p = z * neval (z, RN1r75, NRN1r75) + / deval (z, RD1r75, NRD1r75); + p += lgam1r75b; + p += lgam1r75a; + } + else + { + z = x - 1.0L; + p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2); + } + p = p - __logl (x); + } + else if (x < 1.0L) + { + z = x - 1.0L; + p = z * neval (z, RNr9, NRNr9) / deval (z, RDr9, NRDr9); + } + else if (x <= 1.125L) + { + z = x - 1.0L; + p = z * neval (z, RN1, NRN1) / deval (z, RD1, NRD1); + } + else if (x <= 1.375) + { + z = x - 1.25L; + p = z * neval (z, RN1r25, NRN1r25) / deval (z, RD1r25, NRD1r25); + p += lgam1r25b; + p += lgam1r25a; + } + else + { + /* 1.375 <= x+x0 <= 1.625 */ + z = x - x0a; + z = z - x0b; + p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5); + p = p * z * z; + p = p + y0b; + p = p + y0a; + } + break; + + case 2: + if (x < 1.625L) + { + z = x - x0a; + z = z - x0b; + p = neval (z, RN1r5, NRN1r5) / deval (z, RD1r5, NRD1r5); + p = p * z * z; + p = p + y0b; + p = p + y0a; + } + else if (x < 1.875L) + { + z = x - 1.75L; + p = z * neval (z, RN1r75, NRN1r75) / deval (z, RD1r75, NRD1r75); + p += lgam1r75b; + p += lgam1r75a; + } + else if (x < 2.375L) + { + z = x - 2.0L; + p = z * neval (z, RN2, NRN2) / deval (z, RD2, NRD2); + } + else + { + z = x - 2.5L; + p = z * neval (z, RN2r5, NRN2r5) / deval (z, RD2r5, NRD2r5); + p += lgam2r5b; + p += lgam2r5a; + } + break; + + case 3: + if (x < 2.75) + { + z = x - 2.5L; + p = z * neval (z, RN2r5, NRN2r5) / deval (z, RD2r5, NRD2r5); + p += lgam2r5b; + p += lgam2r5a; + } + else + { + z = x - 3.0L; + p = z * neval (z, RN3, NRN3) / deval (z, RD3, NRD3); + p += lgam3b; + p += lgam3a; + } + break; + + case 4: + z = x - 4.0L; + p = z * neval (z, RN4, NRN4) / deval (z, RD4, NRD4); + p += lgam4b; + p += lgam4a; + break; + + case 5: + z = x - 5.0L; + p = z * neval (z, RN5, NRN5) / deval (z, RD5, NRD5); + p += lgam5b; + p += lgam5a; + break; + + case 6: + z = x - 6.0L; + p = z * neval (z, RN6, NRN6) / deval (z, RD6, NRD6); + p += lgam6b; + p += lgam6a; + break; + + case 7: + z = x - 7.0L; + p = z * neval (z, RN7, NRN7) / deval (z, RD7, NRD7); + p += lgam7b; + p += lgam7a; + break; + + case 8: + z = x - 8.0L; + p = z * neval (z, RN8, NRN8) / deval (z, RD8, NRD8); + p += lgam8b; + p += lgam8a; + break; + + case 9: + z = x - 9.0L; + p = z * neval (z, RN9, NRN9) / deval (z, RD9, NRD9); + p += lgam9b; + p += lgam9a; + break; + + case 10: + z = x - 10.0L; + p = z * neval (z, RN10, NRN10) / deval (z, RD10, NRD10); + p += lgam10b; + p += lgam10a; + break; + + case 11: + z = x - 11.0L; + p = z * neval (z, RN11, NRN11) / deval (z, RD11, NRD11); + p += lgam11b; + p += lgam11a; + break; + + case 12: + z = x - 12.0L; + p = z * neval (z, RN12, NRN12) / deval (z, RD12, NRD12); + p += lgam12b; + p += lgam12a; + break; + + case 13: + z = x - 13.0L; + p = z * neval (z, RN13, NRN13) / deval (z, RD13, NRD13); + p += lgam13b; + p += lgam13a; + break; + } + return p; + } + + if (x > MAXLGM) + return (*signgamp * huge * huge); + + q = ls2pi - x; + q = (x - 0.5L) * __logl (x) + q; + if (x > 1.0e18L) + return (q); + + p = 1.0L / (x * x); + q += neval (p, RASY, NRASY) / x; + return (q); +} diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_log10l.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_log10l.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_log10l.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_log10l.c Mon Nov 26 04:44:34 2001 @@ -0,0 +1,244 @@ +/* log10l.c + * + * Common logarithm, 128-bit long double precision + * + * + * + * SYNOPSIS: + * + * long double x, y, log10l(); + * + * y = log10l( x ); + * + * + * + * DESCRIPTION: + * + * Returns the base 10 logarithm of x. + * + * The argument is separated into its exponent and fractional + * parts. If the exponent is between -1 and +1, the logarithm + * of the fraction is approximated by + * + * log(1+x) = x - 0.5 x^2 + x^3 P(x)/Q(x). + * + * Otherwise, setting z = 2(x-1)/x+1), + * + * log(x) = z + z^3 P(z)/Q(z). + * + * + * + * ACCURACY: + * + * Relative error: + * arithmetic domain # trials peak rms + * IEEE 0.5, 2.0 30000 2.3e-34 4.9e-35 + * IEEE exp(+-10000) 30000 1.0e-34 4.1e-35 + * + * In the tests over the interval exp(+-10000), the logarithms + * of the random arguments were uniformly distributed over + * [-10000, +10000]. + * + */ + +/* + Cephes Math Library Release 2.2: January, 1991 + Copyright 1984, 1991 by Stephen L. Moshier + Adapted for glibc November, 2001 + */ + +#include "math.h" +#include "math_private.h" + +/* Coefficients for ln(1+x) = x - x**2/2 + x**3 P(x)/Q(x) + * 1/sqrt(2) <= x < sqrt(2) + * Theoretical peak relative error = 5.3e-37, + * relative peak error spread = 2.3e-14 + */ +static const long double P[13] = +{ + 1.313572404063446165910279910527789794488E4L, + 7.771154681358524243729929227226708890930E4L, + 2.014652742082537582487669938141683759923E5L, + 3.007007295140399532324943111654767187848E5L, + 2.854829159639697837788887080758954924001E5L, + 1.797628303815655343403735250238293741397E5L, + 7.594356839258970405033155585486712125861E4L, + 2.128857716871515081352991964243375186031E4L, + 3.824952356185897735160588078446136783779E3L, + 4.114517881637811823002128927449878962058E2L, + 2.321125933898420063925789532045674660756E1L, + 4.998469661968096229986658302195402690910E-1L, + 1.538612243596254322971797716843006400388E-6L +}; +static const long double Q[12] = +{ + 3.940717212190338497730839731583397586124E4L, + 2.626900195321832660448791748036714883242E5L, + 7.777690340007566932935753241556479363645E5L, + 1.347518538384329112529391120390701166528E6L, + 1.514882452993549494932585972882995548426E6L, + 1.158019977462989115839826904108208787040E6L, + 6.132189329546557743179177159925690841200E5L, + 2.248234257620569139969141618556349415120E5L, + 5.605842085972455027590989944010492125825E4L, + 9.147150349299596453976674231612674085381E3L, + 9.104928120962988414618126155557301584078E2L, + 4.839208193348159620282142911143429644326E1L +/* 1.000000000000000000000000000000000000000E0L, */ +}; + +/* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), + * where z = 2(x-1)/(x+1) + * 1/sqrt(2) <= x < sqrt(2) + * Theoretical peak relative error = 1.1e-35, + * relative peak error spread 1.1e-9 + */ +static const long double R[6] = +{ + 1.418134209872192732479751274970992665513E5L, + -8.977257995689735303686582344659576526998E4L, + 2.048819892795278657810231591630928516206E4L, + -2.024301798136027039250415126250455056397E3L, + 8.057002716646055371965756206836056074715E1L, + -8.828896441624934385266096344596648080902E-1L +}; +static const long double S[6] = +{ + 1.701761051846631278975701529965589676574E6L, + -1.332535117259762928288745111081235577029E6L, + 4.001557694070773974936904547424676279307E5L, + -5.748542087379434595104154610899551484314E4L, + 3.998526750980007367835804959888064681098E3L, + -1.186359407982897997337150403816839480438E2L +/* 1.000000000000000000000000000000000000000E0L, */ +}; + +static const long double +/* log10(2) */ +L102A = 0.3125L, +L102B = -1.14700043360188047862611052755069732318101185E-2L, +/* log10(e) */ +L10EA = 0.5L, +L10EB = -6.570551809674817234887108108339491770560299E-2L, +/* sqrt(2)/2 */ +SQRTH = 7.071067811865475244008443621048490392848359E-1L; + + + +/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +neval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +deval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = x + *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + + +long double +__ieee754_log10l (x) + long double x; +{ + long double z; + long double y; + int e; + +/* Test for domain */ + if (x <= 0.0L) + { + if (x == 0.0L) + return (-1.0L / (x - x)); + else + return (x - x) / (x - x); + } + if (!__finitel (x)) + return (x + x); + +/* separate mantissa from exponent */ + +/* Note, frexp is used so that denormal numbers + * will be handled properly. + */ + x = __frexpl (x, &e); + + +/* logarithm using log(x) = z + z**3 P(z)/Q(z), + * where z = 2(x-1)/x+1) + */ + if ((e > 2) || (e < -2)) + { + if (x < SQRTH) + { /* 2( 2x-1 )/( 2x+1 ) */ + e -= 1; + z = x - 0.5L; + y = 0.5L * z + 0.5L; + } + else + { /* 2 (x-1)/(x+1) */ + z = x - 0.5L; + z -= 0.5L; + y = 0.5L * x + 0.5L; + } + x = z / y; + z = x * x; + y = x * (z * neval (z, R, 5) / deval (z, S, 5)); + goto done; + } + + +/* logarithm using log(1+x) = x - .5x**2 + x**3 P(x)/Q(x) */ + + if (x < SQRTH) + { + e -= 1; + x = 2.0 * x - 1.0L; /* 2x - 1 */ + } + else + { + x = x - 1.0L; + } + z = x * x; + y = x * (z * neval (x, P, 12) / deval (x, Q, 11)); + y = y - 0.5 * z; + +done: + + /* Multiply log of fraction by log10(e) + * and base 2 exponent by log10(2). + */ + z = y * L10EB; + z += x * L10EB; + z += e * L102B; + z += y * L10EA; + z += x * L10EA; + z += e * L102A; + return (z); +} diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_log2l.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_log2l.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_log2l.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_log2l.c Sat Nov 10 02:38:27 2001 @@ -0,0 +1,237 @@ +/* log2l.c + * Base 2 logarithm, 128-bit long double precision + * + * + * + * SYNOPSIS: + * + * long double x, y, log2l(); + * + * y = log2l( x ); + * + * + * + * DESCRIPTION: + * + * Returns the base 2 logarithm of x. + * + * The argument is separated into its exponent and fractional + * parts. If the exponent is between -1 and +1, the (natural) + * logarithm of the fraction is approximated by + * + * log(1+x) = x - 0.5 x^2 + x^3 P(x)/Q(x). + * + * Otherwise, setting z = 2(x-1)/x+1), + * + * log(x) = z + z^3 P(z)/Q(z). + * + * + * + * ACCURACY: + * + * Relative error: + * arithmetic domain # trials peak rms + * IEEE 0.5, 2.0 100,000 2.6e-34 4.9e-35 + * IEEE exp(+-10000) 100,000 9.6e-35 4.0e-35 + * + * In the tests over the interval exp(+-10000), the logarithms + * of the random arguments were uniformly distributed over + * [-10000, +10000]. + * + */ + +/* + Cephes Math Library Release 2.2: January, 1991 + Copyright 1984, 1991 by Stephen L. Moshier + Adapted for glibc November, 2001 + */ + +#include "math.h" +#include "math_private.h" + +/* Coefficients for ln(1+x) = x - x**2/2 + x**3 P(x)/Q(x) + * 1/sqrt(2) <= x < sqrt(2) + * Theoretical peak relative error = 5.3e-37, + * relative peak error spread = 2.3e-14 + */ +static const long double P[13] = +{ + 1.313572404063446165910279910527789794488E4L, + 7.771154681358524243729929227226708890930E4L, + 2.014652742082537582487669938141683759923E5L, + 3.007007295140399532324943111654767187848E5L, + 2.854829159639697837788887080758954924001E5L, + 1.797628303815655343403735250238293741397E5L, + 7.594356839258970405033155585486712125861E4L, + 2.128857716871515081352991964243375186031E4L, + 3.824952356185897735160588078446136783779E3L, + 4.114517881637811823002128927449878962058E2L, + 2.321125933898420063925789532045674660756E1L, + 4.998469661968096229986658302195402690910E-1L, + 1.538612243596254322971797716843006400388E-6L +}; +static const long double Q[12] = +{ + 3.940717212190338497730839731583397586124E4L, + 2.626900195321832660448791748036714883242E5L, + 7.777690340007566932935753241556479363645E5L, + 1.347518538384329112529391120390701166528E6L, + 1.514882452993549494932585972882995548426E6L, + 1.158019977462989115839826904108208787040E6L, + 6.132189329546557743179177159925690841200E5L, + 2.248234257620569139969141618556349415120E5L, + 5.605842085972455027590989944010492125825E4L, + 9.147150349299596453976674231612674085381E3L, + 9.104928120962988414618126155557301584078E2L, + 4.839208193348159620282142911143429644326E1L +/* 1.000000000000000000000000000000000000000E0L, */ +}; + +/* Coefficients for log(x) = z + z^3 P(z^2)/Q(z^2), + * where z = 2(x-1)/(x+1) + * 1/sqrt(2) <= x < sqrt(2) + * Theoretical peak relative error = 1.1e-35, + * relative peak error spread 1.1e-9 + */ +static const long double R[6] = +{ + 1.418134209872192732479751274970992665513E5L, + -8.977257995689735303686582344659576526998E4L, + 2.048819892795278657810231591630928516206E4L, + -2.024301798136027039250415126250455056397E3L, + 8.057002716646055371965756206836056074715E1L, + -8.828896441624934385266096344596648080902E-1L +}; +static const long double S[6] = +{ + 1.701761051846631278975701529965589676574E6L, + -1.332535117259762928288745111081235577029E6L, + 4.001557694070773974936904547424676279307E5L, + -5.748542087379434595104154610899551484314E4L, + 3.998526750980007367835804959888064681098E3L, + -1.186359407982897997337150403816839480438E2L +/* 1.000000000000000000000000000000000000000E0L, */ +}; + +static const long double +/* log2(e) - 1 */ +LOG2EA = 4.4269504088896340735992468100189213742664595E-1L, +/* sqrt(2)/2 */ +SQRTH = 7.071067811865475244008443621048490392848359E-1L; + + +/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +neval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +deval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = x + *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + + +long double +__ieee754_log2l (x) + long double x; +{ + long double z; + long double y; + int e; + +/* Test for domain */ + if (x <= 0.0L) + { + if (x == 0.0L) + return (-1.0L / (x - x)); + else + return (x - x) / (x - x); + } + if (!__finitel (x)) + return (x + x); + +/* separate mantissa from exponent */ + +/* Note, frexp is used so that denormal numbers + * will be handled properly. + */ + x = __frexpl (x, &e); + + +/* logarithm using log(x) = z + z**3 P(z)/Q(z), + * where z = 2(x-1)/x+1) + */ + if ((e > 2) || (e < -2)) + { + if (x < SQRTH) + { /* 2( 2x-1 )/( 2x+1 ) */ + e -= 1; + z = x - 0.5L; + y = 0.5L * z + 0.5L; + } + else + { /* 2 (x-1)/(x+1) */ + z = x - 0.5L; + z -= 0.5L; + y = 0.5L * x + 0.5L; + } + x = z / y; + z = x * x; + y = x * (z * neval (z, R, 5) / deval (z, S, 5)); + goto done; + } + + +/* logarithm using log(1+x) = x - .5x**2 + x**3 P(x)/Q(x) */ + + if (x < SQRTH) + { + e -= 1; + x = 2.0 * x - 1.0L; /* 2x - 1 */ + } + else + { + x = x - 1.0L; + } + z = x * x; + y = x * (z * neval (x, P, 12) / deval (x, Q, 11)); + y = y - 0.5 * z; + +done: + +/* Multiply log of fraction by log2(e) + * and base 2 exponent by 1 + */ + z = y * LOG2EA; + z += x * LOG2EA; + z += y; + z += x; + z += e; + return (z); +} diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_powl.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_powl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/e_powl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/e_powl.c Sun Oct 14 14:38:42 2001 @@ -0,0 +1,422 @@ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* Expansions and modifications for 128-bit long double contributed by + Stephen L. Moshier */ + +/* __ieee754_powl(x,y) return x**y + * + * n + * Method: Let x = 2 * (1+f) + * 1. Compute and return log2(x) in two pieces: + * log2(x) = w1 + w2, + * where w1 has 113-53 = 60 bit trailing zeros. + * 2. Perform y*log2(x) = n+y' by simulating muti-precision + * arithmetic, where |y'|<=0.5. + * 3. Return x**y = 2**n*exp(y'*log2) + * + * Special cases: + * 1. (anything) ** 0 is 1 + * 2. (anything) ** 1 is itself + * 3. (anything) ** NAN is NAN + * 4. NAN ** (anything except 0) is NAN + * 5. +-(|x| > 1) ** +INF is +INF + * 6. +-(|x| > 1) ** -INF is +0 + * 7. +-(|x| < 1) ** +INF is +0 + * 8. +-(|x| < 1) ** -INF is +INF + * 9. +-1 ** +-INF is NAN + * 10. +0 ** (+anything except 0, NAN) is +0 + * 11. -0 ** (+anything except 0, NAN, odd integer) is +0 + * 12. +0 ** (-anything except 0, NAN) is +INF + * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF + * 14. -0 ** (odd integer) = -( +0 ** (odd integer) ) + * 15. +INF ** (+anything except 0,NAN) is +INF + * 16. +INF ** (-anything except 0,NAN) is +0 + * 17. -INF ** (anything) = -0 ** (-anything) + * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer) + * 19. (-anything except 0 and inf) ** (non-integer) is NAN + * + */ + +#include "math.h" +#include "math_private.h" + +static const long double bp[] = { + 1.0L, + 1.5L, +}; + +/* log_2(1.5) */ +static const long double dp_h[] = { + 0.0, + 5.8496250072115607565592654282227158546448E-1L +}; + +/* Low part of log_2(1.5) */ +static const long double dp_l[] = { + 0.0, + 1.0579781240112554492329533686862998106046E-16L +}; + +static const long double zero = 0.0L, + one = 1.0L, + two = 2.0L, + two113 = 1.0384593717069655257060992658440192E34L, + huge = 1.0e3000L, + tiny = 1.0e-3000L; + +/* 3/2 log x = 3 z + z^3 + z^3 (z^2 R(z^2)) + z = (x-1)/(x+1) + 1 <= x <= 1.25 + Peak relative error 2.3e-37 */ +static const long double LN[] = +{ + -3.0779177200290054398792536829702930623200E1L, + 6.5135778082209159921251824580292116201640E1L, + -4.6312921812152436921591152809994014413540E1L, + 1.2510208195629420304615674658258363295208E1L, + -9.9266909031921425609179910128531667336670E-1L +}; +static const long double LD[] = +{ + -5.129862866715009066465422805058933131960E1L, + 1.452015077564081884387441590064272782044E2L, + -1.524043275549860505277434040464085593165E2L, + 7.236063513651544224319663428634139768808E1L, + -1.494198912340228235853027849917095580053E1L + /* 1.0E0 */ +}; + +/* exp(x) = 1 + x - x / (1 - 2 / (x - x^2 R(x^2))) + 0 <= x <= 0.5 + Peak relative error 5.7e-38 */ +static const long double PN[] = +{ + 5.081801691915377692446852383385968225675E8L, + 9.360895299872484512023336636427675327355E6L, + 4.213701282274196030811629773097579432957E4L, + 5.201006511142748908655720086041570288182E1L, + 9.088368420359444263703202925095675982530E-3L, +}; +static const long double PD[] = +{ + 3.049081015149226615468111430031590411682E9L, + 1.069833887183886839966085436512368982758E8L, + 8.259257717868875207333991924545445705394E5L, + 1.872583833284143212651746812884298360922E3L, + /* 1.0E0 */ +}; + +static const long double + /* ln 2 */ + lg2 = 6.9314718055994530941723212145817656807550E-1L, + lg2_h = 6.9314718055994528622676398299518041312695E-1L, + lg2_l = 2.3190468138462996154948554638754786504121E-17L, + ovt = 8.0085662595372944372e-0017L, + /* 2/(3*log(2)) */ + cp = 9.6179669392597560490661645400126142495110E-1L, + cp_h = 9.6179669392597555432899980587535537779331E-1L, + cp_l = 5.0577616648125906047157785230014751039424E-17L; + +#ifdef __STDC__ +long double +__ieee754_powl (long double x, long double y) +#else +long double +__ieee754_powl (x, y) + long double x, y; +#endif +{ + long double z, ax, z_h, z_l, p_h, p_l; + long double y1, t1, t2, r, s, t, u, v, w; + long double s2, s_h, s_l, t_h, t_l; + int32_t i, j, k, yisint, n; + u_int32_t ix, iy; + int32_t hx, hy; + ieee854_long_double_shape_type o, p, q; + + p.value = x; + hx = p.parts32.w0; + ix = hx & 0x7fffffff; + + q.value = y; + hy = q.parts32.w0; + iy = hy & 0x7fffffff; + + + /* y==zero: x**0 = 1 */ + if ((iy | q.parts32.w1 | q.parts32.w2 | q.parts32.w3) == 0) + return one; + + /* +-NaN return x+y */ + if ((ix > 0x7fff0000) + || ((ix == 0x7fff0000) + && ((p.parts32.w1 | p.parts32.w2 | p.parts32.w3) != 0)) + || (iy > 0x7fff0000) + || ((iy == 0x7fff0000) + && ((q.parts32.w1 | q.parts32.w2 | q.parts32.w3) != 0))) + return x + y; + + /* determine if y is an odd int when x < 0 + * yisint = 0 ... y is not an integer + * yisint = 1 ... y is an odd int + * yisint = 2 ... y is an even int + */ + yisint = 0; + if (hx < 0) + { + if (iy >= 0x40700000) /* 2^113 */ + yisint = 2; /* even integer y */ + else if (iy >= 0x3fff0000) /* 1.0 */ + { + if (__floorl (y) == y) + { + z = 0.5 * y; + if (__floorl (z) == z) + yisint = 2; + else + yisint = 1; + } + } + } + + /* special value of y */ + if ((q.parts32.w1 | q.parts32.w2 | q.parts32.w3) == 0) + { + if (iy == 0x7fff0000) /* y is +-inf */ + { + if (((ix - 0x3fff0000) | p.parts32.w1 | p.parts32.w2 | p.parts32.w3) + == 0) + return y - y; /* inf**+-1 is NaN */ + else if (ix >= 0x3fff0000) /* (|x|>1)**+-inf = inf,0 */ + return (hy >= 0) ? y : zero; + else /* (|x|<1)**-,+inf = inf,0 */ + return (hy < 0) ? -y : zero; + } + if (iy == 0x3fff0000) + { /* y is +-1 */ + if (hy < 0) + return one / x; + else + return x; + } + if (hy == 0x40000000) + return x * x; /* y is 2 */ + if (hy == 0x3ffe0000) + { /* y is 0.5 */ + if (hx >= 0) /* x >= +0 */ + return __ieee754_sqrtl (x); + } + } + + ax = fabsl (x); + /* special value of x */ + if ((p.parts32.w1 | p.parts32.w2 | p.parts32.w3) == 0) + { + if (ix == 0x7fff0000 || ix == 0 || ix == 0x3fff0000) + { + z = ax; /*x is +-0,+-inf,+-1 */ + if (hy < 0) + z = one / z; /* z = (1/|x|) */ + if (hx < 0) + { + if (((ix - 0x3fff0000) | yisint) == 0) + { + z = (z - z) / (z - z); /* (-1)**non-int is NaN */ + } + else if (yisint == 1) + z = -z; /* (x<0)**odd = -(|x|**odd) */ + } + return z; + } + } + + /* (x<0)**(non-int) is NaN */ + if (((((u_int32_t) hx >> 31) - 1) | yisint) == 0) + return (x - x) / (x - x); + + /* |y| is huge. + 2^-16495 = 1/2 of smallest representable value. + If (1 - 1/131072)^y underflows, y > 1.4986e9 */ + if (iy > 0x401d654b) + { + /* if (1 - 2^-113)^y underflows, y > 1.1873e38 */ + if (iy > 0x407d654b) + { + if (ix <= 0x3ffeffff) + return (hy < 0) ? huge * huge : tiny * tiny; + if (ix >= 0x3fff0000) + return (hy > 0) ? huge * huge : tiny * tiny; + } + /* over/underflow if x is not close to one */ + if (ix < 0x3ffeffff) + return (hy < 0) ? huge * huge : tiny * tiny; + if (ix > 0x3fff0000) + return (hy > 0) ? huge * huge : tiny * tiny; + } + + n = 0; + /* take care subnormal number */ + if (ix < 0x00010000) + { + ax *= two113; + n -= 113; + o.value = ax; + ix = o.parts32.w0; + } + n += ((ix) >> 16) - 0x3fff; + j = ix & 0x0000ffff; + /* determine interval */ + ix = j | 0x3fff0000; /* normalize ix */ + if (j <= 0x3988) + k = 0; /* |x|> 31) - 1) | (yisint - 1)) == 0) + s = -one; /* (-ve)**(odd int) */ + + /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */ + y1 = y; + o.value = y1; + o.parts32.w3 = 0; + o.parts32.w2 &= 0xf8000000; + y1 = o.value; + p_l = (y - y1) * t1 + y * t2; + p_h = y1 * t1; + z = p_l + p_h; + o.value = z; + j = o.parts32.w0; + if (j >= 0x400d0000) /* z >= 16384 */ + { + /* if z > 16384 */ + if (((j - 0x400d0000) | o.parts32.w1 | o.parts32.w2 | o.parts32.w3) != 0) + return s * huge * huge; /* overflow */ + else + { + if (p_l + ovt > z - p_h) + return s * huge * huge; /* overflow */ + } + } + else if ((j & 0x7fffffff) >= 0x400d01b9) /* z <= -16495 */ + { + /* z < -16495 */ + if (((j - 0xc00d01bc) | o.parts32.w1 | o.parts32.w2 | o.parts32.w3) + != 0) + return s * tiny * tiny; /* underflow */ + else + { + if (p_l <= z - p_h) + return s * tiny * tiny; /* underflow */ + } + } + /* compute 2**(p_h+p_l) */ + i = j & 0x7fffffff; + k = (i >> 16) - 0x3fff; + n = 0; + if (i > 0x3ffe0000) + { /* if |z| > 0.5, set n = [z+0.5] */ + n = __floorl (z + 0.5L); + t = n; + p_h -= t; + } + t = p_l + p_h; + o.value = t; + o.parts32.w3 = 0; + o.parts32.w2 &= 0xf8000000; + t = o.value; + u = t * lg2_h; + v = (p_l - (t - p_h)) * lg2 + t * lg2_l; + z = u + v; + w = v - (z - u); + /* exp(z) */ + t = z * z; + u = PN[0] + t * (PN[1] + t * (PN[2] + t * (PN[3] + t * PN[4]))); + v = PD[0] + t * (PD[1] + t * (PD[2] + t * (PD[3] + t))); + t1 = z - t * u / v; + r = (z * t1) / (t1 - two) - (w + z * w); + z = one - (r - z); + o.value = z; + j = o.parts32.w0; + j += (n << 16); + if ((j >> 16) <= 0) + z = __scalbnl (z, n); /* subnormal output */ + else + { + o.parts32.w0 = j; + z = o.value; + } + return s * z; +} diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_cbrtl.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_cbrtl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_cbrtl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_cbrtl.c Sun Oct 14 14:44:33 2001 @@ -0,0 +1,121 @@ +/* cbrtl.c + * + * Cube root, long double precision + * + * + * + * SYNOPSIS: + * + * long double x, y, cbrtl(); + * + * y = cbrtl( x ); + * + * + * + * DESCRIPTION: + * + * Returns the cube root of the argument, which may be negative. + * + * Range reduction involves determining the power of 2 of + * the argument. A polynomial of degree 2 applied to the + * mantissa, and multiplication by the cube root of 1, 2, or 4 + * approximates the root to within about 0.1%. Then Newton's + * iteration is used three times to converge to an accurate + * result. + * + * + * + * ACCURACY: + * + * Relative error: + * arithmetic domain # trials peak rms + * IEEE -8,8 100000 1.3e-34 3.9e-35 + * IEEE exp(+-707) 100000 1.3e-34 4.3e-35 + * + */ + +/* +Cephes Math Library Release 2.2: January, 1991 +Copyright 1984, 1991 by Stephen L. Moshier +Adapted for glibc October, 2001. +*/ + +#include "math.h" +#include "math_private.h" + +static const long double CBRT2 = 1.259921049894873164767210607278228350570251L; +static const long double CBRT4 = 1.587401051968199474751705639272308260391493L; +static const long double CBRT2I = 0.7937005259840997373758528196361541301957467L; +static const long double CBRT4I = 0.6299605249474365823836053036391141752851257L; + + +long double +__cbrtl (long double x) +{ + int e, rem, sign; + long double z; + + if (!__finitel (x)) + return x + x; + + if (x == 0) + return (x); + + if (x > 0) + sign = 1; + else + { + sign = -1; + x = -x; + } + + z = x; + /* extract power of 2, leaving mantissa between 0.5 and 1 */ + x = __frexpl (x, &e); + + /* Approximate cube root of number between .5 and 1, + peak relative error = 1.2e-6 */ + x = ((((1.3584464340920900529734e-1L * x + - 6.3986917220457538402318e-1L) * x + + 1.2875551670318751538055e0L) * x + - 1.4897083391357284957891e0L) * x + + 1.3304961236013647092521e0L) * x + 3.7568280825958912391243e-1L; + + /* exponent divided by 3 */ + if (e >= 0) + { + rem = e; + e /= 3; + rem -= 3 * e; + if (rem == 1) + x *= CBRT2; + else if (rem == 2) + x *= CBRT4; + } + else + { /* argument less than 1 */ + e = -e; + rem = e; + e /= 3; + rem -= 3 * e; + if (rem == 1) + x *= CBRT2I; + else if (rem == 2) + x *= CBRT4I; + e = -e; + } + + /* multiply by power of 2 */ + x = __ldexpl (x, e); + + /* Newton iteration */ + x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L; + x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L; + x -= (x - (z / (x * x))) * 0.3333333333333333333333333333333333333333L; + + if (sign < 0) + x = -x; + return (x); +} + +weak_alias (__cbrtl, cbrtl) diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_erfl.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_erfl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_erfl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_erfl.c Mon Nov 26 04:44:35 2001 @@ -0,0 +1,941 @@ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* Modifications and expansions for 128-bit long double contributed by + Stephen L. Moshier */ + +/* double erf(double x) + * double erfc(double x) + * x + * 2 |\ + * erf(x) = --------- | exp(-t*t)dt + * sqrt(pi) \| + * 0 + * + * erfc(x) = 1-erf(x) + * Note that + * erf(-x) = -erf(x) + * erfc(-x) = 2 - erfc(x) + * + * Method: + * 1. erf(x) = x + x*R(x^2) for |x| in [0, 7/8] + * Remark. The formula is derived by noting + * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....) + * and that + * 2/sqrt(pi) = 1.128379167095512573896158903121545171688 + * is close to one. + * + * 1a. erf(x) = 1 - erfc(x), for |x| > 1.0 + * erfc(x) = 1 - erf(x) if |x| < 1/4 + * + * 2. For |x| in [7/8, 1], let s = |x| - 1, and + * c = 0.84506291151 rounded to single (24 bits) + * erf(s + c) = sign(x) * (c + P1(s)/Q1(s)) + * Remark: here we use the taylor series expansion at x=1. + * erf(1+s) = erf(1) + s*Poly(s) + * = 0.845.. + P1(s)/Q1(s) + * Note that |P1/Q1|< 0.078 for x in [0.84375,1.25] + * + * 3. For x in [1/4, 5/4], + * erfc(s + const) = erfc(const) + s P1(s)/Q1(s) + * for const = 1/4, 3/8, ..., 9/8 + * and 0 <= s <= 1/8 . + * + * 4. For x in [5/4, 107], + * erfc(x) = (1/x)*exp(-x*x-0.5625 + R(z)) + * z=1/x^2 + * The interval is partitioned into several segments + * of width 1/8 in 1/x. + * + * Note1: + * To compute exp(-x*x-0.5625+R/S), let s be a single + * precision number and s := x; then + * -x*x = -s*s + (s-x)*(s+x) + * exp(-x*x-0.5626+R/S) = + * exp(-s*s-0.5625)*exp((s-x)*(s+x)+R/S); + * Note2: + * Here 4 and 5 make use of the asymptotic series + * exp(-x*x) + * erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) ) + * x*sqrt(pi) + * + * 5. For inf > x >= 107 + * erf(x) = sign(x) *(1 - tiny) (raise inexact) + * erfc(x) = tiny*tiny (raise underflow) if x > 0 + * = 2 - tiny if x<0 + * + * 7. Special case: + * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1, + * erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2, + * erfc/erf(NaN) is NaN + */ + +#include "math.h" +#include "math_private.h" + +/* Evaluate P[n] x^n + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +neval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + +/* Evaluate x^n+1 + P[n] x^(n) + P[n-1] x^(n-1) + ... + P[0] */ + +static long double +deval (long double x, const long double *p, int n) +{ + long double y; + + p += n; + y = x + *p--; + do + { + y = y * x + *p--; + } + while (--n > 0); + return y; +} + + + +#ifdef __STDC__ +static const long double +#else +static long double +#endif +tiny = 1e-4931L, + half = 0.5L, + one = 1.0L, + two = 2.0L, + /* 2/sqrt(pi) - 1 */ + efx = 1.2837916709551257389615890312154517168810E-1L, + /* 8 * (2/sqrt(pi) - 1) */ + efx8 = 1.0270333367641005911692712249723613735048E0L; + + +/* erf(x) = x + x R(x^2) + 0 <= x <= 7/8 + Peak relative error 1.8e-35 */ +#define NTN1 8 +static const long double TN1[NTN1 + 1] = +{ + -3.858252324254637124543172907442106422373E10L, + 9.580319248590464682316366876952214879858E10L, + 1.302170519734879977595901236693040544854E10L, + 2.922956950426397417800321486727032845006E9L, + 1.764317520783319397868923218385468729799E8L, + 1.573436014601118630105796794840834145120E7L, + 4.028077380105721388745632295157816229289E5L, + 1.644056806467289066852135096352853491530E4L, + 3.390868480059991640235675479463287886081E1L +}; +#define NTD1 8 +static const long double TD1[NTD1 + 1] = +{ + -3.005357030696532927149885530689529032152E11L, + -1.342602283126282827411658673839982164042E11L, + -2.777153893355340961288511024443668743399E10L, + -3.483826391033531996955620074072768276974E9L, + -2.906321047071299585682722511260895227921E8L, + -1.653347985722154162439387878512427542691E7L, + -6.245520581562848778466500301865173123136E5L, + -1.402124304177498828590239373389110545142E4L, + -1.209368072473510674493129989468348633579E2L +/* 1.0E0 */ +}; + + +/* erf(z+1) = erf_const + P(z)/Q(z) + -.125 <= z <= 0 + Peak relative error 7.3e-36 */ +static const long double erf_const = 0.845062911510467529296875L; +#define NTN2 8 +static const long double TN2[NTN2 + 1] = +{ + -4.088889697077485301010486931817357000235E1L, + 7.157046430681808553842307502826960051036E3L, + -2.191561912574409865550015485451373731780E3L, + 2.180174916555316874988981177654057337219E3L, + 2.848578658049670668231333682379720943455E2L, + 1.630362490952512836762810462174798925274E2L, + 6.317712353961866974143739396865293596895E0L, + 2.450441034183492434655586496522857578066E1L, + 5.127662277706787664956025545897050896203E-1L +}; +#define NTD2 8 +static const long double TD2[NTD2 + 1] = +{ + 1.731026445926834008273768924015161048885E4L, + 1.209682239007990370796112604286048173750E4L, + 1.160950290217993641320602282462976163857E4L, + 5.394294645127126577825507169061355698157E3L, + 2.791239340533632669442158497532521776093E3L, + 8.989365571337319032943005387378993827684E2L, + 2.974016493766349409725385710897298069677E2L, + 6.148192754590376378740261072533527271947E1L, + 1.178502892490738445655468927408440847480E1L + /* 1.0E0 */ +}; + + +/* erfc(x + 0.25) = erfc(0.25) + x R(x) + 0 <= x < 0.125 + Peak relative error 1.4e-35 */ +#define NRNr13 8 +static const long double RNr13[NRNr13 + 1] = +{ + -2.353707097641280550282633036456457014829E3L, + 3.871159656228743599994116143079870279866E2L, + -3.888105134258266192210485617504098426679E2L, + -2.129998539120061668038806696199343094971E1L, + -8.125462263594034672468446317145384108734E1L, + 8.151549093983505810118308635926270319660E0L, + -5.033362032729207310462422357772568553670E0L, + -4.253956621135136090295893547735851168471E-2L, + -8.098602878463854789780108161581050357814E-2L +}; +#define NRDr13 7 +static const long double RDr13[NRDr13 + 1] = +{ + 2.220448796306693503549505450626652881752E3L, + 1.899133258779578688791041599040951431383E2L, + 1.061906712284961110196427571557149268454E3L, + 7.497086072306967965180978101974566760042E1L, + 2.146796115662672795876463568170441327274E2L, + 1.120156008362573736664338015952284925592E1L, + 2.211014952075052616409845051695042741074E1L, + 6.469655675326150785692908453094054988938E-1L + /* 1.0E0 */ +}; +/* erfc(0.25) = C13a + C13b to extra precision. */ +static const long double C13a = 0.723663330078125L; +static const long double C13b = 1.0279753638067014931732235184287934646022E-5L; + + +/* erfc(x + 0.375) = erfc(0.375) + x R(x) + 0 <= x < 0.125 + Peak relative error 1.2e-35 */ +#define NRNr14 8 +static const long double RNr14[NRNr14 + 1] = +{ + -2.446164016404426277577283038988918202456E3L, + 6.718753324496563913392217011618096698140E2L, + -4.581631138049836157425391886957389240794E2L, + -2.382844088987092233033215402335026078208E1L, + -7.119237852400600507927038680970936336458E1L, + 1.313609646108420136332418282286454287146E1L, + -6.188608702082264389155862490056401365834E0L, + -2.787116601106678287277373011101132659279E-2L, + -2.230395570574153963203348263549700967918E-2L +}; +#define NRDr14 7 +static const long double RDr14[NRDr14 + 1] = +{ + 2.495187439241869732696223349840963702875E3L, + 2.503549449872925580011284635695738412162E2L, + 1.159033560988895481698051531263861842461E3L, + 9.493751466542304491261487998684383688622E1L, + 2.276214929562354328261422263078480321204E2L, + 1.367697521219069280358984081407807931847E1L, + 2.276988395995528495055594829206582732682E1L, + 7.647745753648996559837591812375456641163E-1L + /* 1.0E0 */ +}; +/* erfc(0.375) = C14a + C14b to extra precision. */ +static const long double C14a = 0.5958709716796875L; +static const long double C14b = 1.2118885490201676174914080878232469565953E-5L; + +/* erfc(x + 0.5) = erfc(0.5) + x R(x) + 0 <= x < 0.125 + Peak relative error 4.7e-36 */ +#define NRNr15 8 +static const long double RNr15[NRNr15 + 1] = +{ + -2.624212418011181487924855581955853461925E3L, + 8.473828904647825181073831556439301342756E2L, + -5.286207458628380765099405359607331669027E2L, + -3.895781234155315729088407259045269652318E1L, + -6.200857908065163618041240848728398496256E1L, + 1.469324610346924001393137895116129204737E1L, + -6.961356525370658572800674953305625578903E0L, + 5.145724386641163809595512876629030548495E-3L, + 1.990253655948179713415957791776180406812E-2L +}; +#define NRDr15 7 +static const long double RDr15[NRDr15 + 1] = +{ + 2.986190760847974943034021764693341524962E3L, + 5.288262758961073066335410218650047725985E2L, + 1.363649178071006978355113026427856008978E3L, + 1.921707975649915894241864988942255320833E2L, + 2.588651100651029023069013885900085533226E2L, + 2.628752920321455606558942309396855629459E1L, + 2.455649035885114308978333741080991380610E1L, + 1.378826653595128464383127836412100939126E0L + /* 1.0E0 */ +}; +/* erfc(0.5) = C15a + C15b to extra precision. */ +static const long double C15a = 0.4794921875L; +static const long double C15b = 7.9346869534623172533461080354712635484242E-6L; + +/* erfc(x + 0.625) = erfc(0.625) + x R(x) + 0 <= x < 0.125 + Peak relative error 5.1e-36 */ +#define NRNr16 8 +static const long double RNr16[NRNr16 + 1] = +{ + -2.347887943200680563784690094002722906820E3L, + 8.008590660692105004780722726421020136482E2L, + -5.257363310384119728760181252132311447963E2L, + -4.471737717857801230450290232600243795637E1L, + -4.849540386452573306708795324759300320304E1L, + 1.140885264677134679275986782978655952843E1L, + -6.731591085460269447926746876983786152300E0L, + 1.370831653033047440345050025876085121231E-1L, + 2.022958279982138755020825717073966576670E-2L, +}; +#define NRDr16 7 +static const long double RDr16[NRDr16 + 1] = +{ + 3.075166170024837215399323264868308087281E3L, + 8.730468942160798031608053127270430036627E2L, + 1.458472799166340479742581949088453244767E3L, + 3.230423687568019709453130785873540386217E2L, + 2.804009872719893612081109617983169474655E2L, + 4.465334221323222943418085830026979293091E1L, + 2.612723259683205928103787842214809134746E1L, + 2.341526751185244109722204018543276124997E0L, + /* 1.0E0 */ +}; +/* erfc(0.625) = C16a + C16b to extra precision. */ +static const long double C16a = 0.3767547607421875L; +static const long double C16b = 4.3570693945275513594941232097252997287766E-6L; + +/* erfc(x + 0.75) = erfc(0.75) + x R(x) + 0 <= x < 0.125 + Peak relative error 1.7e-35 */ +#define NRNr17 8 +static const long double RNr17[NRNr17 + 1] = +{ + -1.767068734220277728233364375724380366826E3L, + 6.693746645665242832426891888805363898707E2L, + -4.746224241837275958126060307406616817753E2L, + -2.274160637728782675145666064841883803196E1L, + -3.541232266140939050094370552538987982637E1L, + 6.988950514747052676394491563585179503865E0L, + -5.807687216836540830881352383529281215100E0L, + 3.631915988567346438830283503729569443642E-1L, + -1.488945487149634820537348176770282391202E-2L +}; +#define NRDr17 7 +static const long double RDr17[NRDr17 + 1] = +{ + 2.748457523498150741964464942246913394647E3L, + 1.020213390713477686776037331757871252652E3L, + 1.388857635935432621972601695296561952738E3L, + 3.903363681143817750895999579637315491087E2L, + 2.784568344378139499217928969529219886578E2L, + 5.555800830216764702779238020065345401144E1L, + 2.646215470959050279430447295801291168941E1L, + 2.984905282103517497081766758550112011265E0L, + /* 1.0E0 */ +}; +/* erfc(0.75) = C17a + C17b to extra precision. */ +static const long double C17a = 0.2888336181640625L; +static const long double C17b = 1.0748182422368401062165408589222625794046E-5L; + + +/* erfc(x + 0.875) = erfc(0.875) + x R(x) + 0 <= x < 0.125 + Peak relative error 2.2e-35 */ +#define NRNr18 8 +static const long double RNr18[NRNr18 + 1] = +{ + -1.342044899087593397419622771847219619588E3L, + 6.127221294229172997509252330961641850598E2L, + -4.519821356522291185621206350470820610727E2L, + 1.223275177825128732497510264197915160235E1L, + -2.730789571382971355625020710543532867692E1L, + 4.045181204921538886880171727755445395862E0L, + -4.925146477876592723401384464691452700539E0L, + 5.933878036611279244654299924101068088582E-1L, + -5.557645435858916025452563379795159124753E-2L +}; +#define NRDr18 7 +static const long double RDr18[NRDr18 + 1] = +{ + 2.557518000661700588758505116291983092951E3L, + 1.070171433382888994954602511991940418588E3L, + 1.344842834423493081054489613250688918709E3L, + 4.161144478449381901208660598266288188426E2L, + 2.763670252219855198052378138756906980422E2L, + 5.998153487868943708236273854747564557632E1L, + 2.657695108438628847733050476209037025318E1L, + 3.252140524394421868923289114410336976512E0L, + /* 1.0E0 */ +}; +/* erfc(0.875) = C18a + C18b to extra precision. */ +static const long double C18a = 0.215911865234375L; +static const long double C18b = 1.3073705765341685464282101150637224028267E-5L; + +/* erfc(x + 1.0) = erfc(1.0) + x R(x) + 0 <= x < 0.125 + Peak relative error 1.6e-35 */ +#define NRNr19 8 +static const long double RNr19[NRNr19 + 1] = +{ + -1.139180936454157193495882956565663294826E3L, + 6.134903129086899737514712477207945973616E2L, + -4.628909024715329562325555164720732868263E2L, + 4.165702387210732352564932347500364010833E1L, + -2.286979913515229747204101330405771801610E1L, + 1.870695256449872743066783202326943667722E0L, + -4.177486601273105752879868187237000032364E0L, + 7.533980372789646140112424811291782526263E-1L, + -8.629945436917752003058064731308767664446E-2L +}; +#define NRDr19 7 +static const long double RDr19[NRDr19 + 1] = +{ + 2.744303447981132701432716278363418643778E3L, + 1.266396359526187065222528050591302171471E3L, + 1.466739461422073351497972255511919814273E3L, + 4.868710570759693955597496520298058147162E2L, + 2.993694301559756046478189634131722579643E2L, + 6.868976819510254139741559102693828237440E1L, + 2.801505816247677193480190483913753613630E1L, + 3.604439909194350263552750347742663954481E0L, + /* 1.0E0 */ +}; +/* erfc(1.0) = C19a + C19b to extra precision. */ +static const long double C19a = 0.15728759765625L; +static const long double C19b = 1.1609394035130658779364917390740703933002E-5L; + +/* erfc(x + 1.125) = erfc(1.125) + x R(x) + 0 <= x < 0.125 + Peak relative error 3.6e-36 */ +#define NRNr20 8 +static const long double RNr20[NRNr20 + 1] = +{ + -9.652706916457973956366721379612508047640E2L, + 5.577066396050932776683469951773643880634E2L, + -4.406335508848496713572223098693575485978E2L, + 5.202893466490242733570232680736966655434E1L, + -1.931311847665757913322495948705563937159E1L, + -9.364318268748287664267341457164918090611E-2L, + -3.306390351286352764891355375882586201069E0L, + 7.573806045289044647727613003096916516475E-1L, + -9.611744011489092894027478899545635991213E-2L +}; +#define NRDr20 7 +static const long double RDr20[NRDr20 + 1] = +{ + 3.032829629520142564106649167182428189014E3L, + 1.659648470721967719961167083684972196891E3L, + 1.703545128657284619402511356932569292535E3L, + 6.393465677731598872500200253155257708763E2L, + 3.489131397281030947405287112726059221934E2L, + 8.848641738570783406484348434387611713070E1L, + 3.132269062552392974833215844236160958502E1L, + 4.430131663290563523933419966185230513168E0L + /* 1.0E0 */ +}; +/* erfc(1.125) = C20a + C20b to extra precision. */ +static const long double C20a = 0.111602783203125L; +static const long double C20b = 8.9850951672359304215530728365232161564636E-6L; + +/* erfc(1/x) = 1/x exp (-1/x^2 - 0.5625 + R(1/x^2)) + 7/8 <= 1/x < 1 + Peak relative error 1.4e-35 */ +#define NRNr8 9 +static const long double RNr8[NRNr8 + 1] = +{ + 3.587451489255356250759834295199296936784E1L, + 5.406249749087340431871378009874875889602E2L, + 2.931301290625250886238822286506381194157E3L, + 7.359254185241795584113047248898753470923E3L, + 9.201031849810636104112101947312492532314E3L, + 5.749697096193191467751650366613289284777E3L, + 1.710415234419860825710780802678697889231E3L, + 2.150753982543378580859546706243022719599E2L, + 8.740953582272147335100537849981160931197E0L, + 4.876422978828717219629814794707963640913E-2L +}; +#define NRDr8 8 +static const long double RDr8[NRDr8 + 1] = +{ + 6.358593134096908350929496535931630140282E1L, + 9.900253816552450073757174323424051765523E2L, + 5.642928777856801020545245437089490805186E3L, + 1.524195375199570868195152698617273739609E4L, + 2.113829644500006749947332935305800887345E4L, + 1.526438562626465706267943737310282977138E4L, + 5.561370922149241457131421914140039411782E3L, + 9.394035530179705051609070428036834496942E2L, + 6.147019596150394577984175188032707343615E1L + /* 1.0E0 */ +}; + +/* erfc(1/x) = 1/x exp (-1/x^2 - 0.5625 + R(1/x^2)) + 0.75 <= 1/x <= 0.875 + Peak relative error 2.0e-36 */ +#define NRNr7 9 +static const long double RNr7[NRNr7 + 1] = +{ + 1.686222193385987690785945787708644476545E1L, + 1.178224543567604215602418571310612066594E3L, + 1.764550584290149466653899886088166091093E4L, + 1.073758321890334822002849369898232811561E5L, + 3.132840749205943137619839114451290324371E5L, + 4.607864939974100224615527007793867585915E5L, + 3.389781820105852303125270837910972384510E5L, + 1.174042187110565202875011358512564753399E5L, + 1.660013606011167144046604892622504338313E4L, + 6.700393957480661937695573729183733234400E2L +}; +#define NRDr7 9 +static const long double RDr7[NRDr7 + 1] = +{ +-1.709305024718358874701575813642933561169E3L, +-3.280033887481333199580464617020514788369E4L, +-2.345284228022521885093072363418750835214E5L, +-8.086758123097763971926711729242327554917E5L, +-1.456900414510108718402423999575992450138E6L, +-1.391654264881255068392389037292702041855E6L, +-6.842360801869939983674527468509852583855E5L, +-1.597430214446573566179675395199807533371E5L, +-1.488876130609876681421645314851760773480E4L, +-3.511762950935060301403599443436465645703E2L + /* 1.0E0 */ +}; + +/* erfc(1/x) = 1/x exp(-1/x^2 - 0.5625 + R(1/x^2)) + 5/8 <= 1/x < 3/4 + Peak relative error 1.9e-35 */ +#define NRNr6 9 +static const long double RNr6[NRNr6 + 1] = +{ + 1.642076876176834390623842732352935761108E0L, + 1.207150003611117689000664385596211076662E2L, + 2.119260779316389904742873816462800103939E3L, + 1.562942227734663441801452930916044224174E4L, + 5.656779189549710079988084081145693580479E4L, + 1.052166241021481691922831746350942786299E5L, + 9.949798524786000595621602790068349165758E4L, + 4.491790734080265043407035220188849562856E4L, + 8.377074098301530326270432059434791287601E3L, + 4.506934806567986810091824791963991057083E2L +}; +#define NRDr6 9 +static const long double RDr6[NRDr6 + 1] = +{ +-1.664557643928263091879301304019826629067E2L, +-3.800035902507656624590531122291160668452E3L, +-3.277028191591734928360050685359277076056E4L, +-1.381359471502885446400589109566587443987E5L, +-3.082204287382581873532528989283748656546E5L, +-3.691071488256738343008271448234631037095E5L, +-2.300482443038349815750714219117566715043E5L, +-6.873955300927636236692803579555752171530E4L, +-8.262158817978334142081581542749986845399E3L, +-2.517122254384430859629423488157361983661E2L + /* 1.00 */ +}; + +/* erfc(1/x) = 1/x exp(-1/x^2 - 0.5625 + R(1/x^2)) + 1/2 <= 1/x < 5/8 + Peak relative error 4.6e-36 */ +#define NRNr5 10 +static const long double RNr5[NRNr5 + 1] = +{ +-3.332258927455285458355550878136506961608E-3L, +-2.697100758900280402659586595884478660721E-1L, +-6.083328551139621521416618424949137195536E0L, +-6.119863528983308012970821226810162441263E1L, +-3.176535282475593173248810678636522589861E2L, +-8.933395175080560925809992467187963260693E2L, +-1.360019508488475978060917477620199499560E3L, +-1.075075579828188621541398761300910213280E3L, +-4.017346561586014822824459436695197089916E2L, +-5.857581368145266249509589726077645791341E1L, +-2.077715925587834606379119585995758954399E0L +}; +#define NRDr5 9 +static const long double RDr5[NRDr5 + 1] = +{ + 3.377879570417399341550710467744693125385E-1L, + 1.021963322742390735430008860602594456187E1L, + 1.200847646592942095192766255154827011939E2L, + 7.118915528142927104078182863387116942836E2L, + 2.318159380062066469386544552429625026238E3L, + 4.238729853534009221025582008928765281620E3L, + 4.279114907284825886266493994833515580782E3L, + 2.257277186663261531053293222591851737504E3L, + 5.570475501285054293371908382916063822957E2L, + 5.142189243856288981145786492585432443560E1L + /* 1.0E0 */ +}; + +/* erfc(1/x) = 1/x exp(-1/x^2 - 0.5625 + R(1/x^2)) + 3/8 <= 1/x < 1/2 + Peak relative error 2.0e-36 */ +#define NRNr4 10 +static const long double RNr4[NRNr4 + 1] = +{ + 3.258530712024527835089319075288494524465E-3L, + 2.987056016877277929720231688689431056567E-1L, + 8.738729089340199750734409156830371528862E0L, + 1.207211160148647782396337792426311125923E2L, + 8.997558632489032902250523945248208224445E2L, + 3.798025197699757225978410230530640879762E3L, + 9.113203668683080975637043118209210146846E3L, + 1.203285891339933238608683715194034900149E4L, + 8.100647057919140328536743641735339740855E3L, + 2.383888249907144945837976899822927411769E3L, + 2.127493573166454249221983582495245662319E2L +}; +#define NRDr4 10 +static const long double RDr4[NRDr4 + 1] = +{ +-3.303141981514540274165450687270180479586E-1L, +-1.353768629363605300707949368917687066724E1L, +-2.206127630303621521950193783894598987033E2L, +-1.861800338758066696514480386180875607204E3L, +-8.889048775872605708249140016201753255599E3L, +-2.465888106627948210478692168261494857089E4L, +-3.934642211710774494879042116768390014289E4L, +-3.455077258242252974937480623730228841003E4L, +-1.524083977439690284820586063729912653196E4L, +-2.810541887397984804237552337349093953857E3L, +-1.343929553541159933824901621702567066156E2L + /* 1.0E0 */ +}; + +/* erfc(1/x) = 1/x exp(-1/x^2 - 0.5625 + R(1/x^2)) + 1/4 <= 1/x < 3/8 + Peak relative error 8.4e-37 */ +#define NRNr3 11 +static const long double RNr3[NRNr3 + 1] = +{ +-1.952401126551202208698629992497306292987E-6L, +-2.130881743066372952515162564941682716125E-4L, +-8.376493958090190943737529486107282224387E-3L, +-1.650592646560987700661598877522831234791E-1L, +-1.839290818933317338111364667708678163199E0L, +-1.216278715570882422410442318517814388470E1L, +-4.818759344462360427612133632533779091386E1L, +-1.120994661297476876804405329172164436784E2L, +-1.452850765662319264191141091859300126931E2L, +-9.485207851128957108648038238656777241333E1L, +-2.563663855025796641216191848818620020073E1L, +-1.787995944187565676837847610706317833247E0L +}; +#define NRDr3 10 +static const long double RDr3[NRDr3 + 1] = +{ + 1.979130686770349481460559711878399476903E-4L, + 1.156941716128488266238105813374635099057E-2L, + 2.752657634309886336431266395637285974292E-1L, + 3.482245457248318787349778336603569327521E0L, + 2.569347069372696358578399521203959253162E1L, + 1.142279000180457419740314694631879921561E2L, + 3.056503977190564294341422623108332700840E2L, + 4.780844020923794821656358157128719184422E2L, + 4.105972727212554277496256802312730410518E2L, + 1.724072188063746970865027817017067646246E2L, + 2.815939183464818198705278118326590370435E1L + /* 1.0E0 */ +}; + +/* erfc(1/x) = 1/x exp(-1/x^2 - 0.5625 + R(1/x^2)) + 1/8 <= 1/x < 1/4 + Peak relative error 1.5e-36 */ +#define NRNr2 11 +static const long double RNr2[NRNr2 + 1] = +{ +-2.638914383420287212401687401284326363787E-8L, +-3.479198370260633977258201271399116766619E-6L, +-1.783985295335697686382487087502222519983E-4L, +-4.777876933122576014266349277217559356276E-3L, +-7.450634738987325004070761301045014986520E-2L, +-7.068318854874733315971973707247467326619E-1L, +-4.113919921935944795764071670806867038732E0L, +-1.440447573226906222417767283691888875082E1L, +-2.883484031530718428417168042141288943905E1L, +-2.990886974328476387277797361464279931446E1L, +-1.325283914915104866248279787536128997331E1L, +-1.572436106228070195510230310658206154374E0L +}; +#define NRDr2 10 +static const long double RDr2[NRDr2 + 1] = +{ + 2.675042728136731923554119302571867799673E-6L, + 2.170997868451812708585443282998329996268E-4L, + 7.249969752687540289422684951196241427445E-3L, + 1.302040375859768674620410563307838448508E-1L, + 1.380202483082910888897654537144485285549E0L, + 8.926594113174165352623847870299170069350E0L, + 3.521089584782616472372909095331572607185E1L, + 8.233547427533181375185259050330809105570E1L, + 1.072971579885803033079469639073292840135E2L, + 6.943803113337964469736022094105143158033E1L, + 1.775695341031607738233608307835017282662E1L + /* 1.0E0 */ +}; + +/* erfc(1/x) = 1/x exp(-1/x^2 - 0.5625 + R(1/x^2)) + 1/128 <= 1/x < 1/8 + Peak relative error 2.2e-36 */ +#define NRNr1 9 +static const long double RNr1[NRNr1 + 1] = +{ +-4.250780883202361946697751475473042685782E-8L, +-5.375777053288612282487696975623206383019E-6L, +-2.573645949220896816208565944117382460452E-4L, +-6.199032928113542080263152610799113086319E-3L, +-8.262721198693404060380104048479916247786E-2L, +-6.242615227257324746371284637695778043982E-1L, +-2.609874739199595400225113299437099626386E0L, +-5.581967563336676737146358534602770006970E0L, +-5.124398923356022609707490956634280573882E0L, +-1.290865243944292370661544030414667556649E0L +}; +#define NRDr1 8 +static const long double RDr1[NRDr1 + 1] = +{ + 4.308976661749509034845251315983612976224E-6L, + 3.265390126432780184125233455960049294580E-4L, + 9.811328839187040701901866531796570418691E-3L, + 1.511222515036021033410078631914783519649E-1L, + 1.289264341917429958858379585970225092274E0L, + 6.147640356182230769548007536914983522270E0L, + 1.573966871337739784518246317003956180750E1L, + 1.955534123435095067199574045529218238263E1L, + 9.472613121363135472247929109615785855865E0L + /* 1.0E0 */ +}; + + +#ifdef __STDC__ +long double +__erfl (long double x) +#else +double +__erfl (x) + long double x; +#endif +{ + long double a, y, z; + int32_t i, ix, sign; + ieee854_long_double_shape_type u; + + u.value = x; + sign = u.parts32.w0; + ix = sign & 0x7fffffff; + + if (ix >= 0x7fff0000) + { /* erf(nan)=nan */ + i = ((sign & 0xffff0000) >> 31) << 1; + return (long double) (1 - i) + one / x; /* erf(+-inf)=+-1 */ + } + + if (ix >= 0x3fff0000) /* |x| >= 1.0 */ + { + y = __erfcl (x); + return (one - y); + /* return (one - __erfcl (x)); */ + } + u.parts32.w0 = ix; + a = u.value; + z = x * x; + if (ix < 0x3ffec000) /* a < 0.875 */ + { + if (ix < 0x3fc60000) /* |x|<2**-57 */ + { + if (ix < 0x00080000) + return 0.125 * (8.0 * x + efx8 * x); /*avoid underflow */ + return x + efx * x; + } + y = a + a * neval (z, TN1, NTN1) / deval (z, TD1, NTD1); + } + else + { + a = a - one; + y = erf_const + neval (a, TN2, NTN2) / deval (a, TD2, NTD2); + } + + if (sign & 0x80000000) /* x < 0 */ + y = -y; + return( y ); +} + +weak_alias (__erfl, erfl) +#ifdef NO_LONG_DOUBLE +strong_alias (__erf, __erfl) +weak_alias (__erf, erfl) +#endif +#ifdef __STDC__ + long double + __erfcl (long double x) +#else + long double + __erfcl (x) + double + x; +#endif +{ + long double y, z, p, r; + int32_t i, ix, sign; + ieee854_long_double_shape_type u; + + u.value = x; + sign = u.parts32.w0; + ix = sign & 0x7fffffff; + u.parts32.w0 = ix; + + if (ix >= 0x7fff0000) + { /* erfc(nan)=nan */ + /* erfc(+-inf)=0,2 */ + return (long double) (((u_int32_t) sign >> 31) << 1) + one / x; + } + + if (ix < 0x3ffd0000) /* |x| <1/4 */ + { + if (ix < 0x3f8d0000) /* |x|<2**-114 */ + return one - x; + return one - __erfl (x); + } + if (ix < 0x3fff4000) /* 1.25 */ + { + x = u.value; + i = 8.0 * x; + switch (i) + { + case 2: + z = x - 0.25L; + y = C13b + z * neval (z, RNr13, NRNr13) / deval (z, RDr13, NRDr13); + y += C13a; + break; + case 3: + z = x - 0.375L; + y = C14b + z * neval (z, RNr14, NRNr14) / deval (z, RDr14, NRDr14); + y += C14a; + break; + case 4: + z = x - 0.5L; + y = C15b + z * neval (z, RNr15, NRNr15) / deval (z, RDr15, NRDr15); + y += C15a; + break; + case 5: + z = x - 0.625L; + y = C16b + z * neval (z, RNr16, NRNr16) / deval (z, RDr16, NRDr16); + y += C16a; + break; + case 6: + z = x - 0.75L; + y = C17b + z * neval (z, RNr17, NRNr17) / deval (z, RDr17, NRDr17); + y += C17a; + break; + case 7: + z = x - 0.875L; + y = C18b + z * neval (z, RNr18, NRNr18) / deval (z, RDr18, NRDr18); + y += C18a; + break; + case 8: + z = x - 1.0L; + y = C19b + z * neval (z, RNr19, NRNr19) / deval (z, RDr19, NRDr19); + y += C19a; + break; + case 9: + z = x - 1.125L; + y = C20b + z * neval (z, RNr20, NRNr20) / deval (z, RDr20, NRDr20); + y += C20a; + break; + } + if (sign & 0x80000000) + y = 2.0L - y; + return y; + } + /* 1.25 < |x| < 107 */ + if (ix < 0x4005ac00) + { + /* x < -9 */ + if ((ix >= 0x40022000) && (sign & 0x80000000)) + return two - tiny; + + x = fabsl (x); + z = one / (x * x); + i = 8.0 / x; + switch (i) + { + default: + case 0: + p = neval (z, RNr1, NRNr1) / deval (z, RDr1, NRDr1); + break; + case 1: + p = neval (z, RNr2, NRNr2) / deval (z, RDr2, NRDr2); + break; + case 2: + p = neval (z, RNr3, NRNr3) / deval (z, RDr3, NRDr3); + break; + case 3: + p = neval (z, RNr4, NRNr4) / deval (z, RDr4, NRDr4); + break; + case 4: + p = neval (z, RNr5, NRNr5) / deval (z, RDr5, NRDr5); + break; + case 5: + p = neval (z, RNr6, NRNr6) / deval (z, RDr6, NRDr6); + break; + case 6: + p = neval (z, RNr7, NRNr7) / deval (z, RDr7, NRDr7); + break; + case 7: + p = neval (z, RNr8, NRNr8) / deval (z, RDr8, NRDr8); + break; + } + u.value = x; + u.parts32.w3 = 0; + u.parts32.w2 &= 0xfe000000; + z = u.value; + r = __ieee754_expl (-z * z - 0.5625) * + __ieee754_expl ((z - x) * (z + x) + p); + if ((sign & 0x80000000) == 0) + return r / x; + else + return two - r / x; + } + else + { + if ((sign & 0x80000000) == 0) + return tiny * tiny; + else + return two - tiny; + } +} + +weak_alias (__erfcl, erfcl) +#ifdef NO_LONG_DOUBLE +strong_alias (__erfc, __erfcl) +weak_alias (__erfc, erfcl) +#endif diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_expm1l.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_expm1l.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_expm1l.c Mon Jul 23 01:54:14 2001 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_expm1l.c Sun Oct 14 15:07:21 2001 @@ -45,7 +45,7 @@ -.5 ln 2 < x < .5 ln 2 Theoretical peak relative error = 8.1e-36 */ -static long double +static const long double P0 = 2.943520915569954073888921213330863757240E8L, P1 = -5.722847283900608941516165725053359168840E7L, P2 = 8.944630806357575461578107295909719817253E6L, @@ -103,11 +103,11 @@ __expm1l (long double x) /* expm1(+- 0) = +- 0. */ if ((ix == 0) && (u.parts32.w1 | u.parts32.w2 | u.parts32.w3) == 0) return x; - + /* Overflow. */ if (x > maxlog) return (big * big); - + /* Minimum value. */ if (x < minarg) return (4.0/big - 1.0L); diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_log1pl.c glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_log1pl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-128/s_log1pl.c Mon Jul 23 06:23:20 2001 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-128/s_log1pl.c Sun Oct 14 15:07:21 2001 @@ -46,7 +46,7 @@ * Theoretical peak relative error = 5.3e-37, * relative peak error spread = 2.3e-14 */ -static long double +static const long double P12 = 1.538612243596254322971797716843006400388E-6L, P11 = 4.998469661968096229986658302195402690910E-1L, P10 = 2.321125933898420063925789532045674660756E1L, @@ -80,7 +80,7 @@ static long double * Theoretical peak relative error = 1.1e-35, * relative peak error spread 1.1e-9 */ -static long double +static const long double R5 = -8.828896441624934385266096344596648080902E-1L, R4 = 8.057002716646055371965756206836056074715E1L, R3 = -2.024301798136027039250415126250455056397E3L, @@ -96,14 +96,14 @@ static long double S0 = 1.701761051846631278975701529965589676574E6L; /* C1 + C2 = ln 2 */ -static long double C1 = 6.93145751953125E-1L; -static long double C2 = 1.428606820309417232121458176568075500134E-6L; +static const long double C1 = 6.93145751953125E-1L; +static const long double C2 = 1.428606820309417232121458176568075500134E-6L; -static long double sqrth = 0.7071067811865475244008443621048490392848L; +static const long double sqrth = 0.7071067811865475244008443621048490392848L; /* ln (2^16384 * (1 - 2^-113)) */ -static long double maxlog = 1.1356523406294143949491931077970764891253E4L; -static long double big = 2e4932L; -static long double zero = 0.0L; +static const long double maxlog = 1.1356523406294143949491931077970764891253E4L; +static const long double big = 2e4932L; +static const long double zero = 0.0L; #if 1 /* Make sure these are prototyped. */ diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_cbrtl.c glibc-2.2.5/sysdeps/ieee754/ldbl-96/s_cbrtl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_cbrtl.c Mon Jul 23 10:55:53 2001 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-96/s_cbrtl.c Sun Oct 14 15:21:06 2001 @@ -37,11 +37,12 @@ static const double factor[5] = SQR_CBRT2 }; +static const long double third = 0.3333333333333333333333333L; long double __cbrtl (long double x) { - long double xm, ym, u, t2; + long double xm, u; int xe; /* Reduce X. XM now is an range 1.0 to 0.5. */ @@ -54,25 +55,17 @@ __cbrtl (long double x) if (xe == 0 && fpclassify (x) <= FP_ZERO) return x + x; - u = (0.338058687610520237 - + (1.67595307700780102 - + (-2.82414939754975962 - + (4.09559907378707839 + - (-4.11151425200350531 - + (2.65298938441952296 + - (-0.988553671195413709 - + 0.161617097923756032 * xm) - * xm) - * xm) - * xm) - * xm) - * xm) - *xm); - - t2 = u * u * u; + u = (((-1.34661104733595206551E-1 * xm + + 5.46646013663955245034E-1) * xm + - 9.54382247715094465250E-1) * xm + + 1.13999833547172932737E0) * xm + + 4.02389795645447521269E-1; - ym = u * (t2 + 2.0 * xm) / (2.0 * t2 + xm) * factor[2 + xe % 3]; + u *= factor[2 + xe % 3]; + u = __ldexpl (x > 0.0 ? u : -u, xe / 3); - return __ldexpl (x > 0.0 ? ym : -ym, xe / 3); + u -= (u - (x / (u * u))) * third; + u -= (u - (x / (u * u))) * third; + return u; } weak_alias (__cbrtl, cbrtl) diff -durpN glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_nextafterl.c glibc-2.2.5/sysdeps/ieee754/ldbl-96/s_nextafterl.c --- glibc-2.2.4/sysdeps/ieee754/ldbl-96/s_nextafterl.c Mon Jul 23 10:55:53 2001 +++ glibc-2.2.5/sysdeps/ieee754/ldbl-96/s_nextafterl.c Tue Oct 16 04:02:24 2001 @@ -43,8 +43,8 @@ static char rcsid[] = "$NetBSD: $"; ix = esx&0x7fff; /* |x| */ iy = esy&0x7fff; /* |y| */ - if(((ix==0x7fff)&&((hx|lx)!=0) || /* x is nan */ - ((iy==0x7fff)&&((hy|ly)!=0)) /* y is nan */ + if (((ix==0x7fff)&&((hx|lx)!=0)) || /* x is nan */ + ((iy==0x7fff)&&((hy|ly)!=0))) /* y is nan */ return x+y; if(x==y) return y; /* x=y, return y */ if((ix|hx|lx)==0) { /* x == 0 */ diff -durpN glibc-2.2.4/sysdeps/m68k/bits/byteswap.h glibc-2.2.5/sysdeps/m68k/bits/byteswap.h --- glibc-2.2.4/sysdeps/m68k/bits/byteswap.h Mon Jul 23 10:55:54 2001 +++ glibc-2.2.5/sysdeps/m68k/bits/byteswap.h Tue Jan 8 02:20:28 2002 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. We don't provide an assembler version because GCC is smart enough to generate optimal assembler output, and this allows for better cse. */ @@ -60,3 +63,5 @@ __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ __bswap_64_r.__ll; }) #endif + +#endif /* _BITS_BYTESWAP_H */ diff -durpN glibc-2.2.4/sysdeps/m68k/bsd-_setjmp.S glibc-2.2.5/sysdeps/m68k/bsd-_setjmp.S --- glibc-2.2.4/sysdeps/m68k/bsd-_setjmp.S Mon Jul 23 10:55:53 2001 +++ glibc-2.2.5/sysdeps/m68k/bsd-_setjmp.S Wed Dec 31 16:00:00 1969 @@ -1,49 +0,0 @@ -/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. - Copyright (C) 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -#ifdef MOTOROLA_SYNTAX -#define d0 %d0 -#define d1 %d1 -#define PUSH(reg) move.l reg, -(%sp) -#define POP(reg) move.l (%sp)+, reg -#define PUSH0 clr.l -(%sp) -#else -#define PUSH(reg) movel reg, sp@- -#define POP(reg) movel sp@+, reg -#define PUSH0 clrl sp@- -#endif - -ENTRY (_setjmp) - POP (d0) /* Pop return PC. */ - POP (d1) /* Pop jmp_buf argument. */ - PUSH0 /* Push second argument of zero. */ - PUSH (d1) /* Push back first argument. */ - PUSH (d0) /* Push back return PC. */ -#ifdef PIC - bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC) -#else - jmp C_SYMBOL_NAME (__sigsetjmp) -#endif -END (_setjmp) diff -durpN glibc-2.2.4/sysdeps/m68k/bsd-_setjmp.c glibc-2.2.5/sysdeps/m68k/bsd-_setjmp.c --- glibc-2.2.4/sysdeps/m68k/bsd-_setjmp.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/m68k/bsd-_setjmp.c Tue Oct 16 07:20:17 2001 @@ -0,0 +1,21 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version. + Copyright (C) 1994, 1997, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define BSD__SETJMP +#include diff -durpN glibc-2.2.4/sysdeps/m68k/bsd-setjmp.S glibc-2.2.5/sysdeps/m68k/bsd-setjmp.S --- glibc-2.2.4/sysdeps/m68k/bsd-setjmp.S Mon Jul 23 10:55:53 2001 +++ glibc-2.2.5/sysdeps/m68k/bsd-setjmp.S Wed Dec 31 16:00:00 1969 @@ -1,47 +0,0 @@ -/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version. - Copyright (C) 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. - We cannot do it in C because it must be a tail-call, so frame-unwinding - in setjmp doesn't clobber the state restored by longjmp. */ - -#include - -#ifdef MOTOROLA_SYNTAX -#define d0 %d0 -#define d1 %d1 -#define PUSH(reg) move.l reg, -(%sp) -#define POP(reg) move.l (%sp)+, reg -#else -#define PUSH(reg) movel reg, sp@- -#define POP(reg) movel sp@+, reg -#endif - -ENTRY (setjmp) - POP (d0) /* Pop return PC. */ - POP (d1) /* Pop jmp_buf argument. */ - pea 1 /* Push second argument of one. */ - PUSH (d1) /* Push back first argument. */ - PUSH (d0) /* Push back return PC. */ -#ifdef PIC - bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC) -#else - jmp C_SYMBOL_NAME (__sigsetjmp) -#endif -END (setjmp) diff -durpN glibc-2.2.4/sysdeps/m68k/bsd-setjmp.c glibc-2.2.5/sysdeps/m68k/bsd-setjmp.c --- glibc-2.2.4/sysdeps/m68k/bsd-setjmp.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/m68k/bsd-setjmp.c Tue Oct 16 07:20:17 2001 @@ -0,0 +1,21 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version. + Copyright (C) 1994, 1997, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define BSD_SETJMP +#include diff -durpN glibc-2.2.4/sysdeps/m68k/dl-machine.h glibc-2.2.5/sysdeps/m68k/dl-machine.h --- glibc-2.2.4/sysdeps/m68k/dl-machine.h Mon Jul 23 10:55:53 2001 +++ glibc-2.2.5/sysdeps/m68k/dl-machine.h Sun Aug 26 15:26:36 2001 @@ -189,13 +189,13 @@ _dl_start_user: .size _dl_start_user, . - _dl_start_user .previous"); -/* Nonzero iff TYPE describes a relocation that should - skip the executable when looking up the symbol value. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_68K_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_68K_JMP_SLOT @@ -232,16 +232,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { - if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE) + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_68K_RELATIVE, 0)) *reloc_addr = map->l_addr + reloc->r_addend; else { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { case R_68K_COPY: if (sym == NULL) @@ -290,10 +292,17 @@ elf_machine_rela (struct link_map *map, case R_68K_NONE: /* Alright, Wilbur. */ break; default: - _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } +} + +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; } static inline void diff -durpN glibc-2.2.4/sysdeps/m68k/fpu/libm-test-ulps glibc-2.2.5/sysdeps/m68k/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/m68k/fpu/libm-test-ulps Wed Apr 25 14:51:13 2001 +++ glibc-2.2.5/sysdeps/m68k/fpu/libm-test-ulps Tue Oct 16 13:21:38 2001 @@ -48,9 +48,6 @@ float: 1 ifloat: 1 # cacos -Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": double: 1 float: 1 @@ -87,16 +84,11 @@ ildouble: 1 ldouble: 1 # casin -Test "Imaginary part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i": -ildouble: 1 -ldouble: 1 Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 1 -ldouble: 1 Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": float: 2 ifloat: 2 @@ -109,25 +101,25 @@ double: 6 float: 19 idouble: 6 ifloat: 19 -ildouble: 6 -ldouble: 6 +ildouble: 5 +ldouble: 5 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": double: 13 float: 1 idouble: 13 ifloat: 1 -ildouble: 7 -ldouble: 7 +ildouble: 6 +ldouble: 6 Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": double: 1 idouble: 1 -ildouble: 3 -ldouble: 3 +ildouble: 1 +ldouble: 1 Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": float: 2 ifloat: 2 -ildouble: 3 -ldouble: 3 +ildouble: 2 +ldouble: 2 # catan Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": @@ -135,46 +127,28 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 7 -ldouble: 7 Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": ildouble: 1 ldouble: 1 Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": float: 1 ifloat: 1 -ildouble: 1 -ldouble: 1 # catanh Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": ildouble: 1 -ldouble: 2 -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -ildouble: 2 -ldouble: 2 +ldouble: 1 # cbrt Test "cbrt (-0.001) == -0.1": -ildouble: 102 -ldouble: 102 -Test "cbrt (-27.0) == -3.0": -ildouble: 948 -ldouble: 948 +ildouble: 1 +ldouble: 1 Test "cbrt (0.7) == 0.8879040017426007084": double: 1 idouble: 1 -ildouble: 345 -ldouble: 345 -Test "cbrt (0.970299) == 0.99": -ildouble: 142 -ldouble: 142 -Test "cbrt (8) == 2": -ildouble: 191 -ldouble: 191 # ccos Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": @@ -227,11 +201,6 @@ Test "Imaginary part of: cexp (0.7 + 1.2 float: 2 ifloat: 2 -# clog -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -ildouble: 1 -ldouble: 1 - # clog10 Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": ildouble: 1 @@ -261,9 +230,9 @@ double: 1 idouble: 1 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 0.5 +float: 1 idouble: 1 -ifloat: 0.5 +ifloat: 1 ildouble: 1 ldouble: 1 Test "cos (M_PI_6l * 4.0) == -0.5": @@ -274,12 +243,12 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "cos (pi/2) == 0": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 -ildouble: 0.25 -ldouble: 0.25 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # cosh Test "cosh (0.7) == 1.255169005630943018": @@ -303,13 +272,13 @@ ifloat: 6 ildouble: 2 ldouble: 2 Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -float: 0.5 -ifloat: 0.5 +float: 1 +ifloat: 1 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 1.103 -float: 2.5333 -idouble: 1.103 -ifloat: 2.5333 +double: 2 +float: 3 +idouble: 2 +ifloat: 3 ildouble: 1 ldouble: 1 @@ -373,8 +342,8 @@ Test "Imaginary part of: ctanh (-2 - 3 i ildouble: 25 ldouble: 25 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": float: 1 ifloat: 1 @@ -489,12 +458,22 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Test "j0 (1.5) == 0.51182767173591812875": float: 1 ifloat: 1 Test "j0 (10.0) == -0.24593576445134833520": double: 1 idouble: 1 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # j1 Test "j1 (-1.0) == -0.44005058574493351596": @@ -642,8 +621,8 @@ Test "log (2) == M_LN2l": ildouble: 1 ldouble: 1 Test "log (e) == 1": -float: 0.5 -ifloat: 0.5 +float: 1 +ifloat: 1 # log10 Test "log10 (0.7) == -0.15490195998574316929": @@ -692,9 +671,9 @@ double: 1 idouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 -float: 0.5 +float: 1 idouble: 1 -ifloat: 0.5 +ifloat: 1 ildouble: 1 ldouble: 1 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": @@ -705,12 +684,12 @@ ifloat: 1 ildouble: 1 ldouble: 1 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 -ildouble: 0.25 -ldouble: 0.25 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # sinh Test "sinh (0.7) == 0.75858370183953350346": @@ -722,8 +701,8 @@ Test "tan (0.7) == 0.8422883804630794481 ildouble: 1 ldouble: 1 Test "tan (pi/4) == 1": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": @@ -958,8 +937,6 @@ double: 3 float: 2 idouble: 3 ifloat: 2 -ildouble: 1 -ldouble: 1 Function: Imaginary part of "casin": float: 2 @@ -972,16 +949,16 @@ double: 6 float: 19 idouble: 6 ifloat: 19 -ildouble: 6 -ldouble: 6 +ildouble: 5 +ldouble: 5 Function: Imaginary part of "casinh": double: 13 float: 2 idouble: 13 ifloat: 2 -ildouble: 7 -ldouble: 7 +ildouble: 6 +ldouble: 6 Function: Real part of "catan": ildouble: 1 @@ -992,22 +969,16 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -ildouble: 7 -ldouble: 7 Function: Real part of "catanh": -ildouble: 2 -ldouble: 2 - -Function: Imaginary part of "catanh": -ildouble: 2 -ldouble: 2 +ildouble: 1 +ldouble: 1 Function: "cbrt": double: 1 idouble: 1 -ildouble: 948 -ldouble: 948 +ildouble: 1 +ldouble: 1 Function: Real part of "ccos": float: 1 @@ -1045,10 +1016,6 @@ Function: Imaginary part of "cexp": float: 2 ifloat: 2 -Function: Imaginary part of "clog": -ildouble: 1 -ldouble: 1 - Function: Real part of "clog10": double: 1 float: 1 @@ -1086,9 +1053,9 @@ ildouble: 5 ldouble: 5 Function: Imaginary part of "cpow": -double: 1.103 +double: 2 float: 6 -idouble: 1.103 +idouble: 2 ifloat: 6 ildouble: 2 ldouble: 2 @@ -1182,6 +1149,8 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "j1": float: 2 @@ -1258,8 +1227,8 @@ float: 1 ifloat: 1 Function: "tan": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 ildouble: 1 ldouble: 1 diff -durpN glibc-2.2.4/sysdeps/m68k/gccframe.h glibc-2.2.5/sysdeps/m68k/gccframe.h --- glibc-2.2.4/sysdeps/m68k/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/m68k/gccframe.h Thu Nov 15 17:11:16 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. m68k version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define FIRST_PSEUDO_REGISTER 24 + +#include diff -durpN glibc-2.2.4/sysdeps/m68k/setjmp.c glibc-2.2.5/sysdeps/m68k/setjmp.c --- glibc-2.2.4/sysdeps/m68k/setjmp.c Mon Jul 23 10:55:54 2001 +++ glibc-2.2.5/sysdeps/m68k/setjmp.c Tue Oct 16 08:31:18 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1994, 1997, 2001 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 @@ -20,7 +20,17 @@ /* Save the current program position in ENV and return 0. */ int +#if defined BSD_SETJMP +# undef setjmp +# define savemask 1 +setjmp (jmp_buf env) +#elif defined BSD__SETJMP +# undef _setjmp +# define savemask 0 +_setjmp (jmp_buf env) +#else __sigsetjmp (jmp_buf env, int savemask) +#endif { /* Save data registers D1 through D7. */ asm volatile ("movem%.l %/d1-%/d7, %0" @@ -39,7 +49,7 @@ __sigsetjmp (jmp_buf env, int savemask) /* Save caller's SP, not our own. */ env[0].__jmpbuf[0].__sp = (void *) &env; -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__) +#if defined __HAVE_68881__ || defined __HAVE_FPU__ /* Save floating-point (68881) registers FP0 through FP7. */ asm volatile ("fmovem%.x %/fp0-%/fp7, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0])); diff -durpN glibc-2.2.4/sysdeps/mach/bits/libc-lock.h glibc-2.2.5/sysdeps/mach/bits/libc-lock.h --- glibc-2.2.4/sysdeps/mach/bits/libc-lock.h Sat Aug 4 12:31:53 2001 +++ glibc-2.2.5/sysdeps/mach/bits/libc-lock.h Thu Aug 23 20:21:11 2001 @@ -76,21 +76,21 @@ typedef cthread_key_t __libc_key_t; /* Start a critical region with a cleanup function */ -#define __libc_cleanup_region_start(FCT, ARG) \ +#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ { \ - typeof (***(FCT)) *__save_FCT = FCT; \ + typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \ typeof (ARG) __save_ARG = ARG; \ /* close brace is in __libc_cleanup_region_end below. */ /* End a critical region started with __libc_cleanup_region_start. */ #define __libc_cleanup_region_end(DOIT) \ - if (DOIT) \ + if ((DOIT) && __save_FCT != 0) \ (*__save_FCT)(__save_ARG); \ } /* Sometimes we have to exit the block in the middle. */ #define __libc_cleanup_end(DOIT) \ - if (DOIT) \ + if ((DOIT) && __save_FCT != 0) \ (*__save_FCT)(__save_ARG); \ diff -durpN glibc-2.2.4/sysdeps/mach/hurd/Makefile glibc-2.2.5/sysdeps/mach/hurd/Makefile --- glibc-2.2.4/sysdeps/mach/hurd/Makefile Mon Jul 23 10:55:59 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/Makefile Sun Oct 28 20:38:54 2001 @@ -80,7 +80,7 @@ endef -include $(common-objpfx)errnos.d $(common-objpfx)errnos.d: $(mach-errnos-deps) $(mach-errno-h) | \ - $(CC) $(CPPFLAGS) -M -x c - | \ + $(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \ sed $(sed-remove-objpfx) -e 's,- *:,mach-errnos-deps :=,' \ -e 's, \.\./, $(..),g' > $@t mv -f $@t $@ @@ -182,6 +182,16 @@ link-libc-static := $(link-libc) -Wl,-\( libc mach/libmachuser hurd/libhurduser) \ $(gnulib) -Wl,-\) endif +endif + +ifeq ($(subdir),csu) + +extra-objs += static-start.o + +# We need special startup code for statically linked binaries. +$(objpfx)crt0.o: $(objpfx)static-start.o $(objpfx)abi-note.o $(objpfx)init.o + $(link-relocatable) + endif ifeq (hurd, $(subdir)) diff -durpN glibc-2.2.4/sysdeps/mach/hurd/bind.c glibc-2.2.5/sysdeps/mach/hurd/bind.c --- glibc-2.2.4/sysdeps/mach/hurd/bind.c Mon Jul 23 10:55:59 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/bind.c Mon Dec 10 21:06:49 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 94, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1992,94,95,96,97,98,2001 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,7 +58,6 @@ bind (fd, addrarg, len) if (! err) { - file_t ifsock; /* Set the node's translator to make it a local-domain socket. */ err = __file_set_translator (node, FS_TRANS_EXCL | FS_TRANS_SET, @@ -77,26 +76,27 @@ bind (fd, addrarg, len) if (! err) { /* Get a port to the ifsock translator. */ - ifsock = __file_name_lookup_under (dir, n, 0, 0); + file_t ifsock = __file_name_lookup_under (dir, n, 0, 0); if (ifsock == MACH_PORT_NULL) { err = errno; /* If we failed, get rid of the node we created. */ __dir_unlink (dir, n); } + else + { + /* Get the address port. */ + err = __ifsock_getsockaddr (ifsock, &aport); + if (err == MIG_BAD_ID || err == EOPNOTSUPP) + /* We are not talking to /hurd/ifsock. Probably + someone came in after we linked our node, unlinked + it, and replaced it with a different node, before we + did our lookup. Treat it as if our link had failed + with EEXIST. */ + err = EADDRINUSE; + } + __mach_port_deallocate (__mach_task_self (), ifsock); } - if (! err) - { - /* Get the address port. */ - err = __ifsock_getsockaddr (ifsock, &aport); - if (err == MIG_BAD_ID || err == EOPNOTSUPP) - /* We are not talking to /hurd/ifsock. Probably someone - came in after we linked our node, unlinked it, and - replaced it with a different node, before we did our - lookup. Treat it as if our link had failed with EEXIST. */ - err = EADDRINUSE; - } - __mach_port_deallocate (__mach_task_self (), ifsock); } __mach_port_deallocate (__mach_task_self (), dir); diff -durpN glibc-2.2.4/sysdeps/mach/hurd/bits/fcntl.h glibc-2.2.5/sysdeps/mach/hurd/bits/fcntl.h --- glibc-2.2.4/sysdeps/mach/hurd/bits/fcntl.h Mon Jul 23 10:56:06 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/bits/fcntl.h Wed Aug 22 21:34:41 2001 @@ -65,11 +65,9 @@ returned by `fcntl' with the F_GETFL command. */ #define O_APPEND 0x0100 /* Writes always append to the file. */ -#ifdef __USE_BSD -# define O_ASYNC 0x0200 /* Send SIGIO to owner when data is ready. */ -# define O_FSYNC 0x0400 /* Synchronous writes. */ -# define O_SYNC O_FSYNC -#endif +#define O_ASYNC 0x0200 /* Send SIGIO to owner when data is ready. */ +#define O_FSYNC 0x0400 /* Synchronous writes. */ +#define O_SYNC O_FSYNC #ifdef __USE_GNU # define O_NOATIME 0x0800 /* Don't set access time on read (owner). */ #endif diff -durpN glibc-2.2.4/sysdeps/mach/hurd/bits/libc-lock.h glibc-2.2.5/sysdeps/mach/hurd/bits/libc-lock.h --- glibc-2.2.4/sysdeps/mach/hurd/bits/libc-lock.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/bits/libc-lock.h Thu Aug 23 20:21:28 2001 @@ -0,0 +1,183 @@ +/* libc-internal interface for mutex locks. Hurd version using Mach cthreads. + Copyright (C) 1996,97,98,2000,01 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _BITS_LIBC_LOCK_H +#define _BITS_LIBC_LOCK_H 1 + +#if (_LIBC - 0) || (_CTHREADS_ - 0) +#include +#include + +typedef struct mutex __libc_lock_t; +typedef struct +{ + struct mutex mutex; + void *owner; + int count; +} __libc_lock_recursive_t; + +#define __libc_lock_owner_self() ((void *) __hurd_threadvar_location (0)) + +#else +typedef struct __libc_lock_opaque__ __libc_lock_t; +typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; +#endif + +/* Define a lock variable NAME with storage class CLASS. The lock must be + initialized with __libc_lock_init before it can be used (or define it + with __libc_lock_define_initialized, below). Use `extern' for CLASS to + declare a lock defined in another module. In public structure + definitions you must use a pointer to the lock structure (i.e., NAME + begins with a `*'), because its storage size will not be known outside + of libc. */ +#define __libc_lock_define(CLASS,NAME) \ + CLASS __libc_lock_t NAME; + +/* Define an initialized lock variable NAME with storage class CLASS. */ +#define __libc_lock_define_initialized(CLASS,NAME) \ + CLASS __libc_lock_t NAME = MUTEX_INITIALIZER; + +/* Initialize the named lock variable, leaving it in a consistent, unlocked + state. */ +#define __libc_lock_init(NAME) __mutex_init (&(NAME)) + +/* Finalize the named lock variable, which must be locked. It cannot be + used again until __libc_lock_init is called again on it. This must be + called on a lock variable before the containing storage is reused. */ +#define __libc_lock_fini(NAME) __mutex_unlock (&(NAME)) +#define __libc_lock_fini_recursive(NAME) __mutex_unlock (&(NAME).mutex) + + +/* Lock the named lock variable. */ +#define __libc_lock_lock(NAME) __mutex_lock (&(NAME)) + +/* Lock the named lock variable. */ +#define __libc_lock_trylock(NAME) (!__mutex_trylock (&(NAME))) + +/* Unlock the named lock variable. */ +#define __libc_lock_unlock(NAME) __mutex_unlock (&(NAME)) + + +#define __libc_lock_define_recursive(CLASS,NAME) \ + CLASS __libc_lock_recursive_t NAME; +#define _LIBC_LOCK_RECURSIVE_INITIALIZER { MUTEX_INITIALIZER, 0, 0 } +#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ + CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; + +#define __libc_lock_init_recursive(NAME) \ + ({ __libc_lock_recursive_t *const __lock = &(NAME); \ + __lock->owner = 0; mutex_init (&__lock->mutex); }) + +#define __libc_lock_trylock_recursive(NAME) \ + ({ __libc_lock_recursive_t *const __lock = &(NAME); \ + void *__self = __libc_lock_owner_self (); \ + __mutex_trylock (&__lock->mutex) \ + ? (__lock->owner = __self, __lock->count = 1, 0) \ + : __lock->owner == __self ? (++__lock->count, 0) : 1; }) + +#define __libc_lock_lock_recursive(NAME) \ + ({ __libc_lock_recursive_t *const __lock = &(NAME); \ + void *__self = __libc_lock_owner_self (); \ + if (__mutex_trylock (&__lock->mutex) \ + || (__lock->owner != __self \ + && (__mutex_lock (&__lock->mutex), 1))) \ + __lock->owner = __self, __lock->count = 1; \ + else \ + ++__lock->count; \ + }) +#define __libc_lock_unlock_recursive(NAME) \ + ({ __libc_lock_recursive_t *const __lock = &(NAME); \ + if (--__lock->count == 0) \ + { \ + __lock->owner = 0; \ + __mutex_unlock (&__lock->mutex); \ + } \ + }) + + +/* XXX for now */ +#define __libc_rwlock_define __libc_lock_define +#define __libc_rwlock_define_initialized __libc_lock_define_initialized +#define __libc_rwlock_init __libc_lock_init +#define __libc_rwlock_fini __libc_lock_fini +#define __libc_rwlock_rdlock __libc_lock_lock +#define __libc_rwlock_wrlock __libc_lock_lock +#define __libc_rwlock_tryrdlock __libc_lock_trylock +#define __libc_rwlock_trywrlock __libc_lock_trylock +#define __libc_rwlock_unlock __libc_lock_unlock + + +/* Start a critical region with a cleanup function */ +#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ +{ \ + typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0; \ + typeof (ARG) __save_ARG = ARG; \ + /* close brace is in __libc_cleanup_region_end below. */ + +/* End a critical region started with __libc_cleanup_region_start. */ +#define __libc_cleanup_region_end(DOIT) \ + if ((DOIT) && __save_FCT != 0) \ + (*__save_FCT)(__save_ARG); \ +} + +/* Sometimes we have to exit the block in the middle. */ +#define __libc_cleanup_end(DOIT) \ + if ((DOIT) && __save_FCT != 0) \ + (*__save_FCT)(__save_ARG); \ + + +#if (_CTHREADS_ - 0) + +/* Use mutexes as once control variables. */ + +struct __libc_once + { + __libc_lock_t lock; + int done; + }; + +#define __libc_once_define(CLASS,NAME) \ + CLASS struct __libc_once NAME = { MUTEX_INITIALIZER, 0 } + +/* Call handler iff the first call. */ +#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ + do { \ + __libc_lock_lock (ONCE_CONTROL.lock); \ + if (!ONCE_CONTROL.done) \ + (INIT_FUNCTION) (); \ + ONCE_CONTROL.done = 1; \ + __libc_lock_unlock (ONCE_CONTROL.lock); \ + } while (0) + +#ifdef _LIBC +/* We need portable names for some functions. E.g., when they are + used as argument to __libc_cleanup_region_start. */ +#define __libc_mutex_unlock __mutex_unlock +#endif + +/* Type for key of thread specific data. */ +typedef cthread_key_t __libc_key_t; + +#define __libc_key_create(KEY,DEST) cthread_keycreate (KEY) +#define __libc_setspecific(KEY,VAL) cthread_setspecific (KEY, VAL) +void *__libc_getspecific (__libc_key_t key); + +#endif /* _CTHREADS_ */ + +#endif /* bits/libc-lock.h */ diff -durpN glibc-2.2.4/sysdeps/mach/hurd/bits/stdio-lock.h glibc-2.2.5/sysdeps/mach/hurd/bits/stdio-lock.h --- glibc-2.2.4/sysdeps/mach/hurd/bits/stdio-lock.h Fri Jul 27 23:13:26 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/bits/stdio-lock.h Wed Dec 31 16:00:00 1969 @@ -1,65 +0,0 @@ -/* Thread package specific definitions of stream lock type. Hurd version. - Copyright (C) 2000, 2001 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _BITS_STDIO_LOCK_H -#define _BITS_STDIO_LOCK_H 1 - -/* We need recursive (counting) mutexes. Since cthreads doesn't really - have them, we implement them just for libio. The implementation is - partially here and partially in Hurd's version of cthreads (i.e. the - libthreads library, libthreads/lockfile.c). */ - -#if (_LIBC - 0) || (_CTHREADS_ - 0) -#include - -struct _IO_cthreads_lock -{ - struct mutex mutex; - cthread_t owner; - unsigned int count; -}; -#else -struct _IO_cthreads_lock; -#endif -typedef struct _IO_cthreads_lock _IO_lock_t; - -#define _IO_lock_initializer { MUTEX_INITIALIZER, 0, 0 } - -#define _IO_lock_init(_name) ({ (_name) = (_IO_lock_t) _IO_lock_initializer; }) -#define _IO_lock_fini(_name) ((void) 0) /* nothing to do */ - -/* These are in fact only used for `list_all_lock' (libio/genops.c), - which does not need a recursive lock. The per-FILE locks are only - accessed through _IO_flockfile et al, which Hurd's libthreads overrides. */ -#define _IO_lock_lock(_name) __libc_lock_lock ((_name).mutex) -#define _IO_lock_unlock(_name) __libc_lock_unlock ((_name).mutex) - -#ifdef _LIBC -#include - -#define _IO_cleanup_region_start(_fct, _fp) \ - __libc_cleanup_region_start (_fct, _fp) -#define _IO_cleanup_region_start_noarg(_fct) \ - __libc_cleanup_region_start (_fct, NULL) -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#endif - - -#endif /* bits/stdio-lock.h */ diff -durpN glibc-2.2.4/sysdeps/mach/hurd/configure glibc-2.2.5/sysdeps/mach/hurd/configure --- glibc-2.2.4/sysdeps/mach/hurd/configure Fri Jul 27 23:16:53 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/configure Tue Jan 8 14:16:44 2002 @@ -9,3 +9,18 @@ inhibit_glue=yes if test "x$prefix" != x; then echo "configure: warning: --prefix= (empty) is required for GNU/Hurd to work normally" 1>&2 fi + +case "$machine" in + i386*) + # With --enable-libio, the default oldest ABI is 2.5.5; + # without --enable-libio, the default oldest ABI is 2.0. + # We only need a "yes" here if the oldest ABI supported will be < 2.2.5. + if if test "$stdio" = libio; then + test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.5" + else + test "$oldest_abi" = default || test "$oldest_abi" \< "2.2.5" + fi; then + libc_cv_gcc_unwind_find_fde=yes + fi + ;; +esac diff -durpN glibc-2.2.4/sysdeps/mach/hurd/configure.in glibc-2.2.5/sysdeps/mach/hurd/configure.in --- glibc-2.2.4/sysdeps/mach/hurd/configure.in Mon Mar 26 20:53:28 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/configure.in Mon Dec 10 20:29:56 2001 @@ -11,3 +11,18 @@ inhibit_glue=yes if test "x$prefix" != x; then AC_MSG_WARN([--prefix= (empty) is required for GNU/Hurd to work normally]) fi + +case "$machine" in + i386*) + # With --enable-libio, the default oldest ABI is 2.5.5; + # without --enable-libio, the default oldest ABI is 2.0. + # We only need a "yes" here if the oldest ABI supported will be < 2.2.5. + if if test "$stdio" = libio; then + test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.5" + else + test "$oldest_abi" = default || test "$oldest_abi" \< "2.2.5" + fi; then + libc_cv_gcc_unwind_find_fde=yes + fi + ;; +esac diff -durpN glibc-2.2.4/sysdeps/mach/hurd/dl-sysdep.c glibc-2.2.5/sysdeps/mach/hurd/dl-sysdep.c --- glibc-2.2.4/sysdeps/mach/hurd/dl-sysdep.c Mon Jul 23 10:56:00 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/dl-sysdep.c Sat Sep 8 10:16:44 2001 @@ -615,7 +615,7 @@ _dl_important_hwcaps (const char *platfo /* Return an empty array. Hurd has no hardware capabilities. */ result = (struct r_strlenpair *) malloc (sizeof (*result)); if (result == NULL) - _dl_signal_error (ENOMEM, NULL, "cannot create capability list"); + _dl_signal_error (ENOMEM, NULL, NULL, "cannot create capability list"); result[0].str = (char *) result; /* Does not really matter. */ result[0].len = 0; diff -durpN glibc-2.2.4/sysdeps/mach/hurd/i386/Makefile glibc-2.2.5/sysdeps/mach/hurd/i386/Makefile --- glibc-2.2.4/sysdeps/mach/hurd/i386/Makefile Mon Jul 23 10:56:08 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/i386/Makefile Thu Nov 15 17:21:39 2001 @@ -1,9 +1,7 @@ -ifeq ($(subdir),csu) - -extra-objs += static-start.o - -# We need special startup code for statically linked binaries. -$(objpfx)crt0.o: $(objpfx)static-start.o $(objpfx)abi-note.o $(objpfx)init.o - $(link-relocatable) - +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif endif diff -durpN glibc-2.2.4/sysdeps/mach/hurd/i386/Versions glibc-2.2.5/sysdeps/mach/hurd/i386/Versions --- glibc-2.2.4/sysdeps/mach/hurd/i386/Versions Thu Jun 15 01:09:05 2000 +++ glibc-2.2.5/sysdeps/mach/hurd/i386/Versions Thu Nov 15 17:22:31 2001 @@ -2,7 +2,6 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } } diff -durpN glibc-2.2.4/sysdeps/mach/hurd/i386/init-first.c glibc-2.2.5/sysdeps/mach/hurd/i386/init-first.c --- glibc-2.2.4/sysdeps/mach/hurd/i386/init-first.c Sat Aug 11 18:28:51 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/i386/init-first.c Tue Jan 8 11:54:56 2002 @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For i386/Hurd. - Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1995,96,97,98,99,2000,2001,02 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 @@ -132,12 +132,20 @@ init (int *data) struct hurd_startup_data *d; unsigned long int threadvars[_HURD_THREADVAR_MAX]; - /* Provide temporary storage for thread-specific variables on the startup - stack so the cthreads initialization code can use them for malloc et al, - or so we can use malloc below for the real threadvars array. */ + /* Provide temporary storage for thread-specific variables on the + startup stack so the cthreads initialization code can use them + for malloc et al, or so we can use malloc below for the real + threadvars array. */ memset (threadvars, 0, sizeof threadvars); __hurd_threadvar_stack_offset = (unsigned long int) threadvars; + /* Since the cthreads initialization code uses malloc, and the + malloc initialization code needs to get at the environment, make + sure we can find it. We'll need to do this again later on since + switching stacks changes the location where the environment is + stored. */ + __environ = envp; + while (*envp) ++envp; d = (void *) ++envp; @@ -239,22 +247,18 @@ init (int *data) we will run on, and jmp to the run-time address of `init1'; when it returns, it will run the user code with the argument data at the top of the stack. */ -asm (" - switch_stacks: - movl %eax, %esp - jmp *%ecx -"); +asm ("switch_stacks:\n" + " movl %eax, %esp\n" + " jmp *%ecx"); /* As in the stack-switching case, at this point our stack is unwound and callers' registers restored, and only %ecx and %eax communicate values from the lines above. In this case we have stashed in %eax the user code return address. Push it on the top of the stack so it acts as init1's return address, and then jump there. */ -asm (" - call_init1: - push %eax - jmp *%ecx -"); +asm ("call_init1:\n" + " push %eax\n" + " jmp *%ecx\n"); /* Do the first essential initializations that must precede all else. */ @@ -305,14 +309,14 @@ strong_alias (posixland_init, __libc_ini This poorly-named function is called by static-start.S, which should not exist at all. */ void -_hurd_stack_setup (int argc __attribute__ ((unused)), ...) +_hurd_stack_setup (volatile int argc, ...) { void doinit (int *data) { /* This function gets called with the argument data at TOS. */ - void doinit1 (int argc, ...) + void doinit1 (volatile int argc, ...) { - init (&argc); + init ((int *) &argc); } /* Push the user return address after the argument data, and then diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/Dist glibc-2.2.5/sysdeps/mach/hurd/powerpc/Dist --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/Dist Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/Dist Fri Nov 9 16:37:47 2001 @@ -0,0 +1 @@ +static-start.S diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/bits/sigcontext.h glibc-2.2.5/sysdeps/mach/hurd/powerpc/bits/sigcontext.h --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/bits/sigcontext.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/bits/sigcontext.h Fri Nov 9 16:37:48 2001 @@ -0,0 +1,76 @@ +/* Machine-dependent signal context structure for GNU Hurd. PowerPC version. + Copyright (C) 1991, 1992, 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 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 _SIGNAL_H +# error "Never use directly; include instead." +#endif + +/* Signal handlers are actually called: + void handler (int sig, int code, struct sigcontext *scp); */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + /* These first members are machine-independent. */ + + int sc_onstack; /* Nonzero if running on sigstack. */ + __sigset_t sc_mask; /* Blocked signals to restore. */ + + /* MiG reply port this thread is using. */ + unsigned int sc_reply_port; + + /* Port this thread is doing an interruptible RPC on. */ + unsigned int sc_intr_port; + + /* Error code associated with this signal (interpreted as `error_t'). */ + int sc_error; + + /* All following members are machine-dependent. The rest of this + structure is written to be laid out identically to: + { + struct ppc_thread_state basic; + struct ppc_exc_state exc; + struct ppc_float_state fpu; + } + trampoline.c knows this, so it must be changed if this changes. */ + +#define sc_ppc_thread_state sc_srr0 /* Beginning of correspondence. */ +#define sc_pc sc_srr0 /* For sysdeps/generic/profil-counter.h. */ + unsigned int sc_srr0; + unsigned int sc_srr1; + unsigned int sc_gprs[32]; + unsigned int sc_cr; + unsigned int sc_xer; + unsigned int sc_lr; + unsigned int sc_ctr; + unsigned int sc_mq; + unsigned int sc_ts_pad; + +#define sc_ppc_exc_state sc_dar + unsigned int sc_dar; + unsigned int sc_dsisr; + unsigned int sc_exception; + unsigned int sc_es_pad0; + unsigned int sc_es_pad1[4]; + +#define sc_ppc_float_state sc_fprs[0] + double sc_fprs[32]; + unsigned int sc_fpscr_pad; + unsigned int sc_fpscr; + }; diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/exc2signal.c glibc-2.2.5/sysdeps/mach/hurd/powerpc/exc2signal.c --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/exc2signal.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/exc2signal.c Fri Nov 9 16:37:47 2001 @@ -0,0 +1,74 @@ +/* Translate Mach exception codes into signal numbers. PowerPC version. + Copyright (C) 1991,92,94,96,97,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Translate the Mach exception codes, as received in an `exception_raise' RPC, + into a signal number and signal subcode. */ + +void +_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) +{ + detail->error = 0; + + switch (detail->exc) + { + default: + *signo = SIGIOT; + detail->code = detail->exc; + break; + + case EXC_BAD_ACCESS: + if (detail->exc_code == KERN_PROTECTION_FAILURE) + *signo = SIGSEGV; + else + *signo = SIGBUS; + detail->code = detail->exc_subcode; + detail->error = detail->exc_code; + break; + + /* XXX there has got to be something more here */ + + case EXC_BAD_INSTRUCTION: + *signo = SIGILL; + detail->code = 0; + break; + + case EXC_ARITHMETIC: + *signo = SIGFPE; + detail->code = 0; + break; + + case EXC_EMULATION: + *signo = SIGEMT; + detail->code = 0; + break; + + case EXC_SOFTWARE: + *signo = SIGEMT; + detail->code = 0; + break; + + case EXC_BREAKPOINT: + *signo = SIGTRAP; + detail->code = 0; + } +} diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/init-first.c glibc-2.2.5/sysdeps/mach/hurd/powerpc/init-first.c --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/init-first.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/init-first.c Fri Nov 9 16:37:47 2001 @@ -0,0 +1,333 @@ +/* Initialization code run first thing by the ELF startup code. PowerPC/Hurd. + Copyright (C) 1995,96,97,98,99,2000,01 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include "hurdstartup.h" +#include "hurdmalloc.h" /* XXX */ + +extern void __mach_init (void); +extern void __libc_init (int, char **, char **); +#ifdef USE_NONOPTION_FLAGS +extern void __getopt_clean_environment (char **); +#endif +extern void __libc_global_ctors (void); + +unsigned int __hurd_threadvar_max; +unsigned long int __hurd_threadvar_stack_offset; +unsigned long int __hurd_threadvar_stack_mask; + +#ifndef SHARED +int __libc_enable_secure; +#endif +int __libc_multiple_libcs = 1; + +extern int __libc_argc; +extern char **__libc_argv; +extern char **_dl_argv; + +void *(*_cthread_init_routine) (void); /* Returns new SP to use. */ +void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__)); + +#ifndef SHARED +static unsigned int return_address; /* Make init1 return to _start. */ +#endif + +/* Things that want to be run before _hurd_init or much anything else. + Importantly, these are called before anything tries to use malloc. */ +DEFINE_HOOK (_hurd_preinit_hook, (void)); + + +/* We call this once the Hurd magic is all set up and we are ready to be a + Posixoid program. This does the same things the generic version does. */ +static void internal_function +posixland_init (int argc, char **argv, char **envp) +{ + asm ("li 3,0xbb; .long 0"); + __libc_argc = argc; + __libc_argv = argv; + __environ = envp; + + __libc_init (argc, argv, envp); + +#ifdef USE_NONOPTION_FLAGS + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (__environ); +#endif + +#ifdef SHARED + __libc_global_ctors (); +#endif +} + + +static void +init1 (int *data) +{ + int argc = *data; + char **argv = (char **) &data[1]; + char **envp = &argv[argc + 1]; + struct hurd_startup_data *d; + + while (*envp) + ++envp; + d = (void *) ++envp; + + /* If we are the bootstrap task started by the kernel, + then after the environment pointers there is no Hurd + data block; the argument strings start there. */ + /* OSF Mach starts the bootstrap task with argc == 0. + XXX This fails if a non-bootstrap task gets started + with argc == 0. */ + if (argc && (void *) d != argv[0]) + { + _hurd_init_dtable = d->dtable; + _hurd_init_dtablesize = d->dtablesize; + +#if 0 /* We can't free the old stack because it contains the argument strings. */ + { + /* Check if the stack we are now on is different from + the one described by _hurd_stack_{base,size}. */ + + char dummy; + const vm_address_t newsp = (vm_address_t) &dummy; + + if (d->stack_size != 0 && (newsp < d->stack_base || + newsp - d->stack_base > d->stack_size)) + /* The new stack pointer does not intersect with the + stack the exec server set up for us, so free that stack. */ + __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size); + } +#endif + } + + if (argc && (void *) d != argv[0] && (d->portarray || d->intarray)) + /* Initialize library data structures, start signal processing, etc. */ + _hurd_init (d->flags, argv, + d->portarray, d->portarraysize, + d->intarray, d->intarraysize); + +#ifndef SHARED + __libc_enable_secure = d->flags & EXEC_SECURE; +#endif +} + + +static inline void +init (int *data) +{ + int argc = *data; + char **argv = (void *) (data + 1); + char **envp = &argv[argc + 1]; + struct hurd_startup_data *d; + unsigned long int threadvars[_HURD_THREADVAR_MAX]; + + /* Provide temporary storage for thread-specific variables on the startup + stack so the cthreads initialization code can use them for malloc et al, + or so we can use malloc below for the real threadvars array. */ + memset (threadvars, 0, sizeof threadvars); + __hurd_threadvar_stack_offset = (unsigned long int) threadvars; + + while (*envp) + ++envp; + d = (void *) ++envp; + + /* The user might have defined a value for this, to get more variables. + Otherwise it will be zero on startup. We must make sure it is set + properly before before cthreads initialization, so cthreads can know + how much space to leave for thread variables. */ + if (__hurd_threadvar_max < _HURD_THREADVAR_MAX) + __hurd_threadvar_max = _HURD_THREADVAR_MAX; + + + /* After possibly switching stacks, call `init1' (above) with the user + code as the return address, and the argument data immediately above + that on the stack. */ + + if (_cthread_init_routine) + { + /* Initialize cthreads, which will allocate us a new stack to run on. */ + void *newsp = (*_cthread_init_routine) (); + struct hurd_startup_data *od; +#ifdef SHARED + void *oldsp; + unsigned int i, data_offset; +#endif + + /* Copy per-thread variables from that temporary + area onto the new cthread stack. */ + memcpy (__hurd_threadvar_location_from_sp (0, newsp), + threadvars, sizeof threadvars); + + /* Copy the argdata from the old stack to the new one. */ + newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data, + (char *) d - (char *) data); + +#ifdef SHARED + /* And readjust the dynamic linker's idea of where the argument + vector lives. */ + assert (_dl_argv == argv); + _dl_argv = (void *) ((int *) newsp + 1); +#endif + + /* Set up the Hurd startup data block immediately following + the argument and environment pointers on the new stack. */ + od = (newsp + ((char *) d - (char *) data)); + if (!argc || (void *) argv[0] == d) + /* We were started up by the kernel with arguments on the stack. + There is no Hurd startup data, so zero the block. */ + memset (od, 0, sizeof *od); + else + /* Copy the Hurd startup data block to the new stack. */ + *od = *d; + +#ifndef SHARED + asm ("mtlr %0; mr 1,%1; li 0,0; mr 3,%1; stwu 0,-16(1); b init1" + : : "r" (return_address), "r" (newsp)); + (void) init1; /* To avoid `defined but not used' warning. */ + /* NOTREACHED */ +#else + /* Copy the rest of the stack. Don't call a function to do that, + because that will alter the current stack. */ + asm ("mr %0,1" : "=r" (oldsp)); + data_offset = (unsigned int) data - (unsigned int) oldsp; + newsp -= data_offset; + for (i = 0; i < data_offset / 4; i++) + ((unsigned int *)newsp)[i] = ((unsigned int *)oldsp)[i]; + + /* Relocate stack frames. */ + { + unsigned int *oldframe0 = (unsigned int *)oldsp; + unsigned int *oldframe1 = *(unsigned int **)oldframe0; + unsigned int *oldframe2 = *(unsigned int **)oldframe1; + unsigned int *newframe0 = (unsigned int *)newsp; + unsigned int *newframe1 = newframe0 + (unsigned int)(oldframe1 - oldframe0); + unsigned int *newframe2 = newframe1 + (unsigned int)(oldframe2 - oldframe1); + *(unsigned int **)newframe0 = newframe1; + *(unsigned int **)newframe1 = newframe2; + } + + asm ("mr 1,%0; mr 31,%0" : : "r" (newsp)); /* XXX */ + init1 (newsp + data_offset); +#endif + } + else + { + /* We are not using cthreads, so we will have just a single allocated + area for the per-thread variables of the main user thread. */ + unsigned long int *array; + unsigned int i; + + array = malloc (__hurd_threadvar_max * sizeof (unsigned long int)); + if (array == NULL) + __libc_fatal ("Can't allocate single-threaded thread variables."); + + /* Copy per-thread variables from the temporary array into the + newly malloc'd space. */ + memcpy (array, threadvars, sizeof threadvars); + __hurd_threadvar_stack_offset = (unsigned long int) array; + for (i = _HURD_THREADVAR_MAX; i < __hurd_threadvar_max; ++i) + array[i] = 0; + +#ifndef SHARED + asm ("mr 3,%0; mtlr %1; addi 1,3,-16; b init1" + : : "r" (data), "r" (return_address)); + /* NOTREACHED */ +#else + init1 (data); +#endif + } +} + + +/* Do the first essential initializations that must precede all else. */ +static inline void +first_init (void) +{ + /* Initialize data structures so we can do RPCs. */ + __mach_init (); + + RUN_HOOK (_hurd_preinit_hook, ()); +} + +#ifdef SHARED +/* This function is called specially by the dynamic linker to do early + initialization of the shared C library before normal initializers + expecting a Posixoid environment can run. It gets called with the + stack set up just as the user will see it, so it can switch stacks. */ + +void +_dl_init_first (int argc, ...) +{ + asm ("li 3,0xaa; .long 0"); + first_init (); + + init (&argc); +} +#endif + + +#ifdef SHARED +/* The regular posixland initialization is what goes into libc's + normal initializer. */ +/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT + pointer in the dynamic section based solely on that. It is convention + for this function to be in the `.init' section, but the symbol name is + the only thing that really matters!! */ +strong_alias (posixland_init, _init); + + +void +__libc_init_first (int argc, char **argv, char **envp) +{ + /* Everything was done in the shared library initializer, _init. */ +} +#else +strong_alias (posixland_init, __libc_init_first); + + +void +_hurd_stack_setup (int *data) +{ + register unsigned int address; + asm ("mflr %0" : "=r" (address)); + return_address = address; + + first_init (); + + _hurd_startup ((void **) data, &init); +} +#endif + + +/* This function is defined here so that if this file ever gets into + ld.so we will get a link error. Having this file silently included + in ld.so causes disaster, because the _init definition above will + cause ld.so to gain an init function, which is not a cool thing. */ + +void +_dl_start (void) +{ + abort (); +} diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/intr-msg.h glibc-2.2.5/sysdeps/mach/hurd/powerpc/intr-msg.h --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/intr-msg.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/intr-msg.h Fri Nov 9 16:37:47 2001 @@ -0,0 +1,99 @@ +/* Machine-dependent details of interruptible RPC messaging. PowerPC version. + Copyright (C) 1995,96,97,99,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \ +({ \ + error_t err; \ + asm (".globl _hurd_intr_rpc_msg_do_trap\n" \ + ".globl _hurd_intr_rpc_msg_in_trap\n" \ + " mr 3, %1\n" \ + " mr 4, %2\n" \ + " mr 5, %3\n" \ + " mr 6, %4\n" \ + " mr 7, %5\n" \ + " mr 8, %6\n" \ + " mr 9, %7\n" \ + " li 0, -25\n" \ + "_hurd_intr_rpc_msg_do_trap: sc\n" \ + "_hurd_intr_rpc_msg_in_trap: mr 3, %0\n" \ + : "=r" (err) \ + : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \ + "r" (rcv_name), "r" (timeout), "r" (notify) \ + : "0", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"); \ + err; \ +}) + +static void inline +INTR_MSG_BACK_OUT (struct ppc_thread_state *state) +{ + return; +} + +#include "hurdfault.h" + +/* This cannot be an inline function because it calls setjmp. */ +#define SYSCALL_EXAMINE(state, callno) \ +({ \ + u_int32_t *p = (void *) ((state)->srr0 - 4); \ + int result; \ + _hurdsig_catch_memory_fault (p) ? 0 : \ + ({ \ + if (result = (*p == 0x44000002)) \ + /* The PC is just after an `sc' instruction. \ + This is a system call in progress; %r0 holds the call number. */ \ + *(callno) = (state)->r0; \ + _hurdsig_end_catch_fault (); \ + result; \ + }); \ +}) + +struct mach_msg_trap_args + { + /* This is the order of arguments to mach_msg_trap. */ + mach_msg_header_t *msg; + mach_msg_option_t option; + mach_msg_size_t send_size; + mach_msg_size_t rcv_size; + mach_port_t rcv_name; + mach_msg_timeout_t timeout; + mach_port_t notify; + }; + +/* This cannot be an inline function because it calls setjmp. */ +#define MSG_EXAMINE(state, msgid, rcv_name, send_name, option, timeout) \ +({ \ + mach_msg_header_t *msg = (mach_msg_header_t *) (state)->r3; \ + *(option) = (mach_msg_option_t) (state)->r4; \ + *(rcv_name) = (mach_port_t) (state)->r7; \ + *(timeout) = (mach_msg_timeout_t) (state)->r8; \ + (msg == 0) ? \ + ({ \ + *(send_name) = MACH_PORT_NULL; \ + *(msgid) = 0; \ + 0; \ + }) : \ + (_hurdsig_catch_memory_fault (msg) ? -1 : \ + ({ \ + *(send_name) = msg->msgh_remote_port; \ + *(msgid) = msg->msgh_id; \ + _hurdsig_end_catch_fault (); \ + 0; \ + }) \ + ); \ +}) \ diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/longjmp-ts.c glibc-2.2.5/sysdeps/mach/hurd/powerpc/longjmp-ts.c --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/longjmp-ts.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/longjmp-ts.c Fri Nov 9 16:37:47 2001 @@ -0,0 +1,56 @@ +/* Perform a `longjmp' on a Mach thread_state. PowerPC version. + Copyright (C) 1991,94,95,97,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */ + +void +_hurd_longjmp_thread_state (void *state, jmp_buf env, int val) +{ + struct ppc_thread_state *ts = state; + + /* XXX should we set up the FPRs as well? And how? */ + ts->r1 = env[0].__jmpbuf[JB_GPR1]; + ts->r2 = env[0].__jmpbuf[JB_GPR2]; + ts->r14 = env[0].__jmpbuf[JB_GPRS+0]; + ts->r15 = env[0].__jmpbuf[JB_GPRS+1]; + ts->r16 = env[0].__jmpbuf[JB_GPRS+2]; + ts->r17 = env[0].__jmpbuf[JB_GPRS+3]; + ts->r18 = env[0].__jmpbuf[JB_GPRS+4]; + ts->r19 = env[0].__jmpbuf[JB_GPRS+5]; + ts->r20 = env[0].__jmpbuf[JB_GPRS+6]; + ts->r21 = env[0].__jmpbuf[JB_GPRS+7]; + ts->r22 = env[0].__jmpbuf[JB_GPRS+8]; + ts->r23 = env[0].__jmpbuf[JB_GPRS+9]; + ts->r24 = env[0].__jmpbuf[JB_GPRS+10]; + ts->r25 = env[0].__jmpbuf[JB_GPRS+11]; + ts->r26 = env[0].__jmpbuf[JB_GPRS+12]; + ts->r27 = env[0].__jmpbuf[JB_GPRS+13]; + ts->r28 = env[0].__jmpbuf[JB_GPRS+14]; + ts->r29 = env[0].__jmpbuf[JB_GPRS+15]; + ts->r30 = env[0].__jmpbuf[JB_GPRS+16]; + ts->r31 = env[0].__jmpbuf[JB_GPRS+17]; + ts->cr = env[0].__jmpbuf[JB_CR]; + ts->r3 = val ?: 1; + ts->srr0 = ts->lr = env[0].__jmpbuf[JB_LR]; +} diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/register-dump.h glibc-2.2.5/sysdeps/mach/hurd/powerpc/register-dump.h --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/register-dump.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/register-dump.h Fri Nov 9 16:37:47 2001 @@ -0,0 +1,120 @@ +/* Dump registers. PowerPC/Hurd version. + Copyright (C) 1998, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +/* This prints out the information in the following form: */ +static const char dumpform[] = "\ +Register dump:\n\ +fp0-3: 0000030%0000031% 0000032%0000033% 0000034%0000035% 0000036%0000037%\n\ +fp4-7: 0000038%0000039% 000003a%000003b% 000003c%000003d% 000003e%000003f%\n\ +fp8-11: 0000040%0000041% 0000042%0000043% 0000044%0000045% 0000046%0000047%\n\ +fp12-15: 0000048%0000049% 000004a%000004b% 000004c%000004d% 000004e%000004f%\n\ +fp16-19: 0000050%0000051% 0000052%0000053% 0000054%0000055% 0000056%0000057%\n\ +fp20-23: 0000058%0000059% 000005a%000005b% 000005c%000005d% 000005e%000005f%\n\ +fp24-27: 0000060%0000061% 0000062%0000063% 0000064%0000065% 0000066%0000067%\n\ +fp28-31: 0000068%0000069% 000006a%000006b% 000006c%000006d% 000006e%000006f%\n\ +r0 =0000002% sp =0000003% r2 =0000004% r3 =0000005%\n\ +r4 =0000006% r5 =0000007% r6 =0000008% r7 =0000009% sr0=0000000% sr1=0000001%\n\ +r8 =000000a% r9 =000000b% r10=000000c% r11=000000d% cr=0000022% xer=0000023%\n\ +r12=000000e% r13=000000f% r14=0000010% r15=0000011% lr=0000024% ctr=0000025%\n\ +r16=0000012% r17=0000013% r18=0000014% r19=0000015% mq=0000026% fcr=0000071%\n\ +r20=0000016% r21=0000017% r22=0000018% r23=0000019% dar=0000028% dsi=0000029%\n\ +r24=000001a% r25=000001b% r26=000001c% r27=000001d% exc=000002a%\n\ +r28=000001e% r29=000001f% r30=0000020% r31=0000021%\n\ +"; + +/* Most of the fields are self-explanatory. 'sr0' is the next + instruction to execute, from SRR0, which may have some relationship + with the instruction that caused the exception. 'r3*' is the value + that will be returned in register 3 when the current system call + returns. 'sr1' is SRR1, bits 16-31 of which are copied from the MSR: + + 16 - External interrupt enable + 17 - Privilege level (1=user, 0=supervisor) + 18 - FP available + 19 - Machine check enable (if clear, processor locks up on machine check) + 20 - FP exception mode bit 0 (FP exceptions recoverable) + 21 - Single-step trace enable + 22 - Branch trace enable + 23 - FP exception mode bit 1 + 25 - exception prefix (if set, exceptions are taken from 0xFFFnnnnn, + otherwise from 0x000nnnnn). + 26 - Instruction address translation enabled. + 27 - Data address translation enabled. + 30 - Exception is recoverable (otherwise, don't try to return). + 31 - Little-endian mode enable. + + 'Trap' is the address of the exception: + + 00200 - Machine check exception (memory parity error, for instance) + 00300 - Data access exception (memory not mapped, see dsisr for why) + 00400 - Instruction access exception (memory not mapped) + 00500 - External interrupt + 00600 - Alignment exception (see dsisr for more information) + 00700 - Program exception (illegal/trap instruction, FP exception) + 00800 - FP unavailable (should not be seen by user code) + 00900 - Decrementer exception (for instance, SIGALRM) + 00A00 - I/O controller interface exception + 00C00 - System call exception (for instance, kill(3)). + 00E00 - FP assist exception (optional FP instructions, etc.) + + 'dar' is the memory location, for traps 00300, 00400, 00600, 00A00. + 'dsisr' has the following bits under trap 00300: + 0 - direct-store error exception + 1 - no page table entry for page + 4 - memory access not permitted + 5 - trying to access I/O controller space or using lwarx/stwcx on + non-write-cached memory + 6 - access was store + 9 - data access breakpoint hit + 10 - segment table search failed to find translation (64-bit ppcs only) + 11 - I/O controller instruction not permitted + For trap 00400, the same bits are set in SRR1 instead. + For trap 00600, bits 12-31 of the DSISR set to allow emulation of + the instruction without actually having to read it from memory. +*/ + +#define xtoi(x) (x >= 'a' ? x + 10 - 'a' : x - '0') + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char buffer[sizeof(dumpform)]; + char *bufferpos; + unsigned regno; + unsigned *regs = (unsigned *)(&ctx->sc_srr0); + + memcpy(buffer, dumpform, sizeof(dumpform)); + + /* Generate the output. */ + while ((bufferpos = memchr (buffer, '%', sizeof(dumpform)))) + { + regno = xtoi (bufferpos[-1]) | xtoi (bufferpos[-2]) << 4; + memset (bufferpos-2, '0', 3); + _itoa_word (regs[regno], bufferpos+1, 16, 0); + } + + /* Write the output. */ + write (fd, buffer, sizeof(buffer)); +} + +#define REGISTER_DUMP \ + register_dump (fd, ctx) diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/sigreturn.c glibc-2.2.5/sysdeps/mach/hurd/powerpc/sigreturn.c --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/sigreturn.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/sigreturn.c Fri Nov 9 16:37:47 2001 @@ -0,0 +1,186 @@ +/* Return from signal handler for Hurd. PowerPC version. + Copyright (C) 1996,97,98,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +int +__sigreturn (struct sigcontext *scp) +{ + struct hurd_sigstate *ss; + mach_port_t *reply_port; + + if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK)) + { + errno = EINVAL; + return -1; + } + + ss = _hurd_self_sigstate (); + __spin_lock (&ss->lock); + + /* Restore the set of blocked signals, and the intr_port slot. */ + ss->blocked = scp->sc_mask; + ss->intr_port = scp->sc_intr_port; + + /* Check for pending signals that were blocked by the old set. */ + if (ss->pending & ~ss->blocked) + { + /* There are pending signals that just became unblocked. Wake up the + signal thread to deliver them. But first, squirrel away SCP where + the signal thread will notice it if it runs another handler, and + arrange to have us called over again in the new reality. */ + ss->context = scp; + __spin_unlock (&ss->lock); + __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); + /* If a pending signal was handled, sig_post never returned. */ + __spin_lock (&ss->lock); + ss->context = NULL; + } + + if (scp->sc_onstack) + { + ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */ + /* XXX cannot unlock until off sigstack */ + abort (); + } + else + __spin_unlock (&ss->lock); + + /* Destroy the MiG reply port used by the signal handler, and restore the + reply port in use by the thread when interrupted. */ + reply_port = + (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY); + if (*reply_port) + { + mach_port_t port = *reply_port; + + /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to + get another reply port, but avoids mig_dealloc_reply_port trying to + deallocate it after the receive fails (which it will, because the + reply port will be bogus, whether we do this or not). */ + *reply_port = MACH_PORT_DEAD; + + __mach_port_destroy (__mach_task_self (), port); + } + *reply_port = scp->sc_reply_port; + + /* Restore FPU state. */ +#define restore_fpr(n) \ + asm volatile ("lfd " #n ",%0(31)" : : "i" (n * 4)) + + asm volatile ("mr 31,%0" : : "r" (scp->sc_fprs)); + + /* Restore the floating-point control/status register. */ + asm volatile ("lfd 0,256(31)"); + asm volatile ("mtfsf 0xff,0"); + + /* Restore floating-point registers. */ + restore_fpr (0); + restore_fpr (1); + restore_fpr (2); + restore_fpr (3); + restore_fpr (4); + restore_fpr (5); + restore_fpr (6); + restore_fpr (7); + restore_fpr (8); + restore_fpr (9); + restore_fpr (10); + restore_fpr (11); + restore_fpr (12); + restore_fpr (13); + restore_fpr (14); + restore_fpr (15); + restore_fpr (16); + restore_fpr (17); + restore_fpr (18); + restore_fpr (19); + restore_fpr (20); + restore_fpr (21); + restore_fpr (22); + restore_fpr (23); + restore_fpr (24); + restore_fpr (25); + restore_fpr (26); + restore_fpr (27); + restore_fpr (28); + restore_fpr (29); + restore_fpr (30); + restore_fpr (31); + + /* Load all the registers from the sigcontext. */ +#define restore_gpr(n) \ + asm volatile ("lwz " #n ",%0(31)" : : "i" (n * 4)) + + asm volatile ("addi 31,31,-188"); /* r31 = scp->gprs */ + + /* Restore the special purpose registers. */ + asm volatile ("lwz 0,128(31); mtcr 0"); + asm volatile ("lwz 0,132(31); mtxer 0"); + asm volatile ("lwz 0,136(31); mtlr 0"); + asm volatile ("lwz 0,-8(31); mtctr 0"); /* XXX this is the PC */ +#if 0 + asm volatile ("lwz 0,144(31); mtmq %0"); /* PPC601 only */ +#endif + + /* Restore the normal registers. */ + restore_gpr (0); + restore_gpr (1); + restore_gpr (2); + restore_gpr (3); + restore_gpr (4); + restore_gpr (5); + restore_gpr (6); + restore_gpr (7); + restore_gpr (8); + restore_gpr (9); + restore_gpr (10); + restore_gpr (11); + restore_gpr (12); + restore_gpr (13); + restore_gpr (14); + restore_gpr (15); + restore_gpr (16); + restore_gpr (17); + restore_gpr (18); + restore_gpr (19); + restore_gpr (20); + restore_gpr (21); + restore_gpr (22); + restore_gpr (23); + restore_gpr (24); + restore_gpr (25); + restore_gpr (26); + restore_gpr (27); + restore_gpr (28); + restore_gpr (29); + restore_gpr (30); + restore_gpr (31); + + /* Return. */ + asm volatile ("bctr"); /* XXX CTR is not restored! */ + + /* NOTREACHED */ + return -1; +} + +weak_alias (__sigreturn, sigreturn) diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/static-start.S glibc-2.2.5/sysdeps/mach/hurd/powerpc/static-start.S --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/static-start.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/static-start.S Fri Nov 9 16:37:47 2001 @@ -0,0 +1,59 @@ +/* Startup code for statically linked Hurd/PowerPC binaries. + Copyright (C) 1998,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + + /* These are the various addresses we require. */ + .section ".rodata" + .align 2 + weak_extern(_init) + weak_extern(_fini) +L(start_addresses): + .long _SDA_BASE_ + .long JUMPTARGET(main) + .long JUMPTARGET(_init) + .long JUMPTARGET(_fini) + ASM_SIZE_DIRECTIVE(L(start_addresses)) + + .section ".text" +ENTRY(_start) + /* Save the stack pointer to pass to _hurd_stack_setup. */ + mr r3,r1 + /* Set up an initial stack frame. */ + li r0,0 + stwu r0,-16(r1) + /* Call _hurd_stack_setup. */ + bl JUMPTARGET(_hurd_stack_setup) + /* Pass the argument data to __libc_start_main. */ + addi r9,r1,16 + /* Clear the LR. */ + li r0,0 + mtlr r0 + /* Set r13 to point at the 'small data area', and put the address of + start_addresses in r8... */ + lis r8,L(start_addresses)@ha + lwzu r13,L(start_addresses)@l(r8) + /* and continue in libc-start, in glibc. */ + b JUMPTARGET(__libc_start_main) +END(_start) + +/* Define a symbol for the first piece of initialized data. */ + .section ".data" +__data_start: +weak_alias (__data_start, data_start) diff -durpN glibc-2.2.4/sysdeps/mach/hurd/powerpc/trampoline.c glibc-2.2.5/sysdeps/mach/hurd/powerpc/trampoline.c --- glibc-2.2.4/sysdeps/mach/hurd/powerpc/trampoline.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/powerpc/trampoline.c Fri Nov 9 16:37:47 2001 @@ -0,0 +1,256 @@ +/* Set thread_state for sighandler, and sigcontext to recover. For PowerPC. + Copyright (C) 1994,95,96,97,98,99,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include "thread_state.h" +#include +#include +#include "hurdfault.h" +#include "intr-msg.h" + +struct sigcontext * +_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, + int signo, struct hurd_signal_detail *detail, + volatile int rpc_wait, + struct machine_thread_all_state *state) +{ + void trampoline (void); + void rpc_wait_trampoline (void); + void *volatile sigsp; + struct sigcontext *scp; + + if (ss->context) + { + /* We have a previous sigcontext that sigreturn was about + to restore when another signal arrived. We will just base + our setup on that. */ + if (! _hurdsig_catch_memory_fault (ss->context)) + { + memcpy (&state->basic, &ss->context->sc_ppc_thread_state, + sizeof (state->basic)); + memcpy (&state->exc, &ss->context->sc_ppc_exc_state, + sizeof (state->exc)); + memcpy (&state->fpu, &ss->context->sc_ppc_float_state, + sizeof (state->fpu)); + state->set = (1 << PPC_THREAD_STATE) | (1 << PPC_EXCEPTION_STATE) + | (1 << PPC_FLOAT_STATE); + } + } + + if (! machine_get_basic_state (ss->thread, state)) + return NULL; + + if ((ss->actions[signo].sa_flags & SA_ONSTACK) && + !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) + { + sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size; + ss->sigaltstack.ss_flags |= SS_ONSTACK; + /* XXX need to set up base of new stack for + per-thread variables, cthreads. */ + } + else + sigsp = (char *) state->basic.SP; + + /* Set up the sigcontext structure on the stack. This is all the stack + needs, since the args are passed in registers (below). */ + sigsp -= sizeof (*scp); + scp = sigsp; + sigsp -= 16; /* Reserve some space for a stack frame. */ + + if (_hurdsig_catch_memory_fault (scp)) + { + /* We got a fault trying to write the stack frame. + We cannot set up the signal handler. + Returning NULL tells our caller, who will nuke us with a SIGILL. */ + return NULL; + } + else + { + int ok; + + /* Set up the sigcontext from the current state of the thread. */ + + scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; + + /* struct sigcontext is laid out so that starting at sc_srr0 + mimics a struct ppc_thread_state. */ + memcpy (&scp->sc_ppc_thread_state, + &state->basic, sizeof (state->basic)); + + /* struct sigcontext is laid out so that starting at sc_dar + mimics a struct ppc_exc_state. */ + ok = machine_get_state (ss->thread, state, PPC_EXCEPTION_STATE, + &state->exc, &scp->sc_ppc_exc_state, + sizeof (state->exc)); + + /* struct sigcontext is laid out so that starting at sc_fprs[0] + mimics a struct ppc_float_state. */ + if (ok) + ok = machine_get_state (ss->thread, state, PPC_FLOAT_STATE, + &state->fpu, &scp->sc_ppc_float_state, + sizeof (state->fpu)); + + _hurdsig_end_catch_fault (); + + if (!ok) + return NULL; + } + + /* Modify the thread state to call the trampoline code on the new stack. */ + if (rpc_wait) + { + /* The signalee thread was blocked in a mach_msg_trap system call, + still waiting for a reply. We will have it run the special + trampoline code which retries the message receive before running + the signal handler. + + To do this we change the OPTION argument in its registers to + enable only message reception, since the request message has + already been sent. */ + + /* The system call arguments are stored in consecutive registers + starting with r3. */ + struct mach_msg_trap_args *args = (void *) &state->basic.r3; + + if (_hurdsig_catch_memory_fault (args)) + { + /* Faulted accessing ARGS. Bomb. */ + return NULL; + } + + assert (args->option & MACH_RCV_MSG); + /* Disable the message-send, since it has already completed. The + calls we retry need only wait to receive the reply message. */ + args->option &= ~MACH_SEND_MSG; + + /* Limit the time to receive the reply message, in case the server + claimed that `interrupt_operation' succeeded but in fact the RPC + is hung. */ + args->option |= MACH_RCV_TIMEOUT; + args->timeout = _hurd_interrupted_rpc_timeout; + + _hurdsig_end_catch_fault (); + + state->basic.PC = (int) rpc_wait_trampoline; + /* After doing the message receive, the trampoline code will need to + update the r3 value to be restored by sigreturn. To simplify + the assembly code, we pass the address of its slot in SCP to the + trampoline code in r10. */ + state->basic.r10 = (long int) &scp->sc_gprs[3]; + /* We must preserve the mach_msg_trap args in r3..r9. + Pass the handler args to the trampoline code in r11..r13. */ + state->basic.r11 = signo; + state->basic.r12 = detail->code; + state->basic.r13 = (int) scp; + } + else + { + state->basic.PC = (int) trampoline; + state->basic.r3 = signo; + state->basic.r4 = detail->code; + state->basic.r5 = (int) scp; + } + + state->basic.r1 = (int) sigsp; /* r1 is the stack pointer. */ + + /* We pass the handler function to the trampoline code in ctr. */ + state->basic.ctr = (int) handler; + /* In r15, we store the address of __sigreturn itself, + for the trampoline code to use. */ + state->basic.r15 = (int) &__sigreturn; + /* In r16, we save the SCP value to pass to __sigreturn + after the handler returns. */ + state->basic.r16 = (int) scp; + + /* In r3, we store a pointer to the registers in STATE so that the + trampoline code can load the registers from that. For some reason, + thread_set_state doesn't set all registers. */ + state->basic.r17 = state->basic.r3; /* Store the real r3 in r17. */ + state->basic.r3 = (int) &state->basic.r0; + + return scp; +} + +/* The trampoline code follows. This used to be located inside + _hurd_setup_sighandler, but was optimized away by gcc 2.95. */ + +/* This function sets some registers which the trampoline code uses + and which are not automatically set by thread_set_state. + In r3 we have a pointer to the registers in STATE. */ +asm ("trampoline_load_registers:\n" + "lwz 17,68(3)\n" /* The real r3. */ + "lwz 4,16(3)\n" + "lwz 5,20(3)\n" + "lwz 6,24(3)\n" + "lwz 7,28(3)\n" + "lwz 8,32(3)\n" + "lwz 9,36(3)\n" + "lwz 10,40(3)\n" + "lwz 11,44(3)\n" + "lwz 12,48(3)\n" + "lwz 13,52(3)\n" + "lwz 14,56(3)\n" + "lwz 15,60(3)\n" + "lwz 16,64(3)\n" + "mr 3,17\n" + "blr\n"); + +asm ("rpc_wait_trampoline:\n"); + /* This is the entry point when we have an RPC reply message to receive + before running the handler. The MACH_MSG_SEND bit has already been + cleared in the OPTION argument in our registers. For our convenience, + r10 points to the sc_regs[3] member of the sigcontext (saved r3). */ + +asm (/* Retry the interrupted mach_msg system call. */ + "bl trampoline_load_registers\n" + "li 0, -25\n" /* mach_msg_trap */ + "sc\n" + /* When the sigcontext was saved, r3 was MACH_RCV_INTERRUPTED. But + now the message receive has completed and the original caller of + the RPC (i.e. the code running when the signal arrived) needs to + see the final return value of the message receive in r3. So + store the new r3 value into the sc_regs[3] member of the sigcontext + (whose address is in r10 to make this code simpler). */ + "stw 3, 0(10)\n" + /* Since the argument registers needed to have the mach_msg_trap + arguments, we've stored the arguments to the handler function + in registers r11..r13 of the state structure. */ + "mr 3,11\n" + "mr 4,12\n" + "mr 5,13\n"); + +asm ("trampoline:\n"); + /* Entry point for running the handler normally. The arguments to the + handler function are already in the standard registers: + + r3 SIGNO + r4 SIGCODE + r5 SCP + + r16 also contains SCP; this value is callee-saved (and so should not get + clobbered by running the handler). We use this saved value to pass to + __sigreturn, so the handler can clobber the argument registers if it + likes. */ +asm ("bl trampoline_load_registers\n" + "bctrl\n" /* Call the handler function. */ + "mtctr 15\n" /* Copy &__sigreturn to CTR. */ + "mr 3,16\n" /* Copy the saved SCP to r3. */ + "bctr\n" /* Call __sigreturn (SCP). */ + ); diff -durpN glibc-2.2.4/sysdeps/mach/hurd/setrlimit.c glibc-2.2.5/sysdeps/mach/hurd/setrlimit.c --- glibc-2.2.4/sysdeps/mach/hurd/setrlimit.c Mon Jul 23 10:56:04 2001 +++ glibc-2.2.5/sysdeps/mach/hurd/setrlimit.c Wed Oct 10 13:10:51 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,97,98,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,97,98,2000,01 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,12 +38,9 @@ __setrlimit (enum __rlimit_resource reso lim = *rlimits; - if (lim.rlim_max != RLIM_INFINITY) - { - /* We have no enforceable resource limits. */ - errno = ENOSYS; - return -1; - } + /* Even though most limits do nothing, there is no inheritance, and hard + limits are not really hard, we just let any old call succeed to make + life easier for programs that expect normal behavior. */ if (lim.rlim_cur > lim.rlim_max) lim.rlim_cur = lim.rlim_max; diff -durpN glibc-2.2.4/sysdeps/mach/hurd/tmpfile.c glibc-2.2.5/sysdeps/mach/hurd/tmpfile.c --- glibc-2.2.4/sysdeps/mach/hurd/tmpfile.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/hurd/tmpfile.c Tue Nov 13 02:07:11 2001 @@ -0,0 +1,66 @@ +/* Open a stdio stream on an anonymous temporary file. Hurd version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +#ifdef USE_IN_LIBIO +# include +# define __fdopen _IO_fdopen +# define tmpfile __new_tmpfile +#endif + +/* This returns a new stream opened on a temporary file (generated + by tmpnam). The file is opened with mode "w+b" (binary read/write). + If we couldn't generate a unique filename or the file couldn't + be opened, NULL is returned. */ +FILE * +tmpfile (void) +{ + error_t err; + file_t file; + FILE *f; + + /* Get a port to the directory that will contain the file. */ + const char *dirname = __secure_getenv ("TMPDIR") ?: P_tmpdir; + file_t dir = __file_name_lookup (dirname, 0, 0); + if (dir == MACH_PORT_NULL) + return NULL; + + /* Create an unnamed file in the temporary directory. */ + err = __dir_mkfile (dir, O_RDWR, S_IRUSR | S_IWUSR, &file); + __mach_port_deallocate (__mach_task_self (), dir); + if (err) + return __hurd_fail (err), NULL; + + /* Open a stream on the port to the unnamed file. + It will cease to exist when this stream is closed. */ + if ((f = __fopenport (file, "w+b")) == NULL) + __mach_port_deallocate (__mach_task_self (), file); + + return f; +} + +#ifdef USE_IN_LIBIO +# undef tmpfile +# include +versioned_symbol (libc, __new_tmpfile, tmpfile, GLIBC_2_1); +#endif diff -durpN glibc-2.2.4/sysdeps/mach/i386/machine-sp.h glibc-2.2.5/sysdeps/mach/i386/machine-sp.h --- glibc-2.2.4/sysdeps/mach/i386/machine-sp.h Mon Jul 23 10:56:09 2001 +++ glibc-2.2.5/sysdeps/mach/i386/machine-sp.h Tue Aug 21 13:32:26 2001 @@ -22,17 +22,10 @@ /* Return the current stack pointer. */ -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE extern __inline -#endif - -extern void *__thread_stack_pointer (void); -_EXTERN_INLINE void * -__thread_stack_pointer (void) -{ - void *__sp__; - __asm__ ("movl %%esp, %0" : "=r" (__sp__)); - return __sp__; -} +#define __thread_stack_pointer() ({ \ + void *__sp__; \ + __asm__ ("movl %%esp, %0" : "=r" (__sp__)); \ + __sp__; \ +}) #endif /* machine-sp.h */ diff -durpN glibc-2.2.4/sysdeps/mach/powerpc/machine-lock.h glibc-2.2.5/sysdeps/mach/powerpc/machine-lock.h --- glibc-2.2.4/sysdeps/mach/powerpc/machine-lock.h Mon Jul 23 10:56:09 2001 +++ glibc-2.2.5/sysdeps/mach/powerpc/machine-lock.h Sun Oct 28 18:18:46 2001 @@ -38,8 +38,12 @@ typedef __volatile long int __spin_lock_ _EXTERN_INLINE void __spin_unlock (__spin_lock_t *__lock) { - __asm__ __volatile__ ("sync ; stwcx. %1,0,%0" - : : "r" (__lock), "r" (0) : "cr0"); + long int __locked; + __asm__ __volatile__ ("\ +0: lwarx %0,0,%1 + stwcx. %2,0,%1 + bne- 0b +" : "=&r" (__locked) : "r" (__lock), "r" (0) : "cr0"); } /* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ @@ -48,13 +52,12 @@ _EXTERN_INLINE int __spin_try_lock (register __spin_lock_t *__lock) { long int __rtn; - __asm__ __volatile__ ("\ 0: lwarx %0,0,%1 stwcx. %2,0,%1 bne- 0b -" : "=&r"(__rtn) : "r"(__lock), "r"(1) : "cr0"); - return ~__rtn; +" : "=&r" (__rtn) : "r" (__lock), "r" (1) : "cr0"); + return !__rtn; } /* Return nonzero if LOCK is locked. */ @@ -67,7 +70,7 @@ __spin_lock_locked (__spin_lock_t *__loc 0: lwarx %0,0,%1 stwcx. %0,0,%1 bne- 0b -" : "=&r"(__rtn) : "r"(__lock) : "cr0"); +" : "=&r" (__rtn) : "r" (__lock) : "cr0"); return __rtn; } diff -durpN glibc-2.2.4/sysdeps/mach/powerpc/machine-sp.h glibc-2.2.5/sysdeps/mach/powerpc/machine-sp.h --- glibc-2.2.4/sysdeps/mach/powerpc/machine-sp.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/powerpc/machine-sp.h Sun Oct 28 20:38:42 2001 @@ -0,0 +1,42 @@ +/* Machine-specific function to return the stack pointer. PowerPC version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MACHINE_SP_H +#define _MACHINE_SP_H + +/* Return the current stack pointer. */ + +#ifndef _EXTERN_INLINE +/* Make sure this function is included in hurd/threadvar-inlines.c. */ +# ifdef _HURD_THREADVAR_H_EXTERN_INLINE +# define _EXTERN_INLINE _HURD_THREADVAR_H_EXTERN_INLINE +# else +# define _EXTERN_INLINE extern __inline +# endif +#endif + +_EXTERN_INLINE void * +__thread_stack_pointer (void) +{ + register void *__sp__; + __asm__ ("mr %0, 1" : "=r" (__sp__)); + return __sp__; +} + +#endif /* machine-sp.h */ diff -durpN glibc-2.2.4/sysdeps/mach/powerpc/sysdep.h glibc-2.2.5/sysdeps/mach/powerpc/sysdep.h --- glibc-2.2.4/sysdeps/mach/powerpc/sysdep.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/powerpc/sysdep.h Tue Nov 6 02:58:36 2001 @@ -0,0 +1,50 @@ +/* system call details for Mach on PowerPC + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _MACH_POWERPC_SYSDEP_H +#define _MACH_POWERPC_SYSDEP_H + +#define START_ARGS char **sparg +#define SNARF_ARGS(argc, argv, envp) \ + do { \ + argv = &sparg[1]; \ + argc = *(int *)sparg; \ + envp = &argv[argc + 1]; \ + } while (0) + +#define CALL_WITH_SP(fn, sp) \ + do { \ + register long __sp = (long) sp, __fn = (long) fn; \ + asm volatile ("mr 1, %0; mtlr %1; blr" \ + : : "r" (__sp), "r" (__fn)); \ + } while (0) + +#define STACK_GROWTH_DOWN + +#define RETURN_TO(sp, pc, retval) \ + asm volatile ("mr 1, %0; mtctr %1; mr 3, %2; bctr" \ + : : "r" (sp), "r" (pc), "r" (retval)) + +/* Get the machine-independent Mach definitions. */ +#include + +#undef ENTRY +#include + +#endif /* _MACH_POWERPC_SYSDEP_H */ diff -durpN glibc-2.2.4/sysdeps/mach/powerpc/thread_state.h glibc-2.2.5/sysdeps/mach/powerpc/thread_state.h --- glibc-2.2.4/sysdeps/mach/powerpc/thread_state.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mach/powerpc/thread_state.h Sun Oct 28 20:38:42 2001 @@ -0,0 +1,39 @@ +/* Mach thread state definitions for machine-independent code. PowerPC version + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +#define MACHINE_THREAD_STATE_FLAVOR PPC_THREAD_STATE +#define MACHINE_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT + +#define machine_thread_state ppc_thread_state + +#define PC srr0 +#define SP r1 +#define SYSRETURN r3 + +struct machine_thread_all_state + { + int set; /* Mask of bits (1 << FLAVOR). */ + struct ppc_thread_state basic; + struct ppc_exception_state exc; + struct ppc_float_state fpu; + }; + +#include diff -durpN glibc-2.2.4/sysdeps/mips/bits/dlfcn.h glibc-2.2.5/sysdeps/mips/bits/dlfcn.h --- glibc-2.2.4/sysdeps/mips/bits/dlfcn.h Mon Jul 23 10:56:10 2001 +++ glibc-2.2.5/sysdeps/mips/bits/dlfcn.h Fri Oct 26 17:03:32 2001 @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 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 @@ -52,8 +52,13 @@ foo = DL_CALL_FCT (fctp, (arg1, arg2)); */ # define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) + (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args) + +__BEGIN_DECLS /* This function calls the profiling functions. */ extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; + +__END_DECLS + #endif diff -durpN glibc-2.2.4/sysdeps/mips/dl-machine.h glibc-2.2.5/sysdeps/mips/dl-machine.h --- glibc-2.2.4/sysdeps/mips/dl-machine.h Mon Jul 23 10:56:09 2001 +++ glibc-2.2.5/sysdeps/mips/dl-machine.h Sat Sep 8 10:16:44 2001 @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -54,8 +54,7 @@ This makes no sense on MIPS but we have to define this to R_MIPS_REL32 to avoid the asserts in dl-lookup.c from blowing. */ #define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 -#define elf_machine_lookup_noplt_p(type) (1) -#define elf_machine_lookup_noexec_p(type) (0) +#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT /* Translate a processor specific dynamic tag to the index in l_info array. */ @@ -240,7 +239,7 @@ elf_machine_runtime_link_map (ElfW(Addr) } } - _dl_signal_error (0, NULL, "cannot find runtime link map"); + _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL; } @@ -302,14 +301,14 @@ __dl_runtime_resolve (ElfW(Word) sym_ind { \ value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \ &sym, l->l_scope, version,\ - R_MIPS_REL32, 0); \ + ELF_RTYPE_CLASS_PLT, 0); \ break; \ } \ /* Fall through. */ \ } \ case 0: \ value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \ - l->l_scope, R_MIPS_REL32, 0); \ + l->l_scope, ELF_RTYPE_CLASS_PLT, 0); \ } \ \ /* Currently value contains the base load address of the object \ @@ -477,6 +476,8 @@ elf_machine_rel (struct link_map *map, c const ElfW(Sym) *sym, const struct r_found_version *version, ElfW(Addr) *const reloc_addr) { + const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); + #ifndef RTLD_BOOTSTRAP /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This @@ -487,7 +488,7 @@ elf_machine_rel (struct link_map *map, c weak_extern (_dl_rtld_map); #endif - switch (ELFW(R_TYPE) (reloc->r_info)) + switch (r_type) { case R_MIPS_REL32: { @@ -528,9 +529,16 @@ elf_machine_rel (struct link_map *map, c case R_MIPS_NONE: /* Alright, Wilbur. */ break; default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } +} + +static inline void +elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, + ElfW(Addr) *const reloc_addr) +{ + /* XXX Nothing to do. There is no relative relocation, right? */ } static inline void diff -durpN glibc-2.2.4/sysdeps/mips/fpu/libm-test-ulps glibc-2.2.5/sysdeps/mips/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/mips/fpu/libm-test-ulps Wed Apr 25 14:51:13 2001 +++ glibc-2.2.5/sysdeps/mips/fpu/libm-test-ulps Fri Sep 14 20:01:21 2001 @@ -7,7 +7,7 @@ ifloat: 2 Test "asin (0.5) == pi/6": float: 2 ifloat: 2 -Test "asin (0.7) == 0.7753974966107530637": +Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 float: 2 idouble: 1 @@ -175,12 +175,12 @@ idouble: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": float: 1 ifloat: 1 @@ -249,7 +249,7 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.7648421872844884262": +Test "cos (0.7) == 0.76484218728448842625585999019186495": double: 1 float: 1 idouble: 1 @@ -374,7 +374,7 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500": +Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 Test "exp10 (3) == 1000": @@ -451,6 +451,21 @@ ifloat: 2 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + # j1 Test "j1 (10.0) == 0.043472746168861436670": @@ -563,7 +578,7 @@ idouble: 1 ifloat: 1 # sincos -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": double: 1 float: 1 idouble: 1 @@ -573,7 +588,7 @@ double: 1 float: 0.5 idouble: 1 ifloat: 0.5 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 @@ -583,7 +598,7 @@ double: 0.2758 float: 0.3667 idouble: 0.2758 ifloat: 0.3667 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 @@ -605,6 +620,13 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +Test "tanh (-0.7) == -0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 # tgamma Test "tgamma (-0.5) == -2 sqrt (pi)": diff -durpN glibc-2.2.4/sysdeps/mips/gccframe.h glibc-2.2.5/sysdeps/mips/gccframe.h --- glibc-2.2.4/sysdeps/mips/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/mips/gccframe.h Thu Nov 15 17:12:04 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. mips version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define FIRST_PSEUDO_REGISTER 76 + +#include diff -durpN glibc-2.2.4/sysdeps/mips/mips64/dl-machine.h glibc-2.2.5/sysdeps/mips/mips64/dl-machine.h --- glibc-2.2.4/sysdeps/mips/mips64/dl-machine.h Mon Jul 23 10:56:11 2001 +++ glibc-2.2.5/sysdeps/mips/mips64/dl-machine.h Sat Sep 8 10:16:44 2001 @@ -1,5 +1,5 @@ -/* Machine-dependent ELF dynamic relocation inline functions. MIPS version. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima . @@ -45,8 +45,7 @@ This makes no sense on MIPS but we have to define this to R_MIPS_REL32 to avoid the asserts in dl-lookup.c from blowing. */ #define ELF_MACHINE_JMP_SLOT R_MIPS_REL32 -#define elf_machine_lookup_noplt_p(type) (1) -#define elf_machine_lookup_noexec_p(type) (0) +#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT /* Translate a processor specific dynamic tag to the index in l_info array. */ @@ -312,7 +311,7 @@ elf_machine_runtime_link_map (ElfW(Addr) } } - _dl_signal_error (0, NULL, "cannot find runtime link map"); + _dl_signal_error (0, NULL, NULL, "cannot find runtime link map"); return NULL; } @@ -530,10 +529,11 @@ elf_machine_rel (struct link_map *map, c const ElfW(Sym) *sym, const struct r_found_version *version, ElfW(Addr) *const reloc_addr) { + const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); ElfW(Addr) loadbase; ElfW(Addr) undo __attribute__ ((unused)); - switch (ELFW(R_TYPE) (reloc->r_info)) + switch (r_type) { case R_MIPS_REL32: { @@ -565,12 +565,21 @@ elf_machine_rel (struct link_map *map, c *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo; } break; +#ifndef RTLD_BOOTSTRAP case R_MIPS_NONE: /* Alright, Wilbur. */ break; +#endif default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } +} + +static inline void +elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, + ElfW(Addr) *const reloc_addr) +{ + /* XXX Nothing to do. There is no relative relocation, right? */ } static inline void diff -durpN glibc-2.2.4/sysdeps/posix/cuserid.c glibc-2.2.5/sysdeps/posix/cuserid.c --- glibc-2.2.4/sysdeps/posix/cuserid.c Mon Jul 23 10:56:15 2001 +++ glibc-2.2.5/sysdeps/posix/cuserid.c Thu Dec 13 23:02:32 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 1998, 1999, 2001 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 @@ -39,7 +39,7 @@ cuserid (s) { if (s != NULL) s[0] = '\0'; - return NULL; + return s; } if (s == NULL) diff -durpN glibc-2.2.4/sysdeps/posix/shm_unlink.c glibc-2.2.5/sysdeps/posix/shm_unlink.c --- glibc-2.2.4/sysdeps/posix/shm_unlink.c Thu Jul 5 21:56:01 2001 +++ glibc-2.2.5/sysdeps/posix/shm_unlink.c Fri Aug 24 14:47:45 2001 @@ -56,7 +56,7 @@ shm_unlink (const char *name) name, namelen + 1); - return __unlink (name); + return unlink (name); } #endif diff -durpN glibc-2.2.4/sysdeps/powerpc/dl-machine.c glibc-2.2.5/sysdeps/powerpc/dl-machine.c --- glibc-2.2.4/sysdeps/powerpc/dl-machine.c Fri Jul 27 23:13:27 2001 +++ glibc-2.2.5/sysdeps/powerpc/dl-machine.c Sat Sep 8 10:16:44 2001 @@ -391,7 +391,7 @@ dl_reloc_overflow (struct link_map *map, t = stpcpy (t, "'"); } t = stpcpy (t, " out of range"); - _dl_signal_error (0, map->l_name, buffer); + _dl_signal_error (0, map->l_name, NULL, buffer); } void diff -durpN glibc-2.2.4/sysdeps/powerpc/dl-machine.h glibc-2.2.5/sysdeps/powerpc/dl-machine.h --- glibc-2.2.4/sysdeps/powerpc/dl-machine.h Mon Jul 23 10:56:19 2001 +++ glibc-2.2.5/sysdeps/powerpc/dl-machine.h Sun Aug 26 15:26:37 2001 @@ -264,18 +264,18 @@ __elf_preferred_address(struct link_map #define ELF_PREFERRED_ADDRESS(loader, maplength, mapstartpref) \ __elf_preferred_address (loader, maplength, mapstartpref) -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_PPC_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ /* We never want to use a PLT entry as the destination of a reloc, when what is being relocated is a branch. This is partly for efficiency, but mostly so we avoid loops. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_PPC_REL24 || \ - (type) == R_PPC_ADDR24 || \ - (type) == R_PPC_JMP_SLOT) +#define elf_machine_type_class(type) \ + ((((type) == R_PPC_JMP_SLOT \ + || (type) == R_PPC_REL24 \ + || (type) == R_PPC_ADDR24) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_PPC_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_PPC_JMP_SLOT @@ -347,7 +347,7 @@ elf_machine_rela (struct link_map *map, Elf32_Word loadbase, finaladdr; const int rinfo = ELF32_R_TYPE (reloc->r_info); - if (rinfo == R_PPC_NONE) + if (__builtin_expect (rinfo == R_PPC_NONE, 0)) return; /* The condition on the next two lines is a hack around a bug in Solaris @@ -393,6 +393,12 @@ elf_machine_rela (struct link_map *map, reloc_addr, finaladdr, rinfo); } +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} /* The SVR4 ABI specifies that the JMPREL relocs must be inside the DT_RELA table. */ diff -durpN glibc-2.2.4/sysdeps/powerpc/fpu/libm-test-ulps glibc-2.2.5/sysdeps/powerpc/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/powerpc/fpu/libm-test-ulps Mon Jul 23 10:56:21 2001 +++ glibc-2.2.5/sysdeps/powerpc/fpu/libm-test-ulps Thu Sep 13 10:27:16 2001 @@ -447,6 +447,16 @@ ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # j1 Test "j1 (10.0) == 0.043472746168861436670": diff -durpN glibc-2.2.4/sysdeps/powerpc/gccframe.h glibc-2.2.5/sysdeps/powerpc/gccframe.h --- glibc-2.2.4/sysdeps/powerpc/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/powerpc/gccframe.h Thu Nov 15 17:12:35 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. powerpc version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define DWARF_FRAME_REGISTERS 77 + +#include diff -durpN glibc-2.2.4/sysdeps/powerpc/sysdep.h glibc-2.2.5/sysdeps/powerpc/sysdep.h --- glibc-2.2.4/sysdeps/powerpc/sysdep.h Mon Jul 23 10:56:19 2001 +++ glibc-2.2.5/sysdeps/powerpc/sysdep.h Mon Nov 5 01:29:42 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001 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 @@ -100,4 +100,123 @@ #define cr6 6 #define cr7 7 -#endif /* assembler */ + +#ifdef __ELF__ + +/* This seems to always be the case on PPC. */ +#define ALIGNARG(log2) log2 +/* For ELF we need the `.type' directive to make shared libs work right. */ +#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; +#define ASM_SIZE_DIRECTIVE(name) .size name,.-name + +/* If compiled for profiling, call `_mcount' at the start of each function. */ +#ifdef PROF +/* The mcount code relies on a the return address being on the stack + to locate our caller and so it can restore it; so store one just + for its benefit. */ +#ifdef PIC +#define CALL_MCOUNT \ + .pushsection; \ + .section ".data"; \ + .align ALIGNARG(2); \ +0:.long 0; \ + .previous; \ + mflr r0; \ + stw r0,4(r1); \ + bl _GLOBAL_OFFSET_TABLE_@local-4; \ + mflr r11; \ + lwz r0,0b@got(r11); \ + bl JUMPTARGET(_mcount); +#else /* PIC */ +#define CALL_MCOUNT \ + .section ".data"; \ + .align ALIGNARG(2); \ +0:.long 0; \ + .previous; \ + mflr r0; \ + lis r11,0b@ha; \ + stw r0,4(r1); \ + addi r0,r11,0b@l; \ + bl JUMPTARGET(_mcount); +#endif /* PIC */ +#else /* PROF */ +#define CALL_MCOUNT /* Do nothing. */ +#endif /* PROF */ + +#define ENTRY(name) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ + .align ALIGNARG(2); \ + C_LABEL(name) \ + CALL_MCOUNT + +#define EALIGN_W_0 /* No words to insert. */ +#define EALIGN_W_1 nop +#define EALIGN_W_2 nop;nop +#define EALIGN_W_3 nop;nop;nop +#define EALIGN_W_4 EALIGN_W_3;nop +#define EALIGN_W_5 EALIGN_W_4;nop +#define EALIGN_W_6 EALIGN_W_5;nop +#define EALIGN_W_7 EALIGN_W_6;nop + +/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes + past a 2^align boundary. */ +#ifdef PROF +#define EALIGN(name, alignt, words) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ + .align ALIGNARG(2); \ + C_LABEL(name) \ + CALL_MCOUNT \ + b 0f; \ + .align ALIGNARG(alignt); \ + EALIGN_W_##words; \ + 0: +#else /* PROF */ +#define EALIGN(name, alignt, words) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ + .align ALIGNARG(alignt); \ + EALIGN_W_##words; \ + C_LABEL(name) +#endif + +#undef END +#define END(name) \ + ASM_SIZE_DIRECTIVE(name) + +#define DO_CALL(syscall) \ + li 0,syscall; \ + sc + +#ifdef PIC +#define JUMPTARGET(name) name##@plt +#else +#define JUMPTARGET(name) name +#endif + +#define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + ENTRY (name) \ + DO_CALL (SYS_ify (syscall_name)); + +#define PSEUDO_RET \ + bnslr; \ + b JUMPTARGET(__syscall_error) +#define ret PSEUDO_RET + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + END (name) + +/* Local labels stripped out by the linker. */ +#undef L +#define L(x) .L##x + +/* Label in text section. */ +#define C_TEXT(name) name + +#endif /* __ELF__ */ + + +#endif /* __ASSEMBLER__ */ diff -durpN glibc-2.2.4/sysdeps/s390/fpu/libm-test-ulps glibc-2.2.5/sysdeps/s390/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/s390/fpu/libm-test-ulps Mon Jul 23 10:56:25 2001 +++ glibc-2.2.5/sysdeps/s390/fpu/libm-test-ulps Sun Jan 20 19:24:24 2002 @@ -1,28 +1,15 @@ # Begin of automatic generation # asin -Test "asin (-0.5) == -pi/6": -float: 2 -ifloat: 2 -Test "asin (0.5) == pi/6": -float: 2 -ifloat: 2 -Test "asin (0.7) == 0.7753974966107530637": -double: 1 -float: 2 -idouble: 1 -ifloat: 2 Test "asin (0.7) == 0.77539749661075306374035335271498708": double: 1 -float: 2 idouble: 1 -ifloat: 2 # atan2 -Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": +Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": float: 3 ifloat: 3 -Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": +Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": float: 3 ifloat: 3 Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736": @@ -136,9 +123,7 @@ Test "Real part of: catanh (0.7 + 1.2 i) float: 1 ifloat: 1 Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": -double: 1 float: 6 -idouble: 1 ifloat: 6 # cbrt @@ -180,14 +165,6 @@ idouble: 1 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": -float: 1 -ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": double: 1 float: 1 @@ -199,9 +176,7 @@ ifloat: 1 # clog Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": -double: 1 float: 3 -idouble: 1 ifloat: 3 # clog10 @@ -262,11 +237,6 @@ float: 1 ifloat: 1 # cos -Test "cos (0.7) == 0.7648421872844884262": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 Test "cos (0.7) == 0.76484218728448842625585999019186495": double: 1 float: 1 @@ -274,19 +244,19 @@ idouble: 1 ifloat: 1 Test "cos (M_PI_6l * 2.0) == 0.5": double: 1 -float: 0.5 +float: 1 idouble: 1 -ifloat: 0.5 +ifloat: 1 Test "cos (M_PI_6l * 4.0) == -0.5": double: 2 float: 1 idouble: 2 ifloat: 1 Test "cos (pi/2) == 0": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 +double: 1 +float: 1 +idouble: 1 +ifloat: 1 # cpow Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": @@ -298,9 +268,9 @@ Test "Imaginary part of: cpow (2 + 3 i, float: 2 ifloat: 2 Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": -double: 1.1031 +double: 2 float: 2 -idouble: 1.1031 +idouble: 2 ifloat: 2 # csin @@ -392,9 +362,6 @@ double: 2 float: 1 idouble: 2 ifloat: 1 -Test "exp10 (0.7) == 5.0118723362727228500": -float: 1 -ifloat: 1 Test "exp10 (0.7) == 5.0118723362727228500155418688494574": float: 1 ifloat: 1 @@ -461,6 +428,11 @@ float: 1 ifloat: 1 # j0 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "j0 (10.0) == -0.24593576445134833520": double: 2 float: 1 @@ -469,6 +441,11 @@ ifloat: 1 Test "j0 (2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 @@ -589,37 +566,24 @@ double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res": +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": -double: 1 -float: 0.5 -idouble: 1 -ifloat: 0.5 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res": +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": -double: 0.2758 -float: 0.3667 -idouble: 0.2758 -ifloat: 0.3667 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": float: 1 ifloat: 1 -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res": -float: 1 -ifloat: 1 # sinh Test "sinh (0.7) == 0.75858370183953350346": @@ -630,17 +594,16 @@ ifloat: 1 # tan Test "tan (pi/4) == 1": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 # tanh -Test "tanh (0.7) == 0.60436777711716349631": +Test "tanh (-0.7) == -0.60436777711716349631": double: 1 float: 1 idouble: 1 ifloat: 1 - -Test "tanh (-0.7) == -0.60436777711716349631": +Test "tanh (0.7) == 0.60436777711716349631": double: 1 float: 1 idouble: 1 @@ -805,9 +768,7 @@ idouble: 1 # Maximal error of functions: Function: "asin": double: 1 -float: 2 idouble: 1 -ifloat: 2 Function: "atan2": float: 4 @@ -884,9 +845,7 @@ idouble: 4 ifloat: 1 Function: Imaginary part of "catanh": -double: 1 float: 6 -idouble: 1 ifloat: 6 Function: "cbrt": @@ -926,9 +885,7 @@ float: 1 ifloat: 1 Function: Imaginary part of "clog": -double: 1 float: 3 -idouble: 1 ifloat: 3 Function: Real part of "clog10": @@ -956,9 +913,9 @@ idouble: 1 ifloat: 4 Function: Imaginary part of "cpow": -double: 1.1031 +double: 2 float: 2 -idouble: 1.1031 +idouble: 2 ifloat: 2 Function: Imaginary part of "csin": @@ -1098,8 +1055,8 @@ idouble: 1 ifloat: 1 Function: "tan": -double: 0.5 -idouble: 0.5 +double: 1 +idouble: 1 Function: "tanh": double: 1 diff -durpN glibc-2.2.4/sysdeps/s390/gccframe.h glibc-2.2.5/sysdeps/s390/gccframe.h --- glibc-2.2.4/sysdeps/s390/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/s390/gccframe.h Thu Nov 15 17:13:05 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. s390 version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define FIRST_PSEUDO_REGISTER 34 + +#include diff -durpN glibc-2.2.4/sysdeps/s390/s390-32/bits/byteswap.h glibc-2.2.5/sysdeps/s390/s390-32/bits/byteswap.h --- glibc-2.2.4/sysdeps/s390/s390-32/bits/byteswap.h Mon Jul 23 10:56:27 2001 +++ glibc-2.2.5/sysdeps/s390/s390-32/bits/byteswap.h Tue Jan 8 02:20:28 2002 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. s390 version. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -22,6 +22,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) @@ -84,3 +87,5 @@ __r.__l[1] = __bswap_32 (__w.__l[0]); \ __r.__ll; }) #endif + +#endif /* _BITS_BYTESWAP_H */ diff -durpN glibc-2.2.4/sysdeps/s390/s390-32/bits/setjmp.h glibc-2.2.5/sysdeps/s390/s390-32/bits/setjmp.h --- glibc-2.2.4/sysdeps/s390/s390-32/bits/setjmp.h Mon Jul 23 10:56:27 2001 +++ glibc-2.2.5/sysdeps/s390/s390-32/bits/setjmp.h Sat Sep 22 15:35:25 2001 @@ -47,6 +47,6 @@ typedef struct { /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((int) (address) < (jmpbuf)->__gregs[__JB_GPR15]) + ((void *) (address) < (void *) (jmpbuf)->__gregs[__JB_GPR15]) #endif /* __S390_SETJMP_H__ */ diff -durpN glibc-2.2.4/sysdeps/s390/s390-32/dl-machine.h glibc-2.2.5/sysdeps/s390/s390-32/dl-machine.h --- glibc-2.2.4/sysdeps/s390/s390-32/dl-machine.h Mon Jul 23 10:56:26 2001 +++ glibc-2.2.5/sysdeps/s390/s390-32/dl-machine.h Sun Aug 26 15:26:38 2001 @@ -304,13 +304,13 @@ _dl_start_user:\n\ #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_390_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_390_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_390_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_390_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_390_JMP_SLOT @@ -364,20 +364,22 @@ elf_machine_rela (struct link_map *map, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { - if (ELF32_R_TYPE (reloc->r_info) == R_390_RELATIVE) { + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_390_RELATIVE, 0)) + *reloc_addr = map->l_addr + reloc->r_addend; #ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ + else if (__builtin_expect (r_type == R_390_NONE, 0)) + return; #endif - *reloc_addr = map->l_addr + reloc->r_addend; - } - else if (ELF32_R_TYPE (reloc->r_info) != R_390_NONE) + else { const Elf32_Sym *const refsym = sym; - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { case R_390_COPY: if (sym == NULL) @@ -431,24 +433,30 @@ elf_machine_rela (struct link_map *map, case R_390_NONE: break; default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; } } } +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} static inline void elf_machine_lazy_rel (struct link_map *map, Elf32_Addr l_addr, const Elf32_Rela *reloc) { Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); /* Check for unexpected PLT reloc type. */ - if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_390_JMP_SLOT) - == R_390_JMP_SLOT) + if (__builtin_expect (r_type == R_390_JMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff -durpN glibc-2.2.4/sysdeps/s390/s390-64/bits/byteswap.h glibc-2.2.5/sysdeps/s390/s390-64/bits/byteswap.h --- glibc-2.2.4/sysdeps/s390/s390-64/bits/byteswap.h Mon Jul 23 10:56:28 2001 +++ glibc-2.2.5/sysdeps/s390/s390-64/bits/byteswap.h Tue Jan 8 02:20:28 2002 @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. 64 bit S/390 version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2002 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -22,6 +22,9 @@ # error "Never use directly; include instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) @@ -29,7 +32,7 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_16(x) \ (__extension__ \ - ({ unsigned short int __v; \ + ({ unsigned short int __v; \ if (__builtin_constant_p (x)) \ __v = __bswap_constant_16 (x); \ else { \ @@ -90,4 +93,4 @@ # define __bswap_64(x) __bswap_constant_64 (x) #endif - +#endif /* _BITS_BYTESWAP_H */ diff -durpN glibc-2.2.4/sysdeps/s390/s390-64/bits/setjmp.h glibc-2.2.5/sysdeps/s390/s390-64/bits/setjmp.h --- glibc-2.2.4/sysdeps/s390/s390-64/bits/setjmp.h Fri Jul 27 23:13:28 2001 +++ glibc-2.2.5/sysdeps/s390/s390-64/bits/setjmp.h Sat Sep 22 15:35:26 2001 @@ -47,6 +47,6 @@ typedef struct { /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((int) (address) < (jmpbuf)->__gregs[__JB_GPR15]) + ((void *) (address) < (void *) (jmpbuf)->__gregs[__JB_GPR15]) #endif /* __S390_SETJMP_H__ */ diff -durpN glibc-2.2.4/sysdeps/s390/s390-64/dl-machine.h glibc-2.2.5/sysdeps/s390/s390-64/dl-machine.h --- glibc-2.2.4/sysdeps/s390/s390-64/dl-machine.h Mon Jul 23 10:56:28 2001 +++ glibc-2.2.5/sysdeps/s390/s390-64/dl-machine.h Sun Aug 26 15:26:38 2001 @@ -21,7 +21,7 @@ #ifndef dl_machine_h #define dl_machine_h - + #define ELF_MACHINE_NAME "s390x" #include @@ -77,7 +77,7 @@ elf_machine_runtime_setup (struct link_m extern void _dl_runtime_resolve (Elf64_Word); extern void _dl_runtime_profile (Elf64_Word); - if (l->l_info[DT_JMPREL] && lazy) + if (l->l_info[DT_JMPREL] && lazy) { /* The GOT entries for functions in the PLT have not yet been filled in. Their initial contents will arrange when called to push an @@ -96,7 +96,7 @@ elf_machine_runtime_setup (struct link_m if (__builtin_expect (profile, 0)) { got[2] = (Elf64_Addr) &_dl_runtime_profile; - + if (_dl_name_match_p (_dl_profile, l)) /* This is the object we are looking for. Say that we really want profiling and the timers are started. */ @@ -203,7 +203,7 @@ _dl_runtime_profile:\n\ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ .size _dl_runtime_profile, .-_dl_runtime_profile\n\ "); -#endif +#endif /* Initial entry point code for the dynamic linker. The C function `_dl_start' is the real entry point; @@ -276,16 +276,16 @@ _dl_start_user:\n\ #define RTLD_START_SPECIAL_INIT /* nothing */ #endif -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_390_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_390_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_390_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_390_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -#define ELF_MACHINE_JMP_SLOT R_390_JMP_SLOT +#define ELF_MACHINE_JMP_SLOT R_390_JMP_SLOT /* The 64 bit S/390 never uses Elf64_Rel relocations. */ #define ELF_MACHINE_NO_REL 1 @@ -318,9 +318,9 @@ elf_machine_plt_value (struct link_map * Elf64_Addr value) { return value; -} +} -#endif /* !dl_machine_h */ +#endif /* !dl_machine_h */ #ifdef RESOLVE @@ -332,21 +332,22 @@ elf_machine_rela (struct link_map *map, const Elf64_Sym *sym, const struct r_found_version *version, Elf64_Addr *const reloc_addr) { - if (ELF64_R_TYPE (reloc->r_info) == R_390_RELATIVE) { + const unsigned int r_type = ELF64_R_TYPE (reloc->r_info); + + if (__builtin_expect (r_type == R_390_RELATIVE, 0)) + *reloc_addr = map->l_addr + reloc->r_addend; #ifndef RTLD_BOOTSTRAP - weak_extern (_dl_rtld_map); - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ + else if (__builtin_expect (r_type == R_390_NONE, 0)) + return; #endif - *reloc_addr = map->l_addr + reloc->r_addend; - } - else if (ELF64_R_TYPE (reloc->r_info) != R_390_NONE) + else { const Elf64_Sym *const refsym = sym; - Elf64_Addr value = RESOLVE (&sym, version, ELF64_R_TYPE (reloc->r_info)); + Elf64_Addr value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; - - switch (ELF64_R_TYPE (reloc->r_info)) + + switch (r_type) { case R_390_GLOB_DAT: case R_390_JMP_SLOT: @@ -372,7 +373,7 @@ elf_machine_rela (struct link_map *map, } memcpy (reloc_addr, (void *) value, MIN (sym->st_size, refsym->st_size)); - break; + break; case R_390_64: *reloc_addr = value + reloc->r_addend; break; @@ -394,7 +395,7 @@ elf_machine_rela (struct link_map *map, ((int) (value + reloc->r_addend - (Elf64_Addr) reloc_addr) >> 1); break; case R_390_PC32: - *(unsigned int *) reloc_addr = + *(unsigned int *) reloc_addr = value + reloc->r_addend - (Elf64_Addr) reloc_addr; break; case R_390_PC16DBL: @@ -403,7 +404,7 @@ elf_machine_rela (struct link_map *map, ((short) (value + reloc->r_addend - (Elf64_Addr) reloc_addr) >> 1); break; case R_390_PC16: - *(unsigned short *) reloc_addr = + *(unsigned short *) reloc_addr = value + reloc->r_addend - (Elf64_Addr) reloc_addr; break; #endif @@ -411,24 +412,31 @@ elf_machine_rela (struct link_map *map, default: /* We add these checks in the version to relocate ld.so only if we are still debugging. */ - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; #endif } } -} +} + +static inline void +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + Elf64_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} static inline void elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) { Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); /* Check for unexpected PLT reloc type. */ - if (__builtin_expect (ELF64_R_TYPE (reloc->r_info), R_390_JMP_SLOT) - == R_390_JMP_SLOT) + if (__builtin_expect (r_type == R_390_JMP_SLOT, 1)) *reloc_addr += l_addr; else - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 1); + _dl_reloc_bad_type (map, r_type, 1); } #endif /* RESOLVE */ diff -durpN glibc-2.2.4/sysdeps/sh/dl-machine.h glibc-2.2.5/sysdeps/sh/dl-machine.h --- glibc-2.2.4/sysdeps/sh/dl-machine.h Fri Jul 27 23:13:28 2001 +++ glibc-2.2.5/sysdeps/sh/dl-machine.h Tue Sep 18 20:16:59 2001 @@ -388,13 +388,13 @@ _dl_start_user:\n\ .previous\n\ "); -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_SH_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_SH_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_SH_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_SH_JMP_SLOT @@ -446,6 +446,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); Elf32_Addr value; #define COPY_UNALIGNED_WORD(sw, tw, align) \ @@ -469,7 +470,7 @@ elf_machine_rela (struct link_map *map, } \ } - if (ELF32_R_TYPE (reloc->r_info) == R_SH_RELATIVE) + if (__builtin_expect (r_type == R_SH_RELATIVE, 0)) { #ifndef RTLD_BOOTSTRAP if (map != &_dl_rtld_map) /* Already done in rtld itself. */ @@ -485,7 +486,11 @@ elf_machine_rela (struct link_map *map, COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3); } } - else if (ELF32_R_TYPE (reloc->r_info) != R_SH_NONE) +#ifndef RTLD_BOOTSTRAP + else if (__builtin_expect (r_type == R_SH_NONE, 0)) + return; +#endif + else { const Elf32_Sym *const refsym = sym; @@ -550,6 +555,22 @@ elf_machine_rela (struct link_map *map, break; } } +} + +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + Elf32_Addr value; + + if (reloc->r_addend) + value = l_addr + reloc->r_addend; + else + { + COPY_UNALIGNED_WORD (*reloc_addr, value, (int) reloc_addr & 3); + value += l_addr; + } + COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3); #undef COPY_UNALIGNED_WORD } diff -durpN glibc-2.2.4/sysdeps/sh/gccframe.h glibc-2.2.5/sysdeps/sh/gccframe.h --- glibc-2.2.4/sysdeps/sh/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/sh/gccframe.h Thu Nov 15 17:13:37 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. sh version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define DWARF_FRAME_REGISTERS 49 + +#include diff -durpN glibc-2.2.4/sysdeps/sparc/fpu/bits/mathinline.h glibc-2.2.5/sysdeps/sparc/fpu/bits/mathinline.h --- glibc-2.2.4/sysdeps/sparc/fpu/bits/mathinline.h Mon Jul 23 10:56:34 2001 +++ glibc-2.2.5/sysdeps/sparc/fpu/bits/mathinline.h Wed Nov 28 13:13:08 2001 @@ -1,5 +1,5 @@ /* Inline math functions for SPARC. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -24,13 +24,13 @@ #include -#if defined __GNUC__ +#ifdef __GNUC__ #ifdef __USE_ISOC99 -#if __WORDSIZE == 32 +# if __WORDSIZE == 32 -# define __unordered_cmp(x, y) \ +# define __unordered_cmp(x, y) \ (__extension__ \ ({ unsigned __r; \ if (sizeof(x) == 4 && sizeof(y) == 4) \ @@ -47,16 +47,16 @@ } \ __r; })) -# define isgreater(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (2 << 10)) -# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & (1 << 10)) == 0) -# define isless(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (1 << 10)) -# define islessequal(x, y) ((__unordered_cmp (x, y) & (2 << 10)) == 0) -# define islessgreater(x, y) (((__unordered_cmp (x, y) + (1 << 10)) & (2 << 10)) != 0) -# define isunordered(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (3 << 10)) +# define isgreater(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (2 << 10)) +# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & (1 << 10)) == 0) +# define isless(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (1 << 10)) +# define islessequal(x, y) ((__unordered_cmp (x, y) & (2 << 10)) == 0) +# define islessgreater(x, y) (((__unordered_cmp (x, y) + (1 << 10)) & (2 << 10)) != 0) +# define isunordered(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (3 << 10)) -#else /* sparc64 */ +# else /* sparc64 */ -# define __unordered_v9cmp(x, y, op, qop) \ +# define __unordered_v9cmp(x, y, op, qop) \ (__extension__ \ ({ unsigned __r; \ if (sizeof(x) == 4 && sizeof(y) == 4) \ @@ -79,29 +79,32 @@ } \ __r; })) -# define isgreater(x, y) __unordered_v9cmp(x, y, "g", _Qp_cmp (&__x, &__y) == 2) -# define isgreaterequal(x, y) __unordered_v9cmp(x, y, "ge", (_Qp_cmp (&__x, &__y) & 1) == 0) -# define isless(x, y) __unordered_v9cmp(x, y, "l", _Qp_cmp (&__x, &__y) == 1) -# define islessequal(x, y) __unordered_v9cmp(x, y, "le", (_Qp_cmp (&__x, &__y) & 2) == 0) -# define islessgreater(x, y) __unordered_v9cmp(x, y, "lg", ((_Qp_cmp (&__x, &__y) + 1) & 2) != 0) -# define isunordered(x, y) __unordered_v9cmp(x, y, "u", _Qp_cmp (&__x, &__y) == 3) +# define isgreater(x, y) __unordered_v9cmp(x, y, "g", _Qp_cmp (&__x, &__y) == 2) +# define isgreaterequal(x, y) __unordered_v9cmp(x, y, "ge", (_Qp_cmp (&__x, &__y) & 1) == 0) +# define isless(x, y) __unordered_v9cmp(x, y, "l", _Qp_cmp (&__x, &__y) == 1) +# define islessequal(x, y) __unordered_v9cmp(x, y, "le", (_Qp_cmp (&__x, &__y) & 2) == 0) +# define islessgreater(x, y) __unordered_v9cmp(x, y, "lg", ((_Qp_cmp (&__x, &__y) + 1) & 2) != 0) +# define isunordered(x, y) __unordered_v9cmp(x, y, "u", _Qp_cmp (&__x, &__y) == 3) -#endif /* sparc64 */ +# endif /* sparc64 */ #endif /* __USE_ISOC99 */ #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) && defined __OPTIMIZE__ -#ifdef __cplusplus -# define __MATH_INLINE __inline -#else -# define __MATH_INLINE extern __inline -#endif /* __cplusplus */ +# ifdef __cplusplus +# define __MATH_INLINE __inline +# else +# define __MATH_INLINE extern __inline +# endif /* __cplusplus */ /* The gcc, version 2.7 or below, has problems with all this inlining code. So disable it for this version of the compiler. */ # if __GNUC_PREREQ (2, 8) - /* Test for negative number. Used in the signbit() macro. */ + +# ifdef __USE_ISOC99 + +/* Test for negative number. Used in the signbit() macro. */ __MATH_INLINE int __signbitf (float __x) __THROW { @@ -109,7 +112,7 @@ __signbitf (float __x) __THROW return __u.__i < 0; } -#if __WORDSIZE == 32 +# if __WORDSIZE == 32 __MATH_INLINE int __signbit (double __x) __THROW @@ -124,28 +127,30 @@ __signbitl (long double __x) __THROW return __signbit ((double)__x); } -#else /* sparc64 */ +# else /* sparc64 */ __MATH_INLINE int __signbit (double __x) __THROW { - __extension__ union { double __d; long __i; } __u = { __d: __x }; + __extension__ union { double __d; long int __i; } __u = { __d: __x }; return __u.__i < 0; } __MATH_INLINE int __signbitl (long double __x) __THROW { - __extension__ union { long double __l; long __i[2]; } __u = { __l: __x }; + __extension__ union { long double __l; long int __i[2]; } __u = { __l: __x }; return __u.__i[0] < 0; } -#endif /* sparc64 */ +# endif /* sparc64 */ -#ifndef __NO_MATH_INLINES +# endif /* __USE_ISOC99 */ + +# ifndef __NO_MATH_INLINES __MATH_INLINE double -sqrt(double __x) __THROW +sqrt (double __x) __THROW { register double __r; __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); @@ -153,30 +158,30 @@ sqrt(double __x) __THROW } __MATH_INLINE float -sqrtf(float __x) __THROW +sqrtf (float __x) __THROW { register float __r; __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x)); return __r; } -#if __WORDSIZE == 64 +# if __WORDSIZE == 64 __MATH_INLINE long double -sqrtl(long double __x) __THROW +sqrtl (long double __x) __THROW { long double __r; - extern void _Qp_sqrt(long double *, __const__ long double *); - _Qp_sqrt(&__r, &__x); + extern void _Qp_sqrt (long double *, __const__ long double *); + _Qp_sqrt (&__r, &__x); return __r; } -#endif /* sparc64 */ +# endif /* sparc64 */ -#endif +# endif /* !__NO_MATH_INLINES */ /* This code is used internally in the GNU libc. */ -#ifdef __LIBC_INTERNAL_MATH_INLINES +# ifdef __LIBC_INTERNAL_MATH_INLINES __MATH_INLINE double -__ieee754_sqrt(double __x) +__ieee754_sqrt (double __x) { register double __r; __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); @@ -184,29 +189,29 @@ __ieee754_sqrt(double __x) } __MATH_INLINE float -__ieee754_sqrtf(float __x) +__ieee754_sqrtf (float __x) { register float __r; __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x)); return __r; } -#if __WORDSIZE == 64 +# if __WORDSIZE == 64 __MATH_INLINE long double -__ieee754_sqrtl(long double __x) +__ieee754_sqrtl (long double __x) { long double __r; - extern void _Qp_sqrt(long double *, __const__ long double *); + extern void _Qp_sqrt (long double *, __const__ long double *); _Qp_sqrt(&__r, &__x); return __r; } -#endif /* sparc64 */ -#endif /* __LIBC_INTERNAL_MATH_INLINES */ -#endif /* gcc 2.8+ */ +# endif /* sparc64 */ +# endif /* __LIBC_INTERNAL_MATH_INLINES */ +# endif /* gcc 2.8+ */ -#ifdef __USE_ISOC99 +# ifdef __USE_ISOC99 -#ifndef __NO_MATH_INLINES +# ifndef __NO_MATH_INLINES __MATH_INLINE double fdim (double __x, double __y); __MATH_INLINE double @@ -222,7 +227,7 @@ fdimf (float __x, float __y) return __x < __y ? 0 : __x - __y; } -#endif /* !__NO_MATH_INLINES */ -#endif /* __USE_ISOC99 */ +# endif /* !__NO_MATH_INLINES */ +# endif /* __USE_ISOC99 */ #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ #endif /* __GNUC__ */ diff -durpN glibc-2.2.4/sysdeps/sparc/gccframe.h glibc-2.2.5/sysdeps/sparc/gccframe.h --- glibc-2.2.4/sysdeps/sparc/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/sparc/gccframe.h Thu Nov 15 17:14:10 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. sparc version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define FIRST_PSEUDO_REGISTER 101 + +#include diff -durpN glibc-2.2.4/sysdeps/sparc/sparc32/dl-machine.h glibc-2.2.5/sysdeps/sparc/sparc32/dl-machine.h --- glibc-2.2.4/sysdeps/sparc/sparc32/dl-machine.h Mon Jul 23 10:56:34 2001 +++ glibc-2.2.5/sysdeps/sparc/sparc32/dl-machine.h Sat Sep 8 10:13:35 2001 @@ -177,13 +177,13 @@ elf_machine_runtime_setup (struct link_m TRAMPOLINE_TEMPLATE (_dl_runtime_profile, fixup); #endif -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_SPARC_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_SPARC_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_SPARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_SPARC_JMP_SLOT @@ -344,7 +344,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Sym *sym, const struct r_found_version *version, Elf32_Addr *const reloc_addr) { -#ifndef RTLD_BOOTSTRAP + const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); + +#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC /* This is defined in rtld.c, but nowhere in the static libc.a; make the reference weak so static programs can still link. This declaration cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) @@ -353,14 +355,16 @@ elf_machine_rela (struct link_map *map, weak_extern (_dl_rtld_map); #endif - if (ELF32_R_TYPE (reloc->r_info) == R_SPARC_RELATIVE) +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0)) { -#ifndef RTLD_BOOTSTRAP +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC if (map != &_dl_rtld_map) /* Already done in rtld itself. */ -#endif +# endif *reloc_addr += map->l_addr + reloc->r_addend; } else +#endif { #ifndef RTLD_BOOTSTRAP const Elf32_Sym *const refsym = sym; @@ -371,13 +375,13 @@ elf_machine_rela (struct link_map *map, value = map->l_addr; else { - value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; } value += reloc->r_addend; /* Assume copy relocs have zero addend. */ - switch (ELF32_R_TYPE (reloc->r_info)) + switch (r_type) { #ifndef RTLD_BOOTSTRAP case R_SPARC_COPY: @@ -449,11 +453,18 @@ elf_machine_rela (struct link_map *map, break; #if !defined RTLD_BOOTSTRAP || defined _NDEBUG default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; #endif } } +} + +static inline void +elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, + Elf32_Addr *const reloc_addr) +{ + *reloc_addr += l_addr + reloc->r_addend; } static inline void diff -durpN glibc-2.2.4/sysdeps/sparc/sparc32/fpu/libm-test-ulps glibc-2.2.5/sysdeps/sparc/sparc32/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/sparc/sparc32/fpu/libm-test-ulps Mon Jul 23 10:56:35 2001 +++ glibc-2.2.5/sysdeps/sparc/sparc32/fpu/libm-test-ulps Sun Sep 30 15:45:38 2001 @@ -451,6 +451,16 @@ ifloat: 1 Test "j0 (2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +float: 1 +ifloat: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +float: 1 +ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 diff -durpN glibc-2.2.4/sysdeps/sparc/sparc64/dl-machine.h glibc-2.2.5/sysdeps/sparc/sparc64/dl-machine.h --- glibc-2.2.4/sysdeps/sparc/sparc64/dl-machine.h Mon Jul 23 10:56:38 2001 +++ glibc-2.2.5/sysdeps/sparc/sparc64/dl-machine.h Sun Sep 30 15:44:56 2001 @@ -64,12 +64,12 @@ elf_machine_load_address (void) : "=r"(pc), "=r"(la)); return pc - *(Elf64_Addr *)(elf_pic_register + la); - + Unfortunately as binutils tries to work around Solaris dynamic linker bug which resolves R_SPARC_RELATIVE as X += B + A instead of X = B + A this does not work any longer, since ld clears it. - + The following method relies on the fact that sparcv9 ABI maximal page length is 1MB and all ELF segments on sparc64 are aligned to 1MB. Also, it relies on _DYNAMIC coming after _GLOBAL_OFFSET_TABLE_ @@ -84,41 +84,51 @@ elf_machine_load_address (void) /* We have 4 cases to handle. And we code different code sequences for each one. I love V9 code models... */ -static inline Elf64_Addr -elf_machine_fixup_plt (struct link_map *map, lookup_t t, - const Elf64_Rela *reloc, - Elf64_Addr *reloc_addr, Elf64_Addr value) +static inline void +sparc64_fixup_plt (struct link_map *map, const Elf64_Rela *reloc, + Elf64_Addr *reloc_addr, Elf64_Addr value, + Elf64_Addr high, int t) { unsigned int *insns = (unsigned int *) reloc_addr; Elf64_Addr plt_vaddr = (Elf64_Addr) reloc_addr; + Elf64_Sxword disp = value - plt_vaddr; /* Now move plt_vaddr up to the call instruction. */ - plt_vaddr += (2 * 4); + plt_vaddr += ((t + 1) * 4); /* PLT entries .PLT32768 and above look always the same. */ - if (__builtin_expect (reloc->r_addend, 0) != 0) + if (__builtin_expect (high, 0) != 0) { *reloc_addr = value - map->l_addr; } + /* Near destination. */ + else if (disp >= -0x800000 && disp < 0x800000) + { + /* As this is just one instruction, it is thread safe and so + we can avoid the unnecessary sethi FOO, %g1. + b,a target */ + insns[0] = 0x30800000 | ((disp >> 2) & 0x3fffff); + __asm __volatile ("flush %0" : : "r" (insns)); + } /* 32-bit Sparc style, the target is in the lower 32-bits of address space. */ - else if ((value >> 32) == 0) + else if (insns += t, (value >> 32) == 0) { /* sethi %hi(target), %g1 jmpl %g1 + %lo(target), %g0 */ - insns[2] = 0x81c06000 | (value & 0x3ff); - __asm __volatile ("flush %0 + 8" : : "r" (insns)); - - insns[1] = 0x03000000 | ((unsigned int)(value >> 10)); + insns[1] = 0x81c06000 | (value & 0x3ff); __asm __volatile ("flush %0 + 4" : : "r" (insns)); + + insns[0] = 0x03000000 | ((unsigned int)(value >> 10)); + __asm __volatile ("flush %0" : : "r" (insns)); } /* We can also get somewhat simple sequences if the distance between the target and the PLT entry is within +/- 2GB. */ else if ((plt_vaddr > value - && ((plt_vaddr - value) >> 32) == 0) + && ((plt_vaddr - value) >> 31) == 0) || (value > plt_vaddr - && ((value - plt_vaddr) >> 32) == 0)) + && ((value - plt_vaddr) >> 31) == 0)) { unsigned int displacement; @@ -131,14 +141,14 @@ elf_machine_fixup_plt (struct link_map * call displacement mov %g1, %o7 */ - insns[3] = 0x9e100001; - __asm __volatile ("flush %0 + 12" : : "r" (insns)); - - insns[2] = 0x40000000 | (displacement >> 2); + insns[2] = 0x9e100001; __asm __volatile ("flush %0 + 8" : : "r" (insns)); - insns[1] = 0x8210000f; + insns[1] = 0x40000000 | (displacement >> 2); __asm __volatile ("flush %0 + 4" : : "r" (insns)); + + insns[t] = 0x8210000f; + __asm __volatile ("flush %0" : : "r" (insns)); } /* Worst case, ho hum... */ else @@ -149,33 +159,62 @@ elf_machine_fixup_plt (struct link_map * /* ??? Some tricks can be stolen from the sparc64 egcs backend constant formation code I wrote. -DaveM */ - /* sethi %hh(value), %g1 - sethi %lm(value), %g5 - or %g1, %hm(value), %g1 - or %g5, %lo(value), %g5 - sllx %g1, 32, %g1 - jmpl %g1 + %g5, %g0 - nop */ + if (__builtin_expect (high32 & 0x3ff, 0)) + { + /* sethi %hh(value), %g1 + sethi %lm(value), %g5 + or %g1, %hm(value), %g1 + or %g5, %lo(value), %g5 + sllx %g1, 32, %g1 + jmpl %g1 + %g5, %g0 + nop */ - insns[6] = 0x81c04005; - __asm __volatile ("flush %0 + 24" : : "r" (insns)); + insns[5] = 0x81c04005; + __asm __volatile ("flush %0 + 20" : : "r" (insns)); - insns[5] = 0x83287020; - __asm __volatile ("flush %0 + 20" : : "r" (insns)); + insns[4] = 0x83287020; + __asm __volatile ("flush %0 + 16" : : "r" (insns)); - insns[4] = 0x8a116000 | (low32 & 0x3ff); - __asm __volatile ("flush %0 + 16" : : "r" (insns)); + insns[3] = 0x8a116000 | (low32 & 0x3ff); + __asm __volatile ("flush %0 + 12" : : "r" (insns)); - insns[3] = 0x82106000 | (high32 & 0x3ff); - __asm __volatile ("flush %0 + 12" : : "r" (insns)); + insns[2] = 0x82106000 | (high32 & 0x3ff); + } + else + { + /* sethi %hh(value), %g1 + sethi %lm(value), %g5 + sllx %g1, 32, %g1 + or %g5, %lo(value), %g5 + jmpl %g1 + %g5, %g0 + nop */ + + insns[4] = 0x81c04005; + __asm __volatile ("flush %0 + 16" : : "r" (insns)); + + insns[3] = 0x8a116000 | (low32 & 0x3ff); + __asm __volatile ("flush %0 + 12" : : "r" (insns)); + + insns[2] = 0x83287020; + } - insns[2] = 0x0b000000 | (low32 >> 10); __asm __volatile ("flush %0 + 8" : : "r" (insns)); - insns[1] = 0x03000000 | (high32 >> 10); + insns[1] = 0x0b000000 | (low32 >> 10); __asm __volatile ("flush %0 + 4" : : "r" (insns)); + + insns[0] = 0x03000000 | (high32 >> 10); + __asm __volatile ("flush %0" : : "r" (insns)); } +} +static inline Elf64_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf64_Rela *reloc, + Elf64_Addr *reloc_addr, Elf64_Addr value) +{ + sparc64_fixup_plt (map, reloc, reloc_addr, value + reloc->r_addend, + reloc->r_addend, 1); return value; } @@ -184,7 +223,10 @@ static inline Elf64_Addr elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, Elf64_Addr value) { - return value + reloc->r_addend; + /* Don't add addend here, but in elf_machine_fixup_plt instead. + value + reloc->r_addend is the value which should actually be + stored into .plt data slot. */ + return value; } #ifdef RESOLVE @@ -197,23 +239,17 @@ elf_machine_rela (struct link_map *map, const Elf64_Sym *sym, const struct r_found_version *version, Elf64_Addr *const reloc_addr) { -#ifndef RTLD_BOOTSTRAP - /* This is defined in rtld.c, but nowhere in the static libc.a; make the - reference weak so static programs can still link. This declaration - cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) - because rtld.c contains the common defn for _dl_rtld_map, which is - incompatible with a weak decl in the same file. */ - weak_extern (_dl_rtld_map); -#endif + const unsigned long int r_type = ELF64_R_TYPE_ID (reloc->r_info); - if (ELF64_R_TYPE_ID (reloc->r_info) == R_SPARC_RELATIVE) - { -#ifndef RTLD_BOOTSTRAP - if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0)) + *reloc_addr = map->l_addr + reloc->r_addend; +# ifndef RTLD_BOOTSTRAP + else if (r_type == R_SPARC_NONE) /* Who is Wilbur? */ + return; +# endif + else #endif - *reloc_addr = map->l_addr + reloc->r_addend; - } - else if (ELF64_R_TYPE_ID (reloc->r_info) != R_SPARC_NONE) /* Who is Wilbur? */ { #ifndef RTLD_BOOTSTRAP const Elf64_Sym *const refsym = sym; @@ -224,13 +260,13 @@ elf_machine_rela (struct link_map *map, value = map->l_addr; else { - value = RESOLVE (&sym, version, ELF64_R_TYPE_ID (reloc->r_info)); + value = RESOLVE (&sym, version, r_type); if (sym) value += sym->st_value; } value += reloc->r_addend; /* Assume copy relocs have zero addend. */ - switch (ELF64_R_TYPE_ID (reloc->r_info)) + switch (r_type) { #ifndef RTLD_BOOTSTRAP case R_SPARC_COPY: @@ -335,7 +371,8 @@ elf_machine_rela (struct link_map *map, break; #endif case R_SPARC_JMP_SLOT: - elf_machine_fixup_plt(map, 0, reloc, reloc_addr, value); + sparc64_fixup_plt (map, reloc, reloc_addr, value, + reloc->r_addend, 0); break; #ifndef RTLD_BOOTSTRAP case R_SPARC_UA16: @@ -368,7 +405,7 @@ elf_machine_rela (struct link_map *map, #endif #if !defined RTLD_BOOTSTRAP || defined _NDEBUG default: - _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0); + _dl_reloc_bad_type (map, r_type, 0); break; #endif } @@ -376,6 +413,13 @@ elf_machine_rela (struct link_map *map, } static inline void +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + Elf64_Addr *const reloc_addr) +{ + *reloc_addr = l_addr + reloc->r_addend; +} + +static inline void elf_machine_lazy_rel (struct link_map *map, Elf64_Addr l_addr, const Elf64_Rela *reloc) { @@ -393,13 +437,13 @@ elf_machine_lazy_rel (struct link_map *m #endif /* RESOLVE */ -/* Nonzero iff TYPE should not be allowed to resolve to one of - the main executable's symbols, as for a COPY reloc. */ -#define elf_machine_lookup_noexec_p(type) ((type) == R_SPARC_COPY) - -/* Nonzero iff TYPE describes relocation of a PLT entry, so - PLT entries should not be allowed to define the value. */ -#define elf_machine_lookup_noplt_p(type) ((type) == R_SPARC_JMP_SLOT) +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_SPARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY)) /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_SPARC_JMP_SLOT @@ -424,6 +468,7 @@ elf_machine_runtime_setup (struct link_m extern void _dl_runtime_profile_1 (void); Elf64_Addr res0_addr, res1_addr; unsigned int *plt = (void *) D_PTR (l, l_info[DT_PLTGOT]); + int i = 0; if (! profile) { @@ -472,13 +517,21 @@ elf_machine_runtime_setup (struct link_m */ plt[8 + 0] = 0x9de3bf40; + if (__builtin_expect (((res1_addr + 4) >> 32) & 0x3ff, 0)) + i = 1; + else + res1_addr += 4; plt[8 + 1] = 0x21000000 | (res1_addr >> (64 - 22)); plt[8 + 2] = 0x23000000 | ((res1_addr >> 10) & 0x003fffff); - plt[8 + 3] = 0xa0142000 | ((res1_addr >> 32) & 0x3ff); + if (__builtin_expect (i, 0)) + plt[8 + 3] = 0xa0142000 | ((res1_addr >> 32) & 0x3ff); + else + plt[8 + 3] = 0xa12c3020; plt[8 + 4] = 0xa2146000 | (res1_addr & 0x3ff); - plt[8 + 5] = 0xa12c3020; - plt[8 + 6] = 0xadc40011; - plt[8 + 7] = 0x9330700c; + if (__builtin_expect (i, 0)) + plt[8 + 5] = 0xa12c3020; + plt[8 + 5 + i] = 0xadc40011; + plt[8 + 6 + i] = 0x9330700c; /* Now put the magic cookie at the beginning of .PLT2 Entry .PLT3 is unused by this implementation. */ @@ -525,10 +578,11 @@ elf_machine_runtime_setup (struct link_m "\n" \ " .globl " #tramp_name "_1\n" \ " .type " #tramp_name "_1, @function\n" \ -" .align 32\n" \ +" ! tramp_name_1 + 4 needs to be .align 32\n" \ "\t" #tramp_name "_1:\n" \ +" sub %l6, 4, %l6\n" \ " ! srlx %g1, 12, %o1 - Done in .PLT1\n" \ -" ldx [%l6 + 8], %o0\n" \ +" ldx [%l6 + 12], %o0\n" \ " add %o1, %o1, %o3\n" \ " sub %o1, 96, %o1 ! No thanks to Sun for not obeying their own ABI\n" \ " mov %i7, %o2\n" \ diff -durpN glibc-2.2.4/sysdeps/sparc/sparc64/fpu/libm-test-ulps glibc-2.2.5/sysdeps/sparc/sparc64/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/sparc/sparc64/fpu/libm-test-ulps Mon Jul 23 10:56:39 2001 +++ glibc-2.2.5/sysdeps/sparc/sparc64/fpu/libm-test-ulps Sun Sep 30 16:32:42 2001 @@ -562,6 +562,16 @@ ifloat: 1 Test "j0 (2.0) == 0.22389077914123566805": float: 2 ifloat: 2 +Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +float: 1 +ifloat: 1 +Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1" +double: 1 +idouble: 1 +float: 1 +ifloat: 1 Test "j0 (8.0) == 0.17165080713755390609": float: 1 ifloat: 1 diff -durpN glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/Dist glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/Dist --- glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/Dist Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/Dist Tue Jan 8 13:33:26 2002 @@ -0,0 +1 @@ +cmsg_nxthdr.c diff -durpN glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/Makefile glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/Makefile --- glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/Makefile Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/Makefile Wed Aug 22 15:29:39 2001 @@ -0,0 +1,3 @@ +ifeq ($(subdir),socket) +sysdep_routines += cmsg_nxthdr +endif diff -durpN glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/Versions glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/Versions --- glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/Versions Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/Versions Wed Aug 22 15:29:39 2001 @@ -0,0 +1,6 @@ +libc { + GLIBC_2.2.5 { + # functions used in inline functions or macros + __cmsg_nxthdr; + } +} diff -durpN glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/bits/socket.h glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/bits/socket.h --- glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/bits/socket.h Wed Jul 25 14:42:24 2001 +++ glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/bits/socket.h Tue Sep 25 22:23:08 2001 @@ -199,12 +199,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) @@ -237,8 +238,8 @@ __cmsg_nxthdr (struct msghdr *__mhdr, st __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ @@ -250,8 +251,12 @@ __cmsg_nxthdr (struct msghdr *__mhdr, st /* Socket level message types. */ enum { - SCM_RIGHTS = 0x01 /* Access rights. */ + SCM_RIGHTS = 0x01, /* Access rights (array of int). */ #define SCM_RIGHTS SCM_RIGHTS + SCM_TIMESTAMP = 0x02, /* Timestamp (struct timeval). */ +#define SCM_TIMESTAMP SCM_TIMESTAMP + SCM_CREDS = 0x03 /* Process creds (strcm cmsgcred). */ +#define SCM_CREDS SCM_CREDS }; diff -durpN glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c --- glibc-2.2.4/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c Wed Aug 22 15:29:39 2001 @@ -0,0 +1,2 @@ +/* The Linux version is perfectly usable on 4.4 BSD. */ +#include diff -durpN glibc-2.2.4/sysdeps/unix/bsd/ulimit.c glibc-2.2.5/sysdeps/unix/bsd/ulimit.c --- glibc-2.2.4/sysdeps/unix/bsd/ulimit.c Mon Jul 23 10:56:50 2001 +++ glibc-2.2.5/sysdeps/unix/bsd/ulimit.c Mon Sep 24 23:59:23 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 96, 97, 98, 2001 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 @@ -60,8 +60,16 @@ ulimit (int cmd, ...) { long int newlimit = va_arg (va, long int); - limit.rlim_cur = newlimit * 512; - limit.rlim_max = newlimit * 512; + if ((rlim_t) newlimit > RLIM_INFINITY / 512) + { + limit.rlim_cur = RLIM_INFINITY; + limit.rlim_max = RLIM_INFINITY; + } + else + { + limit.rlim_cur = newlimit * 512; + limit.rlim_max = newlimit * 512; + } result = setrlimit (RLIMIT_FSIZE, &limit); } diff -durpN glibc-2.2.4/sysdeps/unix/make-syscalls.sh glibc-2.2.5/sysdeps/unix/make-syscalls.sh --- glibc-2.2.4/sysdeps/unix/make-syscalls.sh Mon Mar 26 20:53:31 2001 +++ glibc-2.2.5/sysdeps/unix/make-syscalls.sh Wed Sep 12 15:19:30 2001 @@ -74,8 +74,9 @@ while read file srcfile caller syscall a callnum=- eval `{ echo "#include "; echo "callnum=SYS_ify ($syscall)"; } | - $asm_CPP - |sed -n -e "/^callnum=.*$syscall/d" \ - -e "/^\(callnum=\)[ ]*\(.*\)/s//\1'\2'/p"` + $asm_CPP -D__OPTIMIZE__ - | + sed -n -e "/^callnum=.*$syscall/d" \ + -e "/^\(callnum=\)[ ]*\(.*\)/s//\1'\2'/p"` # Derive the number of arguments from the argument signature case $args in diff -durpN glibc-2.2.4/sysdeps/unix/sockatmark.c glibc-2.2.5/sysdeps/unix/sockatmark.c --- glibc-2.2.4/sysdeps/unix/sockatmark.c Thu Jul 5 21:56:07 2001 +++ glibc-2.2.5/sysdeps/unix/sockatmark.c Thu Aug 16 23:44:34 2001 @@ -24,5 +24,5 @@ int sockatmark (fd) int fd; { - return ioctl (fd, SIOCATMARK); + return __ioctl (fd, SIOCATMARK); } diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/Dist glibc-2.2.5/sysdeps/unix/sysv/aix/Dist --- glibc-2.2.4/sysdeps/unix/sysv/aix/Dist Fri Jul 27 23:13:33 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/Dist Tue Jan 8 13:34:59 2002 @@ -9,5 +9,7 @@ dlldr.h kernel_proto.h bits/utmpx.h gnu/lib-names.h +start-libc.c +sysv_termio.h uitrunc.c utmpx.h diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/Makefile glibc-2.2.5/sysdeps/unix/sysv/aix/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/aix/Makefile Mon Jul 23 10:57:01 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/Makefile Sat Sep 8 10:22:27 2001 @@ -2,6 +2,21 @@ # This is a hack until the import/export stuff is worked out. +postctor += /lib/syscalls.exp +ifeq ($(subdir),csu) + +sysdep_routines += aix-syscalls + +# +# The foo.c is a workaround for the linker complaining about no input files. +$(objpfx)aix-syscalls.o : /lib/syscalls.exp + echo "static int a;" > foo.c + $(CC) -c foo.c + ld -bM:SRE -bpT:0x00000000 -bpD:0x00000000 -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@ + rm foo.c foo.o + + +endif + ifeq ($(subdir),misc) sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \ dl-close dl-addr uitrunc diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/aix/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/aix/bits/socket.h Mon Jul 23 10:57:05 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/bits/socket.h Tue Sep 25 22:23:09 2001 @@ -203,14 +203,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 - unsigned char __cmsg_data[0]; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L + __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ #endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/bits/types.h glibc-2.2.5/sysdeps/unix/sysv/aix/bits/types.h --- glibc-2.2.4/sysdeps/unix/sysv/aix/bits/types.h Mon Jul 23 10:57:05 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/bits/types.h Wed Aug 15 22:32:49 2001 @@ -71,7 +71,7 @@ typedef int __pid_t; /* Type of proces typedef long int __ssize_t; /* Type of a byte count, or error. */ typedef __u_long __rlim_t; /* Type of resource counts. */ typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_long __id_t; /* General type for ID. */ +typedef unsigned int __id_t; /* General type for ID. */ typedef struct { @@ -82,7 +82,7 @@ typedef struct typedef long int __daddr_t; /* The type of a disk address. */ typedef char *__caddr_t; typedef long int __time_t; -typedef __u_long __useconds_t; +typedef unsigned int __useconds_t; typedef int __suseconds_t; typedef long int __swblk_t; /* Type of a swap block maybe? */ @@ -128,7 +128,7 @@ typedef int __t_scalar_t; typedef unsigned int __t_uscalar_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; +typedef signed long __intptr_t; /* Duplicate info from sys/socket.h. */ typedef unsigned int __socklen_t; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/fcntl.c glibc-2.2.5/sysdeps/unix/sysv/aix/fcntl.c --- glibc-2.2.4/sysdeps/unix/sysv/aix/fcntl.c Mon Jul 23 10:57:02 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/fcntl.c Sat Sep 8 10:40:41 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,3 +38,4 @@ __fcntl (int fdes, int cmd, ...) return res; } strong_alias (__fcntl, fcntl) +strong_alias (__fcntl, __libc_fcntl) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/init-first.c glibc-2.2.5/sysdeps/unix/sysv/aix/init-first.c --- glibc-2.2.4/sysdeps/unix/sysv/aix/init-first.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/init-first.c Sat Sep 22 14:19:47 2001 @@ -0,0 +1,111 @@ +/* Initialization code run first thing by the XCOFF startup code. AIX version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SHARED +# include +# include "dl-osinfo.h" +#endif + +extern void __libc_init (int, char **, char **); + +/* The function is called from assembly stubs the compiler can't see. */ +static void init (int, char **, char **) __attribute__ ((unused)); + +extern int _dl_starting_up; +weak_extern (_dl_starting_up) + +extern fpu_control_t _dl_fpu_control; +extern int _dl_fpu_control_set; + +/* Set nonzero if we have to be prepared for more then one libc being + used in the process. Safe assumption if initializer never runs. */ +int __libc_multiple_libcs = 1; + +/* Remember the command line argument and enviroment contents for + later calls of initializers for dynamic libraries. */ +int __libc_argc; +char **__libc_argv; + + +static void +init (int argc, char **argv, char **envp) +{ +#ifdef USE_NONOPTION_FLAGS + extern void __getopt_clean_environment (char **); +#endif + /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. + If the address would be taken inside the expression the optimizer + would try to be too smart and throws it away. Grrr. */ + + /* XXX disable dl for now + int *dummy_addr = &_dl_starting_up; + + __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ + + /* Save the command-line arguments. */ + __libc_argc = argc; + __libc_argv = argv; + __environ = envp; + +#ifndef SHARED + __libc_init_secure (); +#endif + + __libc_init (argc, argv, envp); + +#ifdef USE_NONOPTION_FLAGS + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (envp); +#endif + +#ifdef SHARED + __libc_global_ctors (); +#endif +} + +#ifdef SHARED + +strong_alias (init, _init); + +extern void __libc_init_first (void); + +void +__libc_init_first (void) +{ +} + +#else +extern void __libc_init_first (int argc, char **argv, char **envp); + +void +__libc_init_first (int argc, char **argv, char **envp) +{ + init (argc, argv, envp); +} +#endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/libc-start.c glibc-2.2.5/sysdeps/unix/sysv/aix/libc-start.c --- glibc-2.2.4/sysdeps/unix/sysv/aix/libc-start.c Sat Apr 7 14:02:39 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/libc-start.c Sat Sep 22 14:28:25 2001 @@ -1 +1,296 @@ -/* stub libc-start.c */ +/* Initialization code run first thing by the XCOFF startup code. AIX version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* hack to use uchar's */ +typedef unsigned char uchar; +#include +#include +#include +#include + +extern void __libc_init_first (int argc, char **argv, char **envp); + +/* XXX disable for now +extern int _dl_starting_up; +weak_extern (_dl_starting_up) +extern int __libc_multiple_libcs; */ + +/* XXX normally defined in generic/dl-sydep.c, hack it into existance +extern void *__libc_stack_end; */ +void *__libc_stack_end; + + struct __libc_start_data_rec { + void *stack; + void *toc; + int argc; + char **argv; + char **envp; + char *data; + char *text; + unsigned mcount; + unsigned special; + int (*main)(int, char **, char **); + void (*init)(void); + void (*fini)(void); + void (*rtld_fini)(void); + }; + +extern struct __libc_start_data_rec __libc_start_data; +extern int errno; + +/* The first piece of initialized data. */ +int __data_start = 0; + +#ifndef HAVE_ELF +/* Since gcc/crtstuff.c won't define it unless the ELF format is used + we will need to define it here. */ +void *__dso_handle = NULL; +#endif + +/* AIX kernel function */ +extern int __loadx (int flag, void *module, void *arg1, void *arg2, + void *arg3); +/* Needed by setenv */ +char **__environ; + +/* Needed by dl-support.c */ +/* XXX stubbing out dl-support.c for now.. + size_t _dl_pagesize = 0; */ + +/* + * Find __rtinit symbol + * + * __RTINIT *find_rtinit() + * + * __RTINIT *rti - pointer to __rtinit data structure + */ + +static __RTINIT * +find_rtinit (void) +{ + struct xcoffhdr *xcoff_hdr; + SCNHDR *sec_hdr; + SCNHDR *ldr_sec_hdr; + SCNHDR *data_sec_hdr; + LDSYM *ldsym_hdr; + __RTINIT *rtl; + + xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text; + sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr + + xcoff_hdr->filehdr.f_opthdr); + ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); + ldsym_hdr = (LDSYM *) ((caddr_t) xcoff_hdr + ldr_sec_hdr->s_scnptr + + LDHDRSZ); + + if (__libc_start_data.mcount <= 0) + { + if (!ldr_sec_hdr->s_scnptr) + return NULL; + + if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof(RTINIT_NAME) - 1) != 0) + return NULL; + } + + data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); + rtl = (__RTINIT *) (ldsym_hdr->l_value + + (__libc_start_data.data - data_sec_hdr->s_vaddr)); + return rtl; +} + +/* The mod_init1 calls every initialization function + for a given module. + + void mod_init1(handler, rti) + + void *handler - if NULL init funtions for modules loaded at exec time + are being executed. Otherwise, the handler points to the + module loaded. + + __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset + not equal to zero) + */ + +static void +mod_init1 (void *handler,__RTINIT *rtl) +{ + __RTINIT_DESCRIPTOR *descriptor; + + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl + + rtl->init_offset); + while (descriptor->f != NULL) + { + if (!(descriptor->flags & _RT_CALLED)) + { + descriptor->flags |= _RT_CALLED; + /* Execute init/fini. */ + descriptor->f (handler, rtl, descriptor); + } + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor + + rtl->__rtinit_descriptor_size); + } +} + +/* The modinit() function performs run-time linking, if enabled, and calling + the init() function for all loaded modules. + + int modinit() + */ + +#define DL_BUFFER_SIZE 1000 + +static int +modinit (void) +{ + int *handler = NULL; + __RTINIT *rtinit_info = NULL; + int flag; + DL_INFO dl_buffer[DL_BUFFER_SIZE]; + DL_INFO *dl_info = dl_buffer; + int i; + + /* Find __rtinit symbols */ + rtinit_info = find_rtinit (); + + flag = DL_EXECQ; + if (rtinit_info && rtinit_info->rtl) + flag |= DL_LOAD_RTL; + + /* Get a list of modules that have __rtinit. */ + if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL)) + exit (0x90); + + if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) + { + rtinit_info = find_rtinit (); + if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) + { + if ((*rtinit_info->rtl) (dl_info, 0)) + exit (0x90); + } + } + + /* Initialization each module loaded that has __rtinit. */ + if (dl_info[0].dlinfo_xflags & DL_INFO_OK) + { + for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i) + if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) + { + rtinit_info = find_rtinit (); + if (rtinit_info) + mod_init1 (handler, rtinit_info); + } + } + + return 0; +} + + +void +__libc_start_init (void) +{ + /* Do run-time linking, if enabled and call the init() + for all loaded modules. */ + if (__libc_start_data.mcount != __libc_start_data.special) + modinit (); +} + +/* For now these are just stubs. */ +void +__libc_start_fini (void) +{ +} + +void +__libc_start_rtld_fini (void) +{ +} + +void +__libc_start_main (void) +{ +#ifndef SHARED + + /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. + If the address would be taken inside the expression the optimizer + would try to be too smart and throws it away. Grrr. */ + + /* XXX disable for now + int *dummy_addr = &_dl_starting_up; + + __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */ +#endif + + /* Store the lowest stack address. */ + __libc_stack_end = __libc_start_data.stack; + + /* Used by setenv */ + __environ = __libc_start_data.envp; + +#ifndef SHARED + /* Clear errno. */ + errno = 0; + + /* Some security at this point. Prevent starting a SUID binary where + the standard file descriptors are not opened. We have to do this + only for statically linked applications since otherwise the dynamic + loader did the work already. */ + if (__builtin_expect (__libc_enable_secure, 0)) + __libc_check_standard_fds (); + +#endif + + /* Register the destructor of the dynamic linker if there is any. */ + if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1)) + __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL); + + /* Call the initializer of the libc. This is only needed here if we + are compiling for the static library in which case we haven't + run the constructors in `_dl_start_user'. */ +#ifndef SHARED + __libc_init_first (__libc_start_data.argc, __libc_start_data.argv, + __libc_start_data.envp); +#endif + + /* Register the destructor of the program, if any. */ + if (__libc_start_data.fini) + __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL); + + /* Call the initializer of the program, if any. */ +#ifdef SHARED + if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0)) + _dl_debug_printf ("\ninitialize program: %s\n\n", + __libc_start_data.argv[0]); +#endif + if (__libc_start_data.init) + (*__libc_start_data.init) (); + +#ifdef SHARED + if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0)) + _dl_debug_printf ("\ntransferring control: %s\n\n", + __libc_start_data.argv[0]); +#endif + + exit ((*__libc_start_data.main) (__libc_start_data.argc, + __libc_start_data.argv, + __libc_start_data.envp)); +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/start-libc.c glibc-2.2.5/sysdeps/unix/sysv/aix/start-libc.c --- glibc-2.2.4/sysdeps/unix/sysv/aix/start-libc.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/start-libc.c Sat Sep 8 10:41:25 2001 @@ -0,0 +1,271 @@ +/* Initialization code run first thing by the XCOFF startup code. AIX version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* hack to use uchar's */ +typedef unsigned char uchar; +#include +#include +#include +#include + +extern void __libc_init_first (int argc, char **argv, char **envp); + +/* XXX disable for now +extern int _dl_starting_up; +weak_extern (_dl_starting_up) +extern int __libc_multiple_libcs; */ + +/* XXX normally defined in generic/dl-sydep.c, hack it into existance +extern void *__libc_stack_end; */ +void *__libc_stack_end; + +struct __libc_start_data_rec +{ + void *stack; + void *toc; + int argc; + char **argv; + char **envp; + char *data; + char *text; + unsigned int mcount; + unsigned int special; + int (*main) (int, char **, char **); + void (*init) (void); + void (*fini) (void); + void (*rtld_fini) (void); +}; + +extern struct __libc_start_data_rec __libc_start_data; +extern int errno; + +/* The first piece of initialized data. */ +int __data_start = 0; + +#ifndef HAVE_ELF +/* Since gcc/crtstuff.c won't define it unless the ELF format is used + we will need to define it here. */ +void *__dso_handle = NULL; +#endif + +/* AIX kernel function */ +extern int __loadx (int flag, void *module, void *arg1, void *arg2, + void *arg3); +/* Needed by setenv */ +char **__environ; + +/* Needed by dl-support.c */ +/* XXX stubbing out dl-support.c for now.. + size_t _dl_pagesize = 0; */ + +/* + Find __rtinit symbol + + __RTINIT *find_rtinit() + + __RTINIT *rti - pointer to __rtinit data structure + */ + +static __RTINIT * +find_rtinit (void) +{ + struct xcoffhdr *xcoff_hdr; + SCNHDR *sec_hdr; + SCNHDR *ldr_sec_hdr; + SCNHDR *data_sec_hdr; + LDSYM *ldsym_hdr; + __RTINIT *rtl; + + xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text; + sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr + + xcoff_hdr->filehdr.f_opthdr); + ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); + ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr + + LDHDRSZ); + + if ( __libc_start_data.mcount <= 0) + { + if (!ldr_sec_hdr->s_scnptr) + return (__RTINIT *) 0; + + if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof (RTINIT_NAME) - 1)) + return (__RTINIT *) 0; + } + + data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); + rtl = (__RTINIT *) (ldsym_hdr->l_value + + (__libc_start_data.data - data_sec_hdr->s_vaddr)); + return rtl; +} + +/* + The mod_init1 calls every initialization function for a given module. + + void mod_init1(handler, rti) + + void *handler - if NULL init funtions for modules loaded at exec time + are being executed. Otherwise, the handler points to the + module loaded. + + __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset + not equal to zero) + */ + +static void +mod_init1 (void *handler,__RTINIT *rtl) +{ + __RTINIT_DESCRIPTOR *descriptor; + + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl + + rtl->init_offset); + while (descriptor->f != NULL) + { + if (!(descriptor->flags & _RT_CALLED)) + { + descriptor->flags |= _RT_CALLED; + (descriptor->f) (handler, rtl, descriptor); /* execute init/fini */ + } + descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor + + rtl->__rtinit_descriptor_size); + } +} + +/* The modinit() function performs run-time linking, if enabled, and calling + the init() function for all loaded modules. */ + +#define DL_BUFFER_SIZE 1000 + +static int +modinit (void) +{ + int *handler = 0; + __RTINIT *rtinit_info = 0; + int flag; + DL_INFO dl_buffer[DL_BUFFER_SIZE]; + DL_INFO *dl_info = dl_buffer; + int i; + + /* Find __rtinit symbols */ + rtinit_info = find_rtinit (); + + flag = DL_EXECQ; + if (rtinit_info && rtinit_info->rtl) + flag |= DL_LOAD_RTL; + + /* Get a list of modules that have __rtinit */ + if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL)) + exit (0x90); + + if (dl_info[0].dlinfo_xflags & DL_INFO_OK) + { + rtinit_info = find_rtinit (); + if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) + { + if ((*rtinit_info->rtl) (dl_info, 0)) + exit (0x90); + } + } + + /* Initialization each module loaded that has __rtinit. */ + if (dl_info[0].dlinfo_xflags & DL_INFO_OK) + { + for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i) + if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) + { + rtinit_info = find_rtini t(); + if (rtinit_info) + mod_init1 (handler, rtinit_info); + } + } + + return 0; +} + + +void +__libc_start_init (void) +{ + /* Do run-time linking, if enabled and call the init() + for all loaded modules. */ + if (__libc_start_data.mcount != __libc_start_data.special) + modinit (); +} + +/* For now these are just stubs. */ +void +__libc_start_fini (void) +{ +} + +void +__libc_start_rtld_fini (void) +{ +} + + +int +__libc_start_main (void) +{ + /* Store the lowest stack address. */ + __libc_stack_end = __libc_start_data.stack; + + /* Used by setenv */ + __environ = __libc_start_data.envp; + +#ifndef SHARED + /* Clear errno. */ + errno = 0; + + /* Some security at this point. Prevent starting a SUID binary where + the standard file descriptors are not opened. We have to do this + only for statically linked applications since otherwise the dynamic + loader did the work already. */ + if (__builtin_expect (__libc_enable_secure, 0)) + __libc_check_standard_fds (); + +#endif + + /* Register the destructor of the dynamic linker if there is any. */ + if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1)) + __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL); + + /* Call the initializer of the libc. This is only needed here if we + are compiling for the static library in which case we haven't + run the constructors in `_dl_start_user'. */ +#ifndef SHARED + __libc_init_first (__libc_start_data.argc, __libc_start_data.argv, + __libc_start_data.envp); +#endif + + /* Register the destructor of the program, if any. */ + if (__libc_start_data.fini) + __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL); + + /* Call the initializer of the program, if any. */ + if (__libc_start_data.init) + (*__libc_start_data.init) (); + + exit ((*__libc_start_data.main) (__libc_start_data.argc, + __libc_start_data.argv, + __libc_start_data.envp)); +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/start.c glibc-2.2.5/sysdeps/unix/sysv/aix/start.c --- glibc-2.2.4/sysdeps/unix/sysv/aix/start.c Mon Jul 23 10:57:04 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/start.c Wed Dec 31 16:00:00 1969 @@ -1,294 +0,0 @@ -/* Copyright (C) 1991, 93, 1995-1998, 2000, 2001 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - - -/* Old compatibility names for C types. */ -typedef unsigned char uchar; /* sb in libc/posix/types.h */ - -#include -#include -#include -#include -#include -#include -#include - -/* The first piece of initialized data. */ -int __data_start = 0; - -#ifndef HAVE_ELF -/* Since gcc/crtstuff.c won't define it unless the ELF format is used - we will need to define it here. */ -void *__dso_handle = NULL; -#endif - -extern int errno; - -/* extern __pthread_init; */ - -typedef void (*FPV)(void); - -typedef struct crt0_info -{ - int *p_argc; - FPV threads_init; -} INFO; - - -INFO crt0_info; -int argc; -char **argv; -char **__environ; -int module_count; -caddr_t text_origin; -caddr_t data_origin; - -asm(" - .toc -LL..0: .tc argc[TC],argc -LL..1: .tc argv[TC],argv -LL..2: .tc __environ[TC],__environ -LL..3: .tc module_count[TC],module_count -LL..4: .tc text_origin[TC],text_origin -LL..5: .tc data_origin[TC],data_origin -"); - -int main (int argc,char **argv,char **__environ); -int modinit(int argc,INFO *crt0_info, int module_count, - caddr_t text_origin, caddr_t data_origin); - -void mod_init1(void *handler,__RTINIT *rti); - -__RTINIT *find_rtinit(caddr_t text_origin,caddr_t data_origin, int module_count); - -extern int *__loadx(); - -void __start(void) -{ -#ifdef __64BIT__ -asm(" - ld 17,LL..0(2) # argc - std 14,0(17) # copy reg14 to argc - ld 17,LL..1(2) # argv - std 15,0(17) # copy reg15 to argv - ld 17,LL..2(2) # envp - std 16,0(17) # copy reg16 to envp - ld 17,LL..3(2) # module_count - std 30,0(17) # copy reg30 to module_count - ld 17,LL..4(2) # text_origin - std 29,0(17) # copy reg29 to text_origin - ld 17,LL..5(2) # data_origin - std 28,0(17) # copy reg28 to data_origin -"); -#else -asm(" - lwz 17,LL..0(2) # argc - stw 3,0(17) # copy reg3 to argc - lwz 17,LL..1(2) # argv - stw 4,0(17) # copy reg4 to argv - lwz 17,LL..2(2) # envp - stw 5,0(17) # copy reg5 to envp - lwz 17,LL..3(2) # module_count - stw 30,0(17) # copy reg30 to module_count - lwz 17,LL..4(2) # text_origin - stw 29,0(17) # copy reg29 to text_origin - lwz 17,LL..5(2) # data_origin - stw 28,0(17) # copy reg28 to data_origin -"); -#endif - crt0_info.p_argc = (int*)&argc; - -/* crt0_info.threads_init = (FPV) &__pthread_init; */ - - /* - * Do run-time linking, if enabled and call the init() - * for all loaded modules. - */ - argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin); - - errno=0; - /* - * Call the user program. - */ - exit (main (argc, argv, __environ)); -} - -/* - * The modinit() function performs run-time linking, - * if enabled, and calling the init() function for - * all loaded modules. - * - * int modinit(argc,crt0_info,module_count,text,data) - * - * argc - current value of argc. - * info - crt0 information passed - * module_count - number of modules loaded. - * text - Beginning of text address - * data - Beginning of data address - */ - -#define DL_BUFFER_SIZE 1000 - -int modinit(int argc,INFO *crt0_info, int module_count, - caddr_t text_origin, caddr_t data_origin) -{ - int *handler = 0; - __RTINIT *rtinit_info = 0; - int flag; - DL_INFO dl_buffer[DL_BUFFER_SIZE]; - DL_INFO *dl_info = dl_buffer; - int i; - FPV p; - __libc_lock_define_initialized(static,modinit_lock); - - /* - * try to find __rtinit symbols - */ - rtinit_info = find_rtinit(text_origin,data_origin,module_count); - - flag = DL_EXECQ; - if (rtinit_info && rtinit_info->rtl) flag |= DL_LOAD_RTL; - - /* - * get a list of modules that have __rtinit - */ - if (__loadx(flag, dl_info, sizeof(dl_buffer))) exit(0x90); - - if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) - { - rtinit_info = find_rtinit(dl_info[1].dlinfo_textorg, - dl_info[1].dlinfo_dataorg, - module_count); - if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL)) - { - if((*rtinit_info->rtl)(dl_info,0)) exit(0x90); - } - } - - /* - * initialize threads in case any init - * functions need thread functions - */ - if (crt0_info->threads_init) - (*crt0_info->threads_init)(); - - p = (FPV) __loadx(DL_GLOBALSYM | DL_SRCHLOADLIST,"pthread_init"); - if (p) - (*p)(); - - __libc_lock_lock(modinit_lock); - - /* - * initialization each module loaded that has __rtinit. - */ - if (( dl_info[0].dlinfo_xflags & DL_INFO_OK)) - { - for (i=1; i < dl_info[0].dlinfo_arraylen + 1; i++) - { - if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT) - { - rtinit_info = find_rtinit(dl_info[i].dlinfo_textorg, - dl_info[i].dlinfo_dataorg, - module_count); - if (rtinit_info) - { - mod_init1(handler,rtinit_info); - } - } - } - } - - __libc_lock_unlock(modinit_lock); - /* - * reload argc if needed. - */ - return((int) (*crt0_info->p_argc)); -} - -/* - * The mod_init1 calls every initialization function - * for a given module. - * - * void mod_init1(handler, rti) - * - * void *handler - if NULL init funtions for modules loaded at exec time - * are being executed. Otherwise, the handler points to the - * module loaded. - * - * __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset - * not equal to zero) - */ - -void mod_init1(void *handler,__RTINIT *rtl) -{ - __RTINIT_DESCRIPTOR *descriptor; - - descriptor =(__RTINIT_DESCRIPTOR *) ((caddr_t)&rtl->rtl + rtl->init_offset); - while (descriptor->f) - { - if (!(descriptor->flags & _RT_CALLED)) - { - descriptor->flags |= _RT_CALLED; - ( descriptor->f )(handler,rtl,descriptor); /* execute init/fini */ - } - descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t)descriptor + - rtl->__rtinit_descriptor_size); - } -} - - -/* - * Find __rtinit symbol - * - * __RTINIT *find_rtinit(caddr_t text_origin) - * - * caddr_t text_origin - Beginning of text area - * caddr_t data_origin - Beginning of data area - * int module_count - Number of modules loaded - * __RTINIT *rti - pointer to __rtinit data structure - */ - -__RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count) -{ - struct xcoffhdr *xcoff_hdr; - SCNHDR *sec_hdr; - SCNHDR *ldr_sec_hdr; - SCNHDR *data_sec_hdr; - LDSYM *ldsym_hdr; - __RTINIT *rtl; - - xcoff_hdr = (struct xcoffhdr *) text_origin; - sec_hdr = (SCNHDR *) ((caddr_t)&xcoff_hdr->aouthdr + - xcoff_hdr->filehdr.f_opthdr); - ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1)); - ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr + - LDHDRSZ); - - if ( module_count <= 0) - { - if ( !(ldr_sec_hdr->s_scnptr) ) return ((__RTINIT *) 0); - - if ( memcmp(ldsym_hdr,RTINIT_NAME,sizeof(RTINIT_NAME)-1)) - return ((__RTINIT *) 0); - } - - data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1)); - rtl = (__RTINIT *) (ldsym_hdr->l_value + - (data_origin - data_sec_hdr->s_vaddr)); - return(rtl); -} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/start.s glibc-2.2.5/sysdeps/unix/sysv/aix/start.s --- glibc-2.2.4/sysdeps/unix/sysv/aix/start.s Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/start.s Sat Sep 8 10:24:19 2001 @@ -0,0 +1,109 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + .file "start.s" + .toc +T.lsd: .tc __libc_start_data[tc], __libc_start_data[rw] +T.main: .tc main[tc], main[rw] +T.init: .tc __libc_start_init[tc], __libc_start_init[rw] +T.fini: .tc __libc_start_fini[tc], __libc_start_init[rw] +T.rtld_fini : .tc __libc_start_rtld_fini[tc], __libc_start_rtld_fini[rw] + + .globl __start + .globl .__start + .globl __libc_start_data + + .extern .__libc_start_main + .extern .main + .extern main + .extern __libc_start_init + .extern __libc_start_fini + .extern __libc_start_rtld_fini + +/* Text */ + + .csect __start[ds] +__start: + .long .__start, TOC[tc0], 0 + + .csect .text[pr] +.__start: + +/* No prologue needed, __start does not have to follow the ABI. + + Input from kernel/loader + r1 : stack + r2 : TOC + r3 : argc + r4 : argv + r5 : envp + r28 : data origin + r29 : text origin + r30 : module count + r31 : default processing flag + + If r31 == r30, no special processing is needed, ie r28, r29 & r30 + are not used + + Save input in __libc_start_data */ + l 16, T.lsd(2) + st 1, 0(16) /* stack */ + st 2, 4(16) /* toc */ + st 3, 8(16) /* argc */ + st 4, 12(16) /* argv */ + st 5, 16(16) /* envp */ + st 28, 20(16) /* data origin */ + st 29, 24(16) /* text origin */ + st 30, 28(16) /* module count */ + st 31, 32(16) /* special */ + +/* Call __libc_start_main() */ + + bl .__libc_start_main + nop + +/* No epilog needed, __start does not have to follow the ABI */ + +/* Trace back */ +TB.__start: + .long 0x0 + .long 0xc2040 + .long 0x0 + .long TB.__start - .__start + .short 7 + .byte "__start" + .byte 0,0,0 + +/* Data + __libc_start_data + Space to keep libc initialization information */ + + .csect __libc_start_data[rw] +__libc_start_data: +/* For kernel/loader input args */ + .space 36 + +/* Externs */ + .long main +init: + .long __libc_start_init +fini: + .long __libc_start_fini +rtld_fini: + .long __libc_start_rtld_fini + .space 0x1000 + (4 + rtld_fini - __libc_start_data) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/aix/sysv_termio.h glibc-2.2.5/sysdeps/unix/sysv/aix/sysv_termio.h --- glibc-2.2.4/sysdeps/unix/sysv/aix/sysv_termio.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/aix/sysv_termio.h Sat Sep 8 10:45:10 2001 @@ -0,0 +1,155 @@ +/* Copyright (C) 1992, 1997, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* In various parts of this file we define the System V values for + things as _SYSV_. Those are the values that System V + uses for termio, and also (SVR4) termios. Not necessarily the + same as the GNU termios that the library user sees. */ + +/* Number of elements of c_cc. termio only. */ +#define _SYSV_NCC 8 + +#define _SYSV_VINTR 0 +#define _SYSV_VQUIT 1 +#define _SYSV_VERASE 2 +#define _SYSV_VKILL 3 +#define _SYSV_VEOF 4 +/* This field means VEOF if ICANON, VMIN if not. */ +#define _SYSV_VMIN 4 +#define _SYSV_VEOL 5 +/* This field means VEOL if ICANON, VTIME if not. */ +#define _SYSV_VTIME 5 +#define _SYSV_VEOL2 6 + +/* Flags in c_iflag. */ +#define _SYSV_IGNBRK 1 +#define _SYSV_BRKINT 2 +#define _SYSV_IGNPAR 4 +#define _SYSV_PARMRK 8 +#define _SYSV_INPCK 0x10 +#define _SYSV_ISTRIP 0x20 +#define _SYSV_INLCR 0x40 +#define _SYSV_IGNCR 0x80 +#define _SYSV_ICRNL 0x100 +#define _SYSV_IUCLC 0x200 +#define _SYSV_IXON 0x400 +#define _SYSV_IXANY 0x800 +#define _SYSV_IXOFF 0x1000 +#define _SYSV_IMAXBEL 0x2000 + +/* Flags in c_cflag. */ +#define _SYSV_CBAUD 0xf +#define _SYSV_CIBAUD 0xf0000 /* termios only. */ +#define _SYSV_IBSHIFT 16 +/* Values for CBAUD and CIBAUD. */ +#define _SYSV_B0 0 +#define _SYSV_B50 1 +#define _SYSV_B75 2 +#define _SYSV_B110 3 +#define _SYSV_B134 4 +#define _SYSV_B150 5 +#define _SYSV_B200 6 +#define _SYSV_B300 7 +#define _SYSV_B600 8 +#define _SYSV_B1200 9 +#define _SYSV_B1800 10 +#define _SYSV_B2400 11 +#define _SYSV_B4800 12 +#define _SYSV_B9600 13 +#define _SYSV_B19200 14 +#define _SYSV_B38400 15 + +#define _SYSV_CS5 0 +#define _SYSV_CS6 0x10 +#define _SYSV_CS7 0x20 +#define _SYSV_CS8 0x30 +#define _SYSV_CSIZE 0x30 +#define _SYSV_CSTOPB 0x40 +#define _SYSV_CREAD 0x80 +#define _SYSV_PARENB 0x100 +#define _SYSV_PARODD 0x200 +#define _SYSV_HUPCL 0x400 +#define _SYSV_CLOCAL 0x800 + +/* Flags in c_lflag. */ +#define _SYSV_ISIG 1 +#define _SYSV_ICANON 2 +#define _SYSV_ECHO 8 +#define _SYSV_ECHOE 0x10 +#define _SYSV_ECHOK 0x20 +#define _SYSV_ECHONL 0x40 +#define _SYSV_NOFLSH 0x80 +#define _SYSV_TOSTOP 0x100 +#define _SYSV_ECHOCTL 0x200 +#define _SYSV_ECHOPRT 0x400 +#define _SYSV_ECHOKE 0x800 +#define _SYSV_FLUSHO 0x2000 +#define _SYSV_PENDIN 0x4000 +#define _SYSV_IEXTEN 0x8000 + +/* Flags in c_oflag. */ +#define _SYSV_OPOST 1 +#define _SYSV_OLCUC 2 +#define _SYSV_ONLCR 4 +#define _SYSV_NLDLY 0x100 +#define _SYSV_NL0 0 +#define _SYSV_NL1 0x100 +#define _SYSV_CRDLY 0x600 +#define _SYSV_CR0 0 +#define _SYSV_CR1 0x200 +#define _SYSV_CR2 0x400 +#define _SYSV_CR3 0x600 +#define _SYSV_TABDLY 0x1800 +#define _SYSV_TAB0 0 +#define _SYSV_TAB1 0x0800 +#define _SYSV_TAB2 0x1000 +/* TAB3 is an obsolete name for XTABS. But we provide it since some + programs expect it to exist. */ +#define _SYSV_TAB3 0x1800 +#define _SYSV_XTABS 0x1800 +#define _SYSV_BSDLY 0x2000 +#define _SYSV_BS0 0 +#define _SYSV_BS1 0x2000 +#define _SYSV_VTDLY 0x4000 +#define _SYSV_VT0 0 +#define _SYSV_VT1 0x4000 +#define _SYSV_FFDLY 0x8000 +#define _SYSV_FF0 0 +#define _SYSV_FF1 0x8000 + +/* ioctl's. */ + +#define _TCGETA 0x5405 +#define _TCSETA 0x5406 +#define _TCSETAW 0x5407 +#define _TCSETAF 0x5408 +#define _TCSBRK 0x5409 +#define _TCXONC 0x540B +#define _TCFLSH 0x540C +#define _TIOCGPGRP 0x7414 +#define _TIOCSPGRP 0x7415 + +struct __sysv_termio + { + unsigned short c_iflag; + unsigned short c_oflag; + unsigned short c_cflag; + unsigned short c_lflag; + char c_line; + unsigned char c_cc[_SYSV_NCC]; + }; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/gethostname.c glibc-2.2.5/sysdeps/unix/sysv/gethostname.c --- glibc-2.2.4/sysdeps/unix/sysv/gethostname.c Mon Jul 23 10:57:01 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/gethostname.c Sat Sep 1 14:45:32 2001 @@ -36,13 +36,13 @@ __gethostname (name, len) return -1; node_len = strlen (buf.nodename) + 1; + memcpy (name, buf.nodename, len < node_len ? len : node_len); + if (node_len > len) { __set_errno (ENAMETOOLONG); return -1; } - - memcpy (name, buf.nodename, node_len); return 0; } diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/Makefile Tue Mar 28 11:05:47 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/Makefile Thu Nov 15 17:24:04 2001 @@ -23,3 +23,11 @@ ifeq ($(subdir),signal) sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/Versions Fri Feb 9 10:04:32 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/Versions Thu Nov 15 17:22:32 2001 @@ -6,8 +6,7 @@ libc { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; # b* bus_base; bus_base_sparse; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/bits/socket.h Mon Jul 23 10:57:21 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/bits/socket.h Tue Sep 25 22:23:09 2001 @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/gethostname.c glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/gethostname.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/alpha/gethostname.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/alpha/gethostname.c Tue Sep 4 17:08:11 2001 @@ -0,0 +1,50 @@ +/* Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2001 + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +#include +#include +#include + +extern int __syscall_gethostname (char *name, size_t len); + + +int +__gethostname (char *name, size_t len) +{ + int result; + + result = INLINE_SYSCALL (gethostname, 2, CHECK_N (name, len), len); + + if (result == 0 + /* See whether the string is terminated. If not we will return + an error. */ + && memchr (name, '\0', len) == NULL) + { + __set_errno (EOVERFLOW); + result = -1; + } + + return result; +} + +weak_alias (__gethostname, gethostname) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/arm/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/arm/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/arm/Makefile Mon Mar 26 20:53:35 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/Makefile Thu Nov 15 17:24:04 2001 @@ -19,4 +19,10 @@ sysdep-dl-routines += dl-procinfo sysdep_routines += dl-procinfo # extra shared linker files to link only into dl-allobjs.so sysdep-rtld-routines += dl-procinfo + +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/arm/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/arm/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/arm/Versions Thu Aug 31 14:45:30 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/Versions Thu Nov 15 17:22:32 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } GLIBC_2.1 { ioperm; iopl; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/linux/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/bits/socket.h Sat Aug 4 12:31:54 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/bits/socket.h Tue Sep 25 22:23:10 2001 @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/configure glibc-2.2.5/sysdeps/unix/sysv/linux/configure --- glibc-2.2.4/sysdeps/unix/sysv/linux/configure Fri Jul 27 23:16:53 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/configure Sun Jan 20 19:27:33 2002 @@ -54,6 +54,11 @@ fi case "$machine" in alpha*) arch_minimum_kernel=2.1.100 + libc_cv_gcc_unwind_find_fde=yes + ;; + i386*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.0.10 ;; ia64*) arch_minimum_kernel=2.4.0 @@ -61,11 +66,36 @@ case "$machine" in hppa*) arch_minimum_kernel=2.3.99 ;; + m68k*) + arch_minimum_kernel=2.0.10 + libc_cv_gcc_unwind_find_fde=yes + ;; mips*) arch_minimum_kernel=2.2.15 + libc_cv_gcc_unwind_find_fde=yes + ;; + powerpc*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.0.10 + ;; + s390/s390-32) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.2.10 + ;; + s390/s390-64) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.4.0 ;; sh*) arch_minimum_kernel=2.3.99 + libc_cv_gcc_unwind_find_fde=yes + ;; + sparc*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.0.10 + ;; + x86_64*) + arch_minimum_kernel=2.4.0 ;; *) arch_minimum_kernel=2.0.10 @@ -88,11 +118,11 @@ fi if test -n "$minimum_kernel"; then echo $ac_n "checking for kernel header at least $minimum_kernel""... $ac_c" 1>&6 -echo "configure:92: checking for kernel header at least $minimum_kernel" >&5 +echo "configure:122: checking for kernel header at least $minimum_kernel" >&5 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; cat > conftest.$ac_ext < #if LINUX_VERSION_CODE < $decnum @@ -125,6 +155,12 @@ EOF fi fi +# The result of the above test for the use of the FDE code is invalid if +# the user overrides the decision about the minimum ABI. +if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then + libc_cv_gcc_unwind_find_fde=no +fi + if test -n "$sysheaders"; then CPPFLAGS=$OLD_CPPFLAGS fi @@ -134,7 +170,7 @@ fi # in /lib and /etc. if test "$prefix" = "/usr" -o "$prefix" = "/usr/"; then # 64bit libraries on sparc go to /lib64 and not /lib - if test "$machine" = "sparc/sparc64"; then + if test "$machine" = "sparc/sparc64" -o "$machine" = "x86_64"; then libc_cv_slibdir="/lib64" if test "$libdir" = '${exec_prefix}/lib'; then libdir='${exec_prefix}/lib64'; @@ -189,9 +225,18 @@ case "$machine" in i[3456]86* | m68*) ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed ;; + ia64*) + ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed + ;; + s390*) + ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed + ;; sparc*) ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed ;; + x86_64*) + ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed + ;; *) ;; esac @@ -207,7 +252,7 @@ if test $host = $build; then ac_prefix=$ac_default_prefix fi echo $ac_n "checking for symlinks in ${ac_prefix}/include""... $ac_c" 1>&6 -echo "configure:211: checking for symlinks in ${ac_prefix}/include" >&5 +echo "configure:256: checking for symlinks in ${ac_prefix}/include" >&5 ac_message= if test -L ${ac_prefix}/include/net; then ac_message="$ac_message diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/configure.in glibc-2.2.5/sysdeps/unix/sysv/linux/configure.in --- glibc-2.2.4/sysdeps/unix/sysv/linux/configure.in Mon Jul 23 10:57:12 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/configure.in Sun Jan 20 19:26:31 2002 @@ -41,6 +41,11 @@ fi case "$machine" in alpha*) arch_minimum_kernel=2.1.100 + libc_cv_gcc_unwind_find_fde=yes + ;; + i386*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.0.10 ;; ia64*) arch_minimum_kernel=2.4.0 @@ -48,11 +53,36 @@ case "$machine" in hppa*) arch_minimum_kernel=2.3.99 ;; + m68k*) + arch_minimum_kernel=2.0.10 + libc_cv_gcc_unwind_find_fde=yes + ;; mips*) arch_minimum_kernel=2.2.15 + libc_cv_gcc_unwind_find_fde=yes + ;; + powerpc*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.0.10 + ;; + s390/s390-32) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.2.10 + ;; + s390/s390-64) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.4.0 ;; sh*) arch_minimum_kernel=2.3.99 + libc_cv_gcc_unwind_find_fde=yes + ;; + sparc*) + libc_cv_gcc_unwind_find_fde=yes + arch_minimum_kernel=2.0.10 + ;; + x86_64*) + arch_minimum_kernel=2.4.0 ;; *) arch_minimum_kernel=2.0.10 @@ -93,6 +123,12 @@ eat flaming death fi fi +# The result of the above test for the use of the FDE code is invalid if +# the user overrides the decision about the minimum ABI. +if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then + libc_cv_gcc_unwind_find_fde=no +fi + if test -n "$sysheaders"; then CPPFLAGS=$OLD_CPPFLAGS fi @@ -102,7 +138,7 @@ fi # in /lib and /etc. if test "$prefix" = "/usr" -o "$prefix" = "/usr/"; then # 64bit libraries on sparc go to /lib64 and not /lib - if test "$machine" = "sparc/sparc64"; then + if test "$machine" = "sparc/sparc64" -o "$machine" = "x86_64"; then libc_cv_slibdir="/lib64" if test "$libdir" = '${exec_prefix}/lib'; then libdir='${exec_prefix}/lib64'; @@ -157,8 +193,17 @@ case "$machine" in i[3456]86* | m68*) ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed ;; + ia64*) + ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed + ;; + s390*) + ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed + ;; sparc*) ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed + ;; + x86_64*) + ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed ;; *) ;; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/gai_sigqueue.c glibc-2.2.5/sysdeps/unix/sysv/linux/gai_sigqueue.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/gai_sigqueue.c Mon Jul 23 10:57:13 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/gai_sigqueue.c Thu Aug 16 23:43:27 2001 @@ -47,7 +47,7 @@ __gai_sigqueue (sig, val, caller_pid) info.si_signo = sig; info.si_code = SI_ASYNCNL; info.si_pid = caller_pid; - info.si_uid = getuid (); + info.si_uid = __getuid (); info.si_value = val; return INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/getloadavg.c glibc-2.2.5/sysdeps/unix/sysv/linux/getloadavg.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/getloadavg.c Mon Jul 23 10:57:13 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/getloadavg.c Mon Dec 31 09:44:02 2001 @@ -18,9 +18,10 @@ 02111-1307 USA. */ #include -#include #include +#include #include +#include /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. @@ -53,8 +54,8 @@ getloadavg (double loadavg[], int nelem) for (i = 0; i < nelem; ++i) { char *endp; - loadavg[i] = strtod (p, &endp); - if (!endp || endp == p) + loadavg[i] = __strtod_l (p, &endp, &_nl_C_locobj); + if (endp == NULL || endp == p) /* This should not happen. The format of /proc/loadavg must have changed. Don't return with what we have, signal an error. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/i386/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/i386/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/i386/Makefile Mon Jul 23 10:57:28 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/i386/Makefile Thu Nov 15 17:24:04 2001 @@ -12,6 +12,12 @@ sysdep-dl-routines += dl-procinfo sysdep_routines += dl-procinfo # extra shared linker files to link only into dl-allobjs.so sysdep-rtld-routines += dl-procinfo + +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif endif ifeq ($(subdir),resource) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/i386/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/i386/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/i386/Versions Thu Aug 31 14:45:30 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/i386/Versions Thu Nov 15 17:22:32 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; ioperm; iopl; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/i386/dl-librecon.h glibc-2.2.5/sysdeps/unix/sysv/linux/i386/dl-librecon.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/i386/dl-librecon.h Sat Aug 11 18:28:51 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/i386/dl-librecon.h Mon Nov 5 16:13:44 2001 @@ -72,13 +72,16 @@ } \ \ case 15: \ - if (memcmp (envline, "LIBRARY_VERSION", 15) == 0) \ + if (memcmp (envline, "LIBRARY_VERSION", 15) == 0) \ { \ _dl_correct_cache_id = envline[16] == '5' ? 2 : 3; \ break; \ } -/* Extra unsecure variables. */ -#define EXTRA_UNSECURE_ENVVARS "LD_AOUT_LIBRARY_PATH", "LD_AOUT_PRELOAD" +/* Extra unsecure variables. The names are all stuffed in a single + string which means they have to be terminated with a '\0' explicitly. */ +#define EXTRA_UNSECURE_ENVVARS \ + "LD_AOUT_LIBRARY_PATH\0" \ + "LD_AOUT_PRELOAD\0" #endif /* dl-librecon.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/Dist glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/Dist --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/Dist Tue Mar 27 22:27:54 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/Dist Tue Jan 8 13:36:26 2002 @@ -2,6 +2,7 @@ clone.S clone2.S dl-static.c ioperm.c +ldd-rewrite.sed __start_context.S ucontext_i.h net/route.h diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h Mon Jul 23 10:57:37 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h Mon Sep 24 17:48:38 2001 @@ -50,7 +50,7 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */ #define SA_SIGINFO 0x00000004 -#ifdef __USE_MISC +#if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ # define SA_NODEFER 0x40000000 /* Don't automatically block the signal diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h Mon Jul 23 10:57:38 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h Sun Sep 30 17:04:10 2001 @@ -48,7 +48,9 @@ struct sigcontext unsigned long int sc_br[8]; /* branch registers */ unsigned long int sc_gr[32]; /* general registers (static partition) */ struct ia64_fpreg sc_fr[128]; /* floating-point registers */ - unsigned long int sc_rsvd[16];/* reserved for future use */ + unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */ + unsigned long int sc_loadrs; /* see description above */ + unsigned long int sc_rsvd[14];/* reserved for future use */ /* sc_mask is actually an sigset_t but we don't want to * include the kernel headers here. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/bits/socket.h Mon Jul 23 10:57:38 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/bits/socket.h Tue Sep 25 22:23:09 2001 @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/ioperm.c glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/ioperm.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/ioperm.c Mon Jul 23 10:57:35 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/ioperm.c Thu Aug 30 16:24:34 2001 @@ -1,6 +1,6 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by David Mosberger-Tang . + Contributed by David Mosberger-Tang . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -80,14 +80,14 @@ _ioperm (unsigned long int from, unsigne unsigned long phys_io_base, len; int fd; - io.page_mask = ~(getpagesize() - 1); + io.page_mask = ~(__getpagesize() - 1); /* get I/O base physical address from ar.k0 as per PRM: */ __asm__ ("mov %0=ar.k0" : "=r"(phys_io_base)); /* The O_SYNC flag tells the /dev/mem driver to map the memory uncached: */ - fd = open ("/dev/mem", O_RDWR | O_SYNC); + fd = __open ("/dev/mem", O_RDWR | O_SYNC); if (fd < 0) return -1; @@ -100,7 +100,7 @@ _ioperm (unsigned long int from, unsigne base = (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, phys_io_base); #endif - close (fd); + __close (fd); if ((long) base == -1) return -1; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed Sun Jan 20 19:26:48 2002 @@ -0,0 +1 @@ +s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ia64/unwind-dw2-fde.c Thu Nov 15 17:24:55 2001 @@ -0,0 +1 @@ +/* Linux/ia64 does not need unwind table registry. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/m68k/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/m68k/Makefile Tue Oct 17 14:54:21 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/Makefile Thu Nov 15 17:24:04 2001 @@ -10,6 +10,12 @@ endif ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 + +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif endif ifeq ($(subdir),resource) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/m68k/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/m68k/Versions Tue Oct 17 14:54:21 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/Versions Thu Nov 15 17:22:33 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; # c* cacheflush; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/m68k/bits/resource.h glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/bits/resource.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/m68k/bits/resource.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/bits/resource.h Fri Nov 9 11:57:55 2001 @@ -0,0 +1,209 @@ +/* Bit values & structures for resource limits. Linux/m68k version. + Copyright (C) 1994,1996,1997,1998,1999,2000,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* Transmute defines to enumerations. The macro re-definitions are + necessary because some programs want to test for operating system + features with #ifdef RUSAGE_SELF. In ISO C the reflexive + definition is a no-op. */ + +/* Kinds of resource limit. */ +enum __rlimit_resource +{ + /* Per-process CPU limit, in seconds. */ + RLIMIT_CPU = 0, +#define RLIMIT_CPU RLIMIT_CPU + + /* Largest file that can be created, in bytes. */ + RLIMIT_FSIZE = 1, +#define RLIMIT_FSIZE RLIMIT_FSIZE + + /* Maximum size of data segment, in bytes. */ + RLIMIT_DATA = 2, +#define RLIMIT_DATA RLIMIT_DATA + + /* Maximum size of stack segment, in bytes. */ + RLIMIT_STACK = 3, +#define RLIMIT_STACK RLIMIT_STACK + + /* Largest core file that can be created, in bytes. */ + RLIMIT_CORE = 4, +#define RLIMIT_CORE RLIMIT_CORE + + /* Largest resident set size, in bytes. + This affects swapping; processes that are exceeding their + resident set size will be more likely to have physical memory + taken from them. */ + RLIMIT_RSS = 5, +#define RLIMIT_RSS RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 7, + RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE RLIMIT_OFILE + + /* Address space limit. */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + RLIMIT_NPROC = 6, +#define RLIMIT_NPROC RLIMIT_NPROC + + /* Locked-in-memory address space. */ + RLIMIT_MEMLOCK = 8, +#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK + + /* Maximum number of file locks. */ + RLIMIT_LOCKS = 10, +#define RLIMIT_LOCKS RLIMIT_LOCKS + + RLIMIT_NLIMITS = 11, + RLIM_NLIMITS = RLIMIT_NLIMITS +#define RLIMIT_NLIMITS RLIMIT_NLIMITS +#define RLIM_NLIMITS RLIM_NLIMITS +}; + +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +/* We can represent all limits. */ +#define RLIM_SAVED_MAX RLIM_INFINITY +#define RLIM_SAVED_CUR RLIM_INFINITY + + +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + +struct rlimit + { + /* The current (soft) limit. */ + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + +/* Whose usage statistics do you want? */ +enum __rusage_who +{ + /* The calling process. */ + RUSAGE_SELF = 0, +#define RUSAGE_SELF RUSAGE_SELF + + /* All of its terminated child processes. */ + RUSAGE_CHILDREN = -1, +#define RUSAGE_CHILDREN RUSAGE_CHILDREN + + /* Both. */ + RUSAGE_BOTH = -2 +#define RUSAGE_BOTH RUSAGE_BOTH +}; + +#define __need_timeval +#include /* For `struct timeval'. */ + +/* Structure which says how much of each resource has been used. */ +struct rusage + { + /* Total amount of user time used. */ + struct timeval ru_utime; + /* Total amount of system time used. */ + struct timeval ru_stime; + /* Maximum resident set size (in kilobytes). */ + long int ru_maxrss; + /* Amount of sharing of text segment memory + with other processes (kilobyte-seconds). */ + long int ru_ixrss; + /* Amount of data segment memory used (kilobyte-seconds). */ + long int ru_idrss; + /* Amount of stack memory used (kilobyte-seconds). */ + long int ru_isrss; + /* Number of soft page faults (i.e. those serviced by reclaiming + a page from the list of pages awaiting reallocation. */ + long int ru_minflt; + /* Number of hard page faults (i.e. those that required I/O). */ + long int ru_majflt; + /* Number of times a process was swapped out of physical memory. */ + long int ru_nswap; + /* Number of input operations via the file system. Note: This + and `ru_oublock' do not include operations with the cache. */ + long int ru_inblock; + /* Number of output operations via the file system. */ + long int ru_oublock; + /* Number of IPC messages sent. */ + long int ru_msgsnd; + /* Number of IPC messages received. */ + long int ru_msgrcv; + /* Number of signals delivered. */ + long int ru_nsignals; + /* Number of voluntary context switches, i.e. because the process + gave up the process before it had to (usually to wait for some + resource to be available). */ + long int ru_nvcsw; + /* Number of involuntary context switches, i.e. a higher priority process + became runnable or the current process used up its time slice. */ + long int ru_nivcsw; + }; + +/* Priority limits. */ +#define PRIO_MIN -20 /* Minimum priority a process can have. */ +#define PRIO_MAX 20 /* Maximum priority a process can have. */ + +/* The type of the WHICH argument to `getpriority' and `setpriority', + indicating what flavor of entity the WHO argument specifies. */ +enum __priority_which +{ + PRIO_PROCESS = 0, /* WHO is a process ID. */ +#define PRIO_PROCESS PRIO_PROCESS + PRIO_PGRP = 1, /* WHO is a process group ID. */ +#define PRIO_PGRP PRIO_PGRP + PRIO_USER = 2 /* WHO is a user ID. */ +#define PRIO_USER PRIO_USER +}; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/mips/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/Makefile Thu Sep 7 11:56:47 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/Makefile Thu Nov 15 17:24:04 2001 @@ -9,3 +9,11 @@ sysdep_routines += cachectl cacheflush s sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/mips/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/Versions Wed Aug 2 14:53:16 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/Versions Thu Nov 15 17:22:33 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; # Needed by gcc: _flush_cache; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/linux/mips/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/bits/socket.h Mon Jul 23 10:57:41 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/bits/socket.h Tue Sep 25 22:23:10 2001 @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/bits/termios.h glibc-2.2.5/sysdeps/unix/sysv/linux/mips/bits/termios.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/bits/termios.h Mon Jul 23 10:57:41 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/bits/termios.h Mon Oct 15 04:55:20 2001 @@ -25,40 +25,6 @@ typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; - -#ifdef __USE_BSD - -struct sgttyb - { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - int sg_flags; /* SGI special - int, not short */ - }; - -struct tchars - { - char t_intrc; - char t_quitc; - char t_startc; - char t_stopc; - char t_eofc; - char t_brkc; - }; - -struct ltchars - { - char t_suspc; /* stop process signal */ - char t_dsuspc; /* delayed stop process signal */ - char t_rprntc; /* reprint line */ - char t_flushc; /* flush output (toggles) */ - char t_werasc; /* word erase */ - char t_lnextc; /* literal next character */ - }; - -#endif /* defined(__BSD) */ - #define NCCS 32 struct termios { @@ -66,44 +32,31 @@ struct termios tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ + cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ }; /* c_cc characters */ -#define VINTR 0 /* Interrupt character [ISIG]. */ -#define VQUIT 1 /* Quit character [ISIG]. */ -#define VERASE 2 /* Erase character [ICANON]. */ -#define VKILL 3 /* Kill-line character [ICANON]. */ -#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */ -#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */ -#ifdef __USE_BSD -# define VEOL2 6 /* Second EOL character [ICANON]. */ -/* The next two are guesses ... */ -# define VSWTC 7 /* ??? */ -#endif +#define VINTR 0 /* Interrupt character [ISIG]. */ +#define VQUIT 1 /* Quit character [ISIG]. */ +#define VERASE 2 /* Erase character [ICANON]. */ +#define VKILL 3 /* Kill-line character [ICANON]. */ +#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */ +#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */ +#define VEOL2 6 /* Second EOL character [ICANON]. */ +#define VSWTC 7 #define VSWTCH VSWTC -#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ -#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ -#define VSUSP 10 /* Suspend character [ISIG]. */ -#if 0 -/* - * VDSUSP is not supported - */ -#if defined __USE_BSD -# define VDSUSP 11 /* Delayed suspend character [ISIG]. */ -#endif -#endif -#ifdef __USE_BSD -# define VREPRINT 12 /* Reprint-line character [ICANON]. */ -#endif -#ifdef __USE_BSD -# define VDISCARD 13 /* Discard character [IEXTEN]. */ -# define VWERASE 14 /* Word-erase character [ICANON]. */ -# define VLNEXT 15 /* Literal-next character [IEXTEN]. */ -#endif -#define VEOF 16 /* End-of-file character [ICANON]. */ -#define VEOL 17 /* End-of-line character [ICANON]. */ +#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */ +#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */ +#define VSUSP 10 /* Suspend character [ISIG]. */ + /* VDSUSP is not supported on Linux. */ +/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */ +#define VREPRINT 12 /* Reprint-line character [ICANON]. */ +#define VDISCARD 13 /* Discard character [IEXTEN]. */ +#define VWERASE 14 /* Word-erase character [ICANON]. */ +#define VLNEXT 15 /* Literal-next character [IEXTEN]. */ +#define VEOF 16 /* End-of-file character [ICANON]. */ +#define VEOL 17 /* End-of-line character [ICANON]. */ /* c_iflag bits */ #define IGNBRK 0000001 /* Ignore break condition. */ @@ -115,28 +68,22 @@ struct termios #define INLCR 0000100 /* Map NL to CR on input. */ #define IGNCR 0000200 /* Ignore CR. */ #define ICRNL 0000400 /* Map CR to NL on input. */ -#ifdef __USE_BSD -# define IUCLC 0001000 /* Map upper case to lower case on input. */ -#endif +#define IUCLC 0001000 /* Map upper case to lower case on input. */ #define IXON 0002000 /* Enable start/stop output control. */ -#ifdef __USE_BSD -# define IXANY 0004000 /* Any character will restart after stop. */ -#endif +#define IXANY 0004000 /* Any character will restart after stop. */ #define IXOFF 0010000 /* Enable start/stop input control. */ -#ifdef __USE_BSD -# define IMAXBEL 0020000 /* Ring bell when input queue is full. */ -#endif +#define IMAXBEL 0020000 /* Ring bell when input queue is full. */ /* c_oflag bits */ #define OPOST 0000001 /* Perform output processing. */ -#ifdef __USE_BSD -# define OLCUC 0000002 /* Map lower case to upper case on output. */ -# define ONLCR 0000004 /* Map NL to CR-NL on output. */ -# define OCRNL 0000010 -# define ONOCR 0000020 -# define ONLRET 0000040 -# define OFILL 0000100 -# define OFDEL 0000200 +#define OLCUC 0000002 /* Map lower case to upper case on output. */ +#define ONLCR 0000004 /* Map NL to CR-NL on output. */ +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#if defined __USE_MISC || defined __USE_XOPEN # define NLDLY 0000400 # define NL0 0000000 # define NL1 0000400 @@ -150,24 +97,26 @@ struct termios # define TAB1 0004000 # define TAB2 0010000 # define TAB3 0014000 -# define XTABS 0014000 # define BSDLY 0020000 # define BS0 0000000 # define BS1 0020000 -# define VTDLY 0040000 -# define VT0 0000000 -# define VT1 0040000 # define FFDLY 0100000 # define FF0 0000000 # define FF1 0100000 -/* -#define PAGEOUT ??? -#define WRAP ??? - */ +#endif + +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 + +#ifdef __USE_MISC +# define XTABS 0014000 #endif /* c_cflag bit meaning */ -#define CBAUD 0010017 +#ifdef __USE_MISC +# define CBAUD 0010017 +#endif #define B0 0000000 /* hang up */ #define B50 0000001 #define B75 0000002 @@ -184,8 +133,10 @@ struct termios #define B9600 0000015 #define B19200 0000016 #define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 +#ifdef __USE_MISC +# define EXTA B19200 +# define EXTB B38400 +#endif #define CSIZE 0000060 /* Number of bits per byte (mask). */ #define CS5 0000000 /* 5 bits per byte. */ #define CS6 0000020 /* 6 bits per byte. */ @@ -197,24 +148,26 @@ struct termios #define PARODD 0001000 /* Odd parity instead of even. */ #define HUPCL 0002000 /* Hang up on last close. */ #define CLOCAL 0004000 /* Ignore modem status lines. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define CBAUDEX 0010000 -# define B57600 0010001 -# define B115200 0010002 -# define B230400 0010003 -# define B460800 0010004 -# define B500000 0010005 -# define B576000 0010006 -# define B921600 0010007 -# define B1000000 0010010 -# define B1152000 0010011 -# define B1500000 0010012 -# define B2000000 0010013 -# define B2500000 0010014 -# define B3000000 0010015 -# define B3500000 0010016 -# define B4000000 0010017 -# define __MAX_BAUD B4000000 +#endif +#define B57600 0010001 +#define B115200 0010002 +#define B230400 0010003 +#define B460800 0010004 +#define B500000 0010005 +#define B576000 0010006 +#define B921600 0010007 +#define B1000000 0010010 +#define B1152000 0010011 +#define B1500000 0010012 +#define B2000000 0010013 +#define B2500000 0010014 +#define B3000000 0010015 +#define B3500000 0010016 +#define B4000000 0010017 +#define __MAX_BAUD B4000000 +#ifdef __USE_MISC # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CRTSCTS 020000000000 /* flow control */ #endif @@ -222,20 +175,20 @@ struct termios /* c_lflag bits */ #define ISIG 0000001 /* Enable signals. */ #define ICANON 0000002 /* Do erase and kill processing. */ -#define XCASE 0000004 +#if defined __USE_MISC || defined __USE_XOPEN +# define XCASE 0000004 +#endif #define ECHO 0000010 /* Enable echo. */ #define ECHOE 0000020 /* Visual erase for ERASE. */ #define ECHOK 0000040 /* Echo NL after KILL. */ #define ECHONL 0000100 /* Echo NL even if ECHO is off. */ #define NOFLSH 0000200 /* Disable flush after interrupt. */ #define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */ -#ifdef __USE_BSD +#ifdef __USE_MISC # define ECHOCTL 0001000 /* Echo control characters as ^X. */ # define ECHOPRT 0002000 /* Hardcopy visual erase. */ # define ECHOKE 0004000 /* Visual erase for KILL. */ -#endif -#define FLUSHO 0020000 -#ifdef __USE_BSD +# define FLUSHO 0020000 # define PENDIN 0040000 /* Retype pending input (state). */ #endif #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/configure glibc-2.2.5/sysdeps/unix/sysv/linux/mips/configure --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/configure Fri Jul 27 23:16:53 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/configure Tue Jan 8 14:16:44 2002 @@ -56,4 +56,3 @@ if test $ac_verc_fail = yes; then *** the FAQ and INSTALL documents." 1>&2 fi -s%@AS@%$AS%g diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/configure.in glibc-2.2.5/sysdeps/unix/sysv/linux/mips/configure.in --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/configure.in Fri May 11 09:48:37 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/configure.in Fri Aug 24 11:27:55 2001 @@ -2,6 +2,7 @@ sinclude(./aclocal.m4)dnl Autoconf lossa GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/mips. +define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT AC_CHECK_PROG_VER(AS, $AS, --version, [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)], [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*], diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/sysmips.h glibc-2.2.5/sysdeps/unix/sysv/linux/mips/sys/sysmips.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/mips/sys/sysmips.h Mon Jul 23 10:57:41 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/sys/sysmips.h Mon Oct 15 04:56:11 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1997, 2000, 2001 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,14 +22,21 @@ #include /* - * Get the kernel definition for sysmips(2) + * Commands for the sysmips(2) call + * + * sysmips(2) is deprecated - though some existing software uses it. + * We only support the following commands. Sysmips exists for compatibility + * purposes only so new software should avoid it. */ -#include +#define SETNAME 1 /* set hostname */ +#define FLUSH_CACHE 3 /* writeback and invalidate caches */ +#define MIPS_FIXADE 7 /* control address error fixing */ +#define MIPS_RDNVRAM 10 /* read NVRAM */ +#define MIPS_ATOMIC_SET 2001 /* atomically set variable */ __BEGIN_DECLS -extern int sysmips (__const int cmd, __const int arg1, - __const int arg2, __const int arg3) __THROW; +extern int sysmips (__const int cmd, ...) __THROW; __END_DECLS diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/net/ethernet.h glibc-2.2.5/sysdeps/unix/sysv/linux/net/ethernet.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/net/ethernet.h Mon Jul 23 10:57:42 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/net/ethernet.h Fri Sep 14 06:03:53 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2001 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 @@ -53,8 +53,8 @@ struct ether_header #define ETHER_TYPE_LEN 2 /* bytes in type field */ #define ETHER_CRC_LEN 4 /* bytes in CRC field */ #define ETHER_HDR_LEN ETH_HLEN /* total octets in header */ -#define ETHER_MIN_LEN (ETH_ZLEN + ETH_CRC_LEN) /* min packet length */ -#define ETHER_MAX_LEN (ETH_FRAME_LEN + ETH_CRC_LEN) /* max packet length */ +#define ETHER_MIN_LEN (ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */ +#define ETHER_MAX_LEN (ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */ /* make sure ethenet length is valid */ #define ETHER_IS_VALID_LEN(foo) \ @@ -69,8 +69,8 @@ struct ether_header #define ETHERTYPE_NTRAILER 16 #define ETHERMTU ETH_DATA_LEN -#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN) +#define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN) __END_DECLS -#endif /* net/ethernet.h */ +#endif /* net/ethernet.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/Makefile Mon Jul 23 10:57:44 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/Makefile Thu Nov 15 17:24:04 2001 @@ -6,3 +6,11 @@ endif ifeq ($(subdir),resource) sysdep_routines += oldgetrlimit64 endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/Versions Thu Aug 31 14:45:31 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/Versions Thu Nov 15 17:22:33 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } GLIBC_2.2 { # functions used in other libraries diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h Mon Jul 23 10:57:45 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h Sun Jan 20 19:26:56 2002 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2002 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 @@ -42,10 +42,8 @@ typedef elf_greg_t elf_gregset_t[ELF_NGR typedef double elf_fpreg_t; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -/* gcc doesn't support __TI__ yet */ -#if 0 -typedef unsigned __uint128_t __attribute__ (( __mode__ (__TI__))); -#else +/* gcc 3.1 and newer support __uint128_t. */ +#if !__GNUC_PREREQ(3,1) typedef struct { unsigned long u[4]; } __attribute((aligned(16))) __uint128_t; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h Mon Jul 23 10:57:45 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h Wed Dec 31 16:00:00 1969 @@ -1,41 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include -#include - -/* We need the signal context definitions even if they are not used - included in . */ -#include - -typedef struct sigcontext mcontext_t; - -/* Userlevel context. */ -typedef struct ucontext - { - unsigned long int uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - __sigset_t uc_sigmask; - } ucontext_t; - -#endif /* sys/ucontext.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/sysdep.h glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sysdep.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/powerpc/sysdep.h Mon Jul 23 10:57:44 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sysdep.h Tue Nov 6 02:56:56 2001 @@ -32,121 +32,4 @@ # define SYS_ify(syscall_name) __NR_/**/syscall_name #endif -#ifdef __ASSEMBLER__ - -/* This seems to always be the case on PPC. */ -#define ALIGNARG(log2) log2 -/* For ELF we need the `.type' directive to make shared libs work right. */ -#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; -#define ASM_SIZE_DIRECTIVE(name) .size name,.-name - -/* If compiled for profiling, call `_mcount' at the start of each function. */ -#ifdef PROF -/* The mcount code relies on a the return address being on the stack - to locate our caller and so it can restore it; so store one just - for its benefit. */ -#ifdef PIC -#define CALL_MCOUNT \ - .pushsection; \ - .section ".data"; \ - .align ALIGNARG(2); \ -0:.long 0; \ - .previous; \ - mflr r0; \ - stw r0,4(r1); \ - bl _GLOBAL_OFFSET_TABLE_@local-4; \ - mflr r11; \ - lwz r0,0b@got(r11); \ - bl JUMPTARGET(_mcount); -#else /* PIC */ -#define CALL_MCOUNT \ - .section ".data"; \ - .align ALIGNARG(2); \ -0:.long 0; \ - .previous; \ - mflr r0; \ - lis r11,0b@ha; \ - stw r0,4(r1); \ - addi r0,r11,0b@l; \ - bl JUMPTARGET(_mcount); -#endif /* PIC */ -#else /* PROF */ -#define CALL_MCOUNT /* Do nothing. */ -#endif /* PROF */ - -#define ENTRY(name) \ - ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ - ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ - .align ALIGNARG(2); \ - C_LABEL(name) \ - CALL_MCOUNT - -#define EALIGN_W_0 /* No words to insert. */ -#define EALIGN_W_1 nop -#define EALIGN_W_2 nop;nop -#define EALIGN_W_3 nop;nop;nop -#define EALIGN_W_4 EALIGN_W_3;nop -#define EALIGN_W_5 EALIGN_W_4;nop -#define EALIGN_W_6 EALIGN_W_5;nop -#define EALIGN_W_7 EALIGN_W_6;nop - -/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes - past a 2^align boundary. */ -#ifdef PROF -#define EALIGN(name, alignt, words) \ - ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ - ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ - .align ALIGNARG(2); \ - C_LABEL(name) \ - CALL_MCOUNT \ - b 0f; \ - .align ALIGNARG(alignt); \ - EALIGN_W_##words; \ - 0: -#else /* PROF */ -#define EALIGN(name, alignt, words) \ - ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ - ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ - .align ALIGNARG(alignt); \ - EALIGN_W_##words; \ - C_LABEL(name) -#endif - -#undef END -#define END(name) \ - ASM_SIZE_DIRECTIVE(name) - -#define DO_CALL(syscall) \ - li 0,syscall; \ - sc - -#ifdef PIC -#define JUMPTARGET(name) name##@plt -#else -#define JUMPTARGET(name) name -#endif - -#define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - ENTRY (name) \ - DO_CALL (SYS_ify (syscall_name)); - -#define PSEUDO_RET \ - bnslr; \ - b JUMPTARGET(__syscall_error) -#define ret PSEUDO_RET - -#undef PSEUDO_END -#define PSEUDO_END(name) \ - END (name) - -/* Local labels stripped out by the linker. */ -#undef L -#define L(x) .L##x - -/* Label in text section. */ -#define C_TEXT(name) name - -#endif /* __ASSEMBLER__ */ - #endif /* linux/powerpc/sysdep.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/Dist glibc-2.2.5/sysdeps/unix/sysv/linux/s390/Dist --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/Dist Mon Mar 26 21:27:18 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/Dist Tue Jan 8 13:37:02 2002 @@ -1,2 +1,3 @@ +ldd-rewrite.sed sys/elf.h sys/user.h diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/brk.c glibc-2.2.5/sysdeps/unix/sysv/linux/s390/brk.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/brk.c Mon Jul 23 10:57:46 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/brk.c Sun Jan 20 19:26:56 2002 @@ -35,14 +35,13 @@ __brk (void *addr) void *newbrk; { - register long r0 asm ("2"); register void *__addr asm("2") = addr; asm ("svc %b1\n\t" /* call sys_brk */ - : "=d" (r0) + : "=d" (__addr) : "I" (SYS_ify(brk)), "r" (__addr) - : _svc_clobber ); - newbrk = (void *) r0; + : "cc", "memory" ); + newbrk = __addr; } __curbrk = newbrk; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed glibc-2.2.5/sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed Tue Sep 18 20:14:27 2001 @@ -0,0 +1 @@ +s_^\(RTLDLIST=\)\([^ ]*\)\(\|64\)\(\.so\.[0-9.]*\)[ ]*$_\1"\2\4 \264\4"_ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/profil-counter.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/profil-counter.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/profil-counter.h Mon Jul 23 10:57:46 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/profil-counter.h Wed Dec 31 16:00:00 1969 @@ -1,27 +0,0 @@ -/* Low-level statistical profiling support function. Linux/s390 version. - Copyright (C) 2000 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 Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include - -static void -profil_counter (int signo, SIGCONTEXT scp) -{ - profil_count ((void *) GET_PC (scp)); -} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/Makefile Mon Jul 23 10:57:46 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/Makefile Thu Nov 15 17:24:04 2001 @@ -6,3 +6,11 @@ endif ifeq ($(subdir),resource) sysdep_routines += oldgetrlimit64 endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/Versions Fri Mar 16 01:22:33 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/Versions Thu Nov 15 17:22:34 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } GLIBC_2.2 { # functions used in other libraries diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S Mon Jul 23 10:57:46 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S Wed Aug 15 22:27:01 2001 @@ -62,6 +62,9 @@ ENTRY(__getcontext) /* Set __getcontext return value to 0. */ slr %r2,%r2 + /* Store access registers. */ + stam %a0,%a15,SC_ACRS(%r5) + /* Store general purpose registers. */ stm %r0,%r15,SC_GPRS(%r5) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h Fri Jan 11 17:42:17 2002 @@ -0,0 +1,27 @@ +/* Low-level statistical profiling support function. Linux/s390 version. + Copyright (C) 2000 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +static void +profil_counter (int signo, SIGCONTEXT scp) +{ + profil_count((void *) ((unsigned long) GET_PC (scp) & 0x7fffffffUL)); +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h Mon Jul 23 10:57:46 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h Wed Oct 31 13:46:27 2001 @@ -127,4 +127,4 @@ register_dump (int fd, struct sigcontext } -#define REGISTER_DUMP register_dump (fd, &ctx) +#define REGISTER_DUMP register_dump (fd, ctx) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S Mon Jul 23 10:57:47 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S Wed Aug 15 22:28:01 2001 @@ -59,6 +59,9 @@ ENTRY(__setcontext) ld %f14,SC_FPRS+112(%r5) ld %f15,SC_FPRS+120(%r5) + /* Don't touch %a0, used for thread purposes. */ + lam %a1,%a15,SC_ACRS+4(%r5) + /* Load general purpose registers. */ lm %r0,%r15,SC_GPRS(%r5) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S Wed Jan 16 16:46:09 2002 @@ -0,0 +1,108 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#include "ucontext_i.h" + +/* __swapcontext (ucontext_t *oucp, const ucontext_t *ucp) + + Saves the machine context in oucp such that when it is activated, + it appears as if __swapcontextt() returned again, restores the + machine context in ucp and thereby resumes execution in that + context. + + This implementation is intended to be used for *synchronous* context + switches only. Therefore, it does not have to save anything + other than the PRESERVED state. */ + +ENTRY(__swapcontext) + lr %r1,%r2 + lr %r5,%r3 + + /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ + la %r2,SIG_BLOCK + slr %r3,%r3 + la %r4,SC_MASK(%r1) + svc SYS_ify(rt_sigprocmask) + + /* Store fpu context. */ + stfpc SC_FPC(%r1) + std %f0,SC_FPRS(%r1) + std %f1,SC_FPRS+8(%r1) + std %f2,SC_FPRS+16(%r1) + std %f3,SC_FPRS+24(%r1) + std %f4,SC_FPRS+32(%r1) + std %f5,SC_FPRS+40(%r1) + std %f6,SC_FPRS+48(%r1) + std %f7,SC_FPRS+56(%r1) + std %f8,SC_FPRS+64(%r1) + std %f9,SC_FPRS+72(%r1) + std %f10,SC_FPRS+80(%r1) + std %f11,SC_FPRS+88(%r1) + std %f12,SC_FPRS+96(%r1) + std %f13,SC_FPRS+104(%r1) + std %f14,SC_FPRS+112(%r1) + std %f15,SC_FPRS+120(%r1) + + /* Set __swapcontext return value to 0. */ + slr %r2,%r2 + + /* Store access registers. */ + stam %a0,%a15,SC_ACRS(%r1) + + /* Store general purpose registers. */ + stm %r0,%r15,SC_GPRS(%r1) + + /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ + la %r2,SIG_BLOCK + la %r3,SC_MASK(%r5) + slr %r4,%r4 + svc SYS_ify(rt_sigprocmask) + + /* Load fpu context. */ + lfpc SC_FPC(%r5) + ld %f0,SC_FPRS(%r5) + ld %f1,SC_FPRS+8(%r5) + ld %f2,SC_FPRS+16(%r5) + ld %f3,SC_FPRS+24(%r5) + ld %f4,SC_FPRS+32(%r5) + ld %f5,SC_FPRS+40(%r5) + ld %f6,SC_FPRS+48(%r5) + ld %f7,SC_FPRS+56(%r5) + ld %f8,SC_FPRS+64(%r5) + ld %f9,SC_FPRS+72(%r5) + ld %f10,SC_FPRS+80(%r5) + ld %f11,SC_FPRS+88(%r5) + ld %f12,SC_FPRS+96(%r5) + ld %f13,SC_FPRS+104(%r5) + ld %f14,SC_FPRS+112(%r5) + ld %f15,SC_FPRS+120(%r5) + + /* Don't touch %a0, used for thread purposes. */ + lam %a1,%a15,SC_ACRS+4(%r5) + + /* Load general purpose registers. */ + lm %r0,%r15,SC_GPRS(%r5) + + /* Return. */ + br %r14 +END(__swapcontext) +weak_alias(__swapcontext, swapcontext) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h Mon Jul 23 10:57:49 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/sys/ucontext.h Sun Oct 14 14:29:36 2001 @@ -29,6 +29,12 @@ typedef struct ucontext ucontext_t; included in . */ #include +/* Type for a program status word. */ +typedef struct +{ + unsigned long mask; + unsigned long addr; +} __attribute__ ((aligned(8))) __psw_t; /* Type for a general-purpose register. */ typedef unsigned long greg_t; @@ -36,30 +42,32 @@ typedef unsigned long greg_t; /* And the whole bunch of them. We should have used `struct s390_regs', but to avoid name space pollution and since the tradition says that the register set is an array, we make gregset_t a simple array - that has the same size as s390_regs. */ + that has the same size as s390_regs. This is needed for the + elf_prstatus structure. */ #define NGREG 36 -#define NUM_FPRS 16 -/* Must match kernels psw_t alignment */ +/* Must match kernels psw_t alignment. */ typedef greg_t gregset_t[NGREG] __attribute__ ((aligned(8))); typedef union -{ - double d; - float f; -} fpreg_t; + { + double d; + float f; + } fpreg_t; /* Register set for the floating-point registers. */ -typedef struct { - unsigned int fpc; - fpreg_t fprs[NUM_FPRS]; -} fpregset_t; +typedef struct + { + unsigned int fpc; + fpreg_t fprs[16]; + } fpregset_t; /* Context to describe whole processor state. */ typedef struct { - int version; - gregset_t gregs; - fpregset_t fpregs; + __psw_t psw; + unsigned long gregs[16]; + unsigned int aregs[16]; + fpregset_t fpregs; } mcontext_t; /* Userlevel context. */ @@ -67,10 +75,9 @@ struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; - __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; - long int uc_filler[170]; + __sigset_t uc_sigmask; }; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h Fri Jul 27 23:13:35 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.h Wed Aug 15 22:28:49 2001 @@ -26,9 +26,10 @@ #define SC_FLGS 0x000 #define SC_LINK 0x004 -#define SC_MASK 0x008 -#define SC_STCK 0x088 -#define SC_VERS 0x098 -#define SC_GPRS 0x0a0 -#define SC_FPC 0x130 -#define SC_FPRS 0x138 +#define SC_STCK 0x008 +#define SC_PSW 0x018 +#define SC_GPRS 0x020 +#define SC_ACRS 0x060 +#define SC_FPC 0x0A0 +#define SC_FPRS 0x0A8 +#define SC_MASK 0x128 diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/Makefile Mon Jul 23 10:57:49 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/Makefile Sun Jan 20 19:26:57 2002 @@ -2,3 +2,11 @@ ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid sysdep_headers += sys/elf.h endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h Mon Jul 23 10:57:50 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/bits/sigaction.h Mon Sep 24 17:48:38 2001 @@ -53,7 +53,7 @@ struct sigaction /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */ #define SA_SIGINFO 0x00000004 -#ifdef __USE_MISC +#if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ # define SA_NODEFER 0x40000000 /* Don't automatically block the signal diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h Mon Jul 23 10:57:50 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h Tue Sep 25 22:23:09 2001 @@ -233,12 +233,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S Mon Jul 23 10:57:49 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S Sun Jan 20 19:26:57 2002 @@ -36,7 +36,7 @@ ENTRY(__getcontext) /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ la %r2,SIG_BLOCK - slr %r3,%r3 + slgr %r3,%r3 la %r4,SC_MASK(%r5) svc SYS_ify(rt_sigprocmask) @@ -60,7 +60,10 @@ ENTRY(__getcontext) std %f15,SC_FPRS+120(%r5) /* Set __getcontext return value to 0. */ - slr %r2,%r2 + slgr %r2,%r2 + + /* Store access registers. */ + stam %a0,%a15,SC_ACRS(%r5) /* Store general purpose registers. */ stmg %r0,%r15,SC_GPRS(%r5) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h Fri Jan 11 17:42:33 2002 @@ -0,0 +1,27 @@ +/* Low-level statistical profiling support function. Linux/s390 version. + Copyright (C) 2000 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +static void +profil_counter (int signo, SIGCONTEXT scp) +{ + profil_count ((void *) GET_PC (scp)); +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h Mon Jul 23 10:57:49 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h Wed Oct 31 13:46:29 2001 @@ -130,4 +130,4 @@ register_dump (int fd, struct sigcontext } -#define REGISTER_DUMP register_dump (fd, &ctx) +#define REGISTER_DUMP register_dump (fd, ctx) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S Mon Jul 23 10:57:49 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S Wed Aug 15 22:28:01 2001 @@ -58,6 +58,9 @@ ENTRY(__setcontext) ld %f13,SC_FPRS+104(%r5) ld %f14,SC_FPRS+112(%r5) ld %f15,SC_FPRS+120(%r5) + + /* Don't touch %a0 and %a1, used for thread purposes. */ + lam %a2,%a15,SC_ACRS+8(%r5) /* Load general purpose registers. */ lmg %r0,%r15,SC_GPRS(%r5) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S Thu Jan 17 14:57:59 2002 @@ -0,0 +1,108 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#include "ucontext_i.h" + +/* __swapcontext (ucontext_t *oucp, const ucontext_t *ucp) + + Saves the machine context in oucp such that when it is activated, + it appears as if __swapcontextt() returned again, restores the + machine context in ucp and thereby resumes execution in that + context. + + This implementation is intended to be used for *synchronous* context + switches only. Therefore, it does not have to save anything + other than the PRESERVED state. */ + +ENTRY(__swapcontext) + lgr %r1,%r2 + lgr %r5,%r3 + + /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ + la %r2,SIG_BLOCK + slgr %r3,%r3 + la %r4,SC_MASK(%r1) + svc SYS_ify(rt_sigprocmask) + + /* Store fpu context. */ + stfpc SC_FPC(%r1) + std %f0,SC_FPRS(%r1) + std %f1,SC_FPRS+8(%r1) + std %f2,SC_FPRS+16(%r1) + std %f3,SC_FPRS+24(%r1) + std %f4,SC_FPRS+32(%r1) + std %f5,SC_FPRS+40(%r1) + std %f6,SC_FPRS+48(%r1) + std %f7,SC_FPRS+56(%r1) + std %f8,SC_FPRS+64(%r1) + std %f9,SC_FPRS+72(%r1) + std %f10,SC_FPRS+80(%r1) + std %f11,SC_FPRS+88(%r1) + std %f12,SC_FPRS+96(%r1) + std %f13,SC_FPRS+104(%r1) + std %f14,SC_FPRS+112(%r1) + std %f15,SC_FPRS+120(%r1) + + /* Set __swapcontext return value to 0. */ + slgr %r2,%r2 + + /* Store access registers. */ + stam %a0,%a15,SC_ACRS(%r1) + + /* Store general purpose registers. */ + stmg %r0,%r15,SC_GPRS(%r1) + + /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ + la %r2,SIG_BLOCK + la %r3,SC_MASK(%r5) + slgr %r4,%r4 + svc SYS_ify(rt_sigprocmask) + + /* Load fpu context. */ + lfpc SC_FPC(%r5) + ld %f0,SC_FPRS(%r5) + ld %f1,SC_FPRS+8(%r5) + ld %f2,SC_FPRS+16(%r5) + ld %f3,SC_FPRS+24(%r5) + ld %f4,SC_FPRS+32(%r5) + ld %f5,SC_FPRS+40(%r5) + ld %f6,SC_FPRS+48(%r5) + ld %f7,SC_FPRS+56(%r5) + ld %f8,SC_FPRS+64(%r5) + ld %f9,SC_FPRS+72(%r5) + ld %f10,SC_FPRS+80(%r5) + ld %f11,SC_FPRS+88(%r5) + ld %f12,SC_FPRS+96(%r5) + ld %f13,SC_FPRS+104(%r5) + ld %f14,SC_FPRS+112(%r5) + ld %f15,SC_FPRS+120(%r5) + + /* Don't touch %a0 and %a1, used for thread purposes. */ + lam %a2,%a15,SC_ACRS+8(%r5) + + /* Load general purpose registers. */ + lmg %r0,%r15,SC_GPRS(%r5) + + /* Return. */ + br %r14 +END(__swapcontext) +weak_alias(__swapcontext, swapcontext) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h Mon Jul 23 10:57:50 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/sys/ucontext.h Sun Oct 14 14:29:36 2001 @@ -29,6 +29,12 @@ typedef struct ucontext ucontext_t; included in . */ #include +/* Type for a program status word. */ +typedef struct +{ + unsigned long mask; + unsigned long addr; +} __attribute__ ((aligned(8))) __psw_t; /* Type for a general-purpose register. */ typedef unsigned long greg_t; @@ -36,30 +42,32 @@ typedef unsigned long greg_t; /* And the whole bunch of them. We should have used `struct s390_regs', but to avoid name space pollution and since the tradition says that the register set is an array, we make gregset_t a simple array - that has the same size as s390_regs. */ + that has the same size as s390_regs. This is needed for the + elf_prstatus structure. */ #define NGREG 27 -#define NUM_FPRS 16 -/* Must match kernels psw_t alignment */ +/* Must match kernels psw_t alignment. */ typedef greg_t gregset_t[NGREG] __attribute__ ((aligned(8))); typedef union -{ - double d; - float f; -} fpreg_t; + { + double d; + float f; + } fpreg_t; /* Register set for the floating-point registers. */ -typedef struct { - unsigned int fpc; - fpreg_t fprs[NUM_FPRS]; -} fpregset_t; +typedef struct + { + unsigned int fpc; + fpreg_t fprs[16]; + } fpregset_t; /* Context to describe whole processor state. */ typedef struct { - int version; - gregset_t gregs; - fpregset_t fpregs; + __psw_t psw; + unsigned long gregs[16]; + unsigned int aregs[16]; + fpregset_t fpregs; } mcontext_t; /* Userlevel context. */ @@ -67,10 +75,9 @@ struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; - __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; - long int uc_filler[170]; + __sigset_t uc_sigmask; }; diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h Mon Jul 23 10:57:49 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.h Wed Aug 15 22:28:50 2001 @@ -26,10 +26,11 @@ #define SC_FLGS 0x000 #define SC_LINK 0x008 -#define SC_MASK 0x010 -#define SC_STCK 0x090 -#define SC_VERS 0x0a8 -#define SC_GPRS 0x0b0 -#define SC_FPC 0x188 -#define SC_FPRS 0x190 +#define SC_STCK 0x010 +#define SC_PSW 0x028 +#define SC_GPRS 0x038 +#define SC_ACRS 0x0B8 +#define SC_FPC 0x0F8 +#define SC_FPRS 0x100 +#define SC_MASK 0x180 diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/s390/swapcontext.c glibc-2.2.5/sysdeps/unix/sysv/linux/s390/swapcontext.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/s390/swapcontext.c Mon Jul 23 10:57:46 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/s390/swapcontext.c Wed Dec 31 16:00:00 1969 @@ -1,39 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include - -extern int __getcontext (ucontext_t *__ucp) __THROW; -extern int __setcontext (__const ucontext_t *__ucp) __THROW; - -int -__swapcontext (ucontext_t *oucp, const ucontext_t *ucp) -{ - /* Save the current machine context to oucp. */ - __getcontext (oucp); - /* Modify oucp to skip the __setcontext call on reactivation. */ - oucp->uc_mcontext.gregs[14] = &&fake_return; - /* Restore the machine context in ucp. */ - __setcontext (ucp); - -fake_return: - return 0; -} - -weak_alias (__swapcontext, swapcontext) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/sh/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Makefile Mon Jun 12 13:34:28 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sh/Makefile Mon Sep 24 18:30:37 2001 @@ -4,6 +4,7 @@ endif ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid +sysdep_headers += sys/io.h endif ifeq ($(subdir),signal) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sh/sysdep.S glibc-2.2.5/sysdeps/unix/sysv/linux/sh/sysdep.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/sysdep.S Mon Jul 23 10:57:51 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sh/sysdep.S Mon Aug 20 19:43:08 2001 @@ -21,6 +21,7 @@ /* We define errno here, to be consistent with Linux/i386. */ .section .bss + .align 2 .globl C_SYMBOL_NAME(errno) .type C_SYMBOL_NAME(errno), @object .size C_SYMBOL_NAME(errno), 4 diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/Makefile Wed Nov 15 17:48:14 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/Makefile Thu Nov 15 17:24:04 2001 @@ -42,3 +42,11 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%. mv -f $(@:.h=.d)-t2 $(@:.h=.d) endif + +ifeq ($(subdir),elf) +ifeq (yes,$(build-shared)) +# This is needed to support g++ v2 and v3. +sysdep_routines += framestate +shared-only-routines += framestate +endif +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h Mon Jul 23 10:57:52 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h Mon Sep 24 17:48:38 2001 @@ -56,7 +56,7 @@ struct sigaction #define SA_NOCLDWAIT 0x00000100 /* Don't create zombie on child death. */ #define SA_SIGINFO 0x00000200 /* Invoke signal-catching function with three arguments instead of one. */ -#ifdef __USE_MISC +#if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ # define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ # define SA_INTERRUPT 0x00000010 /* Historical no-op. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/bits/socket.h glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/bits/socket.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/bits/socket.h Mon Jul 23 10:57:52 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/bits/socket.h Tue Sep 25 22:23:10 2001 @@ -239,12 +239,13 @@ struct cmsghdr of cmsghdr structure. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ +#endif }; /* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 +#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/sparc32/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc32/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/sparc32/Versions Thu Aug 31 14:45:32 2000 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc32/Versions Thu Nov 15 17:22:35 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } GLIBC_2.2 { # functions used in other libraries diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/sparc64/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc64/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/sparc64/Versions Fri Feb 9 10:04:36 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc64/Versions Thu Nov 15 17:22:35 2001 @@ -2,8 +2,7 @@ libc { GLIBC_2.0 { # Exception handling support functions from libgcc __register_frame; __register_frame_table; __deregister_frame; - __register_frame_info; __deregister_frame_info; __frame_state_for; - __register_frame_info_table; + __frame_state_for; __register_frame_info_table; } GLIBC_2.2.2 { # w* diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S Mon Jul 23 10:57:54 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S Tue Dec 18 16:21:31 2001 @@ -40,7 +40,7 @@ __clone: mov %i3, %l3 /* save arg */ /* Do the system call */ - mov %i1, %o1 + sub %i1, 0x7ff, %o1 mov %i2, %o0 set __NR_clone, %g1 ta 0x6d diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/ulimit.c glibc-2.2.5/sysdeps/unix/sysv/linux/ulimit.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/ulimit.c Mon Jul 23 10:57:18 2001 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/ulimit.c Mon Sep 24 20:04:02 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,1994-1998,2000,2001 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 @@ -55,8 +55,16 @@ __ulimit (int cmd, ...) { long int newlimit = va_arg (va, long int); - limit.rlim_cur = newlimit * 512; - limit.rlim_max = newlimit * 512; + if ((rlim_t) newlimit > RLIM_INFINITY / 512) + { + limit.rlim_cur = RLIM_INFINITY; + limit.rlim_max = RLIM_INFINITY; + } + else + { + limit.rlim_cur = newlimit * 512; + limit.rlim_max = newlimit * 512; + } result = __setrlimit (RLIMIT_FSIZE, &limit); } diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/Dist glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/Dist --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/Dist Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/Dist Fri Sep 21 08:45:18 2001 @@ -0,0 +1,8 @@ +clone.S +ldd-rewrite.sed +sys/perm.h +sys/procfs.h +sys/reg.h +sys/user.h +umount.c + diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/Makefile glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/Makefile --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/Makefile Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/Makefile Fri Dec 14 07:56:23 2001 @@ -0,0 +1,4 @@ +ifeq ($(subdir),misc) +sysdep_routines += ioperm iopl +sysdep_headers += sys/perm.h sys/reg.h sys/debugreg.h +endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/Versions glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/Versions --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/Versions Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/Versions Fri Dec 14 07:56:23 2001 @@ -0,0 +1,9 @@ +libc { + GLIBC_2.2.5 { + arch_prctl; __arch_prctl; + + ioperm; iopl; + + __modify_ldt; modify_ldt; + } +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Wed Sep 19 03:30:39 2001 @@ -0,0 +1,170 @@ +/* O_*, F_*, FD_* bit values for Linux/x86-64. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + + +#include + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files + located on an ext2 file system */ +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 +#define O_NDELAY O_NONBLOCK +#define O_SYNC 010000 +#define O_FSYNC O_SYNC +#define O_ASYNC 020000 + +#ifdef __USE_GNU +# define O_DIRECT 040000 /* Direct disk access. */ +# define O_DIRECTORY 0200000 /* Must be a directory. */ +# define O_NOFOLLOW 0400000 /* Do not follow links. */ +#endif + +/* For now Linux has synchronisity options for data and read operations. + We define the symbols here but let them do the same as O_SYNC since + this is a superset. */ +#if defined __USE_POSIX199309 || defined __USE_UNIX98 +# define O_DSYNC O_SYNC /* Synchronize data. */ +# define O_RSYNC O_SYNC /* Synchronize read operations. */ +#endif + +#ifdef __USE_LARGEFILE64 +/* Not necessary, files are always with 64bit off_t. */ +# define O_LARGEFILE 0 +#endif + +/* Values for the second argument to `fcntl'. */ +#define F_DUPFD 0 /* Duplicate file descriptor. */ +#define F_GETFD 1 /* Get file descriptor flags. */ +#define F_SETFD 2 /* Set file descriptor flags. */ +#define F_GETFL 3 /* Get file status flags. */ +#define F_SETFL 4 /* Set file status flags. */ +#define F_GETLK 5 /* Get record locking info. */ +#define F_SETLK 6 /* Set record locking info (non-blocking). */ +#define F_SETLKW 7 /* Set record locking info (blocking). */ +#define F_GETLK64 F_GETLK /* Get record locking info. */ +#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */ +#define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */ + +#if defined __USE_BSD || defined __USE_XOPEN2K +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ +#endif + +#ifdef __USE_GNU +# define F_SETSIG 10 /* Set number of signal to be sent. */ +# define F_GETSIG 11 /* Get number of signal to be sent. */ +#endif + +#ifdef __USE_GNU +# define F_SETLEASE 1024 /* Set a lease. */ +# define F_GETLEASE 1025 /* Enquire what lease is active. */ +# define F_NOTIFY 1026 /* Request notfications on a directory. */ +#endif + +/* For F_[GET|SET]FL. */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 0 /* Read lock. */ +#define F_WRLCK 1 /* Write lock. */ +#define F_UNLCK 2 /* Remove lock. */ + +/* For old implementation of bsd flock(). */ +#define F_EXLCK 4 /* or 3 */ +#define F_SHLCK 8 /* or 4 */ + +#ifdef __USE_BSD +/* Operations for bsd flock(), also used by the kernel implementation. */ +# define LOCK_SH 1 /* shared lock */ +# define LOCK_EX 2 /* exclusive lock */ +# define LOCK_NB 4 /* or'd with one of the above to prevent + blocking */ +# define LOCK_UN 8 /* remove lock */ +#endif + +#ifdef __USE_GNU +# define LOCK_MAND 32 /* This is a mandatory flock: */ +# define LOCK_READ 64 /* ... which allows concurrent read operations. */ +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ +#endif + +#ifdef __USE_GNU +/* Types of directory notifications that may be requested with F_NOTIFY. */ +# define DN_ACCESS 0x00000001 /* File accessed. */ +# define DN_MODIFY 0x00000002 /* File modified. */ +# define DN_CREATE 0x00000004 /* File created. */ +# define DN_DELETE 0x00000008 /* File removed. */ +# define DN_RENAME 0x00000010 /* File renamed. */ +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ +#endif + +/* We don't need to support __USE_FILE_OFFSET64. */ +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Define some more compatibility macros to be backward compatible with + BSD systems which did not managed to hide these kernel macros. */ +#ifdef __USE_BSD +# define FAPPEND O_APPEND +# define FFSYNC O_FSYNC +# define FASYNC O_ASYNC +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ + +/* Advise to `posix_fadvise'. */ +#ifdef __USE_XOPEN2K +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/mman.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/mman.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/mman.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/mman.h Wed Sep 19 03:30:39 2001 @@ -0,0 +1,94 @@ +/* Definitions for POSIX memory map interface. Linux/x86_64 version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." +#endif + +/* The following definitions basically come from the kernel headers. + But the kernel header is not namespace clean. */ + + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_READ 0x1 /* Page can be read. */ +#define PROT_WRITE 0x2 /* Page can be written. */ +#define PROT_EXEC 0x4 /* Page can be executed. */ +#define PROT_NONE 0x0 /* Page can not be accessed. */ + +/* Sharing types (must choose one and only one of these). */ +#define MAP_SHARED 0x01 /* Share changes. */ +#define MAP_PRIVATE 0x02 /* Changes are private. */ +#ifdef __USE_MISC +# define MAP_TYPE 0x0f /* Mask for type of mapping. */ +#endif + +/* Other flags. */ +#define MAP_FIXED 0x10 /* Interpret addr exactly. */ +#ifdef __USE_MISC +# define MAP_FILE 0 +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ +# define MAP_ANON MAP_ANONYMOUS +# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ +#endif + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x2000 /* Lock the mapping. */ +# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ +#endif + +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 4 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/stat.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/stat.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/stat.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/stat.h Wed Sep 19 03:30:39 2001 @@ -0,0 +1,108 @@ +/* Copyright (C) 1999, 2000, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_STAT_H +# error "Never include directly; use instead." +#endif + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 1 +#define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +struct stat + { + __dev_t st_dev; /* Device. */ + __ino_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; /* Reserved for atime.nanoseconds. */ + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; /* Reserved for mtime.nanoseconds. */ + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; /* Reserved for ctime.nanoseconds. */ + long int __unused[3]; + }; + +#ifdef __USE_LARGEFILE64 +/* Note stat64 has the same shape as stat. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + __time_t st_atime; /* Time of last access. */ + long int __reserved0; /* Reserved for atime.nanoseconds. */ + __time_t st_mtime; /* Time of last modification. */ + long int __reserved1; /* Reserved for mtime.nanoseconds. */ + __time_t st_ctime; /* Time of last status change. */ + long int __reserved2; /* Reserved for ctime.nanoseconds. */ + long int __unused[3]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/statfs.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/statfs.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/statfs.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/statfs.h Wed Sep 19 03:30:39 2001 @@ -0,0 +1,58 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include /* for __fsid_t and __fsblkcnt_t. */ + +struct statfs + { + long int f_type; + long int f_bsize; + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_bavail; + __fsblkcnt_t f_files; + __fsblkcnt_t f_ffree; + __fsid_t f_fsid; + long int f_namelen; + long int f_spare[6]; + }; + +#ifdef __USE_LARGEFILE64 +/* We already use 64-bit types in the normal structure, + so this is the same as the above. */ +struct statfs64 + { + long int f_type; + long int f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsblkcnt64_t f_files; + __fsblkcnt64_t f_ffree; + __fsid_t f_fsid; + long int f_namelen; + long int f_spare[6]; + }; +#endif + +/* Tell code we have this member. */ +#define _STATFS_F_NAMELEN diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/time.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/time.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/time.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/time.h Wed Sep 19 03:30:39 2001 @@ -0,0 +1,73 @@ +/* System-dependent timing definitions. Linux x86-64 version. + Copyright (C) 1996, 1997, 1999, 2000, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef __need_timeval +# ifndef _BITS_TIME_H +# define _BITS_TIME_H 1 + +/* ISO/IEC 9899:1990 7.12.1: + The macro `CLOCKS_PER_SEC' is the number per second of the value + returned by the `clock' function. */ +/* CAE XSH, Issue 4, Version 2: + The value of CLOCKS_PER_SEC is required to be 1 million on all + XSI-conformant systems. */ +# define CLOCKS_PER_SEC 1000000l + +# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K +/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK + presents the real value for clock ticks per second for the system. */ +# include +extern long int __sysconf (int); +# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ +# endif + +# ifdef __USE_POSIX199309 +/* Identifier for system-wide realtime clock. */ +# define CLOCK_REALTIME 0 +/* High-resolution timer from the CPU. */ +# define CLOCK_PROCESS_CPUTIME_ID 2 +/* Thread-specific CPU-time clock. */ +# define CLOCK_THREAD_CPUTIME_ID 3 + +/* Flag to indicate time is absolute. */ +# define TIMER_ABSTIME 1 +# endif + +# endif /* bits/time.h */ +#endif + +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +# include + +/* A time value that is accurate to the nearest + microsecond but also has a range of years. */ +struct timeval + { + __time_t tv_sec; /* Seconds. */ + __suseconds_t tv_usec; /* Microseconds. */ + }; +# endif /* struct timeval */ +#endif /* need timeval */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/types.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/types.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/bits/types.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/bits/types.h Wed Sep 19 03:30:39 2001 @@ -0,0 +1,119 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* + * Never include this file directly; use instead. + */ + +#ifndef _BITS_TYPES_H +#define _BITS_TYPES_H 1 + +#include + +#define __need_size_t +#include + +/* Convenience types. */ +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; +typedef unsigned long int __u_quad_t; +typedef long int __quad_t; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +typedef __quad_t *__qaddr_t; + +typedef __uint64_t __dev_t; /* Type of device numbers. */ +typedef __uint32_t __uid_t; /* Type of user identifications. */ +typedef __uint32_t __gid_t; /* Type of group identifications. */ +typedef __uint64_t __ino_t; /* Type of file serial numbers. */ +typedef __uint64_t __ino64_t; /* "" (LFS) */ +typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */ +typedef __uint64_t __nlink_t; /* Type of file link counts. */ +typedef __int64_t __off_t; /* Type of file sizes and offsets. */ +typedef __int64_t __off64_t; /* "" (LFS) */ +typedef __int64_t __loff_t; /* Type of file sizes and offsets. */ +typedef __int32_t __pid_t; /* Type of process identifications. */ +typedef __int64_t __ssize_t; /* Type of a byte count, or error. */ +typedef __uint64_t __rlim_t; /* Type of resource counts. */ +typedef __uint64_t __rlim64_t; /* "" (LFS) */ +typedef __int64_t __blkcnt_t; /* Type to count nr disk blocks. */ +typedef __int64_t __blkcnt64_t; /* "" (LFS) */ +typedef __uint64_t __fsblkcnt_t; /* Type to count file system blocks. */ +typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */ +typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */ +typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */ +typedef __uint32_t __id_t; /* General type for IDs. */ + +typedef struct + { + int __val[2]; + } __fsid_t; /* Type of file system IDs. */ + +/* Everythin' else. */ +typedef int __daddr_t; /* Type of a disk address. */ +typedef char *__caddr_t; /* Type of a core address. */ +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef long int __swblk_t; /* Type of a swap block maybe? */ +typedef long int __clock_t; +typedef int __key_t; /* Type of a SYSV IPC key. */ + +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + +/* Used in `struct shmid_ds'. */ +typedef int __ipc_pid_t; + +/* type to represent block size. */ +typedef long int __blksize_t; + +/* Due to incaution, we may have gotten these from a kernel header file. */ +#undef __FD_SETSIZE +#undef __FDMASK + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + +/* Used in XTI. */ +typedef int __t_scalar_t; +typedef unsigned int __t_uscalar_t; + +/* Duplicates info from stdint.h but this is used in unistd.h. */ +typedef long int __intptr_t; + +/* Duplicate info from sys/socket.h. */ +typedef unsigned int __socklen_t; + +/* Now add the thread types. */ +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include +#endif + +#endif /* bits/types.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/brk.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/brk.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/brk.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/brk.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/clone.S glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/clone.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/clone.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/clone.S Wed Sep 19 03:31:54 2001 @@ -0,0 +1,86 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* clone() is even more special than fork() as it mucks with stacks + and invokes a function in the right context after its all over. */ + +#include +#define _ERRNO_H 1 +#include +#include +#include +#include + +/* The userland implementation is: + int clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg), + the kernel entry is: + int clone (long flags, void *child_stack). + + The parameters are passed in register from userland: + rdi: fn + rsi: child_stack + rdx: flags + rcx: arg + + The kernel expects: + rax: system call number + rdi: flags + rsi: child_stack */ + + + .text +ENTRY (BP_SYM (__clone)) + /* Sanity check arguments. */ + movq $-EINVAL,%rax + testq %rdi,%rdi /* no NULL function pointers */ + jz SYSCALL_ERROR_LABEL + testq %rsi,%rsi /* no NULL stack pointers */ + jz SYSCALL_ERROR_LABEL + + /* Insert the argument onto the new stack. */ + subq $16,%rsi + movq %rcx,8(%rsi) + + /* Save the function pointer. It will be popped off in the + child in the ebx frobbing below. */ + movq %rdi,0(%rsi) + + /* Do the system call. */ + movq %rdx, %rdi + movq $SYS_ify(clone),%rax + syscall + + testq %rax,%rax + jl SYSCALL_ERROR_LABEL + jz thread_start + +L(pseudo_end): + ret + +thread_start: + /* Set up arguments for the function call. */ + popq %rax /* Function to call. */ + popq %rdi /* Argument. */ + call *%rax + /* Call exit with return value from function call. */ + movq %rax, %rdi + call JUMPTARGET (_exit) + +PSEUDO_END (BP_SYM (__clone)) + +weak_alias (BP_SYM (__clone), BP_SYM (clone)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/fstatfs64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/fstatfs64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/fstatfs64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/fstatfs64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* fstatfs64 is the same as fstatfs. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/ftruncate64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/ftruncate64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/ftruncate64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/ftruncate64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* ftruncate64 is the same as ftruncate. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/fxstat.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/fxstat.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/fxstat.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/fxstat.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/fxstat64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/fxstat64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/fxstat64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/fxstat64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* fxstat64 is in fxstat.c */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/getdents.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/getdents.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/getdents.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/getdents.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,2 @@ +#include + diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/getdents64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/getdents64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/getdents64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/getdents64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* getdents64 is in getdents.c */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/getrlimit64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/getrlimit64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/getrlimit64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/getrlimit64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* getrlimit64 is the same as getrlimit. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,38 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* Get the current time of day and timezone information, + putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. + Returns 0 on success, -1 on errors. */ +int +__gettimeofday (struct timeval *tv, struct timezone *tz) +{ + /* We're using a virtual syscall here. */ + int (*__vgettimeofday)(struct timeval *, struct timezone *) + = (int (*)(struct timeval *, struct timezone *)) VSYSCALL_ADDR (__NR_vgettimeofday); + + + return __vgettimeofday (tv, tz); +} + +weak_alias (__gettimeofday, gettimeofday) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/glob64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/glob64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/glob64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/glob64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* glob64 is in glob.c */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed Wed Sep 19 03:33:44 2001 @@ -0,0 +1,3 @@ +/LD_TRACE_LOADED_OBJECTS=1/a\ +add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out" +s_^\(RTLDLIST=\)\(.*lib\)\(\|64\)\(/[^/]*\.so\.[0-9.]*\)[ ]*$_\1"\2\4 \264\4"_ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/lxstat.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/lxstat.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/lxstat.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/lxstat.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/lxstat64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/lxstat64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/lxstat64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/lxstat64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* lxstat64 is in lxstat.c */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/mmap64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/mmap64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/mmap64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/mmap64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* mmap64 is the same as mmap. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/pread64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/pread64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/pread64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/pread64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* Empty since the pread syscall is equivalent. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/profil-counter.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/profil-counter.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/profil-counter.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/profil-counter.h Wed Sep 19 03:32:01 2001 @@ -0,0 +1,27 @@ +/* Low-level statistical profiling support function. Linux/x86-64 version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +static void +profil_counter (int signo, SIGCONTEXT scp) +{ + profil_count ((void *) GET_PC (scp)); +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/pwrite64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/pwrite64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/pwrite64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/pwrite64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* Empty since the pread syscall is equivalent. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,2 @@ +#include + diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* readdir64 is in readdir.c */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir64_r.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir64_r.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir64_r.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir64_r.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* readdir64_r is in readdir_r.c */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir_r.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir_r.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/readdir_r.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/readdir_r.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/recv.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/recv.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/recv.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/recv.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,34 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Read N bytes into BUF from socket FD. + Returns the number read or -1 for errors. */ + +ssize_t +__libc_recv (int fd, void *buf, size_t n, int flags) +{ + + return INLINE_SYSCALL (recvfrom, 6, fd, buf, n, flags, NULL, NULL); +} + +weak_alias (__libc_recv, __recv) +weak_alias (__recv, recv) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/register-dump.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/register-dump.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/register-dump.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/register-dump.h Wed Sep 19 03:32:01 2001 @@ -0,0 +1,344 @@ +/* Dump registers. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +/* We will print the register dump in this format: + + RAX: XXXXXXXXXXXXXXXX RBX: XXXXXXXXXXXXXXXX RCX: XXXXXXXXXXXXXXXX + RDX: XXXXXXXXXXXXXXXX RSI: XXXXXXXXXXXXXXXX RDI: XXXXXXXXXXXXXXXX + RBP: XXXXXXXXXXXXXXXX R8 : XXXXXXXXXXXXXXXX R9 : XXXXXXXXXXXXXXXX + R10: XXXXXXXXXXXXXXXX R11: XXXXXXXXXXXXXXXX R12: XXXXXXXXXXXXXXXX + R13: XXXXXXXXXXXXXXXX R14: XXXXXXXXXXXXXXXX R15: XXXXXXXXXXXXXXXX + RSP: XXXXXXXXXXXXXXXX + + RIP: XXXXXXXXXXXXXXXX EFLAGS: XXXXXXXX + + CS: XXXX DS: XXXX ES: XXXX FS: XXXX GS: XXXX + + Trap: XXXXXXXX Error: XXXXXXXX OldMask: XXXXXXXX + RSP/SIGNAL: XXXXXXXXXXXXXXXX CR2: XXXXXXXX + + FPUCW: XXXXXXXX FPUSW: XXXXXXXX TAG: XXXXXXXX + IPOFF: XXXXXXXX CSSEL: XXXX DATAOFF: XXXXXXXX DATASEL: XXXX + + ST(0) XXXX XXXXXXXXXXXXXXXX ST(1) XXXX XXXXXXXXXXXXXXXX + ST(2) XXXX XXXXXXXXXXXXXXXX ST(3) XXXX XXXXXXXXXXXXXXXX + ST(4) XXXX XXXXXXXXXXXXXXXX ST(5) XXXX XXXXXXXXXXXXXXXX + ST(6) XXXX XXXXXXXXXXXXXXXX ST(7) XXXX XXXXXXXXXXXXXXXX + + mxcsr: XXXX + XMM0 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM1 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM2 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM3 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM4 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM5 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM6 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM7 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM8 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM9 : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM10: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM11: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM12: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM13: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + XMM14: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XMM15: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + + */ + +static void +hexvalue (unsigned long int value, char *buf, size_t len) +{ + char *cp = _itoa_word (value, buf + len, 16, 0); + while (cp > buf) + *--cp = '0'; +} + +static void +register_dump (int fd, struct sigcontext *ctx) +{ + char regs[29][16]; + char fpregs[32][8]; + char xmmregs[16][32]; + struct iovec iov[147]; + size_t nr = 0; + int i; + +#define ADD_STRING(str) \ + iov[nr].iov_base = (char *) str; \ + iov[nr].iov_len = strlen (str); \ + ++nr +#define ADD_MEM(str, len) \ + iov[nr].iov_base = str; \ + iov[nr].iov_len = len; \ + ++nr + + /* Generate strings of register contents. */ + hexvalue (ctx->rax, regs[0], 16); + hexvalue (ctx->rbx, regs[1], 16); + hexvalue (ctx->rcx, regs[2], 16); + hexvalue (ctx->rdx, regs[3], 16); + hexvalue (ctx->rsi, regs[4], 16); + hexvalue (ctx->rdi, regs[5], 16); + hexvalue (ctx->rbp, regs[6], 16); + hexvalue (ctx->r8, regs[7], 16); + hexvalue (ctx->r9, regs[8], 16); + hexvalue (ctx->r10, regs[9], 16); + hexvalue (ctx->r11, regs[10], 16); + hexvalue (ctx->r12, regs[11], 16); + hexvalue (ctx->r13, regs[12], 16); + hexvalue (ctx->r14, regs[13], 16); + hexvalue (ctx->r15, regs[14], 16); + hexvalue (ctx->rsp, regs[15], 16); + hexvalue (ctx->rip, regs[16], 16); + + hexvalue (ctx->eflags, regs[17], 8); + hexvalue (ctx->cs, regs[18], 4); + hexvalue (ctx->ds, regs[19], 4); + hexvalue (ctx->es, regs[20], 4); + hexvalue (ctx->fs, regs[21], 4); + hexvalue (ctx->gs, regs[22], 4); + /* hexvalue (ctx->ss, regs[23], 4); */ + hexvalue (ctx->trapno, regs[24], 8); + hexvalue (ctx->err, regs[25], 8); + hexvalue (ctx->oldmask, regs[26], 8); + hexvalue (ctx->rsp_at_signal, regs[27], 16); + hexvalue (ctx->cr2, regs[28], 8); + + /* Generate the output. */ + ADD_STRING ("Register dump:\n\n RAX: "); + ADD_MEM (regs[0], 16); + ADD_STRING (" RBX: "); + ADD_MEM (regs[1], 16); + ADD_STRING (" RCX: "); + ADD_MEM (regs[2], 16); + ADD_STRING ("\n RDX: "); + ADD_MEM (regs[3], 16); + ADD_STRING (" RSI: "); + ADD_MEM (regs[4], 16); + ADD_STRING (" RDI: "); + ADD_MEM (regs[5], 16); + ADD_STRING ("\n RBP: "); + ADD_MEM (regs[6], 16); + ADD_STRING (" R8 : "); + ADD_MEM (regs[7], 16); + ADD_STRING (" R9 : "); + ADD_MEM (regs[8], 16); + ADD_STRING ("\n R10: "); + ADD_MEM (regs[9], 16); + ADD_STRING (" R11: "); + ADD_MEM (regs[10], 16); + ADD_STRING (" R12: "); + ADD_MEM (regs[11], 16); + ADD_STRING ("\n R13: "); + ADD_MEM (regs[12], 16); + ADD_STRING (" R14: "); + ADD_MEM (regs[13], 16); + ADD_STRING (" R15: "); + ADD_MEM (regs[14], 16); + ADD_STRING ("\n RSP: "); + ADD_MEM (regs[15], 16); + ADD_STRING ("\n\n RIP: "); + ADD_MEM (regs[16], 16); + ADD_STRING (" EFLAGS: "); + ADD_MEM (regs[17], 8); + ADD_STRING ("\n\n CS: "); + ADD_MEM (regs[18], 4); + ADD_STRING (" DS: "); + ADD_MEM (regs[19], 4); + ADD_STRING (" ES: "); + ADD_MEM (regs[20], 4); + ADD_STRING (" FS: "); + ADD_MEM (regs[21], 4); + ADD_STRING (" GS: "); + ADD_MEM (regs[22], 4); + /* + ADD_STRING (" SS: "); + ADD_MEM (regs[23], 4); + */ + ADD_STRING ("\n\n Trap: "); + ADD_MEM (regs[24], 8); + ADD_STRING (" Error: "); + ADD_MEM (regs[25], 8); + ADD_STRING (" OldMask: "); + ADD_MEM (regs[26], 8); + ADD_STRING ("\n RSP/signal: "); + ADD_MEM (regs[27], 8); + ADD_STRING (" CR2: "); + ADD_MEM (regs[28], 8); + + if (ctx->fpstate != NULL) + { + + /* Generate output for the FPU control/status registers. */ + hexvalue (ctx->fpstate->cw, fpregs[0], 8); + hexvalue (ctx->fpstate->sw, fpregs[1], 8); + hexvalue (ctx->fpstate->tag, fpregs[2], 8); + hexvalue (ctx->fpstate->ipoff, fpregs[3], 8); + hexvalue (ctx->fpstate->cssel, fpregs[4], 4); + hexvalue (ctx->fpstate->dataoff, fpregs[5], 8); + hexvalue (ctx->fpstate->datasel, fpregs[6], 4); + + ADD_STRING ("\n\n FPUCW: "); + ADD_MEM (fpregs[0], 8); + ADD_STRING (" FPUSW: "); + ADD_MEM (fpregs[1], 8); + ADD_STRING (" TAG: "); + ADD_MEM (fpregs[2], 8); + ADD_STRING ("\n IPOFF: "); + ADD_MEM (fpregs[3], 8); + ADD_STRING (" CSSEL: "); + ADD_MEM (fpregs[4], 4); + ADD_STRING (" DATAOFF: "); + ADD_MEM (fpregs[5], 8); + ADD_STRING (" DATASEL: "); + ADD_MEM (fpregs[6], 4); + + /* Now the real FPU registers. */ + hexvalue (ctx->fpstate->_st[0].exponent, fpregs[7], 8); + hexvalue (ctx->fpstate->_st[0].significand[3] << 16 + | ctx->fpstate->_st[0].significand[2], fpregs[8], 8); + hexvalue (ctx->fpstate->_st[0].significand[1] << 16 + | ctx->fpstate->_st[0].significand[0], fpregs[9], 8); + hexvalue (ctx->fpstate->_st[1].exponent, fpregs[10], 8); + hexvalue (ctx->fpstate->_st[1].significand[3] << 16 + | ctx->fpstate->_st[1].significand[2], fpregs[11], 8); + hexvalue (ctx->fpstate->_st[1].significand[1] << 16 + | ctx->fpstate->_st[1].significand[0], fpregs[12], 8); + hexvalue (ctx->fpstate->_st[2].exponent, fpregs[13], 8); + hexvalue (ctx->fpstate->_st[2].significand[3] << 16 + | ctx->fpstate->_st[2].significand[2], fpregs[14], 8); + hexvalue (ctx->fpstate->_st[2].significand[1] << 16 + | ctx->fpstate->_st[2].significand[0], fpregs[15], 8); + hexvalue (ctx->fpstate->_st[3].exponent, fpregs[16], 8); + hexvalue (ctx->fpstate->_st[3].significand[3] << 16 + | ctx->fpstate->_st[3].significand[2], fpregs[17], 8); + hexvalue (ctx->fpstate->_st[3].significand[1] << 16 + | ctx->fpstate->_st[3].significand[0], fpregs[18], 8); + hexvalue (ctx->fpstate->_st[4].exponent, fpregs[19], 8); + hexvalue (ctx->fpstate->_st[4].significand[3] << 16 + | ctx->fpstate->_st[4].significand[2], fpregs[20], 8); + hexvalue (ctx->fpstate->_st[4].significand[1] << 16 + | ctx->fpstate->_st[4].significand[0], fpregs[21], 8); + hexvalue (ctx->fpstate->_st[5].exponent, fpregs[22], 8); + hexvalue (ctx->fpstate->_st[5].significand[3] << 16 + | ctx->fpstate->_st[5].significand[2], fpregs[23], 8); + hexvalue (ctx->fpstate->_st[5].significand[1] << 16 + | ctx->fpstate->_st[5].significand[0], fpregs[24], 8); + hexvalue (ctx->fpstate->_st[6].exponent, fpregs[25], 8); + hexvalue (ctx->fpstate->_st[6].significand[3] << 16 + | ctx->fpstate->_st[6].significand[2], fpregs[26], 8); + hexvalue (ctx->fpstate->_st[6].significand[1] << 16 + | ctx->fpstate->_st[6].significand[0], fpregs[27], 8); + hexvalue (ctx->fpstate->_st[7].exponent, fpregs[28], 8); + hexvalue (ctx->fpstate->_st[7].significand[3] << 16 + | ctx->fpstate->_st[7].significand[2], fpregs[29], 8); + hexvalue (ctx->fpstate->_st[7].significand[1] << 16 + | ctx->fpstate->_st[7].significand[0], fpregs[30], 8); + + hexvalue (ctx->fpstate->mxcsr, fpregs[31], 4); + + for (i = 0; i < 16; i++) + hexvalue (ctx->fpstate->_xmm[i].element[3] << 24 + | ctx->fpstate->_xmm[i].element[2] << 16 + | ctx->fpstate->_xmm[i].element[1] << 8 + | ctx->fpstate->_xmm[i].element[0], xmmregs[i], 32); + + + ADD_STRING ("\n\n ST(0) "); + ADD_MEM (fpregs[7], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[8], 8); + ADD_MEM (fpregs[9], 8); + ADD_STRING (" ST(1) "); + ADD_MEM (fpregs[10], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[11], 8); + ADD_MEM (fpregs[12], 8); + ADD_STRING ("\n ST(2) "); + ADD_MEM (fpregs[13], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[14], 8); + ADD_MEM (fpregs[15], 8); + ADD_STRING (" ST(3) "); + ADD_MEM (fpregs[16], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[17], 8); + ADD_MEM (fpregs[18], 8); + ADD_STRING ("\n ST(4) "); + ADD_MEM (fpregs[19], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[20], 8); + ADD_MEM (fpregs[21], 8); + ADD_STRING (" ST(5) "); + ADD_MEM (fpregs[22], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[23], 8); + ADD_MEM (fpregs[24], 8); + ADD_STRING ("\n ST(6) "); + ADD_MEM (fpregs[25], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[26], 8); + ADD_MEM (fpregs[27], 8); + ADD_STRING (" ST(7) "); + ADD_MEM (fpregs[28], 4); + ADD_STRING (" "); + ADD_MEM (fpregs[29], 8); + ADD_MEM (fpregs[30], 8); + + ADD_STRING ("\n mxcsr: "); + ADD_MEM (fpregs[31], 4); + + ADD_STRING ("\n XMM0: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM1: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM2: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM3: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM4: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM5: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM6: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM7: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM8: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM9: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM10: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM11: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM12: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM13: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING ("\n XMM14: "); + ADD_MEM (xmmregs[0], 32); + ADD_STRING (" XMM15: "); + ADD_MEM (xmmregs[0], 32); + + } + + ADD_STRING ("\n"); + + /* Write the stuff out. */ + writev (fd, iov, nr); +} + + +#define REGISTER_DUMP register_dump (fd, &ctx) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/send.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/send.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/send.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/send.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,31 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */ +ssize_t +__libc_send (int fd, const void *buf, size_t n, int flags) +{ + return INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, NULL); +} + +weak_alias (__libc_send, __send) +weak_alias (__send, send) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/setrlimit64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/setrlimit64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/setrlimit64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/setrlimit64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* setrlimit64 is the same as setrlimit. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigaction.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigaction.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigaction.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigaction.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,99 @@ +/* POSIX.1 `sigaction' call for Linux/x86-64. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +/* The difference here is that the sigaction structure used in the + kernel is not the same as we use in the libc. Therefore we must + translate it here. */ +#include + +/* We do not globally define the SA_RESTORER flag so do it here. */ +#define SA_RESTORER 0x04000000 + +extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, + struct kernel_sigaction *__unbounded, size_t); + +static void restore_rt (void) asm ("__restore_rt"); + + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) +{ + int result; + struct kernel_sigaction kact, koact; + + if (act) + { + kact.k_sa_handler = act->sa_handler; + memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t)); + kact.sa_flags = act->sa_flags | SA_RESTORER; + + kact.sa_restorer = &restore_rt; + } + + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + result = INLINE_SYSCALL (rt_sigaction, 4, + sig, act ? __ptrvalue (&kact) : NULL, + oact ? __ptrvalue (&koact) : NULL, _NSIG / 8); + if (oact && result >= 0) + { + oact->sa_handler = koact.k_sa_handler; + memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t)); + oact->sa_flags = koact.sa_flags; + oact->sa_restorer = koact.sa_restorer; + } + return result; +} + +weak_alias (__libc_sigaction, __sigaction) +weak_alias (__libc_sigaction, sigaction) + +/* NOTE: Please think twice before making any changes to the bits of + code below. GDB needs some intimate knowledge about it to + recognize them as signal trampolines, and make backtraces through + signal handlers work right. Important are both the names + (__restore_rt) and the exact instruction sequence. + If you ever feel the need to make any changes, please notify the + appropriate GDB maintainer. */ + +#define RESTORE(name, syscall) RESTORE2 (name, syscall) +#define RESTORE2(name, syscall) \ +asm \ + ( \ + ".align 16\n" \ + "__" #name ":\n" \ + " movq $" #syscall ", %rax\n" \ + " syscall\n" \ + ); + +/* The return code for realtime-signals. */ +RESTORE (restore_rt, __NR_rt_sigreturn) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h Wed Sep 19 03:32:01 2001 @@ -0,0 +1,26 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define SIGCONTEXT struct sigcontext +#define SIGCONTEXT_EXTRA_ARGS +#define GET_PC(ctx) ((void *) ctx.rip) +#define GET_FRAME(ctx) ((void *) ctx.rbp) +#define GET_STACK(ctx) ((void *) ctx.rsp_at_signal) + +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigpending.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigpending.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigpending.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigpending.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigprocmask.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sigsuspend.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/statfs64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/statfs64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/statfs64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/statfs64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* statfs64 is the same as statfs. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/perm.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/perm.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/perm.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/perm.h Wed Sep 19 03:30:49 2001 @@ -0,0 +1,36 @@ +/* Copyright (C) 1996, 1999, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_PERM_H + +#define _SYS_PERM_H 1 +#include + +__BEGIN_DECLS + +/* Set port input/output permissions. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; + + +/* Change I/O privilege level. */ +extern int iopl (int __level) __THROW; + +__END_DECLS + +#endif /* _SYS_PERM_H */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h Wed Sep 19 03:30:49 2001 @@ -0,0 +1,127 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include +#include +#include +#include + +__BEGIN_DECLS + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs_struct' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the extended floating-point registers. Includes + the Pentium III SSE registers in addition to the classic + floating-point stuff. */ +typedef struct user_fpregs_struct elf_fpregset_t; + +/* Signal info. */ +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned int pr_uid; + unsigned int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* The rest of this file provides the types for emulation of the + Solaris interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/reg.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/reg.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/reg.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/reg.h Wed Sep 19 03:30:49 2001 @@ -0,0 +1,47 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_REG_H +#define _SYS_REG_H 1 + +/* Index into an array of 8 byte longs returned from ptrace for + location of the users' stored general purpose registers. */ + +#define R15 0 +#define R14 1 +#define R13 2 +#define R12 3 +#define RBP 4 +#define RBX 5 +#define R11 6 +#define R10 7 +#define R9 8 +#define R8 9 +#define RAX 10 +#define RCX 11 +#define RDX 12 +#define RSI 13 +#define RDI 14 +#define ORIG_RAX 15 +#define RIP 16 +#define CS 17 +#define EFLAGS 18 +#define RSP 19 +#define SS 20 + +#endif diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h Wed Sep 19 03:30:49 2001 @@ -0,0 +1,160 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include +#include + +/* We need the signal context definitions even if they are not used + included in . */ +#include + +/* Type for general register. */ +typedef long int greg_t; + +/* Number of general registers. */ +#define NGREG 27 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +#ifdef __USE_GNU +/* Number of each register in the `gregset_t' array. */ +enum +{ + REG_GSFS = 0, +# define REG_GSFS REG_GSFS + REG_ESDS, +# define REG_ESDS REG_ESDS + REG_R8, +# define REG_R8 REG_R8 + REG_R9, +# define REG_R9 REG_R9 + REG_R10, +# define REG_R10 REG_R10 + REG_R11, +# define REG_R11 REG_R11 + REG_R12, +# define REG_R12 REG_R12 + REG_R13, +# define REG_R13 REG_R13 + REG_R14, +# define REG_R14 REG_R14 + REG_R15, +# define REG_R15 REG_R15 + REG_RDI, +# define REG_RDI REG_RDI + REG_RSI, +# define REG_RSI REG_RSI + REG_RBP, +# define REG_RBP REG_RBP + REG_RSP, +# define REG_RSP REG_RSP + REG_RBX, +# define REG_RBX REG_RBX + REG_RDX, +# define REG_RDX REG_RDX + REG_RCX, +# define REG_RCX REG_RCX + REG_RAX, +# define REG_RAX REG_RAX + REG_TRAPNO, +# define REG_TRAPNO REG_TRAPNO + REG_ERR, +# define REG_ERR REG_ERR + REG_RIP, +# define REG_RIP REG_RIP + REG_CS, +# define REG_CS REG_CS + REG_EFL, +# define REG_EFL REG_EFL + REG_URSP, +# define REG_URSP REG_URSP + REG_SS +# define REG_SS REG_SS +}; +#endif + +/* Definitions taken from the kernel headers. */ +struct _libc_fpreg +{ + unsigned short int significand[4]; + unsigned short int exponent; +}; + +struct _libc_fpxreg +{ + unsigned short int significand[4]; + unsigned short int exponent; + unsigned short int padding[3]; +}; + +struct _libc_xmmreg +{ + unsigned long int element[4]; +}; + +struct _libc_fpstate +{ + /* Regular FPU environment. */ + unsigned long int cw; + unsigned long int sw; + unsigned long int tag; + unsigned long int ipoff; + unsigned long int cssel; + unsigned long int dataoff; + unsigned long int datasel; + struct _libc_fpreg _st[16]; + unsigned short int status; + unsigned short int magic; + /* FXSR FPU environment. */ + + unsigned long int _fxsr_env[6]; + unsigned long int mxcsr; + unsigned long int reserved; + struct _libc_fpxreg _fxsr_st[8]; + struct _libc_xmmreg _xmm[16]; + unsigned long int padding[32]; +}; + +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + unsigned long int oldmask; + unsigned long int cr2; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/user.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/user.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sys/user.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sys/user.h Wed Sep 19 03:30:49 2001 @@ -0,0 +1,97 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _SYS_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int twd; + unsigned short int fop; + unsigned int fip; + unsigned int fcs; + unsigned int foo; + unsigned int fos; + unsigned int mxcsr; + unsigned int reserved; + unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + unsigned int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ + unsigned int padding[56]; +}; + +struct user_regs_struct +{ + unsigned long r15; + unsigned long r14; + unsigned long r13; + unsigned long r12; + unsigned long rbp; + unsigned long rbx; + unsigned long r11; + unsigned long r10; + unsigned long r9; + unsigned long r8; + unsigned long rax; + unsigned long rcx; + unsigned long rdx; + unsigned long rsi; + unsigned long rdi; + unsigned long orig_rax; + unsigned long rip; + unsigned long cs; + unsigned long eflags; + unsigned long rsp; + unsigned long ss; + unsigned long fs_base; + unsigned long kernel_gs_base; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long start_code; + unsigned long start_stack; + long int signal; + int reserved; + struct user_regs_struct* u_ar0; + struct user_fpregs_struct* u_fpstate; + unsigned long int magic; + char u_comm [32]; + int u_debugreg [8]; +}; + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/syscall.S glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/syscall.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/syscall.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/syscall.S Wed Sep 19 03:31:54 2001 @@ -0,0 +1,44 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Please consult the file sysdeps/unix/sysv/linux/x86-64/sysdep.h for + more information about the value -4095 used below. */ + +/* Usage: long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5) + We need to do some arg shifting, the syscall_number will be in + rax. */ + + + .text +ENTRY (syscall) + + movq %rdi, %rax /* Syscall number -> rax. */ + movq %rsi, %rdi /* shift arg1 - arg5. */ + movq %rdx, %rsi + movq %rcx, %rdx + movq %r8, %r10 + movq %r9, %r8 + syscall /* Do the system call. */ + cmpq $-4095, %rax /* Check %rax for error. */ + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */ +L(pseudo_end): + ret /* Return to caller. */ + +PSEUDO_END (syscall) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/syscalls.list glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/syscalls.list --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/syscalls.list Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/syscalls.list Wed Sep 19 03:32:31 2001 @@ -0,0 +1,44 @@ +# File name Caller Syscall name # args Strong name Weak names + +mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64 +llseek EXTRA lseek i:iii __libc_lseek64 __llseek llseek __lseek64 lseek64 +pread - pread i:ibni __libc_pread __libc_pread64 __pread pread __pread64 pread64 +pwrite - pwrite i:ibni __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 +fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64 +statfs - statfs i:sp __statfs statfs statfs64 +getrlimit - getrlimit i:ip __getrlimit getrlimit getrlimit64 +setrlimit - setrlimit i:ip __setrlimit setrlimit64 setrlimit +ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64 +truncate - truncate i:si truncate truncate64 +ptrace - ptrace i:iipp __ptrace ptrace + +# semaphore and shm system calls +msgctl - msgctl i:iip __msgctl msgctl +msgget - msgget i:ii __msgget msgget +msgrcv - msgrcv i:ibnii __msgrcv msgrcv +msgsnd - msgsnd i:ibni __msgsnd msgsnd +shmat - shmat i:ipi __shmat shmat +shmctl - shmctl i:iip __shmctl shmctl +shmdt - shmdt i:s __shmdt shmdt +shmget - shmget i:iii __shmget shmget +semop - semop i:ipi __semop semop +semget - semget i:iii __semget semget +semctl - semctl i:iiii __semctl semctl + + +# proper socket implementations: +accept - accept i:iBN __libc_accept __accept accept +bind - bind i:ipi __bind bind +connect - connect i:ipi __libc_connect __connect connect +getpeername - getpeername i:ipp __getpeername getpeername +getsockname - getsockname i:ipp __getsockname getsockname +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +listen - listen i:ii __listen listen +recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom +recvmsg - recvmsg i:ipi __libc_recvmsg recvmsg +sendmsg - sendmsg i:ipi __libc_sendmsg sendmsg +sendto - sendto i:ibnibn __libc_sendto __sendto sendto +setsockopt - setsockopt i:iiibn __setsockopt setsockopt +shutdown - shutdown i:ii __shutdown shutdown +socket - socket i:iii __socket socket +socketpair - socketpair i:iiif __socketpair socketpair diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sysdep.S glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sysdep.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sysdep.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sysdep.S Wed Sep 19 03:31:54 2001 @@ -0,0 +1,56 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +/* Because the Linux version is in fact x86-64/ELF and the start.? file + for this system (sysdeps/x86_64/elf/start.S) is also used by The Hurd + and therefore this files must not contain the definition of the + `errno' variable (I don't know why, ask Roland), we have to define + it somewhere else. + + ...and this place is here. */ + .bss + .globl errno + .type errno,@object + .size errno,4 +errno: + .space 4 +weak_alias (errno, _errno) + +/* The following code is only used in the shared library when we + compile the reentrant version. Otherwise each system call defines + each own version. */ + +#ifndef PIC + +/* The syscall stubs jump here when they detect an error. + The code for Linux is almost identical to the canonical Unix + code, except that the error number in %rax is negated. */ + +#undef CALL_MCOUNT +#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %rax. */ + + .text +ENTRY (__syscall_error) + negq %rax + +#define __syscall_error __syscall_error_1 +#include + +#endif /* !PIC */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sysdep.h glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sysdep.h --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/sysdep.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/sysdep.h Wed Sep 19 03:32:01 2001 @@ -0,0 +1,205 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _LINUX_X86_64_SYSDEP_H +#define _LINUX_X86_64_SYSDEP_H 1 + +/* There is some commonality. */ +#include +#include +#include + +/* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ +#undef SYS_ify +#define SYS_ify(syscall_name) __NR_##syscall_name + +/* ELF-like local names start with `.L'. */ +#undef L +#define L(name) .L##name + +#ifdef __ASSEMBLER__ + +/* Linux uses a negative return value to indicate syscall errors, + unlike most Unices, which use the condition codes' carry flag. + + Since version 2.1 the return value of a system call might be + negative even if the call succeeded. E.g., the `lseek' system call + might return a large offset. Therefore we must not anymore test + for < 0, but test for a real error by making sure the value in %eax + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can savely + test with -4095. */ + +/* We don't want the label for the error handle to be global when we define + it here. */ +#ifdef PIC +# define SYSCALL_ERROR_LABEL 0f +#else +# define SYSCALL_ERROR_LABEL syscall_error +#endif + +#undef PSEUDO +#define PSEUDO(name, syscall_name, args) \ + .text; \ + ENTRY (name) \ + DO_CALL (args, syscall_name); \ + cmpq $-4095, %rax; \ + jae SYSCALL_ERROR_LABEL; \ + L(pseudo_end): + +#undef PSEUDO_END +#define PSEUDO_END(name) \ + SYSCALL_ERROR_HANDLER \ + END (name) + +#ifndef PIC +#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ +#else +/* Store (- %rax) into errno through the GOT. */ +#ifdef _LIBC_REENTRANT +#define SYSCALL_ERROR_HANDLER \ +0: \ + xorq %rdx, %rdx; \ + subq %rax, %rdx; \ + pushq %rdx \ + PUSH_ERRNO_LOCATION_RETURN; \ + call BP_SYM (__errno_location)@PLT; \ + POP_ERRNO_LOCATION_RETURN; \ + popq %rdx; \ + movq %rdx, (%rax); \ + orq $-1, %rax; \ + jmp L(pseudo_end); + +/* A quick note: it is assumed that the call to `__errno_location' does + not modify the stack! */ +#else +#define SYSCALL_ERROR_HANDLER \ +0:movq errno@GOTPCREL(%RIP), %rcx; \ + xorq %rdx, %rdx; \ + subq %rax, %rdx; \ + movq %rdx, (%rcx); \ + orq $-1, %rax; \ + jmp L(pseudo_end); +#endif /* _LIBC_REENTRANT */ +#endif /* PIC */ + +/* Linux/x86-64 takes system call arguments in registers: + + Register setup: + system call number rax + arg 1 rdi + arg 2 rsi + arg 3 rdx + arg 4 rcx + arg 5 r8 + arg 6 r9 + + return address from + syscall rcx + additionally clobered: r12-r15,rbx,rbp + eflags from syscall r11 + + The compiler is going to form a call by coming here, through PSEUDO, with arguments: + + syscall number in the DO_CALL macro + arg 1 rdi + arg 2 rsi + arg 3 rdx + arg 4 r10 + arg 5 r8 + arg 6 r9 + + We have to take care that the stack is alignedto 16 bytes. When + called the stack is not aligned since the return address has just + been pushed. + + Syscalls of more than 6 arguments are not supported. */ + +#undef DO_CALL +#define DO_CALL(args, syscall_name) \ + DOARGS_##args \ + movq $SYS_ify (syscall_name), %rax; \ + syscall; + +#define DOARGS_0 /* nothing */ +#define DOARGS_1 /* nothing */ +#define DOARGS_2 /* nothing */ +#define DOARGS_3 /* nothing */ +#define DOARGS_4 movq %rcx, %r10; +#define DOARGS_5 DOARGS_4 +#define DOARGS_6 DOARGS_5 + +#else /* !__ASSEMBLER__ */ +/* Define a macro which expands inline into the wrapper code for a system + call. */ +#undef INLINE_SYSCALL +#define INLINE_SYSCALL(name, nr, args...) \ + ({ \ + unsigned long resultvar; \ + LOAD_ARGS_##nr (args) \ + asm volatile ( \ + "movq %1, %%rax\n\t" \ + "syscall\n\t" \ + : "=a" (resultvar) \ + : "i" (__NR_##name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \ + if (resultvar >= (unsigned long) -4095) \ + { \ + __set_errno (-resultvar); \ + resultvar = (unsigned long) -1; \ + } \ + (long) resultvar; }) + +#define LOAD_ARGS_0() +#define ASM_ARGS_0 + +#define LOAD_ARGS_1(a1) \ + register long int _a1 asm ("rdi") = (long) (a1); \ + LOAD_ARGS_0 () +#define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1) + +#define LOAD_ARGS_2(a1, a2) \ + register long int _a2 asm ("rsi") = (long) (a2); \ + LOAD_ARGS_1 (a1) +#define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2) + +#define LOAD_ARGS_3(a1, a2, a3) \ + register long int _a3 asm ("rdx") = (long) (a3); \ + LOAD_ARGS_2 (a1, a2) +#define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3) + +#define LOAD_ARGS_4(a1, a2, a3, a4) \ + register long int _a4 asm ("r10") = (long) (a4); \ + LOAD_ARGS_3 (a1, a2, a3) +#define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4) + +#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \ + register long int _a5 asm ("r8") = (long) (a5); \ + LOAD_ARGS_4 (a1, a2, a3, a4) +#define ASM_ARGS_5 ASM_ARGS_4, "r" (_a5) + +#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \ + register long int _a6 asm ("r9") = (long) (a6); \ + LOAD_ARGS_5 (a1, a2, a3, a4, a5) +#define ASM_ARGS_6 ASM_ARGS_5, "r" (_a6) + +#endif /* __ASSEMBLER__ */ + +#endif /* linux/x86_64/sysdep.h */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/time.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/time.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/time.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/time.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1,33 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Return the current time as a `time_t' and also put it in *T if T is + not NULL. Time is represented as seconds from Jan 1 00:00:00 1970. */ +time_t +time (time_t *t) +{ + /* We're using a virtual syscall here. */ + time_t (*__vtime)(time_t * time) + = (time_t (*)(time_t *)) VSYSCALL_ADDR (__NR_vtime); + + return __vtime (t); +} diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/truncate64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/truncate64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/truncate64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/truncate64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* truncate64 is the same as truncate. */ diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/umount.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/umount.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/umount.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/umount.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/vfork.S glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/vfork.S --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/vfork.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/vfork.S Wed Sep 19 03:31:54 2001 @@ -0,0 +1,52 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#define _ERRNO_H 1 +#include + +/* Clone the calling process, but without copying the whole address space. + The calling process is suspended until the new process exits or is + replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ + +ENTRY (__vfork) + + /* Pop the return PC value into RBX. */ + popq %rbx + + /* Stuff the syscall number in RAX and enter into the kernel. */ + movl $SYS_ify (vfork), %eax + syscall + cmpl $-4095, %eax + jae .Lerror /* Branch forward if it failed. */ + + /* Jump to the return PC. */ + jmp *%rbx + +.Lerror: + /* Push back the return PC. */ + pushq %rbx + jmp SYSCALL_ERROR_LABEL + +.Lpseudo_end: + ret + +PSEUDO_END (__vfork) + +weak_alias (__vfork, vfork) diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/xstat.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/xstat.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/xstat.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/xstat.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/xstat64.c glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/xstat64.c --- glibc-2.2.4/sysdeps/unix/sysv/linux/x86_64/xstat64.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/sysv/linux/x86_64/xstat64.c Wed Sep 19 03:31:31 2001 @@ -0,0 +1 @@ +/* xstat64 is in xstat.c */ diff -durpN glibc-2.2.4/sysdeps/unix/x86_64/sysdep.S glibc-2.2.5/sysdeps/unix/x86_64/sysdep.S --- glibc-2.2.4/sysdeps/unix/x86_64/sysdep.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/x86_64/sysdep.S Wed Sep 19 03:35:02 2001 @@ -0,0 +1,71 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#define _ERRNO_H +#include +#include +#include + +.globl C_SYMBOL_NAME(errno) +.globl syscall_error + +#undef syscall_error +#ifdef NO_UNDERSCORES +__syscall_error: +#else +syscall_error: +#endif +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmpq $EWOULDBLOCK_sys, %rax /* Is it the old EWOULDBLOCK? */ + jne notb /* Branch if not. */ + movq $EAGAIN, %rax /* Yes; translate it to EAGAIN. */ +notb: +#endif +#ifndef PIC +# ifndef _LIBC_REENTRANT + movq %rax, C_SYMBOL_NAME(errno) +# else + pushq %rax + PUSH_ERRNO_LOCATION_RETURN + call BP_SYM (__errno_location) + POP_ERRNO_LOCATION_RETURN + popq %rcx + movq %rcx, (%rax) +# endif +#else +# ifndef _LIBC_REENTRANT + movq C_SYMBOL_NAME(errno)@GOTPCREL(%rip), %rcx + movq %rax, (%rcx) +# else + pushq %rax + PUSH_ERRNO_LOCATION_RETURN + call C_SYMBOL_NAME (BP_SYM (__errno_location)@PLT) + POP_ERRNO_LOCATION_RETURN + popq %rcx + movq %rcx, (%rax) +# endif +#endif + movq $-1, %rax + ret + +#undef __syscall_error +END (__syscall_error) diff -durpN glibc-2.2.4/sysdeps/unix/x86_64/sysdep.h glibc-2.2.5/sysdeps/unix/x86_64/sysdep.h --- glibc-2.2.4/sysdeps/unix/x86_64/sysdep.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/unix/x86_64/sysdep.h Wed Sep 19 03:35:02 2001 @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 92, 93, 95, 96, 97, 2000, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#ifdef __ASSEMBLER__ + +/* This is defined as a separate macro so that other sysdep.h files + can include this one and then redefine DO_CALL. */ + +#define DO_CALL(syscall_name, args) \ + lea SYS_ify (syscall_name), %rax; \ + syscall + +#define r0 %rax /* Normal return-value register. */ +#define r1 %rbx /* Secondary return-value register. */ +#define MOVE(x,y) movq x, y + +#endif /* __ASSEMBLER__ */ diff -durpN glibc-2.2.4/sysdeps/vax/gccframe.h glibc-2.2.5/sysdeps/vax/gccframe.h --- glibc-2.2.4/sysdeps/vax/gccframe.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/vax/gccframe.h Thu Nov 15 17:14:52 2001 @@ -0,0 +1,22 @@ +/* Definition of object in frame unwind info. vax version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define DWARF_FRAME_REGISTERS 16 + +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/Dist glibc-2.2.5/sysdeps/x86_64/Dist --- glibc-2.2.4/sysdeps/x86_64/Dist Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/Dist Fri Sep 21 08:45:17 2001 @@ -0,0 +1,2 @@ +bp-asm.h +hp-timing.c diff -durpN glibc-2.2.4/sysdeps/x86_64/Implies glibc-2.2.5/sysdeps/x86_64/Implies --- glibc-2.2.4/sysdeps/x86_64/Implies Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/Implies Wed Sep 19 03:10:03 2001 @@ -0,0 +1,4 @@ +wordsize-64 +ieee754/ldbl-96 +ieee754/dbl-64 +ieee754/flt-32 diff -durpN glibc-2.2.4/sysdeps/x86_64/Makefile glibc-2.2.5/sysdeps/x86_64/Makefile --- glibc-2.2.4/sysdeps/x86_64/Makefile Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/Makefile Wed Sep 19 03:12:02 2001 @@ -0,0 +1,6 @@ +# The i387 `long double' is a distinct type we support. +long-double-fcts = yes + +ifeq ($(subdir),csu) +sysdep_routines += hp-timing +endif diff -durpN glibc-2.2.4/sysdeps/x86_64/Versions glibc-2.2.5/sysdeps/x86_64/Versions --- glibc-2.2.4/sysdeps/x86_64/Versions Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/Versions Wed Sep 19 03:26:35 2001 @@ -0,0 +1,5 @@ +ld { + GLIBC_2.2.5 { + _dl_cpuclock_offset; + } +} diff -durpN glibc-2.2.4/sysdeps/x86_64/__longjmp.S glibc-2.2.5/sysdeps/x86_64/__longjmp.S --- glibc-2.2.4/sysdeps/x86_64/__longjmp.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/__longjmp.S Wed Sep 19 03:12:07 2001 @@ -0,0 +1,44 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#define _ASM +#define _SETJMP_H +#include +#include + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. + void __longjmp (__jmp_buf env, int val). */ +ENTRY(__longjmp) + /* Restore registers. */ + movq (JB_RBX*8)(%rdi),%rbx + movq (JB_RBP*8)(%rdi),%rbp + movq (JB_R12*8)(%rdi),%r12 + movq (JB_R13*8)(%rdi),%r13 + movq (JB_R14*8)(%rdi),%r14 + movq (JB_R15*8)(%rdi),%r15 + /* Set return value for setjmp. */ + test %esi,%esi + mov $01,%eax + cmove %eax,%esi + mov %esi, %eax + movq (JB_PC*8)(%rdi),%rdx + movq (JB_RSP*8)(%rdi),%rsp + jmpq *%rdx +END (BP_SYM (__longjmp)) diff -durpN glibc-2.2.4/sysdeps/x86_64/abort-instr.h glibc-2.2.5/sysdeps/x86_64/abort-instr.h --- glibc-2.2.4/sysdeps/x86_64/abort-instr.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/abort-instr.h Wed Sep 19 03:12:07 2001 @@ -0,0 +1,2 @@ +/* An instruction which should crash any program is `hlt'. */ +#define ABORT_INSTRUCTION asm ("hlt") diff -durpN glibc-2.2.4/sysdeps/x86_64/atomicity.h glibc-2.2.5/sysdeps/x86_64/atomicity.h --- glibc-2.2.4/sysdeps/x86_64/atomicity.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/atomicity.h Wed Sep 19 03:12:07 2001 @@ -0,0 +1,57 @@ +/* Low-level functions for atomic operations. x86-64 version. + Copyright (C) 1997, 2000, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _ATOMICITY_H +#define _ATOMICITY_H 1 + +#include + + +static inline uint32_t +__attribute__ ((unused)) +exchange_and_add (volatile uint32_t *mem, uint32_t val) +{ + register uint32_t result; + __asm__ __volatile__ ("lock; xaddl %0,%1" + : "=r" (result), "=m" (*mem) : "0" (val), "1" (*mem)); + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (volatile uint32_t *mem, int val) +{ + __asm__ __volatile__ ("lock; addl %1,%0" + : "=m" (*mem) : "er" (val), "0" (*mem)); +} + +static inline char +__attribute__ ((unused)) +compare_and_swap (volatile long int *p, long int oldval, long int newval) +{ + char ret; + long int readval; + + __asm__ __volatile__ ("lock; cmpxchgq %3, %1; sete %0" + : "=q" (ret), "=m" (*p), "=a" (readval) + : "r" (newval), "1" (*p), "a" (oldval)); + return ret; +} + +#endif /* atomicity.h */ diff -durpN glibc-2.2.4/sysdeps/x86_64/bits/endian.h glibc-2.2.5/sysdeps/x86_64/bits/endian.h --- glibc-2.2.4/sysdeps/x86_64/bits/endian.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/bits/endian.h Wed Sep 19 03:18:23 2001 @@ -0,0 +1,7 @@ +/* x86_64 is little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN diff -durpN glibc-2.2.4/sysdeps/x86_64/bits/setjmp.h glibc-2.2.5/sysdeps/x86_64/bits/setjmp.h --- glibc-2.2.4/sysdeps/x86_64/bits/setjmp.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/bits/setjmp.h Wed Sep 19 03:19:08 2001 @@ -0,0 +1,47 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* Define the machine-dependent type `jmp_buf'. x86-64 version. */ + +#ifndef _SETJMP_H +# error "Never include directly; use instead." +#endif + +/* We only need to save callee-saved registers plus stackpointer and + program counter. */ +#if defined __USE_MISC || defined _ASM +# define JB_RBX 0 +# define JB_RBP 1 +# define JB_R12 2 +# define JB_R13 3 +# define JB_R14 4 +# define JB_R15 5 +# define JB_RSP 6 +# define JB_PC 7 +# define JB_SIZE (8*8) +#endif + +#ifndef _ASM + +typedef long int __jmp_buf[8]; + +/* Test if longjmp to JMPBUF would unwind the frame + containing a local variable at ADDRESS. */ +#define _JMPBUF_UNWINDS(jmpbuf, address) \ + ((void *) (address) < (void *) (jmpbuf)[JB_RSP]) +#endif diff -durpN glibc-2.2.4/sysdeps/x86_64/bits/string.h glibc-2.2.5/sysdeps/x86_64/bits/string.h --- glibc-2.2.4/sysdeps/x86_64/bits/string.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/bits/string.h Wed Sep 19 03:19:23 2001 @@ -0,0 +1,26 @@ +/* Optimized, inlined string functions. AMD x86-64 version. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _STRING_H +# error "Never use directly; include instead." +#endif + +/* Currently the only purpose of this file is to tell the generic inline + macros that unaligned memory access is possible for x86-64. */ +#define _STRING_ARCH_unaligned 1 diff -durpN glibc-2.2.4/sysdeps/x86_64/bp-asm.h glibc-2.2.5/sysdeps/x86_64/bp-asm.h --- glibc-2.2.4/sysdeps/x86_64/bp-asm.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/bp-asm.h Wed Sep 19 03:12:07 2001 @@ -0,0 +1,141 @@ +/* Bounded-pointer definitions for x86-64 assembler. + Copyright (C) 2001 Free Software Foundation, Inc. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _bp_asm_h_ +# define _bp_asm_h_ 1 + +# if __ASSEMBLER__ + +# if __BOUNDED_POINTERS__ + +/* Bounded pointers occupy three words. */ +# define PTR_SIZE 24 +/* Bounded pointer return values are passed back through a hidden + argument that points to caller-allocate space. The hidden arg + occupies one word on the stack. */ +# define RTN_SIZE 6 +/* Although the caller pushes the hidden arg, the callee is + responsible for popping it. */ +# define RET_PTR ret $RTN_SIZE +/* Maintain frame pointer chain in leaf assembler functions for the benefit + of debugging stack traces when bounds violations occur. */ +# define ENTER pushq %rbp; movq %rsp, %rbp +# define LEAVE movq %rbp, %rsp; popq %rbp +/* Stack space overhead of procedure-call linkage: return address and + frame pointer. */ +# define LINKAGE 16 +/* Stack offset of return address after calling ENTER. */ +# define PCOFF 8 + +/* Int 5 is the "bound range" exception also raised by the "bound" + instruction. */ +# define BOUNDS_VIOLATED int $5 + +# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) \ + cmpq 8+BP_MEM, VAL_REG; \ + jae 0f; /* continue if value >= low */ \ + BOUNDS_VIOLATED; \ + 0: + +# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) \ + cmpq 16+BP_MEM, VAL_REG; \ + Jcc 0f; /* continue if value < high */ \ + BOUNDS_VIOLATED; \ + 0: + +# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) \ + cmpq 8+BP_MEM, VAL_REG; \ + jb 1f; /* die if value < low */ \ + cmpq 16+BP_MEM, VAL_REG; \ + jb 0f; /* continue if value < high */ \ + 1: BOUNDS_VIOLATED; \ + 0: + +# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) \ + CHECK_BOUNDS_LOW(VAL_REG, BP_MEM); \ + addl LENGTH, VAL_REG; \ + cmpq 16+BP_MEM, VAL_REG; \ + jbe 0f; /* continue if value <= high */ \ + BOUNDS_VIOLATED; \ + 0: subq LENGTH, VAL_REG /* restore value */ + +/* Take bounds from BP_MEM and affix them to the pointer + value in %rax, stuffing all into memory at RTN(%esp). + Use %rdx as a scratch register. */ + +# define RETURN_BOUNDED_POINTER(BP_MEM) \ + movq RTN(%rsp), %rdx; \ + movq %rax, 0(%rdx); \ + movq 8+BP_MEM, %rax; \ + movq %rax, 4(%rdx); \ + movq 16+BP_MEM, %rax; \ + movq %rax, 8(%rdx) + +# define RETURN_NULL_BOUNDED_POINTER \ + movl RTN(%rsp), %rdx; \ + movl %rax, 0(%rdx); \ + movl %rax, 4(%rdx); \ + movl %rax, 8(%rdx) + +/* The caller of __errno_location is responsible for allocating space + for the three-word BP return-value and passing pushing its address + as an implicit first argument. */ +# define PUSH_ERRNO_LOCATION_RETURN \ + subl $16, %esp; \ + subl $8, %esp; \ + pushq %rsp + +/* __errno_location is responsible for popping the implicit first + argument, but we must pop the space for the BP itself. We also + dereference the return value in order to dig out the pointer value. */ +# define POP_ERRNO_LOCATION_RETURN \ + popq %rax; \ + addq $16, %rsp + +# else /* !__BOUNDED_POINTERS__ */ + +/* Unbounded pointers occupy one word. */ +# define PTR_SIZE 8 +/* Unbounded pointer return values are passed back in the register %rax. */ +# define RTN_SIZE 0 +/* Use simple return instruction for unbounded pointer values. */ +# define RET_PTR ret +/* Don't maintain frame pointer chain for leaf assembler functions. */ +# define ENTER +# define LEAVE +/* Stack space overhead of procedure-call linkage: return address only. */ +# define LINKAGE 8 +/* Stack offset of return address after calling ENTER. */ +# define PCOFF 0 + +# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) +# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) +# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) +# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) +# define RETURN_BOUNDED_POINTER(BP_MEM) + +# define RETURN_NULL_BOUNDED_POINTER + +# define PUSH_ERRNO_LOCATION_RETURN +# define POP_ERRNO_LOCATION_RETURN + +# endif /* !__BOUNDED_POINTERS__ */ + +# endif /* __ASSEMBLER__ */ + +#endif /* _bp_asm_h_ */ diff -durpN glibc-2.2.4/sysdeps/x86_64/bsd-_setjmp.S glibc-2.2.5/sysdeps/x86_64/bsd-_setjmp.S --- glibc-2.2.4/sysdeps/x86_64/bsd-_setjmp.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/bsd-_setjmp.S Wed Sep 19 03:12:07 2001 @@ -0,0 +1,39 @@ +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. x86-64 version. + Copyright (C) 1994,1995,1996,1997,2000,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 0)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include +#define _ASM +#define _SETJMP_H +#include +#include "bp-sym.h" +#include "bp-asm.h" + +ENTRY (BP_SYM (_setjmp)) + /* Set up arguments, we only need to set the second arg. */ + xorq %rsi, %rsi +#ifdef PIC + jmp C_SYMBOL_NAME (BP_SYM (__sigsetjmp))@PLT +#else + jmp BP_SYM (__sigsetjmp) +#endif +END (BP_SYM (_setjmp)) diff -durpN glibc-2.2.4/sysdeps/x86_64/bsd-setjmp.S glibc-2.2.5/sysdeps/x86_64/bsd-setjmp.S --- glibc-2.2.4/sysdeps/x86_64/bsd-setjmp.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/bsd-setjmp.S Wed Sep 19 03:12:07 2001 @@ -0,0 +1,38 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. x86-64 version. + Copyright (C) 1994,1995,1996,1997,2000,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'. + We cannot do it in C because it must be a tail-call, so frame-unwinding + in setjmp doesn't clobber the state restored by longjmp. */ + +#include +#define _ASM +#define _SETJMP_H +#include +#include "bp-sym.h" +#include "bp-asm.h" + +ENTRY (BP_SYM (setjmp)) + /* Set up arguments, we only need to set the 2nd arg. */ + movq $1, %rsi +#ifdef PIC +#else + jmp BP_SYM (__sigsetjmp) +#endif +END (BP_SYM (setjmp)) diff -durpN glibc-2.2.4/sysdeps/x86_64/dl-machine.h glibc-2.2.5/sysdeps/x86_64/dl-machine.h --- glibc-2.2.4/sysdeps/x86_64/dl-machine.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/dl-machine.h Wed Sep 19 03:12:07 2001 @@ -0,0 +1,417 @@ +/* Machine-dependent ELF dynamic relocation inline functions. x86-64 version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef dl_machine_h +#define dl_machine_h + +#define ELF_MACHINE_NAME "x86_64" + +#include + +/* Return nonzero iff ELF header is compatible with the running host. */ +static inline int __attribute__ ((unused)) +elf_machine_matches_host (const Elf64_Ehdr *ehdr) +{ + return ehdr->e_machine == EM_X86_64; +} + + +/* Return the link-time address of _DYNAMIC. Conveniently, this is the + first element of the GOT. This must be inlined in a function which + uses global data. */ +static inline Elf64_Addr __attribute__ ((unused)) +elf_machine_dynamic (void) +{ + register Elf64_Addr addr; + + asm ("leaq _DYNAMIC, %0\n" : "=r" (addr)); + return addr; +} + + +/* Return the run-time load address of the shared object. */ +static inline Elf64_Addr __attribute__ ((unused)) +elf_machine_load_address (void) +{ + register Elf64_Addr addr, tmp; + + asm ("leaq _dl_start, %0\n" + "leaq _dl_start(%%rip), %1\n" + "subq %0, %1\n" + : "=r" (tmp), "=r" (addr) : : "cc"); + return addr; +} + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int __attribute__ ((unused)) +elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) +{ + Elf64_Addr *got; + extern void _dl_runtime_resolve (Elf64_Word); + extern void _dl_runtime_profile (Elf64_Word); + + if (l->l_info[DT_JMPREL] && lazy) + { + /* The GOT entries for functions in the PLT have not yet been filled + in. Their initial contents will arrange when called to push an + offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1], + and then jump to _GLOBAL_OFFSET_TABLE[2]. */ + got = (Elf64_Addr *) D_PTR (l, l_info[DT_PLTGOT]); + got[1] = (Elf64_Addr) l; /* Identify this shared object. */ + + /* The got[2] entry contains the address of a function which gets + called to get the address of a so far unresolved function and + jump to it. The profiling extension of the dynamic linker allows + to intercept the calls to collect information. In this case we + don't store the address in the GOT so that all future calls also + end in this function. */ + if (__builtin_expect (profile, 0)) + { + got[2] = (Elf64_Addr) &_dl_runtime_profile; + + if (_dl_name_match_p (_dl_profile, l)) + /* This is the object we are looking for. Say that we really + want profiling and the timers are started. */ + _dl_profile_map = l; + } + else + /* This function will get called to fix up the GOT entry indicated by + the offset on the stack, and then jump to the resolved address. */ + got[2] = (Elf64_Addr) &_dl_runtime_resolve; + } + + return lazy; +} + +/* This code is used in dl-runtime.c to call the `fixup' function + and then redirect to the address it returns. */ +#ifndef PROF +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\ + .text\n\ + .globl _dl_runtime_resolve\n\ + .type _dl_runtime_resolve, @function\n\ + .align 16\n\ +_dl_runtime_resolve:\n\ + pushq %rax # Preserve registers otherwise clobbered.\n\ + pushq %rcx\n\ + pushq %rdx\n\ + pushq %rsi\n\ + pushq %rdi\n\ + pushq %r8\n\ + pushq %r9\n\ + movq 64(%rsp), %rsi # Copy args pushed by PLT in register.\n\ + movq %rsi,%r11 # Multiply by 24\n\ + addq %r11,%rsi\n\ + addq %r11,%rsi\n\ + shlq $3, %rsi\n\ + movq 56(%rsp), %rdi # %rdi: link_map, %rsi: reloc_offset\n\ + call fixup # Call resolver.\n\ + movq %rax, %r11 # Save return value\n\ + popq %r9 # Get register content back.\n\ + popq %r8\n\ + popq %rdi\n\ + popq %rsi\n\ + popq %rdx\n\ + popq %rcx\n\ + popq %rax\n\ + addq $16,%rsp # Adjust stack\n\ + jmp *%r11 # Jump to function address.\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ +\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_profile, @function\n\ + .align 16\n\ +_dl_runtime_profile:\n\ + pushq %rax # Preserve registers otherwise clobbered.\n\ + pushq %rcx\n\ + pushq %rdx\n\ + pushq %rsi\n\ + pushq %rdi\n\ + pushq %r8\n\ + pushq %r9\n\ + movq 72(%rsp), %rdx # Load return address if needed\n\ + movq 64(%rsp), %rsi # Copy args pushed by PLT in register.\n\ + movq %rsi,%r11 # Multiply by 24\n\ + addq %r11,%rsi\n\ + addq %r11,%rsi\n\ + shlq $3, %rsi\n\ + movq 56(%rsp), %rdi # %rdi: link_map, %rsi: reloc_offset\n\ + call profile_fixup # Call resolver.\n\ + movq %rax, %r11 # Save return value\n\ + popq %r9 # Get register content back.\n\ + popq %r8\n\ + popq %rdi\n\ + popq %rsi\n\ + popq %rdx\n\ + popq %rcx\n\ + popq %rax\n\ + addq $16,%rsp # Adjust stack\n\ + jmp *%r11 # Jump to function address.\n\ + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ + .previous\n\ +"); +#else +# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\ + .text\n\ + .globl _dl_runtime_resolve\n\ + .globl _dl_runtime_profile\n\ + .type _dl_runtime_resolve, @function\n\ + .type _dl_runtime_profile, @function\n\ + .align 16\n\ +_dl_runtime_resolve:\n\ +_dl_runtime_profile:\n\ + pushq %rax # Preserve registers otherwise clobbered.\n\ + pushq %rcx\n\ + pushq %rdx\n\ + pushq %rsi\n\ + pushq %rdi\n\ + pushq %r8\n\ + pushq %r9\n\ + movq 64(%rsp), %rsi # Copy args pushed by PLT in register.\n\ + movq %rsi,%r11 # Multiply by 24\n\ + addq %r11,%rsi\n\ + addq %r11,%rsi\n\ + shlq $3, %rsi\n\ + movq 56(%rsp), %rdi # %rdi: link_map, %rsi: reloc_offset\n\ + call fixup # Call resolver.\n\ + movq %rax, %r11 # Save return value\n\ + popq %r9 # Get register content back.\n\ + popq %r8\n\ + popq %rdi\n\ + popq %rsi\n\ + popq %rdx\n\ + popq %rcx\n\ + popq %rax\n\ + addq $16,%rsp # Adjust stack\n\ + jmp *%r11 # Jump to function address.\n\ + .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\ + .size _dl_runtime_profile, .-_dl_runtime_profile\n\ + .previous\n\ +"); +#endif + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ +#define RTLD_START asm ("\n\ +.text\n\ + .align 16\n\ +.globl _start\n\ +.globl _dl_start_user\n\ +_start:\n\ + movq %rsp, %rdi\n\ + call _dl_start\n\ +_dl_start_user:\n\ + # Save the user entry point address in %r12.\n\ + movq %rax, %r12\n\ + # Store the highest stack address\n\ + movq __libc_stack_end@GOTPCREL(%rip), %rax\n\ + movq %rsp, (%rax)\n\ + # See if we were run as a command with the executable file\n\ + # name as an extra leading argument.\n\ + movq _dl_skip_args@GOTPCREL(%rip), %rax\n\ + movl (%rax), %eax\n\ + # Pop the original argument count.\n\ + popq %rdx\n\ + # Adjust the stack pointer to skip _dl_skip_args words.\n\ + leaq (%rsp,%rax,8), %rsp\n\ + # Subtract _dl_skip_args from argc.\n\ + subl %eax, %edx\n\ + # Push argc back on the stack.\n\ + pushq %rdx\n\ + # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\ + # argc -> rsi\n\ + movq %rdx, %rsi\n\ + # _dl_loaded -> rdi\n\ + movq _dl_loaded@GOTPCREL(%rip), %rdi\n\ + movq (%rdi), %rdi\n\ + # env -> rcx\n\ + leaq 16(%rsp,%rdx,8), %rcx\n\ + # argv -> rdx\n\ + leaq 8(%rsp), %rdx\n\ + # Call the function to run the initializers.\n\ + call _dl_init@PLT\n\ + # Pass our finalizer function to the user in %rdx, as per ELF ABI.\n\ + movq _dl_fini@GOTPCREL(%rip), %rdx\n\ + # Jump to the user's entry point.\n\ + jmp *%r12\n\ +.previous\n\ +"); + +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one + of the main executable's symbols, as for a COPY reloc. */ +#define elf_machine_type_class(type) \ + ((((type) == R_X86_64_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ + | (((type) == R_X86_64_COPY) * ELF_RTYPE_CLASS_COPY)) + +/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ +#define ELF_MACHINE_JMP_SLOT R_X86_64_JUMP_SLOT + +/* The x86-64 never uses Elf64_Rel relocations. */ +#define ELF_MACHINE_NO_REL 1 + +/* We define an initialization functions. This is called very early in + _dl_sysdep_start. */ +#define DL_PLATFORM_INIT dl_platform_init () + +extern const char *_dl_platform; + +static inline void __attribute__ ((unused)) +dl_platform_init (void) +{ + if (_dl_platform != NULL && *_dl_platform == '\0') + /* Avoid an empty string which would disturb us. */ + _dl_platform = NULL; +} + +static inline Elf64_Addr +elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const Elf64_Rela *reloc, + Elf64_Addr *reloc_addr, Elf64_Addr value) +{ + return *reloc_addr = value; +} + +/* Return the final value of a plt relocation. On x86-64 the + JUMP_SLOT relocation ignores the addend. */ +static inline Elf64_Addr +elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, + Elf64_Addr value) +{ + return value; +} + +#endif /* !dl_machine_h */ + +#ifdef RESOLVE + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + MAP is the object containing the reloc. */ + +static inline void +elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, + const Elf64_Sym *sym, const struct r_found_version *version, + Elf64_Addr *const reloc_addr) +{ + const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info); + +#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC + if (__builtin_expect (r_type == R_X86_64_RELATIVE, 0)) + { +# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC + /* This is defined in rtld.c, but nowhere in the static libc.a; + make the reference weak so static programs can still link. + This declaration cannot be done when compiling rtld.c + (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the + common defn for _dl_rtld_map, which is incompatible with a + weak decl in the same file. */ + weak_extern (_dl_rtld_map); + if (map != &_dl_rtld_map) /* Already done in rtld itself. */ +# endif + *reloc_addr = map->l_addr + reloc->r_addend; + } + else +#endif + if (__builtin_expect (r_type == R_X86_64_NONE, 0)) + return; + else + { +#ifndef RTLD_BOOTSTRAP + const Elf64_Sym *const refsym = sym; +#endif + Elf64_Addr value = RESOLVE (&sym, version, r_type); + if (sym) + value += sym->st_value; + +#ifdef RTLD_BOOTSTRAP + assert (r_type == R_X86_64_GLOB_DAT || r_type == R_X86_64_JUMP_SLOT); + *reloc_addr = value + reloc->r_addend; +#else + switch (r_type) + { + case R_X86_64_GLOB_DAT: + case R_X86_64_JUMP_SLOT: + *reloc_addr = value + reloc->r_addend; + break; + case R_X86_64_64: + *reloc_addr = value + reloc->r_addend; + break; + case R_X86_64_32: + *(unsigned int *) reloc_addr = value + reloc->r_addend; + break; + case R_X86_64_PC32: + *(unsigned int *) reloc_addr = value + reloc->r_addend + - (Elf64_Addr) reloc_addr; + break; + case R_X86_64_COPY: + if (sym == NULL) + /* This can happen in trace mode if an object could not be + found. */ + break; + if (__builtin_expect (sym->st_size > refsym->st_size, 0) + || (__builtin_expect (sym->st_size < refsym->st_size, 0) + && _dl_verbose)) + { + const char *strtab; + + strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); + _dl_error_printf ("\ +%s: Symbol `%s' has different size in shared object, consider re-linking\n", + _dl_argv[0] ?: "", + strtab + refsym->st_name); + } + memcpy (reloc_addr, (void *) value, MIN (sym->st_size, + refsym->st_size)); + break; + default: + _dl_reloc_bad_type (map, r_type, 0); + break; + } +#endif + } +} + +static inline void +elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, + Elf64_Addr *const reloc_addr) +{ + assert (ELF64_R_TYPE (reloc->r_info) == R_X86_64_RELATIVE); + *reloc_addr = l_addr + reloc->r_addend; +} + +static inline void +elf_machine_lazy_rel (struct link_map *map, + Elf64_Addr l_addr, const Elf64_Rela *reloc) +{ + Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); + const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info); + + /* Check for unexpected PLT reloc type. */ + if (__builtin_expect (r_type == R_X86_64_JUMP_SLOT, 1)) + *reloc_addr += l_addr; + else + _dl_reloc_bad_type (map, r_type, 1); +} + +#endif /* RESOLVE */ diff -durpN glibc-2.2.4/sysdeps/x86_64/elf/initfini.c glibc-2.2.5/sysdeps/x86_64/elf/initfini.c --- glibc-2.2.4/sysdeps/x86_64/elf/initfini.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/elf/initfini.c Wed Sep 19 03:20:10 2001 @@ -0,0 +1,100 @@ +/* Special .init and .fini section support for x86-64. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * 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. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +__asm__ ("\n\ +#include \"defs.h\"\n\ +\n\ +/*@HEADER_ENDS*/\n\ +\n\ +/*@_init_PROLOG_BEGINS*/\n\ + .align 4\n\ + .type call_gmon_start,@function\n\ +call_gmon_start:\n\ + subq $8, %rsp\n\ + movq __gmon_start__@GOTPCREL(%rip), %rax\n\ + testq %rax, %rax\n\ + je .L22\n\ + call *%rax\n\ +.L22:\n\ + addq $8, %rsp\n\ + ret\n\ +\n\ + .section .init\n\ + .align 4\n\ +.globl _init\n\ + .type _init,@function\n\ +_init:\n\ + subq $8, %rsp\n\ + /* call call_gmon_start */\n\ + ALIGN\n\ + END_INIT\n\ +\n\ +/*@_init_PROLOG_ENDS*/\n\ +\n\ +/*@_init_EPILOG_BEGINS*/\n\ + .section .init\n\ + addq $8, %rsp\n\ + ret\n\ + END_INIT\n\ +\n\ +/*@_init_EPILOG_ENDS*/\n\ +\n\ +/*@_fini_PROLOG_BEGINS*/\n\ + .section .fini\n\ + .align 4\n\ +.globl _fini\n\ + .type _fini,@function\n\ +_fini:\n\ + subq $8, %rsp\n\ + ALIGN\n\ + END_FINI\n\ +\n\ +/*@_fini_PROLOG_ENDS*/\n\ + call i_am_not_a_leaf@PLT\n\ +\n\ +/*@_fini_EPILOG_BEGINS*/\n\ + .section .fini\n\ + addq $8, %rsp\n\ + ret\n\ + END_FINI\n\ +\n\ +/*@_fini_EPILOG_ENDS*/\n\ +\n\ +/*@TRAILER_BEGINS*/\n\ + .weak __gmon_start__\n\ +"); diff -durpN glibc-2.2.4/sysdeps/x86_64/elf/start.S glibc-2.2.5/sysdeps/x86_64/elf/start.S --- glibc-2.2.4/sysdeps/x86_64/elf/start.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/elf/start.S Wed Sep 19 03:20:52 2001 @@ -0,0 +1,95 @@ +/* Startup code compliant to the ELF x86-64 ABI. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This is the canonical entry point, usually the first thing in the text + segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry + point runs, most registers' values are unspecified, except for: + + %rdx Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + %rsp The stack contains the arguments and environment: + 0(%rsp) argc + 8(%rsp) argv[0] + ... + (8*argc)(%rsp) NULL + (8*(argc+1))(%rsp) envp[0] + ... + NULL +*/ + +#include "bp-sym.h" + + .text + .globl _start + .type _start,@function +_start: + /* Clear the frame pointer. The ABI suggests this be done, to mark + the outermost frame obviously. */ + xorq %rbp, %rbp + + /* Extract the arguments as encoded on the stack and set up + the arguments for __libc_start_main (int (*main) (int, char **, char **), + int argc, char *argv, + void (*init) (void), void (*fini) (void), + void (*rtld_fini) (void), void *stack_end). + The arguments are passed via registers and on the stack: + main: %rdi + argc: %rsi + argv: %rdx + init: %rcx + fini: %r8 + rtld_fini: %r9 + stack_end: stack. */ + + movq %rdx, %r9 /* Address of the shared library termination + function. */ + popq %rsi /* Pop the argument count. */ + movq %rsp, %rdx /* argv starts just at the current stack top. */ + /* Align the stack to a 16 byte boundary to follow the ABI. */ + andq $~15, %rsp + + pushq %rax /* Push garbage because we push 8 more bytes. */ + + /* Provide the highest stack address to the user code (for stacks + which grow downwards). */ + pushq %rsp + + /* Pass address of our own entry points to .fini and .init. */ + movq $_fini, %r8 + movq $_init, %rcx + + movq $BP_SYM (main), %rdi + + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + call BP_SYM (__libc_start_main) + + hlt /* Crash if somehow `exit' does return. */ + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start diff -durpN glibc-2.2.4/sysdeps/x86_64/ffs.c glibc-2.2.5/sysdeps/x86_64/ffs.c --- glibc-2.2.4/sysdeps/x86_64/ffs.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/ffs.c Wed Sep 19 03:12:08 2001 @@ -0,0 +1,38 @@ +/* ffs -- find first set bit in a word, counted from least significant end. + For AMD x86-64. + This file is part of the GNU C Library. + Copyright (C) 1991,92,93,94,97,98,2001 Free Software Foundation, Inc. + Contributed by Ulrich Drepper . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#undef ffs + +int +__ffs (int x) +{ + int cnt; + int tmp; + + asm ("bsfl %2,%0\n" /* Count low bits in X and store in %1. */ + "cmovel %1,%0\n" /* If number was zero, use -1 as result. */ + : "=&r" (cnt), "=r" (tmp) : "rm" (x), "1" (-1)); + + return cnt + 1; +} +weak_alias (__ffs, ffs) diff -durpN glibc-2.2.4/sysdeps/x86_64/ffsll.c glibc-2.2.5/sysdeps/x86_64/ffsll.c --- glibc-2.2.4/sysdeps/x86_64/ffsll.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/ffsll.c Wed Sep 19 03:12:08 2001 @@ -0,0 +1,41 @@ +/* ffsll -- find first set bit in a word, counted from least significant end. + For AMD x86-64. + This file is part of the GNU C Library. + Copyright (C) 1991,92,93,94,97,98,2001 Free Software Foundation, Inc. + Contributed by Ulrich Drepper . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define ffsl __something_else +#include + +#undef ffsll + +int +ffsll (long long int x) +{ + long long int cnt; + long long int tmp; + + asm ("bsfq %2,%0\n" /* Count low bits in X and store in %1. */ + "cmoveq %1,%0\n" /* If number was zero, use -1 as result. */ + : "=&r" (cnt), "=r" (tmp) : "rm" (x), "1" (-1)); + + return cnt + 1; +} + +#undef ffsl +weak_alias (ffsll, ffsl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/bits/fenv.h glibc-2.2.5/sysdeps/x86_64/fpu/bits/fenv.h --- glibc-2.2.4/sysdeps/x86_64/fpu/bits/fenv.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/bits/fenv.h Wed Sep 19 03:22:08 2001 @@ -0,0 +1,93 @@ +/* Copyright (C) 1997,1998,1999,2000,2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INVALID = 0x01, +#define FE_INVALID FE_INVALID + __FE_DENORM = 0x02, + FE_DIVBYZERO = 0x04, +#define FE_DIVBYZERO FE_DIVBYZERO + FE_OVERFLOW = 0x08, +#define FE_OVERFLOW FE_OVERFLOW + FE_UNDERFLOW = 0x10, +#define FE_UNDERFLOW FE_UNDERFLOW + FE_INEXACT = 0x20 +#define FE_INEXACT FE_INEXACT + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The ix87 FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = 0, +#define FE_TONEAREST FE_TONEAREST + FE_DOWNWARD = 0x400, +#define FE_DOWNWARD FE_DOWNWARD + FE_UPWARD = 0x800, +#define FE_UPWARD FE_UPWARD + FE_TOWARDZERO = 0xc00 +#define FE_TOWARDZERO FE_TOWARDZERO + }; + + +/* Type representing exception flags. */ +typedef unsigned short int fexcept_t; + + +/* Type representing floating-point environment. This structure + corresponds to the layout of the block written by the `fstenv' + instruction and has additional fields for the contents of the MXCSR + register as written by the `stmxcsr' instruction. */ +typedef struct + { + unsigned short int __control_word; + unsigned short int __unused1; + unsigned short int __status_word; + unsigned short int __unused2; + unsigned short int __tags; + unsigned short int __unused3; + unsigned int __eip; + unsigned short int __cs_selector; + unsigned int __opcode:11; + unsigned int __unused4:5; + unsigned int __data_offset; + unsigned short int __data_selector; + unsigned short int __unused5; + unsigned int __mxcsr; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((__const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((__const fenv_t *) -2) +#endif diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/bits/mathdef.h glibc-2.2.5/sysdeps/x86_64/fpu/bits/mathdef.h --- glibc-2.2.4/sysdeps/x86_64/fpu/bits/mathdef.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/bits/mathdef.h Wed Sep 19 03:22:39 2001 @@ -0,0 +1,39 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#if !defined _MATH_H && !defined _COMPLEX_H +# error "Never use directly; include instead" +#endif + +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + +/* The x86-64 architecture computes values with the precission of the + used type. */ +typedef float float_t; /* `float' expressions are evaluated as `float'. */ +typedef double double_t; /* `double' expressions are evaluated + as `double'. */ + +/* Define `INFINITY' as value of type `float'. */ +# define INFINITY HUGE_VALF + +/* The values returned by `ilogb' for 0 and NaN respectively. */ +# define FP_ILOGB0 (-2147483647 - 1) +# define FP_ILOGBNAN (-2147483647 - 1) + +#endif /* ISO C99 */ diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_acosl.c glibc-2.2.5/sysdeps/x86_64/fpu/e_acosl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/e_acosl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_acosl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include "sysdeps/i386/fpu/e_acosl.c" diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_atan2l.c glibc-2.2.5/sysdeps/x86_64/fpu/e_atan2l.c --- glibc-2.2.4/sysdeps/x86_64/fpu/e_atan2l.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_atan2l.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1,2 @@ +#include "sysdeps/i386/fpu/e_atan2l.c" + diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_exp2l.S glibc-2.2.5/sysdeps/x86_64/fpu/e_exp2l.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_exp2l.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_exp2l.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,38 @@ +/* + * Written by J.T. Conklin . + * Adapted for exp2 by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + * Public domain. + */ + +#include + +ENTRY(__ieee754_exp2l) + fldt 8(%rsp) +/* I added the following ugly construct because exp(+-Inf) resulted + in NaN. The ugliness results from the bright minds at Intel. + For the i686 the code can be written better. + -- drepper@cygnus.com. */ + fxam /* Is NaN or +-Inf? */ + fstsw %ax + movb $0x45, %dh + andb %ah, %dh + cmpb $0x05, %dh + je 1f /* Is +-Inf, jump. */ + fld %st + frndint /* int(x) */ + fsubr %st,%st(1) /* fract(x) */ + fxch + f2xm1 /* 2^(fract(x)) - 1 */ + fld1 + faddp /* 2^(fract(x)) */ + fscale /* e^x */ + fstp %st(1) + ret + +1: testl $0x200, %eax /* Test sign. */ + jz 2f /* If positive, jump. */ + fstp %st + fldz /* Set result to 0. */ +2: ret +END (__ieee754_exp2l) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_expl.c glibc-2.2.5/sysdeps/x86_64/fpu/e_expl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/e_expl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_expl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include "sysdeps/i386/fpu/e_expl.c" diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_fmodl.S glibc-2.2.5/sysdeps/x86_64/fpu/e_fmodl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_fmodl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_fmodl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,22 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +RCSID("$NetBSD: $") + +ENTRY(__ieee754_fmodl) + fldt 24(%rsp) + fldt 8(%rsp) +1: fprem + fstsw %ax + and $04,%ah + jnz 1b + fstp %st(1) + ret +END (__ieee754_fmodl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_log10l.S glibc-2.2.5/sysdeps/x86_64/fpu/e_log10l.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_log10l.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_log10l.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,66 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * + * Changed to use fyl2xp1 for values near 1, . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +RCSID("$NetBSD: $") + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(one,@object) +one: .double 1.0 + ASM_SIZE_DIRECTIVE(one) + /* It is not important that this constant is precise. It is only + a value which is known to be on the safe side for using the + fyl2xp1 instruction. */ + ASM_TYPE_DIRECTIVE(limit,@object) +limit: .double 0.29 + ASM_SIZE_DIRECTIVE(limit) + + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__ieee754_log10l) + fldlg2 // log10(2) + fldt 8(%rsp) // x : log10(2) + fxam + fnstsw + fld %st // x : x : log10(2) + andb $1,%ah + jnz 3f // in case x is NaN or ±Inf +4: fsubl MO(one) // x-1 : x : log10(2) + fld %st // x-1 : x-1 : x : log10(2) + fabs // |x-1| : x-1 : x : log10(2) + fcompl MO(limit) // x-1 : x : log10(2) + fnstsw // x-1 : x : log10(2) + andb $0x45, %ah + jz 2f + fstp %st(1) // x-1 : log10(2) + fyl2xp1 // log10(x) + ret + +2: fstp %st(0) // x : log10(2) + fyl2x // log10(x) + ret + +3: jp 4b // in case x is ±Inf + fstp %st(1) + fstp %st(1) + ret +END(__ieee754_log10l) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_log2l.S glibc-2.2.5/sysdeps/x86_64/fpu/e_log2l.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_log2l.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_log2l.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,63 @@ +/* + * Written by J.T. Conklin . + * Adapted for use as log2 by Ulrich Drepper . + * Public domain. + * + * Changed to use fyl2xp1 for values near 1, . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(one,@object) +one: .double 1.0 + ASM_SIZE_DIRECTIVE(one) + /* It is not important that this constant is precise. It is only + a value which is known to be on the safe side for using the + fyl2xp1 instruction. */ + ASM_TYPE_DIRECTIVE(limit,@object) +limit: .double 0.29 + ASM_SIZE_DIRECTIVE(limit) + + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__ieee754_log2l) + fldl MO(one) + fldt 8(%rsp) // x : 1 + fxam + fnstsw + fld %st // x : x : 1 + andb $1,%ah + jnz 3f // in case x is NaN or ±Inf +4: fsub %st(2), %st // x-1 : x : 1 + fld %st // x-1 : x-1 : x : 1 + fabs // |x-1| : x-1 : x : 1 + fcompl MO(limit) // x-1 : x : 1 + fnstsw // x-1 : x : 1 + andb $0x45, %ah + jz 2f + fstp %st(1) // x-1 : 1 + fyl2xp1 // log(x) + ret + +2: fstp %st(0) // x : 1 + fyl2x // log(x) + ret + +3: jp 4b // in case x is ±Inf + fstp %st(1) + fstp %st(1) + ret +END (__ieee754_log2l) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_logl.S glibc-2.2.5/sysdeps/x86_64/fpu/e_logl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_logl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_logl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,56 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +RCSID("$NetBSD: $") + + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(one,@object) +one: .double 1.0 + ASM_SIZE_DIRECTIVE(one) + /* It is not important that this constant is precise. It is only + a value which is known to be on the safe side for using the + fyl2xp1 instruction. */ + ASM_TYPE_DIRECTIVE(limit,@object) +limit: .double 0.29 + ASM_SIZE_DIRECTIVE(limit) + + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__ieee754_logl) + fldln2 // log(2) + fldt 8(%rsp) // x : log(2) + fld %st // x : x : log(2) + fsubl MO(one) // x-1 : x : log(2) + fld %st // x-1 : x-1 : x : log(2) + fabs // |x-1| : x-1 : x : log(2) + fcompl MO(limit) // x-1 : x : log(2) + fnstsw // x-1 : x : log(2) + andb $0x45, %ah + jz 2f + fstp %st(1) // x-1 : log(2) + fyl2xp1 // log(x) + ret + +2: fstp %st(0) // x : log(2) + fyl2x // log(x) + ret +END (__ieee754_logl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_powl.S glibc-2.2.5/sysdeps/x86_64/fpu/e_powl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_powl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_powl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,316 @@ +/* ix87 specific implementation of pow function. + Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(infinity,@object) +inf_zero: +infinity: + .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f + ASM_SIZE_DIRECTIVE(infinity) + ASM_TYPE_DIRECTIVE(zero,@object) +zero: .double 0.0 + ASM_SIZE_DIRECTIVE(zero) + ASM_TYPE_DIRECTIVE(minf_mzero,@object) +minf_mzero: +minfinity: + .byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff +mzero: + .byte 0, 0, 0, 0, 0, 0, 0, 0x80 + ASM_SIZE_DIRECTIVE(minf_mzero) + ASM_TYPE_DIRECTIVE(one,@object) +one: .double 1.0 + ASM_SIZE_DIRECTIVE(one) + ASM_TYPE_DIRECTIVE(limit,@object) +limit: .double 0.29 + ASM_SIZE_DIRECTIVE(limit) + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__ieee754_powl) + fldt 24(%rsp) // y + fxam + + + fnstsw + movb %ah, %dl + andb $0x45, %ah + cmpb $0x40, %ah // is y == 0 ? + je 11f + + cmpb $0x05, %ah // is y == ±inf ? + je 12f + + cmpb $0x01, %ah // is y == NaN ? + je 30f + + fldt 8(%rsp) // x : y + + fxam + fnstsw + movb %ah, %dh + andb $0x45, %ah + cmpb $0x40, %ah + je 20f // x is ±0 + + cmpb $0x05, %ah + je 15f // x is ±inf + + fxch // y : x + + /* First see whether `y' is a natural number. In this case we + can use a more precise algorithm. */ + fld %st // y : y : x + fistpll -8(%rsp) // y : x + fildll -8(%rsp) // int(y) : y : x + fucomip %st(1),%st // y : x + jne 2f + + /* OK, we have an integer value for y. */ + mov -8(%rsp),%eax + mov -4(%rsp),%edx + orl $0, %edx + fstp %st(0) // x + jns 4f // y >= 0, jump + fdivrl MO(one) // 1/x (now referred to as x) + negl %eax + adcl $0, %edx + negl %edx +4: fldl MO(one) // 1 : x + fxch + +6: shrdl $1, %edx, %eax + jnc 5f + fxch + fmul %st(1) // x : ST*x + fxch +5: fmul %st(0), %st // x*x : ST*x + shrl $1, %edx + movl %eax, %ecx + orl %edx, %ecx + jnz 6b + fstp %st(0) // ST*x + ret + + /* y is ±NAN */ +30: fldt 8(%rsp) // x : y + fldl MO(one) // 1.0 : x : y + fucomip %st(1),%st // x : y + je 31f + fxch // y : x +31: fstp %st(1) + ret + + .align ALIGNARG(4) +2: /* y is a real number. */ + fxch // x : y + fldl MO(one) // 1.0 : x : y + fld %st(1) // x : 1.0 : x : y + fsub %st(1) // x-1 : 1.0 : x : y + fabs // |x-1| : 1.0 : x : y + fcompl MO(limit) // 1.0 : x : y + fnstsw + fxch // x : 1.0 : y + test $4500,%eax + jz 7f + fsub %st(1) // x-1 : 1.0 : y + fyl2xp1 // log2(x) : y + jmp 8f + +7: fyl2x // log2(x) : y +8: fmul %st(1) // y*log2(x) : y + fst %st(1) // y*log2(x) : y*log2(x) + frndint // int(y*log2(x)) : y*log2(x) + fsubr %st, %st(1) // int(y*log2(x)) : fract(y*log2(x)) + fxch // fract(y*log2(x)) : int(y*log2(x)) + f2xm1 // 2^fract(y*log2(x))-1 : int(y*log2(x)) + faddl MO(one) // 2^fract(y*log2(x)) : int(y*log2(x)) + fscale // 2^fract(y*log2(x))*2^int(y*log2(x)) : int(y*log2(x)) + fstp %st(1) // 2^fract(y*log2(x))*2^int(y*log2(x)) + ret + + + // pow(x,±0) = 1 + .align ALIGNARG(4) +11: fstp %st(0) // pop y + fldl MO(one) + ret + + // y == ±inf + .align ALIGNARG(4) +12: fstp %st(0) // pop y + fldt 8(%rsp) // x + fabs + fcompl MO(one) // < 1, == 1, or > 1 + fnstsw + andb $0x45, %ah + cmpb $0x45, %ah + je 13f // jump if x is NaN + + cmpb $0x40, %ah + je 14f // jump if |x| == 1 + + shlb $1, %ah + xorb %ah, %dl + andl $2, %edx +#ifdef PIC + lea inf_zero(%rip),%rcx + fldl (%rcx, %rdx, 4) +#else + fldl inf_zero(,%rdx, 4) +#endif + ret + + .align ALIGNARG(4) +14: fldl MO(one) + ret + + .align ALIGNARG(4) +13: fldt 8(%rsp) // load x == NaN + ret + + .align ALIGNARG(4) + // x is ±inf +15: fstp %st(0) // y + testb $2, %dh + jz 16f // jump if x == +inf + + // We must find out whether y is an odd integer. + fld %st // y : y + fistpll -8(%rsp) // y + fildll -8(%rsp) // int(y) : y + fucomip %st(1),%st + ffreep %st // + jne 17f + + // OK, the value is an integer, but is it odd? + mov -8(%rsp), %eax + mov -4(%rsp), %edx + andb $1, %al + jz 18f // jump if not odd + // It's an odd integer. + shrl $31, %edx +#ifdef PIC + lea minf_mzero(%rip),%rcx + fldl (%rcx, %rdx, 8) +#else + fldl minf_mzero(,%rdx, 8) +#endif + ret + + .align ALIGNARG(4) +16: fcompl MO(zero) + fnstsw + shrl $5, %eax + andl $8, %eax +#ifdef PIC + lea inf_zero(%rip),%rcx + fldl (%rcx, %rax, 1) +#else + fldl inf_zero(,%rax, 1) +#endif + ret + + .align ALIGNARG(4) +17: shll $30, %edx // sign bit for y in right position +18: shrl $31, %edx +#ifdef PIC + lea inf_zero(%rip),%rcx + fldl (%rcx, %rdx, 8) +#else + fldl inf_zero(,%rdx, 8) +#endif + ret + + .align ALIGNARG(4) + // x is ±0 +20: fstp %st(0) // y + testb $2, %dl + jz 21f // y > 0 + + // x is ±0 and y is < 0. We must find out whether y is an odd integer. + testb $2, %dh + jz 25f + + fld %st // y : y + fistpll -8(%rsp) // y + fildll -8(%rsp) // int(y) : y + fucomip %st(1),%st + ffreep %st // + jne 26f + + // OK, the value is an integer, but is it odd? + mov -8(%rsp),%eax + mov -4(%rsp),%edx + andb $1, %al + jz 27f // jump if not odd + // It's an odd integer. + // Raise divide-by-zero exception and get minus infinity value. + fldl MO(one) + fdivl MO(zero) + fchs + ret + +25: fstp %st(0) +26: +27: // Raise divide-by-zero exception and get infinity value. + fldl MO(one) + fdivl MO(zero) + ret + + .align ALIGNARG(4) + // x is ±0 and y is > 0. We must find out whether y is an odd integer. +21: testb $2, %dh + jz 22f + + fld %st // y : y + fistpll -8(%rsp) // y + fildll -8(%rsp) // int(y) : y + fucomip %st(1),%st + ffreep %st // + jne 23f + + // OK, the value is an integer, but is it odd? + mov -8(%rsp),%eax + mov -4(%rsp),%edx + andb $1, %al + jz 24f // jump if not odd + // It's an odd integer. + fldl MO(mzero) + ret + +22: fstp %st(0) +23: +24: fldl MO(zero) + ret + +END(__ieee754_powl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_rem_pio2l.c glibc-2.2.5/sysdeps/x86_64/fpu/e_rem_pio2l.c --- glibc-2.2.4/sysdeps/x86_64/fpu/e_rem_pio2l.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_rem_pio2l.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1,3 @@ +/* Empty. This file is only meant to avoid compiling the file with the + same name in the libm-ieee754 directory. The code is not used since + there is an assembler version for all users of this file. */ diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_scalbl.S glibc-2.2.5/sysdeps/x86_64/fpu/e_scalbl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/e_scalbl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_scalbl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,100 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger + * + * Correct handling of y==-inf + */ + +#include + +RCSID("$NetBSD: $") + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(zero_nan,@object) +zero_nan: + .double 0.0 +nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f +minus_zero: + .byte 0, 0, 0, 0, 0, 0, 0, 0x80 + .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f + ASM_SIZE_DIRECTIVE(zero_nan) + + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__ieee754_scalbl) + fldt 24(%rsp) + fxam + fnstsw + fldt 8(%rsp) + andl $0x4700, %eax + cmpl $0x0700, %eax + je 1f + andl $0x4500, %eax + cmpl $0x0100, %eax + je 2f + fxam + fnstsw + andl $0x4500, %eax + cmpl $0x0100, %eax + je 3f + fld %st(1) + frndint + fcomip %st(2), %st + jne 4f + fscale + fstp %st(1) + ret + + /* y is -inf */ +1: fxam + fnstsw + movl 16(%rsp), %edx + shrl $5, %eax + fstp %st + fstp %st + andl $0x8000, %edx + andl $8, %eax + jnz 4f + shrl $11, %edx + addl %edx, %eax +#ifdef PIC + lea zero_nan(%rip),%rdx + fldl (%rdx,%rax,1) +#else + fldl zero_nan(%rax, 1) +#endif + ret + + /* The result is NaN, but we must not raise an exception. + So use a variable. */ +2: fstp %st + fstp %st + fldl MO(nan) + ret + + /* The first parameter is a NaN. Return it. */ +3: fstp %st(1) + ret + + /* Return NaN and raise the invalid exception. */ +4: fstp %st + fstp %st + fldz + fdiv %st + ret +END(__ieee754_scalbl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/e_sqrtl.c glibc-2.2.5/sysdeps/x86_64/fpu/e_sqrtl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/e_sqrtl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/e_sqrtl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include "sysdeps/i386/fpu/e_sqrtl.c" diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fclrexcpt.c glibc-2.2.5/sysdeps/x86_64/fpu/fclrexcpt.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fclrexcpt.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fclrexcpt.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,52 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +feclearexcept (int excepts) +{ + fenv_t temp; + unsigned int mxcsr; + + /* Mask out unsupported bits/exceptions. */ + excepts &= FE_ALL_EXCEPT; + + /* Bah, we have to clear selected exceptions. Since there is no + `fldsw' instruction we have to do it the hard way. */ + __asm__ ("fnstenv %0" : "=m" (*&temp)); + + /* Clear the relevant bits. */ + temp.__status_word &= excepts ^ FE_ALL_EXCEPT; + + /* Put the new data in effect. */ + __asm__ ("fldenv %0" : : "m" (*&temp)); + + /* And the same procedure for SSE. */ + __asm__ ("stmxcsr %0" : "=m" (*&mxcsr)); + + /* Clear the relevant bits. */ + mxcsr &= ~excepts; + + /* And put them into effect. */ + __asm__ ("ldmxcsr %0" : : "m" (*&mxcsr)); + + /* Success. */ + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fedisblxcpt.c glibc-2.2.5/sysdeps/x86_64/fpu/fedisblxcpt.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fedisblxcpt.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fedisblxcpt.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,49 @@ +/* Disable floating-point exceptions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fedisableexcept (int excepts) +{ + unsigned short int new_exc, old_exc; + unsigned int new, old; + + excepts &= FE_ALL_EXCEPT; + + /* Get the current control word of the x87 FPU. */ + __asm__ ("fstcw %0" : "=m" (*&new_exc)); + + old_exc = (~new_exc) & FE_ALL_EXCEPT; + + new_exc |= excepts; + __asm__ ("fldcw %0" : : "m" (*&new_exc)); + + /* And now the same for the SSE MXCSR register. */ + __asm__ ("stmxcsr %0" : "=m" (*&new)); + + /* The SSE exception masks are shifted by 7 bits. */ + old = (~new) & (FE_ALL_EXCEPT << 7); + + new |= excepts << 7; + __asm__ ("ldmxcsr %0" : : "m" (*&new)); + + return old_exc; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/feenablxcpt.c glibc-2.2.5/sysdeps/x86_64/fpu/feenablxcpt.c --- glibc-2.2.4/sysdeps/x86_64/fpu/feenablxcpt.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/feenablxcpt.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,49 @@ +/* Enable floating-point exceptions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +feenableexcept (int excepts) +{ + unsigned short int new_exc, old_exc; + unsigned int new, old; + + excepts &= FE_ALL_EXCEPT; + + /* Get the current control word of the x87 FPU. */ + __asm__ ("fstcw %0" : "=m" (*&new_exc)); + + old_exc = (~new_exc) & FE_ALL_EXCEPT; + + new_exc &= ~excepts; + __asm__ ("fldcw %0" : : "m" (*&new_exc)); + + /* And now the same for the SSE MXCSR register. */ + __asm__ ("stmxcsr %0" : "=m" (*&new)); + + /* The SSE exception masks are shifted by 7 bits. */ + old = (~new) & (FE_ALL_EXCEPT << 7); + + new &= ~(excepts << 7); + __asm__ ("ldmxcsr %0" : : "m" (*&new)); + + return old_exc; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fegetenv.c glibc-2.2.5/sysdeps/x86_64/fpu/fegetenv.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fegetenv.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fegetenv.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,30 @@ +/* Store current floating-point environment. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fegetenv (fenv_t *envp) +{ + __asm__ ("fnstenv %0\n" + "stmxcsr %1" : "=m" (*envp), "=m" (envp->__mxcsr)); + + /* Success. */ + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fegetexcept.c glibc-2.2.5/sysdeps/x86_64/fpu/fegetexcept.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fegetexcept.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fegetexcept.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,32 @@ +/* Get enabled floating-point exceptions. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fegetexcept (void) +{ + unsigned short int exc; + + /* Get the current control word. */ + __asm__ ("fstcw %0" : "=m" (*&exc)); + + return (~exc) & FE_ALL_EXCEPT; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fegetround.c glibc-2.2.5/sysdeps/x86_64/fpu/fegetround.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fegetround.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fegetround.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,33 @@ +/* Return current rounding direction. + Copyright (C) 1997, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fegetround (void) +{ + int cw; + /* We only check the x87 FPU unit. The SSE unit should be the same + - and if it's not the same there's no way to signal it. */ + + __asm__ ("fnstcw %0" : "=m" (*&cw)); + + return cw & 0xc00; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/feholdexcpt.c glibc-2.2.5/sysdeps/x86_64/fpu/feholdexcpt.c --- glibc-2.2.4/sysdeps/x86_64/fpu/feholdexcpt.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/feholdexcpt.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,41 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +feholdexcept (fenv_t *envp) +{ + unsigned short int work; + unsigned int mxcsr; + + /* Store the environment. */ + __asm__ ("fnstenv %0\n" + "stmxcsr %1" : "=m" (*envp), "=m" (envp->__mxcsr)); + + /* Now set all exceptions to non-stop, first the x87 FPU. */ + work = envp->__control_word | 0x3f; + __asm__ ("fldcw %0" : : "m" (*&work)); + + /* Set the SSE MXCSR register. */ + mxcsr = envp->__mxcsr | 0x1f80; + __asm__ ("ldmxcsr %0" : : "m" (*&mxcsr)); + + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fesetenv.c glibc-2.2.5/sysdeps/x86_64/fpu/fesetenv.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fesetenv.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fesetenv.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,89 @@ +/* Install given floating-point environment. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + + +int +fesetenv (const fenv_t *envp) +{ + fenv_t temp; + + /* Install the environment specified by ENVP. But there are a few + values which we do not want to come from the saved environment. + Therefore, we get the current environment and replace the values + we want to use from the environment specified by the parameter. */ + __asm__ ("fnstenv %0\n" + "stmxcsr %1" : "=m" (*&temp), "=m" (*&temp.__mxcsr)); + + if (envp == FE_DFL_ENV) + { + temp.__control_word |= FE_ALL_EXCEPT; + temp.__control_word &= ~FE_TOWARDZERO; + temp.__status_word &= ~FE_ALL_EXCEPT; + temp.__eip = 0; + temp.__cs_selector = 0; + temp.__opcode = 0; + temp.__data_offset = 0; + temp.__data_selector = 0; + /* Set mask for SSE MXCSR. */ + temp.__mxcsr |= (FE_ALL_EXCEPT << 7); + /* Set rounding to FE_TOWARDZERO. */ + temp.__mxcsr &= ~(FE_TOWARDZERO << 3); + /* Disable exceptions. */ + temp.__mxcsr &= ~FE_ALL_EXCEPT; + } + else if (envp == FE_NOMASK_ENV) + { + temp.__control_word &= ~(FE_ALL_EXCEPT | FE_TOWARDZERO); + temp.__status_word &= ~FE_ALL_EXCEPT; + temp.__eip = 0; + temp.__cs_selector = 0; + temp.__opcode = 0; + temp.__data_offset = 0; + temp.__data_selector = 0; + /* Set mask for SSE MXCSR. */ + temp.__mxcsr &= ~(FE_ALL_EXCEPT << 7); + /* Set rounding to FE_TOWARDZERO. */ + temp.__mxcsr &= ~(FE_TOWARDZERO << 3); + /* Disable exceptions. */ + temp.__mxcsr &= ~FE_ALL_EXCEPT; + } + else + { + temp.__control_word &= ~(FE_ALL_EXCEPT | FE_TOWARDZERO); + temp.__control_word |= (envp->__control_word + & (FE_ALL_EXCEPT | FE_TOWARDZERO)); + temp.__status_word &= ~FE_ALL_EXCEPT; + temp.__status_word |= envp->__status_word & FE_ALL_EXCEPT; + temp.__eip = envp->__eip; + temp.__cs_selector = envp->__cs_selector; + temp.__opcode = envp->__opcode; + temp.__data_offset = envp->__data_offset; + temp.__data_selector = envp->__data_selector; + temp.__mxcsr = envp->__mxcsr; + } + + __asm__ ("fldenv %0\n" + "ldmxcsr %1" : : "m" (temp), "m" (temp.__mxcsr)); + + /* Success. */ + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fesetround.c glibc-2.2.5/sysdeps/x86_64/fpu/fesetround.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fesetround.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fesetround.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,46 @@ +/* Set current rounding direction. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fesetround (int round) +{ + unsigned short int cw; + int mxcsr; + + if ((round & ~0xc00) != 0) + /* ROUND is no valid rounding mode. */ + return 1; + + /* First set the x87 FPU. */ + asm ("fnstcw %0" : "=m" (*&cw)); + cw &= ~0xc00; + cw |= round; + asm ("fldcw %0" : : "m" (*&cw)); + + /* And now the MSCSR register for SSE, the precision is at different bit + positions in the different units, we need to shift it 3 bits. */ + asm ("stmxcsr %0" : "=m" (*&mxcsr)); + mxcsr &= ~ 0x6000; + mxcsr |= round << 3; + asm ("ldmxcsr %0" : : "m" (*&mxcsr)); + + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fgetexcptflg.c glibc-2.2.5/sysdeps/x86_64/fpu/fgetexcptflg.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fgetexcptflg.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fgetexcptflg.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,36 @@ +/* Store current representation for exceptions. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fegetexceptflag (fexcept_t *flagp, int excepts) +{ + fexcept_t temp; + unsigned int mxscr; + + /* Get the current exceptions for the x87 FPU and SSE unit. */ + __asm__ ("fnstsw %0\n" + "stmxcsr %1" : "=m" (*&temp), "=m" (*&mxscr)); + + *flagp = (temp | mxscr) & FE_ALL_EXCEPT & excepts; + + /* Success. */ + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fraiseexcpt.c glibc-2.2.5/sysdeps/x86_64/fpu/fraiseexcpt.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fraiseexcpt.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fraiseexcpt.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,119 @@ +/* Raise given exceptions. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +int +feraiseexcept (int excepts) +{ + /* Raise exceptions represented by EXPECTS. But we must raise only + one signal at a time. It is important that if the overflow/underflow + exception and the inexact exception are given at the same time, + the overflow/underflow exception follows the inexact exception. */ + + /* First: invalid exception. */ + if ((FE_INVALID & excepts) != 0) + { + /* One example of a invalid operation is 0.0 / 0.0. */ + float f = 0.0; + + __asm__ __volatile__ ("divss %0, %0 " : : "x" (f)); + (void) &f; + } + + /* Next: division by zero. */ + if ((FE_DIVBYZERO & excepts) != 0) + { + float f = 1.0; + float g = 0.0; + + __asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g)); + (void) &f; + } + + /* Next: overflow. */ + if ((FE_OVERFLOW & excepts) != 0) + { + /* XXX: Is it ok to only set the x87 FPU? */ + /* There is no way to raise only the overflow flag. Do it the + hard way. */ + fenv_t temp; + + /* Bah, we have to clear selected exceptions. Since there is no + `fldsw' instruction we have to do it the hard way. */ + __asm__ __volatile__ ("fnstenv %0" : "=m" (*&temp)); + + /* Set the relevant bits. */ + temp.__status_word |= FE_OVERFLOW; + + /* Put the new data in effect. */ + __asm__ __volatile__ ("fldenv %0" : : "m" (*&temp)); + + /* And raise the exception. */ + __asm__ __volatile__ ("fwait"); + } + + /* Next: underflow. */ + if ((FE_UNDERFLOW & excepts) != 0) + { + /* XXX: Is it ok to only set the x87 FPU? */ + /* There is no way to raise only the underflow flag. Do it the + hard way. */ + fenv_t temp; + + /* Bah, we have to clear selected exceptions. Since there is no + `fldsw' instruction we have to do it the hard way. */ + __asm__ __volatile__ ("fnstenv %0" : "=m" (*&temp)); + + /* Set the relevant bits. */ + temp.__status_word |= FE_UNDERFLOW; + + /* Put the new data in effect. */ + __asm__ __volatile__ ("fldenv %0" : : "m" (*&temp)); + + /* And raise the exception. */ + __asm__ __volatile__ ("fwait"); + } + + /* Last: inexact. */ + if ((FE_INEXACT & excepts) != 0) + { + /* XXX: Is it ok to only set the x87 FPU? */ + /* There is no way to raise only the inexact flag. Do it the + hard way. */ + fenv_t temp; + + /* Bah, we have to clear selected exceptions. Since there is no + `fldsw' instruction we have to do it the hard way. */ + __asm__ __volatile__ ("fnstenv %0" : "=m" (*&temp)); + + /* Set the relevant bits. */ + temp.__status_word |= FE_INEXACT; + + /* Put the new data in effect. */ + __asm__ __volatile__ ("fldenv %0" : : "m" (*&temp)); + + /* And raise the exception. */ + __asm__ __volatile__ ("fwait"); + } + + /* Success. */ + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/fsetexcptflg.c glibc-2.2.5/sysdeps/x86_64/fpu/fsetexcptflg.c --- glibc-2.2.4/sysdeps/x86_64/fpu/fsetexcptflg.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/fsetexcptflg.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,54 @@ +/* Set floating-point environment exception handling. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +int +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ + fenv_t temp; + unsigned int mxcsr; + + /* XXX: Do we really need to set both the exception in both units? + Shouldn't it be enough to set only the SSE unit? */ + + /* Get the current x87 FPU environment. We have to do this since we + cannot separately set the status word. */ + __asm__ ("fnstenv %0" : "=m" (*&temp)); + + temp.__status_word &= ~(excepts & FE_ALL_EXCEPT); + temp.__status_word |= *flagp & excepts & FE_ALL_EXCEPT; + + /* Store the new status word (along with the rest of the environment. + Possibly new exceptions are set but they won't get executed unless + the next floating-point instruction. */ + __asm__ ("fldenv %0" : : "m" (*&temp)); + + /* And now the same for SSE. */ + __asm__ ("stmxcsr %0" : "=m" (*&mxcsr)); + + mxcsr &= (excepts & FE_ALL_EXCEPT); + mxcsr |= *flagp & excepts & FE_ALL_EXCEPT; + + __asm__ ("ldmxcsr %0" : : "m" (*&mxcsr)); + + /* Success. */ + return 0; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/ftestexcept.c glibc-2.2.5/sysdeps/x86_64/fpu/ftestexcept.c --- glibc-2.2.4/sysdeps/x86_64/fpu/ftestexcept.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/ftestexcept.c Wed Sep 19 03:23:17 2001 @@ -0,0 +1,33 @@ +/* Test exception in current environment. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +int +fetestexcept (int excepts) +{ + int temp; + unsigned int mxscr; + + /* Get current exceptions. */ + __asm__ ("fnstsw %0\n" + "stmxcsr %1" : "=m" (*&temp), "=m" (*&mxscr)); + + return (temp | mxscr) & excepts & FE_ALL_EXCEPT; +} diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/libm-test-ulps glibc-2.2.5/sysdeps/x86_64/fpu/libm-test-ulps --- glibc-2.2.4/sysdeps/x86_64/fpu/libm-test-ulps Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/libm-test-ulps Wed Sep 19 03:24:25 2001 @@ -0,0 +1,1493 @@ +# Begin of automatic generation + +# asin +Test "asin (-0.5) == -pi/6": +ildouble: 1 +ldouble: 1 +Test "asin (-1.0) == -pi/2": +ildouble: 1 +ldouble: 1 +Test "asin (0.5) == pi/6": +ildouble: 1 +ldouble: 1 +Test "asin (0.7) == 0.77539749661075306374035335271498708": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "asin (1.0) == pi/2": +ildouble: 1 +ldouble: 1 + +# asinh +Test "asinh (0.7) == 0.652666566082355786": +ildouble: 15 +ldouble: 15 + +# atan2 +Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267": +float: 3 +ifloat: 3 +Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267": +float: 3 +ifloat: 3 +Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736": +float: 4 +ifloat: 4 + +# atanh +Test "atanh (0.7) == 0.8673005276940531944": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# cabs +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# cacos +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# cacosh +Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 6 +ldouble: 6 +Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 1 +ldouble: 1 +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i": +ildouble: 1 +ldouble: 1 + +# casin +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# casinh +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 5 +ldouble: 5 +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 5 +ldouble: 5 +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": +double: 1 +idouble: 1 +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# catan +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +float: 3 +ifloat: 3 +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": +float: 4 +ifloat: 4 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i": +double: 1 +idouble: 1 + +# catanh +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +double: 4 +idouble: 4 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i": +float: 4 +ifloat: 4 +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i": +float: 6 +ifloat: 6 + +# cbrt +Test "cbrt (-0.001) == -0.1": +ildouble: 102 +ldouble: 102 +Test "cbrt (-27.0) == -3.0": +double: 1 +idouble: 1 +ildouble: 948 +ldouble: 948 +Test "cbrt (0.7) == 0.8879040017426007084": +ildouble: 345 +ldouble: 345 +Test "cbrt (0.970299) == 0.99": +double: 1 +idouble: 1 +ildouble: 142 +ldouble: 142 +Test "cbrt (8) == 2": +ildouble: 191 +ldouble: 191 + +# ccos +Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# ccosh +Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# cexp +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": +float: 1 +ifloat: 1 + +# clog +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i": +float: 3 +ifloat: 3 + +# clog10 +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i": +double: 1 +idouble: 1 +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i": +double: 1 +idouble: 1 +ildouble: 3 +ldouble: 3 +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# cos +Test "cos (0.7) == 0.76484218728448842625585999019186495": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "cos (M_PI_6l * 2.0) == 0.5": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "cos (M_PI_6l * 4.0) == -0.5": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 0.5 +ldouble: 0.5 +Test "cos (pi/2) == 0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 0.25 +ldouble: 0.25 + +# cosh +Test "cosh (0.7) == 1.255169005630943018": +ildouble: 2 +ldouble: 2 + +# cpow +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 1 +ldouble: 1 +Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i": +ildouble: 1 +ldouble: 1 + +# csin +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# csinh +Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i": +double: 1 +idouble: 1 +ildouble: 2 +ldouble: 2 +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i": +float: 1 +ifloat: 1 + +# csqrt +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +float: 1 +ifloat: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": +float: 1 +ifloat: 1 + +# ctan +Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +double: 1 +idouble: 1 +ildouble: 439 +ldouble: 439 +Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": +ildouble: 2 +ldouble: 2 +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +# ctanh +Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 5 +ldouble: 5 +Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i": +ildouble: 25 +ldouble: 25 +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i": +float: 1 +ifloat: 1 +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# erfc +Test "erfc (0.7) == 0.32219880616258152702": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "erfc (1.2) == 0.089686021770364619762": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 3 +ldouble: 3 +Test "erfc (2.0) == 0.0046777349810472658379": +double: 1 +idouble: 1 +Test "erfc (4.1) == 0.67000276540848983727e-8": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 +ildouble: 12 +ldouble: 12 +Test "erfc (9) == 0.41370317465138102381e-36": +ildouble: 36 +ldouble: 36 + +# exp10 +Test "exp10 (-1) == 0.1": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "exp10 (0.7) == 5.0118723362727228500155418688494574": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "exp10 (3) == 1000": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +# expm1 +Test "expm1 (0.7) == 1.0137527074704765216": +ildouble: 1 +ldouble: 1 +Test "expm1 (1) == M_El - 1.0": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# fmod +Test "fmod (-6.5, -2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "fmod (-6.5, 2.3) == -1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "fmod (6.5, -2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "fmod (6.5, 2.3) == 1.9": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# gamma +Test "gamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 + +# hypot +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": +float: 1 +ifloat: 1 + +# j0 +Test "j0 (10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "j0 (2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "j0 (8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 + +# j1 +Test "j1 (10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "j1 (2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "j1 (8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +# jn +Test "jn (0, 10.0) == -0.24593576445134833520": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "jn (0, 2.0) == 0.22389077914123566805": +float: 2 +ifloat: 2 +Test "jn (0, 8.0) == 0.17165080713755390609": +float: 1 +ifloat: 1 +Test "jn (1, 10.0) == 0.043472746168861436670": +float: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "jn (1, 2.0) == 0.57672480775687338720": +double: 1 +idouble: 1 +Test "jn (1, 8.0) == 0.23463634685391462438": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "jn (10, -1.0) == 0.26306151236874532070e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.1) == 0.26905328954342155795e-19": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 +ildouble: 1 +ldouble: 1 +Test "jn (10, 0.7) == 0.75175911502153953928e-11": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "jn (10, 1.0) == 0.26306151236874532070e-9": +ildouble: 1 +ldouble: 1 +Test "jn (10, 10.0) == 0.20748610663335885770": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 +ildouble: 2 +ldouble: 2 +Test "jn (10, 2.0) == 0.25153862827167367096e-6": +float: 4 +ifloat: 4 +ildouble: 1 +ldouble: 1 +Test "jn (3, -1.0) == -0.019563353982668405919": +ildouble: 1 +ldouble: 1 +Test "jn (3, 0.1) == 0.000020820315754756261429": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "jn (3, 0.7) == 0.0069296548267508408077": +float: 1 +ifloat: 1 +Test "jn (3, 1.0) == 0.019563353982668405919": +ildouble: 1 +ldouble: 1 +Test "jn (3, 10.0) == 0.058379379305186812343": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "jn (3, 2.0) == 0.12894324947440205110": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +# lgamma +Test "lgamma (-0.5) == log(2*sqrt(pi))": +ildouble: 1 +ldouble: 1 +Test "lgamma (0.7) == 0.26086724653166651439": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "lgamma (1.2) == -0.853740900033158497197e-1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +# log +Test "log (0.7) == -0.35667494393873237891263871124118447": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log10 +Test "log10 (0.7) == -0.15490195998574316929": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "log10 (e) == log10(e)": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log1p +Test "log1p (-0.3) == -0.35667494393873237891263871124118447": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# log2 +Test "log2 (0.7) == -0.51457317282975824043": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +# sin +Test "sin (0.7) == 0.64421768723769105367261435139872014": +ildouble: 1 +ldouble: 1 + +# sincos +Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367261435139872014 in sin_res": +ildouble: 1 +ldouble: 1 +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res": +double: 1 +float: 0.5 +idouble: 1 +ifloat: 0.5 +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res": +double: 0.2758 +float: 0.3667 +idouble: 0.2758 +ifloat: 0.3667 +ildouble: 0.25 +ldouble: 0.25 +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res": +float: 1 +ifloat: 1 + +# sinh +Test "sinh (0.7) == 0.75858370183953350346": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tan +Test "tan (0.7) == 0.84228838046307944812813500221293775": +ildouble: 1 +ldouble: 1 +Test "tan (pi/4) == 1": +double: 0.5 +idouble: 0.5 + +# tanh +Test "tanh (0.7) == 0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Test "tanh (-0.7) == -0.60436777711716349631": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# tgamma +Test "tgamma (-0.5) == -2 sqrt (pi)": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "tgamma (0.5) == sqrt (pi)": +float: 1 +ifloat: 1 +Test "tgamma (0.7) == 1.29805533264755778568": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "tgamma (4) == 6": +ildouble: 2 +ldouble: 2 + +# y0 +Test "y0 (0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "y0 (1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "y0 (10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y0 (8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +# y1 +Test "y1 (0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "y1 (1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "y1 (10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "y1 (2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "y1 (8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +# yn +Test "yn (0, 0.7) == -0.19066492933739506743": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (0, 1.0) == 0.088256964215676957983": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 1.5) == 0.38244892379775884396": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +Test "yn (0, 10.0) == 0.055671167283599391424": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (0, 8.0) == 0.22352148938756622053": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 0.1) == -6.4589510947020269877": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 0.7) == -1.1032498719076333697": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (1, 1.5) == -0.41230862697391129595": +float: 1 +ifloat: 1 +Test "yn (1, 10.0) == 0.24901542420695388392": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +Test "yn (1, 2.0) == -0.10703243154093754689": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 +Test "yn (1, 8.0) == -0.15806046173124749426": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "yn (10, 0.1) == -0.11831335132045197885e19": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 2 +ldouble: 2 +Test "yn (10, 0.7) == -0.42447194260703866924e10": +double: 3 +idouble: 3 +ildouble: 7 +ldouble: 7 +Test "yn (10, 1.0) == -0.12161801427868918929e9": +double: 1 +idouble: 1 +Test "yn (10, 10.0) == -0.35981415218340272205": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (10, 2.0) == -129184.54220803928264": +double: 2 +idouble: 2 +ildouble: 1 +ldouble: 1 +Test "yn (3, 0.1) == -5099.3323786129048894": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (3, 0.7) == -15.819479052819633505": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 +ildouble: 2 +ldouble: 2 +Test "yn (3, 10.0) == -0.25136265718383732978": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +Test "yn (3, 2.0) == -1.1277837768404277861": +double: 1 +idouble: 1 + +# Maximal error of functions: +Function: "asin": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "asinh": +ildouble: 15 +ldouble: 15 + +Function: "atan2": +float: 4 +ifloat: 4 + +Function: "atanh": +double: 1 +idouble: 1 +ildouble: 1 +ldouble: 1 + +Function: "cabs": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cacos": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cacosh": +double: 1 +float: 7 +idouble: 1 +ifloat: 7 +ildouble: 6 +ldouble: 6 + +Function: Imaginary part of "cacosh": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casin": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: Imaginary part of "casin": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "casinh": +double: 5 +float: 1 +idouble: 5 +ifloat: 1 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "casinh": +double: 3 +float: 6 +idouble: 3 +ifloat: 6 +ildouble: 5 +ldouble: 5 + +Function: Real part of "catan": +float: 4 +ifloat: 4 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Real part of "catanh": +double: 4 +float: 1 +idouble: 4 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "catanh": +float: 6 +ifloat: 6 + +Function: "cbrt": +double: 1 +idouble: 1 +ildouble: 948 +ldouble: 948 + +Function: Real part of "ccos": +double: 1 +idouble: 1 + +Function: Imaginary part of "ccos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "ccosh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Real part of "cexp": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "cexp": +float: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog": +float: 3 +ifloat: 3 + +Function: Real part of "clog10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "clog10": +double: 1 +float: 5 +idouble: 1 +ifloat: 5 +ildouble: 3 +ldouble: 3 + +Function: "cos": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 0.5 +ldouble: 0.5 + +Function: "cosh": +ildouble: 2 +ldouble: 2 + +Function: Real part of "cpow": +double: 1 +float: 4 +idouble: 1 +ifloat: 4 +ildouble: 1 +ldouble: 1 + +Function: Imaginary part of "cpow": +double: 1.1031 +float: 2 +idouble: 1.1031 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "csin": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csinh": +float: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Imaginary part of "csinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "csqrt": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: Imaginary part of "csqrt": +float: 1 +ifloat: 1 + +Function: Real part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 439 +ldouble: 439 + +Function: Imaginary part of "ctan": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: Real part of "ctanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 +ildouble: 5 +ldouble: 5 + +Function: Imaginary part of "ctanh": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 25 +ldouble: 25 + +Function: "erfc": +double: 24 +float: 12 +idouble: 24 +ifloat: 12 +ildouble: 36 +ldouble: 36 + +Function: "exp10": +double: 6 +float: 2 +idouble: 6 +ifloat: 2 +ildouble: 3 +ldouble: 3 + +Function: "expm1": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "fmod": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "gamma": +ildouble: 1 +ldouble: 1 + +Function: "hypot": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "j0": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "j1": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "jn": +double: 6 +float: 4 +idouble: 6 +ifloat: 4 +ildouble: 2 +ldouble: 2 + +Function: "lgamma": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 +ildouble: 1 +ldouble: 1 + +Function: "log": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log10": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "log2": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "sin": +ildouble: 1 +ldouble: 1 + +Function: "sincos": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "sinh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tan": +double: 0.5 +idouble: 0.5 +ildouble: 1 +ldouble: 1 + +Function: "tanh": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 + +Function: "tgamma": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "y0": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 +ildouble: 2 +ldouble: 2 + +Function: "y1": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 2 +ldouble: 2 + +Function: "yn": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 +ildouble: 7 +ldouble: 7 + +# end of automatic generation diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/math_ldbl.h glibc-2.2.5/sysdeps/x86_64/fpu/math_ldbl.h --- glibc-2.2.4/sysdeps/x86_64/fpu/math_ldbl.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/math_ldbl.h Wed Sep 19 03:25:28 2001 @@ -0,0 +1,79 @@ +#ifndef _MATH_PRIVATE_H_ +#error "Never use directly; include instead." +#endif + +/* A union which permits us to convert between a long double and + three 32 bit ints. */ + +typedef union +{ + long double value; + struct + { + u_int32_t lsw; + u_int32_t msw; + int sign_exponent:16; + unsigned int empty1:16; + unsigned int empty0:32; + } parts; +} ieee_long_double_shape_type; + +/* Get three 32 bit ints from a double. */ + +#define GET_LDOUBLE_WORDS(exp,ix0,ix1,d) \ +do { \ + ieee_long_double_shape_type ew_u; \ + ew_u.value = (d); \ + (exp) = ew_u.parts.sign_exponent; \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ +} while (0) + +/* Set a double from two 32 bit ints. */ + +#define SET_LDOUBLE_WORDS(d,exp,ix0,ix1) \ +do { \ + ieee_long_double_shape_type iw_u; \ + iw_u.parts.sign_exponent = (exp); \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ +} while (0) + +/* Get the more significant 32 bits of a long double mantissa. */ + +#define GET_LDOUBLE_MSW(v,d) \ +do { \ + ieee_long_double_shape_type sh_u; \ + sh_u.value = (d); \ + (v) = sh_u.parts.msw; \ +} while (0) + +/* Set the more significant 32 bits of a long double mantissa from an int. */ + +#define SET_LDOUBLE_MSW(d,v) \ +do { \ + ieee_long_double_shape_type sh_u; \ + sh_u.value = (d); \ + sh_u.parts.msw = (v); \ + (d) = sh_u.value; \ +} while (0) + +/* Get int from the exponent of a long double. */ + +#define GET_LDOUBLE_EXP(exp,d) \ +do { \ + ieee_long_double_shape_type ge_u; \ + ge_u.value = (d); \ + (exp) = ge_u.parts.sign_exponent; \ +} while (0) + +/* Set exponent of a long double from an int. */ + +#define SET_LDOUBLE_EXP(d,exp) \ +do { \ + ieee_long_double_shape_type se_u; \ + se_u.value = (d); \ + se_u.parts.sign_exponent = (exp); \ + (d) = se_u.value; \ +} while (0) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/printf_fphex.c glibc-2.2.5/sysdeps/x86_64/fpu/printf_fphex.c --- glibc-2.2.4/sysdeps/x86_64/fpu/printf_fphex.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/printf_fphex.c Wed Sep 19 03:24:42 2001 @@ -0,0 +1,92 @@ +/* Print floating point number in hexadecimal notation according to ISO C99. + Copyright (C) 1997, 1998, 1999, 2000, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef LONG_DOUBLE_DENORM_BIAS +# define LONG_DOUBLE_DENORM_BIAS (IEEE854_LONG_DOUBLE_BIAS - 1) +#endif + +#define PRINT_FPHEX_LONG_DOUBLE \ +do { \ + /* The "strange" 80 bit format on ix86 and m68k has an explicit \ + leading digit in the 64 bit mantissa. */ \ + unsigned long long int num; \ + \ + \ + num = (((unsigned long long int) fpnum.ldbl.ieee.mantissa0) << 32 \ + | fpnum.ldbl.ieee.mantissa1); \ + \ + zero_mantissa = num == 0; \ + \ + if (sizeof (unsigned long int) > 6) \ + { \ + numstr = _itoa_word (num, numbuf + sizeof numbuf, 16, \ + info->spec == 'A'); \ + wnumstr = _itowa_word (num, \ + wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t),\ + 16, info->spec == 'A'); \ + } \ + else \ + { \ + numstr = _itoa (num, numbuf + sizeof numbuf, 16, info->spec == 'A');\ + wnumstr = _itowa (num, \ + wnumbuf + sizeof (wnumbuf) / sizeof (wchar_t), \ + 16, info->spec == 'A'); \ + } \ + \ + /* Fill with zeroes. */ \ + while (numstr > numbuf + (sizeof numbuf - 64 / 4)) \ + { \ + *--numstr = '0'; \ + *--wnumstr = L'0'; \ + } \ + \ + /* We use a full nibble for the leading digit. */ \ + leading = *numstr++; \ + \ + /* We have 3 bits from the mantissa in the leading nibble. \ + Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'. */ \ + exponent = fpnum.ldbl.ieee.exponent; \ + \ + if (exponent == 0) \ + { \ + if (zero_mantissa) \ + expnegative = 0; \ + else \ + { \ + /* This is a denormalized number. */ \ + expnegative = 1; \ + /* This is a hook for the m68k long double format, where the \ + exponent bias is the same for normalized and denormalized \ + numbers. */ \ + exponent = LONG_DOUBLE_DENORM_BIAS + 3; \ + } \ + } \ + else if (exponent >= IEEE854_LONG_DOUBLE_BIAS + 3) \ + { \ + expnegative = 0; \ + exponent -= IEEE854_LONG_DOUBLE_BIAS + 3; \ + } \ + else \ + { \ + expnegative = 1; \ + exponent = -(exponent - (IEEE854_LONG_DOUBLE_BIAS + 3)); \ + } \ +} while (0) + +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_atanl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_atanl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_atanl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_atanl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include "sysdeps/i386/fpu/s_atanl.c" diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_cosl.S glibc-2.2.5/sysdeps/x86_64/fpu/s_cosl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/s_cosl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_cosl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,32 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +RCSID("$NetBSD: $") + +ENTRY(__cosl) + fldt 8(%rsp) + fcos + fnstsw %ax + testl $0x400,%eax + jnz 1f + ret + .align ALIGNARG(4) +1: fldpi + fadd %st(0) + fxch %st(1) +2: fprem1 + fnstsw %ax + testl $0x400,%eax + jnz 2b + fstp %st(1) + fcos + ret +END (__cosl) +weak_alias (__cosl, cosl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_expm1l.S glibc-2.2.5/sysdeps/x86_64/fpu/s_expm1l.S --- glibc-2.2.4/sysdeps/x86_64/fpu/s_expm1l.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_expm1l.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,83 @@ +/* ix87 specific implementation of exp(x)-1. + Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1996. + Based on code by John C. Bowman . + Corrections by H.J. Lu (hjl@gnu.ai.mit.edu), 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + /* Using: e^x - 1 = 2^(x * log2(e)) - 1 */ + +#include + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(minus1,@object) +minus1: .double -1.0 + ASM_SIZE_DIRECTIVE(minus1) + ASM_TYPE_DIRECTIVE(one,@object) +one: .double 1.0 + ASM_SIZE_DIRECTIVE(one) + ASM_TYPE_DIRECTIVE(l2e,@object) +l2e: .tfloat 1.442695040888963407359924681002 + ASM_SIZE_DIRECTIVE(l2e) + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__expm1l) + fldt 8(%rsp) // x + fxam // Is NaN or +-Inf? + fstsw %ax + movb $0x45, %ch + andb %ah, %ch + cmpb $0x40, %ch + je 3f // If +-0, jump. + cmpb $0x05, %ch + je 2f // If +-Inf, jump. + + fldt MO(l2e) // log2(e) : x + fmulp // log2(e)*x + fld %st // log2(e)*x : log2(e)*x + frndint // int(log2(e)*x) : log2(e)*x + fsubr %st, %st(1) // int(log2(e)*x) : fract(log2(e)*x) + fxch // fract(log2(e)*x) : int(log2(e)*x) + f2xm1 // 2^fract(log2(e)*x)-1 : int(log2(e)*x) + fscale // 2^(log2(e)*x)-2^int(log2(e)*x) : int(log2(e)*x) + fxch // int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) + fldl MO(one) // 1 : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) + fscale // 2^int(log2(e)*x) : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) + fsubrl MO(one) // 1-2^int(log2(e)*x) : int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) + fstp %st(1) // 1-2^int(log2(e)*x) : 2^(log2(e)*x)-2^int(log2(e)*x) + fsubrp %st, %st(1) // 2^(log2(e)*x) + ret + +2: testl $0x200, %eax // Test sign. + jz 3f // If positive, jump. + fstp %st + fldl MO(minus1) // Set result to -1.0. +3: ret +END(__expm1l) +weak_alias (__expm1l, expm1l) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_fpclassifyl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_fpclassifyl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_fpclassifyl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_fpclassifyl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1,2 @@ +#include + diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_isinfl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_isinfl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_isinfl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_isinfl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_isnanl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_isnanl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_isnanl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_isnanl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_log1pl.S glibc-2.2.5/sysdeps/x86_64/fpu/s_log1pl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/s_log1pl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_log1pl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,71 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +RCSID("$NetBSD: s_log1p.S,v 1.7 1995/05/09 00:10:58 jtc Exp $") + +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + .align ALIGNARG(4) + /* The fyl2xp1 can only be used for values in + -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2 + 0.29 is a safe value. + */ +limit: .tfloat 0.29 + /* Please note: we use a double value here. Since 1.0 has + an exact representation this does not effect the accuracy + but it helps to optimize the code. */ +one: .double 1.0 + +/* + * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29, + * otherwise fyl2x with the needed extra computation. + */ +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + + .text +ENTRY(__log1pl) + fldln2 + + fldt 8(%rsp) + + fxam + fnstsw + fld %st + andb $1,%ah + jnz 3f // in case x is NaN or ±Inf +4: + fabs + fldt MO(limit) + fcompp + fnstsw + andb $1,%ah + jz 2f + + faddl MO(one) + fyl2x + ret + +2: fyl2xp1 + ret + +3: jp 4b // in case x is ±Inf + fstp %st(1) + fstp %st(1) + ret + +END (__log1pl) +weak_alias (__log1pl, log1pl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_logbl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_logbl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_logbl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_logbl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_nextafterl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_nextafterl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_nextafterl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_nextafterl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_nexttoward.c glibc-2.2.5/sysdeps/x86_64/fpu/s_nexttoward.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_nexttoward.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_nexttoward.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_nexttowardf.c glibc-2.2.5/sysdeps/x86_64/fpu/s_nexttowardf.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_nexttowardf.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_nexttowardf.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_rintl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_rintl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_rintl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_rintl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_significandl.c glibc-2.2.5/sysdeps/x86_64/fpu/s_significandl.c --- glibc-2.2.4/sysdeps/x86_64/fpu/s_significandl.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_significandl.c Wed Sep 19 03:24:08 2001 @@ -0,0 +1 @@ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_sincosl.S glibc-2.2.5/sysdeps/x86_64/fpu/s_sincosl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/s_sincosl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_sincosl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,61 @@ +/* Compute sine and cosine of argument. + Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include "bp-sym.h" +#include "bp-asm.h" + +#define PARMS LINKAGE /* no space for saved regs */ +#define ANGLE PARMS +#define SINP ANGLE+12 +#define COSP SINP+PTR_SIZE + + .text +ENTRY (BP_SYM (__sincosl)) + ENTER + + fldt 8(%rsp) + fsincos + fnstsw %ax + testl $0x400,%eax + jnz 1f + fstpt (%rsi) + fstpt (%rdi) + + LEAVE + ret + + .align ALIGNARG(4) +1: fldpi + fadd %st(0) + fxch %st(1) +2: fprem1 + fnstsw %ax + testl $0x400,%eax + jnz 2b + fstp %st(1) + fsincos + fstpt (%rsi) + fstpt (%rdi) + + LEAVE + ret +END (BP_SYM (__sincosl)) +weak_alias (BP_SYM (__sincosl), BP_SYM (sincosl)) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_sinl.S glibc-2.2.5/sysdeps/x86_64/fpu/s_sinl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/s_sinl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_sinl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,30 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +ENTRY(__sinl) + fldt 8(%rsp) + fsin + fnstsw %ax + testl $0x400,%eax + jnz 1f + ret + .align ALIGNARG(4) +1: fldpi + fadd %st(0) + fxch %st(1) +2: fprem1 + fnstsw %ax + testl $0x400,%eax + jnz 2b + fstp %st(1) + fsin + ret +END (__sinl) +weak_alias (__sinl, sinl) diff -durpN glibc-2.2.4/sysdeps/x86_64/fpu/s_tanl.S glibc-2.2.5/sysdeps/x86_64/fpu/s_tanl.S --- glibc-2.2.4/sysdeps/x86_64/fpu/s_tanl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/fpu/s_tanl.S Wed Sep 19 03:24:08 2001 @@ -0,0 +1,33 @@ +/* + * Written by J.T. Conklin . + * Public domain. + * + * Adapted for `long double' by Ulrich Drepper . + * Adapted for x86-64 by Andreas Jaeger . + */ + +#include + +RCSID("$NetBSD: $") + +ENTRY(__tanl) + fldt 8(%rsp) + fptan + fnstsw %ax + testl $0x400,%eax + jnz 1f + fstp %st(0) + ret +1: fldpi + fadd %st(0) + fxch %st(1) +2: fprem1 + fstsw %ax + testl $0x400,%eax + jnz 2b + fstp %st(1) + fptan + fstp %st(0) + ret +END (__tanl) +weak_alias (__tanl, tanl) diff -durpN glibc-2.2.4/sysdeps/x86_64/gmp-mparam.h glibc-2.2.5/sysdeps/x86_64/gmp-mparam.h --- glibc-2.2.4/sysdeps/x86_64/gmp-mparam.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/gmp-mparam.h Wed Sep 19 03:12:08 2001 @@ -0,0 +1,27 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 2001 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP 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 MP 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 MP 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. */ + +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT 64 +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff -durpN glibc-2.2.4/sysdeps/x86_64/hp-timing.c glibc-2.2.5/sysdeps/x86_64/hp-timing.c --- glibc-2.2.4/sysdeps/x86_64/hp-timing.c Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/hp-timing.c Wed Sep 19 03:12:08 2001 @@ -0,0 +1,2 @@ +/* We can use the i686 implementation without changes. */ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/hp-timing.h glibc-2.2.5/sysdeps/x86_64/hp-timing.h --- glibc-2.2.4/sysdeps/x86_64/hp-timing.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/hp-timing.h Wed Sep 19 03:12:08 2001 @@ -0,0 +1,2 @@ +/* We can use the i686 implementation without changes. */ +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/htonl.S glibc-2.2.5/sysdeps/x86_64/htonl.S --- glibc-2.2.4/sysdeps/x86_64/htonl.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/htonl.S Wed Sep 19 03:12:08 2001 @@ -0,0 +1,35 @@ +/* Change byte order in word. For AMD x86-64. + Copyright (C) 1997, 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include "asm-syntax.h" + +/* + INPUT PARAMETERS: + word %rdi +*/ + + .text +ENTRY (htonl) + movl %edi, %eax + bswap %eax + ret +END (htonl) + +weak_alias (htonl, ntohl) diff -durpN glibc-2.2.4/sysdeps/x86_64/memusage.h glibc-2.2.5/sysdeps/x86_64/memusage.h --- glibc-2.2.4/sysdeps/x86_64/memusage.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/memusage.h Wed Sep 19 03:12:08 2001 @@ -0,0 +1,22 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#define GETSP() ({ register uintptr_t stack_ptr asm ("rsp"); stack_ptr; }) +#define GETTIME(low,high) asm ("rdtsc" : "=a" (low), "=d" (high)) + +#include diff -durpN glibc-2.2.4/sysdeps/x86_64/setjmp.S glibc-2.2.5/sysdeps/x86_64/setjmp.S --- glibc-2.2.4/sysdeps/x86_64/setjmp.S Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/setjmp.S Wed Sep 19 03:12:08 2001 @@ -0,0 +1,45 @@ +/* setjmp for x86-64. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#define _ASM +#define _SETJMP_H +#include +#include + +ENTRY (__sigsetjmp) + /* Save registers. */ + movq %rbx, (JB_RBX*8)(%rdi) + movq %rbp, (JB_RBP*8)(%rdi) + movq %r12, (JB_R12*8)(%rdi) + movq %r13, (JB_R13*8)(%rdi) + movq %r14, (JB_R14*8)(%rdi) + movq %r15, (JB_R15*8)(%rdi) + leaq 8(%rsp), %rdx /* Save SP as it will be after we return. */ + movq %rdx, (JB_RSP*8)(%rdi) + movq (%rsp), %rax /* Save PC we are returning to now. */ + movq %rax, (JB_PC*8)(%rdi) + + /* Make a tail call to __sigjmp_save; it takes the same args. */ +#ifdef PIC + jmp C_SYMBOL_NAME (BP_SYM (__sigjmp_save))@PLT +#else + jmp BP_SYM (__sigjmp_save) +#endif +END (BP_SYM (__sigsetjmp)) diff -durpN glibc-2.2.4/sysdeps/x86_64/soft-fp/Dist glibc-2.2.5/sysdeps/x86_64/soft-fp/Dist --- glibc-2.2.4/sysdeps/x86_64/soft-fp/Dist Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/soft-fp/Dist Fri Sep 21 08:45:18 2001 @@ -0,0 +1 @@ +sfp-machine.h diff -durpN glibc-2.2.4/sysdeps/x86_64/soft-fp/sfp-machine.h glibc-2.2.5/sysdeps/x86_64/soft-fp/sfp-machine.h --- glibc-2.2.4/sysdeps/x86_64/soft-fp/sfp-machine.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/soft-fp/sfp-machine.h Wed Sep 19 03:21:39 2001 @@ -0,0 +1,49 @@ +#define _FP_W_TYPE_SIZE 64 +#define _FP_W_TYPE unsigned long +#define _FP_WS_TYPE signed long +#define _FP_I_TYPE long + +#define __FP_CLZ(r, x) \ + do { \ + __asm__("bsrq %1,%0" : "=r"(r) : "g"(x) : "cc"); \ + r ^= 63; \ + } while (0) + +#define _FP_NANFRAC_S _FP_QNANBIT_S +#define _FP_NANFRAC_D _FP_QNANBIT_D, 0 +#define _FP_NANSIGN_S 1 +#define _FP_NANSIGN_D 1 + +#define _FP_KEEPNANFRACP 1 +/* Here is something Intel misdesigned: the specs don't define + the case where we have two NaNs with same mantissas, but + different sign. Different operations pick up different NaNs. + */ +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ + do { \ + if (_FP_FRAC_GT_##wc(X, Y) \ + || (_FP_FRAC_EQ_##wc(X,Y) && (OP == '+' || OP == '*'))) \ + { \ + R##_s = X##_s; \ + _FP_FRAC_COPY_##wc(R,X); \ + } \ + else \ + { \ + R##_s = Y##_s; \ + _FP_FRAC_COPY_##wc(R,Y); \ + } \ + R##_c = FP_CLS_NAN; \ + } while (0) + +#define FP_EX_INVALID (1 << 0) +#define FP_EX_DENORM (1 << 1) +#define FP_EX_DIVZERO (1 << 2) +#define FP_EX_OVERFLOW (1 << 3) +#define FP_EX_UNDERFLOW (1 << 4) +#define FP_EX_INEXACT (1 << 5) + +#define FP_RND_NEAREST 0 +#define FP_RND_ZERO 3 +#define FP_RND_PINF 2 +#define FP_RND_MINF 1 + diff -durpN glibc-2.2.4/sysdeps/x86_64/stackinfo.h glibc-2.2.5/sysdeps/x86_64/stackinfo.h --- glibc-2.2.4/sysdeps/x86_64/stackinfo.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/stackinfo.h Wed Sep 19 03:12:08 2001 @@ -0,0 +1,28 @@ +/* Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This file contains a bit of information about the stack allocation + of the processor. */ + +#ifndef _STACKINFO_H +#define _STACKINFO_H 1 + +/* On x86_64 the stack grows down. */ +#define _STACK_GROWS_DOWN 1 + +#endif /* stackinfo.h */ diff -durpN glibc-2.2.4/sysdeps/x86_64/sysdep.h glibc-2.2.5/sysdeps/x86_64/sysdep.h --- glibc-2.2.4/sysdeps/x86_64/sysdep.h Wed Dec 31 16:00:00 1969 +++ glibc-2.2.5/sysdeps/x86_64/sysdep.h Wed Sep 19 03:12:08 2001 @@ -0,0 +1,101 @@ +/* Assembler macros for x86-64. + Copyright (C) 2001 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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#ifdef __ASSEMBLER__ + +/* Syntactic details of assembler. */ + +#ifdef HAVE_ELF + +/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */ +#define ALIGNARG(log2) 1<, 1998. @@ -64,6 +64,7 @@ struct temp_name_list /* Add temporary files in list. */ static void +__attribute__ ((unused)) add_temp_file (const char *name) { struct temp_name_list *newp diff -durpN glibc-2.2.4/time/strptime.c glibc-2.2.5/time/strptime.c --- glibc-2.2.4/time/strptime.c Fri Aug 10 12:12:07 2001 +++ glibc-2.2.5/time/strptime.c Fri Aug 31 23:20:04 2001 @@ -463,6 +463,8 @@ strptime_internal (rp, fmt, tm, decided, tm->tm_hour = val; have_I = 0; break; + case 'l': + /* Match hour in 12-hour clock. GNU extension. */ case 'I': /* Match hour in 12-hour clock. */ get_number (1, 12, 2); diff -durpN glibc-2.2.4/time/time.h glibc-2.2.5/time/time.h --- glibc-2.2.4/time/time.h Mon Jul 23 10:58:05 2001 +++ glibc-2.2.5/time/time.h Sat Aug 18 16:36:43 2001 @@ -105,7 +105,7 @@ typedef __timer_t timer_t; has nanoseconds instead of microseconds. */ struct timespec { - long int tv_sec; /* Seconds. */ + __time_t tv_sec; /* Seconds. */ long int tv_nsec; /* Nanoseconds. */ }; diff -durpN glibc-2.2.4/timezone/Makefile glibc-2.2.5/timezone/Makefile --- glibc-2.2.4/timezone/Makefile Mon Jul 23 10:58:05 2001 +++ glibc-2.2.5/timezone/Makefile Wed Aug 29 15:45:25 2001 @@ -77,7 +77,7 @@ endif ifeq ($(have-ksh),yes) install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab -install-bin += tzselect +install-bin-script = tzselect generated += tzselect endif diff -durpN glibc-2.2.4/timezone/africa glibc-2.2.5/timezone/africa --- glibc-2.2.4/timezone/africa Mon Jul 23 10:58:05 2001 +++ glibc-2.2.5/timezone/africa Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)africa 7.35 +# @(#)africa 7.36 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -10,7 +10,7 @@ # Thomas G. Shanks, The International Atlas (5th edition), # San Diego: ACS Publications, Inc. (1999). # -# Gwillim Law writes that a good source +# Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries @@ -55,7 +55,7 @@ # I invented the following abbreviations; corrections are welcome! # 2:00 WAST West Africa Summer Time # 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) +# 2:44:45 BEAUT British East Africa Unified Time (no longer used) # 3:00 CAST Central Africa Summer Time (no longer used) # 3:00 SAST South Africa Summer Time (no longer used) # 3:00 EAT East Africa Time @@ -101,7 +101,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 M # Angola # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Luanda 0:52:56 - LMT 1892 - 0:52:04 - LMT 1911 May 26 # Luanda Mean Time? + 0:52:04 - AOT 1911 May 26 # Angola Time 1:00 - WAT # Benin @@ -276,7 +276,7 @@ Zone Africa/Bissau -1:02:20 - LMT 1911 M Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:44:45 - BEAUT 1960 3:00 - EAT # Lesotho @@ -287,9 +287,9 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Ma 2:00 - SAST # Liberia -# From Paul Eggert (1993-11-18): +# From Paul Eggert (2001-07-17): # In 1972 Liberia was the last country to switch -# from a UTC offset that was not a multiple of 15 minutes. +# from a UTC offset that was not a multiple of 15 or 20 minutes. # Howse reports that it was in honor of their president's birthday. # Shanks reports the date as May 1, whereas Howse reports Jan; go with Shanks. # For Liberia before 1972, Shanks reports -0:44, whereas Howse and Whitman @@ -548,7 +548,7 @@ Zone Africa/Mbabane 2:04:24 - LMT 1903 M # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Dar_es_Salaam 2:37:08 - LMT 1931 3:00 - EAT 1948 - 2:45 - BEAUT 1961 + 2:44:45 - BEAUT 1961 3:00 - EAT # Togo @@ -591,7 +591,7 @@ Zone Africa/Tunis 0:40:44 - LMT 1881 May Zone Africa/Kampala 2:09:40 - LMT 1928 Jul 3:00 - EAT 1930 2:30 - BEAT 1948 - 2:45 - BEAUT 1957 + 2:44:45 - BEAUT 1957 3:00 - EAT # Zambia diff -durpN glibc-2.2.4/timezone/asia glibc-2.2.5/timezone/asia --- glibc-2.2.4/timezone/asia Mon Jul 23 10:58:06 2001 +++ glibc-2.2.5/timezone/asia Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)asia 7.64 +# @(#)asia 7.65 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -10,7 +10,7 @@ # Thomas G. Shanks, The International Atlas (5th edition), # San Diego: ACS Publications, Inc. (1999). # -# Gwillim Law writes that a good source +# Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries @@ -210,7 +210,7 @@ Zone Asia/Harbin 8:26:44 - LMT 1928 # or Zone Asia/Shanghai 8:05:52 - LMT 1928 8:00 Shang C%sT 1949 8:00 PRC C%sT -Zone Asia/Chungking 7:06:20 - LMT 1928 # or Chongqing +Zone Asia/Chongqing 7:06:20 - LMT 1928 # or Chungking 7:00 - CHUT 1980 May # Chungking Time 8:00 PRC C%sT Zone Asia/Urumqi 5:50:20 - LMT 1928 # or Urumchi @@ -263,7 +263,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S Rule Taiwan 1980 only - Jun 30 0:00 1:00 D Rule Taiwan 1980 only - Sep 30 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Taipei 8:06:00 - LMT 1896 +Zone Asia/Taipei 8:06:00 - LMT 1896 # or Taibei or T'ai-pei 8:00 Taiwan C%sT # Macao (Macau, Aomen) @@ -932,9 +932,11 @@ Zone Asia/Beirut 2:22:00 - LMT 1880 # Malaysia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule NBorneo 1935 1941 - Sep 14 0:00 0:20 TS +Rule NBorneo 1935 1941 - Sep 14 0:00 0:20 TS # one-Third Summer Rule NBorneo 1935 1941 - Dec 14 0:00 0 - +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] +# peninsular Malaysia Zone Asia/Kuala_Lumpur 6:46:48 - LMT 1880 6:55:24 - SMT 1905 Jun # Singapore Mean Time 7:00 - MALT 1933 # Malaya Time @@ -943,6 +945,7 @@ Zone Asia/Kuala_Lumpur 6:46:48 - LMT 188 7:20 - MALT 1950 7:30 - MALT 1982 May 8:00 - MYT # Malaysia Time +# Sabah & Sarawak Zone Asia/Kuching 7:21:20 - LMT 1926 Mar 7:30 - BORT 1933 # Borneo Time 8:00 NBorneo BOR%sT 1942 @@ -1022,11 +1025,10 @@ Zone Asia/Ulaanbaatar 7:07:32 - LMT 1905 8:00 Mongol ULA%sT # Choibalsan, a.k.a. Bajan Tuemen, Bajan Tumen, Chojbalsan, # Choybalsan, Sanbejse, Tchoibalsan -# We're still not sure about this data, so we'll omit it for now. -#Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug -# 7:00 - ULAT 1978 -# 8:00 Mongol ULA%sT 1983 Apr -# 9:00 Mongol CHO%sT # Choibalsan Time +Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug + 7:00 - ULAT 1978 + 8:00 - ULAT 1983 Apr + 9:00 Mongol CHO%sT # Choibalsan Time # Nepal # Zone NAME GMTOFF RULES FORMAT [UNTIL] diff -durpN glibc-2.2.4/timezone/australasia glibc-2.2.5/timezone/australasia --- glibc-2.2.4/timezone/australasia Sat Apr 7 14:02:40 2001 +++ glibc-2.2.5/timezone/australasia Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)australasia 7.64 +# @(#)australasia 7.65 # This file also includes Pacific islands. # Notes are at the end of this file @@ -7,6 +7,8 @@ # Australia +# Please see the notes below for the controversy about "EST" versus "AEST" etc. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Aus 1917 only - Jan 1 0:01 1:00 - Rule Aus 1917 only - Mar 25 2:00 0 - @@ -359,7 +361,7 @@ Zone Pacific/Palau 8:57:56 - LMT 1901 # # Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 - 9:48:40 - PMMT 1895 # Port Moresby Mean Time + 9:48:32 - PMMT 1895 # Port Moresby Mean Time 10:00 - PGT # Papua New Guinea Time # Pitcairn @@ -399,6 +401,8 @@ Rule Tonga 1999 only - Oct 7 2:00s 1:00 Rule Tonga 2000 only - Mar 19 2:00s 0 - Rule Tonga 2000 only - Nov 4 2:00s 1:00 S Rule Tonga 2001 only - Jan 27 2:00s 0 - +Rule Tonga 2001 only - Nov 25 2:00s 1:00 S +Rule Tonga 2002 only - Mar 3 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tongatapu 12:19:20 - LMT 1901 12:20 - TOT 1941 # Tonga Time @@ -473,7 +477,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # Thomas G. Shanks, The International Atlas (5th edition), # San Diego: ACS Publications, Inc. (1999). # -# Gwillim Law writes that a good source +# Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries @@ -535,12 +539,93 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # prefixed by the word `Australian' when referring to local times; # time announcements on that service, naturally enough, are made in UTC. -# From Arthur David Olson (March 8 1992): +# From Arthur David Olson (1992-03-08): # Given the above, what's chosen for year-round use is: # CST for any place operating at a GMTOFF of 9:30 # WST for any place operating at a GMTOFF of 8:00 # EST for any place operating at a GMTOFF of 10:00 +# From Paul Eggert (2001-04-05), summarizing a long discussion about "EST" +# versus "AEST" etc.: +# +# I see the following points of dispute: +# +# * How important are unique time zone abbreviations? +# +# Here I tend to agree with the point (most recently made by Chris +# Newman) that unique abbreviations should not be essential for proper +# operation of software. We have other instances of ambiguity +# (e.g. "IST" denoting both "Israel Standard Time" and "Indian +# Standard Time"), and they are not likely to go away any time soon. +# In the old days, some software mistakenly relied on unique +# abbreviations, but this is becoming less true with time, and I don't +# think it's that important to cater to such software these days. +# +# On the other hand, there is another motivation for unambiguous +# abbreviations: it cuts down on human confusion. This is +# particularly true for Australia, where "EST" can mean one thing for +# time T and a different thing for time T plus 1 second. +# +# * Does the relevant legislation indicate which abbreviations should be used? +# +# Here I tend to think that things are a mess, just as they are in +# many other countries. We Americans are currently disagreeing about +# which abbreviation to use for the newly legislated Chamorro Standard +# Time, for example. +# +# Personally, I would prefer to use common practice; I would like to +# refer to legislation only for examples of common practice, or as a +# tiebreaker. +# +# * Do Australians more often use "Eastern Daylight Time" or "Eastern +# Summer Time"? Do they typically prefix the time zone names with +# the word "Australian"? +# +# My own impression is that both "Daylight Time" and "Summer Time" are +# common and are widely understood, but that "Summer Time" is more +# popular; and that the leading "A" is also common but is omitted more +# often than not. I just used AltaVista advanced search and got the +# following count of page hits: +# +# 1,103 "Eastern Summer Time" AND domain:au +# 971 "Australian Eastern Summer Time" AND domain:au +# 613 "Eastern Daylight Time" AND domain:au +# 127 "Australian Eastern Daylight Time" AND domain:au +# +# Here "Summer" seems quite a bit more popular than "Daylight", +# particularly when we know the time zone is Australian and not US, +# say. The "Australian" prefix seems to be popular for Eastern Summer +# Time, but unpopular for Eastern Daylight Time. +# +# For abbreviations, tools like AltaVista are less useful because of +# ambiguity. Many hits are not really time zones, unfortunately, and +# many hits denote US time zones and not Australian ones. But here +# are the hit counts anyway: +# +# 161,304 "EST" and domain:au +# 25,156 "EDT" and domain:au +# 18,263 "AEST" and domain:au +# 10,416 "AEDT" and domain:au +# +# 14,538 "CST" and domain:au +# 5,728 "CDT" and domain:au +# 176 "ACST" and domain:au +# 29 "ACDT" and domain:au +# +# 7,539 "WST" and domain:au +# 68 "AWST" and domain:au +# +# This data suggest that Australians tend to omit the "A" prefix in +# practice. The situation for "ST" versus "DT" is less clear, given +# the ambiguities involved. +# +# * How do Australians feel about the abbreviations in the tz database? +# +# If you just count Australians on this list, I count 2 in favor and 3 +# against. One of the "against" votes (David Keegel) counseled delay, +# saying that both AEST/AEDT and EST/EST are widely used and +# understood in Australia. + # From Paul Eggert (1995-12-19): # Shanks reports 2:00 for all autumn changes in Australia and New Zealand. # Mark Prior writes that his newspaper @@ -756,6 +841,28 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # # The state of VICTORIA.. [ Courtesy of Vic. Dept of Premier + Cabinet ] # # [ Nov 1990 ] +# From Scott Harrington (2001-08-29): +# On KQED's "City Arts and Lectures" program last night I heard an +# interesting story about daylight savings time. Dr. John Heilbron was +# discussing his book "The Sun in the Church: Cathedrals as Solar +# Observatories"[1], and in particular the Shrine of Remembrance[2] located +# in Melbourne, Australia. +# +# Apparently the shrine's main purpose is a beam of sunlight which +# illuminates a special spot on the floor at the 11th hour of the 11th day +# of the 11th month (Remembrance Day) every year in memory of Australia's +# fallen WWI soldiers. And if you go there on Nov. 11, at 11am local time, +# you will indeed see the sunbeam illuminate the special spot at the +# expected time. +# +# However, that is only because of some special mirror contraption that had +# to be employed, since due to daylight savings time, the true solar time of +# the remembrance moment occurs one hour later (or earlier?). Perhaps +# someone with more information on this jury-rig can tell us more. +# +# [1] http://www.hup.harvard.edu/catalog/HEISUN.html +# [2] http://www.shrine.org.au + # New South Wales # From Arthur David Olson: @@ -1119,6 +1226,12 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # From Rives McDow (2000-12-01): # Tonga is observing DST as of 2000-11-04 and will stop on 2001-01-27. + +# From Rives McDow (2001-07-17): +# The Kingdom of Tonga will move to DST at 0200 local time on Sunday, +# November 25, 2001 and revert back to standard time at 0300 local +# time on Sunday, March 3, 2002. + ############################################################################### diff -durpN glibc-2.2.4/timezone/backward glibc-2.2.5/timezone/backward --- glibc-2.2.4/timezone/backward Mon Mar 26 20:53:38 2001 +++ glibc-2.2.5/timezone/backward Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)backward 7.20 +# @(#)backward 7.21 # This file provides links between current names for time zones # and their old names. Many names changed in late 1993. @@ -9,8 +9,9 @@ Link America/Indianapolis America/Fort_W Link America/Indiana/Knox America/Knox_IN Link America/Rio_Branco America/Porto_Acre Link America/St_Thomas America/Virgin -Link Asia/Dhaka Asia/Dacca Link Asia/Ashgabat Asia/Ashkhabad +Link Asia/Chongqing Asia/Chungking +Link Asia/Dhaka Asia/Dacca Link Asia/Jerusalem Asia/Tel_Aviv Link Asia/Thimphu Asia/Thimbu Link Asia/Ulaanbaatar Asia/Ulan_Bator @@ -43,9 +44,9 @@ Link Pacific/Easter Chile/EasterIsland Link America/Havana Cuba Link Africa/Cairo Egypt Link Europe/Dublin Eire +Link Europe/Chisinau Europe/Tiraspol Link Europe/London GB Link Europe/London GB-Eire -Link Europe/Chisinau Europe/Tiraspol Link Etc/GMT+0 GMT+0 Link Etc/GMT-0 GMT-0 Link Etc/GMT0 GMT0 @@ -65,9 +66,9 @@ Link America/Denver Navajo Link Pacific/Auckland NZ Link Pacific/Chatham NZ-CHAT Link Pacific/Pago_Pago Pacific/Samoa -Link Asia/Shanghai PRC Link Europe/Warsaw Poland Link Europe/Lisbon Portugal +Link Asia/Shanghai PRC Link Asia/Taipei ROC Link Asia/Seoul ROK Link Asia/Singapore Singapore diff -durpN glibc-2.2.4/timezone/europe glibc-2.2.5/timezone/europe --- glibc-2.2.4/timezone/europe Mon Jul 23 10:58:06 2001 +++ glibc-2.2.5/timezone/europe Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)europe 7.79 +# @(#)europe 7.80 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -9,7 +9,7 @@ # Thomas G. Shanks, The International Atlas (5th edition), # San Diego: ACS Publications, Inc. (1999). # -# Gwillim Law writes that a good source +# Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries @@ -206,7 +206,7 @@ # (Lords Hansard 11 June 1997 columns 964 to 976) # . -# From Paul Eggert (2000-02-17): +# From Paul Eggert (2001-07-18): # # For lack of other data, we'll follow Shanks for Eire in 1940-1948. # @@ -234,6 +234,12 @@ # # # Whitman says Dublin Mean Time was -0:25:21, which is more precise than Shanks. +# Perhaps this was Dunsink Observatory Time, as Dunsink Observatory +# (8 km NW of Dublin's center) seemingly was to Dublin as Greenwich was +# to London. For example: +# +# "Timeball on the ballast office is down. Dunsink time." +# -- James Joyce, Ulysses # From Paul Eggert (1999-03-28): # Clive Feather (, 1997-03-31) @@ -374,14 +380,14 @@ Zone Europe/London -0:01:15 - LMT 1847 D 0:00 GB-Eire %s 1996 0:00 EU GMT/BST Zone Europe/Belfast -0:23:40 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00 # Dublin MT + -0:25:21 - DMT 1916 May 21 2:00 # Dublin/Dunsink MT -0:25:21 1:00 IST 1916 Oct 1 2:00s # Irish Summer Time 0:00 GB-Eire %s 1968 Oct 27 1:00 - BST 1971 Oct 31 2:00u 0:00 GB-Eire %s 1996 0:00 EU GMT/BST -Zone Europe/Dublin -0:25:21 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00 # Dublin MT +Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 + -0:25:21 - DMT 1916 May 21 2:00 -0:25:21 1:00 IST 1916 Oct 1 2:00s 0:00 GB-Eire %s 1921 Dec 6 # independence 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00 @@ -728,12 +734,36 @@ Zone Atlantic/Faeroe -0:27:04 - LMT 1908 # used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU # rules since at least 1991. Assume EU rules since 1980. +# From Gwillin Law (2001-06-06), citing +# (2001-03-15), +# and with translations corrected by Steffen Thorsen: +# +# Greenland has four local times, and the relation to UTC +# is according to the following time line: +# +# The military zone near Thule UTC-4 +# Standard Greenland time UTC-3 +# Scoresbysund UTC-1 +# Danmarkshavn UTC +# +# In the military area near Thule and in Danmarkshavn DST will not be +# introduced. + +# From Paul Eggert (2001-09-29): +# The 1997 CIA map shows Danmarkshavn on GMT; the 1995 map as like Godthab. +# For lack of better info, assume they were like Godthab before 1996. +# The 2000 IATA shows Thule as observing DST, so assume they stopped in 2001. + # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Thule 1993 max - Apr Sun>=1 2:00 1:00 D -Rule Thule 1993 max - Oct lastSun 2:00 0 S +Rule Thule 1993 2000 - Apr Sun>=1 2:00 1:00 D +Rule Thule 1993 2000 - Oct lastSun 2:00 0 S # # Zone NAME GMTOFF RULES FORMAT [UNTIL] +Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 + -3:00 - WGT 1980 Apr 6 2:00 + -3:00 EU WG%sT 1996 + 0:00 - GMT Zone America/Scoresbysund -1:29:00 - LMT 1916 Jul 28 # Ittoqqortoormiit -2:00 - CGT 1980 Apr 6 2:00 -2:00 C-Eur CG%sT 1981 Mar 29 @@ -1081,7 +1111,7 @@ Zone Atlantic/Reykjavik -1:27:24 - LMT 1 # # From Paul Eggert (2001-03-06): # Sicily and Sardinia each had their own time zones from 1866 to 1893, -# called ``Palermo Time'' (+0053) and ``Cagliari Time'' (+0038). +# called Palermo Time (+00:53:28) and Cagliari Time (+00:36:32). # During World War II, German-controlled Italy used German time. # But these events all occurred before the 1970 cutoff, # so record only the time in Rome. @@ -1442,7 +1472,7 @@ Rule Neth 1945 only - Sep 16 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Amsterdam 0:19:32 - LMT 1835 0:19:32 Neth %s 1937 Jul 1 - 0:20 Neth NE%sT 1940 May 17 0:00 # Dutch Time + 0:20 Neth NE%sT 1940 May 16 0:00 # Dutch Time 1:00 C-Eur CE%sT 1945 Apr 2 2:00 1:00 Neth CE%sT 1977 1:00 EU CE%sT @@ -1659,14 +1689,14 @@ Zone Europe/Lisbon -0:36:32 - LMT 1884 1:00 EU CE%sT 1996 Mar 31 1:00u 0:00 EU WE%sT Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada - -1:55 - HMT 1911 May 24 # Horta Mean Time + -1:54:32 - HMT 1911 May 24 # Horta Mean Time -2:00 Port AZO%sT 1966 Apr 3 2:00 # Azores Time -1:00 Port AZO%sT 1983 Sep 25 1:00s -1:00 W-Eur AZO%sT 1992 Sep 27 1:00s 0:00 EU WE%sT 1993 Mar 28 1:00u -1:00 EU AZO%sT Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal - -1:08 - FMT 1911 May 24 # Funchal Mean Time + -1:07:36 - FMT 1911 May 24 # Funchal Mean Time -1:00 Port MAD%sT 1966 Apr 3 2:00 # Madeira Time 0:00 Port WE%sT 1983 Sep 25 1:00s 0:00 EU WE%sT @@ -1707,6 +1737,12 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 # are from Andrey A. Chernov. The rest is from Shanks, except we follow # Chernov's report that 1992 DST transitions were Sat 23:00, not Sun 02:00s. # +# From Stanislaw A. Kuzikowski (1994-06-29): +# But now it is some months since Novosibirsk is 3 hours ahead of Moscow! +# I do not know why they have decided to make this change; +# as far as I remember it was done exactly during winter->summer switching +# so we (Novosibirsk) simply did not switch. +# # From Andrey A. Chernov (1996-10-04): # `MSK' and `MSD' were born and used initially on Moscow computers with # Unix-like OSes by several developer groups (e.g. Demos group, Kiae group).... @@ -1725,12 +1761,44 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 # the rest of Russia for two weeks--even soldiers stationed here began # enforcing curfew at the wrong time. # +# From Gwillim Law (2001-06-05): +# There's considerable evidence that Sakhalin Island used to be in +# UTC+11, and has changed to UTC+10, in this decade. I start with the +# SSIM, which listed Yuzhno-Sakhalinsk in zone RU10 along with Magadan +# until February 1997, and then in RU9 with Khabarovsk and Vladivostok +# since September 1997.... Although the Kuril Islands are +# administratively part of Sakhalin oblast', they appear to have +# remained on UTC+11 along with Magadan. +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] +# +# Kaliningradskaya oblast'. Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr 1:00 C-Eur CE%sT 1945 2:00 Poland CE%sT 1946 3:00 Russia MSK/MSD 1991 Mar 31 2:00s 2:00 Russia EE%sT +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Respublika Adygeya, Arkhangel'skaya oblast', Astrakhanskaya oblast', +# Belgorodskaya oblast', Bryanskaya oblast', Vladimirskaya oblast', +# Volgogradskaya oblast', Vologodskaya oblast', Voronezhskaya oblast', +# Respublika Dagestan, Ivanovskaya oblast', Respublika Ingushetiya, +# Kabarbino-Balkarskaya Respublika, Respublika Kalmykiya, +# Kalyzhskaya oblast', Respublika Karachaevo-Cherkessiya, +# Respublika Kareliya, Kirovskaya oblast', Respublika Komi, +# Kostromskaya oblast', Krasnodarskij kraj, Kurskaya oblast', +# Leningradskaya oblast', Lipetskaya oblast', Respublika Marij El, +# Respublika Mordoviya, Moskva, Moskovskaya oblast', +# Murmanskaya oblast', Nenetskij avtonomnyj okrug, +# Nizhegorodskaya oblast', Novgorodskaya oblast', Orlovskaya oblast', +# Penzenskaya oblast', Pskovskaya oblast', Rostovskaya oblast', +# Ryazanskaya oblast', Sankt-Peterburg, Saratovskaya oblast', +# Respublika Severnaya Osetiya, Smolenskaya oblast', +# Stavropol'skij kraj, Tambovskaya oblast', Respublika Tatarstan, +# Tverskaya oblast', Tyl'skaya oblast', Ul'yanovskaya oblast', +# Chechenskaya Respublika, Chuvashskaya oblast', +# Yaroslavskaya oblast' Zone Europe/Moscow 2:30:20 - LMT 1880 2:30 - MMT 1916 Jul 3 # Moscow Mean Time 2:30:48 Russia %s 1919 Jul 1 2:00 @@ -1739,6 +1807,9 @@ Zone Europe/Moscow 2:30:20 - LMT 1880 3:00 Russia MSK/MSD 1991 Mar 31 2:00s 2:00 Russia EE%sT 1992 Jan 19 2:00s 3:00 Russia MSK/MSD +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Samarskaya oblast', Udmyrtskaya respublika Zone Europe/Samara 3:20:36 - LMT 1919 Jul 1 2:00 3:00 - KUYT 1930 Jun 21 # Kuybyshev 4:00 Russia KUY%sT 1989 Mar 26 2:00s @@ -1746,59 +1817,115 @@ Zone Europe/Samara 3:20:36 - LMT 1919 J 2:00 Russia KUY%sT 1991 Sep 29 2:00s 3:00 - KUYT 1991 Oct 20 3:00 4:00 Russia SAM%sT # Samara Time +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug, +# Kurganskaya oblast', Orenburgskaya oblast', Permskaya oblast', +# Sverdlovskaya oblast', Tyumenskaya oblast', +# Khanty-Manskijskij avtonomnyj okrug, Chelyabinskaya oblast', +# Yamalo-Nenetskij avtonomnyj okrug. Zone Asia/Yekaterinburg 4:02:24 - LMT 1919 Jul 15 4:00 4:00 - SVET 1930 Jun 21 # Sverdlovsk Time 5:00 Russia SVE%sT 1991 Mar 31 2:00s 4:00 Russia SVE%sT 1992 Jan 19 2:00s 5:00 Russia YEK%sT # Yekaterinburg Time +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Respublika Altaj, Altajskij kraj, Omskaya oblast'. Zone Asia/Omsk 4:53:36 - LMT 1919 Nov 14 5:00 - OMST 1930 Jun 21 # Omsk TIme 6:00 Russia OMS%sT 1991 Mar 31 2:00s 5:00 Russia OMS%sT 1992 Jan 19 2:00s 6:00 Russia OMS%sT -# From Stanislaw A. Kuzikowski (1994-06-29): -# But now it is some months since Novosibirsk is 3 hours ahead of Moscow! -# I do not know why they have decided to make this change; -# as far as I remember it was done exactly during winter->summer switching -# so we (Novosibirsk) simply did not switch. +# +# Novosibirskaya oblast'. Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00 6:00 - NOVT 1930 Jun 21 # Novosibirsk Time 7:00 Russia NOV%sT 1991 Mar 31 2:00s 6:00 Russia NOV%sT 1992 Jan 19 2:00s 7:00 Russia NOV%sT 1993 May 23 # says Shanks 6:00 Russia NOV%sT +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Kemerovskaya oblast', Krasnoyarskij kraj, +# Tajmyrskij (Dolgano-Nenetskij) avtonomnyj okrug, Tomskaya oblast', +# Respublika Tuva, Respublika Khakasiya, Evenkijskij avtonomnyj okrug. Zone Asia/Krasnoyarsk 6:11:20 - LMT 1920 Jan 6 6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time 7:00 Russia KRA%sT 1991 Mar 31 2:00s 6:00 Russia KRA%sT 1992 Jan 19 2:00s 7:00 Russia KRA%sT +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Respublika Buryatiya, Irkutskaya oblast', +# Ust'-Ordynskij Buryatskij avtonomnyj okrug. Zone Asia/Irkutsk 6:57:20 - LMT 1880 6:57:20 - IMT 1920 Jan 25 # Irkutsk Mean Time 7:00 - IRKT 1930 Jun 21 # Irkutsk Time 8:00 Russia IRK%sT 1991 Mar 31 2:00s 7:00 Russia IRK%sT 1992 Jan 19 2:00s 8:00 Russia IRK%sT +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast', +# [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'. +# +# From Alan Pritchard (2001-08-24): [The Sakha districts are:] +# Aldansky, Amginsky, Anabarsky, Bulunsky, Churapchinsky, +# Eveno-Bytantaisky, Gorny, Khangalassky, Kobyaisky, Lensky, +# Megino-Kangalassky, Mirninsky, Namsky, Nyurbinsky, Olenyoksky, +# Olyokminsky, Srednekolymsky, Suntarsky, Tattinsky, Ust-Aldansky, +# Verkhnekolymsky, Verkhnevilyuisky, Vilyuisky, Zhigansky. Zone Asia/Yakutsk 8:38:40 - LMT 1919 Dec 15 8:00 - YAKT 1930 Jun 21 # Yakutsk Time 9:00 Russia YAK%sT 1991 Mar 31 2:00s 8:00 Russia YAK%sT 1992 Jan 19 2:00s 9:00 Russia YAK%sT +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj, +# [parts of] Respublika Sakha (Yakutiya). +# +# From Alan Pritchard (2001-08-24): [The Sakha districts are:] +# Tomponsky, Ust-Maisky, Ust-Yansky, Verkhoyansky. Zone Asia/Vladivostok 8:47:44 - LMT 1922 Nov 15 9:00 - VLAT 1930 Jun 21 # Vladivostok Time 10:00 Russia VLA%sT 1991 Mar 31 2:00s 9:00 Russia VLA%sST 1992 Jan 19 2:00s 10:00 Russia VLA%sT +# +# Sakhalinskaya oblast'. +# The Zone name should be Yuzhno-Sakhalinsk, but that's too long. +Zone Asia/Sakhalin 9:30:48 - LMT 1905 Aug 23 + 9:00 - CJT 1938 + 9:00 - JST 1945 Aug 25 + 11:00 Russia SAK%sT 1991 Mar 31 2:00s # Sakhalin T. + 10:00 Russia SAK%sT 1992 Jan 19 2:00s + 11:00 Russia SAK%sT 1997 Mar lastSun 2:00s + 10:00 Russia SAK%sT +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Magadanskaya oblast', Respublika Sakha (Yakutiya). +# +# From Alan Pritchard (2001-08-24): [The Sakha districts are:] +# Abyisky, Allaikhovsky, Momsky, Nizhnekolymsky, Oimyakonsky. Zone Asia/Magadan 10:03:12 - LMT 1924 May 2 10:00 - MAGT 1930 Jun 21 # Magadan Time 11:00 Russia MAG%sT 1991 Mar 31 2:00s 10:00 Russia MAG%sT 1992 Jan 19 2:00s 11:00 Russia MAG%sT -# This name should be Asia/Petropavlovsk-Kamchatski, but that's too long. +# +# From Oscar van Vlijmen (2001-08-25): [This region consists of] +# Kamchatskaya oblast', Koryakskij avtonomnyj okrug. +# +# The Zone name should be Asia/Petropavlovsk-Kamchatski, but that's too long. Zone Asia/Kamchatka 10:34:36 - LMT 1922 Nov 10 11:00 - PETT 1930 Jun 21 # P-K Time 12:00 Russia PET%sT 1991 Mar 31 2:00s 11:00 Russia PET%sT 1992 Jan 19 2:00s 12:00 Russia PET%sT +# +# Chukotskij avtonomnyj okrug Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2 12:00 - ANAT 1930 Jun 21 # Anadyr Time 13:00 Russia ANA%sT 1982 Apr 1 0:00s diff -durpN glibc-2.2.4/timezone/leapseconds glibc-2.2.5/timezone/leapseconds --- glibc-2.2.4/timezone/leapseconds Mon Mar 26 20:53:38 2001 +++ glibc-2.2.5/timezone/leapseconds Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)leapseconds 7.13 +# @(#)leapseconds 7.14 # Allowance for leapseconds added to each timezone file. @@ -43,8 +43,9 @@ Leap 1994 Jun 30 23:59:60 + S Leap 1995 Dec 31 23:59:60 + S Leap 1997 Jun 30 23:59:60 + S Leap 1998 Dec 31 23:59:60 + S -# INTERNATIONAL EARTH ROTATION SERVICE (IERS) -# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE + +# INTERNATIONAL EARTH ROTATION SERVICE (IERS) +# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE # # SERVICE DE LA ROTATION TERRESTRE # OBSERVATOIRE DE PARIS @@ -53,12 +54,26 @@ Leap 1998 Dec 31 23:59:60 + S # FAX : 33 (0) 1 40 51 22 91 # Internet : iers@obspm.fr # -# Paris, 11 January 2001 +# Paris, 25 June 2001 # -# Bulletin C 21 +# Bulletin C 22 # -# To authorities responsible for the measurement and distribution of time +# To authorities responsible +# for the measurement and +# distribution of time # -# INFORMATION ON UTC - TAI +# INFORMATION ON UTC - TAI # -# NO positive leap second will be introduced at the end of June 2001. +# NO positive leap second will be introduced at the end of December 2001. +# The difference between UTC and the International Atomic Time TAI is : +# +# from 1999 January 1, 0h UTC, until further notice : UTC-TAI = -32 s +# +# Leap seconds can be introduced in UTC at the end of the months of December +# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every +# six months, either to announce a time step in UTC, or to confirm that there +# will be no time step at the next possible date. +# +# Daniel GAMBIS +# Director +# Earth Orientation Center of IERS diff -durpN glibc-2.2.4/timezone/northamerica glibc-2.2.5/timezone/northamerica --- glibc-2.2.4/timezone/northamerica Mon Jul 23 10:58:06 2001 +++ glibc-2.2.5/timezone/northamerica Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)northamerica 7.59 +# @(#)northamerica 7.60 # also includes Central America and the Caribbean # This data is by no means authoritative; if you think you know better, @@ -186,7 +186,7 @@ Rule US 1987 max - Apr Sun>=1 2:00 1:00 # See the file "australasia". -# US Eastern time, represented by New York +# US eastern time, represented by New York # Connecticut, Delaware, District of Columbia, most of Florida, # Georgia, far southeastern Indiana, eastern Kentucky, Maine, @@ -208,7 +208,7 @@ Zone America/New_York -4:56:02 - LMT 188 -5:00 NYC E%sT 1967 -5:00 US E%sT -# US Central time, represented by Chicago +# US central time, represented by Chicago # Alabama, Arkansas, Florida panhandle, Illinois, western Indiana # corners, Iowa, most of Kansas, western Kentucky, Louisiana, @@ -232,11 +232,16 @@ Zone America/Chicago -5:50:36 - LMT 1883 -6:00 US C%sT 1946 -6:00 Chicago C%sT 1967 -6:00 US C%sT +# Oliver County, ND switched from mountain to central time on 1992-10-25. +Zone America/North_Dakota/Center -6:45:12 - LMT 1883 Nov 18 12:00 + -7:00 US M%sT 1992 Oct 25 02:00 + -6:00 US C%sT -# US Mountain time, represented by Denver +# US mountain time, represented by Denver # # Colorado, southern Idaho, far western Kansas, Montana, western -# Nebraska, New Mexico, southwestern North Dakota, far eastern Oregon, +# Nebraska, Nevada border (Jackpot, Owyhee, and Mountain City), +# New Mexico, southwestern North Dakota, far eastern Oregon, # western South Dakota, far western Texas (El Paso County, Hudspeth County, # and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming # @@ -256,7 +261,7 @@ Zone America/Denver -6:59:56 - LMT 1883 # US Pacific time, represented by Los Angeles # -# California, northern Idaho, Nevada, most of Oregon, and Washington +# California, northern Idaho, most of Nevada, most of Oregon, and Washington # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER Rule CA 1948 only - Mar 14 2:00 1:00 D @@ -511,6 +516,13 @@ Link America/Louisville America/Kentucky # Wayne County (central Kentucky) is switching from Central (-0600) to Eastern # (-0500) time. They won't "fall back" this year. See Sara Shipley, # The difference an hour makes, Nando Times (2000-08-29 15:33 -0400). +# +# From Paul Eggert (2001-07-16): +# The final rule was published in the +# +# Federal Register 65, 160 (2000-08-17), page 50154-50158. +# +# Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:00 -6:00 US C%sT 1946 -6:00 - CST 1968 @@ -526,13 +538,20 @@ Zone America/Kentucky/Monticello -5:39:2 # Oliver County, ND (from MST to CST) ... 1992-10 # West Wendover, NV (from PST TO MST) ... 1999-10 # Wayne County, KY (from CST to EST) ... 2000-10 -# There is another change in the offing; Mercer County, ND is looking -# to change from MT to CT. It is possible that two other ND counties -# (Sioux and Morton) will look to change also. If made, the earliest -# a change would be effective is October 2001. # -# From Paul Eggert (2000-10-02): -# FIXME: I haven't yet had time to incorporate all the above changes. +# From Paul Eggert (2001-07-17): +# We don't know where the line used to be within Kearny County, KS, +# so omit that change for now. +# See America/Indiana/Knox for the Starke County, IN change. +# See America/North_Dakota/Center for the Oliver County, ND change. +# West Wendover, NV officially switched from Pacific to mountain time on +# 1999-10-31. See the +# +# Federal Register 64, 203 (1999-10-21), page 56705-56707. +# +# However, the Federal Register says that West Wendover already operated +# on mountain time, and the rule merely made this official; +# hence a separate tz entry is not needed. # Michigan # @@ -618,7 +637,7 @@ Link Pacific/Honolulu HST # Thomas G. Shanks, The International Atlas (5th edition), # San Diego: ACS Publications, Inc. (1999). # -# Gwillim Law writes that a good source +# Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries @@ -1077,9 +1096,9 @@ Zone America/Dawson_Creek -8:00:56 - LMT # From Paul Eggert (1999-09-20): # # Basic Facts: The New Territory -# (1999) reports that Pangnirtung operates on Eastern time, +# (1999) reports that Pangnirtung operates on eastern time, # and that Coral Harbour does not observe DST. We don't know when -# Pangnirtung switched to Eastern time; we'll guess 1995. +# Pangnirtung switched to eastern time; we'll guess 1995. # We'll ignore the claim about Coral Harbour for now, # since we have no further info. @@ -1334,6 +1353,15 @@ Zone America/Dawson -9:17:40 - LMT 1900 # References: "Diario de Monterrey" # Palabra (2001-03-31) +# From Reuters (2001-09-04): +# Mexico's Supreme Court on Tuesday declared that daylight savings was +# unconstitutional in Mexico City, creating the possibility the +# capital will be in a different time zone from the rest of the nation +# next year.... The Supreme Court's ruling takes effect at 2:00 +# a.m. (0800 GMT) on Sept. 30, when Mexico is scheduled to revert to +# standard time. "This is so residents of the Federal District are not +# subject to unexpected time changes," a statement from the court said. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -1370,7 +1398,8 @@ Zone America/Mexico_City -6:36:36 - LMT -7:00 - MST 1931 May 1 23:00 -6:00 - CST 1931 Oct -7:00 - MST 1932 Apr 1 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2001 Sep 30 02:00 + -6:00 - CST # Chihuahua Zone America/Chihuahua -7:04:20 - LMT 1921 Dec 31 23:55:40 -7:00 - MST 1927 Jun 10 23:00 @@ -1671,7 +1700,7 @@ Zone America/Jamaica -5:07:12 - LMT 1890 # Martinique # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France - -4:04 - FFMT 1911 May # Fort-de-France MT + -4:04:20 - FFMT 1911 May # Fort-de-France MT -4:00 - AST 1980 Apr 6 -4:00 1:00 ADT 1980 Sep 28 -4:00 - AST @@ -1697,7 +1726,7 @@ Rule Nic 1992 only - Jan 1 4:00 1:00 D Rule Nic 1992 only - Sep 24 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Managua -5:45:08 - LMT 1890 - -5:45 - MMT 1934 Jun 23 # Managua Mean Time + -5:45:12 - MMT 1934 Jun 23 # Managua Mean Time? -6:00 - CST 1973 May -5:00 - EST 1975 Feb 16 -6:00 Nic C%sT 1993 Jan 1 4:00 @@ -1707,7 +1736,7 @@ Zone America/Managua -5:45:08 - LMT 1890 # Panama # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Panama -5:18:08 - LMT 1890 - -5:20 - PMT 1908 Apr 22 # Panama Mean Time + -5:19:36 - CMT 1908 Apr 22 # Colon Mean Time -5:00 - EST # Puerto Rico @@ -1726,7 +1755,7 @@ Zone America/St_Kitts -4:10:52 - LMT 191 # St Lucia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/St_Lucia -4:04:00 - LMT 1890 # Castries - -4:04 - CMT 1912 # Castries Mean Time + -4:04:00 - CMT 1912 # Castries Mean Time -4:00 - AST # St Pierre and Miquelon diff -durpN glibc-2.2.4/timezone/southamerica glibc-2.2.5/timezone/southamerica --- glibc-2.2.4/timezone/southamerica Mon Jul 23 10:58:06 2001 +++ glibc-2.2.5/timezone/southamerica Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)southamerica 7.41 +# @(#)southamerica 7.42 # This data is by no means authoritative; if you think you know better, # go ahead and edit the file (and please send any changes to @@ -9,7 +9,7 @@ # Thomas G. Shanks, The International Atlas (5th edition), # San Diego: ACS Publications, Inc. (1999). # -# Gwillim Law writes that a good source +# Gwillim Law writes that a good source # for recent time zone data is the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries @@ -125,6 +125,29 @@ Rule Arg 2000 only - Mar Sun>=1 0:00 0 - # de la Rua on March 2, 2000, because it would make people spend more energy # in the winter time, rather than less. The change took effect on March 3. # +# From Mariano Absatz (2001-06-06): +# one of the major newspapers here in Argentina said that the 1999 +# Timezone Law (which never was effectively applied) will (would?) be +# in effect.... The article is at +# http://ar.clarin.com/diario/2001-06-06/e-01701.htm +# ... The Law itself is "Ley No 25155", sanctioned on 1999-08-25, enacted +# 1999-09-17, and published 1999-09-21. The official publication is at: +# http://www.boletin.jus.gov.ar/BON/Primera/1999/09-Septiembre/21/PDF/BO21-09-99LEG.PDF +# Regretfully, you have to subscribe (and pay) for the on-line version.... +# +# (2001-06-12): +# the timezone for Argentina will not change next Sunday. +# Apparently it will do so on Sunday 24th.... +# http://ar.clarin.com/diario/2001-06-12/s-03501.htm +# +# (2001-06-25): +# Last Friday (yes, the last working day before the date of the change), the +# Senate annulled the 1999 law that introduced the changes later postponed. +# http://www.clarin.com.ar/diario/2001-06-22/s-03601.htm +# It remains the vote of the Deputies..., but it will be the same.... +# This kind of things had always been done this way in Argentina. +# We are still -03:00 all year round in all of the country. +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Buenos Aires (BA), Capital Federal (CF), Santa Cruz (SC), @@ -206,7 +229,7 @@ Zone America/Aruba -4:40:24 - LMT 1912 F # Bolivia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/La_Paz -4:32:36 - LMT 1890 - -4:32:36 - LPMT 1931 Oct 15 # La Paz Mean Time + -4:32:36 - CMT 1931 Oct 15 # Calamarca MT -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST -4:00 - BOT # Bolivia Time @@ -382,8 +405,14 @@ Rule Brazil 2000 only - Feb 27 0:00 0 - # repeals DST in PE and RR, effective 2000-10-15 00:00. # Decree 3,632 (2000-10-17) # repeals DST in SE, AL, PB, RN, CE, PI and MA, effective 2000-10-22 00:00. +# Decree 3,916 +# (2001-09-13) reestablishes DST in AL, CE, MA, PB, PE, PI, RN, SE. # -# These give only one year's rules. After that, the rules are guesses +# The latest decree listed above says that the following states observe DST: +# AL, BA, CE, DF, ES, GO, MA, MG, MS, MT, +# PB, PE, PI, PR, RJ, RN, RS, SC, SE, SP, TO. +# +# For dates after mid-2002, the following rules are guesses # and are quite possibly wrong, but are more likely than no DST at all. Rule Brazil 2000 max - Oct Sun>=8 0:00 1:00 S Rule Brazil 2001 max - Feb Sun>=15 0:00 0 - @@ -409,14 +438,16 @@ Zone America/Fortaleza -2:34:00 - LMT 19 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1999 Sep 30 -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT + -3:00 - BRT 2001 Sep 13 + -3:00 Brazil BR%sT # # Pernambuco (PE) (except Atlantic islands) Zone America/Recife -2:19:36 - LMT 1914 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1999 Sep 30 -3:00 Brazil BR%sT 2000 Oct 15 - -3:00 - BRT + -3:00 - BRT 2001 Sep 13 + -3:00 Brazil BR%sT # # Tocantins (TO) Zone America/Araguaina -3:12:48 - LMT 1914 @@ -431,7 +462,8 @@ Zone America/Maceio -2:22:52 - LMT 1914 -3:00 Brazil BR%sT 1996 Sep 4 -3:00 - BRT 1999 Sep 30 -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT + -3:00 - BRT 2001 Sep 13 + -3:00 Brazil BR%sT # # Bahia (BA), Goias (GO), Distrito Federal (DF), Minas Gerais (MG), # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR), @@ -441,7 +473,7 @@ Zone America/Sao_Paulo -3:06:28 - LMT 19 -3:00 1:00 BRST 1964 -3:00 Brazil BR%sT # -# Mato Grosso, Mato Grosso do Sul +# Mato Grosso (MT), Mato Grosso do Sul (MS) Zone America/Cuiaba -3:44:20 - LMT 1914 -4:00 Brazil AM%sT # @@ -726,7 +758,7 @@ Rule Peru 1994 only - Jan 1 0:00 1:00 S Rule Peru 1994 only - Apr 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 - -5:09 - LMT 1908 Jul 28 # Lima Mean Time + -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? -5:00 Peru PE%sT # Peru Time # South Georgia @@ -811,6 +843,6 @@ Zone America/Montevideo -3:44:44 - LMT 1 # Venezuela # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Caracas -4:27:44 - LMT 1890 - -4:27:44 - CMT 1912 Feb 12 # Caracas Mean Time + -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? -4:30 - VET 1965 # Venezuela Time -4:00 - VET diff -durpN glibc-2.2.4/timezone/zic.c glibc-2.2.5/timezone/zic.c --- glibc-2.2.4/timezone/zic.c Mon Jul 23 10:58:06 2001 +++ glibc-2.2.5/timezone/zic.c Wed Dec 5 10:53:04 2001 @@ -1,6 +1,6 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)zic.c 7.102"; +static char elsieid[] = "@(#)zic.c 7.104"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -1616,16 +1616,16 @@ const int zonecount; typecnt = 0; charcnt = 0; /* - ** A guess that may well be corrected later. - */ - stdoff = 0; - /* ** Thanks to Earl Chew (earl@dnd.icp.nec.com.au) ** for noting the need to unconditionally initialize startttisstd. */ startttisstd = FALSE; startttisgmt = FALSE; for (i = 0; i < zonecount; ++i) { + /* + ** A guess that may well be corrected later. + */ + stdoff = 0; zp = &zpfirst[i]; usestart = i > 0 && (zp - 1)->z_untiltime > min_time; useuntil = i < (zonecount - 1); @@ -1645,8 +1645,7 @@ const int zonecount; if (usestart) { addtt(starttime, type); usestart = FALSE; - } - else if (stdoff != 0) + } else if (stdoff != 0) addtt(min_time, type); } else for (year = min_year; year <= max_year; ++year) { if (useuntil && year > zp->z_untilrule.r_hiyear) diff -durpN glibc-2.2.4/timezone/zone.tab glibc-2.2.5/timezone/zone.tab --- glibc-2.2.4/timezone/zone.tab Mon Jul 23 10:58:06 2001 +++ glibc-2.2.5/timezone/zone.tab Sun Oct 14 14:36:30 2001 @@ -1,4 +1,4 @@ -# @(#)zone.tab 1.23 +# @(#)zone.tab 1.24 # # TZ zone descriptions # @@ -123,10 +123,10 @@ CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago most locations CL -2710-10927 Pacific/Easter Easter Island & Sala y Gomez CM +0403+00942 Africa/Douala -CN +4545+12641 Asia/Harbin north Manchuria -CN +3114+12128 Asia/Shanghai China coast -CN +2934+10635 Asia/Chungking China mountains -CN +4348+08735 Asia/Urumqi Tibet & Xinjiang +CN +3114+12128 Asia/Shanghai most eastern locations +CN +4545+12641 Asia/Harbin Heilongjiang +CN +2934+10635 Asia/Chongqing central China +CN +4348+08735 Asia/Urumqi Tibet & most of Xinjiang CN +3929+07559 Asia/Kashgar Eastern Turkestan CO +0436-07405 America/Bogota CR +0956-08405 America/Costa_Rica @@ -168,9 +168,10 @@ GE +4143+04449 Asia/Tbilisi GF +0456-05220 America/Cayenne GH +0533-00013 Africa/Accra GI +3608-00521 Europe/Gibraltar -GL +7030-02215 America/Scoresbysund east Greenland -GL +6411-05144 America/Godthab southwest Greenland -GL +7634-06847 America/Thule northwest Greenland +GL +6411-05144 America/Godthab most locations +GL +7646-01840 America/Danmarkshavn Danmarkshavn +GL +7030-02215 America/Scoresbysund Scoresbysund / Ittoqqortoormiit +GL +7634-06847 America/Thule Thule / Pituffik and environs GM +1328-01639 Africa/Banjul GN +0931-01343 Africa/Conakry GP +1614-06132 America/Guadeloupe @@ -239,7 +240,7 @@ ML +1446-00301 Africa/Timbuktu northeast MM +1647+09610 Asia/Rangoon MN +4755+10653 Asia/Ulaanbaatar most locations MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan -#MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar (unsure about this) +MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar MO +2214+11335 Asia/Macao MP +1512+14545 Pacific/Saipan MQ +1436-06105 America/Martinique @@ -305,7 +306,8 @@ RU +5601+09250 Asia/Krasnoyarsk Moscow+0 RU +5216+10420 Asia/Irkutsk Moscow+05 - Lake Baikal RU +6200+12940 Asia/Yakutsk Moscow+06 - Lena River RU +4310+13156 Asia/Vladivostok Moscow+07 - Amur River -RU +5934+15048 Asia/Magadan Moscow+08 - Magadan & Sakhalin +RU +4658+14242 Asia/Sakhalin Moscow+07 - Sakhalin Island +RU +5934+15048 Asia/Magadan Moscow+08 - Magadan RU +5301+15839 Asia/Kamchatka Moscow+09 - Kamchatka RU +6445+17729 Asia/Anadyr Moscow+10 - Bering Sea RW -0157+03004 Africa/Kigali @@ -363,6 +365,7 @@ US +411745-0863730 America/Indiana/Knox US +384452-0850402 America/Indiana/Vevay Eastern Standard Time - Indiana - Switzerland County US +415100-0873900 America/Chicago Central Time US +450628-0873651 America/Menominee Central Time - Michigan - Wisconsin border +US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County US +394421-1045903 America/Denver Mountain Time US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon US +364708-1084111 America/Shiprock Mountain Time - Navajo diff -durpN glibc-2.2.4/version.h glibc-2.2.5/version.h --- glibc-2.2.4/version.h Fri Jul 27 23:13:11 2001 +++ glibc-2.2.5/version.h Tue Jan 8 10:21:33 2002 @@ -1,4 +1,4 @@ /* This file just defines the current version number of libc. */ #define RELEASE "stable" -#define VERSION "2.2.4" +#define VERSION "2.2.5" diff -durpN glibc-2.2.4/wcsmbs/wchar.h glibc-2.2.5/wcsmbs/wchar.h --- glibc-2.2.4/wcsmbs/wchar.h Mon Jul 23 10:58:07 2001 +++ glibc-2.2.5/wcsmbs/wchar.h Wed Oct 31 00:45:07 2001 @@ -184,7 +184,7 @@ extern wchar_t *wcsrchr (__const wchar_t __THROW __attribute_pure__; #ifdef __USE_GNU -/* This funciton is similar to `wcschr'. But it returns a pointer to +/* This function is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) __THROW __attribute_pure__; @@ -266,7 +266,7 @@ extern int wctob (wint_t __c) __THROW; /* Determine whether PS points to an object representing the initial state. */ -extern int mbsinit (__const mbstate_t *__ps) __THROW; +extern int mbsinit (__const mbstate_t *__ps) __THROW __attribute_pure__; /* Write wide character representation of multibyte character pointed to by S to PWC. */ @@ -324,7 +324,7 @@ extern size_t wcsnrtombs (char *__restri /* The following functions are extensions found in X/Open CAE. */ #ifdef __USE_XOPEN /* Determine number of column positions required for C. */ -extern int wcwidth (wint_t __c) __THROW; +extern int wcwidth (wchar_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ diff -durpN glibc-2.2.4/wcsmbs/wcscoll.c glibc-2.2.5/wcsmbs/wcscoll.c --- glibc-2.2.4/wcsmbs/wcscoll.c Mon Jul 23 10:58:08 2001 +++ glibc-2.2.5/wcsmbs/wcscoll.c Fri Aug 17 00:14:53 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -25,7 +25,7 @@ #ifdef USE_IN_EXTENDED_LOCALE_MODEL # define STRCOLL __wcscoll_l #else -# define STRCOLL wcscoll +# define STRCOLL __wcscoll #endif #define STRCMP wcscmp #define STRLEN __wcslen @@ -35,3 +35,7 @@ #define WIDE_CHAR_VERSION 1 #include "../string/strcoll.c" + +#ifndef USE_IN_EXTENDED_LOCALE_MODEL +weak_alias (__wcscoll, wcscoll) +#endif diff -durpN glibc-2.2.4/wcsmbs/wcwidth.c glibc-2.2.5/wcsmbs/wcwidth.c --- glibc-2.2.4/wcsmbs/wcwidth.c Mon Jul 23 10:58:09 2001 +++ glibc-2.2.5/wcsmbs/wcwidth.c Sat Aug 18 18:08:24 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -21,7 +21,7 @@ /* Determine number of column positions required for CH. */ int -wcwidth (wint_t ch) +wcwidth (wchar_t ch) { return internal_wcwidth (ch); } diff -durpN glibc-2.2.4/wcsmbs/wcwidth.h glibc-2.2.5/wcsmbs/wcwidth.h --- glibc-2.2.4/wcsmbs/wcwidth.h Mon Jul 23 10:58:09 2001 +++ glibc-2.2.5/wcsmbs/wcwidth.h Sat Aug 18 18:08:07 2001 @@ -1,5 +1,5 @@ /* Internal header containing implementation of wcwidth() function. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -26,7 +26,7 @@ extern const char *__ctype32_width; static __inline int -internal_wcwidth (wint_t wc) +internal_wcwidth (wchar_t wc) { unsigned char res;